(function(v,z,h,S){var l=function(){var c={};return{register:function(f,h){c[f]=h},require:function(f,h){var p=c[f];if(!p)throw Error('CommonJS error: failed to require("'+h+'")');return p}}}();l.register("$1",function(c,f,h){function p(b){var d=typeof b;if("string"===d)if(/[^ <>!=()%^&|?:n0-9]/.test(b))console.error("Invalid plural: "+b);else return new Function("n","return "+b);"function"!==d&&(b=function(a){return 1!=a});return b}c.init=function(b){function d(e,b,d){return(e=a[e])&&e[d]?e[d]:b||
""}b=p(b);var a={};return{_:function(a){return d(a,a,0)},_x:function(a,b){return d(b+"\u0004"+a,a,0)},_n:function(a,n,k){k=Number(b(k));isNaN(k)&&(k=0);return d(a,k?n:a,k)},load:function(e){a=e||{};return this},pluraleq:function(a){b=p(a);return this}}};return c}({},v,z));l.register("$2",function(c,f,h){Array.prototype.indexOf||(Array.prototype.indexOf=function(c){if(null==this)throw new TypeError;var b,d=Object(this),a=d.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 d&&d[b]===c)return b;return-1});return c}({},v,z));l.register("$3",function(c,f,h){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,d,a=[].slice.call(arguments,1);return c.replace(/%(s|u|%)/g,function(e,n){if("%"===
n)return"%";d=a[b++];return String(d)||""})};return c}({},v,z));l.register("$48",function(c,f,h){function p(){var b=a;e&&(b="("+e+") "+b);h.title=b}function b(e){e||(e=d);e!==a&&(a=e,p())}var d=h.title,a=d,e=0;c.set=function(a){b(a);return c};c.get=function(){return a};c.replace=function(e,d){b(a.replace(e,d));return c};c.badge=function(a){isNaN(a=Number(a))&&(a=0);a!==e&&(e=a,p());return c};return c}({},v,z));l.register("$42",function(c,f,h){function p(e){a||f._gat&&(a=_gat._createTracker(b,"loco"));
if(a){var n=e.shift();a[n].apply(a,e)}else d&&d.push(e);return c}var b,d,a;c._init=function(a){if(b=a.code){d=f._gaq||(f._gaq=[]);d.push(["_setAccount",b]);d.push(["_gat._anonymizeIp"]);d.push(["_setDomainName",a.host]);d.push(["_trackPageview"]);a=h.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"==h.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var n=h.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}return c};c.event=function(a,
b,d,g){return p(["_trackEvent",a||"",b||"",d||"",g||0])};c.page=function(a,b){var d={page:a||location.pathname+location.hash,title:b||l.require("$48","title.js").get()};return p(["_trackPageview",d])};return c}({},v,z));l.register("$43",function(c,f,h){function p(a,e){if(b)b[a](e);else f.ga&&ga(a,e);return c}var b,d;c._init=function(a){a.code&&(function(a,b,d,g,m,A,c){a.GoogleAnalyticsObject=m;a[m]=a[m]||function(){(a[m].q=a[m].q||[]).push(arguments)};a[m].l=1*new Date;A=b.createElement(d);c=b.getElementsByTagName(d)[0];
A.async=1;A.src=g;c.parentNode.insertBefore(A,c)}(f,h,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",a.code,{alwaysSendReferrer:!0,userId:a.uid}),ga("set","anonymizeIp",!0),a.custom&&p("set",a.custom),c.page(),ga(function(a){b=a}));return c};c.event=function(a,e,b,d){return p("send",{hitType:"event",eventCategory:a||"",eventAction:e||"",eventLabel:b||"",eventValue:Number(d||0)})};c.page=function(a,e){var b={hitType:"pageview",page:a||location.pathname+location.hash,title:e||
l.require("$48","title.js").get()};b.location=location.protocol+"//"+location.hostname+b.page;d&&p("set",{referrer:d});d=b.location;return p("send",b)};c.reset=function(){d=location.href;var a={page:location.pathname+location.hash,title:l.require("$48","title.js").get(),location:d};p("set",a);return c};return c}({},v,z));l.register("$31",function(c,f,D){function p(a,d){h(a).click(function(a){b&&b.event(d,"click",this.getAttribute("href")||"");return!0});a=null;return c}var b,d=location.hostname,a=
"/help"===location.pathname.substr(0,5);c.init=function(a){!b&&a&&(d=a.host||(a.host=d),b=a.legacy?l.require("$42","legacy.js"):l.require("$43","universal.js"),b._init(a));return c};c.link=function(e){for(var b=e.getAttribute("href");b&&"#"!==b;){if(0===b.indexOf("#"))return p(e,"anchor");if("/help"===b.substr(0,5)&&!a)e.setAttribute("target","_blank");else if(0===b.indexOf("http")||0===b.indexOf("//")){if(-1!==b.indexOf(d)&&/^(https?:)*\/\/([^\/]+)/.exec(b)&&d===RegExp.$2)break;e.setAttribute("target",
"_blank");p(e,"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}({},v,z));l.register("$36",function(c,f,l){function p(a){return 27===a.keyCode&&r&&w?(I(),a.preventDefault(),!1):!0}function b(){if(r){var a=f.innerWidth,e=f.innerHeight;a!==H&&(H=a,K(u));e!==y&&(y=e,s&&d())}return!0}function d(){var a=n.outerHeight(!0)-s.clientHeight;s.style.maxHeight=
String(y-a)+"px"}function a(a){a?(m.show(),k.addClass("has-title")):(m.hide(),k.removeClass("has-title"))}var e,n,k,g,m,A,B,s,r=!1,w=!1,q=!1,C,E,H,u,y,F=c.init=function(){if(!e){e=h('<div id="overlay"></div>');n=h('<div class="overlay-frame"></div>');k=h('<div class="overlay-container"></div>');m=h('<div class="overlay-title"><span class="icon"></span><span class="title">Untitled</span></div>');A=h("<nav></nav>");B=h('<a class="overlay-close" href="#"><span>x</span></a>');g=h('<div class="overlay-bg"></div>');
e.append(n.append(k)).append(g).prependTo(l.body);h(l).on("keydown",p);h(f).resize(b);H=f.innerWidth;y=f.innerHeight;E=k.outerWidth(!0)-k.width()+(n.innerWidth()-n.width());C=parseInt(k.css("width"));if(!C||isNaN(C))C=k.width();A.hide().prependTo(n);m.append(B.hide()).hide().prependTo(n);e.hide()}return e},K=c.width=function(a){var e=F();if(null===a)n.css("width",""),k.css("width","");else{a=a||C||640;x=a+E;u=a;var g=H;x>g?(x=g,a=x-E,e.addClass("spill")):e.removeClass("spill");n.css("width",x+"px");
k.css("width",a+"px")}return c};c.autoSize=function(){var a=F(),e=C||0;k.children().each(function(a,g){e=Math.max(e,h(g).outerWidth(!0))});K(e);if(s=a.find("div.overlay-scroll")[0])y=f.innerHeight,d();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 k.html(a)};c.append=function(a){F();a instanceof jQuery||(a=h(a));k.append(a);
return c};var I=c.close=function(a){if(r){var g=function(){F().hide();h(l.body).removeClass("has-overlay");r=!1;k.html("");r=null;e.trigger("overlayClosed",[c])};null==a&&(a=300);e.trigger("overlayClosing",[c]);a?e.fadeOut(a,g):g()}return c};c.title=function(e,g){F();var b="",d=m.find("span");g&&/^lang lang-(\w+)/.exec(g)&&(b=RegExp.$1);d.eq(0).attr("class",g||"no-icon").attr("lang",b);q=e||"";d.eq(1).text(q);null!=e?a(!0):w||a(!1);return c};c.enableClose=function(){F();w=!0;B.off("click").on("click",
function(){I();return!1});a(!0);B.show();return c};c.disableClose=function(){F();w=!1;B.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();k.html("");K(C);e.attr("class","");h(l.body).addClass("has-overlay");F().show();r||(r=!0,b());c.title(null);w&&a(!0);e.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}({},v,z));l.register("$11",function(c,f,l){function p(a,e){this.$element=h(a);this.options=e;this.enabled=!0;this.fixTitle()}c.init=function(a,e){var n={fade:!0,offset:5,delayIn:b,delayOut:d,anchor:a.attr("data-anchor"),gravity:a.attr("data-gravity")||"s"};e&&(n=h.extend({},n,e));a.tipsy(n)};c.delays=function(a,e){b=a||150;d=e||100};c.kill=function(){h("div.tipsy").remove()};c.text=function(a,e){e.data("tipsy").setTitle(a)};var b,d;c.delays();
h(l.body).on("overlayOpened overlayClosing",function(a){c.kill();return!0});p.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var e=this.tip();e.find(".tipsy-inner")[this.options.html?"html":"text"](a);e[0].className="tipsy";e.remove().css({top:0,left:0}).prependTo(l.body);var a=(a=this.options.anchor)?this.$element.find(a):this.$element,a=h.extend({},a.offset(),{width:a[0].offsetWidth,height:a[0].offsetHeight}),b=e[0].offsetWidth,d=e[0].offsetHeight,g="function"==typeof this.options.gravity?
this.options.gravity.call(this.$element[0]):this.options.gravity,m;switch(g.charAt(0)){case "n":m={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-b/2};break;case "s":m={top:a.top-d-this.options.offset,left:a.left+a.width/2-b/2};break;case "e":m={top:a.top+a.height/2-d/2,left:a.left-b-this.options.offset};break;case "w":m={top:a.top+a.height/2-d/2,left:a.left+a.width+this.options.offset}}2==g.length&&("w"==g.charAt(1)?m.left=a.left+a.width/2-15:m.left=a.left+a.width/2-b+15);e.css(m).addClass("tipsy-"+
g);e.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+g.charAt(0);this.options.className&&e.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);e.addClass("in")}},hide:function(){this.tip().remove()},fixTitle:function(){var a=this.$element,e=a.attr("title")||"";(e||"string"!==typeof a.attr("original-title"))&&a.attr("original-title",e).removeAttr("title")},getTitle:function(){var a,e=this.$element,b=this.options;this.fixTitle();
"string"==typeof b.title?a=e.attr("title"==b.title?"original-title":b.title):"function"==typeof b.title&&(a=b.title.call(e[0]));return(a=(""+a).replace(/(^\s*|\s*$)/,""))||b.fallback},setTitle:function(a){var e=this.$element;e.attr("default-title")||e.attr("default-title",this.getTitle());null==a&&(a=e.attr("default-title")||this.getTitle());e.attr("original-title",a);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?"html":"text"](a)},tip:function(){this.$tip||(this.$tip=h('<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}};h.fn.tipsy=function(a){function e(e){var g=h.data(e,"tipsy");g||(g=new p(e,h.fn.tipsy.elementOptions(e,a)),h.data(e,"tipsy",g));return g}function b(){var g=e(this),d=a.delayIn;g.hoverState="in";0==d?g.show():
(g.fixTitle(),setTimeout(function(){"in"==g.hoverState&&g.show()},d))}function d(){var g=e(this),b=a.delayOut;g.hoverState="out";0==b?g.hide():(g.tip().removeClass("in"),setTimeout(function(){"out"==g.hoverState&&g.hide()},b))}a=h.extend({},h.fn.tipsy.defaults,a);a.live||this.each(function(){e(this)});if("manual"!=a.trigger){var g=a.live?"live":"bind",m="hover"==a.trigger?"mouseleave":"blur";this[g]("hover"==a.trigger?"mouseenter":"focus",b)[g](m,d)}return this};h.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};h.fn.tipsy.elementOptions=function(a,e){return h.metadata?h.extend({},e,h(a).metadata()):e};h.fn.tipsy.autoNS=function(){return h(this).offset().top>h(l).scrollTop()+h(f).height()/2?"s":"n"};h.fn.tipsy.autoWE=function(){return h(this).offset().left>h(l).scrollLeft()+h(f).width()/2?"e":"w"};h.fn.tipsy.autoBounds=function(a,e){return function(){var b=e[0],d=1<e.length?
e[1]:!1,g=h(l).scrollTop()+a,m=h(l).scrollLeft()+a,A=h(this);A.offset().top<g&&(b="n");A.offset().left<m&&(d="w");h(f).width()+h(l).scrollLeft()-A.offset().left<a&&(d="e");h(f).height()+h(l).scrollTop()-A.offset().top<a&&(b="s");return b+(d?d:"")}};return c}({},v,z));l.register("$8",function(c,f,l){c.listen=function(c,b){function d(){s[k?"show":"hide"]()}function a(a){B&&c.setAttribute("size",2+a.length);k=a;d();return a}function e(){g=null;b(k)}function n(){var b=c.value;A&&b===A&&(b="");b!==k&&
(g&&clearTimeout(g),a(b),m?g=setTimeout(e,m):e())}var k,g;c=c instanceof jQuery?c[0]:c;var m=150,A=f.attachEvent&&c.getAttribute("placeholder"),B=1===Number(c.size),s=h('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){c.value="";n();return!1});a(c.value);h(c).on("input blur focus",function(){n();return!0}).after(s);d();return{delay:function(a){m=a},ping:function(b){b?(g&&clearTimeout(g),b=c.value,A&&b===A&&(b=""),a(b),e(),b=void 0):b=n();return b},val:function(b){if(null==
b)return k;g&&clearTimeout(g);c.value=a(b);d()},el:function(){return c},blur:function(a){return h(c).on("blur",a)}}};return c}({},v,z));l.register("$35",function(c,f,l){function p(a,b,n,c,g){function m(){s&&clearTimeout(s);r&&r.fadeOut(400,function(){h(this).remove();r=null});return!1}function A(){B();-1!==c&&(s=setTimeout(m,c||2E3));r.off("mouseleave").on("mouseenter",B)}function B(){s&&clearTimeout(s);s=null;r.off("mouseenter").on("mouseleave",A)}var s;d||(d=l.createElement("div"),d.id="growls",
l.body.appendChild(d));var r=h('<div class="growl growl-'+n+'"><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:m,css:"cancel"});var w,q=h('<form action="#" class="dialog"></form>');b=function(a,b){w=h('<input type="button" value="'+b.label+'" class="butt '+(b.css||"")+'" />');
w.click(function(a){"function"===typeof b.callback&&b.callback(a,{close:m})});q.append(w);return w};for(a=0;a<g.length;a++)b(a,g[a]);r.append(q)}h(d).prepend(r.hide().fadeIn(400));r.find("a").click(m);A()}var b,d;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,e,d,c,g){try{return p(a,e||"",d||"alert",c||4E3,g||[]),!0}catch(m){return a+="\n\n--\n"+(m.message||
m),b.call(f,a),!1}};c.success=function(a,b,d){return c.alert(a,b,"success",d||2E3)};c.dialog=function(a,b,d,k){return c.alert(a,b,k||"alert",-1,d)};return c}({},v,z));l.register("$22",function(c,f,D){function p(a){var e;(e=a.alert)&&alert(e);(e=a.success)&&l.require("$35","growl.js").success.apply(null,e.push?e:[e]);if(e=a.download)f.location.assign(e);else if(e=a.redirect)if(0===e.indexOf("/modal/"))a.modal={url:e};else return f.location.assign(e),!1;else if(a.reload)return f.location.reload(),!1;
(e=a.modal)&&l.require("$32","modal.js").replace(e);(e=a.async)&&b(e.job_id,e.title)}function b(a,b){var d=l.require("$36","overlay.js");d.open().disableClose().css("modal-processing").html('<div class="wrap"><h2>'+(b||"Please wait")+"</h2></div>");l.require("$37","async.js").init(a).delay(500).timeout(2E4).listen("error",function(a){d.css("modal-error").enableClose().title("Error");d.html("<h2>"+(a||"Unknown error")+"</h2>")}).listen("complete",function(a){d.close();d=null;a&&p(a)}).start()}var d=
{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 k,g;c=a.responseText;b=a.status;if(!c&&0===b)return null;try{k=h.parseJSON(c)||{}}catch(m){k={},g=d[a.status]||m.message||m}k.error=g||k.error||k.statusText||a.statusText||d[b]||"Unknown Error";
return k};c.ajax=function(a,b,n,k){function g(a){function b(a){var g=a&&a[0];if(!g||D.contains&&!D.contains(g))a=h(D.body);return a}var g=b(k);g.trigger("locoAjaxSuccess",[a]);var e=a.events;if(e&&e.length)for(var d,q=l.require("$31","ga.js");d=e.shift();)g=b(g),g.trigger(d,[a]),q.event("ajax",d);if(!1===p(a))return!1;n&&n();return!0}function m(m,k,s){if("abort"!==k){var r=m.status,w,q=a.statusCode;if(200===r||!q||!q[r])if(401===r)l.require("$32","modal.js").load("/modal/user/ping.json?r="+encodeURIComponent(location.pathname),
d[r]);else{if("parsererror"===k)f.console&&console.error&&console.error(r,m.responseText),w=404===r?"Ajax service not found":/^\s+Fatal error/.test(m.responseText)?"Fatal server error from Ajax request":"Bad Ajax response";else{var C=c.errorData(m,k,s);C&&C.error&&(w=C.error)}"function"===typeof b&&!1===b(null,w,r,m)?n&&n():C&&C.data&&!g(C.data)||(alert(w||"Unknown Ajax error"),n&&n())}}}(a.headers||(a.headers={}))["X-Loco-Csrf"]=f.loco&&G.csrf||"";a.error=m;a.success=function(a,c,s){if(!a||"object"!==
typeof a)return m(s,"unknown");(a.status||a.error)&&alert(a.error||a.statusText||s.statusText||d[a.status]||"Unknown Error");"function"===typeof b&&!1===b(a&&a.data?a.data:a,null,c,s)?n&&n():a&&a.data?g(a.data):n&&n()};-1!==a.url.indexOf(".json")&&(a.dataType="json");return h.ajax(a)};return c}({},v,z));l.register("$37",function(c,f,h){c.init=function(c){function b(a,b){for(var g=-1,e,d=q[a]||[];++g<d.length;)(e=d[g])&&e.apply&&e.apply(null,b||[])}function d(){var a=B+"ms",g=Math.round(B/1E3);1<g&&
(a=g+" seconds");a="Job timeout after "+a;n();e();b("error",[a])}function a(a,d){if(!a||d)a={state:"error",message:d};try{switch(a.state){case "error":throw Error(a.message||"Unknown error tracking job progress");case "queued":case "starting":case "progress":var q=a.progress||0,r=a.message,y=a.state;q!==m&&(n(),m=q);b("progress",[m,r,y]);g();break;case "done":var A=a.data,c=a.message;m=100;n();e();b("complete",[A,c]);break;default:throw Error("Unexpected job status: "+a.state);}}catch(w){q=w.message||
w,n(),e(),b("error",[q])}}function e(){r&&(clearTimeout(r),r=null)}function n(){s&&(clearTimeout(s),s=null)}function k(){var b={dataType:"json",url:A};l.require("$22","http.js").ajax(b,a)}function g(){e();r=setTimeout(k,w);s||(s=setTimeout(d,B))}var m=0,A="/ajax/async/poll/"+c+".json",B=1E4,s,r,w=100,q={error:[],complete:[],progress:[]};return{start:function(){n();g();return this},stop:function(){n();e();return this},delay:function(a){w=a;return this},timeout:function(a){B=a;return this},listen:function(a,
b){var g=q[a];if(g)g.push(b);else throw Error(a+" is not a valid async event");return this}}};return c}({},v,z));l.register("$32",function(c,f,D){function p(a){a.stopPropagation();a.preventDefault();return!1}function b(){m||(m=l.require("$36","overlay.js"),m.listen(n));return m}function d(){var a=s.length-1,b=s[a],g=h('<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&&C())return l.require("$11","tooltip.js").kill(),p(g)});
m.enableNav(g);l.require("$11","tooltip.js").init(g)}function a(a,b,g){a=a.split("#");var e=a[0],e=e+(-1===e.indexOf("?")?"?":"&"),e=e+(encodeURIComponent(b)+"="+encodeURIComponent(g));a[0]=e;return a.join("#")}function e(a,g){var e=b().autoSize(),q=e.init();l.require("$18","html.js").init(q);g&&g.lock&&e.disableClose();s.length&&d();q.find("[data-script]").each(function(a,b){b=h(b);for(var e=-1,d,q=b.attr("data-script").split(" ");++e<q.length;)d=q[e],B[d]?B[d](b,g||{}):alert("Unknown script "+d)});
q.trigger("locoModalLoaded",[e,a||"",g||{}]);var m=q.find("form")[0],r;if(m)a:for(e=0;e<m.elements.length;e++)switch(q=m.elements[e],q.type){case "text":case "email":case "textarea":r=Number(q.getAttribute("tabindex"));if(isNaN(r)||100>r)continue a;h(q).focus();break a}}function n(){r=null;s=[];return!0}function k(a){var b=h(a.currentTarget),e=b.attr("data-modal");if("back"===e){if(C())return p(a);e="close"}if("close"===e){q();var d=b.attr("href");if(d&&-1!==d.indexOf("#!"))return!0}else{var m="submit"===
a.type,r=b.attr("title")||b.attr("data-title"),d=b.attr("href")||b.attr("action"),A=m?b.serialize():"",b=m?b.attr("method"):"get";w(d,r,b,A,"modal "+(e||g(d)))}return p(a)}function g(a){return"http"===a.substr(0,4)?a.split("/").slice(3,6).join("-"):a.split("/").slice(1,4).join("-")}var m,A=l.require("$31","ga.js"),B={},s=[],r,w=c.load=function(g,d,q,y,n){var k=r;r=[].slice.call(arguments);k&&g!==k[0]&&(s.push(k),g=a(g,"r",k[0]));k=b();k.active()||k.open().css("modal").html('<div class="loading"></div>');
k.title("Loading ..").disableClose().disableNav();k.think();var k=g.split("#"),B=k[1];B&&(g=k[0]);var k=l.require("$22","http.js"),C={type:q||"get",data:y||"",url:k.jsonLink(g)};k.ajax(C,function(a,b,c){var k=a&&a.html;if(!k)return a&&a.redirect?(r=s.pop()||null,w(a.redirect,d,q,y,n)):(a=h('<h3 class="error"></h3>').text(b||"Unknown error"),b=h('<footer class="buttonset"><a href="/" data-modal="close" class="has-icon icon-ok">Close</a></footer>'),a=h('<div class="basic"></div>').append(a).append(b),
b="Error",c&&200!==c&&(b+=" "+c),m.unthink().enableClose().title(b).html("").append(a),l.require("$18","html.js").init(m.init())),!1;d=a.title||d||"Untitled";r&&(r[1]=d);m.unthink().enableClose().title(d,a.icon).width(null).css(n||"modal").autoSize().html(k);c=a.js||{};B&&(c["#"]=B);e(g,c);A.page(g,d);m.init().one("overlayClosed",function(){A.reset()});return!0});return c},q=c.close=function(){b().close();return c},C=c.back=function(){if(previous=s.pop())return r=s[s.length-2],w.apply(null,previous),
!0};c.reload=function(){r&&w.apply(null,r)};c.postback=function(a){r&&(r[2]="post",r[3]=a,w.apply(null,r))};c.initLink=function(a){a.click(k)};c.initForm=function(a){h(a).submit(k)};c.replace=function(a){var d=b(),q=a&&a.html,m=a&&a.url,r=a&&a.title,A=a&&a.action;if(m)q=s.length-1,q=0<=q?s[q][0]:void 0,m===q?C():w(m,r,"","",a&&a.css||"modal "+g(m));else if(q)d.open().html(q),r&&d.enableClose().title(r),e("",a&&a.js);else if("function"===typeof c[A])c[A]();return d};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");B[a]=b.run;return c}return B[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}({},v,z));l.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"});l.register("$7",function(c,f,h){c.init=function(){function c(a){return m[a]||a}function b(a,b,g,e){b=a.split(b);for(var d=b.length;0!==d--;)(a=b[d])&&null==e[a]&&(g.push(a),e[a]=!0);return g}function d(a){return b(String(a||"").toLowerCase().replace(k,c),g,[],{})}function a(a,
e){for(var d=[],m={},w,q=e.length,C=g;0!==q--;)(w=e[q])&&b(String(w||"").toLowerCase().replace(k,c),C,d,m);n[a]=d}function e(a,b){var g=[],e=-1,d=n,q=d.length,m,c,k,f,y,h,p=a.length,I=b?!0:!1;a:for(;++e<q;)if(k=d[e],null!=k&&(f=k.length)){y=0;b:for(;y<p;y++){h=a[y];for(m=0;m<f;m++)if(c=k[m],0===c.indexOf(h))continue b;continue a}g.push(I?b[e]:e)}return g}var n=[],k=/[^a-z0-9]/g,g=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,m=l.require("$21","flatten.json");
return{split:d,pull:function(a,b){return e(a,b)},find:function(a,b){return e(d(a),b)},add:function(a,b){n[a]=d(b)},push:function(b){a(n.length,b)},index:function(b,g){a(b,g)},size:function(){return n.length},clear:function(){n=[]},remove:function(a){n[a]=null}}};return c}({},v,z));l.register("$23",function(c,f,h){c.create=function(){var c=[],b=l.require("$7","fulltext.js").init();return{add:function(d,a){b.add(c.length,a);c.push(d);return this},find:function(d){return b.find(d,c)},clear:function(){c=
[];b.clear();return this}}};return c}({},v,z));l.register("$10",function(c,f,D){function p(b){-1===b.indexOf("?")&&(b="/auto/"+b+".json?q=");this.url=b;this.dead={}}function b(){this.dict=l.require("$23","dict.js").create()}c.init=function(d){function a(){if("hint"!==K){var a=y.val()&&!(J&&J.val())&&null==f&&!q;D[a?"addClass":"removeClass"]("error")}}function e(a){J&&J.val(a)}function c(){v.show();var a=y.outerWidth(!1),b=y.outerHeight(!1),g=y.css("margin-top");g&&(g=parseInt(g),isNaN(g)||(b+=g));
a-=2;v.css("top",b+"px").css("minWidth",a+"px");q=!0}function k(){v.hide();q=!1}function g(){v.html("");k();w=0;u=f=null}function m(b){g();var e;for(e=0;e<b.length;e++){var d=e,q=b[e],m=q.value,r=q.lang||m.lang,y=h('<span class="label"></span>').text(q.label),k=h('<div class="auto-comp-result"></div>'),s=void 0,E=void 0;if(E=q.icon)s=h("<span></span>").attr("class",E).appendTo(k),r?(s.attr("lang",r),q.lang=r):-1!==E.indexOf("lang-"+m)&&(s.attr("lang",m),q.lang=m);for(E in q)k.data(E,q[E]);k.append(y);
A(d,k)}(w=b.length)?(C&&c(),B(0)):(B(null),a(),D.trigger("locoAutonone",[]))}function A(a,b){v.append(b);b.click(function(g){g.stopPropagation();B(a,b);r();return!1});return b}function B(a,b){u&&(u.removeClass("selected"),u=null);f=null;null==a?e(""):(b||(b=v.find("div.auto-comp-result").eq(a)),b.length&&(b.addClass("selected"),f=a,u=b))}function s(a){if(w){var b=w-1;null==f?a=0<a?0:b:(a=f+a,0>a?a=b:a>b&&(a=0));return B(a)}}function r(){if(null==f)z.val(""),e("");else{var b=v.find("div.auto-comp-result").eq(f),
d=b.data()||{label:"Error"},q=d.value,m=d.label;e(q);z.val(m);k();b=b.clone();b.data(d);g();A(0,b);w=1;B(0,b);a();b.trigger("locoAutocomp",[q,m,b])}}var w=0,q=!1,C=!1,E=d.form,f=null,u=null,y=h(d),F=y.attr("name"),K=y.attr("data-mode"),I=y.attr("data-provider"),J="hint"!==K&&h('<input type="hidden" value="" name="'+F+'" />').appendTo(E),D=h('<div class="auto-comp-wrap"></div>').replaceAll(y),v=h('<div class="auto-comp-drop"></div>');I&&(I=new p(I));J&&y.attr("name","_"+F);y.attr("autocomplete")||
y.attr("autocomplete","off");D.append(y).append(v);k();y.focus(function(){C=!0;1<w&&c()}).blur(function(){C=!1;a()}).keydown(function(a){function b(){a.preventDefault();a.stopPropagation();return!1}switch(a.keyCode){case 27:q&&(a.stopPropagation(),k(),y.blur());break;case 40:w&&(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 z=l.require("$8","LocoTextListener.js").listen(y,function(a){I&&I.fetch(a,m)});(E=y.attr("data-pre"))&&(E=h.parseJSON(E))&&
E.value&&E.label?(m([E]),r()):!d.value||J&&J.val()||!I||I.fetch(d.value,function(a){m(a);r()});return{$:y,val:function(){return J&&J.val()},clear:g,reset:function(){g();y.val("");e("");z.ping()},force:function(a,b){g();e(b||"");z.val(a)},preload:function(a){w&&g();I=new b;var e,d;for(e in a)d=a[e],I.add(d)},mode:function(a){K=a},provide:function(a){I=new p(a)}}};p.prototype.fetch=function(b,a){if(!b)return a&&a([]),this.dead={},this;var e,c=this.dead;for(e in c)if(0===b.indexOf(e))return a&&a([]),
this;e={dataType:"json",url:this.url+encodeURIComponent(b)};l.require("$22","http.js").ajax(e,function(e){var g=e&&e.results;g&&(a&&e.query&&e.query===b&&a(e.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 e=b?this.dict.find(b):[];a&&a(e);return this};return c}({},v,z));l.register("$9",function(c,f,D){function p(a){a.stopPropagation();a.preventDefault();return!1}function b(a,
b,e){e.off().mouseup(function(e){e.stopPropagation();a.selectIndex(b,!0);return!1}).mouseover(function(){h(this).addClass("over");a.hover=b;return!0}).mouseout(function(){h(this).removeClass("over");a.hover=-1;return!0});return e}function d(b){n===b&&(h(f).off("resize scroll",a),n=null);return b}function a(){n&&n.resize()}function e(a){if(a){var b,e=a[0],d=e.id,c=e.title,r=e.disabled,n=[],q=[],k,E=-1,f=e.options.length,u=this.selectedIcon||"";this.id=d||"";this.name=e.name||"";this.prefix=e.getAttribute("data-prefix");
for(this.defaultIcon=e.getAttribute("data-icon")||"icon no-icon";++E<f;)b=e.options[E],k=h(b),b.selected&&n.push(E),q.push([k.val(),k.text(),k.attr("data-icon")||u,b.disabled,k.attr("lang")]);this.hidden||(this.hidden=h('<input type="hidden" name="'+this.name+'" value="" />').appendTo(e.form));this.list=h("<ul></ul>").mouseup(p);this.icon=h('<span class="icon"> </span>');this.selection=h('<span class="label"></span>');this.handle=h('<a class="handle" href="#"></a>').attr("tabindex",a.attr("tabindex")||
"").append(this.icon).append(this.selection);b=h('<div class="selector"></div>').addClass(e.className).append(this.handle).append(this.list).replaceAll(e);d&&b.attr("id",d);c&&a.hasClass("hastip")&&(b.attr("title",c),l.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=n.length)for(E=0;E<f;E++)this.selectIndex(n[E]);
else E=e.selectedIndex,null!=E&&0<=E&&this.selectIndex(E)}}c.create=function(a){return new e(a)};c.extend=function(a){a.parent=e;a.prototype=new e};var n,k=e.prototype;k.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)}),h(D).mouseup(function(b){return a.onRelease(b)}).keydown(function(b){return a.onGlobalKeydown(b)}),
a.bound=!0)};k.disable=function(){this.wrapper.addClass("disabled")};k.isDisabled=function(){return this.wrapper.hasClass("disabled")};k.onRollover=function(){return this.over=!0};k.onRollout=function(){this.over=!1;return!0};k.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)};k.onRelease=function(){this.active&&!this.over&&this.close();return!0};k.onGlobalKeydown=
function(a){if(this.active)switch(a.keyCode){case 27:return this.close(),p(a);case 40:return this.hoverNext(1),p(a);case 38:return this.hoverNext(-1),p(a);case 13:if(-1!=this.hover)return this.selectIndex(this.hover,!0),this.hoverItem(-1),this.close(),p(a)}return!0};k.onKeydown=function(a){return this.active||40!==a.keyCode?!0:(this.open(),p(a))};k.resize=function(){var a=this.list,b=this.handle,e=b.outerWidth()||0,d=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+l.require("$18","html.js").top(b[0]),c=f.innerHeight-Math.max(0,b-f.pageYOffset),c-=4,a.css("max-height",c+"px"));e>d&&(e-=d-a.width(),a.css("min-width",String(e)+"px"))};k.open=function(){var b=this.list,e=this.wrapper,c=e.data("tipsy");this.active=!0;this.hover=-1;e.addClass("active");b.show().scrollTop(0);c&&c.disable();this!==n&&(n&&d(n),h(f).on("resize scroll",a),n=this);this.resize()};k.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();d(this)};k.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"))};k.hoverNext=function(a){var b=this.hover,e=this.options.length,d,c=null;for(-1===b&&0>a&&(b=e);e;){b+=a;if(0>b){this.close();break}else b>=e&&(b=0);if((d=this.options[b])&&!d.disabled&&!d.hidden){this.hoverItem(b);
break}if(null==c)c=b;else if(c===b)break}};k.enableChange=function(a){this.eventName=a;this.eventData=[].slice.call(arguments,1);return this};k.enableConfirm=function(a){this.confirm=a;return this};k.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};k.destroy=function(){this.clearOptions();this.hidden.remove()};k.addOption=function(a,e,d,c,n){var r=this.options.length,k=h("<span></span>").addClass(d||
"icon no-icon"),q=h('<span class="label"></span>').text(e||a),q=h("<li></li>").append(k).append(q).appendTo(this.list);14<r&&this.getDict().add(r,e);n?n=n.split("-").shift():d&&-1!==d.indexOf("lang-"+a)&&(n=a);n&&k.attr("lang",n);q.attr("data-option",r);this.options[r]={value:a,text:e,lang:n||"",icon:d};this.index[a]=r;this.length=r+1;c?this.disableIndex(r):b(this,r,q);return r};k.getDict=function(){return this.dict||(this.dict=this.createDict())};k.createDict=function(){var a=this,b=l.require("$7",
"fulltext.js").init(),e=h('<input type="text" placeholder="&#x1F50D;"/>').appendTo(h('<form class="clearable"></form>').submit(p).insertBefore(a.getElement(0)));l.require("$8","LocoTextListener.js").listen(e,function(d){0===(""===d?a.unfilter():a.filter(b.find(d)))?e.addClass("error"):e.removeClass("error")});h.each(a.options,function(a,e){b.add(a,e.text)});return b};k.filter=function(a){var b=-1,e=this.length,d,c=-1,r=a.length;if(r===e)this.unfilter();else{for(;++c<r;){for(d=a[c];++b<d;)this.hideIndex(b);
this.showIndex(b)}for(;++b<e;)this.hideIndex(b)}return r};k.unfilter=function(){for(var a=-1,b=this.length;++a<b;)this.showIndex(a);return b};k.disableOption=function(a){return this.disableIndex(this.index[a])};k.enableOption=function(a){return this.enableIndex(this.index[a])};k.disableIndex=function(a){var b=this.options[a];b&&!b.disabled&&(b.disabled=!0,this.getElement(a).addClass("disabled").off());return this};k.enableIndex=function(a){var e=this.options[a];e&&e.disabled&&(e.disabled=null,b(this,
a,this.getElement(a)).removeClass("disabled"));return this};k.hideIndex=function(a){var b=this.options[a];b&&!b.hidden&&(b.hidden=!0,this.getElement(a).hide())};k.showIndex=function(a){var b=this.options[a];b&&b.hidden&&(b.hidden=null,this.getElement(a).show())};k.each=function(a){for(var b=-1,e=this.options,d=e.length;++b<d;)a(b,e[b]);return this};k.reIndex=function(){var a=-1,b={},e,d=this.dict,c=this.options,r=c.length;for(d&&d.clear();++a<r;)e=c[a],b[e.value]=a,d&&d.add(a,e.text);this.index=b;
this.length=r};k.selectValue=function(a,b){return this.selectIndex(this.index[a],b)};k.hasValue=function(a){return null!=this.index[a]};k.hasIndex=function(a){return this.length>a};k.getIndex=function(){return this.idx};k.selectIndex=function(a,b){var e=this.options[a];if(e){var d=this,c=d.idx,r=e.value,n=e.icon||d.defaultIcon,q=function(){null!=c&&d.getElement(c).removeClass("active");d.getElement(a).addClass("active");d.setLabel(e.text).setIcon(n,e.lang);d.hidden.val(r);d.idx=a;b&&d.change()};c===
a?d.hidden.val(r):b?"function"===typeof d.confirm?d.confirm.call(null,e,function(a){a&&q()}):d.beforeChange(r)&&q():q();d.active&&d.close()}return this};k.setLabel=function(a){this.selection.text(a);(a=this.prefix)&&this.selection.prepend(h('<span class="prefix"></span>').text(a));return this};k.setIcon=function(a,b){this.icon.attr("class",a).attr("lang",b||"");return this};k.val=function(){var a=this.options[this.idx];return a&&a.value};k.change=function(){var a=this.val(),b=this.save,e=this.eventName||
"change",d=[a].concat(this.eventData||[]);this.wrapper.trigger(e,d);b&&b(a);this.hidden.triggerHandler("change");return this};k.beforeChange=function(a){var b=h.Event("locoBeforeSelect");this.wrapper.trigger(b,[a]);return!b.isDefaultPrevented()};k.renameOption=function(a,b){var e=this.index[a],d=this.options[e];d&&(d.text=b,this.getElement(e).find("span.label").text(b),e===this.idx&&this.setLabel(b));return this};k.removeOption=function(a){var b=this.index[a],e=this.options[b];e&&(a=this.val(),this.getElement(b).remove(),
this.options.splice(b,1),this.reIndex(),a===e.value?this.selectIndex(0,!0):this.selectValue(a,!1))};k.getElement=function(a){return this.list.find("li").eq(a)};k.getWrapper=function(){return this.wrapper};k.tip=function(){return this.getWrapper().data("tipsy")};k.$=function(a,b){h.fn[a].apply(this.wrapper,b||[]);return this};k.persist=function(a){var b=this.id||this.name,e=a.fetch(b);null!=e&&this.selectValue(e,!0);this.save=function(e){a.store(b,e)};return this};k.listen=function(a){return this.on(this.eventName||
"change",a)};k.on=function(a,b){this.wrapper.on(a,b);return this};k=null;return c}({},v,z));l.register("$33",function(c,f,D){function p(b){var d=[],a=h([]);this.hidden=a;this.selected=d;this.selectedIcon="icon icon-checkbox";this.constructor.call(this,b);this.wrapper.addClass("multi");for(var e,c,k,g=h('<input type="checkbox" name="'+this.name+'[]" />')[0],m=this.options,A=m.length,f=-1;++f<A;)e=this.getElement(f)[0],k=g.cloneNode(!0),d[f]&&(k.checked=!0),k.setAttribute("value",m[f].value),a.push(e.appendChild(k));
(c=this.defaultIcon)&&this.setIcon(c);(c=b.attr("title"))?this.setLabel(c):this.wrapper.addClass("no-title")}c.create=function(b){return new p(b)};l.require("$9","LocoSelector.js").extend(p);f=p.prototype;f.selectIndex=function(b,d){return this.setIndexState(b,!this.selected[b],d)};f.setIndexState=function(b,d,a){var e=this.options[b],c=this.getElement(b),k=this.hidden[b],g=this.selected;e&&d!==g[b]&&(g[b]=d,c[d?"addClass":"removeClass"]("checked"),k&&(k.checked=d),a&&this.change());return this};
f.selectValue=function(b,d){if(null==b.pop)return p.parent.prototype.selectValue.call(this,b,d);for(var a=this.selected.slice(),e=this.options.length,c=this.index||{},k=!1,g=-1,m=-1;++g<e;)a[g]&&(k=!0),a[g]=!1;if(e=b.length)for(;++m<e;)g=c[b[m]],null==g?k=!0:!1===a[g]&&(k=a[g]=!0);if(k){for(g in a)this.setIndexState(g,a[g]);d&&this.change()}return this};f.val=function(){for(var b=[],d=this.options,a=this.selected,e=a.length,c=-1;++c<e;)a[c]&&b.push(d[c].value);return b};f=null;return c}({},v,z));
l.register("$44",function(c,f,h){function p(b,a){for(var e=String(b);a>e.length;)e="0"+e;return e}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 e=this;return a.replace(/%[YmdHisMjSghAa]/g,function(a){return e[a.charAt(1)](b)})},Y:function(b){return String(b.getFullYear())},m:function(b){return p(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 p(b.getDate(),2)},H:function(b){return p(b.getHours(),2)},i:function(b){return p(b.getMinutes(),2)},s:function(b){return p(b.getSeconds(),2)},j:function(b){return String(b.getDate())},S:function(d){return b(d.getDate())},g:function(b){b=b.getHours();return String(0===b?12:12<b?b-12:b)},h:function(b){return p(this.g(b),2)},a:function(b){return 12>b.getHours()?"am":"pm"},A:function(b){return 12>b.getHours()?"AM":"PM"}}};return c}({},v,z));l.register("$34",function(c,f,D){function p(a){var d=
a.id,c=n||(n=[]),r=k||(k={}),w=a.getAttribute("datetime"),w=m(w);if(!isNaN(w))return d||(d="tick"+ ++g,a.setAttribute("id",d)),a={id:d,el:a,dt:new Date(w),st:a.textContent},r[d]||c.push(a),r[d]=a,e||(e=setTimeout(b,200)),a}function b(){for(var a=n,c=a.length,g={},r=[];0<c--;)ticker=a[c],d(ticker)&&(r.push(ticker),g[ticker.id]=ticker);r.length?(n=r,k=g,e=setTimeout(b,3E4)):e=k=n=null}function d(b){var e=b.el;if(D.contains&&!D.contains(e))return!1;strDate=a(b.dt,new Date,!0);if(""===strDate)return!1;
strDate!==b.st&&(h(e).text(strDate),b.st=strDate);return!0}function a(a,b,e){var d=b.getTime(),c=a.getTime(),q=d-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(e)return"";e=Math.floor(d/864E5)-Math.floor(c/864E5);d=l.require("$44","date.js").formatter();q=d.format(a,
" %g:%i %A");return 1>=e&&(b.setHours(0),b.setMinutes(0),b.setSeconds(0),b=b.getTime()-864E5,c>=b)?"Yesterday at"+q:11>e?e+" days ago at"+q:d.format(a,"%M %j%S %Y,")+q}var e,n,k,g=0,m=Date.parse||function(){return Number.NaN};c.onEach=function(a,b){p(b)};c.update=function(a){d(p(a))};c.rel=a;return c}({},v,z));l.register("$18",function(c,f,D){var p=f.ieVersion;c.ie=function(b){return b?p<=b:p};var b=c.init=function(b){b?b instanceof jQuery||(b=h(b)):b=h(D.body);var a=l.require("$31","ga.js"),e=l.require("$19",
"forms.js"),n=l.require("$32","modal.js"),k=l.require("$10","LocoAutoComplete.js"),g=l.require("$9","LocoSelector.js"),m=l.require("$33","LocoMultiSelector.js"),f=l.require("$11","tooltip.js");b.find("form").each(function(a,b){var d=h(b);p&&10>p&&e.placeholders(d);b.getAttribute("data-modal")?n.initForm(b):b.hasAttribute("action")&&"#"!==d.attr("action").charAt(0)&&!b.target&&e.jsonify(b);d.find("input.auto-comp").each(function(a,b){k.init(b)});d.find("select.selector").each(function(a,b){b.hasAttribute("multiple")?
m.create(h(b)):g.create(h(b))});d.hasClass("hasreveal")&&e.revealify(d);d.find("button.hastip").each(function(a,b){f.init(h(b))})});b.find("a").each(function(b,e){-1!==e.className.indexOf("hastip")&&f.init(h(e));"/modal/"===String(e.getAttribute("href")).substr(0,7)||e.getAttribute("data-modal")?n.initLink(h(e)):a.link(e)});b.find("time.tick").each(l.require("$34","tick.js").onEach);e=n=k=b=null;return c};c.$=function(b){return h(f.innerShiv?innerShiv(b,!1):b)};h.fn._html=function(d){return null!=
d?(d=this.html(f.innerShiv?innerShiv(d,!1):d),b(this),d):j.html()};h.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 e=D.createElement(b||"div");a&&(e.className=a);return e};c.txt=function(b){return D.createTextNode(b||"")};c.h=function(){function b(){c=/[<>&]/g;k=/(\r\n|\n|\r)/g;g=/(?:https?):\/\/(\S+)/ig;b=null}function a(a){return"&#"+a.charCodeAt(0)+";"}function e(a,b){return'<a href="'+a+'" target="'+
(b.indexOf(location.hostname)?"_blank":"_top")+'">'+b+"</a>"}var c,k,g;return function(m,f){b&&b();var h=m.replace(c,a);f&&(h=h.replace(g,e).replace(k,"<br />"));return h}}();c.noop=function(b){b&&(b.preventDefault(),b.stopPropagation(),h(b.target).blur());return!1};c.top=function(b,a){a||(a=D.body);for(var e=b.offsetTop||0;(b=b.offsetParent)&&b!==a;)e+=b.offsetTop||0;return e};c.left=function(b,a){a||(a=D.body);for(var e=b.offsetLeft||0;(b=b.offsetParent)&&b!==a;)e+=b.offsetLeft||0;return e};return c}({},
v,z));l.register("$19",function(c,f,D){function p(a){function b(){a.value===g&&(a.value="",c.removeClass("placeheld"));return!0}function d(){""===a.value&&(a.value=g,c.addClass("placeheld"));return!0}var c=h(a);if(!c.hasClass("auto-comp")){var g=c.attr("placeholder");if(g)return c.focus(b).blur(d),d(),{kill:function(){b();c.off("focus",b).off("blur",d)}}}}var b=c.enable=function(a){function b(a,e){e.getAttribute("data-was-disabled")||(e.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},d=c.disable=function(a){function b(a,e){e.disabled?e.setAttribute("data-was-disabled","true"):e.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,e,c){a instanceof jQuery||(a=h(a));a.disable||(h.fn.disable=function(){d(this);return this},h.fn.enable=function(){b(this);this.placehold&&this.placehold();return this});var k="";a.find('[type="submit"]').click(function(a){a&&a.target&&a.target.name&&(k=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 d=a.serialize(),d=d.replace(/%0D%0A/g,
"%0A");k&&(d&&(d+="&"),d+=k,k="");a.disable();var f=l.require("$22","http.js"),d={url:f.jsonLink(a.attr("action")),type:a.attr("method"),data:d};f.ajax(d,e,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,d){function c(a){var b;b=p;q=q||a.target;if("."===r)b=Boolean(q&&q[w]),p&&(b=!b);else{var e,d,y=h(q.form).serializeArray();for(d in y)y[d].name===s&&(e=y[d].value);"!="===r&&(b=!b);
b=b?w!==e:w===e}if(b!==f)if(f=b,a)g[f?"slideDown":"slideUp"](200);else g[f?"show":"hide"]();return!0}var g=h(d),m=/^(\!?)([_\w\-\[\]]+)(\.|!?=)(.*)$/.exec(g.attr("data-reveal-if"));if(m){var f,p=m[1]?!0:!1,s=m[2],r=m[3],w=m[4],m=a[0][s];if(m.type||null==m.length)m=[m];b=m.length;for(var q;0!==b--;)q=m[b],c(),h(q).change(c).removeClass("jshide");m=m=q=null}});a=null};c.linkify=function(a){var b=a.getAttribute("data-icon");if(b){var d=h(a),c=h("<a> </a>");c.attr("href",a.form.action);c.attr("class",
d.attr("class"));c.attr("tabindex",d.attr("tabindex"));d.attr("tabindex","-1");c.text(d.val());b&&h("<span></span>").prependTo(c).addClass(b);d.hide().after(c);c.click(function(a){d.click();return!1})}};c.placeholders=function(a){var b,d=[];a.find("input[placeholder]").each(function(a,c){"password"!==c.type&&(b=p(c))&&d.push(b)});d.length&&(a.submit(function(){for(var a in d)d[a].kill()}),a.addClass("has-placeholders"),b=i=null)};return c}({},v,z));l.register("$4",function(c,f,D){function p(a,b,e){function d(){c();
g=setTimeout(b,e)}function c(){g&&clearTimeout(g);g=null}var g;d();h(a).mouseenter(c).mouseleave(d);return{die:function(){c();h(a).off("mouseenter mouseleave")}}}function b(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();h(f).triggerHandler("resize")})});return a}function d(a,e){function d(e){g[r]=null;b(h(a),250);c&&c.die();var q;if(q=e)e.stopPropagation(),e.preventDefault(),q=!1;return q}var c,r;h(a).addClass("is-dismissible");h('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(d);
h(f).triggerHandler("resize");m();r=g.length;g.push(d);e&&(c=p(a,d,e));return{stick:function(){c&&c.die();c=null;g[r]=null}}}function a(a,b,e){var d=l.require("$18","html.js");a=h('<div class="notice notice-'+a+'" loco-notice inline></div>').prependTo(h("#loco-notices"));var c=h(d.el("p"));e=h(d.el("span")).text(e);b=h(d.el("strong","has-icon")).text(b+": ");c.append(b).append(e).appendTo(a);return a}function e(b,e,c,g){b=a(c,e,b).hide().fadeIn(500);h(f).triggerHandler("resize");return d(b,g)}function n(a){return e(a,
B,"warning")}function k(){h("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var e=-1===b.className.indexOf("notice-success")?null:5E3;d(b,e)}})}var g=[],m=Date.now||function(){return(new Date).getTime()},A,B,s,r;c.error=function(a){return e(a,A,"error")};c.warn=n;c.info=function(a){return e(a,s,"info")};c.success=function(a){return e(a,r,"success",5E3)};c.warning=n;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,e=g,d=e.length;++a<d;)(b=e[a])&&b();g=[];return c};c.create=a;c.raise=function(a){(c[a.type]||c.error).call(c,a.message)};c.convert=d;c.init=function(a){A=a._("Error");B=a._("Warning");s=a._("Notice");r=a._("OK");setTimeout(k,1E3);return c};return c}({},v,z));l.register("$5",function(c,f,D){function p(a){var b=h("<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 d(a,b,e){a[b]=e}function a(a,b,e){a.push({name:b,value:e})}function e(a,b,e){a.append(b,e)}function n(a,e,d,c){function q(e,c,q){if("abort"!==c){var y=g||{_:function(a){return a}},k=e.status,f=e.responseText,w=p(f),h=e.getResponseHeader("Content-Type")||
"text/html",s=e.getResponseHeader("Content-Length")||f.length;"success"===c&&q?n.error(q):(n.error(b(w)+".\n"+y._("Check console output for debugging information")),n.debug("Ajax failure for "+a,{status:k,error:c,message:q,output:f}),"parsererror"===c&&(q="Response not JSON"),n.log([y._("Provide the following text when reporting a problem")+":","----","Status "+k+' "'+(q||y._("Unknown error"))+'" ('+h+" "+s+" bytes)",w,"===="].join("\n")));d&&d.call&&d(e,c,q);m=e}}c.url=A;c.dataType="json";c.error=
q;c.success=function(a,b,d){var c=a&&a.data,g=a&&a.notices,r=g&&g.length;for(!c||a.error?q(d,b,a&&a.error&&a.error.message):e&&e(c,b,d);r--;)n.raise(g[r])};var n=l.require("$4","notices.js").clear();return h.ajax(c)}var k={},g,m,A=f.ajaxurl||"/wp-admin/admin-ajax.php";c.init=function(a){k=a.nonces||k;return c};c.localise=function(a){g=a;return c};c.xhr=function(){return m};c.strip=p;c.parse=b;c.submit=function(a,b,e){function d(){c.removeClass("loading");l.require("$19","forms.js").enable(c)}var c=
h(a),g=c.serialize();c.addClass("loading");l.require("$19","forms.js").disable(c);return n(a.route.value,function(a,e,c){d();b&&b(a,e,c)},function(a,b,c){d();e&&e(a,b,c)},{type:a.method,data:g})};c.post=function(b,c,g,m){var q,C=!0;c=c||{};(q=k[b])||(f.console&&console.debug&&console.debug('No nonce for "'+b+'"'),q="");var E=q;f.FormData&&c instanceof FormData?(C=!1,q=e):q=Array.isArray(c)?a:d;q(c,"action","loco_json");q(c,"route",b);q(c,"loco-nonce",E);return n(b,g,m,{type:"post",data:c,processData:C,
contentType:C?"application/x-www-form-urlencoded; charset=UTF-8":!1})};c.setNonce=function(a,b){k[a]=b;return c};c.hasNonce=function(a){return!!k[a]};return c}({},v,z));l.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});l.register("$6",function(c,f,h){function p(){}var b,d=l.require("$20","rtl.json");
c.init=function(){return new p};c.cast=function(a){return a instanceof p?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,d=new p;for(b in a)d[b]=a[b];return d};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 e=new p;e.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)e.region=a.toUpperCase();if(a=RegExp.$3)e.variant=a.toLowerCase();return e};f=p.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,d=this.lang||"zxx";if(b=this.region)d+=a+b;if(b=this.variant)d+=a+b;return d};f.getIcon=function(){for(var a=3,b,d,c=["variant","region","lang"],g=[];0!==a--;)if(b=c[a],d=this[b])g.push(b),g.push(b+"-"+d.toLowerCase());return g.join(" ")};f.isRTL=function(){return!!d[String(this.lang).toLowerCase()]};f=null;return c}({},v,z));l.register("$38",function(c,f,h){function p(){}var b,d,a=l.require("$20","rtl.json");c.init=function(){return new p};
c.cast=function(a){return a instanceof p?a:"string"===typeof a?c.parse(a):c.clone(a)};c.clone=function(a){var b,d=new p;for(b in a)d[b]=a[b];return d};c.parse=function(a){b||(d=/[-_+]/,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(d).join("-");if(!b.exec(a))return null;var c=new p;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=p.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,d=this.lang||"zxx";if(b=this.script)d+=a+b;if(b=this.region)d+=a+b;if(b=this.variant)d+=a+b;if(b=this.extension)d+=a+b;return d};f.getIcon=function(){for(var a=4,b,d,c=["variant","region","script","lang"],m=[];0!==a--;)if(b=c[a],d=this[b])d.join&&(d=d.join("-")),
1===a&&3===d.length?m.push("region-m49"):m=m.concat([b,b+"-"+d.toLowerCase()]);return m.join(" ")};f.isRTL=function(){return!!a[String(this.script||this.lang).toLowerCase()]};f=null;return c}({},v,z));l.register("$39",function(c,f,h){function p(a){f.console&&console.error&&console.error(a)}function b(){p("Method not implemented")}function d(){}function a(a){}d.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,k,g=!0;for(c in this)k=this[c],k===b?(p(a+"."+c+
"() must be implemented"),g=!1):k instanceof d&&(p(a+"."+c+" must be defined"),g=!1);return g};c.init=function(e,c){var k,g=new a;if(e)for(k=e.length;0!==k--;)g[e[k]]=b;if(c)for(k=c.length;0!==k--;)g[c[k]]=new d;return g};c.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b||"Object")};return c}({},v,z));l.register("$49",function(c,f,h){var p=f.requestAnimationFrame,b=f.cancelAnimationFrame,d=0;if(!p||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(p=
f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||f[a+"CancelRequestAnimationFrame"])break;p&&b||(p=function(a){var b=e();timeToCall=Math.max(0,16-(b-d));nextTime=b+timeToCall;timerId=f.setTimeout(function(){a(nextTime)},timeToCall);d=nextTime;return timerId},b=function(a){clearTimeout(a)});var e=Date.now||function(){return(new Date).getTime()};c.loop=function(a,e){function d(){f=p(d,e);a(c++)}var c=0,f;d();return{stop:function(){f&&b(f);f=null}}};return c}({},v,z));l.register("$45",
function(c,f,h){function p(b,e,d,c){if(a){var g=d;d=function(a){if((a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType)return g(a)}}b.addEventListener(e,d,c);return{unbind:function(){b.removeEventListener(e,d,c)}}}function b(a){a.preventDefault();a.stopPropagation();return!1}var d,a=!!f.navigator.msPointerEnabled,e=a?"MSPointerDown":"touchstart",n=a?"MSPointerMove":"touchmove",k=a?"MSPointerUp":"touchend";c.ok=function(a){null==d&&(d="function"===typeof h.body.addEventListener);d&&a&&a(c);return d};
c.ms=function(){return a};c.dragger=function(a,d){function c(b){a.addEventListener(b,m[b],!1)}function r(b){a.removeEventListener(b,m[b],!1)}var m={};m[e]=function(a){g(a,function(b,c){c.type=e;d(a,c,q)});c(n);c(k);return!0};m[k]=function(a){r(n);r(k);g(a,function(b,e){e.type=k;d(a,e,q)});return!0};m[n]=function(a){g(a,function(b,e){e.type=n;d(a,e,q)});return b(a)};c(e);var q={kill:function(){r(e);r(n);r(k);a=q=d=null}};return q};c.swiper=function(d,c,f){function r(a){d.addEventListener(a,u[a],!1)}
function w(a){d.removeEventListener(a,u[a],!1)}function q(){h&&h.stop();h=null}var h,E,p,u={},y=[],F=[],K=[];u[e]=function(a){E=!1;q();var b=m();g(a,function(a,e){y[a]=b;F[a]=e.clientX;K[a]=e.clientY});p=d.scrollLeft;return!0};u[k]=function(a){g(a,function(a,b){var e=m()-y[a],d=F[a]-b.clientX,e=Math.abs(d)/e;c(e,d?0>d?-1:1:0)});p=null;return!0};u[n]=function(a){var e,c;null==p||g(a,function(a,b){e=F[a]-b.clientX;c=K[a]-b.clientY});if(c&&Math.abs(c)>Math.abs(e))return E=!0;e&&(E=!0,d.scrollLeft=Math.max(0,
p+e));return b(a)};if(!a||f)r(e),r(n),r(k),a&&(d.className+=" mstouch");return{kill:function(){w(e);w(n);w(k);q()},swiped:function(){return E},ms:function(){return a},snap:function(b){a&&!f&&(d.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+b+"px)",d.style["-ms-scroll-snap-type"]="mandatory",d.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,e){q();var c=d.scrollLeft,g=a>c?1:-1,r=Math[1===g?"min":"max"],y=Math.round(16*b*g);return h=l.require("$49","fps.js").loop(function(b){b&&(c=
Math.max(0,r(a,c+y)),d.scrollLeft=c,a===c&&(q(),e&&e(c)))},d)}}};c.start=function(a,b){return p(a,e,b,!1)};c.move=function(a,b){return p(a,n,b,!1)};c.end=function(a,b){return p(a,k,b,!1)};var g=c.each=function(b,e){if(a)(b.MSPOINTER_TYPE_TOUCH||"touch")===b.pointerType&&e(0,b);else for(var d=-1,c=(b.originalEvent||b).changedTouches||[];++d<c.length;)e(d,c[d])},m=Date.now||function(){return(new Date).getTime()};return c}({},v,z));l.register("$50",function(c,f,l){c.init=function(c){function b(){f.style.top=
String(-c.scrollTop)+"px";return!0}function d(){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 e=c.parentNode,f=e.insertBefore(l.createElement("div"),c);h(c).on("input",d).on("scroll",b);h(e).addClass("has-mirror");f.className="ta-mirror";var k=c.offsetWidth-c.clientWidth;2<k&&(f.style.marginRight=
String(k-2)+"px");d();b();return{kill:function(){h(c).off("input",d).off("scroll",b);e.removeChild(f);f=null;h(e).removeClass("has-mirror")}}};return c}({},v,z));l.register("$30",function(c,f,h){function p(a,e){for(var d=0,c=-1,g=e&&f[e],m=b[a]||[],h=m.length;++c<h;)callback=m[c],"function"===typeof callback&&(callback(g),d++);return d}var b={},d;c.load=function(a,e,d){function c(){A&&(clearTimeout(A),A=null);l&&(l.onreadystatechange=null,l=l=l.onload=null);a&&(delete b[a],a=null)}function g(b,e){var g=
l&&l.readyState;if(e||!g||"loaded"===g||"complete"===g)e||p(a,d),c()}function m(){if(0===p(a))throw Error('Failed to load "'+(d||a)+'"');c()}if(d&&f[d])"function"===typeof e&&e(f[d]);else if(null!=b[a])b[a].push(e);else{b[a]=[e];var A=setTimeout(m,4E3),l=h.createElement("script");l.setAttribute("src",a);l.setAttribute("async","true");l.onreadystatechange=g;l.onload=g;l.onerror=m;l.onabort=c;h.getElementsByTagName("head")[0].appendChild(l)}};c.stat=function(a){var b;if(!(b=d)){for(var c,f,g=h.getElementsByTagName("script"),
m=-1,p=g.length;++m<p;)if(b=g[m].getAttribute("src"))if(c=b.indexOf("/lib/vendor"),-1!==c){f=b.substr(0,c);break}b=d=f||"/static"}return b+a};return c}({},v,z));l.register("$15",function(c,f,D){function p(a,b){a.setReadOnly(!1);a.on("change",function(a,e){return b.val(e.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 d(a){b(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}
function a(a,b){function d(){this.HighlightRules=c}var c=e(b),g=a.require,f=g("ace/lib/oop");f.inherits(c,g("ace/mode/text_highlight_rules").TextHighlightRules);f.inherits(d,g("ace/mode/text").Mode);return new d}function e(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]+[^>]*>/}]},e=n(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"}]}:e&&b.start.push({token:"printf",regex:e});this.$rules=b}}function n(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 "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$)?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case g:return k||"%%"}}var k,g="auto";c.init=function(e,c,k){var n,r=!1,w=k||g,q=e.parentNode,C=q.appendChild(D.createElement("div"));h(q).addClass("has-proxy has-ace");l.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",function(b){if(C){if(!b)throw Error("Failed to load code editor");n=b.edit(C);
var q=n.session,g=n.renderer;n.$blockScrolling=Infinity;n.setShowInvisibles(r);n.setWrapBehavioursEnabled(!1);n.setBehavioursEnabled(!1);n.setHighlightActiveLine(!1);q.setUseSoftTabs(!1);g.setShowGutter(!0);g.setPadding(10);g.setScrollMargin(8);q.setMode(a(b,w));n.setValue(e.value,-1);q.setUseWrapMode(!0);c?p(n,c):d(n)}},"ace");return{kill:function(){n&&(b(n),n.destroy(),n=null);C&&(q.removeChild(C),h(q).removeClass("has-proxy has-ace"),C=null);return this},disable:function(){n&&d(n);c=null;return this},
enable:function(a){c=a;n&&p(n,a);return this},resize:function(){n&&n.resize();return this},val:function(a){n&&a!==n.getValue()&&n.setValue(a,-1);return this},invs:function(a){a=a||!1;r!==a&&(r=a,n&&n.setShowInvisibles(a));return this},strf:function(b){b=b||g;b!==w&&(w=b,n&&n.session.setMode(a(f.ace,b)));return this},focus:function(){return this}}};c.strf=function(a,b){g=a;k=b;return c};return c}({},v,z));l.register("$51",function(c,f,D){function p(a,b){function d(){return b.val(a.getContent())}a.on("input",
d);a.on("change",d);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 d(a){b(a);a.setMode("readonly")}var a=0;c.load=function(a){var b=l.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return c};c.init=function(e,f){function k(a){B=a;s="<p>"===a.substr(0,3)&&"</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function g(a){m=
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===B||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(k(a),b)};f?(p(a,f),f.reset()):d(a);h(q).removeClass("loading")}var m,l=!1,B="",s=!1,r=e.parentNode,w=r.parentNode,q=r.appendChild(D.createElement("div")),C=w.insertBefore(D.createElement("nav"),
r);C.id="_tb"+String(++a);h(r).addClass("has-proxy has-mce");h(q).addClass("mce-content-body loading").html(k(e.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:"#"+C.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=k(a);null==m?(e.value=a,h(q).html(a)):m.getContent()!==a&&m.setContent(a);f&&f.val(a);return this},kill:function(){m&&(f&&f.val(m.getContent()),b(m),m.destroy(),m=null);q&&(r.removeChild(q),h(r).removeClass("has-proxy has-mce"),q=null);C&&(w.removeChild(C),C=null);return this},enable:function(a){f=a;m&&p(m,a);return this},disable:function(){m&&d(m);f=null;return this},focus:function(){m&&f&&m.focus();return this},invs:function(a){a=a||!1;l!==a&&(l=a,h(r)[a?"addClass":"removeClass"]("show-invs"));
return this}}};return c}({},v,z));l.register("$46",function(c,f,D){function p(a){function b(){p&&(l.off("input",c),p=!1)}function c(){var b=a.value;b!==r&&(l.trigger("changing",[b,r]),r=b)}function f(){c();p&&w!==r&&l.trigger("changed",[r])}function g(){d=a;w=r;p||(l.on("input",c),p=!0);l.trigger("editFocus");s.addClass("has-focus");return!0}function m(){d===a&&(d=null);l.trigger("editBlur");s.removeClass("has-focus");p&&(f(),b());return!0}var p=!1,l=h(a),s=h(a.parentNode),r=a.value,w;l.blur(m).focus(g);
return{val:function(b){r!==b&&(a.value=b,l.triggerHandler("input"),r=b);return!0},kill:function(){b();l.off("blur",m).off("focus",g)},fire:function(){r=null;c()},ping:f,blur:m,focus:g,reset:function(){w=r=a.value}}}function b(a){this.e=a}var d;c._new=function(a){return new b(a)};c.init=function(a){var e=new b(a);a.disabled?(a.removeAttribute("disabled"),e.disable()):a.readOnly?e.disable():e.enable();return e};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 d=this.l;d&&!b&&(this.disable(),d=null);this.val(a||"");b&&!d&&this.enable();return this};TextAreaPrototype.val=function(a){var b=this.e;if(null==a)return b.value;var d=this.l,c=this.p;c&&c.val(a);d&&d.val(a);d||b.value===a||(b.value=a,h(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():h(this.e).focus()};TextAreaPrototype.focused=function(){return d&&d===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(a,b){var d=this.e;if(1===arguments.length)return d.getAttribute(a);null==b?d.removeAttribute(a):d.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=p(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 d=this.i||!1;if(b||d!==a)this._i&&(this._i.kill(),delete this._i),(d=this.p)?d.invs&&d.invs(a):
a&&(this._i=l.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?l.require("$15","ace.js").init(this.e,this.l,this["%"]):"html"===a?l.require("$51","mce.js").init(this.e,this.l):null,this.setInvs(c,!0),d&&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}({},v,z));l.register("$47",function(c,f,l){function p(a){var b=f.console;b&&b.error&&b.error(a)}function b(a){var b=l.createElement("div");a&&b.setAttribute("class",a);return b}function d(a){return function(){a.resize();
return this}}function a(a){return function(b){for(var d=b.target,c=d.$index;null==c&&"DIV"!==d.nodeName&&(d=d.parentElement);)c=d.$index;null!=c&&(b.stopImmediatePropagation(),a.select(c));return!0}}function e(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function n(a){return function(b){var d;d=b.keyCode;if(40===d)d=1;else if(38===d)d=-1;else return!0;if(b.shiftKey||b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(d);b.stopPropagation();b.preventDefault();return!1}}function k(a,
b,d){function c(a){p("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(e){var g=b||0,f=d?-1:1,y=a.rows||[];e.sort(function(a,b){return f*(y[a]||c(a)).cellVal(g).localeCompare((y[b]||c(b)).cellVal(g))})}}function g(a){this.w=a}function m(a){this.t=a;this.length=0}function A(a,b,d){var c=l.createElement("div");c.className=d||"";this._=c;this.d=b||[];this.i=a||0;this.length=b.length}function B(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"),m=f[0],f=f[1],k=[],p=[],y=[],F=[];if(c)this.ds=c,this.idxs=p,this._idxs=null;else if(!(c=this.ds))throw Error("No datasource");m.css.push("wg-thead");f.css.push("wg-tbody");c.eachCol(function(a,b,d){y[a]=q+"-col-"+b;F[a]=d||b});for(var l=b(),s=-1,B=y.length,D=b("wg-cols"),v=m.splitx.apply(m,y);++s<B;)v[s].header(F[s]),D.appendChild(l.cloneNode(!1)).setAttribute("for",y[s]);c.eachRow(function(a,b,d){k[a]=new A(a,b,d);p[a]=a});
this.rows=k;this.cols=D;this.ww=null;this.root=l=f.body;this.head=m;m.redraw=d(this);m=f.fixed=v[0].bodyY()||20;g.lock().resize(m,f);g.css.push("is-table");g.restyle();this.sc?this._re_sort(B):c.sort&&c.sort(p);this.redrawDirty();this.render();h(l).attr("tabindex","-1").on("keydown",n(this)).on("mousedown",a(this)).on("scroll",e(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,d=[],c=this.rows||[],e=-1,g,f=this.idxs,y=f.length,m=this.idxr={},k=this.r,h=this._r,n=this.root,p=this.cols;++e<y;){0===e%100&&(a=p.cloneNode(!0),b=new B(a),b.h=2200,b.insert(n),d.push(b));g=f[e];m[g]=e;a=c[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=d;this.mx=this.mn=null;this.redrawDirty();this.redraw();null==k?null!=h&&(a=c[h])&&a.page&&(delete this._r,this.select(h,!0)):(a=c[k])&&
a.page?this.select(k,!0):(this.deselect(),this._r=k);return this};s.resize=function(){var a=-1,b=this.ww||(this.ww=[]),d=this.w,c=d.cells[0],e=c.body.childNodes,g=e.length,f=this.pages||[],y=f.length;for(d.redraw.call(c);++a<g;)b[a]=e[a].style.width;if(y){d=this.mx;for(a=this.mn;a<=d;a++)f[a].widths(b);this.redrawDirty()&&this.redraw()}};s.redrawDirty=function(){var a=!1,b=this.root,d=b.scrollTop,b=b.clientHeight;this.sy!==d&&(a=!0,this.sy=d);this.vh!==b&&(a=!0,this.vh=b);return a};s.redraw=function(){for(var a=
0,b=-1,d=null,c=null,e=this.ww,g=this.sy,f=this.vh,y=this.mn,m=this.mx,k=Math.max(0,g-100),g=f+g+100,h=this.pages||[],n=h.length;++b<n&&!(a>g);)f=h[b],a+=f.height(),a<k||(null===d&&(d=b),c=b,f.rendered||f.render(e));if(y!==d){if(null!==y&&d>y)for(b=y;b<d;b++){f=h[b];if(!f)throw Error("Shit!");f.rendered&&f.sleep()}this.mn=d}if(m!==c){if(null!==m&&c<m)for(b=m;b>c;b--)f=h[b],f.rendered&&f.sleep();this.mx=c}};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,d){null==d&&(d=this.r||0);var c=this.idxs,e=c.length,g=(this.idxr||{})[d];for(d=g;d!==(g+=a)&&!(0<=g&&e>g);)if(b&&e)g=1===a?-1:e,b=!1;else return null;d=c[g];return null==d||null==this.rows[d]?(p("Bad next: ["+g+"] does not map to data row"),null):d};s.selectNext=function(a,b,d){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,d);return this};
s.deselect=function(a){var b=this.r;null!=b&&(this.r=null,h(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 d=this.rows[a],c=d&&d.page;if(!c)return this.deselect(!1),p("Row is filtered out"),this;this.deselect(!0);var e,g=this.w.cells[1];c.rendered||(e=c.top(),g.scrollY(e),this.redrawDirty()&&this.redraw());if(!d.rendered)return c.rendered||p("Failed to render page"),p("Row ["+
d.i+"] not rendered"),this;c=d.cells();h(c).addClass("selected");this.r=a;b||(e=g.scrollY(),h(this.root).focus(),e!==g.scrollY()&&g.scrollY(e));g.scrollTo(c[0],!0);this.w.fire("wgRowSelect",[a,d.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,d=-1,c=this.rows||[],e=this.idxs||
[],g=e.length;++d<g;)b=e[d],a(c[b],d,b);return this};s.sortable=function(a){var b=this.sc||(this.sc=new m(this));b.has(a)||b.add(a);return this};s._re_sort=function(a){var b=-1,d=this.sc,c=d.active;for(this.sc=d=new m(this);++b<a;)d.add(b);c&&(b=this.head.indexOf(c.id),-1===b&&(b=Math.min(c.idx,a-1)),this.sort(b,c.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,k(this,a,b));this.sc.activate(a,b);return this};s=null;s=
m.prototype;s.has=function(a){return null!=this[a]};s.add=function(a){var b=this,d=b.t.head.cells[a];b[a]={desc:null,idx:a,id:d.id};b.length++;d.addClass("wg-sortable").on("click",function(d){if("header"===d.target.nodeName.toLowerCase())return d.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 d,c;d=this.active;var e=this[a],g=this.t.head.cells;d&&(c=g[d.idx])&&(c.removeClass(d.css),
d!==e&&c.restyle());(c=g[a])?(e.desc=b,this.active=e,d="wg-"+(b?"desc":"asc"),c.addClass(d).restyle(),e.css=d):this.active=null;return this};s=null;s=A.prototype;s.render=function(a){var b,d=[],c=this._,e=this.length;if(c){for(this.c=d;0!==e--;)b=c.cloneNode(!1),d[e]=this.update(e,b),b.$index=this.i,a[e].appendChild(b);this._=null}else for(d=this.c;0!==e--;)a[e].appendChild(d[e]);this.rendered=!0;return this};s.update=function(a,b){var d=b||this.c[a]||{},c=(this.d[a]||function(){})()||"\u00a0";null==
c.innerHTML?d.textContent=c:d.innerHTML=c.innerHTML;return d};s.cells=function(){return this.c||[]};s.data=function(){for(var a=-1,b=[],d=this.length;++a<d;)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=B.prototype;s.size=function(){return this.rows.length};s.insert=function(a){var d=this.h,c=b("wg-dead");c.style.height=String(d)+"px";a.appendChild(c);return this.dead=c};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||p("row has zero height");return a};s.render=function(a){for(var b,d=-1,c=this.rows,e=c.length,g=this.dead,f=this.live,y=f.childNodes;++d<e;)b=c[d],b.rendered||b.render(y);e=a.length;for(d=0;d<e;d++)y[d].style.width=a[d];g.parentNode.replaceChild(f,g);this.rendered=!0;this.h=null;return this};s.sleep=function(){var a=
this.height(),b=this.live,d=this.dead;d.style.height=String(a)+"px";b.parentNode.replaceChild(d,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,d=a.length;0!==d--;)b[d].style.width=a[d];return this};s.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,d=b.length;for(a.parentNode.removeChild(a);0!==d--;)b[d].destroy()};
s=null;return c}({},v,z));l.register("$40",function(c,f,D){function p(a,b){var d=a.id,c=d&&s[d],e=c&&c.parent();if(!c||!e)return null;var g=e.dir===B,d=g?"X":"Y",f="page"+d,g=g?A:m,k=g(e.el),d=b["offset"+d],h=e.el,n=h.className;null==d&&(d=b[f]-g(a));d&&(k+=d);h.className=n+" is-resizing";return{done:function(){h.className=n},move:function(a){e.resize(a[f]-k,c);return!0}}}function b(b,d){function c(){h(D).off("mousemove",e);w&&(w.done(),w=null);return!0}function e(a){w?w.move(a):c();return!0}if(w)return!0;
w=p(b.target,b);if(!w)return!0;h(D).one("mouseup",c).on("mousemove",e);return a(b)}function d(a,b){var d=b.type;"touchmove"===d?w&&w.move(b):"touchstart"===d?w=p(a.target,b):"touchend"===d&&w&&(w.done(),w=null)}function a(a){a.stopPropagation();a.preventDefault();return!1}function e(a){var b=r;b&&b.redraw();a&&a.redraw();return r=a}function n(a,b){var d=h(b).on("editFocus",function(){d.trigger("wgFocus",[e(a)])}).on("editBlur",function(){d.trigger("wgBlur",[e(null)])})}function k(a){var b=a.id,d=
a.className;this.id=b;this.el=a;this.pos=this.index=0;this.css=[d||"wg-root","wg-cell"];this._cn=d;s[b]=this;this.clear()}var g=l.require("$18","html.js"),m=g.top,A=g.left,B=1,s={},r,w=!1;c.init=function(a){var c=new k(a);c.redraw();l.require("$45","touch.js").ok(function(b){b.dragger(a,d)});h(a).mousedown(b);return c};f=k.prototype;f.fire=function(a,b){var d=h.Event(a);d.cell=this;h(this.el).trigger(d,b);return this};f.each=function(a){for(var b=-1,d=this.cells,c=d.length;++b<c;)a(d[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 h(this.el).find(a)};f.$=function(a,b){h.fn[a].apply(h(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(B,
arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,b){(this.length||this.field)&&this.clear();for(var d=-1,c,e=b.length,f=1/e,m=0;++d<e;){c=g.el();this.body.appendChild(c);for(var h=c,n=b[d],p=n,l=1;s[n];)n=p+"-"+ ++l;h.id=n;c=new k(c);c.index=d;c.pid=this.id;c._locale(this.lang,this.rtl);c.pos=m;m+=f;this.cells.push(c);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||"";h(a).off();return this};f.exists=function(){return this===s[this.id]};f.clear=function(){for(var a=this.el,b=this.cells,d=this.field,c=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);c&&(d&&(g.ie()&&h(c).triggerHandler("blur"),d.destroy(),this.field=null),this.table&&(this.table=null),a.removeChild(c));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 d=b.index,c=this.cells,e=h(this.el)[this.dir===B?"width":"height"](),g=c[d+1],d=c[d-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(g?g.pos*e:e)-pad;min=d?d.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,d=0,c,e=this.cells,g=a.length;++b<g&&(c=e[++d]);)c.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};f.distribution=function(){for(var a=[],b=0,d=this.cells,c=d.length-
1;b<c;)a[b]=d[++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,d=this.body,
c=this.field;if(d){var e,g=b.clientWidth||0,f=b.clientHeight||0,m=d.offsetTop||0,f=m>f?0:f-m;this._h!==f&&(this._h=f,d.style.height=String(f)+"px",e=c);this._w!==g&&(this._w=g,e=c);e&&e.redraw()}d=this.length;g=1;f=this.nav;for(m=2===this.dir?"height":"width";0!==d--;)c=this.cells[d],f?e=1:(c.fixed&&(c.pos=c.fixed/h(b)[m]()),e=g-c.pos,g=c.pos),c.el.style[m]=String(100*e)+"%",c.redraw(a);return this};f.contents=function(a,b){var d=this.el,c=this.body;if(null==a)return c.innerHTML;this.length?this.clear():
c&&(d.removeChild(c),c=null);c||(this.body=c=d.appendChild(g.el("",b||"wg-content")),this._h=null,(d=this.lang)&&this._locale(d,this.rtl,!0));"string"===typeof a?h(c)._html(a):a&&this.append(a);this.redraw();return this};f.textarea=function(a,b){var d=this.field;if(d){var c=d.editable();d.reload(a,b);c!==b&&this.restyle()}else this.length&&this.clear(),c=g.el("textarea"),c.setAttribute("wrap","virtual"),c.value=a,this.contents(c),d=l.require("$46","field.js")._new(c)[b?"enable":"disable"](),n(this,
c),this.field=d,this.restyle();this.lang||this.locale("en");return d};f.locale=function(a){a=l.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};f._locale=function(a,b,d){var c=this.body;if(d||a!==this.lang)this.lang=a,c&&c.setAttribute("lang",a);if(d||b!==this.rtl)this.rtl=b,c&&c.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,d=b.length,c=this.navigated();if(null!=c)return b[c].editable();
for(;++c<d;){for(c=0;c<d;d++);if(a=b[c].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(h(a).appendTo(this.body)));return this};f.prepend=function(a){var b=this.body;if(a.nodeType){var d=b.firstChild;g.init(d?b.insertBefore(a,d):b.appendChild(a))}else g.init(h(a).prependTo(b));return this};f.before=function(a){var b=this.body;a.nodeType?g.init(this.el.insertBefore(a,
b)):g.init(h(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 m(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=l.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 d,c=this.body;d=c.scrollTop;var e=m(a,c);if(d>e)d=e;else{var g=c.clientHeight,e=e+h(a).outerHeight();if(g+d<e)d=e-g;else return}b?c.scrollTop=d:h(c).stop(!0).animate({scrollTop:d},250)};f.navigize=function(b,d){function c(a){var b=f[a],d=k[a],e=h(b.el).show();
d.addClass("active");m=a;n.data("idx",a);b.fire("wgTabSelect",[a]);return e}var e=this,f=e.cells,y=e.nav,m,k=[];y&&e.el.removeChild(y);var y=e.nav=e.el.insertBefore(g.el("nav","wg-tabs"),e.body),n=h(y).on("click",function(b){var d=h(b.target).data("idx");if(null==d)return!0;if(null!=m){var g=k[m];h(f[m].el).hide();g.removeClass("active")}c(d);e.redraw();return a(b)});null==d&&(d=n.data("idx")||0);e.each(function(a,d){k[d]=h('<a href="#'+a.id+'"></a>').data("idx",d).text(b[d]).appendTo(n);a.pos=0;
h(a.el).hide()});c(f[d]?d:0);e.lock();e.redraw();return e};f.navigated=function(){var a=this.nav;if(a)return h(a).data("idx")};f=null;return c}({},v,z));l.register("$24",function(c,f,D){function p(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,d){b=h(a.title(b).parentNode);var c=b.find("span.lang");d?(d=l.require("$38","locale.js").cast(d),
c.length||(c=h("<span></span>").prependTo(b)),c.attr("lang",d.lang).attr("class",d.getIcon()||"lang region region-"+(d.region||"zz").toLowerCase())):(c.remove(),d="en");a.locale(d);return b}function d(){this.dirty=0}var a="poUpdate",e="changing",n="changed",k=0,g=1,m=2,A=3,B=4,s=5,r=/^\s+/,w,q,C=l.require("$3","string.js").sprintf,v=l.require("$18","html.js");c.extend=function(a){return a.prototype=new d};c.localise=function(a){q=a;return c};var z=function(){var a=D.createElement("p");return function(b){a.innerHTML=
b.replace("src=","x=");return a.textContent}}(),u=d.prototype=l.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||l.require("$1","t.js").init());var b=[];b[k]=a._x("Source text","Editor")+":";b[A]=a._x("%s translation","Editor")+":";b[B]=a._x("Context","Editor")+":";b[s]=a._x("Comments","Editor")+":";b[g]=
a._x("Single","Editor")+":";b[m]=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){d.redraw(!0,a);return!0}var d=l.require("$40","wingrid.js").init(a);h(f).on("resize",b);this.redraw=b;h(a).on("wgFocus wgBlur",function(a,b){a.stopPropagation();w=b});this.destroy=function(){d.destroy();h(f).off("resize",b)};this.rootDiv=a;return d};u.$=function(){return h(this.rootDiv)};
u.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,d){b.loadMessage(b.po.row(d));return!0}).on("wgRowDeselect",function(a,d,c){c||b.loadNothing();return!0})};u.setSourceCell=function(a){this.sourceCell=a};u.setTargetCell=function(a){this.targetCell=a};u.next=function(a,b,d){for(var c=this.listTable,e=c.selected(),g=e,f,m=this.po;null!=(e=c.next(a,d,e));){if(g===e){e=null;break}if(b&&(f=m.row(e),f.translated(0)))continue;break}null!=e&&c.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,d=b.length,c=this.dict;for(c.clear();++a<d;)c.add(a,b[a].toText())};u.filtered=function(){return this.lastSearch||""};u.filter=function(a,b){var d,c=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;d=this.dict.find(a)}this.lastSearch=g=a;this.lastFound=e=d?d.length:this.po.length;d?c.filter(d):c.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 d=!1;if(a=a||self.active){if(d=a.saved(b))this.dirty++,a.unsave(b),this.fire("poUnsaved",[a,b]);this.markUnsaved(a)}return d};u.markUnsaved=function(a){var b=this.po.indexOf(a);if(b=
this.listTable.tr(b)){var d=b[0].className;a=d.replace(/(?:^| +)po-[a-z]+/g,"")+" "+p(a);a!==d&&h(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 d=this.handle;if(d&&d[a]&&(d=d[a].apply(this,b||[]),!1===d))return!1;d=h.Event(a);this.$().trigger(d,b);return!d.isDefaultPrevented()};u.on=function(a,b){this.$().on(a,b);
return this};u.getSorter=function(){return null};u.reload=function(){var a=this,b,d=a.listCell,c=a.listTable,e=a.po,g=e&&e.locale(),f=g&&g.isRTL(),m=e&&e.length||0;if(!e||!e.row)return d&&d.clear().header("Error").contents("Invalid messages list"),!1;a.lastSearch&&(a.lastSearch="",a.lastFound=m,a.fire("poFilter",["",m]));c&&(b=c.thead().distribution());a.listTable=c=d.tabulate({eachCol:function(b){var d,c,e=a.getListColumns(),g=a.getListHeadings();for(c in e)d=e[c],b(d,c,g[d])},eachRow:function(b){e.each(function(d,
c){b(c.idx,a.getListEntry(c),p(c))})},sort:a.getSorter()});var k,d=a.getListColumns();for(k in d)c.sortable(d[k]);b&&c.thead().distribute(b);c.tbody().$(f?"addClass":"removeClass",["is-rtl"]);a.targetLocale=g;a.fire("poLoad");return!!m};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,d=0;(b=this.sourceCell)&&b.eachTextarea(function(b){b.val(a.source(null,d++))});
(b=this.contextCell)&&b.eachTextarea(function(b){b.val(a.context())});if(b=this.targetCell)d=0,b.eachTextarea(function(b){b.val(a.translation(d++))});this.updateListCell(a,"source");this.updateListCell(a,"target");return this};u.reloadMessage=function(a){var b=this.sourceCell,d=this.targetCell,c;this.pasteMessage(a);b&&this.setNotes(a,b)&&b.redraw();d&&(c=d.navigated()||0,c=this.setErrors(a.errors(c),d),!b&&this.setNotes(a,d)&&(c=!0),c&&d.redraw());return this};u.setStatus=function(){return null};
u.setNotes=function(a,b){var d;d=!1;var c=this.$notes,e=this.labels,g=a.notes(),f=a.context();g||f?(c||(c=b.find("p.notes"),c.length||(c=h('<p class="notes"></p>').insertAfter(b.header())),this.$notes=c),d=[],f&&d.push(e[B]+" <mark>"+v.h(f)+"</mark>"),g&&d.push(v.h(g,!0)),c.html(d.join("\n")).show(),v.init(c),d=!0):c&&c.text()&&(c.text("").hide(),d=!0);return d};u.setErrors=function(a,b){var d=!1,c=this.$errs;a&&a.length?(c||(c=b.find("p.errors"),c.length||(c=h('<p class="errors"></p>').insertAfter(this.targetCell.header())),
this.$errs=c),c.html(v.h(a.join(".\n")+".",!0)).show(),v.init(c),d=!0):c&&c.text()&&(c.text("").hide(),d=!0);return d};u.loadMessage=function(d){function c(a,b){var d=b?a.split(" "):a.split(" ",1);a=d[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);d[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return d.join(" ")}function f(a,e){var n=S,p=O[k];a.off();a.titled()!==p&&b(a,p,e||"en");p=!1;u.setNotes(d,a)&&(p=!0);if(d.plural()){var p=-1,l=[],r=[],q=a.id+"-",s=d.sourceForms()||
e&&e.plurals||["One","Other"],A=s.length;if(2!==A||"="===s[0].charAt(0)&&"=1"!==s[0])for(;++p<A;)l[p]=q+String(p),r[p]=c(s[p])+":";else l=[q+"-0",q+"-1"],r=[O[g],O[m]];a.splity.apply(a,l);a.each(function(a,b){a.header(r[b]).textarea(d.source(null,b),n).setStrf(H).setMode(v).setInvs(z)});a.lock();n&&a.each(function(a,b){h(a,b)})}else p&&a.redraw(),a.textarea(d.source(),n).setStrf(H).setMode(v).setInvs(z),n&&h(a,0)}function h(b,c){b.on(e,function(a,b){d.source(b,c);0===c&&u.updateListCell(d,"source");
u.unsave(d,c)}).on(n,function(){0===c&&u.po.reIndex(d);u.dict&&u.rebuildSearch();u.fire(a,[d])})}function p(a,e,g){P&&a.eachTextarea(function(a){a.ping()});a.off();var f=e.isKnown()&&e.label||"Target",f=C(O[A],f);a.titled()!==f&&b(a,f,e);f=!1;!this.sourceCell&&u.setNotes(d,a)&&(f=!0);u.setErrors(d.errors(g),a)&&(f=!0);u.setStatus(d,g);if(d.pluralized()){var m=[],k=[],h=a.id+"-",n=d.targetForms()||e.plurals||["One","Other"],f=n.length,r=function(a){var b=n[a];k.push(b?c(b,!0):"Form "+a);m.push(h+String(a))};
for(d.each(r);(e=m.length)<f;)r(e);a.splitx.apply(a,m);a.each(function(a,b){var c=P&&!d.disabled(b);a.textarea(d.translation(b),c).setStrf(H).setMode(v).setInvs(z);P&&l(a,b)});a.navigize(k,g||null).on("wgTabSelect",function(b,c){var e=P&&b.cell.editable();e&&e.focus();u.setErrors(d.errors(c),a);u.setStatus(d,c);u.fire("poTab",[c])})}else f&&a.redraw(),a.textarea(d.translation(),P&&!d.disabled(0)).setStrf(H).setMode(v).setInvs(z),P&&l(a,0)}function l(b,c){b.on(e,function(a,b,e){d.translate(b,c);0===
c&&u.updateListCell(d,"target");d.fuzzy(c)?u.fuzzy(!1,d,c):u.unsave(d,c);""===b?u.fire("poEmpty",[!0,d,c]):""===e&&u.fire("poEmpty",[!1,d,c])}).on(n,function(){u.dict&&u.rebuildSearch();u.fire(a,[d])})}function r(c){c.off();var g=O[B];c.titled()!==g&&(b(c,g),u.setStatus(null));c.textarea(d.context(),!0).setMode(v).setInvs(z);X&&c.on(e,function(a,b){d.context(b);u.updateListCell(d,"source");u.unsave(d,R)}).on(n,function(){u.po.reIndex(d);u.dict&&u.rebuildSearch();u.fire(a,[d])})}function q(a){var c=
O[s];a.titled()!==c&&b(a,c);a.off().on(e,function(a,b){d.comment(b);u.fire("poComment",[d,b]);u.unsave(d,R)}).textarea(d.comment(),!0)}var u=this,v=u.mode,D=d.isHTML(),z=u.inv||!1,E=this.fmt||null,H=d.format()||null,G=d.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=w,Y=u.sourceLocale,W=u.targetLocale,O=u.labels;u.html!==D&&(u.html=D,"code"!==u.mode&&(v=D?"html":"",u.setMode(v)));u.active=d;L&&f(L,Y);U&&
r(U);T&&W&&(R=T.navigated()||0,p(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",[d])};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,d=this.mode||"",c=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(d).setInvs(c),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(d).setInvs(c),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(e).setMode(d).setInvs(c),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",
[null])};u.updateListCell=function(a,b){var d=this.getListColumns()[b],c=this.po.indexOf(a);(c=this.listTable.row(c))&&c.update(d)};u.cellText=function(a){if(-1!==a.indexOf("<")||-1!==a.indexOf("&"))a=z(a);return a.replace(r,"")||"\u00a0"};u.fuzzy=function(a,b,d){var c=4===this.flag(null,b,d);!0!==a||c?!1===a&&c&&this.flag(0,b,d)&&this.fire("poFuzzy",[b,!1,d]):this.flag(4,b,d)&&this.fire("poFuzzy",[b,!0,d]);return c};u.flag=function(b,d,c){if(!d){d=this.active;c=this.getTargetOffset();if(null==c)return null;
c&&d.targetForms()&&(c=0)}var e=d.flagged(c);if(null==b)return e;if(e===b||b&&!d.translated(c)||!this.fire("poFlag",[b,e,d,c]))return!1;d.flag(b,c);this.fire(a,[d])&&this.unsave(d,c);this.setStatus(d,c);return!0};u.add=function(b,d){var c,e=this.po.get(b,d);e?c=this.po.indexOf(e):(c=this.po.length,e=this.po.add(b,d),this.load(this.po,-1),this.fire("poAdd",[e]),this.fire(a,[e]));this.lastSearch&&this.filter("");this.listTable.select(c);return e};u.del=function(b){if(b=b||this.active){var d=this.lastSearch,
c=this.po.del(b);null!=c&&(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&&(d&&this.filter(d),this.active||(c=Math.min(c,this.po.length-1),this.listTable.select(c))))}};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}({},v,z));l.register("$25",function(c,f,h){Number.prototype.format=
function(c){c=Math.pow(10,c||0);var b=Math.round(c*this)/c;c=[];var b=String(b),d=b.split("."),b=d[0],d=d[1],a=b.length;do c.unshift(b.substring(a-3,a));while(0<(a-=3));b=c.join(",");if(c=d){c=d;for(var e,d=c.length;"0"===c.charAt(--d);)e=d;e&&(c=substring(0,e));c=d=c}c&&(b+="."+d);return b};Number.prototype.percent=function(c){var b=0,d=this&&c?100*(this/c):0;if(0===d)return"0";if(100===d)return"100";if(99<d)d=Math.min(d,99.9),c=d.format(++b);else if(0.5>d){d=Math.max(d,1E-4);do c=d.format(++b);
while("0"===c&&4>b);c=c.substr(1)}else c=d.format(0);return c};return c}({},v,z));l.register("$12",function(c,f,h){function p(){this.init()._validate();this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}f=l.require("$24","base.js");l.require("$25","number.js");c.init=function(b){var d=new p;b=d.setRootCell(b);var a=b.splity("po-list","po-edit"),c=a[0],f=a[1],a=f.splitx("po-trans","po-comment"),k=a[0],g=a[1].header("Loading.."),a=k.splity("po-source","po-target"),k=a[0].header("Loading.."),
a=a[1].header("Loading..");b.distribute([0.34]);f.distribute([0.8]);d.setListCell(c);d.setSourceCell(k);d.setTargetCell(a);d.commentCell=g;d.editable.source=!1;return d};f=p.prototype=f.extend(p);f.getListHeadings=function(){var b=this.t||{_x:function(b){return b}};return[b._x("Source text","Editor"),b._x("Translation","Editor")]};f.getListColumns=function(){return{source:0,target:1}};f.getListEntry=function(b){var d=this.cellText;return[function(){var a,c=d(b.source()||""),f=b.context();return f?
(a=h.createElement("p"),a.appendChild(h.createElement("mark")).innerText=f,a.appendChild(h.createTextNode("\u00a0"+c)),a):c},function(){return d(b.translation()||"")}]};f.stats=function(){var b=this.po,d=b.length,a=0,c=0,f=0;b.each(function(b,d){d.fuzzy()?f++:d.translated()?a++:c++});return{t:d,p:a.percent(d)+"%",f:f,u:c}};f.unlock=function(){this._unlocked||(this._unlocked=this.targetLocale,delete this.targetLocale,this.po&&this.po.unlock(),this.editable={source:!0,context:!0,target:!1},this.contextCell=
this.targetCell,delete this.targetCell,this.fire("poLock",[!1]),this.active&&this.loadMessage(this.active))};f.lock=function(){var b;this._unlocked&&(b=this.targetLocale=this._unlocked,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.fire("poLock",[!0,b]),this.active&&this.loadMessage(this.active))};f.locked=function(){return!this._unlocked};f.getSorter=function(){function b(a,b){var c=a.weight(),
g=b.weight();return c===g?d(a,b):c>g?-1:1}function d(a,b){return a.hash().localeCompare(b.hash())}var a=this;return function(c){var f=a.po,k=a.locked()?b:d;c.sort(function(a,b){return k(f.row(a),f.row(b))})}};return c}({},v,z));l.register("$13",function(c,f,l){var p={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73},b={38:!0,40:!0,73:!0},d={66:function(a,b){var d=b.current();d&&(d.normalize(),b.focus().pasteMessage(d))},75:function(a,b){var d=b.current();d&&(d.untranslate(),b.focus().pasteMessage(d))},
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 d=a.shiftKey;b.next(1,d,d)},38:function(a,b){var d=a.shiftKey;b.next(-1,d,d)},73:function(a,b){if(!a.shiftKey)return!1;b.setInvs(!b.getInvs())}};c.init=function(a,c){function n(c){if(c.isDefaultPrevented()||!c.metaKey&&!c.ctrlKey)return!0;var e=c.which;if(!k[e])return!0;var f=d[e];if(!f)throw Error("command undefined #"+e);if(c.altKey||c.shiftKey&&!b[e]||!1===f(c,a))return!0;
c.stopPropagation();c.preventDefault();return!1}var k={};h(c||f).on("keydown",n);return{add:function(a,b){d[p[a]]=b;return this},enable:function(){var a,b;for(b in arguments)a=p[arguments[b]],k[a]=!0;return this},disable:function(){h(c||f).off("keydown",n);a=c=k=null}}};return c}({},v,z));l.register("$26",function(c,f,h){function l(){this.reIndex([])}c.init=function(){return new l};f=l.prototype;f.reIndex=function(b){for(var d={},a=-1,c=b.length;++a<c;)d[b[a]]=a;this.keys=b;this.length=a;this.ords=
d};f.key=function(b,d){if(null==d)return this.keys[b];var a=this.keys[b],c=this.ords[d];if(d!==a){if(null!=c)throw Error("Clash with item at ["+c+"]");this.keys[b]=d;delete this.ords[a];this.ords[d]=b}return b};f.indexOf=function(b){b=this.ords[b];return null==b?-1:b};f.add=function(b,d){var a=this.ords[b];null==a&&(this.keys[this.length]=b,a=this.ords[b]=this.length++);this[a]=d;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,d){d=d||1;var a=[].splice.call(this,b,d);this.keys.splice(b,d);this.reIndex(this.keys);return a};f.each=function(b){for(var d=-1,a=this.keys,c=this.length;++d<c;)b(a[d],this[d],d);return this};f.sort=function(b){for(var d=-1,a=this.length,c,f=this.keys,k=this.ords,g=[];++d<a;)g[d]=[this[d],f[d]];g.sort(function(a,d){return b(a[0],d[0])});for(d=0;d<a;d++)c=g[d],this[d]=c[0],c=c[1],f[d]=c,k[c]=d;return this};f.join=function(b){return[].join.call(this,b)};f=null;return c}({},v,z));
l.register("$27",function(c,f,h){function l(b,d){var a=RegExp("^.{0,"+(b-1)+"}["+d+"]"),c=RegExp("^[^"+d+"]+");return function(d,f){for(var g=d.length,m;g>b;){m=a.exec(d)||c.exec(d);if(null==m)break;m=m[0];f.push(m);m=m.length;g-=m;d=d.substr(m)}0!==g&&f.push(d);return f}}c.create=function(b){function d(a){return m[a]||"\\"+a}var a,c,f=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,h=/[ \r\n]+/g,g=/[\t\v\f\x07\x08\\\"]/g,m={"\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," "),c=l(b-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(a,m){if(!m)return a+' ""';m=m.replace(g,d);var h=0;m=m.replace(f,function(){h++;return"\\n\n"});if(!(h||b&&b<m.length+a.length+3))return a+' "'+m+'"';var k=[a+' "'],l=m.split("\n");if(c)for(var p=-1,v=l.length;++p<v;)c(l[p],k);else k=k.concat(l);return k.join('"\n"')+'"'},prefix:function(a,b){var d=a.split(f);return b+d.join("\n"+b)},refs:function(b){b=b.replace(h," ",b);a&&(b=a(b,[]).join("\n#: "));return"#: "+
b}}};return c}({},v,z));l.register("$41",function(c,f,h){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 d=-1,a=this.length;++d<a;)b(d,this[d]);return this};return c}({},v,z));l.register("$28",function(c,f,h){function p(){}c.extend=function(b){return b.prototype=new p};f=p.prototype=l.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=l.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 d=this.rows.cut(b,1);if(d&&d.length)return this.length=this.rows.length,this.rows.each(function(a,b,d){b.idx=d}),b}};f.reIndex=function(b,d){var a=this.indexOf(b),c=b.hash(),f=this.rows.indexOf(c);return f===a?a:-1!==f?(d=(d||0)+1,b.source("Error, duplicate "+String(d)+": "+b.source()),this.reIndex(b,d)):this.rows.key(a,c)};f.sort=function(b){this.rows.sort(b);return this};f["export"]=function(){for(var b=-1,d=this.rows,a=d.length,
c=l.require("$41","list.js").init();++b<a;)c.push(d[b]);return c};f=null;return c}({},v,z));l.register("$29",function(c,f,h){function l(){this.xcmt=this.cmt=this.ref=this._id=this.id=""}c.extend=function(b){return b.prototype=new l};f=l.prototype;f.flag=function(b,d){var a=this.flg||(this.flg=[]);if(null!=d)a[d]=b;else for(var c=Math.max(a.length,this.src.length,this.msg.length);0!==c--;)a[c]=b;return this};f.flagged=function(b){var d=this.flg||[];if(null!=b)return d[b]||0;for(b=d.length;0!==b--;)if(d[b])return!0;
return!1};f.flags=function(){for(var b,d={},a=[],c=this.flg||[],f=c.length;0!==f--;)b=c[f],d[b]||(d[b]=!0,a.push(b));return a};f.flaggedAs=function(b,d){var a=this.flg||[];if(null!=d)return b===a[d]||0;for(var c=a.length;0!==c--;)if(a[c]===b)return!0;return!1};f.fuzzy=function(b,d){var a=this.flaggedAs(4,b);null!=d&&this.flag(d?4:0,b);return a};f.source=function(b,d){if(null==b)return this.src[d||0]||"";this.src[d||0]=b;return this};f.plural=function(b,d){if(null==b)return this.src[d||1]||"";this.src[d||
1]=b||"";return this};f.sourceForms=function(){return this.srcF};f.targetForms=function(){return this.msgF};f.each=function(b){for(var d=-1,a=this.src,c=this.msg,f=Math.max(a.length,c.length);++d<f;)b(d,a[d],c[d]);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,d){this.msg[d||0]=b||"";return this};f.untranslate=function(b){if(null!=b)this.msg[b]="";else{var d=this.msg,a=d.length;
for(b=0;b<a;b++)d[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 d=this.msg,a=d.length;for(b=0;b<a;b++)if(!d[b])return!1;return!0};f.untranslated=function(b){if(null!=b)return!this.msg[b];var d=this.msg,a=d.length;for(b=0;b<a;b++)if(d[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.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 d=this.drt;if(!d)return!0;if(null!=b)return!d[b];for(b=d.length;0!==b--;)if(d[b])return!1;return!0};f.unsave=function(b){(this.drt||(this.drt=[]))[b||0]=!0;return this};f.save=function(b){var d=this.drt;null==b?this.drt=null:
d[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}({},v,z));l.register("$14",function(c,f,h){function p(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 d=a||"";b&&(d+="\x00"+b);return d}function d(){return l.require("$26","collection.js").init()}function a(a){var b=f.console;b&&b.error&&b.error(a.message||String(a))}function e(a){return l.require("$27","format.js").create(a)}function n(a){this.locale(a);this.length=0;this.rows=d();this.head=p(this.now())}function k(a,b){this.src=[a||""];this.msg=[b||""]}c.create=function(a){return new n(a)};h=l.require("$28","messages.js").extend(n);h.now=function(){function a(b,d){for(var c=
String(b);c.length<d;)c="0"+c;return c}var b=new Date,d=b.getUTCFullYear(),c=b.getUTCMonth()+1,e=b.getUTCDate(),f=b.getUTCHours(),b=b.getUTCMinutes();return a(d,4)+"-"+a(c,2)+"-"+a(e,2)+" "+a(f,2)+":"+a(b,2)+"+0000"};h.header=function(a,b){var d=this.head||(this.head={});if(null==b)return this.headers()[a]||"";d[a]=b||"";return this};h.headers=function(a){var b,d=this.now(),c=this.head||(this.head=p(d));if(null!=a){for(b in a)c[b]=a[b];return this}var e=this.locale();a={};for(b in c)a[b]=String(c[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]=d);a["X-Generator"]="Loco https://localise.biz/";return a};h.get=function(a,d){var c=b(a,d);return this.rows.get(c)};h.add=function(b,d){b instanceof k||(b=new k(b));d&&b.context(d);
var c=b.hash();this.rows.get(c)?a("Duplicate message at index "+this.indexOf(b)):(b.idx=this.rows.add(c,b),this.length=this.rows.length);return b};h.load=function(b){for(var d=-1,c,e,f,h,l,n,p=(f=this.locale())&&f.nplurals||2,v=[];++d<b.length;)c=b[d],null==c.parent?(e=c.source||c.id,f=c.target||"",h=c.context,e||h?(l=new k(e,f),l._id=c._id,h&&l.context(h),c.flag&&l.flag(c.flag,0),c.comment&&l.comment(c.comment),c.notes&&l.notes(c.notes),c.refs&&l.refs(c.refs),l.format(c.format),c.message=l,this.add(l)):
0===d&&"object"===typeof f&&(this.head=f,this.headcmt=c.comment)):v.push(c);for(d=-1;++d<v.length;)try{c=v[d];e=c.source||c.id;l=b[c.parent]&&b[c.parent].message;if(!l)throw Error("parent missing for plural "+e);n=c.plural;1===n&&l.plural(e);n>=p||(c.flag&&l.flag(c.flag,n),l.translate(c.target||"",n),c.format&&!l.format()&&l.format(c.format))}catch(z){a(z)}return this};h.merge=function(b){var c=this,e,f=b.header("POT-Creation-Date"),h=c.rows,k=[],l=[];b=b.rows;c.rows.each(function(a,d){null==b.get(a)&&
l.push(d)});c.rows=d();b.each(function(b,d){try{(e=h.get(b))?(e.ref=d.ref,e.fmt=d.fmt):(e=d,k.push(e)),c.add(e)}catch(f){a(f)}});f&&c.header("POT-Creation-Date",f);return{add:k,del:l}};h.wrap=function(a){this.fmtr=e(a);return this};h.toString=function(){var a,b=this.locale(),d=[],c=[],f=this.headers(),h=!b,l=b&&b.nplurals||2,n=this.fmtr||e();f[b?"PO-Revision-Date":"POT-Creation-Date"]=this.now();for(a in f)c.push(a+": "+f[a]);c=new k("",c.join("\n"));c.comment(this.headcmt||"");h&&c.fuzzy(0,!0);d.push(c.toString());
d.push("");this.rows.each(function(a,b){a&&(d.push(b.cat(n,h,l)),d.push(""))});return d.join("\n")};h=l.require("$29","message.js").extend(k);h.hash=function(){return b(this.source(),this.context())};h.toString=function(){return this.cat(e())};h.cat=function(a,b,d){var c,e=[],f;(f=this.cmt)&&e.push(a.prefix(f,"# "));(f=this.xcmt)&&e.push(a.prefix(f,"#. "));c=this.ref;if(f=this._id)c+=(c?" ":"")+"loco:"+f;c&&/\S/.test(c)&&e.push(a.refs(c));!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(c=-1,e.push(a.pair("msgid_plural",this.src[1])),f=this.msg||["",""],d=d||f.length;++c<d;)e.push(a.pair("msgstr["+c+"]",b?"":f[c]||""));return e.join("\n")};h.compare=function(a,b){var d=this.weight(),c=a.weight();if(d>c)return 1;if(d<c)return-1;if(b){d=this.hash().toLowerCase();c=a.hash().toLowerCase();if(d<c)return 1;if(d>c)return-1}return 0};
h=h=null;return c}({},v,z));l.register("$16",function(c,f,l){c.init=function(c){function b(){M||(I.click(m),M=h('<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&&h("#ssh-keys").toggleClass("hidden","ssh"!==h(this).val())}));return M}function d(){G&&(a(h(q)),G=!1);if(H&&L){var b=L,c=h(J);c.find("span.loco-msg").text(b);N||(c.removeClass("jshide").hide().fadeIn(500),
N=!0)}else N&&(a(h(J)),N=!1)}function a(a){a.slideUp(250).fadeOut(250,function(){h(this).addClass("jshide")})}function e(){if(H)return M&&M.dialog("close"),d(),h(c).find('button[type="submit"]').attr("disabled",!1),h(f).triggerHandler("resize"),w&&w(!0),!0;y&&M?(G||(h(q).removeClass("jshide").hide().fadeIn(500),G=!0),N&&(a(h(J)),N=!1)):d();h(c).find('input[type="submit"]').attr("disabled",!0);w&&w(!1);return!1}function n(a){var b,c,d=r||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:
h('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function k(a){a.preventDefault();a=h(a.target).serializeArray();s(a);E=!0;return!1}function g(a){a.preventDefault();M.dialog("close");return!1}function m(a){a.preventDefault();M.dialog("open").find('input[name="connection_type"]').change();return!1}function v(a){H=a.authed;C=a.method;h(q).find("span.loco-msg").text(a.message||"Something went wrong.");L=a.warning||"";a.notice&&u.notices.info(a.notice);if(H)"direct"!==C&&(r=a.creds,n(c),
E&&a.success&&u.notices.success(a.success)),e();else if(a.reason)u.notices.info(a.reason);else if(a=a.prompt){var d=b();d.html(a).find("form").submit(k);d.dialog("option","title",d.find("h2").remove().text());d.find("button.cancel-button").show().click(g);d.find('input[type="submit"]').addClass("button-primary");e();h(f).triggerHandler("resize")}else u.notices.error("Server didn't return credentials, nor a prompt for credentials")}function z(){e()}function s(a){E=!1;u.ajax.setNonce("fsConnect",K).post("fsConnect",
a,v,z);return a}var r,w,q=c,C=null,E=!1,H=!1,u=f.locoScope,y=c.path.value,F=c.auth.value,K=c["loco-nonce"].value,I=h(q).find("button.button-primary"),J=l.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):y&&F&&s({path:y,auth:F});e();return{applyCreds:function(a){if(a.nodeType)n(a);else{var b,c=r||{};for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}return this},setForm:function(a){c=a;e();n(a);return this},
connect:function(){y=c.path.value;F=c.auth.value;s(h(c).serializeArray());return this},listen:function(a){w=a;H&&a(!0);return this}}};return c}({},v,z));l.register("$17",function(c,f,v){function p(c,f,g,h){f="n"===g?d(f):a(f);h&&(f=e(f));return b([].sort,[f])(c)}function b(a,b){return function(c){a.apply(c,b);return c}}function d(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 e(a){return function(b,
c){return-1*a(b,c)}}c.init=function(a){function b(a){var c=-1,d=a.length;for(h("tr",q).remove();++c<d;)q.appendChild(a[c].$)}function c(a){s=a?z.find(a,d):d.slice(0);w&&(a=e[w],s=p(s,w,a.type,a.desc));b(s)}var d=[],e=[],f=0,s,r,w,q=a.getElementsByTagName("tbody")[0],v=a.getElementsByTagName("thead")[0],z=l.require("$7","fulltext.js").init();v&&q&&(h("th",v).each(function(a,c){var g=c.getAttribute("data-sort-type");g&&(a=f,h(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var f=e[c],
g=f.type,l=!(f.desc=!f.desc);s=p(s||d.slice(0),c,g,l);b(s);r&&r.removeClass("loco-desc loco-asc");r=h(f.$).addClass(l?"loco-desc":"loco-asc").removeClass(l?"loco-asc":"loco-desc");w=c;return!1}),e[f]={$:c,type:g});c.hasAttribute("colspan")?f+=Number(c.getAttribute("colspan")):f++}),h("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;z.index(a,h)}),a=h('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],v=h(a.form),1<d.length?l.require("$8","LocoTextListener.js").listen(a,c):v.hide(),v.on("submit",function(a){a.preventDefault();return!1})))};return c}({},v,z));var G=v.locoScope||(v.locoScope={});v=v.locoConf||(v.locoConf={});z=l.require("$1","t.js").init();var L=v.wplang;l.require("$2","array.js");G.l10n=z;z.load(v.wpl10n);L&&z.pluraleq(L.pluraleq);G.string=
l.require("$3","string.js");G.notices=l.require("$4","notices.js").init(z);G.ajax=l.require("$5","ajax.js").init(v).localise(z);G.locale=l.require("$6","wplocale.js");G.fulltext=l.require("$7","fulltext.js");G.watchtext=l.require("$8","LocoTextListener.js").listen;G.selector=l.require("$9","LocoSelector.js").create;G.autocomp=l.require("$10","LocoAutoComplete.js").init;G.tooltip=l.require("$11","tooltip.js");G.po={ed:l.require("$12","poedit.js"),kbd:l.require("$13","hotkeys.js"),init:l.require("$14",
"po.js").create,ace:l.require("$15","ace.js").strf("php")};G.fs=l.require("$16","fsconn.js");h("#loco.wrap table.wp-list-table").each(function(c,f){l.require("$17","tables.js").init(f)})})(window,document,window.jQuery);