UNPKG

beansflight-json-form

Version:

> **版本号:verison 0.23.17**

1 lines 1.84 MB
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["beansflight-json-form"]=t(require("vue")):e["beansflight-json-form"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"030f":function(e,t,n){(function(e){(function(){"use strict";var t=function(e){var t=typeof e;return null===e?"null":"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},n=function(e){return function(n){return t(n)===e}},r=function(e){return function(t){return typeof t===e}},o=function(e){return function(t){return e===t}},i=n("string"),a=n("object"),u=n("array"),s=o(null),c=r("boolean"),l=o(void 0),f=function(e){return null===e||void 0===e},d=function(e){return!f(e)},m=r("function"),h=r("number"),p=function(e,t){if(u(e)){for(var n=0,r=e.length;n<r;++n)if(!t(e[n]))return!1;return!0}return!1},g=function(){},v=function(e){return function(){return e()}},b=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},y=function(e,t){return function(n){return e(t(n))}},w=function(e){return function(){return e}},x=function(e){return e},C=function(e,t){return e===t};function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}var S=function(e){return function(t){return!e(t)}},A=function(e){return function(){throw new Error(e)}},T=w(!1),O=w(!0),_=tinymce.util.Tools.resolve("tinymce.ThemeManager"),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},D.apply(this,arguments)};function E(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function M(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var N=function(){return I},I=function(){var e=function(e){return e()},t=x,n={fold:function(e,t){return e()},isSome:T,isNone:O,getOr:t,getOrThunk:e,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:w(null),getOrUndefined:w(void 0),or:t,orThunk:e,map:N,each:g,bind:N,exists:T,forall:O,filter:function(){return N()},toArray:function(){return[]},toString:w("none()")};return n}(),P=function(e){var t=w(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},isSome:O,isNone:T,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return P(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:I},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},R=function(e){return null===e||void 0===e?I:P(e)},B={some:P,none:N,from:R},z=Array.prototype.slice,F=Array.prototype.indexOf,L=Array.prototype.push,H=function(e,t){return F.call(e,t)},V=function(e,t){var n=H(e,t);return-1===n?B.none():B.some(n)},j=function(e,t){return H(e,t)>-1},$=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return!0}return!1},U=function(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n},W=function(e,t){for(var n=[],r=0;r<e.length;r+=t){var o=z.call(e,r,r+t);n.push(o)}return n},q=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},K=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];t(o,n)}},G=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];t(r,n)}},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o],u=t(a,o)?n:r;u.push(a)}return{pass:n,fail:r}},X=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},Q=function(e,t,n){return G(e,(function(e,r){n=t(n,e,r)})),n},J=function(e,t,n){return K(e,(function(e,r){n=t(n,e,r)})),n},Z=function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return B.some(i);if(n(i,r))break}return B.none()},ee=function(e,t){return Z(e,t,T)},te=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return B.some(n)}return B.none()},ne=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!u(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);L.apply(t,e[n])}return t},re=function(e,t){return ne(q(e,t))},oe=function(e,t){for(var n=0,r=e.length;n<r;++n){var o=e[n];if(!0!==t(o,n))return!1}return!0},ie=function(e){var t=z.call(e,0);return t.reverse(),t},ae=function(e,t){return X(e,(function(e){return!j(t,e)}))},ue=function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n},se=function(e){return[e]},ce=function(e,t){var n=z.call(e,0);return n.sort(t),n},le=function(e,t){return t>=0&&t<e.length?B.some(e[t]):B.none()},fe=function(e){return le(e,0)},de=function(e){return le(e,e.length-1)},me=m(Array.from)?Array.from:function(e){return z.call(e)},he=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return B.none()},pe=Object.keys,ge=Object.hasOwnProperty,ve=function(e,t){for(var n=pe(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];t(a,i)}},be=function(e,t){return ye(e,(function(e,n){return{k:n,v:t(e,n)}}))},ye=function(e,t){var n={};return ve(e,(function(e,r){var o=t(e,r);n[o.k]=o.v})),n},we=function(e){return function(t,n){e[n]=t}},xe=function(e,t,n,r){var o={};return ve(e,(function(e,o){(t(e,o)?n:r)(e,o)})),o},Ce=function(e,t){var n={};return xe(e,t,we(n),g),n},ke=function(e,t){var n=[];return ve(e,(function(e,r){n.push(t(e,r))})),n},Se=function(e,t){for(var n=pe(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];if(t(a,i,e))return B.some(a)}return B.none()},Ae=function(e){return ke(e,x)},Te=function(e,t){return Oe(e,t)?B.from(e[t]):B.none()},Oe=function(e,t){return ge.call(e,t)},_e=function(e,t){return Oe(e,t)&&void 0!==e[t]&&null!==e[t]},De=function(e,t,n){return void 0===n&&(n=C),e.exists((function(e){return n(e,t)}))},Ee=function(e,t,n){return void 0===n&&(n=C),Ie(e,t,n).getOr(e.isNone()&&t.isNone())},Me=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},Ne=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.isSome())return B.none();t.push(r.getOrDie())}return B.some(t)},Ie=function(e,t,n){return e.isSome()&&t.isSome()?B.some(n(e.getOrDie(),t.getOrDie())):B.none()},Pe=function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?B.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):B.none()},Re=function(e,t){return void 0!==e&&null!==e?B.some(t(e)):B.none()},Be=function(e,t){return e?B.some(t):B.none()},ze=function(e,t){return e+t},Fe=function(e,t){return e.substring(t)},Le=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},He=function(e,t){return $e(e,t)?Fe(e,t.length):e},Ve=function(e,t){return Ue(e,t)?e:ze(e,t)},je=function(e,t){return-1!==e.indexOf(t)},$e=function(e,t){return Le(e,t,0)},Ue=function(e,t){return Le(e,t,e.length-t.length)},We=function(e){return function(t){return t.replace(e,"")}},qe=We(/^\s+|\s+$/g),Ke=function(e){return e.length>0},Ge=function(e){return!Ke(e)},Ye=function(e){return void 0!==e.style&&m(e.style.getPropertyValue)},Xe=function(e,t){var n=t||document,r=n.createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ze(r.childNodes[0])},Qe=function(e,t){var n=t||document,r=n.createElement(e);return Ze(r)},Je=function(e,t){var n=t||document,r=n.createTextNode(e);return Ze(r)},Ze=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},et=function(e,t,n){return B.from(e.dom.elementFromPoint(t,n)).map(Ze)},tt={fromHtml:Xe,fromTag:Qe,fromText:Je,fromDom:Ze,fromPoint:et};"undefined"!==typeof window?window:Function("return this;")();var nt,rt=9,ot=11,it=1,at=3,ut=function(e){var t=e.dom.nodeName;return t.toLowerCase()},st=function(e){return e.dom.nodeType},ct=function(e){return function(t){return st(t)===e}},lt=ct(it),ft=ct(at),dt=ct(rt),mt=ct(ot),ht=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},pt=function(e,t,n,r){var o=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),s=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!s,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),f=!c&&!s&&!l;return{isiPad:w(o),isiPhone:w(i),isTablet:w(s),isPhone:w(c),isTouch:w(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:w(l),isDesktop:w(f)}},gt=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},vt=function(e,t){var n=gt(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return wt(r(1),r(2))},bt=function(e,t){var n=String(t).toLowerCase();return 0===e.length?yt():vt(e,n)},yt=function(){return wt(0,0)},wt=function(e,t){return{major:e,minor:t}},xt={nu:wt,detect:bt,unknown:yt},Ct=function(e,t){return he(t.brands,(function(t){var n=t.brand.toLowerCase();return ee(e,(function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((function(e){return{current:e.name,version:xt.nu(parseInt(t.version,10),0)}}))}))},kt=function(e,t){var n=String(t).toLowerCase();return ee(e,(function(e){return e.search(n)}))},St=function(e,t){return kt(e,t).map((function(e){var n=xt.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},At=function(e,t){return kt(e,t).map((function(e){var n=xt.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},Tt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ot=function(e){return function(t){return je(t,e)}},_t=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return je(e,"edge/")&&je(e,"chrome")&&je(e,"safari")&&je(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Tt],search:function(e){return je(e,"chrome")&&!je(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return je(e,"msie")||je(e,"trident")}},{name:"Opera",versionRegexes:[Tt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ot("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ot("firefox")},{name:"Safari",versionRegexes:[Tt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(je(e,"safari")||je(e,"mobile/"))&&je(e,"applewebkit")}}],Dt=[{name:"Windows",search:Ot("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return je(e,"iphone")||je(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ot("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ot("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ot("linux"),versionRegexes:[]},{name:"Solaris",search:Ot("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ot("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ot("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Et={browsers:w(_t),oses:w(Dt)},Mt="Edge",Nt="Chrome",It="IE",Pt="Opera",Rt="Firefox",Bt="Safari",zt=function(){return Ft({current:void 0,version:xt.unknown()})},Ft=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r(Mt),isChrome:r(Nt),isIE:r(It),isOpera:r(Pt),isFirefox:r(Rt),isSafari:r(Bt)}},Lt={unknown:zt,nu:Ft,edge:w(Mt),chrome:w(Nt),ie:w(It),opera:w(Pt),firefox:w(Rt),safari:w(Bt)},Ht="Windows",Vt="iOS",jt="Android",$t="Linux",Ut="OSX",Wt="Solaris",qt="FreeBSD",Kt="ChromeOS",Gt=function(){return Yt({current:void 0,version:xt.unknown()})},Yt=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(Ht),isiOS:r(Vt),isAndroid:r(jt),isOSX:r(Ut),isLinux:r($t),isSolaris:r(Wt),isFreeBSD:r(qt),isChromeOS:r(Kt)}},Xt={unknown:Gt,nu:Yt,windows:w(Ht),ios:w(Vt),android:w(jt),linux:w($t),osx:w(Ut),solaris:w(Wt),freebsd:w(qt),chromeos:w(Kt)},Qt=function(e,t,n){var r=Et.browsers(),o=Et.oses(),i=t.bind((function(e){return Ct(r,e)})).orThunk((function(){return St(r,e)})).fold(Lt.unknown,Lt.nu),a=At(o,e).fold(Xt.unknown,Xt.nu),u=pt(a,i,e,n);return{browser:i,os:a,deviceType:u}},Jt={detect:Qt},Zt=function(e){return window.matchMedia(e).matches},en=ht((function(){return Jt.detect(navigator.userAgent,B.from(navigator.userAgentData),Zt)})),tn=function(){return en()},nn=function(e,t,n){return 0!==(e.compareDocumentPosition(t)&n)},rn=function(e,t){return nn(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},on=function(e,t){var n=e.dom;if(n.nodeType!==it)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},an=function(e){return e.nodeType!==it&&e.nodeType!==rt&&e.nodeType!==ot||0===e.childElementCount},un=function(e,t){var n=void 0===t?document:t.dom;return an(n)?[]:q(n.querySelectorAll(e),tt.fromDom)},sn=function(e,t){var n=void 0===t?document:t.dom;return an(n)?B.none():B.from(n.querySelector(e)).map(tt.fromDom)},cn=function(e,t){return e.dom===t.dom},ln=function(e,t){var n=e.dom,r=t.dom;return n!==r&&n.contains(r)},fn=function(e,t){return rn(e.dom,t.dom)},dn=function(e,t){return tn().browser.isIE()?fn(e,t):ln(e,t)},mn=function(e){return tt.fromDom(e.dom.ownerDocument)},hn=function(e){return dt(e)?e:mn(e)},pn=function(e){return tt.fromDom(hn(e).dom.documentElement)},gn=function(e){return tt.fromDom(hn(e).dom.defaultView)},vn=function(e){return B.from(e.dom.parentNode).map(tt.fromDom)},bn=function(e){return vn(e)},yn=function(e){return B.from(e.dom.offsetParent).map(tt.fromDom)},wn=function(e){return B.from(e.dom.nextSibling).map(tt.fromDom)},xn=function(e){return q(e.dom.childNodes,tt.fromDom)},Cn=function(e,t){var n=e.dom.childNodes;return B.from(n[t]).map(tt.fromDom)},kn=function(e){return Cn(e,0)},Sn=function(e,t){return{element:e,offset:t}},An=function(e,t){var n=xn(e);return n.length>0&&t<n.length?Sn(n[t],0):Sn(e,t)},Tn=function(e){return mt(e)&&d(e.dom.host)},On=m(Element.prototype.attachShadow)&&m(Node.prototype.getRootNode),_n=w(On),Dn=On?function(e){return tt.fromDom(e.dom.getRootNode())}:hn,En=function(e){return Tn(e)?e:tt.fromDom(hn(e).dom.body)},Mn=function(e){return Nn(e).isSome()},Nn=function(e){var t=Dn(e);return Tn(t)?B.some(t):B.none()},In=function(e){return tt.fromDom(e.dom.host)},Pn=function(e){if(_n()&&d(e.target)){var t=tt.fromDom(e.target);if(lt(t)&&Rn(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return fe(n)}}return B.from(e.target)},Rn=function(e){return d(e.dom.shadowRoot)},Bn=function(e){var t=ft(e)?e.dom.parentNode:e.dom;if(void 0===t||null===t||null===t.ownerDocument)return!1;var n=t.ownerDocument;return Nn(tt.fromDom(t)).fold((function(){return n.body.contains(t)}),y(Bn,In))},zn=function(){return Fn(tt.fromDom(document))},Fn=function(e){var t=e.dom.body;if(null===t||void 0===t)throw new Error("Body is not available yet");return tt.fromDom(t)},Ln=function(e,t,n){if(!(i(n)||c(n)||h(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Hn=function(e,t,n){Ln(e.dom,t,n)},Vn=function(e,t){var n=e.dom;ve(t,(function(e,t){Ln(n,t,e)}))},jn=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},$n=function(e,t){return B.from(jn(e,t))},Un=function(e,t){var n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},Wn=function(e,t){e.dom.removeAttribute(t)},qn=function(e,t,n){if(!i(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Ye(e)&&e.style.setProperty(t,n)},Kn=function(e,t){Ye(e)&&e.style.removeProperty(t)},Gn=function(e,t,n){var r=e.dom;qn(r,t,n)},Yn=function(e,t){var n=e.dom;ve(t,(function(e,t){qn(n,t,e)}))},Xn=function(e,t){var n=e.dom;ve(t,(function(e,t){e.fold((function(){Kn(n,t)}),(function(e){qn(n,t,e)}))}))},Qn=function(e,t){var n=e.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(t);return""!==o||Bn(e)?o:Jn(n,t)},Jn=function(e,t){return Ye(e)?e.style.getPropertyValue(t):""},Zn=function(e,t){var n=e.dom,r=Jn(n,t);return B.from(r).filter((function(e){return e.length>0}))},er=function(e){var t={},n=e.dom;if(Ye(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},tr=function(e,t,n){var r=tt.fromTag(e);Gn(r,t,n);var o=Zn(r,t);return o.isSome()},nr=function(e,t){var n=e.dom;Kn(n,t),De($n(e,"style").map(qe),"")&&Wn(e,"style")},rr=function(e){return e.dom.offsetWidth},or=function(e,t){var n=function(t,n){if(!h(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var r=t.dom;Ye(r)&&(r.style[e]=n+"px")},r=function(n){var r=t(n);if(r<=0||null===r){var o=Qn(n,e);return parseFloat(o)||0}return r},o=r,i=function(e,t){return J(t,(function(t,n){var r=Qn(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o}),0)},a=function(e,t,n){var r=i(e,n),o=t>r?t-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},ir=or("height",(function(e){var t=e.dom;return Bn(e)?t.getBoundingClientRect().height:t.offsetHeight})),ar=function(e){return ir.get(e)},ur=function(e){return ir.getOuter(e)},sr=function(e,t){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=ir.max(e,t,n);Gn(e,"max-height",r+"px")},cr=function(e,t){var n=function(n,r){return cr(e+n,t+r)};return{left:e,top:t,translate:n}},lr=cr,fr=function(e){var t=e.getBoundingClientRect();return lr(t.left,t.top)},dr=function(e,t){return void 0!==e?e:void 0!==t?t:0},mr=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom)return lr(n.offsetLeft,n.offsetTop);var i=dr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=dr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=dr(o.clientTop,n.clientTop),s=dr(o.clientLeft,n.clientLeft);return hr(e).translate(a-s,i-u)},hr=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?lr(r.offsetLeft,r.offsetTop):Bn(e)?fr(t):lr(0,0)},pr=or("width",(function(e){return e.dom.offsetWidth})),gr=function(e,t){return pr.set(e,t)},vr=function(e){return pr.get(e)},br=function(e){return pr.getOuter(e)},yr=function(e,t){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=pr.max(e,t,n);Gn(e,"max-width",r+"px")},wr=function(e,t,n,r,o,i,a){return{target:e,x:t,y:n,stop:r,prevent:o,kill:i,raw:a}},xr=function(e){var t=tt.fromDom(Pn(e).getOr(e.target)),n=function(){return e.stopPropagation()},r=function(){return e.preventDefault()},o=b(r,n);return wr(t,e.clientX,e.clientY,n,r,o,e)},Cr=function(e,t){return function(n){e(n)&&t(xr(n))}},kr=function(e,t,n,r,o){var i=Cr(n,r);return e.dom.addEventListener(t,i,o),{unbind:k(Tr,e,t,i,o)}},Sr=function(e,t,n,r){return kr(e,t,n,r,!1)},Ar=function(e,t,n,r){return kr(e,t,n,r,!0)},Tr=function(e,t,n,r){e.dom.removeEventListener(t,n,r)},Or=function(e,t){var n=vn(e);n.each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},_r=function(e,t){var n=wn(e);n.fold((function(){var n=vn(e);n.each((function(e){Er(e,t)}))}),(function(e){Or(e,t)}))},Dr=function(e,t){var n=kn(e);n.fold((function(){Er(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},Er=function(e,t){e.dom.appendChild(t.dom)},Mr=function(e,t,n){Cn(e,n).fold((function(){Er(e,t)}),(function(e){Or(e,t)}))},Nr=function(e,t){K(t,(function(t){Or(e,t)}))},Ir=function(e,t){K(t,(function(t){Er(e,t)}))},Pr=function(e){e.dom.textContent="",K(xn(e),(function(e){Rr(e)}))},Rr=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Br=function(e){var t=xn(e);t.length>0&&Nr(e,t),Rr(e)},zr=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return lr(n,r)},Fr=function(e,t,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(e,t)},Lr=function(e){var t=void 0===e?window:e;return tn().browser.isFirefox()?B.none():B.from(t["visualViewport"])},Hr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Vr=function(e){var t=void 0===e?window:e,n=t.document,r=zr(tt.fromDom(n));return Lr(t).fold((function(){var e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return Hr(r.left,r.top,n,o)}),(function(e){return Hr(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)}))},jr=function(e,t){var n=e.view(t);return n.fold(w([]),(function(t){var n=e.owner(t),r=jr(e,n);return[t].concat(r)}))},$r=function(e,t){var n=t.owner(e),r=jr(t,n);return B.some(r)},Ur=function(e){var t,n=e.dom===document?B.none():B.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement);return n.map(tt.fromDom)},Wr=function(e){return mn(e)},qr=Object.freeze({__proto__:null,view:Ur,owner:Wr}),Kr=function(e){var t=tt.fromDom(document),n=zr(t),r=$r(e,qr);return r.fold(k(mr,e),(function(t){var r=hr(e),o=Q(t,(function(e,t){var n=hr(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return lr(o.left+r.left+n.left,o.top+r.top+n.top)}))},Gr=function(e,t,n){return{point:e,width:t,height:n}},Yr=function(e,t,n,r){return{x:e,y:t,width:n,height:r}},Xr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qr=function(e){var t=mr(e),n=br(e),r=ur(e);return Xr(t.left,t.top,n,r)},Jr=function(e){var t=Kr(e),n=br(e),r=ur(e);return Xr(t.left,t.top,n,r)},Zr=function(){return Vr(window)},eo=function(e){var t=function(t){return eo(e)},n=function(t){return eo(e)},r=function(t){return eo(t(e))},o=function(t){return eo(e)},i=function(t){t(e)},a=function(t){return t(e)},u=function(t,n){return n(e)},s=function(t){return t(e)},c=function(t){return t(e)},l=function(){return B.some(e)};return{isValue:O,isError:T,getOr:w(e),getOrThunk:w(e),getOrDie:w(e),or:t,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:s,forall:c,toOptional:l}},to=function(e){var t=function(e){return e()},n=function(){return A(String(e))()},r=x,o=function(e){return e()},i=function(t){return to(e)},a=function(t){return to(t(e))},u=function(t){return to(e)},s=function(t,n){return t(e)};return{isValue:T,isError:O,getOr:x,getOrThunk:t,getOrDie:n,or:r,orThunk:o,fold:s,map:i,mapError:a,each:g,bind:u,exists:T,forall:O,toOptional:B.none}},no=function(e,t){return e.fold((function(){return to(t)}),eo)},ro={value:eo,error:to,fromOption:no};(function(e){e[e["Error"]=0]="Error",e[e["Value"]=1]="Value"})(nt||(nt={}));var oo=function(e,t,n){return e.stype===nt.Error?t(e.serror):n(e.svalue)},io=function(e){var t=[],n=[];return K(e,(function(e){oo(e,(function(e){return n.push(e)}),(function(e){return t.push(e)}))})),{values:t,errors:n}},ao=function(e,t){return e.stype===nt.Error?{stype:nt.Error,serror:t(e.serror)}:e},uo=function(e,t){return e.stype===nt.Value?{stype:nt.Value,svalue:t(e.svalue)}:e},so=function(e,t){return e.stype===nt.Value?t(e.svalue):e},co=function(e,t){return e.stype===nt.Error?t(e.serror):e},lo=function(e){return{stype:nt.Value,svalue:e}},fo=function(e){return{stype:nt.Error,serror:e}},mo=function(e){return oo(e,ro.error,ro.value)},ho=function(e){return e.fold(fo,lo)},po={fromResult:ho,toResult:mo,svalue:lo,partition:io,serror:fo,bind:so,bindError:co,map:uo,mapError:ao,fold:oo},go=function(e,t,n,r){return{tag:"field",key:e,newKey:t,presence:n,prop:r}},vo=function(e,t){return{tag:"custom",newKey:e,instantiator:t}},bo=function(e,t,n){switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},yo=function(e,t){return t},wo=function(e,t){var n=a(e)&&a(t);return n?Co(e,t):t},xo=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i=t[o];for(var a in i)Oe(i,a)&&(r[a]=e(r[a],i[a]))}return r}},Co=xo(wo),ko=xo(yo),So=function(){return{tag:"required",process:{}}},Ao=function(e){return{tag:"defaultedThunk",process:e}},To=function(e){return Ao(w(e))},Oo=function(){return{tag:"option",process:{}}},_o=function(e){return{tag:"mergeWithThunk",process:e}},Do=function(e){return _o(w(e))},Eo=function(e,t){return e.length>0?po.svalue(Co(t,ko.apply(void 0,e))):po.svalue(t)},Mo=function(e){return b(po.serror,ne)(e)},No=function(e,t){var n=po.partition(e);return n.errors.length>0?Mo(n.errors):Eo(n.values,t)},Io=function(e){var t=po.partition(e);return t.errors.length>0?Mo(t.errors):po.svalue(t.values)},Po={consolidateObj:No,consolidateArr:Io},Ro=function(e){return a(e)&&pe(e).length>100?" removed due to size":JSON.stringify(e,null,2)},Bo=function(e){var t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:w("... (only showing first ten failures)")}]):e;return q(t,(function(e){return"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()}))},zo=function(e,t){return po.serror([{path:e,getErrorInfo:t}])},Fo=function(e,t,n){return zo(e,(function(){return'Could not find valid *required* value for "'+t+'" in '+Ro(n)}))},Lo=function(e,t){return zo(e,(function(){return'Choice schema did not contain choice key: "'+t+'"'}))},Ho=function(e,t,n){return zo(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Ro(t)}))},Vo=function(e,t){return zo(e,(function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"}))},jo=function(e,t){return zo(e,w(t))},$o=function(e){var t=function(t,n){return po.bindError(e(n),(function(e){return jo(t,e)}))},n=w("val");return{extract:t,toString:n}},Uo=$o(po.svalue),Wo=function(e,t,n,r){return Te(t,n).fold((function(){return Fo(e,n,t)}),r)},qo=function(e,t,n,r){var o=Te(e,t).getOrThunk((function(){return n(e)}));return r(o)},Ko=function(e,t,n){return n(Te(e,t))},Go=function(e,t,n,r){var o=Te(e,t).map((function(t){return!0===t?n(e):t}));return r(o)},Yo=function(e,t,n,r,o){var i=function(e){return o.extract(t.concat([r]),e)},a=function(e){return e.fold((function(){return po.svalue(B.none())}),(function(e){var n=o.extract(t.concat([r]),e);return po.map(n,B.some)}))};switch(e.tag){case"required":return Wo(t,n,r,i);case"defaultedThunk":return qo(n,r,e.process,i);case"option":return Ko(n,r,a);case"defaultedOptionThunk":return Go(n,r,e.process,a);case"mergeWithThunk":return qo(n,r,w({}),(function(t){var r=Co(e.process(n),t);return i(r)}))}},Xo=function(e,t,n){for(var r={},o=[],i=0,a=n;i<a.length;i++){var u=a[i];bo(u,(function(n,i,a,u){var s=Yo(a,e,t,n,u);po.fold(s,(function(e){o.push.apply(o,e)}),(function(e){r[i]=e}))}),(function(e,n){r[e]=n(t)}))}return o.length>0?po.serror(o):po.svalue(r)},Qo=function(e){var t=function(t,n){return e().extract(t,n)},n=function(){return e().toString()};return{extract:t,toString:n}},Jo=function(e){return pe(Ce(e,d))},Zo=function(e){var t=ei(e),n=Q(e,(function(e,t){return bo(t,(function(t){var n;return Co(e,(n={},n[t]=!0,n))}),w(e))}),{}),r=function(e,r){var o=c(r)?[]:Jo(r),i=X(o,(function(e){return!_e(n,e)}));return 0===i.length?t.extract(e,r):Vo(e,i)};return{extract:r,toString:t.toString}},ei=function(e){var t=function(t,n){return Xo(t,n,e)},n=function(){var t=q(e,(function(e){return bo(e,(function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))}));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:n}},ti=function(e){var t=function(t,n){var r=q(n,(function(n,r){return e.extract(t.concat(["["+r+"]"]),n)}));return Po.consolidateArr(r)},n=function(){return"array("+e.toString()+")"};return{extract:t,toString:n}},ni=function(e){var t=function(t,n){for(var r=[],o=0,i=e;o<i.length;o++){var a=i[o],u=a.extract(t,n);if(u.stype===nt.Value)return u;r.push(u)}return Po.consolidateArr(r)},n=function(){return"oneOf("+q(e,(function(e){return e.toString()})).join(", ")+")"};return{extract:t,toString:n}},ri=function(e,t){var n=function(t,n){return ti($o(e)).extract(t,n)},r=function(e,r){var o=pe(r),i=n(e,o);return po.bind(i,(function(n){var o=q(n,(function(e){return go(e,e,So(),t)}));return ei(o).extract(e,r)}))},o=function(){return"setOf("+t.toString()+")"};return{extract:r,toString:o}},oi=function(e,t){var n=ht(t),r=function(e,t){return n().extract(e,t)},o=function(){return n().toString()};return{extract:r,toString:o}},ii=b(ti,ei),ai=w(Uo),ui=function(e,t){return $o((function(n){var r=typeof n;return e(n)?po.svalue(n):po.serror("Expected type: "+t+" but got: "+r)}))},si=ui(h,"number"),ci=ui(i,"string"),li=ui(c,"boolean"),fi=ui(m,"function"),di=function(e){if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every((function(t){return di(e[t])}));default:return!1}},mi=$o((function(e){return di(e)?po.svalue(e):po.serror("Expected value to be acceptable for sending via postMessage")})),hi=function(e,t,n,r){var o=Te(n,r);return o.fold((function(){return Ho(e,n,r)}),(function(n){return n.extract(e.concat(["branch: "+r]),t)}))},pi=function(e,t){var n=function(n,r){var o=Te(r,e);return o.fold((function(){return Lo(n,e)}),(function(e){return hi(n,r,t,e)}))},r=function(){return"chooseOn("+e+"). Possible values: "+pe(t)};return{extract:n,toString:r}},gi=function(){return ti(Uo)},vi=function(e){return $o((function(t){return e(t).fold(po.serror,po.svalue)}))},bi=function(e,t){return ri((function(t){return po.fromResult(e(t))}),t)},yi=function(e,t,n){var r=t.extract([e],n);return po.mapError(r,(function(e){return{input:n,errors:e}}))},wi=function(e,t,n){return po.toResult(yi(e,t,n))},xi=function(e){return e.fold((function(e){throw new Error(ki(e))}),x)},Ci=function(e,t,n){return xi(wi(e,t,n))},ki=function(e){return"Errors: \n"+Bo(e.errors).join("\n")+"\n\nInput object: "+Ro(e.input)},Si=function(e,t){return pi(e,be(t,ei))},Ai=function(e,t){return oi(e,t)},Ti=go,Oi=vo,_i=function(e){return vi((function(t){return j(e,t)?ro.value(t):ro.error('Unsupported value: "'+t+'", choose one of "'+e.join(", ")+'".')}))},Di=function(e){return Ti(e,e,So(),ai())},Ei=function(e,t){return Ti(e,e,So(),t)},Mi=function(e){return Ei(e,si)},Ni=function(e){return Ei(e,ci)},Ii=function(e,t){return Ti(e,e,So(),_i(t))},Pi=function(e){return Ei(e,li)},Ri=function(e){return Ei(e,fi)},Bi=function(e,t){return Ti(e,e,Oo(),$o((function(n){return po.serror("The field: "+e+" is forbidden. "+t)})))},zi=function(e,t){return Ti(e,e,So(),ei(t))},Fi=function(e,t){return Ti(e,e,So(),ii(t))},Li=function(e,t){return Ti(e,e,So(),ti(t))},Hi=function(e){return Ti(e,e,Oo(),ai())},Vi=function(e,t){return Ti(e,e,Oo(),t)},ji=function(e){return Vi(e,si)},$i=function(e){return Vi(e,ci)},Ui=function(e){return Vi(e,fi)},Wi=function(e,t){return Vi(e,ti(t))},qi=function(e,t){return Vi(e,ei(t))},Ki=function(e,t){return Vi(e,Zo(t))},Gi=function(e,t){return Ti(e,e,To(t),ai())},Yi=function(e,t,n){return Ti(e,e,To(t),n)},Xi=function(e,t){return Yi(e,t,si)},Qi=function(e,t){return Yi(e,t,ci)},Ji=function(e,t,n){return Yi(e,t,_i(n))},Zi=function(e,t){return Yi(e,t,li)},ea=function(e,t){return Yi(e,t,fi)},ta=function(e,t){return Yi(e,t,mi)},na=function(e,t,n){return Yi(e,t,ti(n))},ra=function(e,t,n){return Yi(e,t,ei(n))},oa=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},ia=function(e){if(!u(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return K(e,(function(r,o){var i=pe(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],s=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(s))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==s.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+s.length+" ("+s+"), got "+i);var u=function(e){var r=pe(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));var o=oe(t,(function(e){return j(r,e)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)};return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);var i=t[o];return i.apply(null,n)},match:u,log:function(e){console.log(e,{constructors:t,constructor:a,params:n})}}}})),n},aa={generate:ia};aa.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ua,sa=function(e){var t=[],n=[];return K(e,(function(e){e.fold((function(e){t.push(e)}),(function(e){n.push(e)}))})),{errors:t,values:n}},ca=function(e,t){var n={};return ve(e,(function(e,r){j(t,r)||(n[r]=e)})),n},la=function(e,t){var n;return n={},n[e]=t,n},fa=function(e){var t={};return K(e,(function(e){t[e.key]=e.value})),t},da=function(e,t){return ca(e,t)},ma=function(e,t){return la(e,t)},ha=function(e){return fa(e)},pa=function(e,t){return 0===e.length?ro.value(t):ro.value(Co(t,ko.apply(void 0,e)))},ga=function(e){return ro.error(ne(e))},va=function(e,t){var n=sa(e);return n.errors.length>0?ga(n.errors):pa(n.values,t)},ba=function(e){return m(e)?e:T},ya=function(e,t,n){var r=e.dom,o=ba(n);while(r.parentNode){r=r.parentNode;var i=tt.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return B.none()},wa=function(e,t,n){var r=t(e),o=ba(n);return r.orThunk((function(){return o(e)?B.none():ya(e,t,o)}))},xa=function(e,t){return cn(e.element,t.event.target)},Ca={can:O,abort:T,run:g},ka=function(e){if(!_e(e,"can")&&!_e(e,"abort")&&!_e(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return D(D({},Ca),e)},Sa=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return J(e,(function(e,r){return e&&t(r).apply(void 0,n)}),!0)}},Aa=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return J(e,(function(e,r){return e||t(r).apply(void 0,n)}),!1)}},Ta=function(e){return m(e)?{can:O,abort:T,run:e}:e},Oa=function(e){var t=Sa(e,(function(e){return e.can})),n=Aa(e,(function(e){return e.abort})),r=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];K(e,(function(e){e.run.apply(void 0,t)}))};return{can:t,abort:n,run:r}},_a=w,Da=_a("touchstart"),Ea=_a("touchmove"),Ma=_a("touchend"),Na=_a("touchcancel"),Ia=_a("mousedown"),Pa=_a("mousemove"),Ra=_a("mouseout"),Ba=_a("mouseup"),za=_a("mouseover"),Fa=_a("focusin"),La=_a("focusout"),Ha=_a("keydown"),Va=_a("keyup"),ja=_a("input"),$a=_a("change"),Ua=_a("click"),Wa=_a("transitioncancel"),qa=_a("transitionend"),Ka=_a("transitionstart"),Ga=_a("selectstart"),Ya=function(e){return w("alloy."+e)},Xa={tap:Ya("tap")},Qa=Ya("focus"),Ja=Ya("blur.post"),Za=Ya("paste.post"),eu=Ya("receive"),tu=Ya("execute"),nu=Ya("focus.item"),ru=Xa.tap,ou=Ya("longpress"),iu=Ya("sandbox.close"),au=Ya("typeahead.cancel"),uu=Ya("system.init"),su=Ya("system.touchmove"),cu=Ya("system.touchend"),lu=Ya("system.scroll"),fu=Ya("system.resize"),du=Ya("system.attached"),mu=Ya("system.detached"),hu=Ya("system.dismissRequested"),pu=Ya("system.repositionRequested"),gu=Ya("focusmanager.shifted"),vu=Ya("slotcontainer.visibility"),bu=Ya("change.tab"),yu=Ya("dismiss.tab"),wu=Ya("highlight"),xu=Ya("dehighlight"),Cu=function(e,t){Tu(e,e.element,t,{})},ku=function(e,t,n){Tu(e,e.element,t,n)},Su=function(e){Cu(e,tu())},Au=function(e,t,n){Tu(e,t,n,{})},Tu=function(e,t,n,r){var o=D({target:t},r);e.getSystem().triggerEvent(n,t,o)},Ou=function(e,t,n,r){e.getSystem().triggerEvent(n,t,r.event)},_u=function(e){return ha(e)},Du=function(e,t){return{key:e,value:ka({abort:t})}},Eu=function(e,t){return{key:e,value:ka({can:t})}},Mu=function(e){return{key:e,value:ka({run:function(e,t){t.event.prevent()}})}},Nu=function(e,t){return{key:e,value:ka({run:t})}},Iu=function(e,t,n){return{key:e,value:ka({run:function(e,r){t.apply(void 0,[e,r].concat(n))}})}},Pu=function(e){return function(t){return Nu(e,t)}},Ru=function(e){return function(t){return{key:e,value:ka({run:function(e,n){xa(e,n)&&t(e,n)}})}}},Bu=function(e,t){return Nu(e,(function(n,r){n.getSystem().getByUid(t).each((function(t){Ou(t,t.element,e,r)}))}))},zu=function(e,t,n){var r=t.partUids[n];return Bu(e,r)},Fu=function(e,t){return Nu(e,(function(e,n){var r=n.event,o=e.getSystem().getByDom(r.target).getOrThunk((function(){var t=wa(r.target,(function(t){return e.getSystem().getByDom(t).toOptional()}),T);return t.getOr(e)}));t(e,o,n)}))},Lu=function(e){return Nu(e,(function(e,t){t.cut()}))},Hu=function(e){return Nu(e,(function(e,t){t.stop()}))},Vu=function(e,t){return Ru(e)(t)},ju=Ru(du()),$u=Ru(mu()),Uu=Ru(uu()),Wu=Pu(tu()),qu=function(e,t){var n=t||document,r=n.createElement("div");return r.innerHTML=e,xn(tt.fromDom(r))},Ku=function(e){return e.dom.innerHTML},Gu=function(e,t){var n=mn(e),r=n.dom,o=tt.fromDom(r.createDocumentFragment()),i=qu(t,r);Ir(o,i),Pr(e),Er(e,o)},Yu=function(e){var t=tt.fromTag("div"),n=tt.fromDom(e.dom.cloneNode(!0));return Er(t,n),Ku(t)},Xu=function(e,t){return tt.fromDom(e.dom.cloneNode(t))},Qu=function(e){return Xu(e,!1)},Ju=function(e){if(Tn(e))return"#shadow-root";var t=Qu(e);return Yu(t)},Zu=function(e){return Ju(e)},es=function(e,t,n){return cn(t,e.element)&&!cn(t,n)},ts=_u([Eu(Qa(),(function(e,t){var n=t.event,r=n.originator,o=n.target;return!es(e,r,o)||(console.warn(Qa()+" did not get interpreted by the desired target. \nOriginator: "+Zu(r)+"\nTarget: "+Zu(o)+"\nCheck the "+Qa()+" event handlers"),!1)}))]),ns=Object.freeze({__proto__:null,events:ts}),rs=0,os=function(e){var t=new Date,n=t.getTime(),r=Math.floor(1e9*Math.random());return rs++,e+"_"+r+rs+String(n)},is=w("alloy-id-"),as=w("data-alloy-id"),us=is(),ss=as(),cs=function(e,t){var n=os(us+e);return ls(t,n),n},ls=function(e,t){Object.defineProperty(e.dom,ss,{value:t,writable:!0})},fs=function(e){var t=lt(e)?e.dom[ss]:null;return B.from(t)},ds=function(e){return os(e)},ms=x,hs=function(e){var t=function(t){return"The component must be in a context to execute: "+t+(e?"\n"+Zu(e().element)+" is not in context.":"")},n=function(e){return function(){throw new Error(t(e))}},r=function(e){return function(){console.warn(t(e))}};return{debugInfo:w("fake"),triggerEvent:r("triggerEvent"),triggerFocus:r("triggerFocus"),triggerEscape:r("triggerEscape"),broadcast:r("broadcast"),broadcastOn:r("broadcastOn"),broadcastEvent:r("broadcastEvent"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),isConnected:T}},ps=hs(),gs=function(e,t,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:t,parameters:vs(a.slice(0,1).concat(a.slice(3)))}},e},vs=function(e){return q(e,(function(e){return Ue(e,"/*")?e.substring(0,e.length-"/*".length):e}))},bs=function(e,t){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:t,parameters:vs(i)}},e},ys=function(e,t){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:vs(i.slice(1))}},e},ws=os("alloy-premade"),xs=function(e){return ma(ws,e)},Cs=function(e){return Te(e,ws)},ks=function(e){return ys((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(void 0,M([t.getApis(),t],n,!1))}),e)},Ss={init:function(){return As({readState:w("No State required")})}},As=function(e){return e},Ts=function(e,t){var n=q(t,(function(e){return qi(e.name(),[Di("config"),Gi("state",Ss)])})),r=wi("component.behaviours",ei(n),e.behaviours).fold((function(t){throw new Error(ki(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))}),x);return{list:t,data:be(r,(function(e){var t=e.map((function(e){return{config:e.config,state:e.state.init(e.config)}}));return w(t)}))}},Os=function(e){return e.list},_s=function(e){return e.data},Ds=function(e,t){var n={};return ve(e,(function(e,r){ve(e,(function(e,o){var i=Te(n,o).getOr([]);n[o]=i.concat([t(r,e)])}))})),n},Es=function(e){return{classes:l(e.classes)?[]:e.classes,attributes:l(e.attributes)?{}:e.attributes,styles:l(e.styles)?{}:e.styles}},Ms=function(e,t){return D(D({},e),{attributes:D(D({},e.attributes),t.attributes),styles:D(D({},e.styles),t.styles),classes:e.classes.concat(t.classes)})},Ns=function(e,t,n,r){var o=D({},t);K(n,(function(t){o[t.name()]=t.exhibit(e,r)}));var i=Ds(o,(function(e,t){return{name:e,modification:t}})),a=function(e){return Q(e,(function(e,t){return D(D({},t.modification),e)}),{})},u=Q(i.classes,(function(e,t){return t.modification.concat(e)}),[]),s=a(i.attributes),c=a(i.styles);return Es({classes:u,attributes:s,styles:c})},Is=function(e,t,n,r){try{var o=ce(n,(function(n,o){var i=n[t],a=o[t],u=r.indexOf(i),s=r.indexOf(a);if(-1===u)throw new Error("The ordering for "+e+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===s)throw new Error("The ordering for "+e+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(r,null,2));return u<s?-1:s<u?1:0}));return ro.value(o)}catch(i){return ro.error([i])}},Ps=function(e,t){return{handler:e,purpose:t}},Rs=function(e,t){return{cHandler:e,purpose:t}},Bs=function(e,t){return Rs(k.apply(void 0,[e.handler].concat(t)),e.purpose)},zs=function(e){return e.cHandler},Fs=function(e,t){return{name:e,handler:t}},Ls=function(e,t){var n={};return K(e,(function(e){n[e.name()]=e.handlers(t)})),n},Hs=function(e,t,n){var r=D(D({},n),Ls(t,e));return Ds(r,Fs)},Vs=function(e,t,n,r){var o=Hs(e,n,r);return Ws(o,t)},js=function(e){var t=Ta(e);return function(e,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[e,n].concat(r);t.abort.apply(void 0,i)?n.stop():t.can.apply(void 0,i)&&t.run.apply(void 0,i)}},$s=function(e,t){return ro.error(["The event ("+e+') 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: '+JSON.stringify(q(t,(function(e){return e.name})),null,2)])},Us=function(e,t,n){var r=t[n];return r?Is("Event: "+n,"name",e,r).map((function(e){var t=q(e,(function(e){return e.handler}));return Oa(t)})):$s(n,e)},Ws=function(e,t){var n=ke(e,(function(e,n){var r=1===e.length?ro.value(e[0].handler):Us(e,t,n);return r.map((function(r){var o=js(r),i=e.length>1?X(t[n],(function(t){return $(e,(function(e){return e.name===t}))})).join(" > "):e[0].name;return ma(n,Ps(o,i))}))}));return va(n,{})},qs="alloy.base.behaviour",Ks=ei([Ti("dom","dom",So(),ei([Di("tag"),Gi("styles",{}),Gi("classes",[]),Gi("attributes",{}),Hi("value"),Hi("innerHtml")])),Di("components"),Di("uid"),Gi("events",{}),Gi("apis",{}),Ti("eventOrder","eventOrder",Do((ua={},ua[tu()]=["disabling",qs,"toggling","typeaheadevents"],ua[Qa()]=[qs,"focusing","keying"],ua[uu()]=[qs,"disabling","toggling","representing"],ua[ja()]=[qs,"representing","streaming","invalidating"],ua[mu()]=[qs,"representing","item-events","tooltipping"],ua[Ia()]=["focusing",qs,"item-type-events"],ua[Da()]=["focusing",qs,"item-type-events"],ua[za()]=["item-type-events","tooltipping"],ua[eu()]=["receiving","reflecting","tooltipping"],ua)),ai()),Hi("domModification")]),Gs=function(e){return wi("custom.definition",Ks,e)},Ys=function(e){return D(D({},e.dom),{uid:e.uid,domChildren:q(e.components,(function(e){return e.element}))})},Xs=function(e){return e.domModification.fold((function(){return Es({})}),Es)},Qs=function(e){return e.events},Js=function(e,t){var n=jn(e,t);return void 0===n||""===n?[]:n.split(" ")},Zs=function(e,t,n){var r=Js(e,t),o=r.concat([n]);return Hn(e,t,o.join(" ")),!0},ec=function(e,t,n){var r=X(Js(e,t),(function(e){return e!==n}));return r.length>0?Hn(e,t,r.join(" ")):Wn(e,t),!1},tc=function(e){return void 0!==e.dom.classList},nc=function(e){return Js(e,"class")},rc=function(e,t){return Zs(e,"class",t)},oc=function(e,t){return ec(e,"class",t)},ic=function(e,t){tc(e)?e.dom.classList.add(t):rc(e,t)},ac=function(e){var t=tc(e)?e.dom.classList:nc(e);0===t.length&&Wn(e,"class")},uc=function(e,t){if(tc(e)){var n=e.dom.classList;n.remove(t)}else oc(e,t);ac(e)},sc=function(e,t){return tc(e)&&e.dom.classList.contains(t)},cc=function(e,t){K(t,(function(t){ic(e,t)}))},lc=function(e,t){K(t,(function(t){uc(e,t)}))},fc=function(e,t){return oe(t,(function(t){return sc(e,t)}))},dc=function(e){return e.dom.value},mc=function(e,t){if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},hc=function(e){var t=tt.fromTag(e.tag);Vn(t,e.attributes),cc(t,e.classes),Yn(t,e.styles),e.innerHtml.each((function(e){return Gu(t,e)}));var n=e.domChildren;return Ir(t,n),e.value.each((function(e){mc(t,e)})),e.uid,ls(t,e.uid),t},pc=function(e){var t=Te(e,"behaviours").getOr({});return re(pe(t),(function(e){var n=t[e];return d(n)?[n.me]:[]}))},gc=function(e,t){return Ts(e,t)},vc=function(e){var t=pc(e);return gc(e,t)},bc=function(e,t,n){var r=Ys(e),o=Xs(e),i={"alloy.base.modification":o},a=t.length>0?Ns(n,i,t,r):o;return Ms(r,a)},yc=function(e,t,n){var r={"alloy.base.behaviour":Qs(e)};return Vs(n,e.eventOrder,t,r).getOrDie()},wc=function(e){var t=function(){return y},n=oa(ps),r=xi(Gs(e)),o=vc(e),i=Os(o),a=_s(o),u=bc(r,i,a),s=hc(u),c=yc(r,i,a),l=oa(r.components),f=function(e){n.set(e)},d=function(){n.set(hs(t))},h=function(){var e=xn(s),t=re(e,(function(e){return n.get().getByDom(e).fold((function(){return[]}),se)}));l.set(t)},p=function(t){var n=a,r=m(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))};return r()},g=function(e){return m(a[e.name()])},v=function(){return r.apis},b=function(e){return a[e]().map((function(e){return e.state.readState()})).getOr("not enabled")},y={uid:e.uid,getSystem:n.get,config:p,hasConfigured:g,spec:e,readState:b,getApis:v,connect:f,disconnect:d,element:s,syncComponents:h,components:l.get,events:c};return y},xc=function(e){var t=Te(e,"components").getOr([]);return q(t,Oc)},Cc=function(e){var t=ms(e),n=t.events,r=E(t,["events"]),o=xc(r),i=D(D({},r),{events:D(D({},ns),n),components:o});return ro.value(wc(i))},kc=function(e){var t=tt.fromText(e);return Sc({element:t})},Sc=function(e){var t=Ci("external.component",Zo([Di("element"),Hi("uid")]),e),n=oa(hs()),r=function(e){n.set(e)},o=function(){n.set(hs((function(){return a})))},i=t.uid.getOrThunk((function(){return ds("external")}));ls(t.element,i);var a={uid:i,getSystem:n.get,config:B.none,hasConfigured:T,connect:r,disconnect:o,getApis:function(){return{}},element:t.element,spec:e,readState:w("No state"),syncComponents:g,components:w([]),events:{}};return xs(a)},Ac=ds,Tc=function(e){return Oe(e,"uid")},Oc=function(e){return Cs(e).getOrThunk((function(){var t=Tc(e)?e:D({uid:Ac("")},e);return Cc(t).getOrDie()}))},_c=xs;function Dc(e,t,n,r,o){return e(n,r)?B.some(n):m(o)&&o(n)?B.none():t(n,r,o)}var Ec,Mc=function(e,t,n){var r=e.dom,o=m(n)?n:T;while(r.parentNode){r=r.parentNode;var i=tt.fromDom(r);if(t(i))return B.some(i);if(o(i))break}return B.none()},Nc=function(e,t,n){var r=function(e,t){return t(e)};return Dc(r,Mc,e,t,n)},Ic=function(e,t){var n=function(e){return t(tt.fromDom(e))},r=ee(e.dom.childNodes,n);return r.map(tt.fromDom)},Pc=function(e,t){var n=function(e){for(var r=0;r<e.childNodes.length;r++){var o=tt.fromDom(e.childNodes[r]);if(t(o))return B.some(o);var i=n(e.childNodes[r]);if(i.isSome())return i}return B.none()};return n(e.dom)},Rc=function(e,t,n){return Nc(e,t,n).isSome()},Bc=function(e,t,n){return Mc(e,(function(e){return on(e,t)}),n)},zc=function(e,t){return Ic(e,(function(e){return on(e,t)}))},Fc=function(e,t){return sn(t,e)},Lc=function(e,t,n){var r=function(e,t){return on(e,t)};return Dc(r,Bc,e,t,n)},Hc=function(e){var t=Nc(e,