openc3-cosmos-tool-tlmviewer 5.1.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/tlmviewer/js/734.js +71 -0
- data/tools/tlmviewer/js/734.js.map +1 -0
- data/tools/tlmviewer/js/999.js +2 -0
- data/tools/tlmviewer/js/999.js.map +1 -0
- data/tools/tlmviewer/js/app.js +1 -1
- data/tools/tlmviewer/js/app.js.map +1 -1
- metadata +6 -6
- data/tools/tlmviewer/js/668.js +0 -2
- data/tools/tlmviewer/js/668.js.map +0 -1
- data/tools/tlmviewer/js/942.js +0 -71
- data/tools/tlmviewer/js/942.js.map +0 -1
@@ -0,0 +1,71 @@
|
|
1
|
+
(self["webpackChunk_openc3_cosmos_tool_tlmviewer"]=self["webpackChunk_openc3_cosmos_tool_tlmviewer"]||[]).push([[734],{47146:function(t,e,n){"use strict";n.d(e,{ju:function(){return a},zD:function(){return b}});var i={logger:self.console,WebSocket:self.WebSocket},r={log(...t){this.enabled&&(t.push(Date.now()),i.logger.log("[ActionCable]",...t))}};const o=()=>(new Date).getTime(),s=t=>(o()-t)/1e3;class a{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=o(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),r.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=o(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=o()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,r.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=o(),r.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:e}=this.constructor,n=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),i=0===this.reconnectAttempts?1:e,r=i*Math.random();return 1e3*t*n*(1+r)}reconnectIfStale(){this.connectionIsStale()&&(r.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${s(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?r.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${s(this.disconnectedAt)} s`):(r.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return s(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&s(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){"visible"===document.visibilityState&&setTimeout((()=>{!this.connectionIsStale()&&this.connection.isOpen()||(r.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}a.staleThreshold=6,a.reconnectionBackoffRate=.15;var l={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:c,protocols:u}=l,h=u.slice(0,u.length-1),f=[].indexOf;class d{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new a(this),this.disconnected=!0}send(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)}open(){return this.isActive()?(r.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1):(r.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${u}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new i.WebSocket(this.consumer.url,u),this.installEventHandlers(),this.monitor.start(),!0)}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(r.log(`Reopening WebSocket, current state is ${this.getState()}`),!this.isActive())return this.open();try{return this.close()}catch(t){r.log("Failed to reopen WebSocket",t)}finally{r.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}isProtocolSupported(){return f.call(h,this.getProtocol())>=0}isState(...t){return f.call(t,this.getState())>=0}getState(){if(this.webSocket)for(let t in i.WebSocket)if(i.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase();return null}installEventHandlers(){for(let t in this.events){const e=this.events[t].bind(this);this.webSocket[`on${t}`]=e}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}d.reopenDelay=500,d.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:i,reconnect:o,type:s}=JSON.parse(t.data);switch(s){case c.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case c.disconnect:return r.log(`Disconnecting. Reason: ${i}`),this.close({allowReconnect:o});case c.ping:return this.monitor.recordPing();case c.confirmation:return this.subscriptions.confirmSubscription(e),this.subscriptions.notify(e,"connected");case c.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(r.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return r.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(r.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){r.log("WebSocket onerror event")}};const p=function(t,e){if(null!=e)for(let n in e){const i=e[n];t[n]=i}return t};class g{constructor(t,e={},n){this.consumer=t,this.identifier=JSON.stringify(e),p(this,n)}perform(t,e={}){return e.action=t,this.send(e)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class m{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){-1==this.pendingSubscriptions.indexOf(t)?(r.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):r.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){r.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==t))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&"function"===typeof this.subscriptions.subscribe&&this.pendingSubscriptions.map((t=>{r.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)}))}),500)}}class v{constructor(t){this.consumer=t,this.guarantor=new m(this),this.subscriptions=[]}create(t,e){const n=t,i="object"===typeof n?n:{channel:n},r=new g(this.consumer,i,e);return this.add(r)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map((t=>(this.forget(t),this.notify(t,"rejected"),t)))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((e=>e!==t)),t}findAll(t){return this.subscriptions.filter((e=>e.identifier===t))}reload(){return this.subscriptions.map((t=>this.subscribe(t)))}notifyAll(t,...e){return this.subscriptions.map((n=>this.notify(n,t,...e)))}notify(t,e,...n){let i;return i="string"===typeof t?this.findAll(t):[t],i.map((t=>"function"===typeof t[e]?t[e](...n):void 0))}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){r.log(`Subscription confirmed ${t}`),this.findAll(t).map((t=>this.guarantor.forget(t)))}sendCommand(t,e){const{identifier:n}=t;return this.consumer.send({command:e,identifier:n})}}class y{constructor(t){this._url=t,this.subscriptions=new v(this),this.connection=new d(this)}get url(){return w(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}}function w(t){if("function"===typeof t&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}return t}function b(t=_("url")||l.default_mount_path){return new y(t)}function _(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}},35685:function(t,e,n){"use strict";n.d(e,{Z:function(){return lr}});var i,r,o=n(78081),s=n(50615),a=n(97302),l=n(26259),c=n(66964),u=(n(18178),n(58188),n(28673),n(52356),n(6886),n(74279),n(97890),n(5377),n(8373),n(15290),n(23271),n(71245),n(79321),n(43450),n(36728),n(33132),n(96928),n(13675),n(94898),n(5825),n(67170),n(38857),n(58329),n(76279),n(427),n(40171),n(57093),n(11159),n(42516),n(64349),n(15273),n(16729),n(41801),n(50574),n(5787),n(39271),n(73160),n(65688),n(93157),n(33333),n(70315),n(50556),n(29224),n(49228),n(32501),n(93244),n(43430),n(27233),n(92656),n(19866),n(77950),n(95342),n(21850),n(1939),n(85940),n(74083),n(99805),n(90103),n(48319),n(74069),!0),h="u-",f="uplot",d=h+"hz",p=h+"vt",g=h+"title",m=h+"wrap",v=h+"under",y=h+"over",w=h+"axis",b=h+"off",_=h+"select",S=h+"cursor-x",x=h+"cursor-y",C=h+"cursor-pt",k=h+"legend",A=h+"live",$=h+"inline",R=h+"thead",T=h+"series",E=h+"marker",L=h+"label",M=h+"value",O="width",D="height",P="top",I="bottom",F="left",W="right",B="#000",H=B+"0",N="mousemove",j="mousedown",U="mouseup",z="mouseenter",G="mouseleave",V="dblclick",q="resize",Y="scroll",K="change",X="dppxchange",Z="undefined"!=typeof window,Q=Z?document:null,J=Z?window:null,tt=Z?navigator:null;function et(){var t=devicePixelRatio;i!=t&&(i=t,r&&mt(K,r,et),r=matchMedia("(min-resolution: ".concat(i-.001,"dppx) and (max-resolution: ").concat(i+.001,"dppx)")),gt(K,r,et),J.dispatchEvent(new CustomEvent(X)))}function nt(t,e){if(null!=e){var n=t.classList;!n.contains(e)&&n.add(e)}}function it(t,e){var n=t.classList;n.contains(e)&&n.remove(e)}function rt(t,e,n){t.style[e]=n+"px"}function ot(t,e,n,i){var r=Q.createElement(t);return null!=e&&nt(r,e),null!=n&&n.insertBefore(r,i),r}function st(t,e){return ot("div",t,e)}var at=new WeakMap;function lt(t,e,n,i,r){var o="translate("+e+"px,"+n+"px)",s=at.get(t);o!=s&&(t.style.transform=o,at.set(t,o),e<0||n<0||e>i||n>r?nt(t,b):it(t,b))}var ct=new WeakMap;function ut(t,e,n){var i=e+n,r=ct.get(t);i!=r&&(ct.set(t,i),t.style.background=e,t.style.borderColor=n)}var ht=new WeakMap;function ft(t,e,n,i){var r=e+""+n,o=ht.get(t);r!=o&&(ht.set(t,r),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=i?-e/2+"px":0,t.style.marginTop=i?-n/2+"px":0)}var dt={passive:!0},pt=(0,c.Z)((0,c.Z)({},dt),{},{capture:!0});function gt(t,e,n,i){e.addEventListener(t,n,i?pt:dt)}function mt(t,e,n,i){e.removeEventListener(t,n,i?pt:dt)}function vt(t,e,n,i){var r;n=n||0,i=i||e.length-1;var o=i<=2147483647;while(i-n>1)r=o?n+i>>1:It((n+i)/2),e[r]<t?n=r:i=r;return t-e[n]<=e[i]-t?n:i}function yt(t,e,n,i){for(var r=1==i?e:n;r>=e&&r<=n;r+=i)if(null!=t[r])return r;return-1}function wt(t,e,n,i){var r=qt,o=-qt;if(1==i)r=t[e],o=t[n];else if(-1==i)r=t[n],o=t[e];else for(var s=e;s<=n;s++)null!=t[s]&&(r=Bt(r,t[s]),o=Ht(o,t[s]));return[r,o]}function bt(t,e,n){for(var i=qt,r=-qt,o=e;o<=n;o++)t[o]>0&&(i=Bt(i,t[o]),r=Ht(r,t[o]));return[i==qt?1:i,r==-qt?10:r]}function _t(t,e,n,i){var r=jt(t),o=jt(e),s=10==n?Ut:zt;t==e&&(-1==r?(t*=n,e/=n):(t/=n,e*=n));var a=1==r?It:Wt,l=1==o?Wt:It,c=a(s(Pt(t))),u=l(s(Pt(e))),h=Nt(n,c),f=Nt(n,u);return c<0&&(h=se(h,-c)),u<0&&(f=se(f,-u)),i?(t=h*r,e=f*o):(t=oe(t,h),e=re(e,f)),[t,e]}function St(t,e,n,i){var r=_t(t,e,n,i);return 0==t&&(r[0]=0),0==e&&(r[1]=0),r}Z&&et();var xt=.1,Ct={mode:3,pad:xt},kt={pad:0,soft:null,mode:0},At={min:kt,max:kt};function $t(t,e,n,i){return me(n)?Et(t,e,n):(kt.pad=n,kt.soft=i?0:null,kt.mode=i?3:0,Et(t,e,At))}function Rt(t,e){return null==t?e:t}function Tt(t,e,n){e=Rt(e,0),n=Rt(n,t.length-1);while(e<=n){if(null!=t[e])return!0;e++}return!1}function Et(t,e,n){var i=n.min,r=n.max,o=Rt(i.pad,0),s=Rt(r.pad,0),a=Rt(i.hard,-qt),l=Rt(r.hard,qt),c=Rt(i.soft,qt),u=Rt(r.soft,-qt),h=Rt(i.mode,0),f=Rt(r.mode,0),d=e-t,p=Ut(d),g=Ht(Pt(t),Pt(e)),m=Ut(g),v=Pt(m-p);(d<1e-9||v>10)&&(d=0,0!=t&&0!=e||(d=1e-9,2==h&&c!=qt&&(o=0),2==f&&u!=-qt&&(s=0)));var y=d||g||1e3,w=Ut(y),b=Nt(10,It(w)),_=y*(0==d?0==t?.1:1:o),S=se(oe(t-_,b/10),9),x=t>=c&&(1==h||3==h&&S<=c||2==h&&S>=c)?c:qt,C=Ht(a,S<x&&t>=x?x:Bt(x,S)),k=y*(0==d?0==e?.1:1:s),A=se(re(e+k,b/10),9),$=e<=u&&(1==f||3==f&&A>=u||2==f&&A<=u)?u:-qt,R=Bt(l,A>$&&e<=$?$:Ht($,A));return C==R&&0==C&&(R=100),[C,R]}var Lt=new Intl.NumberFormat(Z?tt.language:"en-US"),Mt=function(t){return Lt.format(t)},Ot=Math,Dt=Ot.PI,Pt=Ot.abs,It=Ot.floor,Ft=Ot.round,Wt=Ot.ceil,Bt=Ot.min,Ht=Ot.max,Nt=Ot.pow,jt=Ot.sign,Ut=Ot.log10,zt=Ot.log2,Gt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ot.sinh(t)*e},Vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ot.asinh(t/e)},qt=1/0;function Yt(t){return 1+(0|Ut((t^t>>31)-(t>>31)))}function Kt(t,e){return Ft(t/e)*e}function Xt(t,e,n){return Bt(Ht(t,e),n)}function Zt(t){return"function"==typeof t?t:function(){return t}}var Qt=function(){},Jt=function(t){return t},te=function(t,e){return e},ee=function(t){return null},ne=function(t){return!0},ie=function(t,e){return t==e};function re(t,e){return Wt(t/e)*e}function oe(t,e){return It(t/e)*e}function se(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(pe(t))return t;var n=Math.pow(10,e),i=t*n*(1+Number.EPSILON);return Ft(i)/n}var ae=new Map;function le(t){return((""+t).split(".")[1]||"").length}function ce(t,e,n,i){for(var r=[],o=i.map(le),s=e;s<n;s++)for(var a=Pt(s),l=se(Nt(t,s),a),c=0;c<i.length;c++){var u=i[c]*l,h=(u>=0&&s>=0?0:a)+(s>=o[c]?0:o[c]),f=se(u,h);r.push(f),ae.set(f,h)}return r}var ue={},he=[],fe=[null,null],de=Array.isArray,pe=Number.isInteger;function ge(t){return"string"==typeof t}function me(t){var e=!1;if(null!=t){var n=t.constructor;e=null==n||n==Object}return e}function ve(t){return null!=t&&"object"==(0,l.Z)(t)}var ye=Object.getPrototypeOf(Uint8Array);function we(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:me;if(de(t)){var i=t.find((function(t){return null!=t}));if(de(i)||n(i)){e=Array(t.length);for(var r=0;r<t.length;r++)e[r]=we(t[r],n)}else e=t.slice()}else if(t instanceof ye)e=t.slice();else if(n(t))for(var o in e={},t)e[o]=we(t[o],n);else e=t;return e}function be(t){for(var e=arguments,n=1;n<e.length;n++){var i=e[n];for(var r in i)me(t[r])?be(t[r],we(i[r])):t[r]=we(i[r])}return t}var _e=0,Se=1,xe=2;function Ce(t,e,n){for(var i,r=0,o=-1;r<e.length;r++){var s=e[r];if(s>o){i=s-1;while(i>=0&&null==t[i])t[i--]=null;i=s+1;while(i<n&&null==t[i])t[o=i++]=null}}}function ke(t,e){for(var n=new Set,i=0;i<t.length;i++)for(var r=t[i],o=r[0],s=o.length,a=0;a<s;a++)n.add(o[a]);for(var l=[Array.from(n).sort((function(t,e){return t-e}))],c=l[0].length,u=new Map,h=0;h<c;h++)u.set(l[0][h],h);for(var f=0;f<t.length;f++)for(var d=t[f],p=d[0],g=1;g<d.length;g++){for(var m=d[g],v=Array(c).fill(void 0),y=e?e[f][g]:Se,w=[],b=0;b<m.length;b++){var _=m[b],S=u.get(p[b]);null===_?y!=_e&&(v[S]=_,y==xe&&w.push(S)):v[S]=_}Ce(v,w,c),l.push(v)}return l}var Ae="undefined"==typeof queueMicrotask?function(t){return Promise.resolve().then(t)}:queueMicrotask,$e=["January","February","March","April","May","June","July","August","September","October","November","December"],Re=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Te(t){return t.slice(0,3)}var Ee=Re.map(Te),Le=$e.map(Te),Me={MMMM:$e,MMM:Le,WWWW:Re,WWW:Ee};function Oe(t){return(t<10?"0":"")+t}function De(t){return(t<10?"00":t<100?"0":"")+t}var Pe={YYYY:function(t){return t.getFullYear()},YY:function(t){return(t.getFullYear()+"").slice(2)},MMMM:function(t,e){return e.MMMM[t.getMonth()]},MMM:function(t,e){return e.MMM[t.getMonth()]},MM:function(t){return Oe(t.getMonth()+1)},M:function(t){return t.getMonth()+1},DD:function(t){return Oe(t.getDate())},D:function(t){return t.getDate()},WWWW:function(t,e){return e.WWWW[t.getDay()]},WWW:function(t,e){return e.WWW[t.getDay()]},HH:function(t){return Oe(t.getHours())},H:function(t){return t.getHours()},h:function(t){var e=t.getHours();return 0==e?12:e>12?e-12:e},AA:function(t){return t.getHours()>=12?"PM":"AM"},aa:function(t){return t.getHours()>=12?"pm":"am"},a:function(t){return t.getHours()>=12?"p":"a"},mm:function(t){return Oe(t.getMinutes())},m:function(t){return t.getMinutes()},ss:function(t){return Oe(t.getSeconds())},s:function(t){return t.getSeconds()},fff:function(t){return De(t.getMilliseconds())}};function Ie(t,e){e=e||Me;var n,i=[],r=/\{([a-z]+)\}|[^{]+/gi;while(n=r.exec(t))i.push("{"==n[0][0]?Pe[n[1]]:n[0]);return function(t){for(var n="",r=0;r<i.length;r++)n+="string"==typeof i[r]?i[r]:i[r](t,e);return n}}var Fe=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function We(t,e){var n;return"UTC"==e||"Etc/UTC"==e?n=new Date(+t+6e4*t.getTimezoneOffset()):e==Fe?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}var Be=function(t){return t%1==0},He=[1,2,2.5,5],Ne=ce(10,-16,0,He),je=ce(10,0,16,He),Ue=je.filter(Be),ze=Ne.concat(je),Ge="\n",Ve="{YYYY}",qe=Ge+Ve,Ye="{M}/{D}",Ke=Ge+Ye,Xe=Ke+"/{YY}",Ze="{aa}",Qe="{h}:{mm}",Je=Qe+Ze,tn=Ge+Je,en=":{ss}",nn=null;function rn(t){var e=1e3*t,n=60*e,i=60*n,r=24*i,o=30*r,s=365*r,a=1==t?ce(10,0,3,He).filter(Be):ce(10,-3,0,He),l=a.concat([e,5*e,10*e,15*e,30*e,n,5*n,10*n,15*n,30*n,i,2*i,3*i,4*i,6*i,8*i,12*i,r,2*r,3*r,4*r,5*r,6*r,7*r,8*r,9*r,10*r,15*r,o,2*o,3*o,4*o,6*o,s,2*s,5*s,10*s,25*s,50*s,100*s]),c=[[s,Ve,nn,nn,nn,nn,nn,nn,1],[28*r,"{MMM}",qe,nn,nn,nn,nn,nn,1],[r,Ye,qe,nn,nn,nn,nn,nn,1],[i,"{h}"+Ze,Xe,nn,Ke,nn,nn,nn,1],[n,Je,Xe,nn,Ke,nn,nn,nn,1],[e,en,Xe+" "+Je,nn,Ke+" "+Je,nn,tn,nn,1],[t,en+".{fff}",Xe+" "+Je,nn,Ke+" "+Je,nn,tn,nn,1]];function u(e){return function(a,l,c,u,h,f){var d=[],p=h>=s,g=h>=o&&h<s,m=e(c),v=se(m*t,3),y=yn(m.getFullYear(),p?0:m.getMonth(),g||p?1:m.getDate()),w=se(y*t,3);if(g||p)for(var b=g?h/o:0,_=p?h/s:0,S=v==w?v:se(yn(y.getFullYear()+_,y.getMonth()+b,1)*t,3),x=new Date(Ft(S/t)),C=x.getFullYear(),k=x.getMonth(),A=0;S<=u;A++){var $=yn(C+_*A,k+b*A,1),R=$-e(se($*t,3));S=se((+$+R)*t,3),S<=u&&d.push(S)}else{var T=h>=r?r:h,E=It(c)-It(v),L=w+E+re(v-w,T);d.push(L);var M=e(L),O=M.getHours()+M.getMinutes()/n+M.getSeconds()/i,D=h/i,P=a.axes[l]._space,I=f/P;while(1){if(L=se(L+h,1==t?0:3),L>u)break;if(D>1){var F=It(se(O+D,6))%24,W=e(L),B=W.getHours(),H=B-F;H>1&&(H=-1),L-=H*i,O=(O+D)%24;var N=d[d.length-1],j=se((L-N)/h,3);j*I>=.7&&d.push(L)}else d.push(L)}}return d}}return[l,c,u]}var on=rn(1),sn=(0,a.Z)(on,3),an=sn[0],ln=sn[1],cn=sn[2],un=rn(.001),hn=(0,a.Z)(un,3),fn=hn[0],dn=hn[1],pn=hn[2];function gn(t,e){return t.map((function(t){return t.map((function(n,i){return 0==i||8==i||null==n?n:e(1==i||0==t[8]?n:t[1]+n)}))}))}function mn(t,e){return function(n,i,r,o,s){var a,l,c,u,h,f,d=e.find((function(t){return s>=t[0]}))||e[e.length-1];return i.map((function(e){var n=t(e),i=n.getFullYear(),r=n.getMonth(),o=n.getDate(),s=n.getHours(),p=n.getMinutes(),g=n.getSeconds(),m=i!=a&&d[2]||r!=l&&d[3]||o!=c&&d[4]||s!=u&&d[5]||p!=h&&d[6]||g!=f&&d[7]||d[1];return a=i,l=r,c=o,u=s,h=p,f=g,m(n)}))}}function vn(t,e){var n=Ie(e);return function(e,i,r,o,s){return i.map((function(e){return n(t(e))}))}}function yn(t,e,n){return new Date(t,e,n)}function wn(t,e){return e(t)}ce(2,-53,53,[1]);var bn="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function _n(t,e){return function(n,i){return e(t(i))}}function Sn(t,e){var n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function xn(t,e){return t.series[e].fill(t,e)}var Cn={show:!0,live:!0,isolate:!1,mount:Qt,markers:{show:!0,width:2,stroke:Sn,fill:xn,dash:"solid"},idx:null,idxs:null,values:[]};function kn(t,e){var n=t.cursor.points,i=st(),r=n.size(t,e);rt(i,O,r),rt(i,D,r);var o=r/-2;rt(i,"marginLeft",o),rt(i,"marginTop",o);var s=n.width(t,e,r);return s&&rt(i,"borderWidth",s),i}function An(t,e){var n=t.series[e].points;return n._fill||n._stroke}function $n(t,e){var n=t.series[e].points;return n._stroke||n._fill}function Rn(t,e){var n=t.series[e].points;return ii(n.width,1)}function Tn(t,e,n){return n}var En=[0,0];function Ln(t,e,n){return En[0]=e,En[1]=n,En}function Mn(t,e,n){return function(t){0==t.button&&n(t)}}function On(t,e,n){return n}var Dn={show:!0,x:!0,y:!0,lock:!1,move:Ln,points:{show:kn,size:Rn,width:0,stroke:$n,fill:An},bind:{mousedown:Mn,mouseup:Mn,click:Mn,dblclick:Mn,mousemove:On,mouseleave:On,mouseenter:On},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:Tn,idxs:null},Pn={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},In=be({},Pn,{filter:te}),Fn=be({},In,{size:10}),Wn=be({},Pn,{show:!1}),Bn='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Hn="bold "+Bn,Nn=1.5,jn={show:!0,scale:"x",stroke:B,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Hn,side:2,grid:In,ticks:Fn,border:Wn,font:Bn,rotate:0},Un="Value",zn="Time",Gn={show:!0,scale:"x",auto:!1,sorted:1,min:qt,max:-qt,idxs:[]};function Vn(t,e,n,i,r){return e.map((function(t){return null==t?"":Mt(t)}))}function qn(t,e,n,i,r,o,s){var a=[],l=ae.get(r)||0;n=s?n:se(re(n,r),l);for(var c=n;c<=i;c=se(c+r,l))a.push(Object.is(c,-0)?0:c);return a}function Yn(t,e,n,i,r,o,s){var a=[],l=t.scales[t.axes[e].scale].log,c=10==l?Ut:zt,u=It(c(n));r=Nt(l,u),u<0&&(r=se(r,-u));var h=n;do{a.push(h),h=se(h+r,ae.get(r)),h>=r*l&&(r=h)}while(h<=i);return a}function Kn(t,e,n,i,r,o,s){var a=t.scales[t.axes[e].scale],l=a.asinh,c=i>l?Yn(t,e,Ht(l,n),i,r):[l],u=i>=0&&n<=0?[0]:[],h=n<-l?Yn(t,e,Ht(l,-i),-n,r):[l];return h.reverse().map((function(t){return-t})).concat(u,c)}var Xn=/./,Zn=/[12357]/,Qn=/[125]/,Jn=/1/;function ti(t,e,n,i,r){var o=t.axes[n],s=o.scale,a=t.scales[s];if(3==a.distr&&2==a.log)return e;var l=t.valToPos,c=o._space,u=l(10,s),h=l(9,s)-u>=c?Xn:l(7,s)-u>=c?Zn:l(5,s)-u>=c?Qn:Jn;return e.map((function(t){return 4==a.distr&&0==t||h.test(t)?t:null}))}function ei(t,e){return null==e?"":Mt(e)}var ni={show:!0,scale:"y",stroke:B,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Hn,side:3,grid:In,ticks:Fn,border:Wn,font:Bn,rotate:0};function ii(t,e){var n=3+2*(t||1);return se(n*e,3)}function ri(t,e){var n=t.series[0],r=n.scale,o=n.idxs,s=t._data[0],a=t.valToPos(s[o[0]],r,!0),l=t.valToPos(s[o[1]],r,!0),c=Pt(l-a),u=t.series[e],h=c/(u.points.space*i);return o[1]-o[0]<=h}var oi={scale:null,auto:!0,sorted:0,min:qt,max:-qt},si=function(t,e,n,i,r){return r},ai={show:!0,auto:!0,sorted:0,gaps:si,alpha:1,facets:[be({},oi,{scale:"x"}),be({},oi,{scale:"y"})]},li={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:si,alpha:1,points:{show:ri,filter:null},values:null,min:qt,max:-qt,idxs:[],path:null,clip:null};function ci(t,e,n,i,r){return n/10}var ui={time:u,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},hi=be({},ui,{time:!1,ori:1}),fi={};function di(t,e){var n=fi[t];return n||(n={key:t,plots:[],sub:function(t){n.plots.push(t)},unsub:function(t){n.plots=n.plots.filter((function(e){return e!=t}))},pub:function(t,e,i,r,o,s,a){for(var l=0;l<n.plots.length;l++)n.plots[l]!=e&&n.plots[l].pub(t,e,i,r,o,s,a)}},null!=t&&(fi[t]=n)),n}var pi=1,gi=2;function mi(t,e,n){var i=t.mode,r=t.series[e],o=2==i?t._data[e]:t._data,s=t.scales,a=t.bbox,l=o[0],c=2==i?o[1]:o[e],u=2==i?s[r.facets[0].scale]:s[t.series[0].scale],h=2==i?s[r.facets[1].scale]:s[r.scale],f=a.left,d=a.top,p=a.width,g=a.height,m=t.valToPosH,v=t.valToPosV;return 0==u.ori?n(r,l,c,u,h,m,v,f,d,p,g,ki,$i,Ti,Li,Oi):n(r,l,c,u,h,v,m,d,f,g,p,Ai,Ri,Ei,Mi,Di)}function vi(t,e){for(var n=0,i=0,r=Rt(t.bands,he),o=0;o<r.length;o++){var s=r[o];s.series[0]==e?n=s.dir:s.series[1]==e&&(1==s.dir?i|=1:i|=2)}return[n,1==i?-1:2==i?1:3==i?2:0]}function yi(t,e,n,i,r){var o=t.mode,s=t.series[e],a=2==o?s.facets[1].scale:s.scale,l=t.scales[a];return-1==r?l.min:1==r?l.max:3==l.distr?1==l.dir?l.min:l.max:0}function wi(t,e,n,i,r,o){return mi(t,e,(function(t,e,s,a,l,c,u,h,f,d,p){var g,m,v=t.pxRound,y=a.dir*(0==a.ori?1:-1),w=0==a.ori?$i:Ri;1==y?(g=n,m=i):(g=i,m=n);var b=v(c(e[g],a,d,h)),_=v(u(s[g],l,p,f)),S=v(c(e[m],a,d,h)),x=v(u(1==o?l.max:l.min,l,p,f)),C=new Path2D(r);return w(C,S,x),w(C,b,x),w(C,b,_),C}))}function bi(t,e,n,i,r,o){var s=null;if(t.length>0){s=new Path2D;for(var a=0==e?Ti:Ei,l=n,c=0;c<t.length;c++){var u=t[c];if(u[1]>u[0]){var h=u[0]-l;h>0&&a(s,l,i,h,i+o),l=u[1]}}var f=n+r-l;f>0&&a(s,l,i,f,i+o)}return s}function _i(t,e,n){var i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function Si(t,e,n,i,r,o,s){for(var a=[],l=t.length,c=1==r?n:i;c>=n&&c<=i;c+=r){var u=e[c];if(null===u){var h=c,f=c;if(1==r)while(++c<=i&&null===e[c])f=c;else while(--c>=n&&null===e[c])f=c;var d=o(t[h]),p=f==h?d:o(t[f]),g=h-r,m=s<=0&&g>=0&&g<l?o(t[g]):d;d=m;var v=f+r,y=s>=0&&v>=0&&v<l?o(t[v]):p;p=y,p>=d&&a.push([d,p])}}return a}function xi(t){return 0==t?Jt:1==t?Ft:function(e){return Kt(e,t)}}function Ci(t){var e=0==t?ki:Ai,n=0==t?function(t,e,n,i,r,o){t.arcTo(e,n,i,r,o)}:function(t,e,n,i,r,o){t.arcTo(n,e,r,i,o)},i=0==t?function(t,e,n,i,r){t.rect(e,n,i,r)}:function(t,e,n,i,r){t.rect(n,e,r,i)};return function(t,r,o,s,a){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?i(t,r,o,s,a):(l=Bt(l,s/2,a/2),e(t,r+l,o),n(t,r+s,o,r+s,o+a,l),n(t,r+s,o+a,r,o+a,l),n(t,r,o+a,r,o,l),n(t,r,o,r+s,o,l),t.closePath())}}var ki=function(t,e,n){t.moveTo(e,n)},Ai=function(t,e,n){t.moveTo(n,e)},$i=function(t,e,n){t.lineTo(e,n)},Ri=function(t,e,n){t.lineTo(n,e)},Ti=Ci(0),Ei=Ci(1),Li=function(t,e,n,i,r,o){t.arc(e,n,i,r,o)},Mi=function(t,e,n,i,r,o){t.arc(n,e,i,r,o)},Oi=function(t,e,n,i,r,o,s){t.bezierCurveTo(e,n,i,r,o,s)},Di=function(t,e,n,i,r,o,s){t.bezierCurveTo(n,e,r,i,s,o)};function Pi(t){return function(t,e,n,r,o){return mi(t,e,(function(e,s,a,l,c,u,h,f,d,p,g){var m,v,y=e.pxRound,w=e.points;0==l.ori?(m=ki,v=Li):(m=Ai,v=Mi);var b=se(w.width*i,3),_=(w.size-w.width)/2*i,S=se(2*_,3),x=new Path2D,C=new Path2D,k=t.bbox,A=k.left,$=k.top,R=k.width,T=k.height;Ti(C,A-S,$-S,R+2*S,T+2*S);var E=function(t){if(null!=a[t]){var e=y(u(s[t],l,p,f)),n=y(h(a[t],c,g,d));m(x,e+_,n),v(x,e,n,_,0,2*Dt)}};if(o)o.forEach(E);else for(var L=n;L<=r;L++)E(L);return{stroke:b>0?x:null,fill:x,clip:C,flags:pi|gi}}))}}function Ii(t){return function(e,n,i,r,o,s){i!=r&&(o!=i&&s!=i&&t(e,n,i),o!=r&&s!=r&&t(e,n,r),t(e,n,s))}}var Fi=Ii($i),Wi=Ii(Ri);function Bi(t){var e=Rt(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,n,i,r){return mi(t,n,(function(o,l,c,u,h,f,d,p,g,m,v){var y,w,b=o.pxRound,_=function(t){return b(f(t,u,m,p))},S=function(t){return b(d(t,h,v,g))};0==u.ori?(y=$i,w=Fi):(y=Ri,w=Wi);for(var x,C,k,A=u.dir*(0==u.ori?1:-1),$={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pi},R=$.stroke,T=qt,E=-qt,L=_(l[1==A?i:r]),M=yt(c,i,r,1*A),O=yt(c,i,r,-1*A),D=_(l[M]),P=_(l[O]),I=1==A?i:r;I>=i&&I<=r;I+=A){var F=_(l[I]);F==L?null!=c[I]&&(C=S(c[I]),T==qt&&(y(R,F,C),x=C),T=Bt(C,T),E=Ht(C,E)):(T!=qt&&(w(R,L,T,E,x,C),k=L),null!=c[I]?(C=S(c[I]),y(R,F,C),T=E=x=C):(T=qt,E=-qt),L=F)}T!=qt&&T!=E&&k!=L&&w(R,L,T,E,x,C);var W=vi(t,n),B=(0,a.Z)(W,2),H=B[0],N=B[1];if(null!=o.fill||0!=H){var j=$.fill=new Path2D(R),U=o.fillTo(t,n,o.min,o.max,H),z=S(U);y(j,P,z),y(j,D,z)}if(!o.spanGaps){var G,V=[];(G=V).push.apply(G,(0,s.Z)(Si(l,c,i,r,A,_,e))),$.gaps=V=o.gaps(t,n,i,r,V),$.clip=bi(V,u.ori,p,g,m,v)}return 0!=N&&($.band=2==N?[wi(t,n,i,r,R,-1),wi(t,n,i,r,R,1)]:wi(t,n,i,r,R,N)),$}))}}function Hi(t){var e=Rt(t.align,1),n=Rt(t.ascDesc,!1),r=Rt(t.alignGaps,0),o=Rt(t.extend,!1);return function(t,l,c,u){return mi(t,l,(function(h,f,d,p,g,m,v,y,w,b,_){var S=h.pxRound,x=t.bbox,C=x.left,k=x.width,A=function(t){return S(m(t,p,b,y))},$=function(t){return S(v(t,g,_,w))},R=0==p.ori?$i:Ri,T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pi},E=T.stroke,L=p.dir*(0==p.ori?1:-1);c=yt(d,c,u,1),u=yt(d,c,u,-1);var M=$(d[1==L?c:u]),O=A(f[1==L?c:u]),D=O,P=O;o&&-1==e&&(P=C,R(E,P,M)),R(E,O,M);for(var I=1==L?c:u;I>=c&&I<=u;I+=L){var F=d[I];if(null!=F){var W=A(f[I]),B=$(F);1==e?R(E,W,M):R(E,D,B),R(E,W,B),M=B,D=W}}var H=D;o&&1==e&&(H=C+k,R(E,H,M));var N=vi(t,l),j=(0,a.Z)(N,2),U=j[0],z=j[1];if(null!=h.fill||0!=U){var G=T.fill=new Path2D(E),V=h.fillTo(t,l,h.min,h.max,U),q=$(V);R(G,H,q),R(G,P,q)}if(!h.spanGaps){var Y,K=[];(Y=K).push.apply(Y,(0,s.Z)(Si(f,d,c,u,L,A,r)));var X=h.width*i/2,Z=n||1==e?X:-X,Q=n||-1==e?-X:X;K.forEach((function(t){t[0]+=Z,t[1]+=Q})),T.gaps=K=h.gaps(t,l,c,u,K),T.clip=bi(K,p.ori,y,w,b,_)}return 0!=z&&(T.band=2==z?[wi(t,l,c,u,E,-1),wi(t,l,c,u,E,1)]:wi(t,l,c,u,E,z)),T}))}}function Ni(t){t=t||ue;var e=Rt(t.size,[.6,qt,1]),n=t.align||0,r=(t.gap||0)*i,o=Rt(t.radius,0),s=1-e[0],l=Rt(e[1],qt)*i,c=Rt(e[2],1)*i,u=Rt(t.disp,ue),h=Rt(t.each,(function(t){})),f=u.fill,d=u.stroke;return function(t,e,p,g){return mi(t,e,(function(m,v,y,w,b,_,S,x,C,k,A){var $,R,T=m.pxRound,E=w.dir*(0==w.ori?1:-1),L=b.dir*(1==b.ori?1:-1),M=0==w.ori?Ti:Ei,O=0==w.ori?h:function(t,e,n,i,r,o,s){h(t,e,n,r,i,s,o)},D=vi(t,e),P=(0,a.Z)(D,2),I=P[0],F=P[1],W=3==b.distr?1==I?b.max:b.min:0,B=S(W,b,A,C),H=T(m.width*i),N=!1,j=null,U=null,z=null,G=null;null==f||0!=H&&null==d||(N=!0,j=f.values(t,e,p,g),U=new Map,new Set(j).forEach((function(t){null!=t&&U.set(t,new Path2D)})),H>0&&(z=d.values(t,e,p,g),G=new Map,new Set(z).forEach((function(t){null!=t&&G.set(t,new Path2D)}))));var V=u.x0,q=u.size;if(null!=V&&null!=q){v=V.values(t,e,p,g),2==V.unit&&(v=v.map((function(e){return t.posToVal(x+e*k,w.key,!0)})));var Y=q.values(t,e,p,g);R=2==q.unit?Y[0]*k:_(Y[0],w,k,x)-_(0,w,k,x),R=T(R-H),$=1==E?-H/2:R+H/2}else{var K=k;if(v.length>1)for(var X=null,Z=0,Q=1/0;Z<v.length;Z++)if(void 0!==y[Z]){if(null!=X){var J=Pt(v[Z]-v[X]);J<Q&&(Q=J,K=Pt(_(v[Z],w,k,x)-_(v[X],w,k,x)))}X=Z}var tt=K*s;R=T(Bt(l,Ht(c,K-tt))-H-r),$=(0==n?R/2:n==E?0:R)-n*E*r/2}var et,nt={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:pi|gi};0!=F&&(nt.band=new Path2D,et=T(S(1==F?b.max:b.min,b,A,C)));var it=N?null:new Path2D,rt=nt.band,ot=u.y0,st=u.y1,at=null;null!=ot&&null!=st&&(y=st.values(t,e,p,g),at=ot.values(t,e,p,g));for(Z=1==E?p:g;Z>=p&&Z<=g;Z+=E){var lt=y[Z];if(void 0!==lt){var ct=2!=w.distr||null!=u?v[Z]:Z,ut=_(ct,w,k,x),ht=S(Rt(lt,W),b,A,C);null!=at&&null!=lt&&(B=S(at[Z],b,A,C));var ft=T(ut-$),dt=T(Ht(ht,B)),pt=T(Bt(ht,B)),gt=dt-pt,mt=o*R;null!=lt&&(N?(H>0&&null!=z[Z]&&M(G.get(z[Z]),ft,pt+It(H/2),R,Ht(0,gt-H),mt),null!=j[Z]&&M(U.get(j[Z]),ft,pt+It(H/2),R,Ht(0,gt-H),mt)):M(it,ft,pt+It(H/2),R,Ht(0,gt-H),mt),O(t,e,Z,ft-H/2,pt,R+H,gt)),0!=F&&(L*F==1?(dt=pt,pt=et):(pt=dt,dt=et),gt=dt-pt,M(rt,ft-H/2,pt,R+H,Ht(0,gt),0))}}return H>0&&(nt.stroke=N?G:it),nt.fill=N?U:it,nt}))}}function ji(t,e){var n=Rt(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,i,r,o){return mi(e,i,(function(l,c,u,h,f,d,p,g,m,v,y){var w,b,_,S=l.pxRound,x=function(t){return S(d(t,h,v,g))},C=function(t){return S(p(t,f,y,m))};0==h.ori?(w=ki,_=$i,b=Oi):(w=Ai,_=Ri,b=Di);var k=h.dir*(0==h.ori?1:-1);r=yt(u,r,o,1),o=yt(u,r,o,-1);for(var A=x(c[1==k?r:o]),$=A,R=[],T=[],E=1==k?r:o;E>=r&&E<=o;E+=k){var L=u[E];if(null!=L){var M=c[E],O=x(M);R.push($=O),T.push(C(u[E]))}}var D={stroke:t(R,T,w,_,b,S),fill:null,clip:null,band:null,gaps:null,flags:pi},P=D.stroke,I=vi(e,i),F=(0,a.Z)(I,2),W=F[0],B=F[1];if(null!=l.fill||0!=W){var H=D.fill=new Path2D(P),N=l.fillTo(e,i,l.min,l.max,W),j=C(N);_(H,$,j),_(H,A,j)}if(!l.spanGaps){var U,z=[];(U=z).push.apply(U,(0,s.Z)(Si(c,u,r,o,k,x,n))),D.gaps=z=l.gaps(e,i,r,o,z),D.clip=bi(z,h.ori,g,m,v,y)}return 0!=B&&(D.band=2==B?[wi(e,i,r,o,P,-1),wi(e,i,r,o,P,1)]:wi(e,i,r,o,P,B)),D}))}}function Ui(t){return ji(zi,t)}function zi(t,e,n,i,r,o){var s=t.length;if(s<2)return null;var a=new Path2D;if(n(a,t[0],e[0]),2==s)i(a,t[1],e[1]);else{for(var l=Array(s),c=Array(s-1),u=Array(s-1),h=Array(s-1),f=0;f<s-1;f++)u[f]=e[f+1]-e[f],h[f]=t[f+1]-t[f],c[f]=u[f]/h[f];l[0]=c[0];for(var d=1;d<s-1;d++)0===c[d]||0===c[d-1]||c[d-1]>0!==c[d]>0?l[d]=0:(l[d]=3*(h[d-1]+h[d])/((2*h[d]+h[d-1])/c[d-1]+(h[d]+2*h[d-1])/c[d]),isFinite(l[d])||(l[d]=0));l[s-1]=c[s-2];for(var p=0;p<s-1;p++)r(a,t[p]+h[p]/3,e[p]+l[p]*h[p]/3,t[p+1]-h[p]/3,e[p+1]-l[p+1]*h[p]/3,t[p+1],e[p+1])}return a}var Gi=new Set;function Vi(){var t,e=(0,o.Z)(Gi);try{for(e.s();!(t=e.n()).done;){var n=t.value;n.syncRect(!0)}}catch(i){e.e(i)}finally{e.f()}}Z&&(gt(q,J,Vi),gt(Y,J,Vi,!0),gt(X,J,(function(){lr.pxRatio=i})));var qi=Bi(),Yi=Pi();function Ki(t,e,n,i){var r=i?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1));return r.map((function(t,i){return Zi(t,i,e,n)}))}function Xi(t,e){return t.map((function(t,n){return 0==n?null:be({},e,t)}))}function Zi(t,e,n,i){return be({},0==e?n:i,t)}function Qi(t,e,n){return null==e?fe:[e,n]}var Ji=Qi;function tr(t,e,n){return null==e?fe:$t(e,n,xt,!0)}function er(t,e,n,i){return null==e?fe:_t(e,n,t.scales[i].log,!1)}var nr=er;function ir(t,e,n,i){return null==e?fe:St(e,n,t.scales[i].log,!1)}var rr=ir;function or(t,e,n,i,r){var o=Ht(Yt(t),Yt(e)),s=e-t,a=vt(r/i*s,n);do{var l=n[a],c=i*l/s;if(c>=r&&o+(l<5?ae.get(l):0)<=17)return[l,c]}while(++a<n.length);return[0,0]}function sr(t){var e,n;return t=t.replace(/(\d+)px/,(function(t,r){return(e=Ft((n=+r)*i))+"px"})),[t,e,n]}function ar(t){t.show&&[t.font,t.labelFont].forEach((function(t){var e=se(t[2]*i,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e}))}function lr(t,e,n){var r={mode:Rt(t.mode,1)},o=r.mode;function s(t,e){var n=3==e.distr?Ut(t>0?t:e.clamp(r,t,e.min,e.max,e.key)):4==e.distr?Vt(t,e.asinh):t;return(n-e._min)/(e._max-e._min)}function l(t,e,n,i){var r=s(t,e);return i+n*(-1==e.dir?1-r:r)}function c(t,e,n,i){var r=s(t,e);return i+n*(-1==e.dir?r:1-r)}function u(t,e,n,i){return 0==e.ori?l(t,e,n,i):c(t,e,n,i)}r.valToPosH=l,r.valToPosV=c;var h=!1;r.status=0;var B=r.root=st(f);if(null!=t.id&&(B.id=t.id),nt(B,t.class),t.title){var q=st(g,B);q.textContent=t.title}var Y=ot("canvas"),K=r.ctx=Y.getContext("2d"),Z=st(m,B),tt=r.under=st(v,Z);Z.appendChild(Y);var et=r.over=st(y,Z);t=we(t);var at=+Rt(t.pxAlign,1),ct=xi(at);(t.plugins||[]).forEach((function(e){e.opts&&(t=e.opts(r,t)||t)}));var ht=t.ms||.001,dt=r.series=1==o?Ki(t.series||[],Gn,li,!1):Xi(t.series||[null],ai),pt=r.axes=Ki(t.axes||[],jn,ni,!0),yt=r.scales={},kt=r.bands=t.bands||[];kt.forEach((function(t){t.fill=Zt(t.fill||null),t.dir=Rt(t.dir,-1)}));var At=2==o?dt[1].facets[0].scale:dt[0].scale,Et={axes:cr,series:Pi},Lt=(t.drawOrder||["axes","series"]).map((function(t){return Et[t]}));function Mt(e){var n=yt[e];if(null==n){var i=(t.scales||ue)[e]||ue;if(null!=i.from)Mt(i.from),yt[e]=be({},yt[i.from],i,{key:e});else{n=yt[e]=be({},e==At?ui:hi,i),n.key=e;var r=n.time,s=n.range,a=de(s);if((e!=At||2==o&&!r)&&(!a||null!=s[0]&&null!=s[1]||(s={min:null==s[0]?Ct:{mode:1,hard:s[0],soft:s[0]},max:null==s[1]?Ct:{mode:1,hard:s[1],soft:s[1]}},a=!1),!a&&me(s))){var l=s;s=function(t,e,n){return null==e?fe:$t(e,n,l)}}n.range=Zt(s||(r?Ji:e==At?3==n.distr?nr:4==n.distr?rr:Qi:3==n.distr?er:4==n.distr?ir:tr)),n.auto=Zt(!a&&n.auto),n.clamp=Zt(n.clamp||ci),n._min=n._max=null}}}for(var Ot in Mt("x"),Mt("y"),1==o&&dt.forEach((function(t){Mt(t.scale)})),pt.forEach((function(t){Mt(t.scale)})),t.scales)Mt(Ot);var It,jt,zt=yt[At],Yt=zt.distr;0==zt.ori?(nt(B,d),It=l,jt=c):(nt(B,p),It=c,jt=l);var Qt={};for(var Jt in yt){var oe=yt[Jt];null==oe.min&&null==oe.max||(Qt[Jt]={min:oe.min,max:oe.max},oe.min=oe.max=null)}var ae,le=t.tzDate||function(t){return new Date(Ft(t/ht))},ce=t.fmtDate||Ie,pe=1==ht?cn(le):pn(le),ye=mn(le,gn(1==ht?ln:dn,ce)),_e=_n(le,wn(bn,ce)),Se=[],xe=r.legend=be({},Cn,t.legend),Ce=xe.show,ke=xe.markers;xe.idxs=Se,ke.width=Zt(ke.width),ke.dash=Zt(ke.dash),ke.stroke=Zt(ke.stroke),ke.fill=Zt(ke.fill);var $e,Re=[],Te=[],Ee=!1,Le={};if(xe.live){var Me=dt[1]?dt[1].values:null;for(var Oe in Ee=null!=Me,$e=Ee?Me(r,1,0):{_:0},$e)Le[Oe]="--"}if(Ce)if(ae=ot("table",k,B),xe.mount(r,ae),Ee){var De=ot("tr",R,ae);for(var Pe in ot("th",null,De),$e)ot("th",L,De).textContent=Pe}else nt(ae,$),xe.live&&nt(ae,A);var Fe={show:!0},We={show:!1};function Be(t,e){if(0==e&&(Ee||!xe.live||2==o))return fe;var n=[],i=ot("tr",T,ae,ae.childNodes[e]);nt(i,t.class),t.show||nt(i,b);var s=ot("th",null,i);if(ke.show){var a=st(E,s);if(e>0){var l=ke.width(r,e);l&&(a.style.border=l+"px "+ke.dash(r,e)+" "+ke.stroke(r,e)),a.style.background=ke.fill(r,e)}}var c=st(L,s);for(var u in c.textContent=t.label,e>0&&(ke.show||(c.style.color=t.width>0?ke.stroke(r,e):ke.fill(r,e)),Ne("click",s,(function(e){if(!Rn._lock){var n=dt.indexOf(t);if((e.ctrlKey||e.metaKey)!=xe.isolate){var i=dt.some((function(t,e){return e>0&&e!=n&&t.show}));dt.forEach((function(t,e){e>0&&Br(e,i?e==n?Fe:We:Fe,!0,yo.setSeries)}))}else Br(n,{show:!t.show},!0,yo.setSeries)}})),Ln&&Ne(z,s,(function(e){Rn._lock||Br(dt.indexOf(t),zr,!0,yo.setSeries)}))),$e){var h=ot("td",M,i);h.textContent="--",n.push(h)}return[i,n]}var He=new Map;function Ne(t,e,n){var i=He.get(e)||{},o=Rn.bind[t](r,e,n);o&&(gt(t,e,i[t]=o),He.set(e,i))}function je(t,e,n){var i=He.get(e)||{};for(var r in i)null!=t&&r!=t||(mt(r,e,i[r]),delete i[r]);null==t&&He.delete(e)}var Ge=0,Ve=0,qe=0,Ye=0,Ke=0,Xe=0,Ze=0,Qe=0,Je=0,tn=0;r.bbox={};var en=!1,nn=!1,rn=!1,on=!1,sn=!1,un=!1;function hn(t,e,n){(n||t!=r.width||e!=r.height)&&yn(t,e),ur(!1),rn=!0,nn=!0,Rn.left>=0&&(on=un=!0),Cr()}function yn(t,e){r.width=Ge=qe=t,r.height=Ve=Ye=e,Ke=Xe=0,An(),$n();var n=r.bbox;Ze=n.left=Kt(Ke*i,.5),Qe=n.top=Kt(Xe*i,.5),Je=n.width=Kt(qe*i,.5),tn=n.height=Kt(Ye*i,.5)}var Sn=3;function xn(){var t=!1,e=0;while(!t){e++;var n=Vi(e),i=lr(e);t=e==Sn||n&&i,t||(yn(r.width,r.height),nn=!0)}}function kn(t){var e=t.width,n=t.height;hn(e,n)}function An(){var t=!1,e=!1,n=!1,i=!1;pt.forEach((function(r,o){if(r.show&&r._show){var s=r.side,a=r._size,l=s%2,c=null!=r.label?r.labelSize:0,u=a+c;u>0&&(l?(qe-=u,3==s?(Ke+=u,i=!0):n=!0):(Ye-=u,0==s?(Xe+=u,t=!0):e=!0))}})),Wn[0]=t,Wn[1]=n,Wn[2]=e,Wn[3]=i,qe-=_i[1]+_i[3],Ke+=_i[3],Ye-=_i[2]+_i[0],Xe+=_i[0]}function $n(){var t=Ke+qe,e=Xe+Ye,n=Ke,i=Xe;function r(r,o){switch(r){case 1:return t+=o,t-o;case 2:return e+=o,e-o;case 3:return n-=o,n+o;case 0:return i-=o,i+o}}pt.forEach((function(t,e){if(t.show&&t._show){var n=t.side;t._pos=r(n,t._size),null!=t.label&&(t._lpos=r(n,t.labelSize))}}))}r.setSize=kn;var Rn=r.cursor=be({},Dn,{drag:{y:2==o}},t.cursor);Rn.idxs=Se,Rn._lock=!1;var Tn=Rn.points;Tn.show=Zt(Tn.show),Tn.size=Zt(Tn.size),Tn.stroke=Zt(Tn.stroke),Tn.width=Zt(Tn.width),Tn.fill=Zt(Tn.fill);var En=r.focus=be({},t.focus||{alpha:.3},Rn.focus),Ln=En.prox>=0,Mn=[null];function On(t,e){if(e>0){var n=Rn.points.show(r,e);if(n)return nt(n,C),nt(n,t.class),lt(n,-10,-10,qe,Ye),et.insertBefore(n,Mn[e]),n}}function Pn(t,e){if(1==o||e>0){var n=1==o&&yt[t.scale].time,i=t.value;t.value=n?ge(i)?_n(le,wn(i,ce)):i||_e:i||ei,t.label=t.label||(n?zn:Un)}if(e>0){t.width=null==t.width?1:t.width,t.paths=t.paths||qi||ee,t.fillTo=Zt(t.fillTo||yi),t.pxAlign=+Rt(t.pxAlign,at),t.pxRound=xi(t.pxAlign),t.stroke=Zt(t.stroke||null),t.fill=Zt(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;var r=ii(t.width,1),s=t.points=be({},{size:r,width:Ht(1,.2*r),stroke:t.stroke,space:2*r,paths:Yi,_stroke:null,_fill:null},t.points);s.show=Zt(s.show),s.filter=Zt(s.filter),s.fill=Zt(s.fill),s.stroke=Zt(s.stroke),s.paths=Zt(s.paths),s.pxAlign=t.pxAlign}if(Ce){var a=Be(t,e);Re.splice(e,0,a[0]),Te.splice(e,0,a[1]),xe.values.push(null)}if(Rn.show){Se.splice(e,0,null);var l=On(t,e);l&&Mn.splice(e,0,l)}vo("addSeries",e)}function In(t,e){e=null==e?dt.length:e,t=1==o?Zi(t,e,Gn,li):Zi(t,e,null,ai),dt.splice(e,0,t),Pn(dt[e],e)}function Fn(t){if(dt.splice(t,1),Ce){xe.values.splice(t,1),Te.splice(t,1);var e=Re.splice(t,1)[0];je(null,e.firstChild),e.remove()}Rn.show&&(Se.splice(t,1),Mn.length>1&&Mn.splice(t,1)[0].remove()),vo("delSeries",t)}r.addSeries=In,r.delSeries=Fn;var Wn=[!1,!1,!1,!1];function Bn(t,e){if(t._show=t.show,t.show){var n=t.side%2,i=yt[t.scale];null==i&&(t.scale=n?dt[1].scale:At,i=yt[t.scale]);var o=i.time;t.size=Zt(t.size),t.space=Zt(t.space),t.rotate=Zt(t.rotate),t.incrs=Zt(t.incrs||(2==i.distr?Ue:o?1==ht?an:fn:ze)),t.splits=Zt(t.splits||(o&&1==i.distr?pe:3==i.distr?Yn:4==i.distr?Kn:qn)),t.stroke=Zt(t.stroke),t.grid.stroke=Zt(t.grid.stroke),t.ticks.stroke=Zt(t.ticks.stroke),t.border.stroke=Zt(t.border.stroke);var s=t.values;t.values=de(s)&&!de(s[0])?Zt(s):o?de(s)?mn(le,gn(s,ce)):ge(s)?vn(le,s):s||ye:s||Vn,t.filter=Zt(t.filter||(i.distr>=3&&10==i.log?ti:te)),t.font=sr(t.font),t.labelFont=sr(t.labelFont),t._size=t.size(r,null,e,0),t._space=t._rotate=t._incrs=t._found=t._splits=t._values=null,t._size>0&&(Wn[e]=!0,t._el=st(w,Z))}}function Hn(t,e,n,i){var r=(0,a.Z)(n,4),o=r[0],s=r[1],l=r[2],c=r[3],u=e%2,h=0;return 0==u&&(c||s)&&(h=0==e&&!o||2==e&&!l?Ft(jn.size/3):0),1==u&&(o||l)&&(h=1==e&&!s||3==e&&!c?Ft(ni.size/2):0),h}var Xn,Zn,Qn,Jn,ri,oi,si,fi,mi,vi,wi,bi=r.padding=(t.padding||[Hn,Hn,Hn,Hn]).map((function(t){return Zt(Rt(t,Hn))})),_i=r._padding=bi.map((function(t,e){return t(r,e,Wn,0)})),Si=null,Ci=null,ki=1==o?dt[0].idxs:null,Ai=null,$i=!1;function Ri(t,n){if(e=null==t?[]:we(t,ve),2==o){Xn=0;for(var i=1;i<dt.length;i++)Xn+=e[i][0].length;r.data=e=t}else if(null==e[0]&&(e[0]=[]),r.data=e.slice(),Ai=e[0],Xn=Ai.length,2==Yt){e[0]=Array(Xn);for(var s=0;s<Xn;s++)e[0][s]=s}if(r._data=e,ur(!0),vo("setData"),2==Yt&&(rn=!0),!1!==n){var a=zt;a.auto(r,$i)?Ti():Wr(At,a.min,a.max),on=Rn.left>=0,un=!0,Cr()}}function Ti(){var t,n;if($i=!0,1==o)if(Xn>0){if(Si=ki[0]=0,Ci=ki[1]=Xn-1,t=e[0][Si],n=e[0][Ci],2==Yt)t=Si,n=Ci;else if(1==Xn)if(3==Yt){var i=_t(t,t,zt.log,!1),r=(0,a.Z)(i,2);t=r[0],n=r[1]}else if(4==Yt){var s=St(t,t,zt.log,!1),l=(0,a.Z)(s,2);t=l[0],n=l[1]}else if(zt.time)n=t+Ft(86400/ht);else{var c=$t(t,n,xt,!0),u=(0,a.Z)(c,2);t=u[0],n=u[1]}}else Si=ki[0]=t=null,Ci=ki[1]=n=null;Wr(At,t,n)}function Ei(t,e,n,i,r,o){var s,a,l,c,u;null!==(s=t)&&void 0!==s||(t=H),null!==(a=n)&&void 0!==a||(n=he),null!==(l=i)&&void 0!==l||(i="butt"),null!==(c=r)&&void 0!==c||(r=H),null!==(u=o)&&void 0!==u||(o="round"),t!=Zn&&(K.strokeStyle=Zn=t),r!=Qn&&(K.fillStyle=Qn=r),e!=Jn&&(K.lineWidth=Jn=e),o!=oi&&(K.lineJoin=oi=o),i!=si&&(K.lineCap=si=i),n!=ri&&K.setLineDash(ri=n)}function Li(t,e,n,i){e!=Qn&&(K.fillStyle=Qn=e),t!=fi&&(K.font=fi=t),n!=mi&&(K.textAlign=mi=n),i!=vi&&(K.textBaseline=vi=i)}function Mi(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&t.auto(r,$i)&&(null==e||null==e.min)){var s=Rt(Si,0),a=Rt(Ci,i.length-1),l=null==n.min?3==t.distr?bt(i,s,a):wt(i,s,a,o):[n.min,n.max];t.min=Bt(t.min,n.min=l[0]),t.max=Ht(t.max,n.max=l[1])}}function Oi(){var t=we(yt,ve);for(var n in t){var i=t[n],s=Qt[n];if(null!=s&&null!=s.min)be(i,s),n==At&&ur(!0);else if(n!=At||2==o)if(0==Xn&&null==i.from){var l=i.range(r,null,null,n);i.min=l[0],i.max=l[1]}else i.min=qt,i.max=-qt}if(Xn>0)for(var c in dt.forEach((function(n,i){if(1==o){var s=n.scale,l=t[s],c=Qt[s];if(0==i){var u=l.range(r,l.min,l.max,s);l.min=u[0],l.max=u[1],Si=vt(l.min,e[0]),Ci=vt(l.max,e[0]),Ci-Si>1&&(e[0][Si]<l.min&&Si++,e[0][Ci]>l.max&&Ci--),n.min=Ai[Si],n.max=Ai[Ci]}else n.show&&n.auto&&Mi(l,c,n,e[i],n.sorted);n.idxs[0]=Si,n.idxs[1]=Ci}else if(i>0&&n.show&&n.auto){var h=(0,a.Z)(n.facets,2),f=h[0],d=h[1],p=f.scale,g=d.scale,m=(0,a.Z)(e[i],2),v=m[0],y=m[1];Mi(t[p],Qt[p],f,v,f.sorted),Mi(t[g],Qt[g],d,y,d.sorted),n.min=d.min,n.max=d.max}})),t){var u=t[c],h=Qt[c];if(null==u.from&&(null==h||null==h.min)){var f=u.range(r,u.min==qt?null:u.min,u.max==-qt?null:u.max,c);u.min=f[0],u.max=f[1]}}for(var d in t){var p=t[d];if(null!=p.from){var g=t[p.from];if(null==g.min)p.min=p.max=null;else{var m=p.range(r,g.min,g.max,d);p.min=m[0],p.max=m[1]}}}var v={},y=!1;for(var w in t){var b=t[w],_=yt[w];if(_.min!=b.min||_.max!=b.max){_.min=b.min,_.max=b.max;var S=_.distr;_._min=3==S?Ut(_.min):4==S?Vt(_.min,_.asinh):_.min,_._max=3==S?Ut(_.max):4==S?Vt(_.max,_.asinh):_.max,v[w]=y=!0}}if(y){for(var x in dt.forEach((function(t,e){2==o?e>0&&v.y&&(t._paths=null):v[t.scale]&&(t._paths=null)})),v)rn=!0,vo("setScale",x);Rn.show&&Rn.left>=0&&(on=un=!0)}for(var C in Qt)Qt[C]=null}function Di(t){var e=Xt(Si-1,0,Xn-1),n=Xt(Ci+1,0,Xn-1);while(null==t[e]&&e>0)e--;while(null==t[n]&&n<Xn-1)n++;return[e,n]}function Pi(){Xn>0&&(dt.forEach((function(t,n){if(n>0&&t.show&&null==t._paths){var i=2==o?[0,e[n][0].length-1]:Di(e[n]);t._paths=t.paths(r,n,i[0],i[1])}})),dt.forEach((function(t,e){if(e>0&&t.show){wi!=t.alpha&&(K.globalAlpha=wi=t.alpha),Ii(e,!1),t._paths&&Fi(e,!1),Ii(e,!0);var n=t._paths?t._paths.gaps:null,i=t.points.show(r,e,Si,Ci,n),o=t.points.filter(r,e,i,n);(i||o)&&(t.points._paths=t.points.paths(r,e,Si,Ci,o),Fi(e,!0)),1!=wi&&(K.globalAlpha=wi=1),vo("drawSeries",e)}})))}function Ii(t,e){var n=e?dt[t].points:dt[t];n._stroke=n.stroke(r,t),n._fill=n.fill(r,t)}function Fi(t,e){var n=e?dt[t].points:dt[t],r=n._stroke,o=n._fill,s=n._paths,a=s.stroke,l=s.fill,c=s.clip,u=s.flags,h=null,f=se(n.width*i,3),d=f%2/2;e&&null==o&&(o=f>0?"#fff":r);var p=1==n.pxAlign;if(p&&K.translate(d,d),!e){var g=Ze,m=Qe,v=Je,y=tn,w=f*i/2;0==n.min&&(y+=w),0==n.max&&(m-=w,y+=w),h=new Path2D,h.rect(g,m,v,y)}e?Hi(r,f,n.dash,n.cap,o,a,l,u,c):Wi(t,r,f,n.dash,n.cap,o,a,l,u,h,c),p&&K.translate(-d,-d)}function Wi(t,n,i,o,s,a,l,c,u,h,f){var d=!1;kt.forEach((function(p,g){if(p.series[0]==t){var m,v=dt[p.series[1]],y=e[p.series[1]],w=(v._paths||ue).band;de(w)&&(w=1==p.dir?w[0]:w[1]);var b=null;v.show&&w&&Tt(y,Si,Ci)?(b=p.fill(r,g)||a,m=v._paths.clip):w=null,Hi(n,i,o,s,b,l,c,u,h,f,m,w),d=!0}})),d||Hi(n,i,o,s,a,l,c,u,h,f)}r.setData=Ri;var Bi=pi|gi;function Hi(t,e,n,i,r,o,s,a,l,c,u,h){Ei(t,e,n,i,r),(l||c||h)&&(K.save(),l&&K.clip(l),c&&K.clip(c)),h?(a&Bi)==Bi?(K.clip(h),u&&K.clip(u),ji(r,s),Ni(t,o,e)):a&gi?(ji(r,s),K.clip(h),Ni(t,o,e)):a&pi&&(K.save(),K.clip(h),u&&K.clip(u),ji(r,s),K.restore(),Ni(t,o,e)):(ji(r,s),Ni(t,o,e)),(l||c||h)&&K.restore()}function Ni(t,e,n){n>0&&(e instanceof Map?e.forEach((function(t,e){K.strokeStyle=Zn=e,K.stroke(t)})):null!=e&&t&&K.stroke(e))}function ji(t,e){e instanceof Map?e.forEach((function(t,e){K.fillStyle=Qn=e,K.fill(t)})):null!=e&&t&&K.fill(e)}function Ui(t,e,n,i){var o,s=pt[t];if(i<=0)o=[0,0];else{var a=s._space=s.space(r,t,e,n,i),l=s._incrs=s.incrs(r,t,e,n,i,a);o=or(e,n,l,i,a)}return s._found=o}function zi(t,e,n,i,r,o,s,a,l,c){var u=s%2/2;1==at&&K.translate(u,u),Ei(a,s,l,c,a),K.beginPath();var h,f,d,p,g=r+(0==i||3==i?-o:o);0==n?(f=r,p=g):(h=r,d=g);for(var m=0;m<t.length;m++)null!=e[m]&&(0==n?h=d=t[m]:f=p=t[m],K.moveTo(h,f),K.lineTo(d,p));K.stroke(),1==at&&K.translate(-u,-u)}function Vi(t){var e=!0;return pt.forEach((function(n,i){if(n.show){var o=yt[n.scale];if(null!=o.min){n._show||(e=!1,n._show=!0,ur(!1));var s=n.side,l=s%2,c=o.min,u=o.max,h=Ui(i,c,u,0==l?qe:Ye),f=(0,a.Z)(h,2),d=f[0],p=f[1];if(0!=p){var g=2==o.distr,m=n._splits=n.splits(r,i,c,u,d,p,g),v=2==o.distr?m.map((function(t){return Ai[t]})):m,y=2==o.distr?Ai[m[1]]-Ai[m[0]]:d,w=n._values=n.values(r,n.filter(r,v,i,p,y),i,p,y);n._rotate=2==s?n.rotate(r,w,i,p):0;var b=n._size;n._size=Wt(n.size(r,w,i,t)),null!=b&&n._size!=b&&(e=!1)}}else n._show&&(e=!1,n._show=!1,ur(!1))}})),e}function lr(t){var e=!0;return bi.forEach((function(n,i){var o=n(r,i,Wn,t);o!=_i[i]&&(e=!1),_i[i]=o})),e}function cr(){for(var t=function(t){var e=pt[t];if(!e.show||!e._show)return"continue";var n=e.side,o=n%2,s=void 0,l=void 0,c=e.stroke(r,t),h=0==n||3==n?-1:1;if(e.label){var f=e.labelGap*h,d=Ft((e._lpos+f)*i);Li(e.labelFont[0],c,"center",2==n?P:I),K.save(),1==o?(s=l=0,K.translate(d,Ft(Qe+tn/2)),K.rotate((3==n?-Dt:Dt)/2)):(s=Ft(Ze+Je/2),l=d),K.fillText(e.label,s,l),K.restore()}var p=(0,a.Z)(e._found,2),g=p[0],m=p[1];if(0==m)return"continue";var v=yt[e.scale],y=0==o?Je:tn,w=0==o?Ze:Qe,b=Ft(e.gap*i),_=e._splits,S=2==v.distr?_.map((function(t){return Ai[t]})):_,x=2==v.distr?Ai[_[1]]-Ai[_[0]]:g,C=e.ticks,k=e.border,A=C.show?Ft(C.size*i):0,$=e._rotate*-Dt/180,R=ct(e._pos*i),T=(A+b)*h,E=R+T;l=0==o?E:0,s=1==o?E:0;var L=e.font[0],M=1==e.align?F:2==e.align?W:$>0?F:$<0?W:0==o?"center":3==n?W:F,O=$||1==o?"middle":2==n?P:I;Li(L,c,M,O);for(var D=e.font[1]*Nn,B=_.map((function(t){return ct(u(t,v,y,w))})),H=e._values,N=0;N<H.length;N++){var j=H[N];if(null!=j){0==o?s=B[N]:l=B[N],j=""+j;for(var U=-1==j.indexOf("\n")?[j]:j.split(/\n/gm),z=0;z<U.length;z++){var G=U[z];$?(K.save(),K.translate(s,l+z*D),K.rotate($),K.fillText(G,0,0),K.restore()):K.fillText(G,s,l+z*D)}}}C.show&&zi(B,C.filter(r,S,t,m,x),o,n,R,A,se(C.width*i,3),C.stroke(r,t),C.dash,C.cap);var V=e.grid;V.show&&zi(B,V.filter(r,S,t,m,x),o,0==o?2:1,0==o?Qe:Ze,0==o?tn:Je,se(V.width*i,3),V.stroke(r,t),V.dash,V.cap),k.show&&zi([R],[1],0==o?1:0,0==o?1:2,1==o?Qe:Ze,1==o?tn:Je,se(k.width*i,3),k.stroke(r,t),k.dash,k.cap)},e=0;e<pt.length;e++)t(e);vo("drawAxes")}function ur(t){dt.forEach((function(e,n){n>0&&(e._paths=null,t&&(1==o?(e.min=null,e.max=null):e.facets.forEach((function(t){t.min=null,t.max=null}))))}))}var hr,fr,dr,pr,gr,mr,vr,yr,wr,br,_r,Sr,xr=!1;function Cr(){xr||(Ae(kr),xr=!0)}function kr(){en&&(Oi(),en=!1),rn&&(xn(),rn=!1),nn&&(rt(tt,F,Ke),rt(tt,P,Xe),rt(tt,O,qe),rt(tt,D,Ye),rt(et,F,Ke),rt(et,P,Xe),rt(et,O,qe),rt(et,D,Ye),rt(Z,O,Ge),rt(Z,D,Ve),Y.width=Ft(Ge*i),Y.height=Ft(Ve*i),pt.forEach((function(t){var e=t._el,n=t._show,i=t._size,r=t._pos,o=t.side;if(null!=e)if(n){var s=3===o||0===o?i:0,a=o%2==1;rt(e,a?"left":"top",r-s),rt(e,a?"width":"height",i),rt(e,a?"top":"left",a?Xe:Ke),rt(e,a?"height":"width",a?Ye:qe),it(e,b)}else nt(e,b)})),Zn=Qn=Jn=oi=si=fi=mi=vi=ri=null,wi=1,ro(!0),vo("setSize"),nn=!1),Ge>0&&Ve>0&&(K.clearRect(0,0,Y.width,Y.height),vo("drawClear"),Lt.forEach((function(t){return t()})),vo("draw")),Dr.show&&sn&&(Ir(Dr),sn=!1),Rn.show&&on&&(no(null,!0,!1),on=!1),h||(h=!0,r.status=1,vo("ready")),$i=!1,xr=!1}function Ar(t,n){var i=yt[t];if(null==i.from){if(0==Xn){var o=i.range(r,n.min,n.max,t);n.min=o[0],n.max=o[1]}if(n.min>n.max){var s=n.min;n.min=n.max,n.max=s}if(Xn>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;t==At&&2==i.distr&&Xn>0&&(n.min=vt(n.min,e[0]),n.max=vt(n.max,e[0]),n.min==n.max&&n.max++),Qt[t]=n,en=!0,Cr()}}r.redraw=function(t,e){rn=e||!1,!1!==t?Wr(At,zt.min,zt.max):Cr()},r.setScale=Ar;var $r=!1,Rr=Rn.drag,Tr=Rr.x,Er=Rr.y;Rn.show&&(Rn.x&&(hr=st(S,et)),Rn.y&&(fr=st(x,et)),0==zt.ori?(dr=hr,pr=fr):(dr=fr,pr=hr),_r=Rn.left,Sr=Rn.top);var Lr,Mr,Or,Dr=r.select=be({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Pr=Dr.show?st(_,Dr.over?et:tt):null;function Ir(t,e){if(Dr.show){for(var n in t)Dr[n]=t[n],n in ao&&rt(Pr,n,t[n]);!1!==e&&vo("setSelect")}}function Fr(t,e){var n=dt[t],i=Ce?Re[t]:null;n.show?i&&it(i,b):(i&&nt(i,b),Mn.length>1&<(Mn[t],-10,-10,qe,Ye))}function Wr(t,e,n){Ar(t,{min:e,max:n})}function Br(t,e,n,i){null!=e.focus&&Gr(t),null!=e.show&&dt.forEach((function(n,i){i>0&&(t==i||null==t)&&(n.show=e.show,Fr(i,e.show),Wr(2==o?n.facets[1].scale:n.scale,null,null),Cr())})),!1!==n&&vo("setSeries",t,e),i&&_o("setSeries",r,t,e)}function Hr(t,e){be(kt[t],e)}function Nr(t,e){t.fill=Zt(t.fill||null),t.dir=Rt(t.dir,-1),e=null==e?kt.length:e,kt.splice(e,0,t)}function jr(t){null==t?kt.length=0:kt.splice(t,1)}function Ur(t,e){dt[t].alpha=e,Rn.show&&Mn[t]&&(Mn[t].style.opacity=e),Ce&&Re[t]&&(Re[t].style.opacity=e)}r.setSelect=Ir,r.setSeries=Br,r.addBand=Nr,r.setBand=Hr,r.delBand=jr;var zr={focus:!0};function Gr(t){if(t!=Or){var e=null==t,n=1!=En.alpha;dt.forEach((function(i,r){var o=e||0==r||r==t;i._focus=e?null:o,n&&Ur(r,o?1:En.alpha)})),Or=t,n&&Cr()}}function Vr(t,e,n){var r=yt[e];n&&(t=t/i-(1==r.ori?Xe:Ke));var o=qe;1==r.ori&&(o=Ye,t=o-t),-1==r.dir&&(t=o-t);var s=r._min,a=r._max,l=t/o,c=s+(a-s)*l,u=r.distr;return 3==u?Nt(10,c):4==u?Gt(c,r.asinh):c}function qr(t,n){var i=Vr(t,At,n);return vt(i,e[0],Si,Ci)}function Yr(t){t(r),Cr()}function Kr(t,e){rt(Pr,F,Dr.left=t),rt(Pr,O,Dr.width=e)}function Xr(t,e){rt(Pr,P,Dr.top=t),rt(Pr,D,Dr.height=e)}Ce&&Ln&>(G,ae,(function(t){Rn._lock||null!=Or&&Br(null,zr,!0,yo.setSeries)})),r.valToIdx=function(t){return vt(t,e[0])},r.posToIdx=qr,r.posToVal=Vr,r.valToPos=function(t,e,n){return 0==yt[e].ori?l(t,yt[e],n?Je:qe,n?Ze:0):c(t,yt[e],n?tn:Ye,n?Qe:0)},r.batch=Yr,r.setCursor=function(t,e,n){_r=t.left,Sr=t.top,no(null,e,n)};var Zr=0==zt.ori?Kr:Xr,Qr=1==zt.ori?Kr:Xr;function Jr(){if(Ce&&xe.live)for(var t=2==o?1:0;t<dt.length;t++)if(0!=t||!Ee){var e=xe.values[t],n=0;for(var i in e)Te[t][n++].firstChild.nodeValue=e[i]}}function to(t,e){if(null!=t){var n=t.idx;xe.idx=n,dt.forEach((function(t,e){(e>0||!Ee)&&eo(e,n)}))}Ce&&xe.live&&Jr(),un=!1,!1!==e&&vo("setLegend")}function eo(t,n){var i;if(null==n)i=Le;else{var o=dt[t],s=0==t&&2==Yt?Ai:e[t];i=Ee?o.values(r,t,n):{_:o.value(r,s[n],t,n)}}xe.values[t]=i}function no(t,n,i){wr=_r,br=Sr;var s,l=Rn.move(r,_r,Sr),c=(0,a.Z)(l,2);_r=c[0],Sr=c[1],Rn.show&&(dr&<(dr,Ft(_r),0,qe,Ye),pr&<(pr,0,Ft(Sr),qe,Ye));var u=Si>Ci;Lr=qt;var h=0==zt.ori?qe:Ye,f=1==zt.ori?qe:Ye;if(_r<0||0==Xn||u){s=null;for(var d=0;d<dt.length;d++)d>0&&Mn.length>1&<(Mn[d],-10,-10,qe,Ye);if(Ln&&Br(null,zr,!0,null==t&&yo.setSeries),xe.live){Se.fill(null),un=!0;for(var p=0;p<dt.length;p++)xe.values[p]=Le}}else{var g,m,v;1==o&&(g=0==zt.ori?_r:Sr,m=Vr(g,At),s=vt(m,e[0],Si,Ci),v=re(It(e[0][s],zt,h,0),.5));for(var y=2==o?1:0;y<dt.length;y++){var w=dt[y],b=Se[y],_=1==o?e[y][b]:e[y][1][b],S=Rn.dataIdx(r,y,s,m),x=1==o?e[y][S]:e[y][1][S];un=un||x!=_||S!=b,Se[y]=S;var C=S==s?v:re(It(1==o?e[0][S]:e[y][0][S],zt,h,0),.5);if(y>0&&w.show){var k=null==x?-10:re(jt(x,1==o?yt[w.scale]:yt[w.facets[1].scale],f,0),.5);if(k>0&&1==o){var A=Pt(k-Sr);A<=Lr&&(Lr=A,Mr=y)}var $=void 0,R=void 0;if(0==zt.ori?($=C,R=k):($=k,R=C),un&&Mn.length>1){ut(Mn[y],Rn.points.fill(r,y),Rn.points.stroke(r,y));var T=void 0,E=void 0,L=void 0,M=void 0,O=!0,D=Rn.points.bbox;if(null!=D){O=!1;var P=D(r,y);L=P.left,M=P.top,T=P.width,E=P.height}else L=$,M=R,T=E=Rn.points.size(r,y);ft(Mn[y],T,E,O),lt(Mn[y],L,M,qe,Ye)}}if(xe.live){if(!un||0==y&&Ee)continue;eo(y,S)}}}if(Rn.idx=s,Rn.left=_r,Rn.top=Sr,un&&(xe.idx=s,to()),Dr.show&&$r)if(null!=t){var I=(0,a.Z)(yo.scales,2),F=I[0],W=I[1],B=(0,a.Z)(yo.match,2),H=B[0],j=B[1],U=(0,a.Z)(t.cursor.sync.scales,2),z=U[0],G=U[1],V=t.cursor.drag;if(Tr=V._x,Er=V._y,Tr||Er){var q,Y,K,X,Z,Q=t.select,J=Q.left,tt=Q.top,et=Q.width,nt=Q.height,it=t.scales[F].ori,rt=t.posToVal,ot=null!=F&&H(F,z),st=null!=W&&j(W,G);ot&&Tr?(0==it?(q=J,Y=et):(q=tt,Y=nt),K=yt[F],X=It(rt(q,z),K,h,0),Z=It(rt(q+Y,z),K,h,0),Zr(Bt(X,Z),Pt(Z-X))):Zr(0,h),st&&Er?(1==it?(q=J,Y=et):(q=tt,Y=nt),K=yt[W],X=jt(rt(q,G),K,f,0),Z=jt(rt(q+Y,G),K,f,0),Qr(Bt(X,Z),Pt(Z-X))):Qr(0,f)}else lo()}else{var at=Pt(wr-gr),ct=Pt(br-mr);if(1==zt.ori){var ht=at;at=ct,ct=ht}Tr=Rr.x&&at>=Rr.dist,Er=Rr.y&&ct>=Rr.dist;var pt,gt,mt=Rr.uni;null!=mt?Tr&&Er&&(Tr=at>=mt,Er=ct>=mt,Tr||Er||(ct>at?Er=!0:Tr=!0)):Rr.x&&Rr.y&&(Tr||Er)&&(Tr=Er=!0),Tr&&(0==zt.ori?(pt=vr,gt=_r):(pt=yr,gt=Sr),Zr(Bt(pt,gt),Pt(gt-pt)),Er||Qr(0,f)),Er&&(1==zt.ori?(pt=vr,gt=_r):(pt=yr,gt=Sr),Qr(Bt(pt,gt),Pt(gt-pt)),Tr||Zr(0,h)),Tr||Er||(Zr(0,0),Qr(0,0))}if(Rr._x=Tr,Rr._y=Er,null==t){if(i){if(null!=wo){var wt=(0,a.Z)(yo.scales,2),bt=wt[0],_t=wt[1];yo.values[0]=null!=bt?Vr(0==zt.ori?_r:Sr,bt):null,yo.values[1]=null!=_t?Vr(1==zt.ori?_r:Sr,_t):null}_o(N,r,_r,Sr,qe,Ye,s)}if(Ln){var St=i&&yo.setSeries,xt=En.prox;null==Or?Lr<=xt&&Br(Mr,zr,!0,St):Lr>xt?Br(null,zr,!0,St):Mr!=Or&&Br(Mr,zr,!0,St)}}!1!==n&&vo("setCursor")}r.setLegend=to;var io=null;function ro(t){!0===t?io=null:(io=et.getBoundingClientRect(),vo("syncRect",io))}function oo(t,e,n,i,r,o,s){Rn._lock||$r&&null!=t&&0==t.movementX&&0==t.movementY||(so(t,e,n,i,r,o,s,!1,null!=t),null!=t?no(null,!0,!0):no(e,!0,!1))}function so(t,e,n,i,o,s,l,c,h){if(null==io&&ro(!1),null!=t)n=t.clientX-io.left,i=t.clientY-io.top;else{if(n<0||i<0)return _r=-10,void(Sr=-10);var f=(0,a.Z)(yo.scales,2),d=f[0],p=f[1],g=e.cursor.sync,m=(0,a.Z)(g.values,2),v=m[0],y=m[1],w=(0,a.Z)(g.scales,2),b=w[0],_=w[1],S=(0,a.Z)(yo.match,2),x=S[0],C=S[1],k=e.axes[0].side%2==1,A=0==zt.ori?qe:Ye,$=1==zt.ori?qe:Ye,R=k?s:o,T=k?o:s,E=k?i:n,L=k?n:i;if(n=null!=b?x(d,b)?u(v,yt[d],A,0):-10:A*(E/R),i=null!=_?C(p,_)?u(y,yt[p],$,0):-10:$*(L/T),1==zt.ori){var M=n;n=i,i=M}}if(h&&((n<=1||n>=qe-1)&&(n=Kt(n,qe)),(i<=1||i>=Ye-1)&&(i=Kt(i,Ye))),c){gr=n,mr=i;var O=Rn.move(r,n,i),D=(0,a.Z)(O,2);vr=D[0],yr=D[1]}else _r=n,Sr=i}var ao={width:0,height:0,left:0,top:0};function lo(){Ir(ao,!1)}function co(t,e,n,i,o,s,a){$r=!0,Tr=Er=Rr._x=Rr._y=!1,so(t,e,n,i,o,s,a,!0,!1),null!=t&&(Ne(U,Q,uo),_o(j,r,vr,yr,qe,Ye,null))}function uo(t,e,n,i,o,s,a){$r=Rr._x=Rr._y=!1,so(t,e,n,i,o,s,a,!1,!0);var l=Dr.left,c=Dr.top,u=Dr.width,h=Dr.height,f=u>0||h>0;if(f&&Ir(Dr),Rr.setScale&&f){var d=l,p=u,g=c,m=h;if(1==zt.ori&&(d=c,p=h,g=l,m=u),Tr&&Wr(At,Vr(d,At),Vr(d+p,At)),Er)for(var v in yt){var y=yt[v];v!=At&&null==y.from&&y.min!=qt&&Wr(v,Vr(g+m,v),Vr(g,v))}lo()}else Rn.lock&&(Rn._lock=!Rn._lock,Rn._lock||no(null,!0,!1));null!=t&&(je(U,Q),_o(U,r,_r,Sr,qe,Ye,null))}function ho(t,e,n,i,r,o,s){if(!Rn._lock){var a=$r;if($r){var l,c,u=!0,h=!0,f=10;0==zt.ori?(l=Tr,c=Er):(l=Er,c=Tr),l&&c&&(u=_r<=f||_r>=qe-f,h=Sr<=f||Sr>=Ye-f),l&&u&&(_r=_r<vr?0:qe),c&&h&&(Sr=Sr<yr?0:Ye),no(null,!0,!0),$r=!1}_r=-10,Sr=-10,no(null,!0,!0),a&&($r=a)}}function fo(t,e,n,i,o,s,a){Ti(),lo(),null!=t&&_o(V,r,_r,Sr,qe,Ye,null)}function po(){pt.forEach(ar),hn(r.width,r.height,!0)}gt(X,J,po);var go={};go.mousedown=co,go.mousemove=oo,go.mouseup=uo,go.dblclick=fo,go["setSeries"]=function(t,e,n,i){Br(n,i,!0,!1)},Rn.show&&(Ne(j,et,co),Ne(N,et,oo),Ne(z,et,ro),Ne(G,et,ho),Ne(V,et,fo),Gi.add(r),r.syncRect=ro);var mo=r.hooks=t.hooks||{};function vo(t,e,n){t in mo&&mo[t].forEach((function(t){t.call(null,r,e,n)}))}(t.plugins||[]).forEach((function(t){for(var e in t.hooks)mo[e]=(mo[e]||[]).concat(t.hooks[e])}));var yo=be({key:null,setSeries:!1,filters:{pub:ne,sub:ne},scales:[At,dt[1]?dt[1].scale:null],match:[ie,ie],values:[null,null]},Rn.sync);Rn.sync=yo;var wo=yo.key,bo=di(wo);function _o(t,e,n,i,r,o,s){yo.filters.pub(t,e,n,i,r,o,s)&&bo.pub(t,e,n,i,r,o,s)}function So(t,e,n,i,r,o,s){yo.filters.sub(t,e,n,i,r,o,s)&&go[t](null,e,n,i,r,o,s)}function xo(){var t;bo.unsub(r),Gi.delete(r),He.clear(),mt(X,J,po),B.remove(),null===(t=ae)||void 0===t||t.remove(),vo("destroy")}function Co(){vo("init",t,e),Ri(e||t.data,!1),Qt[At]?Ar(At,Qt[At]):Ti(),sn=Dr.show,on=un=!0,hn(t.width,t.height)}return bo.sub(r),r.pub=So,r.destroy=xo,dt.forEach(Pn),pt.forEach(Bn),n?n instanceof HTMLElement?(n.appendChild(B),Co()):n(r,Co):Co(),r}lr.assign=be,lr.fmtNum=Mt,lr.rangeNum=$t,lr.rangeLog=_t,lr.rangeAsinh=St,lr.orient=mi,lr.pxRatio=i,lr.join=ke,lr.fmtDate=Ie,lr.tzDate=We,lr.sync=di,lr.addGap=_i,lr.clipGaps=bi;var cr=lr.paths={points:Pi};cr.linear=Bi,cr.stepped=Hi,cr.bars=Ni,cr.spline=Ui},83923:function(t,e,n){t=n.nmd(t),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(t,e,n){"use strict";function i(t){var e=(new Date).toLocaleString("en-us",t);return 1==e.length?"0"+e:e}var r=t("./lib/dom"),o=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,a=t("./lib/lang"),l=t("./range").Range,c=t("./range_list").RangeList,u=t("./keyboard/hash_handler").HashHandler,h=t("./tokenizer").Tokenizer,f=t("./clipboard"),d={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,n){var i=t.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(t){return t.session.getLine(t.getCursorPosition().row)},PREV_LINE:function(t){return t.session.getLine(t.getCursorPosition().row-1)},LINE_INDEX:function(t){return t.getCursorPosition().row},LINE_NUMBER:function(t){return t.getCursorPosition().row+1},SOFT_TABS:function(t){return t.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(t){return t.session.getTabSize()},CLIPBOARD:function(t){return f.getText&&f.getText()},FILENAME:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0]},FILENAME_BASE:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(t){return this.FILEPATH(t).replace(/[^/\\]*$/,"")},FILEPATH:function(t){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(t){var e=t.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:i.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:i.bind(null,{year:"2-digit"}),CURRENT_MONTH:i.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:i.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:i.bind(null,{month:"short"}),CURRENT_DATE:i.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:i.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:i.bind(null,{weekday:"short"}),CURRENT_HOUR:i.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:i.bind(null,{minute:"2-digit"}),CURRENT_SECOND:i.bind(null,{second:"2-digit"})};d.SELECTED_TEXT=d.SELECTION;var p=function(){this.snippetMap={},this.snippetNameMap={}};(function(){o.implement(this,s),this.getTokenizer=function(){return p.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function t(t){return t=t.substr(1),/^\d+$/.test(t)?[{tabstopId:parseInt(t,10)}]:[{text:t}]}function e(t){return"(?:[^\\\\"+t+"]|\\\\.)"}var n={regex:"/("+e("/")+"+)/",onMatch:function(t,e,n){var i=n[0];return i.fmtString=!0,i.guard=t.slice(1,-1),i.flag="",""},next:"formatString"};return p.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(t,e,n){var i=t[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(t=i),[t]}},{regex:/}/,onMatch:function(t,e,n){return[n.length?n.shift():t]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,i){var r=t(e.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+e("\\|")+"*\\|",onMatch:function(t,e,n){var i=t.slice(1,-1).replace(/\\[,|\\]|,/g,(function(t){return 2==t.length?t[1]:"\0"})).split("\0").map((function(t){return{value:t}}));return n[0].choices=i,[i[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(t,e,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(t,e,n){var i=t[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?t=i:"n"==i?t="\n":"t"==i?t="\t":-1!="ulULE".indexOf(i)&&(t={changeCase:i,local:i>"a"}),[t]}},{regex:"/\\w*}",onMatch:function(t,e,n){var i=n.shift();return i&&(i.flag=t.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||t]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(t,e,n){return[{text:t.slice(1)}]}},{regex:/\${\w+/,onMatch:function(t,e,n){var i={text:t.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(t,e,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||t]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(t,e,n){var i=n[0];return i.formatFunction=t.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(t,e,n){"+"==t[1]&&(n[0].ifEnd=n[0]),"?"==t[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),p.$tokenizer},this.tokenizeTmSnippet=function(t,e){return this.getTokenizer().getLineTokens(t,e).tokens.map((function(t){return t.value||t}))},this.getVariableValue=function(t,e,n){if(/^\d+$/.test(e))return(this.variables.__||{})[e]||"";if(/^[A-Z]\d+$/.test(e))return(this.variables[e[0]+"__"]||{})[e.substr(1)]||"";if(e=e.replace(/^TM_/,""),!this.variables.hasOwnProperty(e))return"";var i=this.variables[e];return"function"==typeof i&&(i=this.variables[e](t,e,n)),null==i?"":i},this.variables=d,this.tmStrFormat=function(t,e,n){if(!e.fmt)return t;var i=e.flag||"",r=e.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof e.fmt?this.tokenizeTmSnippet(e.fmt,"formatString"):e.fmt,s=this,a=t.replace(r,(function(){var t=s.variables.__;s.variables.__=[].slice.call(arguments);for(var e=s.resolveVariables(o,n),i="E",r=0;r<e.length;r++){var a=e[r];if("object"==typeof a)if(e[r]="",a.changeCase&&a.local){var l=e[r+1];l&&"string"==typeof l&&("u"==a.changeCase?e[r]=l[0].toUpperCase():e[r]=l[0].toLowerCase(),e[r+1]=l.substr(1))}else a.changeCase&&(i=a.changeCase);else"U"==i?e[r]=a.toUpperCase():"L"==i&&(e[r]=a.toLowerCase())}return s.variables.__=t,e.join("")}));return a},this.tmFormatFunction=function(t,e,n){return"upcase"==e.formatFunction?t.toUpperCase():"downcase"==e.formatFunction?t.toLowerCase():t},this.resolveVariables=function(t,e){function n(e){var n=t.indexOf(e,s+1);-1!=n&&(s=n)}for(var i=[],r="",o=!0,s=0;s<t.length;s++){var a=t[s];if("string"!=typeof a){if(a){if(o=!1,a.fmtString){var l=t.indexOf(a,s+1);-1==l&&(l=t.length),a.fmt=t.slice(s+1,l),s=l}if(a.text){var c=this.getVariableValue(e,a.text,r)+"";a.fmtString&&(c=this.tmStrFormat(c,a,e)),a.formatFunction&&(c=this.tmFormatFunction(c,a,e)),c&&!a.ifEnd?(i.push(c),n(a)):!c&&a.ifEnd&&n(a.ifEnd)}else a.elseEnd?n(a.elseEnd):(null!=a.tabstopId||null!=a.changeCase)&&i.push(a)}}else i.push(a),"\n"==a?(o=!0,r=""):o&&(r=/^\t*/.exec(a)[0],o=/\S/.test(a))}return i},this.insertSnippetForSelection=function(t,e){function n(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if("object"==typeof i){if(c[i.tabstopId])continue;var r=t.lastIndexOf(i,n-1);i=e[r]||{tabstopId:i.tabstopId}}e[n]=i}return e}var i=t.getCursorPosition(),r=t.session.getLine(i.row),o=t.session.getTabString(),s=r.match(/^\s*/)[0];i.column<s.length&&(s=s.slice(0,i.column)),e=e.replace(/\r/g,"");var a=this.tokenizeTmSnippet(e);a=this.resolveVariables(a,t),a=a.map((function(t){return"\n"==t?t+s:"string"==typeof t?t.replace(/\t/g,o):t}));var l=[];a.forEach((function(t,e){if("object"==typeof t){var n=t.tabstopId,i=l[n];if(i||(i=l[n]=[],i.index=n,i.value="",i.parents={}),-1===i.indexOf(t)){t.choices&&!i.choices&&(i.choices=t.choices),i.push(t);var r=a.indexOf(t,e+1);if(-1!==r){var o=a.slice(e+1,r),s=o.some((function(t){return"object"==typeof t}));s&&!i.value?i.value=o:o.length&&(!i.value||"string"!=typeof i.value)&&(i.value=o.join(""))}}}})),l.forEach((function(t){t.length=0}));for(var c={},u=0;u<a.length;u++){var h=a[u];if("object"==typeof h){var f=h.tabstopId,d=l[f],p=a.indexOf(h,u+1);if(c[f])c[f]===h&&(delete c[f],Object.keys(c).forEach((function(t){d.parents[t]=!0})));else{c[f]=h;var m=d.value;"string"!=typeof m?m=n(m):h.fmt&&(m=this.tmStrFormat(m,h,t)),a.splice.apply(a,[u+1,Math.max(0,p-u)].concat(m,h)),-1===d.indexOf(h)&&d.push(h)}}}var v=0,y=0,w="";a.forEach((function(t){if("string"==typeof t){var e=t.split("\n");e.length>1?(y=e[e.length-1].length,v+=e.length-1):y+=t.length,w+=t}else t&&(t.start?t.end={row:v,column:y}:t.start={row:v,column:y})}));var b=t.getSelectionRange(),_=t.session.replace(b,w),S=new g(t),x=t.inVirtualSelectionMode&&t.selection.index;S.addTabstops(l,b.start,_,x)},this.insertSnippet=function(t,e){var n=this;if(t.inVirtualSelectionMode)return n.insertSnippetForSelection(t,e);t.forEachSelection((function(){n.insertSnippetForSelection(t,e)}),null,{keepOrder:!0}),t.tabstopManager&&t.tabstopManager.tabNext()},this.$getScope=function(t){var e=t.session.$mode.$id||"";if(e=e.split("/").pop(),"html"===e||"php"===e){"php"===e&&!t.session.$mode.inlinePhp&&(e="html");var n=t.getCursorPosition(),i=t.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?e="javascript":"css-"==i.substring(0,4)?e="css":"php-"==i.substring(0,4)&&(e="php"))}return e},this.getActiveScopes=function(t){var e=this.$getScope(t),n=[e],i=this.snippetMap;return i[e]&&i[e].includeScopes&&n.push.apply(n,i[e].includeScopes),n.push("_"),n},this.expandWithTab=function(t,e){var n=this,i=t.forEachSelection((function(){return n.expandSnippetForSelection(t,e)}),null,{keepOrder:!0});return i&&t.tabstopManager&&t.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(t,e){var n,i=t.getCursorPosition(),r=t.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(t).some((function(t){var e=a[t];return e&&(n=this.findMatchingSnippet(e,o,s)),!!n}),this),!!n&&(e&&e.dryRun||(t.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(t,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(t,e,n){for(var i=t.length;i--;){var r=t[i];if((!r.startRe||r.startRe.test(e))&&((!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe)))return r.matchBefore=r.startRe?r.startRe.exec(e):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(e)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(t,e){function n(t){return t&&!/^\^?\(.*\)\$?$|^\\b$/.test(t)&&(t="(?:"+t+")"),t||""}function i(t,e,i){return t=n(t),e=n(e),i?(t=e+t,t&&"$"!=t[t.length-1]&&(t+="$")):(t+=e,t&&"^"!=t[0]&&(t="^"+t)),new RegExp(t)}function r(t){t.scope||(t.scope=e||"_"),e=t.scope,o[e]||(o[e]=[],s[e]={});var n=s[e];if(t.name){var r=n[t.name];r&&l.unregister(r),n[t.name]=t}o[e].push(t),t.prefix&&(t.tabTrigger=t.prefix),!t.content&&t.body&&(t.content=Array.isArray(t.body)?t.body.join("\n"):t.body),t.tabTrigger&&!t.trigger&&(!t.guard&&/^\w/.test(t.tabTrigger)&&(t.guard="\\b"),t.trigger=a.escapeRegExp(t.tabTrigger)),(t.trigger||t.guard||t.endTrigger||t.endGuard)&&(t.startRe=i(t.trigger,t.guard,!0),t.triggerRe=new RegExp(t.trigger),t.endRe=i(t.endTrigger,t.endGuard,!0),t.endTriggerRe=new RegExp(t.endTrigger))}var o=this.snippetMap,s=this.snippetNameMap,l=this;t||(t=[]),Array.isArray(t)?t.forEach(r):Object.keys(t).forEach((function(e){r(t[e])})),this._signal("registerSnippets",{scope:e})},this.unregister=function(t,e){function n(t){var n=r[t.scope||e];if(n&&n[t.name]){delete n[t.name];var o=i[t.scope||e],s=o&&o.indexOf(t);s>=0&&o.splice(s,1)}}var i=this.snippetMap,r=this.snippetNameMap;t.content?n(t):Array.isArray(t)&&t.forEach(n)},this.parseSnippetFile=function(t){t=t.replace(/\r/g,"");var e,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(e=r.exec(t)){if(e[1])try{i=JSON.parse(e[1]),n.push(i)}catch(s){}if(e[4])i.content=e[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=e[2],a=e[3];if("regex"==o){var l=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=l.exec(a)[1],i.trigger=l.exec(a)[1],i.endTrigger=l.exec(a)[1],i.endGuard=l.exec(a)[1]}else"snippet"==o?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):o&&(i[o]=a)}}return n},this.getSnippetByName=function(t,e){var n,i=this.snippetNameMap;return this.getActiveScopes(e).some((function(e){var r=i[e];return r&&(n=r[t]),!!n}),this),n}}).call(p.prototype);var g=function(t){if(t.tabstopManager)return t.tabstopManager;t.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(t)};(function(){this.attach=function(t){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(t){for(var e="r"==t.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=(this.tabstops||[]).slice(),o=0;o<r.length;o++){var s=r[o],a=s==n||i[s.index];if(s.rangeList.$bias=a?0:1,"remove"==t.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(t.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(t.end,l);u=u<0?-u-1:u-1;for(var h=s.rangeList.ranges.slice(c,u),f=0;f<h.length;f++)this.removeRange(h[f])}s.rangeList.$onChange(t)}var d=this.editor.session;!this.$inChange&&e&&1==d.getLength()&&!d.getValue()&&this.detach()},this.updateLinkedFields=function(){var t=this.selectedTabstop;if(t&&t.hasLinkedRanges&&t.firstNonLinked){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(t.firstNonLinked),r=0;r<t.length;r++){var o=t[r];if(o.linked){var s=o.original,a=e.snippetManager.tmStrFormat(i,s,this.editor);n.replace(o,a)}}this.$inChange=!1}},this.onAfterExec=function(t){t.command&&!t.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var t=this.editor.selection.lead,e=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=0;i<this.ranges.length;i++)if(!this.ranges[i].linked){var r=this.ranges[i].contains(t.row,t.column),o=n||this.ranges[i].contains(e.row,e.column);if(r&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(t){var e=this.tabstops.length,n=this.index+(t||1);n=Math.min(Math.max(n,1),e),n==e&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(t){this.$openTabstops=null;var e=this.tabstops[this.index];if(e&&this.addTabstopMarkers(e),this.index=t,e=this.tabstops[this.index],e&&e.length){this.selectedTabstop=e;var n=e.firstNonLinked||e;if(e.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var i=this.editor.multiSelect;i.toSingleRange(n);for(var r=0;r<e.length;r++)e.hasLinkedRanges&&e[r].linked||i.addRange(e[r].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(t,e,n){var i=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!t[0]){var r=l.fromPoints(n,n);v(r.start,e),v(r.end,e),t[0]=[r],t[0].index=0}var o=this.index,s=[o+1,0],a=this.ranges;t.forEach((function(t,n){for(var r=this.$openTabstops[n]||t,o=0;o<t.length;o++){var u=t[o],h=l.fromPoints(u.start,u.end||u.start);m(h.start,e),m(h.end,e),h.original=u,h.tabstop=r,a.push(h),r!=t?r.unshift(h):r[o]=h,u.fmtString||r.firstNonLinked&&i?(h.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=h)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===t&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r),r.rangeList=r.rangeList||new c,r.rangeList.$bias=0,r.rangeList.addList(r)}),this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(t){var e=this.editor.session;t.forEach((function(t){t.markerId||(t.markerId=e.addMarker(t,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(t){var e=this.editor.session;t.forEach((function(t){e.removeMarker(t.markerId),t.markerId=null}))},this.removeRange=function(t){var e=t.tabstop.indexOf(t);-1!=e&&t.tabstop.splice(e,1),e=this.ranges.indexOf(t),-1!=e&&this.ranges.splice(e,1),e=t.tabstop.rangeList.ranges.indexOf(t),-1!=e&&t.tabstop.splice(e,1),this.editor.session.removeMarker(t.markerId),t.tabstop.length||(e=this.tabstops.indexOf(t.tabstop),-1!=e&&this.tabstops.splice(e,1),this.tabstops.length||this.detach())},this.keyboardHandler=new u,this.keyboardHandler.bindKeys({Tab:function(t){e.snippetManager&&e.snippetManager.expandWithTab(t)||(t.tabstopManager.tabNext(1),t.renderer.scrollCursorIntoView())},"Shift-Tab":function(t){t.tabstopManager.tabNext(-1),t.renderer.scrollCursorIntoView()},Esc:function(t){t.tabstopManager.detach()}})}).call(g.prototype);var m=function(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row},v=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),e.snippetManager=new p;var y=t("./editor").Editor;(function(){this.insertSnippet=function(t,n){return e.snippetManager.insertSnippet(this,t,n)},this.expandSnippet=function(t){return e.snippetManager.expandWithTab(this,t)}}).call(y.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../virtual_renderer").VirtualRenderer,r=t("../editor").Editor,o=t("../range").Range,s=t("../lib/event"),a=t("../lib/lang"),l=t("../lib/dom"),c=function(t){var e=new i(t);e.$maxLines=4;var n=new r(e);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},u=function(t){var e=l.createElement("div"),n=new c(e);t&&t.appendChild(e),e.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(t){var e=t.getDocumentPosition();n.selection.moveToPosition(e),h.start.row=h.end.row=e.row,t.stop()}));var r,u=new o(-1,0,-1,1/0),h=new o(-1,0,-1,1/0);h.id=n.session.addMarker(h,"ace_active-line","fullLine"),n.setSelectOnHover=function(t){t?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(t){if(r){if(r.x!=t.x||r.y!=t.y){r=t,r.scrollTop=n.renderer.scrollTop;var e=r.getDocumentPosition().row;u.start.row!=e&&(u.id||n.setRow(e),d(e))}}else r=t})),n.renderer.on("beforeRender",(function(){if(r&&-1!=u.start.row){r.$pos=null;var t=r.getDocumentPosition().row;u.id||n.setRow(t),d(t,!0)}})),n.renderer.on("afterRender",(function(){var t=n.getRow(),e=n.renderer.$textLayer,i=e.element.childNodes[t-e.config.firstRow];i!==e.selectedNode&&e.selectedNode&&l.removeCssClass(e.selectedNode,"ace_selected"),e.selectedNode=i,i&&l.addCssClass(i,"ace_selected")}));var f=function(){d(-1)},d=function(t,e){t!==u.start.row&&(u.start.row=u.end.row=t,e||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",f),n.on("hide",f),n.on("changeSelection",f),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(t){var e=n.data[t];return"string"==typeof e?e:e&&e.value||""};var p=n.session.bgTokenizer;return p.$tokenizeRow=function(t){function e(t,e){t&&r.push({type:(i.className||"")+(e||""),value:t})}var i=n.data[t],r=[];if(!i)return r;"string"==typeof i&&(i={value:i});for(var o=i.caption||i.value||i.name,s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(i.matchMask&1<<u||u==a.length)){var h=a.slice(c,u);c=u;var f=s.indexOf(h,l);if(-1==f)continue;e(o.slice(l,f),""),l=f+h.length,e(o.slice(f,l),"completion-highlight")}return e(o.slice(l,o.length),""),i.meta&&r.push({type:"completion-meta",value:i.meta}),i.message&&r.push({type:"completion-message",value:i.message}),r},p.$updateOnChange=i,p.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.data=[],n.setData=function(t,e){n.filterText=e||"",n.setValue(a.stringRepeat("\n",t.length),-1),n.data=t||[],n.setRow(0)},n.getData=function(t){return n.data[t]},n.getRow=function(){return h.start.row},n.setRow=function(t){t=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,t)),h.start.row!=t&&(n.selection.clearSelection(),h.start.row=h.end.row=t||0,n.session._emit("changeBackMarker"),n.moveCursorTo(t||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(t,e,i){var o=this.container,s=window.innerHeight,a=window.innerWidth,l=this.renderer,c=l.$maxLines*e*1.4,u=t.top+this.$borderSize,h=u>s/2&&!i;h&&u+e+c>s?(l.$maxPixelHeight=u-2*this.$borderSize,o.style.top="",o.style.bottom=s-u+"px",n.isTopdown=!1):(u+=e,l.$maxPixelHeight=s-u-.2*e,o.style.top=u+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var f=t.left;f+o.offsetWidth>a&&(f=a-o.offsetWidth),o.style.left=f+"px",this._signal("show"),r=null,n.isOpen=!0},n.goTo=function(t){var e=this.getRow(),n=this.session.getLength()-1;switch(t){case"up":e=e<=0?n:e-1;break;case"down":e=e>=n?-1:e+1;break;case"start":e=0;break;case"end":e=n}this.setRow(e)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};l.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin: 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}","autocompletion.css",!1),e.AcePopup=u,e.$singleLineEditor=c})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(t,e,n){"use strict";e.parForEach=function(t,e,n){var i=0,r=t.length;0===r&&n();for(var o=0;o<r;o++)e(t[o],(function(t,e){i++,i===r&&n(t,e)}))};var i=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;e.retrievePrecedingIdentifier=function(t,e,n){n=n||i;for(var r=[],o=e-1;o>=0;o--){if(!n.test(t[o]))break;r.push(t[o])}return r.reverse().join("")},e.retrieveFollowingIdentifier=function(t,e,n){n=n||i;for(var r=[],o=e;o<t.length;o++){if(!n.test(t[o]))break;r.push(t[o])}return r},e.getCompletionPrefix=function(t){var e,n=t.getCursorPosition(),i=t.session.getLine(n.row);return t.completers.forEach(function(t){t.identifierRegexps&&t.identifierRegexps.forEach(function(t){!e&&t&&(e=this.retrievePrecedingIdentifier(i,n.column,t))}.bind(this))}.bind(this)),e||this.retrievePrecedingIdentifier(i,n.column)}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],(function(t,e,n){"use strict";var i=t("./keyboard/hash_handler").HashHandler,r=t("./autocomplete/popup").AcePopup,o=t("./autocomplete/util"),s=t("./lib/lang"),a=t("./lib/dom"),l=t("./snippets").snippetManager,c=t("./config"),u=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=s.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new r(document.body||document.documentElement),this.popup.on("click",function(t){this.insertMatch(),t.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(t,e,n){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),t.keyBinding.addKeyboardHandler(this.keyboardHandler);var i=t.renderer;if(this.popup.setRow(this.autoSelect?0:-1),n)n&&!e&&this.detach();else{this.popup.setTheme(t.getTheme()),this.popup.setFontSize(t.getFontSize());var r=i.layerConfig.lineHeight,o=i.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var s=t.container.getBoundingClientRect();o.top+=s.top-i.layerConfig.offset,o.left+=s.left-t.renderer.scrollLeft,o.left+=i.gutterWidth,this.popup.show(o,r)}this.changeTimer.cancel()},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(t){var e=this.editor.selection.lead;(e.row!=this.base.row||e.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(t){var e=document.activeElement,n=this.editor.textInput.getElement(),i=t.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(t.relatedTarget),r=this.popup&&this.popup.container;e!=n&&e.parentNode!=r&&!i&&e!=this.tooltipNode&&t.relatedTarget!=n&&this.detach()},this.mousedownListener=function(t){this.detach()},this.mousewheelListener=function(t){this.detach()},this.goTo=function(t){this.popup.goTo(t)},this.insertMatch=function(t,e){if(t||(t=this.popup.getData(this.popup.getRow())),!t)return!1;var n=this.completions;if(this.editor.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(this.editor,t);else{if(!n)return!1;if(n.filterText)for(var i,r=this.editor.selection.getAllRanges(),o=0;i=r[o];o++)i.start.column-=n.filterText.length,this.editor.session.remove(i);t.snippet?l.insertSnippet(this.editor,t.snippet):this.editor.execCommand("insertstring",t.value||t)}this.completions==n&&this.detach(),this.editor.endOperation()},this.commands={Up:function(t){t.completer.goTo("up")},Down:function(t){t.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(t){t.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(t){t.completer.goTo("end")},Esc:function(t){t.completer.detach()},Return:function(t){return t.completer.insertMatch()},"Shift-Return":function(t){t.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(t){var e=t.completer.insertMatch();if(e||t.tabstopManager)return e;t.completer.goTo("down")},PageUp:function(t){t.completer.popup.gotoPageUp()},PageDown:function(t){t.completer.popup.gotoPageDown()}},this.gatherCompletions=function(t,e){var n=t.getSession(),i=t.getCursorPosition(),r=o.getCompletionPrefix(t);this.base=n.doc.createAnchor(i.row,i.column-r.length),this.base.$insertRight=!0;var s=[],a=t.completers.length;return t.completers.forEach((function(l,c){l.getCompletions(t,n,i,r,(function(n,i){!n&&i&&(s=s.concat(i)),e(null,{prefix:o.getCompletionPrefix(t),matches:s,finished:0===--a})}))})),!0},this.showPopup=function(t,e){this.editor&&this.detach(),this.activated=!0,this.editor=t,t.completer!=this&&(t.completer&&t.completer.detach(),t.completer=this),t.on("changeSelection",this.changeListener),t.on("blur",this.blurListener),t.on("mousedown",this.mousedownListener),t.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,e)},this.updateCompletions=function(t,e){if(t&&this.base&&this.completions){var n=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:n});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet?void this.openPopup(this.editor,i,t):this.detach():this.detach()}if(e&&e.matches){n=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new h(e.matches),this.openPopup(this.editor,"",t)}var r=this.gatherCompletionsId,o=function(t){if(t.finished)return this.detach()}.bind(this),s=function(e){var n=e.prefix,i=e.matches;this.completions=new h(i),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(n);var r=this.completions.filtered;return r.length&&(1!=r.length||r[0].value!=n||r[0].snippet)?this.autoInsert&&1==r.length&&e.finished?this.insertMatch(r[0]):void this.openPopup(this.editor,n,t):o(e)}.bind(this),a=!0,l=null;if(this.gatherCompletions(this.editor,function(t,e){var n=e.prefix,i=e&&e.matches;if(!i||!i.length)return o(e);0===n.indexOf(e.prefix)&&r==this.gatherCompletionsId&&(a?l=e:s(e))}.bind(this)),a=!1,l){var c=l;l=null,s(c)}},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var t=this.popup,e=t.data,n=e&&(e[t.getHoveredRow()]||e[t.getRow()]),i=null;return n&&this.editor&&this.popup.isOpen?(this.editor.completers.some((function(t){return t.getDocTooltip&&(i=t.getDocTooltip(n)),i})),!i&&"string"!=typeof n&&(i=n),"string"==typeof i&&(i={docText:i}),i&&(i.docHTML||i.docText)?void this.showDocTooltip(i):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(t){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var e=this.tooltipNode;t.docHTML?e.innerHTML=t.docHTML:t.docText&&(e.textContent=t.docText),e.parentNode||document.body.appendChild(e);var n=this.popup,i=n.container.getBoundingClientRect();e.style.top=n.container.style.top,e.style.bottom=n.container.style.bottom,e.style.display="block",window.innerWidth-i.right<320?i.left<320?n.isTopdown?(e.style.top=i.bottom+"px",e.style.left=i.left+"px",e.style.right="",e.style.bottom=""):(e.style.top=n.container.offsetTop-e.offsetHeight+"px",e.style.left=i.left+"px",e.style.right="",e.style.bottom=""):(e.style.right=window.innerWidth-i.left+"px",e.style.left=""):(e.style.left=i.right+1+"px",e.style.right="")},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var t=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==t&&this.editor.focus(),this.tooltipNode=null,t.parentNode&&t.parentNode.removeChild(t)}},this.onTooltipClick=function(t){var e=t.target;while(e&&e!=this.tooltipNode){if("A"==e.nodeName&&e.href){e.rel="noreferrer",e.target="_blank";break}e=e.parentNode}},this.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var t=this.popup.container;t&&t.parentNode&&t.parentNode.removeChild(t)}this.editor&&this.editor.completer==this&&this.editor.completer,this.popup=null}}).call(u.prototype),u.for=function(t){return t.completer||(c.get("sharedPopups")?(u.$shared||(u.$sharedInstance=new u),t.completer=u.$sharedInstance):(t.completer=new u,t.once("destroy",(function(t,e){e.completer.destroy()})))),t.completer},u.startCommand={name:"startAutocomplete",exec:function(t,e){var n=u.for(t);n.autoInsert=!1,n.autoSelect=!0,n.showPopup(t,e),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var h=function(t,e){this.all=t,this.filtered=t,this.filterText=e||"",this.exactMatch=!1};(function(){this.setFilter=function(t){if(t.length>this.filterText&&0===t.lastIndexOf(this.filterText,0))var e=this.filtered;else e=this.all;this.filterText=t,e=this.filterCompletions(e,this.filterText),e=e.sort((function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)}));var n=null;e=e.filter((function(t){var e=t.snippet||t.caption||t.value;return e!==n&&(n=e,!0)})),this.filtered=e},this.filterCompletions=function(t,e){var n=[],i=e.toUpperCase(),r=e.toLowerCase();t:for(var o,s=0;o=t[s];s++){var a=o.caption||o.value||o.snippet;if(a){var l,c,u=-1,h=0,f=0;if(this.exactMatch){if(e!==a.substr(0,e.length))continue t}else{var d=a.toLowerCase().indexOf(r);if(d>-1)f=d;else for(var p=0;p<e.length;p++){var g=a.indexOf(r[p],u+1),m=a.indexOf(i[p],u+1);if(l=g>=0&&(m<0||g<m)?g:m,l<0)continue t;c=l-u-1,c>0&&(-1===u&&(f+=10),f+=c,h|=1<<p),u=l}}o.matchMask=h,o.exactMatch=f?0:1,o.$score=(o.score||0)-f,n.push(o)}}return n}}).call(h.prototype),e.Autocomplete=u,e.FilteredList=h})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(t,e,n){function i(t,e){var n=t.getTextRange(o.fromPoints({row:0,column:0},e));return n.split(s).length-1}function r(t,e){var n=i(t,e),r=t.getValue().split(s),o=Object.create(null),a=r[n];return r.forEach((function(t,e){if(t&&t!==a){var i=Math.abs(n-e),s=r.length-i;o[t]?o[t]=Math.max(s,o[t]):o[t]=s}})),o}var o=t("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;e.getCompletions=function(t,e,n,i,o){var s=r(e,n),a=Object.keys(s);o(null,a.map((function(t){return{caption:t,value:t,score:s[t],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(t,e,n){"use strict";var i=t("../snippets").snippetManager,r=t("../autocomplete").Autocomplete,o=t("../config"),s=t("../lib/lang"),a=t("../autocomplete/util"),l=t("../autocomplete/text_completer"),c={getCompletions:function(t,e,n,i,r){if(e.$mode.completer)return e.$mode.completer.getCompletions(t,e,n,i,r);var o=t.session.getState(n.row),s=e.$mode.getCompletions(o,e,n,i);r(null,s)}},u=function(t){var e={};return t.replace(/\${(\d+)(:(.*?))?}/g,(function(t,n,i,r){return e[n]=r||""})).replace(/\$(\d+?)/g,(function(t,n){return e[n]}))},h={getCompletions:function(t,e,n,r,o){var s=[],a=e.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=i.getActiveScopes(t);var l=i.snippetMap,c=[];s.forEach((function(t){for(var e=l[t]||[],n=e.length;n--;){var i=e[n],r=i.name||i.tabTrigger;r&&c.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",type:"snippet"})}}),this),o(null,c)},getDocTooltip:function(t){"snippet"==t.type&&!t.docHTML&&(t.docHTML=["<b>",s.escapeHTML(t.caption),"</b>","<hr></hr>",s.escapeHTML(u(t.snippet))].join(""))}},f=[h,l,c];e.setCompleters=function(t){f.length=0,t&&f.push.apply(f,t)},e.addCompleter=function(t){f.push(t)},e.textCompleter=l,e.keyWordCompleter=c,e.snippetCompleter=h;var d={name:"expandSnippet",exec:function(t){return i.expandWithTab(t)},bindKey:"Tab"},p=function(t,e){g(e.session.$mode)},g=function(t){"string"==typeof t&&(t=o.$modes[t]),t&&(i.files||(i.files={}),m(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(g))},m=function(t,e){e&&t&&!i.files[t]&&(i.files[t]={},o.loadModule(e,(function(e){e&&(i.files[t]=e,!e.snippets&&e.snippetText&&(e.snippets=i.parseSnippetFile(e.snippetText)),i.register(e.snippets||[],e.scope),e.includeScopes&&(i.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach((function(t){g("ace/mode/"+t)}))))})))},v=function(t){var e=t.editor,n=e.completer&&e.completer.activated;if("backspace"===t.command.name)n&&!a.getCompletionPrefix(e)&&e.completer.detach();else if("insertstring"===t.command.name){var i=a.getCompletionPrefix(e);if(i&&!n){var o=r.for(e);o.autoInsert=!1,o.showPopup(e)}}},y=t("../editor").Editor;t("../config").defineOptions(y.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:f),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:f),this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(t){t?(this.commands.addCommand(d),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(d),this.off("changeMode",p))},value:!1}})})),function(){ace.require(["ace/ext/language_tools"],(function(e){t&&(t.exports=e)}))}()},72375:function(t,e,n){t=n.nmd(t),ace.define("ace/ext/searchbox.css",["require","exports","module"],(function(t,e,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n background-color: #ddd;\n color: #666;\n border: 1px solid #cbcbcb;\n border-top: 0 none;\n overflow: hidden;\n margin: 0;\n padding: 4px 6px 0 4px;\n position: absolute;\n top: 0;\n z-index: 99;\n white-space: normal;\n}\n.ace_search.left {\n border-left: 0 none;\n border-radius: 0px 0px 5px 0px;\n left: 0;\n}\n.ace_search.right {\n border-radius: 0px 0px 0px 5px;\n border-right: 0 none;\n right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n margin: 0 20px 4px 0;\n overflow: hidden;\n line-height: 1.9;\n}\n.ace_replace_form {\n margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n outline: 1px solid red;\n}\n\n.ace_search_field {\n border-radius: 3px 0 0 3px;\n background-color: white;\n color: black;\n border: 1px solid #cbcbcb;\n border-right: 0 none;\n outline: 0;\n padding: 0;\n font-size: inherit;\n margin: 0;\n line-height: inherit;\n padding: 0 6px;\n min-width: 17em;\n vertical-align: top;\n min-height: 1.8em;\n box-sizing: content-box;\n}\n.ace_searchbtn {\n border: 1px solid #cbcbcb;\n line-height: inherit;\n display: inline-block;\n padding: 0 6px;\n background: #fff;\n border-right: 0 none;\n border-left: 1px solid #dcdcdc;\n cursor: pointer;\n margin: 0;\n position: relative;\n color: #666;\n}\n.ace_searchbtn:last-child {\n border-radius: 0 3px 3px 0;\n border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n background: none;\n cursor: default;\n}\n.ace_searchbtn:hover {\n background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n content: "";\n border: solid 2px #888;\n width: 0.5em;\n height: 0.5em;\n border-width: 2px 0 0 2px;\n display:inline-block;\n transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n border-radius: 50%;\n border: 0 none;\n color: #656565;\n cursor: pointer;\n font: 16px/16px Arial;\n padding: 0;\n height: 14px;\n width: 14px;\n top: 9px;\n right: 7px;\n position: absolute;\n}\n.ace_searchbtn_close:hover {\n background-color: #656565;\n background-position: 50% 100%;\n color: white;\n}\n\n.ace_button {\n margin-left: 2px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n opacity: 0.7;\n border: 1px solid rgba(100,100,100,0.23);\n padding: 1px;\n box-sizing: border-box!important;\n color: black;\n}\n\n.ace_button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_button:active {\n background-color: #ddd;\n}\n\n.ace_button.checked {\n border-color: #3399ff;\n opacity:1;\n}\n\n.ace_search_options{\n margin-bottom: 3px;\n text-align: right;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clear: both;\n}\n\n.ace_search_counter {\n float: left;\n font-family: arial;\n padding: 0 8px;\n}'})),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox.css","ace/keyboard/hash_handler","ace/lib/keys"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/lang"),o=t("../lib/event"),s=t("./searchbox.css"),a=t("../keyboard/hash_handler").HashHandler,l=t("../lib/keys"),c=999;i.importCssString(s,"ace_searchbox",!1);var u=function(t,e,n){var r=i.createElement("div");i.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:"Search for",spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},"All"]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:"Replace with",spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},"Replace"],["span",{action:"replaceAll",class:"ace_searchbtn"},"All"]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:"Toggle Replace mode",style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:"RegExp Search"},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:"CaseSensitive Search"},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:"Whole Word Search"},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:"Search In Selection"},"S"]]],r),this.element=r.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(t),i.importCssString(s,"ace_searchbox",t.container)};(function(){this.setEditor=function(t){t.searchBox=this,t.renderer.scroller.appendChild(this.element),this.editor=t},this.setSession=function(t){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOption=t.querySelector("[action=searchInSelection]"),this.replaceOption=t.querySelector("[action=toggleReplace]"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=t.querySelector(".ace_search_counter")},this.$init=function(){var t=this.element;this.$initElements(t);var e=this;o.addListener(t,"mousedown",(function(t){setTimeout((function(){e.activeInput.focus()}),0),o.stopPropagation(t)})),o.addListener(t,"click",(function(t){var n=t.target||t.srcElement,i=n.getAttribute("action");i&&e[i]?e[i]():e.$searchBarKb.commands[i]&&e.$searchBarKb.commands[i].exec(e),o.stopPropagation(t)})),o.addCommandKeyListener(t,(function(t,n,i){var r=l.keyCodeToString(i),s=e.$searchBarKb.findKeyCommand(n,r);s&&s.exec&&(s.exec(e),o.stopEvent(t))})),this.$onChange=r.delayedCall((function(){e.find(!1,!1)})),o.addListener(this.searchInput,"input",(function(){e.$onChange.schedule(20)})),o.addListener(this.searchInput,"focus",(function(){e.activeInput=e.searchInput,e.searchInput.value&&e.highlight()})),o.addListener(this.replaceInput,"focus",(function(){e.activeInput=e.replaceInput,e.searchInput.value&&e.highlight()}))},this.$closeSearchBarKb=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]),this.$searchBarKb=new a,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(t){var e=t.isReplace=!t.isReplace;t.replaceBox.style.display=e?"":"none",t.replaceOption.checked=!1,t.$syncOptions(),t.searchInput.focus()},"Ctrl-H|Command-Option-F":function(t){t.editor.getReadOnly()||(t.replaceOption.checked=!0,t.$syncOptions(),t.replaceInput.focus())},"Ctrl-G|Command-G":function(t){t.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(t){t.findPrev()},esc:function(t){setTimeout((function(){t.hide()}))},Return:function(t){t.activeInput==t.replaceInput&&t.replace(),t.findNext()},"Shift-Return":function(t){t.activeInput==t.replaceInput&&t.replace(),t.findPrev()},"Alt-Return":function(t){t.activeInput==t.replaceInput&&t.replaceAll(),t.findAll()},Tab:function(t){(t.activeInput==t.replaceInput?t.searchInput:t.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(t){t.regExpOption.checked=!t.regExpOption.checked,t.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(t){t.caseSensitiveOption.checked=!t.caseSensitiveOption.checked,t.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(t){t.wholeWordOption.checked=!t.wholeWordOption.checked,t.$syncOptions()}},{name:"toggleReplace",exec:function(t){t.replaceOption.checked=!t.replaceOption.checked,t.$syncOptions()}},{name:"searchInSelection",exec:function(t){t.searchOption.checked=!t.searchRange,t.setSearchRange(t.searchOption.checked&&t.editor.getSelectionRange()),t.$syncOptions()}}]),this.setSearchRange=function(t){this.searchRange=t,t?this.searchRangeMarker=this.editor.session.addMarker(t,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(t){i.setCssClass(this.replaceOption,"checked",this.searchRange),i.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",i.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),i.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),i.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var e=this.editor.getReadOnly();this.replaceOption.style.display=e?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!e?"":"none",this.find(!1,!1,t)},this.highlight=function(t){this.editor.session.highlight(t||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(t,e,n){var r=this.editor.find(this.searchInput.value,{skipCurrent:t,backwards:e,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange}),o=!r&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",o),this.editor._emit("findSearchBox",{match:!o}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var t=this.editor,e=t.$search.$options.re,n=0,i=0;if(e){var r=this.searchRange?t.session.getTextRange(this.searchRange):t.getValue(),o=t.session.doc.positionToIndex(t.selection.anchor);this.searchRange&&(o-=t.session.doc.positionToIndex(this.searchRange.start));var s,a=e.lastIndex=0;while(s=e.exec(r)){if(n++,a=s.index,a<=o&&i++,n>c)break;if(!s[0]&&(e.lastIndex=a+=1,a>=r.length))break}}this.searchCounter.textContent=i+" of "+(n>c?c+"+":n)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var t=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),e=!t&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(t,e){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=e,t&&(this.searchInput.value=t),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var t=document.activeElement;return t==this.searchInput||t==this.replaceInput}}).call(u.prototype),e.SearchBox=u,e.Search=function(t,e){var n=t.searchBox||new u(t);n.show(t.session.getTextRange(),e)}})),function(){ace.require(["ace/ext/searchbox"],(function(e){t&&(t.exports=e)}))}()},71747:function(t,e,n){t=n.nmd(t),function(){ace.require(["ace/mode/text"],(function(e){t&&(t.exports=e)}))}()},40419:function(t,e,n){t=n.nmd(t),ace.define("ace/theme/twilight.css",["require","exports","module"],(function(t,e,n){n.exports='.ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight.css","ace/lib/dom"],(function(t,e,n){e.isDark=!0,e.cssClass="ace-twilight",e.cssText=t("./twilight.css");var i=t("../lib/dom");i.importCssString(e.cssText,e.cssClass,!1)})),function(){ace.require(["ace/theme/twilight"],(function(e){t&&(t.exports=e)}))}()},95095:function(t,e,n){t=n.nmd(t),function(){var t="ace",e=function(){return this}();if(e||"undefined"==typeof window||(e=window),t||"undefined"===typeof requirejs){var n=function(t,e,i){"string"===typeof t?(2==arguments.length&&(i=e),n.modules[t]||(n.payloads[t]=i,n.modules[t]=null)):n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};n.modules={},n.payloads={};var i=function(t,e,n){if("string"===typeof e){var i=s(t,e);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(e)){for(var o=[],a=0,l=e.length;a<l;++a){var c=s(t,e[a]);if(void 0==c&&r.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},r=function(t,e){var n=i("",t,e);return void 0==n&&r.original?r.original.apply(this,arguments):n},o=function(t,e){if(-1!==e.indexOf("!")){var n=e.split("!");return o(t,n[0])+"!"+o(t,n[1])}if("."==e.charAt(0)){var i=t.split("/").slice(0,-1).join("/");e=i+"/"+e;while(-1!==e.indexOf(".")&&r!=e){var r=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return e},s=function(t,e){e=o(t,e);var r=n.modules[e];if(!r){if(r=n.payloads[e],"function"===typeof r){var s={},a={id:e,uri:"",exports:s,packaged:!0},l=function(t,n){return i(e,t,n)},c=r(l,s,a);s=c||a.exports,n.modules[e]=s,delete n.payloads[e]}r=n.modules[e]=s||r}return r};a(t)}function a(t){var i=e;t&&(e[t]||(e[t]={}),i=e[t]),i.define&&i.define.packaged||(n.original=i.define,i.define=n,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(t,e,n){function i(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||i(String.prototype,"startsWith",(function(t,e){return e=e||0,this.lastIndexOf(t,e)===e})),String.prototype.endsWith||i(String.prototype,"endsWith",(function(t,e){var n=this;(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e})),String.prototype.repeat||i(String.prototype,"repeat",(function(t){var e="",n=this;while(t>0)1&t&&(e+=n),(t>>=1)&&(n+=n);return e})),String.prototype.includes||i(String.prototype,"includes",(function(t,e){return-1!=this.indexOf(t,e)})),Object.assign||(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];void 0!==i&&null!==i&&Object.keys(i).forEach((function(t){e[t]=i[t]}))}return e}),Object.values||(Object.values=function(t){return Object.keys(t).map((function(e){return t[e]}))}),Array.prototype.find||i(Array.prototype,"find",(function(t){for(var e=this.length,n=arguments[1],i=0;i<e;i++){var r=this[i];if(t.call(n,r,i,this))return r}})),Array.prototype.findIndex||i(Array.prototype,"findIndex",(function(t){for(var e=this.length,n=arguments[1],i=0;i<e;i++){var r=this[i];if(t.call(n,r,i,this))return i}})),Array.prototype.includes||i(Array.prototype,"includes",(function(t,e){return-1!=this.indexOf(t,e)})),Array.prototype.fill||i(Array.prototype,"fill",(function(t){var e=this,n=e.length>>>0,i=arguments[1],r=i>>0,o=r<0?Math.max(n+r,0):Math.min(r,n),s=arguments[2],a=void 0===s?n:s>>0,l=a<0?Math.max(n+a,0):Math.min(a,n);while(o<l)e[o]=t,o++;return e})),Array.of||i(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(t,e,n){"use strict";t("./es6-shim")})),ace.define("ace/lib/lang",["require","exports","module"],(function(t,e,n){"use strict";e.last=function(t){return t[t.length-1]},e.stringReverse=function(t){return t.split("").reverse().join("")},e.stringRepeat=function(t,e){var n="";while(e>0)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n]&&"object"==typeof t[n]?e[n]=this.copyObject(t[n]):e[n]=t[n];return e},e.deepCopy=function t(e){if("object"!==typeof e||!e)return e;var n;if(Array.isArray(e)){n=[];for(var i=0;i<e.length;i++)n[i]=t(e[i]);return n}if("[object Object]"!==Object.prototype.toString.call(e))return e;for(var i in n={},e)n[i]=t(e[i]);return n},e.arrayToMap=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1;return e},e.createMap=function(t){var e=Object.create(null);for(var n in t)e[n]=t[n];return e},e.arrayRemove=function(t,e){for(var n=0;n<=t.length;n++)e===t[n]&&t.splice(n,1)},e.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(t){return(""+t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},e.getMatchOffsets=function(t,e){var n=[];return t.replace(e,(function(t){n.push({offset:arguments[arguments.length-2],length:t.length})})),n},e.deferredCall=function(t){var e=null,n=function(){e=null,t()},i=function(t){return i.cancel(),e=setTimeout(n,t||0),i};return i.schedule=i,i.call=function(){return this.cancel(),t(),i},i.cancel=function(){return clearTimeout(e),e=null,i},i.isPending=function(){return e},i},e.delayedCall=function(t,e){var n=null,i=function(){n=null,t()},r=function(t){null==n&&(n=setTimeout(i,t||e))};return r.delay=function(t){n&&clearTimeout(n),n=setTimeout(i,t||e)},r.schedule=r,r.call=function(){this.cancel(),t()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}})),ace.define("ace/lib/oop",["require","exports","module"],(function(t,e,n){"use strict";e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},e.implement=function(t,n){e.mixin(t,n)}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(t,e,n){"use strict";e.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},e.getOS=function(){return e.isMac?e.OS.MAC:e.isLinux?e.OS.LINUX:e.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"",s=i.appName||"";e.isWin="win"==r,e.isMac="mac"==r,e.isLinux="linux"==r,e.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=o.match(/ Gecko\/\d+/),e.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),e.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,e.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,e.isAIR=o.indexOf("AdobeAIR")>=0,e.isAndroid=o.indexOf("Android")>=0,e.isChromeOS=o.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,e.isIOS&&(e.isMac=!0),e.isMobile=e.isIOS||e.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(t,e,n){"use strict";var i,r=t("./useragent"),o="http://www.w3.org/1999/xhtml";e.buildDom=function t(e,n,i){if("string"==typeof e&&e){var r=document.createTextNode(e);return n&&n.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&n&&n.appendChild(e),e;if("string"!=typeof e[0]||!e[0]){for(var o=[],s=0;s<e.length;s++){var a=t(e[s],n,i);a&&o.push(a)}return o}var l=document.createElement(e[0]),c=e[1],u=1;c&&"object"==typeof c&&!Array.isArray(c)&&(u=2);for(s=u;s<e.length;s++)t(e[s],l,i);return 2==u&&Object.keys(c).forEach((function(t){var e=c[t];"class"===t?l.className=Array.isArray(e)?e.join(" "):e:"function"==typeof e||"value"==t||"$"==t[0]?l[t]=e:"ref"===t?i&&(i[e]=l):"style"===t?"string"==typeof e&&(l.style.cssText=e):null!=e&&l.setAttribute(t,e)})),n&&n.appendChild(l),l},e.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},e.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||o,t):document.createElement(t)},e.removeChildren=function(t){t.innerHTML=""},e.createTextNode=function(t,e){var n=e?e.ownerDocument:document;return n.createTextNode(t)},e.createFragment=function(t){var e=t?t.ownerDocument:document;return e.createDocumentFragment()},e.hasCssClass=function(t,e){var n=(t.className+"").split(/\s+/g);return-1!==n.indexOf(e)},e.addCssClass=function(t,n){e.hasCssClass(t,n)||(t.className+=" "+n)},e.removeCssClass=function(t,e){var n=t.className.split(/\s+/g);while(1){var i=n.indexOf(e);if(-1==i)break;n.splice(i,1)}t.className=n.join(" ")},e.toggleCssClass=function(t,e){var n=t.className.split(/\s+/g),i=!0;while(1){var r=n.indexOf(e);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(e),t.className=n.join(" "),i},e.setCssClass=function(t,n,i){i?e.addCssClass(t,n):e.removeCssClass(t,n)},e.hasCssString=function(t,e){var n,i=0;if(e=e||document,n=e.querySelectorAll("style"))while(i<n.length)if(n[i++].id===t)return!0},e.removeElementById=function(t,e){e=e||document,e.getElementById(t)&&e.getElementById(t).remove()};var s=[];function a(){var t=s;s=null,t&&t.forEach((function(t){l(t[0],t[1])}))}function l(t,n,r){if("undefined"!=typeof document){if(s)if(r)a();else if(!1===r)return s.push([t,n]);if(!i){var o=r;r&&r.getRootNode?(o=r.getRootNode(),o&&o!=r||(o=document)):o=document;var l=o.ownerDocument||o;if(n&&e.hasCssString(n,o))return null;n&&(t+="\n/*# sourceURL=ace/css/"+n+" */");var c=e.createElement("style");c.appendChild(l.createTextNode(t)),n&&(c.id=n),o==l&&(o=e.getDocumentHead(l)),o.insertBefore(c,o.firstChild)}}}if(e.useStrictCSP=function(t){i=t,0==t?a():s||(s=[])},e.importCssString=l,e.importCssStylsheet=function(t,n){e.buildDom(["link",{rel:"stylesheet",href:t}],e.getDocumentHead(n))},e.scrollbarWidth=function(t){var n=e.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=e.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=t&&t.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),o.removeChild(i),s-a},e.computedStyle=function(t,e){return window.getComputedStyle(t,"")||{}},e.setStyle=function(t,e,n){t[e]!==n&&(t[e]=n)},e.HAS_CSS_ANIMATION=!1,e.HAS_CSS_TRANSFORMS=!1,e.HI_DPI=!r.isWin||"undefined"!==typeof window&&window.devicePixelRatio>=1.5,r.isChromeOS&&(e.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");e.HI_DPI&&void 0!==c.style.transform&&(e.HAS_CSS_TRANSFORMS=!0),r.isEdge||"undefined"===typeof c.style.animationName||(e.HAS_CSS_ANIMATION=!0),c=null}e.HAS_CSS_TRANSFORMS?e.translate=function(t,e,n){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(n)+"px)"}:e.translate=function(t,e,n){t.style.top=Math.round(n)+"px",t.style.left=Math.round(e)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(t,e,n){
|
2
|
+
/*
|
3
|
+
* based on code from:
|
4
|
+
*
|
5
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
6
|
+
* Available via the MIT or new BSD license.
|
7
|
+
* see: http://github.com/jrburke/requirejs for details
|
8
|
+
*/
|
9
|
+
"use strict";var i=t("./dom");e.get=function(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onreadystatechange=function(){4===n.readyState&&e(n.responseText)},n.send(null)},e.loadScript=function(t,e){var n=i.getDocumentHead(),r=document.createElement("script");r.src=t,n.appendChild(r),r.onload=r.onreadystatechange=function(t,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||e())}},e.qualifyURL=function(t){var e=document.createElement("a");return e.href=t,e.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(t,e,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(t,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[t]||[],i=this._defaultHandlers[t];if(n.length||i){"object"==typeof e&&e||(e={}),e.type||(e.type=t),e.stopPropagation||(e.stopPropagation=r),e.preventDefault||(e.preventDefault=o),n=n.slice();for(var s=0;s<n.length;s++)if(n[s](e,this),e.propagationStopped)break;return i&&!e.defaultPrevented?i(e,this):void 0}},i._signal=function(t,e){var n=(this._eventRegistry||{})[t];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](e,this)}},i.once=function(t,e){var n=this;if(this.on(t,(function i(){n.off(t,i),e.apply(null,arguments)})),!e)return new Promise((function(t){e=t}))},i.setDefaultHandler=function(t,e){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[t]){var i=n[t],r=n._disabled_[t];r||(n._disabled_[t]=r=[]),r.push(i);var o=r.indexOf(e);-1!=o&&r.splice(o,1)}n[t]=e},i.removeDefaultHandler=function(t,e){var n=this._defaultHandlers;if(n){var i=n._disabled_[t];if(n[t]==e)i&&this.setDefaultHandler(t,i.pop());else if(i){var r=i.indexOf(e);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(t,e,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[t];return i||(i=this._eventRegistry[t]=[]),-1==i.indexOf(e)&&i[n?"unshift":"push"](e),e},i.off=i.removeListener=i.removeEventListener=function(t,e){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[t];if(n){var i=n.indexOf(e);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(t){t||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[t]=void 0),this._defaultHandlers&&(this._defaultHandlers[t]=void 0)},e.EventEmitter=i})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){var i=t("./oop"),r=t("./event_emitter").EventEmitter,o={setOptions:function(t){Object.keys(t).forEach((function(e){this.setOption(e,t[e])}),this)},getOptions:function(t){var e={};if(t)Array.isArray(t)||(e=t,t=Object.keys(e));else{var n=this.$options;t=Object.keys(n).filter((function(t){return!n[t].hidden}))}return t.forEach((function(t){e[t]=this.getOption(t)}),this),e},setOption:function(t,e){if(this["$"+t]!==e){var n=this.$options[t];if(!n)return s('misspelled option "'+t+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(t,e);n.handlesSet||(this["$"+t]=e),n&&n.set&&n.set.call(this,e)}},getOption:function(t){var e=this.$options[t];return e?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].getOption(t):e&&e.get?e.get.call(this):this["$"+t]:s('misspelled option "'+t+'"')}};function s(t){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(t,e){var n=new Error(t);n.data=e,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))}var l=function(){this.$defaultOptions={}};(function(){i.implement(this,r),this.defineOptions=function(t,e,n){return t.$options||(this.$defaultOptions[e]=t.$options={}),Object.keys(n).forEach((function(e){var i=n[e];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=e),t.$options[i.name]=i,"initialValue"in i&&(t["$"+i.name]=i.initialValue)})),i.implement(t,o),this},this.resetOptions=function(t){Object.keys(t.$options).forEach((function(e){var n=t.$options[e];"value"in n&&t.setOption(e,n.value)}))},this.setDefaultValue=function(t,e,n){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][e])break;if(!this.$defaultOptions[t][e])return!1}var i=this.$defaultOptions[t]||(this.$defaultOptions[t]={});i[e]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,e,n):i[e].value=n)},this.setDefaultValues=function(t,e){Object.keys(e).forEach((function(n){this.setDefaultValue(t,n,e[n])}),this)},this.warn=s,this.reportError=a}).call(l.prototype),e.AppConfig=l})),ace.define("ace/theme/textmate.css",["require","exports","module"],(function(t,e,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],(function(t,e,n){"use strict";e.isDark=!1,e.cssClass="ace-tm",e.cssText=t("./textmate.css"),e.$id="ace/theme/textmate";var i=t("../lib/dom");i.importCssString(e.cssText,e.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(t,e,n){var i=t("./lib/lang"),r=(t("./lib/oop"),t("./lib/net")),o=t("./lib/dom"),s=t("./lib/app_config").AppConfig;n.exports=e=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};e.get=function(t){if(!a.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return a[t]},e.set=function(t,e){if(a.hasOwnProperty(t))a[t]=e;else if(0==this.setDefaultValue("",t,e))throw new Error("Unknown config key: "+t);"useStrictCSP"==t&&o.useStrictCSP(e)},e.all=function(){return i.copyObject(a)},e.$modes={},e.moduleUrl=function(t,e){if(a.$moduleUrls[t])return a.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var i="snippets"==e?"/":"-",r=n[n.length-1];if("worker"==e&&"-"==i){var o=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");r=r.replace(o,"")}(!r||r==e)&&n.length>1&&(r=n[n.length-2]);var s=a[e+"Path"];return null==s?s=a.basePath:"/"==i&&(e=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+e+i+r+this.get("suffix")},e.setModuleUrl=function(t,e){return a.$moduleUrls[t]=e};var l=function(e,n){return"ace/theme/textmate"==e?n(null,t("./theme/textmate")):console.error("loader is not configured")};e.setLoader=function(t){l=t},e.$loading={},e.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=t(n)}catch(u){}if(o&&!e.$loading[n])return i&&i(o);if(e.$loading[n]||(e.$loading[n]=[]),e.$loading[n].push(i),!(e.$loading[n].length>1)){var a=function(){l(n,(function(t,i){e._emit("load.module",{name:n,module:i});var r=e.$loading[n];e.$loading[n]=null,r.forEach((function(t){t&&t(i)}))}))};if(!e.get("packaged"))return a();r.loadScript(e.moduleUrl(n,s),a),c()}};var c=function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};e.version="1.13.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(t,e,i){"use strict";t("./lib/fixoldbrowsers");var r=t("./config");r.setLoader((function(e,n){t([e],(function(t){n(null,t)}))}));var o=function(){return this||"undefined"!=typeof window&&window}();function s(e){if(o&&o.document){r.set("packaged",e||t.packaged||i.packaged||o.define&&n.amdD.packaged);for(var s={},l="",c=document.currentScript||document._currentScript,u=c&&c.ownerDocument||document,h=u.getElementsByTagName("script"),f=0;f<h.length;f++){var d=h[f],p=d.src||d.getAttribute("src");if(p){for(var g=d.attributes,m=0,v=g.length;m<v;m++){var y=g[m];0===y.name.indexOf("data-ace-")&&(s[a(y.name.replace(/^data-ace-/,""))]=y.value)}var w=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);w&&(l=w[1])}}for(var b in l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)"undefined"!==typeof s[b]&&r.set(b,s[b])}}function a(t){return t.replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}i.exports=function(e){r.init=s,e.require=t,e.define=n.amdD},s(!0)})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(t,e,n){
|
10
|
+
/*! @license
|
11
|
+
==========================================================================
|
12
|
+
SproutCore -- JavaScript Application Framework
|
13
|
+
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
|
14
|
+
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
16
|
+
copy of this software and associated documentation files (the "Software"),
|
17
|
+
to deal in the Software without restriction, including without limitation
|
18
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
19
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
20
|
+
Software is furnished to do so, subject to the following conditions:
|
21
|
+
|
22
|
+
The above copyright notice and this permission notice shall be included in
|
23
|
+
all copies or substantial portions of the Software.
|
24
|
+
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
30
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
31
|
+
DEALINGS IN THE SOFTWARE.
|
32
|
+
|
33
|
+
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
|
34
|
+
|
35
|
+
For more information about SproutCore, visit http://www.sproutcore.com
|
36
|
+
|
37
|
+
|
38
|
+
==========================================================================
|
39
|
+
@license */
|
40
|
+
"use strict";var i=t("./oop"),r=function(){var t,e,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(e in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);for(e in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)n.KEY_MODS[e]=t.filter((function(t){return e&n.KEY_MODS[t]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(e,r),e.keyCodeToString=function(t){var e=r[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i,r=t("./keys"),o=t("./useragent"),s=null,a=0;function l(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(t){}}function c(){return void 0==i&&l(),i}function u(t,e,n){this.elem=t,this.type=e,this.callback=n}u.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=e.addListener=function(t,e,n,i){t.addEventListener(e,n,c()),i&&i.$toDestroy.push(new u(t,e,n))},f=e.removeListener=function(t,e,n){t.removeEventListener(e,n,c())};e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation&&t.stopPropagation()},e.preventDefault=function(t){t.preventDefault&&t.preventDefault()},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||o.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.button},e.capture=function(t,e,n){var i=t&&t.ownerDocument||document;function r(t){e&&e(t),n&&n(t),f(i,"mousemove",e),f(i,"mouseup",r),f(i,"dragstart",r)}return h(i,"mousemove",e),h(i,"mouseup",r),h(i,"dragstart",r),r},e.addMouseWheelListener=function(t,e,n){h(t,"wheel",(function(t){var n=.15,i=t.deltaX||0,r=t.deltaY||0;switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=i*n,t.wheelY=r*n;break;case t.DOM_DELTA_LINE:var o=15;t.wheelX=i*o,t.wheelY=r*o;break;case t.DOM_DELTA_PAGE:var s=150;t.wheelX=i*s,t.wheelY=r*s;break}e(t)}),n)},e.addMultiMouseDownListener=function(t,n,i,r,s){var a,l,c,u=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function d(t){if(0!==e.getButton(t)?u=0:t.detail>1?(u++,u>4&&(u=1)):u=1,o.isIE){var s=Math.abs(t.clientX-a)>5||Math.abs(t.clientY-l)>5;c&&!s||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=t.clientX,l=t.clientY)}if(t._clicks=u,i[r]("mousedown",t),u>4)u=0;else if(u>1)return i[r](f[u],t)}Array.isArray(t)||(t=[t]),t.forEach((function(t){h(t,"mousedown",d,s)}))};var d=function(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function p(t,e,n){var i=d(e);if(!o.isMac&&s){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in e?e.location:e.keyLocation;if(17===n&&1===l)1==s[n]&&(a=e.timeStamp);else if(18===n&&3===i&&2===l){var c=e.timeStamp-a;c<50&&(s.altGr=!0)}}}if(n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n){l="location"in e?e.location:e.keyLocation;if(3===l&&(t(e,i,-n),e.defaultPrevented))return}if(o.isChromeOS&&8&i){if(t(e,i,n),e.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&t(e,i,n)}function g(){s=Object.create(null)}if(e.getModifierString=function(t){return r.KEY_MODS[d(t)]},e.addCommandKeyListener=function(t,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;h(t,"keydown",(function(t){r=t.keyCode}),i),h(t,"keypress",(function(t){return p(n,t,r)}),i)}else{var a=null;h(t,"keydown",(function(t){s[t.keyCode]=(s[t.keyCode]||0)+1;var e=p(n,t,t.keyCode);return a=t.defaultPrevented,e}),i),h(t,"keypress",(function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),a=null)}),i),h(t,"keyup",(function(t){s[t.keyCode]=null}),i),s||(g(),h(window,"focus",g))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;e.nextTick=function(t,n){n=n||window;var i="zero-timeout-message-"+m++,r=function(o){o.data==i&&(e.stopPropagation(o),f(n,"message",r),t())};h(n,"message",r),n.postMessage(i,"*")}}e.$idleBlocked=!1,e.onIdle=function(t,n){return setTimeout((function n(){e.$idleBlocked?setTimeout(n,100):t()}),n)},e.$idleBlockId=null,e.blockIdle=function(t){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout((function(){e.$idleBlocked=!1}),t||100)},e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(t){setTimeout(t,17)}})),ace.define("ace/range",["require","exports","module"],(function(t,e,n){"use strict";var i=function(t,e){return t.row-e.row||t.column-e.column},r=function(t,e,n,i){this.start={row:t,column:e},this.end={row:n,column:i}};(function(){this.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(t,e){return 0==this.compare(t,e)},this.compareRange=function(t){var e,n=t.end,i=t.start;return e=this.compare(n.row,n.column),1==e?(e=this.compare(i.row,i.column),1==e?2:0==e?1:0):-1==e?-2:(e=this.compare(i.row,i.column),-1==e?-1:1==e?42:0)},this.comparePoint=function(t){return this.compare(t.row,t.column)},this.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},this.intersects=function(t){var e=this.compareRange(t);return-1==e||0==e||1==e},this.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},this.isStart=function(t,e){return this.start.row==t&&this.start.column==e},this.setStart=function(t,e){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},this.setEnd=function(t,e){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},this.inside=function(t,e){return 0==this.compare(t,e)&&(!this.isEnd(t,e)&&!this.isStart(t,e))},this.insideStart=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)},this.insideEnd=function(t,e){return 0==this.compare(t,e)&&!this.isStart(t,e)},this.compare=function(t,e){return this.isMultiLine()||t!==this.start.row?t<this.start.row?-1:t>this.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0:e<this.start.column?-1:e>this.end.column?1:0},this.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},this.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.clipRows=function(t,e){if(this.end.row>e)var n={row:e+1,column:0};else if(this.end.row<t)n={row:t,column:0};if(this.start.row>e)var i={row:e+1,column:0};else if(this.start.row<t)i={row:t,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(t,e){var n=this.compare(t,e);if(0==n)return this;if(-1==n)var i={row:t,column:e};else var o={row:t,column:e};return r.fromPoints(i||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(t){var e=t.documentToScreenPosition(this.start),n=t.documentToScreenPosition(this.end);return new r(e.row,e.column,n.row,n.column)},this.moveBy=function(t,e){this.start.row+=t,this.start.column+=e,this.end.row+=t,this.end.column+=e}}).call(r.prototype),r.fromPoints=function(t,e){return new r(t.row,t.column,e.row,e.column)},r.comparePoints=i,r.comparePoints=function(t,e){return t.row-e.row||t.column-e.column},e.Range=r})),ace.define("ace/clipboard",["require","exports","module"],(function(t,e,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=t("../lib/dom"),s=t("../lib/lang"),a=t("../clipboard"),l=r.isChrome<18,c=r.isIE,u=r.isChrome>63,h=400,f=t("../lib/keys"),d=f.KEY_MODS,p=r.isIOS,g=p?/\s/:/\n/,m=r.isMobile,v=function(t,e){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",t.insertBefore(n,t.firstChild);var v=!1,y=!1,w=!1,b=!1,_="";m||(n.style.fontSize="1px");var S=!1,x=!1,C="",k=0,A=0,$=0;try{var R=document.activeElement===n}catch(Z){}i.addListener(n,"blur",(function(t){x||(e.onBlur(t),R=!1)}),e),i.addListener(n,"focus",(function(t){if(!x){if(R=!0,r.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),r.isEdge?setTimeout(T):T()}}),e),this.$focusScroll=!1,this.focus=function(){if(_||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var t=n.style.top;n.style.position="fixed",n.style.top="0px";try{var e=0!=n.getBoundingClientRect().top}catch(Z){return}var i=[];if(e){var r=n.parentElement;while(r&&1==r.nodeType)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement}n.focus({preventScroll:!0}),e&&i.forEach((function(t){t.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=t)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return R},e.on("beforeEndOperation",(function(){var t=e.curOp,i=t&&t.command&&t.command.name;if("insertstring"!=i){var r=i&&(t.docChanged||t.selectionChanged);w&&r&&(C=n.value="",U()),T()}}));var T=p?function(t){if(R&&(!v||t)&&!b){t||(t="");var i="\n ab"+t+"cde fg\n";i!=n.value&&(n.value=C=i);var r=4,o=4+(t.length||(e.selection.isEmpty()?0:1));k==r&&A==o||n.setSelectionRange(r,o),k=r,A=o}}:function(){if(!w&&!b&&(R||O)){w=!0;var t=0,i=0,r="";if(e.session){var o=e.selection,s=o.getRange(),a=o.cursor.row;if(t=s.start.column,i=s.end.column,r=e.session.getLine(a),s.start.row!=a){var l=e.session.getLine(a-1);t=s.start.row<a-1?0:t,i+=l.length+1,r=l+"\n"+r}else if(s.end.row!=a){var c=e.session.getLine(a+1);i=s.end.row>a+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,t+=1);r.length>h&&(t<h&&i<h?r=r.slice(0,h):(r="\n",t==i?t=i=0:(t=0,i=1)))}var u=r+"\n\n";if(u!=C&&(n.value=C=u,k=A=u.length),O&&(k=n.selectionStart,A=n.selectionEnd),A!=i||k!=t||n.selectionEnd!=A)try{n.setSelectionRange(t,i),k=t,A=i}catch(Z){}w=!1}};this.resetSelection=T,R&&e.onFocus();var E=function(t){return 0===t.selectionStart&&t.selectionEnd>=C.length&&t.value===C&&C&&t.selectionEnd!==A},L=function(t){w||(v?v=!1:E(n)?(e.selectAll(),T()):m&&n.selectionStart!=k&&T())},M=null;this.setInputHandler=function(t){M=t},this.getInputHandler=function(){return M};var O=!1,D=function(t,i){if(O&&(O=!1),y)return T(),t&&e.onPaste(t),y=!1,"";var o=n.selectionStart,s=n.selectionEnd,a=k,l=C.length-A,c=t,u=t.length-o,h=t.length-s,f=0;while(a>0&&C[f]==t[f])f++,a--;c=c.slice(f),f=1;while(l>0&&C.length-f>k-1&&C[C.length-f]==t[t.length-f])f++,l--;u-=f-1,h-=f-1;var d=c.length-f+1;if(d<0&&(a=-d,d=0),c=c.slice(0,d),!i&&!c&&!u&&!a&&!l&&!h)return"";b=!0;var p=!1;return r.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!h||S?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),b=!1,C=t,k=o,A=s,$=h,p?"\n":c},P=function(t){if(w)return j();if(t&&t.inputType){if("historyUndo"==t.inputType)return e.execCommand("undo");if("historyRedo"==t.inputType)return e.execCommand("redo")}var i=n.value,r=D(i,!0);(i.length>h+100||g.test(r)||m&&k<1&&k==A)&&T()},I=function(t,e,n){var i=t.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return e?!1!==i.setData(r,e):i.getData(r)}catch(t){if(!n)return I(t,e,!0)}}},F=function(t,r){var o=e.getCopyText();if(!o)return i.preventDefault(t);I(t,o)?(p&&(T(o),v=o,setTimeout((function(){v=!1}),10)),r?e.onCut():e.onCopy(),i.preventDefault(t)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,T(),r?e.onCut():e.onCopy()})))},W=function(t){F(t,!0)},B=function(t){F(t,!1)},H=function(t){var o=I(t);a.pasteCancelled()||("string"==typeof o?(o&&e.onPaste(o,t),r.isIE&&setTimeout(T),i.preventDefault(t)):(n.value="",y=!0))};i.addCommandKeyListener(n,e.onCommandKey.bind(e),e),i.addListener(n,"select",L,e),i.addListener(n,"input",P,e),i.addListener(n,"cut",W,e),i.addListener(n,"copy",B,e),i.addListener(n,"paste",H,e),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(t,"keydown",(function(t){if((!r.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:B(t);break;case 86:H(t);break;case 88:W(t);break}}),e);var N=function(t){if(!w&&e.onCompositionStart&&!e.$readOnly&&(w={},!S)){t.data&&(w.useTextareaForIME=!1),setTimeout(j,0),e._signal("compositionStart"),e.on("mousedown",z);var i=e.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,w.markerRange=i,w.selectionStart=k,e.onCompositionStart(w),w.useTextareaForIME?(C=n.value="",k=0,A=0):(n.msGetInputContext&&(w.context=n.msGetInputContext()),n.getInputContext&&(w.context=n.getInputContext()))}},j=function(){if(w&&e.onCompositionUpdate&&!e.$readOnly){if(S)return z();if(w.useTextareaForIME)e.onCompositionUpdate(n.value);else{var t=n.value;D(t),w.markerRange&&(w.context&&(w.markerRange.start.column=w.selectionStart=w.context.compositionStartOffset),w.markerRange.end.column=w.markerRange.start.column+A-w.selectionStart+$)}}},U=function(t){e.onCompositionEnd&&!e.$readOnly&&(w=!1,e.onCompositionEnd(),e.off("mousedown",z),t&&P())};function z(){x=!0,n.blur(),n.focus(),x=!1}var G,V=s.delayedCall(j,50).schedule.bind(null,null);function q(t){27==t.keyCode&&n.value.length<n.selectionStart&&(w||(C=n.value),k=A=-1,T()),V()}function Y(){clearTimeout(G),G=setTimeout((function(){_&&(n.style.cssText=_,_=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",N,e),i.addListener(n,"compositionupdate",j,e),i.addListener(n,"keyup",q,e),i.addListener(n,"keydown",V,e),i.addListener(n,"compositionend",U,e),this.getElement=function(){return n},this.setCommandMode=function(t){S=t,n.readOnly=!1},this.setReadOnly=function(t){S||(n.readOnly=t)},this.setCopyWithEmptySelection=function(t){},this.onContextMenu=function(t){O=!0,T(),e._emit("nativecontextmenu",{target:e,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,s){_||(_=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+(r.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+A)*e.renderer.characterWidth*.5+"px;";var a=e.container.getBoundingClientRect(),l=o.computedStyle(e.container),c=a.top+(parseInt(l.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-c-n.clientHeight-2,f=function(t){o.translate(n,t.clientX-u-2,Math.min(t.clientY-c-2,h))};f(t),"mousedown"==t.type&&(e.renderer.$isMousePressed=!0,clearTimeout(G),r.isWin&&i.capture(e.container,f,Y))},this.onContextMenuClose=Y;var K=function(t){e.textInput.onContextMenu(t),Y()};function X(t,e,n){var i=null,r=!1;n.addEventListener("keydown",(function(t){i&&clearTimeout(i),r=!0}),!0),n.addEventListener("keyup",(function(t){i=setTimeout((function(){r=!1}),100)}),!0);var o=function(t){if(document.activeElement===n&&!(r||w||e.$mouseHandler.isMousePressed)&&!v){var i=n.selectionStart,o=n.selectionEnd,s=null,a=0;if(0==i?s=f.up:1==i?s=f.home:o>A&&"\n"==C[o]?s=f.end:i<k&&" "==C[i-1]?(s=f.left,a=d.option):i<k||i==k&&A!=k&&i==o?s=f.left:o>A&&C.slice(0,o).split("\n").length>2?s=f.down:o>A&&" "==C[o-1]?(s=f.right,a=d.option):(o>A||o==A&&A!=k&&i==o)&&(s=f.right),i!==o&&(a|=d.shift),s){var l=e.onCommandKey({},a,s);if(!l&&e.commands){s=f.keyCodeToString(s);var c=e.commands.findKeyCommand(a,s);c&&e.execCommand(c)}k=i,A=o,T("")}}};document.addEventListener("selectionchange",o),e.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}i.addListener(n,"mouseup",K,e),i.addListener(n,"mousedown",(function(t){t.preventDefault(),Y()}),e),i.addListener(e.renderer.scroller,"contextmenu",K,e),i.addListener(n,"contextmenu",K,e),p&&X(t,e,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}};e.TextInput=v,e.$setUserAgentForTests=function(t,e){m=t,p=e}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/useragent"),r=0,o=550;function s(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach((function(e){t[e]=this[e]}),this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function a(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}function l(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else if(t.start.row!=t.end.row-1||t.start.column||t.end.column)n=2*e.row-t.start.row-t.end.row;else var n=e.column-4;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}(function(){this.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,o=t.getButton();if(0!==o){var s=r.getSelectionRange(),a=s.isEmpty();return(a||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(t.domEvent),i.isMozilla||t.preventDefault()))}return this.mousedownEvent.time=Date.now(),!e||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t))},this.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(t):e||n.selection.moveToPosition(t),e||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var r=l(this.$clickSelection,n);n=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[t](i.row,i.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==o&&s<=0)e=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==s&&o>=0)e=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==o&&1==s)i=r.end,e=r.start;else{var a=l(this.$clickSelection,i);i=a.cursor,e=a.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var t=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),e=Date.now();(t>r||e-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session,r=i.getBracketRange(e);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=t.domEvent.timeStamp,r=i-n.t,s=r?t.wheelX/r:n.vx,a=r?t.wheelY/r:n.vy;r<o&&(s=(s+n.vx)/2,a=(a+n.vy)/2);var l=Math.abs(s/a),c=!1;if(l>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(c=!0),l<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(c=!0),c)n.allowed=i;else if(i-n.allowed<o){var u=Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy);u?(c=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=s,n.vy=a,c?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}}}).call(s.prototype),e.DefaultHandlers=s})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(t,e,n){"use strict";t("./lib/oop");var i=t("./lib/dom"),r="ace_tooltip";function o(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(t){this.getElement().textContent=t},this.setHtml=function(t){this.getElement().innerHTML=t},this.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},this.setClassName=function(t){i.addCssClass(this.getElement(),t)},this.show=function(t,e,n){null!=t&&this.setText(t),null!=e&&null!=n&&this.setPosition(e,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),e.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/event"),s=t("../tooltip").Tooltip;function a(t){var e,n,r,s=t.editor,a=s.renderer.$gutterLayer,c=new l(s.container);function u(){var e=n.getDocumentPosition().row,i=a.$annotations[e];if(!i)return h();var o=s.session.getLength();if(e==o){var l=s.renderer.pixelToScreenCoordinates(0,n.y).row,u=n.$pos;if(l>s.session.documentToScreenRow(u.row,u.column))return h()}if(r!=i){r=i.text.join("<br/>"),c.setHtml(r);var d=i.className;if(d&&c.setClassName(d.trim()),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",h),t.$tooltipFollowsMouse)f(n);else{var p=n.domEvent.target,g=p.getBoundingClientRect(),m=c.getElement().style;m.left=g.right+"px",m.top=g.bottom+"px"}}}function h(){e&&(e=clearTimeout(e)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",h))}function f(t){c.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",(function(e){if(s.isFocused()&&0==e.getButton()){var n=a.getRegion(e);if("foldWidgets"!=n){var i=e.getDocumentPosition().row,r=s.session.selection;if(e.getShiftKey())r.selectTo(i,0);else{if(2==e.domEvent.detail)return s.selectAll(),e.preventDefault();t.$clickSelection=s.selection.getLineRange(i)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}}})),t.editor.setDefaultHandler("guttermousemove",(function(o){var s=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(s,"ace_fold-widget"))return h();r&&t.$tooltipFollowsMouse&&f(o),n=o,e||(e=setTimeout((function(){e=null,n&&!t.isMousePressed?u():h()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(t){n=null,r&&!e&&(e=setTimeout((function(){e=null,h()}),50))}),s),s.on("changeSession",h)}function l(t){s.call(this,t)}r.inherits(l,s),function(){this.setPosition=function(t,e){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,e+=15,t+r>n&&(t-=t+r-n),e+o>i&&(e-=20+o),s.prototype.setPosition.call(this,t,e)}}.call(l.prototype),e.GutterHandler=a})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=e.MouseEvent=function(t,e){this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor,e=t.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=e.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/event"),o=t("../lib/useragent"),s=200,a=200,l=5;function c(t){var e=t.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach((function(e){t[e]=this[e]}),this),e.on("mousedown",this.onMouseDown.bind(t));var h,f,d,p,g,m,v,y,w,b,_,S=e.container,x=0;function C(t,n){var i=Date.now(),r=!n||t.row!=n.row,o=!n||t.column!=n.column;if(!b||r||o)e.moveCursorToPosition(t),b=i,_={x:f,y:d};else{var s=u(_.x,_.y,f,d);s>l?b=null:i-b>=a&&(e.renderer.scrollCursorIntoView(),b=null)}}function k(t,n){var i=Date.now(),r=e.renderer.layerConfig.lineHeight,o=e.renderer.layerConfig.characterWidth,a=e.renderer.scroller.getBoundingClientRect(),l={x:{left:f-a.left,right:a.right-f},y:{top:d-a.top,bottom:a.bottom-d}},c=Math.min(l.x.left,l.x.right),u=Math.min(l.y.top,l.y.bottom),h={row:t.row,column:t.column};c/o<=2&&(h.column+=l.x.left<l.x.right?-3:2),u/r<=1&&(h.row+=l.y.top<l.y.bottom?-1:1);var p=t.row!=h.row,g=t.column!=h.column,m=!n||t.row!=n.row;p||g&&!m?w?i-w>=s&&e.renderer.scrollCursorIntoView(h):w=i:w=null}function A(){var t=m;m=e.renderer.screenToTextCoordinates(f,d),C(m,t),k(m,t)}function $(){g=e.selection.toOrientedRange(),h=e.session.addMarker(g,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(p),A(),p=setInterval(A,20),x=0,r.addListener(document,"mousemove",E)}function R(){clearInterval(p),e.session.removeMarker(h),h=null,e.selection.fromOrientedRange(g),e.isFocused()&&!y&&e.$resetCursorStyle(),g=null,m=null,x=0,w=null,b=null,r.removeListener(document,"mousemove",E)}this.onDragStart=function(t){if(this.cancelDrag||!S.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(t)}),0),t.preventDefault()}g=e.getSelectionRange();var r=t.dataTransfer;r.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){e.container.removeChild(n)})),r.clearData(),r.setData("Text",e.session.getTextRange()),y=!0,this.setState("drag")},this.onDragEnd=function(t){if(S.draggable=!1,y=!1,this.setState(null),!e.getReadOnly()){var n=t.dataTransfer.dropEffect;v||"move"!=n||e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!e.getReadOnly()&&L(t.dataTransfer))return f=t.clientX,d=t.clientY,h||$(),x++,t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&L(t.dataTransfer))return f=t.clientX,d=t.clientY,h||($(),x++),null!==T&&(T=null),t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragLeave=function(t){if(x--,x<=0&&h)return R(),v=null,r.preventDefault(t)},this.onDrop=function(t){if(m){var n=t.dataTransfer;if(y)switch(v){case"move":g=g.contains(m.row,m.column)?{start:m,end:m}:e.moveText(g,m);break;case"copy":g=e.moveText(g,m,!0);break}else{var i=n.getData("Text");g={start:m,end:e.session.insert(m,i)},e.focus(),v=null}return R(),r.preventDefault(t)}},r.addListener(S,"dragstart",this.onDragStart.bind(t),e),r.addListener(S,"dragend",this.onDragEnd.bind(t),e),r.addListener(S,"dragenter",this.onDragEnter.bind(t),e),r.addListener(S,"dragover",this.onDragOver.bind(t),e),r.addListener(S,"dragleave",this.onDragLeave.bind(t),e),r.addListener(S,"drop",this.onDrop.bind(t),e);var T=null;function E(){null==T&&(T=setTimeout((function(){null!=T&&h&&R()}),20))}function L(t){var e=t.types;return!e||Array.prototype.some.call(e,(function(t){return"text/plain"==t||"Text"==t}))}function M(t){var e=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=o.isMac?t.altKey:t.ctrlKey,r="uninitialized";try{r=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var s="none";return i&&e.indexOf(r)>=0?s="copy":n.indexOf(r)>=0?s="move":e.indexOf(r)>=0&&(s="copy"),s}}function u(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var n=o.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(o.isIE&&"dragReady"==this.state){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if("dragWait"===this.state){n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),i=t.getButton(),r=t.domEvent.detail||1;if(1===r&&0===i&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in s&&(s.unselectable="on"),e.getDragDelay()){if(o.isWebKit){this.cancelDrag=!0;var a=e.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(c.prototype),e.DragdropHandler=c})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("./mouse_event").MouseEvent,r=t("../lib/event"),o=t("../lib/dom");e.addTouchListeners=function(t,e){var n,s,a,l,c,u,h,f,d,p="scroll",g=0,m=0,v=0,y=0;function w(){var t=window.navigator&&window.navigator.clipboard,n=!1,i=function(){var i=e.getCopyText(),r=e.session.getUndoManager().hasUndo();d.replaceChild(o.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],t&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],r&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),d.firstChild)},r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,i();"paste"==o?t.readText().then((function(t){e.execCommand(o,t)})):o&&("cut"!=o&&"copy"!=o||(t?t.writeText(e.getCopyText()):document.execCommand("copy")),e.execCommand(o)),d.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&e.focus()};d=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){p="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),r(t)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container)}function b(){d||w();var t=e.selection.cursor,n=e.renderer.textToScreenCoordinates(t.row,t.column),i=e.renderer.textToScreenCoordinates(0,0).pageX,r=e.renderer.scrollLeft,o=e.container.getBoundingClientRect();d.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(d.style.left="",d.style.right="10px"):(d.style.right="",d.style.left=i+r-o.left+"px"),d.style.display="",d.firstChild.style.display="none",e.on("input",_)}function _(t){d&&(d.style.display="none"),e.off("input",_)}function S(){c=null,clearTimeout(c);var t=e.selection.getRange(),n=t.contains(h.row,h.column);!t.isEmpty()&&n||(e.selection.moveToPosition(h),e.selection.selectWord()),p="wait",b()}function x(){c=null,clearTimeout(c),e.selection.moveToPosition(h);var t=m>=2?e.selection.getLineRange(h.row):e.session.getBracketRange(h);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),p="wait"}function C(){g+=60,u=setInterval((function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*v,10*y),t==e.session.getScrollTop()&&(g=0)}),10)}r.addListener(t,"contextmenu",(function(t){if(f){var n=e.textInput.getElement();n.focus()}}),e),r.addListener(t,"touchstart",(function(t){var r=t.touches;if(c||r.length>1)return clearTimeout(c),c=null,a=-1,void(p="zoom");f=e.$mouseHandler.isMousePressed=!0;var o=e.renderer.layerConfig.lineHeight,u=e.renderer.layerConfig.lineHeight,d=t.timeStamp;l=d;var w=r[0],b=w.clientX,_=w.clientY;Math.abs(n-b)+Math.abs(s-_)>o&&(a=-1),n=t.clientX=b,s=t.clientY=_,v=y=0;var C=new i(t,e);if(h=C.getDocumentPosition(),d-a<500&&1==r.length&&!g)m++,t.preventDefault(),t.button=0,x();else{m=0;var k=e.selection.cursor,A=e.selection.isEmpty()?k:e.selection.anchor,$=e.renderer.$cursorLayer.getPixelPosition(k,!0),R=e.renderer.$cursorLayer.getPixelPosition(A,!0),T=e.renderer.scroller.getBoundingClientRect(),E=e.renderer.layerConfig.offset,L=e.renderer.scrollLeft,M=function(t,e){return t/=u,e=e/o-.75,t*t+e*e};if(t.clientX<T.left)return void(p="zoom");var O=M(t.clientX-T.left-$.left+L,t.clientY-T.top-$.top+E),D=M(t.clientX-T.left-R.left+L,t.clientY-T.top-R.top+E);O<3.5&&D<3.5&&(p=O>D?"cursor":"anchor"),p=D<3.5?"anchor":O<3.5?"cursor":"scroll",c=setTimeout(S,450)}a=d}),e),r.addListener(t,"touchend",(function(t){f=e.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",g=0):c?(e.selection.moveToPosition(h),g=0,b()):"scroll"==p?(C(),_()):b(),clearTimeout(c),c=null}),e),r.addListener(t,"touchmove",(function(t){c&&(clearTimeout(c),c=null);var r=t.touches;if(!(r.length>1||"zoom"==p)){var o=r[0],a=n-o.clientX,u=s-o.clientY;if("wait"==p){if(!(a*a+u*u>4))return t.preventDefault();p="cursor"}n=o.clientX,s=o.clientY,t.clientX=o.clientX,t.clientY=o.clientY;var h=t.timeStamp,f=h-l;if(l=h,"scroll"==p){var d=new i(t,e);d.speed=1,d.wheelX=a,d.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=f&&(v=a/f,y=u/f),e._emit("mousewheel",d),d.propagationStopped||(v=y=0)}else{var g=new i(t,e),m=g.getDocumentPosition();"cursor"==p?e.selection.moveCursorToPosition(m):"anchor"==p&&e.selection.setSelectionAnchor(m.row,m.column),e.renderer.scrollCursorIntoView(m),t.preventDefault()}}}),e)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=t("./default_handlers").DefaultHandlers,s=t("./default_gutter_handler").GutterHandler,a=t("./mouse_event").MouseEvent,l=t("./dragdrop_handler").DragdropHandler,c=t("./touch_handler").addTouchListeners,u=t("../config"),h=function(t){var e=this;this.editor=t,new o(this),new s(this),new l(this);var n=function(e){var n=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());n&&window.focus(),t.focus(),setTimeout((function(){t.isFocused()||t.focus()}))},a=t.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),t),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),i.addMultiMouseDownListener([a,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),i.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),c(t.container,t);var u=t.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),t),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),i.addListener(a,"mousedown",n,t),i.addListener(u,"mousedown",n,t),r.isIE&&t.renderer.scrollBarV&&(i.addListener(t.renderer.scrollBarV.element,"mousedown",n,t),i.addListener(t.renderer.scrollBarH.element,"mousedown",n,t)),t.on("mousemove",(function(n){if(!e.state&&!e.$dragDelay&&e.$dragEnabled){var i=t.renderer.screenToTextCoordinates(n.x,n.y),r=t.session.selection.getRange(),o=t.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}),t)};(function(){this.onMouseEvent=function(t,e){this.editor.session&&this.editor._emit(t,new a(e,this.editor))},this.onMouseMove=function(t,e){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(t,new a(e,this.editor))},this.onMouseWheel=function(t,e){var n=new a(e,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=e.wheelX,n.wheelY=e.wheelY,this.editor._emit(t,n)},this.setState=function(t){this.state=t},this.captureMouse=function(t,e){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(t){if(t){if(r.isWebKit&&!t.which&&s.releaseMouse)return s.releaseMouse();s.x=t.clientX,s.y=t.clientY,e&&e(t),s.mouseEvent=new a(t,s.editor),s.$mouseMoved=!0}},c=function(t){n.off("beforeEndOperation",h),clearInterval(f),n.session&&u(),s[s.state+"End"]&&s[s.state+"End"](t),s.state="",s.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,t&&s.onMouseEvent("mouseup",t),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout((function(){c(t)}));var h=function(t){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var f=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&i.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(h.prototype),u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),e.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom");function r(t){t.on("click",(function(e){var n=e.getDocumentPosition(),r=t.session,o=r.getFoldAt(n.row,n.column,1);o&&(e.getAccelKey()?r.removeFold(o):r.expandFold(o),e.stop());var s=e.domEvent&&e.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),t.renderer.scrollCursorIntoView())})),t.on("gutterclick",(function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session;r.foldWidgets&&r.foldWidgets[i]&&t.session.onFoldWidgetClick(i,e),t.isFocused()||t.focus(),e.stop()}})),t.on("gutterdblclick",(function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session,o=r.getParentFoldRangeData(i,!0),s=o.range||o.firstRange;if(s){i=s.start.row;var a=r.getFoldAt(i,r.getLine(i).length,1);a?r.removeFold(a):(r.addFold("...",s),t.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}e.stop()}}))}e.FoldHandler=r})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../lib/event"),o=function(t){this.$editor=t,this.$data={editor:t},this.$handlers=[],this.setDefaultHandler(t.commands)};(function(){this.setDefaultHandler=function(t){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=t,this.addKeyboardHandler(t,0)},this.setKeyboardHandler=function(t){var e=this.$handlers;if(e[e.length-1]!=t){while(e[e.length-1]&&e[e.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(e[e.length-1]);this.addKeyboardHandler(t,1)}},this.addKeyboardHandler=function(t,e){if(t){"function"!=typeof t||t.handleKeyboard||(t.handleKeyboard=t);var n=this.$handlers.indexOf(t);-1!=n&&this.$handlers.splice(n,1),void 0==e?this.$handlers.push(t):this.$handlers.splice(e,0,t),-1==n&&t.attach&&t.attach(this.$editor)}},this.removeKeyboardHandler=function(t){var e=this.$handlers.indexOf(t);return-1!=e&&(this.$handlers.splice(e,1),t.detach&&t.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var t=this.$data,e=t.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(e,t)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(t,e,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--;)if(o=this.$handlers[l].handleKeyboard(this.$data,t,e,n,i),o&&o.command&&(s="null"==o.command||a.exec(o.command,this.$editor,o.args,i),s&&i&&-1!=t&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s))break;return s||-1!=t||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,e)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(t,e,n){var r=i.keyCodeToString(n);return this.$callKeyboardHandlers(e,r,n,t)},this.onTextInput=function(t){return this.$callKeyboardHandlers(-1,t)}}).call(o.prototype),e.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(t,e,n){"use strict";var i=0,r=0,o=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,h=1,f=0,d=1,p=2,g=3,m=4,v=5,y=6,w=7,b=8,_=9,S=10,x=11,C=12,k=13,A=14,$=15,R=16,T=17,E=18,L=[E,E,E,E,E,E,E,E,E,y,v,y,b,v,E,E,E,E,E,E,E,E,E,E,E,E,E,E,v,v,v,y,b,m,m,x,x,x,m,m,m,m,m,S,_,S,_,_,p,p,p,p,p,p,p,p,p,p,_,m,m,m,m,m,m,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,m,m,m,m,m,m,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,m,m,m,m,E,E,E,E,E,E,v,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,_,m,x,x,x,x,m,m,m,m,f,m,m,E,m,m,x,x,p,p,m,f,m,m,m,p,f,m,m,m,m,m],M=[b,b,b,b,b,b,b,b,b,b,b,E,E,E,f,d,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,v,k,A,$,R,T,_,x,x,x,x,x,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b];function O(t,e,n,u){var h=i?c:l,f=null,d=null,p=null,g=0,m=null,w=null,_=-1,S=null,x=null,C=[];if(!u)for(S=0,u=[];S<n;S++)u[S]=I(t[S]);for(r=i,o=!1,!1,s=!1,a=!1,x=0;x<n;x++){if(f=g,C[x]=d=P(t,u,C,x),g=h[f][d],m=240&g,g&=15,e[x]=p=h[g][5],m>0)if(16==m){for(S=_;S<x;S++)e[S]=1;_=-1}else _=-1;if(w=h[g][6],w)-1==_&&(_=x);else if(_>-1){for(S=_;S<x;S++)e[S]=p;_=-1}u[x]==v&&(e[x]=0),r|=p}if(a)for(S=0;S<n;S++)if(u[S]==y){e[S]=i;for(var k=S-1;k>=0;k--){if(u[k]!=b)break;e[k]=i}}}function D(t,e,n){if(!(r<t))if(1!=t||i!=h||s){var o,a,l,c,u=n.length,f=0;while(f<u){if(e[f]>=t){o=f+1;while(o<u&&e[o]>=t)o++;for(a=f,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;f=o}f++}}else n.reverse()}function P(t,e,n,r){var l,c,u,h,L=e[r];switch(L){case f:case d:o=!1;case m:case g:return L;case p:return o?g:p;case w:return o=!0,!0,d;case b:return m;case _:return r<1||r+1>=e.length||(l=n[r-1])!=p&&l!=g||(c=e[r+1])!=p&&c!=g?m:(o&&(c=g),c==l?c:m);case S:return l=r>0?n[r-1]:v,l==p&&r+1<e.length&&e[r+1]==p?p:m;case x:if(r>0&&n[r-1]==p)return p;if(o)return m;h=r+1,u=e.length;while(h<u&&e[h]==x)h++;return h<u&&e[h]==p?p:m;case C:u=e.length,h=r+1;while(h<u&&e[h]==C)h++;if(h<u){var M=t[r],O=M>=1425&&M<=2303||64286==M;if(l=e[h],O&&(l==d||l==w))return d}return r<1||(l=e[r-1])==v?m:n[r-1];case v:return o=!1,s=!0,i;case y:return a=!0,m;case k:case A:case R:case T:case $:o=!1;case E:return m}}function I(t){var e=t.charCodeAt(0),n=e>>8;return 0==n?e>191?f:L[e]:5==n?/[\u0591-\u05f4]/.test(t)?d:f:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?C:/[\u0660-\u0669\u066b-\u066c]/.test(t)?g:1642==e?x:/[\u06f0-\u06f9]/.test(t)?p:w:32==n&&e<=8287?M[255&e]:254==n&&e>=65136?w:m}e.L=f,e.R=d,e.EN=p,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="·",e.doBidiReorder=function(t,n,r){if(t.length<2)return{};var o=t.split(""),s=new Array(o.length),a=new Array(o.length),l=[];i=r?h:u,O(o,l,o.length,n);for(var c=0;c<s.length;s[c]=c,c++);D(2,l,s),D(1,l,s);for(c=0;c<s.length-1;c++)n[c]===g?l[c]=e.AN:l[c]===d&&(n[c]>w&&n[c]<k||n[c]===m||n[c]===E)?l[c]=e.ON_R:c>0&&"ل"===o[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(o[c])&&(l[c-1]=l[c]=e.R_H,c++);o[o.length-1]===e.DOT&&(l[o.length-1]=e.B),""===o[0]&&(l[0]=e.RLE);for(c=0;c<s.length;c++)a[c]=l[s[c]];return{logicalFromVisual:s,bidiLevels:a}},e.hasBidiCharacters=function(t,e){for(var n=!1,i=0;i<t.length;i++)e[i]=I(t.charAt(i)),n||e[i]!=d&&e[i]!=w&&e[i]!=g||(n=!0);return n},e.getVisualFromLogicalIdx=function(t,e){for(var n=0;n<e.logicalFromVisual.length;n++)if(e.logicalFromVisual[n]==t)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(t,e,n){"use strict";var i=t("./lib/bidiutil"),r=t("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(t.getValue())};(function(){this.isBidiRow=function(t,e,n){return!!this.seenBidi&&(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(e,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(t){this.seenBidi?this.currentRow=null:"insert"==t.action&&o.test(t.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var n=this.session.$getRowCacheIndex(e,this.currentRow);n>=0&&(t=this.session.$docRowCache[n])}return t},this.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var n,i=this.session.$getRowCacheIndex(e,this.currentRow);while(this.currentRow-t>0){if(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1),n!==i)break;i=n,t++}}else t=this.currentRow;return t},this.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1,o=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[t];s&&(void 0===e&&(e=this.getSplitIndex()),e>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=e<s.length?this.line.substring(s[e-1],s[e]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[e]),e==s.length&&(this.line+=this.showInvisibles?o:i.DOT))}else this.line+=this.showInvisibles?o:i.DOT;var a,l=this.session,c=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(t,e){return"\t"===t||l.isFullWidth(t.charCodeAt(0))?(a="\t"===t?l.getScreenTabSize(e+c):2,c+=a-1,r.stringRepeat(i.DOT,a)):t})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var t=[];i.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var e=this.characterWidth=t.$characterSize.width,n=t.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=e,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},this.setEolChar=function(t){this.EOL=t},this.setContentWidth=function(t){this.contentWidth=t},this.isRtlLine=function(t){return!!this.$isRtl||(void 0!=t?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(t,e){for(var n=t.getCursorPosition(),i=t.selection.getSelectionAnchor().row;i<=n.row;i++)e||t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE?e&&t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:i},t.session.$bidiHandler.RLE):t.session.doc.removeInLine(i,0,1)},this.getPosLeft=function(t){t-=this.wrapIndent;var e=this.line.charAt(0)===this.RLE?1:0,n=t>e?this.session.getOverwrite()?t:t-1:e,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&t<=e&&o[r]%2!==0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&t>e&&o[r]%2===0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(t,e){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(t,e)-this.wrapIndent,l=Math.max(t,e)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,d=0;d<r.length;d++)f=i.logicalFromVisual[d],n=r[d],c=f>=a&&f<l,c&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&d===r.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var p=0;p<o.length;p++)o[p].left+=this.rtlLineOffset;return o},this.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var e=0,n=(t=Math.max(t,0),0),i=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[i]];this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);while(t>n+o/2){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!==0&&r[i]%2===0?(t<n&&i--,e=this.bidiMap.logicalFromVisual[i]):i>0&&r[i-1]%2===0&&r[i]%2!==0?e=1+(t>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2===0||!this.isRtlDir&&0===i&&r[i]%2!==0?e=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!==0&&0!==o&&i--,e=this.bidiMap.logicalFromVisual[i]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent}}).call(s.prototype),e.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",(function(t){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),e.$isEmpty||e.$silent||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)})),this.anchor.on("change",(function(){e.$anchorChanged=!0,e.$isEmpty||e.$silent||e._emit("changeSelection")}))};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?s.fromPoints(e,e):this.isBackwards()?s.fromPoints(e,t):s.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,e){var n=e?t.end:t.start,i=e?t.start:t.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(t,e,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection((function(){this.moveCursorTo(t,e)}))},this.selectToPosition=function(t){this.$moveSelection((function(){this.moveCursorToPosition(t)}))},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if("undefined"==typeof e){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var n,i="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===e?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,n){var i=t.column,r=t.column+e;return n<0&&(i=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(i,r).split(" ").length-1==e},this.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();e=this.lead;this.wouldMoveIntoSoftTab(e,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var t=this.lead.row,e=this.lead.column,n=this.session.documentToScreenRow(t,e),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(t,null,i.row,i.column),o=r.match(/^\s*/);o[0].length==e||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var t=this.lead,e=this.session.getDocumentLastRowColumnPosition(t.row,t.column);if(this.lead.column==e.column){var n=this.session.getLine(e.row);if(e.column==n.length){var i=n.search(/\s+$/);i>0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(e)),e>=n.length)return this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(e+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)}},this.moveCursorLongWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))this.moveCursorTo(t.start.row,t.start.column);else{var i=this.session.getFoldStringAt(e,n,-1);null==i&&(i=this.doc.getLine(e).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(e,0),this.moveCursorLeft(),void(e>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)}},this.$shortWordEndIndex=function(t){var e,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))n=this.session.tokenRe.lastIndex;else{while((e=t[n])&&i.test(e))n++;if(n<1){r.lastIndex=0;while((e=t[n])&&!r.test(e))if(r.lastIndex=0,n++,i.test(e)){if(n>2){n--;break}while((e=t[n])&&i.test(e))n++;if(n>2)break}}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var o=this.doc.getLength();do{t++,i=this.doc.getLine(t)}while(t<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),e=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(t,e+s)},this.moveCursorShortWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var i=this.session.getLine(e).substring(0,n);if(0===n){do{e--,i=this.doc.getLine(e)}while(e>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(e,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=t&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];t<0?t-=r.rowsAbove||0:t>0&&(t+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+t,i.column,n);0!==t&&0===e&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+e,0===e)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var n=this.getCursor();return s.fromPoints(e,n)}catch(i){return s.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map((function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e}));else{t=this.getRange();t.isBackwards=this.isBackwards()}return t},this.fromJSON=function(t){if(void 0==t.start){if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=s.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),e.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(t,e,n){"use strict";var i=t("./config"),r=2e3,o=function(t){for(var e in this.states=t,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[e],i=[],r=0,o=this.matchMappings[e]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(t,e){return"\\"+(parseInt(e,10)+r+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(t){t.splitRegex=this.createSplitterRegexp(t.regex,s)}),this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(t){r=0|t},this.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),n=this.token.apply(this,e);if("string"===typeof n)return[{type:n,value:t}];for(var i=[],r=0,o=n.length;r<o;r++)e[r]&&(i[i.length]={type:n[r],value:e[r]});return i},this.$arrayTokens=function(t){if(!t)return[];var e=this.splitRegex.exec(t);if(!e)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)e[r+1]&&(n[n.length]={type:i[r],value:e[r+1]});return n},this.removeCapturingGroups=function(t){var e=t.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(t,e){return e?"(?:":t}));return e},this.createSplitterRegexp=function(t,e){if(-1!=t.indexOf("(?=")){var n=0,i=!1,r={};t.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(t,e,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),t})),null!=r.end&&/^\)*$/.test(t.substr(r.end))&&(t=t.substring(0,r.start)+t.substr(r.end))}return"^"!=t.charAt(0)&&(t="^"+t),"$"!=t.charAt(t.length-1)&&(t+="$"),new RegExp(t,(e||"").replace("g",""))},this.getLineTokens=function(t,e){if(e&&"string"!=typeof e){var n=e.slice(0);e=n[0],"#tmp"===e&&(n.shift(),e=n.shift())}else n=[];var i=e||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;var l,c=[],u=0,h=0,f={type:null,value:""};while(l=a.exec(t)){var d=s.defaultToken,p=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=t.substring(u,m-g.length);f.type==d?f.value+=v:(f.type&&c.push(f),f={type:d,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){p=o[s[y]],d=p.onMatch?p.onMatch(g,i,n,t):p.token,p.next&&(i="string"==typeof p.next?p.next:p.next(i,n),o=this.states[i],o||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=m,a=this.regExps[i],a.lastIndex=m),p.consumeLineEnd&&(u=m);break}if(g)if("string"===typeof d)p&&!1===p.merge||f.type!==d?(f.type&&c.push(f),f={type:d,value:g}):f.value+=g;else if(d){f.type&&c.push(f),f={type:null,value:""};for(y=0;y<d.length;y++)c.push(d[y])}if(u==t.length)break;if(u=m,h++>r){h>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});while(u<t.length)f.type&&c.push(f),f={value:t.substring(u,u+=500),type:"overflow"};i="start",n=[];break}}return f.type&&c.push(f),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),e.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(t,e,n){"use strict";var i=t("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(t,e){if(e)for(var n in t){for(var i=t[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(e)&&(o.next=e+o.next),o.nextState&&0!==o.nextState.indexOf(e)&&(o.nextState=e+o.nextState))}this.$rules[e+n]=i}else for(var n in t)this.$rules[n]=t[n]},this.getRules=function(){return this.$rules},this.embedRules=function(t,e,n,r,o){var s="function"==typeof t?(new t).getRules():t;if(r)for(var a=0;a<r.length;a++)r[a]=e+r[a];else for(var l in r=[],s)r.push(e+l);if(this.addRules(s,e),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<r.length;a++)c.apply(this.$rules[r[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(e)},this.getEmbeds=function(){return this.$embeds};var t=function(t,e){return("start"!=t||e.length)&&e.unshift(this.nextState,t),this.nextState},e=function(t,e){return e.shift(),e.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;function r(o){var s=i[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||(h=l.token,"string"!=typeof h&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,l.next=h,r(h)}else"pop"==u&&(l.next=e);if(l.push&&(l.nextState=l.next||l.push,l.next=t,delete l.push),l.rules)for(var f in l.rules)i[f]?i[f].push&&i[f].push.apply(i[f],l.rules[f]):i[f]=l.rules[f];var d="string"==typeof l?l:l.include;if(d&&(c=Array.isArray(d)?d.map((function(t){return i[t]})):i[d]),c){var p=[a,1].concat(c);l.noEscape&&(p=p.filter((function(t){return!t.next}))),s.splice.apply(s,p),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(i).forEach(r,this)},this.createKeywordMapper=function(t,e,n,i){var r=Object.create(null);return this.$keywordList=[],Object.keys(t).forEach((function(e){for(var o=t[e],s=o.split(i||"|"),a=s.length;a--;){var l=s[a];this.$keywordList.push(l),n&&(l=l.toLowerCase()),r[l]=e}}),this),t=null,n?function(t){return r[t.toLowerCase()]||e}:function(t){return r[t]||e}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),e.TextHighlightRules=r})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(t,e,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(t,e,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[t]:this.$behaviours[t]={}}this.$behaviours[t][e]=n},this.addBehaviours=function(t){for(var e in t)for(var n in t[e])this.add(e,n,t[e][n])},this.remove=function(t){this.$behaviours&&this.$behaviours[t]&&delete this.$behaviours[t]},this.inherit=function(t,e){if("function"===typeof t)var n=(new t).getBehaviours(e);else n=t.getBehaviours(e);this.addBehaviours(n)},this.getBehaviours=function(t){if(t){for(var e={},n=0;n<t.length;n++)this.$behaviours[t[n]]&&(e[t[n]]=this.$behaviours[t[n]]);return e}return this.$behaviours}}).call(i.prototype),e.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("./range").Range,r=function(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var i=t.getTokenAt(e,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var t;this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,n=t[e].start;if(void 0!==n)return n;n=0;while(e>0)e-=1,n+=t[e].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],e=this.getCurrentTokenColumn();return new i(this.$row,e,this.$row,e+t.value.length)}}).call(r.prototype),e.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(t,e,n){"use strict";var i,r=t("../../lib/oop"),o=t("../behaviour").Behaviour,s=t("../../token_iterator").TokenIterator,a=t("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},f=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,u.rangeCount!=t.multiSelect.rangeCount&&(u={rangeCount:t.multiSelect.rangeCount})),u[e])return i=u[e];i=u[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(t,e,n,i){var r=t.end.row-t.start.row;return{text:n+e+i,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}},p=function(t){this.add("braces","insertion",(function(e,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){f(r);var u=r.getSelectionRange(),h=o.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return d(u,h,"{","}");if(p.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||t&&t.braces?(p.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){f(r);var g=c.substring(l.column,l.column+1);if("}"==g){var m=o.$findOpeningBracket("}",{column:l.column+1,row:l.row});if(null!==m&&p.isAutoInsertedClosing(l,c,s))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==s||"\r\n"==s){f(r);var v="";p.isMaybeInsertedClosing(l,c)&&(v=a.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing());g=c.substring(l.column,l.column+1);if("}"===g){var y=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!y)return null;var w=this.$getIndent(o.getLine(y.row))}else{if(!v)return void p.clearMaybeInsertedClosing();w=this.$getIndent(c)}var b=w+o.getTabString();return{text:"\n"+b+"\n"+w+v,selection:[1,b.length,1,b.length]}}p.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,e,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){f(n);var a=r.doc.getLine(o.start.row),l=a.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,e,n,i,r){if("("==r){f(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return d(o,s,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){f(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var u=i.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==u&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("parens","deletion",(function(t,e,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o){f(n);var s=i.doc.getLine(r.start.row),a=s.substring(r.start.column+1,r.start.column+2);if(")"==a)return r.end.column++,r}})),this.add("brackets","insertion",(function(t,e,n,i,r){if("["==r){f(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return d(o,s,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){f(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var u=i.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==u&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("brackets","deletion",(function(t,e,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o){f(n);var s=i.doc.getLine(r.start.row),a=s.substring(r.start.column+1,r.start.column+2);if("]"==a)return r.end.column++,r}})),this.add("string_dquotes","insertion",(function(t,e,n,i,r){var o=i.$mode.$quotes||h;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;f(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return d(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),p=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var y,w=m&&/string|escape/.test(m.type),b=!v||/string|escape/.test(v.type);if(g==s)y=w!==b,y&&/string\.end/.test(v.type)&&(y=!1);else{if(w&&!b)return null;if(w&&b)return null;var _=i.$mode.tokenRe;_.lastIndex=0;var S=_.test(p);_.lastIndex=0;var x=_.test(p);if(S||x)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var C=u[c.column-2];if(p==s&&(C==s||_.test(C)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(t,e,n,i,r){var o=i.$mode.$quotes||h,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)){f(n);var a=i.doc.getLine(r.start.row),l=a.substring(r.start.column+1,r.start.column+2);if(l==s)return r.end.column++,r}}))};p.isSaneInsertion=function(t,e){var n=t.getCursorPosition(),i=new s(e,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(t.session.getLine(n.row)[n.column]))return!0;var r=new s(e,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(t,e){return e.indexOf(t.type||t)>-1},p.recordAutoInsert=function(t,e,n){var r=t.getCursorPosition(),o=e.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(t,e,n){var r=t.getCursorPosition(),o=e.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(t,e,n){return i.autoInsertedBrackets>0&&t.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&e.substr(t.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(t,e){return i.maybeInsertedBrackets>0&&t.row===i.maybeInsertedRow&&e.substr(t.column)===i.maybeInsertedLineEnd&&e.substr(0,t.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,o),e.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(t,e,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,o=[],s=0;s<i.length;s+=2)o.push(r+=i[s]),i[s+1]&&o.push(45,r+=i[s+1]);e.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(t,e,n){"use strict";var i=t("../config"),r=t("../tokenizer").Tokenizer,o=t("./text_highlight_rules").TextHighlightRules,s=t("./behaviour/cstyle").CstyleBehaviour,a=t("../unicode"),l=t("../lib/lang"),c=t("../token_iterator").TokenIterator,u=t("../range").Range,h=function(){this.HighlightRules=o};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+a.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(t,e,n,i){var r=e.doc,o=!0,s=!0,a=1/0,c=e.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))g=this.lineCommentStart.map(l.escapeRegExp).join("|"),d=this.lineCommentStart[0];else g=l.escapeRegExp(this.lineCommentStart),d=this.lineCommentStart;g=new RegExp("^(\\s*)(?:"+g+") ?"),u=e.getUseSoftTabs();y=function(t,e){var n=t.match(g);if(n){var i=n[1].length,o=n[0].length;f(t,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(e,i,o)}};var h=d+" ",f=(v=function(t,e){o&&!/\S/.test(t)||(f(t,a,a)?r.insertInLine({row:e,column:a},h):r.insertInLine({row:e,column:a},d))},w=function(t,e){return g.test(t)},function(t,e,n){var i=0;while(e--&&" "==t.charAt(e))i++;if(i%c!=0)return!1;i=0;while(" "==t.charAt(n++))i++;return c>2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var d=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+l.escapeRegExp(d)+")"),m=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(t,e){w(t,e)||o&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},p),r.insertInLine({row:e,column:a},d))},y=function(t,e){var n;(n=t.match(m))&&r.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(g))&&r.removeInLine(e,n[1].length,n[0].length)},w=function(t,n){if(g.test(t))return!0;for(var i=e.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function b(t){for(var e=n;e<=i;e++)t(r.getLine(e),e)}var _=1/0;b((function(t,e){var n=t.search(/\S/);-1!==n?(n<a&&(a=n),s&&!w(t,e)&&(s=!1)):_>t.length&&(_=t.length)})),a==1/0&&(a=_,o=!1,s=!1),u&&a%c!=0&&(a=Math.floor(a/c)*c),b(s?y:v)},this.toggleBlockComment=function(t,e,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=new c(e,i.row,i.column),l=a.getCurrentToken(),h=(e.selection,e.selection.toOrientedRange());if(l&&/comment/.test(l.type)){var f,d;while(l&&/comment/.test(l.type)){var p=l.value.indexOf(r.start);if(-1!=p){var g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;f=new u(g,m,g,m+r.start.length);break}l=a.stepBackward()}a=new c(e,i.row,i.column),l=a.getCurrentToken();while(l&&/comment/.test(l.type)){p=l.value.indexOf(r.end);if(-1!=p){g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;d=new u(g,m,g,m+r.end.length);break}l=a.stepForward()}d&&e.remove(d),f&&(e.remove(f),o=f.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,e.insert(n.end,r.end),e.insert(n.start,r.start);h.start.row==o&&(h.start.column+=s),h.end.row==o&&(h.end.column+=s),e.selection.fromOrientedRange(h)}},this.getNextLineIndent=function(t,e,n){return this.$getIndent(e)},this.checkOutdent=function(t,e,n){return!1},this.autoOutdent=function(t,e,n){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){for(var e in this.$embeds=[],this.$modes={},t)if(t[e]){var n=t[e],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[e]||(i.$modes[e]=o),this.$embeds.push(e),this.$modes[e]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(e=0;e<s.length;e++)(function(t){var n=s[e],i=t[n];t[s[e]]=function(){return this.$delegator(n,arguments,i)}})(this)},this.$delegator=function(t,e,n){var i=e[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var r=i[2][i[2].length-1],o=this.$modes[r];if(o)return o[t].apply(o,[i[1]].concat([].slice.call(e,1)))}i=i[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var a=i.split(this.$embeds[s]);if(!a[0]&&a[1]){e[0]=a[1];o=this.$modes[this.$embeds[s]];return o[t].apply(o,e)}}var l=n.apply(this,e);return n?l:void 0},this.transformAction=function(t,e,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][e]){var a=o[s][e].apply(this,arguments);if(a)return a}}},this.getKeywords=function(t){if(!this.completionKeywords){var e=this.$tokenizer.rules,n=[];for(var i in e)for(var r=e[i],o=0,s=r.length;o<s;o++)if("string"===typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"===typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)if(/keyword|support|storage/.test(r[o].token[a])){i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return t?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(t,e,n,i){var r=this.$keywordList||this.$createKeywordList();return r.map((function(t){return{name:t,value:t,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(h.prototype),e.Mode=h})),ace.define("ace/apply_delta",["require","exports","module"],(function(t,e,n){"use strict";e.applyDelta=function(t,e,n){var i=e.start.row,r=e.start.column,o=t[i]||"";switch(e.action){case"insert":var s=e.lines;if(1===s.length)t[i]=o.substring(0,r)+e.lines[0]+o.substring(r);else{var a=[i,1].concat(e.lines);t.splice.apply(t,a),t[i]=o.substring(0,r)+t[i],t[i+e.lines.length-1]+=o.substring(r)}break;case"remove":var l=e.end.column,c=e.end.row;i===c?t[i]=o.substring(0,r)+o.substring(l):t.splice(i,c-i+1,o.substring(0,r)+t[c].substring(l));break}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=e.Anchor=function(t,e,n){this.$onChange=this.onChange.bind(this),this.attach(t),"undefined"==typeof n?this.setPosition(e.row,e.column):this.setPosition(e,n)};(function(){function t(t,e,n){var i=n?t.column<=e.column:t.column<e.column;return t.row<e.row||t.row==e.row&&i}function e(e,n,i){var r="insert"==e.action,o=(r?1:-1)*(e.end.row-e.start.row),s=(r?1:-1)*(e.end.column-e.start.column),a=e.start,l=r?a:e.end;return t(n,a,i)?{row:n.row,column:n.column}:t(l,n,!i)?{row:n.row+o,column:n.column+(n.row==l.row?s:0)}:{row:a.row,column:a.column}}i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if((t.start.row!=t.end.row||t.start.row==this.row)&&!(t.start.row>this.row)){var n=e(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),e<0&&(n.column=0),n}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./apply_delta").applyDelta,o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=t("./anchor").Anchor,l=function(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)};(function(){i.implement(this,o),this.setValue=function(t){var e=this.getLength()-1;this.remove(new s(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,e){return new a(this,t,e)},0==="aaa".split(/a/).length?this.$split=function(t){return t.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,e){return this.$lines.slice(t,e+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},this.getLinesForRange=function(t){var e;if(t.start.row===t.end.row)e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else{e=this.getLines(t.start.row,t.end.row),e[0]=(e[0]||"").substring(t.start.column);var n=e.length-1;t.end.row-t.start.row==n&&(e[n]=e[n].substring(0,t.end.column))}return e},this.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},this.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},this.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},this.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},this.insertInLine=function(t,e){var n=this.clippedPos(t.row,t.column),i=this.pos(t.row,t.column+e.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[e]},!0),this.clonePos(i)},this.clippedPos=function(t,e){var n=this.getLength();void 0===t?t=n:t<0?t=0:t>=n&&(t=n-1,e=void 0);var i=this.getLine(t);return void 0==e&&(e=i.length),e=Math.min(Math.max(e,0),i.length),{row:t,column:e}},this.clonePos=function(t){return{row:t.row,column:t.column}},this.pos=function(t,e){return{row:t,column:e}},this.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},this.insertFullLines=function(t,e){t=Math.min(Math.max(t,0),this.getLength());var n=0;t<this.getLength()?(e=e.concat([""]),n=0):(e=[""].concat(e),t--,n=this.$lines[t].length),this.insertMergedLines({row:t,column:n},e)},this.insertMergedLines=function(t,e){var n=this.clippedPos(t.row,t.column),i={row:n.row+e.length-1,column:(1==e.length?n.column:0)+e[e.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:e}),this.clonePos(i)},this.remove=function(t){var e=this.clippedPos(t.start.row,t.start.column),n=this.clippedPos(t.end.row,t.end.column);return this.applyDelta({start:e,end:n,action:"remove",lines:this.getLinesForRange({start:e,end:n})}),this.clonePos(e)},this.removeInLine=function(t,e,n){var i=this.clippedPos(t,e),r=this.clippedPos(t,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},this.removeFullLines=function(t,e){t=Math.min(Math.max(0,t),this.getLength()-1),e=Math.min(Math.max(0,e),this.getLength()-1);var n=e==this.getLength()-1&&t>0,i=e<this.getLength()-1,r=n?t-1:t,o=n?this.getLine(r).length:0,a=i?e+1:e,l=i?0:this.getLine(a).length,c=new s(r,o,a,l),u=this.$lines.slice(t,e+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(t){t<this.getLength()-1&&t>=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},this.replace=function(t,e){return t instanceof s||(t=s.fromPoints(t.start,t.end)),0===e.length&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),n=e?this.insert(t.start,e):t.start,n);var n},this.applyDeltas=function(t){for(var e=0;e<t.length;e++)this.applyDelta(t[e])},this.revertDeltas=function(t){for(var e=t.length-1;e>=0;e--)this.revertDelta(t[e])},this.applyDelta=function(t,e){var n="insert"==t.action;(n?t.lines.length<=1&&!t.lines[0]:!s.comparePoints(t.start,t.end))||(n&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(r(this.$lines,t,e),this._signal("change",t)))},this.$safeApplyDelta=function(t){var e=this.$lines.length;("remove"==t.action&&t.start.row<e&&t.end.row<e||"insert"==t.action&&t.start.row<=e)&&this.applyDelta(t)},this.$splitAndapplyLargeDelta=function(t,e){for(var n=t.lines,i=n.length-e+1,r=t.start.row,o=t.start.column,s=0,a=0;s<i;s=a){a+=e-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:t.action,lines:l},!0)}t.lines=n.slice(s),t.start.row=r+s,t.start.column=o,this.applyDelta(t,!0)},this.revertDelta=function(t){this.$safeApplyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:"insert"==t.action?"remove":"insert",lines:t.lines.slice()})},this.indexToPosition=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=e||0,o=n.length;r<o;r++)if(t-=n[r].length+i,t<0)return{row:r,column:t+n[r].length+i};return{row:o-1,column:t+n[o-1].length+i}},this.positionToIndex=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(t.row,n.length),s=e||0;s<o;++s)r+=n[s].length+i;return r+t.column}}).call(l.prototype),e.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=function(t,e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=t;var n=this;this.$worker=function(){if(n.running){var t=new Date,e=n.currentLine,i=-1,r=n.doc,o=e;while(n.lines[e])e++;var s=r.getLength(),a=0;n.running=!1;while(e<s){n.$tokenizeRow(e),i=e;do{e++}while(n.lines[e]);if(a++,a%5===0&&new Date-t>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=e,-1==i&&(i=e),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(t,e){var n={first:t,last:e};this._signal("update",{data:n})},this.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.lines[e]=null;else if("remove"==t.action)this.lines.splice(e,n+1,null),this.states.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},this.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},this.$tokenizeRow=function(t){var e=this.doc.getLine(t),n=this.states[t-1],i=this.tokenizer.getLineTokens(e,n,t);return this.states[t]+""!==i.state+""?(this.states[t]=i.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),e.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/lang"),r=(t("./lib/oop"),t("./range").Range),o=function(t,e,n){this.setRegexp(t),this.clazz=e,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},this.update=function(t,e,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&(u=i.getMatchOffsets(n.getLine(c),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map((function(t){return new r(c,t.offset,c,t.offset+t.length)})),this.cache[c]=u.length?u:"");for(var h=u.length;h--;){var f=u[h].toScreenRange(n),d=f.toString();l[d]||(l[d]=!0,e.drawSingleLineMarker(t,f,this.clazz,o))}}}}).call(o.prototype),e.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("../range").Range;function r(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var n=e[e.length-1];this.range=new i(e[0].start.row,e[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(t){t.setFoldLine(this)}),this)}(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach((function(e){e.start.row+=t,e.end.row+=t}))},this.addFold=function(t){if(t.sameRow){if(t.start.row<this.startRow||t.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort((function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)})),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},this.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},this.walk=function(t,e,n){var i,r,o,s=0,a=this.folds,l=!0;null==e&&(e=this.end.row,n=this.end.column);for(var c=0;c<a.length;c++){if(i=a[c],r=i.range.compareStart(e,n),-1==r)return void t(null,e,n,s,l);if(o=t(null,i.start.row,i.start.column,s,l),o=!o&&t(i.placeholder,i.start.row,i.start.column,s),o||0===r)return;l=!i.sameRow,s=i.end.column}t(null,e,n,s,l)},this.getNextFoldTo=function(t,e){for(var n,i,r=0;r<this.folds.length;r++){if(n=this.folds[r],i=n.range.compareEnd(t,e),-1==i)return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(t,e,n){var i,r,o=this.getNextFoldTo(t,e);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=e&&i.start.row!=t)window.console&&window.console.log(t,e,i);else if(i.start.row==t){r=this.folds;var s=r.indexOf(i);for(0===s&&(this.start.column+=n),s;s<r.length;s++){if(i=r[s],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(t,e){var n=this.getNextFoldTo(t,e);if(!n||"inside"==n.kind)return null;var i=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(i),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(a,o.length-a);var c=new r(s,o);return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(t){for(var e=t.folds,n=0;n<e.length;n++)this.addFold(e[n]);var i=this.foldData;i.splice(i.indexOf(t),1)},this.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach((function(e){t.push(" "+e.toString())})),t.push("]"),t.join("\n")},this.idxToPosition=function(t){for(var e=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if(t-=i.start.column-e,t<0)return{row:i.start.row,column:i.start.column+t};if(t-=i.placeholder.length,t<0)return i.start;e=i.end.column}return{row:this.end.row,column:this.end.column+t}}}).call(r.prototype),e.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("./range").Range,r=i.comparePoints,o=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=r,this.pointIndex=function(t,e,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(t,s.end);if(!(a>0)){var l=r(t,s.start);return 0===a?e&&0!==l?-o-2:o:l>0||0===l&&!e?o:-o-1}}return-o-1},this.add=function(t){var e=!t.isEmpty(),n=this.pointIndex(t.start,e);n<0&&(n=-n-1);var i=this.pointIndex(t.end,e,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,t)},this.addList=function(t){for(var e=[],n=t.length;n--;)e.push.apply(e,this.add(t[n]));return e},this.substractPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges.splice(e,1)},this.merge=function(){var t=[],e=this.ranges;e=e.sort((function(t,e){return r(t.start,e.start)}));for(var n,i=e[0],o=1;o<e.length;o++){n=i,i=e[o];var s=r(n.end,i.start);s<0||(0!=s||n.isEmpty()||i.isEmpty())&&(r(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),e.splice(o,1),t.push(i),i=n,o--)}return this.ranges=e,t},this.contains=function(t,e){return this.pointIndex({row:t,column:e})>=0},this.containsPoint=function(t){return this.pointIndex(t)>=0},this.rangeAtPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges[e]},this.clipRows=function(t,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row<t)return[];var i=this.pointIndex({row:t,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:e,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(t){this.session&&this.detach(),this.session=t,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(t){for(var e=t.start,n=t.end,i=e.row,r=n.row,o=this.ranges,s=0,a=o.length;s<a;s++){var l=o[s];if(l.end.row>=i)break}if("insert"==t.action)for(var c=r-i,u=-e.column+n.column;s<a;s++){l=o[s];if(l.start.row>i)break;if(l.start.row==i&&l.start.column>=e.column&&(l.start.column==e.column&&this.$bias<=0||(l.start.column+=u,l.start.row+=c)),l.end.row==i&&l.end.column>=e.column){if(l.end.column==e.column&&this.$bias<0)continue;l.end.column==e.column&&u>0&&s<a-1&&l.end.column>l.start.column&&l.end.column==o[s+1].start.column&&(l.end.column-=u),l.end.column+=u,l.end.row+=c}}else for(c=i-r,u=e.column-n.column;s<a;s++){l=o[s];if(l.start.row>r)break;l.end.row<r&&(i<l.end.row||i==l.end.row&&e.column<l.end.column)?(l.end.row=i,l.end.column=e.column):l.end.row==r?l.end.column<=n.column?(c||l.end.column>e.column)&&(l.end.column=e.column,l.end.row=e.row):(l.end.column+=u,l.end.row+=c):l.end.row>r&&(l.end.row+=c),l.start.row<r&&(i<l.start.row||i==l.start.row&&e.column<l.start.column)?(l.start.row=i,l.start.column=e.column):l.start.row==r?l.start.column<=n.column?(c||l.start.column>e.column)&&(l.start.column=e.column,l.start.row=e.row):(l.start.column+=u,l.start.row+=c):l.start.row>r&&(l.start.row+=c)}if(0!=c&&s<a)for(;s<a;s++){l=o[s];l.start.row+=c,l.end.row+=c}}}).call(o.prototype),e.RangeList=o})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(t,e,n){"use strict";var i=t("../range_list").RangeList,r=t("../lib/oop"),o=e.Fold=function(t,e){this.foldLine=null,this.placeholder=e,this.range=t,this.start=t.start,this.end=t.end,this.sameRow=t.start.row==t.end.row,this.subFolds=this.ranges=[]};function s(t,e){t.row-=e.row,0==t.row&&(t.column-=e.column)}function a(t,e){s(t.start,e),s(t.end,e)}function l(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row}function c(t,e){l(t.start,e),l(t.end,e)}r.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach((function(e){e.setFoldLine(t)}))},this.clone=function(){var t=this.range.clone(),e=new o(t,this.placeholder);return this.subFolds.forEach((function(t){e.subFolds.push(t.clone())})),e.collapseChildren=this.collapseChildren,e},this.addSubFold=function(t){if(!this.range.isEqual(t)){a(t,this.start);for(var e=t.start.row,n=t.start.column,i=0,r=-1;i<this.subFolds.length;i++)if(r=this.subFolds[i].range.compare(e,n),1!=r)break;var o=this.subFolds[i],s=0;if(0==r){if(o.range.containsRange(t))return o.addSubFold(t);s=1}e=t.range.end.row,n=t.range.end.column;var l=i;for(r=-1;l<this.subFolds.length;l++)if(r=this.subFolds[l].range.compare(e,n),1!=r)break;0==r&&l++;for(var c=this.subFolds.splice(i,l-i,t),u=0==r?c.length-1:c.length,h=s;h<u;h++)t.addSubFold(c[h]);return t.setFoldLine(this.foldLine),t}},this.restoreRange=function(t){return c(t,this.start)}}.call(o.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(t,e,n){"use strict";var i=t("../range").Range,r=t("./fold_line").FoldLine,o=t("./fold").Fold,s=t("../token_iterator").TokenIterator;function a(){this.getFoldAt=function(t,e,n){var i=this.getFoldLine(t);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o].range;if(s.contains(t,e)){if(1==n&&s.isEnd(t,e)&&!s.isEmpty())continue;if(-1==n&&s.isStart(t,e)&&!s.isEmpty())continue;return r[o]}}},this.getFoldsInRange=function(t){var e=t.start,n=t.end,i=this.$foldData,r=[];e.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(t);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(s=c.range.compareRange(t),-2==s)break;if(2!=s){if(42==s)break;r.push(c)}}}}return e.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(t){if(Array.isArray(t)){var e=[];t.forEach((function(t){e=e.concat(this.getFoldsInRange(t))}),this)}else e=this.getFoldsInRange(t);return e},this.getAllFolds=function(){for(var t=[],e=this.$foldData,n=0;n<e.length;n++)for(var i=0;i<e[n].folds.length;i++)t.push(e[n].folds[i]);return t},this.getFoldStringAt=function(t,e,n,i){if(i=i||this.getFoldLine(t),!i)return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){o=i.folds[a];var l=o.range.compareEnd(t,e);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,e-s.end.column):1==n?r.substring(e-s.end.column):r},this.getFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.start.row<=t&&r.end.row>=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.end.row>=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=e){a<e&&(a>=t?i-=e-a:i=0);break}s>=t&&(i-=a>=t?s-a:s-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort((function(t,e){return t.start.row-e.start.row})),t},this.addFold=function(t,e){var n,i=this.$foldData,s=!1;t instanceof o?n=t:(n=new o(e,t),n.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),f=this.getFoldAt(c,u,-1);if(h&&f==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),f&&!f.range.isEnd(c,u)&&this.removeFold(f);var d=this.getFoldsInRange(n.range);d.length>0&&(this.removeFolds(d),n.collapseChildren||d.forEach((function(t){n.addSubFold(t)})));for(var p=0;p<i.length;p++){var g=i[p];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[p+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(t){t.forEach((function(t){this.addFold(t)}),this)},this.removeFold=function(t){var e=t.foldLine,n=e.start.row,i=e.end.row,r=this.$foldData,o=e.folds;if(1==o.length)r.splice(r.indexOf(e),1);else if(e.range.isEnd(t.end.row,t.end.column))o.pop(),e.end.row=o[o.length-1].end.row,e.end.column=o[o.length-1].end.column;else if(e.range.isStart(t.start.row,t.start.column))o.shift(),e.start.row=o[0].start.row,e.start.column=o[0].start.column;else if(t.sameRow)o.splice(o.indexOf(t),1);else{var s=e.split(t.start.row,t.start.column);o=s.folds,o.shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);e.forEach((function(t){this.removeFold(t)}),this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach((function(e){t.restoreRange(e),this.addFold(e)}),this),t.collapseChildren>0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach((function(t){this.expandFold(t)}),this)},this.unfold=function(t,e){var n,r;if(null==t)n=new i(0,0,this.getLength(),0),null==e&&(e=!0);else if("number"==typeof t)n=new i(t,0,t,this.getLine(t).length);else if("row"in t)n=i.fromPoints(t,t);else{if(Array.isArray(t))return r=[],t.forEach((function(t){r=r.concat(this.unfold(t))}),this),r;n=t}r=this.getFoldsInRangeList(n);var o=r;while(1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=e?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==n&&(n=this.getLine(e).length);var o=this.doc,s="";return t.walk((function(t,e,n,a){if(!(e<i)){if(e==i){if(n<r)return;a=Math.max(r,a)}s+=null!=t?t:o.getLine(e).substring(a,n)}}),e,n),s},this.getDisplayLine=function(t,e,n,i){var r,o=this.getFoldLine(t);return o?this.getFoldDisplayLine(o,t,e,n,i):(r=this.doc.getLine(t),r.substring(i||0,e||r.length))},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map((function(e){var n=e.folds.map((function(t){return t.clone()}));return new r(t,n)})),t},this.toggleFold=function(t){var e,n,i=this.selection,r=i.getRange();if(r.isEmpty()){var o=r.start;if(e=this.getFoldAt(o.row,o.column),e)return void this.expandFold(e);(n=this.findMatchingBracket(o))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var s=this.getFoldsInRange(r);if(t&&s.length)return void this.expandFolds(s);1==s.length&&(e=s[0])}if(e||(e=this.getFoldAt(r.start.row,r.start.column)),e&&e.range.toString()==r.toString())this.expandFold(e);else{var a="...";if(!r.isMultiLine()){if(a=this.getTextRange(r),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,r)}},this.getCommentFoldRange=function(t,e,n){var r=new s(this,t,e),o=r.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],"comment"==a&&(a+="|doc-start");var l=new RegExp(a),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type)&&!/^comment.end/.test(o.type));o=r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),r=new s(this,t,e),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);l.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(t,e,n,i){void 0==n&&(n=1e5);var r=this.foldWidgets;if(r){e=e||this.getLength(),t=t||0;for(var o=t;o<e;o++)if(null==r[o]&&(r[o]=this.getFoldWidget(o)),"start"==r[o]&&(!i||i(o))){var s=this.getFoldWidgetRange(o);s&&s.isMultiLine()&&s.end.row<=e&&s.start.row>=t&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(t){this.foldAll();while(t-- >0)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,(function(e){for(var n=t.getTokens(e),i=0;i<n.length;i++){var r=n[i];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,"manual"==t&&this.unfold();var e=this.$foldMode;this.$setFolding(null),this.$setFolding(e)}},this.$setFolding=function(t){this.$foldMode!=t&&(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),t&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(t,e){var n=this.foldWidgets;if(!n||e&&n[t])return{};var i,r=t-1;while(r>=0){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=t)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(t,e){e=e.domEvent;var n={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},i=this.$toggleFoldWidget(t,n);if(!i){var r=e.target||e.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,o=this.getFoldAt(t,-1===r?0:i.length,r);if(o)return e.children||e.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(t,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1),o&&s.isEqual(o.range)))return this.removeFold(o),o;if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,e.all?1e4:0)}else e.children?(c=s?s.end.row:this.getLength(),this.foldAll(t+1,c,e.all?1e4:0)):s&&(e.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange,n){e=n.start.row;var r=this.getFoldAt(e,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}e.Folding=a})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(t,e,n){"use strict";var i=t("../token_iterator").TokenIterator,r=t("../range").Range;function o(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var n=e||this.getLine(t.row).charAt(t.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var e,n=this.getLine(t.row),i=!0,o=n.charAt(t.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(t.column),t={row:t.row,column:t.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],t);if(!a)return null;e=r.fromPoints(t,a),i||(e.end.column++,e.start.column--),e.cursor=e.end}else{a=this.$findOpeningBracket(s[2],t);if(!a)return null;e=r.fromPoints(a,t),i||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(t,e){var n=this.getLine(t.row),i=/([\(\[\{])|([\)\]\}])/,o=!e&&n.charAt(t.column-1),s=o&&o.match(i);if(s||(o=(void 0===e||e)&&n.charAt(t.column),t={row:t.row,column:t.column+1},s=o&&o.match(i)),!s)return null;var a=new r(t.row,t.column-1,t.row,t.column),l=s[1]?this.$findClosingBracket(s[1],t):this.$findOpeningBracket(s[2],t);if(!l)return[a];var c=new r(l.row,l.column,l.row,l.column+1);return[a,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,e,n){var r=this.$brackets[t],o=1,s=new i(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));var l=e.column-s.getCurrentTokenColumn()-2,c=a.value;while(1){while(l>=0){var u=c.charAt(l);if(u==r){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==t&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(t,e,n){var r=this.$brackets[t],o=1,s=new i(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));var l=e.column-s.getCurrentTokenColumn();while(1){var c=a.value,u=c.length;while(l<u){var h=c.charAt(l);if(h==r){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==t&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(t){var e=new i(this,t.row,t.column),n=this.$findTagName(e);if(n){var r=e.stepBackward();return"<"===r.value?this.$findClosingTag(e,n):this.$findOpeningTag(e,n)}},this.$findTagName=function(t){var e=t.getCurrentToken(),n=!1,i=!1;if(e&&-1===e.type.indexOf("tag-name"))do{e=i?t.stepBackward():t.stepForward(),e&&("/>"===e.value?i=!0:-1!==e.type.indexOf("tag-name")&&(n=!0))}while(e&&!n);return e},this.$findClosingTag=function(t,e){var n,i=e.value,o=e.value,s=0,a=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);e=t.stepForward();var l=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length),c=!1;do{if(n=e,e=t.stepForward(),e){if(">"===e.value&&!c){var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);c=!0}if(-1!==e.type.indexOf("tag-name")){if(i=e.value,o===i)if("<"===n.value)s++;else if("</"===n.value&&(s--,s<0)){t.stepBackward();var h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+2);e=t.stepForward();var f=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length);if(e=t.stepForward(),!e||">"!==e.value)return;var d=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===e.value&&(s--,s<0))h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+2),f=h,d=f,u=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(e&&s>=0);if(a&&u&&h&&d&&l&&f)return{openTag:new r(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new r(h.start.row,h.start.column,d.end.row,d.end.column),openTagName:l,closeTagName:f}},this.$findOpeningTag=function(t,e){var n=t.getCurrentToken(),i=e.value,o=0,s=t.getCurrentTokenRow(),a=t.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);t.stepForward();var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length);if(e=t.stepForward(),e&&">"===e.value){var h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);t.stepBackward(),t.stepBackward();do{if(e=n,s=t.getCurrentTokenRow(),a=t.getCurrentTokenColumn(),l=a+e.value.length,n=t.stepBackward(),e)if(-1!==e.type.indexOf("tag-name")){if(i===e.value)if("<"===n.value){if(o++,o>0){var f=new r(s,a,s,l),d=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);do{e=t.stepForward()}while(e&&">"!==e.value);var p=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===e.value){var g=0,m=n;while(m){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=t.stepBackward(),g++}for(var v=0;v<g;v++)t.stepForward()}}while(n&&o<=0);return d&&p&&c&&h&&f&&u?{openTag:new r(d.start.row,d.start.column,p.end.row,p.end.column),closeTag:new r(c.start.row,c.start.column,h.end.row,h.end.column),openTagName:f,closeTagName:u}:void 0}}}e.BracketMatch=o})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./bidihandler").BidiHandler,s=t("./config"),a=t("./lib/event_emitter").EventEmitter,l=t("./selection").Selection,c=t("./mode/text").Mode,u=t("./range").Range,h=t("./document").Document,f=t("./background_tokenizer").BackgroundTokenizer,d=t("./search_highlight").SearchHighlight,p=function(t,e){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++p.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new f((new c).getTokenizer(),this);var n=this;this.bgTokenizer.on("update",(function(t){n._signal("tokenizerUpdate",t)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new h(t)),this.setDocument(t),this.selection=new l(this),this.$bidiHandler=new o(this),s.resetOptions(this),this.setMode(e),s._signal("session",this),this.destroyed=!1};p.$uid=0,function(){i.implement(this,a),this.setDocument=function(t){this.doc&&this.doc.off("change",this.$onChange),this.doc=t,t.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(t){if(!t)return this.$docRowCache=[],void(this.$screenRowCache=[]);var e=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,t)+1;e>n&&(this.$docRowCache.splice(n,e),this.$screenRowCache.splice(n,e))},this.$getRowCacheIndex=function(t,e){var n=0,i=t.length-1;while(n<=i){var r=n+i>>1,o=t[r];if(e>o)n=r+1;else{if(!(e<o))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},this.onChangeFold=function(t){var e=t.data;this.$resetRowCache(e.start.row)},this.onChange=function(t){this.$modified=!0,this.$bidiHandler.onChange(t),this.$resetRowCache(t.start.row);var e=this.$updateInternalDataOnChange(t);!this.$fromUndo&&this.$undoManager&&(e&&e.length&&(this.$undoManager.add({action:"removeFolds",folds:e},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(t,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._signal("change",t)},this.setValue=function(t){this.doc.setValue(t),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(t){return this.bgTokenizer.getState(t)},this.getTokens=function(t){return this.bgTokenizer.getTokens(t)},this.getTokenAt=function(t,e){var n,i=this.bgTokenizer.getTokens(t),r=0;if(null==e){var o=i.length-1;r=this.getLine(t).length}else for(o=0;o<i.length;o++)if(r+=i[o].value.length,r>=e)break;return n=i[o],n?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(t){if(this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;t.addSession(this),this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(t){this.setOption("tabSize",t)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(t){this.setOption("overwrite",t)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e<t.length;e++)this.$breakpoints[t[e]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(t,e){void 0===e&&(e="ace_breakpoint"),e?this.$breakpoints[t]=e:delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(t){delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},this.addMarker=function(t,e,n,i){var r=this.$markerId++,o={range:t,type:n||"line",renderer:"function"==typeof n?n:null,clazz:e,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(t,e){if(t.update){var n=this.$markerId++;return t.id=n,t.inFront=!!e,e?(this.$frontMarkers[n]=t,this._signal("changeFrontMarker")):(this.$backMarkers[n]=t,this._signal("changeBackMarker")),t}},this.removeMarker=function(t){var e=this.$frontMarkers[t]||this.$backMarkers[t];if(e){var n=e.inFront?this.$frontMarkers:this.$backMarkers;delete n[t],this._signal(e.inFront?"changeFrontMarker":"changeBackMarker")}},this.getMarkers=function(t){return t?this.$frontMarkers:this.$backMarkers},this.highlight=function(t){if(!this.$searchHighlight){var e=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(e)}this.$searchHighlight.setRegexp(t)},this.highlightLines=function(t,e,n,i){"number"!=typeof e&&(n=e,e=t),n||(n="ace_step");var r=new u(t,0,e,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(t){this.$annotations=t,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},this.getWordRange=function(t,e){var n=this.getLine(t),i=!1;if(e>0&&(i=!!n.charAt(e-1).match(this.tokenRe)),i||(i=!!n.charAt(e).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(e-1,e+1)))r=/\s/;else r=this.nonTokenRe;var o=e;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}var s=e;while(s<n.length&&n.charAt(s).match(r))s++;return new u(t,o,t,s)},this.getAWordRange=function(t,e){var n=this.getWordRange(t,e),i=this.getLine(n.end.row);while(i.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},this.setNewLineMode=function(t){this.doc.setNewLineMode(t)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(t){this.setOption("useWorker",t)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(t){var e=t.data;this.bgTokenizer.start(e.first),this._signal("tokenizerUpdate",t)},this.$modes=s.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(t,e){if(t&&"object"===typeof t){if(t.getTokenizer)return this.$onChangeMode(t);var n=t,i=n.path}else i=t||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(e&&e());this.$modeId=i,s.loadModule(["mode",i],function(t){if(this.$modeId!==i)return e&&e();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):t&&t.Mode&&(t=new t.Mode(n),n||(this.$modes[i]=t,t.$id=i),this.$onChangeMode(t)),e&&e()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(t,e){if(e||(this.$modeId=t.$id),this.$mode!==t){var n=this.$mode;this.$mode=t,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=t.getTokenizer();if(void 0!==i.on){var r=this.onReloadTokenizer.bind(this);i.on("update",r)}this.bgTokenizer.setTokenizer(i),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=t.tokenRe,this.nonTokenRe=t.nonTokenRe,e||(t.attachToSession&&t.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(t.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:t}))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(t){s.warn("Could not load worker",t),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(t){this.$scrollTop===t||isNaN(t)||(this.$scrollTop=t,this._signal("changeScrollTop",t))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(t){this.$scrollLeft===t||isNaN(t)||(this.$scrollLeft=t,this._signal("changeScrollLeft",t))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach((function(e){e&&e.screenWidth>t&&(t=e.screenWidth)})),this.lineWidgetWidth=t},this.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=e.length,l=0;l<a;l++){if(l>s){if(l=o.end.row+1,l>=a)break;o=this.$foldData[r++],s=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(e[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(t){return this.doc.getLine(t)},this.getLines=function(t,e){return this.doc.getLines(t,e)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},this.insert=function(t,e){return this.doc.insert(t,e)},this.remove=function(t){return this.doc.remove(t)},this.removeFullLines=function(t,e){return this.doc.removeFullLines(t,e)},this.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=t.length-1;-1!=n;n--){var i=t[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!e&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},this.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=0;n<t.length;n++){var i=t[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!e&&this.$undoSelect&&(t.selectionAfter?this.selection.fromJSON(t.selectionAfter):this.selection.setRange(this.$getUndoSelection(t,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(t){this.$undoSelect=t},this.$getUndoSelection=function(t,e){function n(t){return e?"insert"!==t.action:"insert"===t.action}for(var i,r,o=0;o<t.length;o++){var s=t[o];s.start&&(i?n(s)?(r=s.start,-1==i.compare(r.row,r.column)&&i.setStart(r),r=s.end,1==i.compare(r.row,r.column)&&i.setEnd(r)):(r=s.start,-1==i.compare(r.row,r.column)&&(i=u.fromPoints(s.start,s.start))):i=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return i},this.replace=function(t,e){return this.doc.replace(t,e)},this.moveText=function(t,e,n){var i=this.getTextRange(t),r=this.getFoldsInRange(t),o=u.fromPoints(e,e);if(!n){this.remove(t);var s=t.start.row-t.end.row,a=s?-t.end.column:t.start.column-t.end.column;a&&(o.start.row==t.end.row&&o.start.column>t.end.column&&(o.start.column+=a),o.end.row==t.end.row&&o.end.column>t.end.column&&(o.end.column+=a)),s&&o.start.row>=t.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var l=t.start,c=o.start;s=c.row-l.row,a=c.column-l.column;this.addFolds(r.map((function(t){return t=t.clone(),t.start.row==l.row&&(t.start.column+=a),t.end.row==l.row&&(t.end.column+=a),t.start.row+=s,t.end.row+=s,t})))}return o},this.indentRows=function(t,e,n){n=n.replace(/\t/g,this.getTabString());for(var i=t;i<=e;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(t){for(var e=t.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i;++s)if(" "!=o.charAt(s))break;s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(t,e,n){if(t=this.getRowFoldStart(t),e=this.getRowFoldEnd(e),n<0){var i=this.getRowFoldStart(t+n);if(i<0)return 0;var r=i-t}else if(n>0){i=this.getRowFoldEnd(e+n);if(i>this.doc.getLength()-1)return 0;r=i-e}else{t=this.$clipRowToDocument(t),e=this.$clipRowToDocument(e);r=e-t+1}var o=new u(t,0,e,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(t){return t=t.clone(),t.start.row+=r,t.end.row+=r,t})),a=0==n?this.doc.getLines(t,e):this.doc.removeFullLines(t,e);return this.doc.insertFullLines(t+r,a),s.length&&this.addFolds(s),r},this.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},this.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},this.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},this.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},this.$clipColumnToRow=function(t,e){return e<0?0:Math.min(this.doc.getLine(t).length,e)},this.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),t<0)t=0,e=0;else{var n=this.doc.getLength();t>=n?(t=n-1,e=this.doc.getLine(n-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},this.$clipRangeToDocument=function(t){t.start.row<0?(t.start.row=0,t.start.column=0):t.start.column=this.$clipColumnToRow(t.start.row,t.start.column);var e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=Array(e),this.$updateWrapData(0,e-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(t,e){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===e||(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(t,e){var n=this.$wrapLimitRange;n.max<0&&(n={min:e,max:e});var i=this.$constrainWrapLimit(t,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(t,e,n){return e&&(t=Math.max(e,t)),n&&(t=Math.min(n,t)),t},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(t){var e=this.$useWrapMode,n=t.action,i=t.start,r=t.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[e?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(t),this.removeFolds(l);var u=this.getFoldLine(r.row),h=0;if(u){u.addRemoveChars(r.row,r.column,i.column-r.column),u.shiftRow(-a);var f=this.getFoldLine(o);f&&f!==u&&(f.merge(u),u=f),h=c.indexOf(u)+1}for(h;h<c.length;h++){u=c[h];u.start.row>=r.row&&u.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var p=e?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,u=this.getFoldLine(o),h=0;if(u){var g=u.range.compareInside(i.row,i.column);0==g?(u=u.split(i.row,i.column),u&&(u.shiftRow(a),u.addRemoveChars(s,0,r.column-i.column))):-1==g&&(u.addRemoveChars(o,0,r.column-i.column),u.shiftRow(a)),h=c.indexOf(u)+1}for(h;h<c.length;h++){u=c[h];u.start.row>=o&&u.shiftRow(a)}}else{a=Math.abs(t.start.column-t.end.column),"remove"===n&&(l=this.getFoldsInRange(t),this.removeFolds(l),a=-a);u=this.getFoldLine(o);u&&u.addRemoveChars(o,i.column,a)}return e&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,e?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(t,e,n){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},this.$updateWrapData=function(t,e){var i,r,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=t;e=Math.min(e,s.length-1);while(u<=e)r=this.getFoldLine(u,r),r?(i=[],r.walk(function(t,e,r,a){var l;if(null!=t){l=this.$getDisplayTokens(t,i.length),l[0]=n;for(var c=1;c<l.length;c++)l[c]=o}else l=this.$getDisplayTokens(s[e].substring(a,r),i.length);i=i.concat(l)}.bind(this),r.end.row,s[r.end.row].length+1),l[r.start.row]=this.$computeWrapSplits(i,c,a),u=r.end.row+1):(i=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(i,c,a),u++)};var t=1,e=2,n=3,o=4,l=9,h=10,f=11,p=12;function g(t){return!(t<4352)&&(t>=4352&&t<=4447||t>=4515&&t<=4519||t>=4602&&t<=4607||t>=9001&&t<=9002||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12283||t>=12288&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12589||t>=12593&&t<=12686||t>=12688&&t<=12730||t>=12736&&t<=12771||t>=12784&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=13054||t>=13056&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=55216&&t<=55238||t>=55243&&t<=55291||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510)}this.$computeWrapSplits=function(t,i,r){if(0==t.length)return[];var s=[],a=t.length,c=0,u=0,d=this.$wrapAsCode,g=this.$indentedSoftWrap,m=i<=Math.max(2*r,8)||!1===g?0:Math.floor(i/2);function v(){var e=0;if(0===m)return e;if(g)for(var n=0;n<t.length;n++){var i=t[n];if(i==h)e+=1;else{if(i!=f){if(i==p)continue;break}e+=r}}return d&&!1!==g&&(e+=r),Math.min(e,m)}function y(e){for(var n=e-c,i=c;i<e;i++){var r=t[i];12!==r&&2!==r||(n-=1)}s.length||(w=v(),s.indent=w),u+=n,s.push(u),c=e}var w=0;while(a-c>i-w){var b=c+i-w;if(t[b-1]>=h&&t[b]>=h)y(b);else if(t[b]!=n&&t[b]!=o){var _=Math.max(b-(i-(i>>2)),c-1);while(b>_&&t[b]<n)b--;if(d){while(b>_&&t[b]<n)b--;while(b>_&&t[b]==l)b--}else while(b>_&&t[b]<h)b--;b>_?y(++b):(b=c+i,t[b]==e&&b--,y(b-w))}else{for(b;b!=c-1;b--)if(t[b]==n)break;if(b>c){y(b);continue}for(b=c+i,b;b<t.length;b++)if(t[b]!=o)break;if(b==t.length)break;y(b)}}return s},this.$getDisplayTokens=function(n,i){var r,o=[];i=i||0;for(var s=0;s<n.length;s++){var a=n.charCodeAt(s);if(9==a){r=this.getScreenTabSize(o.length+i),o.push(f);for(var c=1;c<r;c++)o.push(p)}else 32==a?o.push(h):a>39&&a<48||a>57&&a<64?o.push(l):a>=4352&&g(a)?o.push(t,e):o.push(t)}return o},this.$getStringScreenWidth=function(t,e,n){if(0==e)return[0,0];var i,r;for(null==e&&(e=1/0),n=n||0,r=0;r<t.length;r++)if(i=t.charCodeAt(r),9==i?n+=this.getScreenTabSize(n):i>=4352&&g(i)?n+=2:n+=1,n>e)break;return[n,r]},this.lineWidgets=null,this.getRowLength=function(t){var e=1;return this.lineWidgets&&(e+=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0),this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+e:e},this.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},this.getRowWrapIndent=function(t){if(this.$useWrapMode){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE),n=this.$wrapData[e.row];return n.length&&n[0]<e.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(t){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},this.getDocumentLastRowColumn=function(t,e){var n=this.documentToScreenRow(t,e);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(t,e){var n=this.documentToScreenRow(t,e);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(t){return this.$useWrapMode?this.$wrapData[t]:void 0},this.getScreenTabSize=function(t){return this.$tabSize-(t%this.$tabSize|0)},this.screenToDocumentRow=function(t,e){return this.screenToDocumentPosition(t,e).row},this.screenToDocumentColumn=function(t,e){return this.screenToDocumentPosition(t,e).column},this.screenToDocumentPosition=function(t,e,n){if(t<0)return{row:0,column:0};var i,r,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,t),h=c.length;if(h&&u>=0){a=c[u],o=this.$docRowCache[u];var f=t>c[h-1]}else f=!h;var d=this.getLength()-1,p=this.getNextFoldLine(o),g=p?p.start.row:1/0;while(a<=t){if(l=this.getRowLength(o),a+l>t||o>=d)break;a+=l,o++,o>g&&(o=p.end.row+1,p=this.getNextFoldLine(o,p),g=p?p.start.row:1/0),f&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(p&&p.start.row<=o)i=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+l<=t||o>d)return{row:d,column:this.getLine(d).length};i=this.getLine(o),p=null}var m=0,v=Math.floor(t-a);if(this.$useWrapMode){var y=this.$wrapData[o];y&&(r=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(e=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,e-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),p?p.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(t,e){if("undefined"===typeof e)var n=this.$clipPositionToDocument(t.row,t.column);else n=this.$clipPositionToDocument(t,e);t=n.row,e=n.column;var i=0,r=null,o=null;o=this.getFoldAt(t,e,1),o&&(t=o.start.row,e=o.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,t),u=l.length;if(u&&c>=0){a=l[c],i=this.$screenRowCache[c];var h=t>l[u-1]}else h=!u;var f=this.getNextFoldLine(a),d=f?f.start.row:1/0;while(a<t){if(a>=d){if(s=f.end.row+1,s>t)break;f=this.getNextFoldLine(s,f),d=f?f.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var p="";f&&a>=d?(p=this.getFoldDisplayLine(f,t,e),r=f.start.row):(p=this.getLine(t).substring(0,e),r=t);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){var v=0;while(p.length>=m[v])i++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},this.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},this.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode){var n=this.$wrapData.length,i=0,r=(a=0,e=this.$foldData[a++],e?e.start.row:1/0);while(i<n){var o=this.$wrapData[i];t+=o?o.length+1:1,i++,i>r&&(i=e.end.row+1,e=this.$foldData[a++],r=e?e.start.row:1/0)}}else{t=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e=s[a],t-=e.end.row-e.start.row}return this.lineWidgets&&(t+=this.$getWidgetScreenLength()),t},this.$setFontMetrics=function(t){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,n,i){if(0===n)return[0,0];var r,o;for(n||(n=1/0),i=i||0,o=0;o<e.length;o++)if(r=e.charAt(o),i+="\t"===r?this.getScreenTabSize(i):t.getCharacterWidth(r),i>n)break;return[i,o]})},this.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=g}.call(p.prototype),t("./edit_session/folding").Folding.call(p.prototype),t("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t)if(this.$wrap=t,t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){t="auto"==t?"text"!=this.$mode.type:"text"!=t,t!=this.$wrapAsCode&&(this.$wrapAsCode=t,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){t=parseInt(t),t>0&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(t){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./lib/oop"),o=t("./range").Range,s=function(){this.$options={}};function a(t,e){function n(t){return/\w/.test(t)||e.regExp?"\\b":""}return n(t[0])+t+n(t[t.length-1])}(function(){this.set=function(t){return r.mixin(this.$options,t),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var i=null;return n.forEach((function(t,n,r,s){return i=new o(t,n,r,s),!(n==s&&e.start&&e.start.start&&0!=e.skipCurrent&&i.isEqual(e.start))||(i=null,!1)})),i},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,r=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),s=[],a=e.re;if(e.$isMultiLine){var l,c=a.length,u=r.length-c;t:for(var h=a.offset||0;h<=u;h++){for(var f=0;f<c;f++)if(-1==r[h+f].search(a[f]))continue t;var d=r[h],p=r[h+c-1],g=d.length-d.match(a[0])[0].length,m=p.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new o(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<r.length;v++){var y=i.getMatchOffsets(r[v],a);for(f=0;f<y.length;f++){var w=y[f];s.push(new o(v,w.offset,v,w.offset+w.length))}}if(n){var b=n.start.column,_=n.end.column;v=0,f=s.length-1;while(v<f&&s[v].start.column<b&&0==s[v].start.row)v++;var S=n.end.row-n.start.row;while(v<f&&s[f].end.column>_&&s[f].end.row==S)f--;for(s=s.slice(v,f+1),v=0,f=s.length;v<f;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(t,e){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(i){var r=i.exec(t);if(!r||r[0].length!=t.length)return null;if(e=t.replace(i,e),n.preserveCase){e=e.split("");for(var o=Math.min(t.length,t.length);o--;){var s=t[o];s&&s.toLowerCase()!=s?e[o]=e[o].toUpperCase():e[o]=e[o].toLowerCase()}e=e.join("")}return e}},this.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=i.escapeRegExp(n)),t.wholeWord&&(n=a(n,t));var r=t.caseSensitive?"gm":"gmi";if(t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(s){o=!1}return t.re=o},this.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],e))}catch(o){return!1}return i},this.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var i=1==e.backwards,r=0!=e.skipCurrent,o=e.range,s=e.start;s||(s=o?o[i?"end":"start"]:t.selection.getRange()),s.start&&(s=s[r!=i?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:t.getLength()-1;if(i)var c=function(t){var n=s.row;if(!h(n,s.column,t)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,t))return}};else c=function(t){var n=s.row;if(!h(n,s.column,t)){for(n+=1;n<=l;n++)if(h(n,0,t))return;if(0!=e.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,t))return}};if(e.$isMultiLine)var u=n.length,h=function(e,r,o){var s=i?e-u+1:e;if(!(s<0||s+u>t.getLength())){var a=t.getLine(s),l=a.search(n[0]);if(!(!i&&l<r||-1===l)){for(var c=1;c<u;c++)if(a=t.getLine(s+c),-1==a.search(n[c]))return;var h=a.match(n[u-1])[0].length;if(!(i&&h>r))return!!o(s,l,s+u-1,h)||void 0}}};else if(i)h=function(e,i,r){var o,s=t.getLine(e),a=[],l=0;n.lastIndex=0;while(o=n.exec(s)){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];c=a[u];if(r(e,h,e,h+c))return!0}};else h=function(e,i,r){var o,s,a=t.getLine(e);n.lastIndex=i;while(s=n.exec(a)){var l=s[0].length;if(o=s.index,r(e,o,e,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),e.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../lib/useragent"),o=i.KEY_MODS;function s(t,e){this.platform=e||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,e){s.call(this,t,e),this.$singleCommand=!1}a.prototype=s.prototype,function(){function t(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,e){var n=t&&("string"===typeof t?t:t.name);t=this.commands[n],e||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==t)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(t);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(t,e,n){if("object"==typeof t&&t&&(void 0==n&&(n=t.position),t=t[this.platform]),t)return"function"==typeof e?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach((function(t){var i="";if(-1!=t.indexOf(" ")){var r=t.split(/\s+/);t=r.pop(),r.forEach((function(t){var e=this.parseKeys(t),n=o[e.hashId]+e.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(t),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,e,n)}),this)},this._addCommandToBinding=function(e,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[e]||this.$singleCommand)o[e]=n;else{Array.isArray(o[e])?-1!=(r=o[e].indexOf(n))&&o[e].splice(r,1):o[e]=[o[e]],"number"!=typeof i&&(i=t(n));var s=o[e];for(r=0;r<s.length;r++){var a=s[r],l=t(a);if(l>i)break}s.splice(r,0,n)}else delete o[e]},this.addCommands=function(t){t&&Object.keys(t).forEach((function(e){var n=t[e];if(n){if("string"===typeof n)return this.bindKey(n,e);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=e),this.addCommand(n))}}),this)},this.removeCommands=function(t){Object.keys(t).forEach((function(e){this.removeCommand(t[e])}),this)},this.bindKeys=function(t){Object.keys(t).forEach((function(e){this.bindKey(e,t[e])}),this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(t){return t})),n=e.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=e.length;s--;){var a=i.KEY_MODS[e[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[s]+" in "+t),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(t,e){var n=o[t]+e;return this.commandKeyBinding[n]},this.handleKeyboard=function(t,e,n,i){if(!(i<0)){var r=o[e]+n,s=this.commandKeyBinding[r];return t.$keyChain&&(t.$keyChain+=" "+r,s=this.commandKeyBinding[t.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(t.$keyChain&&(e&&4!=e||1!=n.length?(-1==e||i>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-r.length-1)),{command:s}):(t.$keyChain=t.$keyChain||r,{command:"null"})}},this.getStatusText=function(t,e){return e.$keyChain||""}}.call(s.prototype),e.HashHandler=s,e.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../keyboard/hash_handler").MultiHashHandler,o=t("../lib/event_emitter").EventEmitter,s=function(t,e){r.call(this,e,t),this.byName=this.commands,this.setDefaultHandler("exec",(function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(t,e,n){if(Array.isArray(t)){for(var i=t.length;i--;)if(this.exec(t[i],e,n))return!0;return!1}if("string"===typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e))return!1;var r={editor:e,command:t,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(t){if(!this.$inReplay)return t&&t._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach((function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(t){return t.map((function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t}))}}.call(s.prototype),e.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(t,e,n){"use strict";var i=t("../lib/lang"),r=t("../config"),o=t("../range").Range;function s(t,e){return{win:t,mac:e}}e.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",(function(e){e.init(t),t.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(t){r.loadModule("./ext/error_marker",(function(e){e.showErrorMarker(t,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("./ext/error_marker",(function(e){e.showErrorMarker(t,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(t,e){"number"!==typeof e||isNaN(e)||t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty(),n=e?t.selection.getLineRange():t.selection.getRange();t._emit("cut",n),n.isEmpty()||t.session.remove(n),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(i.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(t){for(var e=t.selection.isBackwards(),n=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),s=t.session.doc.getLine(n.row).length,a=t.session.doc.getTextRange(t.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=t.session.doc.getLine(n.row),u=n.row+1;u<=r.row+1;u++){var h=i.stringTrimLeft(i.stringTrimRight(t.session.doc.getLine(u)));0!==h.length&&(h=" "+h),c+=h}r.row+1<t.session.doc.getLength()-1&&(c+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new o(n.row,0,r.row+2,0),c),l>0?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+l)):(s=t.session.doc.getLine(n.row).length>s?s+1:s,t.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(t){var e=t.session.doc.getLength()-1,n=t.session.doc.getLine(e).length,i=t.selection.rangeList.ranges,r=[];i.length<1&&(i=[t.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===e&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,e,n))),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));t.exitMultiSelectMode(),t.clearSelection();for(s=0;s<r.length;s++)t.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var e=t.getCursorPosition();t.selection.moveTo(e.row-1,Number.MAX_VALUE),t.insert("\n"),0===e.row&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:s("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)e.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(t,e,n){"use strict";var i=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/lang"),a=t("./lib/useragent"),l=t("./keyboard/textinput").TextInput,c=t("./mouse/mouse_handler").MouseHandler,u=t("./mouse/fold_handler").FoldHandler,h=t("./keyboard/keybinding").KeyBinding,f=t("./edit_session").EditSession,d=t("./search").Search,p=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,m=t("./commands/command_manager").CommandManager,v=t("./commands/default_commands").commands,y=t("./config"),w=t("./token_iterator").TokenIterator,b=t("./clipboard"),_=function(t,e,n){this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.id="editor"+ ++_.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(t,e){e._$emitInputEvent.schedule(31)})),this.setSession(e||n&&n.session||new f("")),y.resetOptions(this),n&&this.setOptions(n),y._signal("editor",this)};_.$uid=0,function(){r.implement(this,g),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(t){if(this.curOp){if(!t||this.curOp.command)return;this.prevOp=this.curOp}t||(this.previousCommand=null,t={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:t.command||{},args:t.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(t){if(this.curOp&&this.session){if(t&&!1===t.returnValue||!this.session)return this.curOp=null;if(1==t&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var e=this.curOp.command,n=e&&e.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,n=this.$mergeableCommands,i=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(t,e){if(t&&"string"===typeof t&&"ace"!=t){this.$keybindingId=t;var n=this;y.loadModule(["keybinding",t],(function(i){n.$keybindingId==t&&n.keyBinding.setKeyboardHandler(i&&i.handler),e&&e()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),e&&e()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(t){if(this.session!=t){this.curOp&&this.endOperation(),this.curOp={};var e=this.session;if(e){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=t,t?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=t.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(t)),this._signal("changeSession",{session:t,oldSession:e}),this.curOp=null,e&&e._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&!t.destroyed&&t.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(t){this.renderer.onResize(t)},this.setTheme=function(t,e){this.renderer.setTheme(t,e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(t){this.renderer.setStyle(t)},this.unsetStyle=function(t){this.renderer.unsetStyle(t)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(t){this.setOption("fontSize",t)},this.$highlightBrackets=function(){if(!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout((function(){t.$highlightPending=!1;var e=t.session;if(e&&!e.destroyed){e.$bracketHighlight&&(e.$bracketHighlight.markerIds.forEach((function(t){e.removeMarker(t)})),e.$bracketHighlight=null);var n=t.getCursorPosition(),i=t.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(t),o=e.getMatchingBracketRanges(n,r);if(!o){var s=new w(e,n.row,n.column),a=s.getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var l=e.getMatchingTags(n);l&&(o=[l.openTagName,l.closeTagName])}}if(!o&&e.$mode.getMatching&&(o=e.$mode.getMatching(t.session)),o){var c="ace_bracket";Array.isArray(o)?1==o.length&&(c="ace_error_bracket"):o=[o],2==o.length&&(0==p.comparePoints(o[0].end,o[1].start)?o=[p.fromPoints(o[0].start,o[1].end)]:0==p.comparePoints(o[0].start,o[1].end)&&(o=[p.fromPoints(o[1].start,o[0].end)])),e.$bracketHighlight={ranges:o,markerIds:o.map((function(t){return e.addMarker(t,c,"text")}))},t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}else t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(t){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",t))},this.onBlur=function(t){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",t))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(t){var e=this.session.$useWrapMode,n=t.start.row==t.end.row?t.end.row:1/0;this.renderer.updateLines(t.start.row,n,e),this._signal("change",t),this.$cursorChange()},this.onTokenizerUpdate=function(t){var e=t.data;this.renderer.updateLines(e.first,e.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var t,e=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var n=e.start.column,i=e.end.column,r=t.getLine(e.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var t=this.getSelectedText(),e=this.session.doc.getNewLineCharacter(),n=!1;if(!t&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;r<i.length;r++){var o=i[r];r&&i[r-1].start.row==o.start.row||(t+=this.session.getLine(o.start.row)+e)}}var s={text:t};return this._signal("copy",s),b.lineMode=!!n&&s.text,s.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(t,e){var n={text:t,event:e};this.commands.exec("paste",this,n)},this.$handlePaste=function(t){"string"==typeof t&&(t={text:t}),this._signal("paste",t);var e=t.text,n=e===b.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?i.insert({row:this.selection.lead.row,column:0},e):this.insert(e);else if(n)this.selection.rangeList.ranges.forEach((function(t){i.insert({row:t.start.row,column:0},e)}));else{var r=e.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=2==r.length&&(!r[0]||!r[1]);if(r.length!=o.length||s)return this.commands.exec("insertstring",this,e);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||i.remove(l),i.insert(l.start,r[a])}}},this.execCommand=function(t,e){return this.commands.exec(t,this,e)},this.insert=function(t,e){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!e){var o=i.transformAction(n.getState(r.row),"insertion",this,n,t);o&&(t!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),t=o.text)}if("\t"==t&&(t=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==t.indexOf("\n")){s=new p.fromPoints(r,r);s.end.column+=t.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==t||"\r\n"==t){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,t));if(n.insert(r,t),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(t)){var f=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},f)}h&&i.autoOutdent(u,n,r.row)}},this.autoIndent=function(){var t,e,n=this.session,i=n.getMode();if(this.selection.isEmpty())t=0,e=n.doc.getLength()-1;else{var r=this.getSelectionRange();t=r.start.row,e=r.end.row}for(var o,s,a,l="",c="",u="",h=n.getTabString(),f=t;f<=e;f++)f>0&&(l=n.getState(f-1),c=n.getLine(f-1),u=i.getNextLineIndent(l,c,h)),o=n.getLine(f),s=i.$getIndent(o),u!==s&&(s.length>0&&(a=new p(f,0,f,s.length),n.remove(a)),u.length>0&&n.insert({row:f,column:0},u)),i.autoOutdent(l,n,f)},this.onTextInput=function(t,e){if(!e)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,t,e);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(t,e){if(e.extendLeft||e.extendRight){var n=this.selection.getRange();n.start.column-=e.extendLeft,n.end.column+=e.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),t||n.isEmpty()||this.remove()}if(!t&&this.selection.isEmpty()||this.insert(t,!0),e.restoreStart||e.restoreEnd){n=this.selection.getRange();n.start.column-=e.restoreStart,n.end.column-=e.restoreEnd,this.selection.setRange(n)}},this.onCommandKey=function(t,e,n){return this.keyBinding.onCommandKey(t,e,n)},this.setOverwrite=function(t){this.session.setOverwrite(t)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(t){this.setOption("dragDelay",t)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(t){this.renderer.setHighlightIndentGuides(t)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(t){this.setOption("readOnly",t)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(e.start.row),r=n.getMode().transformAction(i,"deletion",this,n,e);if(0===e.end.column){var o=n.getTextRange(e);if("\n"==o[o.length-1]){var s=n.getLine(e.end.row);/^\s+$/.test(s)&&(e.end.column=s.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},this.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var n,i,r=this.session.getLine(t.row);e<r.length?(n=r.charAt(e)+r.charAt(e-1),i=new p(t.row,e-1,t.row,e+1)):(n=r.charAt(e-1)+r.charAt(e-2),i=new p(t.row,e-2,t.row,e)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},this.toLowerCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toLowerCase()),this.selection.setSelectionRange(t)},this.toUpperCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toUpperCase()),this.selection.setSelectionRange(t)},this.indent=function(){var t=this.session,e=this.getSelectionRange();if(!(e.start.row<e.end.row)){if(e.start.column<e.end.column){var n=t.getTextRange(e);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void t.indentRows(u.first,u.last,"\t")}}var i=t.getLine(e.start.row),r=e.start,o=t.getTabSize(),a=t.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=o-a%o,c=s.stringRepeat(" ",l);else{l=a%o;while(" "==i[e.start.column-1]&&l)e.start.column--,l--;this.selection.setSelectionRange(e),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();t.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var t=this.$getSelectedRows();this.session.indentRows(t.first,t.last,"\t")},this.blockOutdent=function(){var t=this.session.getSelection();this.session.outdentRows(t.getRange())},this.sortLines=function(){for(var t=this.$getSelectedRows(),e=this.session,n=[],i=t.first;i<=t.last;i++)n.push(e.getLine(i));n.sort((function(t,e){return t.toLowerCase()<e.toLowerCase()?-1:t.toLowerCase()>e.toLowerCase()?1:0}));var r=new p(0,0,0,0);for(i=t.first;i<=t.last;i++){var o=e.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,e.replace(r,n[i-t.first])}},this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},this.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,n,t)},this.getNumberAt=function(t,e){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var i=this.session.getLine(t);while(n.lastIndex<e){var r=n.exec(i);if(r.index<=e&&r.index+r[0].length>=e){var o={value:r[0],start:r.index,end:r.index+r[0].length};return o}}return null},this.modifyNumber=function(t){var e=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new p(e,n-1,e,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(e,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?t*=Math.pow(10,o.end-n-1):t*=Math.pow(10,o.end-n),l+=t,l/=Math.pow(10,a);var c=l.toFixed(a),u=new p(e,o.start,e,o.end);this.session.replace(u,c),this.moveCursorTo(e,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){var t=this.selection.getCursor().row,e=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),i=this.selection.getWordRange().start.column,r=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=e-i-1;o<0&&(o=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&r.forEach((function(e,r){l=a+e.length,o>=a&&o<=l&&(n=e,c.selection.clearSelection(),c.moveCursorTo(t,a+i),c.selection.selectTo(t,l+i)),a=l}));for(var u,h=this.$toggleWordPairs,f=0;f<h.length;f++)for(var d=h[f],p=0;p<=1;p++){var g=+!p,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(d[p])+")\\s?$","i"));if(m){var v=n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"));v&&(u=n.replace(new RegExp(s.escapeRegExp(d[p]),"i"),(function(t){var e=d[g];return t.toUpperCase()==t?e=e.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(e=e.substr(0,0)+d[g].charAt(0).toUpperCase()+e.substr(1)),e})),this.insert(u),u="")}}},this.findLinkAt=function(t,e){var n,r,o=this.session.getLine(t),s=o.split(/((?:https?|ftp):\/\/[\S]+)/),a=e;a<0&&(a=0);var l,c=0,u=0;try{for(var h=i(s),f=h.next();!f.done;f=h.next()){var d=f.value;if(u=c+d.length,a>=c&&a<=u&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){l=d.replace(/[\s:.,'";}\]]+$/,"");break}c=u}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return l},this.openLink=function(){var t=this.selection.getCursor(),e=this.findLinkAt(t.row,t.column);return e&&window.open(e,"_blank"),null!=e},this.removeLines=function(){var t=this.$getSelectedRows();this.session.removeFullLines(t.first,t.last),this.clearSelection()},this.duplicateSelection=function(){var t=this.selection,e=this.session,n=t.getRange(),i=t.isBackwards();if(n.isEmpty()){var r=n.start.row;e.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=e.insert(o,e.getTextRange(n),!1);n.start=o,n.end=s,t.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(t,e,n){return this.session.moveText(t,e,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(t,e){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,e?0:t),e&&-1==t&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0),n=this.$getSelectedRows(s[u]);var f=n.first,d=n.last;while(++u<c){l&&s[u].moveBy(l,0);var p=this.$getSelectedRows(s[u]);if(e&&p.first!=d)break;if(!e&&p.first>d+1)break;d=p.last}u--,a=this.session.$moveLines(f,d,e?0:t),e&&-1==t&&(h=u+1);while(h<=u)s[h].moveBy(a,0),h++;e||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},this.onCompositionStart=function(t){this.renderer.showComposition(t)},this.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},this.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(t,e){var n=this.renderer,i=this.renderer.layerConfig,r=t*Math.floor(i.height/i.lineHeight);!0===e?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===e&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=e&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(t){this.renderer.scrollToRow(t)},this.scrollToLine=function(t,e,n,i){this.renderer.scrollToLine(t,e,n,i)},this.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},this.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},this.jumpToMatching=function(t,e){var n=this.getCursorPosition(),i=new w(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,u={},h=n.column-s.start,f={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h<s.value.length&&!c;h++)if(f[s.value[h]])switch(l=f[s.value[h]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[h]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0);break}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===r.value&&o>1?u[s.value]++:"</"===r.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(r=s,o++,s=i.stepForward(),h=0)}while(s&&!c);if(a){var d,g;if("bracket"===a)d=this.session.getBracketRange(n),d||(d=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1),g=d.start,(e||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(d=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(d=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===d.compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?(d=m.closeTag,g=d.start):(d=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?d.end:d.start))}g=g||d.start}g=d&&d.cursor||g,g&&(t?d&&e?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},this.gotoLine=function(t,e,n){this.selection.clearSelection(),this.session.unfold({row:t-1,column:e||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(t-1,e||0),this.isRowFullyVisible(t-1)||this.scrollToLine(t-1,!0,n)},this.navigateTo=function(t,e){this.selection.moveTo(t,e)},this.navigateUp=function(t){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(-t||-1,0)},this.navigateDown=function(t){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(t||1,0)},this.navigateLeft=function(t){if(this.selection.isEmpty()){t=t||1;while(t--)this.selection.moveCursorLeft()}else{var e=this.getSelectionRange().start;this.moveCursorToPosition(e)}this.clearSelection()},this.navigateRight=function(t){if(this.selection.isEmpty()){t=t||1;while(t--)this.selection.moveCursorRight()}else{var e=this.getSelectionRange().end;this.moveCursorToPosition(e)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(t,e){e&&this.$search.set(e);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,t)&&(i=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),i):i},this.replaceAll=function(t,e){e&&this.$search.set(e);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],t)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(t,e){var n=this.session.getTextRange(t);return e=this.$search.replace(n,e),null!==e?(t.end=this.session.replace(t,e),t):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(t,e,n){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&r.mixin(e,t);var i=this.selection.getRange();null==e.needle&&(t=this.session.getTextRange(i)||this.$search.$options.needle,t||(i=this.session.getWordRange(i.start.row,i.start.column),t=this.session.getTextRange(i)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:i});var o=this.$search.find(this.session);return e.preventScroll?o:o?(this.revealRange(o,n),o):(e.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},this.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},this.revealRange=function(t,e){this.session.unfold(t),this.selection.setSelectionRange(t);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==e&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(t){t.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(t){if(t){var e,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(e=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&e&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var t=n.renderer,o=t.$cursorLayer.$pixelPos,s=t.layerConfig,a=o.top-s.offset;i=o.top>=0&&a+e.top<0||!(o.top<s.height&&o.top+e.top+s.lineHeight>window.innerHeight)&&null,null!=i&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=e=null}}));this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking(/smooth/.test(t)),e.isBlinking=!this.$readOnly&&"wide"!=t,o.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},this.prompt=function(t,e,n){var i=this;y.loadModule("./ext/prompt",(function(r){r.prompt(i,t,e,n)}))}}.call(_.prototype),y.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(t){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?S.attach(this):S.detach(this)}},placeholder:{set:function(t){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var t=this.session&&(this.renderer.$composition||this.getValue());if(t&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(t||this.renderer.placeholderNode)!t&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var e=o.createElement("div");e.className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(t,e){return(Math.abs(t.selection.lead.row-e)||e+1+(e<9?"·":""))+""},getWidth:function(t,e,n){return Math.max(e.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(t,e){e.renderer.$loop.schedule(e.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};e.Editor=_})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};function r(t,e){for(var n=e;n--;){var i=t[n];if(i&&!i[0].ignore){while(n<e-1){var r=f(t[n],t[n+1]);t[n]=r[0],t[n+1]=r[1],n++}return!0}}}(function(){this.addSession=function(t){this.$session=t},this.add=function(t,e,n){if(!this.$fromUndo&&t!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===e||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev}"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t)}},this.addSelection=function(t,e){this.selections.push({value:t,rev:e||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=t)break;r.id<e&&(r.ignore=!0)}this.lastDeltas=null},this.getSelection=function(t,e){for(var n=this.selections,i=n.length;i--;){var r=n[i];if(r.rev<t)return e&&(r=n[i+1]),r}},this.getRevision=function(){return this.$rev},this.getDeltas=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=null,r=0,o=n.length;o--;){var s=n[o][0];if(s.id<e&&!i&&(i=o+1),s.id<=t){r=o+1;break}}return n.slice(r,i)},this.getChangedRanges=function(t,e){null==e&&(e=this.$rev+1)},this.getChangedLines=function(t,e){null==e&&(e=this.$rev+1)},this.undo=function(t,e){this.lastDeltas=null;var n=this.$undoStack;if(r(n,n.length)){t||(t=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var i=n.pop(),o=null;return i&&(o=t.undoChanges(i,e),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,o}},this.redo=function(t,e){if(this.lastDeltas=null,t||(t=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);y(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(t){t[0].id=++this.$maxRev}),this)}var i=this.$redoStack.pop(),r=null;return i&&(r=t.redoChanges(i,e),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,r},this.$syncRev=function(){var t=this.$undoStack,e=t[t.length-1],n=e&&e[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return this.$undoStack.length>0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(t){void 0==t&&(t=this.$rev),this.mark=t},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(t){return t?c(t):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)}}).call(i.prototype);var o=t("./range").Range,s=o.comparePoints;o.comparePoints;function a(t){return{row:t.row,column:t.column}}function l(t){return{start:a(t.start),end:a(t.end),action:t.action,lines:t.lines.slice()}}function c(t){if(t=t||this,Array.isArray(t))return t.map(c).join("\n");var e="";return t.action?(e="insert"==t.action?"+":"-",e+="["+t.lines+"]"):t.value&&(e=Array.isArray(t.value)?t.value.map(u).join("\n"):u(t.value)),t.start&&(e+=u(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function u(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function h(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)if(s(e.start,t.end)>=0)p(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;p(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)p(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;p(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)p(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;p(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)p(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;p(t,e,-1)}return[e,t]}function f(t,e){for(var n=t.length;n--;)for(var i=0;i<e.length;i++)if(!h(t[n],e[i])){while(n<t.length){while(i--)h(e[i],t[n]);i=e.length,n++}return[t,e]}return t.selectionBefore=e.selectionBefore=t.selectionAfter=e.selectionAfter=null,[e,t]}function d(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)s(t.start,e.start)<0?p(e,t,1):p(t,e,1);else if(n&&!i)s(t.start,e.end)>=0?p(t,e,-1):(s(t.start,e.start)<=0||p(t,o.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?p(e,t,-1):(s(e.start,t.start)<=0||p(e,o.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)p(e,t,-1);else{var r,a;if(!(s(e.end,t.start)<=0))return s(t.start,e.start)<0&&(r=t,t=m(t,e.start)),s(t.end,e.end)>0&&(a=m(t,e.end)),g(e.end,t.start,t.end,-1),a&&!r&&(t.lines=a.lines,t.start=a.start,t.end=a.end,a=t),[e,r,a].filter(Boolean);p(t,e,-1)}return[e,t]}function p(t,e,n){g(t.start,e.start,e.end,n),g(t.end,e.start,e.end,n)}function g(t,e,n,i){t.row==(1==i?e:n).row&&(t.column+=i*(n.column-e.column)),t.row+=i*(n.row-e.row)}function m(t,e){var n=t.lines,i=t.end;t.end=a(e);var r=t.end.row-t.start.row,o=n.splice(r,n.length),s=r?e.column:e.column-t.start.column;n.push(o[0].substring(0,s)),o[0]=o[0].substr(s);var l={start:a(e),end:i,lines:o,action:t.action};return l}function v(t,e){e=l(e);for(var n=t.length;n--;){for(var i=t[n],r=0;r<i.length;r++){var o=i[r],s=d(o,e);e=s[0],2!=s.length&&(s[2]?(i.splice(r+1,1,s[1],s[2]),r++):s[1]||(i.splice(r,1),r--))}i.length||t.splice(n,1)}return t}function y(t,e){for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i.length;r++)v(t,i[r])}e.UndoManager=i})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(t,e){this.element=t,this.canvasHeight=e||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(t){i.translate(this.element,0,-t.firstRowScreen*t.lineHeight%this.canvasHeight-t.offset*this.$offsetCoefficient)},this.pageChanged=function(t,e){return Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)!==Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)},this.computeLineTop=function(t,e,n){var i=e.firstRowScreen*e.lineHeight,r=Math.floor(i/this.canvasHeight),o=n.documentToScreenRow(t,0)*e.lineHeight;return o-r*this.canvasHeight},this.computeLineHeight=function(t,e,n){return e.lineHeight*n.getRowLineCount(t)},this.getLength=function(){return this.cells.length},this.get=function(t){return this.cells[t]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(t){if(Array.isArray(t)){this.cells.push.apply(this.cells,t);for(var e=i.createFragment(this.element),n=0;n<t.length;n++)e.appendChild(t[n].element);this.element.appendChild(e)}else this.cells.push(t),this.element.appendChild(t.element)},this.unshift=function(t){if(Array.isArray(t)){this.cells.unshift.apply(this.cells,t);for(var e=i.createFragment(this.element),n=0;n<t.length;n++)e.appendChild(t[n].element);this.element.firstChild?this.element.insertBefore(e,this.element.firstChild):this.element.appendChild(e)}else this.cells.unshift(t),this.element.insertAdjacentElement("afterbegin",t.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(t){t&&(t.element.remove(),this.cellCache.push(t))},this.createCell=function(t,e,n,r){var o=this.cellCache.pop();if(!o){var s=i.createElement("div");r&&r(s),this.element.appendChild(s),o={element:s,text:"",row:t}}return o.row=t,o}}).call(r.prototype),e.Lines=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/lang"),s=t("../lib/event_emitter").EventEmitter,a=t("./lines").Lines,l=function(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1};function c(t){var e=document.createTextNode("");t.appendChild(e);var n=i.createElement("span");return t.appendChild(n),t}(function(){r.implement(this,s),this.setSession=function(t){this.session&&this.session.off("change",this.$updateAnnotations),this.session=t,t&&t.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,e)},this.setAnnotations=function(t){this.$annotations=[];for(var e=0;e<t.length;e++){var n=t[e],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&r.text.push(s);var a=n.type,l=n.className;l?r.className=l:"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(t){if(this.$annotations.length){var e=t.start.row,n=t.end.row-e;if(0===n);else if("remove"==t.action)this.$annotations.splice(e,n+1,null);else{var i=new Array(n+1);i.unshift(e,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(t){this.config=t;var e=this.session,n=t.firstRow,i=Math.min(t.lastRow+t.gutterOffset,e.getLength()-1);this.oldLastRow=i,this.config=t,this.$lines.moveContainer(t),this.$updateCursorRow();var r=e.getNextFoldLine(n),o=r?r.start.row:1/0,s=null,a=-1,l=n;while(1){if(l>o&&(l=r.end.row+1,r=e.getNextFoldLine(l,r),o=r?r.start.row:1/0),l>i){while(this.$lines.getLength()>a+1)this.$lines.pop();break}s=this.$lines.get(++a),s?s.row=l:(s=this.$lines.createCell(l,t,this.session,c),this.$lines.push(s)),this.$renderCell(s,t,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(t)},this.$updateGutterWidth=function(t){var e=this.session,n=e.gutterRenderer||this.$renderer,i=e.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||e.$useWrapMode)&&(r=e.getLength()+i-1);var o=n?n.getWidth(e,r,t):r.toString().length*t.characterWidth,s=this.$padding||this.$computePadding();o+=s.left+s.right,o===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<e.length;n++){var i=e[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==e[n-1].row))break;i=e[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!e||i<t.firstRow)return this.update(t);if(n<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLines(t,t.firstRow,e.firstRow-1)),n>i&&this.$lines.push(this.$renderLines(t,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},this.$renderLines=function(t,e,n){var i=[],r=e,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;while(1){if(r>s&&(r=o.end.row+1,o=this.session.getNextFoldLine(r,o),s=o?o.start.row:1/0),r>n)break;var a=this.$lines.createCell(r,t,this.session,c);this.$renderCell(a,t,o,r),i.push(a),r++}return i},this.$renderCell=function(t,e,n,r){var o=t.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,h=s.$decorations,f=s.gutterRenderer||this.$renderer,d=this.$showFoldWidgets&&s.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=p&&this.$cursorRow<=n.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),u[r]&&(g+=u[r]),h[r]&&(g+=h[r]),this.$annotations[r]&&(g+=this.$annotations[r].className),o.className!=g&&(o.className=g),d){var m=d[r];null==m&&(m=d[r]=s.getFoldWidget(r))}if(m){g="ace_fold-widget ace_"+m;"start"==m&&r==p&&r<n.end.row?g+=" ace_closed":g+=" ace_open",l.className!=g&&(l.className=g);var v=e.lineHeight+"px";i.setStyle(l.style,"height",v),i.setStyle(l.style,"display","inline-block")}else l&&i.setStyle(l.style,"display","none");var y=(f?f.getText(s,r):r+c).toString();return y!==a.data&&(a.data=y),i.setStyle(t.element.style,"height",this.$lines.computeLineHeight(r,e,s)+"px"),i.setStyle(t.element.style,"top",this.$lines.computeLineTop(r,e,s)+"px"),t.text=y,t},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(t){this.$highlightGutterLine=t},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(t){this.$renderer=!t&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(t){t?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(t.borderLeftWidth)||0)+(parseInt(t.paddingLeft)||0)+1,this.$padding.right=(parseInt(t.borderRightWidth)||0)+(parseInt(t.paddingRight)||0),this.$padding},this.getRegion=function(t){var e=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return t.x<e.left+n.left?"markers":this.$showFoldWidgets&&t.x>n.right-e.right?"foldWidgets":void 0}}).call(l.prototype),e.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../range").Range,r=t("../lib/dom"),o=function(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)};(function(){function t(t,e,n,i){return(t?1:0)|(e?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setMarkers=function(t){this.markers=t},this.elt=function(t,e){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=e,n.className=t},this.update=function(t){if(t){var e;for(var n in this.config=t,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,t),s=this.$padding+r.start.column*t.characterWidth;i.renderer(e,r,s,o,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,r,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,r,i.clazz,t):r.isMultiLine()?"text"==i.type?this.drawTextMarker(e,r,i.clazz,t):this.drawMultiLineMarker(e,r,i.clazz,t):this.drawSingleLineMarker(e,r,i.clazz+" ace_start ace_br15",t)}else i.update(e,this,this.session,t)}if(-1!=this.i)while(this.i<this.element.childElementCount)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(t,e){return(t-e.firstRowScreen)*e.lineHeight},this.drawTextMarker=function(e,n,r,o,s){for(var a=this.session,l=n.start.row,c=n.end.row,u=l,h=0,f=0,d=a.getScreenLastRowColumn(u),p=new i(u,n.start.column,u,f);u<=c;u++)p.start.row=p.end.row=u,p.start.column=u==l?n.start.column:a.getRowWrapIndent(u),p.end.column=d,h=f,f=d,d=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:n.end.column,this.drawSingleLineMarker(e,p,r+(u==l?" ace_start":"")+" ace_br"+t(u==l||u==l+1&&n.start.column,h<f,f>d,u==c),o,u==c?0:1,s)},this.drawMultiLineMarker=function(t,e,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(e.start.row,i),l=o+e.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)){var c=e.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(t,c,n+" ace_br1 ace_start",i,null,r)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(e.end.row)){c=e.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(t,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(e.end.row,i);var u=e.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(s=(e.end.row-e.start.row-1)*i.lineHeight,!(s<=0)){a=this.$getTop(e.start.row+1,i);var h=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(t,e,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,n,i,r,o);var s=i.lineHeight,a=(e.end.column+(r||0)-e.start.column)*i.characterWidth,l=this.$getTop(e.start.row,i),c=this.$padding+e.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(t,e,n,i,r,o){var s=i.lineHeight,a=this.$getTop(e.start.row,i),l=this.$padding,c=this.session.$bidiHandler.getSelections(e.start.column,e.end.column);c.forEach((function(t){this.elt(n,"height:"+s+"px;width:"+t.width+(r||0)+"px;top:"+a+"px;left:"+(l+t.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;e.start.row!=e.end.row&&(s+=this.$getTop(e.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),e.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("./lines").Lines,a=t("../lib/event_emitter").EventEmitter,l=function(t){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var t=this.session.doc,e="\n"==t.getNewLineCharacter()&&"windows"!=t.getNewLineMode(),n=e?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},this.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",function(t){this._signal("changeCharacterSize",t)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(t){this.session=t,t&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(t){return this.showInvisibles!=t&&(this.showInvisibles=t,"string"==typeof t?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(t){return this.$highlightIndentGuides!==t&&(this.$highlightIndentGuides=t,t)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],n=1;n<t+1;n++)if(this.showTabs){var i=this.dom.createElement("span");i.className="ace_invisible ace_invisible_tab",i.textContent=o.stringRepeat(this.TAB_CHAR,n),e.push(i)}else e.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):a;i=this.dom.createElement("span");i.className=r+s,i.textContent=a,this.$tabStrings[" "]=i;i=this.dom.createElement("span");i.className=r+l,i.textContent=c,this.$tabStrings["\t"]=i}},this.updateLines=function(t,e,n){if(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)return this.update(t);this.config=t;for(var i=Math.max(e,t.firstRow),r=Math.min(n,t.lastRow),o=this.element.childNodes,s=0,a=t.firstRow;a<i;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}var c=!1,u=(a=i,l=this.session.getNextFoldLine(a),l?l.start.row:1/0);while(1){if(a>u&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),u=l?l.start.row:1/0),a>r)break;var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var f=t.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=f&&(c=!0,h.style.height=f)}a++}if(c)while(s<this.$lines.cells.length){var d=this.$lines.cells[s++];d.element.style.top=this.$lines.computeLineTop(d.row,t,this.session)+"px"}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=t.lastRow,i=e?e.lastRow:-1;if(!e||i<t.firstRow)return this.update(t);if(n<e.firstRow)return this.update(t);if(!e||e.lastRow<t.firstRow)return this.update(t);if(t.lastRow<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(e.lastRow>t.lastRow)for(r=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLinesFragment(t,t.firstRow,e.firstRow-1)),t.lastRow>e.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(t,e,n){var i=[],o=e,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;while(1){if(o>a&&(o=s.end.row+1,s=this.session.getNextFoldLine(o,s),a=s?s.start.row:1/0),o>n)break;var l=this.$lines.createCell(o,t,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,t,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,t,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},this.update=function(t){this.$lines.moveContainer(t),this.config=t;var e=t.firstRow,n=t.lastRow,i=this.$lines;while(i.getLength())i.pop();i.push(this.$renderLinesFragment(t,e,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,e,n,i){var r,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;while(r=a.exec(i)){var u=r[1],h=r[2],f=r[3],d=r[4],p=r[5];if(s.showSpaces||!h){var g=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,g&&l.appendChild(this.dom.createTextNode(g,this.element)),u){var m=s.session.getScreenTabSize(e+r.index);l.appendChild(s.$tabStrings[m].cloneNode(!0)),e+=m-1}else if(h)if(s.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(s.SPACE_CHAR,h.length),l.appendChild(v)}else l.appendChild(this.com.createTextNode(h,this.element));else if(f){v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(s.SPACE_CHAR,f.length),l.appendChild(v)}else if(d){e+=1;v=this.dom.createElement("span");v.style.width=2*s.config.characterWidth+"px",v.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=s.showSpaces?s.SPACE_CHAR:d,l.appendChild(v)}else if(p){e+=1;v=this.dom.createElement("span");v.style.width=2*s.config.characterWidth+"px",v.className="ace_cjk",v.textContent=p,l.appendChild(v)}}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])t.appendChild(l);else{var y="ace_"+n.type.replace(/\./g," ace_");v=this.dom.createElement("span");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px"),v.className=y,v.appendChild(l),t.appendChild(v)}return e+i.length},this.renderIndentGuide=function(t,e,n){var i=e.search(this.$indentGuideRe);if(i<=0||i>=n)return e;if(" "==e[0]){i-=i%this.tabSize;for(var r=i/this.tabSize,o=0;o<r;o++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(i)}if("\t"==e[0]){for(o=0;o<i;o++)t.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(i)}return this.$highlightIndentGuide(),e},this.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var t=this.session.doc.$lines;if(t){var e=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(e.row))[0].length,i=Math.floor(n/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:i,start:e.row};var r=this.session.$bracketHighlight;if(r)for(var o=this.session.$bracketHighlight.ranges,s=0;s<o.length;s++)if(e.row!==o[s].start.row){this.$highlightIndentGuideMarker.end=o[s].start.row,e.row>o[s].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==t[e.row]&&e.column===t[e.row].length){this.$highlightIndentGuideMarker.dir=1;for(s=e.row+1;s<t.length;s++){var a=t[s],l=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=s,l<=n))break}}this.$renderHighlightIndentGuide()}}},this.$clearActiveIndentGuide=function(){for(var t=this.$lines.cells,e=0;e<t.length;e++){var n=t[e],i=n.element.childNodes;if(i.length>0)for(var r=0;r<i.length;r++)if(i[r].classList&&i[r].classList.contains("ace_indent-guide-active")){i[r].classList.remove("ace_indent-guide-active");break}}},this.$setIndentGuideActive=function(t,e){var n=this.session.doc.getLine(t.row);if(""!==n){var i=t.element.childNodes;if(i){var r=i[e-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},this.$renderHighlightIndentGuide=function(){if(this.$lines){var t=this.$lines.cells;this.$clearActiveIndentGuide();var e=this.$highlightIndentGuideMarker.indentLevel;if(0!==e)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<t.length;n++){var i=t[n];if(this.$highlightIndentGuideMarker.end&&i.row>=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,e)}}else for(n=t.length-1;n>=0;n--){i=t[n];if(this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,e)}}}},this.$createLineElement=function(t){var e=this.dom.createElement("div");return e.className="ace_line",e.style.height=this.config.lineHeight+"px",e},this.$renderWrappedLine=function(t,e,n){var i=0,r=0,s=n[0],a=0,l=this.$createLineElement();t.appendChild(l);for(var c=0;c<e.length;c++){var u=e[c],h=u.value;if(0==c&&this.displayIndentGuides){if(i=h.length,h=this.renderIndentGuide(l,h,s),!h)continue;i-=h.length}if(i+h.length<s)a=this.$renderToken(l,a,u,h),i+=h.length;else{while(i+h.length>=s)a=this.$renderToken(l,a,u,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),t.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),r++,a=0,s=n[r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(t,e){for(var n=0,i=0;i<e.length;i++){var r=e[i],o=r.value;if(0!=i||!this.displayIndentGuides||(o=this.renderIndentGuide(t,o),o)){if(n+o.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,n,r,o);n=this.$renderToken(t,n,r,o)}}},this.$renderOverflowMessage=function(t,e,n,i,r){n&&this.$renderToken(t,e,n,i.slice(0,this.MAX_LINE_LENGTH-e));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"<hide>":"<click to see more...>",t.appendChild(o)},this.$renderLine=function(t,e,n){if(n||0==n||(n=this.session.getFoldLine(e)),n)var i=this.$getFoldLineTokens(e,n);else i=this.session.getTokens(e);var r=t;if(i.length){var o=this.session.getRowSplitData(e);if(o&&o.length){this.$renderWrappedLine(t,i,o);r=t.lastChild}else{r=t;this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r));if(this.showEOL&&r){n&&(e=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},this.$getFoldLineTokens=function(t,e){var n=this.session,i=[];function r(t,e,n){var r=0,o=0;while(o+t[r].value.length<e)if(o+=t[r].value.length,r++,r==t.length)return;if(o!=e){var s=t[r].value.substring(e-o);s.length>n-e&&(s=s.substring(0,n-e)),i.push({type:t[r].type,value:s}),o=e+s.length,r+=1}while(o<n&&r<t.length){s=t[r].value;s.length+o>n?i.push({type:t[r].type,value:s.substring(0,n-o)}):i.push(t[r]),o+=s.length,r+=1}}var o=n.getTokens(t);return e.walk((function(t,e,s,a,l){null!=t?i.push({type:"fold",value:t}):(l&&(o=n.getTokens(e)),o.length&&r(o,a,s))}),e.end.row,this.session.getLine(e.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),e.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(t){for(var e=this.cursors,n=e.length;n--;)i.setStyle(e[n].style,"opacity",t?"":"0")},this.$startCssAnimation=function(){for(var t=this.cursors,e=t.length;e--;)t[e].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},this.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},this.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,i.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var t=i.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},this.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var t=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var e=function(){this.timeoutId=setTimeout((function(){t(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){t(!0),e()}),this.blinkInterval),e()}else this.$stopCssAnimation()},this.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,t.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},this.isCursorInView=function(t,e){return t.top>=0&&t.top<e.maxHeight},this.update=function(t){this.config=t;var e=this.session.$selectionMarkers,n=0,r=0;void 0!==e&&0!==e.length||(e=[{cursor:null}]);n=0;for(var o=e.length;n<o;n++){var s=this.getPixelPosition(e[n].cursor,!0);if(!((s.top>t.height+t.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,t,e[n],this.session):this.isCursorInView(s,t)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(t.characterWidth)+"px"),i.setStyle(l,"height",t.lineHeight+"px")):i.setStyle(l,"display","none")}}while(this.cursors.length>r)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),e.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/event"),s=t("./lib/event_emitter").EventEmitter,a=32768,l=function(t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1}}).call(l.prototype);var c=function(t,e){l.call(this,t),this.scrollTop=0,this.scrollHeight=0,e.$scrollbarWidth=this.width=r.scrollbarWidth(t.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var t=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-t)/(this.coeff-t)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(t){this.element.style.height=t+"px"},this.setInnerHeight=this.setScrollHeight=function(t){this.scrollHeight=t,t>a?(this.coeff=a/t,t=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},this.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)}}.call(c.prototype);var u=function(t,e){l.call(this,t),this.scrollLeft=0,this.height=e.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(u,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(t){this.element.style.width=t+"px"},this.setInnerWidth=function(t){this.inner.style.width=t+"px"},this.setScrollWidth=function(t){this.inner.style.width=t+"px"},this.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)}}.call(u.prototype),e.ScrollBar=c,e.ScrollBarV=c,e.ScrollBarH=u,e.VScrollBar=c,e.HScrollBar=u})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/event"),s=t("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(t){this.element=r.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){i.implement(this,s),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1}}).call(a.prototype);var l=function(t,e){a.call(this,t),this.scrollTop=0,this.scrollHeight=0,this.parent=t,this.width=this.VScrollWidth,this.renderer=e,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",i.implement(this,s),this.onMouseDown=function(t,e){if("mousedown"===t&&0===o.getButton(e)&&2!==e.detail){if(e.target===this.inner){var n=this,i=e.clientY,r=function(t){i=t.clientY},s=function(){clearInterval(u)},a=e.clientY,l=this.thumbTop,c=function(){if(void 0!==i){var t=n.scrollTopFromThumbTop(l+i-a);t!==n.scrollTop&&n._emit("scroll",{data:t})}};o.capture(this.inner,r,s);var u=setInterval(c,20);return o.preventDefault(e)}var h=e.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(h)}),o.preventDefault(e)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(t){var e=t*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return e>>=0,e<0?e=0:e>this.pageHeight-this.viewHeight&&(e=this.pageHeight-this.viewHeight),e},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(t,e){(this.pageHeight!==t||e)&&(this.pageHeight=t,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var c=function(t,e){a.call(this,t),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=e};i.inherits(c,a),function(){this.classSuffix="-h",i.implement(this,s),this.onMouseDown=function(t,e){if("mousedown"===t&&0===o.getButton(e)&&2!==e.detail){if(e.target===this.inner){var n=this,i=e.clientX,r=function(t){i=t.clientX},s=function(){clearInterval(u)},a=e.clientX,l=this.thumbLeft,c=function(){if(void 0!==i){var t=n.scrollLeftFromThumbLeft(l+i-a);t!==n.scrollLeft&&n._emit("scroll",{data:t})}};o.capture(this.inner,r,s);var u=setInterval(c,20);return o.preventDefault(e)}var h=e.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(h)}),o.preventDefault(e)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(t){var e=t*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return e>>=0,e<0?e=0:e>this.pageWidth-this.viewWidth&&(e=this.pageWidth-this.viewWidth),e},this.setWidth=function(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(t,e){(this.pageWidth!==t||e)&&(this.pageWidth=t,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(c.prototype),e.ScrollBar=l,e.ScrollBarV=l,e.ScrollBarH=c,e.VScrollBar=l,e.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(t,e,n){"use strict";var i=t("./lib/event"),r=function(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=e||window;var n=this;this._flush=function(t){n.pending=!1;var e=n.changes;if(e&&(i.blockIdle(100),n.changes=0,n.onRender(e)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(t){var e=this.changes;return this.changes=0,e}}).call(r.prototype),e.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(t,e,n){var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("../lib/event"),a=t("../lib/useragent"),l=t("../lib/event_emitter").EventEmitter,c=256,u="function"==typeof ResizeObserver,h=200,f=e.FontMetrics=function(t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(t,e){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",a.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=e?"hidden":"visible"},this.checkForSizeChanges=function(t){if(void 0===t&&(t=this.$measureSizes()),t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver((function(e){t.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=s.onIdle((function e(){t.checkForSizeChanges(),s.onIdle(e,500)}),500)},this.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(t){var e={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/c};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(t){this.$main.textContent=o.stringRepeat(t,c);var e=this.$main.getBoundingClientRect();return e.width/c},this.getCharacterWidth=function(t){var e=this.charSizes[t];return void 0===e&&(e=this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width),e},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function t(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*t(e.parentElement):1},this.$initTransformMeasureNodes=function(){var t=function(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]};this.els=r.buildDom([t(0,0),t(h,0),t(0,h),t(h,h)],this.el)},this.transformCoordinates=function(t,e){if(t){var n=this.$getZoom(this.el);t=s(1/n,t)}function i(t,e,n){var i=t[1]*e[0]-t[0]*e[1];return[(-e[1]*n[0]+e[0]*n[1])/i,(+t[1]*n[0]-t[0]*n[1])/i]}function r(t,e){return[t[0]-e[0],t[1]-e[1]]}function o(t,e){return[t[0]+e[0],t[1]+e[1]]}function s(t,e){return[t*e[0],t*e[1]]}function a(t){var e=t.getBoundingClientRect();return[e.left,e.top]}this.els||this.$initTransformMeasureNodes();var l=a(this.els[0]),c=a(this.els[1]),u=a(this.els[2]),f=a(this.els[3]),d=i(r(f,c),r(f,u),r(o(c,u),o(f,l))),p=s(1+d[0],r(c,l)),g=s(1+d[1],r(u,l));if(e){var m=e,v=d[0]*m[0]/h+d[1]*m[1]/h+1,y=o(s(m[0],p),s(m[1],g));return o(s(1/v/h,y),l)}var w=r(t,l),b=i(r(p,s(d[0],w)),r(g,s(d[1],w)),w);return s(h,b)}}).call(f.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(t,e,n){n.exports='/*\nstyles = []\nfor (var i = 1; i < 16; i++) {\n styles.push(".ace_br" + i + "{" + (\n ["top-left", "top-right", "bottom-right", "bottom-left"]\n ).map(function(x, j) {\n return i & (1<<j) ? "border-" + x + "-radius: 3px;" : "" \n }).filter(Boolean).join(" ") + "}")\n}\nstyles.join("\\n")\n*/\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left {\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n}\n\n.ace_gutter-cell {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell.ace_error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/event_emitter").EventEmitter,s=function(t,e){this.canvas=i.createElement("canvas"),this.renderer=e,this.pixelRatio=1,this.maxHeight=e.layerConfig.maxHeight,this.lineHeight=e.layerConfig.lineHeight,this.canvasHeight=t.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=t.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},t.element.appendChild(this.canvas)};(function(){r.implement(this,o),this.$updateDecorators=function(t){var e=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;if(t){this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height;var n=(t.lastRow+1)*this.lineHeight;n<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var i=this.canvas.getContext("2d");function r(t,e){return t.priority<e.priority?-1:t.priority>e.priority?1:0}var o=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach((function(t){t.priority=s[t.type]||null})),o=o.sort(r);for(var a=this.renderer.session.$foldData,l=0;l<o.length;l++){var c=o[l].row,u=this.compensateFoldRows(c,a),h=Math.round((c-u)*this.lineHeight*this.heightRatio),f=Math.round((c-u)*this.lineHeight*this.heightRatio),d=Math.round(((c-u)*this.lineHeight+this.lineHeight)*this.heightRatio),p=d-f;if(p<this.minDecorationHeight){var g=(f+d)/2|0;g<this.halfMinDecorationHeight?g=this.halfMinDecorationHeight:g+this.halfMinDecorationHeight>this.canvasHeight&&(g=this.canvasHeight-this.halfMinDecorationHeight),f=Math.round(g-this.halfMinDecorationHeight),d=Math.round(g+this.halfMinDecorationHeight)}i.fillStyle=e[o[l].type]||null,i.fillRect(0,h,this.canvasWidth,d-f)}}var m=this.renderer.session.selection.getCursor();if(m){u=this.compensateFoldRows(m.row,a),h=Math.round((m.row-u)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,h,this.canvasWidth,2)}},this.compensateFoldRows=function(t,e){var n=0;if(e&&e.length>0)for(var i=0;i<e.length;i++)t>e[i].start.row&&t<e[i].end.row?n+=t-e[i].start.row:t>=e[i].end.row&&(n+=e[i].end.row-e[i].start.row);return n}}).call(s.prototype),e.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./config"),s=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,l=t("./layer/text").Text,c=t("./layer/cursor").Cursor,u=t("./scrollbar").HScrollBar,h=t("./scrollbar").VScrollBar,f=t("./scrollbar_custom").HScrollBar,d=t("./scrollbar_custom").VScrollBar,p=t("./renderloop").RenderLoop,g=t("./layer/font_metrics").FontMetrics,m=t("./lib/event_emitter").EventEmitter,v=t("./css/editor.css"),y=t("./layer/decorators").Decorator,w=t("./lib/useragent"),b=w.isIE;r.importCssString(v,"ace_editor.css",!1);var _=function(t,e){var n=this;this.container=t||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(e),null==o.get("useStrictCSP")&&o.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(t){n.$scrollAnimation||n.session.setScrollTop(t.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(t){n.$scrollAnimation||n.session.setScrollLeft(t.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(t){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",t)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=t,t&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(t,e,n){if(void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRow<e&&(this.$changedLines.lastRow=e)):this.$changedLines={firstRow:t,lastRow:e},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(t,e,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(t,e,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(t,e,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(t||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(t||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,r.setStyle(this.scrollBarH.element.style,"left",e+"px"),r.setStyle(this.scroller.style,"left",e+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-e-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.onGutterResize=function(t){var e=this.$showGutter?t:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var t=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(t/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(t){this.setOption("highlightIndentGuides",t)},this.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(t){return this.setOption("showGutter",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var t=this.textarea.style,e=this.$composition;if(this.$keepTextAreaAtCursor||e){var n=this.$cursorLayer.$pixelPos;if(n){e&&e.markerRange&&(n=this.$cursorLayer.getPixelPosition(e.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=e&&e.useTextareaForIME?this.lineHeight:b?0:1;if(o<0||o>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(e)if(e.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;s-=this.scrollLeft,s>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(t,"height",a+"px"),r.setStyle(t,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var t=this.layerConfig,e=t.lastRow,n=this.session.documentToScreenRow(e,0)*t.lineHeight;return n-this.session.getScrollTop()>t.height-t.lineHeight?e-1:e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(t,e,n,i){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(t,e,n,i){var r=this.margin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},this.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(t-=(e-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>t-e&&(t=this.scrollTop+e,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||e)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",t),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL){if(t|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",s)}if(t&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),t&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);if(t&this.CHANGE_SCROLL)return this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_LINES?((this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",t)}else this.$changes|=t},this.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,n=Math.min(e,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=n<=2*this.lineHeight,r=!i&&t>e;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var t=this.session,e=this.$size,n=e.height<=2*this.lineHeight,i=this.session.getScreenLength(),r=i*this.lineHeight,o=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||e.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==s;a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=e.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=u;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,r-e.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-e.scrollerWidth+h.right)));var f=!n&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-r+u<0||this.scrollTop>h.top),d=l!==f;d&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var p,g,m=this.scrollTop%this.lineHeight,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),w=y+v,b=this.lineHeight;y=t.screenToDocumentRow(y,0);var _=t.getFoldLine(y);_&&(y=_.start.row),p=t.documentToScreenRow(y,0),g=t.getRowLength(y)*b,w=Math.min(t.screenToDocumentRow(w,0),t.getLength()-1),c=e.scrollerHeight+t.getRowLength(w)*b+g,m=this.scrollTop-p*b;var S=0;return(this.layerConfig.width!=o||a)&&(S=this.CHANGE_H_SCROLL),(a||d)&&(S|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),d&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:p,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:b?Math.max(0,Math.ceil((m+e.height-e.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),S},this.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(t>n.lastRow+1)&&!(e<n.firstRow))return e===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,t,e),!0)}},this.$getLongestLine=function(){var t=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(t+=1),this.$textLayer&&t>this.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},this.updateBreakpoints=function(t){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(t,e,n){this.scrollCursorIntoView(t,n),this.scrollCursorIntoView(e,n)},this.scrollCursorIntoView=function(t,e,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(t),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(e&&l+s>o+this.lineHeight&&(o-=e*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(e&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=e*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft;c>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(t){this.session.setScrollTop(t*this.lineHeight)},this.alignCursor=function(t,e){"number"==typeof t&&(t={row:t,column:0});var n=this.$cursorLayer.getPixelPosition(t),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(e||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(t,e){var n=0,i=this.STEPS,r=[],o=function(t,e,n){return n*(Math.pow(t-1,3)+1)+e};for(n=0;n<i;++n)r.push(o(n/this.STEPS,t,e-t));return r},this.scrollToLine=function(t,e,n,i){var r=this.$cursorLayer.getPixelPosition({row:t,column:0}),o=r.top;e&&(o-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(o),!1!==n&&this.animateScrolling(s,i)},this.animateScrolling=function(t,e){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(t!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(t=r[0],t==n))return}var o=i.$calcSteps(t,n);this.$scrollAnimation={from:t,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):s()):clearInterval(i.$timer);s()}),10)}}function s(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,e&&e()}},this.scrollToY=function(t){this.scrollTop!==t&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=t)},this.scrollToX=function(t){this.scrollLeft!==t&&(this.scrollLeft=t),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(t,e){this.session.setScrollTop(e),this.session.setScrollLeft(t)},this.scrollBy=function(t,e){e&&this.session.setScrollTop(this.session.getScrollTop()+e),t&&this.session.setScrollLeft(this.session.getScrollLeft()+t)},this.isScrollableBy=function(t,e){return e<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((e+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((e+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(t,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(t){this.$composition=t,t.cssText||(t.cssText=this.textarea.style.cssText),void 0==t.useTextareaForIME&&(t.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(t){var e=this.session.selection.cursor;this.addToken(t,"composition_placeholder",e.row,e.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var t=this.session.selection.cursor;this.removeExtraToken(t.row,t.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(t,e,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:e,value:t},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l<s.length;l++){var c=s[l];if(a+=c.value.length,i<=a){var u=c.value.length-(a-i),h=c.value.slice(0,u),f=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},o,{type:c.type,value:f});break}}this.updateLines(n,n)},this.removeExtraToken=function(t,e){this.updateLines(t,t)},this.setTheme=function(t,e){var n=this;if(this.$themeId=t,n._dispatchEvent("themeChange",{theme:t}),t&&"string"!=typeof t)s(t);else{var i=t||this.$options.theme.initialValue;o.loadModule(["theme",i],s)}function s(i){if(n.$themeId!=t)return e&&e();if(!i||!i.cssClass)throw new Error("couldn't load module "+t+" or it didn't call define");i.$id&&(n.$themeId=i.$id),r.importCssString(i.cssText,i.cssClass,n.container),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,r.addCssClass(n.container,i.cssClass),r.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),e&&e()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(t,e){r.setCssClass(this.container,t,!1!==e)},this.unsetStyle=function(t){r.removeCssClass(this.container,t)},this.setCursorStyle=function(t){r.setStyle(this.scroller.style,"cursor",t)},this.setMouseCursor=function(t){r.setStyle(this.scroller.style,"cursor",t)},this.attachToShadowRoot=function(){r.importCssString(v,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""},this.$updateCustomScrollbar=function(t){var e=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===t?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})),this.$scrollDecorator=new y(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})))}}).call(_.prototype),o.defineOptions(_.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(t){this.$textLayer.setShowInvisibles(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(t){"number"==typeof t&&(this.$printMarginColumn=t),this.$showPrintMargin=!!t,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(t){this.$gutter.style.display=t?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(t){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",t)},initialValue:!1},showFoldWidgets:{set:function(t){this.$gutterLayer.setShowFoldWidgets(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(t){this.$textLayer.setDisplayIndentGuides(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(t){1==this.$textLayer.setHighlightIndentGuides(t)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(t){this.$gutterLayer.setHighlightGutterLine(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(t){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(t){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(t){"number"==typeof t&&(t+="px"),this.container.style.fontSize=t,this.updateFontSize()},initialValue:12},fontFamily:{set:function(t){this.container.style.fontFamily=t,this.updateFontSize()}},maxLines:{set:function(t){this.updateFull()}},minLines:{set:function(t){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(t){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(t){t=+t||0,this.$scrollPastEnd!=t&&(this.$scrollPastEnd=t,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(t){this.$gutterLayer.$fixedWidth=!!t,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(t){this.$updateCustomScrollbar(t)},initialValue:!1},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),e.VirtualRenderer=_})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../lib/net"),o=t("../lib/event_emitter").EventEmitter,s=t("../config");function a(t){var e="importScripts('"+r.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(o){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,i=new n;return i.append(e),i.getBlob("application/javascript")}}function l(t){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=a(t),n=window.URL||window.webkitURL,i=n.createObjectURL(e);return new Worker(i)}return new Worker(t)}var c=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.$createWorkerFromOldConfig=function(e,n,i,r,o){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),s.get("packaged")||!t.toUrl)r=r||s.moduleUrl(n,"worker");else{var a=this.$normalizePath;r=r||a(t.toUrl("ace/worker/worker.js",null,"_"));var c={};e.forEach((function(e){c[e]=a(t.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=l(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return r.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,e.push(i)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==t.action?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(c.prototype);var u=function(t,e,n){var i=null,r=!1,a=Object.create(o),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(t){l.push(t),i&&(r?setTimeout(h):h())}});u.setEmitSync=function(t){r=t};var h=function(){var t=l.shift();t.command?i[t.command].apply(i,t.args):t.event&&a._signal(t.event,t.data)};return a.postMessage=function(t){u.onMessage({data:t})},a.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},a.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},s.loadModule(["worker",e],(function(t){i=new t[n](a);while(l.length)h()})),u};e.UIWorkerClient=u,e.WorkerClient=c,e.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(t,e,n){"use strict";var i=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,o=t("./lib/oop"),s=function(t,e,n,i,r,o){var s=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var t=this,e=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=e.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),t.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},this.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var e=t;if(e.start.row===e.end.row&&e.start.row===this.pos.row){this.$updating=!0;var n="insert"===t.action?e.end.column-e.start.column:e.start.column-e.end.column,r=e.start.column>=this.pos.column&&e.start.column<=this.pos.column+this.length+1,o=e.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};this.doc.insertMergedLines(l,t.lines)}else if("remove"===t.action)for(s=this.others.length-1;s>=0;s--){a=this.others[s],l={row:a.row,column:a.column+o};this.doc.remove(new i(l.row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,n=function(n,r){e.removeMarker(n.markerId),n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;n<e;n++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),e.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){var i=t("../lib/event"),r=t("../lib/useragent");function o(t,e){return t.row==e.row&&t.column==e.column}function s(t){var e=t.domEvent,n=e.altKey,s=e.shiftKey,a=e.ctrlKey,l=t.getAccelKey(),c=t.getButton();if(a&&r.isMac&&(c=e.button),t.editor.inMultiSelectMode&&2==c)t.editor.textInput.onContextMenu(t.domEvent);else if(a||n||l){if(0===c){var u,h=t.editor,f=h.selection,d=h.inMultiSelectMode,p=t.getDocumentPosition(),g=f.getCursor(),m=t.inSelection()||f.isEmpty()&&o(p,g),v=t.x,y=t.y,w=function(t){v=t.clientX,y=t.clientY},b=h.session,_=h.renderer.pixelToScreenCoordinates(v,y),S=_;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!d&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&e.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!d&&m)return;if(!d){var x=f.toOrientedRange();h.addSelectionMarker(x)}var C=f.rangeList.rangeAtPoint(p);h.inVirtualSelectionMode=!0,s&&(C=null,x=f.ranges[0]||x,h.removeSelectionMarker(x)),h.once("mouseup",(function(){var t=f.toOrientedRange();C&&t.isEmpty()&&o(C.cursor,t.cursor)?f.substractPoint(t.cursor):(s?f.substractPoint(x.cursor):x&&(h.removeSelectionMarker(x),f.addRange(x)),f.addRange(t)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var k;t.stop(),h.inVirtualSelectionMode=!0;var A=[],$=function(){var t=h.renderer.pixelToScreenCoordinates(v,y),e=b.screenToDocumentPosition(t.row,t.column,t.offsetX);o(S,t)&&o(e,f.lead)||(S=t,h.selection.moveToPosition(e),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(A),A=f.rectangularRangeBlock(S,_),h.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=h.$mouseHandler.$clickSelection.clone()),A.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};d&&!l?f.toSingleRange():!d&&l&&(k=f.toOrientedRange(),h.addSelectionMarker(k)),s?_=b.documentToScreenPosition(f.lead):f.moveToPosition(p),S={row:-1,column:-1};var R=function(t){$(),clearInterval(E),h.removeSelectionMarkers(A),A.length||(A=[f.toOrientedRange()]),k&&(h.removeSelectionMarker(k),f.toSingleRange(k));for(var e=0;e<A.length;e++)f.addRange(A[e]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},T=$;i.capture(h.container,w,R);var E=setInterval((function(){T()}),20);return t.preventDefault()}}}else 0===c&&t.editor.inMultiSelectMode&&t.editor.exitMultiSelectMode()}e.onMouseDown=s})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(t,e,n){e.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(t){t.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(t){t.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(t){t.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(t){t.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(t){t.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(t){t.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(t){t.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(t){t.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.rangeCount>1?t.multiSelect.joinSelections():t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],e.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new i(e.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(t,e,n){var i=t("./range_list").RangeList,r=t("./range").Range,o=t("./selection").Selection,s=t("./mouse/multi_select_handler").onMouseDown,a=t("./lib/event"),l=t("./lib/lang"),c=t("./commands/multi_select_commands");e.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=t("./search").Search,h=new u;function f(t,e,n){return h.$options.wrap=!0,h.$options.needle=e,h.$options.backwards=-1==n,h.find(t)}var d=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}t.cursor||(t.cursor=t.end);var i=this.rangeList.add(t);return this.$onAddRange(t),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var n=t.length;n--;){var i=this.ranges.indexOf(t[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),e=e||this.ranges[0],e&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var t=this.ranges.length?this.ranges:[this.getRange()],e=[],n=0;n<t.length;n++){var i=t[n],o=i.start.row,s=i.end.row;if(o===s)e.push(i.clone());else{e.push(new r(o,i.start.column,o,this.session.getLine(o).length));while(++o<s)e.push(this.getLineRange(o,!0));e.push(new r(s,0,s,i.end.column))}0!=n||this.isBackwards()||(e=e.reverse())}this.toSingleRange();for(n=e.length;n--;)this.addRange(e[n])},this.joinSelections=function(){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor),s=this.rectangularRangeBlock(i,o);s.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,n){var i=[],o=t.column<e.column;if(o)var s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;else s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;var u,h=t.row<e.row;if(h)var f=t.row,d=e.row;else f=e.row,d=t.row;s<0&&(s=0),f<0&&(f=0),f==d&&(n=!0);for(var p=f;p<=d;p++){var m=r.fromPoints(this.session.screenToDocumentPosition(p,s,l),this.session.screenToDocumentPosition(p,a,c));if(m.isEmpty()){if(u&&g(m.end,u))break;u=m.end}m.cursor=o?m.start:m.end,i.push(m)}if(h&&i.reverse(),!n){var v=i.length-1;while(i[v].isEmpty()&&v>0)v--;if(v>0){var y=0;while(i[y].isEmpty())y++}for(var w=v;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var p=t("./editor").Editor;function g(t,e){return t.row==e.row&&t.column==e.column}function m(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",s),t.commands.addCommands(c.defaultCommands),v(t))}function v(t){if(t.textInput){var e=t.textInput.getElement(),n=!1;a.addListener(e,"keydown",(function(e){var r=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&r?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),t),a.addListener(e,"keyup",i,t),a.addListener(e,"blur",i,t)}function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,n=t.length;n--;){var i=t[n];if(i.marker){this.session.removeMarker(i.marker);var r=e.indexOf(i);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e=t.command,n=t.editor;if(n.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?i=n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?i=n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),i=e.exec(n,t.args||{})):i=e.multiSelectAction(n,t.args||{});else{var i=e.exec(n,t.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(t,e,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var h=l._eventRegistry;l._eventRegistry={};var f=new o(a);this.inVirtualSelectionMode=!0;for(var d=u.length;d--;){if(s)while(d>0&&u[d].start.row==u[d-1].end.row)d--;f.fromOrientedRange(u[d]),f.index=d,this.selection=a.selection=f;var p=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===p||(i=p),f.toOrientedRange(u[d])}f.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,n=[],i=0;i<e.length;i++)n.push(this.session.getTextRange(e[i]));var r=this.session.getDocument().getNewLineCharacter();t=n.join(r),t.length==(n.length-1)*r.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.$checkMultiselectChange=function(t,e){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&e==this.multiSelect.anchor)return;var i=e==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row!=e.row||this.session.$clipPositionToDocument(i.row,i.column).column!=e.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(t,e,n){if(e=e||{},e.needle=t||e.needle,void 0==e.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();e.needle=this.session.getTextRange(i)}this.$search.set(e);var r=this.$search.findAll(this.session);if(!r.length)return 0;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),r.length},this.selectMoreLines=function(t,e){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s=this.session.screenToDocumentPosition(o.row+t,o.column);if(n.isEmpty())l=s;else var a=this.session.documentToScreenPosition(i?n.end:n.start),l=this.session.screenToDocumentPosition(a.row+t,a.column);if(i){var c=r.fromPoints(s,l);c.cursor=c.start}else{c=r.fromPoints(l,s);c.cursor=c.end}if(c.desiredColumn=o.column,this.selection.inMultiSelectMode){if(e)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(t){for(var e=this.session,n=e.multiSelect,i=n.ranges,r=i.length;r--;){var o=i[r];if(o.isEmpty()){var s=e.getWordRange(o.start.row,o.start.column);o.start.row=s.start.row,o.start.column=s.start.column,o.end.row=s.end.row,o.end.column=s.end.column}}n.mergeOverlappingRanges();var a=[];for(r=i.length;r--;){o=i[r];a.unshift(e.getTextRange(o))}t<0?a.unshift(a.pop()):a.push(a.shift());for(r=i.length;r--;){o=i[r],s=o.clone();e.replace(o,a[r]),o.start.row=s.start.row,o.start.column=s.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(t,e,n){var i=this.session,r=i.multiSelect,o=r.toOrientedRange();if(!o.isEmpty()||(o=i.getWordRange(o.start.row,o.start.column),o.cursor=-1==t?o.start:o.end,this.multiSelect.addRange(o),!n)){var s=i.getTextRange(o),a=f(i,s,t);a&&(a.cursor=-1==t?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),e&&this.multiSelect.substractPoint(o.cursor)}},this.alignCursors=function(){var t=this.session,e=t.multiSelect,n=e.ranges,i=-1,o=n.filter((function(t){if(t.cursor.row==i)return!0;i=t.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(t){e.substractPoint(t.cursor)}));var s=0,a=1/0,c=n.map((function(e){var n=e.cursor,i=t.getLine(n.row),r=i.substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>s&&(s=n.column),r<a&&(a=r),r}));n.forEach((function(e,n){var i=e.cursor,o=s-i.column,u=c[n]-a;o>u?t.insert(i,l.stringRepeat(" ",o-u)):t.remove(new r(i.row,i.column,i.row,i.column-o+u)),e.start.column=e.end.column=s,e.start.row=e.end.row=i.row,e.cursor=e.end})),e.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,f=u.end.row,d=h==f;if(d){var p,g=this.session.getLength();do{p=this.session.getLine(f)}while(/[=:]/.test(p)&&++f<g);do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&--h>0);h<0&&(h=0),f>=g&&(f=g-1)}var m=this.session.removeFullLines(h,f);m=this.$reAlignText(m,d),this.session.insert({row:h,column:0},m.join("\n")+"\n"),d||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(t,e){var n,i,r,o=!0,s=!0;return t.map((function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==n?(n=e[1].length,i=e[2].length,r=e[3].length,e):(n+i+r!=e[1].length+e[2].length+e[3].length&&(s=!1),n!=e[1].length&&(o=!1),n>e[1].length&&(n=e[1].length),i<e[2].length&&(i=e[2].length),r>e[3].length&&(r=e[3].length),e):[t]})).map(e?c:o?s?u:c:h);function a(t){return l.stringRepeat(" ",t)}function c(t){return t[2]?a(n)+t[2]+a(i-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function u(t){return t[2]?a(n+i-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function h(t){return t[2]?a(n)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(p.prototype),e.onSessionChange=function(t){var e=t.session;e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect;var n=t.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=m,t("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(t){m(this),t?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,n){var i=t.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(t,e,n){return null},this.indentationBlock=function(t,e,n){var r=/\S/,o=t.getLine(e),s=o.search(r);if(-1!=s){var a=n||o.length,l=t.getLength(),c=e,u=e;while(++e<l){var h=t.getLine(e).search(r);if(-1!=h){if(h<=s){var f=t.getTokenAt(e,0);if(!f||"string"!==f.type)break}u=e}}if(u>c){var d=t.getLine(u).length;return new i(c,a,u,d)}}},this.openingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r+1},a=t.$findClosingBracket(e,s,o);if(a){var l=t.foldWidgets[a.row];return null==l&&(l=t.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=t.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r},a=t.$findOpeningBracket(e,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("./lib/dom");function r(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(t){var e;return e=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0,this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach((function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)})),t},this.$onChangeEditor=function(t){this.attach(t.editor)},this.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,t&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(t){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))}))}},this.updateOnFold=function(t,e){var n=e.lineWidgets;if(n&&t.action){for(var i=t.data,r=i.start.row,o=i.end.row,s="add"==t.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},this.updateOnChange=function(t){var e=this.session.lineWidgets;if(e){var n=t.start.row,i=t.end.row-n;if(0===i);else if("remove"==t.action){var r=e.splice(n+1,i);!e[n]&&r[r.length-1]&&(e[n]=r.pop()),r.forEach((function(t){t&&this.removeLineWidget(t)}),this),this.$updateRows()}else{var o=new Array(i);e[n]&&null!=e[n].column&&t.start.column>e[n].column&&n++,o.unshift(n,0),e.splice.apply(e,o),this.$updateRows()}}},this.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach((function(t,n){if(t){e=!1,t.row=n;while(t.$oldWidget)t.$oldWidget.row=n,t=t.$oldWidget}})),e&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var e=this.session.lineWidgets[t.row];return e&&(t.$oldWidget=e,e.el&&e.el.parentNode&&(e.el.parentNode.removeChild(e.el),e._inDocument=!1)),this.session.lineWidgets[t.row]=t,t},this.addLineWidget=function(t){if(this.$registerLineWidget(t),t.session=this.session,!this.editor)return t;var e=this.editor.renderer;t.html&&!t.el&&(t.el=i.createElement("div"),t.el.innerHTML=t.html),t.el&&(i.addCssClass(t.el,"ace_lineWidgetContainer"),t.el.style.position="absolute",t.el.style.zIndex=5,e.container.appendChild(t.el),t._inDocument=!0,t.coverGutter||(t.el.style.zIndex=3),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight)),null==t.rowCount&&(t.rowCount=t.pixelHeight/e.layerConfig.lineHeight);var n=this.session.getFoldAt(t.row,0);if(t.$fold=n,n){var r=this.session.lineWidgets;t.row!=n.end.row||r[n.start.row]?t.hidden=!0:r[n.start.row]=t}return this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,e),this.onWidgetChanged(t),t},this.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(n){}if(this.session.lineWidgets){var e=this.session.lineWidgets[t.row];if(e==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else while(e){if(e.$oldWidget==t){e.$oldWidget=t.$oldWidget;break}e=e.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(t){var e=this.session.lineWidgets,n=e&&e[t],i=[];while(n)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(t,e){var n=this.session._changedWidgets,i=e.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,e.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row),a<0&&(a=0)),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(t,e){var n=e.layerConfig,i=this.session.lineWidgets;if(i){var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);while(r>0&&!i[r])r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,e.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var l=e.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(c-=e.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=e.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),e.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(t,e,n){"use strict";var i=t("../line_widgets").LineWidgets,r=t("../lib/dom"),o=t("../range").Range;function s(t,e,n){var i=0,r=t.length-1;while(i<=r){var o=i+r>>1,s=n(e,t[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}function a(t,e,n){var i=t.getAnnotations().sort(o.comparePoints);if(i.length){var r=s(i,{row:e,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var a=i[r];if(a&&n){if(a.row===e){do{a=i[r+=n]}while(a&&a.row===e);if(!a)return i.slice()}var l=[];e=a.row;do{l[n<0?"unshift":"push"](a),a=i[r+=n]}while(a&&a.row==e);return l.length&&l}}}e.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(t));var o=t.getCursorPosition(),s=o.row,l=n.widgetManager.getWidgetsAtRow(s).filter((function(t){return"errorMarker"==t.type}))[0];l?l.destroy():s-=e;var c,u=a(n,s,e);if(u){var h=u[0];o.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,o.row=h.row,c=t.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var f={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},d=f.el.appendChild(r.createElement("div")),p=f.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var g=t.renderer.$cursorLayer.getPixelPosition(o).left;p.style.left=g+t.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",d.className="error_widget "+c.className,d.innerHTML=c.text.join("<br>"),d.appendChild(r.createElement("div"));var m=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(f),t.off("changeSelection",f.destroy),t.off("changeSession",f.destroy),t.off("mouseup",f.destroy),t.off("change",f.destroy))},t.keyBinding.addKeyboardHandler(m),t.on("changeSelection",f.destroy),t.on("changeSession",f.destroy),t.on("mouseup",f.destroy),t.on("change",f.destroy),t.session.widgetManager.addLineWidget(f),f.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(t,e,n){"use strict";t("./loader_build")(e);var i=t("./lib/dom"),r=t("./lib/event"),o=t("./range").Range,s=t("./editor").Editor,a=t("./edit_session").EditSession,l=t("./undomanager").UndoManager,c=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.edit=function(t,n){if("string"==typeof t){var o=t;if(t=document.getElementById(o),!t)throw new Error("ace.edit can't find div #"+o)}if(t&&t.env&&t.env.editor instanceof s)return t.env.editor;var a="";if(t&&/input|textarea/i.test(t.tagName)){var l=t;a=l.value,t=i.createElement("pre"),l.parentNode.replaceChild(t,l)}else t&&(a=t.textContent,t.innerHTML="");var u=e.createEditSession(a),h=new s(new c(t),u,n),f={document:u,editor:h,onResize:h.resize.bind(h,null)};return l&&(f.textarea=l),r.addListener(window,"resize",f.onResize),h.on("destroy",(function(){r.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),h.container.env=h.env=f,h},e.createEditSession=function(t,e){var n=new a(t,e);return n.setUndoManager(new l),n},e.Range=o,e.Editor=s,e.EditSession=a,e.UndoManager=l,e.VirtualRenderer=c,e.version=e.config.version})),function(){ace.require(["ace/ace"],(function(e){for(var n in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(n)&&(window.ace[n]=e[n]);window.ace["default"]=window.ace,t&&(t.exports=window.ace)}))}()},89644:function(t,e,n){t.exports=n(25644)},70353:function(t,e,n){"use strict";var i=n(93044),r=n(86955),o=n(92233),s=n(68030),a=n(97948),l=n(51875),c=n(60842),u=n(98560),h=n(21218),f=n(68047),d=n(10738);t.exports=function(t){return new Promise((function(e,n){var p,g=t.data,m=t.headers,v=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}i.isFormData(g)&&i.isStandardBrowserEnv()&&delete m["Content-Type"];var w=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",_=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(b+":"+_)}var S=a(t.baseURL,t.url);function x(){if(w){var i="getAllResponseHeaders"in w?l(w.getAllResponseHeaders()):null,o=v&&"text"!==v&&"json"!==v?w.response:w.responseText,s={data:o,status:w.status,statusText:w.statusText,headers:i,config:t,request:w};r((function(t){e(t),y()}),(function(t){n(t),y()}),s),w=null}}if(w.open(t.method.toUpperCase(),s(S,t.params,t.paramsSerializer),!0),w.timeout=t.timeout,"onloadend"in w?w.onloadend=x:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(x)},w.onabort=function(){w&&(n(new h("Request aborted",h.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new h("Network Error",h.ERR_NETWORK,t,w,w)),w=null},w.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",i=t.transitional||u;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new h(e,i.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,w)),w=null},i.isStandardBrowserEnv()){var C=(t.withCredentials||c(S))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;C&&(m[t.xsrfHeaderName]=C)}"setRequestHeader"in w&&i.forEach(m,(function(t,e){"undefined"===typeof g&&"content-type"===e.toLowerCase()?delete m[e]:w.setRequestHeader(e,t)})),i.isUndefined(t.withCredentials)||(w.withCredentials=!!t.withCredentials),v&&"json"!==v&&(w.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&w.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){w&&(n(!t||t&&t.type?new f:t),w.abort(),w=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),g||(g=null);var k=d(S);k&&-1===["http","https","file"].indexOf(k)?n(new h("Unsupported protocol "+k+":",h.ERR_BAD_REQUEST,t)):w.send(g)}))}},25644:function(t,e,n){"use strict";var i=n(93044),r=n(73644),o=n(62215),s=n(92937),a=n(10663);function l(t){var e=new o(t),n=r(o.prototype.request,e);return i.extend(n,o.prototype,e),i.extend(n,e),n.create=function(e){return l(s(t,e))},n}var c=l(a);c.Axios=o,c.CanceledError=n(68047),c.CancelToken=n(34089),c.isCancel=n(98041),c.VERSION=n(29241).version,c.toFormData=n(49027),c.AxiosError=n(21218),c.Cancel=c.CanceledError,c.all=function(t){return Promise.all(t)},c.spread=n(70783),c.isAxiosError=n(65587),t.exports=c,t.exports["default"]=c},34089:function(t,e,n){"use strict";var i=n(68047);function r(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,i=n._listeners.length;for(e=0;e<i;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,i=new Promise((function(t){n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t){n.reason||(n.reason=new i(t),e(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},r.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},r.source=function(){var t,e=new r((function(e){t=e}));return{token:e,cancel:t}},t.exports=r},68047:function(t,e,n){"use strict";var i=n(21218),r=n(93044);function o(t){i.call(this,null==t?"canceled":t,i.ERR_CANCELED),this.name="CanceledError"}r.inherits(o,i,{__CANCEL__:!0}),t.exports=o},98041:function(t){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},62215:function(t,e,n){"use strict";var i=n(93044),r=n(68030),o=n(946),s=n(6895),a=n(92937),l=n(97948),c=n(23455),u=c.validators;function h(t){this.defaults=t,this.interceptors={request:new o,response:new o}}h.prototype.request=function(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=a(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=e.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var i=[],r=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)})),!r){var h=[s,void 0];Array.prototype.unshift.apply(h,i),h=h.concat(l),o=Promise.resolve(e);while(h.length)o=o.then(h.shift(),h.shift());return o}var f=e;while(i.length){var d=i.shift(),p=i.shift();try{f=d(f)}catch(g){p(g);break}}try{o=s(f)}catch(g){return Promise.reject(g)}while(l.length)o=o.then(l.shift(),l.shift());return o},h.prototype.getUri=function(t){t=a(this.defaults,t);var e=l(t.baseURL,t.url);return r(e,t.params,t.paramsSerializer)},i.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(a(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}h.prototype[t]=e(),h.prototype[t+"Form"]=e(!0)})),t.exports=h},21218:function(t,e,n){"use strict";var i=n(93044);function r(t,e,n,i,r){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}i.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(t){s[t]={value:t}})),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=function(t,e,n,s,a,l){var c=Object.create(o);return i.toFlatObject(t,c,(function(t){return t!==Error.prototype})),r.call(c,t.message,e,n,s,a),c.name=t.name,l&&Object.assign(c,l),c},t.exports=r},946:function(t,e,n){"use strict";var i=n(93044);function r(){this.handlers=[]}r.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=r},97948:function(t,e,n){"use strict";var i=n(99192),r=n(48762);t.exports=function(t,e){return t&&!i(e)?r(t,e):e}},6895:function(t,e,n){"use strict";var i=n(93044),r=n(38556),o=n(98041),s=n(10663),a=n(68047);function l(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a}t.exports=function(t){l(t),t.headers=t.headers||{},t.data=r.call(t,t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]}));var e=t.adapter||s.adapter;return e(t).then((function(e){return l(t),e.data=r.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(l(t),e&&e.response&&(e.response.data=r.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},92937:function(t,e,n){"use strict";var i=n(93044);t.exports=function(t,e){e=e||{};var n={};function r(t,e){return i.isPlainObject(t)&&i.isPlainObject(e)?i.merge(t,e):i.isPlainObject(e)?i.merge({},e):i.isArray(e)?e.slice():e}function o(n){return i.isUndefined(e[n])?i.isUndefined(t[n])?void 0:r(void 0,t[n]):r(t[n],e[n])}function s(t){if(!i.isUndefined(e[t]))return r(void 0,e[t])}function a(n){return i.isUndefined(e[n])?i.isUndefined(t[n])?void 0:r(void 0,t[n]):r(void 0,e[n])}function l(n){return n in e?r(t[n],e[n]):n in t?r(void 0,t[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return i.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,r=e(t);i.isUndefined(r)&&e!==l||(n[t]=r)})),n}},86955:function(t,e,n){"use strict";var i=n(21218);t.exports=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new i("Request failed with status code "+n.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}},38556:function(t,e,n){"use strict";var i=n(93044),r=n(10663);t.exports=function(t,e,n){var o=this||r;return i.forEach(n,(function(n){t=n.call(o,t,e)})),t}},10663:function(t,e,n){"use strict";var i=n(93044),r=n(98868),o=n(21218),s=n(98560),a=n(49027),l={"Content-Type":"application/x-www-form-urlencoded"};function c(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function u(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(t=n(70353)),t}function h(t,e,n){if(i.isString(t))try{return(e||JSON.parse)(t),i.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}var f={transitional:s,adapter:u(),transformRequest:[function(t,e){if(r(e,"Accept"),r(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t))return t;if(i.isArrayBufferView(t))return t.buffer;if(i.isURLSearchParams(t))return c(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var n,o=i.isObject(t),s=e&&e["Content-Type"];if((n=i.isFileList(t))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return a(n?{"files[]":t}:t,l&&new l)}return o||"application/json"===s?(c(e,"application/json"),h(t)):t}],transformResponse:[function(t){var e=this.transitional||f.transitional,n=e&&e.silentJSONParsing,r=e&&e.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||r&&i.isString(t)&&t.length)try{return JSON.parse(t)}catch(a){if(s){if("SyntaxError"===a.name)throw o.from(a,o.ERR_BAD_RESPONSE,this,null,this.response);throw a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(84684)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){f.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){f.headers[t]=i.merge(l)})),t.exports=f},98560:function(t){"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},29241:function(t){t.exports={version:"0.27.2"}},73644:function(t){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return t.apply(e,n)}}},68030:function(t,e,n){"use strict";var i=n(93044);function r(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var s=[];i.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(i.isArray(t)?e+="[]":t=[t],i.forEach(t,(function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),s.push(r(e)+"="+r(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},48762:function(t){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},92233:function(t,e,n){"use strict";var i=n(93044);t.exports=i.isStandardBrowserEnv()?function(){return{write:function(t,e,n,r,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(r)&&a.push("path="+r),i.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},99192:function(t){"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},65587:function(t,e,n){"use strict";var i=n(93044);t.exports=function(t){return i.isObject(t)&&!0===t.isAxiosError}},60842:function(t,e,n){"use strict";var i=n(93044);t.exports=i.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var i=t;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=i.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return function(){return!0}}()},98868:function(t,e,n){"use strict";var i=n(93044);t.exports=function(t,e){i.forEach(t,(function(n,i){i!==e&&i.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[i])}))}},84684:function(t){t.exports=null},51875:function(t,e,n){"use strict";var i=n(93044),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(i.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=i.trim(t.substr(0,o)).toLowerCase(),n=i.trim(t.substr(o+1)),e){if(s[e]&&r.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},10738:function(t){"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},70783:function(t){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},49027:function(t,e,n){"use strict";var i=n(93044);function r(t,e){e=e||new FormData;var n=[];function r(t){return null===t?"":i.isDate(t)?t.toISOString():i.isArrayBuffer(t)||i.isTypedArray(t)?"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function o(t,s){if(i.isPlainObject(t)||i.isArray(t)){if(-1!==n.indexOf(t))throw Error("Circular reference detected in "+s);n.push(t),i.forEach(t,(function(t,n){if(!i.isUndefined(t)){var a,l=s?s+"."+n:n;if(t&&!s&&"object"===typeof t)if(i.endsWith(n,"{}"))t=JSON.stringify(t);else if(i.endsWith(n,"[]")&&(a=i.toArray(t)))return void a.forEach((function(t){!i.isUndefined(t)&&e.append(l,r(t))}));o(t,l)}})),n.pop()}else e.append(s,r(t))}return o(t),e}t.exports=r},23455:function(t,e,n){"use strict";var i=n(29241).version,r=n(21218),o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var s={};function a(t,e,n){if("object"!==typeof t)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);var i=Object.keys(t),o=i.length;while(o-- >0){var s=i[o],a=e[s];if(a){var l=t[s],c=void 0===l||a(l,s,t);if(!0!==c)throw new r("option "+s+" must be "+c,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+s,r.ERR_BAD_OPTION)}}o.transitional=function(t,e,n){function o(t,e){return"[Axios v"+i+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,i,a){if(!1===t)throw new r(o(i," has been removed"+(e?" in "+e:"")),r.ERR_DEPRECATED);return e&&!s[i]&&(s[i]=!0,console.warn(o(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,a)}},t.exports={assertOptions:a,validators:o}},93044:function(t,e,n){"use strict";var i=n(73644),r=Object.prototype.toString,o=function(t){return function(e){var n=r.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function s(t){return t=t.toLowerCase(),function(e){return o(e)===t}}function a(t){return Array.isArray(t)}function l(t){return"undefined"===typeof t}function c(t){return null!==t&&!l(t)&&null!==t.constructor&&!l(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var u=s("ArrayBuffer");function h(t){var e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&u(t.buffer),e}function f(t){return"string"===typeof t}function d(t){return"number"===typeof t}function p(t){return null!==t&&"object"===typeof t}function g(t){if("object"!==o(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var m=s("Date"),v=s("File"),y=s("Blob"),w=s("FileList");function b(t){return"[object Function]"===r.call(t)}function _(t){return p(t)&&b(t.pipe)}function S(t){var e="[object FormData]";return t&&("function"===typeof FormData&&t instanceof FormData||r.call(t)===e||b(t.toString)&&t.toString()===e)}var x=s("URLSearchParams");function C(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function k(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function A(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),a(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(null,t[r],r,t)}function $(){var t={};function e(e,n){g(t[n])&&g(e)?t[n]=$(t[n],e):g(e)?t[n]=$({},e):a(e)?t[n]=e.slice():t[n]=e}for(var n=0,i=arguments.length;n<i;n++)A(arguments[n],e);return t}function R(t,e,n){return A(e,(function(e,r){t[r]=n&&"function"===typeof e?i(e,n):e})),t}function T(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}function E(t,e,n,i){t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,n&&Object.assign(t.prototype,n)}function L(t,e,n){var i,r,o,s={};e=e||{};do{i=Object.getOwnPropertyNames(t),r=i.length;while(r-- >0)o=i[r],s[o]||(e[o]=t[o],s[o]=!0);t=Object.getPrototypeOf(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e}function M(t,e,n){t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;var i=t.indexOf(e,n);return-1!==i&&i===n}function O(t){if(!t)return null;var e=t.length;if(l(e))return null;var n=new Array(e);while(e-- >0)n[e]=t[e];return n}var D=function(t){return function(e){return t&&e instanceof t}}("undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));t.exports={isArray:a,isArrayBuffer:u,isBuffer:c,isFormData:S,isArrayBufferView:h,isString:f,isNumber:d,isObject:p,isPlainObject:g,isUndefined:l,isDate:m,isFile:v,isBlob:y,isFunction:b,isStream:_,isURLSearchParams:x,isStandardBrowserEnv:k,forEach:A,merge:$,extend:R,trim:C,stripBOM:T,inherits:E,toFlatObject:L,kindOf:o,kindOfTest:s,endsWith:M,toArray:O,isTypedArray:D,isFileList:w}},86522:function(t){t.exports=function(t,e,n,i,r){var o,s;if(void 0===i)i=0;else if(i|=0,i<0||i>=t.length)throw new RangeError("invalid lower bound");if(void 0===r)r=t.length-1;else if(r|=0,r<i||r>=t.length)throw new RangeError("invalid upper bound");while(i<=r)if(o=i+(r-i>>>1),s=+n(t[o],e,o,t),s<0)i=o+1;else{if(!(s>0))return o;r=o-1}return~i}},9772:function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},9918:function(t,e,n){"use strict";var i,r,o,s=n(9772),a=n(7400),l=n(9859),c=n(26733),u=n(85052),h=n(98270),f=n(81589),d=n(59821),p=n(75762),g=n(14768),m=n(31787).f,v=n(91321),y=n(67567),w=n(56540),b=n(70095),_=n(81441),S=n(56407),x=S.enforce,C=S.get,k=l.Int8Array,A=k&&k.prototype,$=l.Uint8ClampedArray,R=$&&$.prototype,T=k&&y(k),E=A&&y(A),L=Object.prototype,M=l.TypeError,O=b("toStringTag"),D=_("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",I=s&&!!w&&"Opera"!==f(l.opera),F=!1,W={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},H=function(t){if(!u(t))return!1;var e=f(t);return"DataView"===e||h(W,e)||h(B,e)},N=function(t){var e=y(t);if(u(e)){var n=C(e);return n&&h(n,P)?n[P]:N(e)}},j=function(t){if(!u(t))return!1;var e=f(t);return h(W,e)||h(B,e)},U=function(t){if(j(t))return t;throw M("Target is not a typed array")},z=function(t){if(c(t)&&(!w||v(T,t)))return t;throw M(d(t)+" is not a typed array constructor")},G=function(t,e,n,i){if(a){if(n)for(var r in W){var o=l[r];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(c){}}}E[t]&&!n||g(E,t,n?e:I&&A[t]||e,i)}},V=function(t,e,n){var i,r;if(a){if(w){if(n)for(i in W)if(r=l[i],r&&h(r,t))try{delete r[t]}catch(o){}if(T[t]&&!n)return;try{return g(T,t,n?e:I&&T[t]||e)}catch(o){}}for(i in W)r=l[i],!r||r[t]&&!n||g(r,t,e)}};for(i in W)r=l[i],o=r&&r.prototype,o?x(o)[P]=r:I=!1;for(i in B)r=l[i],o=r&&r.prototype,o&&(x(o)[P]=r);if((!I||!c(T)||T===Function.prototype)&&(T=function(){throw M("Incorrect invocation")},I))for(i in W)l[i]&&w(l[i],T);if((!I||!E||E===L)&&(E=T.prototype,I))for(i in W)l[i]&&w(l[i].prototype,E);if(I&&y(R)!==E&&w(R,E),a&&!h(E,O))for(i in F=!0,m(E,O,{get:function(){return u(this)?this[D]:void 0}}),W)l[i]&&p(l[i],D,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_TAG:F&&D,aTypedArray:U,aTypedArrayConstructor:z,exportTypedArrayMethod:G,exportTypedArrayStaticMethod:V,getTypedArrayConstructor:N,isView:H,isTypedArray:j,TypedArray:T,TypedArrayPrototype:E}},53816:function(t,e,n){"use strict";var i=n(9859),r=n(65968),o=n(7400),s=n(9772),a=n(51805),l=n(75762),c=n(8312),u=n(24229),h=n(57728),f=n(43329),d=n(34237),p=n(7331),g=n(56201),m=n(67567),v=n(56540),y=n(78151).f,w=n(31787).f,b=n(97065),_=n(69794),S=n(54555),x=n(56407),C=a.PROPER,k=a.CONFIGURABLE,A=x.get,$=x.set,R="ArrayBuffer",T="DataView",E="prototype",L="Wrong length",M="Wrong index",O=i[R],D=O,P=D&&D[E],I=i[T],F=I&&I[E],W=Object.prototype,B=i.Array,H=i.RangeError,N=r(b),j=r([].reverse),U=g.pack,z=g.unpack,G=function(t){return[255&t]},V=function(t){return[255&t,t>>8&255]},q=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Y=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},K=function(t){return U(t,23,4)},X=function(t){return U(t,52,8)},Z=function(t,e){w(t[E],e,{get:function(){return A(this)[e]}})},Q=function(t,e,n,i){var r=p(n),o=A(t);if(r+e>o.byteLength)throw H(M);var s=A(o.buffer).bytes,a=r+o.byteOffset,l=_(s,a,a+e);return i?l:j(l)},J=function(t,e,n,i,r,o){var s=p(n),a=A(t);if(s+e>a.byteLength)throw H(M);for(var l=A(a.buffer).bytes,c=s+a.byteOffset,u=i(+r),h=0;h<e;h++)l[c+h]=u[o?h:e-h-1]};if(s){var tt=C&&O.name!==R;if(u((function(){O(1)}))&&u((function(){new O(-1)}))&&!u((function(){return new O,new O(1.5),new O(NaN),1!=O.length||tt&&!k})))tt&&k&&l(O,"name",R);else{D=function(t){return h(this,P),new O(p(t))},D[E]=P;for(var et,nt=y(O),it=0;nt.length>it;)(et=nt[it++])in D||l(D,et,O[et]);P.constructor=D}v&&m(F)!==W&&v(F,W);var rt=new I(new D(2)),ot=r(F.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||c(F,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else D=function(t){h(this,P);var e=p(t);$(this,{bytes:N(B(e),0),byteLength:e}),o||(this.byteLength=e)},P=D[E],I=function(t,e,n){h(this,F),h(t,P);var i=A(t).byteLength,r=f(e);if(r<0||r>i)throw H("Wrong offset");if(n=void 0===n?i-r:d(n),r+n>i)throw H(L);$(this,{buffer:t,byteLength:n,byteOffset:r}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=r)},F=I[E],o&&(Z(D,"byteLength"),Z(I,"buffer"),Z(I,"byteLength"),Z(I,"byteOffset")),c(F,{getInt8:function(t){return Q(this,1,t)[0]<<24>>24},getUint8:function(t){return Q(this,1,t)[0]},getInt16:function(t){var e=Q(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Q(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return Y(Q(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return Y(Q(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return z(Q(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return z(Q(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){J(this,1,t,G,e)},setUint8:function(t,e){J(this,1,t,G,e)},setInt16:function(t,e){J(this,2,t,V,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){J(this,2,t,V,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){J(this,4,t,q,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){J(this,4,t,q,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){J(this,4,t,K,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){J(this,8,t,X,e,arguments.length>2?arguments[2]:void 0)}});S(D,R),S(I,T),t.exports={ArrayBuffer:D,DataView:I}},77154:function(t,e,n){"use strict";var i=n(92991),r=n(43231),o=n(39646),s=n(79563),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),l=o(n),c=r(t,l),u=r(e,l),h=arguments.length>2?arguments[2]:void 0,f=a((void 0===h?l:r(h,l))-u,l-c),d=1;u<c&&c<u+f&&(d=-1,u+=f-1,c+=f-1);while(f-- >0)u in n?n[c]=n[u]:s(n,c),c+=d,u+=d;return n}},41253:function(t,e,n){var i=n(39646);t.exports=function(t,e){var n=0,r=i(e),o=new t(r);while(r>n)o[n]=e[n++];return o}},15439:function(t,e,n){var i=n(97636),r=n(9337),o=n(92991),s=n(39646),a=function(t){var e=1==t;return function(n,a,l){var c,u,h=o(n),f=r(h),d=i(a,l),p=s(f);while(p-- >0)if(c=f[p],u=d(c,p,h),u)switch(t){case 0:return c;case 1:return p}return e?-1:void 0}};t.exports={findLast:a(0),findLastIndex:a(1)}},86462:function(t,e,n){"use strict";var i=n(53171),r=n(10905),o=n(43329),s=n(39646),a=n(96038),l=Math.min,c=[].lastIndexOf,u=!!c&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),f=u||!h;t.exports=f?function(t){if(u)return i(c,this,arguments)||0;var e=r(this),n=s(e),a=n-1;for(arguments.length>1&&(a=l(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:c},98081:function(t,e,n){"use strict";var i=n(31787).f,r=n(22391),o=n(8312),s=n(97636),a=n(57728),l=n(9650),c=n(89003),u=n(12707),h=n(33684),f=n(71832),d=n(7400),p=n(95926).fastKey,g=n(56407),m=g.set,v=g.getterFor;t.exports={getConstructor:function(t,e,n,u){var h=t((function(t,i){a(t,f),m(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),d||(t.size=0),l(i)||c(i,t[u],{that:t,AS_ENTRIES:n})})),f=h.prototype,g=v(e),y=function(t,e,n){var i,r,o=g(t),s=w(t,e);return s?s.value=n:(o.last=s={index:r=p(e,!0),key:e,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),d?o.size++:t.size++,"F"!==r&&(o.index[r]=s)),t},w=function(t,e){var n,i=g(t),r=p(e);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==e)return n};return o(f,{clear:function(){var t=this,e=g(t),n=e.index,i=e.first;while(i)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete n[i.index],i=i.next;e.first=e.last=void 0,d?e.size=0:t.size=0},delete:function(t){var e=this,n=g(e),i=w(e,t);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),d?n.size--:e.size--}return!!i},forEach:function(t){var e,n=g(this),i=s(t,arguments.length>1?arguments[1]:void 0);while(e=e?e.next:n.first){i(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!w(this,t)}}),o(f,n?{get:function(t){var e=w(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(f,"size",{get:function(){return g(this).size}}),h},setStrong:function(t,e,n){var i=e+" Iterator",r=v(e),o=v(i);u(t,e,(function(t,e){m(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){var t=o(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?h("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(e)}}},63370:function(t,e,n){"use strict";var i=n(65968),r=n(8312),o=n(95926).getWeakData,s=n(57728),a=n(21176),l=n(9650),c=n(85052),u=n(89003),h=n(89996),f=n(98270),d=n(56407),p=d.set,g=d.getterFor,m=h.find,v=h.findIndex,y=i([].splice),w=0,b=function(t){return t.frozen||(t.frozen=new _)},_=function(){this.entries=[]},S=function(t,e){return m(t.entries,(function(t){return t[0]===e}))};_.prototype={get:function(t){var e=S(this,t);if(e)return e[1]},has:function(t){return!!S(this,t)},set:function(t,e){var n=S(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=v(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var h=t((function(t,r){s(t,d),p(t,{type:e,id:w++,frozen:void 0}),l(r)||u(r,t[i],{that:t,AS_ENTRIES:n})})),d=h.prototype,m=g(e),v=function(t,e,n){var i=m(t),r=o(a(e),!0);return!0===r?b(i).set(e,n):r[i.id]=n,t};return r(d,{delete:function(t){var e=m(this);if(!c(t))return!1;var n=o(t);return!0===n?b(e)["delete"](t):n&&f(n,e.id)&&delete n[e.id]},has:function(t){var e=m(this);if(!c(t))return!1;var n=o(t);return!0===n?b(e).has(t):n&&f(n,e.id)}}),r(d,n?{get:function(t){var e=m(this);if(c(t)){var n=o(t);return!0===n?b(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return v(this,t,e)}}:{add:function(t){return v(this,t,!0)}}),h}}},69789:function(t,e,n){"use strict";var i=n(23103),r=n(9859),o=n(65968),s=n(46541),a=n(14768),l=n(95926),c=n(89003),u=n(57728),h=n(26733),f=n(9650),d=n(85052),p=n(24229),g=n(74575),m=n(54555),v=n(20835);t.exports=function(t,e,n){var y=-1!==t.indexOf("Map"),w=-1!==t.indexOf("Weak"),b=y?"set":"add",_=r[t],S=_&&_.prototype,x=_,C={},k=function(t){var e=o(S[t]);a(S,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(w&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return w&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(w&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})},A=s(t,!h(_)||!(w||S.forEach&&!p((function(){(new _).entries().next()}))));if(A)x=n.getConstructor(e,t,y,b),l.enable();else if(s(t,!0)){var $=new x,R=$[b](w?{}:-0,1)!=$,T=p((function(){$.has(1)})),E=g((function(t){new _(t)})),L=!w&&p((function(){var t=new _,e=5;while(e--)t[b](e,e);return!t.has(-0)}));E||(x=e((function(t,e){u(t,S);var n=v(new _,t,x);return f(e)||c(e,n[b],{that:n,AS_ENTRIES:y}),n})),x.prototype=S,S.constructor=x),(T||L)&&(k("delete"),k("has"),y&&k("get")),(L||R)&&k(b),w&&S.clear&&delete S.clear}return C[t]=x,i({global:!0,constructor:!0,forced:x!=_},C),m(x,t),w||n.setStrong(x,t,y),x}},96616:function(t,e,n){var i=n(16039),r=n(31787);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),r.f(t,e,n)}},8312:function(t,e,n){var i=n(14768);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},56201:function(t){var e=Array,n=Math.abs,i=Math.pow,r=Math.floor,o=Math.log,s=Math.LN2,a=function(t,a,l){var c,u,h,f=e(l),d=8*l-a-1,p=(1<<d)-1,g=p>>1,m=23===a?i(2,-24)-i(2,-77):0,v=t<0||0===t&&1/t<0?1:0,y=0;t=n(t),t!=t||t===1/0?(u=t!=t?1:0,c=p):(c=r(o(t)/s),h=i(2,-c),t*h<1&&(c--,h*=2),t+=c+g>=1?m/h:m*i(2,1-g),t*h>=2&&(c++,h/=2),c+g>=p?(u=0,c=p):c+g>=1?(u=(t*h-1)*i(2,a),c+=g):(u=t*i(2,g-1)*i(2,a),c=0));while(a>=8)f[y++]=255&u,u/=256,a-=8;c=c<<a|u,d+=a;while(d>0)f[y++]=255&c,c/=256,d-=8;return f[--y]|=128*v,f},l=function(t,e){var n,r=t.length,o=8*r-e-1,s=(1<<o)-1,a=s>>1,l=o-7,c=r-1,u=t[c--],h=127&u;u>>=7;while(l>0)h=256*h+t[c--],l-=8;n=h&(1<<-l)-1,h>>=-l,l+=e;while(l>0)n=256*n+t[c--],l-=8;if(0===h)h=1-a;else{if(h===s)return n?NaN:u?-1/0:1/0;n+=i(2,e),h-=a}return(u?-1:1)*n*i(2,h-e)};t.exports={pack:a,unpack:l}},79098:function(t,e,n){var i=n(81589),r=n(65968),o=r("".slice);t.exports=function(t){return"Big"===o(i(t),0,3)}},82292:function(t,e,n){var i=n(85052),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},56810:function(t){var e=Math.expm1,n=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){var e=+t;return 0==e?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:e},20988:function(t){var e=Math.log,n=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*n}},45496:function(t,e,n){var i=n(9859),r=n(24229),o=n(65968),s=n(83326),a=n(1017).trim,l=n(41647),c=o("".charAt),u=i.parseFloat,h=i.Symbol,f=h&&h.iterator,d=1/u(l+"-0")!==-1/0||f&&!r((function(){u(Object(f))}));t.exports=d?function(t){var e=a(s(t)),n=u(e);return 0===n&&"-"==c(e,0)?-0:n}:u},72101:function(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},57456:function(t,e,n){var i=n(80598);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},46650:function(t,e,n){var i=n(65968),r=n(34237),o=n(83326),s=n(93124),a=n(58885),l=i(s),c=i("".slice),u=Math.ceil,h=function(t){return function(e,n,i){var s,h,f=o(a(e)),d=r(n),p=f.length,g=void 0===i?" ":o(i);return d<=p||""==g?f:(s=d-p,h=l(g,u(s/g.length)),h.length>s&&(h=c(h,0,s)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},77321:function(t,e,n){"use strict";var i=n(65968),r=2147483647,o=36,s=1,a=26,l=38,c=700,u=72,h=128,f="-",d=/[^\0-\u007E]/,p=/[.\u3002\uFF0E\uFF61]/g,g="Overflow: input needs wider integers to process",m=o-s,v=RangeError,y=i(p.exec),w=Math.floor,b=String.fromCharCode,_=i("".charCodeAt),S=i([].join),x=i([].push),C=i("".replace),k=i("".split),A=i("".toLowerCase),$=function(t){var e=[],n=0,i=t.length;while(n<i){var r=_(t,n++);if(r>=55296&&r<=56319&&n<i){var o=_(t,n++);56320==(64512&o)?x(e,((1023&r)<<10)+(1023&o)+65536):(x(e,r),n--)}else x(e,r)}return e},R=function(t){return t+22+75*(t<26)},T=function(t,e,n){var i=0;t=n?w(t/c):t>>1,t+=w(t/e);while(t>m*a>>1)t=w(t/m),i+=o;return w(i+(m+1)*t/(t+l))},E=function(t){var e=[];t=$(t);var n,i,l=t.length,c=h,d=0,p=u;for(n=0;n<t.length;n++)i=t[n],i<128&&x(e,b(i));var m=e.length,y=m;m&&x(e,f);while(y<l){var _=r;for(n=0;n<t.length;n++)i=t[n],i>=c&&i<_&&(_=i);var C=y+1;if(_-c>w((r-d)/C))throw v(g);for(d+=(_-c)*C,c=_,n=0;n<t.length;n++){if(i=t[n],i<c&&++d>r)throw v(g);if(i==c){var k=d,A=o;while(1){var E=A<=p?s:A>=p+a?a:A-p;if(k<E)break;var L=k-E,M=o-E;x(e,b(R(E+L%M))),k=w(L/M),A+=o}x(e,b(R(k))),p=T(d,C,y==m),d=0,y++}}d++,c++}return S(e,"")};t.exports=function(t){var e,n,i=[],r=k(C(A(t),p,"."),".");for(e=0;e<r.length;e++)n=r[e],x(i,y(d,n)?"xn--"+E(n):n);return S(i,".")}},19123:function(t,e,n){var i=n(92066),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},7331:function(t,e,n){var i=n(43329),r=n(34237),o=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw o("Wrong length or index");return n}},84262:function(t,e,n){var i=n(72002),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw r("Wrong offset");return n}},72002:function(t,e,n){var i=n(43329),r=RangeError;t.exports=function(t){var e=i(t);if(e<0)throw r("The argument can't be less than 0");return e}},42574:function(t,e,n){"use strict";var i=n(23103),r=n(9859),o=n(20266),s=n(7400),a=n(48200),l=n(9918),c=n(53816),u=n(57728),h=n(65358),f=n(75762),d=n(82292),p=n(34237),g=n(7331),m=n(84262),v=n(39310),y=n(98270),w=n(81589),b=n(85052),_=n(49395),S=n(22391),x=n(91321),C=n(56540),k=n(78151).f,A=n(35215),$=n(89996).forEach,R=n(71832),T=n(31787),E=n(97933),L=n(56407),M=n(20835),O=L.get,D=L.set,P=L.enforce,I=T.f,F=E.f,W=Math.round,B=r.RangeError,H=c.ArrayBuffer,N=H.prototype,j=c.DataView,U=l.NATIVE_ARRAY_BUFFER_VIEWS,z=l.TYPED_ARRAY_TAG,G=l.TypedArray,V=l.TypedArrayPrototype,q=l.aTypedArrayConstructor,Y=l.isTypedArray,K="BYTES_PER_ELEMENT",X="Wrong length",Z=function(t,e){q(t);var n=0,i=e.length,r=new t(i);while(i>n)r[n]=e[n++];return r},Q=function(t,e){I(t,e,{get:function(){return O(this)[e]}})},J=function(t){var e;return x(N,t)||"ArrayBuffer"==(e=w(t))||"SharedArrayBuffer"==e},tt=function(t,e){return Y(t)&&!_(e)&&e in t&&d(+e)&&e>=0},et=function(t,e){return e=v(e),tt(t,e)?h(2,t[e]):F(t,e)},nt=function(t,e,n){return e=v(e),!(tt(t,e)&&b(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?I(t,e,n):(t[e]=n.value,t)};s?(U||(E.f=et,T.f=nt,Q(V,"buffer"),Q(V,"byteOffset"),Q(V,"byteLength"),Q(V,"length")),i({target:"Object",stat:!0,forced:!U},{getOwnPropertyDescriptor:et,defineProperty:nt}),t.exports=function(t,e,n){var s=t.match(/\d+$/)[0]/8,l=t+(n?"Clamped":"")+"Array",c="get"+t,h="set"+t,d=r[l],v=d,y=v&&v.prototype,w={},_=function(t,e){var n=O(t);return n.view[c](e*s+n.byteOffset,!0)},x=function(t,e,i){var r=O(t);n&&(i=(i=W(i))<0?0:i>255?255:255&i),r.view[h](e*s+r.byteOffset,i,!0)},T=function(t,e){I(t,e,{get:function(){return _(this,e)},set:function(t){return x(this,e,t)},enumerable:!0})};U?a&&(v=e((function(t,e,n,i){return u(t,y),M(function(){return b(e)?J(e)?void 0!==i?new d(e,m(n,s),i):void 0!==n?new d(e,m(n,s)):new d(e):Y(e)?Z(v,e):o(A,v,e):new d(g(e))}(),t,v)})),C&&C(v,G),$(k(d),(function(t){t in v||f(v,t,d[t])})),v.prototype=y):(v=e((function(t,e,n,i){u(t,y);var r,a,l,c=0,h=0;if(b(e)){if(!J(e))return Y(e)?Z(v,e):o(A,v,e);r=e,h=m(n,s);var f=e.byteLength;if(void 0===i){if(f%s)throw B(X);if(a=f-h,a<0)throw B(X)}else if(a=p(i)*s,a+h>f)throw B(X);l=a/s}else l=g(e),a=l*s,r=new H(a);D(t,{buffer:r,byteOffset:h,byteLength:a,length:l,view:new j(r)});while(c<l)T(t,c++)})),C&&C(v,G),y=v.prototype=S(V)),y.constructor!==v&&f(y,"constructor",v),P(y).TypedArrayConstructor=v,z&&f(y,z,l);var E=v!=d;w[l]=v,i({global:!0,constructor:!0,forced:E,sham:!U},w),K in v||f(v,K,s),K in y||f(y,K,s),R(l)}):t.exports=function(){}},48200:function(t,e,n){var i=n(9859),r=n(24229),o=n(74575),s=n(9918).NATIVE_ARRAY_BUFFER_VIEWS,a=i.ArrayBuffer,l=i.Int8Array;t.exports=!s||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!o((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||r((function(){return 1!==new l(new a(2),1,void 0).length}))},88874:function(t,e,n){var i=n(41253),r=n(54622);t.exports=function(t,e){return i(r(t),e)}},35215:function(t,e,n){var i=n(97636),r=n(20266),o=n(57988),s=n(92991),a=n(39646),l=n(28403),c=n(78830),u=n(91943),h=n(79098),f=n(9918).aTypedArrayConstructor,d=n(19123);t.exports=function(t){var e,n,p,g,m,v,y,w,b=o(this),_=s(t),S=arguments.length,x=S>1?arguments[1]:void 0,C=void 0!==x,k=c(_);if(k&&!u(k)){y=l(_,k),w=y.next,_=[];while(!(v=r(w,y)).done)_.push(v.value)}for(C&&S>2&&(x=i(x,arguments[2])),n=a(_),p=new(f(b))(n),g=h(p),e=0;n>e;e++)m=C?x(_[e],e):_[e],p[e]=g?d(m):+m;return p}},54622:function(t,e,n){var i=n(9918),r=n(37942),o=i.aTypedArrayConstructor,s=i.getTypedArrayConstructor;t.exports=function(t){return o(r(t,s(t)))}},34144:function(t,e,n){var i=n(24229),r=n(70095),o=n(24231),s=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,i){e["delete"]("b"),n+=i+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},17525:function(t,e,n){var i=n(9859),r=n(54555);r(i.JSON,"JSON",!0)},19294:function(t,e,n){"use strict";var i=n(69789),r=n(98081);i("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r)},79321:function(t,e,n){n(19294)},15290:function(t,e,n){var i=n(23103),r=Math.asinh,o=Math.log,s=Math.sqrt;function a(t){var e=+t;return isFinite(e)&&0!=e?e<0?-a(-e):o(e+s(e*e+1)):e}i({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:a})},97890:function(t,e,n){var i=n(23103),r=n(20988);i({target:"Math",stat:!0},{log10:r})},5377:function(t,e,n){var i=n(23103),r=Math.log,o=Math.LN2;i({target:"Math",stat:!0},{log2:function(t){return r(t)/o}})},74279:function(t,e,n){var i=n(23103),r=n(57235);i({target:"Math",stat:!0},{sign:r})},8373:function(t,e,n){var i=n(23103),r=n(24229),o=n(56810),s=Math.abs,a=Math.exp,l=Math.E,c=r((function(){return-2e-17!=Math.sinh(-2e-17)}));i({target:"Math",stat:!0,forced:c},{sinh:function(t){var e=+t;return s(e)<1?(o(e)-o(-e))/2:(a(e-1)-a(-e-1))*(l/2)}})},18275:function(t,e,n){var i=n(54555);i(Math,"Math",!0)},23271:function(t,e,n){var i=n(23103);i({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},33132:function(t,e,n){var i=n(23103),r=n(82292);i({target:"Number",stat:!0},{isInteger:r})},35883:function(t,e,n){var i=n(23103),r=n(87664).entries;i({target:"Object",stat:!0},{entries:function(t){return r(t)}})},13489:function(t,e,n){var i=n(23103),r=n(45496);i({global:!0,forced:parseFloat!=r},{parseFloat:r})},17368:function(t,e,n){var i=n(7400),r=n(9859),o=n(65968),s=n(46541),a=n(20835),l=n(75762),c=n(78151).f,u=n(91321),h=n(48311),f=n(83326),d=n(83349),p=n(25650),g=n(26060),m=n(14768),v=n(24229),y=n(98270),w=n(56407).enforce,b=n(71832),_=n(70095),S=n(42926),x=n(10461),C=_("match"),k=r.RegExp,A=k.prototype,$=r.SyntaxError,R=o(A.exec),T=o("".charAt),E=o("".replace),L=o("".indexOf),M=o("".slice),O=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,P=/a/g,I=new k(D)!==D,F=p.MISSED_STICKY,W=p.UNSUPPORTED_Y,B=i&&(!I||F||S||x||v((function(){return P[C]=!1,k(D)!=D||k(P)==P||"/a/i"!=k(D,"i")}))),H=function(t){for(var e,n=t.length,i=0,r="",o=!1;i<=n;i++)e=T(t,i),"\\"!==e?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),r+=e):r+="[\\s\\S]":r+=e+T(t,++i);return r},N=function(t){for(var e,n=t.length,i=0,r="",o=[],s={},a=!1,l=!1,c=0,u="";i<=n;i++){if(e=T(t,i),"\\"===e)e+=T(t,++i);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:R(O,M(t,i+1))&&(i+=2,l=!0),r+=e,c++;continue;case">"===e&&l:if(""===u||y(s,u))throw new $("Invalid capture group name");s[u]=!0,o[o.length]=[u,c],l=!1,u="";continue}l?u+=e:r+=e}return[r,o]};if(s("RegExp",B)){for(var j=function(t,e){var n,i,r,o,s,c,p=u(A,this),g=h(t),m=void 0===e,v=[],y=t;if(!p&&g&&m&&t.constructor===j)return t;if((g||u(A,t))&&(t=t.source,m&&(e=d(y))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),y=t,S&&"dotAll"in D&&(i=!!e&&L(e,"s")>-1,i&&(e=E(e,/s/g,""))),n=e,F&&"sticky"in D&&(r=!!e&&L(e,"y")>-1,r&&W&&(e=E(e,/y/g,""))),x&&(o=N(t),t=o[0],v=o[1]),s=a(k(t,e),p?this:A,j),(i||r||v.length)&&(c=w(s),i&&(c.dotAll=!0,c.raw=j(H(t),n)),r&&(c.sticky=!0),v.length&&(c.groups=v)),t!==y)try{l(s,"source",""===y?"(?:)":y)}catch(b){}return s},U=c(k),z=0;U.length>z;)g(j,k,U[z++]);A.constructor=j,j.prototype=A,m(r,"RegExp",j,{constructor:!0})}b("RegExp")},24471:function(t,e,n){var i=n(7400),r=n(42926),o=n(27079),s=n(96616),a=n(56407).get,l=RegExp.prototype,c=TypeError;i&&r&&s(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!a(this).dotAll;throw c("Incompatible receiver, RegExp required")}}})},90103:function(t,e,n){var i=n(9859),r=n(7400),o=n(96616),s=n(30895),a=n(24229),l=i.RegExp,c=l.prototype,u=r&&a((function(){var t=!0;try{l(".","d")}catch(u){t=!1}var e={},n="",i=t?"dgimsy":"gimsy",r=function(t,i){Object.defineProperty(e,t,{get:function(){return n+=i,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(o.hasIndices="d"),o)r(s,o[s]);var a=Object.getOwnPropertyDescriptor(c,"flags").get.call(e);return a!==i||n!==i}));u&&o(c,"flags",{configurable:!0,get:s})},51172:function(t,e,n){var i=n(7400),r=n(25650).MISSED_STICKY,o=n(27079),s=n(96616),a=n(56407).get,l=RegExp.prototype,c=TypeError;i&&r&&s(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!a(this).sticky;throw c("Incompatible receiver, RegExp required")}}})},72560:function(t,e,n){"use strict";var i=n(69789),r=n(98081);i("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r)},93244:function(t,e,n){n(72560)},96708:function(t,e,n){"use strict";var i=n(23103),r=n(44745),o=n(97933).f,s=n(34237),a=n(83326),l=n(47272),c=n(58885),u=n(48127),h=n(24231),f=r("".endsWith),d=r("".slice),p=Math.min,g=u("endsWith"),m=!h&&!g&&!!function(){var t=o(String.prototype,"endsWith");return t&&!t.writable}();i({target:"String",proto:!0,forced:!m&&!g},{endsWith:function(t){var e=a(c(this));l(t);var n=arguments.length>1?arguments[1]:void 0,i=e.length,r=void 0===n?i:p(s(n),i),o=a(t);return f?f(e,o,r):d(e,r-o.length,r)===o}})},35734:function(t,e,n){"use strict";var i=n(23103),r=n(46650).start,o=n(57456);i({target:"String",proto:!0,forced:o},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},71639:function(t,e,n){"use strict";var i=n(23103),r=n(20266),o=n(65968),s=n(58885),a=n(26733),l=n(9650),c=n(48311),u=n(83326),h=n(55300),f=n(83349),d=n(70017),p=n(70095),g=n(24231),m=p("replace"),v=TypeError,y=o("".indexOf),w=o("".replace),b=o("".slice),_=Math.max,S=function(t,e,n){return n>t.length?-1:""===e?n:y(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,o,p,x,C,k,A,$,R=s(this),T=0,E=0,L="";if(!l(t)){if(n=c(t),n&&(i=u(s(f(t))),!~y(i,"g")))throw v("`.replaceAll` does not allow non-global regexes");if(o=h(t,m),o)return r(o,t,R,e);if(g&&n)return w(u(R),t,e)}p=u(R),x=u(t),C=a(e),C||(e=u(e)),k=x.length,A=_(1,k),T=S(p,x,0);while(-1!==T)$=C?u(e(x,T,p)):d(x,p,T,[],void 0,e),L+=b(p,E,T)+$,E=T+k,T=S(p,x,T+A);return E<p.length&&(L+=b(p,E)),L}})},94908:function(t,e,n){"use strict";var i=n(20266),r=n(94954),o=n(21176),s=n(9650),a=n(58885),l=n(72101),c=n(83326),u=n(55300),h=n(98115);r("search",(function(t,e,n){return[function(e){var n=a(this),r=s(e)?void 0:u(e,t);return r?i(r,e,n):new RegExp(e)[t](c(n))},function(t){var i=o(this),r=c(t),s=n(e,i,r);if(s.done)return s.value;var a=i.lastIndex;l(a,0)||(i.lastIndex=0);var u=h(i,r);return l(i.lastIndex,a)||(i.lastIndex=a),null===u?-1:u.index}]}))},96882:function(t,e,n){var i=n(63524);i("asyncIterator")},38859:function(t,e,n){var i=n(31333),r=n(63524),o=n(54555);r("toStringTag"),o(i("Symbol"),"Symbol")},94898:function(t,e,n){"use strict";var i=n(9918),r=n(39646),o=n(43329),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("at",(function(t){var e=s(this),n=r(e),i=o(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}))},5825:function(t,e,n){"use strict";var i=n(65968),r=n(9918),o=n(77154),s=i(o),a=r.aTypedArray,l=r.exportTypedArrayMethod;l("copyWithin",(function(t,e){return s(a(this),t,e,arguments.length>2?arguments[2]:void 0)}))},67170:function(t,e,n){"use strict";var i=n(9918),r=n(89996).every,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("every",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},38857:function(t,e,n){"use strict";var i=n(9918),r=n(97065),o=n(19123),s=n(81589),a=n(20266),l=n(65968),c=n(24229),u=i.aTypedArray,h=i.exportTypedArrayMethod,f=l("".slice),d=c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));h("fill",(function(t){var e=arguments.length;u(this);var n="Big"===f(s(this),0,3)?o(t):+t;return a(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),d)},58329:function(t,e,n){"use strict";var i=n(9918),r=n(89996).filter,o=n(88874),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("filter",(function(t){var e=r(s(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},427:function(t,e,n){"use strict";var i=n(9918),r=n(89996).findIndex,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},57093:function(t,e,n){"use strict";var i=n(9918),r=n(15439).findLastIndex,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLastIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},40171:function(t,e,n){"use strict";var i=n(9918),r=n(15439).findLast,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLast",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},76279:function(t,e,n){"use strict";var i=n(9918),r=n(89996).find,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("find",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},11159:function(t,e,n){"use strict";var i=n(9918),r=n(89996).forEach,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("forEach",(function(t){r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},42516:function(t,e,n){"use strict";var i=n(9918),r=n(19540).includes,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("includes",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},64349:function(t,e,n){"use strict";var i=n(9918),r=n(19540).indexOf,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("indexOf",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},15273:function(t,e,n){"use strict";var i=n(9859),r=n(24229),o=n(65968),s=n(9918),a=n(15735),l=n(70095),c=l("iterator"),u=i.Uint8Array,h=o(a.values),f=o(a.keys),d=o(a.entries),p=s.aTypedArray,g=s.exportTypedArrayMethod,m=u&&u.prototype,v=!r((function(){m[c].call([1])})),y=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,w=function(){return h(p(this))};g("entries",(function(){return d(p(this))}),v),g("keys",(function(){return f(p(this))}),v),g("values",w,v||!y,{name:"values"}),g(c,w,v||!y,{name:"values"})},16729:function(t,e,n){"use strict";var i=n(9918),r=n(65968),o=i.aTypedArray,s=i.exportTypedArrayMethod,a=r([].join);s("join",(function(t){return a(o(this),t)}))},41801:function(t,e,n){"use strict";var i=n(9918),r=n(53171),o=n(86462),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("lastIndexOf",(function(t){var e=arguments.length;return r(o,s(this),e>1?[t,arguments[1]]:[t])}))},50574:function(t,e,n){"use strict";var i=n(9918),r=n(89996).map,o=n(54622),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("map",(function(t){return r(s(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(o(t))(e)}))}))},39271:function(t,e,n){"use strict";var i=n(9918),r=n(43143).right,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("reduceRight",(function(t){var e=arguments.length;return r(o(this),t,e,e>1?arguments[1]:void 0)}))},5787:function(t,e,n){"use strict";var i=n(9918),r=n(43143).left,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("reduce",(function(t){var e=arguments.length;return r(o(this),t,e,e>1?arguments[1]:void 0)}))},73160:function(t,e,n){"use strict";var i=n(9918),r=i.aTypedArray,o=i.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){var t,e=this,n=r(e).length,i=s(n/2),o=0;while(o<i)t=e[o],e[o++]=e[--n],e[n]=t;return e}))},65688:function(t,e,n){"use strict";var i=n(9859),r=n(20266),o=n(9918),s=n(39646),a=n(84262),l=n(92991),c=n(24229),u=i.RangeError,h=i.Int8Array,f=h&&h.prototype,d=f&&f.set,p=o.aTypedArray,g=o.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return r(d,t,{length:1,0:3},1),3!==t[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return r(d,this,n,e);var i=this.length,o=s(n),c=0;if(o+e>i)throw u("Wrong length");while(c<o)this[e+c]=n[c++]}),!m||v)},93157:function(t,e,n){"use strict";var i=n(9918),r=n(54622),o=n(24229),s=n(1909),a=i.aTypedArray,l=i.exportTypedArrayMethod,c=o((function(){new Int8Array(1).slice()}));l("slice",(function(t,e){var n=s(a(this),t,e),i=r(this),o=0,l=n.length,c=new i(l);while(l>o)c[o]=n[o++];return c}),c)},33333:function(t,e,n){"use strict";var i=n(9918),r=n(89996).some,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("some",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},70315:function(t,e,n){"use strict";var i=n(9859),r=n(44745),o=n(24229),s=n(77111),a=n(33867),l=n(9918),c=n(22671),u=n(48506),h=n(6358),f=n(49811),d=l.aTypedArray,p=l.exportTypedArrayMethod,g=i.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(o((function(){m(new g(2),null)}))&&o((function(){m(new g(2),{})}))),y=!!m&&!o((function(){if(h)return h<74;if(c)return c<67;if(u)return!0;if(f)return f<602;var t,e,n=new g(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(m(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0})),w=function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!==n?-1:e!==e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}};p("sort",(function(t){return void 0!==t&&s(t),y?m(this,t):a(d(this),w(t))}),!y||v)},50556:function(t,e,n){"use strict";var i=n(9859),r=n(53171),o=n(9918),s=n(24229),a=n(1909),l=i.Int8Array,c=o.aTypedArray,u=o.exportTypedArrayMethod,h=[].toLocaleString,f=!!l&&s((function(){h.call(new l(1))})),d=s((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!s((function(){l.prototype.toLocaleString.call([1,2])}));u("toLocaleString",(function(){return r(h,f?a(c(this)):c(this),a(arguments))}),d)},29224:function(t,e,n){"use strict";var i=n(9918).exportTypedArrayMethod,r=n(24229),o=n(9859),s=n(65968),a=o.Uint8Array,l=a&&a.prototype||{},c=[].toString,u=s([].join);r((function(){c.call({})}))&&(c=function(){return u(this)});var h=l.toString!=c;i("toString",c,h)},13675:function(t,e,n){var i=n(42574);i("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},6418:function(t,e,n){"use strict";var i,r=n(9859),o=n(65968),s=n(8312),a=n(95926),l=n(69789),c=n(63370),u=n(85052),h=n(35343),f=n(56407).enforce,d=n(51180),p=!r.ActiveXObject&&"ActiveXObject"in r,g=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},m=l("WeakMap",g,c);if(d&&p){i=c.getConstructor(g,"WeakMap",!0),a.enable();var v=m.prototype,y=o(v["delete"]),w=o(v.has),b=o(v.get),_=o(v.set);s(v,{delete:function(t){if(u(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new i),y(this,t)||e.frozen["delete"](t)}return y(this,t)},has:function(t){if(u(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new i),w(this,t)||e.frozen.has(t)}return w(this,t)},get:function(t){if(u(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new i),w(this,t)?b(this,t):e.frozen.get(t)}return b(this,t)},set:function(t,e){if(u(t)&&!h(t)){var n=f(this);n.frozen||(n.frozen=new i),w(this,t)?_(this,t,e):n.frozen.set(t,e)}else _(this,t,e);return this}})}},52356:function(t,e,n){n(6418)},19866:function(t,e,n){var i=n(23103),r=n(9859),o=n(24794),s=n(77111),a=n(77579),l=n(28801),c=r.process;i({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){a(arguments.length,1),s(t);var e=l&&c.domain;o(e?e.bind(t):t)}})},62653:function(t,e,n){"use strict";n(15735);var i=n(23103),r=n(9859),o=n(20266),s=n(65968),a=n(7400),l=n(34144),c=n(14768),u=n(8312),h=n(54555),f=n(42247),d=n(56407),p=n(57728),g=n(26733),m=n(98270),v=n(97636),y=n(81589),w=n(21176),b=n(85052),_=n(83326),S=n(22391),x=n(65358),C=n(28403),k=n(78830),A=n(77579),$=n(70095),R=n(33867),T=$("iterator"),E="URLSearchParams",L=E+"Iterator",M=d.set,O=d.getterFor(E),D=d.getterFor(L),P=Object.getOwnPropertyDescriptor,I=function(t){if(!a)return r[t];var e=P(r,t);return e&&e.value},F=I("fetch"),W=I("Request"),B=I("Headers"),H=W&&W.prototype,N=B&&B.prototype,j=r.RegExp,U=r.TypeError,z=r.decodeURIComponent,G=r.encodeURIComponent,V=s("".charAt),q=s([].join),Y=s([].push),K=s("".replace),X=s([].shift),Z=s([].splice),Q=s("".split),J=s("".slice),tt=/\+/g,et=Array(4),nt=function(t){return et[t-1]||(et[t-1]=j("((?:%[\\da-f]{2}){"+t+"})","gi"))},it=function(t){try{return z(t)}catch(e){return t}},rt=function(t){var e=K(t,tt," "),n=4;try{return z(e)}catch(i){while(n)e=K(e,nt(n--),it);return e}},ot=/[!'()~]|%20/g,st={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},at=function(t){return st[t]},lt=function(t){return K(G(t),ot,at)},ct=f((function(t,e){M(this,{type:L,iterator:C(O(t).entries),kind:e})}),"Iterator",(function(){var t=D(this),e=t.kind,n=t.iterator.next(),i=n.value;return n.done||(n.value="keys"===e?i.key:"values"===e?i.value:[i.key,i.value]),n}),!0),ut=function(t){this.entries=[],this.url=null,void 0!==t&&(b(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===V(t,0)?J(t,1):t:_(t)))};ut.prototype={type:E,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,i,r,s,a,l,c=k(t);if(c){e=C(t,c),n=e.next;while(!(i=o(n,e)).done){if(r=C(w(i.value)),s=r.next,(a=o(s,r)).done||(l=o(s,r)).done||!o(s,r).done)throw U("Expected sequence with length 2");Y(this.entries,{key:_(a.value),value:_(l.value)})}}else for(var u in t)m(t,u)&&Y(this.entries,{key:u,value:_(t[u])})},parseQuery:function(t){if(t){var e,n,i=Q(t,"&"),r=0;while(r<i.length)e=i[r++],e.length&&(n=Q(e,"="),Y(this.entries,{key:rt(X(n)),value:rt(q(n,"="))}))}},serialize:function(){var t,e=this.entries,n=[],i=0;while(i<e.length)t=e[i++],Y(n,lt(t.key)+"="+lt(t.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ht=function(){p(this,ft);var t=arguments.length>0?arguments[0]:void 0;M(this,new ut(t))},ft=ht.prototype;if(u(ft,{append:function(t,e){A(arguments.length,2);var n=O(this);Y(n.entries,{key:_(t),value:_(e)}),n.updateURL()},delete:function(t){A(arguments.length,1);var e=O(this),n=e.entries,i=_(t),r=0;while(r<n.length)n[r].key===i?Z(n,r,1):r++;e.updateURL()},get:function(t){A(arguments.length,1);for(var e=O(this).entries,n=_(t),i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){A(arguments.length,1);for(var e=O(this).entries,n=_(t),i=[],r=0;r<e.length;r++)e[r].key===n&&Y(i,e[r].value);return i},has:function(t){A(arguments.length,1);var e=O(this).entries,n=_(t),i=0;while(i<e.length)if(e[i++].key===n)return!0;return!1},set:function(t,e){A(arguments.length,1);for(var n,i=O(this),r=i.entries,o=!1,s=_(t),a=_(e),l=0;l<r.length;l++)n=r[l],n.key===s&&(o?Z(r,l--,1):(o=!0,n.value=a));o||Y(r,{key:s,value:a}),i.updateURL()},sort:function(){var t=O(this);R(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){var e,n=O(this).entries,i=v(t,arguments.length>1?arguments[1]:void 0),r=0;while(r<n.length)e=n[r++],i(e.value,e.key,this)},keys:function(){return new ct(this,"keys")},values:function(){return new ct(this,"values")},entries:function(){return new ct(this,"entries")}},{enumerable:!0}),c(ft,T,ft.entries,{name:"entries"}),c(ft,"toString",(function(){return O(this).serialize()}),{enumerable:!0}),h(ht,E),i({global:!0,constructor:!0,forced:!l},{URLSearchParams:ht}),!l&&g(B)){var dt=s(N.has),pt=s(N.set),gt=function(t){if(b(t)){var e,n=t.body;if(y(n)===E)return e=t.headers?new B(t.headers):new B,dt(e,"content-type")||pt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(t,{body:x(0,_(n)),headers:x(0,e)})}return t};if(g(F)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?gt(arguments[1]):{})}}),g(W)){var mt=function(t){return p(this,H),new W(t,arguments.length>1?gt(arguments[1]):{})};H.constructor=mt,mt.prototype=H,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:mt})}}t.exports={URLSearchParams:ht,getState:O}},60523:function(t,e,n){n(62653)},95340:function(t,e,n){"use strict";n(28673);var i,r=n(23103),o=n(7400),s=n(34144),a=n(9859),l=n(97636),c=n(65968),u=n(14768),h=n(96616),f=n(57728),d=n(98270),p=n(47),g=n(10507),m=n(69794),v=n(30966).codeAt,y=n(77321),w=n(83326),b=n(54555),_=n(77579),S=n(62653),x=n(56407),C=x.set,k=x.getterFor("URL"),A=S.URLSearchParams,$=S.getState,R=a.URL,T=a.TypeError,E=a.parseInt,L=Math.floor,M=Math.pow,O=c("".charAt),D=c(/./.exec),P=c([].join),I=c(1..toString),F=c([].pop),W=c([].push),B=c("".replace),H=c([].shift),N=c("".split),j=c("".slice),U=c("".toLowerCase),z=c([].unshift),G="Invalid authority",V="Invalid scheme",q="Invalid host",Y="Invalid port",K=/[a-z]/i,X=/[\d+-.a-z]/i,Z=/\d/,Q=/^0x/i,J=/^[0-7]+$/,tt=/^\d+$/,et=/^[\da-f]+$/i,nt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,ot=/[\t\n\r]/g,st=function(t){var e,n,i,r,o,s,a,l=N(t,".");if(l.length&&""==l[l.length-1]&&l.length--,e=l.length,e>4)return t;for(n=[],i=0;i<e;i++){if(r=l[i],""==r)return t;if(o=10,r.length>1&&"0"==O(r,0)&&(o=D(Q,r)?16:8,r=j(r,8==o?1:2)),""===r)s=0;else{if(!D(10==o?tt:8==o?J:et,r))return t;s=E(r,o)}W(n,s)}for(i=0;i<e;i++)if(s=n[i],i==e-1){if(s>=M(256,5-e))return null}else if(s>255)return null;for(a=F(n),i=0;i<n.length;i++)a+=n[i]*M(256,3-i);return a},at=function(t){var e,n,i,r,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,f=function(){return O(t,h)};if(":"==f()){if(":"!=O(t,1))return;h+=2,c++,u=c}while(f()){if(8==c)return;if(":"!=f()){e=n=0;while(n<4&&D(et,f()))e=16*e+E(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,c>6)return;i=0;while(f()){if(r=null,i>0){if(!("."==f()&&i<4))return;h++}if(!D(Z,f()))return;while(D(Z,f())){if(o=E(f(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}l[c]=256*l[c]+r,i++,2!=i&&4!=i||c++}if(4!=i)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[c++]=e}else{if(null!==u)return;h++,c++,u=c}}if(null!==u){s=c-u,c=7;while(0!=c&&s>0)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a}else if(8!=c)return;return l},lt=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(e=i,n=r),e},ct=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)z(e,t%256),t=L(t/256);return P(e,".")}if("object"==typeof t){for(e="",i=lt(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=I(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},ut={},ht=p({},ut,{" ":1,'"':1,"<":1,">":1,"`":1}),ft=p({},ht,{"#":1,"?":1,"{":1,"}":1}),dt=p({},ft,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pt=function(t,e){var n=v(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},gt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},mt=function(t,e){var n;return 2==t.length&&D(K,O(t,0))&&(":"==(n=O(t,1))||!e&&"|"==n)},vt=function(t){var e;return t.length>1&&mt(j(t,0,2))&&(2==t.length||"/"===(e=O(t,2))||"\\"===e||"?"===e||"#"===e)},yt=function(t){return"."===t||"%2e"===U(t)},wt=function(t){return t=U(t),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},bt={},_t={},St={},xt={},Ct={},kt={},At={},$t={},Rt={},Tt={},Et={},Lt={},Mt={},Ot={},Dt={},Pt={},It={},Ft={},Wt={},Bt={},Ht={},Nt=function(t,e,n){var i,r,o,s=w(t);if(e){if(r=this.parse(s),r)throw T(r);this.searchParams=null}else{if(void 0!==n&&(i=new Nt(n,!0)),r=this.parse(s,null,i),r)throw T(r);o=$(new A),o.bindURL(this),this.searchParams=o}};Nt.prototype={type:"URL",parse:function(t,e,n){var r,o,s,a,l=this,c=e||bt,u=0,h="",f=!1,p=!1,v=!1;t=w(t),e||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=B(t,rt,"")),t=B(t,ot,""),r=g(t);while(u<=r.length){switch(o=r[u],c){case bt:if(!o||!D(K,o)){if(e)return V;c=St;continue}h+=U(o),c=_t;break;case _t:if(o&&(D(X,o)||"+"==o||"-"==o||"."==o))h+=U(o);else{if(":"!=o){if(e)return V;h="",c=St,u=0;continue}if(e&&(l.isSpecial()!=d(gt,h)||"file"==h&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=h,e)return void(l.isSpecial()&>[l.scheme]==l.port&&(l.port=null));h="","file"==l.scheme?c=Ot:l.isSpecial()&&n&&n.scheme==l.scheme?c=xt:l.isSpecial()?c=$t:"/"==r[u+1]?(c=Ct,u++):(l.cannotBeABaseURL=!0,W(l.path,""),c=Wt)}break;case St:if(!n||n.cannotBeABaseURL&&"#"!=o)return V;if(n.cannotBeABaseURL&&"#"==o){l.scheme=n.scheme,l.path=m(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,c=Ht;break}c="file"==n.scheme?Ot:kt;continue;case xt:if("/"!=o||"/"!=r[u+1]){c=kt;continue}c=Rt,u++;break;case Ct:if("/"==o){c=Tt;break}c=Ft;continue;case kt:if(l.scheme=n.scheme,o==i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query;else if("/"==o||"\\"==o&&l.isSpecial())c=At;else if("?"==o)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query="",c=Bt;else{if("#"!=o){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.path.length--,c=Ft;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query,l.fragment="",c=Ht}break;case At:if(!l.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,c=Ft;continue}c=Tt}else c=Rt;break;case $t:if(c=Rt,"/"!=o||"/"!=O(h,u+1))continue;u++;break;case Rt:if("/"!=o&&"\\"!=o){c=Tt;continue}break;case Tt:if("@"==o){f&&(h="%40"+h),f=!0,s=g(h);for(var y=0;y<s.length;y++){var b=s[y];if(":"!=b||v){var _=pt(b,dt);v?l.password+=_:l.username+=_}else v=!0}h=""}else if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&l.isSpecial()){if(f&&""==h)return G;u-=g(h).length+1,h="",c=Et}else h+=o;break;case Et:case Lt:if(e&&"file"==l.scheme){c=Pt;continue}if(":"!=o||p){if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&l.isSpecial()){if(l.isSpecial()&&""==h)return q;if(e&&""==h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h),a)return a;if(h="",c=It,e)return;continue}"["==o?p=!0:"]"==o&&(p=!1),h+=o}else{if(""==h)return q;if(a=l.parseHost(h),a)return a;if(h="",c=Mt,e==Lt)return}break;case Mt:if(!D(Z,o)){if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&l.isSpecial()||e){if(""!=h){var S=E(h,10);if(S>65535)return Y;l.port=l.isSpecial()&&S===gt[l.scheme]?null:S,h=""}if(e)return;c=It;continue}return Y}h+=o;break;case Ot:if(l.scheme="file","/"==o||"\\"==o)c=Dt;else{if(!n||"file"!=n.scheme){c=Ft;continue}if(o==i)l.host=n.host,l.path=m(n.path),l.query=n.query;else if("?"==o)l.host=n.host,l.path=m(n.path),l.query="",c=Bt;else{if("#"!=o){vt(P(m(r,u),""))||(l.host=n.host,l.path=m(n.path),l.shortenPath()),c=Ft;continue}l.host=n.host,l.path=m(n.path),l.query=n.query,l.fragment="",c=Ht}}break;case Dt:if("/"==o||"\\"==o){c=Pt;break}n&&"file"==n.scheme&&!vt(P(m(r,u),""))&&(mt(n.path[0],!0)?W(l.path,n.path[0]):l.host=n.host),c=Ft;continue;case Pt:if(o==i||"/"==o||"\\"==o||"?"==o||"#"==o){if(!e&&mt(h))c=Ft;else if(""==h){if(l.host="",e)return;c=It}else{if(a=l.parseHost(h),a)return a;if("localhost"==l.host&&(l.host=""),e)return;h="",c=It}continue}h+=o;break;case It:if(l.isSpecial()){if(c=Ft,"/"!=o&&"\\"!=o)continue}else if(e||"?"!=o)if(e||"#"!=o){if(o!=i&&(c=Ft,"/"!=o))continue}else l.fragment="",c=Ht;else l.query="",c=Bt;break;case Ft:if(o==i||"/"==o||"\\"==o&&l.isSpecial()||!e&&("?"==o||"#"==o)){if(wt(h)?(l.shortenPath(),"/"==o||"\\"==o&&l.isSpecial()||W(l.path,"")):yt(h)?"/"==o||"\\"==o&&l.isSpecial()||W(l.path,""):("file"==l.scheme&&!l.path.length&&mt(h)&&(l.host&&(l.host=""),h=O(h,0)+":"),W(l.path,h)),h="","file"==l.scheme&&(o==i||"?"==o||"#"==o))while(l.path.length>1&&""===l.path[0])H(l.path);"?"==o?(l.query="",c=Bt):"#"==o&&(l.fragment="",c=Ht)}else h+=pt(o,ft);break;case Wt:"?"==o?(l.query="",c=Bt):"#"==o?(l.fragment="",c=Ht):o!=i&&(l.path[0]+=pt(o,ut));break;case Bt:e||"#"!=o?o!=i&&("'"==o&&l.isSpecial()?l.query+="%27":l.query+="#"==o?"%23":pt(o,ut)):(l.fragment="",c=Ht);break;case Ht:o!=i&&(l.fragment+=pt(o,ht));break}u++}},parseHost:function(t){var e,n,i;if("["==O(t,0)){if("]"!=O(t,t.length-1))return q;if(e=at(j(t,1,-1)),!e)return q;this.host=e}else if(this.isSpecial()){if(t=y(t),D(nt,t))return q;if(e=st(t),null===e)return q;this.host=e}else{if(D(it,t))return q;for(e="",n=g(t),i=0;i<n.length;i++)e+=pt(n[i],ut);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return d(gt,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&mt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,i=t.password,r=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==r?(c+="//",t.includesCredentials()&&(c+=n+(i?":"+i:"")+"@"),c+=ct(r),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+P(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(t){var e=this.parse(t);if(e)throw T(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new jt(t.path[0]).origin}catch(n){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ct(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(w(t)+":",bt)},getUsername:function(){return this.username},setUsername:function(t){var e=g(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=pt(e[n],dt)}},getPassword:function(){return this.password},setPassword:function(t){var e=g(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=pt(e[n],dt)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ct(t):ct(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Et)},getHostname:function(){var t=this.host;return null===t?"":ct(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Lt)},getPort:function(){var t=this.port;return null===t?"":w(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(t=w(t),""==t?this.port=null:this.parse(t,Mt))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+P(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,It))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){t=w(t),""==t?this.query=null:("?"==O(t,0)&&(t=j(t,1)),this.query="",this.parse(t,Bt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){t=w(t),""!=t?("#"==O(t,0)&&(t=j(t,1)),this.fragment="",this.parse(t,Ht)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var jt=function(t){var e=f(this,Ut),n=_(arguments.length,1)>1?arguments[1]:void 0,i=C(e,new Nt(t,!1,n));o||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},Ut=jt.prototype,zt=function(t,e){return{get:function(){return k(this)[t]()},set:e&&function(t){return k(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(Ut,"href",zt("serialize","setHref")),h(Ut,"origin",zt("getOrigin")),h(Ut,"protocol",zt("getProtocol","setProtocol")),h(Ut,"username",zt("getUsername","setUsername")),h(Ut,"password",zt("getPassword","setPassword")),h(Ut,"host",zt("getHost","setHost")),h(Ut,"hostname",zt("getHostname","setHostname")),h(Ut,"port",zt("getPort","setPort")),h(Ut,"pathname",zt("getPathname","setPathname")),h(Ut,"search",zt("getSearch","setSearch")),h(Ut,"searchParams",zt("getSearchParams")),h(Ut,"hash",zt("getHash","setHash"))),u(Ut,"toJSON",(function(){return k(this).serialize()}),{enumerable:!0}),u(Ut,"toString",(function(){return k(this).serialize()}),{enumerable:!0}),R){var Gt=R.createObjectURL,Vt=R.revokeObjectURL;Gt&&u(jt,"createObjectURL",l(Gt,R)),Vt&&u(jt,"revokeObjectURL",l(Vt,R))}b(jt,"URL"),r({global:!0,constructor:!0,forced:!s,sham:!o},{URL:jt})},14121:function(t,e,n){n(95340)},796:function(t,e,n){"use strict";n.r(e);var i=n(39601),r=n.n(i),o=n(82609),s=n.n(o),a=s()(r());a.push([t.id,'.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-moz-min-content;width:min-content}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;position:relative;width:100%;height:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{position:absolute;pointer-events:none}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{height:100%;border-right:1px dashed #607d8b}.u-hz .u-cursor-y,.u-vt .u-cursor-x{width:100%;border-bottom:1px dashed #607d8b}.u-cursor-pt{position:absolute;top:0;left:0;border-radius:50%;border:0 solid;pointer-events:none;will-change:transform;z-index:100;background-clip:padding-box!important}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}',""]),e["default"]=a},15344:function(t,e,n){"use strict";n.d(e,{Z:function(){return G}});var i={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(t,e,n){var r,o=i[t];return r="string"===typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},o=r;function s(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,i=t.formats[n]||t.formats[t.defaultWidth];return i}}var a={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},c={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u={date:s({formats:a,defaultWidth:"full"}),time:s({formats:l,defaultWidth:"full"}),dateTime:s({formats:c,defaultWidth:"full"})},h=u,f={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},d=function(t,e,n,i){return f[t]},p=d;function g(t){return function(e,n){var i,r=null!==n&&void 0!==n&&n.context?String(n.context):"standalone";if("formatting"===r&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[a]}var c=t.argumentCallback?t.argumentCallback(e):e;return i[c]}}var m={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},v={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},y={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},w={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},b={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},S=function(t,e){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},x={ordinalNumber:S,era:g({values:m,defaultWidth:"wide"}),quarter:g({values:v,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:y,defaultWidth:"wide"}),day:g({values:w,defaultWidth:"wide"}),dayPeriod:g({values:b,defaultWidth:"wide",formattingValues:_,defaultFormattingWidth:"wide"})},C=x;function k(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;var s,a=o[0],l=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?$(l,(function(t){return t.test(a)})):A(l,(function(t){return t.test(a)}));s=t.valueCallback?t.valueCallback(c):c,s=n.valueCallback?n.valueCallback(s):s;var u=e.slice(a.length);return{value:s,rest:u}}}function A(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function $(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function R(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(t.matchPattern);if(!i)return null;var r=i[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=e.slice(r.length);return{value:s,rest:a}}}var T=/^(\d+)(th|st|nd|rd)?/i,E=/\d+/i,L={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},M={any:[/^b/i,/^(a|c)/i]},O={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},D={any:[/1/i,/2/i,/3/i,/4/i]},P={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},I={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},F={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},W={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},B={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},H={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},N={ordinalNumber:R({matchPattern:T,parsePattern:E,valueCallback:function(t){return parseInt(t,10)}}),era:k({matchPatterns:L,defaultMatchWidth:"wide",parsePatterns:M,defaultParseWidth:"any"}),quarter:k({matchPatterns:O,defaultMatchWidth:"wide",parsePatterns:D,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:k({matchPatterns:P,defaultMatchWidth:"wide",parsePatterns:I,defaultParseWidth:"any"}),day:k({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:W,defaultParseWidth:"any"}),dayPeriod:k({matchPatterns:B,defaultMatchWidth:"any",parsePatterns:H,defaultParseWidth:"any"})},j=N,U={code:"en-US",formatDistance:o,formatLong:h,formatRelative:p,localize:C,match:j,options:{weekStartsOn:0,firstWeekContainsDate:1}},z=U,G=z},18667:function(t,e,n){"use strict";n.d(e,{j:function(){return r}});var i={};function r(){return i}},60429:function(t,e){"use strict";var n=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},i=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},r=function(t,e){var r,o=t.match(/(P+)(p+)?/)||[],s=o[1],a=o[2];if(!a)return n(t,e);switch(s){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",n(s,e)).replace("{{time}}",i(a,e))},o={p:i,P:r};e["Z"]=o},1645:function(t,e,n){"use strict";function i(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}n.d(e,{Z:function(){return i}})},17898:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var i=n(66700),r=n(55143),o=n(90257),s=n(19785);function a(t){(0,s.Z)(1,arguments);var e=(0,o.Z)(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var i=(0,r.Z)(n);return i}var l=6048e5;function c(t){(0,s.Z)(1,arguments);var e=(0,i.Z)(t),n=(0,r.Z)(e).getTime()-a(e).getTime();return Math.round(n/l)+1}},90257:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(66700),r=n(19785),o=n(55143);function s(t){(0,r.Z)(1,arguments);var e=(0,i.Z)(t),n=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(n+1,0,4),s.setUTCHours(0,0,0,0);var a=(0,o.Z)(s),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=(0,o.Z)(l);return e.getTime()>=a.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}},46733:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var i=n(66700),r=n(52329),o=n(72763),s=n(19785),a=n(42765),l=n(18667);function c(t,e){var n,i,c,u,h,f,d,p;(0,s.Z)(1,arguments);var g=(0,l.j)(),m=(0,a.Z)(null!==(n=null!==(i=null!==(c=null!==(u=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==u?u:null===e||void 0===e||null===(h=e.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==i?i:null===(d=g.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1),v=(0,o.Z)(t,e),y=new Date(0);y.setUTCFullYear(v,0,m),y.setUTCHours(0,0,0,0);var w=(0,r.Z)(y,e);return w}var u=6048e5;function h(t,e){(0,s.Z)(1,arguments);var n=(0,i.Z)(t),o=(0,r.Z)(n,e).getTime()-c(n,e).getTime();return Math.round(o/u)+1}},72763:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(66700),r=n(19785),o=n(52329),s=n(42765),a=n(18667);function l(t,e){var n,l,c,u,h,f,d,p;(0,r.Z)(1,arguments);var g=(0,i.Z)(t),m=g.getUTCFullYear(),v=(0,a.j)(),y=(0,s.Z)(null!==(n=null!==(l=null!==(c=null!==(u=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==u?u:null===e||void 0===e||null===(h=e.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==l?l:null===(d=v.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(m+1,0,y),w.setUTCHours(0,0,0,0);var b=(0,o.Z)(w,e),_=new Date(0);_.setUTCFullYear(m,0,y),_.setUTCHours(0,0,0,0);var S=(0,o.Z)(_,e);return g.getTime()>=b.getTime()?m+1:g.getTime()>=S.getTime()?m:m-1}},13503:function(t,e,n){"use strict";n.d(e,{Do:function(){return s},Iu:function(){return o},qp:function(){return a}});var i=["D","DD"],r=["YY","YYYY"];function o(t){return-1!==i.indexOf(t)}function s(t){return-1!==r.indexOf(t)}function a(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},19785:function(t,e,n){"use strict";function i(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}n.d(e,{Z:function(){return i}})},55143:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(66700),r=n(19785);function o(t){(0,r.Z)(1,arguments);var e=1,n=(0,i.Z)(t),o=n.getUTCDay(),s=(o<e?7:0)+o-e;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}},52329:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(66700),r=n(19785),o=n(42765),s=n(18667);function a(t,e){var n,a,l,c,u,h,f,d;(0,r.Z)(1,arguments);var p=(0,s.j)(),g=(0,o.Z)(null!==(n=null!==(a=null!==(l=null!==(c=null===e||void 0===e?void 0:e.weekStartsOn)&&void 0!==c?c:null===e||void 0===e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==l?l:p.weekStartsOn)&&void 0!==a?a:null===(f=p.locale)||void 0===f||null===(d=f.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,i.Z)(t),v=m.getUTCDay(),y=(v<g?7:0)+v-g;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m}},42765:function(t,e,n){"use strict";function i(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,{Z:function(){return i}})},73053:function(t,e,n){"use strict";n.d(e,{Z:function(){return O}});var i=n(31200),r=n(89248),o=n(66700),s=n(19785),a=864e5;function l(t){(0,s.Z)(1,arguments);var e=(0,o.Z)(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),r=n-i;return Math.floor(r/a)+1}var c=n(17898),u=n(90257),h=n(46733),f=n(72763);function d(t,e){var n=t<0?"-":"",i=Math.abs(t).toString();while(i.length<e)i="0"+i;return n+i}var p={y:function(t,e){var n=t.getUTCFullYear(),i=n>0?n:1-n;return d("yy"===e?i%100:i,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):d(n+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,i=t.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return d(r,e.length)}},g=p,m={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},v={G:function(t,e,n){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return g.y(t,e)},Y:function(t,e,n,i){var r=(0,f.Z)(t,i),o=r>0?r:1-r;if("YY"===e){var s=o%100;return d(s,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):d(o,e.length)},R:function(t,e){var n=(0,u.Z)(t);return d(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return d(n,e.length)},Q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return d(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return d(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){var i=t.getUTCMonth();switch(e){case"M":case"MM":return g.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return d(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){var r=(0,h.Z)(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):d(r,e.length)},I:function(t,e,n){var i=(0,c.Z)(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):d(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):g.d(t,e)},D:function(t,e,n){var i=l(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):d(i,e.length)},E:function(t,e,n){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return d(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return d(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){var i=t.getUTCDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return d(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){var i=t.getUTCHours(),r=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var i,r=t.getUTCHours();switch(i=12===r?m.noon:0===r?m.midnight:r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var i,r=t.getUTCHours();switch(i=r>=17?m.evening:r>=12?m.afternoon:r>=4?m.morning:m.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var i=t.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return g.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):g.H(t,e)},K:function(t,e,n){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):d(i,e.length)},k:function(t,e,n){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):d(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):g.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):g.s(t,e)},S:function(t,e){return g.S(t,e)},X:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return w(o);case"XXXX":case"XX":return b(o);case"XXXXX":case"XXX":default:return b(o,":")}},x:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"x":return w(o);case"xxxx":case"xx":return b(o);case"xxxxx":case"xxx":default:return b(o,":")}},O:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+y(o,":");case"OOOO":default:return"GMT"+b(o,":")}},z:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+y(o,":");case"zzzz":default:return"GMT"+b(o,":")}},t:function(t,e,n,i){var r=i._originalDate||t,o=Math.floor(r.getTime()/1e3);return d(o,e.length)},T:function(t,e,n,i){var r=i._originalDate||t,o=r.getTime();return d(o,e.length)}};function y(t,e){var n=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var s=e||"";return n+String(r)+s+d(o,2)}function w(t,e){if(t%60===0){var n=t>0?"-":"+";return n+d(Math.abs(t)/60,2)}return b(t,e)}function b(t,e){var n=e||"",i=t>0?"-":"+",r=Math.abs(t),o=d(Math.floor(r/60),2),s=d(r%60,2);return i+o+n+s}var _=v,S=n(60429),x=n(1645),C=n(13503),k=n(42765),A=n(18667),$=n(15344),R=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,T=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,E=/^'([^]*?)'?$/,L=/''/g,M=/[a-zA-Z]/;function O(t,e,n){var a,l,c,u,h,f,d,p,g,m,v,y,w,b,E,L,O,P;(0,s.Z)(2,arguments);var I=String(e),F=(0,A.j)(),W=null!==(a=null!==(l=null===n||void 0===n?void 0:n.locale)&&void 0!==l?l:F.locale)&&void 0!==a?a:$.Z,B=(0,k.Z)(null!==(c=null!==(u=null!==(h=null!==(f=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==f?f:null===n||void 0===n||null===(d=n.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==h?h:F.firstWeekContainsDate)&&void 0!==u?u:null===(g=F.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==c?c:1);if(!(B>=1&&B<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=(0,k.Z)(null!==(v=null!==(y=null!==(w=null!==(b=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==b?b:null===n||void 0===n||null===(E=n.locale)||void 0===E||null===(L=E.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==w?w:F.weekStartsOn)&&void 0!==y?y:null===(O=F.locale)||void 0===O||null===(P=O.options)||void 0===P?void 0:P.weekStartsOn)&&void 0!==v?v:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!W.localize)throw new RangeError("locale must contain localize property");if(!W.formatLong)throw new RangeError("locale must contain formatLong property");var N=(0,o.Z)(t);if(!(0,i.Z)(N))throw new RangeError("Invalid time value");var j=(0,x.Z)(N),U=(0,r.Z)(N,j),z={firstWeekContainsDate:B,weekStartsOn:H,locale:W,_originalDate:N},G=I.match(T).map((function(t){var e=t[0];if("p"===e||"P"===e){var n=S.Z[e];return n(t,W.formatLong)}return t})).join("").match(R).map((function(i){if("''"===i)return"'";var r=i[0];if("'"===r)return D(i);var o=_[r];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,C.Do)(i)||(0,C.qp)(i,e,String(t)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,C.Iu)(i)||(0,C.qp)(i,e,String(t)),o(U,i,W.localize,z);if(r.match(M))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return i})).join("");return G}function D(t){var e=t.match(E);return e?e[1].replace(L,"'"):t}},31200:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(19785);function r(t){return r="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},r(t)}function o(t){return(0,i.Z)(1,arguments),t instanceof Date||"object"===r(t)&&"[object Date]"===Object.prototype.toString.call(t)}var s=n(66700);function a(t){if((0,i.Z)(1,arguments),!o(t)&&"number"!==typeof t)return!1;var e=(0,s.Z)(t);return!isNaN(Number(e))}},10247:function(t,e,n){"use strict";n.d(e,{Z:function(){return ja}});var i=n(15344),r=n(89248),o=n(66700);function s(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var a=n(60429),l=n(1645),c=n(13503),u=n(42765),h=n(19785);function f(t){return f="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},f(t)}function d(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&&p(t,e)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function g(t){var e=y();return function(){var n,i=w(t);if(e){var r=w(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==f(e)&&"function"!==typeof e?v(t):e}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function S(t,e,n){return e&&_(t.prototype,e),n&&_(t,n),t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C=10,k=function(){function t(){b(this,t),x(this,"subPriority",0)}return S(t,[{key:"validate",value:function(t,e){return!0}}]),t}(),A=function(t){d(n,t);var e=g(n);function n(t,i,r,o,s){var a;return b(this,n),a=e.call(this),a.value=t,a.validateValue=i,a.setValue=r,a.priority=o,s&&(a.subPriority=s),a}return S(n,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,n){return this.setValue(t,e,this.value,n)}}]),n}(k),$=function(t){d(n,t);var e=g(n);function n(){var t;b(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),x(v(t),"priority",C),x(v(t),"subPriority",-1),t}return S(n,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var n=new Date(0);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}}]),n}(k);function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function E(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),t}var L=function(){function t(){R(this,t)}return E(t,[{key:"run",value:function(t,e,n,i){var r=this.parse(t,e,n,i);return r?{setter:new A(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(t,e,n){return!0}}]),t}();function M(t){return M="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},M(t)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function P(t,e,n){return e&&D(t.prototype,e),n&&D(t,n),t}function I(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&&F(t,e)}function F(t,e){return F=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},F(t,e)}function W(t){var e=N();return function(){var n,i=j(t);if(e){var r=j(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return B(this,n)}}function B(t,e){return!e||"object"!==M(e)&&"function"!==typeof e?H(t):e}function H(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z=function(t){I(n,t);var e=W(n);function n(){var t;O(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),U(H(t),"priority",140),U(H(t),"incompatibleTokens",["R","u","t","T"]),t}return P(n,[{key:"parse",value:function(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,n){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(L),G=(Math.pow(10,8),6e4),V=36e5,q=1e3,Y={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},K={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function X(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Z(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Q(t,e){var n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};var i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*V+o*G+s*q),rest:e.slice(n[0].length)}}function J(t){return Z(Y.anyDigitsSigned,t)}function tt(t,e){switch(t){case 1:return Z(Y.singleDigit,e);case 2:return Z(Y.twoDigits,e);case 3:return Z(Y.threeDigits,e);case 4:return Z(Y.fourDigits,e);default:return Z(new RegExp("^\\d{1,"+t+"}"),e)}}function et(t,e){switch(t){case 1:return Z(Y.singleDigitSigned,e);case 2:return Z(Y.twoDigitsSigned,e);case 3:return Z(Y.threeDigitsSigned,e);case 4:return Z(Y.fourDigitsSigned,e);default:return Z(new RegExp("^-?\\d{1,"+t+"}"),e)}}function nt(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function it(t,e){var n,i=e>0,r=i?e:1-e;if(r<=50)n=t||100;else{var o=r+50,s=100*Math.floor(o/100),a=t>=o%100;n=t+s-(a?100:0)}return i?n:1-n}function rt(t){return t%400===0||t%4===0&&t%100!==0}function ot(t){return ot="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},ot(t)}function st(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function at(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function lt(t,e,n){return e&&at(t.prototype,e),n&&at(t,n),t}function ct(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&&ut(t,e)}function ut(t,e){return ut=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ut(t,e)}function ht(t){var e=pt();return function(){var n,i=gt(t);if(e){var r=gt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return ft(this,n)}}function ft(t,e){return!e||"object"!==ot(e)&&"function"!==typeof e?dt(t):e}function dt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function gt(t){return gt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gt(t)}function mt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vt=function(t){ct(n,t);var e=ht(n);function n(){var t;st(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),mt(dt(t),"priority",130),mt(dt(t),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),t}return lt(n,[{key:"parse",value:function(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return X(tt(4,t),i);case"yo":return X(n.ordinalNumber(t,{unit:"year"}),i);default:return X(tt(e.length,t),i)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n){var i=t.getUTCFullYear();if(n.isTwoDigitYear){var r=it(n.year,i);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}var o="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(L),yt=n(72763),wt=n(52329);function bt(t){return bt="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},bt(t)}function _t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function St(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function xt(t,e,n){return e&&St(t.prototype,e),n&&St(t,n),t}function Ct(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&&kt(t,e)}function kt(t,e){return kt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},kt(t,e)}function At(t){var e=Tt();return function(){var n,i=Et(t);if(e){var r=Et(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $t(this,n)}}function $t(t,e){return!e||"object"!==bt(e)&&"function"!==typeof e?Rt(t):e}function Rt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Et(t){return Et=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Et(t)}function Lt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mt=function(t){Ct(n,t);var e=At(n);function n(){var t;_t(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Lt(Rt(t),"priority",130),Lt(Rt(t),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),t}return xt(n,[{key:"parse",value:function(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return X(tt(4,t),i);case"Yo":return X(n.ordinalNumber(t,{unit:"year"}),i);default:return X(tt(e.length,t),i)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n,i){var r=(0,yt.Z)(t,i);if(n.isTwoDigitYear){var o=it(n.year,r);return t.setUTCFullYear(o,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,wt.Z)(t,i)}var s="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(s,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,wt.Z)(t,i)}}]),n}(L),Ot=n(55143);function Dt(t){return Dt="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},Dt(t)}function Pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function It(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ft(t,e,n){return e&&It(t.prototype,e),n&&It(t,n),t}function Wt(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&&Bt(t,e)}function Bt(t,e){return Bt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Bt(t,e)}function Ht(t){var e=Ut();return function(){var n,i=zt(t);if(e){var r=zt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Nt(this,n)}}function Nt(t,e){return!e||"object"!==Dt(e)&&"function"!==typeof e?jt(t):e}function jt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ut(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function zt(t){return zt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},zt(t)}function Gt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vt=function(t){Wt(n,t);var e=Ht(n);function n(){var t;Pt(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Gt(jt(t),"priority",130),Gt(jt(t),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),t}return Ft(n,[{key:"parse",value:function(t,e){return et("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),(0,Ot.Z)(i)}}]),n}(L);function qt(t){return qt="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},qt(t)}function Yt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Xt(t,e,n){return e&&Kt(t.prototype,e),n&&Kt(t,n),t}function Zt(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&&Qt(t,e)}function Qt(t,e){return Qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Qt(t,e)}function Jt(t){var e=ne();return function(){var n,i=ie(t);if(e){var r=ie(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return te(this,n)}}function te(t,e){return!e||"object"!==qt(e)&&"function"!==typeof e?ee(t):e}function ee(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ne(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function ie(t){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ie(t)}function re(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oe=function(t){Zt(n,t);var e=Jt(n);function n(){var t;Yt(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),re(ee(t),"priority",130),re(ee(t),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),t}return Xt(n,[{key:"parse",value:function(t,e){return et("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(L);function se(t){return se="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},se(t)}function ae(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function le(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ce(t,e,n){return e&&le(t.prototype,e),n&&le(t,n),t}function ue(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&&he(t,e)}function he(t,e){return he=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},he(t,e)}function fe(t){var e=ge();return function(){var n,i=me(t);if(e){var r=me(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return de(this,n)}}function de(t,e){return!e||"object"!==se(e)&&"function"!==typeof e?pe(t):e}function pe(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ge(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}function ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ye=function(t){ue(n,t);var e=fe(n);function n(){var t;ae(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),ve(pe(t),"priority",120),ve(pe(t),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),t}return ce(n,[{key:"parse",value:function(t,e,n){switch(e){case"Q":case"QQ":return tt(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}]),n}(L);function we(t){return we="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},we(t)}function be(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Se(t,e,n){return e&&_e(t.prototype,e),n&&_e(t,n),t}function xe(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&&Ce(t,e)}function Ce(t,e){return Ce=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ce(t,e)}function ke(t){var e=Re();return function(){var n,i=Te(t);if(e){var r=Te(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ae(this,n)}}function Ae(t,e){return!e||"object"!==we(e)&&"function"!==typeof e?$e(t):e}function $e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Re(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Te(t)}function Ee(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Le=function(t){xe(n,t);var e=ke(n);function n(){var t;be(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Ee($e(t),"priority",120),Ee($e(t),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),t}return Se(n,[{key:"parse",value:function(t,e,n){switch(e){case"q":case"qq":return tt(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}]),n}(L);function Me(t){return Me="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},Me(t)}function Oe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function De(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Pe(t,e,n){return e&&De(t.prototype,e),n&&De(t,n),t}function Ie(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&&Fe(t,e)}function Fe(t,e){return Fe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fe(t,e)}function We(t){var e=Ne();return function(){var n,i=je(t);if(e){var r=je(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Be(this,n)}}function Be(t,e){return!e||"object"!==Me(e)&&"function"!==typeof e?He(t):e}function He(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ne(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function je(t){return je=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},je(t)}function Ue(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ze=function(t){Ie(n,t);var e=We(n);function n(){var t;Oe(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Ue(He(t),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ue(He(t),"priority",110),t}return Pe(n,[{key:"parse",value:function(t,e,n){var i=function(t){return t-1};switch(e){case"M":return X(Z(Y.month,t),i);case"MM":return X(tt(2,t),i);case"Mo":return X(n.ordinalNumber(t,{unit:"month"}),i);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}]),n}(L);function Ge(t){return Ge="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},Ge(t)}function Ve(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ye(t,e,n){return e&&qe(t.prototype,e),n&&qe(t,n),t}function Ke(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&&Xe(t,e)}function Xe(t,e){return Xe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Xe(t,e)}function Ze(t){var e=tn();return function(){var n,i=en(t);if(e){var r=en(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Qe(this,n)}}function Qe(t,e){return!e||"object"!==Ge(e)&&"function"!==typeof e?Je(t):e}function Je(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},en(t)}function nn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rn=function(t){Ke(n,t);var e=Ze(n);function n(){var t;Ve(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),nn(Je(t),"priority",110),nn(Je(t),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),t}return Ye(n,[{key:"parse",value:function(t,e,n){var i=function(t){return t-1};switch(e){case"L":return X(Z(Y.month,t),i);case"LL":return X(tt(2,t),i);case"Lo":return X(n.ordinalNumber(t,{unit:"month"}),i);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}]),n}(L),on=n(46733);function sn(t,e,n){(0,h.Z)(2,arguments);var i=(0,o.Z)(t),r=(0,u.Z)(e),s=(0,on.Z)(i,n)-r;return i.setUTCDate(i.getUTCDate()-7*s),i}function an(t){return an="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},an(t)}function ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function un(t,e,n){return e&&cn(t.prototype,e),n&&cn(t,n),t}function hn(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&&fn(t,e)}function fn(t,e){return fn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},fn(t,e)}function dn(t){var e=mn();return function(){var n,i=vn(t);if(e){var r=vn(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return pn(this,n)}}function pn(t,e){return!e||"object"!==an(e)&&"function"!==typeof e?gn(t):e}function gn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function vn(t){return vn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vn(t)}function yn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wn=function(t){hn(n,t);var e=dn(n);function n(){var t;ln(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),yn(gn(t),"priority",100),yn(gn(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),t}return un(n,[{key:"parse",value:function(t,e,n){switch(e){case"w":return Z(Y.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,n,i){return(0,wt.Z)(sn(t,n,i),i)}}]),n}(L),bn=n(17898);function _n(t,e){(0,h.Z)(2,arguments);var n=(0,o.Z)(t),i=(0,u.Z)(e),r=(0,bn.Z)(n)-i;return n.setUTCDate(n.getUTCDate()-7*r),n}function Sn(t){return Sn="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},Sn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function kn(t,e,n){return e&&Cn(t.prototype,e),n&&Cn(t,n),t}function An(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&&$n(t,e)}function $n(t,e){return $n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$n(t,e)}function Rn(t){var e=Ln();return function(){var n,i=Mn(t);if(e){var r=Mn(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Tn(this,n)}}function Tn(t,e){return!e||"object"!==Sn(e)&&"function"!==typeof e?En(t):e}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ln(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Mn(t){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mn(t)}function On(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dn=function(t){An(n,t);var e=Rn(n);function n(){var t;xn(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),On(En(t),"priority",100),On(En(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),t}return kn(n,[{key:"parse",value:function(t,e,n){switch(e){case"I":return Z(Y.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,n){return(0,Ot.Z)(_n(t,n))}}]),n}(L);function Pn(t){return Pn="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},Pn(t)}function In(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Wn(t,e,n){return e&&Fn(t.prototype,e),n&&Fn(t,n),t}function Bn(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&&Hn(t,e)}function Hn(t,e){return Hn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hn(t,e)}function Nn(t){var e=zn();return function(){var n,i=Gn(t);if(e){var r=Gn(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return jn(this,n)}}function jn(t,e){return!e||"object"!==Pn(e)&&"function"!==typeof e?Un(t):e}function Un(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Vn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qn=[31,28,31,30,31,30,31,31,30,31,30,31],Yn=[31,29,31,30,31,30,31,31,30,31,30,31],Kn=function(t){Bn(n,t);var e=Nn(n);function n(){var t;In(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Vn(Un(t),"priority",90),Vn(Un(t),"subPriority",1),Vn(Un(t),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),t}return Wn(n,[{key:"parse",value:function(t,e,n){switch(e){case"d":return Z(Y.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){var n=t.getUTCFullYear(),i=rt(n),r=t.getUTCMonth();return i?e>=1&&e<=Yn[r]:e>=1&&e<=qn[r]}},{key:"set",value:function(t,e,n){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t}}]),n}(L);function Xn(t){return Xn="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},Xn(t)}function Zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Jn(t,e,n){return e&&Qn(t.prototype,e),n&&Qn(t,n),t}function ti(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&&ei(t,e)}function ei(t,e){return ei=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ei(t,e)}function ni(t){var e=oi();return function(){var n,i=si(t);if(e){var r=si(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return ii(this,n)}}function ii(t,e){return!e||"object"!==Xn(e)&&"function"!==typeof e?ri(t):e}function ri(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},si(t)}function ai(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var li=function(t){ti(n,t);var e=ni(n);function n(){var t;Zn(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),ai(ri(t),"priority",90),ai(ri(t),"subpriority",1),ai(ri(t),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),t}return Jn(n,[{key:"parse",value:function(t,e,n){switch(e){case"D":case"DD":return Z(Y.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){var n=t.getUTCFullYear(),i=rt(n);return i?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,n){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t}}]),n}(L),ci=n(18667);function ui(t,e,n){var i,r,s,a,l,c,f,d;(0,h.Z)(2,arguments);var p=(0,ci.j)(),g=(0,u.Z)(null!==(i=null!==(r=null!==(s=null!==(a=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==a?a:null===n||void 0===n||null===(l=n.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==s?s:p.weekStartsOn)&&void 0!==r?r:null===(f=p.locale)||void 0===f||null===(d=f.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,o.Z)(t),v=(0,u.Z)(e),y=m.getUTCDay(),w=v%7,b=(w+7)%7,_=(b<g?7:0)+v-y;return m.setUTCDate(m.getUTCDate()+_),m}function hi(t){return hi="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},hi(t)}function fi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function di(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function pi(t,e,n){return e&&di(t.prototype,e),n&&di(t,n),t}function gi(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&&mi(t,e)}function mi(t,e){return mi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},mi(t,e)}function vi(t){var e=bi();return function(){var n,i=_i(t);if(e){var r=_i(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return yi(this,n)}}function yi(t,e){return!e||"object"!==hi(e)&&"function"!==typeof e?wi(t):e}function wi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function _i(t){return _i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_i(t)}function Si(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xi=function(t){gi(n,t);var e=vi(n);function n(){var t;fi(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Si(wi(t),"priority",90),Si(wi(t),"incompatibleTokens",["D","i","e","c","t","T"]),t}return pi(n,[{key:"parse",value:function(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=ui(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(L);function Ci(t){return Ci="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},Ci(t)}function ki(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ai(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function $i(t,e,n){return e&&Ai(t.prototype,e),n&&Ai(t,n),t}function Ri(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&&Ti(t,e)}function Ti(t,e){return Ti=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ti(t,e)}function Ei(t){var e=Oi();return function(){var n,i=Di(t);if(e){var r=Di(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Li(this,n)}}function Li(t,e){return!e||"object"!==Ci(e)&&"function"!==typeof e?Mi(t):e}function Mi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Oi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Di(t){return Di=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Di(t)}function Pi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ii=function(t){Ri(n,t);var e=Ei(n);function n(){var t;ki(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Pi(Mi(t),"priority",90),Pi(Mi(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),t}return $i(n,[{key:"parse",value:function(t,e,n,i){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return X(tt(e.length,t),r);case"eo":return X(n.ordinalNumber(t,{unit:"day"}),r);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=ui(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(L);function Fi(t){return Fi="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},Fi(t)}function Wi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Hi(t,e,n){return e&&Bi(t.prototype,e),n&&Bi(t,n),t}function Ni(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&&ji(t,e)}function ji(t,e){return ji=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ji(t,e)}function Ui(t){var e=Vi();return function(){var n,i=qi(t);if(e){var r=qi(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return zi(this,n)}}function zi(t,e){return!e||"object"!==Fi(e)&&"function"!==typeof e?Gi(t):e}function Gi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function qi(t){return qi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qi(t)}function Yi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ki=function(t){Ni(n,t);var e=Ui(n);function n(){var t;Wi(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Yi(Gi(t),"priority",90),Yi(Gi(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),t}return Hi(n,[{key:"parse",value:function(t,e,n,i){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return X(tt(e.length,t),r);case"co":return X(n.ordinalNumber(t,{unit:"day"}),r);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=ui(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(L);function Xi(t,e){(0,h.Z)(2,arguments);var n=(0,u.Z)(e);n%7===0&&(n-=7);var i=1,r=(0,o.Z)(t),s=r.getUTCDay(),a=n%7,l=(a+7)%7,c=(l<i?7:0)+n-s;return r.setUTCDate(r.getUTCDate()+c),r}function Zi(t){return Zi="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},Zi(t)}function Qi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ji(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function tr(t,e,n){return e&&Ji(t.prototype,e),n&&Ji(t,n),t}function er(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&&nr(t,e)}function nr(t,e){return nr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nr(t,e)}function ir(t){var e=sr();return function(){var n,i=ar(t);if(e){var r=ar(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return rr(this,n)}}function rr(t,e){return!e||"object"!==Zi(e)&&"function"!==typeof e?or(t):e}function or(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function ar(t){return ar=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ar(t)}function lr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cr=function(t){er(n,t);var e=ir(n);function n(){var t;Qi(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),lr(or(t),"priority",90),lr(or(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),t}return tr(n,[{key:"parse",value:function(t,e,n){var i=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return tt(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return X(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return X(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return X(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return X(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,n){return t=Xi(t,n),t.setUTCHours(0,0,0,0),t}}]),n}(L);function ur(t){return ur="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},ur(t)}function hr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fr(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function dr(t,e,n){return e&&fr(t.prototype,e),n&&fr(t,n),t}function pr(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&&gr(t,e)}function gr(t,e){return gr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},gr(t,e)}function mr(t){var e=wr();return function(){var n,i=br(t);if(e){var r=br(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return vr(this,n)}}function vr(t,e){return!e||"object"!==ur(e)&&"function"!==typeof e?yr(t):e}function yr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function br(t){return br=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},br(t)}function _r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Sr=function(t){pr(n,t);var e=mr(n);function n(){var t;hr(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),_r(yr(t),"priority",80),_r(yr(t),"incompatibleTokens",["b","B","H","k","t","T"]),t}return dr(n,[{key:"parse",value:function(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(nt(n),0,0,0),t}}]),n}(L);function xr(t){return xr="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},xr(t)}function Cr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kr(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ar(t,e,n){return e&&kr(t.prototype,e),n&&kr(t,n),t}function $r(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&&Rr(t,e)}function Rr(t,e){return Rr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rr(t,e)}function Tr(t){var e=Mr();return function(){var n,i=Or(t);if(e){var r=Or(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Er(this,n)}}function Er(t,e){return!e||"object"!==xr(e)&&"function"!==typeof e?Lr(t):e}function Lr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Or(t){return Or=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Or(t)}function Dr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pr=function(t){$r(n,t);var e=Tr(n);function n(){var t;Cr(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Dr(Lr(t),"priority",80),Dr(Lr(t),"incompatibleTokens",["a","B","H","k","t","T"]),t}return Ar(n,[{key:"parse",value:function(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(nt(n),0,0,0),t}}]),n}(L);function Ir(t){return Ir="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},Ir(t)}function Fr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wr(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Br(t,e,n){return e&&Wr(t.prototype,e),n&&Wr(t,n),t}function Hr(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&&Nr(t,e)}function Nr(t,e){return Nr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Nr(t,e)}function jr(t){var e=Gr();return function(){var n,i=Vr(t);if(e){var r=Vr(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ur(this,n)}}function Ur(t,e){return!e||"object"!==Ir(e)&&"function"!==typeof e?zr(t):e}function zr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}function qr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yr=function(t){Hr(n,t);var e=jr(n);function n(){var t;Fr(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),qr(zr(t),"priority",80),qr(zr(t),"incompatibleTokens",["a","b","t","T"]),t}return Br(n,[{key:"parse",value:function(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(nt(n),0,0,0),t}}]),n}(L);function Kr(t){return Kr="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},Kr(t)}function Xr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zr(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Qr(t,e,n){return e&&Zr(t.prototype,e),n&&Zr(t,n),t}function Jr(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&&to(t,e)}function to(t,e){return to=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},to(t,e)}function eo(t){var e=ro();return function(){var n,i=oo(t);if(e){var r=oo(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return no(this,n)}}function no(t,e){return!e||"object"!==Kr(e)&&"function"!==typeof e?io(t):e}function io(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ro(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function oo(t){return oo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},oo(t)}function so(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ao=function(t){Jr(n,t);var e=eo(n);function n(){var t;Xr(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),so(io(t),"priority",70),so(io(t),"incompatibleTokens",["H","K","k","t","T"]),t}return Qr(n,[{key:"parse",value:function(t,e,n){switch(e){case"h":return Z(Y.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,n){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):i||12!==n?t.setUTCHours(n,0,0,0):t.setUTCHours(0,0,0,0),t}}]),n}(L);function lo(t){return lo="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},lo(t)}function co(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uo(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ho(t,e,n){return e&&uo(t.prototype,e),n&&uo(t,n),t}function fo(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&&po(t,e)}function po(t,e){return po=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},po(t,e)}function go(t){var e=yo();return function(){var n,i=wo(t);if(e){var r=wo(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return mo(this,n)}}function mo(t,e){return!e||"object"!==lo(e)&&"function"!==typeof e?vo(t):e}function vo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yo(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function wo(t){return wo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wo(t)}function bo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _o=function(t){fo(n,t);var e=go(n);function n(){var t;co(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),bo(vo(t),"priority",70),bo(vo(t),"incompatibleTokens",["a","b","h","K","k","t","T"]),t}return ho(n,[{key:"parse",value:function(t,e,n){switch(e){case"H":return Z(Y.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,n){return t.setUTCHours(n,0,0,0),t}}]),n}(L);function So(t){return So="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},So(t)}function xo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Co(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ko(t,e,n){return e&&Co(t.prototype,e),n&&Co(t,n),t}function Ao(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)}function $o(t,e){return $o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$o(t,e)}function Ro(t){var e=Lo();return function(){var n,i=Mo(t);if(e){var r=Mo(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return To(this,n)}}function To(t,e){return!e||"object"!==So(e)&&"function"!==typeof e?Eo(t):e}function Eo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lo(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Mo(t){return Mo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mo(t)}function Oo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Do=function(t){Ao(n,t);var e=Ro(n);function n(){var t;xo(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Oo(Eo(t),"priority",70),Oo(Eo(t),"incompatibleTokens",["h","H","k","t","T"]),t}return ko(n,[{key:"parse",value:function(t,e,n){switch(e){case"K":return Z(Y.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t}}]),n}(L);function Po(t){return Po="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},Po(t)}function Io(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fo(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Wo(t,e,n){return e&&Fo(t.prototype,e),n&&Fo(t,n),t}function Bo(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&&Ho(t,e)}function Ho(t,e){return Ho=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ho(t,e)}function No(t){var e=zo();return function(){var n,i=Go(t);if(e){var r=Go(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return jo(this,n)}}function jo(t,e){return!e||"object"!==Po(e)&&"function"!==typeof e?Uo(t):e}function Uo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zo(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function Vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qo=function(t){Bo(n,t);var e=No(n);function n(){var t;Io(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Vo(Uo(t),"priority",70),Vo(Uo(t),"incompatibleTokens",["a","b","h","H","K","t","T"]),t}return Wo(n,[{key:"parse",value:function(t,e,n){switch(e){case"k":return Z(Y.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,n){var i=n<=24?n%24:n;return t.setUTCHours(i,0,0,0),t}}]),n}(L);function Yo(t){return Yo="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},Yo(t)}function Ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xo(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Zo(t,e,n){return e&&Xo(t.prototype,e),n&&Xo(t,n),t}function Qo(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&&Jo(t,e)}function Jo(t,e){return Jo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Jo(t,e)}function ts(t){var e=is();return function(){var n,i=rs(t);if(e){var r=rs(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return es(this,n)}}function es(t,e){return!e||"object"!==Yo(e)&&"function"!==typeof e?ns(t):e}function ns(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function is(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function rs(t){return rs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},rs(t)}function os(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ss=function(t){Qo(n,t);var e=ts(n);function n(){var t;Ko(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),os(ns(t),"priority",60),os(ns(t),"incompatibleTokens",["t","T"]),t}return Zo(n,[{key:"parse",value:function(t,e,n){switch(e){case"m":return Z(Y.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCMinutes(n,0,0),t}}]),n}(L);function as(t){return as="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},as(t)}function ls(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cs(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function us(t,e,n){return e&&cs(t.prototype,e),n&&cs(t,n),t}function hs(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&&fs(t,e)}function fs(t,e){return fs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},fs(t,e)}function ds(t){var e=ms();return function(){var n,i=vs(t);if(e){var r=vs(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return ps(this,n)}}function ps(t,e){return!e||"object"!==as(e)&&"function"!==typeof e?gs(t):e}function gs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ms(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function vs(t){return vs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vs(t)}function ys(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ws=function(t){hs(n,t);var e=ds(n);function n(){var t;ls(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),ys(gs(t),"priority",50),ys(gs(t),"incompatibleTokens",["t","T"]),t}return us(n,[{key:"parse",value:function(t,e,n){switch(e){case"s":return Z(Y.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return tt(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCSeconds(n,0),t}}]),n}(L);function bs(t){return bs="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},bs(t)}function _s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ss(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function xs(t,e,n){return e&&Ss(t.prototype,e),n&&Ss(t,n),t}function Cs(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&&ks(t,e)}function ks(t,e){return ks=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ks(t,e)}function As(t){var e=Ts();return function(){var n,i=Es(t);if(e){var r=Es(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $s(this,n)}}function $s(t,e){return!e||"object"!==bs(e)&&"function"!==typeof e?Rs(t):e}function Rs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ts(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Es(t){return Es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Es(t)}function Ls(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ms=function(t){Cs(n,t);var e=As(n);function n(){var t;_s(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Ls(Rs(t),"priority",30),Ls(Rs(t),"incompatibleTokens",["t","T"]),t}return xs(n,[{key:"parse",value:function(t,e){var n=function(t){return Math.floor(t*Math.pow(10,3-e.length))};return X(tt(e.length,t),n)}},{key:"set",value:function(t,e,n){return t.setUTCMilliseconds(n),t}}]),n}(L);function Os(t){return Os="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},Os(t)}function Ds(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ps(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Is(t,e,n){return e&&Ps(t.prototype,e),n&&Ps(t,n),t}function Fs(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&&Ws(t,e)}function Ws(t,e){return Ws=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ws(t,e)}function Bs(t){var e=js();return function(){var n,i=Us(t);if(e){var r=Us(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Hs(this,n)}}function Hs(t,e){return!e||"object"!==Os(e)&&"function"!==typeof e?Ns(t):e}function Ns(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function js(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Us(t){return Us=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Us(t)}function zs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gs=function(t){Fs(n,t);var e=Bs(n);function n(){var t;Ds(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),zs(Ns(t),"priority",10),zs(Ns(t),"incompatibleTokens",["t","T","x"]),t}return Is(n,[{key:"parse",value:function(t,e){switch(e){case"X":return Q(K.basicOptionalMinutes,t);case"XX":return Q(K.basic,t);case"XXXX":return Q(K.basicOptionalSeconds,t);case"XXXXX":return Q(K.extendedOptionalSeconds,t);case"XXX":default:return Q(K.extended,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}]),n}(L);function Vs(t){return Vs="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},Vs(t)}function qs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ys(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ks(t,e,n){return e&&Ys(t.prototype,e),n&&Ys(t,n),t}function Xs(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&&Zs(t,e)}function Zs(t,e){return Zs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zs(t,e)}function Qs(t){var e=ea();return function(){var n,i=na(t);if(e){var r=na(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Js(this,n)}}function Js(t,e){return!e||"object"!==Vs(e)&&"function"!==typeof e?ta(t):e}function ta(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ea(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function na(t){return na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},na(t)}function ia(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ra=function(t){Xs(n,t);var e=Qs(n);function n(){var t;qs(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),ia(ta(t),"priority",10),ia(ta(t),"incompatibleTokens",["t","T","X"]),t}return Ks(n,[{key:"parse",value:function(t,e){switch(e){case"x":return Q(K.basicOptionalMinutes,t);case"xx":return Q(K.basic,t);case"xxxx":return Q(K.basicOptionalSeconds,t);case"xxxxx":return Q(K.extendedOptionalSeconds,t);case"xxx":default:return Q(K.extended,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}]),n}(L);function oa(t){return oa="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},oa(t)}function sa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aa(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function la(t,e,n){return e&&aa(t.prototype,e),n&&aa(t,n),t}function ca(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&&ua(t,e)}function ua(t,e){return ua=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ua(t,e)}function ha(t){var e=pa();return function(){var n,i=ga(t);if(e){var r=ga(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return fa(this,n)}}function fa(t,e){return!e||"object"!==oa(e)&&"function"!==typeof e?da(t):e}function da(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pa(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function ga(t){return ga=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ga(t)}function ma(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var va=function(t){ca(n,t);var e=ha(n);function n(){var t;sa(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),ma(da(t),"priority",40),ma(da(t),"incompatibleTokens","*"),t}return la(n,[{key:"parse",value:function(t){return J(t)}},{key:"set",value:function(t,e,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(L);function ya(t){return ya="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},ya(t)}function wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ba(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _a(t,e,n){return e&&ba(t.prototype,e),n&&ba(t,n),t}function Sa(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&&xa(t,e)}function xa(t,e){return xa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xa(t,e)}function Ca(t){var e=$a();return function(){var n,i=Ra(t);if(e){var r=Ra(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return ka(this,n)}}function ka(t,e){return!e||"object"!==ya(e)&&"function"!==typeof e?Aa(t):e}function Aa(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $a(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ea=function(t){Sa(n,t);var e=Ca(n);function n(){var t;wa(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),Ta(Aa(t),"priority",20),Ta(Aa(t),"incompatibleTokens","*"),t}return _a(n,[{key:"parse",value:function(t){return J(t)}},{key:"set",value:function(t,e,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(L),La={G:new z,y:new vt,Y:new Mt,R:new Vt,u:new oe,Q:new ye,q:new Le,M:new ze,L:new rn,w:new wn,I:new Dn,d:new Kn,D:new li,E:new xi,e:new Ii,c:new Ki,i:new cr,a:new Sr,b:new Pr,B:new Yr,h:new ao,H:new _o,K:new Do,k:new qo,m:new ss,s:new ws,S:new Ms,X:new Gs,x:new ra,t:new va,T:new Ea};function Ma(t){return Ma="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},Ma(t)}function Oa(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Da(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Da(t,e){if(t){if("string"===typeof t)return Pa(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pa(t,e):void 0}}function Pa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Ia=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wa=/^'([^]*?)'?$/,Ba=/''/g,Ha=/\S/,Na=/[a-zA-Z]/;function ja(t,e,n,f){var d,p,g,m,v,y,w,b,_,S,x,C,k,A,R,T,E,L;(0,h.Z)(3,arguments);var M=String(t),O=String(e),D=(0,ci.j)(),P=null!==(d=null!==(p=null===f||void 0===f?void 0:f.locale)&&void 0!==p?p:D.locale)&&void 0!==d?d:i.Z;if(!P.match)throw new RangeError("locale must contain match property");var I=(0,u.Z)(null!==(g=null!==(m=null!==(v=null!==(y=null===f||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==y?y:null===f||void 0===f||null===(w=f.locale)||void 0===w||null===(b=w.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==v?v:D.firstWeekContainsDate)&&void 0!==m?m:null===(_=D.locale)||void 0===_||null===(S=_.options)||void 0===S?void 0:S.firstWeekContainsDate)&&void 0!==g?g:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=(0,u.Z)(null!==(x=null!==(C=null!==(k=null!==(A=null===f||void 0===f?void 0:f.weekStartsOn)&&void 0!==A?A:null===f||void 0===f||null===(R=f.locale)||void 0===R||null===(T=R.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==k?k:D.weekStartsOn)&&void 0!==C?C:null===(E=D.locale)||void 0===E||null===(L=E.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==x?x:0);if(!(F>=0&&F<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===O)return""===M?(0,o.Z)(n):new Date(NaN);var W,B={firstWeekContainsDate:I,weekStartsOn:F,locale:P},H=[new $],N=O.match(Fa).map((function(t){var e=t[0];if(e in a.Z){var n=a.Z[e];return n(t,P.formatLong)}return t})).join("").match(Ia),j=[],U=Oa(N);try{var z=function(){var e=W.value;null!==f&&void 0!==f&&f.useAdditionalWeekYearTokens||!(0,c.Do)(e)||(0,c.qp)(e,O,t),null!==f&&void 0!==f&&f.useAdditionalDayOfYearTokens||!(0,c.Iu)(e)||(0,c.qp)(e,O,t);var n=e[0],i=La[n];if(i){var r=i.incompatibleTokens;if(Array.isArray(r)){var o=j.find((function(t){return r.includes(t.token)||t.token===n}));if(o)throw new RangeError("The format string mustn't contain `".concat(o.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===i.incompatibleTokens&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));j.push({token:n,fullToken:e});var s=i.run(M,e,P.match,B);if(!s)return{v:new Date(NaN)};H.push(s.setter),M=s.rest}else{if(n.match(Na))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===e?e="'":"'"===n&&(e=Ua(e)),0!==M.indexOf(e))return{v:new Date(NaN)};M=M.slice(e.length)}};for(U.s();!(W=U.n()).done;){var G=z();if("object"===Ma(G))return G.v}}catch(tt){U.e(tt)}finally{U.f()}if(M.length>0&&Ha.test(M))return new Date(NaN);var V=H.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,n){return n.indexOf(t)===e})).map((function(t){return H.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),q=(0,o.Z)(n);if(isNaN(q.getTime()))return new Date(NaN);var Y,K=(0,r.Z)(q,(0,l.Z)(q)),X={},Z=Oa(V);try{for(Z.s();!(Y=Z.n()).done;){var Q=Y.value;if(!Q.validate(K,B))return new Date(NaN);var J=Q.set(K,X,B);Array.isArray(J)?(K=J[0],s(X,J[1])):K=J}}catch(tt){Z.e(tt)}finally{Z.f()}return K}function Ua(t){return t.match(Wa)[1].replace(Ba,"'")}},89248:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(42765),r=n(66700),o=n(19785);function s(t,e){(0,o.Z)(2,arguments);var n=(0,r.Z)(t).getTime(),s=(0,i.Z)(e);return new Date(n+s)}function a(t,e){(0,o.Z)(2,arguments);var n=(0,i.Z)(e);return s(t,-n)}},66700:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(19785);function r(t){return r="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},r(t)}function o(t){(0,i.Z)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===r(t)&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},50857:function(t,e,n){var i=n(37772),r=i.Symbol;t.exports=r},50343:function(t){function e(t,e){var n=-1,i=null==t?0:t.length,r=Array(i);while(++n<i)r[n]=e(t[n],n,t);return r}t.exports=e},81207:function(t){function e(t,e,n,i){var r=-1,o=null==t?0:t.length;i&&o&&(n=t[++r]);while(++r<o)n=e(n,t[r],r,t);return n}t.exports=e},50217:function(t){function e(t){return t.split("")}t.exports=e},45981:function(t){var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}t.exports=n},53366:function(t,e,n){var i=n(50857),r=n(62107),o=n(37157),s="[object Null]",a="[object Undefined]",l=i?i.toStringTag:void 0;function c(t){return null==t?void 0===t?a:s:l&&l in Object(t)?r(t):o(t)}t.exports=c},6435:function(t){function e(t){return function(e){return null==t?void 0:t[e]}}t.exports=e},39872:function(t){function e(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;var o=Array(r);while(++i<r)o[i]=t[i+e];return o}t.exports=e},1054:function(t,e,n){var i=n(50857),r=n(50343),o=n(86152),s=n(4795),a=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;function u(t){if("string"==typeof t)return t;if(o(t))return r(t,u)+"";if(s(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}t.exports=u},23895:function(t,e,n){var i=n(39872);function r(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:i(t,e,n)}t.exports=r},83126:function(t,e,n){var i=n(23895),r=n(33880),o=n(8435),s=n(66188);function a(t){return function(e){e=s(e);var n=r(e)?o(e):void 0,a=n?n[0]:e.charAt(0),l=n?i(n,1).join(""):e.slice(1);return a[t]()+l}}t.exports=a},34311:function(t,e,n){var i=n(81207),r=n(97329),o=n(11618),s="['’]",a=RegExp(s,"g");function l(t){return function(e){return i(o(r(e).replace(a,"")),t,"")}}t.exports=l},61655:function(t,e,n){var i=n(6435),r={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},o=i(r);t.exports=o},51242:function(t,e,n){var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},62107:function(t,e,n){var i=n(50857),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;function l(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(l){}var r=s.call(t);return i&&(e?t[a]=n:delete t[a]),r}t.exports=l},33880:function(t){var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\ufe0e\\ufe0f",a="\\u200d",l=RegExp("["+a+e+o+s+"]");function c(t){return l.test(t)}t.exports=c},83559:function(t){var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(t){return e.test(t)}t.exports=n},37157:function(t){var e=Object.prototype,n=e.toString;function i(t){return n.call(t)}t.exports=i},37772:function(t,e,n){var i=n(51242),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();t.exports=o},8435:function(t,e,n){var i=n(50217),r=n(33880),o=n(63344);function s(t){return r(t)?o(t):i(t)}t.exports=s},63344:function(t){var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\ufe0e\\ufe0f",a="["+e+"]",l="["+o+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",h="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=u+"?",m="["+s+"]?",v="(?:"+p+"(?:"+[h,f,d].join("|")+")"+m+g+")*",y=m+g+v,w="(?:"+[h+l+"?",l,f,d,a].join("|")+")",b=RegExp(c+"(?="+c+")|"+w+y,"g");function _(t){return t.match(b)||[]}t.exports=_},75304:function(t){var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",l="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",u="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",p=l+c+u+h,g="['’]",m="["+p+"]",v="["+o+"]",y="\\d+",w="["+s+"]",b="["+a+"]",_="[^"+e+p+y+s+a+f+"]",S="\\ud83c[\\udffb-\\udfff]",x="(?:"+v+"|"+S+")",C="[^"+e+"]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+f+"]",R="\\u200d",T="(?:"+b+"|"+_+")",E="(?:"+$+"|"+_+")",L="(?:"+g+"(?:d|ll|m|re|s|t|ve))?",M="(?:"+g+"(?:D|LL|M|RE|S|T|VE))?",O=x+"?",D="["+d+"]?",P="(?:"+R+"(?:"+[C,k,A].join("|")+")"+D+O+")*",I="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",F="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",W=D+O+P,B="(?:"+[w,k,A].join("|")+")"+W,H=RegExp([$+"?"+b+"+"+L+"(?="+[m,$,"$"].join("|")+")",E+"+"+M+"(?="+[m,$+T,"$"].join("|")+")",$+"?"+T+"+"+L,$+"+"+M,F,I,y,B].join("|"),"g");function N(t){return t.match(H)||[]}t.exports=N},96009:function(t,e,n){var i=n(82108),r=n(34311),o=r((function(t,e,n){return e=e.toLowerCase(),t+(n?i(e):e)}));t.exports=o},82108:function(t,e,n){var i=n(66188),r=n(23779);function o(t){return r(i(t).toLowerCase())}t.exports=o},97329:function(t,e,n){var i=n(61655),r=n(66188),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",c=s+a+l,u="["+c+"]",h=RegExp(u,"g");function f(t){return t=r(t),t&&t.replace(o,i).replace(h,"")}t.exports=f},86152:function(t){var e=Array.isArray;t.exports=e},15125:function(t){function e(t){return null!=t&&"object"==typeof t}t.exports=e},4795:function(t,e,n){var i=n(53366),r=n(15125),o="[object Symbol]";function s(t){return"symbol"==typeof t||r(t)&&i(t)==o}t.exports=s},76635:function(t,e,n){var i;
|
41
|
+
/**
|
42
|
+
* @license
|
43
|
+
* Lodash <https://lodash.com/>
|
44
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
45
|
+
* Released under MIT license <https://lodash.com/license>
|
46
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
47
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
48
|
+
*/t=n.nmd(t),function(){var r,o="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",d=1,p=2,g=4,m=1,v=2,y=1,w=2,b=4,_=8,S=16,x=32,C=64,k=128,A=256,$=512,R=30,T="...",E=800,L=16,M=1,O=2,D=3,P=1/0,I=9007199254740991,F=17976931348623157e292,W=NaN,B=4294967295,H=B-1,N=B>>>1,j=[["ary",k],["bind",y],["bindKey",w],["curry",_],["curryRight",S],["flip",$],["partial",x],["partialRight",C],["rearg",A]],U="[object Arguments]",z="[object Array]",G="[object AsyncFunction]",V="[object Boolean]",q="[object Date]",Y="[object DOMException]",K="[object Error]",X="[object Function]",Z="[object GeneratorFunction]",Q="[object Map]",J="[object Number]",tt="[object Null]",et="[object Object]",nt="[object Promise]",it="[object Proxy]",rt="[object RegExp]",ot="[object Set]",st="[object String]",at="[object Symbol]",lt="[object Undefined]",ct="[object WeakMap]",ut="[object WeakSet]",ht="[object ArrayBuffer]",ft="[object DataView]",dt="[object Float32Array]",pt="[object Float64Array]",gt="[object Int8Array]",mt="[object Int16Array]",vt="[object Int32Array]",yt="[object Uint8Array]",wt="[object Uint8ClampedArray]",bt="[object Uint16Array]",_t="[object Uint32Array]",St=/\b__p \+= '';/g,xt=/\b(__p \+=) '' \+/g,Ct=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kt=/&(?:amp|lt|gt|quot|#39);/g,At=/[&<>"']/g,$t=RegExp(kt.source),Rt=RegExp(At.source),Tt=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,Lt=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/[\\^$.*+?()[\]{}|]/g,It=RegExp(Pt.source),Ft=/^\s+/,Wt=/\s/,Bt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ht=/\{\n\/\* \[wrapped with (.+)\] \*/,Nt=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ut=/[()=,{}\[\]\/\s]/,zt=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Yt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Xt=/^0o[0-7]+$/i,Zt=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",ne="\\u0300-\\u036f",ie="\\ufe20-\\ufe2f",re="\\u20d0-\\u20ff",oe=ne+ie+re,se="\\u2700-\\u27bf",ae="a-z\\xdf-\\xf6\\xf8-\\xff",le="\\xac\\xb1\\xd7\\xf7",ce="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ue="\\u2000-\\u206f",he=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fe="A-Z\\xc0-\\xd6\\xd8-\\xde",de="\\ufe0e\\ufe0f",pe=le+ce+ue+he,ge="['’]",me="["+ee+"]",ve="["+pe+"]",ye="["+oe+"]",we="\\d+",be="["+se+"]",_e="["+ae+"]",Se="[^"+ee+pe+we+se+ae+fe+"]",xe="\\ud83c[\\udffb-\\udfff]",Ce="(?:"+ye+"|"+xe+")",ke="[^"+ee+"]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+fe+"]",Te="\\u200d",Ee="(?:"+_e+"|"+Se+")",Le="(?:"+Re+"|"+Se+")",Me="(?:"+ge+"(?:d|ll|m|re|s|t|ve))?",Oe="(?:"+ge+"(?:D|LL|M|RE|S|T|VE))?",De=Ce+"?",Pe="["+de+"]?",Ie="(?:"+Te+"(?:"+[ke,Ae,$e].join("|")+")"+Pe+De+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",We="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=Pe+De+Ie,He="(?:"+[be,Ae,$e].join("|")+")"+Be,Ne="(?:"+[ke+ye+"?",ye,Ae,$e,me].join("|")+")",je=RegExp(ge,"g"),Ue=RegExp(ye,"g"),ze=RegExp(xe+"(?="+xe+")|"+Ne+Be,"g"),Ge=RegExp([Re+"?"+_e+"+"+Me+"(?="+[ve,Re,"$"].join("|")+")",Le+"+"+Oe+"(?="+[ve,Re+Ee,"$"].join("|")+")",Re+"?"+Ee+"+"+Me,Re+"+"+Oe,We,Fe,we,He].join("|"),"g"),Ve=RegExp("["+Te+ee+oe+de+"]"),qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ke=-1,Xe={};Xe[dt]=Xe[pt]=Xe[gt]=Xe[mt]=Xe[vt]=Xe[yt]=Xe[wt]=Xe[bt]=Xe[_t]=!0,Xe[U]=Xe[z]=Xe[ht]=Xe[V]=Xe[ft]=Xe[q]=Xe[K]=Xe[X]=Xe[Q]=Xe[J]=Xe[et]=Xe[rt]=Xe[ot]=Xe[st]=Xe[ct]=!1;var Ze={};Ze[U]=Ze[z]=Ze[ht]=Ze[ft]=Ze[V]=Ze[q]=Ze[dt]=Ze[pt]=Ze[gt]=Ze[mt]=Ze[vt]=Ze[Q]=Ze[J]=Ze[et]=Ze[rt]=Ze[ot]=Ze[st]=Ze[at]=Ze[yt]=Ze[wt]=Ze[bt]=Ze[_t]=!0,Ze[K]=Ze[X]=Ze[ct]=!1;var Qe={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Je={"&":"&","<":"<",">":">",'"':""","'":"'"},tn={"&":"&","<":"<",">":">",""":'"',"'":"'"},en={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,sn="object"==typeof self&&self&&self.Object===Object&&self,an=on||sn||Function("return this")(),ln=e&&!e.nodeType&&e,cn=ln&&t&&!t.nodeType&&t,un=cn&&cn.exports===ln,hn=un&&on.process,fn=function(){try{var t=cn&&cn.require&&cn.require("util").types;return t||hn&&hn.binding&&hn.binding("util")}catch(e){}}(),dn=fn&&fn.isArrayBuffer,pn=fn&&fn.isDate,gn=fn&&fn.isMap,mn=fn&&fn.isRegExp,vn=fn&&fn.isSet,yn=fn&&fn.isTypedArray;function wn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function bn(t,e,n,i){var r=-1,o=null==t?0:t.length;while(++r<o){var s=t[r];e(i,s,n(s),t)}return i}function _n(t,e){var n=-1,i=null==t?0:t.length;while(++n<i)if(!1===e(t[n],n,t))break;return t}function Sn(t,e){var n=null==t?0:t.length;while(n--)if(!1===e(t[n],n,t))break;return t}function xn(t,e){var n=-1,i=null==t?0:t.length;while(++n<i)if(!e(t[n],n,t))return!1;return!0}function Cn(t,e){var n=-1,i=null==t?0:t.length,r=0,o=[];while(++n<i){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function kn(t,e){var n=null==t?0:t.length;return!!n&&Fn(t,e,0)>-1}function An(t,e,n){var i=-1,r=null==t?0:t.length;while(++i<r)if(n(e,t[i]))return!0;return!1}function $n(t,e){var n=-1,i=null==t?0:t.length,r=Array(i);while(++n<i)r[n]=e(t[n],n,t);return r}function Rn(t,e){var n=-1,i=e.length,r=t.length;while(++n<i)t[r+n]=e[n];return t}function Tn(t,e,n,i){var r=-1,o=null==t?0:t.length;i&&o&&(n=t[++r]);while(++r<o)n=e(n,t[r],r,t);return n}function En(t,e,n,i){var r=null==t?0:t.length;i&&r&&(n=t[--r]);while(r--)n=e(n,t[r],r,t);return n}function Ln(t,e){var n=-1,i=null==t?0:t.length;while(++n<i)if(e(t[n],n,t))return!0;return!1}var Mn=Nn("length");function On(t){return t.split("")}function Dn(t){return t.match(jt)||[]}function Pn(t,e,n){var i;return n(t,(function(t,n,r){if(e(t,n,r))return i=n,!1})),i}function In(t,e,n,i){var r=t.length,o=n+(i?1:-1);while(i?o--:++o<r)if(e(t[o],o,t))return o;return-1}function Fn(t,e,n){return e===e?di(t,e,n):In(t,Bn,n)}function Wn(t,e,n,i){var r=n-1,o=t.length;while(++r<o)if(i(t[r],e))return r;return-1}function Bn(t){return t!==t}function Hn(t,e){var n=null==t?0:t.length;return n?Gn(t,e)/n:W}function Nn(t){return function(e){return null==e?r:e[t]}}function jn(t){return function(e){return null==t?r:t[e]}}function Un(t,e,n,i,r){return r(t,(function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)})),n}function zn(t,e){var n=t.length;t.sort(e);while(n--)t[n]=t[n].value;return t}function Gn(t,e){var n,i=-1,o=t.length;while(++i<o){var s=e(t[i]);s!==r&&(n=n===r?s:n+s)}return n}function Vn(t,e){var n=-1,i=Array(t);while(++n<t)i[n]=e(n);return i}function qn(t,e){return $n(e,(function(e){return[e,t[e]]}))}function Yn(t){return t?t.slice(0,vi(t)+1).replace(Ft,""):t}function Kn(t){return function(e){return t(e)}}function Xn(t,e){return $n(e,(function(e){return t[e]}))}function Zn(t,e){return t.has(e)}function Qn(t,e){var n=-1,i=t.length;while(++n<i&&Fn(e,t[n],0)>-1);return n}function Jn(t,e){var n=t.length;while(n--&&Fn(e,t[n],0)>-1);return n}function ti(t,e){var n=t.length,i=0;while(n--)t[n]===e&&++i;return i}var ei=jn(Qe),ni=jn(Je);function ii(t){return"\\"+en[t]}function ri(t,e){return null==t?r:t[e]}function oi(t){return Ve.test(t)}function si(t){return qe.test(t)}function ai(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function li(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function ci(t,e){return function(n){return t(e(n))}}function ui(t,e){var n=-1,i=t.length,r=0,o=[];while(++n<i){var s=t[n];s!==e&&s!==f||(t[n]=f,o[r++]=n)}return o}function hi(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fi(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function di(t,e,n){var i=n-1,r=t.length;while(++i<r)if(t[i]===e)return i;return-1}function pi(t,e,n){var i=n+1;while(i--)if(t[i]===e)return i;return i}function gi(t){return oi(t)?wi(t):Mn(t)}function mi(t){return oi(t)?bi(t):On(t)}function vi(t){var e=t.length;while(e--&&Wt.test(t.charAt(e)));return e}var yi=jn(tn);function wi(t){var e=ze.lastIndex=0;while(ze.test(t))++e;return e}function bi(t){return t.match(ze)||[]}function _i(t){return t.match(Ge)||[]}var Si=function t(e){e=null==e?an:xi.defaults(an.Object(),e,xi.pick(an,Ye));var n=e.Array,i=e.Date,Wt=e.Error,jt=e.Function,ee=e.Math,ne=e.Object,ie=e.RegExp,re=e.String,oe=e.TypeError,se=n.prototype,ae=jt.prototype,le=ne.prototype,ce=e["__core-js_shared__"],ue=ae.toString,he=le.hasOwnProperty,fe=0,de=function(){var t=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),pe=le.toString,ge=ue.call(ne),me=an._,ve=ie("^"+ue.call(he).replace(Pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=un?e.Buffer:r,we=e.Symbol,be=e.Uint8Array,_e=ye?ye.allocUnsafe:r,Se=ci(ne.getPrototypeOf,ne),xe=ne.create,Ce=le.propertyIsEnumerable,ke=se.splice,Ae=we?we.isConcatSpreadable:r,$e=we?we.iterator:r,Re=we?we.toStringTag:r,Te=function(){try{var t=qs(ne,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ee=e.clearTimeout!==an.clearTimeout&&e.clearTimeout,Le=i&&i.now!==an.Date.now&&i.now,Me=e.setTimeout!==an.setTimeout&&e.setTimeout,Oe=ee.ceil,De=ee.floor,Pe=ne.getOwnPropertySymbols,Ie=ye?ye.isBuffer:r,Fe=e.isFinite,We=se.join,Be=ci(ne.keys,ne),He=ee.max,Ne=ee.min,ze=i.now,Ge=e.parseInt,Ve=ee.random,qe=se.reverse,Qe=qs(e,"DataView"),Je=qs(e,"Map"),tn=qs(e,"Promise"),en=qs(e,"Set"),on=qs(e,"WeakMap"),sn=qs(ne,"create"),ln=on&&new on,cn={},hn=Ma(Qe),fn=Ma(Je),Mn=Ma(tn),On=Ma(en),jn=Ma(on),di=we?we.prototype:r,wi=di?di.valueOf:r,bi=di?di.toString:r;function Si(t){if(ku(t)&&!lu(t)&&!(t instanceof $i)){if(t instanceof Ai)return t;if(he.call(t,"__wrapped__"))return Da(t)}return new Ai(t)}var Ci=function(){function t(){}return function(e){if(!Cu(e))return{};if(xe)return xe(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function ki(){}function Ai(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function $i(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=B,this.__views__=[]}function Ri(){var t=new $i(this.__wrapped__);return t.__actions__=rs(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=rs(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=rs(this.__views__),t}function Ti(){if(this.__filtered__){var t=new $i(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ei(){var t=this.__wrapped__.value(),e=this.__dir__,n=lu(t),i=e<0,r=n?t.length:0,o=Qs(0,r,this.__views__),s=o.start,a=o.end,l=a-s,c=i?a:s-1,u=this.__iteratees__,h=u.length,f=0,d=Ne(l,this.__takeCount__);if(!n||!i&&r==l&&d==l)return Bo(t,this.__actions__);var p=[];t:while(l--&&f<d){c+=e;var g=-1,m=t[c];while(++g<h){var v=u[g],y=v.iteratee,w=v.type,b=y(m);if(w==O)m=b;else if(!b){if(w==M)continue t;break t}}p[f++]=m}return p}function Li(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var i=t[e];this.set(i[0],i[1])}}function Mi(){this.__data__=sn?sn(null):{},this.size=0}function Oi(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Di(t){var e=this.__data__;if(sn){var n=e[t];return n===u?r:n}return he.call(e,t)?e[t]:r}function Pi(t){var e=this.__data__;return sn?e[t]!==r:he.call(e,t)}function Ii(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=sn&&e===r?u:e,this}function Fi(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var i=t[e];this.set(i[0],i[1])}}function Wi(){this.__data__=[],this.size=0}function Bi(t){var e=this.__data__,n=ur(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():ke.call(e,n,1),--this.size,!0}function Hi(t){var e=this.__data__,n=ur(e,t);return n<0?r:e[n][1]}function Ni(t){return ur(this.__data__,t)>-1}function ji(t,e){var n=this.__data__,i=ur(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Ui(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var i=t[e];this.set(i[0],i[1])}}function zi(){this.size=0,this.__data__={hash:new Li,map:new(Je||Fi),string:new Li}}function Gi(t){var e=Gs(this,t)["delete"](t);return this.size-=e?1:0,e}function Vi(t){return Gs(this,t).get(t)}function qi(t){return Gs(this,t).has(t)}function Yi(t,e){var n=Gs(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function Ki(t){var e=-1,n=null==t?0:t.length;this.__data__=new Ui;while(++e<n)this.add(t[e])}function Xi(t){return this.__data__.set(t,u),this}function Zi(t){return this.__data__.has(t)}function Qi(t){var e=this.__data__=new Fi(t);this.size=e.size}function Ji(){this.__data__=new Fi,this.size=0}function tr(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function er(t){return this.__data__.get(t)}function nr(t){return this.__data__.has(t)}function ir(t,e){var n=this.__data__;if(n instanceof Fi){var i=n.__data__;if(!Je||i.length<s-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ui(i)}return n.set(t,e),this.size=n.size,this}function rr(t,e){var n=lu(t),i=!n&&au(t),r=!n&&!i&&du(t),o=!n&&!i&&!r&&Hu(t),s=n||i||r||o,a=s?Vn(t.length,re):[],l=a.length;for(var c in t)!e&&!he.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,l))||a.push(c);return a}function or(t){var e=t.length;return e?t[yo(0,e-1)]:r}function sr(t,e){return Ta(rs(t),mr(e,0,t.length))}function ar(t){return Ta(rs(t))}function lr(t,e,n){(n!==r&&!ru(t[e],n)||n===r&&!(e in t))&&pr(t,e,n)}function cr(t,e,n){var i=t[e];he.call(t,e)&&ru(i,n)&&(n!==r||e in t)||pr(t,e,n)}function ur(t,e){var n=t.length;while(n--)if(ru(t[n][0],e))return n;return-1}function hr(t,e,n,i){return Sr(t,(function(t,r,o){e(i,t,n(t),o)})),i}function fr(t,e){return t&&os(e,Sh(e),t)}function dr(t,e){return t&&os(e,xh(e),t)}function pr(t,e,n){"__proto__"==e&&Te?Te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function gr(t,e){var i=-1,o=e.length,s=n(o),a=null==t;while(++i<o)s[i]=a?r:mh(t,e[i]);return s}function mr(t,e,n){return t===t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function vr(t,e,n,i,o,s){var a,l=e&d,c=e&p,u=e&g;if(n&&(a=o?n(t,i,o,s):n(t)),a!==r)return a;if(!Cu(t))return t;var h=lu(t);if(h){if(a=ea(t),!l)return rs(t,a)}else{var f=Zs(t),m=f==X||f==Z;if(du(t))return Yo(t,l);if(f==et||f==U||m&&!o){if(a=c||m?{}:na(t),!l)return c?as(t,dr(a,t)):ss(t,fr(a,t))}else{if(!Ze[f])return o?t:{};a=ia(t,f,l)}}s||(s=new Qi);var v=s.get(t);if(v)return v;s.set(t,a),Fu(t)?t.forEach((function(i){a.add(vr(i,e,n,i,t,s))})):Au(t)&&t.forEach((function(i,r){a.set(r,vr(i,e,n,r,t,s))}));var y=u?c?Hs:Bs:c?xh:Sh,w=h?r:y(t);return _n(w||t,(function(i,r){w&&(r=i,i=t[r]),cr(a,r,vr(i,e,n,r,t,s))})),a}function yr(t){var e=Sh(t);return function(n){return wr(n,t,e)}}function wr(t,e,n){var i=n.length;if(null==t)return!i;t=ne(t);while(i--){var o=n[i],s=e[o],a=t[o];if(a===r&&!(o in t)||!s(a))return!1}return!0}function br(t,e,n){if("function"!=typeof t)throw new oe(l);return ka((function(){t.apply(r,n)}),e)}function _r(t,e,n,i){var r=-1,o=kn,a=!0,l=t.length,c=[],u=e.length;if(!l)return c;n&&(e=$n(e,Kn(n))),i?(o=An,a=!1):e.length>=s&&(o=Zn,a=!1,e=new Ki(e));t:while(++r<l){var h=t[r],f=null==n?h:n(h);if(h=i||0!==h?h:0,a&&f===f){var d=u;while(d--)if(e[d]===f)continue t;c.push(h)}else o(e,f,i)||c.push(h)}return c}Si.templateSettings={escape:Tt,evaluate:Et,interpolate:Lt,variable:"",imports:{_:Si}},Si.prototype=ki.prototype,Si.prototype.constructor=Si,Ai.prototype=Ci(ki.prototype),Ai.prototype.constructor=Ai,$i.prototype=Ci(ki.prototype),$i.prototype.constructor=$i,Li.prototype.clear=Mi,Li.prototype["delete"]=Oi,Li.prototype.get=Di,Li.prototype.has=Pi,Li.prototype.set=Ii,Fi.prototype.clear=Wi,Fi.prototype["delete"]=Bi,Fi.prototype.get=Hi,Fi.prototype.has=Ni,Fi.prototype.set=ji,Ui.prototype.clear=zi,Ui.prototype["delete"]=Gi,Ui.prototype.get=Vi,Ui.prototype.has=qi,Ui.prototype.set=Yi,Ki.prototype.add=Ki.prototype.push=Xi,Ki.prototype.has=Zi,Qi.prototype.clear=Ji,Qi.prototype["delete"]=tr,Qi.prototype.get=er,Qi.prototype.has=nr,Qi.prototype.set=ir;var Sr=us(Lr),xr=us(Mr,!0);function Cr(t,e){var n=!0;return Sr(t,(function(t,i,r){return n=!!e(t,i,r),n})),n}function kr(t,e,n){var i=-1,o=t.length;while(++i<o){var s=t[i],a=e(s);if(null!=a&&(l===r?a===a&&!Bu(a):n(a,l)))var l=a,c=s}return c}function Ar(t,e,n,i){var o=t.length;n=Yu(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:Yu(i),i<0&&(i+=o),i=n>i?0:Ku(i);while(n<i)t[n++]=e;return t}function $r(t,e){var n=[];return Sr(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n}function Rr(t,e,n,i,r){var o=-1,s=t.length;n||(n=oa),r||(r=[]);while(++o<s){var a=t[o];e>0&&n(a)?e>1?Rr(a,e-1,n,i,r):Rn(r,a):i||(r[r.length]=a)}return r}var Tr=hs(),Er=hs(!0);function Lr(t,e){return t&&Tr(t,e,Sh)}function Mr(t,e){return t&&Er(t,e,Sh)}function Or(t,e){return Cn(e,(function(e){return _u(t[e])}))}function Dr(t,e){e=zo(e,t);var n=0,i=e.length;while(null!=t&&n<i)t=t[La(e[n++])];return n&&n==i?t:r}function Pr(t,e,n){var i=e(t);return lu(t)?i:Rn(i,n(t))}function Ir(t){return null==t?t===r?lt:tt:Re&&Re in ne(t)?Ys(t):wa(t)}function Fr(t,e){return t>e}function Wr(t,e){return null!=t&&he.call(t,e)}function Br(t,e){return null!=t&&e in ne(t)}function Hr(t,e,n){return t>=Ne(e,n)&&t<He(e,n)}function Nr(t,e,i){var o=i?An:kn,s=t[0].length,a=t.length,l=a,c=n(a),u=1/0,h=[];while(l--){var f=t[l];l&&e&&(f=$n(f,Kn(e))),u=Ne(f.length,u),c[l]=!i&&(e||s>=120&&f.length>=120)?new Ki(l&&f):r}f=t[0];var d=-1,p=c[0];t:while(++d<s&&h.length<u){var g=f[d],m=e?e(g):g;if(g=i||0!==g?g:0,!(p?Zn(p,m):o(h,m,i))){l=a;while(--l){var v=c[l];if(!(v?Zn(v,m):o(t[l],m,i)))continue t}p&&p.push(m),h.push(g)}}return h}function jr(t,e,n,i){return Lr(t,(function(t,r,o){e(i,n(t),r,o)})),i}function Ur(t,e,n){e=zo(e,t),t=_a(t,e);var i=null==t?t:t[La(ol(e))];return null==i?r:wn(i,t,n)}function zr(t){return ku(t)&&Ir(t)==U}function Gr(t){return ku(t)&&Ir(t)==ht}function Vr(t){return ku(t)&&Ir(t)==q}function qr(t,e,n,i,r){return t===e||(null==t||null==e||!ku(t)&&!ku(e)?t!==t&&e!==e:Yr(t,e,n,i,qr,r))}function Yr(t,e,n,i,r,o){var s=lu(t),a=lu(e),l=s?z:Zs(t),c=a?z:Zs(e);l=l==U?et:l,c=c==U?et:c;var u=l==et,h=c==et,f=l==c;if(f&&du(t)){if(!du(e))return!1;s=!0,u=!1}if(f&&!u)return o||(o=new Qi),s||Hu(t)?Ps(t,e,n,i,r,o):Is(t,e,l,n,i,r,o);if(!(n&m)){var d=u&&he.call(t,"__wrapped__"),p=h&&he.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new Qi),r(g,v,n,i,o)}}return!!f&&(o||(o=new Qi),Fs(t,e,n,i,r,o))}function Kr(t){return ku(t)&&Zs(t)==Q}function Xr(t,e,n,i){var o=n.length,s=o,a=!i;if(null==t)return!s;t=ne(t);while(o--){var l=n[o];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}while(++o<s){l=n[o];var c=l[0],u=t[c],h=l[1];if(a&&l[2]){if(u===r&&!(c in t))return!1}else{var f=new Qi;if(i)var d=i(u,h,c,t,e,f);if(!(d===r?qr(h,u,m|v,i,f):d))return!1}}return!0}function Zr(t){if(!Cu(t)||ha(t))return!1;var e=_u(t)?ve:Kt;return e.test(Ma(t))}function Qr(t){return ku(t)&&Ir(t)==rt}function Jr(t){return ku(t)&&Zs(t)==ot}function to(t){return ku(t)&&xu(t.length)&&!!Xe[Ir(t)]}function eo(t){return"function"==typeof t?t:null==t?Lf:"object"==typeof t?lu(t)?ao(t[0],t[1]):so(t):zf(t)}function no(t){if(!da(t))return Be(t);var e=[];for(var n in ne(t))he.call(t,n)&&"constructor"!=n&&e.push(n);return e}function io(t){if(!Cu(t))return ya(t);var e=da(t),n=[];for(var i in t)("constructor"!=i||!e&&he.call(t,i))&&n.push(i);return n}function ro(t,e){return t<e}function oo(t,e){var i=-1,r=uu(t)?n(t.length):[];return Sr(t,(function(t,n,o){r[++i]=e(t,n,o)})),r}function so(t){var e=Vs(t);return 1==e.length&&e[0][2]?ga(e[0][0],e[0][1]):function(n){return n===t||Xr(n,t,e)}}function ao(t,e){return la(t)&&pa(e)?ga(La(t),e):function(n){var i=mh(n,t);return i===r&&i===e?yh(n,t):qr(e,i,m|v)}}function lo(t,e,n,i,o){t!==e&&Tr(e,(function(s,a){if(o||(o=new Qi),Cu(s))co(t,e,a,n,lo,i,o);else{var l=i?i(xa(t,a),s,a+"",t,e,o):r;l===r&&(l=s),lr(t,a,l)}}),xh)}function co(t,e,n,i,o,s,a){var l=xa(t,n),c=xa(e,n),u=a.get(c);if(u)lr(t,n,u);else{var h=s?s(l,c,n+"",t,e,a):r,f=h===r;if(f){var d=lu(c),p=!d&&du(c),g=!d&&!p&&Hu(c);h=c,d||p||g?lu(l)?h=l:hu(l)?h=rs(l):p?(f=!1,h=Yo(c,!0)):g?(f=!1,h=Jo(c,!0)):h=[]:Du(c)||au(c)?(h=l,au(l)?h=Zu(l):Cu(l)&&!_u(l)||(h=na(c))):f=!1}f&&(a.set(c,h),o(h,c,i,s,a),a["delete"](c)),lr(t,n,h)}}function uo(t,e){var n=t.length;if(n)return e+=e<0?n:0,sa(e,n)?t[e]:r}function ho(t,e,n){e=e.length?$n(e,(function(t){return lu(t)?function(e){return Dr(e,1===t.length?t[0]:t)}:t})):[Lf];var i=-1;e=$n(e,Kn(zs()));var r=oo(t,(function(t,n,r){var o=$n(e,(function(e){return e(t)}));return{criteria:o,index:++i,value:t}}));return zn(r,(function(t,e){return es(t,e,n)}))}function fo(t,e){return po(t,e,(function(e,n){return yh(t,n)}))}function po(t,e,n){var i=-1,r=e.length,o={};while(++i<r){var s=e[i],a=Dr(t,s);n(a,s)&&Co(o,zo(s,t),a)}return o}function go(t){return function(e){return Dr(e,t)}}function mo(t,e,n,i){var r=i?Wn:Fn,o=-1,s=e.length,a=t;t===e&&(e=rs(e)),n&&(a=$n(t,Kn(n)));while(++o<s){var l=0,c=e[o],u=n?n(c):c;while((l=r(a,u,l,i))>-1)a!==t&&ke.call(a,l,1),ke.call(t,l,1)}return t}function vo(t,e){var n=t?e.length:0,i=n-1;while(n--){var r=e[n];if(n==i||r!==o){var o=r;sa(r)?ke.call(t,r,1):Io(t,r)}}return t}function yo(t,e){return t+De(Ve()*(e-t+1))}function wo(t,e,i,r){var o=-1,s=He(Oe((e-t)/(i||1)),0),a=n(s);while(s--)a[r?s:++o]=t,t+=i;return a}function bo(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),e=De(e/2),e&&(t+=t)}while(e);return n}function _o(t,e){return Aa(ba(t,e,Lf),t+"")}function So(t){return or(Nh(t))}function xo(t,e){var n=Nh(t);return Ta(n,mr(e,0,n.length))}function Co(t,e,n,i){if(!Cu(t))return t;e=zo(e,t);var o=-1,s=e.length,a=s-1,l=t;while(null!=l&&++o<s){var c=La(e[o]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=l[c];u=i?i(h,c,l):r,u===r&&(u=Cu(h)?h:sa(e[o+1])?[]:{})}cr(l,c,u),l=l[c]}return t}var ko=ln?function(t,e){return ln.set(t,e),t}:Lf,Ao=Te?function(t,e){return Te(t,"toString",{configurable:!0,enumerable:!1,value:$f(e),writable:!0})}:Lf;function $o(t){return Ta(Nh(t))}function Ro(t,e,i){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),i=i>o?o:i,i<0&&(i+=o),o=e>i?0:i-e>>>0,e>>>=0;var s=n(o);while(++r<o)s[r]=t[r+e];return s}function To(t,e){var n;return Sr(t,(function(t,i,r){return n=e(t,i,r),!n})),!!n}function Eo(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e===e&&r<=N){while(i<r){var o=i+r>>>1,s=t[o];null!==s&&!Bu(s)&&(n?s<=e:s<e)?i=o+1:r=o}return r}return Lo(t,e,Lf,n)}function Lo(t,e,n,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;e=n(e);var a=e!==e,l=null===e,c=Bu(e),u=e===r;while(o<s){var h=De((o+s)/2),f=n(t[h]),d=f!==r,p=null===f,g=f===f,m=Bu(f);if(a)var v=i||g;else v=u?g&&(i||d):l?g&&d&&(i||!p):c?g&&d&&!p&&(i||!m):!p&&!m&&(i?f<=e:f<e);v?o=h+1:s=h}return Ne(s,H)}function Mo(t,e){var n=-1,i=t.length,r=0,o=[];while(++n<i){var s=t[n],a=e?e(s):s;if(!n||!ru(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function Oo(t){return"number"==typeof t?t:Bu(t)?W:+t}function Do(t){if("string"==typeof t)return t;if(lu(t))return $n(t,Do)+"";if(Bu(t))return bi?bi.call(t):"";var e=t+"";return"0"==e&&1/t==-P?"-0":e}function Po(t,e,n){var i=-1,r=kn,o=t.length,a=!0,l=[],c=l;if(n)a=!1,r=An;else if(o>=s){var u=e?null:Ts(t);if(u)return hi(u);a=!1,r=Zn,c=new Ki}else c=e?[]:l;t:while(++i<o){var h=t[i],f=e?e(h):h;if(h=n||0!==h?h:0,a&&f===f){var d=c.length;while(d--)if(c[d]===f)continue t;e&&c.push(f),l.push(h)}else r(c,f,n)||(c!==l&&c.push(f),l.push(h))}return l}function Io(t,e){return e=zo(e,t),t=_a(t,e),null==t||delete t[La(ol(e))]}function Fo(t,e,n,i){return Co(t,e,n(Dr(t,e)),i)}function Wo(t,e,n,i){var r=t.length,o=i?r:-1;while((i?o--:++o<r)&&e(t[o],o,t));return n?Ro(t,i?0:o,i?o+1:r):Ro(t,i?o+1:0,i?r:o)}function Bo(t,e){var n=t;return n instanceof $i&&(n=n.value()),Tn(e,(function(t,e){return e.func.apply(e.thisArg,Rn([t],e.args))}),n)}function Ho(t,e,i){var r=t.length;if(r<2)return r?Po(t[0]):[];var o=-1,s=n(r);while(++o<r){var a=t[o],l=-1;while(++l<r)l!=o&&(s[o]=_r(s[o]||a,t[l],e,i))}return Po(Rr(s,1),e,i)}function No(t,e,n){var i=-1,o=t.length,s=e.length,a={};while(++i<o){var l=i<s?e[i]:r;n(a,t[i],l)}return a}function jo(t){return hu(t)?t:[]}function Uo(t){return"function"==typeof t?t:Lf}function zo(t,e){return lu(t)?t:la(t,e)?[t]:Ea(Ju(t))}var Go=_o;function Vo(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:Ro(t,e,n)}var qo=Ee||function(t){return an.clearTimeout(t)};function Yo(t,e){if(e)return t.slice();var n=t.length,i=_e?_e(n):new t.constructor(n);return t.copy(i),i}function Ko(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e}function Xo(t,e){var n=e?Ko(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Zo(t){var e=new t.constructor(t.source,Vt.exec(t));return e.lastIndex=t.lastIndex,e}function Qo(t){return wi?ne(wi.call(t)):{}}function Jo(t,e){var n=e?Ko(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ts(t,e){if(t!==e){var n=t!==r,i=null===t,o=t===t,s=Bu(t),a=e!==r,l=null===e,c=e===e,u=Bu(e);if(!l&&!u&&!s&&t>e||s&&a&&c&&!l&&!u||i&&a&&c||!n&&c||!o)return 1;if(!i&&!s&&!u&&t<e||u&&n&&o&&!i&&!s||l&&n&&o||!a&&o||!c)return-1}return 0}function es(t,e,n){var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;while(++i<s){var l=ts(r[i],o[i]);if(l){if(i>=a)return l;var c=n[i];return l*("desc"==c?-1:1)}}return t.index-e.index}function ns(t,e,i,r){var o=-1,s=t.length,a=i.length,l=-1,c=e.length,u=He(s-a,0),h=n(c+u),f=!r;while(++l<c)h[l]=e[l];while(++o<a)(f||o<s)&&(h[i[o]]=t[o]);while(u--)h[l++]=t[o++];return h}function is(t,e,i,r){var o=-1,s=t.length,a=-1,l=i.length,c=-1,u=e.length,h=He(s-l,0),f=n(h+u),d=!r;while(++o<h)f[o]=t[o];var p=o;while(++c<u)f[p+c]=e[c];while(++a<l)(d||o<s)&&(f[p+i[a]]=t[o++]);return f}function rs(t,e){var i=-1,r=t.length;e||(e=n(r));while(++i<r)e[i]=t[i];return e}function os(t,e,n,i){var o=!n;n||(n={});var s=-1,a=e.length;while(++s<a){var l=e[s],c=i?i(n[l],t[l],l,n,t):r;c===r&&(c=t[l]),o?pr(n,l,c):cr(n,l,c)}return n}function ss(t,e){return os(t,Ks(t),e)}function as(t,e){return os(t,Xs(t),e)}function ls(t,e){return function(n,i){var r=lu(n)?bn:hr,o=e?e():{};return r(n,t,zs(i,2),o)}}function cs(t){return _o((function(e,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;s=t.length>3&&"function"==typeof s?(o--,s):r,a&&aa(n[0],n[1],a)&&(s=o<3?r:s,o=1),e=ne(e);while(++i<o){var l=n[i];l&&t(e,l,i,s)}return e}))}function us(t,e){return function(n,i){if(null==n)return n;if(!uu(n))return t(n,i);var r=n.length,o=e?r:-1,s=ne(n);while(e?o--:++o<r)if(!1===i(s[o],o,s))break;return n}}function hs(t){return function(e,n,i){var r=-1,o=ne(e),s=i(e),a=s.length;while(a--){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}function fs(t,e,n){var i=e&y,r=gs(t);function o(){var e=this&&this!==an&&this instanceof o?r:t;return e.apply(i?n:this,arguments)}return o}function ds(t){return function(e){e=Ju(e);var n=oi(e)?mi(e):r,i=n?n[0]:e.charAt(0),o=n?Vo(n,1).join(""):e.slice(1);return i[t]()+o}}function ps(t){return function(e){return Tn(Sf(Yh(e).replace(je,"")),t,"")}}function gs(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Ci(t.prototype),i=t.apply(n,e);return Cu(i)?i:n}}function ms(t,e,i){var o=gs(t);function s(){var a=arguments.length,l=n(a),c=a,u=Us(s);while(c--)l[c]=arguments[c];var h=a<3&&l[0]!==u&&l[a-1]!==u?[]:ui(l,u);if(a-=h.length,a<i)return $s(t,e,ws,s.placeholder,r,l,h,r,r,i-a);var f=this&&this!==an&&this instanceof s?o:t;return wn(f,this,l)}return s}function vs(t){return function(e,n,i){var o=ne(e);if(!uu(e)){var s=zs(n,3);e=Sh(e),n=function(t){return s(o[t],t,o)}}var a=t(e,n,i);return a>-1?o[s?e[a]:a]:r}}function ys(t){return Ws((function(e){var n=e.length,i=n,o=Ai.prototype.thru;t&&e.reverse();while(i--){var s=e[i];if("function"!=typeof s)throw new oe(l);if(o&&!a&&"wrapper"==js(s))var a=new Ai([],!0)}i=a?i:n;while(++i<n){s=e[i];var c=js(s),u="wrapper"==c?Ns(s):r;a=u&&ua(u[0])&&u[1]==(k|_|x|A)&&!u[4].length&&1==u[9]?a[js(u[0])].apply(a,u[3]):1==s.length&&ua(s)?a[c]():a.thru(s)}return function(){var t=arguments,i=t[0];if(a&&1==t.length&&lu(i))return a.plant(i).value();var r=0,o=n?e[r].apply(this,t):i;while(++r<n)o=e[r].call(this,o);return o}}))}function ws(t,e,i,o,s,a,l,c,u,h){var f=e&k,d=e&y,p=e&w,g=e&(_|S),m=e&$,v=p?r:gs(t);function b(){var r=arguments.length,y=n(r),w=r;while(w--)y[w]=arguments[w];if(g)var _=Us(b),S=ti(y,_);if(o&&(y=ns(y,o,s,g)),a&&(y=is(y,a,l,g)),r-=S,g&&r<h){var x=ui(y,_);return $s(t,e,ws,b.placeholder,i,y,x,c,u,h-r)}var C=d?i:this,k=p?C[t]:t;return r=y.length,c?y=Sa(y,c):m&&r>1&&y.reverse(),f&&u<r&&(y.length=u),this&&this!==an&&this instanceof b&&(k=v||gs(k)),k.apply(C,y)}return b}function bs(t,e){return function(n,i){return jr(n,t,e(i),{})}}function _s(t,e){return function(n,i){var o;if(n===r&&i===r)return e;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=Do(n),i=Do(i)):(n=Oo(n),i=Oo(i)),o=t(n,i)}return o}}function Ss(t){return Ws((function(e){return e=$n(e,Kn(zs())),_o((function(n){var i=this;return t(e,(function(t){return wn(t,i,n)}))}))}))}function xs(t,e){e=e===r?" ":Do(e);var n=e.length;if(n<2)return n?bo(e,t):e;var i=bo(e,Oe(t/gi(e)));return oi(e)?Vo(mi(i),0,t).join(""):i.slice(0,t)}function Cs(t,e,i,r){var o=e&y,s=gs(t);function a(){var e=-1,l=arguments.length,c=-1,u=r.length,h=n(u+l),f=this&&this!==an&&this instanceof a?s:t;while(++c<u)h[c]=r[c];while(l--)h[c++]=arguments[++e];return wn(f,o?i:this,h)}return a}function ks(t){return function(e,n,i){return i&&"number"!=typeof i&&aa(e,n,i)&&(n=i=r),e=qu(e),n===r?(n=e,e=0):n=qu(n),i=i===r?e<n?1:-1:qu(i),wo(e,n,i,t)}}function As(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Xu(e),n=Xu(n)),t(e,n)}}function $s(t,e,n,i,o,s,a,l,c,u){var h=e&_,f=h?a:r,d=h?r:a,p=h?s:r,g=h?r:s;e|=h?x:C,e&=~(h?C:x),e&b||(e&=~(y|w));var m=[t,e,o,p,f,g,d,l,c,u],v=n.apply(r,m);return ua(t)&&Ca(v,m),v.placeholder=i,$a(v,t,e)}function Rs(t){var e=ee[t];return function(t,n){if(t=Xu(t),n=null==n?0:Ne(Yu(n),292),n&&Fe(t)){var i=(Ju(t)+"e").split("e"),r=e(i[0]+"e"+(+i[1]+n));return i=(Ju(r)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(t)}}var Ts=en&&1/hi(new en([,-0]))[1]==P?function(t){return new en(t)}:Bf;function Es(t){return function(e){var n=Zs(e);return n==Q?li(e):n==ot?fi(e):qn(e,t(e))}}function Ls(t,e,n,i,o,s,a,c){var u=e&w;if(!u&&"function"!=typeof t)throw new oe(l);var h=i?i.length:0;if(h||(e&=~(x|C),i=o=r),a=a===r?a:He(Yu(a),0),c=c===r?c:Yu(c),h-=o?o.length:0,e&C){var f=i,d=o;i=o=r}var p=u?r:Ns(t),g=[t,e,n,i,o,f,d,s,a,c];if(p&&va(g,p),t=g[0],e=g[1],n=g[2],i=g[3],o=g[4],c=g[9]=g[9]===r?u?0:t.length:He(g[9]-h,0),!c&&e&(_|S)&&(e&=~(_|S)),e&&e!=y)m=e==_||e==S?ms(t,e,c):e!=x&&e!=(y|x)||o.length?ws.apply(r,g):Cs(t,e,n,i);else var m=fs(t,e,n);var v=p?ko:Ca;return $a(v(m,g),t,e)}function Ms(t,e,n,i){return t===r||ru(t,le[n])&&!he.call(i,n)?e:t}function Os(t,e,n,i,o,s){return Cu(t)&&Cu(e)&&(s.set(e,t),lo(t,e,r,Os,s),s["delete"](e)),t}function Ds(t){return Du(t)?r:t}function Ps(t,e,n,i,o,s){var a=n&m,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(t),h=s.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=n&v?new Ki:r;s.set(t,e),s.set(e,t);while(++f<l){var g=t[f],y=e[f];if(i)var w=a?i(y,g,f,e,t,s):i(g,y,f,t,e,s);if(w!==r){if(w)continue;d=!1;break}if(p){if(!Ln(e,(function(t,e){if(!Zn(p,e)&&(g===t||o(g,t,n,i,s)))return p.push(e)}))){d=!1;break}}else if(g!==y&&!o(g,y,n,i,s)){d=!1;break}}return s["delete"](t),s["delete"](e),d}function Is(t,e,n,i,r,o,s){switch(n){case ft:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ht:return!(t.byteLength!=e.byteLength||!o(new be(t),new be(e)));case V:case q:case J:return ru(+t,+e);case K:return t.name==e.name&&t.message==e.message;case rt:case st:return t==e+"";case Q:var a=li;case ot:var l=i&m;if(a||(a=hi),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=v,s.set(t,e);var u=Ps(a(t),a(e),i,r,o,s);return s["delete"](t),u;case at:if(wi)return wi.call(t)==wi.call(e)}return!1}function Fs(t,e,n,i,o,s){var a=n&m,l=Bs(t),c=l.length,u=Bs(e),h=u.length;if(c!=h&&!a)return!1;var f=c;while(f--){var d=l[f];if(!(a?d in e:he.call(e,d)))return!1}var p=s.get(t),g=s.get(e);if(p&&g)return p==e&&g==t;var v=!0;s.set(t,e),s.set(e,t);var y=a;while(++f<c){d=l[f];var w=t[d],b=e[d];if(i)var _=a?i(b,w,d,e,t,s):i(w,b,d,t,e,s);if(!(_===r?w===b||o(w,b,n,i,s):_)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var S=t.constructor,x=e.constructor;S==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof S&&S instanceof S&&"function"==typeof x&&x instanceof x||(v=!1)}return s["delete"](t),s["delete"](e),v}function Ws(t){return Aa(ba(t,r,Ya),t+"")}function Bs(t){return Pr(t,Sh,Ks)}function Hs(t){return Pr(t,xh,Xs)}var Ns=ln?function(t){return ln.get(t)}:Bf;function js(t){var e=t.name+"",n=cn[e],i=he.call(cn,e)?n.length:0;while(i--){var r=n[i],o=r.func;if(null==o||o==t)return r.name}return e}function Us(t){var e=he.call(Si,"placeholder")?Si:t;return e.placeholder}function zs(){var t=Si.iteratee||Mf;return t=t===Mf?eo:t,arguments.length?t(arguments[0],arguments[1]):t}function Gs(t,e){var n=t.__data__;return ca(e)?n["string"==typeof e?"string":"hash"]:n.map}function Vs(t){var e=Sh(t),n=e.length;while(n--){var i=e[n],r=t[i];e[n]=[i,r,pa(r)]}return e}function qs(t,e){var n=ri(t,e);return Zr(n)?n:r}function Ys(t){var e=he.call(t,Re),n=t[Re];try{t[Re]=r;var i=!0}catch(s){}var o=pe.call(t);return i&&(e?t[Re]=n:delete t[Re]),o}var Ks=Pe?function(t){return null==t?[]:(t=ne(t),Cn(Pe(t),(function(e){return Ce.call(t,e)})))}:Yf,Xs=Pe?function(t){var e=[];while(t)Rn(e,Ks(t)),t=Se(t);return e}:Yf,Zs=Ir;function Qs(t,e,n){var i=-1,r=n.length;while(++i<r){var o=n[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=Ne(e,t+s);break;case"takeRight":t=He(t,e-s);break}}return{start:t,end:e}}function Js(t){var e=t.match(Ht);return e?e[1].split(Nt):[]}function ta(t,e,n){e=zo(e,t);var i=-1,r=e.length,o=!1;while(++i<r){var s=La(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:(r=null==t?0:t.length,!!r&&xu(r)&&sa(s,r)&&(lu(t)||au(t)))}function ea(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&he.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function na(t){return"function"!=typeof t.constructor||da(t)?{}:Ci(Se(t))}function ia(t,e,n){var i=t.constructor;switch(e){case ht:return Ko(t);case V:case q:return new i(+t);case ft:return Xo(t,n);case dt:case pt:case gt:case mt:case vt:case yt:case wt:case bt:case _t:return Jo(t,n);case Q:return new i;case J:case st:return new i(t);case rt:return Zo(t);case ot:return new i;case at:return Qo(t)}}function ra(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(Bt,"{\n/* [wrapped with "+e+"] */\n")}function oa(t){return lu(t)||au(t)||!!(Ae&&t&&t[Ae])}function sa(t,e){var n=typeof t;return e=null==e?I:e,!!e&&("number"==n||"symbol"!=n&&Zt.test(t))&&t>-1&&t%1==0&&t<e}function aa(t,e,n){if(!Cu(n))return!1;var i=typeof e;return!!("number"==i?uu(n)&&sa(e,n.length):"string"==i&&e in n)&&ru(n[e],t)}function la(t,e){if(lu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Bu(t))||(Ot.test(t)||!Mt.test(t)||null!=e&&t in ne(e))}function ca(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ua(t){var e=js(t),n=Si[e];if("function"!=typeof n||!(e in $i.prototype))return!1;if(t===n)return!0;var i=Ns(n);return!!i&&t===i[0]}function ha(t){return!!de&&de in t}(Qe&&Zs(new Qe(new ArrayBuffer(1)))!=ft||Je&&Zs(new Je)!=Q||tn&&Zs(tn.resolve())!=nt||en&&Zs(new en)!=ot||on&&Zs(new on)!=ct)&&(Zs=function(t){var e=Ir(t),n=e==et?t.constructor:r,i=n?Ma(n):"";if(i)switch(i){case hn:return ft;case fn:return Q;case Mn:return nt;case On:return ot;case jn:return ct}return e});var fa=ce?_u:Kf;function da(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||le;return t===n}function pa(t){return t===t&&!Cu(t)}function ga(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==r||t in ne(n)))}}function ma(t){var e=Hc(t,(function(t){return n.size===h&&n.clear(),t})),n=e.cache;return e}function va(t,e){var n=t[1],i=e[1],r=n|i,o=r<(y|w|k),s=i==k&&n==_||i==k&&n==A&&t[7].length<=e[8]||i==(k|A)&&e[7].length<=e[8]&&n==_;if(!o&&!s)return t;i&y&&(t[2]=e[2],r|=n&y?0:b);var a=e[3];if(a){var l=t[3];t[3]=l?ns(l,a,e[4]):a,t[4]=l?ui(t[3],f):e[4]}return a=e[5],a&&(l=t[5],t[5]=l?is(l,a,e[6]):a,t[6]=l?ui(t[5],f):e[6]),a=e[7],a&&(t[7]=a),i&k&&(t[8]=null==t[8]?e[8]:Ne(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}function ya(t){var e=[];if(null!=t)for(var n in ne(t))e.push(n);return e}function wa(t){return pe.call(t)}function ba(t,e,i){return e=He(e===r?t.length-1:e,0),function(){var r=arguments,o=-1,s=He(r.length-e,0),a=n(s);while(++o<s)a[o]=r[e+o];o=-1;var l=n(e+1);while(++o<e)l[o]=r[o];return l[e]=i(a),wn(t,this,l)}}function _a(t,e){return e.length<2?t:Dr(t,Ro(e,0,-1))}function Sa(t,e){var n=t.length,i=Ne(e.length,n),o=rs(t);while(i--){var s=e[i];t[i]=sa(s,n)?o[s]:r}return t}function xa(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var Ca=Ra(ko),ka=Me||function(t,e){return an.setTimeout(t,e)},Aa=Ra(Ao);function $a(t,e,n){var i=e+"";return Aa(t,ra(i,Oa(Js(i),n)))}function Ra(t){var e=0,n=0;return function(){var i=ze(),o=L-(i-n);if(n=i,o>0){if(++e>=E)return arguments[0]}else e=0;return t.apply(r,arguments)}}function Ta(t,e){var n=-1,i=t.length,o=i-1;e=e===r?i:e;while(++n<e){var s=yo(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ea=ma((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Dt,(function(t,n,i,r){e.push(i?r.replace(zt,"$1"):n||t)})),e}));function La(t){if("string"==typeof t||Bu(t))return t;var e=t+"";return"0"==e&&1/t==-P?"-0":e}function Ma(t){if(null!=t){try{return ue.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Oa(t,e){return _n(j,(function(n){var i="_."+n[0];e&n[1]&&!kn(t,i)&&t.push(i)})),t.sort()}function Da(t){if(t instanceof $i)return t.clone();var e=new Ai(t.__wrapped__,t.__chain__);return e.__actions__=rs(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Pa(t,e,i){e=(i?aa(t,e,i):e===r)?1:He(Yu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];var s=0,a=0,l=n(Oe(o/e));while(s<o)l[a++]=Ro(t,s,s+=e);return l}function Ia(t){var e=-1,n=null==t?0:t.length,i=0,r=[];while(++e<n){var o=t[e];o&&(r[i++]=o)}return r}function Fa(){var t=arguments.length;if(!t)return[];var e=n(t-1),i=arguments[0],r=t;while(r--)e[r-1]=arguments[r];return Rn(lu(i)?rs(i):[i],Rr(e,1))}var Wa=_o((function(t,e){return hu(t)?_r(t,Rr(e,1,hu,!0)):[]})),Ba=_o((function(t,e){var n=ol(e);return hu(n)&&(n=r),hu(t)?_r(t,Rr(e,1,hu,!0),zs(n,2)):[]})),Ha=_o((function(t,e){var n=ol(e);return hu(n)&&(n=r),hu(t)?_r(t,Rr(e,1,hu,!0),r,n):[]}));function Na(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:Yu(e),Ro(t,e<0?0:e,i)):[]}function ja(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:Yu(e),e=i-e,Ro(t,0,e<0?0:e)):[]}function Ua(t,e){return t&&t.length?Wo(t,zs(e,3),!0,!0):[]}function za(t,e){return t&&t.length?Wo(t,zs(e,3),!0):[]}function Ga(t,e,n,i){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&aa(t,e,n)&&(n=0,i=r),Ar(t,e,n,i)):[]}function Va(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:Yu(n);return r<0&&(r=He(i+r,0)),In(t,zs(e,3),r)}function qa(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==r&&(o=Yu(n),o=n<0?He(i+o,0):Ne(o,i-1)),In(t,zs(e,3),o,!0)}function Ya(t){var e=null==t?0:t.length;return e?Rr(t,1):[]}function Ka(t){var e=null==t?0:t.length;return e?Rr(t,P):[]}function Xa(t,e){var n=null==t?0:t.length;return n?(e=e===r?1:Yu(e),Rr(t,e)):[]}function Za(t){var e=-1,n=null==t?0:t.length,i={};while(++e<n){var r=t[e];i[r[0]]=r[1]}return i}function Qa(t){return t&&t.length?t[0]:r}function Ja(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:Yu(n);return r<0&&(r=He(i+r,0)),Fn(t,e,r)}function tl(t){var e=null==t?0:t.length;return e?Ro(t,0,-1):[]}var el=_o((function(t){var e=$n(t,jo);return e.length&&e[0]===t[0]?Nr(e):[]})),nl=_o((function(t){var e=ol(t),n=$n(t,jo);return e===ol(n)?e=r:n.pop(),n.length&&n[0]===t[0]?Nr(n,zs(e,2)):[]})),il=_o((function(t){var e=ol(t),n=$n(t,jo);return e="function"==typeof e?e:r,e&&n.pop(),n.length&&n[0]===t[0]?Nr(n,r,e):[]}));function rl(t,e){return null==t?"":We.call(t,e)}function ol(t){var e=null==t?0:t.length;return e?t[e-1]:r}function sl(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==r&&(o=Yu(n),o=o<0?He(i+o,0):Ne(o,i-1)),e===e?pi(t,e,o):In(t,Bn,o,!0)}function al(t,e){return t&&t.length?uo(t,Yu(e)):r}var ll=_o(cl);function cl(t,e){return t&&t.length&&e&&e.length?mo(t,e):t}function ul(t,e,n){return t&&t.length&&e&&e.length?mo(t,e,zs(n,2)):t}function hl(t,e,n){return t&&t.length&&e&&e.length?mo(t,e,r,n):t}var fl=Ws((function(t,e){var n=null==t?0:t.length,i=gr(t,e);return vo(t,$n(e,(function(t){return sa(t,n)?+t:t})).sort(ts)),i}));function dl(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],o=t.length;e=zs(e,3);while(++i<o){var s=t[i];e(s,i,t)&&(n.push(s),r.push(i))}return vo(t,r),n}function pl(t){return null==t?t:qe.call(t)}function gl(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&aa(t,e,n)?(e=0,n=i):(e=null==e?0:Yu(e),n=n===r?i:Yu(n)),Ro(t,e,n)):[]}function ml(t,e){return Eo(t,e)}function vl(t,e,n){return Lo(t,e,zs(n,2))}function yl(t,e){var n=null==t?0:t.length;if(n){var i=Eo(t,e);if(i<n&&ru(t[i],e))return i}return-1}function wl(t,e){return Eo(t,e,!0)}function bl(t,e,n){return Lo(t,e,zs(n,2),!0)}function _l(t,e){var n=null==t?0:t.length;if(n){var i=Eo(t,e,!0)-1;if(ru(t[i],e))return i}return-1}function Sl(t){return t&&t.length?Mo(t):[]}function xl(t,e){return t&&t.length?Mo(t,zs(e,2)):[]}function Cl(t){var e=null==t?0:t.length;return e?Ro(t,1,e):[]}function kl(t,e,n){return t&&t.length?(e=n||e===r?1:Yu(e),Ro(t,0,e<0?0:e)):[]}function Al(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:Yu(e),e=i-e,Ro(t,e<0?0:e,i)):[]}function $l(t,e){return t&&t.length?Wo(t,zs(e,3),!1,!0):[]}function Rl(t,e){return t&&t.length?Wo(t,zs(e,3)):[]}var Tl=_o((function(t){return Po(Rr(t,1,hu,!0))})),El=_o((function(t){var e=ol(t);return hu(e)&&(e=r),Po(Rr(t,1,hu,!0),zs(e,2))})),Ll=_o((function(t){var e=ol(t);return e="function"==typeof e?e:r,Po(Rr(t,1,hu,!0),r,e)}));function Ml(t){return t&&t.length?Po(t):[]}function Ol(t,e){return t&&t.length?Po(t,zs(e,2)):[]}function Dl(t,e){return e="function"==typeof e?e:r,t&&t.length?Po(t,r,e):[]}function Pl(t){if(!t||!t.length)return[];var e=0;return t=Cn(t,(function(t){if(hu(t))return e=He(t.length,e),!0})),Vn(e,(function(e){return $n(t,Nn(e))}))}function Il(t,e){if(!t||!t.length)return[];var n=Pl(t);return null==e?n:$n(n,(function(t){return wn(e,r,t)}))}var Fl=_o((function(t,e){return hu(t)?_r(t,e):[]})),Wl=_o((function(t){return Ho(Cn(t,hu))})),Bl=_o((function(t){var e=ol(t);return hu(e)&&(e=r),Ho(Cn(t,hu),zs(e,2))})),Hl=_o((function(t){var e=ol(t);return e="function"==typeof e?e:r,Ho(Cn(t,hu),r,e)})),Nl=_o(Pl);function jl(t,e){return No(t||[],e||[],cr)}function Ul(t,e){return No(t||[],e||[],Co)}var zl=_o((function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,Il(t,n)}));function Gl(t){var e=Si(t);return e.__chain__=!0,e}function Vl(t,e){return e(t),t}function ql(t,e){return e(t)}var Yl=Ws((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,o=function(e){return gr(e,t)};return!(e>1||this.__actions__.length)&&i instanceof $i&&sa(n)?(i=i.slice(n,+n+(e?1:0)),i.__actions__.push({func:ql,args:[o],thisArg:r}),new Ai(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(r),t}))):this.thru(o)}));function Kl(){return Gl(this)}function Xl(){return new Ai(this.value(),this.__chain__)}function Zl(){this.__values__===r&&(this.__values__=Vu(this.value()));var t=this.__index__>=this.__values__.length,e=t?r:this.__values__[this.__index__++];return{done:t,value:e}}function Ql(){return this}function Jl(t){var e,n=this;while(n instanceof ki){var i=Da(n);i.__index__=0,i.__values__=r,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e}function tc(){var t=this.__wrapped__;if(t instanceof $i){var e=t;return this.__actions__.length&&(e=new $i(this)),e=e.reverse(),e.__actions__.push({func:ql,args:[pl],thisArg:r}),new Ai(e,this.__chain__)}return this.thru(pl)}function ec(){return Bo(this.__wrapped__,this.__actions__)}var nc=ls((function(t,e,n){he.call(t,n)?++t[n]:pr(t,n,1)}));function ic(t,e,n){var i=lu(t)?xn:Cr;return n&&aa(t,e,n)&&(e=r),i(t,zs(e,3))}function rc(t,e){var n=lu(t)?Cn:$r;return n(t,zs(e,3))}var oc=vs(Va),sc=vs(qa);function ac(t,e){return Rr(mc(t,e),1)}function lc(t,e){return Rr(mc(t,e),P)}function cc(t,e,n){return n=n===r?1:Yu(n),Rr(mc(t,e),n)}function uc(t,e){var n=lu(t)?_n:Sr;return n(t,zs(e,3))}function hc(t,e){var n=lu(t)?Sn:xr;return n(t,zs(e,3))}var fc=ls((function(t,e,n){he.call(t,n)?t[n].push(e):pr(t,n,[e])}));function dc(t,e,n,i){t=uu(t)?t:Nh(t),n=n&&!i?Yu(n):0;var r=t.length;return n<0&&(n=He(r+n,0)),Wu(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&Fn(t,e,n)>-1}var pc=_o((function(t,e,i){var r=-1,o="function"==typeof e,s=uu(t)?n(t.length):[];return Sr(t,(function(t){s[++r]=o?wn(e,t,i):Ur(t,e,i)})),s})),gc=ls((function(t,e,n){pr(t,n,e)}));function mc(t,e){var n=lu(t)?$n:oo;return n(t,zs(e,3))}function vc(t,e,n,i){return null==t?[]:(lu(e)||(e=null==e?[]:[e]),n=i?r:n,lu(n)||(n=null==n?[]:[n]),ho(t,e,n))}var yc=ls((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));function wc(t,e,n){var i=lu(t)?Tn:Un,r=arguments.length<3;return i(t,zs(e,4),n,r,Sr)}function bc(t,e,n){var i=lu(t)?En:Un,r=arguments.length<3;return i(t,zs(e,4),n,r,xr)}function _c(t,e){var n=lu(t)?Cn:$r;return n(t,Nc(zs(e,3)))}function Sc(t){var e=lu(t)?or:So;return e(t)}function xc(t,e,n){e=(n?aa(t,e,n):e===r)?1:Yu(e);var i=lu(t)?sr:xo;return i(t,e)}function Cc(t){var e=lu(t)?ar:$o;return e(t)}function kc(t){if(null==t)return 0;if(uu(t))return Wu(t)?gi(t):t.length;var e=Zs(t);return e==Q||e==ot?t.size:no(t).length}function Ac(t,e,n){var i=lu(t)?Ln:To;return n&&aa(t,e,n)&&(e=r),i(t,zs(e,3))}var $c=_o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&aa(t,e[0],e[1])?e=[]:n>2&&aa(e[0],e[1],e[2])&&(e=[e[0]]),ho(t,Rr(e,1),[])})),Rc=Le||function(){return an.Date.now()};function Tc(t,e){if("function"!=typeof e)throw new oe(l);return t=Yu(t),function(){if(--t<1)return e.apply(this,arguments)}}function Ec(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,Ls(t,k,r,r,r,r,e)}function Lc(t,e){var n;if("function"!=typeof e)throw new oe(l);return t=Yu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Mc=_o((function(t,e,n){var i=y;if(n.length){var r=ui(n,Us(Mc));i|=x}return Ls(t,i,e,n,r)})),Oc=_o((function(t,e,n){var i=y|w;if(n.length){var r=ui(n,Us(Oc));i|=x}return Ls(e,i,t,n,r)}));function Dc(t,e,n){e=n?r:e;var i=Ls(t,_,r,r,r,r,r,e);return i.placeholder=Dc.placeholder,i}function Pc(t,e,n){e=n?r:e;var i=Ls(t,S,r,r,r,r,r,e);return i.placeholder=Pc.placeholder,i}function Ic(t,e,n){var i,o,s,a,c,u,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new oe(l);function g(e){var n=i,s=o;return i=o=r,h=e,a=t.apply(s,n),a}function m(t){return h=t,c=ka(w,e),f?g(t):a}function v(t){var n=t-u,i=t-h,r=e-n;return d?Ne(r,s-i):r}function y(t){var n=t-u,i=t-h;return u===r||n>=e||n<0||d&&i>=s}function w(){var t=Rc();if(y(t))return b(t);c=ka(w,v(t))}function b(t){return c=r,p&&i?g(t):(i=o=r,a)}function _(){c!==r&&qo(c),h=0,i=u=o=c=r}function S(){return c===r?a:b(Rc())}function x(){var t=Rc(),n=y(t);if(i=arguments,o=this,u=t,n){if(c===r)return m(u);if(d)return qo(c),c=ka(w,e),g(u)}return c===r&&(c=ka(w,e)),a}return e=Xu(e)||0,Cu(n)&&(f=!!n.leading,d="maxWait"in n,s=d?He(Xu(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),x.cancel=_,x.flush=S,x}var Fc=_o((function(t,e){return br(t,1,e)})),Wc=_o((function(t,e,n){return br(t,Xu(e)||0,n)}));function Bc(t){return Ls(t,$)}function Hc(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new oe(l);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Hc.Cache||Ui),n}function Nc(t){if("function"!=typeof t)throw new oe(l);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function jc(t){return Lc(2,t)}Hc.Cache=Ui;var Uc=Go((function(t,e){e=1==e.length&&lu(e[0])?$n(e[0],Kn(zs())):$n(Rr(e,1),Kn(zs()));var n=e.length;return _o((function(i){var r=-1,o=Ne(i.length,n);while(++r<o)i[r]=e[r].call(this,i[r]);return wn(t,this,i)}))})),zc=_o((function(t,e){var n=ui(e,Us(zc));return Ls(t,x,r,e,n)})),Gc=_o((function(t,e){var n=ui(e,Us(Gc));return Ls(t,C,r,e,n)})),Vc=Ws((function(t,e){return Ls(t,A,r,r,r,e)}));function qc(t,e){if("function"!=typeof t)throw new oe(l);return e=e===r?e:Yu(e),_o(t,e)}function Yc(t,e){if("function"!=typeof t)throw new oe(l);return e=null==e?0:He(Yu(e),0),_o((function(n){var i=n[e],r=Vo(n,0,e);return i&&Rn(r,i),wn(t,this,r)}))}function Kc(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new oe(l);return Cu(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Ic(t,e,{leading:i,maxWait:e,trailing:r})}function Xc(t){return Ec(t,1)}function Zc(t,e){return zc(Uo(e),t)}function Qc(){if(!arguments.length)return[];var t=arguments[0];return lu(t)?t:[t]}function Jc(t){return vr(t,g)}function tu(t,e){return e="function"==typeof e?e:r,vr(t,g,e)}function eu(t){return vr(t,d|g)}function nu(t,e){return e="function"==typeof e?e:r,vr(t,d|g,e)}function iu(t,e){return null==e||wr(t,e,Sh(e))}function ru(t,e){return t===e||t!==t&&e!==e}var ou=As(Fr),su=As((function(t,e){return t>=e})),au=zr(function(){return arguments}())?zr:function(t){return ku(t)&&he.call(t,"callee")&&!Ce.call(t,"callee")},lu=n.isArray,cu=dn?Kn(dn):Gr;function uu(t){return null!=t&&xu(t.length)&&!_u(t)}function hu(t){return ku(t)&&uu(t)}function fu(t){return!0===t||!1===t||ku(t)&&Ir(t)==V}var du=Ie||Kf,pu=pn?Kn(pn):Vr;function gu(t){return ku(t)&&1===t.nodeType&&!Du(t)}function mu(t){if(null==t)return!0;if(uu(t)&&(lu(t)||"string"==typeof t||"function"==typeof t.splice||du(t)||Hu(t)||au(t)))return!t.length;var e=Zs(t);if(e==Q||e==ot)return!t.size;if(da(t))return!no(t).length;for(var n in t)if(he.call(t,n))return!1;return!0}function vu(t,e){return qr(t,e)}function yu(t,e,n){n="function"==typeof n?n:r;var i=n?n(t,e):r;return i===r?qr(t,e,r,n):!!i}function wu(t){if(!ku(t))return!1;var e=Ir(t);return e==K||e==Y||"string"==typeof t.message&&"string"==typeof t.name&&!Du(t)}function bu(t){return"number"==typeof t&&Fe(t)}function _u(t){if(!Cu(t))return!1;var e=Ir(t);return e==X||e==Z||e==G||e==it}function Su(t){return"number"==typeof t&&t==Yu(t)}function xu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function Cu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ku(t){return null!=t&&"object"==typeof t}var Au=gn?Kn(gn):Kr;function $u(t,e){return t===e||Xr(t,e,Vs(e))}function Ru(t,e,n){return n="function"==typeof n?n:r,Xr(t,e,Vs(e),n)}function Tu(t){return Ou(t)&&t!=+t}function Eu(t){if(fa(t))throw new Wt(a);return Zr(t)}function Lu(t){return null===t}function Mu(t){return null==t}function Ou(t){return"number"==typeof t||ku(t)&&Ir(t)==J}function Du(t){if(!ku(t)||Ir(t)!=et)return!1;var e=Se(t);if(null===e)return!0;var n=he.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==ge}var Pu=mn?Kn(mn):Qr;function Iu(t){return Su(t)&&t>=-I&&t<=I}var Fu=vn?Kn(vn):Jr;function Wu(t){return"string"==typeof t||!lu(t)&&ku(t)&&Ir(t)==st}function Bu(t){return"symbol"==typeof t||ku(t)&&Ir(t)==at}var Hu=yn?Kn(yn):to;function Nu(t){return t===r}function ju(t){return ku(t)&&Zs(t)==ct}function Uu(t){return ku(t)&&Ir(t)==ut}var zu=As(ro),Gu=As((function(t,e){return t<=e}));function Vu(t){if(!t)return[];if(uu(t))return Wu(t)?mi(t):rs(t);if($e&&t[$e])return ai(t[$e]());var e=Zs(t),n=e==Q?li:e==ot?hi:Nh;return n(t)}function qu(t){if(!t)return 0===t?t:0;if(t=Xu(t),t===P||t===-P){var e=t<0?-1:1;return e*F}return t===t?t:0}function Yu(t){var e=qu(t),n=e%1;return e===e?n?e-n:e:0}function Ku(t){return t?mr(Yu(t),0,B):0}function Xu(t){if("number"==typeof t)return t;if(Bu(t))return W;if(Cu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Cu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Yn(t);var n=Yt.test(t);return n||Xt.test(t)?rn(t.slice(2),n?2:8):qt.test(t)?W:+t}function Zu(t){return os(t,xh(t))}function Qu(t){return t?mr(Yu(t),-I,I):0===t?t:0}function Ju(t){return null==t?"":Do(t)}var th=cs((function(t,e){if(da(e)||uu(e))os(e,Sh(e),t);else for(var n in e)he.call(e,n)&&cr(t,n,e[n])})),eh=cs((function(t,e){os(e,xh(e),t)})),nh=cs((function(t,e,n,i){os(e,xh(e),t,i)})),ih=cs((function(t,e,n,i){os(e,Sh(e),t,i)})),rh=Ws(gr);function oh(t,e){var n=Ci(t);return null==e?n:fr(n,e)}var sh=_o((function(t,e){t=ne(t);var n=-1,i=e.length,o=i>2?e[2]:r;o&&aa(e[0],e[1],o)&&(i=1);while(++n<i){var s=e[n],a=xh(s),l=-1,c=a.length;while(++l<c){var u=a[l],h=t[u];(h===r||ru(h,le[u])&&!he.call(t,u))&&(t[u]=s[u])}}return t})),ah=_o((function(t){return t.push(r,Os),wn($h,r,t)}));function lh(t,e){return Pn(t,zs(e,3),Lr)}function ch(t,e){return Pn(t,zs(e,3),Mr)}function uh(t,e){return null==t?t:Tr(t,zs(e,3),xh)}function hh(t,e){return null==t?t:Er(t,zs(e,3),xh)}function fh(t,e){return t&&Lr(t,zs(e,3))}function dh(t,e){return t&&Mr(t,zs(e,3))}function ph(t){return null==t?[]:Or(t,Sh(t))}function gh(t){return null==t?[]:Or(t,xh(t))}function mh(t,e,n){var i=null==t?r:Dr(t,e);return i===r?n:i}function vh(t,e){return null!=t&&ta(t,e,Wr)}function yh(t,e){return null!=t&&ta(t,e,Br)}var wh=bs((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),t[e]=n}),$f(Lf)),bh=bs((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),he.call(t,e)?t[e].push(n):t[e]=[n]}),zs),_h=_o(Ur);function Sh(t){return uu(t)?rr(t):no(t)}function xh(t){return uu(t)?rr(t,!0):io(t)}function Ch(t,e){var n={};return e=zs(e,3),Lr(t,(function(t,i,r){pr(n,e(t,i,r),t)})),n}function kh(t,e){var n={};return e=zs(e,3),Lr(t,(function(t,i,r){pr(n,i,e(t,i,r))})),n}var Ah=cs((function(t,e,n){lo(t,e,n)})),$h=cs((function(t,e,n,i){lo(t,e,n,i)})),Rh=Ws((function(t,e){var n={};if(null==t)return n;var i=!1;e=$n(e,(function(e){return e=zo(e,t),i||(i=e.length>1),e})),os(t,Hs(t),n),i&&(n=vr(n,d|p|g,Ds));var r=e.length;while(r--)Io(n,e[r]);return n}));function Th(t,e){return Lh(t,Nc(zs(e)))}var Eh=Ws((function(t,e){return null==t?{}:fo(t,e)}));function Lh(t,e){if(null==t)return{};var n=$n(Hs(t),(function(t){return[t]}));return e=zs(e),po(t,n,(function(t,n){return e(t,n[0])}))}function Mh(t,e,n){e=zo(e,t);var i=-1,o=e.length;o||(o=1,t=r);while(++i<o){var s=null==t?r:t[La(e[i])];s===r&&(i=o,s=n),t=_u(s)?s.call(t):s}return t}function Oh(t,e,n){return null==t?t:Co(t,e,n)}function Dh(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Co(t,e,n,i)}var Ph=Es(Sh),Ih=Es(xh);function Fh(t,e,n){var i=lu(t),r=i||du(t)||Hu(t);if(e=zs(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Cu(t)&&_u(o)?Ci(Se(t)):{}}return(r?_n:Lr)(t,(function(t,i,r){return e(n,t,i,r)})),n}function Wh(t,e){return null==t||Io(t,e)}function Bh(t,e,n){return null==t?t:Fo(t,e,Uo(n))}function Hh(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Fo(t,e,Uo(n),i)}function Nh(t){return null==t?[]:Xn(t,Sh(t))}function jh(t){return null==t?[]:Xn(t,xh(t))}function Uh(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=Xu(n),n=n===n?n:0),e!==r&&(e=Xu(e),e=e===e?e:0),mr(Xu(t),e,n)}function zh(t,e,n){return e=qu(e),n===r?(n=e,e=0):n=qu(n),t=Xu(t),Hr(t,e,n)}function Gh(t,e,n){if(n&&"boolean"!=typeof n&&aa(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=qu(t),e===r?(e=t,t=0):e=qu(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var o=Ve();return Ne(t+o*(e-t+nn("1e-"+((o+"").length-1))),e)}return yo(t,e)}var Vh=ps((function(t,e,n){return e=e.toLowerCase(),t+(n?qh(e):e)}));function qh(t){return _f(Ju(t).toLowerCase())}function Yh(t){return t=Ju(t),t&&t.replace(Qt,ei).replace(Ue,"")}function Kh(t,e,n){t=Ju(t),e=Do(e);var i=t.length;n=n===r?i:mr(Yu(n),0,i);var o=n;return n-=e.length,n>=0&&t.slice(n,o)==e}function Xh(t){return t=Ju(t),t&&Rt.test(t)?t.replace(At,ni):t}function Zh(t){return t=Ju(t),t&&It.test(t)?t.replace(Pt,"\\$&"):t}var Qh=ps((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Jh=ps((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),tf=ds("toLowerCase");function ef(t,e,n){t=Ju(t),e=Yu(e);var i=e?gi(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return xs(De(r),n)+t+xs(Oe(r),n)}function nf(t,e,n){t=Ju(t),e=Yu(e);var i=e?gi(t):0;return e&&i<e?t+xs(e-i,n):t}function rf(t,e,n){t=Ju(t),e=Yu(e);var i=e?gi(t):0;return e&&i<e?xs(e-i,n)+t:t}function of(t,e,n){return n||null==e?e=0:e&&(e=+e),Ge(Ju(t).replace(Ft,""),e||0)}function sf(t,e,n){return e=(n?aa(t,e,n):e===r)?1:Yu(e),bo(Ju(t),e)}function af(){var t=arguments,e=Ju(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var lf=ps((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));function cf(t,e,n){return n&&"number"!=typeof n&&aa(t,e,n)&&(e=n=r),n=n===r?B:n>>>0,n?(t=Ju(t),t&&("string"==typeof e||null!=e&&!Pu(e))&&(e=Do(e),!e&&oi(t))?Vo(mi(t),0,n):t.split(e,n)):[]}var uf=ps((function(t,e,n){return t+(n?" ":"")+_f(e)}));function hf(t,e,n){return t=Ju(t),n=null==n?0:mr(Yu(n),0,t.length),e=Do(e),t.slice(n,n+e.length)==e}function ff(t,e,n){var i=Si.templateSettings;n&&aa(t,e,n)&&(e=r),t=Ju(t),e=nh({},e,i,Ms);var o,s,a=nh({},e.imports,i.imports,Ms),l=Sh(a),u=Xn(a,l),h=0,f=e.interpolate||Jt,d="__p += '",p=ie((e.escape||Jt).source+"|"+f.source+"|"+(f===Lt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),g="//# sourceURL="+(he.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";t.replace(p,(function(e,n,i,r,a,l){return i||(i=r),d+=t.slice(h,l).replace(te,ii),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),h=l+e.length,e})),d+="';\n";var m=he.call(e,"variable")&&e.variable;if(m){if(Ut.test(m))throw new Wt(c)}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(St,""):d).replace(xt,"$1").replace(Ct,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=xf((function(){return jt(l,g+"return "+d).apply(r,u)}));if(v.source=d,wu(v))throw v;return v}function df(t){return Ju(t).toLowerCase()}function pf(t){return Ju(t).toUpperCase()}function gf(t,e,n){if(t=Ju(t),t&&(n||e===r))return Yn(t);if(!t||!(e=Do(e)))return t;var i=mi(t),o=mi(e),s=Qn(i,o),a=Jn(i,o)+1;return Vo(i,s,a).join("")}function mf(t,e,n){if(t=Ju(t),t&&(n||e===r))return t.slice(0,vi(t)+1);if(!t||!(e=Do(e)))return t;var i=mi(t),o=Jn(i,mi(e))+1;return Vo(i,0,o).join("")}function vf(t,e,n){if(t=Ju(t),t&&(n||e===r))return t.replace(Ft,"");if(!t||!(e=Do(e)))return t;var i=mi(t),o=Qn(i,mi(e));return Vo(i,o).join("")}function yf(t,e){var n=R,i=T;if(Cu(e)){var o="separator"in e?e.separator:o;n="length"in e?Yu(e.length):n,i="omission"in e?Do(e.omission):i}t=Ju(t);var s=t.length;if(oi(t)){var a=mi(t);s=a.length}if(n>=s)return t;var l=n-gi(i);if(l<1)return i;var c=a?Vo(a,0,l).join(""):t.slice(0,l);if(o===r)return c+i;if(a&&(l+=c.length-l),Pu(o)){if(t.slice(l).search(o)){var u,h=c;o.global||(o=ie(o.source,Ju(Vt.exec(o))+"g")),o.lastIndex=0;while(u=o.exec(h))var f=u.index;c=c.slice(0,f===r?l:f)}}else if(t.indexOf(Do(o),l)!=l){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i}function wf(t){return t=Ju(t),t&&$t.test(t)?t.replace(kt,yi):t}var bf=ps((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),_f=ds("toUpperCase");function Sf(t,e,n){return t=Ju(t),e=n?r:e,e===r?si(t)?_i(t):Dn(t):t.match(e)||[]}var xf=_o((function(t,e){try{return wn(t,r,e)}catch(n){return wu(n)?n:new Wt(n)}})),Cf=Ws((function(t,e){return _n(e,(function(e){e=La(e),pr(t,e,Mc(t[e],t))})),t}));function kf(t){var e=null==t?0:t.length,n=zs();return t=e?$n(t,(function(t){if("function"!=typeof t[1])throw new oe(l);return[n(t[0]),t[1]]})):[],_o((function(n){var i=-1;while(++i<e){var r=t[i];if(wn(r[0],this,n))return wn(r[1],this,n)}}))}function Af(t){return yr(vr(t,d))}function $f(t){return function(){return t}}function Rf(t,e){return null==t||t!==t?e:t}var Tf=ys(),Ef=ys(!0);function Lf(t){return t}function Mf(t){return eo("function"==typeof t?t:vr(t,d))}function Of(t){return so(vr(t,d))}function Df(t,e){return ao(t,vr(e,d))}var Pf=_o((function(t,e){return function(n){return Ur(n,t,e)}})),If=_o((function(t,e){return function(n){return Ur(t,n,e)}}));function Ff(t,e,n){var i=Sh(e),r=Or(e,i);null!=n||Cu(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=Or(e,Sh(e)));var o=!(Cu(n)&&"chain"in n)||!!n.chain,s=_u(t);return _n(r,(function(n){var i=e[n];t[n]=i,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),r=n.__actions__=rs(this.__actions__);return r.push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Rn([this.value()],arguments))})})),t}function Wf(){return an._===this&&(an._=me),this}function Bf(){}function Hf(t){return t=Yu(t),_o((function(e){return uo(e,t)}))}var Nf=Ss($n),jf=Ss(xn),Uf=Ss(Ln);function zf(t){return la(t)?Nn(La(t)):go(t)}function Gf(t){return function(e){return null==t?r:Dr(t,e)}}var Vf=ks(),qf=ks(!0);function Yf(){return[]}function Kf(){return!1}function Xf(){return{}}function Zf(){return""}function Qf(){return!0}function Jf(t,e){if(t=Yu(t),t<1||t>I)return[];var n=B,i=Ne(t,B);e=zs(e),t-=B;var r=Vn(i,e);while(++n<t)e(n);return r}function td(t){return lu(t)?$n(t,La):Bu(t)?[t]:rs(Ea(Ju(t)))}function ed(t){var e=++fe;return Ju(t)+e}var nd=_s((function(t,e){return t+e}),0),id=Rs("ceil"),rd=_s((function(t,e){return t/e}),1),od=Rs("floor");function sd(t){return t&&t.length?kr(t,Lf,Fr):r}function ad(t,e){return t&&t.length?kr(t,zs(e,2),Fr):r}function ld(t){return Hn(t,Lf)}function cd(t,e){return Hn(t,zs(e,2))}function ud(t){return t&&t.length?kr(t,Lf,ro):r}function hd(t,e){return t&&t.length?kr(t,zs(e,2),ro):r}var fd=_s((function(t,e){return t*e}),1),dd=Rs("round"),pd=_s((function(t,e){return t-e}),0);function gd(t){return t&&t.length?Gn(t,Lf):0}function md(t,e){return t&&t.length?Gn(t,zs(e,2)):0}return Si.after=Tc,Si.ary=Ec,Si.assign=th,Si.assignIn=eh,Si.assignInWith=nh,Si.assignWith=ih,Si.at=rh,Si.before=Lc,Si.bind=Mc,Si.bindAll=Cf,Si.bindKey=Oc,Si.castArray=Qc,Si.chain=Gl,Si.chunk=Pa,Si.compact=Ia,Si.concat=Fa,Si.cond=kf,Si.conforms=Af,Si.constant=$f,Si.countBy=nc,Si.create=oh,Si.curry=Dc,Si.curryRight=Pc,Si.debounce=Ic,Si.defaults=sh,Si.defaultsDeep=ah,Si.defer=Fc,Si.delay=Wc,Si.difference=Wa,Si.differenceBy=Ba,Si.differenceWith=Ha,Si.drop=Na,Si.dropRight=ja,Si.dropRightWhile=Ua,Si.dropWhile=za,Si.fill=Ga,Si.filter=rc,Si.flatMap=ac,Si.flatMapDeep=lc,Si.flatMapDepth=cc,Si.flatten=Ya,Si.flattenDeep=Ka,Si.flattenDepth=Xa,Si.flip=Bc,Si.flow=Tf,Si.flowRight=Ef,Si.fromPairs=Za,Si.functions=ph,Si.functionsIn=gh,Si.groupBy=fc,Si.initial=tl,Si.intersection=el,Si.intersectionBy=nl,Si.intersectionWith=il,Si.invert=wh,Si.invertBy=bh,Si.invokeMap=pc,Si.iteratee=Mf,Si.keyBy=gc,Si.keys=Sh,Si.keysIn=xh,Si.map=mc,Si.mapKeys=Ch,Si.mapValues=kh,Si.matches=Of,Si.matchesProperty=Df,Si.memoize=Hc,Si.merge=Ah,Si.mergeWith=$h,Si.method=Pf,Si.methodOf=If,Si.mixin=Ff,Si.negate=Nc,Si.nthArg=Hf,Si.omit=Rh,Si.omitBy=Th,Si.once=jc,Si.orderBy=vc,Si.over=Nf,Si.overArgs=Uc,Si.overEvery=jf,Si.overSome=Uf,Si.partial=zc,Si.partialRight=Gc,Si.partition=yc,Si.pick=Eh,Si.pickBy=Lh,Si.property=zf,Si.propertyOf=Gf,Si.pull=ll,Si.pullAll=cl,Si.pullAllBy=ul,Si.pullAllWith=hl,Si.pullAt=fl,Si.range=Vf,Si.rangeRight=qf,Si.rearg=Vc,Si.reject=_c,Si.remove=dl,Si.rest=qc,Si.reverse=pl,Si.sampleSize=xc,Si.set=Oh,Si.setWith=Dh,Si.shuffle=Cc,Si.slice=gl,Si.sortBy=$c,Si.sortedUniq=Sl,Si.sortedUniqBy=xl,Si.split=cf,Si.spread=Yc,Si.tail=Cl,Si.take=kl,Si.takeRight=Al,Si.takeRightWhile=$l,Si.takeWhile=Rl,Si.tap=Vl,Si.throttle=Kc,Si.thru=ql,Si.toArray=Vu,Si.toPairs=Ph,Si.toPairsIn=Ih,Si.toPath=td,Si.toPlainObject=Zu,Si.transform=Fh,Si.unary=Xc,Si.union=Tl,Si.unionBy=El,Si.unionWith=Ll,Si.uniq=Ml,Si.uniqBy=Ol,Si.uniqWith=Dl,Si.unset=Wh,Si.unzip=Pl,Si.unzipWith=Il,Si.update=Bh,Si.updateWith=Hh,Si.values=Nh,Si.valuesIn=jh,Si.without=Fl,Si.words=Sf,Si.wrap=Zc,Si.xor=Wl,Si.xorBy=Bl,Si.xorWith=Hl,Si.zip=Nl,Si.zipObject=jl,Si.zipObjectDeep=Ul,Si.zipWith=zl,Si.entries=Ph,Si.entriesIn=Ih,Si.extend=eh,Si.extendWith=nh,Ff(Si,Si),Si.add=nd,Si.attempt=xf,Si.camelCase=Vh,Si.capitalize=qh,Si.ceil=id,Si.clamp=Uh,Si.clone=Jc,Si.cloneDeep=eu,Si.cloneDeepWith=nu,Si.cloneWith=tu,Si.conformsTo=iu,Si.deburr=Yh,Si.defaultTo=Rf,Si.divide=rd,Si.endsWith=Kh,Si.eq=ru,Si.escape=Xh,Si.escapeRegExp=Zh,Si.every=ic,Si.find=oc,Si.findIndex=Va,Si.findKey=lh,Si.findLast=sc,Si.findLastIndex=qa,Si.findLastKey=ch,Si.floor=od,Si.forEach=uc,Si.forEachRight=hc,Si.forIn=uh,Si.forInRight=hh,Si.forOwn=fh,Si.forOwnRight=dh,Si.get=mh,Si.gt=ou,Si.gte=su,Si.has=vh,Si.hasIn=yh,Si.head=Qa,Si.identity=Lf,Si.includes=dc,Si.indexOf=Ja,Si.inRange=zh,Si.invoke=_h,Si.isArguments=au,Si.isArray=lu,Si.isArrayBuffer=cu,Si.isArrayLike=uu,Si.isArrayLikeObject=hu,Si.isBoolean=fu,Si.isBuffer=du,Si.isDate=pu,Si.isElement=gu,Si.isEmpty=mu,Si.isEqual=vu,Si.isEqualWith=yu,Si.isError=wu,Si.isFinite=bu,Si.isFunction=_u,Si.isInteger=Su,Si.isLength=xu,Si.isMap=Au,Si.isMatch=$u,Si.isMatchWith=Ru,Si.isNaN=Tu,Si.isNative=Eu,Si.isNil=Mu,Si.isNull=Lu,Si.isNumber=Ou,Si.isObject=Cu,Si.isObjectLike=ku,Si.isPlainObject=Du,Si.isRegExp=Pu,Si.isSafeInteger=Iu,Si.isSet=Fu,Si.isString=Wu,Si.isSymbol=Bu,Si.isTypedArray=Hu,Si.isUndefined=Nu,Si.isWeakMap=ju,Si.isWeakSet=Uu,Si.join=rl,Si.kebabCase=Qh,Si.last=ol,Si.lastIndexOf=sl,Si.lowerCase=Jh,Si.lowerFirst=tf,Si.lt=zu,Si.lte=Gu,Si.max=sd,Si.maxBy=ad,Si.mean=ld,Si.meanBy=cd,Si.min=ud,Si.minBy=hd,Si.stubArray=Yf,Si.stubFalse=Kf,Si.stubObject=Xf,Si.stubString=Zf,Si.stubTrue=Qf,Si.multiply=fd,Si.nth=al,Si.noConflict=Wf,Si.noop=Bf,Si.now=Rc,Si.pad=ef,Si.padEnd=nf,Si.padStart=rf,Si.parseInt=of,Si.random=Gh,Si.reduce=wc,Si.reduceRight=bc,Si.repeat=sf,Si.replace=af,Si.result=Mh,Si.round=dd,Si.runInContext=t,Si.sample=Sc,Si.size=kc,Si.snakeCase=lf,Si.some=Ac,Si.sortedIndex=ml,Si.sortedIndexBy=vl,Si.sortedIndexOf=yl,Si.sortedLastIndex=wl,Si.sortedLastIndexBy=bl,Si.sortedLastIndexOf=_l,Si.startCase=uf,Si.startsWith=hf,Si.subtract=pd,Si.sum=gd,Si.sumBy=md,Si.template=ff,Si.times=Jf,Si.toFinite=qu,Si.toInteger=Yu,Si.toLength=Ku,Si.toLower=df,Si.toNumber=Xu,Si.toSafeInteger=Qu,Si.toString=Ju,Si.toUpper=pf,Si.trim=gf,Si.trimEnd=mf,Si.trimStart=vf,Si.truncate=yf,Si.unescape=wf,Si.uniqueId=ed,Si.upperCase=bf,Si.upperFirst=_f,Si.each=uc,Si.eachRight=hc,Si.first=Qa,Ff(Si,function(){var t={};return Lr(Si,(function(e,n){he.call(Si.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),Si.VERSION=o,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Si[t].placeholder=Si})),_n(["drop","take"],(function(t,e){$i.prototype[t]=function(n){n=n===r?1:He(Yu(n),0);var i=this.__filtered__&&!e?new $i(this):this.clone();return i.__filtered__?i.__takeCount__=Ne(n,i.__takeCount__):i.__views__.push({size:Ne(n,B),type:t+(i.__dir__<0?"Right":"")}),i},$i.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),_n(["filter","map","takeWhile"],(function(t,e){var n=e+1,i=n==M||n==D;$i.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:zs(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),_n(["head","last"],(function(t,e){var n="take"+(e?"Right":"");$i.prototype[t]=function(){return this[n](1).value()[0]}})),_n(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");$i.prototype[t]=function(){return this.__filtered__?new $i(this):this[n](1)}})),$i.prototype.compact=function(){return this.filter(Lf)},$i.prototype.find=function(t){return this.filter(t).head()},$i.prototype.findLast=function(t){return this.reverse().find(t)},$i.prototype.invokeMap=_o((function(t,e){return"function"==typeof t?new $i(this):this.map((function(n){return Ur(n,t,e)}))})),$i.prototype.reject=function(t){return this.filter(Nc(zs(t)))},$i.prototype.slice=function(t,e){t=Yu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new $i(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(e=Yu(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},$i.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$i.prototype.toArray=function(){return this.take(B)},Lr($i.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Si[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);o&&(Si.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,l=e instanceof $i,c=a[0],u=l||lu(e),h=function(t){var e=o.apply(Si,Rn([t],a));return i&&f?e[0]:e};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,g=l&&!d;if(!s&&u){e=g?e:new $i(this);var m=t.apply(e,a);return m.__actions__.push({func:ql,args:[h],thisArg:r}),new Ai(m,f)}return p&&g?t.apply(this,a):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})})),_n(["pop","push","shift","sort","splice","unshift"],(function(t){var e=se[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Si.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(lu(r)?r:[],t)}return this[n]((function(n){return e.apply(lu(n)?n:[],t)}))}})),Lr($i.prototype,(function(t,e){var n=Si[e];if(n){var i=n.name+"";he.call(cn,i)||(cn[i]=[]),cn[i].push({name:e,func:n})}})),cn[ws(r,w).name]=[{name:"wrapper",func:r}],$i.prototype.clone=Ri,$i.prototype.reverse=Ti,$i.prototype.value=Ei,Si.prototype.at=Yl,Si.prototype.chain=Kl,Si.prototype.commit=Xl,Si.prototype.next=Zl,Si.prototype.plant=Jl,Si.prototype.reverse=tc,Si.prototype.toJSON=Si.prototype.valueOf=Si.prototype.value=ec,Si.prototype.first=Si.prototype.head,$e&&(Si.prototype[$e]=Ql),Si},xi=Si();an._=xi,i=function(){return xi}.call(e,n,e,t),i===r||(t.exports=i)}.call(this)},66188:function(t,e,n){var i=n(1054);function r(t){return null==t?"":i(t)}t.exports=r},23779:function(t,e,n){var i=n(83126),r=i("toUpperCase");t.exports=r},11618:function(t,e,n){var i=n(45981),r=n(83559),o=n(66188),s=n(75304);function a(t,e,n){return t=o(t),e=n?void 0:e,void 0===e?r(t)?s(t):i(t):t.match(e)||[]}t.exports=a},87955:function(t,e){"use strict";
|
49
|
+
/**
|
50
|
+
* Muuri v0.9.5
|
51
|
+
* https://muuri.dev/
|
52
|
+
* Copyright (c) 2015-present, Haltu Oy
|
53
|
+
* Released under the MIT license
|
54
|
+
* https://github.com/haltu/muuri/blob/master/LICENSE.md
|
55
|
+
* @license MIT
|
56
|
+
*
|
57
|
+
* Muuri Packer
|
58
|
+
* Copyright (c) 2016-present, Niklas Rämö <inramo@gmail.com>
|
59
|
+
* @license MIT
|
60
|
+
*
|
61
|
+
* Muuri Ticker / Muuri Emitter / Muuri Dragger
|
62
|
+
* Copyright (c) 2018-present, Niklas Rämö <inramo@gmail.com>
|
63
|
+
* @license MIT
|
64
|
+
*
|
65
|
+
* Muuri AutoScroller
|
66
|
+
* Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>
|
67
|
+
* @license MIT
|
68
|
+
*/var n={},i="function"===typeof Map?new Map:null,r="swap",o="move",s="synchronize",a="layoutStart",l="layoutEnd",c="layoutAbort",u="add",h="remove",f="showStart",d="showEnd",p="hideStart",g="hideEnd",m="filter",v="sort",y="move",w="send",b="beforeSend",_="receive",S="beforeReceive",x="dragInit",C="dragStart",k="dragMove",A="dragScroll",$="dragEnd",R="dragReleaseStart",T="dragReleaseEnd",E="destroy",L="ontouchstart"in window,M=!!window.PointerEvent,O=!!window.navigator.msPointerEnabled,D=16777216;function P(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}P.prototype.on=function(t,e){if(!this._events||!t||!e)return this;var n=this._events[t];return n||(n=this._events[t]=[]),n.push(e),this},P.prototype.off=function(t,e){if(!this._events||!t||!e)return this;var n,i=this._events[t];if(!i||!i.length)return this;while(-1!==(n=i.indexOf(e)))i.splice(n,1);return this},P.prototype.clear=function(t){if(!this._events||!t)return this;var e=this._events[t];return e&&(e.length=0,delete this._events[t]),this},P.prototype.emit=function(t){if(!this._events||!t)return this._clearOnEmit=!1,this;var e=this._events[t];if(!e||!e.length)return this._clearOnEmit=!1,this;var n,i=this._queue,r=i.length,o=arguments.length-1;o>3&&(n=[],n.push.apply(n,arguments),n.shift()),i.push.apply(i,e),this._clearOnEmit&&(e.length=0,this._clearOnEmit=!1),++this._counter;for(var s=r,a=i.length;s<a;s++)if(0===o?i[s]():1===o?i[s](arguments[1]):2===o?i[s](arguments[1],arguments[2]):3===o?i[s](arguments[1],arguments[2],arguments[3]):i[s].apply(null,n),!this._events)return this;return--this._counter,this._counter||(i.length=0),this},P.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},P.prototype.countListeners=function(t){if(!this._events)return 0;var e=this._events[t];return e?e.length:0},P.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var I=M?"pointerout":O?"MSPointerOut":"",F=100;function W(t){I&&(this._dragger=t,this._timeout=null,this._outEvent=null,this._isActive=!1,this._addBehaviour=this._addBehaviour.bind(this),this._removeBehaviour=this._removeBehaviour.bind(this),this._onTimeout=this._onTimeout.bind(this),this._resetData=this._resetData.bind(this),this._onStart=this._onStart.bind(this),this._onOut=this._onOut.bind(this),this._dragger.on("start",this._onStart))}W.prototype._addBehaviour=function(){this._isActive||(this._isActive=!0,this._dragger.on("move",this._resetData),this._dragger.on("cancel",this._removeBehaviour),this._dragger.on("end",this._removeBehaviour),window.addEventListener(I,this._onOut))},W.prototype._removeBehaviour=function(){this._isActive&&(this._dragger.off("move",this._resetData),this._dragger.off("cancel",this._removeBehaviour),this._dragger.off("end",this._removeBehaviour),window.removeEventListener(I,this._onOut),this._resetData(),this._isActive=!1)},W.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},W.prototype._onStart=function(t){"mouse"!==t.pointerType&&this._addBehaviour()},W.prototype._onOut=function(t){this._dragger._getTrackedTouch(t)&&(this._resetData(),this._outEvent=t,this._timeout=window.setTimeout(this._onTimeout,F))},W.prototype._onTimeout=function(){var t=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(t)},W.prototype.destroy=function(){I&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var B=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],H={};function N(t,e){var n=H[e]||"";if(n)return n;var i=e[0].toUpperCase()+e.slice(1),r=0;while(r<B.length){if(n=B[r]?B[r]+i:e,n in t)return H[e]=n,n;++r}return""}function j(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(n){}return t}var U=window.navigator.userAgent.toLowerCase(),z=U.indexOf("edge")>-1,G=U.indexOf("trident")>-1,V=U.indexOf("firefox")>-1,q=U.indexOf("android")>-1,Y=!!j()&&{passive:!0},K="touchAction",X=N(document.documentElement.style,K),Z="auto";function Q(t,e){this._element=t,this._emitter=new P,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(z||G)&&(M||O)&&(this._edgeHack=new W(this)),this.setCssProps(e),this._touchAction||this.setTouchAction(Z),t.addEventListener("dragstart",Q._preventDefault,!1),t.addEventListener(Q._inputEvents.start,this._onStart,Y)}Q._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},Q._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},Q._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},Q._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},Q._inputEvents=function(){return L?Q._touchEvents:M?Q._pointerEvents:O?Q._msPointerEvents:Q._mouseEvents}(),Q._emitter=new P,Q._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},Q._activeInstances=[],Q._preventDefault=function(t){t.preventDefault&&!1!==t.cancelable&&t.preventDefault()},Q._activateInstance=function(t){var e=Q._activeInstances.indexOf(t);e>-1||(Q._activeInstances.push(t),Q._emitter.on(Q._emitterEvents.move,t._onMove),Q._emitter.on(Q._emitterEvents.cancel,t._onCancel),Q._emitter.on(Q._emitterEvents.end,t._onEnd),1===Q._activeInstances.length&&Q._bindListeners())},Q._deactivateInstance=function(t){var e=Q._activeInstances.indexOf(t);-1!==e&&(Q._activeInstances.splice(e,1),Q._emitter.off(Q._emitterEvents.move,t._onMove),Q._emitter.off(Q._emitterEvents.cancel,t._onCancel),Q._emitter.off(Q._emitterEvents.end,t._onEnd),Q._activeInstances.length||Q._unbindListeners())},Q._bindListeners=function(){window.addEventListener(Q._inputEvents.move,Q._onMove,Y),window.addEventListener(Q._inputEvents.end,Q._onEnd,Y),Q._inputEvents.cancel&&window.addEventListener(Q._inputEvents.cancel,Q._onCancel,Y)},Q._unbindListeners=function(){window.removeEventListener(Q._inputEvents.move,Q._onMove,Y),window.removeEventListener(Q._inputEvents.end,Q._onEnd,Y),Q._inputEvents.cancel&&window.removeEventListener(Q._inputEvents.cancel,Q._onCancel,Y)},Q._getEventPointerId=function(t){return"number"===typeof t.pointerId?t.pointerId:t.changedTouches?t.changedTouches[0]?t.changedTouches[0].identifier:null:1},Q._getTouchById=function(t,e){if("number"===typeof t.pointerId)return t.pointerId===e?t:null;if(t.changedTouches){for(var n=0;n<t.changedTouches.length;n++)if(t.changedTouches[n].identifier===e)return t.changedTouches[n];return null}return t},Q._onMove=function(t){Q._emitter.emit(Q._emitterEvents.move,t)},Q._onCancel=function(t){Q._emitter.emit(Q._emitterEvents.cancel,t)},Q._onEnd=function(t){Q._emitter.emit(Q._emitterEvents.end,t)},Q.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,Q._deactivateInstance(this)},Q.prototype._createEvent=function(t,e){var n=this._getTrackedTouch(e);return{type:t,srcEvent:e,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:t===Q._emitterEvents.start?0:this.getDeltaTime(),isFirst:t===Q._emitterEvents.start,isFinal:t===Q._emitterEvents.end||t===Q._emitterEvents.cancel,pointerType:e.pointerType||(e.touches?"touch":"mouse"),identifier:this._pointerId,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX,pageY:n.pageY,target:n.target}},Q.prototype._emit=function(t,e){this._emitter.emit(t,this._createEvent(t,e))},Q.prototype._getTrackedTouch=function(t){return null===this._pointerId?null:Q._getTouchById(t,this._pointerId)},Q.prototype._onStart=function(t){if(!this._isDestroyed&&null===this._pointerId&&(this._pointerId=Q._getEventPointerId(t),null!==this._pointerId)){var e=this._getTrackedTouch(t);this._startX=this._currentX=e.clientX,this._startY=this._currentY=e.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(Q._emitterEvents.start,t),this._isActive&&Q._activateInstance(this)}},Q.prototype._onMove=function(t){var e=this._getTrackedTouch(t);e&&(this._currentX=e.clientX,this._currentY=e.clientY,this._emit(Q._emitterEvents.move,t))},Q.prototype._onCancel=function(t){this._getTrackedTouch(t)&&(this._emit(Q._emitterEvents.cancel,t),this._reset())},Q.prototype._onEnd=function(t){this._getTrackedTouch(t)&&(this._emit(Q._emitterEvents.end,t),this._reset())},Q.prototype.isActive=function(){return this._isActive},Q.prototype.setTouchAction=function(t){this._touchAction=t,X&&(this._cssProps[X]="",this._element.style[X]=t),L&&(this._element.removeEventListener(Q._touchEvents.start,Q._preventDefault,!0),(this._element.style[X]!==t||V&&q)&&this._element.addEventListener(Q._touchEvents.start,Q._preventDefault,!0))},Q.prototype.setCssProps=function(t){if(t){var e,n,i=this._cssProps,r=this._element;for(e in i)r.style[e]=i[e],delete i[e];for(e in t)t[e]&&(e!==K?(n=N(r.style,e),n&&(i[n]="",r.style[n]=t[e])):this.setTouchAction(t[e]))}},Q.prototype.getDeltaX=function(){return this._currentX-this._startX},Q.prototype.getDeltaY=function(){return this._currentY-this._startY},Q.prototype.getDistance=function(){var t=this.getDeltaX(),e=this.getDeltaY();return Math.sqrt(t*t+e*e)},Q.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},Q.prototype.on=function(t,e){this._emitter.on(t,e)},Q.prototype.off=function(t,e){this._emitter.off(t,e)},Q.prototype.destroy=function(){if(!this._isDestroyed){var t=this._element;for(var e in this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),t.removeEventListener(Q._inputEvents.start,this._onStart,Y),t.removeEventListener("dragstart",Q._preventDefault,!1),t.removeEventListener(Q._touchEvents.start,Q._preventDefault,!0),this._cssProps)t.style[e]=this._cssProps[e],delete this._cssProps[e];this._element=null,this._isDestroyed=!0}};var J=1e3/60,tt=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return this.setTimeout((function(){t(Date.now())}),J)}).bind(window);function et(t){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var e=0;e<t;e++)this._lanes.push(new nt)}function nt(){this.queue=[],this.indices={},this.callbacks={}}et.prototype._step=function(t){var e,n,i,r,o,s,a=this._lanes,l=this._stepQueue,c=this._stepCallbacks;for(this._nextStep=null,e=0;e<a.length;e++){for(r=a[e].queue,o=a[e].callbacks,s=a[e].indices,n=0;n<r.length;n++)i=r[n],i&&(l.push(i),c[i]=o[i],delete o[i],delete s[i]);r.length=0}for(e=0;e<l.length;e++)i=l[e],c[i]&&c[i](t),delete c[i];l.length=0},et.prototype.add=function(t,e,n){this._lanes[t].add(e,n),this._nextStep||(this._nextStep=tt(this._step))},et.prototype.remove=function(t,e){this._lanes[t].remove(e)},nt.prototype.add=function(t,e){var n=this.indices[t];void 0!==n&&(this.queue[n]=void 0),this.queue.push(t),this.callbacks[t]=e,this.indices[t]=this.queue.length-1},nt.prototype.remove=function(t){var e=this.indices[t];void 0!==e&&(this.queue[e]=void 0,delete this.callbacks[t],delete this.indices[t])};var it="layoutRead",rt="layoutWrite",ot="visibilityRead",st="visibilityWrite",at="dragStartRead",lt="dragStartWrite",ct="dragMoveRead",ut="dragMoveWrite",ht="dragScrollRead",ft="dragScrollWrite",dt="dragSortRead",pt="placeholderLayoutRead",gt="placeholderLayoutWrite",mt="placeholderResizeWrite",vt="autoScrollRead",yt="autoScrollWrite",wt="debounceRead",bt=0,_t=1,St=2,xt=new et(3);function Ct(t,e,n){xt.add(bt,it+t,e),xt.add(St,rt+t,n)}function kt(t){xt.remove(bt,it+t),xt.remove(St,rt+t)}function At(t,e,n){xt.add(bt,ot+t,e),xt.add(St,st+t,n)}function $t(t){xt.remove(bt,ot+t),xt.remove(St,st+t)}function Rt(t,e,n){xt.add(bt,at+t,e),xt.add(St,lt+t,n)}function Tt(t){xt.remove(bt,at+t),xt.remove(St,lt+t)}function Et(t,e,n){xt.add(bt,ct+t,e),xt.add(St,ut+t,n)}function Lt(t){xt.remove(bt,ct+t),xt.remove(St,ut+t)}function Mt(t,e,n){xt.add(bt,ht+t,e),xt.add(St,ft+t,n)}function Ot(t){xt.remove(bt,ht+t),xt.remove(St,ft+t)}function Dt(t,e){xt.add(_t,dt+t,e)}function Pt(t){xt.remove(_t,dt+t)}function It(t,e,n){xt.add(bt,pt+t,e),xt.add(St,gt+t,n)}function Ft(t){xt.remove(bt,pt+t),xt.remove(St,gt+t)}function Wt(t,e){xt.add(St,mt+t,e)}function Bt(t){xt.remove(St,mt+t)}function Ht(t,e){xt.add(bt,vt,t),xt.add(St,yt,e)}function Nt(){xt.remove(bt,vt),xt.remove(St,yt)}function jt(t,e){xt.add(bt,wt+t,e)}function Ut(t){xt.remove(bt,wt+t)}var zt=1,Gt=2,Vt=4,qt=8,Yt=zt|qt,Kt=zt|Vt,Xt=Gt|qt,Zt=Gt|Vt,Qt="function";function Jt(t){return typeof t===Qt}var te="function"===typeof WeakMap?new WeakMap:null;function ee(t,e){var n=te&&te.get(t);return n||(n=window.getComputedStyle(t,null),te&&te.set(t,n)),n.getPropertyValue(e)}function ne(t,e){return parseFloat(ee(t,e))||0}var ie=document.documentElement,re=document.body,oe={value:0,offset:0};function se(t){return t===window||t===ie||t===re?window:t}function ae(t){return t===window?t.pageXOffset:t.scrollLeft}function le(t){return t===window?t.pageYOffset:t.scrollTop}function ce(t){return t===window?ie.scrollWidth-ie.clientWidth:t.scrollWidth-t.clientWidth}function ue(t){return t===window?ie.scrollHeight-ie.clientHeight:t.scrollHeight-t.clientHeight}function he(t,e){if(e=e||{},t===window)e.width=ie.clientWidth,e.height=ie.clientHeight,e.left=0,e.right=e.width,e.top=0,e.bottom=e.height;else{var n=t.getBoundingClientRect(),i=t.clientLeft||ne(t,"border-left-width"),r=t.clientTop||ne(t,"border-top-width");e.width=t.clientWidth,e.height=t.clientHeight,e.left=n.left+i,e.right=e.left+e.width,e.top=n.top+r,e.bottom=e.top+e.height}return e}function fe(t){return t._drag._getGrid()._settings.dragAutoScroll}function de(t){t._drag&&t._drag._prepareScroll()}function pe(t){if(t._drag&&t._isActive){var e=t._drag;e._scrollDiffX=e._scrollDiffY=0,t._setTranslate(e._left,e._top)}}function ge(t,e,n,i){return oe.value=Math.min(i/2,t),oe.offset=Math.max(0,n+2*oe.value+i*e-i)/2,oe}function me(){this.reset()}function ve(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}function ye(t,e){this.pool=[],this.createItem=t,this.releaseItem=e}function we(t,e){return!(t.left+t.width<=e.left||e.left+e.width<=t.left||t.top+t.height<=e.top||e.top+e.height<=t.top)}function be(t,e){if(!we(t,e))return 0;var n=Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left),i=Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top);return n*i}function _e(t,e){var n=be(t,e);if(!n)return 0;var i=Math.min(t.width,e.width)*Math.min(t.height,e.height);return n/i*100}me.prototype.reset=function(){this.isActive&&this.onStop(),this.item=null,this.element=null,this.isActive=!1,this.isEnding=!1,this.direction=null,this.value=null,this.maxValue=0,this.threshold=0,this.distance=0,this.speed=0,this.duration=0,this.action=null},me.prototype.hasReachedEnd=function(){return Vt&this.direction?this.value>=this.maxValue:this.value<=0},me.prototype.computeCurrentScrollValue=function(){return null===this.value?zt&this.direction?ae(this.element):le(this.element):Math.max(0,Math.min(this.value,this.maxValue))},me.prototype.computeNextScrollValue=function(t){var e=this.speed*(t/1e3),n=Vt&this.direction?this.value+e:this.value-e;return Math.max(0,Math.min(n,this.maxValue))},me.prototype.computeSpeed=function(){var t={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1};return function(e){var n=this.item,i=fe(n).speed;return Jt(i)?(t.direction=this.direction,t.threshold=this.threshold,t.distance=this.distance,t.value=this.value,t.maxValue=this.maxValue,t.duration=this.duration,t.speed=this.speed,t.deltaTime=e,t.isEnding=this.isEnding,i(n,this.element,t)):i}}(),me.prototype.tick=function(t){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(t),this.value=this.computeNextScrollValue(t),this.duration+=t,this.value},me.prototype.onStart=function(){var t=this.item,e=fe(t).onStart;Jt(e)&&e(t,this.element,this.direction)},me.prototype.onStop=function(){var t=this.item,e=fe(t).onStop;Jt(e)&&e(t,this.element,this.direction),t._drag&&t._drag.sort()},ve.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},ve.prototype.addRequest=function(t){zt&t.direction?(this.removeRequest(this.requestX),this.requestX=t):(this.removeRequest(this.requestY),this.requestY=t),t.action=this},ve.prototype.removeRequest=function(t){t&&(this.requestX===t?(this.requestX=null,t.action=null):this.requestY===t&&(this.requestY=null,t.action=null))},ve.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:ae(this.element),this.scrollTop=this.requestY?this.requestY.value:le(this.element)},ve.prototype.scroll=function(){var t=this.element;t&&(t.scrollTo?t.scrollTo(this.scrollLeft,this.scrollTop):(t.scrollLeft=this.scrollLeft,t.scrollTop=this.scrollTop))},ye.prototype.pick=function(){return this.pool.pop()||this.createItem()},ye.prototype.release=function(t){this.releaseItem(t),-1===this.pool.indexOf(t)&&this.pool.push(t)},ye.prototype.reset=function(){this.pool.length=0};var Se={width:0,height:0,left:0,right:0,top:0,bottom:0},xe={width:0,height:0,left:0,right:0,top:0,bottom:0};function Ce(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[zt]={},this._requests[Gt]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new ye((function(){return new me}),(function(t){t.reset()})),this._actionPool=new ye((function(){return new ve}),(function(t){t.reset()})),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Ce.AXIS_X=zt,Ce.AXIS_Y=Gt,Ce.FORWARD=Vt,Ce.BACKWARD=qt,Ce.LEFT=Yt,Ce.RIGHT=Kt,Ce.UP=Xt,Ce.DOWN=Zt,Ce.smoothSpeed=function(t,e,n){return function(i,r,o){var s=0;if(!o.isEnding)if(o.threshold>0){var a=o.threshold-Math.max(0,o.distance);s=t/o.threshold*a}else s=t;var l=o.speed,c=s;return l===s?c:l<s?(c=l+e*(o.deltaTime/1e3),Math.min(s,c)):(c=l-n*(o.deltaTime/1e3),Math.max(s,c))}},Ce.pointerHandle=function(t){var e={left:0,top:0,width:0,height:0},n=t||1;return function(t,i,r,o,s,a,l){return e.left=a-.5*n,e.top=l-.5*n,e.width=n,e.height=n,e}},Ce.prototype._readTick=function(t){this._isDestroyed||(t&&this._tickTime?(this._tickDeltaTime=t-this._tickTime,this._tickTime=t,this._updateRequests(),this._updateActions()):(this._tickTime=t,this._tickDeltaTime=0))},Ce.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),Ht(this._readTick,this._writeTick))},Ce.prototype._startTicking=function(){this._isTicking=!0,Ht(this._readTick,this._writeTick)},Ce.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,Nt()},Ce.prototype._getItemHandleRect=function(t,e,n){var i=t._drag;if(e){var r=i._dragMoveEvent||i._dragStartEvent,o=e(t,i._clientX,i._clientY,t._width,t._height,r.clientX,r.clientY);n.left=o.left,n.top=o.top,n.width=o.width,n.height=o.height}else n.left=i._clientX,n.top=i._clientY,n.width=t._width,n.height=t._height;return n.right=n.left+n.width,n.bottom=n.top+n.height,n},Ce.prototype._requestItemScroll=function(t,e,n,i,r,o,s){var a=this._requests[e],l=a[t._id];l?l.element===n&&l.direction===i||l.reset():l=this._requestPool.pick(),l.item=t,l.element=n,l.direction=i,l.threshold=r,l.distance=o,l.maxValue=s,a[t._id]=l},Ce.prototype._cancelItemScroll=function(t,e){var n=this._requests[e],i=n[t._id];i&&(i.action&&i.action.removeRequest(i),this._requestPool.release(i),delete n[t._id])},Ce.prototype._checkItemOverlap=function(t,e,n){var i=fe(t),r=Jt(i.targets)?i.targets(t):i.targets,o=i.threshold,s=i.safeZone;if(!r||!r.length)return e&&this._cancelItemScroll(t,zt),void(n&&this._cancelItemScroll(t,Gt));var a=this._dragDirections[t._id],l=a[0],c=a[1];if(!l&&!c)return e&&this._cancelItemScroll(t,zt),void(n&&this._cancelItemScroll(t,Gt));for(var u=this._getItemHandleRect(t,i.handle,Se),h=xe,f=null,d=null,p=!0,g=!0,m=0,v=0,y=null,w=null,b=0,_=0,S=0,x=null,C=-1/0,k=0,A=0,$=null,R=0,T=0,E=null,L=-1/0,M=0,O=0,D=null,P=0,I=0,F=0;F<r.length;F++)f=r[F],p=e&&l&&f.axis!==Gt,g=n&&c&&f.axis!==zt,v=f.priority||0,(!p||v<C)&&(!g||v<L)||(d=se(f.element||f),_=p?ce(d):-1,S=g?ue(d):-1,(_||S)&&(h=he(d,h),m=_e(u,h),m<=0||(p&&v>=C&&_>0&&(v>C||m>A)&&(w=null,y=ge("number"===typeof f.threshold?f.threshold:o,s,u.width,h.width),l===Kt?(b=h.right+y.offset-u.right,b<=y.value&&ae(d)<_&&(w=Kt)):l===Yt&&(b=u.left-(h.left-y.offset),b<=y.value&&ae(d)>0&&(w=Yt)),null!==w&&(x=d,C=v,k=y.value,A=m,$=w,R=b,T=_)),g&&v>=L&&S>0&&(v>L||m>O)&&(w=null,y=ge("number"===typeof f.threshold?f.threshold:o,s,u.height,h.height),c===Zt?(b=h.bottom+y.offset-u.bottom,b<=y.value&&le(d)<S&&(w=Zt)):c===Xt&&(b=u.top-(h.top-y.offset),b<=y.value&&le(d)>0&&(w=Xt)),null!==w&&(E=d,L=v,M=y.value,O=m,D=w,P=b,I=S)))));e&&(x?this._requestItemScroll(t,zt,x,$,k,R,T):this._cancelItemScroll(t,zt)),n&&(E?this._requestItemScroll(t,Gt,E,D,M,P,I):this._cancelItemScroll(t,Gt))},Ce.prototype._updateScrollRequest=function(t){for(var e=t.item,n=fe(e),i=Jt(n.targets)?n.targets(e):n.targets,r=i&&i.length||0,o=n.threshold,s=n.safeZone,a=this._getItemHandleRect(e,n.handle,Se),l=xe,c=null,u=null,h=!1,f=null,d=null,p=null,g=null,m=null,v=null,y=0;y<r;y++)if(c=i[y],u=se(c.element||c),u===t.element){if(h=!!(zt&t.direction),h){if(c.axis===Gt)continue}else if(c.axis===zt)continue;if(m=h?ce(u):ue(u),m<=0)break;if(l=he(u,l),f=_e(a,l),f<=0)break;if(d=ge("number"===typeof c.threshold?c.threshold:o,s,h?a.width:a.height,h?l.width:l.height),p=t.direction===Yt?a.left-(l.left-d.offset):t.direction===Kt?l.right+d.offset-a.right:t.direction===Xt?a.top-(l.top-d.offset):l.bottom+d.offset-a.bottom,p>d.value)break;if(g=h?ae(u):le(u),v=Vt&t.direction?g>=m:g<=0,v)break;return t.maxValue=m,t.threshold=d.value,t.distance=p,t.isEnding=!1,!0}return!0===n.smoothStop&&t.speed>0?(null===v&&(v=t.hasReachedEnd()),t.isEnding=!v):t.isEnding=!1,t.isEnding},Ce.prototype._updateRequests=function(){for(var t,e,n,i,r,o,s,a=this._items,l=this._requests[zt],c=this._requests[Gt],u=0;u<a.length;u++)t=a[u],i=this._requestOverlapCheck[t._id],r=i>0&&this._tickTime-i>this._overlapCheckInterval,o=!0,e=l[t._id],e&&e.isActive&&(o=!this._updateScrollRequest(e),o&&(r=!0,this._cancelItemScroll(t,zt))),s=!0,n=c[t._id],n&&n.isActive&&(s=!this._updateScrollRequest(n),s&&(r=!0,this._cancelItemScroll(t,Gt))),r&&(this._requestOverlapCheck[t._id]=0,this._checkItemOverlap(t,o,s))},Ce.prototype._requestAction=function(t,e){for(var n=this._actions,i=e===zt,r=null,o=0;o<n.length;o++){if(r=n[o],t.element===r.element){if(i?r.requestX:r.requestY)return void this._cancelItemScroll(t.item,e);break}r=null}r||(r=this._actionPool.pick()),r.element=t.element,r.addRequest(t),t.tick(this._tickDeltaTime),n.push(r)},Ce.prototype._updateActions=function(){var t,e,n,i,r=this._items,o=this._requests,s=this._actions;for(i=0;i<r.length;i++)t=r[i]._id,e=o[zt][t],n=o[Gt][t],e&&this._requestAction(e,zt),n&&this._requestAction(n,Gt);for(i=0;i<s.length;i++)s[i].computeScrollValues()},Ce.prototype._applyActions=function(){var t,e=this._actions,n=this._items;if(e.length){for(t=0;t<e.length;t++)e[t].scroll(),this._actionPool.release(e[t]);for(e.length=0,t=0;t<n.length;t++)de(n[t]);for(t=0;t<n.length;t++)pe(n[t])}},Ce.prototype._updateDragDirection=function(t){var e=this._dragPositions[t._id],n=this._dragDirections[t._id],i=t._drag._left,r=t._drag._top;if(e.length){var o=e[0],s=e[1];n[0]=i>o?Kt:i<o?Yt:n[0]||0,n[1]=r>s?Zt:r<s?Xt:n[1]||0}e[0]=i,e[1]=r},Ce.prototype.addItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);-1===e&&(this._items.push(t),this._requestOverlapCheck[t._id]=this._tickTime,this._dragDirections[t._id]=[0,0],this._dragPositions[t._id]=[],this._isTicking||this._startTicking())}},Ce.prototype.updateItem=function(t){this._isDestroyed||this._dragDirections[t._id]&&(this._updateDragDirection(t),this._requestOverlapCheck[t._id]||(this._requestOverlapCheck[t._id]=this._tickTime))},Ce.prototype.removeItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);if(-1!==e){var n=t._id,i=this._requests[zt][n];i&&(this._cancelItemScroll(t,zt),delete this._requests[zt][n]);var r=this._requests[Gt][n];r&&(this._cancelItemScroll(t,Gt),delete this._requests[Gt][n]),delete this._requestOverlapCheck[n],delete this._dragPositions[n],delete this._dragDirections[n],this._items.splice(e,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},Ce.prototype.isItemScrollingX=function(t){var e=this._requests[zt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrollingY=function(t){var e=this._requests[Gt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrolling=function(t){return this.isItemScrollingX(t)||this.isItemScrollingY(t)},Ce.prototype.destroy=function(){if(!this._isDestroyed){for(var t=this._items.slice(0),e=0;e<t.length;e++)this.removeItem(t[e]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var ke=window.Element.prototype,Ae=ke.matches||ke.matchesSelector||ke.webkitMatchesSelector||ke.mozMatchesSelector||ke.msMatchesSelector||ke.oMatchesSelector||function(){return!1};function $e(t,e){return Ae.call(t,e)}function Re(t,e){e&&(t.classList?t.classList.add(e):$e(t,"."+e)||(t.className+=" "+e))}var Te=[],Ee="number";function Le(t,e,n){var i=typeof n===Ee?n:-1;i<0&&(i=t.length-i+1),t.splice.apply(t,Te.concat(i,0,e)),Te.length=0}function Me(t,e,n){var i=Math.max(0,t.length-1+(n||0));return e>i?i:e<0?Math.max(i+e+1,0):e}function Oe(t,e,n){if(!(t.length<2)){var i=Me(t,e),r=Me(t,n);i!==r&&t.splice(r,0,t.splice(i,1)[0])}}function De(t,e,n){if(!(t.length<2)){var i,r=Me(t,e),o=Me(t,n);r!==o&&(i=t[r],t[r]=t[o],t[o]=i)}}var Pe=N(document.documentElement.style,"transform")||"transform",Ie=/([A-Z])/g,Fe=/^(webkit-|moz-|ms-|o-)/,We=/^(-m-s-)/;function Be(t){var e=t.replace(Ie,"-$1").toLowerCase();return e=e.replace(Fe,"-$1"),e=e.replace(We,"-ms-"),e}var He=Be(Pe),Ne="none",je="inline",Ue="none",ze="display";function Ge(t){var e=ee(t,He);if(!e||e===Ne)return!1;var n=ee(t,ze);return n!==je&&n!==Ue}function Ve(t){var e=document,n=t||e;while(n&&n!==e&&"static"===ee(n,"position")&&!Ge(n))n=n.parentElement||e;return n}var qe={},Ye={},Ke={};function Xe(t,e){var n,i=e||{};return i.left=0,i.top=0,t===document?i:(i.left=window.pageXOffset||0,i.top=window.pageYOffset||0,t.self===window.self||(n=t.getBoundingClientRect(),i.left+=n.left,i.top+=n.top,i.left+=ne(t,"border-left-width"),i.top+=ne(t,"border-top-width")),i)}function Ze(t,e,n){return Ke.left=0,Ke.top=0,t===e||n&&(t=Ve(t),e=Ve(e),t===e)||(Xe(t,qe),Xe(e,Ye),Ke.left=Ye.left-qe.left,Ke.top=Ye.top-qe.top),Ke}function Qe(t){return"auto"===t||"scroll"===t||"overlay"===t}function Je(t){return Qe(ee(t,"overflow"))||Qe(ee(t,"overflow-x"))||Qe(ee(t,"overflow-y"))}function tn(t,e){e=e||[];while(t&&t!==document)t.getRootNode&&t instanceof DocumentFragment?t=t.getRootNode().host:(Je(t)&&e.push(t),t=t.parentNode);return e.push(window),e}var en={},nn="none",rn=/^matrix3d/,on=/([^,]*,){4}/,sn=/([^,]*,){12}/,an=/[^,]*,/;function ln(t){en.x=0,en.y=0;var e=ee(t,He);if(!e||e===nn)return en;var n=rn.test(e),i=e.replace(n?sn:on,""),r=i.replace(an,"");return en.x=parseFloat(i)||0,en.y=parseFloat(r)||0,en}function cn(t,e){e&&(t.classList?t.classList.remove(e):$e(t,"."+e)&&(t.className=(" "+t.className+" ").replace(" "+e+" "," ").trim()))}var un=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,hn=0,fn=1,dn=2,pn=!!j()&&{passive:!0};function gn(t){var e=t._element,n=t.getGrid(),i=n._settings;this._item=t,this._gridId=n._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=Jt(i.dragStartPredicate)?i.dragStartPredicate:gn.defaultStartPredicate,this._startPredicateState=hn,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=i.dragHandle&&e.querySelector(i.dragHandle)||e,this._dragger=new Q(this._handle,i.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function mn(t){if("a"===t.tagName.toLowerCase()){var e=t.getAttribute("href");if(e){var n=t.getAttribute("target");n&&"_self"!==n?window.open(e,n):window.location.href=e}}}function vn(t,e){var n,i,r={};if(Array.isArray(e))for(i=0;i<e.length;i++)n=e[i],r[n]=ee(t,Be(n));else for(n in e)r[n]=ee(t,Be(n));return r}gn.autoScroller=new Ce,gn.defaultStartPredicate=function(t,e,n){var i=t._drag;if(e.isFirst&&e.srcEvent.button)return!1;if(!un&&e.isFirst&&!0===e.srcEvent.isTrusted&&!1===e.srcEvent.defaultPrevented&&!1===e.srcEvent.cancelable)return!1;if(!e.isFinal){var r=i._startPredicateData;if(!r){var o=n||i._getGrid()._settings.dragStartPredicate||{};i._startPredicateData=r={distance:Math.max(o.distance,0)||0,delay:Math.max(o.delay,0)||0}}return r.delay&&(r.event=e,r.delayTimer||(r.delayTimer=window.setTimeout((function(){r.delay=0,i._resolveStartPredicate(r.event)&&(i._forceResolveStartPredicate(r.event),i._resetStartPredicate())}),r.delay))),i._resolveStartPredicate(e)}i._finishStartPredicate(e)},gn.defaultSortPredicate=function(){var t={},e={},n={},i=[],s=1,a=100;function l(n,r,o){var s,a,l,c,u,h,f,d,p,g,m=null,v=r._settings.dragSort,y=-1;if(!0===v?(i[0]=r,a=i):Jt(v)&&(a=v.call(r,n)),!a||!Array.isArray(a)||!a.length)return m;for(g=0;g<a.length;g++)if(l=a[g],!l._isDestroyed){l._updateBoundingRect(),h=Math.max(0,l._left),f=Math.max(0,l._top),d=Math.min(window.innerWidth,l._right),p=Math.min(window.innerHeight,l._bottom),c=l._element.parentNode;while(c&&c!==document&&c!==document.documentElement&&c!==document.body)if(c.getRootNode&&c instanceof DocumentFragment)c=c.getRootNode().host;else{if("visible"!==ee(c,"overflow")&&(u=c.getBoundingClientRect(),h=Math.max(h,u.left),f=Math.max(f,u.top),d=Math.min(d,u.right),p=Math.min(p,u.bottom)),"fixed"===ee(c,"position"))break;c=c.parentNode}h>=d||f>=p||(e.left=h,e.top=f,e.width=d-h,e.height=p-f,s=_e(t,e),s>o&&s>y&&(y=s,m=l))}return i.length=0,m}return function(i,c){var u=i._drag,h=u._getGrid(),f=c&&"number"===typeof c.threshold?c.threshold:50,d=c&&c.action===r?r:o,p=c&&c.migrateAction===r?r:o;f=Math.min(Math.max(f,s),a),t.width=i._width,t.height=i._height,t.left=u._clientX,t.top=u._clientY;var g=l(i,h,f);if(!g)return null;var m,v,y,w=i.getGrid()!==g,b=0,_=0,S=0,x=-1,C=!1;for(g===h?(t.left=u._gridX+i._marginLeft,t.top=u._gridY+i._marginTop):(g._updateBorders(1,0,1,0),b=g._left+g._borderLeft,_=g._top+g._borderTop),y=0;y<g._items.length;y++)m=g._items[y],m._isActive&&m!==i&&(C=!0,e.width=m._width,e.height=m._height,e.left=m._left+m._marginLeft+b,e.top=m._top+m._marginTop+_,v=_e(t,e),v>S&&(x=y,S=v));return w&&S<f&&(x=C?x:0,S=f),S>=f?(n.grid=g,n.index=x,n.action=w?p:d,n):null}}(),gn.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var t=this._item,e=t._id;if(gn.autoScroller.removeItem(t),Tt(e),Lt(e),Ot(e),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var n=t._element,i=this._getGrid(),r=i._settings.itemDraggingClass;n.parentNode!==i._element&&(i._element.appendChild(n),t._setTranslate(this._gridX,this._gridY),r&&n.clientWidth),cn(n,r)}this._reset()}},gn.prototype.sort=function(t){var e=this._item;this._isActive&&e._isActive&&this._dragMoveEvent&&(!0===t?this._handleSort():Dt(e._id,this._handleSort))},gn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),gn.autoScroller.removeItem(this._item),this._isDestroyed=!0)},gn.prototype._getGrid=function(){return n[this._gridId]||null},gn.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},gn.prototype._bindScrollListeners=function(){var t,e,n=this._getGrid()._element,i=this._container,r=this._scrollers;if(r.length=0,tn(this._item._element.parentNode,r),i!==n)for(t=[],tn(n,t),e=0;e<t.length;e++)r.indexOf(t[e])<0&&r.push(t[e]);for(e=0;e<r.length;e++)r[e].addEventListener("scroll",this._onScroll,pn)},gn.prototype._unbindScrollListeners=function(){var t,e=this._scrollers;for(t=0;t<e.length;t++)e[t].removeEventListener("scroll",this._onScroll,pn);e.length=0},gn.prototype._resolveStartPredicate=function(t){var e=this._startPredicateData;if(!(t.distance<e.distance||e.delay))return this._resetStartPredicate(),!0},gn.prototype._forceResolveStartPredicate=function(t){this._isDestroyed||this._startPredicateState!==fn||(this._startPredicateState=dn,this._onStart(t))},gn.prototype._finishStartPredicate=function(t){var e=this._item._element,n=Math.abs(t.deltaX)<2&&Math.abs(t.deltaY)<2&&t.deltaTime<200;this._resetStartPredicate(),n&&mn(e)},gn.prototype._resetHeuristics=function(t,e){this._blockedSortIndex=null,this._sortX1=this._sortX2=t,this._sortY1=this._sortY2=e},gn.prototype._checkHeuristics=function(t,e){var n=this._getGrid()._settings.dragSortHeuristics,i=n.minDragDistance;if(i<=0)return this._blockedSortIndex=null,!0;var r=t-this._sortX2,o=e-this._sortY2,s=i>3&&n.minBounceBackAngle>0;if(s||(this._blockedSortIndex=null),Math.abs(r)>i||Math.abs(o)>i){if(s){var a=Math.atan2(r,o),l=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),c=Math.atan2(Math.sin(a-l),Math.cos(a-l));Math.abs(c)>n.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=t,this._sortY2=e,!0}return!1},gn.prototype._resetStartPredicate=function(){var t=this._startPredicateData;t&&(t.delayTimer&&(t.delayTimer=window.clearTimeout(t.delayTimer)),this._startPredicateData=null)},gn.prototype._handleSort=function(){if(this._isActive){var t=this._getGrid()._settings;if(!t.dragSort||!t.dragAutoScroll.sortDuringScroll&&gn.autoScroller.isItemScrolling(this._item))return this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,void(void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)));var e=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||e){var n=t.dragSortHeuristics.sortInterval;n<=0||this._isSortNeeded?(this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):void 0===this._sortTimer&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,n))}}},gn.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Dt(this._item._id,this._handleSort)},gn.prototype._cancelSort=function(){this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),Pt(this._item._id)},gn.prototype._finishSort=function(){var t=this._getGrid()._settings.dragSort,e=t&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},gn.prototype._checkOverlap=function(){if(this._isActive){var t,e,n,i,s,a,l,c,u=this._item,h=this._getGrid()._settings;t=Jt(h.dragSortPredicate)?h.dragSortPredicate(u,this._dragMoveEvent):gn.defaultSortPredicate(u,h.dragSortPredicate),t&&"number"===typeof t.index&&(l=t.action===r?r:o,e=u.getGrid(),i=t.grid||e,c=e!==i,n=e._items.indexOf(u),s=Me(i._items,t.index,c&&l===o?1:0),(c||s!==this._blockedSortIndex)&&(c?(this._blockedSortIndex=null,a=i._items[s],e._hasListeners(b)&&e._emit(b,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),i._hasListeners(S)&&i._emit(S,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),u._gridId=i._id,this._isMigrating=u._gridId!==this._gridId,e._items.splice(n,1),Le(i._items,u,s),u._sortData=null,e._hasListeners(w)&&e._emit(w,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),i._hasListeners(_)&&i._emit(_,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),l===r&&a&&a.isActive()&&i._items.indexOf(a)>-1&&i.send(a,e,n,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),e.layout(),i.layout()):n!==s&&(this._blockedSortIndex=n,(l===r?De:Oe)(e._items,n,s),e._hasListeners(y)&&e._emit(y,{item:u,fromIndex:n,toIndex:s,action:l}),e.layout())))}},gn.prototype._finishMigration=function(){var t,e,n=this._item,i=n._dragRelease,r=n._element,o=n._isActive,s=n.getGrid(),a=s._element,l=s._settings,c=l.dragContainer||a,u=this._getGrid()._settings,h=r.parentNode,f=o?u.itemVisibleClass:u.itemHiddenClass,d=o?l.itemVisibleClass:l.itemHiddenClass;this._isMigrating=!1,this.destroy(),u.itemClass!==l.itemClass&&(cn(r,u.itemClass),Re(r,l.itemClass)),f!==d&&(cn(r,f),Re(r,d)),c!==h&&(c.appendChild(r),e=Ze(h,c,!0),t=ln(r),t.x-=e.left,t.y-=e.top),n._refreshDimensions(),e=Ze(c,a,!0),i._containerDiffX=e.left,i._containerDiffY=e.top,n._drag=l.dragEnabled?new gn(n):null,c!==h&&n._setTranslate(t.x,t.y),n._visibility.setStyles(o?l.visibleStyles:l.hiddenStyles),i.start()},gn.prototype._preStartCheck=function(t){this._startPredicateState===hn&&(this._startPredicateState=fn),this._startPredicateState===fn?(this._startPredicateResult=this._startPredicate(this._item,t),!0===this._startPredicateResult?(this._startPredicateState=dn,this._onStart(t)):!1===this._startPredicateResult&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=hn)):this._startPredicateState===dn&&this._isActive&&this._onMove(t)},gn.prototype._preEndCheck=function(t){var e=this._startPredicateState===dn;this._startPredicate(this._item,t),this._startPredicateState=hn,e&&this._isActive&&(this._isStarted?this._onEnd(t):this.stop())},gn.prototype._onStart=function(t){var e=this._item;e._isActive&&(this._isActive=!0,this._dragStartEvent=t,gn.autoScroller.addItem(e),Rt(e._id,this._prepareStart,this._applyStart))},gn.prototype._prepareStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,n=this._getGrid(),i=n._settings,r=n._element,o=i.dragContainer||r,s=Ve(o),a=ln(e),l=e.getBoundingClientRect(),c=o!==r;if(this._container=o,this._containingBlock=s,this._clientX=l.left,this._clientY=l.top,this._left=this._gridX=a.x,this._top=this._gridY=a.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),c){var u=Ze(s,r);this._containerDiffX=u.left,this._containerDiffY=u.top}}}},gn.prototype._applyStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid(),n=t._element,i=t._dragRelease,r=t._migrate,o=this._container!==e._element;t.isPositioning()&&t._layout.stop(!0,this._left,this._top),r._isActive&&(this._left-=r._containerDiffX,this._top-=r._containerDiffY,this._gridX-=r._containerDiffX,this._gridY-=r._containerDiffY,r.stop(!0,this._left,this._top)),t.isReleasing()&&i._reset(),e._settings.dragPlaceholder.enabled&&t._dragPlaceholder.create(),this._isStarted=!0,e._emit(x,t,this._dragStartEvent),o&&(n.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(n),t._setTranslate(this._left,this._top))),Re(n,e._settings.itemDraggingClass),this._bindScrollListeners(),e._emit(C,t,this._dragStartEvent)}}},gn.prototype._onMove=function(t){var e=this._item;e._isActive?(this._dragMoveEvent=t,Et(e._id,this._prepareMove,this._applyMove),Dt(e._id,this._handleSort)):this.stop()},gn.prototype._prepareMove=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid()._settings,n=e.dragAxis,i=this._dragMoveEvent,r=this._dragPrevMoveEvent||this._dragStartEvent||i;if("y"!==n){var o=i.clientX-r.clientX;this._left=this._left-this._moveDiffX+o,this._gridX=this._gridX-this._moveDiffX+o,this._clientX=this._clientX-this._moveDiffX+o,this._moveDiffX=o}if("x"!==n){var s=i.clientY-r.clientY;this._top=this._top-this._moveDiffY+s,this._gridY=this._gridY-this._moveDiffY+s,this._clientY=this._clientY-this._moveDiffY+s,this._moveDiffY=s}this._dragPrevMoveEvent=i}}},gn.prototype._applyMove=function(){if(this._isActive){var t=this._item;t._isActive&&(this._moveDiffX=this._moveDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit(k,t,this._dragMoveEvent),gn.autoScroller.updateItem(t))}},gn.prototype._onScroll=function(t){var e=this._item;e._isActive?(this._scrollEvent=t,Mt(e._id,this._prepareScroll,this._applyScroll),Dt(e._id,this._handleSort)):this.stop()},gn.prototype._prepareScroll=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,n=this._getGrid(),i=n._element,r=e.getBoundingClientRect();if(this._container!==i){var o=Ze(this._containingBlock,i);this._containerDiffX=o.left,this._containerDiffY=o.top}var s=this._clientX-this._moveDiffX-r.left;this._left=this._left-this._scrollDiffX+s,this._scrollDiffX=s;var a=this._clientY-this._moveDiffY-r.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},gn.prototype._applyScroll=function(){if(this._isActive){var t=this._item;t._isActive&&(this._scrollDiffX=this._scrollDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit(A,t,this._scrollEvent))}},gn.prototype._onEnd=function(t){var e=this._item,n=e._element,i=this._getGrid(),r=i._settings,o=e._dragRelease;e._isActive?(Tt(e._id),Lt(e._id),Ot(e._id),this._finishSort(),this._unbindScrollListeners(),o._containerDiffX=this._containerDiffX,o._containerDiffY=this._containerDiffY,this._reset(),cn(n,r.itemDraggingClass),gn.autoScroller.removeItem(e),i._emit($,e,t),this._isMigrating?this._finishMigration():o.start()):this.stop()};var yn=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,wn={};function bn(t){var e=wn[t];return e||(e=t.replace(yn,""),e!==t&&(e=e[0].toLowerCase()+e.slice(1)),wn[t]=e,e)}var _n="[native code]";function Sn(t){var e=window.Symbol;return!!(t&&Jt(e)&&Jt(e.toString)&&e(t).toString().indexOf(_n)>-1)}function xn(t,e){for(var n in e)t.style[n]=e[n]}var Cn=!(!Element||!Jt(Element.prototype.animate)),kn=!(!Element||!Sn(Element.prototype.animate));function An(t){this._element=t,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}function $n(t,e){var n={};for(var i in t)n[e?i:bn(i)]=t[i];return n}function Rn(t,e){return"translateX("+t+"px) translateY("+e+"px)"}function Tn(t){this._item=t,this._animation=new An,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}function En(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}An.prototype.start=function(t,e,n){if(!this._isDestroyed){var i=this._element,r=n||{};if(!Cn)return xn(i,e),this._callback=Jt(r.onFinish)?r.onFinish:null,void this._onFinish();var o,s,a,l=this._animation,c=this._props,u=this._values,h=r.duration||300,f=r.easing||"ease",d=!1;if(l&&(s=0,h===this._duration&&f===this._easing||(d=!0),!d)){for(o in e)if(++s,a=c.indexOf(o),-1===a||e[o]!==u[a]){d=!0;break}s!==c.length&&(d=!0)}if(d&&l.cancel(),this._callback=Jt(r.onFinish)?r.onFinish:null,!l||d){for(o in c.length=u.length=0,e)c.push(o),u.push(e[o]);this._duration=h,this._easing=f,this._animation=i.animate([$n(t,kn),$n(e,kn)],{duration:h,easing:f}),this._animation.onfinish=this._onFinish,xn(i,e)}}},An.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},An.prototype.getCurrentStyles=function(){return vn(element,currentProps)},An.prototype.isAnimating=function(){return!!this._animation},An.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},An.prototype._onFinish=function(){var t=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,t&&t()},Tn.prototype._updateDimensions=function(){this.isActive()&&xn(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Tn.prototype._onLayoutStart=function(t,e){var n=this._item;if(-1!==t.indexOf(n)){var i=n._left,r=n._top,o=this._left,s=this._top;if(this._left=i,this._top=r,e||this._didMigrate||o!==i||s!==r){var a=i+n._marginLeft,l=r+n._marginTop,c=n.getGrid(),u=!e&&c._settings.layoutDuration>0;if(!u||this._didMigrate)return Ft(n._id),this._element.style[Pe]=Rn(a,l),this._animation.stop(),void(this._didMigrate&&(c.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=a,this._nextTransY=l,It(n._id,this._setupAnimation,this._startAnimation)}}else this.reset()},Tn.prototype._setupAnimation=function(){if(this.isActive()){var t=ln(this._element);this._transX=t.x,this._transY=t.y}},Tn.prototype._startAnimation=function(){if(this.isActive()){var t=this._animation,e=this._transX,n=this._transY,i=this._nextTransX,r=this._nextTransY;if(e!==i||n!==r){var o=this._item.getGrid()._settings,s={},a={};s[Pe]=Rn(e,n),a[Pe]=Rn(i,r),t.start(s,a,{duration:o.layoutDuration,easing:o.layoutEasing,onFinish:this._onLayoutEnd})}else t.isAnimating()&&(this._element.style[Pe]=Rn(i,r),t.stop())}},Tn.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Tn.prototype._onReleaseEnd=function(t){if(t._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Tn.prototype._onMigrate=function(t){if(t.item===this._item){var e=this._item.getGrid(),n=t.toGrid;e.off(T,this._onReleaseEnd),e.off(a,this._onLayoutStart),e.off(b,this._onMigrate),e.off(p,this._onHide),n.on(T,this._onReleaseEnd),n.on(a,this._onLayoutStart),n.on(b,this._onMigrate),n.on(p,this._onHide),this._didMigrate=!0}},Tn.prototype._onHide=function(t){t.indexOf(this._item)>-1&&this.reset()},Tn.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var t,e=this._item,n=e.getGrid(),i=n._settings,r=this._animation;this._left=e._left,this._top=e._top,t=Jt(i.dragPlaceholder.createElement)?i.dragPlaceholder.createElement(e):document.createElement("div"),this._element=t,r._element=t,this._className=i.itemPlaceholderClass||"",this._className&&Re(t,this._className),xn(t,{position:"absolute",left:"0px",top:"0px",width:e._width+"px",height:e._height+"px"}),t.style[Pe]=Rn(e._left+e._marginLeft,e._top+e._marginTop),n.on(a,this._onLayoutStart),n.on(T,this._onReleaseEnd),n.on(b,this._onMigrate),n.on(p,this._onHide),Jt(i.dragPlaceholder.onCreate)&&i.dragPlaceholder.onCreate(e,t),n.getElement().appendChild(t)}},Tn.prototype.reset=function(){if(this.isActive()){var t=this._element,e=this._item,n=e.getGrid(),i=n._settings,r=this._animation;this._resetAfterLayout=!1,Ft(e._id),Bt(e._id),r.stop(),r._element=null,n.off(T,this._onReleaseEnd),n.off(a,this._onLayoutStart),n.off(b,this._onMigrate),n.off(p,this._onHide),this._className&&(cn(t,this._className),this._className=""),t.parentNode.removeChild(t),this._element=null,Jt(i.dragPlaceholder.onRemove)&&i.dragPlaceholder.onRemove(e,t)}},Tn.prototype.isActive=function(){return!!this._element},Tn.prototype.getElement=function(){return this._element},Tn.prototype.updateDimensions=function(){this.isActive()&&Wt(this._item._id,this._updateDimensions)},Tn.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},En.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var t=this._item,e=t.getGrid(),n=e._settings;this._isActive=!0,Re(t._element,n.itemReleasingClass),n.dragRelease.useDragContainer||this._placeToGrid(),e._emit(R,t),e._nextLayoutData||t._layout.start(!1)}},En.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item,r=i.getGrid();t||void 0!==e&&void 0!==n||(e=i._left,n=i._top);var o=this._placeToGrid(e,n);this._reset(o),t||r._emit(T,i)}},En.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},En.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},En.prototype._placeToGrid=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=n.getGrid()._element,o=!1;if(i.parentNode!==r){if(void 0===t||void 0===e){var s=ln(i);t=s.x-this._containerDiffX,e=s.y-this._containerDiffY}r.appendChild(i),n._setTranslate(t,e),o=!0}return this._containerDiffX=0,this._containerDiffY=0,o}},En.prototype._reset=function(t){if(!this._isDestroyed){var e=this._item,n=e.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,n&&(t&&e._element.clientWidth,cn(e._element,n))}};var Ln=2;function Mn(t){var e=t._element,n=e.style;this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},n.left="0px",n.top="0px",t._setTranslate(0,0),this._animation=new An(e),this._queue="layout-"+t._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function On(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function Dn(t){var e=t._isActive,n=t._element,i=n.children[0],r=t.getGrid()._settings;if(!i)throw new Error("No valid child element found within item element.");this._item=t,this._isDestroyed=!1,this._isHidden=!e,this._isHiding=!1,this._isShowing=!1,this._childElement=i,this._currentStyleProps=[],this._animation=new An(i),this._queue="visibility-"+t._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),n.style.display=e?"":"none",Re(n,e?r.itemVisibleClass:r.itemHiddenClass),this.setStyles(e?r.visibleStyles:r.hiddenStyles)}Mn.prototype.start=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._dragRelease,r=n.getGrid()._settings,o=this._isActive,s=i.isJustReleased(),a=s?r.dragRelease.duration:r.layoutDuration,l=s?r.dragRelease.easing:r.layoutEasing,c=!t&&!this._skipNextAnimation&&a>0;if(o&&(kt(n._id),n._emitter.burst(this._queue,!0,n)),s&&(i._isPositioningStarted=!0),Jt(e)&&n._emitter.on(this._queue,e),this._skipNextAnimation=!1,!c)return this._updateOffsets(),n._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=l,this._animOptions.duration=a,this._isInterrupted=o,Ct(n._id,this._setupAnimation,this._startAnimation)}},Mn.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item;if(kt(i._id),this._animation.isAnimating()){if(void 0===e||void 0===n){var r=ln(i._element);e=r.x,n=r.y}i._setTranslate(e,n),this._animation.stop()}cn(i._element,i.getGrid()._settings.itemPositioningClass),this._isActive=!1,t&&i._emitter.burst(this._queue,!0,i)}},Mn.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),t[Pe]="",t.left="",t.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Mn.prototype._updateOffsets=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,n=t._dragRelease;this._offsetLeft=n._isActive?n._containerDiffX:e._isActive?e._containerDiffX:0,this._offsetTop=n._isActive?n._containerDiffY:e._isActive?e._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Mn.prototype._finish=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,n=t._dragRelease;t._tX=this._nextLeft,t._tY=this._nextTop,this._isActive&&(this._isActive=!1,cn(t._element,t.getGrid()._settings.itemPositioningClass)),n._isActive&&n.stop(),e._isActive&&e.stop(),t._emitter.burst(this._queue,!1,t)}},Mn.prototype._setupAnimation=function(){var t=this._item;if(void 0===t._tX||void 0===t._tY){var e=ln(t._element);t._tX=e.x,t._tY=e.y}},Mn.prototype._startAnimation=function(){var t=this._item,e=t.getGrid()._settings,n=this._animOptions.duration<=0;this._updateOffsets();var i=Math.abs(t._left-(t._tX-this._offsetLeft)),r=Math.abs(t._top-(t._tY-this._offsetTop));if(n||i<Ln&&r<Ln)return(i||r||this._isInterrupted)&&t._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||Re(t._element,e.itemPositioningClass),this._currentStyles[Pe]=Rn(t._tX,t._tY),this._targetStyles[Pe]=Rn(this._nextLeft,this._nextTop),t._tX=t._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},On.prototype.start=function(t,e,n){if(!this._isDestroyed){var i,r,o,s,a,l,c,u,h,f,d=this._item,p=d._element,g=d.isActive(),m=d.isVisible(),v=d.getGrid(),y=v._settings,x=t._settings,C=t._element,k=t._items,A=v._items.indexOf(d),$=n||document.body;if("number"===typeof e)i=Me(k,e,1);else{if(r=t.getItem(e),!r)return;i=k.indexOf(r)}(d.isPositioning()||this._isActive||d.isReleasing())&&(l=ln(p),c=l.x,u=l.y),d.isPositioning()&&d._layout.stop(!0,c,u),this._isActive&&(c-=this._containerDiffX,u-=this._containerDiffY,this.stop(!0,c,u)),d.isReleasing()&&(c-=d._dragRelease._containerDiffX,u-=d._dragRelease._containerDiffY,d._dragRelease.stop(!0,c,u)),d._visibility.stop(!0),d._drag&&d._drag.destroy(),v._hasListeners(b)&&v._emit(b,{item:d,fromGrid:v,fromIndex:A,toGrid:t,toIndex:i}),t._hasListeners(S)&&t._emit(S,{item:d,fromGrid:v,fromIndex:A,toGrid:t,toIndex:i}),y.itemClass!==x.itemClass&&(cn(p,y.itemClass),Re(p,x.itemClass)),h=m?y.itemVisibleClass:y.itemHiddenClass,f=m?x.itemVisibleClass:x.itemHiddenClass,h!==f&&(cn(p,h),Re(p,f)),v._items.splice(A,1),Le(k,d,i),d._gridId=t._id,g?(o=p.parentNode,$!==o&&($.appendChild(p),s=Ze($,o,!0),l||(l=ln(p),c=l.x,u=l.y),d._setTranslate(c+s.left,u+s.top))):C.appendChild(p),d._visibility.setStyles(m?x.visibleStyles:x.hiddenStyles),g&&(a=Ze($,C,!0)),d._refreshDimensions(),d._sortData=null,d._drag=x.dragEnabled?new gn(d):null,g?(this._isActive=!0,this._container=$,this._containerDiffX=a.left,this._containerDiffY=a.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),v._hasListeners(w)&&v._emit(w,{item:d,fromGrid:v,fromIndex:A,toGrid:t,toIndex:i}),t._hasListeners(_)&&t._emit(_,{item:d,fromGrid:v,fromIndex:A,toGrid:t,toIndex:i})}},On.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i,r=this._item,o=r._element,s=r.getGrid(),a=s._element;this._container!==a&&(void 0!==e&&void 0!==n||(t?(i=ln(o),e=i.x-this._containerDiffX,n=i.y-this._containerDiffY):(e=r._left,n=r._top)),a.appendChild(o),r._setTranslate(e,n)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},On.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Dn.prototype.show=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=Jt(e)?e:null,o=n.getGrid(),s=o._settings;this._isShowing||this._isHidden?!this._isShowing||t?(this._isShowing||(n._emitter.burst(this._queue,!0,n),cn(i,s.itemHiddenClass),Re(i,s.itemVisibleClass),this._isHiding||(i.style.display="")),r&&n._emitter.on(this._queue,r),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,t,this._finishShow)):r&&n._emitter.on(this._queue,r):r&&r(!1,n)}},Dn.prototype.hide=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=Jt(e)?e:null,o=n.getGrid(),s=o._settings;this._isHiding||!this._isHidden?!this._isHiding||t?(this._isHiding||(n._emitter.burst(this._queue,!0,n),Re(i,s.itemHiddenClass),cn(i,s.itemVisibleClass)),r&&n._emitter.on(this._queue,r),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,t,this._finishHide)):r&&n._emitter.on(this._queue,r):r&&r(!1,n)}},Dn.prototype.stop=function(t){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var e=this._item;$t(e._id),this._animation.stop(),t&&e._emitter.burst(this._queue,!0,e)}},Dn.prototype.setStyles=function(t){var e=this._childElement,n=this._currentStyleProps;for(var i in this._removeCurrentStyles(),t)n.push(i),e.style[i]=t[i]},Dn.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item,e=t._element,n=t.getGrid(),i=n._settings;this.stop(!0),t._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),cn(e,i.itemVisibleClass),cn(e,i.itemHiddenClass),e.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},Dn.prototype._startAnimation=function(t,e,n){if(!this._isDestroyed){var i,r=this._item,o=this._animation,s=this._childElement,a=r.getGrid()._settings,l=t?a.visibleStyles:a.hiddenStyles,c=t?a.showDuration:a.hideDuration,u=t?a.showEasing:a.hideEasing,h=e||c<=0;if(l){if($t(r._id),h)return xn(s,l),o.stop(),void(n&&n());o.isAnimating()&&(o._animation.onfinish=null),At(r._id,(function(){i=vn(s,l)}),(function(){o.start(i,l,{duration:c,easing:u,onFinish:n})}))}else n&&n()}},Dn.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},Dn.prototype._finishHide=function(){if(this._isHidden){var t=this._item;this._isHiding=!1,t._layout.stop(!0,0,0),t._element.style.display="none",t._emitter.burst(this._queue,!1,t)}},Dn.prototype._removeCurrentStyles=function(){for(var t=this._childElement,e=this._currentStyleProps,n=0;n<e.length;n++)t.style[e[n]]="";e.length=0};var Pn=0;function In(){return++Pn}function Fn(t,e,n){var r=t._settings;if(i){if(i.has(e))throw new Error("You can only create one Muuri Item per element!");i.set(e,this)}this._id=In(),this._gridId=t._id,this._element=e,this._isDestroyed=!1,this._left=0,this._top=0,this._width=0,this._height=0,this._marginLeft=0,this._marginRight=0,this._marginTop=0,this._marginBottom=0,this._tX=void 0,this._tY=void 0,this._sortData=null,this._emitter=new P,e.parentNode!==t._element&&t._element.appendChild(e),Re(e,r.itemClass),"boolean"!==typeof n&&(n="none"!==ee(e,"display")),this._isActive=n,this._visibility=new Dn(this),this._layout=new Mn(this),this._migrate=new On(this),this._drag=r.dragEnabled?new gn(this):null,this._dragRelease=new En(this),this._dragPlaceholder=new Tn(this)}function Wn(t){var e=1,n=2,i=4,r=8,o=16,s=.001,a=.5;function l(t){return((1e3*t+.5<<0)/10<<0)/100}function c(){this.currentRects=[],this.nextRects=[],this.rectTarget={},this.rectStore=[],this.slotSizes=[],this.rectId=0,this.slotIndex=-1,this.slotData={left:0,top:0,width:0,height:0},this.sortRectsLeftTop=this.sortRectsLeftTop.bind(this),this.sortRectsTopLeft=this.sortRectsTopLeft.bind(this)}if(c.prototype.computeLayout=function(t,s){var a,c,u,h,f,d,p=t.items,g=t.slots,m=!!(s&e),v=!!(s&n),y=!!(s&i),w=!!(s&r),b=!!(s&o),_="number"===typeof p[0];if(!p.length)return t;for(c=_?2:1,a=0;a<p.length;a+=c)_?(h=p[a],f=p[a+1]):(u=p[a],h=u._width+u._marginLeft+u._marginRight,f=u._height+u._marginTop+u._marginBottom),b&&(h=l(h),f=l(f)),d=this.computeNextSlot(t,h,f,m,v),v?d.left+d.width>t.width&&(t.width=d.left+d.width):d.top+d.height>t.height&&(t.height=d.top+d.height),g[++this.slotIndex]=d.left,g[++this.slotIndex]=d.top,(y||w)&&this.slotSizes.push(d.width,d.height);if(y)for(a=0;a<g.length;a+=2)g[a]=t.width-(g[a]+this.slotSizes[a]);if(w)for(a=1;a<g.length;a+=2)g[a]=t.height-(g[a]+this.slotSizes[a]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,t},c.prototype.computeNextSlot=function(t,e,n,i,r){var o,l,c,u,h,f=this.slotData,d=this.currentRects,p=this.nextRects,g=!1;for(p.length=0,f.left=null,f.top=null,f.width=e,f.height=n,u=0;u<d.length;u++)if(l=d[u],l&&(o=this.getRect(l),f.width<=o.width+s&&f.height<=o.height+s)){f.left=o.left,f.top=o.top;break}if(null===f.left&&(r?(f.left=t.width,f.top=0):(f.left=0,f.top=t.height),i||(g=!0)),!r&&f.top+f.height>t.height+s&&(f.left>a&&p.push(this.addRect(0,t.height,f.left,1/0)),f.left+f.width<t.width-a&&p.push(this.addRect(f.left+f.width,t.height,t.width-f.left-f.width,1/0)),t.height=f.top+f.height),r&&f.left+f.width>t.width+s&&(f.top>a&&p.push(this.addRect(t.width,0,1/0,f.top)),f.top+f.height<t.height-a&&p.push(this.addRect(t.width,f.top+f.height,1/0,t.height-f.top-f.height)),t.width=f.left+f.width),!g)for(i&&(u=0);u<d.length;u++)if(l=d[u],l)for(o=this.getRect(l),c=this.splitRect(o,f),h=0;h<c.length;h++)l=c[h],o=this.getRect(l),(r?o.left+s<t.width-s:o.top+s<t.height-s)&&p.push(l);return p.length>1&&this.purgeRects(p).sort(r?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=p,this.nextRects=d,f},c.prototype.addRect=function(t,e,n,i){var r=++this.rectId;return this.rectStore[r]=t||0,this.rectStore[++this.rectId]=e||0,this.rectStore[++this.rectId]=n||0,this.rectStore[++this.rectId]=i||0,r},c.prototype.getRect=function(t,e){return e||(e=this.rectTarget),e.left=this.rectStore[t]||0,e.top=this.rectStore[++t]||0,e.width=this.rectStore[++t]||0,e.height=this.rectStore[++t]||0,e},c.prototype.splitRect=function(){var t=[],e=0,n=0;return function(i,r){return t.length=0,i.left+i.width<=r.left+s||r.left+r.width<=i.left+s||i.top+i.height<=r.top+s||r.top+r.height<=i.top+s?(t.push(this.addRect(i.left,i.top,i.width,i.height)),t):(e=r.left-i.left,e>=a&&t.push(this.addRect(i.left,i.top,e,i.height)),e=i.left+i.width-(r.left+r.width),e>=a&&t.push(this.addRect(r.left+r.width,i.top,e,i.height)),n=r.top-i.top,n>=a&&t.push(this.addRect(i.left,i.top,i.width,n)),n=i.top+i.height-(r.top+r.height),n>=a&&t.push(this.addRect(i.left,r.top+r.height,i.width,n)),t)}}(),c.prototype.isRectAWithinRectB=function(t,e){return t.left+s>=e.left&&t.top+s>=e.top&&t.left+t.width-s<=e.left+e.width&&t.top+t.height-s<=e.top+e.height},c.prototype.purgeRects=function(){var t={},e={};return function(n){var i,r=n.length;while(r--)if(i=n.length,n[r]){this.getRect(n[r],t);while(i--)if(n[i]&&r!==i&&(this.getRect(n[i],e),this.isRectAWithinRectB(t,e))){n[r]=0;break}}return n}}(),c.prototype.sortRectsTopLeft=function(){var t={},e={};return function(n,i){return this.getRect(n,t),this.getRect(i,e),t.top<e.top&&t.top+s<e.top?-1:t.top>e.top&&t.top-s>e.top?1:t.left<e.left&&t.left+s<e.left?-1:t.left>e.left&&t.left-s>e.left?1:0}}(),c.prototype.sortRectsLeftTop=function(){var t={},e={};return function(n,i){return this.getRect(n,t),this.getRect(i,e),t.left<e.left&&t.left+s<e.left?-1:t.left>e.left&&t.left-s<e.left?1:t.top<e.top&&t.top+s<e.top?-1:t.top>e.top&&t.top-s>e.top?1:0}}(),t){var u=1,h=2,f=3,d=4,p=new c;self.onmessage=function(t){var e=new Float32Array(t.data),n=e.subarray(d,e.length),i=new Float32Array(n.length),r=e[f],o={items:n,slots:i,width:e[u],height:e[h]};p.computeLayout(o,r),e[u]=o.width,e[h]=o.height,e.set(o.slots,d),postMessage(e.buffer,[e.buffer])}}return c}Fn.prototype.getGrid=function(){return n[this._gridId]},Fn.prototype.getElement=function(){return this._element},Fn.prototype.getWidth=function(){return this._width},Fn.prototype.getHeight=function(){return this._height},Fn.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},Fn.prototype.getPosition=function(){return{left:this._left,top:this._top}},Fn.prototype.isActive=function(){return this._isActive},Fn.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},Fn.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},Fn.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},Fn.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},Fn.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},Fn.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},Fn.prototype.isDestroyed=function(){return this._isDestroyed},Fn.prototype._refreshDimensions=function(t){if(!this._isDestroyed&&(!0===t||!this._visibility._isHidden)){var e=this._element,n=this._dragPlaceholder,i=e.getBoundingClientRect();this._width=i.width,this._height=i.height,this._marginLeft=Math.max(0,ne(e,"margin-left")),this._marginRight=Math.max(0,ne(e,"margin-right")),this._marginTop=Math.max(0,ne(e,"margin-top")),this._marginBottom=Math.max(0,ne(e,"margin-bottom")),n&&n.updateDimensions()}},Fn.prototype._refreshSortData=function(){if(!this._isDestroyed){var t,e=this._sortData={},n=this.getGrid()._settings.sortData;for(t in n)e[t]=n[t](this,this._element)}},Fn.prototype._addToLayout=function(t,e){!0!==this._isActive&&(this._isActive=!0,this._left=t||0,this._top=e||0)},Fn.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},Fn.prototype._canSkipLayout=function(t,e){return this._left===t&&this._top===e&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},Fn.prototype._setTranslate=function(t,e){return(this._tX!==t||this._tY!==e)&&(this._tX=t,this._tY=e,this._element.style[Pe]=Rn(t,e),!0)},Fn.prototype._destroy=function(t){if(!this._isDestroyed){var e=this._element,n=this.getGrid(),r=n._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),cn(e,r.itemClass),t&&e.parentNode.removeChild(e),i&&i.delete(e),this._isActive=!1,this._isDestroyed=!0}};var Bn=Wn(),Hn=null,Nn=[];function jn(t,e){var n=[];if(t>0){Hn||(Hn=URL.createObjectURL(new Blob(["("+Wn.toString()+")(true)"],{type:"application/javascript"})));for(var i,r=0;r<t;r++)i=new Worker(Hn),e&&(i.onmessage=e),n.push(i),Nn.push(i)}return n}function Un(t){for(var e,n,i=0;i<t.length;i++)e=t[i],e.onmessage=null,e.onerror=null,e.onmessageerror=null,e.terminate(),n=Nn.indexOf(e),n>-1&&Nn.splice(n,1);Hn&&!Nn.length&&(URL.revokeObjectURL(Hn),Hn=null)}function zn(){return!!(window.Worker&&window.URL&&window.Blob)}var Gn=1,Vn=2,qn=4,Yn=8,Kn=16,Xn=0,Zn=1,Qn=2,Jn=3,ti=4;function ei(t,e){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(e),t="number"===typeof t?Math.max(0,t):0,t&&zn())try{this._workers=jn(t,this._onWorkerMessage)}catch(n){this._processor=new Bn}else this._processor=new Bn}ei.prototype._sendToWorker=function(){if(this._layoutQueue.length&&this._workers.length){var t=this._layoutQueue.shift(),e=this._workers.pop(),n=this._layoutWorkerData[t];delete this._layoutWorkerData[t],this._layoutWorkers[t]=e,e.postMessage(n.buffer,[n.buffer])}},ei.prototype._onWorkerMessage=function(t){var e=new Float32Array(t.data),n=e[Xn],i=this._layouts[n],r=this._layoutCallbacks[n],o=this._layoutWorkers[n];i&&delete this._layouts[n],r&&delete this._layoutCallbacks[n],o&&delete this._layoutWorkers[n],i&&r&&(i.width=e[Zn],i.height=e[Qn],i.slots=e.subarray(ti,e.length),this._finalizeLayout(i),r(i)),o&&(this._workers.push(o),this._sendToWorker())},ei.prototype._finalizeLayout=function(t){var e=t._grid,n=t._settings&Vn,i="border-box"===e._boxSizing;return delete t._grid,delete t._settings,t.styles={},n?t.styles.width=(i?t.width+e._borderLeft+e._borderRight:t.width)+"px":t.styles.height=(i?t.height+e._borderTop+e._borderBottom:t.height)+"px",t},ei.prototype.setOptions=function(t){var e,n,i,r,o;t&&(e="boolean"===typeof t.fillGaps?t.fillGaps?Gn:0:this._options&Gn,n="boolean"===typeof t.horizontal?t.horizontal?Vn:0:this._options&Vn,i="boolean"===typeof t.alignRight?t.alignRight?qn:0:this._options&qn,r="boolean"===typeof t.alignBottom?t.alignBottom?Yn:0:this._options&Yn,o="boolean"===typeof t.rounding?t.rounding?Kn:0:this._options&Kn,this._options=e|n|i|r|o)},ei.prototype.createLayout=function(t,e,n,i,r,o){if(this._layouts[e])throw new Error("A layout with the provided id is currently being processed.");var s=this._options&Vn,a={id:e,items:n,slots:null,width:s?0:i,height:s?r:0,_grid:t,_settings:this._options};if(!n.length)return a.slots=[],this._finalizeLayout(a),void o(a);if(this._processor)return a.slots=window.Float32Array?new Float32Array(2*n.length):new Array(2*n.length),this._processor.computeLayout(a,a._settings),this._finalizeLayout(a),void o(a);var l,c,u,h=new Float32Array(ti+2*n.length);for(h[Xn]=e,h[Zn]=a.width,h[Qn]=a.height,h[Jn]=a._settings,l=0,c=ti-1,u;l<n.length;l++)u=n[l],h[++c]=u._width+u._marginLeft+u._marginRight,h[++c]=u._height+u._marginTop+u._marginBottom;return this._layoutQueue.push(e),this._layouts[e]=a,this._layoutCallbacks[e]=o,this._layoutWorkerData[e]=h,this._sendToWorker(),this.cancelLayout.bind(this,e)},ei.prototype.cancelLayout=function(t){var e=this._layouts[t];if(e&&(delete this._layouts[t],delete this._layoutCallbacks[t],this._layoutWorkerData[t])){delete this._layoutWorkerData[t];var n=this._layoutQueue.indexOf(t);n>-1&&this._layoutQueue.splice(n,1)}},ei.prototype.destroy=function(){for(var t in this._layoutWorkers)this._workers.push(this._layoutWorkers[t]);Un(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var ni=0;function ii(t,e){var n=++ni,i=0,r=0,o=!1,s=function(e){o||(r&&(i-=e-r),r=e,i>0?jt(n,s):(i=r=0,t()))};return function(a){if(!o){if(!(e<=0))return!0===a?(o=!0,i=r=0,s=void 0,void Ut(n)):void(i<=0?(i=e,s(0)):i=e);!0!==a&&t()}}}var ri="[object HTMLCollection]",oi="[object NodeList]";function si(t){var e=Object.prototype.toString.call(t);return e===ri||e===oi}var ai="object",li="[object Object]",ci=Object.prototype.toString;function ui(t){return typeof t===ai&&ci.call(t)===li}function hi(){}function fi(t){return si(t)?Array.prototype.slice.call(t):Array.prototype.concat(t)}var di="number",pi="string",gi="instant",mi=0;function vi(t,e){typeof t===pi&&(t=document.querySelector(t));var i=t.getRootNode?t.getRootNode({composed:!0})===document:document.body.contains(t);if(!i||t===document.documentElement)throw new Error("Container element must be an existing DOM element.");var r=yi(vi.defaultOptions,e);r.visibleStyles=xi(r.visibleStyles),r.hiddenStyles=xi(r.hiddenStyles),Jt(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=In(),this._element=t,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new P,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),n[this._id]=this,Re(t,r.containerClass),_i(this,r.layoutOnResize),this.add(bi(t,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function yi(t,e){var n=wi({},t);return e&&(n=wi(n,e)),e&&e.visibleStyles?n.visibleStyles=e.visibleStyles:t&&t.visibleStyles&&(n.visibleStyles=t.visibleStyles),e&&e.hiddenStyles?n.hiddenStyles=e.hiddenStyles:t&&t.hiddenStyles&&(n.hiddenStyles=t.hiddenStyles),n}function wi(t,e){var n,i,r,o=Object.keys(e),s=o.length;for(r=0;r<s;r++)i=o[r],n=ui(e[i]),ui(t[i])&&n?t[i]=wi(wi({},t[i]),e[i]):n?t[i]=wi({},e[i]):Array.isArray(e[i])?t[i]=e[i].slice(0):t[i]=e[i];return t}function bi(t,e){if("*"===e)return t.children;if(typeof e===pi){for(var n=[],i=t.children,r=0;r<i.length;r++)$e(i[r],e)&&n.push(i[r]);return n}return Array.isArray(e)||si(e)?e:[]}function _i(t,e){typeof e!==di&&(e=!0===e?0:-1),e>=0&&(t._resizeHandler=ii((function(){t.refreshItems().layout()}),e),window.addEventListener("resize",t._resizeHandler))}function Si(t){t._resizeHandler&&(t._resizeHandler(!0),window.removeEventListener("resize",t._resizeHandler),t._resizeHandler=null)}function xi(t){var e,n,i={},r=document.documentElement.style;for(e in t)t[e]&&(n=N(r,e),n&&(i[n]=t[e]));return i}function Ci(t){for(var e={},n=0;n<t.length;n++)e[t[n]._id]=n;return e}function ki(t,e,n){var i=t[e._id],r=t[n._id];return i-r}vi.Item=Fn,vi.ItemLayout=Mn,vi.ItemVisibility=Dn,vi.ItemMigrate=On,vi.ItemDrag=gn,vi.ItemDragRelease=En,vi.ItemDragPlaceholder=Tn,vi.Emitter=P,vi.Animator=An,vi.Dragger=Q,vi.Packer=ei,vi.AutoScroller=Ce,vi.defaultPacker=new ei(2),vi.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!1},layoutOnResize:150,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragHandle:null,dragStartPredicate:{distance:0,delay:0},dragAxis:"xy",dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:o,migrateAction:o},dragRelease:{duration:300,easing:"ease",useDragContainer:!0},dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,createElement:null,onCreate:null,onRemove:null},dragAutoScroll:{targets:[],handle:null,threshold:50,safeZone:.2,speed:Ce.smoothSpeed(1e3,2e3,2500),sortDuringScroll:!0,smoothStop:!1,onStart:null,onStop:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},vi.prototype.on=function(t,e){return this._emitter.on(t,e),this},vi.prototype.off=function(t,e){return this._emitter.off(t,e),this},vi.prototype.getElement=function(){return this._element},vi.prototype.getItem=function(t){if(this._isDestroyed||!t&&0!==t)return null;if(typeof t===di)return this._items[t>-1?t:this._items.length+t]||null;if(t instanceof Fn)return t._gridId===this._id?t:null;if(i){var e=i.get(t);return e&&e._gridId===this._id?e:null}for(var n=0;n<this._items.length;n++)if(this._items[n]._element===t)return this._items[n];return null},vi.prototype.getItems=function(t){if(this._isDestroyed||void 0===t)return this._items.slice(0);var e,n,i=[];if(Array.isArray(t)||si(t))for(e=0;e<t.length;e++)n=this.getItem(t[e]),n&&i.push(n);else n=this.getItem(t),n&&i.push(n);return i},vi.prototype.refreshItems=function(t,e){if(this._isDestroyed)return this;var n,i,r,o,s=t||this._items;if(!0===e)for(o=[],n=0;n<s.length;n++)i=s[n],i.isVisible()||i.isHiding()||(r=i.getElement().style,r.visibility="hidden",r.display="",o.push(r));for(n=0;n<s.length;n++)s[n]._refreshDimensions(e);if(!0===e){for(n=0;n<o.length;n++)r=o[n],r.visibility="",r.display="none";o.length=0}return this},vi.prototype.refreshSortData=function(t){if(this._isDestroyed)return this;for(var e=t||this._items,n=0;n<e.length;n++)e[n]._refreshSortData();return this},vi.prototype.synchronize=function(){if(this._isDestroyed)return this;var t,e,n=this._items;if(!n.length)return this;for(var i=0;i<n.length;i++)e=n[i]._element,e.parentNode===this._element&&(t=t||document.createDocumentFragment(),t.appendChild(e));return t?(this._element.appendChild(t),this._emit(s),this):this},vi.prototype.layout=function(t,e){if(this._isDestroyed)return this;var n=this._nextLayoutData;n&&Jt(n.cancel)&&n.cancel(),mi=mi%D+1;var i=mi;this._nextLayoutData={id:i,instant:t,onFinish:e,cancel:null};for(var r=this._items,o=[],s=0;s<r.length;s++)r[s]._isActive&&o.push(r[s]);this._refreshDimensions();var a,l=this._width-this._borderLeft-this._borderRight,c=this._height-this._borderTop-this._borderBottom,u=this._settings.layout;return Jt(u)?a=u(this,i,o,l,c,this._onLayoutDataReceived):(vi.defaultPacker.setOptions(u),a=vi.defaultPacker.createLayout(this,i,o,l,c,this._onLayoutDataReceived)),Jt(a)&&this._nextLayoutData&&this._nextLayoutData.id===i&&(this._nextLayoutData.cancel=a),this},vi.prototype.add=function(t,e){if(this._isDestroyed||!t)return[];var n=fi(t);if(!n.length)return n;var i,r,o,s,a=e||{},l=a.layout?a.layout:void 0===a.layout,c=this._items,h=!1;for(s=0;s<n.length;s++)r=n[s],r.parentNode!==this._element&&(i=i||document.createDocumentFragment(),i.appendChild(r));for(i&&this._element.appendChild(i),s=0;s<n.length;s++)r=n[s],o=n[s]=new Fn(this,r,a.active),o._isActive&&(h=!0,o._layout._skipNextAnimation=!0);for(s=0;s<n.length;s++)o=n[s],o._refreshDimensions(),o._refreshSortData();return Le(c,n,a.index),this._hasListeners(u)&&this._emit(u,n.slice(0)),h&&l&&this.layout(l===gi,Jt(l)?l:void 0),n},vi.prototype.remove=function(t,e){if(this._isDestroyed||!t.length)return[];var n,i,r,o=e||{},s=o.layout?o.layout:void 0===o.layout,a=!1,l=this.getItems(),c=[],u=[];for(r=0;r<t.length;r++)i=t[r],i._isDestroyed||(n=this._items.indexOf(i),-1!==n&&(i._isActive&&(a=!0),c.push(i),u.push(l.indexOf(i)),i._destroy(o.removeElements),this._items.splice(n,1)));return this._hasListeners(h)&&this._emit(h,c.slice(0),u),a&&s&&this.layout(s===gi,Jt(s)?s:void 0),c},vi.prototype.show=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!0,e),this},vi.prototype.hide=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!1,e),this},vi.prototype.filter=function(t,e){if(this._isDestroyed||!this._items.length)return this;var n,i,r=[],o=[],s=typeof t===pi,a=Jt(t),l=e||{},c=!0===l.instant,u=l.syncWithLayout,h=l.layout?l.layout:void 0===l.layout,f=Jt(l.onFinish)?l.onFinish:null,d=-1,p=hi;if(f&&(p=function(){++d&&f(r.slice(0),o.slice(0))}),a||s)for(i=0;i<this._items.length;i++)n=this._items[i],(a?t(n):$e(n._element,t))?r.push(n):o.push(n);return r.length?this.show(r,{instant:c,syncWithLayout:u,onFinish:p,layout:!1}):p(),o.length?this.hide(o,{instant:c,syncWithLayout:u,onFinish:p,layout:!1}):p(),(r.length||o.length)&&(this._hasListeners(m)&&this._emit(m,r.slice(0),o.slice(0)),h&&this.layout(h===gi,Jt(h)?h:void 0)),this},vi.prototype.sort=function(){var t,e,n,i;function r(r,o){for(var s,a,l,c,u=0,h=0;h<t.length;h++)if(s=t[h][0],a=t[h][1],l=(r._sortData?r:r._refreshSortData())._sortData[s],c=(o._sortData?o:o._refreshSortData())._sortData[s],u="desc"===a||!a&&e?c<l?-1:c>l?1:0:l<c?-1:l>c?1:0,u)return u;return u||(i||(i=Ci(n)),u=e?ki(i,o,r):ki(i,r,o)),u}function o(r,o){var s=e?-t(r,o):t(r,o);return s||(i||(i=Ci(n)),s=e?ki(i,o,r):ki(i,r,o)),s}return function(s,a){if(this._isDestroyed||this._items.length<2)return this;var l=this._items,c=a||{},u=c.layout?c.layout:void 0===c.layout;if(e=!!c.descending,n=l.slice(0),i=null,Jt(s))t=s,l.sort(o);else if(typeof s===pi)t=s.trim().split(" ").filter((function(t){return t})).map((function(t){return t.split(":")})),l.sort(r);else{if(!Array.isArray(s))throw t=e=n=i=null,new Error("Invalid comparer argument provided.");l.length=0,l.push.apply(l,s)}return this._hasListeners(v)&&this._emit(v,l.slice(0),n),u&&this.layout(u===gi,Jt(u)?u:void 0),t=e=n=i=null,this}}(),vi.prototype.move=function(t,e,n){if(this._isDestroyed||this._items.length<2)return this;var i,s,a=this._items,l=n||{},c=l.layout?l.layout:void 0===l.layout,u=l.action===r,h=u?r:o,f=this.getItem(t),d=this.getItem(e);return f&&d&&f!==d&&(i=a.indexOf(f),s=a.indexOf(d),u?De(a,i,s):Oe(a,i,s),this._hasListeners(y)&&this._emit(y,{item:f,fromIndex:i,toIndex:s,action:h}),c&&this.layout(c===gi,Jt(c)?c:void 0)),this},vi.prototype.send=function(t,e,n,i){if(this._isDestroyed||e._isDestroyed||this===e)return this;if(t=this.getItem(t),!t)return this;var r=i||{},o=r.appendTo||document.body,s=r.layoutSender?r.layoutSender:void 0===r.layoutSender,a=r.layoutReceiver?r.layoutReceiver:void 0===r.layoutReceiver;return t._migrate.start(e,n,o),t._migrate._isActive&&t._isActive&&(s&&this.layout(s===gi,Jt(s)?s:void 0),a&&e.layout(a===gi,Jt(a)?a:void 0)),this},vi.prototype.destroy=function(t){if(this._isDestroyed)return this;var e,i,r=this._element,o=this._items.slice(0),s=this._layout&&this._layout.styles||{};for(Si(this),e=0;e<o.length;e++)o[e]._destroy(t);for(i in this._items.length=0,cn(r,this._settings.containerClass),s)r.style[i]="";return this._emit(E),this._emitter.destroy(),delete n[this._id],this._isDestroyed=!0,this},vi.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},vi.prototype._hasListeners=function(t){return!this._isDestroyed&&this._emitter.countListeners(t)>0},vi.prototype._updateBoundingRect=function(){var t=this._element,e=t.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top,this._right=e.right,this._bottom=e.bottom},vi.prototype._updateBorders=function(t,e,n,i){var r=this._element;t&&(this._borderLeft=ne(r,"border-left-width")),e&&(this._borderRight=ne(r,"border-right-width")),n&&(this._borderTop=ne(r,"border-top-width")),i&&(this._borderBottom=ne(r,"border-bottom-width"))},vi.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=ee(this._element,"box-sizing")},vi.prototype._onLayoutDataReceived=function(){var t=[];return function(e){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===e.id){var n,i,r,o,s=this,u=this._nextLayoutData.instant,h=this._nextLayoutData.onFinish,f=e.items.length,d=f;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(c)&&this._emit(c,this._layout.items.slice(0)),this._layout=e,t.length=0,o=0;o<f;o++)n=e.items[o],n?(i=e.slots[2*o],r=e.slots[2*o+1],n._canSkipLayout(i,r)?--d:(n._left=i,n._top=r,n.isActive()&&!n.isDragging()?t.push(n):--d)):--d;if(e.styles&&xn(this._element,e.styles),!this._hasListeners(a)||(this._emit(a,e.items.slice(0),!0===u),this._layout.id===e.id)){var p=function(){if(!(--d>0)){var t=s._layout.id!==e.id,n=Jt(u)?u:h;t||(s._isLayoutFinished=!0),Jt(n)&&n(e.items.slice(0),t),!t&&s._hasListeners(l)&&s._emit(l,e.items.slice(0))}};if(!t.length)return p(),this;for(this._isLayoutFinished=!1,o=0;o<t.length;o++){if(this._layout.id!==e.id)break;t[o]._layout.start(!0===u,p)}return this._layout.id===e.id&&(t.length=0),this}}}}(),vi.prototype._setItemsVisibility=function(t,e,n){var i,r,o=this,s=t.slice(0),l=n||{},c=!0===l.instant,u=l.onFinish,h=l.layout?l.layout:void 0===l.layout,m=s.length,v=e?f:p,y=e?d:g,w=e?"show":"hide",b=!1,_=[],S=[];if(m){for(r=0;r<s.length;r++)i=s[r],(e&&!i._isActive||!e&&i._isActive)&&(b=!0),i._layout._skipNextAnimation=!(!e||i._isActive),e&&i._visibility._isHidden&&S.push(i),e?i._addToLayout():i._removeFromLayout();S.length&&(this.refreshItems(S,!0),S.length=0),b&&!1!==l.syncWithLayout?this.on(a,x):x(),b&&h&&this.layout(h===gi,Jt(h)?h:void 0)}else Jt(u)&&u(s);function x(){for(b&&!1!==l.syncWithLayout&&o.off(a,x),o._hasListeners(v)&&o._emit(v,s.slice(0)),r=0;r<s.length;r++)s[r]._gridId===o._id?s[r]._visibility[w](c,(function(t,e){t||_.push(e),--m<1&&(Jt(u)&&u(_.slice(0)),o._hasListeners(y)&&o._emit(y,_.slice(0)))})):--m<1&&(Jt(u)&&u(_.slice(0)),o._hasListeners(y)&&o._emit(y,_.slice(0)))}},e["Z"]=vi},80131:function(t,e,n){var i;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var n,i,s,a,l,c,u,h,f,d=1,p=t.length,g="";for(i=0;i<p;i++)if("string"===typeof t[i])g+=t[i];else if("object"===typeof t[i]){if(a=t[i],a.keys)for(n=e[d],s=0;s<a.keys.length;s++){if(void 0==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));n=n[a.keys[s]]}else n=a.param_no?e[a.param_no]:e[d++];if(r.not_type.test(a.type)&&r.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),r.numeric_arg.test(a.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(r.number.test(a.type)&&(h=n>=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase();break}r.json.test(a.type)?g+=n:(!r.number.test(a.type)||h&&!a.sign?f="":(f=h?"+":"-",n=n.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(f+n).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?f+n+l:"0"===c?f+l+n:l+f+n)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];var e,n=t,i=[],o=0;while(n){if(null!==(e=r.text.exec(n)))i.push(e[0]);else if(null!==(e=r.modulo.exec(n)))i.push("%");else{if(null===(e=r.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1]);while(""!==(a=a.substring(c[0].length)))if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return l[t]=i}o,s,"undefined"!==typeof window&&(window["sprintf"]=o,window["vsprintf"]=s,i=function(){return{sprintf:o,vsprintf:s}}.call(e,n,e,t),void 0===i||(t.exports=i))}()},8514:function(t,e,n){var i=n(796);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(3514).Z;r("400a75d9",i,!0,{sourceMap:!1,shadowMode:!1})},49502:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(58188);function i(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void n(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function a(t){i(s,r,o,a,l,"next",t)}function l(t){i(s,r,o,a,l,"throw",t)}a(void 0)}))}}},78081:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(34115),n(634),n(58188),n(20796),n(28673),n(6886),n(71372);var i=n(93511);function r(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=(0,i.Z)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,s=t},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(l)throw s}}}}},15789:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(95094),n(34115),n(634),n(58188),n(20796),n(28673),n(6886),n(96882),n(38859),n(17525),n(18275),n(96928),n(71372),n(36728),n(1939),n(52506),n(32501);var i=n(26259);function r(){
|
69
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
70
|
+
r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(E){u=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var r=e&&e.prototype instanceof p?e:p,s=Object.create(r.prototype),a=new $(i||[]);return o(s,"_invoke",{value:x(t,n,a)}),s}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(E){return{type:"throw",arg:E}}}t.wrap=h;var d={};function p(){}function g(){}function m(){}var v={};u(v,a,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(R([])));w&&w!==e&&n.call(w,a)&&(v=w);var b=m.prototype=p.prototype=Object.create(v);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,s,a,l){var c=f(t[o],t,s);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==(0,i.Z)(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,l)}),(function(t){r("throw",t,a,l)})):e.resolve(h).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,l)}))}l(c.arg)}var s;o(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function x(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return T()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=C(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=f(t,e,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function C(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,C(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var r=f(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function R(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return g.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(S.prototype),u(S.prototype,l,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var s=new S(h(e,n,i,r),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(b),u(b,c,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},t.values=R,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return s.type="throw",s.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;A(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:R(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}},50615:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(43692);function r(t){if(Array.isArray(t))return(0,i.Z)(t)}n(34115),n(634),n(58188),n(20796),n(28673),n(6886),n(27233);function o(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}var s=n(93511);n(71372);function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){return r(t)||o(t)||(0,s.Z)(t)||a()}}}]);
|
71
|
+
//# sourceMappingURL=734.js.map
|