lj-publish-test3
Version:
A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features
9 lines • 366 kB
JavaScript
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.0.11 (2019-07-04)
*/
!function(H){"use strict";var tt=function(){},p=function(e,o){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(o.apply(null,t))}},nt=function(t){return function(){return t}},d=function(t){return t};function g(o){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=r.concat(t);return o.apply(null,e)}}var x=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}},u=function(t){return function(){throw new Error(t)}},t=nt(!1),n=nt(!0),e=tinymce.util.Tools.resolve("tinymce.ThemeManager"),P=function(){return(P=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)};function h(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}var o,r,i,a,c,s,f,l=t,m=n,v=function(){return b},b=(a={fold:function(t,n){return t()},is:l,isSome:l,isNone:m,getOr:i=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:i,orThunk:r,map:v,ap:v,each:function(){},bind:v,flatten:v,exists:l,forall:m,filter:v,equals:o=function(t){return t.isNone()},equals_:o,toArray:function(){return[]},toString:nt("none()")},Object.freeze&&Object.freeze(a),a),y=function(e){var t=function(){return e},n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:m,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return y(t(e))},ap:function(t){return t.fold(v,function(t){return y(t(e))})},each:function(t){t(e)},bind:o,flatten:t,exists:o,forall:o,filter:function(t){return t(e)?r:b},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},et={some:y,none:v,from:function(t){return null===t||t===undefined?b:y(t)}},w=function(e){return{is:function(t){return e===t},isValue:n,isError:t,getOr:nt(e),getOrThunk:nt(e),getOrDie:nt(e),or:function(t){return w(e)},orThunk:function(t){return w(e)},fold:function(t,n){return n(e)},map:function(t){return w(t(e))},mapError:function(t){return w(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return et.some(e)}}},S=function(e){return{is:t,isValue:t,isError:n,getOr:d,getOrThunk:function(t){return t()},getOrDie:function(){return u(String(e))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(t){return S(e)},mapError:function(t){return S(t(e))},each:tt,bind:function(t){return S(e)},exists:t,forall:n,toOption:et.none}},z={value:w,error:S,fromOption:function(t,n){return t.fold(function(){return S(n)},w)}},C=function(n){return function(t){return function(t){if(null===t)return"null";var n=typeof t;return"object"===n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n}(t)===n}},L=C("string"),k=C("object"),j=C("array"),O=C("boolean"),E=C("function"),U=C("number"),T=function(t,n){if(j(t)){for(var e=0,o=t.length;e<o;++e)if(!0!==n(t[e]))return!1;return!0}return!1},B=Array.prototype.slice,A=(c=Array.prototype.indexOf)===undefined?function(t,n){return X(t,n)}:function(t,n){return c.call(t,n)},D=function(t,n){return-1<A(t,n)},_=function(t,n){return G(t,n).isSome()},M=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=B.call(t,o,o+n);e.push(r)}return e},F=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r,t)}return o},W=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e,t)}},I=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o,t)&&e.push(i)}return e},R=function(t,n,e){return function(t,n){for(var e=t.length-1;0<=e;e--)n(t[e],e,t)}(t,function(t){e=n(e,t)}),e},V=function(t,n,e){return W(t,function(t){e=n(e,t)}),e},N=function(t,n){for(var e=0,o=t.length;e<o;e++){var r=t[e];if(n(r,e,t))return et.some(r)}return et.none()},G=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e,t))return et.some(e)}return et.none()},X=function(t,n){for(var e=0,o=t.length;e<o;++e)if(t[e]===n)return e;return-1},Y=Array.prototype.push,q=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!Array.prototype.isPrototypeOf(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);Y.apply(n,t[e])}return n},K=function(t,n){var e=F(t,n);return q(e)},$=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e,t))return!1}return!0},J=function(t){var n=B.call(t,0);return n.reverse(),n},Q=function(t,n){return I(t,function(t){return!D(n,t)})},Z=function(t){return[t]},ot=function(t){return 0===t.length?et.none():et.some(t[0])},rt=function(t){return 0===t.length?et.none():et.some(t[t.length-1])},it=E(Array.from)?Array.from:function(t){return B.call(t)},ut=Object.keys,at=Object.hasOwnProperty,ct=function(t,n){for(var e=ut(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i,t)}},st=function(t,o){return ft(t,function(t,n,e){return{k:n,v:o(t,n,e)}})},ft=function(o,r){var i={};return ct(o,function(t,n){var e=r(t,n,o);i[e.k]=e.v}),i},lt=function(t,e){var o=[];return ct(t,function(t,n){o.push(e(t,n))}),o},dt=function(t){return lt(t,function(t){return t})},mt=function(t,n){return gt(t,n)?et.from(t[n]):et.none()},gt=function(t,n){return at.call(t,n)},pt=function(u){if(!j(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return W(u,function(t,o){var n=ut(t);if(1!==n.length)throw new Error("one and only one name per case");var r=n[0],i=t[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!j(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){var t=arguments.length;if(t!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=arguments[n];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[o].apply(null,e)},match:function(t){var n=ut(t);if(a.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+n.join(","));if(!$(a,function(t){return D(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+a.join(", "));return t[r].apply(null,e)},log:function(t){H.console.log(t,{constructors:a,constructor:r,params:e})}}}}),e},ht=Object.prototype.hasOwnProperty,vt=function(u){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<t.length;o++){var r=t[o];for(var i in r)ht.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}},bt=vt(function(t,n){return k(t)&&k(n)?bt(t,n):n}),yt=vt(function(t,n){return n}),xt=function(e){var o,r=!1;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r||(r=!0,o=e.apply(null,t)),o}},wt=pt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),St=function(t){return wt.defaultedThunk(nt(t))},Ct=wt.strict,kt=wt.asOption,Ot=wt.defaultedThunk,Et=wt.mergeWithThunk,Tt=function(n){return function(t){return gt(t,n)?et.from(t[n]):et.none()}},Bt=function(t,n){return Tt(n)(t)},At=function(t,n){var e={};return e[t]=n,e},Dt=(pt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,n){return e=n,o={},ct(t,function(t,n){D(e,n)||(o[n]=t)}),o;var e,o}),_t=function(t){return Tt(t)},Mt=function(t,n){return e=t,o=n,function(t){return gt(t,e)?t[e]:o};var e,o},Ft=function(t,n){return Bt(t,n)},It=function(t,n){return At(t,n)},Rt=function(t){return n={},W(t,function(t){n[t.key]=t.value}),n;var n},Vt=function(t,n){var e,o,r,i,u,a=(e=[],o=[],W(t,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),{errors:e,values:o});return 0<a.errors.length?(u=a.errors,p(z.error,q)(u)):(i=n,0===(r=a.values).length?z.value(i):z.value(bt(i,yt.apply(undefined,r))))},Nt=function(t,n){return gt(e=t,o=n)&&e[o]!==undefined&&null!==e[o];var e,o};(f=s||(s={}))[f.Error=0]="Error",f[f.Value=1]="Value";var Ht=function(t,n,e){return t.stype===s.Error?n(t.serror):e(t.svalue)},Pt=function(t){return{stype:s.Value,svalue:t}},zt=function(t){return{stype:s.Error,serror:t}},Lt=function(t){return t.fold(zt,Pt)},jt=function(t){return Ht(t,z.error,z.value)},Ut=Pt,Wt=function(t){var n=[],e=[];return W(t,function(t){Ht(t,function(t){return e.push(t)},function(t){return n.push(t)})}),{values:n,errors:e}},Gt=zt,Xt=function(t,n){return t.stype===s.Value?n(t.svalue):t},Yt=function(t,n){return t.stype===s.Error?n(t.serror):t},qt=function(t,n){return t.stype===s.Value?{stype:s.Value,svalue:n(t.svalue)}:t},Kt=function(t,n){return t.stype===s.Error?{stype:s.Error,serror:n(t.serror)}:t},$t=function(t){return p(Gt,q)(t)},Jt=function(t,n){var e,o,r=Wt(t);return 0<r.errors.length?$t(r.errors):(e=r.values,o=n,0<e.length?Ut(bt(o,yt.apply(undefined,e))):Ut(o))},Qt=function(t){var n=Wt(t);return 0<n.errors.length?$t(n.errors):Ut(n.values)},Zt=pt([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),tn=pt([{field:["name","presence","type"]},{state:["name"]}]),nn="undefined"!=typeof H.window?H.window:Function("return this;")(),en=function(t,n){return function(t,n){for(var e=n!==undefined&&null!==n?n:nn,o=0;o<t.length&&e!==undefined&&null!==e;++o)e=e[t[o]];return e}(t.split("."),n)},on={getOrDie:function(t,n){var e=en(t,n);if(e===undefined||null===e)throw t+" not available on this browser";return e}},rn=function(){return on.getOrDie("JSON")},un=function(t,n,e){return rn().stringify(t,n,e)},an=function(t){return k(t)&&100<ut(t).length?" removed due to size":un(t,null,2)},cn=function(t,n){return Gt([{path:t,getErrorInfo:n}])},sn=pt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),fn=function(e,o,r){return Bt(o,r).fold(function(){return t=r,n=o,cn(e,function(){return'Could not find valid *strict* value for "'+t+'" in '+an(n)});var t,n},Ut)},ln=function(t,n,e){var o=Bt(t,n).fold(function(){return e(t)},d);return Ut(o)},dn=function(a,c,t,s){return t.fold(function(r,e,t,o){var i=function(t){var n=o.extract(a.concat([r]),s,t);return qt(n,function(t){return At(e,s(t))})},u=function(t){return t.fold(function(){var t=At(e,s(et.none()));return Ut(t)},function(t){var n=o.extract(a.concat([r]),s,t);return qt(n,function(t){return At(e,s(et.some(t)))})})};return t.fold(function(){return Xt(fn(a,c,r),i)},function(t){return Xt(ln(c,r,t),i)},function(){return Xt(Ut(Bt(c,r)),u)},function(t){return Xt((e=t,o=Bt(n=c,r).map(function(t){return!0===t?e(n):t}),Ut(o)),u);var n,e,o},function(t){var n=t(c),e=qt(ln(c,r,nt({})),function(t){return bt(n,t)});return Xt(e,i)})},function(t,n){var e=n(c);return Ut(At(t,s(e)))})},mn=function(o){return{extract:function(e,t,n){return Yt(o(n,t),function(t){return n=t,cn(e,function(){return n});var n})},toString:function(){return"val"},toDsl:function(){return Zt.itemOf(o)}}},gn=function(t){var c=pn(t),s=R(t,function(n,t){return t.fold(function(t){return bt(n,It(t,!0))},nt(n))},{});return{extract:function(t,n,e){var o,r,i,u=O(e)?[]:(r=ut(o=e),I(r,function(t){return Nt(o,t)})),a=I(u,function(t){return!Nt(s,t)});return 0===a.length?c.extract(t,n,e):(i=a,cn(t,function(){return"There are unsupported fields: ["+i.join(", ")+"] specified"}))},toString:c.toString,toDsl:c.toDsl}},pn=function(a){return{extract:function(t,n,e){return o=t,r=e,i=n,u=F(a,function(t){return dn(o,r,t,i)}),Jt(u,{});var o,r,i,u},toString:function(){return"obj{\n"+F(a,function(t){return t.fold(function(t,n,e,o){return t+" -> "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"},toDsl:function(){return Zt.objOf(F(a,function(t){return t.fold(function(t,n,e,o){return tn.field(t,e,o)},function(t,n){return tn.state(t)})}))}}},hn=function(r){return{extract:function(e,o,t){var n=F(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return Qt(n)},toString:function(){return"array("+r.toString()+")"},toDsl:function(){return Zt.arrOf(r)}}},vn=function(a,c){return{extract:function(e,o,r){var t,n,i=ut(r),u=(t=e,n=i,hn(mn(a)).extract(t,d,n));return Xt(u,function(t){var n=F(t,function(t){return sn.field(t,t,Ct(),c)});return pn(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"},toDsl:function(){return Zt.setOf(a,c)}}},bn=nt(mn(Ut)),yn=p(hn,pn),xn=sn.state,wn=sn.field,Sn=function(e,n,o,r,i){return Ft(r,i).fold(function(){return t=r,n=i,cn(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+an(t)});var t,n},function(t){return pn(t).extract(e.concat(["branch: "+i]),n,o)})},Cn=function(r,i){return{extract:function(n,e,o){return Ft(o,r).fold(function(){return t=r,cn(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return Sn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+ut(i)},toDsl:function(){return Zt.choiceOf(r,i)}}},kn=mn(Ut),On=function(n){return mn(function(t){return n(t).fold(Gt,Ut)})},En=function(n,t){return vn(function(t){return Lt(n(t))},t)},Tn=function(t,n,e){return jt((o=t,r=d,i=e,u=n.extract([o],r,i),Kt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},Bn=function(t){return t.fold(function(t){throw new Error(Dn(t))},d)},An=function(t,n,e){return Bn(Tn(t,n,e))},Dn=function(t){return"Errors: \n"+(n=t.errors,e=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n,F(e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))+"\n\nInput object: "+an(t.input);var n,e},_n=function(t,n){return Cn(t,n)},Mn=nt(kn),Fn=function(e,o){return mn(function(t){var n=typeof t;return e(t)?Ut(t):Gt("Expected type: "+o+" but got: "+n)})},In=Fn(U,"number"),Rn=Fn(L,"string"),Vn=Fn(O,"boolean"),Nn=Fn(E,"function"),Hn=function(n){return On(function(t){return D(n,t)?z.value(t):z.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Pn=function(t){return wn(t,t,Ct(),bn())},zn=function(t,n){return wn(t,t,Ct(),n)},Ln=function(t){return zn(t,Rn)},jn=function(t,n){return wn(t,t,Ct(),Hn(n))},Un=function(t){return zn(t,Nn)},Wn=function(t,n){return wn(t,t,Ct(),pn(n))},Gn=function(t,n){return wn(t,t,Ct(),yn(n))},Xn=function(t,n){return wn(t,t,Ct(),hn(n))},Yn=function(t){return wn(t,t,kt(),bn())},qn=function(t,n){return wn(t,t,kt(),n)},Kn=function(t){return qn(t,In)},$n=function(t){return qn(t,Rn)},Jn=function(t){return qn(t,Nn)},Qn=function(t,n){return qn(t,pn(n))},Zn=function(t,n){return wn(t,t,St(n),bn())},te=function(t,n,e){return wn(t,t,St(n),e)},ne=function(t,n){return te(t,n,In)},ee=function(t,n){return te(t,n,Rn)},oe=function(t,n,e){return te(t,n,Hn(e))},re=function(t,n){return te(t,n,Vn)},ie=function(t,n){return te(t,n,Nn)},ue=function(t,n,e){return te(t,n,pn(e))},ae=function(t,n){return xn(t,n)},ce=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return ce(e())}}},se=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:nt(t)}},fe={fromHtml:function(t,n){var e=(n||H.document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1<e.childNodes.length)throw H.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return se(e.childNodes[0])},fromTag:function(t,n){var e=(n||H.document).createElement(t);return se(e)},fromText:function(t,n){var e=(n||H.document).createTextNode(t);return se(e)},fromDom:se,fromPoint:function(t,n,e){var o=t.dom();return et.from(o.elementFromPoint(n,e)).map(se)}},le=function(){return on.getOrDie("Node")},de=function(t,n,e){return 0!=(t.compareDocumentPosition(n)&e)},me=function(t,n){return de(t,n,le().DOCUMENT_POSITION_CONTAINED_BY)},ge=function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}return undefined}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return he(o(1),o(2))},pe=function(){return he(0,0)},he=function(t,n){return{major:t,minor:n}},ve={nu:he,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?pe():ge(t,e)},unknown:pe},be="Firefox",ye=function(t,n){return function(){return n===t}},xe=function(t){var n=t.current;return{current:n,version:t.version,isEdge:ye("Edge",n),isChrome:ye("Chrome",n),isIE:ye("IE",n),isOpera:ye("Opera",n),isFirefox:ye(be,n),isSafari:ye("Safari",n)}},we={unknown:function(){return xe({current:undefined,version:ve.unknown()})},nu:xe,edge:nt("Edge"),chrome:nt("Chrome"),ie:nt("IE"),opera:nt("Opera"),firefox:nt(be),safari:nt("Safari")},Se="Windows",Ce="Android",ke="Solaris",Oe="FreeBSD",Ee=function(t,n){return function(){return n===t}},Te=function(t){var n=t.current;return{current:n,version:t.version,isWindows:Ee(Se,n),isiOS:Ee("iOS",n),isAndroid:Ee(Ce,n),isOSX:Ee("OSX",n),isLinux:Ee("Linux",n),isSolaris:Ee(ke,n),isFreeBSD:Ee(Oe,n)}},Be={unknown:function(){return Te({current:undefined,version:ve.unknown()})},nu:Te,windows:nt(Se),ios:nt("iOS"),android:nt(Ce),linux:nt("Linux"),osx:nt("OSX"),solaris:nt(ke),freebsd:nt(Oe)},Ae=function(t,n){var e=String(n).toLowerCase();return N(t,function(t){return t.search(e)})},De=function(t,e){return Ae(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},_e=function(t,e){return Ae(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},Me=function(t,n){return-1!==t.indexOf(n)},Fe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ie=function(n){return function(t){return Me(t,n)}},Re=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Me(t,"edge/")&&Me(t,"chrome")&&Me(t,"safari")&&Me(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Fe],search:function(t){return Me(t,"chrome")&&!Me(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Me(t,"msie")||Me(t,"trident")}},{name:"Opera",versionRegexes:[Fe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ie("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ie("firefox")},{name:"Safari",versionRegexes:[Fe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Me(t,"safari")||Me(t,"mobile/"))&&Me(t,"applewebkit")}}],Ve=[{name:"Windows",search:Ie("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Me(t,"iphone")||Me(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ie("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ie("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ie("linux"),versionRegexes:[]},{name:"Solaris",search:Ie("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ie("freebsd"),versionRegexes:[]}],Ne={browsers:nt(Re),oses:nt(Ve)},He=function(t){var n,e,o,r,i,u,a,c,s,f,l,d=Ne.browsers(),m=Ne.oses(),g=De(d,t).fold(we.unknown,we.nu),p=_e(m,t).fold(Be.unknown,Be.nu);return{browser:g,os:p,deviceType:(e=g,o=t,r=(n=p).isiOS()&&!0===/ipad/i.test(o),i=n.isiOS()&&!r,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,c=r||u||a&&!0===/mobile/i.test(o),s=n.isiOS()||n.isAndroid(),f=s&&!c,l=e.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),{isiPad:nt(r),isiPhone:nt(i),isTablet:nt(c),isPhone:nt(f),isTouch:nt(s),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:nt(l)})}},Pe={detect:xt(function(){var t=H.navigator.userAgent;return He(t)})},ze=(H.Node.ATTRIBUTE_NODE,H.Node.CDATA_SECTION_NODE,H.Node.COMMENT_NODE,H.Node.DOCUMENT_NODE),Le=(H.Node.DOCUMENT_TYPE_NODE,H.Node.DOCUMENT_FRAGMENT_NODE,H.Node.ELEMENT_NODE),je=H.Node.TEXT_NODE,Ue=(H.Node.PROCESSING_INSTRUCTION_NODE,H.Node.ENTITY_REFERENCE_NODE,H.Node.ENTITY_NODE,H.Node.NOTATION_NODE,Le),We=ze,Ge=function(t,n){var e=t.dom();if(e.nodeType!==Ue)return!1;if(e.matches!==undefined)return e.matches(n);if(e.msMatchesSelector!==undefined)return e.msMatchesSelector(n);if(e.webkitMatchesSelector!==undefined)return e.webkitMatchesSelector(n);if(e.mozMatchesSelector!==undefined)return e.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Xe=function(t){return t.nodeType!==Ue&&t.nodeType!==We||0===t.childElementCount},Ye=function(t,n){var e=n===undefined?H.document:n.dom();return Xe(e)?[]:F(e.querySelectorAll(t),fe.fromDom)},qe=function(t,n){return t.dom()===n.dom()},Ke=(Pe.detect().browser.isIE(),function(t,n){return qe(t.element(),n.event().target())}),$e=function(t){if(!Nt(t,"can")&&!Nt(t,"abort")&&!Nt(t,"run"))throw new Error("EventHandler defined by: "+un(t,null,2)+" does not have can, abort, or run!");return An("Extracting event.handler",gn([Zn("can",nt(!0)),Zn("abort",nt(!1)),Zn("run",tt)]),t)},Je=function(e){var n,o,r,i,t=(n=e,o=function(t){return t.can},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V(n,function(t,n){return t&&o(n).apply(undefined,e)},!0)}),u=(r=e,i=function(t){return t.abort},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V(r,function(t,n){return t||i(n).apply(undefined,e)},!1)});return $e({can:t,abort:u,run:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];W(e,function(t){t.run.apply(undefined,n)})}})},Qe=nt("touchstart"),Ze=nt("touchmove"),to=nt("touchend"),no=nt("mousedown"),eo=nt("mousemove"),oo=nt("mouseout"),ro=nt("mouseup"),io=nt("mouseover"),uo=nt("focusin"),ao=nt("focusout"),co=nt("keydown"),so=nt("keyup"),fo=nt("input"),lo=nt("change"),mo=nt("click"),go=nt("transitionend"),po=nt("selectstart"),ho={tap:nt("alloy.tap")},vo=nt("alloy.focus"),bo=nt("alloy.blur.post"),yo=nt("alloy.paste.post"),xo=nt("alloy.receive"),wo=nt("alloy.execute"),So=nt("alloy.focus.item"),Co=ho.tap,ko=Pe.detect().deviceType.isTouch()?ho.tap:mo,Oo=nt("alloy.longpress"),Eo=nt("alloy.sandbox.close"),To=nt("alloy.typeahead.cancel"),Bo=nt("alloy.system.init"),Ao=nt("alloy.system.scroll"),Do=nt("alloy.system.resize"),_o=nt("alloy.system.attached"),Mo=nt("alloy.system.detached"),Fo=nt("alloy.system.dismissRequested"),Io=nt("alloy.focusmanager.shifted"),Ro=nt("alloy.slotcontainer.visibility"),Vo=nt("alloy.change.tab"),No=nt("alloy.dismiss.tab"),Ho=nt("alloy.highlight"),Po=nt("alloy.dehighlight"),zo=function(t,n){Wo(t,t.element(),n,{})},Lo=function(t,n,e){Wo(t,t.element(),n,e)},jo=function(t){zo(t,wo())},Uo=function(t,n,e){Wo(t,n,e,{})},Wo=function(t,n,e,o){var r=P({target:n},o);t.getSystem().triggerEvent(e,n,st(r,nt))},Go=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event())};function Xo(t,n,e,o,r){return t(e,o)?et.some(e):E(r)&&r(e)?et.none():n(e,o,r)}var Yo,qo,Ko,$o,Jo,Qo=function(t){return t.dom().nodeName.toLowerCase()},Zo=function(n){return function(t){return t.dom().nodeType===n}},tr=Zo(Le),nr=Zo(je),er=Zo(ze),or=function(t){var n=nr(t)?t.dom().parentNode:t.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},rr=xt(function(){return ir(fe.fromDom(H.document))}),ir=function(t){var n=t.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return fe.fromDom(n)},ur=function(t,n,e){for(var o=t.dom(),r=E(e)?e:nt(!1);o.parentNode;){o=o.parentNode;var i=fe.fromDom(o);if(n(i))return et.some(i);if(r(i))break}return et.none()},ar=function(t,n,e){return Xo(function(t){return n(t)},ur,t,n,e)},cr=function(t,o){var r=function(t){for(var n=0;n<t.childNodes.length;n++){if(o(fe.fromDom(t.childNodes[n])))return et.some(fe.fromDom(t.childNodes[n]));var e=r(t.childNodes[n]);if(e.isSome())return e}return et.none()};return r(t.dom())},sr=function(t,n,e){return ar(t,function(t){return n(t).isSome()},e).bind(n)},fr=function(t){return Rt(t)},lr=function(t,n){return{key:t,value:$e({abort:n})}},dr=function(t){return{key:t,value:$e({run:function(t,n){n.event().prevent()}})}},mr=function(t,n){return{key:t,value:$e({run:n})}},gr=function(t,n,e){return{key:t,value:$e({run:function(t){n.apply(undefined,[t].concat(e))}})}},pr=function(t){return function(e){return{key:t,value:$e({run:function(t,n){Ke(t,n)&&e(t,n)}})}}},hr=function(t,n,e){var o,r,i=n.partUids[e];return r=i,mr(o=t,function(t,n){t.getSystem().getByUid(r).each(function(t){Go(t,t.element(),o,n)})})},vr=function(t,r){return mr(t,function(n,t){var e=t.event(),o=n.getSystem().getByDom(e.target()).fold(function(){return sr(e.target(),function(t){return n.getSystem().getByDom(t).toOption()},nt(!1)).getOr(n)},function(t){return t});r(n,o,t)})},br=function(t){return mr(t,function(t,n){n.cut()})},yr=function(t){return mr(t,function(t,n){n.stop()})},xr=function(t,n){return pr(t)(n)},wr=pr(_o()),Sr=pr(Mo()),Cr=pr(Bo()),kr=(Yo=wo(),function(t){return mr(Yo,t)}),Or=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+e.length+" arguments");var o={};return W(n,function(t,n){o[t]=nt(e[n])}),o}},Er=function(t){return t.slice(0).sort()},Tr=function(n,t){if(!j(t))throw new Error("The "+n+" fields must be an array. Was: "+t+".");W(t,function(t){if(!L(t))throw new Error("The value "+t+" in the "+n+" fields was not a string.")})},Br=function(r,i){var e,u=r.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return Tr("required",r),Tr("optional",i),e=Er(u),N(e,function(t,n){return n<e.length-1&&t===e[n+1]}).each(function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+e.join(", ")+"].")}),function(n){var e=ut(n);$(r,function(t){return D(e,t)})||function(t,n){throw new Error("All required keys ("+Er(t).join(", ")+") were not specified. Specified keys were: "+Er(n).join(", ")+".")}(r,e);var t=I(e,function(t){return!D(u,t)});0<t.length&&function(t){throw new Error("Unsupported keys for object: "+Er(t).join(", "))}(t);var o={};return W(r,function(t){o[t]=nt(n[t])}),W(i,function(t){o[t]=nt(Object.prototype.hasOwnProperty.call(n,t)?et.some(n[t]):et.none())}),o}},Ar=function(t){return fe.fromDom(t.dom().ownerDocument)},Dr=function(t){var n=t.dom().ownerDocument.defaultView;return fe.fromDom(n)},_r=function(t){var n=t.dom();return et.from(n.parentNode).map(fe.fromDom)},Mr=function(t){var n=t.dom();return et.from(n.offsetParent).map(fe.fromDom)},Fr=function(t){var n=t.dom();return F(n.childNodes,fe.fromDom)},Ir=function(t,n){var e=t.dom().childNodes;return et.from(e[n]).map(fe.fromDom)},Rr=(Or("element","offset"),function(n,e){_r(n).each(function(t){t.dom().insertBefore(e.dom(),n.dom())})}),Vr=function(t,n){var e;(e=t.dom(),et.from(e.nextSibling).map(fe.fromDom)).fold(function(){_r(t).each(function(t){Hr(t,n)})},function(t){Rr(t,n)})},Nr=function(n,e){Ir(n,0).fold(function(){Hr(n,e)},function(t){n.dom().insertBefore(e.dom(),t.dom())})},Hr=function(t,n){t.dom().appendChild(n.dom())},Pr=function(n,t){W(t,function(t){Hr(n,t)})},zr=function(t){t.dom().textContent="",W(Fr(t),function(t){Lr(t)})},Lr=function(t){var n=t.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},jr=function(t){var n,e=Fr(t);0<e.length&&(n=t,W(e,function(t){Rr(n,t)})),Lr(t)},Ur=function(t){return t.dom().innerHTML},Wr=function(t,n){var e,o,r=Ar(t).dom(),i=fe.fromDom(r.createDocumentFragment()),u=(e=n,(o=(r||H.document).createElement("div")).innerHTML=e,Fr(fe.fromDom(o)));Pr(i,u),zr(t),Hr(t,i)},Gr=function(t,n,e){if(!(L(e)||O(e)||U(e)))throw H.console.error("Invalid call to Attr.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},Xr=function(t,n,e){Gr(t.dom(),n,e)},Yr=function(t,n){var e=t.dom();ct(n,function(t,n){Gr(e,n,t)})},qr=function(t,n){var e=t.dom().getAttribute(n);return null===e?undefined:e},Kr=function(t,n){var e=t.dom();return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},$r=function(t,n){t.dom().removeAttribute(n)},Jr=function(t){return n=t,e=!1,fe.fromDom(n.dom().cloneNode(e));var n,e},Qr=function(t){var n,e,o,r=Jr(t);return n=r,e=fe.fromTag("div"),o=fe.fromDom(n.dom().cloneNode(!0)),Hr(e,o),Ur(e)},Zr=function(t){return Qr(t)},ti=fr([(qo=vo(),Ko=function(t,n){var e,o,r=n.event().originator(),i=n.event().target();return o=i,!(qe(e=r,t.element())&&!qe(e,o))||(H.console.warn(vo()+" did not get interpreted by the desired target. \nOriginator: "+Zr(r)+"\nTarget: "+Zr(i)+"\nCheck the "+vo()+" event handlers"),!1)},{key:qo,value:$e({can:Ko})})]),ni=/* */Object.freeze({events:ti}),ei=0,oi=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++ei+String(n)},ri=nt("alloy-id-"),ii=nt("data-alloy-id"),ui=ri(),ai=ii(),ci=function(t,n){Object.defineProperty(t.dom(),ai,{value:n,writable:!0})},si=function(t){var n=tr(t)?t.dom()[ai]:null;return et.from(n)},fi=function(t){return oi(t)},li=d,di=function(n){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+"\n"+Zr(n().element())+" is not in context.")}};return{debugInfo:nt("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:nt(!1)}},mi=di(),gi=function(t){return F(t,function(t){return o=n="/*",r=(e=t).length-n.length,""!==o&&(e.length<o.length||e.substr(r,r+o.length)!==o)?t:t.substring(0,t.length-"/*".length);var n,e,o,r})},pi=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:gi(i)}},t},hi=oi("alloy-premade"),vi=function(t){return It(hi,t)},bi=function(o){return t=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return o.apply(undefined,[t.getApis()].concat([t].concat(n)))},n=o.toString(),e=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,e-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:gi(i.slice(1))}},t;var t,n,e,r,i},yi={init:function(){return xi({readState:function(){return"No State required"}})}},xi=function(t){return t},wi=function(t,r){var i={};return ct(t,function(t,o){ct(t,function(t,n){var e=Mt(n,[])(i);i[n]=e.concat([r(o,t)])})}),i},Si=function(t){return{classes:t.classes!==undefined?t.classes:[],attributes:t.attributes!==undefined?t.attributes:{},styles:t.styles!==undefined?t.styles:{}}},Ci=function(t,n){return e=g.apply(undefined,[t.handler].concat(n)),o=t.purpose(),{cHandler:e,purpose:nt(o)};var e,o},ki=function(t){return t.cHandler},Oi=function(t,n){return{name:nt(t),handler:nt(n)}},Ei=function(t,n,e){var o,r,i=P({},e,(o=t,r={},W(n,function(t){r[t.name()]=t.handlers(o)}),r));return wi(i,Oi)},Ti=function(t){var n,i=E(n=t)?{can:nt(!0),abort:nt(!1),run:n}:n;return function(t,n){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[t,n].concat(e);i.abort.apply(undefined,r)?n.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}},Bi=function(t,n,e){var o,r,i=n[e];return i?function(u,a,t,c){var n=t.slice(0);try{var e=n.sort(function(t,n){var e=t[a](),o=n[a](),r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+un(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+un(c,null,2));return r<i?-1:i<r?1:0});return z.value(e)}catch(o){return z.error([o])}}("Event: "+e,"name",t,i).map(function(t){var n=F(t,function(t){return t.handler()});return Je(n)}):(o=e,r=t,z.error(["The event ("+o+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+un(F(r,function(t){return t.name()}),null,2)]))},Ai=function(t,i){var n=lt(t,function(o,r){return(1===o.length?z.value(o[0].handler()):Bi(o,i,r)).map(function(t){var n=Ti(t),e=1<o.length?I(i,function(n){return D(o,function(t){return t.name()===n})}).join(" > "):o[0].name();return It(r,{handler:n,purpose:nt(e)})})});return Vt(n,{})},Di=function(t){return Tn("custom.definition",pn([wn("dom","dom",Ct(),pn([Pn("tag"),Zn("styles",{}),Zn("classes",[]),Zn("attributes",{}),Yn("value"),Yn("innerHtml")])),Pn("components"),Pn("uid"),Zn("events",{}),Zn("apis",{}),wn("eventOrder","eventOrder",(n={"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]},wt.mergeWithThunk(nt(n))),Mn()),Yn("domModification")]),t);var n},_i=function(t,n){var e=qr(t,n);return e===undefined||""===e?[]:e.split(" ")},Mi=function(t){return t.dom().classList!==undefined},Fi=function(t,n){return r=n,i=_i(e=t,o="class").concat([r]),Xr(e,o,i.join(" ")),!0;var e,o,r,i},Ii=function(t,n){return r=n,0<(i=I(_i(e=t,o="class"),function(t){return t!==r})).length?Xr(e,o,i.join(" ")):$r(e,o),!1;var e,o,r,i},Ri=function(t,n){Mi(t)?t.dom().classList.add(n):Fi(t,n)},Vi=function(t){0===(Mi(t)?t.dom().classList:_i(t,"class")).length&&$r(t,"class")},Ni=function(t,n){Mi(t)?t.dom().classList.remove(n):Ii(t,n);Vi(t)},Hi=function(t,n){return Mi(t)&&t.dom().classList.contains(n)},Pi=function(n,t){W(t,function(t){Ri(n,t)})},zi=function(n,t){W(t,function(t){Ni(n,t)})},Li=function(t){return t.style!==undefined&&E(t.style.getPropertyValue)},ji=function(t,n,e){if(!L(e))throw H.console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Li(t)&&t.style.setProperty(n,e)},Ui=function(t,n){Li(t)&&t.style.removeProperty(n)},Wi=function(t,n,e){var o=t.dom();ji(o,n,e)},Gi=function(t,n){var e=t.dom();ct(n,function(t,n){ji(e,n,t)})},Xi=function(t,n){var e=t.dom(),o=H.window.getComputedStyle(e).getPropertyValue(n),r=""!==o||or(t)?o:Yi(e,n);return null===r?undefined:r},Yi=function(t,n){return Li(t)?t.style.getPropertyValue(n):""},qi=function(t,n){var e=t.dom(),o=Yi(e,n);return et.from(o).filter(function(t){return 0<t.length})},Ki=function(t,n,e){var o=fe.fromTag(t);return Wi(o,n,e),qi(o,n).isSome()},$i=function(t,n){var e=t.dom();Ui(e,n),Kr(t,"style")&&""===qr(t,"style").replace(/^\s+|\s+$/g,"")&&$r(t,"style")},Ji=function(t){return t.dom().offsetWidth},Qi=function(t){return t.dom().value},Zi=function(t,n){if(n===undefined)throw new Error("Value.set was undefined");t.dom().value=n},tu=function(t,n){return e=t,r=F(o=n,function(t){return Qn(t.name(),[Pn("config"),Zn("state",yi)])}),i=Tn("component.behaviours",pn(r),e.behaviours).fold(function(t){throw new Error(Dn(t)+"\nComplete spec:\n"+un(e,null,2))},function(t){return t}),{list:o,data:st(i,function(t){var n=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return function(){return n}})};var e,o,r,i},nu=function(t){var n,e,o,r=(n=t,e=Mt("behaviours",{})(n),o=I(ut(e),function(t){return e[t]!==undefined}),F(o,function(t){return e[t].me}));return tu(t,r)},eu=function(t,n,e){var o,r,i,u=P({},(o=t).dom,{uid:o.uid,domChildren:F(o.components,function(t){return t.element()})}),a=t.domModification.fold(function(){return Si({})},Si),c={"alloy.base.modification":a},s=0<n.length?function(n,t,e,o){var r=P({},t);W(e,function(t){r[t.name()]=t.exhibit(n,o)});var i=wi(r,function(t,n){return{name:t,modification:n}}),u=function(t){return R(t,function(t,n){return P({},n.modification,t)},{})},a=R(i.classes,function(t,n){return n.modification.concat(t)},[]),c=u(i.attributes),s=u(i.styles);return Si({classes:a,attributes:c,styles:s})}(e,c,n,u):a;return i=s,P({},r=u,{attributes:P({},r.attributes,i.attributes),styles:P({},r.styles,i.styles),classes:r.classes.concat(i.classes)})},ou=function(t,n,e){var o,r,i,u,a,c,s={"alloy.base.behaviour":(o=t,o.events)};return(r=e,i=t.eventOrder,u=n,a=s,c=Ei(r,u,a),Ai(c,i)).getOrDie()},ru=function(e){var t=function(){return f},o=ce(mi),n=Bn(Di(e)),r=nu(e),i=r.list,u=r.data,a=function(t){var n=fe.fromTag(t.tag);Yr(n,t.attributes),Pi(n,t.classes),Gi(n,t.styles),t.innerHtml.each(function(t){return Wr(n,t)});var e=t.domChildren;return Pr(n,e),t.value.each(function(t){Zi(n,t)}),t.uid,ci(n,t.uid),n}(eu(n,i,u)),c=ou(n,i,u),s=ce(n.components),f={getSystem:o.get,config:function(t){var n=u;return(E(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+un(e,null,2))})()},hasConfigured:function(t){return E(u[t.name()])},spec:nt(e),readState:function(t){return u[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return n.apis},connect:function(t){o.set(t)},disconnect:function(){o.set(di(t))},element:nt(a),syncComponents:function(){var t=Fr(a),n=K(t,function(t){return o.get().getByDom(t).fold(function(){return[]},function(t){return[t]})});s.set(n)},components:s.get,events:nt(c)};return f},iu=function(t){var n,e,o=li(t),r=o.events,i=h(o,["events"]),u=(n=i,e=Mt("components",[])(n),F(e,su)),a=P({},i,{events:P({},ni,r),components:u});return z.value(ru(a))},uu=function(t){var n=fe.fromText(t);return au({element:n})},au=function(t){var n=An("external.component",gn([Pn("element"),Yn("uid")]),t),e=ce(di());n.uid.each(function(t){ci(n.element,t)});var o={getSystem:e.get,config:et.none,hasConfigured:nt(!1),connect:function(t){e.set(t)},disconnect:function(){e.set(di(function(){return o}))},getApis:function(){return{}},element:nt(n.element),spec:nt(t),readState:nt("No state"),syncComponents:tt,components:nt([]),events:nt({})};return vi(o)},cu=fi,su=function(n){return(t=n,Ft(t,hi)).fold(function(){var t=n.hasOwnProperty("uid")?n:P({uid:cu("")},n);return iu(t).getOrDie()},function(t){return t});var t},fu=vi,lu=function(t,n,e){return ur(t,function(t){return Ge(t,n)},e)},du=function(t,n){return e=n,r=(o=t)===undefined?H.document:o.dom(),Xe(r)?et.none():et.from(r.querySelector(e)).map(fe.fromDom);var e,o,r},mu=function(t,n,e){return Xo(Ge,lu,t,n,e)},gu=function(){var n=oi("aria-owns");return{id:nt(n),link:function(t){Xr(t,"aria-owns",n)},unlink:function(t){$r(t,"aria-owns")}}},pu=function(n,t){return(e=t,ar(e,function(t){if(!tr(t))return!1;var n=qr(t,"id");return n!==undefined&&-1<n.indexOf("aria-owns")}).bind(function(t){var n=qr(t,"id"),e=Ar(t);return du(e,'[aria-owns="'+n+'"]')})).exists(function(t){return hu(n,t)});var e},hu=function(n,t){return e=t,r=nt(!(o=function(t){return qe(t,n.element())})),ar(e,o,r).isSome()||pu(n,t);var e,o,r},vu=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o<t.length;o++)t[o].each(e);return n},bu=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return et.none()},yu="unknown";(Jo=$o||($o={}))[Jo.STOP=0]="STOP",Jo[Jo.NORMAL=1]="NORMAL",Jo[Jo.LOGGING=2]="LOGGING";var xu=ce({}),wu=function(n,t,e){var o,r,i,u;switch(Ft(xu.get(),n).orThunk(function(){var t=ut(xu.get());return bu(t,function(t){return-1<n.indexOf(t)?et.some(xu.get()[t]):et.none()})}).getOr($o.NORMAL)){case $o.NORMAL:return e(ku());case $o.LOGGING:var a=(o=n,r=t,i=[],u=(new Date).getTime(),{logEventCut:function(t,n,e){i.push({outcome:"cut",target:n,purpose:e})},logEventStopped:function(t,n,e){i.push({outcome:"stopped",target:n,purpose:e})},logNoParent:function(t,n,e){i.push({outcome:"no-parent",target:n,purpose:e})},logEventNoHandlers:function(t,n){i.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,e){i.push({outcome:"response",purpose:e,target:n})},write:function(){var t=(new Date).getTime();D(["mousemove","mouseover","mouseout",Bo()],o)||H.console.log(o,{event:o,time:t-u,target:r.dom(),sequence:F(i,function(t){return D(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Zr(t.target)+")":t.outcome})})}}),c=e(a);return a.write(),c;case $o.STOP:return!0}},Su=["alloy/data/Fields","alloy/debugging/Debugging"],Cu=function(t,n,e){return wu(t,n,e)},ku=nt({logEventCut:tt,logEventStopped:tt,logNoParent:tt,logEventNoHandlers:tt,logEventResponse:tt,write:tt}),Ou=nt([Pn("menu"),Pn("selectedMenu")]),Eu=nt([Pn("item"),Pn("selectedItem")]),Tu=(nt(pn(Eu().concat(Ou()))),nt(pn(Eu()))),Bu=Wn("initSize",[Pn("numColumns"),Pn("numRows")]),Au=function(){return Wn("markers",[Pn("backgroundMenu")].concat(Ou()).concat(Eu()))},Du=function(t){return Wn("markers",F(t,Pn))},_u=function(t,n,e){!function(){var t=new Error;if(t.stack===undefined)return;var n=t.stack.split("\n");N(n,function(n){return 0<n.indexOf("alloy")&&!_(Su,function(t){return-1<n.indexOf(t)})}).getOr(yu)}();return wn(n,n,e,On(function(e){return z.value(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(undefined,t)})}))},Mu=function(t){return _u(0,t,St(tt))},Fu=function(t){return _u(0,t,St(et.none))},Iu=function(t){return _u(0,t,Ct())},Ru=function(t){return _u(0,t,Ct())},Vu=function(t,n){return ae(t,nt(n))},Nu=function(t){return ae(t,d)},Hu=nt(Bu),Pu=function(e,o,r){return Cr(function(t,n){r(t,e,o)})},zu=function(t,n,e,o,r,i){var u,a,c=gn(t),s=Qn(n,[(u="config",a=t,qn(u,gn(a)))]);return Uu(c,s,n,e,o,r,i)},Lu=function(r,i,u){var t,n,e,o,a,c;return t=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=[e].concat(t);return e.config({name:nt(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(t){var n=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,t.config,t.state].concat(n))})},n=u,e=i.toString(),o=e.indexOf(")")+1,a=e.indexOf("("),c=e.substring(a+1,o-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:n,parameters:gi(c.slice(0,1).concat(c.slice(3)))}},t},ju=function(t){return{key:t,value:undefined}},Uu=function(e,t,o,r,n,i,u){var a=function(t){return Nt(t,o)?t[o]():et.none()},c=st(n,function(t,n){return Lu(o,t,n)}),s=st(i,function(t,n){return pi(t,n)}),f=P({},s,c,{revoke:g(ju,o),config:function(t){var n=An(o+"-config",e,t);return{key:o,value:{config:n,me:f,configAsRaw:xt(function(){return An(o+"-config",e,t)}),initialConfig:t,state:u}}},schema:function(){return t},exhibit:function(t,e){return a(t).bind(function(n){return Ft(r,"exhibit").map(function(t){return t(e,n.config,n.state)})}).getOr(Si({}))},name:function(){return o},handlers:function(t){return a(t).map(function(t){return Mt("events",function(t,n){return{}})(r)(t.config,t.state)}).getOr({})}});return f},Wu=function(t){return Rt(t)},Gu=gn([Pn("fields"),Pn("name"),Zn("active",{}),Zn("apis",{}),Zn("state",yi),Zn("extra",{})]),Xu=function(t){var n=An("Creating behaviour: "+t.name,Gu,t);return zu(n.fields,n.name,n.active,n.apis,n.extra,n.state)},Yu=gn([Pn("branchKey"),Pn("branches"),Pn("name"),Zn("active",{}),Zn("apis",{}),Zn("state",yi),Zn("extra",{})]),qu=function(t){var n,e,o,r,i,u,a,c,s=An("Creating behaviour: "+t.name,Yu,t);return n=_n(s.branchKey,s.branches),e=s.name,o=s.active,r=s.apis,i=s.extra,u=s.state,c=Qn(e,[qn("config",a=n)]),Uu(a,c,e,o,r,i,u)},Ku=nt(undefined),$u=/* */Object.freeze({events:function(a){return fr([mr(xo(),function(r,i){var t,n,u=a.channels,e=ut(u),o=(t=e,(n=i).universal()?t:I(t,function(t){return D(n.channels(),t)}));W(o,function(t){var n=u[t],e=n.schema,o=An("channel["+t+"] data\nReceiver: "+Zr(r.element()),e,i.data());n.onReceive(r,o)})})])}}),Ju=[zn("channels",En(z.value,gn([Iu("onReceive"),Zn("schema",Mn())])))],Qu=Xu({fields:Ju,name:"receiving",active:$u}),Zu=/* */Object.freeze({exhibit:function(t,n){return Si({classes:[],styles:n.useFixed?{}:{position:"relative"}})}}),ta=function(e,o){return{left:nt(e),top:nt(o),translate:function(t,n){return ta(e+t,o+n)}}},na=ta,ea=function(t,n){return t!==undefined?t:n!==undefined?n:0},oa=function(t){var n,e,o=t.dom().ownerDocument,r=o.body,i=(n=fe.fromDom(o),(e=n.dom())===e.window&&n instanceof H.Window?n:er(n)?e.defaultView||e.parentWindow:null),u=o.documentElement,a=ea(i.pageYOffset,u.scrollTop),c=ea(i.pageXOffset,u.scrollLeft),s=ea(u.clientTop,r.clientTop),f=ea(u.clientLeft,r.clientLeft);return ra(t).translate(c-f,a-s)},ra=function(t){var n,e,o,r=t.dom(),i=r.ownerDocument,u=i.body,a=fe.fromDom(i.documentElement);return u===r?na(u.offsetLeft,u.offsetTop):(n=t,e=a||fe.fromDom(H.document.documentElement),ur(n,g(qe,e)).isSome()?(o=r.getBoundingClientRect(),na(o.left,o.top)):na(0,0))},ia=(Pe.detect().browser.isSafari(),function(t){var n=t!==undefined?t.dom():H.document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return na(e,o)});function ua(o,r){var t=function(t){var n=r(t);if(n<=0||null===n){var e=Xi(t,o);return parseFloat(e)||0}return n},i=function(r,t){return V(t,function(t,n){var e=Xi(r,n),o=e===undefined?0:parseInt(e,10);return isNaN(o)?t:t+o},0)};return{set:function(t,n){if(!U(n)&&!n.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+n);var e=t.dom();Li(e)&&(e.style[o]=n+"px")},get:t,getOuter:t,aggregate:i,max:function(t,n,e){var o=i(t,e);return o<n?n-o:0}}}var aa=ua("width",function(t){return t.dom().offsetWidth}),ca=function(t){return aa.get(t)},sa=function(t){return aa.getOuter(t)},fa=ua("height",function(t){var n=t.dom();return or(t)?n.getBoundingClientRect().height:n.offsetHeight}),la=function(t){return fa.get(t)},da=function(t){return fa.getOuter(t)},ma=Br(["x","y","width","height","maxHeight","direction","classes","label","candidateYforTest"],[]),ga=Or("position","left","top","right","bottom"),pa=pt([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),ha=pa.southeast,va=pa.southwest,ba=pa.northeast,ya=pa.northwest,xa=pa.south,wa=pa.north,Sa=pa.east,Ca=pa.west,ka=Or("point","width","height"),Oa=Or("x","y","width","height"),Ea=function(t,n,e,o){return{x:nt(t),y:nt(n),width:nt(e),height:nt(o),right:nt(t+e),bottom:nt(n+o)}},Ta=function(t){var n=oa(t),e=sa(t),o=da(t);return Ea(n.left(),n.top(),e,o)},Ba=function(o,t){return o.view(t).fold(nt([]),function(t){var n=o.owner(t),e=Ba(o,n);return[t].concat(e)})},Aa=/* */Object.freeze({view:function(t){return(t.dom()===H.document?et.none():et.from(t.dom().defaultView.frameElement)).map(fe.fromDom)},owner:function(t){return Ar(t)}}),Da=function(o){var t,n,e,r,i=fe.fromDom(H.document),u=ia(i);return(t=o,e=(n=Aa).owner(t),r=Ba(n,e),et.some(r)).fold(g(oa,o),function(t){var n=ra(o),e=R(t,function(t,n){var e=ra(n);return{left:t.left+e.left(),top:t.top+e.top()}},{left:0,top:0});return na(e.left+n.left()+u.left(),e.top+n.top()+u.top())})},_a=function(){var t=H.window.innerWidth,n=H.window.innerHeight,e=fe.fromDom(H.document),o=ia(e);return Ea(o.left(),o.top(),t,n)},Ma=pt([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Fa=function(t,n,e,o,r,i){var u,a,c,s,f,l,d,m,g,p=n.x()-e,h=n.y()-o,v=r-(p+n.width()),b=i-(h+n.height()),y=et.some(p),x=et.some(h),w=et.some(v),S=et.some(b),C=et.none();return u=n.direction(),a=function(){return ga(t,y,x,C,C)},c=function(){return ga(t,C,x,w,C)},s=function(){return ga(t,y,C,C,S)},f=function(){return ga(t,C,C,w,S)},l=function(){return ga(t,y,x,C,C)},d=function(){return ga(t,y,C,C,S)},m=function(){return ga(t,y,x,C,C)},g=function(){return ga(t,C,x,w,C)},u.fold(a,c,s,f,l,d,m,g)},Ia=function(t,n){var e=g(Da,n),o=t.fold(e,e,function(){var t=ia();return Da(n).translate(-t.left(),-t.top())}),r=sa(n),i=da(n);return Ea(o.left(),o.top(),r,i)},Ra=Ma.relative,Va=Ma.fixed,Na=Or("anchorBox","origin"),Ha=pt([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Pa=function(t,N,H,P,z){var L=H.width(),j=H.height(),o=function(t,o,r,i){var n,e,u,a,c,s,f,l,d,m,g,p,h,v,b,y,x,w,S,C,k,O,E,T,B,A,D,_,M,F,I,R,V=t(N,H,P);return(e=L,u=j,a=z,d=(n=V).x(),m=n.y(),g=n.bubble().offset().left(),p=n.bubble().offset().top(),h=a.x(),v=a.y(),b=a.width(),y=a.height(),C=v<=(w=m+p),k=(S=h<=(x=d+g))&&C,O=x+e<=h+b&&w+u<=v+y,E=S?Math.min(e,h+b-x):Math.abs(h-(x+e)),T=C?Math.min(u,v+y-w):Math.abs(v-(w+u)),B=a.x()+a.width(),A=Math.max(a.x(),x),D=Math.min(A,B),M=nt((_=C?w:w+(u-T))+T-v),F=nt(v+y-_),c=n.direction(),f=s=F,l=M,I=c.fold(s,s,l,l,s,l,f,f),R=ma({x:D,y:_,width:E,height:T,maxHeight:I,direction:n.direction(),classes:{on:n.bubble().classesOn(),off:n.bubble().classesOff()},label:n.label(),candidateYforTest:w}),k&&