lj-publish-test3
Version:
A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features
9 lines • 171 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(v){"use strict";var y=function(){return(y=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function a(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}var x=function(){},p=function(t,r){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))}},h=function(n){return function(){return n}},b=function(n){return n};function l(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var n,e,t,r,o,i,u,w=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return!t.apply(null,n)}},c=function(n){return function(){throw new Error(n)}},f=function(n){return n()},s=h(!1),d=h(!0),m=s,g=d,S=function(){return O},O=(r={fold:function(n,e){return n()},is:m,isSome:m,isNone:g,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:e,map:S,ap:S,each:function(){},bind:S,flatten:S,exists:m,forall:g,filter:S,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:h("none()")},Object.freeze&&Object.freeze(r),r),T=function(t){var n=function(){return t},e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:g,isNone:m,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return T(n(t))},ap:function(n){return n.fold(S,function(n){return T(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(t)?o:O},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(m,function(n){return e(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},k={some:T,none:S,from:function(n){return null===n||n===undefined?O:T(n)}},E=Object.keys,C=Object.hasOwnProperty,D=function(n,e){for(var t=E(n),r=0,o=t.length;r<o;r++){var i=t[r];e(n[i],i,n)}},M=function(n,r){return I(n,function(n,e,t){return{k:e,v:r(n,e,t)}})},I=function(r,o){var i={};return D(r,function(n,e){var t=o(n,e,r);i[t.k]=t.v}),i},R=function(n,t){var r=[];return D(n,function(n,e){r.push(t(n,e))}),r},B=function(n,e){return C.call(n,e)},A=h("touchstart"),F=h("touchmove"),V=h("touchend"),N=h("mousedown"),j=h("mousemove"),H=h("mouseup"),z=h("mouseover"),P=h("keydown"),L=h("keyup"),G=h("input"),$=h("change"),U=h("click"),W=h("transitionend"),_=h("selectstart"),X=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},q=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return K(r(1),r(2))},Y=function(){return K(0,0)},K=function(n,e){return{major:n,minor:e}},J={nu:K,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?Y():q(n,t)},unknown:Y},Q="Edge",Z="Chrome",nn="Opera",en="Firefox",tn="Safari",rn=function(n,e){return function(){return e===n}},on=function(n){var e=n.current;return{current:e,version:n.version,isEdge:rn(Q,e),isChrome:rn(Z,e),isIE:rn("IE",e),isOpera:rn(nn,e),isFirefox:rn(en,e),isSafari:rn(tn,e)}},un={unknown:function(){return on({current:undefined,version:J.unknown()})},nu:on,edge:h(Q),chrome:h(Z),ie:h("IE"),opera:h(nn),firefox:h(en),safari:h(tn)},cn="Windows",an="Android",fn="Solaris",sn="FreeBSD",ln=function(n,e){return function(){return e===n}},dn=function(n){var e=n.current;return{current:e,version:n.version,isWindows:ln(cn,e),isiOS:ln("iOS",e),isAndroid:ln(an,e),isOSX:ln("OSX",e),isLinux:ln("Linux",e),isSolaris:ln(fn,e),isFreeBSD:ln(sn,e)}},mn={unknown:function(){return dn({current:undefined,version:J.unknown()})},nu:dn,windows:h(cn),ios:h("iOS"),android:h(an),linux:h("Linux"),osx:h("OSX"),solaris:h(fn),freebsd:h(sn)},gn=function(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e}(n)===e}},pn=gn("string"),vn=gn("object"),hn=gn("array"),bn=gn("boolean"),yn=gn("function"),xn=gn("number"),wn=Array.prototype.slice,Sn=(o=Array.prototype.indexOf)===undefined?function(n,e){return Bn(n,e)}:function(n,e){return o.call(n,e)},On=function(n,e){return-1<Sn(n,e)},Tn=function(n,e){return Rn(n,e).isSome()},kn=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var i=n[o];r[o]=e(i,o,n)}return r},En=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t,n)}},Cn=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var i=n[r];e(i,r,n)&&t.push(i)}return t},Dn=function(n,e,t){return function(n,e){for(var t=n.length-1;0<=t;t--)e(n[t],t,n)}(n,function(n){t=e(t,n)}),t},Mn=function(n,e,t){return En(n,function(n){t=e(t,n)}),t},In=function(n,e){for(var t=0,r=n.length;t<r;t++){var o=n[t];if(e(o,t,n))return k.some(o)}return k.none()},Rn=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t,n))return k.some(t)}return k.none()},Bn=function(n,e){for(var t=0,r=n.length;t<r;++t)if(n[t]===e)return t;return-1},An=Array.prototype.push,Fn=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!Array.prototype.isPrototypeOf(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);An.apply(e,n[t])}return e},Vn=function(n,e){var t=kn(n,e);return Fn(t)},Nn=function(n,e){for(var t=0,r=n.length;t<r;++t){if(!0!==e(n[t],t,n))return!1}return!0},jn=function(n){var e=wn.call(n,0);return e.reverse(),e},Hn=function(n){return[n]},zn=(yn(Array.from)&&Array.from,function(n,e){var t=String(e).toLowerCase();return In(n,function(n){return n.search(t)})}),Pn=function(n,t){return zn(n,t).map(function(n){var e=J.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Ln=function(n,t){return zn(n,t).map(function(n){var e=J.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Gn=function(n,e){return-1!==n.indexOf(e)},$n=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Un=function(e){return function(n){return Gn(n,e)}},Wn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Gn(n,"edge/")&&Gn(n,"chrome")&&Gn(n,"safari")&&Gn(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,$n],search:function(n){return Gn(n,"chrome")&&!Gn(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Gn(n,"msie")||Gn(n,"trident")}},{name:"Opera",versionRegexes:[$n,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Un("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Un("firefox")},{name:"Safari",versionRegexes:[$n,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Gn(n,"safari")||Gn(n,"mobile/"))&&Gn(n,"applewebkit")}}],_n=[{name:"Windows",search:Un("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Gn(n,"iphone")||Gn(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Un("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Un("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Un("linux"),versionRegexes:[]},{name:"Solaris",search:Un("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Un("freebsd"),versionRegexes:[]}],Xn={browsers:h(Wn),oses:h(_n)},qn=function(n){var e,t,r,o,i,u,c,a,f,s,l,d=Xn.browsers(),m=Xn.oses(),g=Pn(d,n).fold(un.unknown,un.nu),p=Ln(m,n).fold(mn.unknown,mn.nu);return{browser:g,os:p,deviceType:(t=g,r=n,o=(e=p).isiOS()&&!0===/ipad/i.test(r),i=e.isiOS()&&!o,u=e.isAndroid()&&3===e.version.major,c=e.isAndroid()&&4===e.version.major,a=o||u||c&&!0===/mobile/i.test(r),f=e.isiOS()||e.isAndroid(),s=f&&!a,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),{isiPad:h(o),isiPhone:h(i),isTablet:h(a),isPhone:h(s),isTouch:h(f),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:h(l)})}},Yn={detect:X(function(){var n=v.navigator.userAgent;return qn(n)})},Kn={tap:h("alloy.tap")},Jn=h("alloy.focus"),Qn=h("alloy.blur.post"),Zn=h("alloy.paste.post"),ne=h("alloy.receive"),ee=h("alloy.execute"),te=h("alloy.focus.item"),re=Kn.tap,oe=Yn.detect().deviceType.isTouch()?Kn.tap:U,ie=h("alloy.longpress"),ue=h("alloy.system.init"),ce=h("alloy.system.attached"),ae=h("alloy.system.detached"),fe=h("alloy.focusmanager.shifted"),se=h("alloy.highlight"),le=h("alloy.dehighlight"),de=function(n,e){ve(n,n.element(),e,{})},me=function(n,e,t){ve(n,n.element(),e,t)},ge=function(n){de(n,ee())},pe=function(n,e,t){ve(n,e,t,{})},ve=function(n,e,t,r){var o=y({target:e},r);n.getSystem().triggerEvent(t,e,M(o,h))},he=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:h(n)}},be={fromHtml:function(n,e){var t=(e||v.document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw v.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return he(t.childNodes[0])},fromTag:function(n,e){var t=(e||v.document).createElement(n);return he(t)},fromText:function(n,e){var t=(e||v.document).createTextNode(n);return he(t)},fromDom:he,fromPoint:function(n,e,t){var r=n.dom();return k.from(r.elementFromPoint(e,t)).map(he)}},ye=(v.Node.ATTRIBUTE_NODE,v.Node.CDATA_SECTION_NODE,v.Node.COMMENT_NODE,v.Node.DOCUMENT_NODE),xe=(v.Node.DOCUMENT_TYPE_NODE,v.Node.DOCUMENT_FRAGMENT_NODE,v.Node.ELEMENT_NODE),we=v.Node.TEXT_NODE,Se=(v.Node.PROCESSING_INSTRUCTION_NODE,v.Node.ENTITY_REFERENCE_NODE,v.Node.ENTITY_NODE,v.Node.NOTATION_NODE,function(n){return n.dom().nodeName.toLowerCase()}),Oe=function(e){return function(n){return n.dom().nodeType===e}},Te=Oe(xe),ke=Oe(we),Ee=function(n){var e=ke(n)?n.dom().parentNode:n.dom();return e!==undefined&&null!==e&&e.ownerDocument.body.contains(e)},Ce=X(function(){return De(be.fromDom(v.document))}),De=function(n){var e=n.dom().body;if(null===e||e===undefined)throw new Error("Body is not available yet");return be.fromDom(e)},Me=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return En(e,function(n,e){r[n]=h(t[e])}),r}},Ie=function(n){return n.slice(0).sort()},Re=function(e,n){if(!hn(n))throw new Error("The "+e+" fields must be an array. Was: "+n+".");En(n,function(n){if(!pn(n))throw new Error("The value "+n+" in the "+e+" fields was not a string.")})},Be=function(o,i){var t,u=o.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return Re("required",o),Re("optional",i),t=Ie(u),In(t,function(n,e){return e<t.length-1&&n===t[e+1]}).each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}),function(e){var t=E(e);Nn(o,function(n){return On(t,n)})||function(n,e){throw new Error("All required keys ("+Ie(n).join(", ")+") were not specified. Specified keys were: "+Ie(e).join(", ")+".")}(o,t);var n=Cn(t,function(n){return!On(u,n)});0<n.length&&function(n){throw new Error("Unsupported keys for object: "+Ie(n).join(", "))}(n);var r={};return En(o,function(n){r[n]=h(e[n])}),En(i,function(n){r[n]=h(Object.prototype.hasOwnProperty.call(e,n)?k.some(e[n]):k.none())}),r}},Ae="undefined"!=typeof v.window?v.window:Function("return this;")(),Fe=function(n,e){return function(n,e){for(var t=e!==undefined&&null!==e?e:Ae,r=0;r<n.length&&t!==undefined&&null!==t;++r)t=t[n[r]];return t}(n.split("."),e)},Ve={getOrDie:function(n,e){var t=Fe(n,e);if(t===undefined||null===t)throw n+" not available on this browser";return t}},Ne=function(){return Ve.getOrDie("Node")},je=function(n,e,t){return 0!=(n.compareDocumentPosition(e)&t)},He=function(n,e){return je(n,e,Ne().DOCUMENT_POSITION_CONTAINED_BY)},ze=xe,Pe=ye,Le=function(n,e){var t=n.dom();if(t.nodeType!==ze)return!1;if(t.matches!==undefined)return t.matches(e);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(e);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(e);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Ge=function(n){return n.nodeType!==ze&&n.nodeType!==Pe||0===n.childElementCount},$e=function(n,e){var t=e===undefined?v.document:e.dom();return Ge(t)?[]:kn(t.querySelectorAll(n),be.fromDom)},Ue=function(n,e){var t=e===undefined?v.document:e.dom();return Ge(t)?k.none():k.from(t.querySelector(n)).map(be.fromDom)},We=function(n,e){return n.dom()===e.dom()},_e=(Yn.detect().browser.isIE(),function(n){return be.fromDom(n.dom().ownerDocument)}),Xe=function(n){var e=n.dom();return k.from(e.parentNode).map(be.fromDom)},qe=function(n){var e=n.dom();return kn(e.childNodes,be.fromDom)},Ye=function(n,e){var t=n.dom().childNodes;return k.from(t[e]).map(be.fromDom)},Ke=(Me("element","offset"),function(e,t){Xe(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})}),Je=function(n,e){var t;(t=n.dom(),k.from(t.nextSibling).map(be.fromDom)).fold(function(){Xe(n).each(function(n){Ze(n,e)})},function(n){Ke(n,e)})},Qe=function(e,t){Ye(e,0).fold(function(){Ze(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},Ze=function(n,e){n.dom().appendChild(e.dom())},nt=function(e,n){En(n,function(n){Ze(e,n)})},et=function(n){n.dom().textContent="",En(qe(n),function(n){tt(n)})},tt=function(n){var e=n.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},rt=function(n){de(n,ae());var e=n.components();En(e,rt)},ot=function(n){var e=n.components();En(e,ot),de(n,ce())},it=function(n,e){ut(n,e,Ze)},ut=function(n,e,t){n.getSystem().addToWorld(e),t(n.element(),e.element()),Ee(n.element())&&ot(e),n.syncComponents()},ct=function(n){rt(n),tt(n.element()),n.getSystem().removeFromWorld(n)},at=function(e){var n=Xe(e.element()).bind(function(n){return e.getSystem().getByDom(n).fold(k.none,k.some)});ct(e),n.each(function(n){n.syncComponents()})},ft=function(n,e,t){t(n,e.element());var r=qe(e.element());En(r,function(n){e.getByDom(n).each(ot)})},st=function(t){return{is:function(n){return t===n},isValue:d,isError:s,getOr:h(t),getOrThunk:h(t),getOrDie:h(t),or:function(n){return st(t)},orThunk:function(n){return st(t)},fold:function(n,e){return e(t)},map:function(n){return st(n(t))},mapError:function(n){return st(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOption:function(){return k.some(t)}}},lt=function(t){return{is:s,isValue:s,isError:d,getOr:b,getOrThunk:function(n){return n()},getOrDie:function(){return c(String(t))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,e){return n(t)},map:function(n){return lt(t)},mapError:function(n){return lt(n(t))},each:x,bind:function(n){return lt(t)},exists:s,forall:d,toOption:k.none}},dt={value:st,error:lt,fromOption:function(n,e){return n.fold(function(){return lt(e)},st)}},mt=function(u){if(!hn(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var c=[],t={};return En(u,function(n,r){var e=E(n);if(1!==e.length)throw new Error("one and only one name per case");var o=e[0],i=n[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!hn(i))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+n);for(var t=new Array(n),e=0;e<t.length;e++)t[e]=arguments[e];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[r].apply(null,t)},match:function(n){var e=E(n);if(c.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+e.join(","));if(!Nn(c,function(n){return On(e,n)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+c.join(", "));return n[o].apply(null,t)},log:function(n){v.console.log(n,{constructors:c,constructor:o,params:t})}}}}),t},gt=Object.prototype.hasOwnProperty,pt=function(u){return function(){for(var n=new Array(arguments.length),e=0;e<n.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<n.length;r++){var o=n[r];for(var i in o)gt.call(o,i)&&(t[i]=u(t[i],o[i]))}return t}},vt=pt(function(n,e){return vn(n)&&vn(e)?vt(n,e):e}),ht=pt(function(n,e){return e}),bt=mt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),yt=function(n){return bt.defaultedThunk(h(n))},xt=bt.strict,wt=bt.asOption,St=bt.defaultedThunk,Ot=bt.mergeWithThunk,Tt=function(e){return function(n){return B(n,e)?k.from(n[e]):k.none()}},kt=function(n,e){return Tt(e)(n)},Et=function(n,e){var t={};return t[n]=e,t},Ct=(mt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n,e){return t=e,r={},D(n,function(n,e){On(t,e)||(r[e]=n)}),r;var t,r}),Dt=function(n){return Tt(n)},Mt=function(n,e){return t=n,r=e,function(n){return B(n,t)?n[t]:r};var t,r},It=function(n,e){return kt(n,e)},Rt=function(n,e){return Et(n,e)},Bt=function(n){return e={},En(n,function(n){e[n.key]=n.value}),e;var e},At=function(n,e){var t,r,o,i,u,c=(t=[],r=[],En(n,function(n){n.fold(function(n){t.push(n)},function(n){r.push(n)})}),{errors:t,values:r});return 0<c.errors.length?(u=c.errors,p(dt.error,Fn)(u)):(i=e,0===(o=c.values).length?dt.value(i):dt.value(vt(i,ht.apply(undefined,o))))},Ft=function(n,e){return B(t=n,r=e)&&t[r]!==undefined&&null!==t[r];var t,r};(u=i||(i={}))[u.Error=0]="Error",u[u.Value=1]="Value";var Vt,Nt,jt=function(n,e,t){return n.stype===i.Error?e(n.serror):t(n.svalue)},Ht=function(n){return{stype:i.Value,svalue:n}},zt=function(n){return{stype:i.Error,serror:n}},Pt=function(n){return n.fold(zt,Ht)},Lt=function(n){return jt(n,dt.error,dt.value)},Gt=Ht,$t=function(n){var e=[],t=[];return En(n,function(n){jt(n,function(n){return t.push(n)},function(n){return e.push(n)})}),{values:e,errors:t}},Ut=zt,Wt=function(n,e){return n.stype===i.Value?e(n.svalue):n},_t=function(n,e){return n.stype===i.Error?e(n.serror):n},Xt=function(n,e){return n.stype===i.Value?{stype:i.Value,svalue:e(n.svalue)}:n},qt=function(n,e){return n.stype===i.Error?{stype:i.Error,serror:e(n.serror)}:n},Yt=function(n){return p(Ut,Fn)(n)},Kt=function(n,e){var t,r,o=$t(n);return 0<o.errors.length?Yt(o.errors):(t=o.values,r=e,0<t.length?Gt(vt(r,ht.apply(undefined,t))):Gt(r))},Jt=function(n){var e=$t(n);return 0<e.errors.length?Yt(e.errors):Gt(e.values)},Qt=mt([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),Zt=mt([{field:["name","presence","type"]},{state:["name"]}]),nr=function(){return Ve.getOrDie("JSON")},er=function(n,e,t){return nr().stringify(n,e,t)},tr=function(n){return vn(n)&&100<E(n).length?" removed due to size":er(n,null,2)},rr=function(n,e){return Ut([{path:n,getErrorInfo:e}])},or=mt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),ir=function(t,r,o){return kt(r,o).fold(function(){return n=o,e=r,rr(t,function(){return'Could not find valid *strict* value for "'+n+'" in '+tr(e)});var n,e},Gt)},ur=function(n,e,t){var r=kt(n,e).fold(function(){return t(n)},b);return Gt(r)},cr=function(c,a,n,f){return n.fold(function(o,t,n,r){var i=function(n){var e=r.extract(c.concat([o]),f,n);return Xt(e,function(n){return Et(t,f(n))})},u=function(n){return n.fold(function(){var n=Et(t,f(k.none()));return Gt(n)},function(n){var e=r.extract(c.concat([o]),f,n);return Xt(e,function(n){return Et(t,f(k.some(n)))})})};return n.fold(function(){return Wt(ir(c,a,o),i)},function(n){return Wt(ur(a,o,n),i)},function(){return Wt(Gt(kt(a,o)),u)},function(n){return Wt((t=n,r=kt(e=a,o).map(function(n){return!0===n?t(e):n}),Gt(r)),u);var e,t,r},function(n){var e=n(a),t=Xt(ur(a,o,h({})),function(n){return vt(e,n)});return Wt(t,i)})},function(n,e){var t=e(a);return Gt(Et(n,f(t)))})},ar=function(r){return{extract:function(t,n,e){return _t(r(e,n),function(n){return e=n,rr(t,function(){return e});var e})},toString:function(){return"val"},toDsl:function(){return Qt.itemOf(r)}}},fr=function(n){var a=sr(n),f=Dn(n,function(e,n){return n.fold(function(n){return vt(e,Rt(n,!0))},h(e))},{});return{extract:function(n,e,t){var r,o,i,u=bn(t)?[]:(o=E(r=t),Cn(o,function(n){return Ft(r,n)})),c=Cn(u,function(n){return!Ft(f,n)});return 0===c.length?a.extract(n,e,t):(i=c,rr(n,function(){return"There are unsupported fields: ["+i.join(", ")+"] specified"}))},toString:a.toString,toDsl:a.toDsl}},sr=function(c){return{extract:function(n,e,t){return r=n,o=t,i=e,u=kn(c,function(n){return cr(r,o,n,i)}),Kt(u,{});var r,o,i,u},toString:function(){return"obj{\n"+kn(c,function(n){return n.fold(function(n,e,t,r){return n+" -> "+r.toString()},function(n,e){return"state("+n+")"})}).join("\n")+"}"},toDsl:function(){return Qt.objOf(kn(c,function(n){return n.fold(function(n,e,t,r){return Zt.field(n,t,r)},function(n,e){return Zt.state(n)})}))}}},lr=function(t,i){var u=function(n,e){return(o=ar(t),{extract:function(t,r,n){var e=kn(n,function(n,e){return o.extract(t.concat(["["+e+"]"]),r,n)});return Jt(e)},toString:function(){return"array("+o.toString()+")"},toDsl:function(){return Qt.arrOf(o)}}).extract(n,b,e);var o};return{extract:function(t,r,o){var n=E(o),e=u(t,n);return Wt(e,function(n){var e=kn(n,function(n){return or.field(n,n,xt(),i)});return sr(e).extract(t,r,o)})},toString:function(){return"setOf("+i.toString()+")"},toDsl:function(){return Qt.setOf(t,i)}}},dr=h(ar(Gt)),mr=or.state,gr=or.field,pr=function(t,e,r,o,i){return It(o,i).fold(function(){return n=o,e=i,rr(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+tr(n)});var n,e},function(n){return sr(n).extract(t.concat(["branch: "+i]),e,r)})},vr=function(o,i){return{extract:function(e,t,r){return It(r,o).fold(function(){return n=o,rr(e,function(){return'Choice schema did not contain choice key: "'+n+'"'});var n},function(n){return pr(e,t,r,i,n)})},toString:function(){return"chooseOn("+o+"). Possible values: "+E(i)},toDsl:function(){return Qt.choiceOf(o,i)}}},hr=ar(Gt),br=function(e){return ar(function(n){return e(n).fold(Ut,Gt)})},yr=function(e,n){return lr(function(n){return Pt(e(n))},n)},xr=function(n,e,t){return Lt((r=n,o=b,i=t,u=e.extract([r],o,i),qt(u,function(n){return{input:i,errors:n}})));var r,o,i,u},wr=function(n){return n.fold(function(n){throw new Error(Or(n))},b)},Sr=function(n,e,t){return wr(xr(n,e,t))},Or=function(n){return"Errors: \n"+(e=n.errors,t=10<e.length?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,kn(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()}))+"\n\nInput object: "+tr(n.input);var e,t},Tr=function(n,e){return vr(n,e)},kr=h(hr),Er=(Vt=yn,Nt="function",ar(function(n){var e=typeof n;return Vt(n)?Gt(n):Ut("Expected type: "+Nt+" but got: "+e)})),Cr=function(n){return gr(n,n,xt(),dr())},Dr=function(n,e){return gr(n,n,xt(),e)},Mr=function(n,e){return gr(n,n,xt(),sr(e))},Ir=function(n){return gr(n,n,wt(),dr())},Rr=function(n,e){return gr(n,n,wt(),e)},Br=function(n,e){return Rr(n,sr(e))},Ar=function(n,e){return Rr(n,fr(e))},Fr=function(n,e){return gr(n,n,yt(e),dr())},Vr=function(n,e,t){return gr(n,n,yt(e),t)},Nr=function(n,e){return mr(n,e)},jr=function(n,e){return We(n.element(),e.event().target())},Hr=function(n){if(!Ft(n,"can")&&!Ft(n,"abort")&&!Ft(n,"run"))throw new Error("EventHandler defined by: "+er(n,null,2)+" does not have can, abort, or run!");return Sr("Extracting event.handler",fr([Fr("can",h(!0)),Fr("abort",h(!1)),Fr("run",x)]),n)},zr=function(t){var e,r,o,i,n=(e=t,r=function(n){return n.can},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Mn(e,function(n,e){return n&&r(e).apply(undefined,t)},!0)}),u=(o=t,i=function(n){return n.abort},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Mn(o,function(n,e){return n||i(e).apply(undefined,t)},!1)});return Hr({can:n,abort:u,run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];En(t,function(n){n.run.apply(undefined,e)})}})};function Pr(n,e,t,r,o){return n(t,r)?k.some(t):yn(o)&&o(t)?k.none():e(t,r,o)}var Lr,Gr,$r,Ur=function(n,e,t){for(var r=n.dom(),o=yn(t)?t:h(!1);r.parentNode;){r=r.parentNode;var i=be.fromDom(r);if(e(i))return k.some(i);if(o(i))break}return k.none()},Wr=function(n,e,t){return Pr(function(n){return e(n)},Ur,n,e,t)},_r=function(n,r){var o=function(n){for(var e=0;e<n.childNodes.length;e++){if(r(be.fromDom(n.childNodes[e])))return k.some(be.fromDom(n.childNodes[e]));var t=o(n.childNodes[e]);if(t.isSome())return t}return k.none()};return o(n.dom())},Xr=function(n,e,t){return Wr(n,function(n){return e(n).isSome()},t).bind(e)},qr=function(n){return Bt(n)},Yr=function(n,e){return{key:n,value:Hr({abort:e})}},Kr=function(n,e){return{key:n,value:Hr({run:e})}},Jr=function(n,e,t){return{key:n,value:Hr({run:function(n){e.apply(undefined,[n].concat(t))}})}},Qr=function(n){return function(t){return{key:n,value:Hr({run:function(n,e){jr(n,e)&&t(n,e)}})}}},Zr=function(n,e,t){var u,r,o=e.partUids[t];return r=o,Kr(u=n,function(n,i){n.getSystem().getByUid(r).each(function(n){var e,t,r,o;t=(e=n).element(),r=u,o=i,e.getSystem().triggerEvent(r,t,o.event())})})},no=function(n){return Kr(n,function(n,e){e.cut()})},eo=Qr(ce()),to=Qr(ae()),ro=Qr(ue()),oo=(Lr=ee(),function(n){return Kr(Lr,n)}),io=function(n){return kn(n,function(n){return r=e="/*",o=(t=n).length-e.length,""!==r&&(t.length<r.length||t.substr(o,o+r.length)!==r)?n:n.substring(0,n.length-"/*".length);var e,t,r,o})},uo=function(n,e){var t=n.toString(),r=t.indexOf(")")+1,o=t.indexOf("("),i=t.substring(o+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:e,parameters:io(i)}},n},co=function(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}},ao=function(t,r,o){return ro(function(n,e){o(n,t,r)})},fo=function(o,i,u){var n,e,t,r,c,a;return n=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=[t].concat(n);return t.config({name:h(o)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+o+". Using API: "+u)},function(n){var e=Array.prototype.slice.call(r,1);return i.apply(undefined,[t,n.config,n.state].concat(e))})},e=u,t=i.toString(),r=t.indexOf(")")+1,c=t.indexOf("("),a=t.substring(c+1,r-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:e,parameters:io(a.slice(0,1).concat(a.slice(3)))}},n},so=function(n){return{key:n,value:undefined}},lo=function(t,n,r,o,e,i,u){var c=function(n){return Ft(n,r)?n[r]():k.none()},a=M(e,function(n,e){return fo(r,n,e)}),f=M(i,function(n,e){return uo(n,e)}),s=y({},f,a,{revoke:l(so,r),config:function(n){var e=Sr(r+"-config",t,n);return{key:r,value:{config:e,me:s,configAsRaw:X(function(){return Sr(r+"-config",t,n)}),initialConfig:n,state:u}}},schema:function(){return n},exhibit:function(n,t){return c(n).bind(function(e){return It(o,"exhibit").map(function(n){return n(t,e.config,e.state)})}).getOr(co({}))},name:function(){return r},handlers:function(n){return c(n).map(function(n){return Mt("events",function(n,e){return{}})(o)(n.config,n.state)}).getOr({})}});return s},mo={init:function(){return go({readState:function(){return"No State required"}})}},go=function(n){return n},po=function(n){return Bt(n)},vo=fr([Cr("fields"),Cr("name"),Fr("active",{}),Fr("apis",{}),Fr("state",mo),Fr("extra",{})]),ho=function(n){var e,t,r,o,i,u,c,a,f=Sr("Creating behaviour: "+n.name,vo,n);return e=f.fields,t=f.name,r=f.active,o=f.apis,i=f.extra,u=f.state,c=fr(e),a=Br(t,[Ar("config",e)]),lo(c,a,t,r,o,i,u)},bo=fr([Cr("branchKey"),Cr("branches"),Cr("name"),Fr("active",{}),Fr("apis",{}),Fr("state",mo),Fr("extra",{})]),yo=h(undefined),xo=function(n,e,t){if(!(pn(t)||bn(t)||xn(t)))throw v.console.error("Invalid call to Attr.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")},wo=function(n,e,t){xo(n.dom(),e,t)},So=function(n,e){var t=n.dom();D(e,function(n,e){xo(t,e,n)})},Oo=function(n,e){var t=n.dom().getAttribute(e);return null===t?undefined:t},To=function(n,e){var t=n.dom();return!(!t||!t.hasAttribute)&&t.hasAttribute(e)},ko=function(n,e){n.dom().removeAttribute(e)},Eo=function(n,e){var t=Oo(n,e);return t===undefined||""===t?[]:t.split(" ")},Co=function(n){return n.dom().classList!==undefined},Do=function(n,e){return o=e,i=Eo(t=n,r="class").concat([o]),wo(t,r,i.join(" ")),!0;var t,r,o,i},Mo=function(n,e){return o=e,0<(i=Cn(Eo(t=n,r="class"),function(n){return n!==o})).length?wo(t,r,i.join(" ")):ko(t,r),!1;var t,r,o,i},Io=function(n,e){Co(n)?n.dom().classList.add(e):Do(n,e)},Ro=function(n){0===(Co(n)?n.dom().classList:Eo(n,"class")).length&&ko(n,"class")},Bo=function(n,e){Co(n)?n.dom().classList.remove(e):Mo(n,e);Ro(n)},Ao=function(n,e){return Co(n)&&n.dom().classList.contains(e)},Fo=function(n,e,t){Bo(n,t),Io(n,e)},Vo=/* */Object.freeze({toAlpha:function(n,e,t){Fo(n.element(),e.alpha,e.omega)},toOmega:function(n,e,t){Fo(n.element(),e.omega,e.alpha)},isAlpha:function(n,e,t){return Ao(n.element(),e.alpha)},isOmega:function(n,e,t){return Ao(n.element(),e.omega)},clear:function(n,e,t){Bo(n.element(),e.alpha),Bo(n.element(),e.omega)}}),No=[Cr("alpha"),Cr("omega")],jo=ho({fields:No,name:"swapping",apis:Vo}),Ho=function(n){var e=n,t=function(){return e};return{get:t,set:function(n){e=n},clone:function(){return Ho(t())}}},zo=function(n){n.dom().focus()},Po=function(n){n.dom().blur()},Lo=function(n){var e=n!==undefined?n.dom():v.document;return k.from(e.activeElement).map(be.fromDom)},Go=function(e){return Lo(_e(e)).filter(function(n){return e.dom().contains(n.dom())})},$o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Uo=tinymce.util.Tools.resolve("tinymce.ThemeManager"),Wo=function(n){var e=v.document.createElement("a");e.target="_blank",e.href=n.href,e.rel="noreferrer noopener";var t=v.document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,v.window,0,0,0,0,0,!1,!1,!1,!1,0,null),v.document.body.appendChild(e),e.dispatchEvent(t),v.document.body.removeChild(e)},_o={formatChanged:h("formatChanged"),orientationChanged:h("orientationChanged"),dropupDismissed:h("dropupDismissed")},Xo=function(n){return n.dom().innerHTML},qo=function(n,e){var t,r,o=_e(n).dom(),i=be.fromDom(o.createDocumentFragment()),u=(t=e,(r=(o||v.document).createElement("div")).innerHTML=t,qe(be.fromDom(r)));nt(i,u),et(n),Ze(n,i)},Yo=function(n){return e=n,t=!1,be.fromDom(e.dom().cloneNode(t));var e,t},Ko=function(n){var e,t,r,o=Yo(n);return e=o,t=be.fromTag("div"),r=be.fromDom(e.dom().cloneNode(!0)),Ze(t,r),Xo(t)},Jo=function(n){return Ko(n)},Qo=/* */Object.freeze({events:function(c){return qr([Kr(ne(),function(o,i){var n,e,u=c.channels,t=E(u),r=(n=t,(e=i).universal()?n:Cn(n,function(n){return On(e.channels(),n)}));En(r,function(n){var e=u[n],t=e.schema,r=Sr("channel["+n+"] data\nReceiver: "+Jo(o.element()),t,i.data());e.onReceive(o,r)})})])}}),Zo=function(n){for(var e=[],t=function(n){e.push(n)},r=0;r<n.length;r++)n[r].each(t);return e},ni=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return k.none()},ei="unknown";($r=Gr||(Gr={}))[$r.STOP=0]="STOP",$r[$r.NORMAL=1]="NORMAL",$r[$r.LOGGING=2]="LOGGING";var ti,ri=Ho({}),oi=function(e,n,t){var r,o,i,u;switch(It(ri.get(),e).orThunk(function(){var n=E(ri.get());return ni(n,function(n){return-1<e.indexOf(n)?k.some(ri.get()[n]):k.none()})}).getOr(Gr.NORMAL)){case Gr.NORMAL:return t(ci());case Gr.LOGGING:var c=(r=e,o=n,i=[],u=(new Date).getTime(),{logEventCut:function(n,e,t){i.push({outcome:"cut",target:e,purpose:t})},logEventStopped:function(n,e,t){i.push({outcome:"stopped",target:e,purpose:t})},logNoParent:function(n,e,t){i.push({outcome:"no-parent",target:e,purpose:t})},logEventNoHandlers:function(n,e){i.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(n,e,t){i.push({outcome:"response",purpose:t,target:e})},write:function(){var n=(new Date).getTime();On(["mousemove","mouseover","mouseout",ue()],r)||v.console.log(r,{event:r,time:n-u,target:o.dom(),sequence:kn(i,function(n){return On(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+Jo(n.target)+")":n.outcome})})}}),a=t(c);return c.write(),a;case Gr.STOP:return!0}},ii=["alloy/data/Fields","alloy/debugging/Debugging"],ui=function(n,e,t){return oi(n,e,t)},ci=h({logEventCut:x,logEventStopped:x,logNoParent:x,logEventNoHandlers:x,logEventResponse:x,write:x}),ai=h([Cr("menu"),Cr("selectedMenu")]),fi=h([Cr("item"),Cr("selectedItem")]),si=(h(sr(fi().concat(ai()))),h(sr(fi()))),li=Mr("initSize",[Cr("numColumns"),Cr("numRows")]),di=function(n,e,t){!function(){var n=new Error;if(n.stack===undefined)return;var e=n.stack.split("\n");In(e,function(e){return 0<e.indexOf("alloy")&&!Tn(ii,function(n){return-1<e.indexOf(n)})}).getOr(ei)}();return gr(e,e,t,br(function(t){return dt.value(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.apply(undefined,n)})}))},mi=function(n){return di(0,n,yt(x))},gi=function(n){return di(0,n,yt(k.none))},pi=function(n){return di(0,n,xt())},vi=function(n){return di(0,n,xt())},hi=function(n,e){return Nr(n,h(e))},bi=function(n){return Nr(n,b)},yi=h(li),xi=[Dr("channels",yr(dt.value,fr([pi("onReceive"),Fr("schema",kr())])))],wi=ho({fields:xi,name:"receiving",active:Qo}),Si=function(n,e,t){var r=e.aria;r.update(n,r,t.get())},Oi=function(e,n,t){n.toggleClass.each(function(n){t.get()?Io(e.element(),n):Bo(e.element(),n)})},Ti=function(n,e,t){Ci(n,e,t,!t.get())},ki=function(n,e,t){t.set(!0),Oi(n,e,t),Si(n,e,t)},Ei=function(n,e,t){t.set(!1),Oi(n,e,t),Si(n,e,t)},Ci=function(n,e,t,r){(r?ki:Ei)(n,e,t)},Di=function(n,e,t){Ci(n,e,t,e.selected)},Mi=/* */Object.freeze({onLoad:Di,toggle:Ti,isOn:function(n,e,t){return t.get()},on:ki,off:Ei,set:Ci}),Ii=/* */Object.freeze({exhibit:function(n,e,t){return co({})},events:function(n,e){var t,r,o,i=(t=n,r=e,o=Ti,oo(function(n){o(n,t,r)})),u=ao(n,e,Di);return qr(Fn([n.toggleOnExecute?[i]:[],[u]]))}}),Ri=function(n,e,t){wo(n.element(),"aria-expanded",t)},Bi=[Fr("selected",!1),Ir("toggleClass"),Fr("toggleOnExecute",!0),Vr("aria",{mode:"none"},Tr("mode",{pressed:[Fr("syncWithExpanded",!1),hi("update",function(n,e,t){wo(n.element(),"aria-pressed",t),e.syncWithExpanded&&Ri(n,e,t)})],checked:[hi("update",function(n,e,t){wo(n.element(),"aria-checked",t)})],expanded:[hi("update",Ri)],selected:[hi("update",function(n,e,t){wo(n.element(),"aria-selected",t)})],none:[hi("update",x)]}))],Ai=ho({fields:Bi,name:"toggling",active:Ii,apis:Mi,state:(ti=!1,{init:function(){var e=Ho(ti);return{get:function(){return e.get()},set:function(n){return e.set(n)},clear:function(){return e.set(ti)},readState:function(){return e.get()}}}})}),Fi=function(t,r){return wi.config({channels:Rt(_o.formatChanged(),{onReceive:function(n,e){e.command===t&&r(n,e.state)}})})},Vi=function(n){return wi.config({channels:Rt(_o.orientationChanged(),{onReceive:n})})},Ni=function(n,e){return{key:n,value:{onReceive:e}}},ji="tinymce-mobile",Hi={resolve:function(n){return ji+"-"+n},prefix:h(ji)},zi=function(n,e){e.ignore||(zo(n.element()),e.onFocus(n))},Pi=/* */Object.freeze({focus:zi,blur:function(n,e){e.ignore||Po(n.element())},isFocused:function(n){return e=n.element(),t=_e(e).dom(),e.dom()===t.activeElement;var e,t}}),Li=/* */Object.freeze({exhibit:function(n,e){var t=e.ignore?{}:{attributes:{tabindex:"-1"}};return co(t)},events:function(t){return qr([Kr(Jn(),function(n,e){zi(n,t),e.stop()})].concat(t.stopMousedown?[Kr(N(),function(n,e){e.event().prevent()})]:[]))}}),Gi=[mi("onFocus"),Fr("stopMousedown",!1),Fr("ignore",!1)],$i=ho({fields:Gi,name:"focusing",active:Li,apis:Pi}),Ui=function(n){return n.style!==undefined&&yn(n.style.getPropertyValue)},Wi=function(n,e,t){if(!pn(t))throw v.console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);Ui(n)&&n.style.setProperty(e,t)},_i=function(n,e,t){var r=n.dom();Wi(r,e,t)},Xi=function(n,e){var t=n.dom();D(e,function(n,e){Wi(t,e,n)})},qi=function(n,e){var t=n.dom(),r=v.window.getComputedStyle(t).getPropertyValue(e),o=""!==r||Ee(n)?r:Yi(t,e);return null===o?undefined:o},Yi=function(n,e){return Ui(n)?n.style.getPropertyValue(e):""},Ki=function(n,e){var t=n.dom(),r=Yi(t,e);return k.from(r).filter(function(n){return 0<n.length})},Ji=function(n,e){var t,r,o=n.dom();r=e,Ui(t=o)&&t.style.removeProperty(r),To(n,"style")&&""===Oo(n,"style").replace(/^\s+|\s+$/g,"")&&ko(n,"style")},Qi=function(n){return n.dom().offsetWidth};function Zi(r,o){var n=function(n){var e=o(n);if(e<=0||null===e){var t=qi(n,r);return parseFloat(t)||0}return e},i=function(o,n){return Mn(n,function(n,e){var t=qi(o,e),r=t===undefined?0:parseInt(t,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!xn(e)&&!e.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+e);var t=n.dom();Ui(t)&&(t.style[r]=e+"px")},get:n,getOuter:n,aggregate:i,max:function(n,e,t){var r=i(n,t);return r<e?e-r:0}}}var nu,eu,tu=Zi("height",function(n){var e=n.dom();return Ee(n)?e.getBoundingClientRect().height:e.offsetHeight}),ru=function(n){return tu.get(n)},ou=function(n,e,t){return Cn(function(n,e){for(var t=yn(e)?e:h(!1),r=n.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=be.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o}(n,t),e)},iu=function(n,e){return Cn(Xe(t=n).map(qe).map(function(n){return Cn(n,function(n){return!We(t,n)})}).getOr([]),e);var t},uu=function(n,e){return $e(e,n)},cu=function(n){return Ue(n)},au=function(n,e,t){return Ur(n,function(n){return Le(n,e)},t)},fu=function(n,e){return Ue(e,n)},su=function(n,e,t){return Pr(Le,au,n,e,t)},lu=function(n,e,t){var r=jn(n.slice(0,e)),o=jn(n.slice(e+1));return In(r.concat(o),t)},du=function(n,e,t){var r=jn(n.slice(0,e));return In(r,t)},mu=function(n,e,t){var r=n.slice(0,e),o=n.slice(e+1);return In(o.concat(r),t)},gu=function(n,e,t){var r=n.slice(e+1);return In(r,t)},pu=function(t){return function(n){var e=n.raw();return On(t,e.which)}},vu=function(n){return function(e){return Nn(n,function(n){return n(e)})}},hu=function(n){return!0===n.raw().shiftKey},bu=function(n){return!0===n.raw().ctrlKey},yu=w(hu),xu=function(n,e){return{matches:n,classification:e}},wu=function(n,e,t,r){var o=n+e;return r<o?t:o<t?r:o},Su=function(n,e,t){return n<=e?e:t<=n?t:n},Ou=function(t,r,n,o){var e=uu(t.element(),"."+r.highlightClass);En(e,function(e){Tn(o,function(n){return n.element()===e})||(Bo(e,r.highlightClass),t.getSystem().getByDom(e).each(function(n){r.onDehighlight(t,n),de(n,le())}))})},Tu=function(n,e,t,r){Ou(n,e,0,[r]),ku(n,e,t,r)||(Io(r.element(),e.highlightClass),e.onHighlight(n,r),de(r,se()))},ku=function(n,e,t,r){return Ao(r.element(),e.highlightClass)},Eu=function(n,e,t,r){var o=uu(n.element(),"."+e.itemClass);return k.from(o[r]).fold(function(){return dt.error("No element found with index "+r)},n.getSystem().getByDom)},Cu=function(e,n,t){return fu(e.element(),"."+n.itemClass).bind(function(n){return e.getSystem().getByDom(n).toOption()})},Du=function(e,n,t){var r=uu(e.element(),"."+n.itemClass);return(0<r.length?k.some(r[r.length-1]):k.none()).bind(function(n){return e.getSystem().getByDom(n).toOption()})},Mu=function(t,e,n,r){var o=uu(t.element(),"."+e.itemClass);return Rn(o,function(n){return Ao(n,e.highlightClass)}).bind(function(n){var e=wu(n,r,0,o.length-1);return t.getSystem().getByDom(o[e]).toOption()})},Iu=function(e,n,t){var r=uu(e.element(),"."+n.itemClass);return Zo(kn(r,function(n){return e.getSystem().getByDom(n).toOption()}))},Ru=/* */Object.freeze({dehighlightAll:function(n,e,t){return Ou(n,e,0,[])},dehighlight:function(n,e,t,r){ku(n,e,t,r)&&(Bo(r.element(),e.highlightClass),e.onDehighlight(n,r),de(r,le()))},highlight:Tu,highlightFirst:function(e,t,r){Cu(e,t).each(function(n){Tu(e,t,r,n)})},highlightLast:function(e,t,r){Du(e,t).each(function(n){Tu(e,t,r,n)})},highlightAt:function(e,t,r,n){Eu(e,t,r,n).fold(function(n){throw new Error(n)},function(n){Tu(e,t,r,n)})},highlightBy:function(e,t,r,n){var o=Iu(e,t);In(o,n).each(function(n){Tu(e,t,r,n)})},isHighlighted:ku,getHighlighted:function(e,n,t){return fu(e.element(),"."+n.highlightClass).bind(function(n){return e.getSystem().getByDom(n).toOption()})},getFirst:Cu,getLast:Du,getPrevious:function(n,e,t){return Mu(n,e,0,-1)},getNext:function(n,e,t){return Mu(n,e,0,1)},getCandidates:Iu}),Bu=[Cr("highlightClass"),Cr("itemClass"),mi("onHighlight"),mi("onDehighlight")],Au=ho({fields:Bu,name:"highlighting",apis:Ru}),Fu=function(n,e,t){e.exists(function(e){return t.exists(function(n){return We(n,e)})})||me(n,fe(),{prevFocus:e,newFocus:t})},Vu=function(){var o=function(n){return Go(n.element())};return{get:o,set:function(n,e){var t=o(n);n.getSystem().triggerFocus(e,n.element());var r=o(n);Fu(n,t,r)}}};(eu=nu||(nu={})).OnFocusMode="onFocus",eu.OnEnterOrSpaceMode="onEnterOrSpace",eu.OnApiMode="onApi";var Nu,ju,Hu,zu,Pu,Lu,Gu,$u,Uu,Wu,_u=function(n,e,t,r,c){var a=function(e,t,n,r,o){var i,u,c=n(e,t,r,o);return(i=c,u=t.event(),In(i,function(n){return n.matches(u)}).map(function(n){return n.classification})).bind(function(n){return n(e,t,r,o)})},o={schema:function(){return n.concat([Fr("focusManager",Vu()),Vr("focusInside","onFocus",br(function(n){return On(["onFocus","onEnterOrSpace","onApi"],n)?dt.value(n):dt.error("Invalid value for focusInside")})),hi("handler",o),hi("state",e),hi("sendFocusIn",c)])},processKey:a,toEvents:function(i,u){var n=i.focusInside!==nu.OnFocusMode?k.none():c(i).map(function(t){return Kr(Jn(),function(n,e){t(n,i,u),e.stop()})});return qr(n.toArray().concat([Kr(P(),function(r,o){a(r,o,t,i,u).fold(function(){var e,t,n;e=r,t=o,n=pu([32].concat([13]))(t.event()),i.focusInside===nu.OnEnterOrSpaceMode&&n&&jr(e,t)&&c(i).each(function(n){n(e,i,u),t.stop()})},function(n){o.stop()})}),Kr(L(),function(n,e){a(n,e,r,i,u).each(function(n){e.stop()})})]))}};return o},Xu=function(n){var e=[Ir("onEscape"),Ir("onEnter"),Fr("selector",'[data-alloy-tabstop="true"]'),Fr("firstTabstop",0),Fr("useTabstopAt",h(!0)),Ir("visibilitySelector")].concat([n]),u=function(n,e){var t=n.visibilitySelector.bind(function(n){return su(e,n)}).getOr(e);return 0<ru(t)},t=function(e,t){var n,r,o,i;(n=e,r=t,o=uu(n.element(),r.selector),i=Cn(o,function(n){return u(r,n)}),k.from(i[r.firstTabstop])).each(function(n){t.focusManager.set(e,n)})},c=function(e,n,t,r,o){return o(n,t,function(n){return u(e=r,t=n)&&e.useTabstopAt(t);var e,t}).fold(function(){return r.cyclic?k.some(!0):k.none()},function(n){return r.focusManager.set(e,n),k.some(!0)})},i=function(e,n,t,r){var o,i,u=uu(e.element(),t.selector);return(o=e,i=t,i.focusManager.get(o).bind(function(n){return su(n,i.selector)})).bind(function(n){return Rn(u,l(We,n)).bind(function(n){return c(e,u,n,t,r)})})},r=h([xu(vu([hu,pu([9])]),function(n,e,t,r){var o=t.cyclic?lu:du;return i(n,0,t,o)}),xu(pu([9]),function(n,e,t,r){var o=t.cyclic?mu:gu;return i(n,0,t,o)}),xu(pu([27]),function(e,t,n,r){return n.onEscape.bind(function(n){return n(e,t)})}),xu(vu([yu,pu([13])]),function(e,t,n,r){return n.onEnter.bind(function(n){return n(e,t)})})]),o=h([]);return _u(e,mo.init,r,o,function(){return k.some(t)})},qu=Xu(Nr("cyclic",h(!1))),Yu=Xu(Nr("cyclic",h(!0))),Ku=function(n){return"input"===Se(n)&&"radio"!==Oo(n,"type")||"textarea"===Se(n)},Ju=function(n,e,t){return Ku(t)&&pu([32])(e.event())?k.none():(pe(n,t,ee()),k.some(!0))},Qu=function(n,e){return k.some(!0)},Zu=[Fr("execute",Ju),Fr("useSpace",!1),Fr("useEnter",!0),Fr("useControlEnter",!1),Fr("useDown",!1)],nc=function(n,e,t){return t.execute(n,e,n.element())},ec=_u(Zu,mo.init,function(n,e,t,r){var o=t.useSpace&&!Ku(n.element())?[32]:[],i=t.useEnter?[13]:[],u=t.useDown?[40]:[],c=o.concat(i).concat(u);return[xu(pu(c),nc)].concat(t.useControlEnter?[xu(vu([bu,pu([13])]),nc)]:[])},function(n,e,t,r){return t.useSpace&&!Ku(n.element())?[xu(pu([32]),Qu)]:[]},function(){return k.none()}),tc=function(n){var t=Ho(k.none());return go({readState:function(){return t.get().map(function(n){return{numRows:n.numRows(),numColumns:n.numColumns()}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,e){t.set(k.some({numRows:h(n),numColumns:h(e)}))},getNumRows:function(){return t.get().map(function(n){return n.numRows()})},getNumColumns:function(){return t.get().map(function(n){return n.numColumns()})}})},rc=/* */Object.freeze({flatgrid:tc,init:function(n){return n.state(n)}}),oc=function(e,t){return function(n){return"rtl"===ic(n)?t:e}},ic=function(n){return"rtl"===qi(n,"direction")?"rtl":"ltr"},uc=function(i){return function(n,e,t,r){var o=i(n.element());return sc(o,n,e,t,r)}},cc=function(n,e){var t=oc(n,e);return uc(t)},ac=function(n,e){var t=oc(e,n);return uc(t)},fc=function(o){return function(n,e,t,r){return sc(o,n,e,t,r)}},sc=function(e,t,n,r,o){return r.focusManager.get(t).bind(function(n){return e(t.element(),n,r,o)}).map(function(n){return r.focusManager.set(t,n),!0})},lc=fc,dc=fc,mc=fc,gc=function(n){var e,t=n.dom();return!((e=t).offsetWidth<=0&&e.offsetHeight<=0)},pc=Be(["index","candidates"],[]),vc=function(n,e,t){return hc(n,e,t)},hc=function(n,e,t,r){var o,i=l(We,e),u=uu(n,t),c=Cn(u,gc);return Rn(o=c,i).map(function(n){return pc({index:n,candidates:o})})},bc=function(n,e){return Rn(n,function(n){return We(e,n)})},yc=function(t,n,r,e){return e(Math.floor(n/r),n%r).bind(function(n){var e=n.row()*r+n.column();return 0<=e&&e<t.length?k.some(t[e]):k.none()})},xc=function(o,n,i,u,c){return yc(o,n,u,function(n,e){var t=n===i-1?o.length-n*u:u,r=wu(e,c,0,t-1);return k.some({row:h(n),column:h(r)})})},wc=function(i,n,u,c,a){return yc(i,n,c,function(n,e){var t=wu(n,a,0,u-1),r=t===u-1?i.length-t*c:c,o=Su(e,0,r-1);return k.some({row:h(t),column:h(o)})})},Sc=[Cr("selector"),Fr("execute",Ju),gi("onEscape"),Fr("captureTab",!1),yi()],Oc=function(e,t,n){fu(e.element(),t.selector).each(function(n){t.focusManager.set(e,n)})},Tc=function(o){return function(n,e,t,r){return vc(n,e,t.selector).bind(function(n){return o(n.candidates(),n.index(),r.getNumRows().getOr(t.initSize.numRows),r.getNumColumns().getOr(t.initSize.numColumns))})}},kc=function(n,e,t,r){return t.captureTab?k.some(!0):k.none()},Ec=Tc(function(n,e,t,r){return xc(n,e,t,r,-1)}),Cc=Tc(function(n,e,t,r){return xc(n,e,t,r,1)}),Dc=Tc(function(n,e,t,r){return wc(n,e,t,r,-1)}),Mc=Tc(function(n,e,t,r){return wc(n,e,t,r,1)}),Ic=h([xu(pu([37]),cc(Ec,Cc)),xu(pu([39]),ac(Ec,Cc)),xu(pu([38]),lc(Dc)),xu(pu([40]),dc(Mc)),xu(vu([hu,pu([9])]),kc),xu(vu([yu,pu([9])]),kc),xu(pu([27]),function(n,e,t,r){return t.onEscape(n,e)}),xu(pu([32].concat([13])),function(e,t,r,n){return(o=e,i=r,i.focusManager.get(o).bind(function(n){return su(n,i.selector)})).bind(function(n){return r.execute(e,t,n)});var o,i})]),Rc=h([xu(pu([32]),Qu)]),Bc=_u(Sc,tc,Ic,Rc,function(){return k.some(Oc)}),Ac=function(n,e,t,i){var u=function(n,e,t){var r,o=wu(e,i,0,t.length-1);return o===n?k.none():(r=t[o],"button"===Se(r)&&"disabled"===Oo(r,"disabled")?u(n,o,t):k.from(t[o]))};return vc(n,t,e).bind(function(n){var e=n.index(),t=n.candidates();return u(e,e,t)})},Fc=[Cr("selector"),Fr("getInitial",k.none),Fr("execute",Ju),gi("onEscape"),Fr("executeOnMove",!1),Fr("allowVertical",!0)],Vc=function(e,t,r){return(n=e,o=r,o.focusManager.get(n).bind(function(n){return su(n,o.selector)})).bind(function(n){return r.execute(e,t,n)});var n,o},Nc=function(e,t){t.getInitial(e).orThunk(function(){return fu(e.element(),t.selector)}).each(function(n){t.focusManager.set(e,n)})},jc=function(n,e,t){return Ac(n,t.selector,e,-1)},Hc=function(n,e,t){return Ac(n,t.selector,e,1)},zc=function(r){return function(n,e,t){return r(n,e,t).bind(function(){return t.executeOnMove?Vc(n,e,t):k.some(!0)})}},Pc=function(n,e,t,r){return t.onEscape(n,e)},Lc=h([xu(pu([32]),Qu)]),Gc=_u(Fc,mo.init,function(n,e,t,r){var o=[37].concat(t.allowVertical?[38]:[]),i=[39].concat(t.allowVertical?[40]:[]);return[xu(pu(o),zc(cc(jc,Hc))),xu(pu(i),zc(ac(jc,Hc))),xu(pu([13]),Vc),xu(pu([32]),Vc),xu(pu([27]),Pc)]},Lc,function(){return k.some(Nc)}),$c=Be(["rowIndex","columnIndex","cell"],[]),Uc=function(n,e,t){return k.from(n[e]).bind(function(n){return k.from(n[t]).map(function(n){return $c({rowIndex:e,columnIndex:t,cell:n})})})},Wc=function(n,e,t,r){var o=n[e].length,i=wu(t,r,0,o-1);return Uc(n,e,i)},_c=function(n,e,t,r){var o=wu(t,r,0,n.length-1),i=n[o].length,