(function(w,y,k,S){var m=function(){var c={};return{register:function(f,k){c[f]=k},require:function(f,k){var l=c[f];if(!l)throw Error('CommonJS error: failed to require("'+k+'")');return l}}}();m.register("$1",function(c,f,k){function l(b){var e=typeof b;if("string"===e)if(/[^ <>!=()%^&|?:n0-9]/.test(b))console.error("Invalid plural: "+b);else return new Function("n","return "+b);"function"!==e&&(b=function(a){return 1!=a});return b}c.init=function(b){function e(d,b,e){return(d=a[d])&&d[e]?d[e]:b||
""}b=l(b);var a={};return{_:function(a){return e(a,a,0)},_x:function(a,b){return e(b+"\u0004"+a,a,0)},_n:function(a,p,h){h=Number(b(h));isNaN(h)&&(h=0);return e(a,h?p:a,h)},load:function(d){a=d||{};return this},pluraleq:function(a){b=l(a);return this}}};return c}({},w,y));m.register("$2",function(c,f,k){Array.prototype.indexOf||(Array.prototype.indexOf=function(c){if(null==this)throw new TypeError;var b,e=Object(this),a=e.length>>>0;if(0===a)return-1;b=0;1<arguments.length&&(b=Number(arguments[1]),
b!=b?b=0:0!=b&&Infinity!=b&&-Infinity!=b&&(b=(0<b||-1)*Math.floor(Math.abs(b))));if(b>=a)return-1;for(b=0<=b?b:Math.max(a-Math.abs(b),0);b<a;b++)if(b in e&&e[b]===c)return b;return-1});return c}({},w,y));m.register("$3",function(c,f,k){c.trim=function(c,b){for(b||(b=" \n");c&&-1!==b.indexOf(c.substr(0,1));)c=c.substr(1);for(;c&&-1!==b.indexOf(c.substr(-1));)c=c.substr(0,c.length-1);return c};c.sprintf=function(c){var b=0,e,a=[].slice.call(arguments,1);return c.replace(/%(s|u|%)/g,function(d,p){if("%"===
p)return"%";e=a[b++];return String(e)||""})};return c}({},w,y));m.register("$48",function(c,f,k){function l(){var b=a;d&&(b="("+d+") "+b);k.title=b}function b(d){d||(d=e);d!==a&&(a=d,l())}var e=k.title,a=e,d=0;c.set=function(a){b(a);return c};c.get=function(){return a};c.replace=function(d,e){b(a.replace(d,e));return c};c.badge=function(a){isNaN(a=Number(a))&&(a=0);a!==d&&(d=a,l());return c};return c}({},w,y));m.register("$42",function(c,f,k){function l(d){a||f._gat&&(a=_gat._createTracker(b,"loco"));
if(a){var p=d.shift();a[p].apply(a,d)}else e&&e.push(d);return c}var b,e,a;c._init=function(a){if(b=a.code){e=f._gaq||(f._gaq=[]);e.push(["_setAccount",b]);e.push(["_gat._anonymizeIp"]);e.push(["_setDomainName",a.host]);e.push(["_trackPageview"]);a=k.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"==k.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var p=k.getElementsByTagName("script")[0];p.parentNode.insertBefore(a,p)}return c};c.event=function(a,
b,e,g){return l(["_trackEvent",a||"",b||"",e||"",g||0])};c.page=function(a,b){var e={page:a||location.pathname+location.hash,title:b||m.require("$48","title.js").get()};return l(["_trackPageview",e])};return c}({},w,y));m.register("$43",function(c,f,k){function l(a,d){if(b)b[a](d);else f.ga&&ga(a,d);return c}var b,e;c._init=function(a){a.code&&(function(a,b,e,g,n,A,c){a.GoogleAnalyticsObject=n;a[n]=a[n]||function(){(a[n].q=a[n].q||[]).push(arguments)};a[n].l=1*new Date;A=b.createElement(e);c=b.getElementsByTagName(e)[0];
A.async=1;A.src=g;c.parentNode.insertBefore(A,c)}(f,k,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",a.code,{alwaysSendReferrer:!0,userId:a.uid}),ga("set","anonymizeIp",!0),a.custom&&l("set",a.custom),c.page(),ga(function(a){b=a}));return c};c.event=function(a,d,b,e){return l("send",{hitType:"event",eventCategory:a||"",eventAction:d||"",eventLabel:b||"",eventValue:Number(e||0)})};c.page=function(a,d){var b={hitType:"pageview",page:a||location.pathname+location.hash,title:d||
m.require("$48","title.js").get()};b.location=location.protocol+"//"+location.hostname+b.page;e&&l("set",{referrer:e});e=b.location;return l("send",b)};c.reset=function(){e=location.href;var a={page:location.pathname+location.hash,title:m.require("$48","title.js").get(),location:e};l("set",a);return c};return c}({},w,y));m.register("$31",function(c,f,D){function l(a,e){k(a).click(function(a){b&&b.event(e,"click",this.getAttribute("href")||"");return!0});a=null;return c}var b,e=location.hostname,a=
"/help"===location.pathname.substr(0,5);c.init=function(a){!b&&a&&(e=a.host||(a.host=e),b=a.legacy?m.require("$42","legacy.js"):m.require("$43","universal.js"),b._init(a));return c};c.link=function(d){for(var b=d.getAttribute("href");b&&"#"!==b;){if(0===b.indexOf("#"))return l(d,"anchor");if("/help"===b.substr(0,5)&&!a)d.setAttribute("target","_blank");else if(0===b.indexOf("http")||0===b.indexOf("//")){if(-1!==b.indexOf(e)&&/^(https?:)*\/\/([^\/]+)/.exec(b)&&e===RegExp.$2)break;d.setAttribute("target",
"_blank");l(d,"external")}break}return c};c.page=function(){b&&b.page.apply(b,arguments);return c};c.event=function(){b&&b.event.apply(b,arguments);return c};c.reset=function(){b&&b.reset&&b.reset();return c};return c}({},w,y));m.register("$36",function(c,f,m){function l(a){return 27===a.keyCode&&r&&v?(I(),a.preventDefault(),!1):!0}function b(){if(r){var a=f.innerWidth,d=f.innerHeight;a!==H&&(H=a,K(u));d!==z&&(z=d,s&&e())}return!0}function e(){var a=p.outerHeight(!0)-s.clientHeight;s.style.maxHeight=
String(z-a)+"px"}function a(a){a?(n.show(),h.addClass("has-title")):(n.hide(),h.removeClass("has-title"))}var d,p,h,g,n,A,C,s,r=!1,v=!1,q=!1,B,E,H,u,z,F=c.init=function(){if(!d){d=k('<div id="overlay"></div>');p=k('<div class="overlay-frame"></div>');h=k('<div class="overlay-container"></div>');n=k('<div class="overlay-title"><span class="icon"></span><span class="title">Untitled</span></div>');A=k("<nav></nav>");C=k('<a class="overlay-close" href="#"><span>x</span></a>');g=k('<div class="overlay-bg"></div>');
d.append(p.append(h)).append(g).prependTo(m.body);k(m).on("keydown",l);k(f).resize(b);H=f.innerWidth;z=f.innerHeight;E=h.outerWidth(!0)-h.width()+(p.innerWidth()-p.width());B=parseInt(h.css("width"));if(!B||isNaN(B))B=h.width();A.hide().prependTo(p);n.append(C.hide()).hide().prependTo(p);d.hide()}return d},K=c.width=function(a){var d=F();if(null===a)p.css("width",""),h.css("width","");else{a=a||B||640;x=a+E;u=a;var g=H;x>g?(x=g,a=x-E,d.addClass("spill")):d.removeClass("spill");p.css("width",x+"px");
h.css("width",a+"px")}return c};c.autoSize=function(){var a=F(),d=B||0;h.children().each(function(a,g){d=Math.max(d,k(g).outerWidth(!0))});K(d);if(s=a.find("div.overlay-scroll")[0])z=f.innerHeight,e();return c};c.css=function(a){F().attr("class",a);return c};c.think=function(){F().addClass("loading");return c};c.unthink=function(){F().removeClass("loading");return c};c.html=function(a){F();f.innerShiv&&(a=innerShiv(a,!1));return h.html(a)};c.append=function(a){F();a instanceof jQuery||(a=k(a));h.append(a);
return c};var I=c.close=function(a){if(r){var g=function(){F().hide();k(m.body).removeClass("has-overlay");r=!1;h.html("");r=null;d.trigger("overlayClosed",[c])};null==a&&(a=300);d.trigger("overlayClosing",[c]);a?d.fadeOut(a,g):g()}return c};c.title=function(d,g){F();var b="",e=n.find("span");g&&/^lang lang-(\w+)/.exec(g)&&(b=RegExp.$1);e.eq(0).attr("class",g||"no-icon").attr("lang",b);q=d||"";e.eq(1).text(q);null!=d?a(!0):v||a(!1);return c};c.enableClose=function(){F();v=!0;C.off("click").on("click",
function(){I();return!1});a(!0);C.show();return c};c.disableClose=function(){F();v=!1;C.hide();r&&q||a(!1);return c};c.enableNav=function(a){A.append(a);A.show();return c};c.disableNav=function(){A.html("").hide();return c};c.open=function(){F();h.html("");K(B);d.attr("class","");k(m.body).addClass("has-overlay");F().show();r||(r=!0,b());c.title(null);v&&a(!0);d.trigger("overlayOpened",[c]);return c};c.active=function(){return r};c.listen=function(a){F().on("overlayClosed",a);return c};c.unlisten=
function(a){F().off("overlayClosed",a);return c};return c}({},w,y));m.register("$11",function(c,f,m){function l(a,d){this.$element=k(a);this.options=d;this.enabled=!0;this.fixTitle()}c.init=function(a,d){var p={fade:!0,offset:5,delayIn:b,delayOut:e,anchor:a.attr("data-anchor"),gravity:a.attr("data-gravity")||"s"};d&&(p=k.extend({},p,d));a.tipsy(p)};c.delays=function(a,d){b=a||150;e=d||100};c.kill=function(){k("div.tipsy").remove()};c.text=function(a,d){d.data("tipsy").setTitle(a)};var b,e;c.delays();
k(m.body).on("overlayOpened overlayClosing",function(a){c.kill();return!0});l.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var d=this.tip();d.find(".tipsy-inner")[this.options.html?"html":"text"](a);d[0].className="tipsy";d.remove().css({top:0,left:0}).prependTo(m.body);var a=(a=this.options.anchor)?this.$element.find(a):this.$element,a=k.extend({},a.offset(),{width:a[0].offsetWidth,height:a[0].offsetHeight}),b=d[0].offsetWidth,e=d[0].offsetHeight,g="function"==typeof this.options.gravity?
this.options.gravity.call(this.$element[0]):this.options.gravity,n;switch(g.charAt(0)){case "n":n={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-b/2};break;case "s":n={top:a.top-e-this.options.offset,left:a.left+a.width/2-b/2};break;case "e":n={top:a.top+a.height/2-e/2,left:a.left-b-this.options.offset};break;case "w":n={top:a.top+a.height/2-e/2,left:a.left+a.width+this.options.offset}}2==g.length&&("w"==g.charAt(1)?n.left=a.left+a.width/2-15:n.left=a.left+a.width/2-b+15);d.css(n).addClass("tipsy-"+
g);d.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+g.charAt(0);this.options.className&&d.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);d.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var a=this.$element,d=a.attr("title")||"";(d||"string"!==typeof a.attr("original-title"))&&a.attr("original-title",d).removeAttr("title")},getTitle:function(){var a,d=this.$element,b=this.options;this.fixTitle();
"string"==typeof b.title?a=d.attr("title"==b.title?"original-title":b.title):"function"==typeof b.title&&(a=b.title.call(d[0]));return(a=(""+a).replace(/(^\s*|\s*$)/,""))||b.fallback},setTitle:function(a){var d=this.$element;d.attr("default-title")||d.attr("default-title",this.getTitle());null==a&&(a=d.attr("default-title")||this.getTitle());d.attr("original-title",a);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?"html":"text"](a)},tip:function(){this.$tip||(this.$tip=k('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),
this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.hide();this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};k.fn.tipsy=function(a){function d(d){var b=k.data(d,"tipsy");b||(b=new l(d,k.fn.tipsy.elementOptions(d,a)),k.data(d,"tipsy",b));return b}function b(){var g=d(this),e=a.delayIn;g.hoverState="in";0==e?g.show():
(g.fixTitle(),setTimeout(function(){"in"==g.hoverState&&g.show()},e))}function e(){var b=d(this),g=a.delayOut;b.hoverState="out";0==g?b.hide():(b.tip().removeClass("in"),setTimeout(function(){"out"==b.hoverState&&b.hide()},g))}a=k.extend({},k.fn.tipsy.defaults,a);a.live||this.each(function(){d(this)});if("manual"!=a.trigger){var g=a.live?"live":"bind",n="hover"==a.trigger?"mouseleave":"blur";this[g]("hover"==a.trigger?"mouseenter":"focus",b)[g](n,e)}return this};k.fn.tipsy.defaults={className:null,
delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover",anchor:null};k.fn.tipsy.elementOptions=function(a,b){return k.metadata?k.extend({},b,k(a).metadata()):b};k.fn.tipsy.autoNS=function(){return k(this).offset().top>k(m).scrollTop()+k(f).height()/2?"s":"n"};k.fn.tipsy.autoWE=function(){return k(this).offset().left>k(m).scrollLeft()+k(f).width()/2?"e":"w"};k.fn.tipsy.autoBounds=function(a,b){return function(){var e=b[0],c=1<b.length?
b[1]:!1,g=k(m).scrollTop()+a,n=k(m).scrollLeft()+a,A=k(this);A.offset().top<g&&(e="n");A.offset().left<n&&(c="w");k(f).width()+k(m).scrollLeft()-A.offset().left<a&&(c="e");k(f).height()+k(m).scrollTop()-A.offset().top<a&&(e="s");return e+(c?c:"")}};return c}({},w,y));m.register("$8",function(c,f,m){c.listen=function(c,b){function e(){s[h?"show":"hide"]()}function a(a){C&&c.setAttribute("size",2+a.length);h=a;e();return a}function d(){g=null;b(h)}function p(){var b=c.value;A&&b===A&&(b="");b!==h&&
(g&&clearTimeout(g),a(b),n?g=setTimeout(d,n):d())}var h,g;c=c instanceof jQuery?c[0]:c;var n=150,A=f.attachEvent&&c.getAttribute("placeholder"),C=1===Number(c.size),s=k('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){c.value="";p();return!1});a(c.value);k(c).on("input blur focus",function(){p();return!0}).after(s);e();return{delay:function(a){n=a},ping:function(b){b?(g&&clearTimeout(g),b=c.value,A&&b===A&&(b=""),a(b),d(),b=void 0):b=p();return b},val:function(b){if(null==
b)return h;g&&clearTimeout(g);c.value=a(b);e()},el:function(){return c},blur:function(a){return k(c).on("blur",a)}}};return c}({},w,y));m.register("$35",function(c,f,m){function l(a,b,p,c,g){function n(){s&&clearTimeout(s);r&&r.fadeOut(400,function(){k(this).remove();r=null});return!1}function A(){C();-1!==c&&(s=setTimeout(n,c||2E3));r.off("mouseleave").on("mouseenter",C)}function C(){s&&clearTimeout(s);s=null;r.off("mouseenter").on("mouseleave",A)}var s;e||(e=m.createElement("div"),e.id="growls",
m.body.appendChild(e));var r=k('<div class="growl growl-'+p+'"><div><a class="close" href="#"><span>X</span></a><span class="badge"></span><p class="message"></p><small class="caption"></small></div></div>');r.find("p").text(a||"Empty message");b?r.find("small").text(b):r.find("small").remove();if(g.length){g.push({label:"Cancel",callback:n,css:"cancel"});var v,q=k('<form action="#" class="dialog"></form>');b=function(a,b){v=k('<input type="button" value="'+b.label+'" class="butt '+(b.css||"")+'" />');
v.click(function(a){"function"===typeof b.callback&&b.callback(a,{close:n})});q.append(v);return v};for(a=0;a<g.length;a++)b(a,g[a]);r.append(q)}k(e).prepend(r.hide().fadeIn(400));r.find("a").click(n);A()}var b,e;c.init=function(){if(!b)return b=f.alert,f.alert=function(a){a=String(a).split("\n");var b=a[1]&&a.slice(1).join("\n");c.alert(a[0],b)},c};c.debug=function(a){b(a);return c};c.alert=function(a,d,e,c,g){try{return l(a,d||"",e||"alert",c||4E3,g||[]),!0}catch(n){return a+="\n\n--\n"+(n.message||
n),b.call(f,a),!1}};c.success=function(a,b,e){return c.alert(a,b,"success",e||2E3)};c.dialog=function(a,b,e,h){return c.alert(a,b,h||"alert",-1,e)};return c}({},w,y));m.register("$22",function(c,f,D){function l(a){var d;(d=a.alert)&&alert(d);(d=a.success)&&m.require("$35","growl.js").success.apply(null,d.push?d:[d]);if(d=a.download)f.location.assign(d);else if(d=a.redirect)if(0===d.indexOf("/modal/"))a.modal={url:d};else return f.location.assign(d),!1;else if(a.reload)return f.location.reload(),!1;
(d=a.modal)&&m.require("$32","modal.js").replace(d);(d=a.async)&&b(d.job_id,d.title)}function b(a,b){var e=m.require("$36","overlay.js");e.open().disableClose().css("modal-processing").html('<div class="wrap"><h2>'+(b||"Please wait")+"</h2></div>");m.require("$37","async.js").init(a).delay(500).timeout(2E4).listen("error",function(a){e.css("modal-error").enableClose().title("Error");e.html("<h2>"+(a||"Unknown error")+"</h2>")}).listen("complete",function(a){e.close();e=null;a&&l(a)}).start()}var e=
{401:"Authorization Required",422:"Invalid data sent to server",404:"Not Found",500:"Server Error",502:"Bad Gateway",503:"Service unavailable",504:"Gateway timeout"};c.jsonLink=function(a){if(!a)return"";a=a.split("?");a[0]=a[0].replace(/(\.[a-z0-9]{1,4})?$/i,".json");return a.join("?")};c.errorData=function(a,b,c){var h,g;c=a.responseText;b=a.status;if(!c&&0===b)return null;try{h=k.parseJSON(c)||{}}catch(n){h={},g=e[a.status]||n.message||n}h.error=g||h.error||h.statusText||a.statusText||e[b]||"Unknown Error";
return h};c.ajax=function(a,b,p,h){function g(a){function b(a){var g=a&&a[0];if(!g||D.contains&&!D.contains(g))a=k(D.body);return a}var g=b(h);g.trigger("locoAjaxSuccess",[a]);var d=a.events;if(d&&d.length)for(var e,q=m.require("$31","ga.js");e=d.shift();)g=b(g),g.trigger(e,[a]),q.event("ajax",e);if(!1===l(a))return!1;p&&p();return!0}function n(n,h,s){if("abort"!==h){var r=n.status,v,q=a.statusCode;if(200===r||!q||!q[r])if(401===r)m.require("$32","modal.js").load("/modal/user/ping.json?r="+encodeURIComponent(location.pathname),
e[r]);else{if("parsererror"===h)f.console&&console.error&&console.error(r,n.responseText),v=404===r?"Ajax service not found":/^\s+Fatal error/.test(n.responseText)?"Fatal server error from Ajax request":"Bad Ajax response";else{var B=c.errorData(n,h,s);B&&B.error&&(v=B.error)}"function"===typeof b&&!1===b(null,v,r,n)?p&&p():B&&B.data&&!g(B.data)||(alert(v||"Unknown Ajax error"),p&&p())}}}(a.headers||(a.headers={}))["X-Loco-Csrf"]=f.loco&&G.csrf||"";a.error=n;a.success=function(a,c,s){if(!a||"object"!==
typeof a)return n(s,"unknown");(a.status||a.error)&&alert(a.error||a.statusText||s.statusText||e[a.status]||"Unknown Error");"function"===typeof b&&!1===b(a&&a.data?a.data:a,null,c,s)?p&&p():a&&a.data?g(a.data):p&&p()};-1!==a.url.indexOf(".json")&&(a.dataType="json");return k.ajax(a)};return c}({},w,y));m.register("$37",function(c,f,k){c.init=function(c){function b(a,b){for(var g=-1,d,e=B[a]||[];++g<e.length;)(d=e[g])&&d.apply&&d.apply(null,b||[])}function e(a){h();p();b("error",[a])}function a(){var a=
s+"ms",b=Math.round(s/1E3);1<b&&(a=b+" seconds");e("Job timeout after "+a)}function d(a,g){if(!a||g)a={state:"error",message:g};try{var d=a.state||"error";switch(d){case "queued":case "started":case "starting":case "progress":var q=a.progress||0,r=a.message||d;q!==A&&(h(),A=q);b("progress",[A,r,"state"]);n();break;case "done":var c=a.data,v=a.message||"Done";A=100;h();p();b("complete",[c,v]);break;case "error":e(a.message||"Unknown error tracking job progress");break;default:e("Unexpected job status: "+
d)}}catch(s){e(s.message||s)}}function p(){v&&(clearTimeout(v),v=null)}function h(){r&&(clearTimeout(r),r=null)}function g(){var a={dataType:"json",url:C};m.require("$22","http.js").ajax(a,d)}function n(){p();v=setTimeout(g,q);r||(r=setTimeout(a,s))}var A=0,C="/ajax/async/poll/"+c+".json",s=1E4,r,v,q=100,B={error:[],complete:[],progress:[]};return{start:function(){h();n();return this},stop:function(){h();p();return this},delay:function(a){q=a;return this},timeout:function(a){s=a;return this},listen:function(a,
b){var g=B[a];if(g)g.push(b);else throw Error(a+" is not a valid async event");return this}}};return c}({},w,y));m.register("$32",function(c,f,D){function l(a){a.stopPropagation();a.preventDefault();return!1}function b(){n||(n=m.require("$36","overlay.js"),n.listen(p));return n}function e(){var a=s.length-1,b=s[a],g=k('<a class="has-icon icon-back" data-gravity="w">Back</a>').attr("href",b[0]).attr("title",b[1]).click(function(g){if(s[a]===b&&B())return m.require("$11","tooltip.js").kill(),l(g)});
n.enableNav(g);m.require("$11","tooltip.js").init(g)}function a(a,b,g){a=a.split("#");var d=a[0],d=d+(-1===d.indexOf("?")?"?":"&"),d=d+(encodeURIComponent(b)+"="+encodeURIComponent(g));a[0]=d;return a.join("#")}function d(a,g){var d=b().autoSize(),q=d.init();m.require("$18","html.js").init(q);g&&g.lock&&d.disableClose();s.length&&e();q.find("[data-script]").each(function(a,b){b=k(b);for(var d=-1,e,q=b.attr("data-script").split(" ");++d<q.length;)e=q[d],C[e]?C[e](b,g||{}):alert("Unknown script "+e)});
q.trigger("locoModalLoaded",[d,a||"",g||{}]);var n=q.find("form")[0],r;if(n)a:for(d=0;d<n.elements.length;d++)switch(q=n.elements[d],q.type){case "text":case "email":case "textarea":r=Number(q.getAttribute("tabindex"));if(isNaN(r)||100>r)continue a;k(q).focus();break a}}function p(){r=null;s=[];return!0}function h(a){var b=k(a.currentTarget),d=b.attr("data-modal");if("back"===d){if(B())return l(a);d="close"}if("close"===d){q();var e=b.attr("href");if(e&&-1!==e.indexOf("#!"))return!0}else{var n="submit"===
a.type,r=b.attr("title")||b.attr("data-title"),e=b.attr("href")||b.attr("action"),A=n?b.serialize():"",b=n?b.attr("method"):"get";v(e,r,b,A,"modal "+(d||g(e)))}return l(a)}function g(a){return"http"===a.substr(0,4)?a.split("/").slice(3,6).join("-"):a.split("/").slice(1,4).join("-")}var n,A=m.require("$31","ga.js"),C={},s=[],r,v=c.load=function(g,e,q,z,p){var h=r;r=[].slice.call(arguments);h&&g!==h[0]&&(s.push(h),g=a(g,"r",h[0]));h=b();h.active()||h.open().css("modal").html('<div class="loading"></div>');
h.title("Loading ..").disableClose().disableNav();h.think();var h=g.split("#"),C=h[1];C&&(g=h[0]);var h=m.require("$22","http.js"),B={type:q||"get",data:z||"",url:h.jsonLink(g)};h.ajax(B,function(a,b,c){var h=a&&a.html;if(!h)return a&&a.redirect?(r=s.pop()||null,v(a.redirect,e,q,z,p)):(a=k('<h3 class="error"></h3>').text(b||"Unknown error"),b=k('<footer class="buttonset"><a href="/" data-modal="close" class="has-icon icon-ok">Close</a></footer>'),a=k('<div class="basic"></div>').append(a).append(b),
b="Error",c&&200!==c&&(b+=" "+c),n.unthink().enableClose().title(b).html("").append(a),m.require("$18","html.js").init(n.init())),!1;e=a.title||e||"Untitled";r&&(r[1]=e);n.unthink().enableClose().title(e,a.icon).width(null).css(p||"modal").autoSize().html(h);c=a.js||{};C&&(c["#"]=C);d(g,c);A.page(g,e);n.init().one("overlayClosed",function(){A.reset()});return!0});return c},q=c.close=function(){b().close();return c},B=c.back=function(){if(previous=s.pop())return r=s[s.length-2],v.apply(null,previous),
!0};c.reload=function(){r&&v.apply(null,r)};c.postback=function(a){r&&(r[2]="post",r[3]=a,v.apply(null,r))};c.initLink=function(a){a.click(h)};c.initForm=function(a){k(a).submit(h)};c.replace=function(a){var e=b(),q=a&&a.html,n=a&&a.url,r=a&&a.title,A=a&&a.action;if(n)q=s.length-1,q=0<=q?s[q][0]:void 0,n===q?B():v(n,r,"","",a&&a.css||"modal "+g(n));else if(q)e.open().html(q),r&&e.enableClose().title(r),d("",a&&a.js);else if("function"===typeof c[A])c[A]();return e};c.find=function(a){return b().init().find(a)};
c.script=function(a,b){if(b){if("function"!==typeof b.run)throw Error(a+" macro has no run function");C[a]=b.run;return c}return C[a]};c.hash=function(a){var b=a.hash;"#/modal/"===b.substr(0,8)&&(b=b.substr(1),a.hash="",c.replace({url:b}))};return c}({},w,y));m.register("$21",{"\u00e1":"a","\u00e0":"a","\u0103":"a","\u1eaf":"a","\u1eb1":"a","\u1eb5":"a","\u1eb3":"a","\u00e2":"a","\u1ea5":"a","\u1ea7":"a","\u1eab":"a","\u1ea9":"a","\u01ce":"a","\u00e5":"a","\u01fb":"a","\u00e4":"a","\u01df":"a","\u00e3":"a",
"\u0227":"a","\u01e1":"a","\u0105":"a","\u0101":"a","\u1ea3":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1eb7":"a","\u1ead":"a","\u1e01":"a","\u01fd":"\u00e6","\u01e3":"\u00e6","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0107":"c","\u0109":"c","\u010d":"c","\u010b":"c","\u00e7":"c","\u1e09":"c","\u010f":"d","\u1e0b":"d","\u1e11":"d","\u0111":"d","\u1e0d":"d","\u1e13":"d","\u1e0f":"d","\u00f0":"d","\ua77a":"d","\u01c6":"\u01f3","\u00e9":"e","\u00e8":"e","\u0115":"e","\u00ea":"e","\u1ebf":"e","\u1ec1":"e",
"\u1ec5":"e","\u1ec3":"e","\u011b":"e","\u00eb":"e","\u1ebd":"e","\u0117":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u1ebb":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u1e19":"e","\u1e1b":"e","\u1e1f":"f","\ua77c":"f","\u01f5":"g","\u011f":"g","\u011d":"g","\u01e7":"g","\u0121":"g","\u0123":"g","\u1e21":"g","\ua7a1":"g","\u1d79":"g","\u0125":"h","\u021f":"h","\u1e27":"h","\u1e23":"h","\u1e29":"h","\u0127":"h","\u210f":"h","\u1e25":"h","\u1e2b":"h",
"\u1e96":"h","\u00ed":"i","\u00ec":"i","\u012d":"i","\u00ee":"i","\u01d0":"i","\u00ef":"i","\u1e2f":"i","\u0129":"i","\u012f":"i","\u012b":"i","\u1ec9":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u1e2d":"i","\u0135":"j","\u01f0":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\ua7a3":"k","\u1e33":"k","\u1e35":"k","\u013a":"l","\u013e":"l","\u013c":"l","\u0142":"l","\u1e37":"l","\u1e39":"l","\u1e3d":"l","\u1e3b":"l","\u0140":"l","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0144":"n","\u01f9":"n","\u0148":"n",
"\u00f1":"n","\u1e45":"n","\u0146":"n","\ua7a5":"n","\u1e47":"n","\u1e4b":"n","\u1e49":"n","\u00f3":"o","\u00f2":"o","\u014f":"o","\u00f4":"o","\u1ed1":"o","\u1ed3":"o","\u1ed7":"o","\u1ed5":"o","\u01d2":"o","\u00f6":"o","\u022b":"o","\u0151":"o","\u00f5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u022f":"o","\u0231":"o","\u00f8":"o","\u01ff":"o","\u01eb":"o","\u01ed":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u1ecf":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edb":"o","\u1edd":"o","\u1ee1":"o",
"\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u1e55":"p","\u1e57":"p","\u0155":"r","\u0159":"r","\u1e59":"r","\u0157":"r","\ua7a7":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u1e5f":"r","\ua783":"r","\u015b":"s","\u1e65":"s","\u015d":"s","\u0161":"s","\u1e67":"s","\u1e61":"s","\u015f":"s","\ua7a9":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u017f":"s","\ua785":"s","\u1e9b":"s","\u0165":"t","\u1e97":"t","\u1e6b":"t","\u0163":"t","\u1e6d":"t","\u021b":"t","\u1e71":"t","\u1e6f":"t",
"\ua787":"t","\u00fa":"u","\u00f9":"u","\u016d":"u","\u00fb":"u","\u01d4":"u","\u016f":"u","\u00fc":"u","\u01d8":"u","\u01dc":"u","\u01da":"u","\u01d6":"u","\u0171":"u","\u0169":"u","\u1e79":"u","\u0173":"u","\u016b":"u","\u1e7b":"u","\u1ee7":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1ee9":"u","\u1eeb":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u1e77":"u","\u1e75":"u","\u1e7d":"v","\u1e7f":"v","\u1e83":"w","\u1e81":"w","\u0175":"w","\u1e98":"w","\u1e85":"w","\u1e87":"w",
"\u1e89":"w","\u1e8d":"x","\u1e8b":"x","\u00fd":"y","\u1ef3":"y","\u0177":"y","\u1e99":"y","\u00ff":"y","\u1ef9":"y","\u1e8f":"y","\u0233":"y","\u1ef7":"y","\u1ef5":"y","\u017a":"z","\u1e91":"z","\u017e":"z","\u017c":"z","\u1e93":"z","\u1e95":"z","\u01ef":"\u0292","\u1f00":"\u03b1","\u1f04":"\u03b1","\u1f84":"\u03b1","\u1f02":"\u03b1","\u1f82":"\u03b1","\u1f06":"\u03b1","\u1f86":"\u03b1","\u1f80":"\u03b1","\u1f01":"\u03b1","\u1f05":"\u03b1","\u1f85":"\u03b1","\u1f03":"\u03b1","\u1f83":"\u03b1","\u1f07":"\u03b1",
"\u1f87":"\u03b1","\u1f81":"\u03b1","\u03ac":"\u03b1","\u1f71":"\u03b1","\u1fb4":"\u03b1","\u1f70":"\u03b1","\u1fb2":"\u03b1","\u1fb0":"\u03b1","\u1fb6":"\u03b1","\u1fb7":"\u03b1","\u1fb1":"\u03b1","\u1fb3":"\u03b1","\u1f10":"\u03b5","\u1f14":"\u03b5","\u1f12":"\u03b5","\u1f11":"\u03b5","\u1f15":"\u03b5","\u1f13":"\u03b5","\u03ad":"\u03b5","\u1f73":"\u03b5","\u1f72":"\u03b5","\u1f20":"\u03b7","\u1f24":"\u03b7","\u1f94":"\u03b7","\u1f22":"\u03b7","\u1f92":"\u03b7","\u1f26":"\u03b7","\u1f96":"\u03b7",
"\u1f90":"\u03b7","\u1f21":"\u03b7","\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7","\u1fc2":"\u03b7","\u1fc6":"\u03b7","\u1fc7":"\u03b7","\u1fc3":"\u03b7","\u1f30":"\u03b9","\u1f34":"\u03b9","\u1f32":"\u03b9","\u1f36":"\u03b9","\u1f31":"\u03b9","\u1f35":"\u03b9","\u1f33":"\u03b9","\u1f37":"\u03b9","\u03af":"\u03b9","\u1f77":"\u03b9","\u1f76":"\u03b9",
"\u1fd0":"\u03b9","\u1fd6":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf","\u1f43":"\u03bf","\u03cc":"\u03bf","\u1f79":"\u03bf","\u1f78":"\u03bf","\u1fe4":"\u03c1","\u1fe5":"\u03c1","\u1f50":"\u03c5","\u1f54":"\u03c5","\u1f52":"\u03c5","\u1f56":"\u03c5","\u1f51":"\u03c5","\u1f55":"\u03c5","\u1f53":"\u03c5","\u1f57":"\u03c5","\u03cd":"\u03c5",
"\u1f7b":"\u03c5","\u1f7a":"\u03c5","\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9","\u1f62":"\u03c9","\u1fa2":"\u03c9","\u1f66":"\u03c9","\u1fa6":"\u03c9","\u1fa0":"\u03c9","\u1f61":"\u03c9","\u1f65":"\u03c9","\u1fa5":"\u03c9","\u1f63":"\u03c9","\u1fa3":"\u03c9","\u1f67":"\u03c9","\u1fa7":"\u03c9","\u1fa1":"\u03c9","\u03ce":"\u03c9","\u1f7d":"\u03c9",
"\u1ff4":"\u03c9","\u1f7c":"\u03c9","\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});m.register("$7",function(c,f,k){c.init=function(){function c(a){return n[a]||a}function b(a,b,g,d){b=a.split(b);for(var e=b.length;0!==e--;)(a=b[e])&&null==d[a]&&(g.push(a),d[a]=!0);return g}function e(a){return b(String(a||"").toLowerCase().replace(h,c),g,[],{})}function a(a,
d){for(var e=[],n={},v,q=d.length,B=g;0!==q--;)(v=d[q])&&b(String(v||"").toLowerCase().replace(h,c),B,e,n);p[a]=e}function d(a,b){var g=[],d=-1,e=p,q=e.length,n,c,h,f,z,k,l=a.length,m=b?!0:!1;a:for(;++d<q;)if(h=e[d],null!=h&&(f=h.length)){z=0;b:for(;z<l;z++){k=a[z];for(n=0;n<f;n++)if(c=h[n],0===c.indexOf(k))continue b;continue a}g.push(m?b[d]:d)}return g}var p=[],h=/[^a-z0-9]/g,g=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,n=m.require("$21","flatten.json");
return{split:e,pull:function(a,b){return d(a,b)},find:function(a,b){return d(e(a),b)},add:function(a,b){p[a]=e(b)},push:function(b){a(p.length,b)},index:function(b,g){a(b,g)},size:function(){return p.length},clear:function(){p=[]},remove:function(a){p[a]=null}}};return c}({},w,y));m.register("$23",function(c,f,k){c.create=function(){var c=[],b=m.require("$7","fulltext.js").init();return{add:function(e,a){b.add(c.length,a);c.push(e);return this},find:function(e){return b.find(e,c)},clear:function(){c=
[];b.clear();return this}}};return c}({},w,y));m.register("$10",function(c,f,D){function l(b){-1===b.indexOf("?")&&(b="/auto/"+b+".json?q=");this.url=b;this.dead={}}function b(){this.dict=m.require("$23","dict.js").create()}c.init=function(e){function a(){if("hint"!==K){var a=z.val()&&!(J&&J.val())&&null==f&&!q;D[a?"addClass":"removeClass"]("error")}}function d(a){J&&J.val(a)}function c(){w.show();var a=z.outerWidth(!1),b=z.outerHeight(!1),g=z.css("margin-top");g&&(g=parseInt(g),isNaN(g)||(b+=g));
a-=2;w.css("top",b+"px").css("minWidth",a+"px");q=!0}function h(){w.hide();q=!1}function g(){w.html("");h();v=0;u=f=null}function n(b){g();var d;for(d=0;d<b.length;d++){var e=d,q=b[d],n=q.value,r=q.lang||n.lang,z=k('<span class="label"></span>').text(q.label),h=k('<div class="auto-comp-result"></div>'),s=void 0,E=void 0;if(E=q.icon)s=k("<span></span>").attr("class",E).appendTo(h),r?(s.attr("lang",r),q.lang=r):-1!==E.indexOf("lang-"+n)&&(s.attr("lang",n),q.lang=n);for(E in q)h.data(E,q[E]);h.append(z);
A(e,h)}(v=b.length)?(B&&c(),C(0)):(C(null),a(),D.trigger("locoAutonone",[]))}function A(a,b){w.append(b);b.click(function(g){g.stopPropagation();C(a,b);r();return!1});return b}function C(a,b){u&&(u.removeClass("selected"),u=null);f=null;null==a?d(""):(b||(b=w.find("div.auto-comp-result").eq(a)),b.length&&(b.addClass("selected"),f=a,u=b))}function s(a){if(v){var b=v-1;null==f?a=0<a?0:b:(a=f+a,0>a?a=b:a>b&&(a=0));return C(a)}}function r(){if(null==f)y.val(""),d("");else{var b=w.find("div.auto-comp-result").eq(f),
e=b.data()||{label:"Error"},q=e.value,n=e.label;d(q);y.val(n);h();b=b.clone();b.data(e);g();A(0,b);v=1;C(0,b);a();b.trigger("locoAutocomp",[q,n,b])}}var v=0,q=!1,B=!1,E=e.form,f=null,u=null,z=k(e),F=z.attr("name"),K=z.attr("data-mode"),I=z.attr("data-provider"),J="hint"!==K&&k('<input type="hidden" value="" name="'+F+'" />').appendTo(E),D=k('<div class="auto-comp-wrap"></div>').replaceAll(z),w=k('<div class="auto-comp-drop"></div>');I&&(I=new l(I));J&&z.attr("name","_"+F);z.attr("autocomplete")||
z.attr("autocomplete","off");D.append(z).append(w);h();z.focus(function(){B=!0;1<v&&c()}).blur(function(){B=!1;a()}).keydown(function(a){function b(){a.preventDefault();a.stopPropagation();return!1}switch(a.keyCode){case 27:q&&(a.stopPropagation(),h(),z.blur());break;case 40:v&&(q?s(1):c());break;case 38:q&&s(-1);break;case 13:if(q)return r(),b();if(!f&&"hint"!==K)return b()}return!0});var y=m.require("$8","LocoTextListener.js").listen(z,function(a){I&&I.fetch(a,n)});(E=z.attr("data-pre"))&&(E=k.parseJSON(E))&&
E.value&&E.label?(n([E]),r()):!e.value||J&&J.val()||!I||I.fetch(e.value,function(a){n(a);r()});return{$:z,val:function(){return J&&J.val()},clear:g,reset:function(){g();z.val("");d("");y.ping()},force:function(a,b){g();d(b||"");y.val(a)},preload:function(a){v&&g();I=new b;var d,e;for(d in a)e=a[d],I.add(e)},mode:function(a){K=a},provide:function(a){I=new l(a)}}};l.prototype.fetch=function(b,a){if(!b)return a&&a([]),this.dead={},this;var d,c=this.dead;for(d in c)if(0===b.indexOf(d))return a&&a([]),
this;d={dataType:"json",url:this.url+encodeURIComponent(b)};m.require("$22","http.js").ajax(d,function(d){var g=d&&d.results;g&&(a&&d.query&&d.query===b&&a(d.results),g.length||(c[b]=0));return!0});return this};b.prototype.add=function(b){var a=b.fulltext||b.label||b.value;a&&this.dict.add(b,a)};b.prototype.fetch=function(b,a){var d=b?this.dict.find(b):[];a&&a(d);return this};return c}({},w,y));m.register("$9",function(c,f,D){function l(a){a.stopPropagation();a.preventDefault();return!1}function b(a,
b,d){d.off().mouseup(function(d){d.stopPropagation();a.selectIndex(b,!0);return!1}).mouseover(function(){k(this).addClass("over");a.hover=b;return!0}).mouseout(function(){k(this).removeClass("over");a.hover=-1;return!0});return d}function e(b){p===b&&(k(f).off("resize scroll",a),p=null);return b}function a(){p&&p.resize()}function d(a){if(a){var b,d=a[0],e=d.id,c=d.title,r=d.disabled,v=[],q=[],p,h=-1,f=d.options.length,u=this.selectedIcon||"";this.id=e||"";this.name=d.name||"";this.prefix=d.getAttribute("data-prefix");
for(this.defaultIcon=d.getAttribute("data-icon")||"icon no-icon";++h<f;)b=d.options[h],p=k(b),b.selected&&v.push(h),q.push([p.val(),p.text(),p.attr("data-icon")||u,b.disabled,p.attr("lang")]);this.hidden||(this.hidden=k('<input type="hidden" name="'+this.name+'" value="" />').appendTo(d.form));this.list=k("<ul></ul>").mouseup(l);this.icon=k('<span class="icon"> </span>');this.selection=k('<span class="label"></span>');this.handle=k('<a class="handle" href="#"></a>').attr("tabindex",a.attr("tabindex")||
"").append(this.icon).append(this.selection);b=k('<div class="selector"></div>').addClass(d.className).append(this.handle).append(this.list).replaceAll(d);e&&b.attr("id",e);c&&a.hasClass("hastip")&&(b.attr("title",c),m.require("$11","tooltip.js").init(b,{gravity:a.attr("data-gravity")||"s",anchor:a.attr("data-anchor")}));this.wrapper=b;this.up=b.hasClass("up");for(this.clearOptions();b=q.shift();)this.addOption.apply(this,b);r?this.disable():this.enable();this.close();if(f=v.length)for(h=0;h<f;h++)this.selectIndex(v[h]);
else h=d.selectedIndex,null!=h&&0<=h&&this.selectIndex(h)}}c.create=function(a){return new d(a)};c.extend=function(a){a.parent=d;a.prototype=new d};var p,h=d.prototype;h.enable=function(){var a=this;a.bound?a.wrapper.removeClass("disabled"):(a.handle.click(function(a){a.preventDefault();return!1}).mouseover(function(b){return a.onRollover(b)}).mouseout(function(b){return a.onRollout(b)}).mousedown(function(b){return a.onPress(b)}).keydown(function(b){return a.onKeydown(b)}),k(D).mouseup(function(b){return a.onRelease(b)}).keydown(function(b){return a.onGlobalKeydown(b)}),
a.bound=!0)};h.disable=function(){this.wrapper.addClass("disabled")};h.isDisabled=function(){return this.wrapper.hasClass("disabled")};h.onRollover=function(){return this.over=!0};h.onRollout=function(){this.over=!1;return!0};h.onPress=function(a){return this.active?this.over?(this.close(),a.stopPropagation(),a.preventDefault(),!1):!0:(this.open(),a.stopPropagation(),a.preventDefault(),this.handle.focus(),!1)};h.onRelease=function(){this.active&&!this.over&&this.close();return!0};h.onGlobalKeydown=
function(a){if(this.active)switch(a.keyCode){case 27:return this.close(),l(a);case 40:return this.hoverNext(1),l(a);case 38:return this.hoverNext(-1),l(a);case 13:if(-1!=this.hover)return this.selectIndex(this.hover,!0),this.hoverItem(-1),this.close(),l(a)}return!0};h.onKeydown=function(a){return this.active||40!==a.keyCode?!0:(this.open(),l(a))};h.resize=function(){var a=this.list,b=this.handle,d=b.outerWidth()||0,e=a.outerWidth()||0,c;this.up?(c=a.outerHeight(),a.css("top","-"+(c+2)+"px")):(c=b.outerHeight()||
0,c+=2,a.css("top",c+"px"),b=c+m.require("$18","html.js").top(b[0]),c=f.innerHeight-Math.max(0,b-f.pageYOffset),c-=4,a.css("max-height",c+"px"));d>e&&(d-=e-a.width(),a.css("min-width",String(d)+"px"))};h.open=function(){var b=this.list,d=this.wrapper,c=d.data("tipsy");this.active=!0;this.hover=-1;d.addClass("active");b.show().scrollTop(0);c&&c.disable();this!==p&&(p&&e(p),k(f).on("resize scroll",a),p=this);this.resize()};h.close=function(){var a=this.wrapper,b=a.data("tipsy");this.list.hide();this.active=
!1;-1!==this.hover&&(this.getElement(this.hover).removeClass("over"),this.hover=-1);a.removeClass("active");b&&b.enable();e(this)};h.hoverItem=function(a,b){-1!==this.hover&&this.getElement(this.hover).removeClass("over");this.hover=a;-1!==a&&(b=b||this.getElement(a),b.addClass("over"))};h.hoverNext=function(a){var b=this.hover,d=this.options.length,e,c=null;for(-1===b&&0>a&&(b=d);d;){b+=a;if(0>b){this.close();break}else b>=d&&(b=0);if((e=this.options[b])&&!e.disabled&&!e.hidden){this.hoverItem(b);
break}if(null==c)c=b;else if(c===b)break}};h.enableChange=function(a){this.eventName=a;this.eventData=[].slice.call(arguments,1);return this};h.enableConfirm=function(a){this.confirm=a;return this};h.clearOptions=function(){this.index={};this.length=0;this.options=[];this.list.html("");this.hidden.val("");this.idx=this.hover=-1;this.dict=null;return this};h.destroy=function(){this.clearOptions();this.hidden.remove()};h.addOption=function(a,d,e,c,h){var r=this.options.length,p=k("<span></span>").addClass(e||
"icon no-icon"),q=k('<span class="label"></span>').text(d||a),q=k("<li></li>").append(p).append(q).appendTo(this.list);14<r&&this.getDict().add(r,d);h?h=h.split("-").shift():e&&-1!==e.indexOf("lang-"+a)&&(h=a);h&&p.attr("lang",h);q.attr("data-option",r);this.options[r]={value:a,text:d,lang:h||"",icon:e};this.index[a]=r;this.length=r+1;c?this.disableIndex(r):b(this,r,q);return r};h.getDict=function(){return this.dict||(this.dict=this.createDict())};h.createDict=function(){var a=this,b=m.require("$7",
"fulltext.js").init(),d=k('<input type="text" placeholder="&#x1F50D;"/>').appendTo(k('<form class="clearable"></form>').submit(l).insertBefore(a.getElement(0)));m.require("$8","LocoTextListener.js").listen(d,function(e){0===(""===e?a.unfilter():a.filter(b.find(e)))?d.addClass("error"):d.removeClass("error")});k.each(a.options,function(a,d){b.add(a,d.text)});return b};h.filter=function(a){var b=-1,d=this.length,e,c=-1,r=a.length;if(r===d)this.unfilter();else{for(;++c<r;){for(e=a[c];++b<e;)this.hideIndex(b);
this.showIndex(b)}for(;++b<d;)this.hideIndex(b)}return r};h.unfilter=function(){for(var a=-1,b=this.length;++a<b;)this.showIndex(a);return b};h.disableOption=function(a){return this.disableIndex(this.index[a])};h.enableOption=function(a){return this.enableIndex(this.index[a])};h.disableIndex=function(a){var b=this.options[a];b&&!b.disabled&&(b.disabled=!0,this.getElement(a).addClass("disabled").off());return this};h.enableIndex=function(a){var d=this.options[a];d&&d.disabled&&(d.disabled=null,b(this,
a,this.getElement(a)).removeClass("disabled"));return this};h.hideIndex=function(a){var b=this.options[a];b&&!b.hidden&&(b.hidden=!0,this.getElement(a).hide())};h.showIndex=function(a){var b=this.options[a];b&&b.hidden&&(b.hidden=null,this.getElement(a).show())};h.each=function(a){for(var b=-1,d=this.options,e=d.length;++b<e;)a(b,d[b]);return this};h.reIndex=function(){var a=-1,d={},e,c=this.dict,h=this.options,r=h.length;for(c&&c.clear();++a<r;)e=h[a],d[e.value]=a,c&&c.add(a,e.text),e.disabled||
b(this,a,this.getElement(a));this.index=d;this.length=r};h.selectValue=function(a,b){return this.selectIndex(this.index[a],b)};h.hasValue=function(a){return null!=this.index[a]};h.hasIndex=function(a){return this.length>a};h.getIndex=function(){return this.idx};h.selectIndex=function(a,b){var d=this.options[a];if(d){var e=this,c=e.idx,r=d.value,h=d.icon||e.defaultIcon,q=function(){null!=c&&e.getElement(c).removeClass("active");e.getElement(a).addClass("active");e.setLabel(d.text).setIcon(h,d.lang);
e.hidden.val(r);e.idx=a;b&&e.change()};c===a?e.hidden.val(r):b?"function"===typeof e.confirm?e.confirm.call(null,d,function(a){a&&q()}):e.beforeChange(r)&&q():q();e.active&&e.close()}return this};h.setLabel=function(a){this.selection.text(a);(a=this.prefix)&&this.selection.prepend(k('<span class="prefix"></span>').text(a));return this};h.setIcon=function(a,b){this.icon.attr("class",a).attr("lang",b||"");return this};h.val=function(){var a=this.options[this.idx];return a&&a.value};h.change=function(){var a=
this.val(),b=this.save,d=this.eventName||"change",e=[a].concat(this.eventData||[]);this.wrapper.trigger(d,e);b&&b(a);this.hidden.triggerHandler("change");return this};h.beforeChange=function(a){var b=k.Event("locoBeforeSelect");this.wrapper.trigger(b,[a]);return!b.isDefaultPrevented()};h.renameOption=function(a,b){var d=this.index[a],e=this.options[d];e&&(e.text=b,this.getElement(d).find("span.label").text(b),d===this.idx&&this.setLabel(b));return this};h.removeOption=function(a){var b=this.index[a],
d=this.options[b];d&&(a=this.val(),this.getElement(b).remove(),this.options.splice(b,1),this.reIndex(),a===d.value?this.selectIndex(0,!0):this.selectValue(a,!1))};h.getElement=function(a){return this.list.find("li").eq(a)};h.getWrapper=function(){return this.wrapper};h.tip=function(){return this.getWrapper().data("tipsy")};h.$=function(a,b){k.fn[a].apply(this.wrapper,b||[]);return this};h.persist=function(a){var b=this.id||this.name,d=a.fetch(b);null!=d&&this.selectValue(d,!0);this.save=function(d){a.store(b,
d)};return this};h.listen=function(a){return this.on(this.eventName||"change",a)};h.on=function(a,b){this.wrapper.on(a,b);return this};h=null;return c}({},w,y));m.register("$33",function(c,f,D){function l(b){var e=[],a=k([]);this.hidden=a;this.selected=e;this.selectedIcon="icon icon-checkbox";this.constructor.call(this,b);this.wrapper.addClass("multi");for(var d,c,h,g=k('<input type="checkbox" name="'+this.name+'[]" />')[0],n=this.options,A=n.length,f=-1;++f<A;)d=this.getElement(f)[0],h=g.cloneNode(!0),
e[f]&&(h.checked=!0),h.setAttribute("value",n[f].value),a.push(d.appendChild(h));(c=this.defaultIcon)&&this.setIcon(c);(c=b.attr("title"))?this.setLabel(c):this.wrapper.addClass("no-title")}c.create=function(b){return new l(b)};m.require("$9","LocoSelector.js").extend(l);f=l.prototype;f.selectIndex=function(b,e){return this.setIndexState(b,!this.selected[b],e)};f.setIndexState=function(b,e,a){var d=this.options[b],c=this.getElement(b),h=this.hidden[b],g=this.selected;d&&e!==g[b]&&(g[b]=e,c[e?"addClass":
"removeClass"]("checked"),h&&(h.checked=e),a&&this.change());return this};f.selectValue=function(b,e){if(null==b.pop)return l.parent.prototype.selectValue.call(this,b,e);for(var a=this.selected.slice(),d=this.options.length,c=this.index||{},h=!1,g=-1,n=-1;++g<d;)a[g]&&(h=!0),a[g]=!1;if(d=b.length)for(;++n<d;)g=c[b[n]],null==g?h=!0:!1===a[g]&&(h=a[g]=!0);if(h){for(g in a)this.setIndexState(g,a[g]);e&&this.change()}return this};f.val=function(){for(var b=[],e=this.options,a=this.selected,d=a.length,
c=-1;++c<d;)a[c]&&b.push(e[c].value);return b};f=null;return c}({},w,y));m.register("$44",function(c,f,k){function l(b,a){for(var d=String(b);a>d.length;)d="0"+d;return d}function b(b){var a=b%10;if(1===a){if(11!==b)return"st"}else if(2===a){if(12!==b)return"nd"}else if(3===a&&13!==b)return"rd";return"th"}c.formatter=function(){return{format:function(b,a){var d=this;return a.replace(/%[YmdHisMjSghAa]/g,function(a){return d[a.charAt(1)](b)})},Y:function(b){return String(b.getFullYear())},m:function(b){return l(1+
b.getFullMonth(),2)},M:function(b){return"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[b.getMonth()]},d:function(b){return l(b.getDate(),2)},H:function(b){return l(b.getHours(),2)},i:function(b){return l(b.getMinutes(),2)},s:function(b){return l(b.getSeconds(),2)},j:function(b){return String(b.getDate())},S:function(e){return b(e.getDate())},g:function(b){b=b.getHours();return String(0===b?12:12<b?b-12:b)},h:function(b){return l(this.g(b),2)},a:function(b){return 12>b.getHours()?"am":
"pm"},A:function(b){return 12>b.getHours()?"AM":"PM"}}};return c}({},w,y));m.register("$34",function(c,f,D){function l(a){var e=a.id,c=p||(p=[]),r=h||(h={}),v=a.getAttribute("datetime"),v=n(v);if(!isNaN(v))return e||(e="tick"+ ++g,a.setAttribute("id",e)),a={id:e,el:a,dt:new Date(v),st:a.textContent},r[e]||c.push(a),r[e]=a,d||(d=setTimeout(b,200)),a}function b(){for(var a=p,c=a.length,g={},r=[];0<c--;)ticker=a[c],e(ticker)&&(r.push(ticker),g[ticker.id]=ticker);r.length?(p=r,h=g,d=setTimeout(b,3E4)):
d=h=p=null}function e(b){var d=b.el;if(D.contains&&!D.contains(d))return!1;strDate=a(b.dt,new Date,!0);if(""===strDate)return!1;strDate!==b.st&&(k(d).text(strDate),b.st=strDate);return!0}function a(a,b,d){var e=b.getTime(),c=a.getTime(),q=e-c;if(6E4>q)return"Just now";if(36E5>q)return a=Math.floor(q/6E4),String(a)+" minute"+(1===a?"":"s")+" ago";if(864E5>q&&b.getDate()===a.getDate()&&b.getMonth()===a.getMonth()&&b.getFullYear()===a.getFullYear())return a=Math.round(q/36E5),"About "+String(a)+" hour"+
(1===a?"":"s")+" ago";if(d)return"";d=Math.floor(e/864E5)-Math.floor(c/864E5);e=m.require("$44","date.js").formatter();q=e.format(a," %g:%i %A");return 1>=d&&(b.setHours(0),b.setMinutes(0),b.setSeconds(0),b=b.getTime()-864E5,c>=b)?"Yesterday at"+q:11>d?d+" days ago at"+q:e.format(a,"%M %j%S %Y,")+q}var d,p,h,g=0,n=Date.parse||function(){return Number.NaN};c.onEach=function(a,b){l(b)};c.update=function(a){e(l(a))};c.rel=a;return c}({},w,y));m.register("$18",function(c,f,D){var l=f.ieVersion;c.ie=function(b){return b?
l<=b:l};var b=c.init=function(b){b?b instanceof jQuery||(b=k(b)):b=k(D.body);var a=m.require("$31","ga.js"),d=m.require("$19","forms.js"),p=m.require("$32","modal.js"),h=m.require("$10","LocoAutoComplete.js"),g=m.require("$9","LocoSelector.js"),n=m.require("$33","LocoMultiSelector.js"),f=m.require("$11","tooltip.js");b.find("form").each(function(a,b){var e=k(b);l&&10>l&&d.placeholders(e);b.getAttribute("data-modal")?p.initForm(b):b.hasAttribute("action")&&"#"!==e.attr("action").charAt(0)&&!b.target&&
d.jsonify(b);e.find("input.auto-comp").each(function(a,b){h.init(b)});e.find("select.selector").each(function(a,b){b.hasAttribute("multiple")?n.create(k(b)):g.create(k(b))});e.hasClass("hasreveal")&&d.revealify(e);e.find("button.hastip").each(function(a,b){f.init(k(b))})});b.find("a").each(function(b,d){-1!==d.className.indexOf("hastip")&&f.init(k(d));"/modal/"===String(d.getAttribute("href")).substr(0,7)||d.getAttribute("data-modal")?p.initLink(k(d)):a.link(d)});b.find("time.tick").each(m.require("$34",
"tick.js").onEach);d=p=h=b=null;return c};c.$=function(b){return k(f.innerShiv?innerShiv(b,!1):b)};k.fn._html=function(e){return null!=e?(e=this.html(f.innerShiv?innerShiv(e,!1):e),b(this),e):j.html()};k.fn.macro=function(b,a){if("function"!==typeof b.run)throw Error("macro has no run function");b.run(this,a||{});return this};c.el=function(b,a){var d=D.createElement(b||"div");a&&(d.className=a);return d};c.txt=function(b){return D.createTextNode(b||"")};c.h=function(){function b(){c=/[<>&]/g;h=/(\r\n|\n|\r)/g;
g=/(?:https?):\/\/(\S+)/ig;n=location.hostname;b=null}function a(a){return"&#"+a.charCodeAt(0)+";"}function d(a,b){return'<a href="'+a+'" target="'+(b.indexOf(n)?"_blank":"_top")+'">'+b+"</a>"}var c,h,g,n;return function(n,f){b&&b();var s=n.replace(c,a);f&&(s=s.replace(g,d).replace(h,"<br />"));return s}}();c.noop=function(b){b&&(b.preventDefault(),b.stopPropagation(),k(b.target).blur());return!1};c.top=function(b,a){a||(a=D.body);for(var d=b.offsetTop||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetTop||
0;return d};c.left=function(b,a){a||(a=D.body);for(var d=b.offsetLeft||0;(b=b.offsetParent)&&b!==a;)d+=b.offsetLeft||0;return d};return c}({},w,y));m.register("$19",function(c,f,D){function l(a){function b(){a.value===g&&(a.value="",c.removeClass("placeheld"));return!0}function e(){""===a.value&&(a.value=g,c.addClass("placeheld"));return!0}var c=k(a);if(!c.hasClass("auto-comp")){var g=c.attr("placeholder");if(g)return c.focus(b).blur(e),e(),{kill:function(){b();c.off("focus",b).off("blur",e)}}}}var b=
c.enable=function(a){function b(a,d){d.getAttribute("data-was-disabled")||(d.disabled=!1)}a.find(".button").removeClass("loading");a.find("button").each(b);a.find("input").each(b);a.find("select").each(b);a.find("textarea").each(b);f.attachEvent&&a.hasClass("has-placeholders")&&c.placeholders(a);a.removeClass("disabled").trigger("locoEnable");delete a._disabled},e=c.disable=function(a){function b(a,d){d.disabled?d.setAttribute("data-was-disabled","true"):d.disabled=!0}a._disabled||(a.find(".button").addClass("loading"),
a.find("button").each(b),a.find("input").each(b),a.find("select").each(b),a.find("textarea").each(b),a.addClass("disabled").trigger("locoDisable"),a._disabled=!0)};c.jsonify=function(a,d,c){a instanceof jQuery||(a=k(a));a.disable||(k.fn.disable=function(){e(this);return this},k.fn.enable=function(){b(this);this.placehold&&this.placehold();return this});var h="";a.find('[type="submit"]').click(function(a){a&&a.target&&a.target.name&&(h=encodeURIComponent(a.target.name)+"="+encodeURIComponent(a.target.value));
return!0});a.submit(function(b){if(b&&b.isDefaultPrevented&&b.isDefaultPrevented()||c&&!1===c(b))return!1;var e=a.serialize(),e=e.replace(/%0D%0A/g,"%0A");h&&(e&&(e+="&"),e+=h,h="");a.disable();var f=m.require("$22","http.js"),e={url:f.jsonLink(a.attr("action")),type:a.attr("method"),data:e};f.ajax(e,d,function(){a.enable()},a);b.preventDefault();b.stopPropagation();return!1})};c.revealify=function(a){a=a.closest("form");a.find("div[data-reveal-if]").each(function(b,e){function c(a){var b;b=l;q=q||
a.target;if("."===r)b=Boolean(q&&q[v]),l&&(b=!b);else{var d,e,z=k(q.form).serializeArray();for(e in z)z[e].name===s&&(d=z[e].value);"!="===r&&(b=!b);b=b?v!==d:v===d}if(b!==f)if(f=b,a)g[f?"slideDown":"slideUp"](200);else g[f?"show":"hide"]();return!0}var g=k(e),n=/^(\!?)([_\w\-\[\]]+)(\.|!?=)(.*)$/.exec(g.attr("data-reveal-if"));if(n){var f,l=n[1]?!0:!1,s=n[2],r=n[3],v=n[4],n=a[0][s];if(n.type||null==n.length)n=[n];b=n.length;for(var q;0!==b--;)q=n[b],c(),k(q).change(c).removeClass("jshide");n=n=q=
null}});a=null};c.linkify=function(a){var b=a.getAttribute("data-icon");if(b){var e=k(a),c=k("<a> </a>");c.attr("href",a.form.action);c.attr("class",e.attr("class"));c.attr("tabindex",e.attr("tabindex"));e.attr("tabindex","-1");c.text(e.val());b&&k("<span></span>").prependTo(c).addClass(b);e.hide().after(c);c.click(function(a){e.click();return!1})}};c.placeholders=function(a){var b,e=[];a.find("input[placeholder]").each(function(a,c){"password"!==c.type&&(b=l(c))&&e.push(b)});e.length&&(a.submit(function(){for(var a in e)e[a].kill()}),
a.addClass("has-placeholders"),b=i=null)};return c}({},w,y));m.register("$4",function(c,f,D){function l(a,b,d){function e(){c();g=setTimeout(b,d)}function c(){g&&clearTimeout(g);g=null}var g;e();k(a).mouseenter(c).mouseleave(e);return{die:function(){c();k(a).off("mouseenter mouseleave")}}}function b(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();k(f).triggerHandler("resize")})});return a}function e(a,d){function e(d){g[r]=null;b(k(a),250);c&&c.die();var q;if(q=d)d.stopPropagation(),
d.preventDefault(),q=!1;return q}var c,r;k(a).addClass("is-dismissible");k('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(e);k(f).triggerHandler("resize");n();r=g.length;g.push(e);d&&(c=l(a,e,d));return{stick:function(){c&&c.die();c=null;g[r]=null}}}function a(a,b,d){var e=m.require("$18","html.js");a=k('<div class="notice notice-'+a+'" loco-notice inline></div>').prependTo(k("#loco-notices"));var c=k(e.el("p"));d=k(e.el("span")).text(d);b=k(e.el("strong","has-icon")).text(b+
": ");c.append(b).append(d).appendTo(a);return a}function d(b,d,c,g){b=a(c,d,b).hide().fadeIn(500);k(f).triggerHandler("resize");return e(b,g)}function p(a){return d(a,C,"warning")}function h(){k("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var d=-1===b.className.indexOf("notice-success")?null:5E3;e(b,d)}})}var g=[],n=Date.now||function(){return(new Date).getTime()},A,C,s,r;c.error=function(a){return d(a,A,"error")};c.warn=p;c.info=function(a){return d(a,
s,"info")};c.success=function(a){return d(a,r,"success",5E3)};c.warning=p;c.log=function(){f.console&&console.log&&console.log.apply(console,arguments)};c.debug=function(a,b){f.console&&console.error&&(console.error("Loco Error: "+a),b&&console.debug&&console.debug(b))};c.clear=function(){for(var a=-1,b,d=g,e=d.length;++a<e;)(b=d[a])&&b();g=[];return c};c.create=a;c.raise=function(a){(c[a.type]||c.error).call(c,a.message)};c.convert=e;c.init=function(a){A=a._("Error");C=a._("Warning");s=a._("Notice");
r=a._("OK");setTimeout(h,1E3);return c};return c}({},w,y));m.register("$5",function(c,f,D){function l(a){var b=k("<pre>"+a+"</pre>").text();b&&(b=b.replace(/[\r\n]+/g,"\n").replace(/(^|\n)\s+/g,"$1").replace(/\s+$/,""));b||(b=a)||(b="Blank response from server");return b}function b(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,"")):t._("Server returned invalid data")}function e(a,b,d){a[b]=d}function a(a,b,d){a.push({name:b,value:d})}
function d(a,b,d){a.append(b,d)}function p(a,d,e,c){function q(d,c,q){if("abort"!==c){var z=g||{_:function(a){return a}},p=d.status,f=d.responseText,v=l(f),k=d.getResponseHeader("Content-Type")||"text/html",s=d.getResponseHeader("Content-Length")||f.length;"success"===c&&q?h.error(q):(h.error(b(v)+".\n"+z._("Check console output for debugging information")),h.debug("Ajax failure for "+a,{status:p,error:c,message:q,output:f}),"parsererror"===c&&(q="Response not JSON"),h.log([z._("Provide the following text when reporting a problem")+
":","----","Status "+p+' "'+(q||z._("Unknown error"))+'" ('+k+" "+s+" bytes)",v,"===="].join("\n")));e&&e.call&&e(d,c,q);n=d}}c.url=A;c.dataType="json";c.error=q;c.success=function(a,b,e){var c=a&&a.data,g=a&&a.notices,r=g&&g.length;for(!c||a.error?q(e,b,a&&a.error&&a.error.message):d&&d(c,b,e);r--;)h.raise(g[r])};var h=m.require("$4","notices.js").clear();return k.ajax(c)}var h={},g,n,A=f.ajaxurl||"/wp-admin/admin-ajax.php";c.init=function(a){h=a.nonces||h;return c};c.localise=function(a){g=a;return c};
c.xhr=function(){return n};c.strip=l;c.parse=b;c.submit=function(a,b,d){function e(){c.removeClass("loading");m.require("$19","forms.js").enable(c)}var c=k(a),g=c.serialize();c.addClass("loading");m.require("$19","forms.js").disable(c);return p(a.route.value,function(a,d,c){e();b&&b(a,d,c)},function(a,b,c){e();d&&d(a,b,c)},{type:a.method,data:g})};c.post=function(b,c,g,n){var q,B=!0;c=c||{};(q=h[b])||(f.console&&console.debug&&console.debug('No nonce for "'+b+'"'),q="");var E=q;f.FormData&&c instanceof
FormData?(B=!1,q=d):q=Array.isArray(c)?a:e;q(c,"action","loco_json");q(c,"route",b);q(c,"loco-nonce",E);return p(b,g,n,{type:"post",data:c,processData:B,contentType:B?"application/x-www-form-urlencoded; charset=UTF-8":!1})};c.setNonce=function(a,b){h[a]=b;return c};c.hasNonce=function(a){return!!h[a]};return c}({},w,y));m.register("$20",{arab:1,aran:1,hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,
orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$6",function(c,f,k){function l(){}var b,e=m.require("$20","rtl.json");c.init=function(){return new l};c.cast=function(a){return a instanceof l?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};c.parse=function(a){if(!(b||(b=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(a))return null;var d=new l;d.lang=RegExp.$1.toLowerCase();if(a=
RegExp.$2)d.region=a.toUpperCase();if(a=RegExp.$3)d.variant=a.toLowerCase();return d};f=l.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;return c};f.getIcon=function(){for(var a=3,b,c,e=["variant","region","lang"],g=[];0!==a--;)if(b=e[a],c=this[b])g.push(b),g.push(b+"-"+c.toLowerCase());return g.join(" ")};f.isRTL=function(){return!!e[String(this.lang).toLowerCase()]};
f=null;return c}({},w,y));m.register("$38",function(c,f,k){function l(){}var b,e,a=m.require("$20","rtl.json");c.init=function(){return new l};c.cast=function(a){return a instanceof l?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,c=new l;for(b in a)c[b]=a[b];return c};c.parse=function(a){b||(e=/[-_+]/,b=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(e).join("-");if(!b.exec(a))return null;
var c=new l;c.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)c.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();if(a=RegExp.$3)c.region=a.toUpperCase();if(a=RegExp.$4)c.variant=a.toLowerCase();if(a=RegExp.$5)c.extension=a;return c};f=l.prototype;f.isValid=function(){return!!this.lang};f.isKnown=function(){var a=this.lang;return!(!a||"zxx"===a)};f.toString=function(a){a=a||"-";var b,c=this.lang||"zxx";if(b=this.script)c+=a+b;if(b=this.region)c+=a+b;if(b=this.variant)c+=a+b;if(b=this.extension)c+=
a+b;return c};f.getIcon=function(){for(var a=4,b,c,e=["variant","region","script","lang"],n=[];0!==a--;)if(b=e[a],c=this[b])c.join&&(c=c.join("-")),1===a&&3===c.length?n.push("region-m49"):n=n.concat([b,b+"-"+c.toLowerCase()]);return n.join(" ")};f.isRTL=function(){return!!a[String(this.script||this.lang).toLowerCase()]};f=null;return c}({},w,y));m.register("$39",function(c,f,k){function l(a){f.console&&console.error&&console.error(a)}function b(){l("Method not implemented")}function e(){}function a(a){}
e.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,h,g=!0;for(c in this)h=this[c],h===b?(l(a+"."+c+"() must be implemented"),g=!1):h instanceof e&&(l(a+"."+c+" must be defined"),g=!1);return g};c.init=function(d,c){var h,g=new a;if(d)for(h=d.length;0!==h--;)g[d[h]]=b;if(c)for(h=c.length;0!==h--;)g[c[h]]=new e;return g};c.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return c}({},w,y));m.register("$49",
function(c,f,k){var l=f.requestAnimationFrame,b=f.cancelAnimationFrame,e=0;if(!l||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(l=f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||f[a+"CancelRequestAnimationFrame"])break;l&&b||(l=function(a){var b=d();timeToCall=Math.max(0,16-(b-e));nextTime=b+timeToCall;timerId=f.setTimeout(function(){a(nextTime)},timeToCall);e=nextTime;return timerId},b=function(a){clearTimeout(a)});var d=Date.now||function(){return(new Date).getTime()};c.loop=function(a,
d){function c(){f=l(c,d);a(e++)}var e=0,f;c();return{stop:function(){f&&b(f);f=null}}};return c}({},w,y));m.register("$45",function(c,f,k){function l(b,d,c,e){if(a){var g=c;c=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return g(a)}}b.addEventListener(d,c,e);return{unbind:function(){b.removeEventListener(d,c,e)}}}function b(a){a.preventDefault();a.stopPropagation();return!1}var e,a=!!f.navigator.msPointerEnabled,d=a?"MSPointerDown":"touchstart",p=a?"MSPointerMove":"touchmove",
h=a?"MSPointerUp":"touchend";c.ok=function(a){null==e&&(e="function"===typeof k.body.addEventListener);e&&a&&a(c);return e};c.ms=function(){return a};c.dragger=function(a,c){function e(b){a.addEventListener(b,n[b],!1)}function r(b){a.removeEventListener(b,n[b],!1)}var n={};n[d]=function(a){g(a,function(b,e){e.type=d;c(a,e,q)});e(p);e(h);return!0};n[h]=function(a){r(p);r(h);g(a,function(b,d){d.type=h;c(a,d,q)});return!0};n[p]=function(a){g(a,function(b,d){d.type=p;c(a,d,q)});return b(a)};e(d);var q=
{kill:function(){r(d);r(p);r(h);a=q=c=null}};return q};c.swiper=function(c,e,f){function r(a){c.addEventListener(a,u[a],!1)}function v(a){c.removeEventListener(a,u[a],!1)}function q(){k&&k.stop();k=null}var k,E,l,u={},z=[],F=[],K=[];u[d]=function(a){E=!1;q();var b=n();g(a,function(a,d){z[a]=b;F[a]=d.clientX;K[a]=d.clientY});l=c.scrollLeft;return!0};u[h]=function(a){g(a,function(a,b){var d=n()-z[a],c=F[a]-b.clientX,d=Math.abs(c)/d;e(d,c?0>c?-1:1:0)});l=null;return!0};u[p]=function(a){var d,e;null==
l||g(a,function(a,b){d=F[a]-b.clientX;e=K[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(d))return E=!0;d&&(E=!0,c.scrollLeft=Math.max(0,l+d));return b(a)};if(!a||f)r(d),r(p),r(h),a&&(c.className+=" mstouch");return{kill:function(){v(d);v(p);v(h);q()},swiped:function(){return E},ms:function(){return a},snap:function(b){a&&!f&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+b+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,d){q();var e=
c.scrollLeft,g=a>e?1:-1,r=Math[1===g?"min":"max"],z=Math.round(16*b*g);return k=m.require("$49","fps.js").loop(function(b){b&&(e=Math.max(0,r(a,e+z)),c.scrollLeft=e,a===e&&(q(),d&&d(e)))},c)}}};c.start=function(a,b){return l(a,d,b,!1)};c.move=function(a,b){return l(a,p,b,!1)};c.end=function(a,b){return l(a,h,b,!1)};var g=c.each=function(b,d){if(a)(b.MSPOINTER_TYPE_TOUCH||"touch")===b.pointerType&&d(0,b);else for(var c=-1,e=(b.originalEvent||b).changedTouches||[];++c<e.length;)d(c,e[c])},n=Date.now||
function(){return(new Date).getTime()};return c}({},w,y));m.register("$50",function(c,f,m){c.init=function(c){function b(){f.style.top=String(-c.scrollTop)+"px";return!0}function e(){var b=f;b.textContent=c.value;b.innerHTML=b.innerHTML.replace(/[ \t]/g,a).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function a(a){return'<span class="x'+a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var d=c.parentNode,f=d.insertBefore(m.createElement("div"),
c);k(c).on("input",e).on("scroll",b);k(d).addClass("has-mirror");f.className="ta-mirror";var h=c.offsetWidth-c.clientWidth;2<h&&(f.style.marginRight=String(h-2)+"px");e();b();return{kill:function(){k(c).off("input",e).off("scroll",b);d.removeChild(f);f=null;k(d).removeClass("has-mirror")}}};return c}({},w,y));m.register("$30",function(c,f,k){function l(a,d){for(var c=0,e=-1,g=d&&f[d],n=b[a]||[],k=n.length;++e<k;)callback=n[e],"function"===typeof callback&&(callback(g),c++);return c}var b={},e;c.load=
function(a,c,e){function h(){A&&(clearTimeout(A),A=null);m&&(m.onreadystatechange=null,m=m=m.onload=null);a&&(delete b[a],a=null)}function g(b,c){var d=m&&m.readyState;if(c||!d||"loaded"===d||"complete"===d)c||l(a,e),h()}function n(){if(0===l(a))throw Error('Failed to load "'+(e||a)+'"');h()}if(e&&f[e])"function"===typeof c&&c(f[e]);else if(null!=b[a])b[a].push(c);else{b[a]=[c];var A=setTimeout(n,4E3),m=k.createElement("script");m.setAttribute("src",a);m.setAttribute("async","true");m.onreadystatechange=
g;m.onload=g;m.onerror=n;m.onabort=h;k.getElementsByTagName("head")[0].appendChild(m)}};c.stat=function(a){var b;if(!(b=e)){for(var c,h,g=k.getElementsByTagName("script"),f=-1,l=g.length;++f<l;)if(b=g[f].getAttribute("src"))if(c=b.indexOf("/lib/vendor"),-1!==c){h=b.substr(0,c);break}b=e=h||"/static"}return b+a};return c}({},w,y));m.register("$15",function(c,f,D){function l(a,b){a.setReadOnly(!1);a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",
function(){return b.blur()})}function b(a){a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function a(a,b){function c(){this.HighlightRules=e}var e=d(b),g=a.require,h=g("ace/lib/oop");h.inherits(e,g("ace/mode/text_highlight_rules").TextHighlightRules);h.inherits(c,g("ace/mode/text").Mode);return new c}function d(a){return function(){var b={start:[{token:"empty_line",regex:/^$/},{token:"constant.language",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
{token:"constant.language",regex:/<!\[CDATA\[/},{token:"constant.language",regex:/\]\]>/},{token:"locked",regex:/<(?:xliff:)?(?:g|ph)[^>]*>[^<]*<\/(?:xliff:)?(?:g|ph)>/},{token:"locked",regex:/<(?:xliff:)?(bx|ex|x)[^\/>]*\/>/},{token:"constant.language",regex:/<\/?[:a-z]+[^>]*>/}]},c=p(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",regex:/'([{}][^']*)?'/},{token:"printf",regex:"{[^!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"},
{token:"icu",regex:/{/,next:"icuName"},{token:"icu",regex:/}/,next:"icuType"}]),icuName:[{token:"icu",regex:"[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"},{token:"icu.name",regex:"[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
next:"icuType"},{defaultToken:"icu",next:"icuType"}],icuType:[{token:"icu",regex:/[{}]/,next:"start"},{defaultToken:"icu"}]}:c&&b.start.push({token:"printf",regex:c});this.$rules=b}}function p(a){switch(a){case "objc":return/%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;case "java":return/%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;case "php":return/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
case "python":return/%(?:\([a-z]+\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;case "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$|\([a-z]+\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case g:return h||"%%"}}var h,g="auto";c.init=function(c,d,h){var p,r=!1,v=h||g,q=c.parentNode,B=q.appendChild(D.createElement("div"));k(q).addClass("has-proxy has-ace");m.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
function(b){if(B){if(!b)throw Error("Failed to load code editor");p=b.edit(B);var q=p.session,g=p.renderer;p.$blockScrolling=Infinity;p.setShowInvisibles(r);p.setWrapBehavioursEnabled(!1);p.setBehavioursEnabled(!1);p.setHighlightActiveLine(!1);q.setUseSoftTabs(!1);g.setShowGutter(!0);g.setPadding(10);g.setScrollMargin(8);q.setMode(a(b,v));p.setValue(c.value,-1);q.setUseWrapMode(!0);d?l(p,d):e(p)}},"ace");return{kill:function(){p&&(b(p),p.destroy(),p=null);B&&(q.removeChild(B),k(q).removeClass("has-proxy has-ace"),
B=null);return this},disable:function(){p&&e(p);d=null;return this},enable:function(a){d=a;p&&l(p,a);return this},resize:function(){p&&p.resize();return this},val:function(a){p&&a!==p.getValue()&&p.setValue(a,-1);return this},invs:function(a){a=a||!1;r!==a&&(r=a,p&&p.setShowInvisibles(a));return this},strf:function(b){b=b||g;b!==v&&(v=b,p&&p.session.setMode(a(f.ace,b)));return this},focus:function(){return this}}};c.strf=function(a,b){g=a;h=b;return c};return c}({},w,y));m.register("$51",function(c,
f,D){function l(a,b){function c(){return b.val(a.getContent())}a.on("input",c);a.on("change",c);a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()});a.setMode("design")}function b(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function e(a){b(a);a.setMode("readonly")}var a=0;c.load=function(a){var b=m.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return c};c.init=function(d,f){function h(a){C=a;s="<p>"===a.substr(0,3)&&
"</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function g(a){n=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!s&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===C||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(h(a),b)};f?(l(a,f),f.reset()):e(a);k(q).removeClass("loading")}var n,m=!1,C="",s=!1,
r=d.parentNode,v=r.parentNode,q=r.appendChild(D.createElement("div")),B=v.insertBefore(D.createElement("nav"),r);B.id="_tb"+String(++a);k(r).addClass("has-proxy has-mce");k(q).addClass("mce-content-body loading").html(h(d.value));c.load(function(a){if(!a)throw Error("Failed to load HTML editor");q&&a.init({inline:!0,target:q,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+B.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
block_formats:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",forced_root_block:"p",relative_urls:!1,convert_urls:!1,remove_script_host:!1,document_base_url:"",allow_script_urls:!1,formats:{alignleft:{classes:"alignleft"},alignright:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"alignright"},aligncenter:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"aligncenter"},strikethrough:{inline:"del"}},fix_list_elements:!0,extended_valid_elements:"span,b,i,u,loco:script",
entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:g})});return{val:function(a){a=h(a);null==n?(d.value=a,k(q).html(a)):n.getContent()!==a&&n.setContent(a);f&&f.val(a);return this},kill:function(){n&&(f&&f.val(n.getContent()),b(n),n.destroy(),n=null);q&&(r.removeChild(q),k(r).removeClass("has-proxy has-mce"),q=null);B&&(v.removeChild(B),B=null);return this},enable:function(a){f=a;n&&l(n,a);return this},disable:function(){n&&e(n);f=null;return this},
focus:function(){n&&f&&n.focus();return this},invs:function(a){a=a||!1;m!==a&&(m=a,k(r)[a?"addClass":"removeClass"]("show-invs"));return this}}};return c}({},w,y));m.register("$46",function(c,f,D){function l(a){function b(){l&&(m.off("input",c),l=!1)}function c(){var b=a.value;b!==r&&(m.trigger("changing",[b,r]),r=b)}function f(){c();l&&v!==r&&m.trigger("changed",[r])}function g(){e=a;v=r;l||(m.on("input",c),l=!0);m.trigger("editFocus");s.addClass("has-focus");return!0}function n(){e===a&&(e=null);
m.trigger("editBlur");s.removeClass("has-focus");l&&(f(),b());return!0}var l=!1,m=k(a),s=k(a.parentNode),r=a.value,v;m.blur(n).focus(g);return{val:function(b){r!==b&&(a.value=b,m.triggerHandler("input"),r=b);return!0},kill:function(){b();m.off("blur",n).off("focus",g)},fire:function(){r=null;c()},ping:f,blur:n,focus:g,reset:function(){v=r=a.value}}}function b(a){this.e=a}var e;c._new=function(a){return new b(a)};c.init=function(a){var c=new b(a);a.disabled?(a.removeAttribute("disabled"),c.disable()):
a.readOnly?c.disable():c.enable();return c};TextAreaPrototype=b.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var a=this.p;a&&(a.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(a,b){var c=this.l;c&&!b&&(this.disable(),c=null);this.val(a||"");b&&!c&&this.enable();return this};TextAreaPrototype.val=function(a){var b=this.e;if(null==a)return b.value;var c=this.l,e=this.p;e&&e.val(a);c&&c.val(a);c||b.value===a||(b.value=a,k(b).triggerHandler("input"));return this};
TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var a=this.p;a?a.focus():k(this.e).focus()};TextAreaPrototype.focused=function(){return e&&e===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(a,b){var c=this.e;if(1===arguments.length)return c.getAttribute(a);null==b?c.removeAttribute(a):c.setAttribute(a,b);return this};TextAreaPrototype.editable=
function(){return!!this.l};TextAreaPrototype.enable=function(){var a=this.p;this.e.removeAttribute("readonly");this.listen();a&&a.enable&&a.enable(this.l);return this};TextAreaPrototype.disable=function(){var a=this.p;this.e.setAttribute("readonly",!0);this.unlisten();a&&a.disable&&a.disable();return this};TextAreaPrototype.listen=function(){var a=this.l;a&&a.kill();this.l=l(this.e);return this};TextAreaPrototype.unlisten=function(){var a=this.l;a&&(a.kill(),this.l=null);return this};TextAreaPrototype.setInvs=
function(a,b){var c=this.i||!1;if(b||c!==a)this._i&&(this._i.kill(),delete this._i),(c=this.p)?c.invs&&c.invs(a):a&&(this._i=m.require("$50","mirror.js").init(this.e)),this.i=a;return this};TextAreaPrototype.getInvs=function(){return this.i||!1};TextAreaPrototype.setMode=function(a){var b=this.p,c=this.i||!1;a!==(this.m||"")&&(this.m=a,b&&b.kill(),this.p=b="code"===a?m.require("$15","ace.js").init(this.e,this.l,this["%"]):"html"===a?m.require("$51","mce.js").init(this.e,this.l):null,this.setInvs(c,
!0),e&&this.focus());return this};TextAreaPrototype.setStrf=function(a){this["%"]=a;"code"===this.m&&this.p.strf(a);return this};TextAreaPrototype.name=function(a){this.e.setAttribute("name",a);return this};TextAreaPrototype.placeholder=function(a){this.e.setAttribute("placeholder",a);return this};TextAreaPrototype.redraw=function(){var a=this.p;a&&a.resize&&a.resize()};TextAreaPrototype=null;return c}({},w,y));m.register("$47",function(c,f,m){function l(a){var b=f.console;b&&b.error&&b.error(a)}
function b(a){var b=m.createElement("div");a&&b.setAttribute("class",a);return b}function e(a){return function(){a.resize();return this}}function a(a){return function(b){for(var c=b.target,d=c.$index;null==d&&"DIV"!==c.nodeName&&(c=c.parentElement);)d=c.$index;null!=d&&(b.stopImmediatePropagation(),a.select(d));return!0}}function d(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function p(a){return function(b){var c;c=b.keyCode;if(40===c)c=1;else if(38===c)c=-1;else return!0;if(b.shiftKey||
b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function h(a,b,c){function d(a){l("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(e){var g=b||0,f=c?-1:1,z=a.rows||[];e.sort(function(a,b){return f*(z[a]||d(a)).cellVal(g).localeCompare((z[b]||d(b)).cellVal(g))})}}function g(a){this.w=a}function n(a){this.t=a;this.length=0}function A(a,b,c){var d=m.createElement("div");d.className=c||"";this._=d;this.d=b||[];this.i=
a||0;this.length=b.length}function C(a){this.live=a;this.rows=[]}c.create=function(a){return new g(a)};var s=g.prototype;s.init=function(c){var g=this.w,q=g.id,f=g.splity(q+"-thead",q+"-tbody"),h=f[0],f=f[1],n=[],l=[],z=[],F=[];if(c)this.ds=c,this.idxs=l,this._idxs=null;else if(!(c=this.ds))throw Error("No datasource");h.css.push("wg-thead");f.css.push("wg-tbody");c.eachCol(function(a,b,c){z[a]=q+"-col-"+b;F[a]=c||b});for(var m=b(),s=-1,C=z.length,D=b("wg-cols"),w=h.splitx.apply(h,z);++s<C;)w[s].header(F[s]),
D.appendChild(m.cloneNode(!1)).setAttribute("for",z[s]);c.eachRow(function(a,b,c){n[a]=new A(a,b,c);l[a]=a});this.rows=n;this.cols=D;this.ww=null;this.root=m=f.body;this.head=h;h.redraw=e(this);h=f.fixed=w[0].bodyY()||20;g.lock().resize(h,f);g.css.push("is-table");g.restyle();this.sc?this._re_sort(C):c.sort&&c.sort(l);this.redrawDirty();this.render();k(m).attr("tabindex","-1").on("keydown",p(this)).on("mousedown",a(this)).on("scroll",d(this));return this};s.clear=function(){for(var a=this.pages||
[],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};s.render=function(){for(var a,b,c=[],d=this.rows||[],e=-1,g,f=this.idxs,z=f.length,h=this.idxr={},n=this.r,k=this._r,p=this.root,l=this.cols;++e<z;){0===e%100&&(a=l.cloneNode(!0),b=new C(a),b.h=2200,b.insert(p),c.push(b));g=f[e];h[g]=e;a=d[g];if(null==a)throw Error("Render error, no data at ["+g+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);this.pages=c;this.mx=this.mn=null;
this.redrawDirty();this.redraw();null==n?null!=k&&(a=d[k])&&a.page&&(delete this._r,this.select(k,!0)):(a=d[n])&&a.page?this.select(n,!0):(this.deselect(),this._r=n);return this};s.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,d=c.cells[0],e=d.body.childNodes,g=e.length,f=this.pages||[],z=f.length;for(c.redraw.call(d);++a<g;)b[a]=e[a].style.width;if(z){c=this.mx;for(a=this.mn;a<=c;a++)f[a].widths(b);this.redrawDirty()&&this.redraw()}};s.redrawDirty=function(){var a=!1,b=this.root,c=
b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};s.redraw=function(){for(var a=0,b=-1,c=null,d=null,e=this.ww,g=this.sy,f=this.vh,z=this.mn,h=this.mx,n=Math.max(0,g-100),g=f+g+100,k=this.pages||[],p=k.length;++b<p&&!(a>g);)f=k[b],a+=f.height(),a<n||(null===c&&(c=b),d=b,f.rendered||f.render(e));if(z!==c){if(null!==z&&c>z)for(b=z;b<c;b++){f=k[b];if(!f)throw Error("Shit!");f.rendered&&f.sleep()}this.mn=c}if(h!==d){if(null!==h&&d<h)for(b=h;b>d;b--)f=k[b],
f.rendered&&f.sleep();this.mx=d}};s.selected=function(){return this.r};s.thead=function(){return this.w.cells[0]};s.tbody=function(){return this.w.cells[1]};s.tr=function(a){return(a=this.row(a))?a.cells():[]};s.row=function(a){return this.rows[a]};s.td=function(a,b){return this.tr(a)[b]};s.next=function(a,b,c){null==c&&(c=this.r||0);var d=this.idxs,e=d.length,g=(this.idxr||{})[c];for(c=g;c!==(g+=a)&&!(0<=g&&e>g);)if(b&&e)g=1===a?-1:e,b=!1;else return null;c=d[g];return null==c||null==this.rows[c]?
(l("Bad next: ["+g+"] does not map to data row"),null):c};s.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};s.deselect=function(a){var b=this.r;null!=b&&(this.r=null,k(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};s.selectRow=function(a,b){return this.select(this.idxs[a])};s.select=function(a,b){var c=this.rows[a],d=c&&c.page;if(!d)return this.deselect(!1),l("Row is filtered out"),this;this.deselect(!0);var e,g=
this.w.cells[1];d.rendered||(e=d.top(),g.scrollY(e),this.redrawDirty()&&this.redraw());if(!c.rendered)return d.rendered||l("Failed to render page"),l("Row ["+c.i+"] not rendered"),this;d=c.cells();k(d).addClass("selected");this.r=a;b||(e=g.scrollY(),k(this.root).focus(),e!==g.scrollY()&&g.scrollY(e));g.scrollTo(d[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};s.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};s.filter=
function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};s.each=function(a){for(var b,c=-1,d=this.rows||[],e=this.idxs||[],g=e.length;++c<g;)b=e[c],a(d[b],c,b);return this};s.sortable=function(a){var b=this.sc||(this.sc=new n(this));b.has(a)||b.add(a);return this};s._re_sort=function(a){var b=-1,c=this.sc,d=c.active;for(this.sc=c=new n(this);++b<a;)c.add(b);d&&(b=this.head.indexOf(d.id),-1===b&&(b=Math.min(d.idx,a-1)),this.sort(b,d.desc));return this};s._sort=
function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};s.sort=function(a,b){this._sort(this.idxs,h(this,a,b));this.sc.activate(a,b);return this};s=null;s=n.prototype;s.has=function(a){return null!=this[a]};s.add=function(a){var b=this,c=b.t.head.cells[a];b[a]={desc:null,idx:a,id:c.id};b.length++;c.addClass("wg-sortable").on("click",function(c){if("header"===c.target.nodeName.toLowerCase())return c.stopImmediatePropagation(),b.toggle(a),!1});return b};s.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
return this};s.activate=function(a,b){var c,d;c=this.active;var e=this[a],g=this.t.head.cells;c&&(d=g[c.idx])&&(d.removeClass(c.css),c!==e&&d.restyle());(d=g[a])?(e.desc=b,this.active=e,c="wg-"+(b?"desc":"asc"),d.addClass(c).restyle(),e.css=c):this.active=null;return this};s=null;s=A.prototype;s.render=function(a){var b,c=[],d=this._,e=this.length;if(d){for(this.c=c;0!==e--;)b=d.cloneNode(!1),c[e]=this.update(e,b),b.$index=this.i,a[e].appendChild(b);this._=null}else for(c=this.c;0!==e--;)a[e].appendChild(c[e]);
this.rendered=!0;return this};s.update=function(a,b){var c=b||this.c[a]||{},d=(this.d[a]||function(){})()||"\u00a0";null==d.innerHTML?c.textContent=d:c.innerHTML=d.innerHTML;return c};s.cells=function(){return this.c||[]};s.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};s.destroy=function(){this.page=null;this.rendered=!1};s.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};s=null;s=C.prototype;s.size=function(){return this.rows.length};
s.insert=function(a){var c=this.h,d=b("wg-dead");d.style.height=String(c)+"px";a.appendChild(d);return this.dead=d};s.top=function(){return(this.rendered?this.live:this.dead).offsetTop};s.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||l("row has zero height");return a};s.render=function(a){for(var b,c=-1,d=this.rows,e=d.length,g=this.dead,f=this.live,z=f.childNodes;++c<e;)b=d[c],b.rendered||b.render(z);e=a.length;for(c=0;c<
e;c++)z[c].style.width=a[c];g.parentNode.replaceChild(f,g);this.rendered=!0;this.h=null;return this};s.sleep=function(){var a=this.height(),b=this.live,c=this.dead;c.style.height=String(a)+"px";b.parentNode.replaceChild(c,b);this.rendered=!1;this.h=a;return this};s.sleepH=function(a){a*=this.rows.length;var b=this.dead;b&&(b.style.height=String(a)+"px");this.rendered||(this.h=a);return this};s.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
s.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,c=b.length;for(a.parentNode.removeChild(a);0!==c--;)b[c].destroy()};s=null;return c}({},w,y));m.register("$40",function(c,f,D){function l(a,b){var c=a.id,d=c&&s[c],e=d&&d.parent();if(!d||!e)return null;var g=e.dir===C,c=g?"X":"Y",f="page"+c,g=g?A:n,h=g(e.el),c=b["offset"+c],k=e.el,p=k.className;null==c&&(c=b[f]-g(a));c&&(h+=c);k.className=p+" is-resizing";return{done:function(){k.className=p},move:function(a){e.resize(a[f]-h,
d);return!0}}}function b(b,c){function d(){k(D).off("mousemove",e);v&&(v.done(),v=null);return!0}function e(a){v?v.move(a):d();return!0}if(v)return!0;v=l(b.target,b);if(!v)return!0;k(D).one("mouseup",d).on("mousemove",e);return a(b)}function e(a,b){var c=b.type;"touchmove"===c?v&&v.move(b):"touchstart"===c?v=l(a.target,b):"touchend"===c&&v&&(v.done(),v=null)}function a(a){a.stopPropagation();a.preventDefault();return!1}function d(a){var b=r;b&&b.redraw();a&&a.redraw();return r=a}function p(a,b){var c=
k(b).on("editFocus",function(){c.trigger("wgFocus",[d(a)])}).on("editBlur",function(){c.trigger("wgBlur",[d(null)])})}function h(a){var b=a.id,c=a.className;this.id=b;this.el=a;this.pos=this.index=0;this.css=[c||"wg-root","wg-cell"];this._cn=c;s[b]=this;this.clear()}var g=m.require("$18","html.js"),n=g.top,A=g.left,C=1,s={},r,v=!1;c.init=function(a){var c=new h(a);c.redraw();m.require("$45","touch.js").ok(function(b){b.dragger(a,e)});k(a).mousedown(b);return c};f=h.prototype;f.fire=function(a,b){var c=
k.Event(a);c.cell=this;k(this.el).trigger(c,b);return this};f.each=function(a){for(var b=-1,c=this.cells,d=c.length;++b<d;)a(c[b],b);return this};f.indexOf=function(a){return(a=s[a.id||String(a)])&&a.pid===this.id?a.index:-1};f.on=function(){return this.$("on",arguments)};f.off=function(){return this.$("off",arguments)};f.find=function(a){return k(this.el).find(a)};f.$=function(a,b){k.fn[a].apply(k(this.el),b);return this};f.addClass=function(a){this.css.push(a);return this};f.removeClass=function(a){a=
this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};f.parent=function(){return this.pid&&s[this.pid]};f.splitx=function(){return this._split(C,arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,e=b.length,f=1/e,n=0;++c<e;){d=g.el();this.body.appendChild(d);for(var k=d,p=b[c],l=p,m=1;s[p];)p=l+"-"+ ++m;k.id=p;d=new h(d);d.index=c;d.pid=this.id;d._locale(this.lang,this.rtl);d.pos=n;n+=f;this.cells.push(d);
this.length++}this.dir=a;this.redraw();return this.cells};f.destroy=function(){this.clear();delete s[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";k(a).off();return this};f.exists=function(){return this===s[this.id]};f.clear=function(){for(var a=this.el,b=this.cells,c=this.field,d=this.body,e=this.nav,f=this.length||0;0!==f--;)delete s[b[f].destroy().id];this.cells=[];this.length=0;e&&(a.removeChild(e),this.nav=null);d&&(c&&(g.ie()&&k(d).triggerHandler("blur"),c.destroy(),
this.field=null),this.table&&(this.table=null),a===d.parentNode&&a.removeChild(d));this.body=a.appendChild(g.el("","wg-body"));this._h=null;return this};f.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,d=this.cells,e=k(this.el)[this.dir===C?"width":"height"](),g=d[c+1],c=d[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(g?g.pos*e:e)-pad;min=c?c.pos*e:0;b.pos=Math.min(max,Math.max(min,a))/e;this.redraw();return this};f.distribute=function(a){for(var b=-1,c=0,d,e=this.cells,
g=a.length;++b<g&&(d=e[++c]);)d.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};f.distribution=function(){for(var a=[],b=0,c=this.cells,d=c.length-1;b<d;)a[b]=c[++b].pos;return a};f.restyle=function(){var a=this.css.concat();0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&a.push("has-nav");this.field&&(a.push("is-field"),this.field.editable()?a.push("is-editable"):
a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};f.redraw=function(a){this.restyle();var b=this.el,c=this.body,d=this.field;if(c){var e,g=b.clientWidth||0,f=b.clientHeight||0,h=c.offsetTop||0,f=h>f?0:f-h;this._h!==f&&(this._h=f,c.style.height=String(f)+"px",e=d);this._w!==g&&(this._w=g,e=d);e&&e.redraw()}c=this.length;g=1;f=this.nav;for(h=2===this.dir?"height":"width";0!==c--;)d=this.cells[c],f?e=1:(d.fixed&&(d.pos=d.fixed/k(b)[h]()),e=g-d.pos,g=d.pos),
d.el.style[h]=String(100*e)+"%",d.redraw(a);return this};f.contents=function(a,b){var c=this.el,d=this.body;if(null==a)return d.innerHTML;this.length?this.clear():d&&(c.removeChild(d),d=null);d||(this.body=d=c.appendChild(g.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?k(d)._html(a):a&&this.append(a);this.redraw();return this};f.textarea=function(a,b){var c=this.field;if(c){var d=c.editable();c.reload(a,b);d!==b&&this.restyle()}else this.length&&
this.clear(),d=g.el("textarea"),d.setAttribute("wrap","virtual"),d.value=a,this.contents(d),c=m.require("$46","field.js")._new(d)[b?"enable":"disable"](),p(this,d),this.field=c,this.restyle();this.lang||this.locale("en");return c};f.locale=function(a){a=m.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};f._locale=function(a,b,c){var d=this.body;if(c||a!==this.lang)this.lang=a,d&&d.setAttribute("lang",a);if(c||b!==this.rtl)this.rtl=b,d&&d.setAttribute("dir",b?"RTL":"LTR");
return this};f.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,d=this.navigated();if(null!=d)return b[d].editable();for(;++d<c;){for(d=0;d<c;c++);if(a=b[d].editable())return a}};f.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};f.append=function(a){a&&(a.nodeType?g.init(this.body.appendChild(a)):g.init(k(a).appendTo(this.body)));return this};f.prepend=function(a){var b=this.body;if(a.nodeType){var c=
b.firstChild;g.init(c?b.insertBefore(a,c):b.appendChild(a))}else g.init(k(a).prependTo(b));return this};f.before=function(a){var b=this.body;a.nodeType?g.init(this.el.insertBefore(a,b)):g.init(k(a).insertBefore(b));return this};f.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=g.txt(a||"");this.el.insertBefore(g.el("header",b),this.body).appendChild(this.t);this.redraw();return this};f.title=function(a){var b=this.t;if(b)return b.nodeValue=a||"",b;
this.header(a);return this.t};f.titled=function(){var a=this.t;return a&&a.nodeValue};f.bodyY=function(){return n(this.body,this.el)};f.scrollY=function(a){if(S===a)return this.body.scrollTop;this.body.scrollTop=a};f.tabulate=function(a){var b=this.table;b?b.clear():b=m.require("$47","wgtable.js").create(this);b.init(a);return this.table=b};f.lock=function(){this.body.className+=" locked";return this};f.scrollTo=function(a,b){var c,d=this.body;c=d.scrollTop;var e=n(a,d);if(c>e)c=e;else{var g=d.clientHeight,
e=e+k(a).outerHeight();if(g+c<e)c=e-g;else return}b?d.scrollTop=c:k(d).stop(!0).animate({scrollTop:c},250)};f.navigize=function(b,c){function d(a){var b=f[a],c=p[a],e=k(b.el).show();c.addClass("active");n=a;l.data("idx",a);b.fire("wgTabSelect",[a]);return e}var e=this,f=e.cells,h=e.nav,n,p=[];h&&e.el.removeChild(h);var h=e.nav=e.el.insertBefore(g.el("nav","wg-tabs"),e.body),l=k(h).on("click",function(b){var c=k(b.target).data("idx");if(null==c)return!0;if(null!=n){var g=p[n];k(f[n].el).hide();g.removeClass("active")}d(c);
e.redraw();return a(b)});null==c&&(c=l.data("idx")||0);e.each(function(a,c){p[c]=k('<a href="#'+a.id+'"></a>').data("idx",c).text(b[c]).appendTo(l);a.pos=0;k(a.el).hide()});d(f[c]?c:0);e.lock();e.redraw();return e};f.navigated=function(){var a=this.nav;if(a)return k(a).data("idx")};f=null;return c}({},w,y));m.register("$24",function(c,f,D){function l(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||b.push("po-empty"),a.comment()&&
b.push("po-comment"));return b.join(" ")}function b(a,b,c){b=k(a.title(b).parentNode);var d=b.find("span.lang");c?(c=m.require("$38","locale.js").cast(c),d.length||(d=k("<span></span>").prependTo(b)),d.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(d.remove(),c="en");a.locale(c);return b}function e(){this.dirty=0}var a="poUpdate",d="changing",p="changed",h=0,g=1,n=2,A=3,C=4,s=5,r=/^\s+/,v,q,B=m.require("$3","string.js").sprintf,w=m.require("$18",
"html.js");c.extend=function(a){return a.prototype=new e};c.localise=function(a){q=a;return c};var y=function(){var a=D.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent}}(),u=e.prototype=m.require("$39","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);u.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};u.localise=function(a){a||(a=q||m.require("$1","t.js").init());
var b=[];b[h]=a._x("Source text","Editor")+":";b[A]=a._x("%s translation","Editor")+":";b[C]=a._x("Context","Editor")+":";b[s]=a._x("Comments","Editor")+":";b[g]=a._x("Single","Editor")+":";b[n]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated","Editor");b[8]=a._x("Fuzzy","Editor");this.labels=b;this.t=a;return this};u.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=m.require("$40","wingrid.js").init(a);k(f).on("resize",b);this.redraw=b;k(a).on("wgFocus wgBlur",
function(a,b){a.stopPropagation();v=b});this.destroy=function(){c.destroy();k(f).off("resize",b)};this.rootDiv=a;return c};u.$=function(){return k(this.rootDiv)};u.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));return!0}).on("wgRowDeselect",function(a,c,d){d||b.loadNothing();return!0})};u.setSourceCell=function(a){this.sourceCell=a};u.setTargetCell=function(a){this.targetCell=a};u.next=function(a,b,c){for(var d=this.listTable,e=d.selected(),
g=e,f,h=this.po;null!=(e=d.next(a,c,e));){if(g===e){e=null;break}if(b&&(f=h.row(e),f.translated(0)))continue;break}null!=e&&d.select(e,!0);return e};u.current=function(a){var b=this.active;if("undefined"===typeof a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();return this};u.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};u.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};
u.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};u.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};u.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};u.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};u.rebuildSearch=function(){var a=-1,b=this.po.rows,c=b.length,d=this.dict;for(d.clear();++a<
c;)d.add(a,b[a].toText())};u.filtered=function(){return this.lastSearch||""};u.filter=function(a,b){var c,d=this.listTable,e=this.lastFound,g=this.lastSearch;if(a){if(g===a)return e||0;if(g&&!e&&0===a.indexOf(g))return 0;c=this.dict.find(a)}this.lastSearch=g=a;this.lastFound=e=c?c.length:this.po.length;c?d.filter(c):d.unfilter();b||this.fire("poFilter",[g,e]);return e};u.countFiltered=function(){return this.lastSearch?this.lastFound:this.po.length};u.unsave=function(a,b){var c=!1;if(a=a||self.active){if(c=
a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return c};u.markUnsaved=function(a){var b=this.po.indexOf(a);if(b=this.listTable.tr(b)){var c=b[0].className;a=c.replace(/(?:^| +)po-[a-z]+/g,"")+" "+l(a);a!==c&&k(b).attr("class",a)}};u.save=function(a){var b=this.po;if(this.dirty||a)b.each(function(a,b){b.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return b};u.fire=function(a,b){var c=this.handle;if(c&&
c[a]&&(c=c[a].apply(this,b||[]),!1===c))return!1;c=k.Event(a);this.$().trigger(c,b);return!c.isDefaultPrevented()};u.on=function(a,b){this.$().on(a,b);return this};u.getSorter=function(){return null};u.reload=function(){var a=this,b,c=a.listCell,d=a.listTable,e=a.po,g=e&&e.locale(),f=g&&g.isRTL(),h=e&&e.length||0;if(!e||!e.row)return c&&c.clear().header("Error").contents("Invalid messages list"),!1;a.targetLocale=g;a.lastSearch&&(a.lastSearch="",a.lastFound=h,a.fire("poFilter",["",h]));d&&(b=d.thead().distribution());
a.listTable=d=c.tabulate({eachCol:function(b){var c,d,e=a.getListColumns(),g=a.getListHeadings();for(d in e)c=e[d],b(c,d,g[c])},eachRow:function(b){e.each(function(c,d){b(d.idx,a.getListEntry(d),l(d))})},sort:a.getSorter()});var n,c=a.getListColumns();for(n in c)d.sortable(c[n]);b&&d.thead().distribute(b);d.tbody().$(f?"addClass":"removeClass",["is-rtl"]);a.fire("poLoad");return!!h};u.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==b?this.listTable.selectRow(b||0):
this.active&&this.unloadActive())};u.pasteMessage=function(a){var b,c=0;(b=this.sourceCell)&&b.eachTextarea(function(b){b.val(a.source(null,c++))});(b=this.contextCell)&&b.eachTextarea(function(b){b.val(a.context())});if(b=this.targetCell)c=0,b.eachTextarea(function(b){b.val(a.translation(c++))});this.updateListCell(a,"source");this.updateListCell(a,"target");return this};u.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,d;this.pasteMessage(a);b&&this.setNotes(a,b)&&b.redraw();c&&
(d=c.navigated()||0,d=this.setErrors(a.errors(d),c),!b&&this.setNotes(a,c)&&(d=!0),d&&c.redraw());return this};u.setStatus=function(){return null};u.setNotes=function(a,b){var c=[],d=!1,e=this.$notes,g=this.labels,f=a.notes(),h=a.context(),n=[],p=a.tags(),l=p&&p.length;h&&(n.push("<span>"+w.h(g[C])+"</span>"),n.push("<mark>"+w.h(h)+"</mark>"));if(l&&this.getTag)for(n.push("<span>Tagged:</span>");0<=--l;)(g=this.getTag(p[l]))&&n.push('<mark class="tag">'+w.h(g.mod_name)+"</mark>");n.length&&c.push(n.join(" "));
f&&c.push('<p class="has-icon icon-info">'+w.h(f,!0)+"</p>");c.length?(e||(e=b.find("div.meta"),e.length||(e=k('<div class="meta"></div>').insertAfter(b.header())),this.$notes=e),e.html(c.join("\n")).show(),w.init(e),d=!0):e&&e.text()&&(e.text("").hide(),d=!0);return d};u.setErrors=function(a,b){var c=!1,d=this.$errs;a&&a.length?(d||(d=b.find("p.errors"),d.length||(d=k('<p class="errors"></p>').insertAfter(this.targetCell.header())),this.$errs=d),d.html(w.h(a.join(".\n")+".",!0)).show(),w.init(d),
c=!0):d&&d.text()&&(d.text("").hide(),c=!0);return c};u.loadMessage=function(c){function e(a,b){var c=b?a.split(" "):a.split(" ",1);a=c[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);c[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return c.join(" ")}function f(a,d){var p=S,l=O[h];a.off();a.titled()!==l&&b(a,l,d||"en");l=!1;u.setNotes(c,a)&&(l=!0);if(c.plural()){var l=-1,m=[],r=[],q=a.id+"-",s=c.sourceForms()||d&&d.plurals||["One","Other"],A=s.length;if(2!==A||
"="===s[0].charAt(0)&&"=1"!==s[0])for(;++l<A;)m[l]=q+String(l),r[l]=e(s[l])+":";else m=[q+"-0",q+"-1"],r=[O[g],O[n]];a.splity.apply(a,m);a.each(function(a,b){a.header(r[b]).textarea(c.source(null,b),p).setStrf(H).setMode(w).setInvs(y)});a.lock();p&&a.each(function(a,b){k(a,b)})}else l&&a.redraw(),a.textarea(c.source(),p).setStrf(H).setMode(w).setInvs(y),p&&k(a,0)}function k(b,e){b.on(d,function(a,b){c.source(b,e);0===e&&u.updateListCell(c,"source");u.unsave(c,e)}).on(p,function(){0===e&&u.po.reIndex(c);
u.dict&&u.rebuildSearch();u.fire(a,[c])})}function l(a,d,g){P&&a.eachTextarea(function(a){a.ping()});a.off();var f=d.isKnown()&&d.label||"Target",f=B(O[A],f);a.titled()!==f&&b(a,f,d);f=!1;!this.sourceCell&&u.setNotes(c,a)&&(f=!0);u.setErrors(c.errors(g),a)&&(f=!0);u.setStatus(c,g);if(c.pluralized()){var h=[],n=[],k=a.id+"-",p=c.targetForms()||d.plurals||["One","Other"],f=p.length,r=function(a){var b=p[a];n.push(b?e(b,!0):"Form "+a);h.push(k+String(a))};for(c.each(r);(d=h.length)<f;)r(d);a.splitx.apply(a,
h);a.each(function(a,b){var d=P&&!c.disabled(b);a.textarea(c.translation(b),d).setStrf(H).setMode(w).setInvs(y);P&&m(a,b)});a.navigize(n,g||null).on("wgTabSelect",function(b,d){var e=P&&b.cell.editable();e&&e.focus();u.setErrors(c.errors(d),a);u.setStatus(c,d);u.fire("poTab",[d])})}else f&&a.redraw(),a.textarea(c.translation(),P&&!c.disabled(0)).setStrf(H).setMode(w).setInvs(y),P&&m(a,0)}function m(b,e){b.on(d,function(a,b,d){c.translate(b,e);0===e&&u.updateListCell(c,"target");c.fuzzy(e)?u.fuzzy(!1,
c,e):u.unsave(c,e);""===b?u.fire("poEmpty",[!0,c,e]):""===d&&u.fire("poEmpty",[!1,c,e])}).on(p,function(){u.dict&&u.rebuildSearch();u.fire(a,[c])})}function r(e){e.off();var g=O[C];e.titled()!==g&&(b(e,g),u.setStatus(null));e.textarea(c.context(),!0).setMode(w).setInvs(y);X&&e.on(d,function(a,b){c.context(b);u.updateListCell(c,"source");u.unsave(c,R)}).on(p,function(){u.po.reIndex(c);u.dict&&u.rebuildSearch();u.fire(a,[c])})}function q(a){var e=O[s];a.titled()!==e&&b(a,e);a.off().on(d,function(a,
b){c.comment(b);u.fire("poComment",[c,b]);u.unsave(c,R)}).textarea(c.comment(),!0)}var u=this,w=u.mode,D=c.isHTML(),y=u.inv||!1,E=this.fmt||null,H=c.format()||null,G=c.is(u.active),R=0,L=u.sourceCell,T=u.targetCell,U=u.contextCell,V=u.commentCell,P=u.editable.target,S=u.editable.source,X=u.editable.context,Q=v,Y=u.sourceLocale,W=u.targetLocale,O=u.labels;u.html!==D&&(u.html=D,"code"!==u.mode&&(w=D?"html":"",u.setMode(w)));u.active=c;L&&f(L,Y);U&&r(U);T&&W&&(R=T.navigated()||0,l(T,W,R));V&&q(V);Q&&
(Q.exists()||(Q=Q.parent()),(D=Q.editable())&&D.focus());E!==H&&(this.fmt=H);G||u.fire("poSelected",[c])};u.unloadActive=function(){var a;(a=this.$notes)&&a.text("").hide();(a=this.$errs)&&a.text("").hide();(a=this.sourceCell)&&a.off().clear();(a=this.contextCell)&&a.off().clear();(a=this.targetCell)&&a.off().clear();(a=this.commentCell)&&a.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};u.loadNothing=function(){var a,b=this.t,c=this.mode||"",d=this.inv||
!1,e=this.fmt;this.unloadActive();this.setStatus(null);(a=this.commentCell)&&a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(e).setMode(c).setInvs(d),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(d),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(e).setMode(c).setInvs(d),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",[null])};u.updateListCell=
function(a,b){var c=this.getListColumns()[b],d=this.po.indexOf(a);(d=this.listTable.row(d))&&d.update(c)};u.cellText=function(a){if(-1!==a.indexOf("<")||-1!==a.indexOf("&"))a=y(a);return a.replace(r,"")||"\u00a0"};u.fuzzy=function(a,b,c){var d=4===this.flag(null,b,c);!0!==a||d?!1===a&&d&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return d};u.flag=function(b,c,d){if(!c){c=this.active;d=this.getTargetOffset();if(null==d)return null;d&&c.targetForms()&&
(d=0)}var e=c.flagged(d);if(null==b)return e;if(e===b||b&&!c.translated(d)||!this.fire("poFlag",[b,e,c,d]))return!1;c.flag(b,d);this.fire(a,[c])&&this.unsave(c,d);this.setStatus(c,d);return!0};u.add=function(b,c){var d,e=this.po.get(b,c);e?d=this.po.indexOf(e):(d=this.po.length,e=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[e]),this.fire(a,[e]));this.lastSearch&&this.filter("");this.listTable.select(d);return e};u.del=function(b){if(b=b||this.active){var c=this.lastSearch,d=this.po.del(b);
null!=d&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),this.dict&&this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(d=Math.min(d,this.po.length-1),this.listTable.select(d))))}};u.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};u.setMode=function(a){this.mode!==a&&(this.mode=a,this.callTextareas(function(b){b.setMode(a)}));return this};u.getMono=function(){return"code"===this.mode};
u.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),this.fire("poInvs",[a]));return this};u.getInvs=function(){return this.inv||!1};u.callTextareas=function(a){var b=this.targetCell;b&&b.eachTextarea(a);(b=this.contextCell)&&b.eachTextarea(a);(b=this.sourceCell)&&b.eachTextarea(a);return this};u.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};u=null;return c}({},w,y));m.register("$25",function(c,f,k){Number.prototype.format=
function(c){c=Math.pow(10,c||0);var b=Math.round(c*this)/c;c=[];var b=String(b),e=b.split("."),b=e[0],e=e[1],a=b.length;do c.unshift(b.substring(a-3,a));while(0<(a-=3));b=c.join(",");if(c=e){c=e;for(var d,e=c.length;"0"===c.charAt(--e);)d=e;d&&(c=substring(0,d));c=e=c}c&&(b+="."+e);return b};Number.prototype.percent=function(c){var b=0,e=this&&c?100*(this/c):0;if(0===e)return"0";if(100===e)return"100";if(99<e)e=Math.min(e,99.9),c=e.format(++b);else if(0.5>e){e=Math.max(e,1E-4);do c=e.format(++b);
while("0"===c&&4>b);c=c.substr(1)}else c=e.format(0);return c};return c}({},w,y));m.register("$12",function(c,f,k){function l(){this.init()._validate();this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}f=m.require("$24","base.js");m.require("$25","number.js");c.init=function(b){var c=new l;b=c.setRootCell(b);var a=b.splity("po-list","po-edit"),d=a[0],f=a[1],a=f.splitx("po-trans","po-comment"),h=a[0],g=a[1].header("Loading.."),a=h.splity("po-source","po-target"),h=a[0].header("Loading.."),
a=a[1].header("Loading..");b.distribute([0.34]);f.distribute([0.8]);c.setListCell(d);c.setSourceCell(h);c.setTargetCell(a);c.commentCell=g;c.editable.source=!1;return c};f=l.prototype=f.extend(l);f.getListHeadings=function(){var b=this.t||{_x:function(a){return a}},c=[b._x("Source text","Editor")];this.targetLocale&&(c[1]=b._x("Translation","Editor"));return c};f.getListColumns=function(){var b={source:0};this.targetLocale&&(b.target=1);return b};f.getListEntry=function(b){var c=this.cellText,a=[function(){var a,
f=c(b.source()||""),h=b.context();return h?(a=k.createElement("p"),a.appendChild(k.createElement("mark")).innerText=h,a.appendChild(k.createTextNode("\u00a0"+f)),a):f}];this.targetLocale&&(a[1]=function(){return c(b.translation()||"")});return a};f.stats=function(){var b=this.po,c=b.length,a=0,d=0,f=0;b.each(function(b,c){c.fuzzy()?f++:c.translated()?a++:d++});return{t:c,p:a.percent(c)+"%",f:f,u:d}};f.unlock=function(){var b=this.targetLocale;this._unlocked||(this.editable={source:!0,context:!0,target:!1},
this.po&&this.po.unlock(),this.contextCell=this.targetCell,delete this.targetCell,b&&(this._unlocked=b,delete this.targetLocale,this.reload(),this.fire("poLock",[!1])),this.active&&this.loadMessage(this.active))};f.lock=function(){var b=this._unlocked;b&&(this.targetLocale=b,delete this._unlocked,this.po&&this.po.lock(b),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.reload(),this.fire("poLock",[!0,b]),this.active&&this.loadMessage(this.active))};
f.locked=function(){return!this._unlocked};f.getSorter=function(){function b(a,b){var f=a.weight(),g=b.weight();return f===g?c(a,b):f>g?-1:1}function c(a,b){return a.hash().localeCompare(b.hash())}var a=this;return function(d){var f=a.po,h=a.locked()?b:c;d.sort(function(a,b){return h(f.row(a),f.row(b))})}};return c}({},w,y));m.register("$13",function(c,f,m){var l={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73},b={38:!0,40:!0,73:!0},e={66:function(a,b){var c=b.current();c&&(c.normalize(),
b.focus().pasteMessage(c))},75:function(a,b){var c=b.current();c&&(c.untranslate(),b.focus().pasteMessage(c))},85:function(a,b){b.focus().fuzzy(!b.fuzzy())},13:function(a,b){b.getFirstEditable()&&b.next(1,!0,!0)},40:function(a,b){var c=a.shiftKey;b.next(1,c,c)},38:function(a,b){var c=a.shiftKey;b.next(-1,c,c)},73:function(a,b){if(!a.shiftKey)return!1;b.setInvs(!b.getInvs())}};c.init=function(a,c){function p(c){if(c.isDefaultPrevented()||!c.metaKey&&!c.ctrlKey)return!0;var d=c.which;if(!h[d])return!0;
var f=e[d];if(!f)throw Error("command undefined #"+d);if(c.altKey||c.shiftKey&&!b[d]||!1===f(c,a))return!0;c.stopPropagation();c.preventDefault();return!1}var h={};k(c||f).on("keydown",p);return{add:function(a,b){e[l[a]]=b;return this},enable:function(){var a,b;for(b in arguments)a=l[arguments[b]],h[a]=!0;return this},disable:function(){k(c||f).off("keydown",p);a=c=h=null}}};return c}({},w,y));m.register("$26",function(c,f,k){function l(){this.reIndex([])}c.init=function(){return new l};f=l.prototype;
f.reIndex=function(b){for(var c={},a=-1,d=b.length;++a<d;)c[b[a]]=a;this.keys=b;this.length=a;this.ords=c};f.key=function(b,c){if(null==c)return this.keys[b];var a=this.keys[b],d=this.ords[c];if(c!==a){if(null!=d)throw Error("Clash with item at ["+d+"]");this.keys[b]=c;delete this.ords[a];this.ords[c]=b}return b};f.indexOf=function(b){b=this.ords[b];return null==b?-1:b};f.add=function(b,c){var a=this.ords[b];null==a&&(this.keys[this.length]=b,a=this.ords[b]=this.length++);this[a]=c;return a};f.get=
function(b){return this[this.ords[b]]};f.has=function(b){return null!=this.ords[b]};f.del=function(b){this.cut(this.ords[b],1)};f.cut=function(b,c){c=c||1;var a=[].splice.call(this,b,c);this.keys.splice(b,c);this.reIndex(this.keys);return a};f.each=function(b){for(var c=-1,a=this.keys,d=this.length;++c<d;)b(a[c],this[c],c);return this};f.sort=function(b){for(var c=-1,a=this.length,d,f=this.keys,h=this.ords,g=[];++c<a;)g[c]=[this[c],f[c]];g.sort(function(a,c){return b(a[0],c[0])});for(c=0;c<a;c++)d=
g[c],this[c]=d[0],d=d[1],f[c]=d,h[d]=c;return this};f.join=function(b){return[].join.call(this,b)};f=null;return c}({},w,y));m.register("$27",function(c,f,k){function l(b,c){var a=RegExp("^.{0,"+(b-1)+"}["+c+"]"),d=RegExp("^[^"+c+"]+");return function(c,e){for(var g=c.length,f;g>b;){f=a.exec(c)||d.exec(c);if(null==f)break;f=f[0];e.push(f);f=f.length;g-=f;c=c.substr(f)}0!==g&&e.push(c);return e}}c.create=function(b){function c(a){return k[a]||"\\"+a}var a,d,f=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,h=/[ \r\n]+/g,
g=/[\t\v\f\x07\x08\\\"]/g,k={"\t":"\\t","\v":"\\v","\f":"\\f","\u0007":"\\a","\b":"\\b"};if(null==b||isNaN(b=Number(b)))b=79;0<b&&(a=l(b-3," "),d=l(b-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(a,h){if(!h)return a+' ""';h=h.replace(g,c);var k=0;h=h.replace(f,function(){k++;return"\\n\n"});if(!(k||b&&b<h.length+a.length+3))return a+' "'+h+'"';var n=[a+' "'],l=h.split("\n");if(d)for(var m=-1,w=l.length;++m<w;)d(l[m],n);else n=n.concat(l);return n.join('"\n"')+'"'},prefix:function(a,b){var c=
a.split(f);return b+c.join("\n"+b)},refs:function(b){b=b.replace(h," ",b);a&&(b=a(b,[]).join("\n#: "));return"#: "+b}}};return c}({},w,y));m.register("$41",function(c,f,k){function l(){this.length=0}c.init=function(){return new l};f=l.prototype;f.push=function(b){this[this.length++]=b;return this};f.sort=function(b){[].sort.call(this,b);return this};f.each=function(b){for(var c=-1,a=this.length;++c<a;)b(c,this[c]);return this};return c}({},w,y));m.register("$28",function(c,f,k){function l(){}c.extend=
function(b){return b.prototype=new l};f=l.prototype=m.require("$39","abstract.js").init(["add","load"]);f.row=function(b){return this.rows[b]};f.lock=function(b){return this.locale(b||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};f.unlock=function(){var b=this.loc;this.loc=null;return b};f.locale=function(b){null==b?b=this.loc:this.loc=b=m.require("$38","locale.js").cast(b);return b};f.each=function(b){this.rows.each(b);return this};f.indexOf=function(b){"object"!==typeof b&&(b=this.get(b));
if(!b)return-1;null==b.idx&&(b.idx=this.rows.indexOf(b.hash()));return b.idx};f.get=function(b){return this.rows&&this.rows.get(b)};f.del=function(b){b=this.indexOf(b);if(-1!==b){var c=this.rows.cut(b,1);if(c&&c.length)return this.length=this.rows.length,this.rows.each(function(a,b,c){b.idx=c}),b}};f.reIndex=function(b,c){var a=this.indexOf(b),d=b.hash(),f=this.rows.indexOf(d);return f===a?a:-1!==f?(c=(c||0)+1,b.source("Error, duplicate "+String(c)+": "+b.source()),this.reIndex(b,c)):this.rows.key(a,
d)};f.sort=function(b){this.rows.sort(b);return this};f["export"]=function(){for(var b=-1,c=this.rows,a=c.length,d=m.require("$41","list.js").init();++b<a;)d.push(c[b]);return d};f=null;return c}({},w,y));m.register("$29",function(c,f,k){function l(){this._id=this.id=""}c.extend=function(b){return b.prototype=new l};f=l.prototype;f.flag=function(b,c){var a=this.flg||(this.flg=[]);if(null!=c)a[c]=b;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=b;return this};f.flagged=
function(b){var c=this.flg||[];if(null!=b)return c[b]||0;for(b=c.length;0!==b--;)if(c[b])return!0;return!1};f.flags=function(){for(var b,c={},a=[],d=this.flg||[],f=d.length;0!==f--;)b=d[f],c[b]||(c[b]=!0,a.push(b));return a};f.flaggedAs=function(b,c){var a=this.flg||[];if(null!=c)return b===a[c]||0;for(var d=a.length;0!==d--;)if(a[d]===b)return!0;return!1};f.fuzzy=function(b,c){var a=this.flaggedAs(4,b);null!=c&&this.flag(c?4:0,b);return a};f.source=function(b,c){if(null==b)return this.src[c||0]||
"";this.src[c||0]=b;return this};f.plural=function(b,c){if(null==b)return this.src[c||1]||"";this.src[c||1]=b||"";return this};f.sourceForms=function(){return this.srcF};f.targetForms=function(){return this.msgF};f.each=function(b){for(var c=-1,a=this.src,d=this.msg,f=Math.max(a.length,d.length);++c<f;)b(c,a[c],d[c]);return this};f.count=function(){return Math.max(this.src.length,this.msg.length)};f.pluralized=function(){return 1<this.src.length||1<this.msg.length};f.translate=function(b,c){this.msg[c||
0]=b||"";return this};f.untranslate=function(b){if(null!=b)this.msg[b]="";else{var c=this.msg,a=c.length;for(b=0;b<a;b++)c[b]=""}return this};f.translation=function(b){return this.msg[b||0]||""};f.errors=function(b){return this.err&&this.err[b||0]||[]};f.translated=function(b){if(null!=b)return!!this.msg[b];var c=this.msg,a=c.length;for(b=0;b<a;b++)if(!c[b])return!1;return!0};f.untranslated=function(b){if(null!=b)return!this.msg[b];var c=this.msg,a=c.length;for(b=0;b<a;b++)if(c[b])return!1;return!0};
f.comment=function(b){if(null==b)return this.cmt||"";this.cmt=b||"";return this};f.notes=function(b){if(null==b)return this.xcmt||"";this.xcmt=b||"";return this};f.refs=function(b){if(null==b)return this.ref||"";this.ref=b||"";return this};f.format=function(b){if(null==b)return this.fmt||"";this.fmt=b||"";return this};f.context=function(b){if(null==b)return this.ctx||"";this.ctx=b||"";return this};f.tags=function(){return this.tg};f.toString=f.toText=function(){return this.src.concat(this.msg,this.id,
this.ctx).join(" ")};f.weight=function(){var b=0;this.translation()||(b+=2);this.fuzzy()&&(b+=1);return b};f.equals=function(b){return this===b||this.hash()===b.hash()};f.hash=function(){return this.id};f.normalize=function(){for(var b=this.msg.length;0!==b--;)this.msg[b]=this.src[b]||""};f.disabled=function(b){return!!(this.lck||[])[b||0]};f.disable=function(b){(this.lck||(this.lck=[]))[b||0]=!0;return this};f.saved=function(b){var c=this.drt;if(!c)return!0;if(null!=b)return!c[b];for(b=c.length;0!==
b--;)if(c[b])return!1;return!0};f.unsave=function(b){(this.drt||(this.drt=[]))[b||0]=!0;return this};f.save=function(b){var c=this.drt;null==b?this.drt=null:c[b]=!1;return this};f.is=function(b){return b&&(b===this||b.idx===this.idx)};f.isHTML=function(b){if(null==b)return this.htm||!1;this.htm=b};f=null;return c}({},w,y));m.register("$14",function(c,f,k){function l(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"","POT-Creation-Date":a||"","PO-Revision-Date":a||"","Last-Translator":"",
"Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function b(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function e(){return m.require("$26","collection.js").init()}function a(a){var b=f.console;b&&b.error&&b.error(a.message||String(a))}function d(a){return m.require("$27","format.js").create(a)}function p(a){this.locale(a);this.length=0;this.rows=e();this.head=l(this.now())}function h(a,b){this.src=
[a||""];this.msg=[b||""]}c.create=function(a){return new p(a)};k=m.require("$28","messages.js").extend(p);k.now=function(){function a(b,c){for(var d=String(b);d.length<c;)d="0"+d;return d}var b=new Date,c=b.getUTCFullYear(),d=b.getUTCMonth()+1,e=b.getUTCDate(),f=b.getUTCHours(),b=b.getUTCMinutes();return a(c,4)+"-"+a(d,2)+"-"+a(e,2)+" "+a(f,2)+":"+a(b,2)+"+0000"};k.header=function(a,b){var c=this.head||(this.head={});if(null==b)return this.headers()[a]||"";c[a]=b||"";return this};k.headers=function(a){var b,
c=this.now(),d=this.head||(this.head=l(c));if(null!=a){for(b in a)d[b]=a[b];return this}var e=this.locale();a={};for(b in d)a[b]=String(d[b]);e?(a.Language=String(e)||"zxx",a["Language-Team"]=e.label||a.Language,a["Plural-Forms"]="nplurals="+(e.nplurals||"2")+"; plural="+(e.pluraleq||"n!=1")+";",b="PO-Revision-Date"):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION;",a["PO-Revision-Date"]="YEAR-MO-DA HO:MI+ZONE",b="POT-Creation-Date");a[b]||(a[b]=c);a["X-Generator"]="Loco https://localise.biz/";
return a};k.get=function(a,c){var d=b(a,c);return this.rows.get(d)};k.add=function(b,c){b instanceof h||(b=new h(b));c&&b.context(c);var d=b.hash();this.rows.get(d)?a("Duplicate message at index "+this.indexOf(b)):(b.idx=this.rows.add(d,b),this.length=this.rows.length);return b};k.load=function(b){for(var c=-1,d,e,f,k,l,m,p=(f=this.locale())&&f.nplurals||2,w=[];++c<b.length;)d=b[c],null==d.parent?(e=d.source||d.id,f=d.target||"",k=d.context,e||k?(l=new h(e,f),l._id=d._id,k&&l.context(k),d.flag&&l.flag(d.flag,
0),d.comment&&l.comment(d.comment),d.notes&&l.notes(d.notes),d.refs&&l.refs(d.refs),l.format(d.format),d.message=l,this.add(l)):0===c&&"object"===typeof f&&(this.head=f,this.headcmt=d.comment)):w.push(d);for(c=-1;++c<w.length;)try{d=w[c];e=d.source||d.id;l=b[d.parent]&&b[d.parent].message;if(!l)throw Error("parent missing for plural "+e);m=d.plural;1===m&&l.plural(e);m>=p||(d.flag&&l.flag(d.flag,m),l.translate(d.target||"",m),d.format&&!l.format()&&l.format(d.format))}catch(y){a(y)}return this};k.merge=
function(b){var c=this,d,f=b.header("POT-Creation-Date"),h=c.rows,k=[],l=[];b=b.rows;c.rows.each(function(a,c){null==b.get(a)&&l.push(c)});c.rows=e();b.each(function(b,e){try{(d=h.get(b))?(d.ref=e.ref,d.fmt=e.fmt):(d=e,k.push(d)),c.add(d)}catch(f){a(f)}});f&&c.header("POT-Creation-Date",f);return{add:k,del:l}};k.wrap=function(a){this.fmtr=d(a);return this};k.toString=function(){var a,b=this.locale(),c=[],e=[],f=this.headers(),k=!b,l=b&&b.nplurals||2,m=this.fmtr||d();f[b?"PO-Revision-Date":"POT-Creation-Date"]=
this.now();for(a in f)e.push(a+": "+f[a]);e=new h("",e.join("\n"));e.comment(this.headcmt||"");k&&e.fuzzy(0,!0);c.push(e.toString());c.push("");this.rows.each(function(a,b){a&&(c.push(b.cat(m,k,l)),c.push(""))});return c.join("\n")};k=m.require("$29","message.js").extend(h);k.hash=function(){return b(this.source(),this.context())};k.toString=function(){return this.cat(d())};k.cat=function(a,b,c){var d,e=[],f;(f=this.cmt)&&e.push(a.prefix(f,"# "));(f=this.xcmt)&&e.push(a.prefix(f,"#. "));d=this.ref;
if(f=this._id)d+=(d?" ":"")+"loco:"+f;d&&/\S/.test(d)&&e.push(a.refs(d));!b&&this.fuzzy()&&e.push("#, fuzzy");(f=this.fmt)&&e.push("#, "+f+"-format");(f=this.ctx)&&e.push(a.pair("msgctxt",f));e.push(a.pair("msgid",this.src[0]));if(null==this.src[1])e.push(a.pair("msgstr",b?"":this.msg[0]));else for(d=-1,e.push(a.pair("msgid_plural",this.src[1])),f=this.msg||["",""],c=c||f.length;++d<c;)e.push(a.pair("msgstr["+d+"]",b?"":f[d]||""));return e.join("\n")};k.compare=function(a,b){var c=this.weight(),d=
a.weight();if(c>d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};k=k=null;return c}({},w,y));m.register("$16",function(c,f,m){c.init=function(c){function b(){M||(I.click(n),M=k('<div id="loco-fs-creds"></div>').dialog({dialogClass:"request-filesystem-credentials-dialog loco-modal",minWidth:580,modal:!0,autoOpen:!1,closeOnEscape:!0}).on("change",'input[name="connection_type"]',function(){this.checked&&k("#ssh-keys").toggleClass("hidden",
"ssh"!==k(this).val())}));return M}function e(){G&&(a(k(q)),G=!1);if(H&&L){var b=L,c=k(J);c.find("span.loco-msg").text(b);N||(c.removeClass("jshide").hide().fadeIn(500),N=!0)}else N&&(a(k(J)),N=!1)}function a(a){a.slideUp(250).fadeOut(250,function(){k(this).addClass("jshide")})}function d(){if(H)return M&&M.dialog("close"),e(),k(c).find('button[type="submit"]').attr("disabled",!1),k(f).triggerHandler("resize"),v&&v(!0),!0;z&&M?(G||(k(q).removeClass("jshide").hide().fadeIn(500),G=!0),N&&(a(k(J)),N=
!1)):e();k(c).find('input[type="submit"]').attr("disabled",!0);v&&v(!1);return!1}function p(a){var b,c,d=r||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:k('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function h(a){a.preventDefault();a=k(a.target).serializeArray();s(a);E=!0;return!1}function g(a){a.preventDefault();M.dialog("close");return!1}function n(a){a.preventDefault();M.dialog("open").find('input[name="connection_type"]').change();return!1}function w(a){H=a.authed;
B=a.method;k(q).find("span.loco-msg").text(a.message||"Something went wrong.");L=a.warning||"";a.notice&&u.notices.info(a.notice);if(H)"direct"!==B&&(r=a.creds,p(c),E&&a.success&&u.notices.success(a.success)),d();else if(a.reason)u.notices.info(a.reason);else if(a=a.prompt){var e=b();e.html(a).find("form").submit(h);e.dialog("option","title",e.find("h2").remove().text());e.find("button.cancel-button").show().click(g);e.find('input[type="submit"]').addClass("button-primary");d();k(f).triggerHandler("resize")}else u.notices.error("Server didn't return credentials, nor a prompt for credentials")}
function y(){d()}function s(a){E=!1;u.ajax.setNonce("fsConnect",K).post("fsConnect",a,w,y);return a}var r,v,q=c,B=null,E=!1,H=!1,u=f.locoScope,z=c.path.value,F=c.auth.value,K=c["loco-nonce"].value,I=k(q).find("button.button-primary"),J=m.getElementById(q.id+"-warn"),G=!1,N=!1,L="",M;u.notices.convert(J).stick();c.connection_type?(r={},r.connection_type=c.connection_type.value,H=!0):z&&F&&s({path:z,auth:F});d();return{applyCreds:function(a){if(a.nodeType)p(a);else{var b,c=r||{};for(b in c)c.hasOwnProperty(b)&&
(a[b]=c[b])}return this},setForm:function(a){c=a;d();p(a);return this},connect:function(){z=c.path.value;F=c.auth.value;s(k(c).serializeArray());return this},listen:function(a){v=a;H&&a(!0);return this}}};return c}({},w,y));m.register("$17",function(c,f,w){function l(c,f,g,k){f="n"===g?e(f):a(f);k&&(f=d(f));return b([].sort,[f])(c)}function b(a,b){return function(c){a.apply(c,b);return c}}function e(a){return function(b,c){var d=b&&b[a]||0,e=c&&c[a]||0;return d===e?0:d>e?1:-1}}function a(a){return function(b,
c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function d(a){return function(b,c){return-1*a(b,c)}}c.init=function(a){function b(a){var c=-1,d=a.length;for(k("tr",q).remove();++c<d;)q.appendChild(a[c].$)}function c(a){s=a?y.find(a,d):d.slice(0);v&&(a=e[v],s=l(s,v,a.type,a.desc));b(s)}var d=[],e=[],f=0,s,r,v,q=a.getElementsByTagName("tbody")[0],w=a.getElementsByTagName("thead")[0],y=m.require("$7","fulltext.js").init();w&&q&&(k("th",w).each(function(a,c){var g=c.getAttribute("data-sort-type");
g&&(a=f,k(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var f=e[c],g=f.type,m=!(f.desc=!f.desc);s=l(s||d.slice(0),c,g,m);b(s);r&&r.removeClass("loco-desc loco-asc");r=k(f.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");v=c;return!1}),e[f]={$:c,type:g});c.hasAttribute("colspan")?f+=Number(c.getAttribute("colspan")):f++}),k("tr",q).each(function(a,b){var c,f,g,h=[],k={_:a,$:b},l=b.getElementsByTagName("td");for(f in e){c=l[f];(g=c.textContent.replace(/(^\s+|\s+$)/g,
""))&&h.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));switch(e[f].type){case "n":g=Number(g)}k[f]=g}d[a]=k;y.index(a,h)}),a=k('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],w=k(a.form),1<d.length?m.require("$8","LocoTextListener.js").listen(a,c):w.hide(),w.on("submit",function(a){a.preventDefault();return!1})))};return c}({},w,y));var G=w.locoScope||(w.locoScope={});w=w.locoConf||(w.locoConf={});y=m.require("$1","t.js").init();var L=w.wplang;
m.require("$2","array.js");G.l10n=y;y.load(w.wpl10n);L&&y.pluraleq(L.pluraleq);G.string=m.require("$3","string.js");G.notices=m.require("$4","notices.js").init(y);G.ajax=m.require("$5","ajax.js").init(w).localise(y);G.locale=m.require("$6","wplocale.js");G.fulltext=m.require("$7","fulltext.js");G.watchtext=m.require("$8","LocoTextListener.js").listen;G.selector=m.require("$9","LocoSelector.js").create;G.autocomp=m.require("$10","LocoAutoComplete.js").init;G.tooltip=m.require("$11","tooltip.js");G.po=
{ed:m.require("$12","poedit.js"),kbd:m.require("$13","hotkeys.js"),init:m.require("$14","po.js").create,ace:m.require("$15","ace.js").strf("php")};G.fs=m.require("$16","fsconn.js");k("#loco.wrap table.wp-list-table").each(function(c,f){m.require("$17","tables.js").init(f)})})(window,document,window.jQuery);