argon
Version:
Argon framework provides set of tools to build front-end applications for AEM
1 lines • 54.3 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("argon-logger"),require("silkrouter")):"function"==typeof define&&define.amd?define(["exports","argon-logger","silkrouter"],e):e((t=t||self).argon={},t.Logger,t.silkrouter)}(this,(function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e,r){return(s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&c(o,r.prototype),o}).apply(null,arguments)}function f(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e=e&&e.hasOwnProperty("default")?e.default:e;var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function y(t,e){return t(e={exports:{}},e.exports),e.exports}var d=function(t){return t&&t.Math==Math&&t},v=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof h&&h)||Function("return this")(),g=function(t){try{return!!t()}catch(t){return!0}},b=!g((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},w=v.document,O=m(w)&&m(w.createElement),E=function(t){return O?w.createElement(t):{}},j=!b&&!g((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),A=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},T=function(t,e){if(!m(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!m(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!m(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!m(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},S=Object.defineProperty,P={f:b?S:function(t,e,r){if(A(t),e=T(e,!0),A(r),j)try{return S(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},L=b?function(t,e,r){return P.f(t,e,_(1,r))}:function(t,e,r){return t[e]=r,t},R=function(t,e){try{L(v,t,e)}catch(r){v[t]=e}return e},k=v["__core-js_shared__"]||R("__core-js_shared__",{}),x=y((function(t){(t.exports=function(t,e){return k[t]||(k[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.4.8",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),C={}.hasOwnProperty,I=function(t,e){return C.call(t,e)},D=0,M=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+M).toString(36)},B=!!Object.getOwnPropertySymbols&&!g((function(){return!String(Symbol())})),N=B&&!Symbol.sham&&"symbol"==typeof Symbol(),U=x("wks"),q=v.Symbol,G=N?q:F,H=function(t){return I(U,t)||(B&&I(q,t)?U[t]=q[t]:U[t]=G("Symbol."+t)),U[t]},V={};V[H("toStringTag")]="z";var W="[object z]"===String(V),z=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(t){return z.call(t)});var Y,J,K,X=k.inspectSource,$=v.WeakMap,Q="function"==typeof $&&/native code/.test(X($)),Z=x("keys"),tt=function(t){return Z[t]||(Z[t]=F(t))},et={},rt=v.WeakMap;if(Q){var nt=new rt,ot=nt.get,it=nt.has,at=nt.set;Y=function(t,e){return at.call(nt,t,e),e},J=function(t){return ot.call(nt,t)||{}},K=function(t){return it.call(nt,t)}}else{var ut=tt("state");et[ut]=!0,Y=function(t,e){return L(t,ut,e),e},J=function(t){return I(t,ut)?t[ut]:{}},K=function(t){return I(t,ut)}}var ct={set:Y,get:J,has:K,enforce:function(t){return K(t)?J(t):Y(t,{})},getterFor:function(t){return function(e){var r;if(!m(e)||(r=J(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},st=y((function(t){var e=ct.get,r=ct.enforce,n=String(String).split("String");(t.exports=function(t,e,o,i){var a=!!i&&!!i.unsafe,u=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||I(o,"name")||L(o,"name",e),r(o).source=n.join("string"==typeof e?e:"")),t!==v?(a?!c&&t[e]&&(u=!0):delete t[e],u?t[e]=o:L(t,e,o)):u?t[e]=o:R(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||X(this)}))})),ft={}.toString,lt=function(t){return ft.call(t).slice(8,-1)},pt=H("toStringTag"),ht="Arguments"==lt(function(){return arguments}()),yt=W?lt:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),pt))?r:ht?lt(e):"Object"==(n=lt(e))&&"function"==typeof e.callee?"Arguments":n},dt=W?{}.toString:function(){return"[object "+yt(this)+"]"};W||st(Object.prototype,"toString",dt,{unsafe:!0});var vt,gt,bt,mt=Math.ceil,wt=Math.floor,Ot=function(t){return isNaN(t=+t)?0:(t>0?wt:mt)(t)},Et=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},jt=function(t){return function(e,r){var n,o,i=String(Et(e)),a=Ot(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===u||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},At={codeAt:jt(!1),charAt:jt(!0)},Tt={}.propertyIsEnumerable,St=Object.getOwnPropertyDescriptor,Pt={f:St&&!Tt.call({1:2},1)?function(t){var e=St(this,t);return!!e&&e.enumerable}:Tt},_t="".split,Lt=g((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==lt(t)?_t.call(t,""):Object(t)}:Object,Rt=function(t){return Lt(Et(t))},kt=Object.getOwnPropertyDescriptor,xt={f:b?kt:function(t,e){if(t=Rt(t),e=T(e,!0),j)try{return kt(t,e)}catch(t){}if(I(t,e))return _(!Pt.f.call(t,e),t[e])}},Ct=v,It=function(t){return"function"==typeof t?t:void 0},Dt=function(t,e){return arguments.length<2?It(Ct[t])||It(v[t]):Ct[t]&&Ct[t][e]||v[t]&&v[t][e]},Mt=Math.min,Ft=function(t){return t>0?Mt(Ot(t),9007199254740991):0},Bt=Math.max,Nt=Math.min,Ut=function(t){return function(e,r,n){var o,i=Rt(e),a=Ft(i.length),u=function(t,e){var r=Ot(t);return r<0?Bt(r+e,0):Nt(r,e)}(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},qt={includes:Ut(!0),indexOf:Ut(!1)},Gt=qt.indexOf,Ht=function(t,e){var r,n=Rt(t),o=0,i=[];for(r in n)!I(et,r)&&I(n,r)&&i.push(r);for(;e.length>o;)I(n,r=e[o++])&&(~Gt(i,r)||i.push(r));return i},Vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wt=Vt.concat("length","prototype"),zt={f:Object.getOwnPropertyNames||function(t){return Ht(t,Wt)}},Yt={f:Object.getOwnPropertySymbols},Jt=Dt("Reflect","ownKeys")||function(t){var e=zt.f(A(t)),r=Yt.f;return r?e.concat(r(t)):e},Kt=function(t,e){for(var r=Jt(e),n=P.f,o=xt.f,i=0;i<r.length;i++){var a=r[i];I(t,a)||n(t,a,o(e,a))}},Xt=/#|\.prototype\./,$t=function(t,e){var r=Zt[Qt(t)];return r==ee||r!=te&&("function"==typeof e?g(e):!!e)},Qt=$t.normalize=function(t){return String(t).replace(Xt,".").toLowerCase()},Zt=$t.data={},te=$t.NATIVE="N",ee=$t.POLYFILL="P",re=$t,ne=xt.f,oe=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?v:s?v[u]||R(u,{}):(v[u]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(a=ne(r,n))&&a.value:r[n],!re(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Kt(i,o)}(t.sham||o&&o.sham)&&L(i,"sham",!0),st(r,n,i,t)}},ie=function(t){return Object(Et(t))},ae=!g((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ue=tt("IE_PROTO"),ce=Object.prototype,se=ae?Object.getPrototypeOf:function(t){return t=ie(t),I(t,ue)?t[ue]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ce:null},fe=H("iterator"),le=!1;[].keys&&("next"in(bt=[].keys())?(gt=se(se(bt)))!==Object.prototype&&(vt=gt):le=!0),null==vt&&(vt={}),I(vt,fe)||L(vt,fe,(function(){return this}));var pe={IteratorPrototype:vt,BUGGY_SAFARI_ITERATORS:le},he=Object.keys||function(t){return Ht(t,Vt)},ye=b?Object.defineProperties:function(t,e){A(t);for(var r,n=he(e),o=n.length,i=0;o>i;)P.f(t,r=n[i++],e[r]);return t},de=Dt("document","documentElement"),ve=tt("IE_PROTO"),ge=function(){},be=function(){var t,e=E("iframe"),r=Vt.length;for(e.style.display="none",de.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),be=t.F;r--;)delete be.prototype[Vt[r]];return be()},me=Object.create||function(t,e){var r;return null!==t?(ge.prototype=A(t),r=new ge,ge.prototype=null,r[ve]=t):r=be(),void 0===e?r:ye(r,e)};et[ve]=!0;var we=P.f,Oe=H("toStringTag"),Ee=function(t,e,r){t&&!I(t=r?t:t.prototype,Oe)&&we(t,Oe,{configurable:!0,value:e})},je={},Ae=pe.IteratorPrototype,Te=function(){return this},Se=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return A(r),function(t){if(!m(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Pe=pe.IteratorPrototype,_e=pe.BUGGY_SAFARI_ITERATORS,Le=H("iterator"),Re=function(){return this},ke=function(t,e,r,n,o,i,a){!function(t,e,r){var n=e+" Iterator";t.prototype=me(Ae,{next:_(1,r)}),Ee(t,n,!1),je[n]=Te}(r,e,n);var u,c,s,f=function(t){if(t===o&&d)return d;if(!_e&&t in h)return h[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,y=h[Le]||h["@@iterator"]||o&&h[o],d=!_e&&y||f(o),v="Array"==e&&h.entries||y;if(v&&(u=se(v.call(new t)),Pe!==Object.prototype&&u.next&&(se(u)!==Pe&&(Se?Se(u,Pe):"function"!=typeof u[Le]&&L(u,Le,Re)),Ee(u,l,!0))),"values"==o&&y&&"values"!==y.name&&(p=!0,d=function(){return y.call(this)}),h[Le]!==d&&L(h,Le,d),je[e]=d,o)if(c={values:f("values"),keys:i?d:f("keys"),entries:f("entries")},a)for(s in c)!_e&&!p&&s in h||st(h,s,c[s]);else oe({target:e,proto:!0,forced:_e||p},c);return c},xe=At.charAt,Ce=ct.set,Ie=ct.getterFor("String Iterator");ke(String,"String",(function(t){Ce(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Ie(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=xe(r,n),e.index+=t.length,{value:t,done:!1})}));var De={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Me=H("unscopables"),Fe=Array.prototype;null==Fe[Me]&&L(Fe,Me,me(null));var Be=function(t){Fe[Me][t]=!0},Ne=ct.set,Ue=ct.getterFor("Array Iterator"),qe=ke(Array,"Array",(function(t,e){Ne(this,{type:"Array Iterator",target:Rt(t),index:0,kind:e})}),(function(){var t=Ue(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");je.Arguments=je.Array,Be("keys"),Be("values"),Be("entries");var Ge=H("iterator"),He=H("toStringTag"),Ve=qe.values;for(var We in De){var ze=v[We],Ye=ze&&ze.prototype;if(Ye){if(Ye[Ge]!==Ve)try{L(Ye,Ge,Ve)}catch(t){Ye[Ge]=Ve}if(Ye[He]||L(Ye,He,We),De[We])for(var Je in qe)if(Ye[Je]!==qe[Je])try{L(Ye,Je,qe[Je])}catch(t){Ye[Je]=qe[Je]}}}var Ke=v.Promise,Xe=H("species"),$e=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Qe=H("iterator"),Ze=Array.prototype,tr=function(t,e,r){if($e(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},er=H("iterator"),rr=function(t,e,r,n){try{return n?e(A(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&A(o.call(t)),e}},nr=y((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,n,o,i){var a,u,c,s,f,l,p,h,y=tr(r,n,o?2:1);if(i)a=t;else{if("function"!=typeof(u=function(t){if(null!=t)return t[er]||t["@@iterator"]||je[yt(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=u)&&(je.Array===h||Ze[Qe]===h)){for(c=0,s=Ft(t.length);s>c;c++)if((f=o?y(A(p=t[c])[0],p[1]):y(t[c]))&&f instanceof e)return f;return new e(!1)}a=u.call(t)}for(l=a.next;!(p=l.call(a)).done;)if("object"==typeof(f=rr(a,y,p.value,o))&&f&&f instanceof e)return f;return new e(!1)}).stop=function(t){return new e(!0,t)}})),or=H("iterator"),ir=!1;try{var ar=0,ur={next:function(){return{done:!!ar++}},return:function(){ir=!0}};ur[or]=function(){return this},Array.from(ur,(function(){throw 2}))}catch(t){}var cr,sr,fr,lr=H("species"),pr=function(t,e){var r,n=A(t).constructor;return void 0===n||null==(r=A(n)[lr])?e:$e(r)},hr=Dt("navigator","userAgent")||"",yr=/(iphone|ipod|ipad).*applewebkit/i.test(hr),dr=v.location,vr=v.setImmediate,gr=v.clearImmediate,br=v.process,mr=v.MessageChannel,wr=v.Dispatch,Or=0,Er={},jr=function(t){if(Er.hasOwnProperty(t)){var e=Er[t];delete Er[t],e()}},Ar=function(t){return function(){jr(t)}},Tr=function(t){jr(t.data)},Sr=function(t){v.postMessage(t+"",dr.protocol+"//"+dr.host)};vr&&gr||(vr=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return Er[++Or]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},cr(Or),Or},gr=function(t){delete Er[t]},"process"==lt(br)?cr=function(t){br.nextTick(Ar(t))}:wr&&wr.now?cr=function(t){wr.now(Ar(t))}:mr&&!yr?(fr=(sr=new mr).port2,sr.port1.onmessage=Tr,cr=tr(fr.postMessage,fr,1)):!v.addEventListener||"function"!=typeof postMessage||v.importScripts||g(Sr)?cr="onreadystatechange"in E("script")?function(t){de.appendChild(E("script")).onreadystatechange=function(){de.removeChild(this),jr(t)}}:function(t){setTimeout(Ar(t),0)}:(cr=Sr,v.addEventListener("message",Tr,!1)));var Pr,_r,Lr,Rr,kr,xr,Cr,Ir,Dr={set:vr,clear:gr},Mr=xt.f,Fr=Dr.set,Br=v.MutationObserver||v.WebKitMutationObserver,Nr=v.process,Ur=v.Promise,qr="process"==lt(Nr),Gr=Mr(v,"queueMicrotask"),Hr=Gr&&Gr.value;Hr||(Pr=function(){var t,e;for(qr&&(t=Nr.domain)&&t.exit();_r;){e=_r.fn,_r=_r.next;try{e()}catch(t){throw _r?Rr():Lr=void 0,t}}Lr=void 0,t&&t.enter()},qr?Rr=function(){Nr.nextTick(Pr)}:Br&&!yr?(kr=!0,xr=document.createTextNode(""),new Br(Pr).observe(xr,{characterData:!0}),Rr=function(){xr.data=kr=!kr}):Ur&&Ur.resolve?(Cr=Ur.resolve(void 0),Ir=Cr.then,Rr=function(){Ir.call(Cr,Pr)}):Rr=function(){Fr.call(v,Pr)});var Vr,Wr,zr=Hr||function(t){var e={fn:t,next:void 0};Lr&&(Lr.next=e),_r||(_r=e,Rr()),Lr=e},Yr=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=$e(e),this.reject=$e(r)},Jr={f:function(t){return new Yr(t)}},Kr=function(t,e){if(A(t),m(e)&&e.constructor===t)return e;var r=Jr.f(t);return(0,r.resolve)(e),r.promise},Xr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},$r=v.process,Qr=$r&&$r.versions,Zr=Qr&&Qr.v8;Zr?Wr=(Vr=Zr.split("."))[0]+Vr[1]:hr&&(!(Vr=hr.match(/Edge\/(\d+)/))||Vr[1]>=74)&&(Vr=hr.match(/Chrome\/(\d+)/))&&(Wr=Vr[1]);var tn,en,rn,nn,on=Wr&&+Wr,an=Dr.set,un=H("species"),cn="Promise",sn=ct.get,fn=ct.set,ln=ct.getterFor(cn),pn=Ke,hn=v.TypeError,yn=v.document,dn=v.process,vn=Dt("fetch"),gn=Jr.f,bn=gn,mn="process"==lt(dn),wn=!!(yn&&yn.createEvent&&v.dispatchEvent),On=re(cn,(function(){if(!(X(pn)!==String(pn))){if(66===on)return!0;if(!mn&&"function"!=typeof PromiseRejectionEvent)return!0}if(on>=51&&/native code/.test(pn))return!1;var t=pn.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[un]=e,!(t.then((function(){}))instanceof e)})),En=On||!function(t,e){if(!e&&!ir)return!1;var r=!1;try{var n={};n[or]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){pn.all(t).catch((function(){}))})),jn=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},An=function(t,e,r){if(!e.notified){e.notified=!0;var n=e.reactions;zr((function(){for(var o=e.value,i=1==e.state,a=0;n.length>a;){var u,c,s,f=n[a++],l=i?f.ok:f.fail,p=f.resolve,h=f.reject,y=f.domain;try{l?(i||(2===e.rejection&&_n(t,e),e.rejection=1),!0===l?u=o:(y&&y.enter(),u=l(o),y&&(y.exit(),s=!0)),u===f.promise?h(hn("Promise-chain cycle")):(c=jn(u))?c.call(u,p,h):p(u)):h(o)}catch(t){y&&!s&&y.exit(),h(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&Sn(t,e)}))}},Tn=function(t,e,r){var n,o;wn?((n=yn.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),v.dispatchEvent(n)):n={promise:e,reason:r},(o=v["on"+t])?o(n):"unhandledrejection"===t&&function(t,e){var r=v.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},Sn=function(t,e){an.call(v,(function(){var r,n=e.value;if(Pn(e)&&(r=Xr((function(){mn?dn.emit("unhandledRejection",n,t):Tn("unhandledrejection",t,n)})),e.rejection=mn||Pn(e)?2:1,r.error))throw r.value}))},Pn=function(t){return 1!==t.rejection&&!t.parent},_n=function(t,e){an.call(v,(function(){mn?dn.emit("rejectionHandled",t):Tn("rejectionhandled",t,e.value)}))},Ln=function(t,e,r,n){return function(o){t(e,r,o,n)}},Rn=function(t,e,r,n){e.done||(e.done=!0,n&&(e=n),e.value=r,e.state=2,An(t,e,!0))},kn=function(t,e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(t===r)throw hn("Promise can't be resolved itself");var o=jn(r);o?zr((function(){var n={done:!1};try{o.call(r,Ln(kn,t,n,e),Ln(Rn,t,n,e))}catch(r){Rn(t,n,r,e)}})):(e.value=r,e.state=1,An(t,e,!1))}catch(r){Rn(t,{done:!1},r,e)}}};On&&(pn=function(t){!function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation")}(this,pn,cn),$e(t),tn.call(this);var e=sn(this);try{t(Ln(kn,this,e),Ln(Rn,this,e))}catch(t){Rn(this,e,t)}},(tn=function(t){fn(this,{type:cn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,r){for(var n in e)st(t,n,e[n],r);return t}(pn.prototype,{then:function(t,e){var r=ln(this),n=gn(pr(this,pn));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=mn?dn.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&An(this,r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),en=function(){var t=new tn,e=sn(t);this.promise=t,this.resolve=Ln(kn,t,e),this.reject=Ln(Rn,t,e)},Jr.f=gn=function(t){return t===pn||t===rn?new en(t):bn(t)},"function"==typeof Ke&&(nn=Ke.prototype.then,st(Ke.prototype,"then",(function(t,e){var r=this;return new pn((function(t,e){nn.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof vn&&oe({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Kr(pn,vn.apply(v,arguments))}}))),oe({global:!0,wrap:!0,forced:On},{Promise:pn}),Ee(pn,cn,!1),function(t){var e=Dt(t),r=P.f;b&&e&&!e[Xe]&&r(e,Xe,{configurable:!0,get:function(){return this}})}(cn),rn=Dt(cn),oe({target:cn,stat:!0,forced:On},{reject:function(t){var e=gn(this);return e.reject.call(void 0,t),e.promise}}),oe({target:cn,stat:!0,forced:On},{resolve:function(t){return Kr(this,t)}}),oe({target:cn,stat:!0,forced:En},{all:function(t){var e=this,r=gn(e),n=r.resolve,o=r.reject,i=Xr((function(){var r=$e(e.resolve),i=[],a=0,u=1;nr(t,(function(t){var c=a++,s=!1;i.push(void 0),u++,r.call(e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=gn(e),n=r.reject,o=Xr((function(){var o=$e(e.resolve);nr(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}}),oe({target:"Promise",stat:!0},{allSettled:function(t){var e=this,r=Jr.f(e),n=r.resolve,o=r.reject,i=Xr((function(){var r=$e(e.resolve),o=[],i=0,a=1;nr(t,(function(t){var u=i++,c=!1;o.push(void 0),a++,r.call(e,t).then((function(t){c||(c=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){c||(c=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var xn=!!Ke&&g((function(){Ke.prototype.finally.call({then:function(){}},(function(){}))}));oe({target:"Promise",proto:!0,real:!0,forced:xn},{finally:function(t){var e=pr(this,Dt("Promise")),r="function"==typeof t;return this.then(r?function(r){return Kr(e,t()).then((function(){return r}))}:t,r?function(r){return Kr(e,t()).then((function(){throw r}))}:t)}}),"function"!=typeof Ke||Ke.prototype.finally||st(Ke.prototype,"finally",Dt("Promise").prototype.finally);Ct.Promise;var Cn=ct.set,In=ct.getterFor("AggregateError"),Dn=function(t,e){var r=this;if(!(r instanceof Dn))return new Dn(t,e);Se&&(r=Se(new Error(e),se(r)));var n=[];return nr(t,n.push,n),b?Cn(r,{errors:n,type:"AggregateError"}):r.errors=n,void 0!==e&&L(r,"message",String(e)),r};Dn.prototype=me(Error.prototype,{constructor:_(5,Dn),message:_(5,""),name:_(5,"AggregateError")}),b&&P.f(Dn.prototype,"errors",{get:function(){return In(this).errors},configurable:!0}),oe({global:!0},{AggregateError:Dn}),oe({target:"Promise",stat:!0},{try:function(t){var e=Jr.f(this),r=Xr(t);return(r.error?e.reject:e.resolve)(r.value),e.promise}});oe({target:"Promise",stat:!0},{any:function(t){var e=this,r=Jr.f(e),n=r.resolve,o=r.reject,i=Xr((function(){var r=$e(e.resolve),i=[],a=0,u=1,c=!1;nr(t,(function(t){var s=a++,f=!1;i.push(void 0),u++,r.call(e,t).then((function(t){f||c||(c=!0,n(t))}),(function(t){f||c||(f=!0,i[s]=t,--u||o(new(Dt("AggregateError"))(i,"No one promise resolved")))}))})),--u||o(new(Dt("AggregateError"))(i,"No one promise resolved"))}));return i.error&&o(i.value),r.promise}});var Mn="init.core",Fn="Promise returned an invalid response.\nFollowing are the valid signatures:\n1. { template, target, data }\n2. { template, target, error },\n3. { target, html }",Bn="Couldn't resolve target reference.",Nn='HTML or Promise returned by "render" method is invalid.\nHint: If you are using "render.fn" module to render components, use spread operator while combining it with regular HTML:\ne.g. return [\'<div>Regular HTML</div>\', ...render.fn({ ... })];',Un="Target template is missing.",qn="Provided URL is invalid.",Gn='Invalid schema for URL object. Allowed fields are "path" and "data".',Hn="Please provide a valid template name.",Vn="Please provide a valid selector.",Wn="Render requires a template object.",zn="Invalid route object. Routes should be passed using below format:\n[\n {\n route: '/path/to/route',\n component: 'ComponentClassName'\n },\n ...\n]",Yn="Provided route is not defined!",Jn=qt.includes;oe({target:"Array",proto:!0},{includes:function(t){return Jn(this,t,arguments.length>1?arguments[1]:void 0)}}),Be("includes");var Kn=Function.call,Xn=function(t,e,r){return tr(Kn,v[t].prototype[e],r)};Xn("Array","includes");if(void 0===window.CustomEvent){var $n=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r};$n.prototype=window.Event.prototype,window.CustomEvent=$n}function Qn(t){switch(t){case"true":return!0;case"false":return!1;case"NaN":return NaN;case"null":case"NULL":return null;case"undefined":return;default:return isNaN(t)?t:+t}}function Zn(t){return"string"==typeof t||t instanceof no||t instanceof Node||t instanceof NodeList||Array.isArray(t)}function to(t){return t&&"object"===n(t)?JSON.stringify(t):t}function eo(t){if("string"==typeof t)try{return JSON.parse(t)}catch(t){}return t}function ro(t){var e="";if("string"==typeof t)for(var r=0;r<t.length;r++)t.charCodeAt(r)>=65&&t.charCodeAt(r)<=90?e+="-".concat(t.charAt(r).toLowerCase()):e+=t.charAt(r);return e}var no=function(){function t(e,r){if(o(this,t),this.length=0,Zn(e)){if("string"==typeof e){var n="<"===e.trim().charAt(0);if(r=r||n)if(n){var i=document.createElement("div");i.innerHTML=e,e=i.childNodes}else{var a=document.createDocumentFragment();a.appendChild(document.createTextNode(e)),e=[a]}else e=document.querySelectorAll(e)}e instanceof Node&&(e=[e]);for(var u=0;u<e.length;u++)[1,9,11].includes(e[u].nodeType)&&(this[this.length++]=e[u])}}return a(t,[{key:"trigger",value:function(t,e){return this.each((function(r){var n=new window.CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e||[]});r.dispatchEvent(n)})),this}},{key:"on",value:function(t,e,r,n,o){var i=this;return 2===arguments.length&&(n=e,e=void 0),3===arguments.length&&("boolean"==typeof r&&(o=r,n=e,e=r=void 0),"function"==typeof r&&(n=r,Zn(e)?r=void 0:(r=e,e=void 0))),4===arguments.length&&"boolean"==typeof n&&(o=n,n=r,Zn(e)?r=void 0:(r=e,e=void 0)),this.each((function(a){a.addEventListener(t,(function(t){t.data=r;var o=[t];if(Array.isArray(t.detail)&&(o=o.concat(t.detail)),e){var a=i.find(e).add(i).has(t.target);a.length&&n.apply(a[0],o)}else n.apply(this,o)}),o)})),this}},{key:"html",value:function(t){return void 0===t?this.map((function(t){return t.innerHTML})).join(""):(null!==t&&this.each((function(e){e.innerHTML=t.toString()})),this)}},{key:"append",value:function(e){return this.each((function(r,n){new t(e,"string"==typeof e).clone(0===n).each((function(t){r.appendChild(t)}))})),this}},{key:"prepend",value:function(t){var e=this.children().detach();this.append(t).append(e)}},{key:"detach",value:function(){var e=document.createDocumentFragment();return this.each((function(t){e.appendChild(t)})),new t([e])}},{key:"children",value:function(){var e=[];return this.each((function(t){e.push.apply(e,p(t.childNodes))})),new t(e)}},{key:"has",value:function(e){var r=new t(e),n=[];return this.each((function(t){r.each((function(e){t!==e&&!t.contains(e)||n.includes(t)||n.push(t)}))})),new t(n)}},{key:"contains",value:function(t){return this.has(t).length>0}},{key:"filter",value:function(e){var r=new t;return"function"==typeof e&&this.each((function(t,n){e.apply(t,[t,n])&&(r[r.length++]=t)})),r}},{key:"clone",value:function(e){return e?this:new t(this.map((function(t){return t.cloneNode(!0)})))}},{key:"map",value:function(t){var e=[];return"function"==typeof t&&this.each((function(r,n){e.push(t.apply(r,[r,n]))})),e}},{key:"each",value:function(t){if("function"==typeof t)for(var e=0;e<this.length;e++)t.apply(this[e],[this[e],e]);return this}},{key:"find",value:function(e){var r=[];return"string"==typeof e&&this.each((function(n){new t(n.querySelectorAll(e)).each((function(t){r.includes(t)||r.push(t)}))})),new t(r)}},{key:"data",value:function(t,e){if(1===arguments.length){if("string"==typeof t)return Qn(this.attr("data-".concat(ro(t))));if(t&&"object"===n(t)){var r={};Object.keys(t).forEach((function(e){r["data-".concat(ro(e))]=t[e]})),this.attr(r)}return this}return 2===arguments.length&&this.attr("data-".concat(ro(t)),e),this}},{key:"attr",value:function(t,e){var r=this;return 1===arguments.length?"string"==typeof t?eo(this[0].getAttribute(t)):(t&&"object"===n(t)&&Object.keys(t).forEach((function(e){r[0].setAttribute(ro(e),to(t[e]))})),this):(2===arguments.length&&"string"==typeof t&&this[0].setAttribute(ro(t),to(e)),this)}},{key:"add",value:function(e){var r=this;return new t(e).each((function(t){r.filter((function(e){return e===t})).length||(r[r.length++]=t)})),this}},{key:"empty",value:function(){return this.html("")}}]),t}();function oo(t){return["complete","interactive"].includes(this.readyState())&&"function"==typeof t}var io=function(t){function e(){var t;o(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return f(this,(t=u(e)).call.apply(t,[this].concat(n)))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,t),a(e,[{key:"ready",value:function(t){var e=this;return oo.apply(this,[t])?setTimeout(t.bind(this[0]),0):this.on("DOMContentLoaded",(function(){oo.apply(e,[t])&&t.apply(e[0])})),this}},{key:"readyState",value:function(){return this[0].readyState}}]),e}(no);function ao(){var t=Array.prototype.slice.call(arguments);if("function"==typeof t[0]){var e=t[0];return t=[document],s(io,p(t)).ready(e)}return arguments[0]===document?s(io,p(t)):s(no,p(t))}var uo=new e;function co(t,e){return!(!t||"object"!==n(t))&&Object.prototype.hasOwnProperty.call(t,e)}var so=function(){function t(e,n){var i=this;if(o(this,t),this.subscriptions=[],this.hashMode=n,!Array.isArray(e))throw new TypeError(zn);var a=[],u=[];e.forEach((function(t){if(!co(t,"component"))throw new TypeError(zn);if(co(t,"route")){var e="".concat(n?"#":"").concat(t.route);a.includes(e)||a.push(e)}else if(co(t,"error")){var r="".concat(n?"#":"").concat(t.error);a.includes(r)||a.push(r),u.includes(r)||u.push(r)}})),this.routeList=e,this.routeFn=function(t){if(n&&t.hash||!n)if(a.includes(t.route)){var e=t.data,o=t.params,c=t.query,s=t.route;i.currentRoute={route:s,data:e,params:o,query:c},i.subscriptions.forEach((function(t){t.apply(i,[i.currentRoute])}))}else{if(!u.length)throw new Error(Yn);r.router.set(u[0],!0)}},r.route(this.routeFn),!window.location.hash&&n&&r.router.set("#/",!0)}return a(t,[{key:"routes",value:function(){var t=this;return this.routeList.map((function(e){return{route:"".concat(t.hashMode?"#":"").concat(e.route),component:e.component}}))}},{key:"destroy",value:function(){this.subscriptions.length=0,r.unroute(this.routeFn)}},{key:"navigate",value:function(){return r.router.set.apply(r.router,arguments),this}},{key:"subscribe",value:function(t){return"function"!=typeof t||this.subscriptions.includes(t)||this.subscriptions.push(t),this}}]),t}();var fo=ao(document.body);function lo(t,e){var r=ao(e||this.root);r[r.data("rendered")?"append":"html"](t),r.data("rendered",!0)}function po(t){var e=ao(t);return 1===e.length&&e[0]===this.root?ao(this.root):ao(this.root).find(t)}function ho(t){try{var e=po.apply(this,[t.target]),r=t.data||t.error,n=t.template,o=t.html;if(!e.length)throw new Error(Bn);o=n?n(r):to(r),lo.apply(this,[o,e]),fo.trigger(Mn,[this.root])}catch(t){uo.error("[Argon]:",t)}}function yo(t){var e=this;(Array.isArray(t)?t:[t]).forEach((function(t){if("string"==typeof t)lo.apply(e,[t]),fo.trigger(Mn,[e.root]);else if("function"==typeof t)lo.apply(e,[t()]),fo.trigger(Mn,[e.root]);else if(t&&"object"===n(t)){if(Array.isArray(t))throw new TypeError(Fn);ho.apply(e,[t])}}))}function vo(t){var e=this;t.then((function(t){yo.apply(e,[t])})).catch((function(t){"function"==typeof e.onError&&(yo.apply(e,[t]),e.onError(t))}))}function go(t,e){var r=t.currentRoute,n=r.route,o=r.data,i=r.params,a=r.query,u=t.routes().filter((function(t){return t.route===n})).map((function(t){return t.component}));ao(this.root).data("rendered","false").data("module",[].concat(p(e),p(u)).join(",")),fo.trigger(Mn,[this.parent,{data:o,params:i,query:a}])}function bo(t){var e=this;try{var r=ao(this.root).data("module"),n=[];if("string"==typeof r&&n.push.apply(n,p(r.split(",").map((function(t){return t.trim()})))),t instanceof so){var o=this.doDestroy;this.doDestroy=function(){t.destroy(),"function"==typeof o&&o.apply(e)},t.currentRoute&&go.apply(this,[t,n]),t.subscribe((function(){go.apply(e,[t,n])}))}else if("string"==typeof t)lo.apply(this,[t]);else if("function"==typeof t)lo.apply(this,[t()]);else{if(!Array.isArray(t)&&!t.then)throw new TypeError(Nn);(t=t.length?t:[t]).forEach((function(t){if("string"==typeof t)lo.apply(e,[t]);else if("function"==typeof t)lo.apply(e,[t()]);else{if(!t.then)throw new TypeError(Nn);vo.apply(e,[t])}}))}}catch(t){uo.error("[Argon]:",t)}}var mo=function(){function t(e){var r=e.root,n=e.parent,i=e.routeData;o(this,t),this.root=r,this.parent=n,this.routeData=i}return a(t,[{key:"init",value:function(){"function"==typeof this.doInit&&this.doInit(this.root,this.parent),"function"==typeof this.render&&bo.apply(this,[this.render()])}}]),t}(),wo=Object.assign,Oo=Object.defineProperty,Eo=!wo||g((function(){if(b&&1!==wo({b:1},wo(Oo({},"a",{enumerable:!0,get:function(){Oo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=wo({},t)[r]||"abcdefghijklmnopqrst"!=he(wo({},e)).join("")}))?function(t,e){for(var r=ie(t),n=arguments.length,o=1,i=Yt.f,a=Pt.f;n>o;)for(var u,c=Lt(arguments[o++]),s=i?he(c).concat(i(c)):he(c),f=s.length,l=0;f>l;)u=s[l++],b&&!a.call(c,u)||(r[u]=c[u]);return r}:wo;oe({target:"Object",stat:!0,forced:Object.assign!==Eo},{assign:Eo});Ct.Object.assign;var jo=H("match"),Ao=function(t){if(function(t){var e;return m(t)&&(void 0!==(e=t[jo])?!!e:"RegExp"==lt(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},To=H("match");oe({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[To]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(Et(this)).indexOf(Ao(t),arguments.length>1?arguments[1]:void 0)}});Xn("String","includes");var So={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(So.arrayBuffer)var Po=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_o=ArrayBuffer.isView||function(t){return t&&Po.indexOf(Object.prototype.toString.call(t))>-1};function Lo(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function Ro(t){return"string"!=typeof t&&(t=String(t)),t}function ko(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return So.iterable&&(e[Symbol.iterator]=function(){return e}),e}function xo(t){this.map={},t instanceof xo?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Co(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function Io(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function Do(t){var e=new FileReader,r=Io(e);return e.readAsArrayBuffer(t),r}function Mo(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function Fo(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:So.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:So.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:So.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():So.arrayBuffer&&So.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=Mo(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):So.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||_o(t))?this._bodyArrayBuffer=Mo(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):So.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},So.blob&&(this.blob=function(){var t=Co(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Co(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Do)}),this.text=function(){var t=Co(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=Io(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},So.formData&&(this.formData=function(){return this.text().then(Uo)}),this.json=function(){return this.text().then(JSON.parse)},this}xo.prototype.append=function(t,e){t=Lo(t),e=Ro(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},xo.prototype.delete=function(t){delete this.map[Lo(t)]},xo.prototype.get=function(t){return t=Lo(t),this.has(t)?this.map[t]:null},xo.prototype.has=function(t){return this.map.hasOwnProperty(Lo(t))},xo.prototype.set=function(t,e){this.map[Lo(t)]=Ro(e)},xo.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},xo.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),ko(t)},xo.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),ko(t)},xo.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),ko(t)},So.iterable&&(xo.prototype[Symbol.iterator]=xo.prototype.entries);var Bo=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function No(t,e){var r,n,o=(e=e||{}).body;if(t instanceof No){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new xo(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new xo(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),Bo.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function Uo(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function qo(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new xo(e.headers),this.url=e.url||"",this._initBody(t)}No.prototype.clone=function(){return new No(this,{body:this._bodyInit})},Fo.call(No.prototype),Fo.call(qo.prototype),qo.prototype.clone=function(){return new qo(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new xo(this.headers),url:this.url})},qo.error=function(){var t=new qo(null,{status:0,statusText:""});return t.type="error",t};var Go=[301,302,303,307,308];qo.redirect=function(t,e){if(-1===Go.indexOf(e))throw new RangeError("Invalid status code");return new qo(null,{status:e,headers:{location:t}})};var Ho=self.DOMException;try{new Ho}catch(t){(Ho=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),Ho.prototype.constructor=Ho}function Vo(t,e){return new Promise((function(r,n){var o=new No(t,e);if(o.signal&&o.signal.aborted)return n(new Ho("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}i.onload=function(){var t,e,n={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",e=new xo,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;r(new qo(o,n))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.onabort=function(){n(new Ho("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&So.blob&&(i.responseType="blob"),o.headers.forEach((function(t,e){i.setRequestHeader(e,t)})),o.signal&&(o.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",a)}),i.send(void 0===o._bodyInit?null:o._bodyInit)}))}Vo.polyfill=!0,self.fetch||(self.fetch=Vo,self.Headers=xo,self.Request=No,self.Response=qo),function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(r):i.value}})(t,e,r||t)}var u=function(){function e(){t(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return r(e,[{key:"addEventListener",value:function(t,e){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(e)}},{key:"removeEventListener",value:function(t,e){if(t in this.listeners)for(var r=this.listeners[t],n=0,o=r.length;n<o;n++)if(r[n]===e)return void r.splice(n,1)}},{key:"dispatchEvent",value:function(t){var e=this;if(t.type in this.listeners){for(var r=function(r){setTimeout((function(){return r.call(e,t)}))},n=this.listeners[t.type],o=0,i=n.length;o<i;o++)r(n[o]);return!t.defaultPrevented}}}]),e}(),c=function(e){function c(){var e;return t(this,c),(e=function(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?i(t):e}(this,n(c).call(this))).listeners||u.call(i(e)),Object.defineProperty(i(e),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(i(e),"onabort",{value:null,writable:!0,configurable:!0}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(c,e),r(c,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),a(n(c.prototype),"dispatchEvent",this).call(this,t)}}]),c}(u),s=function(){function e(){t(this,e),Object.defineProperty(this,"signal",{value:new c,writable:!0,configurable:!0})}return r(e,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();function f(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof t.Request&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController}"undefined"!=typeof Symbol&&Symbol.toStringTag&&(s.prototype[Symbol.toStringTag]="AbortController",c.prototype[Symbol.toStringTag]="AbortSignal"),function(t){if(f(t))if(t.fetch){var e=function(t){"function"==typeof t&&(t={fetch:t});var e=t,r=e.fetch,n=e.Request,o=void 0===n?r.Request:n,i=e.AbortController,a=e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,u=void 0!==a&&a;if(!f({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:u}))return{fetch:r,Request:c};var c=o;(c&&!c.prototype.hasOwnProperty("signal")||u)&&((c=function(t,e){var r;e&&e.signal&&(r=e.signal,delete e.signal);var n=new o(t,e);return r&&Object.defineProperty(n,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),n}).prototype=o.prototype);var s=r;return{fetch:function(t,e){var r=c&&c.prototype.isPrototypeOf(t)?t.signal:e?e.signal:void 0;if(r){var n;try{n=new DOMException("Aborted","AbortError")}catch(t){(n=new Error("Aborted")).name="AbortError"}if(r.aborted)return Promise.reject(n);var o=new Promise((function(t,e){r.addEventListener("abort",(function(){return e(n)}),{once:!0})}));return e&&e.signal&&delete e.signal,Promise.race([o,s(t,e)])}return s(t,e)},Request:c}}(t),r=e.fetch,n=e.Request;t.fetch=r,t.Request=n,Object.defineProperty(t,"AbortController",{writable:!0,enumerable:!1,configurable:!0,value:s}),Object.defineProperty(t,"AbortSignal",{writable:!0,enumerable:!1,configurable:!0,value:c})}else console.warn("fetch() is not available, cannot install abortcontroller-polyfill")}("undefined"!=typeof self?self:h)}();var Wo=[],zo=function(){function t(e,r){o(this,t),r||(r={}),this.url=e,this.config=r,this.controller=new window.AbortController;var n=this.controller.signal;this.fetch=window.fetch(e,Object.assign(r,{signal:n}))}return a(t,[{key:"abort",value:function(){this.controller.abort()}},{key:"then",value:function(){var t;return(t=this.fetch).then.apply(t,arguments)}},{key:"catch",value:function(){var t;return(t=this.fetch).catch.apply(t,arguments)}}]),t}();function Yo(t,e){var r=Wo.filter((function(e){return e.url.split("?")[0]===t.split("?")[0]}));r.forEach((function(t){e&&t.abort(),r.splice(r.indexOf(t),1)}))}function Jo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t&&"string"==typeof t){e.cancellable&&(Yo(t,e.cancellable),delete e.cancellable);var r=new zo(t,e);return Wo.push(r),r.then((function(){return Yo(t)})).catch((function(){return Yo(t)})),r}throw new TypeError(qn)}function Ko(){return Jo.apply(this,arguments)}var Xo={GET:"GET",POST:"POST",PUT:"PUT",DELETE:"DELETE",HEAD:"HEAD"};function $o(t){return t&&"object"===n(t)&&!Array.isArray(t)}function Qo(t){var e=this.config,o=t.data;"string"!=typeof o&&o&&"object"===n(o)&&(!function(t){var e=t.fetchOptions;return"json"===t.requestDataType||e&&e.headers&&"application/json"===e.headers["Content-Type"]}(e)?t.data=r.param(o):t.data=JSON.stringify(o))}function Zo(t){var e=Object.keys(t);if(1===e.length&&"path"===e[0])return t;if(2===e.length&&e.includes("path")&&e.includes("data"))return Qo.apply(this,[t]),t;throw new Error(Gn)}function ti(t){var e=this;if("string"==typeof t){var r=l(t.split("?"),2);return[{path:r[0],data:r[1]}]}if(t&&"object"===n(t)){if(Array.isArray(t))return t.map((function(t){if("string"==typeof t){var r=l(t.split("?"),2);return{path:r[0],data:r[1]}}if($o(t))return Zo.apply(e,[t])}));if($o(t))return[Zo.apply(this,[t])]}throw new TypeError(qn)}function ei(){var t=this,e=this.config,r=e.template;return"function"==typeof e.beforeRender&&e.beforeRender.apply(e,[e.data]),new Promise((function(n,o){var i={template:null,target:e.target};r?t.templateMap[r]?n(Object.assign(i,{template:t.templateMap[r],data:e.data})):o(Object.assign(i,{error:Un})):o(Object.assign(i,{error:Hn}))}))}function ri(t,e,r){var n="template"===r?Hn:Vn;if(t&&"string"==typeof t||"target"===r&&Zn(t)){for(var o=[],i=0;i<e;i++)o.push(t);return o}if(Array.isArray(t))return t.map((function(t){if(t&&"string"==typ