openc3-tool-tlmviewer 5.0.6 → 5.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,71 @@
1
+ (self["webpackChunk_openc3_tool_tlmviewer"]=self["webpackChunk_openc3_tool_tlmviewer"]||[]).push([[322],{23492:function(t,e){(function(t,n){n(e)})(0,(function(t){"use strict";var e={logger:self.console,WebSocket:self.WebSocket},n={log:function(){if(this.enabled){for(var t,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];i.push(Date.now()),(t=e.logger).log.apply(t,["[ActionCable]"].concat(i))}}},i="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=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=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)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=function(){return(new Date).getTime()},a=function(t){return(s()-t)/1e3},l=function(t,e,n){return Math.max(e,Math.min(n,t))},c=function(){function t(e){r(this,t),this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}return t.prototype.start=function(){this.isRunning()||(this.startedAt=s(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),n.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms"))},t.prototype.stop=function(){this.isRunning()&&(this.stoppedAt=s(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),n.log("ConnectionMonitor stopped"))},t.prototype.isRunning=function(){return this.startedAt&&!this.stoppedAt},t.prototype.recordPing=function(){this.pingedAt=s()},t.prototype.recordConnect=function(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,n.log("ConnectionMonitor recorded connect")},t.prototype.recordDisconnect=function(){this.disconnectedAt=s(),n.log("ConnectionMonitor recorded disconnect")},t.prototype.startPolling=function(){this.stopPolling(),this.poll()},t.prototype.stopPolling=function(){clearTimeout(this.pollTimeout)},t.prototype.poll=function(){var t=this;this.pollTimeout=setTimeout((function(){t.reconnectIfStale(),t.poll()}),this.getPollInterval())},t.prototype.getPollInterval=function(){var t=this.constructor.pollInterval,e=t.min,n=t.max,i=t.multiplier,r=i*Math.log(this.reconnectAttempts+1);return Math.round(1e3*l(r,e,n))},t.prototype.reconnectIfStale=function(){this.connectionIsStale()&&(n.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+a(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?n.log("ConnectionMonitor skipping reopening recent disconnect"):(n.log("ConnectionMonitor reopening"),this.connection.reopen()))},t.prototype.connectionIsStale=function(){return a(this.pingedAt?this.pingedAt:this.startedAt)>this.constructor.staleThreshold},t.prototype.disconnectedRecently=function(){return this.disconnectedAt&&a(this.disconnectedAt)<this.constructor.staleThreshold},t.prototype.visibilityDidChange=function(){var t=this;"visible"===document.visibilityState&&setTimeout((function(){!t.connectionIsStale()&&t.connection.isOpen()||(n.log("ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = "+document.visibilityState),t.connection.reopen())}),200)},t}();c.pollInterval={min:3,max:30,multiplier:5},c.staleThreshold=6;var h={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"]},u=h.message_types,d=h.protocols,f=d.slice(0,d.length-1),g=[].indexOf,p=function(){function t(e){r(this,t),this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new c(this),this.disconnected=!0}return t.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},t.prototype.open=function(){return this.isActive()?(n.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(n.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+d),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new e.WebSocket(this.consumer.url,d),this.installEventHandlers(),this.monitor.start(),!0)},t.prototype.close=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowReconnect:!0},e=t.allowReconnect;if(e||this.monitor.stop(),this.isActive())return this.webSocket.close()},t.prototype.reopen=function(){if(n.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(t){n.log("Failed to reopen WebSocket",t)}finally{n.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},t.prototype.getProtocol=function(){if(this.webSocket)return this.webSocket.protocol},t.prototype.isOpen=function(){return this.isState("open")},t.prototype.isActive=function(){return this.isState("open","connecting")},t.prototype.isProtocolSupported=function(){return g.call(f,this.getProtocol())>=0},t.prototype.isState=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return g.call(e,this.getState())>=0},t.prototype.getState=function(){if(this.webSocket)for(var t in e.WebSocket)if(e.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase();return null},t.prototype.installEventHandlers=function(){for(var t in this.events){var e=this.events[t].bind(this);this.webSocket["on"+t]=e}},t.prototype.uninstallEventHandlers=function(){for(var t in this.events)this.webSocket["on"+t]=function(){}},t}();p.reopenDelay=500,p.prototype.events={message:function(t){if(this.isProtocolSupported()){var e=JSON.parse(t.data),i=e.identifier,r=e.message,o=e.reason,s=e.reconnect,a=e.type;switch(a){case u.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case u.disconnect:return n.log("Disconnecting. Reason: "+o),this.close({allowReconnect:s});case u.ping:return this.monitor.recordPing();case u.confirmation:return this.subscriptions.confirmSubscription(i),this.subscriptions.notify(i,"connected");case u.rejection:return this.subscriptions.reject(i);default:return this.subscriptions.notify(i,"received",r)}}},open:function(){if(n.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return n.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(t){if(n.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){n.log("WebSocket onerror event")}};var m=function(t,e){if(null!=e)for(var n in e){var i=e[n];t[n]=i}return t},v=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2];r(this,t),this.consumer=e,this.identifier=JSON.stringify(n),m(this,i)}return t.prototype.perform=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.action=t,this.send(e)},t.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},t.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},t}(),w=function(){function t(e){r(this,t),this.subscriptions=e,this.pendingSubscriptions=[]}return t.prototype.guarantee=function(t){-1==this.pendingSubscriptions.indexOf(t)?(n.log("SubscriptionGuarantor guaranteeing "+t.identifier),this.pendingSubscriptions.push(t)):n.log("SubscriptionGuarantor already guaranteeing "+t.identifier),this.startGuaranteeing()},t.prototype.forget=function(t){n.log("SubscriptionGuarantor forgetting "+t.identifier),this.pendingSubscriptions=this.pendingSubscriptions.filter((function(e){return e!==t}))},t.prototype.startGuaranteeing=function(){this.stopGuaranteeing(),this.retrySubscribing()},t.prototype.stopGuaranteeing=function(){clearTimeout(this.retryTimeout)},t.prototype.retrySubscribing=function(){var t=this;this.retryTimeout=setTimeout((function(){t.subscriptions&&"function"===typeof t.subscriptions.subscribe&&t.pendingSubscriptions.map((function(e){n.log("SubscriptionGuarantor resubscribing "+e.identifier),t.subscriptions.subscribe(e)}))}),500)},t}(),y=function(){function t(e){r(this,t),this.consumer=e,this.guarantor=new w(this),this.subscriptions=[]}return t.prototype.create=function(t,e){var n=t,r="object"===("undefined"===typeof n?"undefined":i(n))?n:{channel:n},o=new v(this.consumer,r,e);return this.add(o)},t.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t},t.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},t.prototype.reject=function(t){var e=this;return this.findAll(t).map((function(t){return e.forget(t),e.notify(t,"rejected"),t}))},t.prototype.forget=function(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((function(e){return e!==t})),t},t.prototype.findAll=function(t){return this.subscriptions.filter((function(e){return e.identifier===t}))},t.prototype.reload=function(){var t=this;return this.subscriptions.map((function(e){return t.subscribe(e)}))},t.prototype.notifyAll=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return this.subscriptions.map((function(n){return e.notify.apply(e,[n,t].concat(i))}))},t.prototype.notify=function(t,e){for(var n=arguments.length,i=Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var o=void 0;return o="string"===typeof t?this.findAll(t):[t],o.map((function(t){return"function"===typeof t[e]?t[e].apply(t,i):void 0}))},t.prototype.subscribe=function(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)},t.prototype.confirmSubscription=function(t){var e=this;n.log("Subscription confirmed "+t),this.findAll(t).map((function(t){return e.guarantor.forget(t)}))},t.prototype.sendCommand=function(t,e){var n=t.identifier;return this.consumer.send({command:e,identifier:n})},t}(),_=function(){function t(e){r(this,t),this._url=e,this.subscriptions=new y(this),this.connection=new p(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},o(t,[{key:"url",get:function(){return b(this._url)}}]),t}();function b(t){if("function"===typeof t&&(t=t()),t&&!/^wss?:/i.test(t)){var e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}return t}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S("url")||h.default_mount_path;return new _(t)}function S(t){var e=document.head.querySelector("meta[name='action-cable-"+t+"']");if(e)return e.getAttribute("content")}t.Connection=p,t.ConnectionMonitor=c,t.Consumer=_,t.INTERNAL=h,t.Subscription=v,t.Subscriptions=y,t.SubscriptionGuarantor=w,t.adapters=e,t.createWebSocketURL=b,t.logger=n,t.createConsumer=x,t.getConfig=S,Object.defineProperty(t,"__esModule",{value:!0})}))},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,h=t("./keyboard/hash_handler").HashHandler,u=t("./tokenizer").Tokenizer,d=t("./clipboard"),f={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 d.getText&&d.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"})};f.SELECTED_TEXT=f.SELECTION;var g=function(){this.snippetMap={},this.snippetNameMap={}};(function(){o.implement(this,s),this.getTokenizer=function(){return g.$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 g.$tokenizer=new u({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"}]}),g.$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=f,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={},h=0;h<a.length;h++){var u=a[h];if("object"==typeof u){var d=u.tabstopId,f=l[d],g=a.indexOf(u,h+1);if(c[d])c[d]===u&&(delete c[d],Object.keys(c).forEach((function(t){f.parents[t]=!0})));else{c[d]=u;var m=f.value;"string"!=typeof m?m=n(m):u.fmt&&(m=this.tmStrFormat(m,u,t)),a.splice.apply(a,[h+1,Math.max(0,g-h)].concat(m,u)),-1===f.indexOf(u)&&f.push(u)}}}var v=0,w=0,y="";a.forEach((function(t){if("string"==typeof t){var e=t.split("\n");e.length>1?(w=e[e.length-1].length,v+=e.length-1):w+=t.length,y+=t}else t&&(t.start?t.end={row:v,column:w}:t.start={row:v,column:w})}));var _=t.getSelectionRange(),b=t.session.replace(_,y),x=new p(t),S=t.inVirtualSelectionMode&&t.selection.index;x.addTabstops(l,_.start,b,S)},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(g.prototype);var p=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 h=s.rangeList.pointIndex(t.end,l);h=h<0?-h-1:h-1;for(var u=s.rangeList.ranges.slice(c,h),d=0;d<u.length;d++)this.removeRange(u[d])}s.rangeList.$onChange(t)}var f=this.editor.session;!this.$inChange&&e&&1==f.getLength()&&!f.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 h=t[o],u=l.fromPoints(h.start,h.end||h.start);m(u.start,e),m(u.end,e),u.original=h,u.tabstop=r,a.push(u),r!=t?r.unshift(u):r[o]=u,h.fmtString||r.firstNonLinked&&i?(u.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=u)}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 h,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(p.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 g;var w=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(w.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},h=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),u.start.row=u.end.row=e.row,t.stop()}));var r,h=new o(-1,0,-1,1/0),u=new o(-1,0,-1,1/0);u.id=n.session.addMarker(u,"ace_active-line","fullLine"),n.setSelectOnHover=function(t){t?h.id&&(n.session.removeMarker(h.id),h.id=null):h.id=n.session.addMarker(h,"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;h.start.row!=e&&(h.id||n.setRow(e),f(e))}}else r=t})),n.renderer.on("beforeRender",(function(){if(r&&-1!=h.start.row){r.$pos=null;var t=r.getDocumentPosition().row;h.id||n.setRow(t),f(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 d=function(){f(-1)},f=function(t,e){t!==h.start.row&&(h.start.row=h.end.row=t,e||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return h.start.row},s.addListener(n.container,"mouseout",d),n.on("hide",d),n.on("changeSelection",d),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 g=n.session.bgTokenizer;return g.$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,h=0;h<=a.length;h++)if(h!=c&&(i.matchMask&1<<h||h==a.length)){var u=a.slice(c,h);c=h;var d=s.indexOf(u,l);if(-1==d)continue;e(o.slice(l,d),""),l=d+u.length,e(o.slice(d,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},g.$updateOnChange=i,g.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 u.start.row},n.setRow=function(t){t=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,t)),u.start.row!=t&&(n.selection.clearSelection(),u.start.row=u.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,h=t.top+this.$borderSize,u=h>s/2&&!i;u&&h+e+c>s?(l.$maxPixelHeight=h-2*this.$borderSize,o.style.top="",o.style.bottom=s-h+"px",n.isTopdown=!1):(h+=e,l.$maxPixelHeight=s-h-.2*e,o.style.top=h+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var d=t.left;d+o.offsetWidth>a&&(d=a-o.offsetWidth),o.style.left=d+"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=h,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"),h=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 u(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 u(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(h.prototype),h.for=function(t){return t.completer||(c.get("sharedPopups")?(h.$shared||(h.$sharedInstance=new h),t.completer=h.$sharedInstance):(t.completer=new h,t.once("destroy",(function(t,e){e.completer.destroy()})))),t.completer},h.startCommand={name:"startAutocomplete",exec:function(t,e){var n=h.for(t);n.autoInsert=!1,n.autoSelect=!0,n.showPopup(t,e),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var u=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,h=-1,u=0,d=0;if(this.exactMatch){if(e!==a.substr(0,e.length))continue t}else{var f=a.toLowerCase().indexOf(r);if(f>-1)d=f;else for(var g=0;g<e.length;g++){var p=a.indexOf(r[g],h+1),m=a.indexOf(i[g],h+1);if(l=p>=0&&(m<0||p<m)?p:m,l<0)continue t;c=l-h-1,c>0&&(-1===h&&(d+=10),d+=c,u|=1<<g),h=l}}o.matchMask=u,o.exactMatch=d?0:1,o.$score=(o.score||0)-d,n.push(o)}}return n}}).call(u.prototype),e.Autocomplete=h,e.FilteredList=u})),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)}},h=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]}))},u={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(h(t.snippet))].join(""))}},d=[u,l,c];e.setCompleters=function(t){d.length=0,t&&d.push.apply(d,t)},e.addCompleter=function(t){d.push(t)},e.textCompleter=l,e.keyWordCompleter=c,e.snippetCompleter=u;var f={name:"expandSnippet",exec:function(t){return i.expandWithTab(t)},bindKey:"Tab"},g=function(t,e){p(e.session.$mode)},p=function(t){"string"==typeof t&&(t=o.$modes[t]),t&&(i.files||(i.files={}),m(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(p))},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){p("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)}}},w=t("../editor").Editor;t("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:d),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:d),this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(t){t?(this.commands.addCommand(f),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(f),this.off("changeMode",g))},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 h=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(h.prototype),e.SearchBox=h,e.Search=function(t,e){var n=t.searchBox||new h(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,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},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],h=1;c&&"object"==typeof c&&!Array.isArray(c)&&(h=2);for(s=h;s<e.length;s++)t(e[s],l,i);return 2==h&&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.documentElement;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(h){}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.10.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,h=c&&c.ownerDocument||document,u=h.getElementsByTagName("script"),d=0;d<u.length;d++){var f=u[d],g=f.src||f.getAttribute("src");if(g){for(var p=f.attributes,m=0,v=p.length;m<v;m++){var w=p[m];0===w.name.indexOf("data-ace-")&&(s[a(w.name.replace(/^data-ace-/,""))]=w.value)}var y=g.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);y&&(l=y[1])}}for(var _ 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[_]&&r.set(_,s[_])}}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.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"],n[173]="-",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 h(t,e,n){this.elem=t,this.type=e,this.callback=n}h.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=e.addListener=function(t,e,n,i){t.addEventListener(e,n,c()),i&&i.$toDestroy.push(new h(t,e,n))},d=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),d(i,"mousemove",e),d(i,"mouseup",r),d(i,"dragstart",r)}return u(i,"mousemove",e),u(i,"mouseup",r),u(i,"dragstart",r),r},e.addMouseWheelListener=function(t,e,n){u(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,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(t){if(0!==e.getButton(t)?h=0:t.detail>1?(h++,h>4&&(h=1)):h=1,o.isIE){var s=Math.abs(t.clientX-a)>5||Math.abs(t.clientY-l)>5;c&&!s||(h=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[h-1]||600),1==h&&(a=t.clientX,l=t.clientY)}if(t._clicks=h,i[r]("mousedown",t),h>4)h=0;else if(h>1)return i[r](d[h],t)}Array.isArray(t)||(t=[t]),t.forEach((function(t){u(t,"mousedown",f,s)}))};var f=function(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function g(t,e,n){var i=f(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 p(){s=Object.create(null)}if(e.getModifierString=function(t){return r.KEY_MODS[f(t)]},e.addCommandKeyListener=function(t,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;u(t,"keydown",(function(t){r=t.keyCode}),i),u(t,"keypress",(function(t){return g(n,t,r)}),i)}else{var a=null;u(t,"keydown",(function(t){s[t.keyCode]=(s[t.keyCode]||0)+1;var e=g(n,t,t.keyCode);return a=t.defaultPrevented,e}),i),u(t,"keypress",(function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),a=null)}),i),u(t,"keyup",(function(t){s[t.keyCode]=null}),i),s||(p(),u(window,"focus",p))}},"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),d(n,"message",r),t())};u(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,h=r.isChrome>63,u=400,d=t("../lib/keys"),f=d.KEY_MODS,g=r.isIOS,p=g?/\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,w=!1,y=!1,_=!1,b="";m||(n.style.fontSize="1px");var x=!1,S=!1,C="",A=0,k=0,$=0;try{var R=document.activeElement===n}catch(Z){}i.addListener(n,"blur",(function(t){S||(e.onBlur(t),R=!1)}),e),i.addListener(n,"focus",(function(t){if(!S){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(b||h||"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);y&&r&&(C=n.value="",z()),T()}}));var T=g?function(t){if(R&&(!v||t)&&!_){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));A==r&&k==o||n.setSelectionRange(r,o),A=r,k=o}}:function(){if(!y&&!_&&(R||O)){y=!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>u&&(t<u&&i<u?r=r.slice(0,u):(r="\n",t==i?t=i=0:(t=0,i=1)))}var h=r+"\n\n";if(h!=C&&(n.value=C=h,A=k=h.length),O&&(A=n.selectionStart,k=n.selectionEnd),k!=i||A!=t||n.selectionEnd!=k)try{n.setSelectionRange(t,i),A=t,k=i}catch(Z){}y=!1}};this.resetSelection=T,R&&e.onFocus();var L=function(t){return 0===t.selectionStart&&t.selectionEnd>=C.length&&t.value===C&&C&&t.selectionEnd!==k},E=function(t){y||(v?v=!1:L(n)?(e.selectAll(),T()):m&&n.selectionStart!=A&&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),w)return T(),t&&e.onPaste(t),w=!1,"";var o=n.selectionStart,s=n.selectionEnd,a=A,l=C.length-k,c=t,h=t.length-o,u=t.length-s,d=0;while(a>0&&C[d]==t[d])d++,a--;c=c.slice(d),d=1;while(l>0&&C.length-d>A-1&&C[C.length-d]==t[t.length-d])d++,l--;h-=d-1,u-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!i&&!c&&!h&&!a&&!l&&!u)return"";_=!0;var g=!1;return r.isAndroid&&". "==c&&(c=" ",g=!0),c&&!a&&!l&&!h&&!u||x?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:h,restoreEnd:u}),_=!1,C=t,A=o,k=s,$=u,g?"\n":c},I=function(t){if(y)return U();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>u+100||p.test(r)||m&&A<1&&A==k)&&T()},P=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 P(t,e,!0)}}},F=function(t,r){var o=e.getCopyText();if(!o)return i.preventDefault(t);P(t,o)?(g&&(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)},N=function(t){var o=P(t);a.pasteCancelled()||("string"==typeof o?(o&&e.onPaste(o,t),r.isIE&&setTimeout(T),i.preventDefault(t)):(n.value="",w=!0))};i.addCommandKeyListener(n,e.onCommandKey.bind(e),e),i.addListener(n,"select",E,e),i.addListener(n,"input",I,e),i.addListener(n,"cut",W,e),i.addListener(n,"copy",B,e),i.addListener(n,"paste",N,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:N(t);break;case 88:W(t);break}}),e);var H=function(t){if(!y&&e.onCompositionStart&&!e.$readOnly&&(y={},!x)){t.data&&(y.useTextareaForIME=!1),setTimeout(U,0),e._signal("compositionStart"),e.on("mousedown",G);var i=e.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,y.markerRange=i,y.selectionStart=A,e.onCompositionStart(y),y.useTextareaForIME?(C=n.value="",A=0,k=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}},U=function(){if(y&&e.onCompositionUpdate&&!e.$readOnly){if(x)return G();if(y.useTextareaForIME)e.onCompositionUpdate(n.value);else{var t=n.value;D(t),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+k-y.selectionStart+$)}}},z=function(t){e.onCompositionEnd&&!e.$readOnly&&(y=!1,e.onCompositionEnd(),e.off("mousedown",G),t&&I())};function G(){S=!0,n.blur(),n.focus(),S=!1}var j,V=s.delayedCall(U,50).schedule.bind(null,null);function q(t){27==t.keyCode&&n.value.length<n.selectionStart&&(y||(C=n.value),A=k=-1,T()),V()}function Y(){clearTimeout(j),j=setTimeout((function(){b&&(n.style.cssText=b,b=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",H,e),i.addListener(n,"compositionupdate",U,e),i.addListener(n,"keyup",q,e),i.addListener(n,"keydown",V,e),i.addListener(n,"compositionend",z,e),this.getElement=function(){return n},this.setCommandMode=function(t){x=t,n.readOnly=!1},this.setReadOnly=function(t){x||(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){b||(b=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+(r.isIE?"opacity:0.1;":"")+"text-indent: -"+(A+k)*e.renderer.characterWidth*.5+"px;";var a=e.container.getBoundingClientRect(),l=o.computedStyle(e.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-n.clientHeight-2,d=function(t){o.translate(n,t.clientX-h-2,Math.min(t.clientY-c-2,u))};d(t),"mousedown"==t.type&&(e.renderer.$isMousePressed=!0,clearTimeout(j),r.isWin&&i.capture(e.container,d,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||y||e.$mouseHandler.isMousePressed)&&!v){var i=n.selectionStart,o=n.selectionEnd,s=null,a=0;if(0==i?s=d.up:1==i?s=d.home:o>k&&"\n"==C[o]?s=d.end:i<A&&" "==C[i-1]?(s=d.left,a=f.option):i<A||i==A&&k!=A&&i==o?s=d.left:o>k&&C.slice(0,o).split("\n").length>2?s=d.down:o>k&&" "==C[o-1]?(s=d.right,a=f.option):(o>k||o==k&&k!=A&&i==o)&&(s=d.right),i!==o&&(a|=f.shift),s){var l=e.onCommandKey({},a,s);if(!l&&e.commands){s=d.keyCodeToString(s);var c=e.commands.findKeyCommand(a,s);c&&e.execCommand(c)}A=i,k=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),g&&X(t,e,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}};e.TextInput=v,e.$setUserAgentForTests=function(t,e){m=t,g=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 h=Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy);h?(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 h(){var e=n.getDocumentPosition().row,i=a.$annotations[e];if(!i)return u();var o=s.session.getLength();if(e==o){var l=s.renderer.pixelToScreenCoordinates(0,n.y).row,h=n.$pos;if(l>s.session.documentToScreenRow(h.row,h.column))return u()}if(r!=i){r=i.text.join("<br/>"),c.setHtml(r);var f=i.className;if(f&&c.setClassName(f.trim()),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),t.$tooltipFollowsMouse)d(n);else{var g=n.domEvent.target,p=g.getBoundingClientRect(),m=c.getElement().style;m.left=p.right+"px",m.top=p.bottom+"px"}}}function u(){e&&(e=clearTimeout(e)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",u))}function d(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 u();r&&t.$tooltipFollowsMouse&&d(o),n=o,e||(e=setTimeout((function(){e=null,n&&!t.isMousePressed?h():u()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(t){n=null,r&&!e&&(e=setTimeout((function(){e=null,u()}),50))}),s),s.on("changeSession",u)}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 u,d,f,g,p,m,v,w,y,_,b,x=e.container,S=0;function C(t,n){var i=Date.now(),r=!n||t.row!=n.row,o=!n||t.column!=n.column;if(!_||r||o)e.moveCursorToPosition(t),_=i,b={x:d,y:f};else{var s=h(b.x,b.y,d,f);s>l?_=null:i-_>=a&&(e.renderer.scrollCursorIntoView(),_=null)}}function A(t,n){var i=Date.now(),r=e.renderer.layerConfig.lineHeight,o=e.renderer.layerConfig.characterWidth,a=e.renderer.scroller.getBoundingClientRect(),l={x:{left:d-a.left,right:a.right-d},y:{top:f-a.top,bottom:a.bottom-f}},c=Math.min(l.x.left,l.x.right),h=Math.min(l.y.top,l.y.bottom),u={row:t.row,column:t.column};c/o<=2&&(u.column+=l.x.left<l.x.right?-3:2),h/r<=1&&(u.row+=l.y.top<l.y.bottom?-1:1);var g=t.row!=u.row,p=t.column!=u.column,m=!n||t.row!=n.row;g||p&&!m?y?i-y>=s&&e.renderer.scrollCursorIntoView(u):y=i:y=null}function k(){var t=m;m=e.renderer.screenToTextCoordinates(d,f),C(m,t),A(m,t)}function $(){p=e.selection.toOrientedRange(),u=e.session.addMarker(p,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),k(),g=setInterval(k,20),S=0,r.addListener(document,"mousemove",L)}function R(){clearInterval(g),e.session.removeMarker(u),u=null,e.selection.fromOrientedRange(p),e.isFocused()&&!w&&e.$resetCursorStyle(),p=null,m=null,S=0,y=null,_=null,r.removeListener(document,"mousemove",L)}this.onDragStart=function(t){if(this.cancelDrag||!x.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(t)}),0),t.preventDefault()}p=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()),w=!0,this.setState("drag")},this.onDragEnd=function(t){if(x.draggable=!1,w=!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()&&E(t.dataTransfer))return d=t.clientX,f=t.clientY,u||$(),S++,t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&E(t.dataTransfer))return d=t.clientX,f=t.clientY,u||($(),S++),null!==T&&(T=null),t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragLeave=function(t){if(S--,S<=0&&u)return R(),v=null,r.preventDefault(t)},this.onDrop=function(t){if(m){var n=t.dataTransfer;if(w)switch(v){case"move":p=p.contains(m.row,m.column)?{start:m,end:m}:e.moveText(p,m);break;case"copy":p=e.moveText(p,m,!0);break}else{var i=n.getData("Text");p={start:m,end:e.session.insert(m,i)},e.focus(),v=null}return R(),r.preventDefault(t)}},r.addListener(x,"dragstart",this.onDragStart.bind(t),e),r.addListener(x,"dragend",this.onDragEnd.bind(t),e),r.addListener(x,"dragenter",this.onDragEnter.bind(t),e),r.addListener(x,"dragover",this.onDragOver.bind(t),e),r.addListener(x,"dragleave",this.onDragLeave.bind(t),e),r.addListener(x,"drop",this.onDrop.bind(t),e);var T=null;function L(){null==T&&(T=setTimeout((function(){null!=T&&u&&R()}),20))}function E(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 h(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=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if("dragWait"===this.state){n=h(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,h,u,d,f,g="scroll",p=0,m=0,v=0,w=0;function y(){var t=window.navigator&&window.navigator.clipboard,n=!1,i=function(){var i=e.getCopyText(),r=e.session.getUndoManager().hasUndo();f.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"]),f.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)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&e.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){g="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 _(){f||y();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();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(f.style.left="",f.style.right="10px"):(f.style.right="",f.style.left=i+r-o.left+"px"),f.style.display="",f.firstChild.style.display="none",e.on("input",b)}function b(t){f&&(f.style.display="none"),e.off("input",b)}function x(){c=null,clearTimeout(c);var t=e.selection.getRange(),n=t.contains(u.row,u.column);!t.isEmpty()&&n||(e.selection.moveToPosition(u),e.selection.selectWord()),g="wait",_()}function S(){c=null,clearTimeout(c),e.selection.moveToPosition(u);var t=m>=2?e.selection.getLineRange(u.row):e.session.getBracketRange(u);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),g="wait"}function C(){p+=60,h=setInterval((function(){p--<=0&&(clearInterval(h),h=null),Math.abs(v)<.01&&(v=0),Math.abs(w)<.01&&(w=0),p<20&&(v*=.9),p<20&&(w*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*v,10*w),t==e.session.getScrollTop()&&(p=0)}),10)}r.addListener(t,"contextmenu",(function(t){if(d){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(g="zoom");d=e.$mouseHandler.isMousePressed=!0;var o=e.renderer.layerConfig.lineHeight,h=e.renderer.layerConfig.lineHeight,f=t.timeStamp;l=f;var y=r[0],_=y.clientX,b=y.clientY;Math.abs(n-_)+Math.abs(s-b)>o&&(a=-1),n=t.clientX=_,s=t.clientY=b,v=w=0;var C=new i(t,e);if(u=C.getDocumentPosition(),f-a<500&&1==r.length&&!p)m++,t.preventDefault(),t.button=0,S();else{m=0;var A=e.selection.cursor,k=e.selection.isEmpty()?A:e.selection.anchor,$=e.renderer.$cursorLayer.getPixelPosition(A,!0),R=e.renderer.$cursorLayer.getPixelPosition(k,!0),T=e.renderer.scroller.getBoundingClientRect(),L=e.renderer.layerConfig.offset,E=e.renderer.scrollLeft,M=function(t,e){return t/=h,e=e/o-.75,t*t+e*e};if(t.clientX<T.left)return void(g="zoom");var O=M(t.clientX-T.left-$.left+E,t.clientY-T.top-$.top+L),D=M(t.clientX-T.left-R.left+E,t.clientY-T.top-R.top+L);O<3.5&&D<3.5&&(g=O>D?"cursor":"anchor"),g=D<3.5?"anchor":O<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=f}),e),r.addListener(t,"touchend",(function(t){d=e.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),"zoom"==g?(g="",p=0):c?(e.selection.moveToPosition(u),p=0,_()):"scroll"==g?(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"==g)){var o=r[0],a=n-o.clientX,h=s-o.clientY;if("wait"==g){if(!(a*a+h*h>4))return t.preventDefault();g="cursor"}n=o.clientX,s=o.clientY,t.clientX=o.clientX,t.clientY=o.clientY;var u=t.timeStamp,d=u-l;if(l=u,"scroll"==g){var f=new i(t,e);f.speed=1,f.wheelX=a,f.wheelY=h,10*Math.abs(a)<Math.abs(h)&&(a=0),10*Math.abs(h)<Math.abs(a)&&(h=0),0!=d&&(v=a/d,w=h/d),e._emit("mousewheel",f),f.propagationStopped||(v=w=0)}else{var p=new i(t,e),m=p.getDocumentPosition();"cursor"==g?e.selection.moveCursorToPosition(m):"anchor"==g&&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,h=t("../config"),u=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 h=t.renderer.$gutter;i.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),i.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick"),t),i.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),i.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),i.addListener(a,"mousedown",n,t),i.addListener(h,"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",u),clearInterval(d),n.session&&h(),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()},h=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout((function(){c(t)}));var u=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",u),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var d=setInterval(h,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(u.prototype),h.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),e.MouseHandler=u})),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]],h=0,u=1,d=0,f=1,g=2,p=3,m=4,v=5,w=6,y=7,_=8,b=9,x=10,S=11,C=12,A=13,k=14,$=15,R=16,T=17,L=18,E=[L,L,L,L,L,L,L,L,L,w,v,w,_,v,L,L,L,L,L,L,L,L,L,L,L,L,L,L,v,v,v,w,_,m,m,S,S,S,m,m,m,m,m,x,b,x,b,b,g,g,g,g,g,g,g,g,g,g,b,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,L,L,L,L,L,L,v,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,b,m,S,S,S,S,m,m,m,m,d,m,m,L,m,m,S,S,g,g,m,d,m,m,m,g,d,m,m,m,m,m],M=[_,_,_,_,_,_,_,_,_,_,_,L,L,L,d,f,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_,v,A,k,$,R,T,b,S,S,S,S,S,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,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,_];function O(t,e,n,h){var u=i?c:l,d=null,f=null,g=null,p=0,m=null,y=null,b=-1,x=null,S=null,C=[];if(!h)for(x=0,h=[];x<n;x++)h[x]=P(t[x]);for(r=i,o=!1,!1,s=!1,a=!1,S=0;S<n;S++){if(d=p,C[S]=f=I(t,h,C,S),p=u[d][f],m=240&p,p&=15,e[S]=g=u[p][5],m>0)if(16==m){for(x=b;x<S;x++)e[x]=1;b=-1}else b=-1;if(y=u[p][6],y)-1==b&&(b=S);else if(b>-1){for(x=b;x<S;x++)e[x]=g;b=-1}h[S]==v&&(e[S]=0),r|=g}if(a)for(x=0;x<n;x++)if(h[x]==w){e[x]=i;for(var A=x-1;A>=0;A--){if(h[A]!=_)break;e[A]=i}}}function D(t,e,n){if(!(r<t))if(1!=t||i!=u||s){var o,a,l,c,h=n.length,d=0;while(d<h){if(e[d]>=t){o=d+1;while(o<h&&e[o]>=t)o++;for(a=d,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;d=o}d++}}else n.reverse()}function I(t,e,n,r){var l,c,h,u,E=e[r];switch(E){case d:case f:o=!1;case m:case p:return E;case g:return o?p:g;case y:return o=!0,!0,f;case _:return m;case b:return r<1||r+1>=e.length||(l=n[r-1])!=g&&l!=p||(c=e[r+1])!=g&&c!=p?m:(o&&(c=p),c==l?c:m);case x:return l=r>0?n[r-1]:v,l==g&&r+1<e.length&&e[r+1]==g?g:m;case S:if(r>0&&n[r-1]==g)return g;if(o)return m;u=r+1,h=e.length;while(u<h&&e[u]==S)u++;return u<h&&e[u]==g?g:m;case C:h=e.length,u=r+1;while(u<h&&e[u]==C)u++;if(u<h){var M=t[r],O=M>=1425&&M<=2303||64286==M;if(l=e[u],O&&(l==f||l==y))return f}return r<1||(l=e[r-1])==v?m:n[r-1];case v:return o=!1,s=!0,i;case w:return a=!0,m;case A:case k:case R:case T:case $:o=!1;case L:return m}}function P(t){var e=t.charCodeAt(0),n=e>>8;return 0==n?e>191?d:E[e]:5==n?/[\u0591-\u05f4]/.test(t)?f:d:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?C:/[\u0660-\u0669\u066b-\u066c]/.test(t)?p:1642==e?S:/[\u06f0-\u06f9]/.test(t)?g:y:32==n&&e<=8287?M[255&e]:254==n&&e>=65136?y:m}e.L=d,e.R=f,e.EN=g,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?u:h,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]===p?l[c]=e.AN:l[c]===f&&(n[c]>y&&n[c]<A||n[c]===m||n[c]===L)?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]=P(t.charAt(i)),n||e[i]!=f&&e[i]!=y&&e[i]!=p||(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,h=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f<r.length;f++)d=i.logicalFromVisual[f],n=r[f],c=d>=a&&d<l,c&&!h?u=s:!c&&h&&o.push({left:u,width:s-u}),s+=this.charWidths[n],h=c;if(c&&f===r.length&&o.push({left:u,width:s-u}),this.isRtlDir)for(var g=0;g<o.length;g++)o[g].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 h=c.regex,u=new RegExp("(?:("+h+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-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=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,(function(t,e){return"\\"+(parseInt(e,10)+r+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=u,i.push(h),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=[],h=0,u=0,d={type:null,value:""};while(l=a.exec(t)){var f=s.defaultToken,g=null,p=l[0],m=a.lastIndex;if(m-p.length>h){var v=t.substring(h,m-p.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var w=0;w<l.length-2;w++)if(void 0!==l[w+1]){g=o[s[w]],f=g.onMatch?g.onMatch(p,i,n,t):g.token,g.next&&(i="string"==typeof g.next?g.next:g.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],h=m,a=this.regExps[i],a.lastIndex=m),g.consumeLineEnd&&(h=m);break}if(p)if("string"===typeof f)g&&!1===g.merge||d.type!==f?(d.type&&c.push(d),d={type:f,value:p}):d.value+=p;else if(f){d.type&&c.push(d),d={type:null,value:""};for(w=0;w<f.length;w++)c.push(f[w])}if(h==t.length)break;if(h=m,u++>r){u>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});while(h<t.length)d.type&&c.push(d),d={value:t.substring(h,h+=500),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),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 h=l.next||l.push;if(h&&Array.isArray(h)){var u=l.stateName;u||(u=l.token,"string"!=typeof u&&(u=u[0]||""),i[u]&&(u+=n++)),i[u]=h,l.next=u,r(u)}else"pop"==h&&(l.next=e);if(l.push&&(l.nextState=l.next||l.push,l.next=t,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var f="string"==typeof l?l:l.include;if(f&&(c=Array.isArray(f)?f.map((function(t){return i[t]})):i[f]),c){var g=[a,1].concat(c);l.noEscape&&(g=g.filter((function(t){return!t.next}))),s.splice.apply(s,g),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"],h={},u={'"':'"',"'":"'"},d=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,h.rangeCount!=t.multiSelect.rangeCount&&(h={rangeCount:t.multiSelect.rangeCount})),h[e])return i=h[e];i=h[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=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)]}},g=function(t){this.add("braces","insertion",(function(e,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(r);var h=r.getSelectionRange(),u=o.doc.getTextRange(h);if(""!==u&&"{"!==u&&r.getWrapBehavioursEnabled())return f(h,u,"{","}");if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||t&&t.braces?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){d(r);var p=c.substring(l.column,l.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:l.column+1,row:l.row});if(null!==m&&g.isAutoInsertedClosing(l,c,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==s||"\r\n"==s){d(r);var v="";g.isMaybeInsertedClosing(l,c)&&(v=a.stringRepeat("}",i.maybeInsertedBrackets),g.clearMaybeInsertedClosing());p=c.substring(l.column,l.column+1);if("}"===p){var w=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!w)return null;var y=this.$getIndent(o.getLine(w.row))}else{if(!v)return void g.clearMaybeInsertedClosing();y=this.$getIndent(c)}var _=y+o.getTabString();return{text:"\n"+_+"\n"+y+v,selection:[1,_.length,1,_.length]}}g.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,e,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){d(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){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"(",")");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var h=i.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==h&&g.isAutoInsertedClosing(a,l,r))return g.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){d(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){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"[","]");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var h=i.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==h&&g.isAutoInsertedClosing(a,l,r))return g.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){d(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||u;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),h=i.doc.getLine(c.row),g=h.substring(c.column-1,c.column),p=h.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==g&&m&&/escape/.test(m.type))return null;var w,y=m&&/string|escape/.test(m.type),_=!v||/string|escape/.test(v.type);if(p==s)w=y!==_,w&&/string\.end/.test(v.type)&&(w=!1);else{if(y&&!_)return null;if(y&&_)return null;var b=i.$mode.tokenRe;b.lastIndex=0;var x=b.test(g);b.lastIndex=0;var S=b.test(g);if(x||S)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;var C=h[c.column-2];if(g==s&&(C==s||b.test(C)))return null;w=!0}return{text:w?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(t,e,n,i,r){var o=i.$mode.$quotes||u,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)){d(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}}))};g.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)},g.$matchTokenType=function(t,e){return e.indexOf(t.type||t)>-1},g.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++},g.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++},g.isAutoInsertedClosing=function(t,e,n){return i.autoInsertedBrackets>0&&t.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&e.substr(t.column)===i.autoInsertedLineEnd},g.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},g.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(g,o),e.CstyleBehaviour=g})),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,h=t("../range").Range,u=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(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))p=this.lineCommentStart.map(l.escapeRegExp).join("|"),f=this.lineCommentStart[0];else p=l.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),h=e.getUseSoftTabs();w=function(t,e){var n=t.match(p);if(n){var i=n[1].length,o=n[0].length;d(t,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(e,i,o)}};var u=f+" ",d=(v=function(t,e){o&&!/\S/.test(t)||(d(t,a,a)?r.insertInLine({row:e,column:a},u):r.insertInLine({row:e,column:a},f))},y=function(t,e){return p.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 f=this.blockComment.start,g=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+l.escapeRegExp(f)+")"),m=new RegExp("(?:"+l.escapeRegExp(g)+")\\s*$"),v=function(t,e){y(t,e)||o&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},g),r.insertInLine({row:e,column:a},f))},w=function(t,e){var n;(n=t.match(m))&&r.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(p))&&r.removeInLine(e,n[1].length,n[0].length)},y=function(t,n){if(p.test(t))return!0;for(var i=e.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function _(t){for(var e=n;e<=i;e++)t(r.getLine(e),e)}var b=1/0;_((function(t,e){var n=t.search(/\S/);-1!==n?(n<a&&(a=n),s&&!y(t,e)&&(s=!1)):b>t.length&&(b=t.length)})),a==1/0&&(a=b,o=!1,s=!1),h&&a%c!=0&&(a=Math.floor(a/c)*c),_(s?w: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(),u=(e.selection,e.selection.toOrientedRange());if(l&&/comment/.test(l.type)){var d,f;while(l&&/comment/.test(l.type)){var g=l.value.indexOf(r.start);if(-1!=g){var p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+g;d=new h(p,m,p,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)){g=l.value.indexOf(r.end);if(-1!=g){p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+g;f=new h(p,m,p,m+r.end.length);break}l=a.stepForward()}f&&e.remove(f),d&&(e.remove(d),o=d.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);u.start.row==o&&(u.start.column+=s),u.end.row==o&&(u.end.column+=s),e.selection.fromOrientedRange(u)}},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(u.prototype),e.Mode=u})),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),h=this.$lines.slice(t,e+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),h},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 h=this.cache[c];null==h&&(h=i.getMatchOffsets(n.getLine(c),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(t){return new r(c,t.offset,c,t.offset+t.length)})),this.cache[c]=h.length?h:"");for(var u=h.length;u--;){var d=h[u].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,e.drawSingleLineMarker(t,d,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,h=-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+=h,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&&h>0&&s<a-1&&l.end.column>l.start.column&&l.end.column==o[s+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=c}}else for(c=i-r,h=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+=h,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+=h,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),h=0==r?c.length-1:c.length,u=s;u<h;u++)t.addSubFold(c[u]);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,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(t){n.addSubFold(t)})));for(var g=0;g<i.length;g++){var p=i[g];if(c==p.start.row){p.addFold(n),s=!0;break}if(a==p.end.row){if(p.addFold(n),s=!0,!n.sameRow){var m=i[g+1];if(m&&m.start.row==c){p.merge(m);break}}break}if(c<=p.start.row)break}return s||(p=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(p.start.row,p.start.row):this.$updateRowLengthCache(p.start.row,p.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));r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+2,r=new s(this,t,e),-1!=n){var h=-1;do{if(o=r.stepForward(),-1==h){var u=this.getState(r.$row);l.test(u)||(h=r.$row)}else if(r.$row>h)break}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+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){var e=this.getLine(t.row),n=e.charAt(t.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=e.charAt(t.column),t={row:t.row,column:t.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!i)return null;var o=new r(t.row,t.column-1,t.row,t.column),s=i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t);if(!s)return[o];var a=new r(s.row,s.column,s.row,s.column+1);return[o,a]},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 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.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,h=c.length;while(l<h){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.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}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,h=t("./range").Range,u=t("./document").Document,d=t("./background_tokenizer").BackgroundTokenizer,f=t("./search_highlight").SearchHighlight,g=function(t,e){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++g.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new d((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 u(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};g.$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 f(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 h(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 h(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=h.fromPoints(s.start,s.start))):i=n(s)?h.fromPoints(s.start,s.end):h.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=h.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 h(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 h(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 h=this.getFoldLine(r.row),u=0;if(h){h.addRemoveChars(r.row,r.column,i.column-r.column),h.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==h&&(d.merge(h),h=d),u=c.indexOf(h)+1}for(u;u<c.length;u++){h=c[u];h.start.row>=r.row&&h.shiftRow(-a)}s=o}else{var f=Array(a);f.unshift(o,0);var g=e?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,f);c=this.$foldData,h=this.getFoldLine(o),u=0;if(h){var p=h.range.compareInside(i.row,i.column);0==p?(h=h.split(i.row,i.column),h&&(h.shiftRow(a),h.addRemoveChars(s,0,r.column-i.column))):-1==p&&(h.addRemoveChars(o,0,r.column-i.column),h.shiftRow(a)),u=c.indexOf(h)+1}for(u;u<c.length;u++){h=c[u];h.start.row>=o&&h.shiftRow(a)}}else{a=Math.abs(t.start.column-t.end.column),"remove"===n&&(l=this.getFoldsInRange(t),this.removeFolds(l),a=-a);h=this.getFoldLine(o);h&&h.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,h=t;e=Math.min(e,s.length-1);while(h<=e)r=this.getFoldLine(h,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),h=r.end.row+1):(i=this.$getDisplayTokens(s[h]),l[h]=this.$computeWrapSplits(i,c,a),h++)};var t=1,e=2,n=3,o=4,l=9,u=10,d=11,g=12;function p(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,h=0,f=this.$wrapAsCode,p=this.$indentedSoftWrap,m=i<=Math.max(2*r,8)||!1===p?0:Math.floor(i/2);function v(){var e=0;if(0===m)return e;if(p)for(var n=0;n<t.length;n++){var i=t[n];if(i==u)e+=1;else{if(i!=d){if(i==g)continue;break}e+=r}}return f&&!1!==p&&(e+=r),Math.min(e,m)}function w(e){for(var n=e-c,i=c;i<e;i++){var r=t[i];12!==r&&2!==r||(n-=1)}s.length||(y=v(),s.indent=y),h+=n,s.push(h),c=e}var y=0;while(a-c>i-y){var _=c+i-y;if(t[_-1]>=u&&t[_]>=u)w(_);else if(t[_]!=n&&t[_]!=o){var b=Math.max(_-(i-(i>>2)),c-1);while(_>b&&t[_]<n)_--;if(f){while(_>b&&t[_]<n)_--;while(_>b&&t[_]==l)_--}else while(_>b&&t[_]<u)_--;_>b?w(++_):(_=c+i,t[_]==e&&_--,w(_-y))}else{for(_;_!=c-1;_--)if(t[_]==n)break;if(_>c){w(_);continue}for(_=c+i,_;_<t.length;_++)if(t[_]!=o)break;if(_==t.length)break;w(_)}}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(d);for(var c=1;c<r;c++)o.push(g)}else 32==a?o.push(u):a>39&&a<48||a>57&&a<64?o.push(l):a>=4352&&p(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&&p(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,h=this.$getRowCacheIndex(c,t),u=c.length;if(u&&h>=0){a=c[h],o=this.$docRowCache[h];var d=t>c[u-1]}else d=!u;var f=this.getLength()-1,g=this.getNextFoldLine(o),p=g?g.start.row:1/0;while(a<=t){if(l=this.getRowLength(o),a+l>t||o>=f)break;a+=l,o++,o>p&&(o=g.end.row+1,g=this.getNextFoldLine(o,g),p=g?g.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(g&&g.start.row<=o)i=this.getFoldDisplayLine(g),o=g.start.row;else{if(a+l<=t||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),g=null}var m=0,v=Math.floor(t-a);if(this.$useWrapMode){var w=this.$wrapData[o];w&&(r=w[v],v>0&&w.length&&(m=w.indent,s=w[v-1]||w[w.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),g?g.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),h=l.length;if(h&&c>=0){a=l[c],i=this.$screenRowCache[c];var u=t>l[h-1]}else u=!h;var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;while(a<t){if(a>=f){if(s=d.end.row+1,s>t)break;d=this.getNextFoldLine(s,d),f=d?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var g="";d&&a>=f?(g=this.getFoldDisplayLine(d,t,e),r=d.start.row):(g=this.getLine(t).substring(0,e),r=t);var p=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){var v=0;while(g.length>=m[v])i++,v++;g=g.substring(m[v-1]||0,g.length),p=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:p+this.$getStringScreenWidth(g)[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=p}.call(g.prototype),t("./edit_session/folding").Folding.call(g.prototype),t("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.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=g})),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,h=r.length-c;t:for(var u=a.offset||0;u<=h;u++){for(var d=0;d<c;d++)if(-1==r[u+d].search(a[d]))continue t;var f=r[u],g=r[u+c-1],p=f.length-f.match(a[0])[0].length,m=g.match(a[c-1])[0].length;l&&l.end.row===u&&l.end.column>p||(s.push(l=new o(u,p,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;v<r.length;v++){var w=i.getMatchOffsets(r[v],a);for(d=0;d<w.length;d++){var y=w[d];s.push(new o(v,y.offset,v,y.offset+y.length))}}if(n){var _=n.start.column,b=n.start.column;v=0,d=s.length-1;while(v<d&&s[v].start.column<_&&s[v].start.row==n.start.row)v++;while(v<d&&s[d].end.column>b&&s[d].end.row==n.end.row)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;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(!u(n,s.column,t)){for(n--;n>=a;n--)if(u(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=l,a=s.row;n>=a;n--)if(u(n,Number.MAX_VALUE,t))return}};else c=function(t){var n=s.row;if(!u(n,s.column,t)){for(n+=1;n<=l;n++)if(u(n,0,t))return;if(0!=e.wrap)for(n=a,l=s.row;n<=l;n++)if(u(n,0,t))return}};if(e.$isMultiLine)var h=n.length,u=function(e,r,o){var s=i?e-h+1:e;if(!(s<0||s+h>t.getLength())){var a=t.getLine(s),l=a.search(n[0]);if(!(!i&&l<r||-1===l)){for(var c=1;c<h;c++)if(a=t.getLine(s+c),-1==a.search(n[c]))return;var u=a.match(n[h-1])[0].length;if(!(i&&u>r))return!!o(s,l,s+h-1,u)||void 0}}};else if(i)u=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 h=a.length-1;h>=0;h-=2){var u=a[h-1];c=a[h];if(r(e,u,e,u+c))return!0}};else u=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:"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),h=n.row+1;h<=r.row+1;h++){var u=i.stringTrimLeft(i.stringTrimRight(t.session.doc.getLine(h)));0!==u.length&&(u=" "+u),c+=u}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=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/lang"),s=t("./lib/useragent"),a=t("./keyboard/textinput").TextInput,l=t("./mouse/mouse_handler").MouseHandler,c=t("./mouse/fold_handler").FoldHandler,h=t("./keyboard/keybinding").KeyBinding,u=t("./edit_session").EditSession,d=t("./search").Search,f=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,p=t("./commands/command_manager").CommandManager,m=t("./commands/default_commands").commands,v=t("./config"),w=t("./token_iterator").TokenIterator,y=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 p(s.isMac?"mac":"win",m),"object"==typeof document&&(this.textInput=new a(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(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=o.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 u("")),v.resetOptions(this),n&&this.setOptions(n),v._signal("editor",this)};_.$uid=0,function(){i.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=o.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;v.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")||r.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=e.getMatchingBracketRanges(t.getCursorPosition());if(!n&&e.$mode.getMatching&&(n=e.$mode.getMatching(t.session)),n){var i="ace_bracket";Array.isArray(n)?1==n.length&&(i="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),e.$bracketHighlight={ranges:n,markerIds:n.map((function(t){return e.addMarker(t,i,"text")}))},t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}else t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var t=this;this.$highlightTagPending=!0,setTimeout((function(){t.$highlightTagPending=!1;var e=t.session;if(e&&!e.destroyed){var n=t.getCursorPosition(),i=new w(t.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return e.removeMarker(e.$tagHighlight),void(e.$tagHighlight=null);if(-1===r.type.indexOf("tag-open")||(r=i.stepForward(),r)){var o=r.value,s=r.value,a=0,l=i.stepBackward();if("<"===l.value)do{l=r,r=i.stepForward(),r&&(-1!==r.type.indexOf("tag-name")?(s=r.value,o===s&&("<"===l.value?a++:"</"===l.value&&a--)):o===s&&"/>"===r.value&&a--)}while(r&&a>=0);else{do{if(r=l,l=i.stepBackward(),r)if(-1!==r.type.indexOf("tag-name"))o===r.value&&("<"===l.value?a++:"</"===l.value&&a--);else if("/>"===r.value){var c=0,h=l;while(h){if(-1!==h.type.indexOf("tag-name")&&h.value===o){a--;break}if("<"===h.value)break;h=i.stepBackward(),c++}for(var u=0;u<c;u++)i.stepForward()}}while(l&&a<=0);i.stepForward()}if(!r)return e.removeMarker(e.$tagHighlight),void(e.$tagHighlight=null);var d=i.getCurrentTokenRow(),g=i.getCurrentTokenColumn(),p=new f(d,g,d,g+r.value.length),m=e.$backMarkers[e.$tagHighlight];e.$tagHighlight&&void 0!=m&&0!==p.compareRange(m.range)&&(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null),e.$tagHighlight||(e.$tagHighlight=e.addMarker(p,"ace_bracket","text"))}}}),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.$highlightTags(),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 f(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),y.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===y.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 f.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,h=n.getState(r.row),u=(a=n.getLine(r.row),i.checkOutdent(h,a,t));if(n.insert(r,t),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new f(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(t)){var d=i.getNextLineIndent(h,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}u&&i.autoOutdent(h,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="",h="",u=n.getTabString(),d=t;d<=e;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),h=i.getNextLineIndent(l,c,u)),o=n.getLine(d),s=i.$getIndent(o),h!==s&&(s.length>0&&(a=new f(d,0,d,s.length),n.remove(a)),h.length>0&&n.insert({row:d,column:0},h)),i.autoOutdent(l,n,d)},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 f(t.row,e-1,t.row,e+1)):(n=r.charAt(e-1)+r.charAt(e-2),i=new f(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)){h=this.$getSelectedRows();return void t.indentRows(h.first,h.last,"\t")}}var i=t.getLine(e.start.row),r=e.start,s=t.getTabSize(),a=t.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=s-a%s,c=o.stringRepeat(" ",l);else{l=a%s;while(" "==i[e.start.column-1]&&l)e.start.column--,l--;this.selection.setSelectionRange(e),c="\t"}return this.insert(c)}var h=this.$getSelectedRows();t.indentRows(h.first,h.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 f(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 f(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),h=new f(e,o.start,e,o.end);this.session.replace(h,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/),s=e-i-1;s<0&&(s=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&r.forEach((function(e,r){l=a+e.length,s>=a&&s<=l&&(n=e,c.selection.clearSelection(),c.moveCursorTo(t,a+i),c.selection.selectTo(t,l+i)),a=l}));for(var h,u=this.$toggleWordPairs,d=0;d<u.length;d++)for(var f=u[d],g=0;g<=1;g++){var p=+!g,m=n.match(new RegExp("^\\s?_?("+o.escapeRegExp(f[g])+")\\s?$","i"));if(m){var v=n.match(new RegExp("([_]|^|\\s)("+o.escapeRegExp(m[1])+")($|\\s)","g"));v&&(h=n.replace(new RegExp(o.escapeRegExp(f[g]),"i"),(function(t){var e=f[p];return t.toUpperCase()==t?e=e.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(e=e.substr(0,0)+f[p].charAt(0).toUpperCase()+e.substr(1)),e})),this.insert(h),h="")}}},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,h=0;h<c;h++){var u=h;s[h].moveBy(a,0),n=this.$getSelectedRows(s[h]);var d=n.first,f=n.last;while(++h<c){l&&s[h].moveBy(l,0);var g=this.$getSelectedRows(s[h]);if(e&&g.first!=f)break;if(!e&&g.first>f+1)break;f=g.last}h--,a=this.session.$moveLines(d,f,e?0:t),e&&-1==t&&(u=h+1);while(u<=h)s[u].moveBy(a,0),u++;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=r||i.stepForward();if(o){var s,a,l=!1,c={},h=n.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;h<o.value.length&&!l;h++)if(u[o.value[h]])switch(a=u[o.value[h]]+"."+o.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),o.value[h]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0);break}}else-1!==o.type.indexOf("tag-name")&&(isNaN(c[o.value])&&(c[o.value]=0),"<"===r.value?c[o.value]++:"</"===r.value&&c[o.value]--,-1===c[o.value]&&(s="tag",l=!0));l||(r=o,o=i.stepForward(),h=0)}while(o&&!l);if(s){var d,g;if("bracket"===s)d=this.session.getBracketRange(n),d||(d=new f(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"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var p=o.value;if(d=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===d.compare(n.row,n.column)){l=!1;do{o=r,r=i.stepBackward(),r&&(-1!==r.type.indexOf("tag-close")&&d.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),o.value===p&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?c[p]++:"</"===r.value&&c[p]--,0===c[p]&&(l=!0)))}while(r&&!l)}o&&o.type.indexOf("tag-name")&&(g=d.start,g.row==n.row&&Math.abs(g.column-n.column)<2&&(g=d.end))}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&&i.mixin(e,t);var r=this.selection.getRange();null==e.needle&&(t=this.session.getTextRange(r)||this.$search.$options.needle,t||(r=this.session.getWordRange(r.start.row,r.start.column),t=this.session.getTextRange(r)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:r});var o=this.$search.find(this.session);return e.preventScroll?o:o?(this.revealRange(o,n),o):(e.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},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,r.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},this.prompt=function(t,e,n){var i=this;v.loadModule("./ext/prompt",(function(r){r.prompt(i,t,e,n)}))}}.call(_.prototype),v.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?b.attach(this):b.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?b.attach(this):b.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),r.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),r.addCssClass(this.container,"ace_hasPlaceholder");var e=r.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()}},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 b={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=d(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);w(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(h).join("\n"):h(t.value)),t.start&&(e+=h(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function h(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function u(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)if(s(e.start,t.end)>=0)g(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;g(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)g(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;g(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)g(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;g(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)g(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;g(t,e,-1)}return[e,t]}function d(t,e){for(var n=t.length;n--;)for(var i=0;i<e.length;i++)if(!u(t[n],e[i])){while(n<t.length){while(i--)u(e[i],t[n]);i=e.length,n++}return[t,e]}return t.selectionBefore=e.selectionBefore=t.selectionAfter=e.selectionAfter=null,[e,t]}function f(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)s(t.start,e.start)<0?g(e,t,1):g(t,e,1);else if(n&&!i)s(t.start,e.end)>=0?g(t,e,-1):(s(t.start,e.start)<=0||g(t,o.fromPoints(e.start,t.start),-1),g(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?g(e,t,-1):(s(e.start,t.start)<=0||g(e,o.fromPoints(t.start,e.start),-1),g(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)g(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)),p(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);g(t,e,-1)}return[e,t]}function g(t,e,n){p(t.start,e.start,e.end,n),p(t.end,e.start,e.end,n)}function p(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=f(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 w(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,h=s.$breakpoints,u=s.$decorations,d=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,g=n?n.start.row:Number.MAX_VALUE,p="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=g&&this.$cursorRow<=n.end.row)&&(p+="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)),h[r]&&(p+=h[r]),u[r]&&(p+=u[r]),this.$annotations[r]&&(p+=this.$annotations[r].className),o.className!=p&&(o.className=p),f){var m=f[r];null==m&&(m=f[r]=s.getFoldWidget(r))}if(m){p="ace_fold-widget ace_"+m;"start"==m&&r==g&&r<n.end.row?p+=" ace_closed":p+=" ace_open",l.className!=p&&(l.className=p);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 w=(d?d.getText(s,r):r+c).toString();return w!==a.data&&(a.data=w),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=w,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,h=l,u=0,d=0,f=a.getScreenLastRowColumn(h),g=new i(h,n.start.column,h,d);h<=c;h++)g.start.row=g.end.row=h,g.start.column=h==l?n.start.column:a.getRowWrapIndent(h),g.end.column=f,u=d,d=f,f=h+1<c?a.getScreenLastRowColumn(h+1):h==c?0:n.end.column,this.drawSingleLineMarker(e,g,r+(h==l?" ace_start":"")+" ace_br"+t(h==l||h==l+1&&n.start.column,u<d,d>f,h==c),o,h==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 h=e.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+h+"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 u=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"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,h=(a=i,l=this.session.getNextFoldLine(a),l?l.start.row:1/0);while(1){if(a>h&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),h=l?l.start.row:1/0),a>r)break;var u=o[s++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var d=t.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)while(s<this.$lines.cells.length){var f=this.$lines.cells[s++];f.element.style.top=this.$lines.computeLineTop(f.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 h=r[1],u=r[2],d=r[3],f=r[4],g=r[5];if(s.showSpaces||!u){var p=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,p&&l.appendChild(this.dom.createTextNode(p,this.element)),h){var m=s.session.getScreenTabSize(e+r.index);l.appendChild(s.$tabStrings[m].cloneNode(!0)),e+=m-1}else if(u)if(s.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(s.SPACE_CHAR,u.length),l.appendChild(v)}else l.appendChild(this.com.createTextNode(u,this.element));else if(d){v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(s.SPACE_CHAR,d.length),l.appendChild(v)}else if(f){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:f,l.appendChild(v)}else if(g){e+=1;v=this.dom.createElement("span");v.style.width=2*s.config.characterWidth+"px",v.className="ace_cjk",v.textContent=g,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 w="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=w,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,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;i&&i[e-1]&&i[e-1].classList&&i[e-1].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 h=e[c],u=h.value;if(0==c&&this.displayIndentGuides){if(i=u.length,u=this.renderIndentGuide(l,u,s),!u)continue;i-=u.length}if(i+u.length<s)a=this.$renderToken(l,a,h,u),i+=u.length;else{while(i+u.length>=s)a=this.$renderToken(l,a,h,u.substring(0,s-i)),u=u.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!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}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 h=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(h,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(h.prototype),e.ScrollBar=c,e.ScrollBarV=c,e.ScrollBarH=h,e.VScrollBar=c,e.HScrollBar=h})),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,h="function"==typeof ResizeObserver,u=200,d=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},h?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(u,0),t(0,u),t(u,u)],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]),h=a(this.els[2]),d=a(this.els[3]),f=i(r(d,c),r(d,h),r(o(c,h),o(d,l))),g=s(1+f[0],r(c,l)),p=s(1+f[1],r(h,l));if(e){var m=e,v=f[0]*m[0]/u+f[1]*m[1]/u+1,w=o(s(m[0],g),s(m[1],p));return o(s(1/v/u,w),l)}var y=r(t,l),_=i(r(g,s(f[0],y)),r(p,s(f[1],y)),y);return s(u,_)}}).call(d.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 &nbsp; 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/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/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","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,h=t("./scrollbar").HScrollBar,u=t("./scrollbar").VScrollBar,d=t("./renderloop").RenderLoop,f=t("./layer/font_metrics").FontMetrics,g=t("./lib/event_emitter").EventEmitter,p=t("./css/editor.css"),m=t("./lib/useragent"),v=m.isIE;r.importCssString(p,"ace_editor.css",!1);var w=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 u(this.container,this),this.scrollBarH=new h(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 f(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=!m.isIOS,this.$loop=new d(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,g),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.$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.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.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:v?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 h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[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.$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.$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)):t&this.CHANGE_LINES?(this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):t&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(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,h=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=h;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-e.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-e.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-r+h<0||this.scrollTop>u.top),f=l!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var g,p,m=this.scrollTop%this.lineHeight,v=Math.ceil(c/this.lineHeight)-1,w=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),y=w+v,_=this.lineHeight;w=t.screenToDocumentRow(w,0);var b=t.getFoldLine(w);b&&(w=b.start.row),g=t.documentToScreenRow(w,0),p=t.getRowLength(w)*_,y=Math.min(t.screenToDocumentRow(y,0),t.getLength()-1),c=e.scrollerHeight+t.getRowLength(y)*_+p,m=this.scrollTop-g*_;var x=0;return(this.layerConfig.width!=o||a)&&(x=this.CHANGE_H_SCROLL),(a||f)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:w,firstRowScreen:g,lastRow:y,lineHeight:_,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:_?Math.max(0,Math.ceil((m+e.height-e.scrollerHeight)/_)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},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,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.session)return clearInterval(i.$timer);o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,e&&e())}),10)}}},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 h=c.value.length-(a-i),u=c.value.slice(0,h),d=c.value.slice(h);s.splice(l,1,{type:c.type,value:u},o,{type:c.type,value:d});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(p,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}).call(w.prototype),o.defineOptions(w.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)}},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!m.isMobile&&!m.isIE}}),e.VirtualRenderer=w})),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 h=function(t,e,n){var i=null,r=!1,a=Object.create(o),l=[],h=new c({messageBuffer:l,terminate:function(){},postMessage:function(t){l.push(t),i&&(r?setTimeout(u):u())}});h.setEmitSync=function(t){r=t};var u=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){h.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)u()})),h};e.UIWorkerClient=h,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 h,u=t.editor,d=u.selection,f=u.inMultiSelectMode,g=t.getDocumentPosition(),p=d.getCursor(),m=t.inSelection()||d.isEmpty()&&o(g,p),v=t.x,w=t.y,y=function(t){v=t.clientX,w=t.clientY},_=u.session,b=u.renderer.pixelToScreenCoordinates(v,w),x=b;if(u.$mouseHandler.$enableJumpToDef)a&&n||l&&n?h=s?"block":"add":n&&u.$blockSelectEnabled&&(h="block");else if(l&&!n){if(h="add",!f&&s)return}else n&&u.$blockSelectEnabled&&(h="block");if(h&&r.isMac&&e.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==h){if(!f&&m)return;if(!f){var S=d.toOrientedRange();u.addSelectionMarker(S)}var C=d.rangeList.rangeAtPoint(g);u.inVirtualSelectionMode=!0,s&&(C=null,S=d.ranges[0]||S,u.removeSelectionMarker(S)),u.once("mouseup",(function(){var t=d.toOrientedRange();C&&t.isEmpty()&&o(C.cursor,t.cursor)?d.substractPoint(t.cursor):(s?d.substractPoint(S.cursor):S&&(u.removeSelectionMarker(S),d.addRange(S)),d.addRange(t)),u.inVirtualSelectionMode=!1}))}else if("block"==h){var A;t.stop(),u.inVirtualSelectionMode=!0;var k=[],$=function(){var t=u.renderer.pixelToScreenCoordinates(v,w),e=_.screenToDocumentPosition(t.row,t.column,t.offsetX);o(x,t)&&o(e,d.lead)||(x=t,u.selection.moveToPosition(e),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(k),k=d.rectangularRangeBlock(x,b),u.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=u.$mouseHandler.$clickSelection.clone()),k.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};f&&!l?d.toSingleRange():!f&&l&&(A=d.toOrientedRange(),u.addSelectionMarker(A)),s?b=_.documentToScreenPosition(d.lead):d.moveToPosition(g),x={row:-1,column:-1};var R=function(t){$(),clearInterval(L),u.removeSelectionMarkers(k),k.length||(k=[d.toOrientedRange()]),A&&(u.removeSelectionMarker(A),d.toSingleRange(A));for(var e=0;e<k.length;e++)d.addRange(k[e]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null},T=$;i.capture(u.container,y,R);var L=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 h=t("./search").Search,u=new h;function d(t,e,n){return u.$options.wrap=!0,u.$options.needle=e,u.$options.backwards=-1==n,u.find(t)}var f=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.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 h,u=t.row<e.row;if(u)var d=t.row,f=e.row;else d=e.row,f=t.row;s<0&&(s=0),d<0&&(d=0),d==f&&(n=!0);for(var g=d;g<=f;g++){var m=r.fromPoints(this.session.screenToDocumentPosition(g,s,l),this.session.screenToDocumentPosition(g,a,c));if(m.isEmpty()){if(h&&p(m.end,h))break;h=m.end}m.cursor=o?m.start:m.end,i.push(m)}if(u&&i.reverse(),!n){var v=i.length-1;while(i[v].isEmpty()&&v>0)v--;if(v>0){var w=0;while(i[w].isEmpty())w++}for(var y=v;y>=w;y--)i[y].isEmpty()&&i.splice(y,1)}return i}}.call(o.prototype);var g=t("./editor").Editor;function p(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,h=(r?l:c).ranges;if(!h.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var u=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=h.length;f--;){if(s)while(f>0&&h[f].start.row==h[f-1].end.row)f--;d.fromOrientedRange(h[f]),d.index=f,this.selection=a.selection=d;var g=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===g||(i=g),d.toOrientedRange(h[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.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 h=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),h&&this.selection.substractPoint(h)},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=d(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,h=c[n]-a;o>h?t.insert(i,l.stringRepeat(" ",o-h)):t.remove(new r(i.row,i.column,i.row,i.column-o+h)),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 h=this.selection.getRange(),u=h.start.row,d=h.end.row,f=u==d;if(f){var g,p=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d<p);do{g=this.session.getLine(u)}while(/[=:]/.test(g)&&--u>0);u<0&&(u=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,f),this.session.insert({row:u,column:0},m.join("\n")+"\n"),f||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},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?h:c:u);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 h(t){return t[2]?a(n+i-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function u(t){return t[2]?a(n)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(g.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(g.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,h=e;while(++e<l){var u=t.getLine(e).search(r);if(-1!=u){if(u<=s){var d=t.getTokenAt(e,0);if(!d||"string"!==d.type)break}h=e}}if(h>c){var f=t.getLine(h).length;return new i(c,a,h,f)}}},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,h=a(n,s,e);if(h){var u=h[0];o.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,o.row=u.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 d={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),g=d.el.appendChild(r.createElement("div"));g.className="error_widget_arrow "+c.className;var p=t.renderer.$cursorLayer.getPixelPosition(o).left;g.style.left=p+t.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("<br>"),f.appendChild(r.createElement("div"));var m=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),t.off("changeSelection",d.destroy),t.off("changeSession",d.destroy),t.off("mouseup",d.destroy),t.off("change",d.destroy))},t.keyBinding.addKeyboardHandler(m),t.on("changeSelection",d.destroy),t.on("changeSession",d.destroy),t.on("mouseup",d.destroy),t.on("change",d.destroy),t.session.widgetManager.addLineWidget(d),d.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:d.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 h=e.createEditSession(a),u=new s(new c(t),h,n),d={document:h,editor:u,onResize:u.resize.bind(u,null)};return l&&(d.textarea=l),r.addListener(window,"resize",d.onResize),u.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),u.container.env=u.env=d,u},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),h=n(98560),u=n(21218),d=n(68047),f=n(10738);t.exports=function(t){return new Promise((function(e,n){var g,p=t.data,m=t.headers,v=t.responseType;function w(){t.cancelToken&&t.cancelToken.unsubscribe(g),t.signal&&t.signal.removeEventListener("abort",g)}i.isFormData(p)&&i.isStandardBrowserEnv()&&delete m["Content-Type"];var y=new XMLHttpRequest;if(t.auth){var _=t.auth.username||"",b=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(_+":"+b)}var x=a(t.baseURL,t.url);function S(){if(y){var i="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,o=v&&"text"!==v&&"json"!==v?y.response:y.responseText,s={data:o,status:y.status,statusText:y.statusText,headers:i,config:t,request:y};r((function(t){e(t),w()}),(function(t){n(t),w()}),s),y=null}}if(y.open(t.method.toUpperCase(),s(x,t.params,t.paramsSerializer),!0),y.timeout=t.timeout,"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(S)},y.onabort=function(){y&&(n(new u("Request aborted",u.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,t,y,y)),y=null},y.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",i=t.transitional||h;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new u(e,i.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,t,y)),y=null},i.isStandardBrowserEnv()){var C=(t.withCredentials||c(x))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;C&&(m[t.xsrfHeaderName]=C)}"setRequestHeader"in y&&i.forEach(m,(function(t,e){"undefined"===typeof p&&"content-type"===e.toLowerCase()?delete m[e]:y.setRequestHeader(e,t)})),i.isUndefined(t.withCredentials)||(y.withCredentials=!!t.withCredentials),v&&"json"!==v&&(y.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&y.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(g=function(t){y&&(n(!t||t&&t.type?new d:t),y.abort(),y=null)},t.cancelToken&&t.cancelToken.subscribe(g),t.signal&&(t.signal.aborted?g():t.signal.addEventListener("abort",g))),p||(p=null);var A=f(x);A&&-1===["http","https","file"].indexOf(A)?n(new u("Unsupported protocol "+A+":",u.ERR_BAD_REQUEST,t)):y.send(p)}))}},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),h=c.validators;function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.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:h.transitional(h.boolean),forcedJSONParsing:h.transitional(h.boolean),clarifyTimeoutError:h.transitional(h.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 u=[s,void 0];Array.prototype.unshift.apply(u,i),u=u.concat(l),o=Promise.resolve(e);while(u.length)o=o.then(u.shift(),u.shift());return o}var d=e;while(i.length){var f=i.shift(),g=i.shift();try{d=f(d)}catch(p){g(p);break}}try{o=s(d)}catch(p){return Promise.reject(p)}while(l.length)o=o.then(l.shift(),l.shift());return o},u.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){u.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}))}}u.prototype[t]=e(),u.prototype[t+"Form"]=e(!0)})),t.exports=u},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 h(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(t=n(70353)),t}function u(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 d={transitional:s,adapter:h(),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"),u(t)):t}],transformResponse:[function(t){var e=this.transitional||d.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){d.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){d.headers[t]=i.merge(l)})),t.exports=d},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 h=s("ArrayBuffer");function u(t){var e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e}function d(t){return"string"===typeof t}function f(t){return"number"===typeof t}function g(t){return null!==t&&"object"===typeof t}function p(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"),w=s("Blob"),y=s("FileList");function _(t){return"[object Function]"===r.call(t)}function b(t){return g(t)&&_(t.pipe)}function x(t){var e="[object FormData]";return t&&("function"===typeof FormData&&t instanceof FormData||r.call(t)===e||_(t.toString)&&t.toString()===e)}var S=s("URLSearchParams");function C(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function A(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function k(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){p(t[n])&&p(e)?t[n]=$(t[n],e):p(e)?t[n]=$({},e):a(e)?t[n]=e.slice():t[n]=e}for(var n=0,i=arguments.length;n<i;n++)k(arguments[n],e);return t}function R(t,e,n){return k(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 L(t,e,n,i){t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,n&&Object.assign(t.prototype,n)}function E(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:h,isBuffer:c,isFormData:x,isArrayBufferView:u,isString:d,isNumber:f,isObject:g,isPlainObject:p,isUndefined:l,isDate:m,isFile:v,isBlob:w,isFunction:_,isStream:b,isURLSearchParams:S,isStandardBrowserEnv:A,forEach:k,merge:$,extend:R,trim:C,stripBOM:T,inherits:L,toFlatObject:E,kindOf:o,kindOfTest:s,endsWith:M,toArray:O,isTypedArray:D,isFileList:y}},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),h=n(85052),u=n(98270),d=n(81589),f=n(59821),g=n(75762),p=n(14768),m=n(31787).f,v=n(91321),w=n(67567),y=n(56540),_=n(70095),b=n(81441),x=n(56407),S=x.enforce,C=x.get,A=l.Int8Array,k=A&&A.prototype,$=l.Uint8ClampedArray,R=$&&$.prototype,T=A&&w(A),L=k&&w(k),E=Object.prototype,M=l.TypeError,O=_("toStringTag"),D=b("TYPED_ARRAY_TAG"),I="TypedArrayConstructor",P=s&&!!y&&"Opera"!==d(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},N=function(t){if(!h(t))return!1;var e=d(t);return"DataView"===e||u(W,e)||u(B,e)},H=function(t){var e=w(t);if(h(e)){var n=C(e);return n&&u(n,I)?n[I]:H(e)}},U=function(t){if(!h(t))return!1;var e=d(t);return u(W,e)||u(B,e)},z=function(t){if(U(t))return t;throw M("Target is not a typed array")},G=function(t){if(c(t)&&(!y||v(T,t)))return t;throw M(f(t)+" is not a typed array constructor")},j=function(t,e,n,i){if(a){if(n)for(var r in W){var o=l[r];if(o&&u(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(c){}}}L[t]&&!n||p(L,t,n?e:P&&k[t]||e,i)}},V=function(t,e,n){var i,r;if(a){if(y){if(n)for(i in W)if(r=l[i],r&&u(r,t))try{delete r[t]}catch(o){}if(T[t]&&!n)return;try{return p(T,t,n?e:P&&T[t]||e)}catch(o){}}for(i in W)r=l[i],!r||r[t]&&!n||p(r,t,e)}};for(i in W)r=l[i],o=r&&r.prototype,o?S(o)[I]=r:P=!1;for(i in B)r=l[i],o=r&&r.prototype,o&&(S(o)[I]=r);if((!P||!c(T)||T===Function.prototype)&&(T=function(){throw M("Incorrect invocation")},P))for(i in W)l[i]&&y(l[i],T);if((!P||!L||L===E)&&(L=T.prototype,P))for(i in W)l[i]&&y(l[i].prototype,L);if(P&&w(R)!==L&&y(R,L),a&&!u(L,O))for(i in F=!0,m(L,O,{get:function(){return h(this)?this[D]:void 0}}),W)l[i]&&g(l[i],D,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:F&&D,aTypedArray:z,aTypedArrayConstructor:G,exportTypedArrayMethod:j,exportTypedArrayStaticMethod:V,getTypedArrayConstructor:H,isView:N,isTypedArray:U,TypedArray:T,TypedArrayPrototype:L}},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),h=n(24229),u=n(57728),d=n(43329),f=n(34237),g=n(7331),p=n(56201),m=n(67567),v=n(56540),w=n(78151).f,y=n(31787).f,_=n(97065),b=n(69794),x=n(54555),S=n(56407),C=a.PROPER,A=a.CONFIGURABLE,k=S.get,$=S.set,R="ArrayBuffer",T="DataView",L="prototype",E="Wrong length",M="Wrong index",O=i[R],D=O,I=D&&D[L],P=i[T],F=P&&P[L],W=Object.prototype,B=i.Array,N=i.RangeError,H=r(_),U=r([].reverse),z=p.pack,G=p.unpack,j=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 z(t,23,4)},X=function(t){return z(t,52,8)},Z=function(t,e){y(t[L],e,{get:function(){return k(this)[e]}})},Q=function(t,e,n,i){var r=g(n),o=k(t);if(r+e>o.byteLength)throw N(M);var s=k(o.buffer).bytes,a=r+o.byteOffset,l=b(s,a,a+e);return i?l:U(l)},J=function(t,e,n,i,r,o){var s=g(n),a=k(t);if(s+e>a.byteLength)throw N(M);for(var l=k(a.buffer).bytes,c=s+a.byteOffset,h=i(+r),u=0;u<e;u++)l[c+u]=h[o?u:e-u-1]};if(s){var tt=C&&O.name!==R;if(h((function(){O(1)}))&&h((function(){new O(-1)}))&&!h((function(){return new O,new O(1.5),new O(NaN),1!=O.length||tt&&!A})))tt&&A&&l(O,"name",R);else{D=function(t){return u(this,I),new O(g(t))},D[L]=I;for(var et,nt=w(O),it=0;nt.length>it;)(et=nt[it++])in D||l(D,et,O[et]);I.constructor=D}v&&m(F)!==W&&v(F,W);var rt=new P(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){u(this,I);var e=g(t);$(this,{bytes:H(B(e),0),byteLength:e}),o||(this.byteLength=e)},I=D[L],P=function(t,e,n){u(this,F),u(t,I);var i=k(t).byteLength,r=d(e);if(r<0||r>i)throw N("Wrong offset");if(n=void 0===n?i-r:f(n),r+n>i)throw N(E);$(this,{buffer:t,byteLength:n,byteOffset:r}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=r)},F=P[L],o&&(Z(D,"byteLength"),Z(P,"buffer"),Z(P,"byteLength"),Z(P,"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 G(Q(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return G(Q(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){J(this,1,t,j,e)},setUint8:function(t,e){J(this,1,t,j,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)}});x(D,R),x(P,T),t.exports={ArrayBuffer:D,DataView:P}},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),h=r(e,l),u=arguments.length>2?arguments[2]:void 0,d=a((void 0===u?l:r(u,l))-h,l-c),f=1;h<c&&c<h+d&&(f=-1,h+=d-1,c+=d-1);while(d-- >0)h in n?n[c]=n[h]:s(n,c),c+=f,h+=f;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,h,u=o(n),d=r(u),f=i(a,l),g=s(d);while(g-- >0)if(c=d[g],h=f(c,g,u),h)switch(t){case 0:return c;case 1:return g}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,h=!!c&&1/[1].lastIndexOf(1,-0)<0,u=a("lastIndexOf"),d=h||!u;t.exports=d?function(t){if(h)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),h=n(12707),u=n(71832),d=n(7400),f=n(95926).fastKey,g=n(56407),p=g.set,m=g.getterFor;t.exports={getConstructor:function(t,e,n,h){var u=t((function(t,i){a(t,g),p(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),d||(t.size=0),l(i)||c(i,t[h],{that:t,AS_ENTRIES:n})})),g=u.prototype,v=m(e),w=function(t,e,n){var i,r,o=v(t),s=y(t,e);return s?s.value=n:(o.last=s={index:r=f(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},y=function(t,e){var n,i=v(t),r=f(e);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==e)return n};return o(g,{clear:function(){var t=this,e=v(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=v(e),i=y(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=v(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!!y(this,t)}}),o(g,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return w(this,0===t?0:t,e)}}:{add:function(t){return w(this,t=0===t?0:t,t)}}),d&&i(g,"size",{get:function(){return v(this).size}}),u},setStrong:function(t,e,n){var i=e+" Iterator",r=m(e),o=m(i);h(t,e,(function(t,e){p(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)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(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),h=n(89003),u=n(89996),d=n(98270),f=n(56407),g=f.set,p=f.getterFor,m=u.find,v=u.findIndex,w=i([].splice),y=0,_=function(t){return t.frozen||(t.frozen=new b)},b=function(){this.entries=[]},x=function(t,e){return m(t.entries,(function(t){return t[0]===e}))};b.prototype={get:function(t){var e=x(this,t);if(e)return e[1]},has:function(t){return!!x(this,t)},set:function(t,e){var n=x(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&&w(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var u=t((function(t,r){s(t,f),g(t,{type:e,id:y++,frozen:void 0}),l(r)||h(r,t[i],{that:t,AS_ENTRIES:n})})),f=u.prototype,m=p(e),v=function(t,e,n){var i=m(t),r=o(a(e),!0);return!0===r?_(i).set(e,n):r[i.id]=n,t};return r(f,{delete:function(t){var e=m(this);if(!c(t))return!1;var n=o(t);return!0===n?_(e)["delete"](t):n&&d(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?_(e).has(t):n&&d(n,e.id)}}),r(f,n?{get:function(t){var e=m(this);if(c(t)){var n=o(t);return!0===n?_(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)}}),u}}},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),h=n(57728),u=n(26733),d=n(9650),f=n(85052),g=n(24229),p=n(74575),m=n(54555),v=n(20835);t.exports=function(t,e,n){var w=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),_=w?"set":"add",b=r[t],x=b&&b.prototype,S=b,C={},A=function(t){var e=o(x[t]);a(x,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!f(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})},k=s(t,!u(b)||!(y||x.forEach&&!g((function(){(new b).entries().next()}))));if(k)S=n.getConstructor(e,t,w,_),l.enable();else if(s(t,!0)){var $=new S,R=$[_](y?{}:-0,1)!=$,T=g((function(){$.has(1)})),L=p((function(t){new b(t)})),E=!y&&g((function(){var t=new b,e=5;while(e--)t[_](e,e);return!t.has(-0)}));L||(S=e((function(t,e){h(t,x);var n=v(new b,t,S);return d(e)||c(e,n[_],{that:n,AS_ENTRIES:w}),n})),S.prototype=x,x.constructor=S),(T||E)&&(A("delete"),A("has"),w&&A("get")),(E||R)&&A(_),y&&x.clear&&delete x.clear}return C[t]=S,i({global:!0,constructor:!0,forced:S!=b},C),m(S,t),y||n.setStrong(S,t,w),S}},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,h,u,d=e(l),f=8*l-a-1,g=(1<<f)-1,p=g>>1,m=23===a?i(2,-24)-i(2,-77):0,v=t<0||0===t&&1/t<0?1:0,w=0;t=n(t),t!=t||t===1/0?(h=t!=t?1:0,c=g):(c=r(o(t)/s),u=i(2,-c),t*u<1&&(c--,u*=2),t+=c+p>=1?m/u:m*i(2,1-p),t*u>=2&&(c++,u/=2),c+p>=g?(h=0,c=g):c+p>=1?(h=(t*u-1)*i(2,a),c+=p):(h=t*i(2,p-1)*i(2,a),c=0));while(a>=8)d[w++]=255&h,h/=256,a-=8;c=c<<a|h,f+=a;while(f>0)d[w++]=255&c,c/=256,f-=8;return d[--w]|=128*v,d},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,h=t[c--],u=127&h;h>>=7;while(l>0)u=256*u+t[c--],l-=8;n=u&(1<<-l)-1,u>>=-l,l+=e;while(l>0)n=256*n+t[c--],l-=8;if(0===u)u=1-a;else{if(u===s)return n?NaN:h?-1/0:1/0;n+=i(2,e),u-=a}return(h?-1:1)*n*i(2,u-e)};t.exports={pack:a,unpack:l}},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),h=i.parseFloat,u=i.Symbol,d=u&&u.iterator,f=1/h(l+"-0")!==-1/0||d&&!r((function(){h(Object(d))}));t.exports=f?function(t){var e=a(s(t)),n=h(e);return 0===n&&"-"==c(e,0)?-0:n}:h},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),h=Math.ceil,u=function(t){return function(e,n,i){var s,u,d=o(a(e)),f=r(n),g=d.length,p=void 0===i?" ":o(i);return f<=g||""==p?d:(s=f-g,u=l(p,h(s/p.length)),u.length>s&&(u=c(u,0,s)),t?d+u:u+d)}};t.exports={start:u(!1),end:u(!0)}},77321:function(t,e,n){"use strict";var i=n(65968),r=2147483647,o=36,s=1,a=26,l=38,c=700,h=72,u=128,d="-",f=/[^\0-\u007E]/,g=/[.\u3002\uFF0E\uFF61]/g,p="Overflow: input needs wider integers to process",m=o-s,v=RangeError,w=i(g.exec),y=Math.floor,_=String.fromCharCode,b=i("".charCodeAt),x=i([].join),S=i([].push),C=i("".replace),A=i("".split),k=i("".toLowerCase),$=function(t){var e=[],n=0,i=t.length;while(n<i){var r=b(t,n++);if(r>=55296&&r<=56319&&n<i){var o=b(t,n++);56320==(64512&o)?S(e,((1023&r)<<10)+(1023&o)+65536):(S(e,r),n--)}else S(e,r)}return e},R=function(t){return t+22+75*(t<26)},T=function(t,e,n){var i=0;t=n?y(t/c):t>>1,t+=y(t/e);while(t>m*a>>1)t=y(t/m),i+=o;return y(i+(m+1)*t/(t+l))},L=function(t){var e=[];t=$(t);var n,i,l=t.length,c=u,f=0,g=h;for(n=0;n<t.length;n++)i=t[n],i<128&&S(e,_(i));var m=e.length,w=m;m&&S(e,d);while(w<l){var b=r;for(n=0;n<t.length;n++)i=t[n],i>=c&&i<b&&(b=i);var C=w+1;if(b-c>y((r-f)/C))throw v(p);for(f+=(b-c)*C,c=b,n=0;n<t.length;n++){if(i=t[n],i<c&&++f>r)throw v(p);if(i==c){var A=f,k=o;while(1){var L=k<=g?s:k>=g+a?a:k-g;if(A<L)break;var E=A-L,M=o-L;S(e,_(R(L+E%M))),A=y(E/M),k+=o}S(e,_(R(A))),g=T(f,C,w==m),f=0,w++}}f++,c++}return x(e,"")};t.exports=function(t){var e,n,i=[],r=A(C(k(t),g,"."),".");for(e=0;e<r.length;e++)n=r[e],S(i,w(f,n)?"xn--"+L(n):n);return x(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),h=n(57728),u=n(65358),d=n(75762),f=n(82292),g=n(34237),p=n(7331),m=n(84262),v=n(39310),w=n(98270),y=n(81589),_=n(85052),b=n(49395),x=n(22391),S=n(91321),C=n(56540),A=n(78151).f,k=n(35215),$=n(89996).forEach,R=n(71832),T=n(31787),L=n(97933),E=n(56407),M=n(20835),O=E.get,D=E.set,I=E.enforce,P=T.f,F=L.f,W=Math.round,B=r.RangeError,N=c.ArrayBuffer,H=N.prototype,U=c.DataView,z=l.NATIVE_ARRAY_BUFFER_VIEWS,G=l.TYPED_ARRAY_TAG,j=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){P(t,e,{get:function(){return O(this)[e]}})},J=function(t){var e;return S(H,t)||"ArrayBuffer"==(e=y(t))||"SharedArrayBuffer"==e},tt=function(t,e){return Y(t)&&!b(e)&&e in t&&f(+e)&&e>=0},et=function(t,e){return e=v(e),tt(t,e)?u(2,t[e]):F(t,e)},nt=function(t,e,n){return e=v(e),!(tt(t,e)&&_(n)&&w(n,"value"))||w(n,"get")||w(n,"set")||n.configurable||w(n,"writable")&&!n.writable||w(n,"enumerable")&&!n.enumerable?P(t,e,n):(t[e]=n.value,t)};s?(z||(L.f=et,T.f=nt,Q(V,"buffer"),Q(V,"byteOffset"),Q(V,"byteLength"),Q(V,"length")),i({target:"Object",stat:!0,forced:!z},{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,u="set"+t,f=r[l],v=f,w=v&&v.prototype,y={},b=function(t,e){var n=O(t);return n.view[c](e*s+n.byteOffset,!0)},S=function(t,e,i){var r=O(t);n&&(i=(i=W(i))<0?0:i>255?255:255&i),r.view[u](e*s+r.byteOffset,i,!0)},T=function(t,e){P(t,e,{get:function(){return b(this,e)},set:function(t){return S(this,e,t)},enumerable:!0})};z?a&&(v=e((function(t,e,n,i){return h(t,w),M(function(){return _(e)?J(e)?void 0!==i?new f(e,m(n,s),i):void 0!==n?new f(e,m(n,s)):new f(e):Y(e)?Z(v,e):o(k,v,e):new f(p(e))}(),t,v)})),C&&C(v,j),$(A(f),(function(t){t in v||d(v,t,f[t])})),v.prototype=w):(v=e((function(t,e,n,i){h(t,w);var r,a,l,c=0,u=0;if(_(e)){if(!J(e))return Y(e)?Z(v,e):o(k,v,e);r=e,u=m(n,s);var d=e.byteLength;if(void 0===i){if(d%s)throw B(X);if(a=d-u,a<0)throw B(X)}else if(a=g(i)*s,a+u>d)throw B(X);l=a/s}else l=p(e),a=l*s,r=new N(a);D(t,{buffer:r,byteOffset:u,byteLength:a,length:l,view:new U(r)});while(c<l)T(t,c++)})),C&&C(v,j),w=v.prototype=x(V)),w.constructor!==v&&d(w,"constructor",v),I(w).TypedArrayConstructor=v,G&&d(w,G,l);var L=v!=f;y[l]=v,i({global:!0,constructor:!0,forced:L,sham:!z},y),K in v||d(v,K,s),K in w||d(w,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),h=n(91943),u=n(9918).aTypedArrayConstructor;t.exports=function(t){var e,n,d,f,g,p,m=o(this),v=s(t),w=arguments.length,y=w>1?arguments[1]:void 0,_=void 0!==y,b=c(v);if(b&&!h(b)){g=l(v,b),p=g.next,v=[];while(!(f=r(p,g)).done)v.push(f.value)}for(_&&w>2&&(y=i(y,arguments[2])),n=a(v),d=new(u(m))(n),e=0;n>e;e++)d[e]=_?y(v[e],e):v[e];return d}},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}))},30724:function(t,e,n){"use strict";var i=n(23103),r=n(92991),o=n(39646),s=n(43329),a=n(9736);i({target:"Array",proto:!0},{at:function(t){var e=r(this),n=o(e),i=s(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}}),a("at")},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)},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,h=n(91321),u=n(48311),d=n(83326),f=n(83349),g=n(25650),p=n(26060),m=n(14768),v=n(24229),w=n(98270),y=n(56407).enforce,_=n(71832),b=n(70095),x=n(42926),S=n(10461),C=b("match"),A=r.RegExp,k=A.prototype,$=r.SyntaxError,R=o(k.exec),T=o("".charAt),L=o("".replace),E=o("".indexOf),M=o("".slice),O=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,I=/a/g,P=new A(D)!==D,F=g.MISSED_STICKY,W=g.UNSUPPORTED_Y,B=i&&(!P||F||x||S||v((function(){return I[C]=!1,A(D)!=D||A(I)==I||"/a/i"!=A(D,"i")}))),N=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},H=function(t){for(var e,n=t.length,i=0,r="",o=[],s={},a=!1,l=!1,c=0,h="";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(""===h||w(s,h))throw new $("Invalid capture group name");s[h]=!0,o[o.length]=[h,c],l=!1,h="";continue}l?h+=e:r+=e}return[r,o]};if(s("RegExp",B)){for(var U=function(t,e){var n,i,r,o,s,c,g=h(k,this),p=u(t),m=void 0===e,v=[],w=t;if(!g&&p&&m&&t.constructor===U)return t;if((p||h(k,t))&&(t=t.source,m&&(e=f(w))),t=void 0===t?"":d(t),e=void 0===e?"":d(e),w=t,x&&"dotAll"in D&&(i=!!e&&E(e,"s")>-1,i&&(e=L(e,/s/g,""))),n=e,F&&"sticky"in D&&(r=!!e&&E(e,"y")>-1,r&&W&&(e=L(e,/y/g,""))),S&&(o=H(t),t=o[0],v=o[1]),s=a(A(t,e),g?this:k,U),(i||r||v.length)&&(c=y(s),i&&(c.dotAll=!0,c.raw=U(N(t),n)),r&&(c.sticky=!0),v.length&&(c.groups=v)),t!==w)try{l(s,"source",""===w?"(?:)":w)}catch(_){}return s},z=c(A),G=0;z.length>G;)p(U,A,z[G++]);k.constructor=U,U.prototype=k,m(r,"RegExp",U,{constructor:!0})}_("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,h=r&&a((function(){var t=!0;try{l(".","d")}catch(h){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}));h&&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)},6406:function(t,e,n){"use strict";var i=n(23103),r=n(65968),o=n(58885),s=n(43329),a=n(83326),l=n(24229),c=r("".charAt),h=l((function(){return"\ud842"!=="𠮷".at(-2)}));i({target:"String",proto:!0,forced:h},{at:function(t){var e=a(o(this)),n=e.length,i=s(t),r=i>=0?i:n+i;return r<0||r>=n?void 0:c(e,r)}})},96708:function(t,e,n){"use strict";var i=n(23103),r=n(65968),o=n(97933).f,s=n(34237),a=n(83326),l=n(47272),c=n(58885),h=n(48127),u=n(24231),d=r("".endsWith),f=r("".slice),g=Math.min,p=h("endsWith"),m=!u&&!p&&!!function(){var t=o(String.prototype,"endsWith");return t&&!t.writable}();i({target:"String",proto:!0,forced:!m&&!p},{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:g(s(n),i),o=a(t);return d?d(e,o,r):f(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),h=n(83326),u=n(55300),d=n(83349),f=n(70017),g=n(70095),p=n(24231),m=g("replace"),v=TypeError,w=o("".indexOf),y=o("".replace),_=o("".slice),b=Math.max,x=function(t,e,n){return n>t.length?-1:""===e?n:w(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,o,g,S,C,A,k,$,R=s(this),T=0,L=0,E="";if(!l(t)){if(n=c(t),n&&(i=h(s(d(t))),!~w(i,"g")))throw v("`.replaceAll` does not allow non-global regexes");if(o=u(t,m),o)return r(o,t,R,e);if(p&&n)return y(h(R),t,e)}g=h(R),S=h(t),C=a(e),C||(e=h(e)),A=S.length,k=b(1,A),T=x(g,S,0);while(-1!==T)$=C?h(e(S,T,g)):f(S,g,T,[],void 0,e),E+=_(g,L,T)+$,L=T+A,T=x(g,S,T+k);return L<g.length&&(E+=_(g,L)),E}})},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),h=n(55300),u=n(98115);r("search",(function(t,e,n){return[function(e){var n=a(this),r=s(e)?void 0:h(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 h=u(i,r);return l(i.lastIndex,a)||(i.lastIndex=a),null===h?-1:h.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),h=i.aTypedArray,u=i.exportTypedArrayMethod,d=l("".slice),f=c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));u("fill",(function(t){var e=arguments.length;h(this);var n="Big"===d(s(this),0,3)?o(t):+t;return a(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),f)},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"),h=i.Uint8Array,u=o(a.values),d=o(a.keys),f=o(a.entries),g=s.aTypedArray,p=s.exportTypedArrayMethod,m=h&&h.prototype,v=!r((function(){m[c].call([1])})),w=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,y=function(){return u(g(this))};p("entries",(function(){return f(g(this))}),v),p("keys",(function(){return d(g(this))}),v),p("values",y,v||!w,{name:"values"}),p(c,y,v||!w,{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),h=i.RangeError,u=i.Int8Array,d=u&&u.prototype,f=d&&d.set,g=o.aTypedArray,p=o.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return r(f,t,{length:1,0:3},1),3!==t[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new u(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));p("set",(function(t){g(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return r(f,this,n,e);var i=this.length,o=s(n),c=0;if(o+e>i)throw h("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(65968),o=n(24229),s=n(77111),a=n(33867),l=n(9918),c=n(22671),h=n(48506),u=n(6358),d=n(49811),f=l.aTypedArray,g=l.exportTypedArrayMethod,p=i.Uint16Array,m=p&&r(p.prototype.sort),v=!!m&&!(o((function(){m(new p(2),null)}))&&o((function(){m(new p(2),{})}))),w=!!m&&!o((function(){if(u)return u<74;if(c)return c<67;if(h)return!0;if(d)return d<602;var t,e,n=new p(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})),y=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}};g("sort",(function(t){return void 0!==t&&s(t),w?m(this,t):a(f(this),y(t))}),!w||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,h=o.exportTypedArrayMethod,u=[].toLocaleString,d=!!l&&s((function(){u.call(new l(1))})),f=s((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!s((function(){l.prototype.toLocaleString.call([1,2])}));h("toLocaleString",(function(){return r(u,d?a(c(this)):c(this),a(arguments))}),f)},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,h=s([].join);r((function(){c.call({})}))&&(c=function(){return h(this)});var u=l.toString!=c;i("toString",c,u)},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),h=n(85052),u=n(35343),d=n(56407).enforce,f=n(51180),g=!r.ActiveXObject&&"ActiveXObject"in r,p=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},m=l("WeakMap",p,c);if(f&&g){i=c.getConstructor(p,"WeakMap",!0),a.enable();var v=m.prototype,w=o(v["delete"]),y=o(v.has),_=o(v.get),b=o(v.set);s(v,{delete:function(t){if(h(t)&&!u(t)){var e=d(this);return e.frozen||(e.frozen=new i),w(this,t)||e.frozen["delete"](t)}return w(this,t)},has:function(t){if(h(t)&&!u(t)){var e=d(this);return e.frozen||(e.frozen=new i),y(this,t)||e.frozen.has(t)}return y(this,t)},get:function(t){if(h(t)&&!u(t)){var e=d(this);return e.frozen||(e.frozen=new i),y(this,t)?_(this,t):e.frozen.get(t)}return _(this,t)},set:function(t,e){if(h(t)&&!u(t)){var n=d(this);n.frozen||(n.frozen=new i),y(this,t)?b(this,t,e):n.frozen.set(t,e)}else b(this,t,e);return this}})}},52356:function(t,e,n){n(6418)},98882:function(t,e,n){n(57093)},46297:function(t,e,n){n(40171)},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),h=n(8312),u=n(54555),d=n(42247),f=n(56407),g=n(57728),p=n(26733),m=n(98270),v=n(97636),w=n(81589),y=n(21176),_=n(85052),b=n(83326),x=n(22391),S=n(65358),C=n(28403),A=n(78830),k=n(77579),$=n(70095),R=n(33867),T=$("iterator"),L="URLSearchParams",E=L+"Iterator",M=f.set,O=f.getterFor(L),D=f.getterFor(E),I=Object.getOwnPropertyDescriptor,P=function(t){if(!a)return r[t];var e=I(r,t);return e&&e.value},F=P("fetch"),W=P("Request"),B=P("Headers"),N=W&&W.prototype,H=B&&B.prototype,U=r.RegExp,z=r.TypeError,G=r.decodeURIComponent,j=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]=U("((?:%[\\da-f]{2}){"+t+"})","gi"))},it=function(t){try{return G(t)}catch(e){return t}},rt=function(t){var e=K(t,tt," "),n=4;try{return G(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(j(t),ot,at)},ct=d((function(t,e){M(this,{type:E,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),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(_(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===V(t,0)?J(t,1):t:b(t)))};ht.prototype={type:L,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,i,r,s,a,l,c=A(t);if(c){e=C(t,c),n=e.next;while(!(i=o(n,e)).done){if(r=C(y(i.value)),s=r.next,(a=o(s,r)).done||(l=o(s,r)).done||!o(s,r).done)throw z("Expected sequence with length 2");Y(this.entries,{key:b(a.value),value:b(l.value)})}}else for(var h in t)m(t,h)&&Y(this.entries,{key:h,value:b(t[h])})},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 ut=function(){g(this,dt);var t=arguments.length>0?arguments[0]:void 0;M(this,new ht(t))},dt=ut.prototype;if(h(dt,{append:function(t,e){k(arguments.length,2);var n=O(this);Y(n.entries,{key:b(t),value:b(e)}),n.updateURL()},delete:function(t){k(arguments.length,1);var e=O(this),n=e.entries,i=b(t),r=0;while(r<n.length)n[r].key===i?Z(n,r,1):r++;e.updateURL()},get:function(t){k(arguments.length,1);for(var e=O(this).entries,n=b(t),i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){k(arguments.length,1);for(var e=O(this).entries,n=b(t),i=[],r=0;r<e.length;r++)e[r].key===n&&Y(i,e[r].value);return i},has:function(t){k(arguments.length,1);var e=O(this).entries,n=b(t),i=0;while(i<e.length)if(e[i++].key===n)return!0;return!1},set:function(t,e){k(arguments.length,1);for(var n,i=O(this),r=i.entries,o=!1,s=b(t),a=b(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(dt,T,dt.entries,{name:"entries"}),c(dt,"toString",(function(){return O(this).serialize()}),{enumerable:!0}),u(ut,L),i({global:!0,constructor:!0,forced:!l},{URLSearchParams:ut}),!l&&p(B)){var ft=s(H.has),gt=s(H.set),pt=function(t){if(_(t)){var e,n=t.body;if(w(n)===L)return e=t.headers?new B(t.headers):new B,ft(e,"content-type")||gt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),x(t,{body:S(0,b(n)),headers:S(0,e)})}return t};if(p(F)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?pt(arguments[1]):{})}}),p(W)){var mt=function(t){return g(this,N),new W(t,arguments.length>1?pt(arguments[1]):{})};N.constructor=mt,mt.prototype=N,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:mt})}}t.exports={URLSearchParams:ut,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),h=n(14768),u=n(96616),d=n(57728),f=n(98270),g=n(47),p=n(10507),m=n(69794),v=n(30966).codeAt,w=n(77321),y=n(83326),_=n(54555),b=n(77579),x=n(62653),S=n(56407),C=S.set,A=S.getterFor("URL"),k=x.URLSearchParams,$=x.getState,R=a.URL,T=a.TypeError,L=a.parseInt,E=Math.floor,M=Math.pow,O=c("".charAt),D=c(/./.exec),I=c([].join),P=c(1..toString),F=c([].pop),W=c([].push),B=c("".replace),N=c([].shift),H=c("".split),U=c("".slice),z=c("".toLowerCase),G=c([].unshift),j="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=H(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=U(r,8==o?1:2)),""===r)s=0;else{if(!D(10==o?tt:8==o?J:et,r))return t;s=L(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,h=null,u=0,d=function(){return O(t,u)};if(":"==d()){if(":"!=O(t,1))return;u+=2,c++,h=c}while(d()){if(8==c)return;if(":"!=d()){e=n=0;while(n<4&&D(et,d()))e=16*e+L(d(),16),u++,n++;if("."==d()){if(0==n)return;if(u-=n,c>6)return;i=0;while(d()){if(r=null,i>0){if(!("."==d()&&i<4))return;u++}if(!D(Z,d()))return;while(D(Z,d())){if(o=L(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;u++}l[c]=256*l[c]+r,i++,2!=i&&4!=i||c++}if(4!=i)return;break}if(":"==d()){if(u++,!d())return}else if(d())return;l[c++]=e}else{if(null!==h)return;u++,c++,h=c}}if(null!==h){s=c-h,c=7;while(0!=c&&s>0)a=l[c],l[c--]=l[h+s-1],l[h+--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++)G(e,t%256),t=E(t/256);return I(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+=P(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},ht={},ut=g({},ht,{" ":1,'"':1,"<":1,">":1,"`":1}),dt=g({},ut,{"#":1,"?":1,"{":1,"}":1}),ft=g({},dt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gt=function(t,e){var n=v(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},pt={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(U(t,0,2))&&(2==t.length||"/"===(e=O(t,2))||"\\"===e||"?"===e||"#"===e)},wt=function(t){return"."===t||"%2e"===z(t)},yt=function(t){return t=z(t),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},_t={},bt={},xt={},St={},Ct={},At={},kt={},$t={},Rt={},Tt={},Lt={},Et={},Mt={},Ot={},Dt={},It={},Pt={},Ft={},Wt={},Bt={},Nt={},Ht=function(t,e,n){var i,r,o,s=y(t);if(e){if(r=this.parse(s),r)throw T(r);this.searchParams=null}else{if(void 0!==n&&(i=new Ht(n,!0)),r=this.parse(s,null,i),r)throw T(r);o=$(new k),o.bindURL(this),this.searchParams=o}};Ht.prototype={type:"URL",parse:function(t,e,n){var r,o,s,a,l=this,c=e||_t,h=0,u="",d=!1,g=!1,v=!1;t=y(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=p(t);while(h<=r.length){switch(o=r[h],c){case _t:if(!o||!D(K,o)){if(e)return V;c=xt;continue}u+=z(o),c=bt;break;case bt:if(o&&(D(X,o)||"+"==o||"-"==o||"."==o))u+=z(o);else{if(":"!=o){if(e)return V;u="",c=xt,h=0;continue}if(e&&(l.isSpecial()!=f(pt,u)||"file"==u&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=u,e)return void(l.isSpecial()&&pt[l.scheme]==l.port&&(l.port=null));u="","file"==l.scheme?c=Ot:l.isSpecial()&&n&&n.scheme==l.scheme?c=St:l.isSpecial()?c=$t:"/"==r[h+1]?(c=Ct,h++):(l.cannotBeABaseURL=!0,W(l.path,""),c=Wt)}break;case xt: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=Nt;break}c="file"==n.scheme?Ot:At;continue;case St:if("/"!=o||"/"!=r[h+1]){c=At;continue}c=Rt,h++;break;case Ct:if("/"==o){c=Tt;break}c=Ft;continue;case At: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=kt;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=Nt}break;case kt: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(u,h+1))continue;h++;break;case Rt:if("/"!=o&&"\\"!=o){c=Tt;continue}break;case Tt:if("@"==o){d&&(u="%40"+u),d=!0,s=p(u);for(var w=0;w<s.length;w++){var _=s[w];if(":"!=_||v){var b=gt(_,ft);v?l.password+=b:l.username+=b}else v=!0}u=""}else if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&l.isSpecial()){if(d&&""==u)return j;h-=p(u).length+1,u="",c=Lt}else u+=o;break;case Lt:case Et:if(e&&"file"==l.scheme){c=It;continue}if(":"!=o||g){if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&l.isSpecial()){if(l.isSpecial()&&""==u)return q;if(e&&""==u&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(u),a)return a;if(u="",c=Pt,e)return;continue}"["==o?g=!0:"]"==o&&(g=!1),u+=o}else{if(""==u)return q;if(a=l.parseHost(u),a)return a;if(u="",c=Mt,e==Et)return}break;case Mt:if(!D(Z,o)){if(o==i||"/"==o||"?"==o||"#"==o||"\\"==o&&l.isSpecial()||e){if(""!=u){var x=L(u,10);if(x>65535)return Y;l.port=l.isSpecial()&&x===pt[l.scheme]?null:x,u=""}if(e)return;c=Pt;continue}return Y}u+=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(I(m(r,h),""))||(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=Nt}}break;case Dt:if("/"==o||"\\"==o){c=It;break}n&&"file"==n.scheme&&!vt(I(m(r,h),""))&&(mt(n.path[0],!0)?W(l.path,n.path[0]):l.host=n.host),c=Ft;continue;case It:if(o==i||"/"==o||"\\"==o||"?"==o||"#"==o){if(!e&&mt(u))c=Ft;else if(""==u){if(l.host="",e)return;c=Pt}else{if(a=l.parseHost(u),a)return a;if("localhost"==l.host&&(l.host=""),e)return;u="",c=Pt}continue}u+=o;break;case Pt: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=Nt;else l.query="",c=Bt;break;case Ft:if(o==i||"/"==o||"\\"==o&&l.isSpecial()||!e&&("?"==o||"#"==o)){if(yt(u)?(l.shortenPath(),"/"==o||"\\"==o&&l.isSpecial()||W(l.path,"")):wt(u)?"/"==o||"\\"==o&&l.isSpecial()||W(l.path,""):("file"==l.scheme&&!l.path.length&&mt(u)&&(l.host&&(l.host=""),u=O(u,0)+":"),W(l.path,u)),u="","file"==l.scheme&&(o==i||"?"==o||"#"==o))while(l.path.length>1&&""===l.path[0])N(l.path);"?"==o?(l.query="",c=Bt):"#"==o&&(l.fragment="",c=Nt)}else u+=gt(o,dt);break;case Wt:"?"==o?(l.query="",c=Bt):"#"==o?(l.fragment="",c=Nt):o!=i&&(l.path[0]+=gt(o,ht));break;case Bt:e||"#"!=o?o!=i&&("'"==o&&l.isSpecial()?l.query+="%27":l.query+="#"==o?"%23":gt(o,ht)):(l.fragment="",c=Nt);break;case Nt:o!=i&&(l.fragment+=gt(o,ut));break}h++}},parseHost:function(t){var e,n,i;if("["==O(t,0)){if("]"!=O(t,t.length-1))return q;if(e=at(U(t,1,-1)),!e)return q;this.host=e}else if(this.isSpecial()){if(t=w(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=p(t),i=0;i<n.length;i++)e+=gt(n[i],ht);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(pt,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?"/"+I(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 Ut(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(y(t)+":",_t)},getUsername:function(){return this.username},setUsername:function(t){var e=p(y(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=gt(e[n],ft)}},getPassword:function(){return this.password},setPassword:function(t){var e=p(y(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=gt(e[n],ft)}},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,Lt)},getHostname:function(){var t=this.host;return null===t?"":ct(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Et)},getPort:function(){var t=this.port;return null===t?"":y(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(t=y(t),""==t?this.port=null:this.parse(t,Mt))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+I(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Pt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){t=y(t),""==t?this.query=null:("?"==O(t,0)&&(t=U(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=y(t),""!=t?("#"==O(t,0)&&(t=U(t,1)),this.fragment="",this.parse(t,Nt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ut=function(t){var e=d(this,zt),n=b(arguments.length,1)>1?arguments[1]:void 0,i=C(e,new Ht(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())},zt=Ut.prototype,Gt=function(t,e){return{get:function(){return A(this)[t]()},set:e&&function(t){return A(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(u(zt,"href",Gt("serialize","setHref")),u(zt,"origin",Gt("getOrigin")),u(zt,"protocol",Gt("getProtocol","setProtocol")),u(zt,"username",Gt("getUsername","setUsername")),u(zt,"password",Gt("getPassword","setPassword")),u(zt,"host",Gt("getHost","setHost")),u(zt,"hostname",Gt("getHostname","setHostname")),u(zt,"port",Gt("getPort","setPort")),u(zt,"pathname",Gt("getPathname","setPathname")),u(zt,"search",Gt("getSearch","setSearch")),u(zt,"searchParams",Gt("getSearchParams")),u(zt,"hash",Gt("getHash","setHash"))),h(zt,"toJSON",(function(){return A(this).serialize()}),{enumerable:!0}),h(zt,"toString",(function(){return A(this).serialize()}),{enumerable:!0}),R){var jt=R.createObjectURL,Vt=R.revokeObjectURL;jt&&h(Ut,"createObjectURL",l(jt,R)),Vt&&h(Ut,"revokeObjectURL",l(Vt,R))}_(Ut,"URL"),r({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ut})},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:-webkit-min-content;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 j}});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}}"},h={date:s({formats:a,defaultWidth:"full"}),time:s({formats:l,defaultWidth:"full"}),dateTime:s({formats:c,defaultWidth:"full"})},u=h,d={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},f=function(t,e,n,i){return d[t]},g=f;function p(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"]},w={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"]},y={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"]},_={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"}},b={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"}},x=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"},S={ordinalNumber:x,era:p({values:m,defaultWidth:"wide"}),quarter:p({values:v,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:p({values:w,defaultWidth:"wide"}),day:p({values:y,defaultWidth:"wide"}),dayPeriod:p({values:_,defaultWidth:"wide",formattingValues:b,defaultFormattingWidth:"wide"})},C=S;function A(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)})):k(l,(function(t){return t.test(a)}));s=t.valueCallback?t.valueCallback(c):c,s=n.valueCallback?n.valueCallback(s):s;var h=e.slice(a.length);return{value:s,rest:h}}}function k(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,L=/\d+/i,E={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]},I={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},P={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},N={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}},H={ordinalNumber:R({matchPattern:T,parsePattern:L,valueCallback:function(t){return parseInt(t,10)}}),era:A({matchPatterns:E,defaultMatchWidth:"wide",parsePatterns:M,defaultParseWidth:"any"}),quarter:A({matchPatterns:O,defaultMatchWidth:"wide",parsePatterns:D,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:A({matchPatterns:I,defaultMatchWidth:"wide",parsePatterns:P,defaultParseWidth:"any"}),day:A({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:W,defaultParseWidth:"any"}),dayPeriod:A({matchPatterns:B,defaultMatchWidth:"any",parsePatterns:N,defaultParseWidth:"any"})},U=H,z={code:"en-US",formatDistance:o,formatLong:u,formatRelative:g,localize:C,match:U,options:{weekStartsOn:0,firstWeekContainsDate:1}},G=z,j=G},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 u}});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,h,u,d,f,g;(0,s.Z)(1,arguments);var p=(0,l.j)(),m=(0,a.Z)(null!==(n=null!==(i=null!==(c=null!==(h=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==h?h:null===e||void 0===e||null===(u=e.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==c?c:p.firstWeekContainsDate)&&void 0!==i?i:null===(f=p.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==n?n:1),v=(0,o.Z)(t,e),w=new Date(0);w.setUTCFullYear(v,0,m),w.setUTCHours(0,0,0,0);var y=(0,r.Z)(w,e);return y}var h=6048e5;function u(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/h)+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,h,u,d,f,g;(0,r.Z)(1,arguments);var p=(0,i.Z)(t),m=p.getUTCFullYear(),v=(0,a.j)(),w=(0,s.Z)(null!==(n=null!==(l=null!==(c=null!==(h=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==h?h:null===e||void 0===e||null===(u=e.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==l?l:null===(f=v.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==n?n:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(m+1,0,w),y.setUTCHours(0,0,0,0);var _=(0,o.Z)(y,e),b=new Date(0);b.setUTCFullYear(m,0,w),b.setUTCHours(0,0,0,0);var x=(0,o.Z)(b,e);return p.getTime()>=_.getTime()?m+1:p.getTime()>=x.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,h,u,d,f;(0,r.Z)(1,arguments);var g=(0,s.j)(),p=(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===(h=e.locale)||void 0===h||null===(u=h.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==l?l:g.weekStartsOn)&&void 0!==a?a:null===(d=g.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,i.Z)(t),v=m.getUTCDay(),w=(v<p?7:0)+v-p;return m.setUTCDate(m.getUTCDate()-w),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),h=n(90257),u=n(46733),d=n(72763);function f(t,e){var n=t<0?"-":"",i=Math.abs(t).toString();while(i.length<e)i="0"+i;return n+i}var g={y:function(t,e){var n=t.getUTCFullYear(),i=n>0?n:1-n;return f("yy"===e?i%100:i,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):f(n+1,2)},d:function(t,e){return f(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 f(t.getUTCHours()%12||12,e.length)},H:function(t,e){return f(t.getUTCHours(),e.length)},m:function(t,e){return f(t.getUTCMinutes(),e.length)},s:function(t,e){return f(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 f(r,e.length)}},p=g,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 p.y(t,e)},Y:function(t,e,n,i){var r=(0,d.Z)(t,i),o=r>0?r:1-r;if("YY"===e){var s=o%100;return f(s,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):f(o,e.length)},R:function(t,e){var n=(0,h.Z)(t);return f(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return f(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 f(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 f(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 p.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 f(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,u.Z)(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):f(r,e.length)},I:function(t,e,n){var i=(0,c.Z)(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):f(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):p.d(t,e)},D:function(t,e,n){var i=l(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):f(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 f(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 f(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 f(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 p.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):p.H(t,e)},K:function(t,e,n){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):f(i,e.length)},k:function(t,e,n){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):f(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):p.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):p.s(t,e)},S:function(t,e){return p.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 y(o);case"XXXX":case"XX":return _(o);case"XXXXX":case"XXX":default:return _(o,":")}},x:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"x":return y(o);case"xxxx":case"xx":return _(o);case"xxxxx":case"xxx":default:return _(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"+w(o,":");case"OOOO":default:return"GMT"+_(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"+w(o,":");case"zzzz":default:return"GMT"+_(o,":")}},t:function(t,e,n,i){var r=i._originalDate||t,o=Math.floor(r.getTime()/1e3);return f(o,e.length)},T:function(t,e,n,i){var r=i._originalDate||t,o=r.getTime();return f(o,e.length)}};function w(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+f(o,2)}function y(t,e){if(t%60===0){var n=t>0?"-":"+";return n+f(Math.abs(t)/60,2)}return _(t,e)}function _(t,e){var n=e||"",i=t>0?"-":"+",r=Math.abs(t),o=f(Math.floor(r/60),2),s=f(r%60,2);return i+o+n+s}var b=v,x=n(60429),S=n(1645),C=n(13503),A=n(42765),k=n(18667),$=n(15344),R=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,T=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L=/^'([^]*?)'?$/,E=/''/g,M=/[a-zA-Z]/;function O(t,e,n){var a,l,c,h,u,d,f,g,p,m,v,w,y,_,L,E,O,I;(0,s.Z)(2,arguments);var P=String(e),F=(0,k.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,A.Z)(null!==(c=null!==(h=null!==(u=null!==(d=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==d?d:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==u?u:F.firstWeekContainsDate)&&void 0!==h?h:null===(p=F.locale)||void 0===p||null===(m=p.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 N=(0,A.Z)(null!==(v=null!==(w=null!==(y=null!==(_=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==_?_:null===n||void 0===n||null===(L=n.locale)||void 0===L||null===(E=L.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==y?y:F.weekStartsOn)&&void 0!==w?w:null===(O=F.locale)||void 0===O||null===(I=O.options)||void 0===I?void 0:I.weekStartsOn)&&void 0!==v?v:0);if(!(N>=0&&N<=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 H=(0,o.Z)(t);if(!(0,i.Z)(H))throw new RangeError("Invalid time value");var U=(0,S.Z)(H),z=(0,r.Z)(H,U),G={firstWeekContainsDate:B,weekStartsOn:N,locale:W,_originalDate:H},j=P.match(T).map((function(t){var e=t[0];if("p"===e||"P"===e){var n=x.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=b[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(z,i,W.localize,G);if(r.match(M))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return i})).join("");return j}function D(t){var e=t.match(L);return e?e[1].replace(E,"'"):t}},31200:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(19785);function r(t){return(0,i.Z)(1,arguments),t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t)}var o=n(66700);function s(t){if((0,i.Z)(1,arguments),!r(t)&&"number"!==typeof t)return!1;var e=(0,o.Z)(t);return!isNaN(Number(e))}},10247:function(t,e,n){"use strict";n.d(e,{Z:function(){return se}});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),h=n(42765),u=n(19785);function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=10;class g{constructor(){d(this,"priority",void 0),d(this,"subPriority",0)}validate(t,e){return!0}}class p extends g{constructor(t,e,n,i,r){super(),this.value=t,this.validateValue=e,this.setValue=n,this.priority=i,r&&(this.subPriority=r)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,n){return this.setValue(t,e,this.value,n)}}class m extends g{constructor(){super(...arguments),d(this,"priority",f),d(this,"subPriority",-1)}set(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}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class w{constructor(){v(this,"incompatibleTokens",void 0),v(this,"priority",void 0),v(this,"subPriority",void 0)}run(t,e,n,i){var r=this.parse(t,e,n,i);return r?{setter:new p(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,e,n){return!0}}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class _ extends w{constructor(){super(...arguments),y(this,"priority",140),y(this,"incompatibleTokens",["R","u","t","T"])}parse(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"})}}set(t,e,n){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}Math.pow(10,8);var b=6e4,x=36e5,S=1e3,C={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}/},A={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 k(t,e){return t?{value:e(t.value),rest:t.rest}:t}function $(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function R(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*x+o*b+s*S),rest:e.slice(n[0].length)}}function T(t){return $(C.anyDigitsSigned,t)}function L(t,e){switch(t){case 1:return $(C.singleDigit,e);case 2:return $(C.twoDigits,e);case 3:return $(C.threeDigits,e);case 4:return $(C.fourDigits,e);default:return $(new RegExp("^\\d{1,"+t+"}"),e)}}function E(t,e){switch(t){case 1:return $(C.singleDigitSigned,e);case 2:return $(C.twoDigitsSigned,e);case 3:return $(C.threeDigitsSigned,e);case 4:return $(C.fourDigitsSigned,e);default:return $(new RegExp("^-?\\d{1,"+t+"}"),e)}}function M(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 O(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 D(t){return t%400===0||t%4===0&&t%100!==0}function I(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class P extends w{constructor(){super(...arguments),I(this,"priority",130),I(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return k(L(4,t),i);case"yo":return k(n.ordinalNumber(t,{unit:"year"}),i);default:return k(L(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n){var i=t.getUTCFullYear();if(n.isTwoDigitYear){var r=O(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}}var F=n(72763),W=n(52329);function B(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class N extends w{constructor(){super(...arguments),B(this,"priority",130),B(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return k(L(4,t),i);case"Yo":return k(n.ordinalNumber(t,{unit:"year"}),i);default:return k(L(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n,i){var r=(0,F.Z)(t,i);if(n.isTwoDigitYear){var o=O(n.year,r);return t.setUTCFullYear(o,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,W.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,W.Z)(t,i)}}var H=n(55143);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}class z extends w{constructor(){super(...arguments),U(this,"priority",130),U(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return E("R"===e?4:e.length,t)}set(t,e,n){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),(0,H.Z)(i)}}function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class j extends w{constructor(){super(...arguments),G(this,"priority",130),G(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return E("u"===e?4:e.length,t)}set(t,e,n){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}function V(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class q extends w{constructor(){super(...arguments),V(this,"priority",120),V(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,n){switch(e){case"Q":case"QQ":return L(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"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}function Y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class K extends w{constructor(){super(...arguments),Y(this,"priority",120),Y(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,n){switch(e){case"q":case"qq":return L(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"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),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}class Z extends w{constructor(){super(...arguments),X(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),X(this,"priority",110)}parse(t,e,n){var i=function(t){return t-1};switch(e){case"M":return k($(C.month,t),i);case"MM":return k(L(2,t),i);case"Mo":return k(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"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}function Q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class J extends w{constructor(){super(...arguments),Q(this,"priority",110),Q(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,n){var i=function(t){return t-1};switch(e){case"L":return k($(C.month,t),i);case"LL":return k(L(2,t),i);case"Lo":return k(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"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}var tt=n(46733);function et(t,e,n){(0,u.Z)(2,arguments);var i=(0,o.Z)(t),r=(0,h.Z)(e),s=(0,tt.Z)(i,n)-r;return i.setUTCDate(i.getUTCDate()-7*s),i}function nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class it extends w{constructor(){super(...arguments),nt(this,"priority",100),nt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,n){switch(e){case"w":return $(C.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return L(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n,i){return(0,W.Z)(et(t,n,i),i)}}var rt=n(17898);function ot(t,e){(0,u.Z)(2,arguments);var n=(0,o.Z)(t),i=(0,h.Z)(e),r=(0,rt.Z)(n)-i;return n.setUTCDate(n.getUTCDate()-7*r),n}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class at extends w{constructor(){super(...arguments),st(this,"priority",100),st(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,n){switch(e){case"I":return $(C.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return L(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n){return(0,H.Z)(ot(t,n))}}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 ct=[31,28,31,30,31,30,31,31,30,31,30,31],ht=[31,29,31,30,31,30,31,31,30,31,30,31];class ut extends w{constructor(){super(...arguments),lt(this,"priority",90),lt(this,"subPriority",1),lt(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,n){switch(e){case"d":return $(C.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return L(e.length,t)}}validate(t,e){var n=t.getUTCFullYear(),i=D(n),r=t.getUTCMonth();return i?e>=1&&e<=ht[r]:e>=1&&e<=ct[r]}set(t,e,n){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t}}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ft extends w{constructor(){super(...arguments),dt(this,"priority",90),dt(this,"subpriority",1),dt(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,n){switch(e){case"D":case"DD":return $(C.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return L(e.length,t)}}validate(t,e){var n=t.getUTCFullYear(),i=D(n);return i?e>=1&&e<=366:e>=1&&e<=365}set(t,e,n){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t}}var gt=n(18667);function pt(t,e,n){var i,r,s,a,l,c,d,f;(0,u.Z)(2,arguments);var g=(0,gt.j)(),p=(0,h.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:g.weekStartsOn)&&void 0!==r?r:null===(d=g.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,o.Z)(t),v=(0,h.Z)(e),w=m.getUTCDay(),y=v%7,_=(y+7)%7,b=(_<p?7:0)+v-w;return m.setUTCDate(m.getUTCDate()+b),m}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}class vt extends w{constructor(){super(...arguments),mt(this,"priority",90),mt(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(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"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=pt(t,n,i),t.setUTCHours(0,0,0,0),t}}function wt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class yt extends w{constructor(){super(...arguments),wt(this,"priority",90),wt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(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 k(L(e.length,t),r);case"eo":return k(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"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=pt(t,n,i),t.setUTCHours(0,0,0,0),t}}function _t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class bt extends w{constructor(){super(...arguments),_t(this,"priority",90),_t(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(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 k(L(e.length,t),r);case"co":return k(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"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=pt(t,n,i),t.setUTCHours(0,0,0,0),t}}function xt(t,e){(0,u.Z)(2,arguments);var n=(0,h.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 St(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ct extends w{constructor(){super(...arguments),St(this,"priority",90),St(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,n){var i=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return L(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return k(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 k(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return k(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return k(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)}}validate(t,e){return e>=1&&e<=7}set(t,e,n){return t=xt(t,n),t.setUTCHours(0,0,0,0),t}}function At(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class kt extends w{constructor(){super(...arguments),At(this,"priority",80),At(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(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"})}}set(t,e,n){return t.setUTCHours(M(n),0,0,0),t}}function $t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Rt extends w{constructor(){super(...arguments),$t(this,"priority",80),$t(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(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"})}}set(t,e,n){return t.setUTCHours(M(n),0,0,0),t}}function Tt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Lt extends w{constructor(){super(...arguments),Tt(this,"priority",80),Tt(this,"incompatibleTokens",["a","b","t","T"])}parse(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"})}}set(t,e,n){return t.setUTCHours(M(n),0,0,0),t}}function Et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Mt extends w{constructor(){super(...arguments),Et(this,"priority",70),Et(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,n){switch(e){case"h":return $(C.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return L(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(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}}function Ot(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Dt extends w{constructor(){super(...arguments),Ot(this,"priority",70),Ot(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,n){switch(e){case"H":return $(C.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return L(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,n){return t.setUTCHours(n,0,0,0),t}}function It(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Pt extends w{constructor(){super(...arguments),It(this,"priority",70),It(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,n){switch(e){case"K":return $(C.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return L(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(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}}function Ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Wt extends w{constructor(){super(...arguments),Ft(this,"priority",70),Ft(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,n){switch(e){case"k":return $(C.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return L(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,n){var i=n<=24?n%24:n;return t.setUTCHours(i,0,0,0),t}}function Bt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Nt extends w{constructor(){super(...arguments),Bt(this,"priority",60),Bt(this,"incompatibleTokens",["t","T"])}parse(t,e,n){switch(e){case"m":return $(C.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return L(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setUTCMinutes(n,0,0),t}}function Ht(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ut extends w{constructor(){super(...arguments),Ht(this,"priority",50),Ht(this,"incompatibleTokens",["t","T"])}parse(t,e,n){switch(e){case"s":return $(C.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return L(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setUTCSeconds(n,0),t}}function zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Gt extends w{constructor(){super(...arguments),zt(this,"priority",30),zt(this,"incompatibleTokens",["t","T"])}parse(t,e){var n=function(t){return Math.floor(t*Math.pow(10,3-e.length))};return k(L(e.length,t),n)}set(t,e,n){return t.setUTCMilliseconds(n),t}}function jt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Vt extends w{constructor(){super(...arguments),jt(this,"priority",10),jt(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return R(A.basicOptionalMinutes,t);case"XX":return R(A.basic,t);case"XXXX":return R(A.basicOptionalSeconds,t);case"XXXXX":return R(A.extendedOptionalSeconds,t);case"XXX":default:return R(A.extended,t)}}set(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}function qt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Yt extends w{constructor(){super(...arguments),qt(this,"priority",10),qt(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return R(A.basicOptionalMinutes,t);case"xx":return R(A.basic,t);case"xxxx":return R(A.basicOptionalSeconds,t);case"xxxxx":return R(A.extendedOptionalSeconds,t);case"xxx":default:return R(A.extended,t)}}set(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}function Kt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Xt extends w{constructor(){super(...arguments),Kt(this,"priority",40),Kt(this,"incompatibleTokens","*")}parse(t){return T(t)}set(t,e,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Qt extends w{constructor(){super(...arguments),Zt(this,"priority",20),Zt(this,"incompatibleTokens","*")}parse(t){return T(t)}set(t,e,n){return[new Date(n),{timestampIsSet:!0}]}}var Jt={G:new _,y:new P,Y:new N,R:new z,u:new j,Q:new q,q:new K,M:new Z,L:new J,w:new it,I:new at,d:new ut,D:new ft,E:new vt,e:new yt,c:new bt,i:new Ct,a:new kt,b:new Rt,B:new Lt,h:new Mt,H:new Dt,K:new Pt,k:new Wt,m:new Nt,s:new Ut,S:new Gt,X:new Vt,x:new Yt,t:new Xt,T:new Qt},te=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ne=/^'([^]*?)'?$/,ie=/''/g,re=/\S/,oe=/[a-zA-Z]/;function se(t,e,n,d){var f,g,p,v,w,y,_,b,x,S,C,A,k,$,R,T,L,E;(0,u.Z)(3,arguments);var M=String(t),O=String(e),D=(0,gt.j)(),I=null!==(f=null!==(g=null===d||void 0===d?void 0:d.locale)&&void 0!==g?g:D.locale)&&void 0!==f?f:i.Z;if(!I.match)throw new RangeError("locale must contain match property");var P=(0,h.Z)(null!==(p=null!==(v=null!==(w=null!==(y=null===d||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==y?y:null===d||void 0===d||null===(_=d.locale)||void 0===_||null===(b=_.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==w?w:D.firstWeekContainsDate)&&void 0!==v?v:null===(x=D.locale)||void 0===x||null===(S=x.options)||void 0===S?void 0:S.firstWeekContainsDate)&&void 0!==p?p:1);if(!(P>=1&&P<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=(0,h.Z)(null!==(C=null!==(A=null!==(k=null!==($=null===d||void 0===d?void 0:d.weekStartsOn)&&void 0!==$?$:null===d||void 0===d||null===(R=d.locale)||void 0===R||null===(T=R.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==k?k:D.weekStartsOn)&&void 0!==A?A:null===(L=D.locale)||void 0===L||null===(E=L.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==C?C: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={firstWeekContainsDate:P,weekStartsOn:F,locale:I},B=[new m],N=O.match(ee).map((function(t){var e=t[0];if(e in a.Z){var n=a.Z[e];return n(t,I.formatLong)}return t})).join("").match(te),H=[],U=function(e){null!==d&&void 0!==d&&d.useAdditionalWeekYearTokens||!(0,c.Do)(e)||(0,c.qp)(e,O,t),null!==d&&void 0!==d&&d.useAdditionalDayOfYearTokens||!(0,c.Iu)(e)||(0,c.qp)(e,O,t);var n=e[0],i=Jt[n];if(i){var r=i.incompatibleTokens;if(Array.isArray(r)){var o=H.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&&H.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));H.push({token:n,fullToken:e});var s=i.run(M,e,I.match,W);if(!s)return z=e,{v:new Date(NaN)};B.push(s.setter),M=s.rest}else{if(n.match(oe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===e?e="'":"'"===n&&(e=ae(e)),0!==M.indexOf(e))return z=e,{v:new Date(NaN)};M=M.slice(e.length)}z=e};for(var z of N){var G=U(z);if("object"===typeof G)return G.v}if(M.length>0&&re.test(M))return new Date(NaN);var j=B.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 B.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),V=(0,o.Z)(n);if(isNaN(V.getTime()))return new Date(NaN);var q=(0,r.Z)(V,(0,l.Z)(V)),Y={};for(var K of j){if(!K.validate(q,W))return new Date(NaN);var X=K.set(q,Y,W);Array.isArray(X)?(q=X[0],s(Y,X[1])):q=X}return q}function ae(t){return t.match(ne)[1].replace(ie,"'")}},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 r}});var i=n(19785);function r(t){(0,i.Z)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===typeof 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 h(t){if("string"==typeof t)return t;if(o(t))return r(t,h)+"";if(s(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}t.exports=h},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]",h="(?:"+l+"|"+c+")",u="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",p=h+"?",m="["+s+"]?",v="(?:"+g+"(?:"+[u,d,f].join("|")+")"+m+p+")*",w=m+p+v,y="(?:"+[u+l+"?",l,d,f,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+y+w,"g");function b(t){return t.match(_)||[]}t.exports=b},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",h="\\u2000-\\u206f",u=" \\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",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",g=l+c+h+u,p="['’]",m="["+g+"]",v="["+o+"]",w="\\d+",y="["+s+"]",_="["+a+"]",b="[^"+e+g+w+s+a+d+"]",x="\\ud83c[\\udffb-\\udfff]",S="(?:"+v+"|"+x+")",C="[^"+e+"]",A="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+d+"]",R="\\u200d",T="(?:"+_+"|"+b+")",L="(?:"+$+"|"+b+")",E="(?:"+p+"(?:d|ll|m|re|s|t|ve))?",M="(?:"+p+"(?:D|LL|M|RE|S|T|VE))?",O=S+"?",D="["+f+"]?",I="(?:"+R+"(?:"+[C,A,k].join("|")+")"+D+O+")*",P="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",F="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",W=D+O+I,B="(?:"+[y,A,k].join("|")+")"+W,N=RegExp([$+"?"+_+"+"+E+"(?="+[m,$,"$"].join("|")+")",L+"+"+M+"(?="+[m,$+T,"$"].join("|")+")",$+"?"+T+"+"+E,$+"+"+M,F,P,w,B].join("|"),"g");function H(t){return t.match(N)||[]}t.exports=H},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,h="["+c+"]",u=RegExp(h,"g");function d(t){return t=r(t),t&&t.replace(o,i).replace(u,"")}t.exports=d},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`",h="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",f=1,g=2,p=4,m=1,v=2,w=1,y=2,_=4,b=8,x=16,S=32,C=64,A=128,k=256,$=512,R=30,T="...",L=800,E=16,M=1,O=2,D=3,I=1/0,P=9007199254740991,F=17976931348623157e292,W=NaN,B=4294967295,N=B-1,H=B>>>1,U=[["ary",A],["bind",w],["bindKey",y],["curry",b],["curryRight",x],["flip",$],["partial",S],["partialRight",C],["rearg",k]],z="[object Arguments]",G="[object Array]",j="[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]",ht="[object WeakSet]",ut="[object ArrayBuffer]",dt="[object DataView]",ft="[object Float32Array]",gt="[object Float64Array]",pt="[object Int8Array]",mt="[object Int16Array]",vt="[object Int32Array]",wt="[object Uint8Array]",yt="[object Uint8ClampedArray]",_t="[object Uint16Array]",bt="[object Uint32Array]",xt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,Ct=/(__e\(.*?\)|\b__t\)) \+\n'';/g,At=/&(?:amp|lt|gt|quot|#39);/g,kt=/[&<>"']/g,$t=RegExp(At.source),Rt=RegExp(kt.source),Tt=/<%-([\s\S]+?)%>/g,Lt=/<%([\s\S]+?)%>/g,Et=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,It=/[\\^$.*+?()[\]{}|]/g,Pt=RegExp(It.source),Ft=/^\s+/,Wt=/\s/,Bt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Nt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ht=/,? & /,Ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/[()=,{}\[\]\/\s]/,Gt=/\\(\\)?/g,jt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/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",he="\\u2000-\\u206f",ue=" \\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",de="A-Z\\xc0-\\xd6\\xd8-\\xde",fe="\\ufe0e\\ufe0f",ge=le+ce+he+ue,pe="['’]",me="["+ee+"]",ve="["+ge+"]",we="["+oe+"]",ye="\\d+",_e="["+se+"]",be="["+ae+"]",xe="[^"+ee+ge+ye+se+ae+de+"]",Se="\\ud83c[\\udffb-\\udfff]",Ce="(?:"+we+"|"+Se+")",Ae="[^"+ee+"]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+de+"]",Te="\\u200d",Le="(?:"+be+"|"+xe+")",Ee="(?:"+Re+"|"+xe+")",Me="(?:"+pe+"(?:d|ll|m|re|s|t|ve))?",Oe="(?:"+pe+"(?:D|LL|M|RE|S|T|VE))?",De=Ce+"?",Ie="["+fe+"]?",Pe="(?:"+Te+"(?:"+[Ae,ke,$e].join("|")+")"+Ie+De+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",We="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=Ie+De+Pe,Ne="(?:"+[_e,ke,$e].join("|")+")"+Be,He="(?:"+[Ae+we+"?",we,ke,$e,me].join("|")+")",Ue=RegExp(pe,"g"),ze=RegExp(we,"g"),Ge=RegExp(Se+"(?="+Se+")|"+He+Be,"g"),je=RegExp([Re+"?"+be+"+"+Me+"(?="+[ve,Re,"$"].join("|")+")",Ee+"+"+Oe+"(?="+[ve,Re+Le,"$"].join("|")+")",Re+"?"+Le+"+"+Me,Re+"+"+Oe,We,Fe,ye,Ne].join("|"),"g"),Ve=RegExp("["+Te+ee+oe+fe+"]"),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[ft]=Xe[gt]=Xe[pt]=Xe[mt]=Xe[vt]=Xe[wt]=Xe[yt]=Xe[_t]=Xe[bt]=!0,Xe[z]=Xe[G]=Xe[ut]=Xe[V]=Xe[dt]=Xe[q]=Xe[K]=Xe[X]=Xe[Q]=Xe[J]=Xe[et]=Xe[rt]=Xe[ot]=Xe[st]=Xe[ct]=!1;var Ze={};Ze[z]=Ze[G]=Ze[ut]=Ze[dt]=Ze[V]=Ze[q]=Ze[ft]=Ze[gt]=Ze[pt]=Ze[mt]=Ze[vt]=Ze[Q]=Ze[J]=Ze[et]=Ze[rt]=Ze[ot]=Ze[st]=Ze[at]=Ze[wt]=Ze[yt]=Ze[_t]=Ze[bt]=!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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},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,hn=cn&&cn.exports===ln,un=hn&&on.process,dn=function(){try{var t=cn&&cn.require&&cn.require("util").types;return t||un&&un.binding&&un.binding("util")}catch(e){}}(),fn=dn&&dn.isArrayBuffer,gn=dn&&dn.isDate,pn=dn&&dn.isMap,mn=dn&&dn.isRegExp,vn=dn&&dn.isSet,wn=dn&&dn.isTypedArray;function yn(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 _n(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 bn(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 xn(t,e){var n=null==t?0:t.length;while(n--)if(!1===e(t[n],n,t))break;return t}function Sn(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 An(t,e){var n=null==t?0:t.length;return!!n&&Fn(t,e,0)>-1}function kn(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 Ln(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 En(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=Hn("length");function On(t){return t.split("")}function Dn(t){return t.match(Ut)||[]}function In(t,e,n){var i;return n(t,(function(t,n,r){if(e(t,n,r))return i=n,!1})),i}function Pn(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?fi(t,e,n):Pn(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 Nn(t,e){var n=null==t?0:t.length;return n?jn(t,e)/n:W}function Hn(t){return function(e){return null==e?r:e[t]}}function Un(t){return function(e){return null==t?r:t[e]}}function zn(t,e,n,i,r){return r(t,(function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)})),n}function Gn(t,e){var n=t.length;t.sort(e);while(n--)t[n]=t[n].value;return t}function jn(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=Un(Qe),ni=Un(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 hi(t,e){var n=-1,i=t.length,r=0,o=[];while(++n<i){var s=t[n];s!==e&&s!==d||(t[n]=d,o[r++]=n)}return o}function ui(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function di(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function fi(t,e,n){var i=n-1,r=t.length;while(++i<r)if(t[i]===e)return i;return-1}function gi(t,e,n){var i=n+1;while(i--)if(t[i]===e)return i;return i}function pi(t){return oi(t)?yi(t):Mn(t)}function mi(t){return oi(t)?_i(t):On(t)}function vi(t){var e=t.length;while(e--&&Wt.test(t.charAt(e)));return e}var wi=Un(tn);function yi(t){var e=Ge.lastIndex=0;while(Ge.test(t))++e;return e}function _i(t){return t.match(Ge)||[]}function bi(t){return t.match(je)||[]}var xi=function t(e){e=null==e?an:Si.defaults(an.Object(),e,Si.pick(an,Ye));var n=e.Array,i=e.Date,Wt=e.Error,Ut=e.Function,ee=e.Math,ne=e.Object,ie=e.RegExp,re=e.String,oe=e.TypeError,se=n.prototype,ae=Ut.prototype,le=ne.prototype,ce=e["__core-js_shared__"],he=ae.toString,ue=le.hasOwnProperty,de=0,fe=function(){var t=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ge=le.toString,pe=he.call(ne),me=an._,ve=ie("^"+he.call(ue).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),we=hn?e.Buffer:r,ye=e.Symbol,_e=e.Uint8Array,be=we?we.allocUnsafe:r,xe=ci(ne.getPrototypeOf,ne),Se=ne.create,Ce=le.propertyIsEnumerable,Ae=se.splice,ke=ye?ye.isConcatSpreadable:r,$e=ye?ye.iterator:r,Re=ye?ye.toStringTag:r,Te=function(){try{var t=qs(ne,"defineProperty");return t({},"",{}),t}catch(e){}}(),Le=e.clearTimeout!==an.clearTimeout&&e.clearTimeout,Ee=i&&i.now!==an.Date.now&&i.now,Me=e.setTimeout!==an.setTimeout&&e.setTimeout,Oe=ee.ceil,De=ee.floor,Ie=ne.getOwnPropertySymbols,Pe=we?we.isBuffer:r,Fe=e.isFinite,We=se.join,Be=ci(ne.keys,ne),Ne=ee.max,He=ee.min,Ge=i.now,je=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={},un=Ma(Qe),dn=Ma(Je),Mn=Ma(tn),On=Ma(en),Un=Ma(on),fi=ye?ye.prototype:r,yi=fi?fi.valueOf:r,_i=fi?fi.toString:r;function xi(t){if(Ah(t)&&!lh(t)&&!(t instanceof $i)){if(t instanceof ki)return t;if(ue.call(t,"__wrapped__"))return Da(t)}return new ki(t)}var Ci=function(){function t(){}return function(e){if(!Ch(e))return{};if(Se)return Se(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function Ai(){}function ki(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 Li(){var t=this.__wrapped__.value(),e=this.__dir__,n=lh(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,h=this.__iteratees__,u=h.length,d=0,f=He(l,this.__takeCount__);if(!n||!i&&r==l&&f==l)return Bo(t,this.__actions__);var g=[];t:while(l--&&d<f){c+=e;var p=-1,m=t[c];while(++p<u){var v=h[p],w=v.iteratee,y=v.type,_=w(m);if(y==O)m=_;else if(!_){if(y==M)continue t;break t}}g[d++]=m}return g}function Ei(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===h?r:n}return ue.call(e,t)?e[t]:r}function Ii(t){var e=this.__data__;return sn?e[t]!==r:ue.call(e,t)}function Pi(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=sn&&e===r?h: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=hr(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Ae.call(e,n,1),--this.size,!0}function Ni(t){var e=this.__data__,n=hr(e,t);return n<0?r:e[n][1]}function Hi(t){return hr(this.__data__,t)>-1}function Ui(t,e){var n=this.__data__,i=hr(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function zi(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 Gi(){this.size=0,this.__data__={hash:new Ei,map:new(Je||Fi),string:new Ei}}function ji(t){var e=js(this,t)["delete"](t);return this.size-=e?1:0,e}function Vi(t){return js(this,t).get(t)}function qi(t){return js(this,t).has(t)}function Yi(t,e){var n=js(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 zi;while(++e<n)this.add(t[e])}function Xi(t){return this.__data__.set(t,h),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 zi(i)}return n.set(t,e),this.size=n.size,this}function rr(t,e){var n=lh(t),i=!n&&ah(t),r=!n&&!i&&fh(t),o=!n&&!i&&!r&&Nh(t),s=n||i||r||o,a=s?Vn(t.length,re):[],l=a.length;for(var c in t)!e&&!ue.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[wo(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&&!rh(t[e],n)||n===r&&!(e in t))&&gr(t,e,n)}function cr(t,e,n){var i=t[e];ue.call(t,e)&&rh(i,n)&&(n!==r||e in t)||gr(t,e,n)}function hr(t,e){var n=t.length;while(n--)if(rh(t[n][0],e))return n;return-1}function ur(t,e,n,i){return xr(t,(function(t,r,o){e(i,t,n(t),o)})),i}function dr(t,e){return t&&os(e,xu(e),t)}function fr(t,e){return t&&os(e,Su(e),t)}function gr(t,e,n){"__proto__"==e&&Te?Te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function pr(t,e){var i=-1,o=e.length,s=n(o),a=null==t;while(++i<o)s[i]=a?r:mu(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&f,c=e&g,h=e&p;if(n&&(a=o?n(t,i,o,s):n(t)),a!==r)return a;if(!Ch(t))return t;var u=lh(t);if(u){if(a=ea(t),!l)return rs(t,a)}else{var d=Zs(t),m=d==X||d==Z;if(fh(t))return Yo(t,l);if(d==et||d==z||m&&!o){if(a=c||m?{}:na(t),!l)return c?as(t,fr(a,t)):ss(t,dr(a,t))}else{if(!Ze[d])return o?t:{};a=ia(t,d,l)}}s||(s=new Qi);var v=s.get(t);if(v)return v;s.set(t,a),Fh(t)?t.forEach((function(i){a.add(vr(i,e,n,i,t,s))})):kh(t)&&t.forEach((function(i,r){a.set(r,vr(i,e,n,r,t,s))}));var w=h?c?Ns:Bs:c?Su:xu,y=u?r:w(t);return bn(y||t,(function(i,r){y&&(r=i,i=t[r]),cr(a,r,vr(i,e,n,r,t,s))})),a}function wr(t){var e=xu(t);return function(n){return yr(n,t,e)}}function yr(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 _r(t,e,n){if("function"!=typeof t)throw new oe(l);return Aa((function(){t.apply(r,n)}),e)}function br(t,e,n,i){var r=-1,o=An,a=!0,l=t.length,c=[],h=e.length;if(!l)return c;n&&(e=$n(e,Kn(n))),i?(o=kn,a=!1):e.length>=s&&(o=Zn,a=!1,e=new Ki(e));t:while(++r<l){var u=t[r],d=null==n?u:n(u);if(u=i||0!==u?u:0,a&&d===d){var f=h;while(f--)if(e[f]===d)continue t;c.push(u)}else o(e,d,i)||c.push(u)}return c}xi.templateSettings={escape:Tt,evaluate:Lt,interpolate:Et,variable:"",imports:{_:xi}},xi.prototype=Ai.prototype,xi.prototype.constructor=xi,ki.prototype=Ci(Ai.prototype),ki.prototype.constructor=ki,$i.prototype=Ci(Ai.prototype),$i.prototype.constructor=$i,Ei.prototype.clear=Mi,Ei.prototype["delete"]=Oi,Ei.prototype.get=Di,Ei.prototype.has=Ii,Ei.prototype.set=Pi,Fi.prototype.clear=Wi,Fi.prototype["delete"]=Bi,Fi.prototype.get=Ni,Fi.prototype.has=Hi,Fi.prototype.set=Ui,zi.prototype.clear=Gi,zi.prototype["delete"]=ji,zi.prototype.get=Vi,zi.prototype.has=qi,zi.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 xr=hs(Er),Sr=hs(Mr,!0);function Cr(t,e){var n=!0;return xr(t,(function(t,i,r){return n=!!e(t,i,r),n})),n}function Ar(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&&!Bh(a):n(a,l)))var l=a,c=s}return c}function kr(t,e,n,i){var o=t.length;n=Yh(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:Yh(i),i<0&&(i+=o),i=n>i?0:Kh(i);while(n<i)t[n++]=e;return t}function $r(t,e){var n=[];return xr(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=us(),Lr=us(!0);function Er(t,e){return t&&Tr(t,e,xu)}function Mr(t,e){return t&&Lr(t,e,xu)}function Or(t,e){return Cn(e,(function(e){return bh(t[e])}))}function Dr(t,e){e=Go(e,t);var n=0,i=e.length;while(null!=t&&n<i)t=t[Ea(e[n++])];return n&&n==i?t:r}function Ir(t,e,n){var i=e(t);return lh(t)?i:Rn(i,n(t))}function Pr(t){return null==t?t===r?lt:tt:Re&&Re in ne(t)?Ys(t):ya(t)}function Fr(t,e){return t>e}function Wr(t,e){return null!=t&&ue.call(t,e)}function Br(t,e){return null!=t&&e in ne(t)}function Nr(t,e,n){return t>=He(e,n)&&t<Ne(e,n)}function Hr(t,e,i){var o=i?kn:An,s=t[0].length,a=t.length,l=a,c=n(a),h=1/0,u=[];while(l--){var d=t[l];l&&e&&(d=$n(d,Kn(e))),h=He(d.length,h),c[l]=!i&&(e||s>=120&&d.length>=120)?new Ki(l&&d):r}d=t[0];var f=-1,g=c[0];t:while(++f<s&&u.length<h){var p=d[f],m=e?e(p):p;if(p=i||0!==p?p:0,!(g?Zn(g,m):o(u,m,i))){l=a;while(--l){var v=c[l];if(!(v?Zn(v,m):o(t[l],m,i)))continue t}g&&g.push(m),u.push(p)}}return u}function Ur(t,e,n,i){return Er(t,(function(t,r,o){e(i,n(t),r,o)})),i}function zr(t,e,n){e=Go(e,t),t=ba(t,e);var i=null==t?t:t[Ea(ol(e))];return null==i?r:yn(i,t,n)}function Gr(t){return Ah(t)&&Pr(t)==z}function jr(t){return Ah(t)&&Pr(t)==ut}function Vr(t){return Ah(t)&&Pr(t)==q}function qr(t,e,n,i,r){return t===e||(null==t||null==e||!Ah(t)&&!Ah(e)?t!==t&&e!==e:Yr(t,e,n,i,qr,r))}function Yr(t,e,n,i,r,o){var s=lh(t),a=lh(e),l=s?G:Zs(t),c=a?G:Zs(e);l=l==z?et:l,c=c==z?et:c;var h=l==et,u=c==et,d=l==c;if(d&&fh(t)){if(!fh(e))return!1;s=!0,h=!1}if(d&&!h)return o||(o=new Qi),s||Nh(t)?Is(t,e,n,i,r,o):Ps(t,e,l,n,i,r,o);if(!(n&m)){var f=h&&ue.call(t,"__wrapped__"),g=u&&ue.call(e,"__wrapped__");if(f||g){var p=f?t.value():t,v=g?e.value():e;return o||(o=new Qi),r(p,v,n,i,o)}}return!!d&&(o||(o=new Qi),Fs(t,e,n,i,r,o))}function Kr(t){return Ah(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],h=t[c],u=l[1];if(a&&l[2]){if(h===r&&!(c in t))return!1}else{var d=new Qi;if(i)var f=i(h,u,c,t,e,d);if(!(f===r?qr(u,h,m|v,i,d):f))return!1}}return!0}function Zr(t){if(!Ch(t)||ua(t))return!1;var e=bh(t)?ve:Kt;return e.test(Ma(t))}function Qr(t){return Ah(t)&&Pr(t)==rt}function Jr(t){return Ah(t)&&Zs(t)==ot}function to(t){return Ah(t)&&Sh(t.length)&&!!Xe[Pr(t)]}function eo(t){return"function"==typeof t?t:null==t?Ld:"object"==typeof t?lh(t)?ao(t[0],t[1]):so(t):zd(t)}function no(t){if(!fa(t))return Be(t);var e=[];for(var n in ne(t))ue.call(t,n)&&"constructor"!=n&&e.push(n);return e}function io(t){if(!Ch(t))return wa(t);var e=fa(t),n=[];for(var i in t)("constructor"!=i||!e&&ue.call(t,i))&&n.push(i);return n}function ro(t,e){return t<e}function oo(t,e){var i=-1,r=hh(t)?n(t.length):[];return xr(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]?pa(e[0][0],e[0][1]):function(n){return n===t||Xr(n,t,e)}}function ao(t,e){return la(t)&&ga(e)?pa(Ea(t),e):function(n){var i=mu(n,t);return i===r&&i===e?wu(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),Ch(s))co(t,e,a,n,lo,i,o);else{var l=i?i(Sa(t,a),s,a+"",t,e,o):r;l===r&&(l=s),lr(t,a,l)}}),Su)}function co(t,e,n,i,o,s,a){var l=Sa(t,n),c=Sa(e,n),h=a.get(c);if(h)lr(t,n,h);else{var u=s?s(l,c,n+"",t,e,a):r,d=u===r;if(d){var f=lh(c),g=!f&&fh(c),p=!f&&!g&&Nh(c);u=c,f||g||p?lh(l)?u=l:uh(l)?u=rs(l):g?(d=!1,u=Yo(c,!0)):p?(d=!1,u=Jo(c,!0)):u=[]:Dh(c)||ah(c)?(u=l,ah(l)?u=Zh(l):Ch(l)&&!bh(l)||(u=na(c))):d=!1}d&&(a.set(c,u),o(u,c,i,s,a),a["delete"](c)),lr(t,n,u)}}function ho(t,e){var n=t.length;if(n)return e+=e<0?n:0,sa(e,n)?t[e]:r}function uo(t,e,n){e=e.length?$n(e,(function(t){return lh(t)?function(e){return Dr(e,1===t.length?t[0]:t)}:t})):[Ld];var i=-1;e=$n(e,Kn(Gs()));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 Gn(r,(function(t,e){return es(t,e,n)}))}function fo(t,e){return go(t,e,(function(e,n){return wu(t,n)}))}function go(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,Go(s,t),a)}return o}function po(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],h=n?n(c):c;while((l=r(a,h,l,i))>-1)a!==t&&Ae.call(a,l,1),Ae.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)?Ae.call(t,r,1):Po(t,r)}}return t}function wo(t,e){return t+De(Ve()*(e-t+1))}function yo(t,e,i,r){var o=-1,s=Ne(Oe((e-t)/(i||1)),0),a=n(s);while(s--)a[r?s:++o]=t,t+=i;return a}function _o(t,e){var n="";if(!t||e<1||e>P)return n;do{e%2&&(n+=t),e=De(e/2),e&&(t+=t)}while(e);return n}function bo(t,e){return ka(_a(t,e,Ld),t+"")}function xo(t){return or(Hu(t))}function So(t,e){var n=Hu(t);return Ta(n,mr(e,0,n.length))}function Co(t,e,n,i){if(!Ch(t))return t;e=Go(e,t);var o=-1,s=e.length,a=s-1,l=t;while(null!=l&&++o<s){var c=Ea(e[o]),h=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var u=l[c];h=i?i(u,c,l):r,h===r&&(h=Ch(u)?u:sa(e[o+1])?[]:{})}cr(l,c,h),l=l[c]}return t}var Ao=ln?function(t,e){return ln.set(t,e),t}:Ld,ko=Te?function(t,e){return Te(t,"toString",{configurable:!0,enumerable:!1,value:kd(e),writable:!0})}:Ld;function $o(t){return Ta(Hu(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 xr(t,(function(t,i,r){return n=e(t,i,r),!n})),!!n}function Lo(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e===e&&r<=H){while(i<r){var o=i+r>>>1,s=t[o];null!==s&&!Bh(s)&&(n?s<=e:s<e)?i=o+1:r=o}return r}return Eo(t,e,Ld,n)}function Eo(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=Bh(e),h=e===r;while(o<s){var u=De((o+s)/2),d=n(t[u]),f=d!==r,g=null===d,p=d===d,m=Bh(d);if(a)var v=i||p;else v=h?p&&(i||f):l?p&&f&&(i||!g):c?p&&f&&!g&&(i||!m):!g&&!m&&(i?d<=e:d<e);v?o=u+1:s=u}return He(s,N)}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||!rh(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function Oo(t){return"number"==typeof t?t:Bh(t)?W:+t}function Do(t){if("string"==typeof t)return t;if(lh(t))return $n(t,Do)+"";if(Bh(t))return _i?_i.call(t):"";var e=t+"";return"0"==e&&1/t==-I?"-0":e}function Io(t,e,n){var i=-1,r=An,o=t.length,a=!0,l=[],c=l;if(n)a=!1,r=kn;else if(o>=s){var h=e?null:Ts(t);if(h)return ui(h);a=!1,r=Zn,c=new Ki}else c=e?[]:l;t:while(++i<o){var u=t[i],d=e?e(u):u;if(u=n||0!==u?u:0,a&&d===d){var f=c.length;while(f--)if(c[f]===d)continue t;e&&c.push(d),l.push(u)}else r(c,d,n)||(c!==l&&c.push(d),l.push(u))}return l}function Po(t,e){return e=Go(e,t),t=ba(t,e),null==t||delete t[Ea(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 No(t,e,i){var r=t.length;if(r<2)return r?Io(t[0]):[];var o=-1,s=n(r);while(++o<r){var a=t[o],l=-1;while(++l<r)l!=o&&(s[o]=br(s[o]||a,t[l],e,i))}return Io(Rr(s,1),e,i)}function Ho(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 Uo(t){return uh(t)?t:[]}function zo(t){return"function"==typeof t?t:Ld}function Go(t,e){return lh(t)?t:la(t,e)?[t]:La(Jh(t))}var jo=bo;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=Le||function(t){return an.clearTimeout(t)};function Yo(t,e){if(e)return t.slice();var n=t.length,i=be?be(n):new t.constructor(n);return t.copy(i),i}function Ko(t){var e=new t.constructor(t.byteLength);return new _e(e).set(new _e(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 yi?ne(yi.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=Bh(t),a=e!==r,l=null===e,c=e===e,h=Bh(e);if(!l&&!h&&!s&&t>e||s&&a&&c&&!l&&!h||i&&a&&c||!n&&c||!o)return 1;if(!i&&!s&&!h&&t<e||h&&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,h=Ne(s-a,0),u=n(c+h),d=!r;while(++l<c)u[l]=e[l];while(++o<a)(d||o<s)&&(u[i[o]]=t[o]);while(h--)u[l++]=t[o++];return u}function is(t,e,i,r){var o=-1,s=t.length,a=-1,l=i.length,c=-1,h=e.length,u=Ne(s-l,0),d=n(u+h),f=!r;while(++o<u)d[o]=t[o];var g=o;while(++c<h)d[g+c]=e[c];while(++a<l)(f||o<s)&&(d[g+i[a]]=t[o++]);return d}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?gr(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=lh(n)?_n:ur,o=e?e():{};return r(n,t,Gs(i,2),o)}}function cs(t){return bo((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 hs(t,e){return function(n,i){if(null==n)return n;if(!hh(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 us(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 ds(t,e,n){var i=e&w,r=ps(t);function o(){var e=this&&this!==an&&this instanceof o?r:t;return e.apply(i?n:this,arguments)}return o}function fs(t){return function(e){e=Jh(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 gs(t){return function(e){return Tn(bd(Yu(e).replace(Ue,"")),t,"")}}function ps(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 Ch(i)?i:n}}function ms(t,e,i){var o=ps(t);function s(){var a=arguments.length,l=n(a),c=a,h=zs(s);while(c--)l[c]=arguments[c];var u=a<3&&l[0]!==h&&l[a-1]!==h?[]:hi(l,h);if(a-=u.length,a<i)return $s(t,e,ys,s.placeholder,r,l,u,r,r,i-a);var d=this&&this!==an&&this instanceof s?o:t;return yn(d,this,l)}return s}function vs(t){return function(e,n,i){var o=ne(e);if(!hh(e)){var s=Gs(n,3);e=xu(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 ws(t){return Ws((function(e){var n=e.length,i=n,o=ki.prototype.thru;t&&e.reverse();while(i--){var s=e[i];if("function"!=typeof s)throw new oe(l);if(o&&!a&&"wrapper"==Us(s))var a=new ki([],!0)}i=a?i:n;while(++i<n){s=e[i];var c=Us(s),h="wrapper"==c?Hs(s):r;a=h&&ha(h[0])&&h[1]==(A|b|S|k)&&!h[4].length&&1==h[9]?a[Us(h[0])].apply(a,h[3]):1==s.length&&ha(s)?a[c]():a.thru(s)}return function(){var t=arguments,i=t[0];if(a&&1==t.length&&lh(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 ys(t,e,i,o,s,a,l,c,h,u){var d=e&A,f=e&w,g=e&y,p=e&(b|x),m=e&$,v=g?r:ps(t);function _(){var r=arguments.length,w=n(r),y=r;while(y--)w[y]=arguments[y];if(p)var b=zs(_),x=ti(w,b);if(o&&(w=ns(w,o,s,p)),a&&(w=is(w,a,l,p)),r-=x,p&&r<u){var S=hi(w,b);return $s(t,e,ys,_.placeholder,i,w,S,c,h,u-r)}var C=f?i:this,A=g?C[t]:t;return r=w.length,c?w=xa(w,c):m&&r>1&&w.reverse(),d&&h<r&&(w.length=h),this&&this!==an&&this instanceof _&&(A=v||ps(A)),A.apply(C,w)}return _}function _s(t,e){return function(n,i){return Ur(n,t,e(i),{})}}function bs(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 xs(t){return Ws((function(e){return e=$n(e,Kn(Gs())),bo((function(n){var i=this;return t(e,(function(t){return yn(t,i,n)}))}))}))}function Ss(t,e){e=e===r?" ":Do(e);var n=e.length;if(n<2)return n?_o(e,t):e;var i=_o(e,Oe(t/pi(e)));return oi(e)?Vo(mi(i),0,t).join(""):i.slice(0,t)}function Cs(t,e,i,r){var o=e&w,s=ps(t);function a(){var e=-1,l=arguments.length,c=-1,h=r.length,u=n(h+l),d=this&&this!==an&&this instanceof a?s:t;while(++c<h)u[c]=r[c];while(l--)u[c++]=arguments[++e];return yn(d,o?i:this,u)}return a}function As(t){return function(e,n,i){return i&&"number"!=typeof i&&aa(e,n,i)&&(n=i=r),e=qh(e),n===r?(n=e,e=0):n=qh(n),i=i===r?e<n?1:-1:qh(i),yo(e,n,i,t)}}function ks(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Xh(e),n=Xh(n)),t(e,n)}}function $s(t,e,n,i,o,s,a,l,c,h){var u=e&b,d=u?a:r,f=u?r:a,g=u?s:r,p=u?r:s;e|=u?S:C,e&=~(u?C:S),e&_||(e&=~(w|y));var m=[t,e,o,g,d,p,f,l,c,h],v=n.apply(r,m);return ha(t)&&Ca(v,m),v.placeholder=i,$a(v,t,e)}function Rs(t){var e=ee[t];return function(t,n){if(t=Xh(t),n=null==n?0:He(Yh(n),292),n&&Fe(t)){var i=(Jh(t)+"e").split("e"),r=e(i[0]+"e"+(+i[1]+n));return i=(Jh(r)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(t)}}var Ts=en&&1/ui(new en([,-0]))[1]==I?function(t){return new en(t)}:Wd;function Ls(t){return function(e){var n=Zs(e);return n==Q?li(e):n==ot?di(e):qn(e,t(e))}}function Es(t,e,n,i,o,s,a,c){var h=e&y;if(!h&&"function"!=typeof t)throw new oe(l);var u=i?i.length:0;if(u||(e&=~(S|C),i=o=r),a=a===r?a:Ne(Yh(a),0),c=c===r?c:Yh(c),u-=o?o.length:0,e&C){var d=i,f=o;i=o=r}var g=h?r:Hs(t),p=[t,e,n,i,o,d,f,s,a,c];if(g&&va(p,g),t=p[0],e=p[1],n=p[2],i=p[3],o=p[4],c=p[9]=p[9]===r?h?0:t.length:Ne(p[9]-u,0),!c&&e&(b|x)&&(e&=~(b|x)),e&&e!=w)m=e==b||e==x?ms(t,e,c):e!=S&&e!=(w|S)||o.length?ys.apply(r,p):Cs(t,e,n,i);else var m=ds(t,e,n);var v=g?Ao:Ca;return $a(v(m,p),t,e)}function Ms(t,e,n,i){return t===r||rh(t,le[n])&&!ue.call(i,n)?e:t}function Os(t,e,n,i,o,s){return Ch(t)&&Ch(e)&&(s.set(e,t),lo(t,e,r,Os,s),s["delete"](e)),t}function Ds(t){return Dh(t)?r:t}function Is(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 h=s.get(t),u=s.get(e);if(h&&u)return h==e&&u==t;var d=-1,f=!0,g=n&v?new Ki:r;s.set(t,e),s.set(e,t);while(++d<l){var p=t[d],w=e[d];if(i)var y=a?i(w,p,d,e,t,s):i(p,w,d,t,e,s);if(y!==r){if(y)continue;f=!1;break}if(g){if(!En(e,(function(t,e){if(!Zn(g,e)&&(p===t||o(p,t,n,i,s)))return g.push(e)}))){f=!1;break}}else if(p!==w&&!o(p,w,n,i,s)){f=!1;break}}return s["delete"](t),s["delete"](e),f}function Ps(t,e,n,i,r,o,s){switch(n){case dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ut:return!(t.byteLength!=e.byteLength||!o(new _e(t),new _e(e)));case V:case q:case J:return rh(+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=ui),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=v,s.set(t,e);var h=Is(a(t),a(e),i,r,o,s);return s["delete"](t),h;case at:if(yi)return yi.call(t)==yi.call(e)}return!1}function Fs(t,e,n,i,o,s){var a=n&m,l=Bs(t),c=l.length,h=Bs(e),u=h.length;if(c!=u&&!a)return!1;var d=c;while(d--){var f=l[d];if(!(a?f in e:ue.call(e,f)))return!1}var g=s.get(t),p=s.get(e);if(g&&p)return g==e&&p==t;var v=!0;s.set(t,e),s.set(e,t);var w=a;while(++d<c){f=l[d];var y=t[f],_=e[f];if(i)var b=a?i(_,y,f,e,t,s):i(y,_,f,t,e,s);if(!(b===r?y===_||o(y,_,n,i,s):b)){v=!1;break}w||(w="constructor"==f)}if(v&&!w){var x=t.constructor,S=e.constructor;x==S||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof S&&S instanceof S||(v=!1)}return s["delete"](t),s["delete"](e),v}function Ws(t){return ka(_a(t,r,Ya),t+"")}function Bs(t){return Ir(t,xu,Ks)}function Ns(t){return Ir(t,Su,Xs)}var Hs=ln?function(t){return ln.get(t)}:Wd;function Us(t){var e=t.name+"",n=cn[e],i=ue.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 zs(t){var e=ue.call(xi,"placeholder")?xi:t;return e.placeholder}function Gs(){var t=xi.iteratee||Ed;return t=t===Ed?eo:t,arguments.length?t(arguments[0],arguments[1]):t}function js(t,e){var n=t.__data__;return ca(e)?n["string"==typeof e?"string":"hash"]:n.map}function Vs(t){var e=xu(t),n=e.length;while(n--){var i=e[n],r=t[i];e[n]=[i,r,ga(r)]}return e}function qs(t,e){var n=ri(t,e);return Zr(n)?n:r}function Ys(t){var e=ue.call(t,Re),n=t[Re];try{t[Re]=r;var i=!0}catch(s){}var o=ge.call(t);return i&&(e?t[Re]=n:delete t[Re]),o}var Ks=Ie?function(t){return null==t?[]:(t=ne(t),Cn(Ie(t),(function(e){return Ce.call(t,e)})))}:qd,Xs=Ie?function(t){var e=[];while(t)Rn(e,Ks(t)),t=xe(t);return e}:qd,Zs=Pr;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=He(e,t+s);break;case"takeRight":t=Ne(t,e-s);break}}return{start:t,end:e}}function Js(t){var e=t.match(Nt);return e?e[1].split(Ht):[]}function ta(t,e,n){e=Go(e,t);var i=-1,r=e.length,o=!1;while(++i<r){var s=Ea(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&&Sh(r)&&sa(s,r)&&(lh(t)||ah(t)))}function ea(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ue.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function na(t){return"function"!=typeof t.constructor||fa(t)?{}:Ci(xe(t))}function ia(t,e,n){var i=t.constructor;switch(e){case ut:return Ko(t);case V:case q:return new i(+t);case dt:return Xo(t,n);case ft:case gt:case pt:case mt:case vt:case wt:case yt:case _t:case bt: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 lh(t)||ah(t)||!!(ke&&t&&t[ke])}function sa(t,e){var n=typeof t;return e=null==e?P:e,!!e&&("number"==n||"symbol"!=n&&Zt.test(t))&&t>-1&&t%1==0&&t<e}function aa(t,e,n){if(!Ch(n))return!1;var i=typeof e;return!!("number"==i?hh(n)&&sa(e,n.length):"string"==i&&e in n)&&rh(n[e],t)}function la(t,e){if(lh(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Bh(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 ha(t){var e=Us(t),n=xi[e];if("function"!=typeof n||!(e in $i.prototype))return!1;if(t===n)return!0;var i=Hs(n);return!!i&&t===i[0]}function ua(t){return!!fe&&fe in t}(Qe&&Zs(new Qe(new ArrayBuffer(1)))!=dt||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=Pr(t),n=e==et?t.constructor:r,i=n?Ma(n):"";if(i)switch(i){case un:return dt;case dn:return Q;case Mn:return nt;case On:return ot;case Un:return ct}return e});var da=ce?bh:Yd;function fa(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||le;return t===n}function ga(t){return t===t&&!Ch(t)}function pa(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==r||t in ne(n)))}}function ma(t){var e=Nc(t,(function(t){return n.size===u&&n.clear(),t})),n=e.cache;return e}function va(t,e){var n=t[1],i=e[1],r=n|i,o=r<(w|y|A),s=i==A&&n==b||i==A&&n==k&&t[7].length<=e[8]||i==(A|k)&&e[7].length<=e[8]&&n==b;if(!o&&!s)return t;i&w&&(t[2]=e[2],r|=n&w?0:_);var a=e[3];if(a){var l=t[3];t[3]=l?ns(l,a,e[4]):a,t[4]=l?hi(t[3],d):e[4]}return a=e[5],a&&(l=t[5],t[5]=l?is(l,a,e[6]):a,t[6]=l?hi(t[5],d):e[6]),a=e[7],a&&(t[7]=a),i&A&&(t[8]=null==t[8]?e[8]:He(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}function wa(t){var e=[];if(null!=t)for(var n in ne(t))e.push(n);return e}function ya(t){return ge.call(t)}function _a(t,e,i){return e=Ne(e===r?t.length-1:e,0),function(){var r=arguments,o=-1,s=Ne(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),yn(t,this,l)}}function ba(t,e){return e.length<2?t:Dr(t,Ro(e,0,-1))}function xa(t,e){var n=t.length,i=He(e.length,n),o=rs(t);while(i--){var s=e[i];t[i]=sa(s,n)?o[s]:r}return t}function Sa(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var Ca=Ra(Ao),Aa=Me||function(t,e){return an.setTimeout(t,e)},ka=Ra(ko);function $a(t,e,n){var i=e+"";return ka(t,ra(i,Oa(Js(i),n)))}function Ra(t){var e=0,n=0;return function(){var i=Ge(),o=E-(i-n);if(n=i,o>0){if(++e>=L)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=wo(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var La=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(Gt,"$1"):n||t)})),e}));function Ea(t){if("string"==typeof t||Bh(t))return t;var e=t+"";return"0"==e&&1/t==-I?"-0":e}function Ma(t){if(null!=t){try{return he.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Oa(t,e){return bn(U,(function(n){var i="_."+n[0];e&n[1]&&!An(t,i)&&t.push(i)})),t.sort()}function Da(t){if(t instanceof $i)return t.clone();var e=new ki(t.__wrapped__,t.__chain__);return e.__actions__=rs(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Ia(t,e,i){e=(i?aa(t,e,i):e===r)?1:Ne(Yh(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 Pa(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(lh(i)?rs(i):[i],Rr(e,1))}var Wa=bo((function(t,e){return uh(t)?br(t,Rr(e,1,uh,!0)):[]})),Ba=bo((function(t,e){var n=ol(e);return uh(n)&&(n=r),uh(t)?br(t,Rr(e,1,uh,!0),Gs(n,2)):[]})),Na=bo((function(t,e){var n=ol(e);return uh(n)&&(n=r),uh(t)?br(t,Rr(e,1,uh,!0),r,n):[]}));function Ha(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:Yh(e),Ro(t,e<0?0:e,i)):[]}function Ua(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:Yh(e),e=i-e,Ro(t,0,e<0?0:e)):[]}function za(t,e){return t&&t.length?Wo(t,Gs(e,3),!0,!0):[]}function Ga(t,e){return t&&t.length?Wo(t,Gs(e,3),!0):[]}function ja(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),kr(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:Yh(n);return r<0&&(r=Ne(i+r,0)),Pn(t,Gs(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=Yh(n),o=n<0?Ne(i+o,0):He(o,i-1)),Pn(t,Gs(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,I):[]}function Xa(t,e){var n=null==t?0:t.length;return n?(e=e===r?1:Yh(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:Yh(n);return r<0&&(r=Ne(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=bo((function(t){var e=$n(t,Uo);return e.length&&e[0]===t[0]?Hr(e):[]})),nl=bo((function(t){var e=ol(t),n=$n(t,Uo);return e===ol(n)?e=r:n.pop(),n.length&&n[0]===t[0]?Hr(n,Gs(e,2)):[]})),il=bo((function(t){var e=ol(t),n=$n(t,Uo);return e="function"==typeof e?e:r,e&&n.pop(),n.length&&n[0]===t[0]?Hr(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=Yh(n),o=o<0?Ne(i+o,0):He(o,i-1)),e===e?gi(t,e,o):Pn(t,Bn,o,!0)}function al(t,e){return t&&t.length?ho(t,Yh(e)):r}var ll=bo(cl);function cl(t,e){return t&&t.length&&e&&e.length?mo(t,e):t}function hl(t,e,n){return t&&t.length&&e&&e.length?mo(t,e,Gs(n,2)):t}function ul(t,e,n){return t&&t.length&&e&&e.length?mo(t,e,r,n):t}var dl=Ws((function(t,e){var n=null==t?0:t.length,i=pr(t,e);return vo(t,$n(e,(function(t){return sa(t,n)?+t:t})).sort(ts)),i}));function fl(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],o=t.length;e=Gs(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 gl(t){return null==t?t:qe.call(t)}function pl(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:Yh(e),n=n===r?i:Yh(n)),Ro(t,e,n)):[]}function ml(t,e){return Lo(t,e)}function vl(t,e,n){return Eo(t,e,Gs(n,2))}function wl(t,e){var n=null==t?0:t.length;if(n){var i=Lo(t,e);if(i<n&&rh(t[i],e))return i}return-1}function yl(t,e){return Lo(t,e,!0)}function _l(t,e,n){return Eo(t,e,Gs(n,2),!0)}function bl(t,e){var n=null==t?0:t.length;if(n){var i=Lo(t,e,!0)-1;if(rh(t[i],e))return i}return-1}function xl(t){return t&&t.length?Mo(t):[]}function Sl(t,e){return t&&t.length?Mo(t,Gs(e,2)):[]}function Cl(t){var e=null==t?0:t.length;return e?Ro(t,1,e):[]}function Al(t,e,n){return t&&t.length?(e=n||e===r?1:Yh(e),Ro(t,0,e<0?0:e)):[]}function kl(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:Yh(e),e=i-e,Ro(t,e<0?0:e,i)):[]}function $l(t,e){return t&&t.length?Wo(t,Gs(e,3),!1,!0):[]}function Rl(t,e){return t&&t.length?Wo(t,Gs(e,3)):[]}var Tl=bo((function(t){return Io(Rr(t,1,uh,!0))})),Ll=bo((function(t){var e=ol(t);return uh(e)&&(e=r),Io(Rr(t,1,uh,!0),Gs(e,2))})),El=bo((function(t){var e=ol(t);return e="function"==typeof e?e:r,Io(Rr(t,1,uh,!0),r,e)}));function Ml(t){return t&&t.length?Io(t):[]}function Ol(t,e){return t&&t.length?Io(t,Gs(e,2)):[]}function Dl(t,e){return e="function"==typeof e?e:r,t&&t.length?Io(t,r,e):[]}function Il(t){if(!t||!t.length)return[];var e=0;return t=Cn(t,(function(t){if(uh(t))return e=Ne(t.length,e),!0})),Vn(e,(function(e){return $n(t,Hn(e))}))}function Pl(t,e){if(!t||!t.length)return[];var n=Il(t);return null==e?n:$n(n,(function(t){return yn(e,r,t)}))}var Fl=bo((function(t,e){return uh(t)?br(t,e):[]})),Wl=bo((function(t){return No(Cn(t,uh))})),Bl=bo((function(t){var e=ol(t);return uh(e)&&(e=r),No(Cn(t,uh),Gs(e,2))})),Nl=bo((function(t){var e=ol(t);return e="function"==typeof e?e:r,No(Cn(t,uh),r,e)})),Hl=bo(Il);function Ul(t,e){return Ho(t||[],e||[],cr)}function zl(t,e){return Ho(t||[],e||[],Co)}var Gl=bo((function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,Pl(t,n)}));function jl(t){var e=xi(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 pr(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 ki(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(r),t}))):this.thru(o)}));function Kl(){return jl(this)}function Xl(){return new ki(this.value(),this.__chain__)}function Zl(){this.__values__===r&&(this.__values__=Vh(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 Ai){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:[gl],thisArg:r}),new ki(e,this.__chain__)}return this.thru(gl)}function ec(){return Bo(this.__wrapped__,this.__actions__)}var nc=ls((function(t,e,n){ue.call(t,n)?++t[n]:gr(t,n,1)}));function ic(t,e,n){var i=lh(t)?Sn:Cr;return n&&aa(t,e,n)&&(e=r),i(t,Gs(e,3))}function rc(t,e){var n=lh(t)?Cn:$r;return n(t,Gs(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),I)}function cc(t,e,n){return n=n===r?1:Yh(n),Rr(mc(t,e),n)}function hc(t,e){var n=lh(t)?bn:xr;return n(t,Gs(e,3))}function uc(t,e){var n=lh(t)?xn:Sr;return n(t,Gs(e,3))}var dc=ls((function(t,e,n){ue.call(t,n)?t[n].push(e):gr(t,n,[e])}));function fc(t,e,n,i){t=hh(t)?t:Hu(t),n=n&&!i?Yh(n):0;var r=t.length;return n<0&&(n=Ne(r+n,0)),Wh(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&Fn(t,e,n)>-1}var gc=bo((function(t,e,i){var r=-1,o="function"==typeof e,s=hh(t)?n(t.length):[];return xr(t,(function(t){s[++r]=o?yn(e,t,i):zr(t,e,i)})),s})),pc=ls((function(t,e,n){gr(t,n,e)}));function mc(t,e){var n=lh(t)?$n:oo;return n(t,Gs(e,3))}function vc(t,e,n,i){return null==t?[]:(lh(e)||(e=null==e?[]:[e]),n=i?r:n,lh(n)||(n=null==n?[]:[n]),uo(t,e,n))}var wc=ls((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));function yc(t,e,n){var i=lh(t)?Tn:zn,r=arguments.length<3;return i(t,Gs(e,4),n,r,xr)}function _c(t,e,n){var i=lh(t)?Ln:zn,r=arguments.length<3;return i(t,Gs(e,4),n,r,Sr)}function bc(t,e){var n=lh(t)?Cn:$r;return n(t,Hc(Gs(e,3)))}function xc(t){var e=lh(t)?or:xo;return e(t)}function Sc(t,e,n){e=(n?aa(t,e,n):e===r)?1:Yh(e);var i=lh(t)?sr:So;return i(t,e)}function Cc(t){var e=lh(t)?ar:$o;return e(t)}function Ac(t){if(null==t)return 0;if(hh(t))return Wh(t)?pi(t):t.length;var e=Zs(t);return e==Q||e==ot?t.size:no(t).length}function kc(t,e,n){var i=lh(t)?En:To;return n&&aa(t,e,n)&&(e=r),i(t,Gs(e,3))}var $c=bo((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]]),uo(t,Rr(e,1),[])})),Rc=Ee||function(){return an.Date.now()};function Tc(t,e){if("function"!=typeof e)throw new oe(l);return t=Yh(t),function(){if(--t<1)return e.apply(this,arguments)}}function Lc(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,Es(t,A,r,r,r,r,e)}function Ec(t,e){var n;if("function"!=typeof e)throw new oe(l);return t=Yh(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Mc=bo((function(t,e,n){var i=w;if(n.length){var r=hi(n,zs(Mc));i|=S}return Es(t,i,e,n,r)})),Oc=bo((function(t,e,n){var i=w|y;if(n.length){var r=hi(n,zs(Oc));i|=S}return Es(e,i,t,n,r)}));function Dc(t,e,n){e=n?r:e;var i=Es(t,b,r,r,r,r,r,e);return i.placeholder=Dc.placeholder,i}function Ic(t,e,n){e=n?r:e;var i=Es(t,x,r,r,r,r,r,e);return i.placeholder=Ic.placeholder,i}function Pc(t,e,n){var i,o,s,a,c,h,u=0,d=!1,f=!1,g=!0;if("function"!=typeof t)throw new oe(l);function p(e){var n=i,s=o;return i=o=r,u=e,a=t.apply(s,n),a}function m(t){return u=t,c=Aa(y,e),d?p(t):a}function v(t){var n=t-h,i=t-u,r=e-n;return f?He(r,s-i):r}function w(t){var n=t-h,i=t-u;return h===r||n>=e||n<0||f&&i>=s}function y(){var t=Rc();if(w(t))return _(t);c=Aa(y,v(t))}function _(t){return c=r,g&&i?p(t):(i=o=r,a)}function b(){c!==r&&qo(c),u=0,i=h=o=c=r}function x(){return c===r?a:_(Rc())}function S(){var t=Rc(),n=w(t);if(i=arguments,o=this,h=t,n){if(c===r)return m(h);if(f)return qo(c),c=Aa(y,e),p(h)}return c===r&&(c=Aa(y,e)),a}return e=Xh(e)||0,Ch(n)&&(d=!!n.leading,f="maxWait"in n,s=f?Ne(Xh(n.maxWait)||0,e):s,g="trailing"in n?!!n.trailing:g),S.cancel=b,S.flush=x,S}var Fc=bo((function(t,e){return _r(t,1,e)})),Wc=bo((function(t,e,n){return _r(t,Xh(e)||0,n)}));function Bc(t){return Es(t,$)}function Nc(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(Nc.Cache||zi),n}function Hc(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 Uc(t){return Ec(2,t)}Nc.Cache=zi;var zc=jo((function(t,e){e=1==e.length&&lh(e[0])?$n(e[0],Kn(Gs())):$n(Rr(e,1),Kn(Gs()));var n=e.length;return bo((function(i){var r=-1,o=He(i.length,n);while(++r<o)i[r]=e[r].call(this,i[r]);return yn(t,this,i)}))})),Gc=bo((function(t,e){var n=hi(e,zs(Gc));return Es(t,S,r,e,n)})),jc=bo((function(t,e){var n=hi(e,zs(jc));return Es(t,C,r,e,n)})),Vc=Ws((function(t,e){return Es(t,k,r,r,r,e)}));function qc(t,e){if("function"!=typeof t)throw new oe(l);return e=e===r?e:Yh(e),bo(t,e)}function Yc(t,e){if("function"!=typeof t)throw new oe(l);return e=null==e?0:Ne(Yh(e),0),bo((function(n){var i=n[e],r=Vo(n,0,e);return i&&Rn(r,i),yn(t,this,r)}))}function Kc(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new oe(l);return Ch(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Pc(t,e,{leading:i,maxWait:e,trailing:r})}function Xc(t){return Lc(t,1)}function Zc(t,e){return Gc(zo(e),t)}function Qc(){if(!arguments.length)return[];var t=arguments[0];return lh(t)?t:[t]}function Jc(t){return vr(t,p)}function th(t,e){return e="function"==typeof e?e:r,vr(t,p,e)}function eh(t){return vr(t,f|p)}function nh(t,e){return e="function"==typeof e?e:r,vr(t,f|p,e)}function ih(t,e){return null==e||yr(t,e,xu(e))}function rh(t,e){return t===e||t!==t&&e!==e}var oh=ks(Fr),sh=ks((function(t,e){return t>=e})),ah=Gr(function(){return arguments}())?Gr:function(t){return Ah(t)&&ue.call(t,"callee")&&!Ce.call(t,"callee")},lh=n.isArray,ch=fn?Kn(fn):jr;function hh(t){return null!=t&&Sh(t.length)&&!bh(t)}function uh(t){return Ah(t)&&hh(t)}function dh(t){return!0===t||!1===t||Ah(t)&&Pr(t)==V}var fh=Pe||Yd,gh=gn?Kn(gn):Vr;function ph(t){return Ah(t)&&1===t.nodeType&&!Dh(t)}function mh(t){if(null==t)return!0;if(hh(t)&&(lh(t)||"string"==typeof t||"function"==typeof t.splice||fh(t)||Nh(t)||ah(t)))return!t.length;var e=Zs(t);if(e==Q||e==ot)return!t.size;if(fa(t))return!no(t).length;for(var n in t)if(ue.call(t,n))return!1;return!0}function vh(t,e){return qr(t,e)}function wh(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 yh(t){if(!Ah(t))return!1;var e=Pr(t);return e==K||e==Y||"string"==typeof t.message&&"string"==typeof t.name&&!Dh(t)}function _h(t){return"number"==typeof t&&Fe(t)}function bh(t){if(!Ch(t))return!1;var e=Pr(t);return e==X||e==Z||e==j||e==it}function xh(t){return"number"==typeof t&&t==Yh(t)}function Sh(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=P}function Ch(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ah(t){return null!=t&&"object"==typeof t}var kh=pn?Kn(pn):Kr;function $h(t,e){return t===e||Xr(t,e,Vs(e))}function Rh(t,e,n){return n="function"==typeof n?n:r,Xr(t,e,Vs(e),n)}function Th(t){return Oh(t)&&t!=+t}function Lh(t){if(da(t))throw new Wt(a);return Zr(t)}function Eh(t){return null===t}function Mh(t){return null==t}function Oh(t){return"number"==typeof t||Ah(t)&&Pr(t)==J}function Dh(t){if(!Ah(t)||Pr(t)!=et)return!1;var e=xe(t);if(null===e)return!0;var n=ue.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&he.call(n)==pe}var Ih=mn?Kn(mn):Qr;function Ph(t){return xh(t)&&t>=-P&&t<=P}var Fh=vn?Kn(vn):Jr;function Wh(t){return"string"==typeof t||!lh(t)&&Ah(t)&&Pr(t)==st}function Bh(t){return"symbol"==typeof t||Ah(t)&&Pr(t)==at}var Nh=wn?Kn(wn):to;function Hh(t){return t===r}function Uh(t){return Ah(t)&&Zs(t)==ct}function zh(t){return Ah(t)&&Pr(t)==ht}var Gh=ks(ro),jh=ks((function(t,e){return t<=e}));function Vh(t){if(!t)return[];if(hh(t))return Wh(t)?mi(t):rs(t);if($e&&t[$e])return ai(t[$e]());var e=Zs(t),n=e==Q?li:e==ot?ui:Hu;return n(t)}function qh(t){if(!t)return 0===t?t:0;if(t=Xh(t),t===I||t===-I){var e=t<0?-1:1;return e*F}return t===t?t:0}function Yh(t){var e=qh(t),n=e%1;return e===e?n?e-n:e:0}function Kh(t){return t?mr(Yh(t),0,B):0}function Xh(t){if("number"==typeof t)return t;if(Bh(t))return W;if(Ch(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ch(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 Zh(t){return os(t,Su(t))}function Qh(t){return t?mr(Yh(t),-P,P):0===t?t:0}function Jh(t){return null==t?"":Do(t)}var tu=cs((function(t,e){if(fa(e)||hh(e))os(e,xu(e),t);else for(var n in e)ue.call(e,n)&&cr(t,n,e[n])})),eu=cs((function(t,e){os(e,Su(e),t)})),nu=cs((function(t,e,n,i){os(e,Su(e),t,i)})),iu=cs((function(t,e,n,i){os(e,xu(e),t,i)})),ru=Ws(pr);function ou(t,e){var n=Ci(t);return null==e?n:dr(n,e)}var su=bo((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=Su(s),l=-1,c=a.length;while(++l<c){var h=a[l],u=t[h];(u===r||rh(u,le[h])&&!ue.call(t,h))&&(t[h]=s[h])}}return t})),au=bo((function(t){return t.push(r,Os),yn($u,r,t)}));function lu(t,e){return In(t,Gs(e,3),Er)}function cu(t,e){return In(t,Gs(e,3),Mr)}function hu(t,e){return null==t?t:Tr(t,Gs(e,3),Su)}function uu(t,e){return null==t?t:Lr(t,Gs(e,3),Su)}function du(t,e){return t&&Er(t,Gs(e,3))}function fu(t,e){return t&&Mr(t,Gs(e,3))}function gu(t){return null==t?[]:Or(t,xu(t))}function pu(t){return null==t?[]:Or(t,Su(t))}function mu(t,e,n){var i=null==t?r:Dr(t,e);return i===r?n:i}function vu(t,e){return null!=t&&ta(t,e,Wr)}function wu(t,e){return null!=t&&ta(t,e,Br)}var yu=_s((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=ge.call(e)),t[e]=n}),kd(Ld)),_u=_s((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=ge.call(e)),ue.call(t,e)?t[e].push(n):t[e]=[n]}),Gs),bu=bo(zr);function xu(t){return hh(t)?rr(t):no(t)}function Su(t){return hh(t)?rr(t,!0):io(t)}function Cu(t,e){var n={};return e=Gs(e,3),Er(t,(function(t,i,r){gr(n,e(t,i,r),t)})),n}function Au(t,e){var n={};return e=Gs(e,3),Er(t,(function(t,i,r){gr(n,i,e(t,i,r))})),n}var ku=cs((function(t,e,n){lo(t,e,n)})),$u=cs((function(t,e,n,i){lo(t,e,n,i)})),Ru=Ws((function(t,e){var n={};if(null==t)return n;var i=!1;e=$n(e,(function(e){return e=Go(e,t),i||(i=e.length>1),e})),os(t,Ns(t),n),i&&(n=vr(n,f|g|p,Ds));var r=e.length;while(r--)Po(n,e[r]);return n}));function Tu(t,e){return Eu(t,Hc(Gs(e)))}var Lu=Ws((function(t,e){return null==t?{}:fo(t,e)}));function Eu(t,e){if(null==t)return{};var n=$n(Ns(t),(function(t){return[t]}));return e=Gs(e),go(t,n,(function(t,n){return e(t,n[0])}))}function Mu(t,e,n){e=Go(e,t);var i=-1,o=e.length;o||(o=1,t=r);while(++i<o){var s=null==t?r:t[Ea(e[i])];s===r&&(i=o,s=n),t=bh(s)?s.call(t):s}return t}function Ou(t,e,n){return null==t?t:Co(t,e,n)}function Du(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Co(t,e,n,i)}var Iu=Ls(xu),Pu=Ls(Su);function Fu(t,e,n){var i=lh(t),r=i||fh(t)||Nh(t);if(e=Gs(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Ch(t)&&bh(o)?Ci(xe(t)):{}}return(r?bn:Er)(t,(function(t,i,r){return e(n,t,i,r)})),n}function Wu(t,e){return null==t||Po(t,e)}function Bu(t,e,n){return null==t?t:Fo(t,e,zo(n))}function Nu(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Fo(t,e,zo(n),i)}function Hu(t){return null==t?[]:Xn(t,xu(t))}function Uu(t){return null==t?[]:Xn(t,Su(t))}function zu(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=Xh(n),n=n===n?n:0),e!==r&&(e=Xh(e),e=e===e?e:0),mr(Xh(t),e,n)}function Gu(t,e,n){return e=qh(e),n===r?(n=e,e=0):n=qh(n),t=Xh(t),Nr(t,e,n)}function ju(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=qh(t),e===r?(e=t,t=0):e=qh(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var o=Ve();return He(t+o*(e-t+nn("1e-"+((o+"").length-1))),e)}return wo(t,e)}var Vu=gs((function(t,e,n){return e=e.toLowerCase(),t+(n?qu(e):e)}));function qu(t){return _d(Jh(t).toLowerCase())}function Yu(t){return t=Jh(t),t&&t.replace(Qt,ei).replace(ze,"")}function Ku(t,e,n){t=Jh(t),e=Do(e);var i=t.length;n=n===r?i:mr(Yh(n),0,i);var o=n;return n-=e.length,n>=0&&t.slice(n,o)==e}function Xu(t){return t=Jh(t),t&&Rt.test(t)?t.replace(kt,ni):t}function Zu(t){return t=Jh(t),t&&Pt.test(t)?t.replace(It,"\\$&"):t}var Qu=gs((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ju=gs((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),td=fs("toLowerCase");function ed(t,e,n){t=Jh(t),e=Yh(e);var i=e?pi(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Ss(De(r),n)+t+Ss(Oe(r),n)}function nd(t,e,n){t=Jh(t),e=Yh(e);var i=e?pi(t):0;return e&&i<e?t+Ss(e-i,n):t}function id(t,e,n){t=Jh(t),e=Yh(e);var i=e?pi(t):0;return e&&i<e?Ss(e-i,n)+t:t}function rd(t,e,n){return n||null==e?e=0:e&&(e=+e),je(Jh(t).replace(Ft,""),e||0)}function od(t,e,n){return e=(n?aa(t,e,n):e===r)?1:Yh(e),_o(Jh(t),e)}function sd(){var t=arguments,e=Jh(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var ad=gs((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));function ld(t,e,n){return n&&"number"!=typeof n&&aa(t,e,n)&&(e=n=r),n=n===r?B:n>>>0,n?(t=Jh(t),t&&("string"==typeof e||null!=e&&!Ih(e))&&(e=Do(e),!e&&oi(t))?Vo(mi(t),0,n):t.split(e,n)):[]}var cd=gs((function(t,e,n){return t+(n?" ":"")+_d(e)}));function hd(t,e,n){return t=Jh(t),n=null==n?0:mr(Yh(n),0,t.length),e=Do(e),t.slice(n,n+e.length)==e}function ud(t,e,n){var i=xi.templateSettings;n&&aa(t,e,n)&&(e=r),t=Jh(t),e=nu({},e,i,Ms);var o,s,a=nu({},e.imports,i.imports,Ms),l=xu(a),h=Xn(a,l),u=0,d=e.interpolate||Jt,f="__p += '",g=ie((e.escape||Jt).source+"|"+d.source+"|"+(d===Et?jt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),p="//# sourceURL="+(ue.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";t.replace(g,(function(e,n,i,r,a,l){return i||(i=r),f+=t.slice(u,l).replace(te,ii),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=l+e.length,e})),f+="';\n";var m=ue.call(e,"variable")&&e.variable;if(m){if(zt.test(m))throw new Wt(c)}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(xt,""):f).replace(St,"$1").replace(Ct,"$1;"),f="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")+f+"return __p\n}";var v=xd((function(){return Ut(l,p+"return "+f).apply(r,h)}));if(v.source=f,yh(v))throw v;return v}function dd(t){return Jh(t).toLowerCase()}function fd(t){return Jh(t).toUpperCase()}function gd(t,e,n){if(t=Jh(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 pd(t,e,n){if(t=Jh(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 md(t,e,n){if(t=Jh(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 vd(t,e){var n=R,i=T;if(Ch(e)){var o="separator"in e?e.separator:o;n="length"in e?Yh(e.length):n,i="omission"in e?Do(e.omission):i}t=Jh(t);var s=t.length;if(oi(t)){var a=mi(t);s=a.length}if(n>=s)return t;var l=n-pi(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),Ih(o)){if(t.slice(l).search(o)){var h,u=c;o.global||(o=ie(o.source,Jh(Vt.exec(o))+"g")),o.lastIndex=0;while(h=o.exec(u))var d=h.index;c=c.slice(0,d===r?l:d)}}else if(t.indexOf(Do(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i}function wd(t){return t=Jh(t),t&&$t.test(t)?t.replace(At,wi):t}var yd=gs((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),_d=fs("toUpperCase");function bd(t,e,n){return t=Jh(t),e=n?r:e,e===r?si(t)?bi(t):Dn(t):t.match(e)||[]}var xd=bo((function(t,e){try{return yn(t,r,e)}catch(n){return yh(n)?n:new Wt(n)}})),Sd=Ws((function(t,e){return bn(e,(function(e){e=Ea(e),gr(t,e,Mc(t[e],t))})),t}));function Cd(t){var e=null==t?0:t.length,n=Gs();return t=e?$n(t,(function(t){if("function"!=typeof t[1])throw new oe(l);return[n(t[0]),t[1]]})):[],bo((function(n){var i=-1;while(++i<e){var r=t[i];if(yn(r[0],this,n))return yn(r[1],this,n)}}))}function Ad(t){return wr(vr(t,f))}function kd(t){return function(){return t}}function $d(t,e){return null==t||t!==t?e:t}var Rd=ws(),Td=ws(!0);function Ld(t){return t}function Ed(t){return eo("function"==typeof t?t:vr(t,f))}function Md(t){return so(vr(t,f))}function Od(t,e){return ao(t,vr(e,f))}var Dd=bo((function(t,e){return function(n){return zr(n,t,e)}})),Id=bo((function(t,e){return function(n){return zr(t,n,e)}}));function Pd(t,e,n){var i=xu(e),r=Or(e,i);null!=n||Ch(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=Or(e,xu(e)));var o=!(Ch(n)&&"chain"in n)||!!n.chain,s=bh(t);return bn(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 Fd(){return an._===this&&(an._=me),this}function Wd(){}function Bd(t){return t=Yh(t),bo((function(e){return ho(e,t)}))}var Nd=xs($n),Hd=xs(Sn),Ud=xs(En);function zd(t){return la(t)?Hn(Ea(t)):po(t)}function Gd(t){return function(e){return null==t?r:Dr(t,e)}}var jd=As(),Vd=As(!0);function qd(){return[]}function Yd(){return!1}function Kd(){return{}}function Xd(){return""}function Zd(){return!0}function Qd(t,e){if(t=Yh(t),t<1||t>P)return[];var n=B,i=He(t,B);e=Gs(e),t-=B;var r=Vn(i,e);while(++n<t)e(n);return r}function Jd(t){return lh(t)?$n(t,Ea):Bh(t)?[t]:rs(La(Jh(t)))}function tf(t){var e=++de;return Jh(t)+e}var ef=bs((function(t,e){return t+e}),0),nf=Rs("ceil"),rf=bs((function(t,e){return t/e}),1),of=Rs("floor");function sf(t){return t&&t.length?Ar(t,Ld,Fr):r}function af(t,e){return t&&t.length?Ar(t,Gs(e,2),Fr):r}function lf(t){return Nn(t,Ld)}function cf(t,e){return Nn(t,Gs(e,2))}function hf(t){return t&&t.length?Ar(t,Ld,ro):r}function uf(t,e){return t&&t.length?Ar(t,Gs(e,2),ro):r}var df=bs((function(t,e){return t*e}),1),ff=Rs("round"),gf=bs((function(t,e){return t-e}),0);function pf(t){return t&&t.length?jn(t,Ld):0}function mf(t,e){return t&&t.length?jn(t,Gs(e,2)):0}return xi.after=Tc,xi.ary=Lc,xi.assign=tu,xi.assignIn=eu,xi.assignInWith=nu,xi.assignWith=iu,xi.at=ru,xi.before=Ec,xi.bind=Mc,xi.bindAll=Sd,xi.bindKey=Oc,xi.castArray=Qc,xi.chain=jl,xi.chunk=Ia,xi.compact=Pa,xi.concat=Fa,xi.cond=Cd,xi.conforms=Ad,xi.constant=kd,xi.countBy=nc,xi.create=ou,xi.curry=Dc,xi.curryRight=Ic,xi.debounce=Pc,xi.defaults=su,xi.defaultsDeep=au,xi.defer=Fc,xi.delay=Wc,xi.difference=Wa,xi.differenceBy=Ba,xi.differenceWith=Na,xi.drop=Ha,xi.dropRight=Ua,xi.dropRightWhile=za,xi.dropWhile=Ga,xi.fill=ja,xi.filter=rc,xi.flatMap=ac,xi.flatMapDeep=lc,xi.flatMapDepth=cc,xi.flatten=Ya,xi.flattenDeep=Ka,xi.flattenDepth=Xa,xi.flip=Bc,xi.flow=Rd,xi.flowRight=Td,xi.fromPairs=Za,xi.functions=gu,xi.functionsIn=pu,xi.groupBy=dc,xi.initial=tl,xi.intersection=el,xi.intersectionBy=nl,xi.intersectionWith=il,xi.invert=yu,xi.invertBy=_u,xi.invokeMap=gc,xi.iteratee=Ed,xi.keyBy=pc,xi.keys=xu,xi.keysIn=Su,xi.map=mc,xi.mapKeys=Cu,xi.mapValues=Au,xi.matches=Md,xi.matchesProperty=Od,xi.memoize=Nc,xi.merge=ku,xi.mergeWith=$u,xi.method=Dd,xi.methodOf=Id,xi.mixin=Pd,xi.negate=Hc,xi.nthArg=Bd,xi.omit=Ru,xi.omitBy=Tu,xi.once=Uc,xi.orderBy=vc,xi.over=Nd,xi.overArgs=zc,xi.overEvery=Hd,xi.overSome=Ud,xi.partial=Gc,xi.partialRight=jc,xi.partition=wc,xi.pick=Lu,xi.pickBy=Eu,xi.property=zd,xi.propertyOf=Gd,xi.pull=ll,xi.pullAll=cl,xi.pullAllBy=hl,xi.pullAllWith=ul,xi.pullAt=dl,xi.range=jd,xi.rangeRight=Vd,xi.rearg=Vc,xi.reject=bc,xi.remove=fl,xi.rest=qc,xi.reverse=gl,xi.sampleSize=Sc,xi.set=Ou,xi.setWith=Du,xi.shuffle=Cc,xi.slice=pl,xi.sortBy=$c,xi.sortedUniq=xl,xi.sortedUniqBy=Sl,xi.split=ld,xi.spread=Yc,xi.tail=Cl,xi.take=Al,xi.takeRight=kl,xi.takeRightWhile=$l,xi.takeWhile=Rl,xi.tap=Vl,xi.throttle=Kc,xi.thru=ql,xi.toArray=Vh,xi.toPairs=Iu,xi.toPairsIn=Pu,xi.toPath=Jd,xi.toPlainObject=Zh,xi.transform=Fu,xi.unary=Xc,xi.union=Tl,xi.unionBy=Ll,xi.unionWith=El,xi.uniq=Ml,xi.uniqBy=Ol,xi.uniqWith=Dl,xi.unset=Wu,xi.unzip=Il,xi.unzipWith=Pl,xi.update=Bu,xi.updateWith=Nu,xi.values=Hu,xi.valuesIn=Uu,xi.without=Fl,xi.words=bd,xi.wrap=Zc,xi.xor=Wl,xi.xorBy=Bl,xi.xorWith=Nl,xi.zip=Hl,xi.zipObject=Ul,xi.zipObjectDeep=zl,xi.zipWith=Gl,xi.entries=Iu,xi.entriesIn=Pu,xi.extend=eu,xi.extendWith=nu,Pd(xi,xi),xi.add=ef,xi.attempt=xd,xi.camelCase=Vu,xi.capitalize=qu,xi.ceil=nf,xi.clamp=zu,xi.clone=Jc,xi.cloneDeep=eh,xi.cloneDeepWith=nh,xi.cloneWith=th,xi.conformsTo=ih,xi.deburr=Yu,xi.defaultTo=$d,xi.divide=rf,xi.endsWith=Ku,xi.eq=rh,xi.escape=Xu,xi.escapeRegExp=Zu,xi.every=ic,xi.find=oc,xi.findIndex=Va,xi.findKey=lu,xi.findLast=sc,xi.findLastIndex=qa,xi.findLastKey=cu,xi.floor=of,xi.forEach=hc,xi.forEachRight=uc,xi.forIn=hu,xi.forInRight=uu,xi.forOwn=du,xi.forOwnRight=fu,xi.get=mu,xi.gt=oh,xi.gte=sh,xi.has=vu,xi.hasIn=wu,xi.head=Qa,xi.identity=Ld,xi.includes=fc,xi.indexOf=Ja,xi.inRange=Gu,xi.invoke=bu,xi.isArguments=ah,xi.isArray=lh,xi.isArrayBuffer=ch,xi.isArrayLike=hh,xi.isArrayLikeObject=uh,xi.isBoolean=dh,xi.isBuffer=fh,xi.isDate=gh,xi.isElement=ph,xi.isEmpty=mh,xi.isEqual=vh,xi.isEqualWith=wh,xi.isError=yh,xi.isFinite=_h,xi.isFunction=bh,xi.isInteger=xh,xi.isLength=Sh,xi.isMap=kh,xi.isMatch=$h,xi.isMatchWith=Rh,xi.isNaN=Th,xi.isNative=Lh,xi.isNil=Mh,xi.isNull=Eh,xi.isNumber=Oh,xi.isObject=Ch,xi.isObjectLike=Ah,xi.isPlainObject=Dh,xi.isRegExp=Ih,xi.isSafeInteger=Ph,xi.isSet=Fh,xi.isString=Wh,xi.isSymbol=Bh,xi.isTypedArray=Nh,xi.isUndefined=Hh,xi.isWeakMap=Uh,xi.isWeakSet=zh,xi.join=rl,xi.kebabCase=Qu,xi.last=ol,xi.lastIndexOf=sl,xi.lowerCase=Ju,xi.lowerFirst=td,xi.lt=Gh,xi.lte=jh,xi.max=sf,xi.maxBy=af,xi.mean=lf,xi.meanBy=cf,xi.min=hf,xi.minBy=uf,xi.stubArray=qd,xi.stubFalse=Yd,xi.stubObject=Kd,xi.stubString=Xd,xi.stubTrue=Zd,xi.multiply=df,xi.nth=al,xi.noConflict=Fd,xi.noop=Wd,xi.now=Rc,xi.pad=ed,xi.padEnd=nd,xi.padStart=id,xi.parseInt=rd,xi.random=ju,xi.reduce=yc,xi.reduceRight=_c,xi.repeat=od,xi.replace=sd,xi.result=Mu,xi.round=ff,xi.runInContext=t,xi.sample=xc,xi.size=Ac,xi.snakeCase=ad,xi.some=kc,xi.sortedIndex=ml,xi.sortedIndexBy=vl,xi.sortedIndexOf=wl,xi.sortedLastIndex=yl,xi.sortedLastIndexBy=_l,xi.sortedLastIndexOf=bl,xi.startCase=cd,xi.startsWith=hd,xi.subtract=gf,xi.sum=pf,xi.sumBy=mf,xi.template=ud,xi.times=Qd,xi.toFinite=qh,xi.toInteger=Yh,xi.toLength=Kh,xi.toLower=dd,xi.toNumber=Xh,xi.toSafeInteger=Qh,xi.toString=Jh,xi.toUpper=fd,xi.trim=gd,xi.trimEnd=pd,xi.trimStart=md,xi.truncate=vd,xi.unescape=wd,xi.uniqueId=tf,xi.upperCase=yd,xi.upperFirst=_d,xi.each=hc,xi.eachRight=uc,xi.first=Qa,Pd(xi,function(){var t={};return Er(xi,(function(e,n){ue.call(xi.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),xi.VERSION=o,bn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){xi[t].placeholder=xi})),bn(["drop","take"],(function(t,e){$i.prototype[t]=function(n){n=n===r?1:Ne(Yh(n),0);var i=this.__filtered__&&!e?new $i(this):this.clone();return i.__filtered__?i.__takeCount__=He(n,i.__takeCount__):i.__views__.push({size:He(n,B),type:t+(i.__dir__<0?"Right":"")}),i},$i.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),bn(["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:Gs(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),bn(["head","last"],(function(t,e){var n="take"+(e?"Right":"");$i.prototype[t]=function(){return this[n](1).value()[0]}})),bn(["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(Ld)},$i.prototype.find=function(t){return this.filter(t).head()},$i.prototype.findLast=function(t){return this.reverse().find(t)},$i.prototype.invokeMap=bo((function(t,e){return"function"==typeof t?new $i(this):this.map((function(n){return zr(n,t,e)}))})),$i.prototype.reject=function(t){return this.filter(Hc(Gs(t)))},$i.prototype.slice=function(t,e){t=Yh(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=Yh(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)},Er($i.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=xi[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);o&&(xi.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,l=e instanceof $i,c=a[0],h=l||lh(e),u=function(t){var e=o.apply(xi,Rn([t],a));return i&&d?e[0]:e};h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var d=this.__chain__,f=!!this.__actions__.length,g=s&&!d,p=l&&!f;if(!s&&h){e=p?e:new $i(this);var m=t.apply(e,a);return m.__actions__.push({func:ql,args:[u],thisArg:r}),new ki(m,d)}return g&&p?t.apply(this,a):(m=this.thru(u),g?i?m.value()[0]:m.value():m)})})),bn(["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);xi.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(lh(r)?r:[],t)}return this[n]((function(n){return e.apply(lh(n)?n:[],t)}))}})),Er($i.prototype,(function(t,e){var n=xi[e];if(n){var i=n.name+"";ue.call(cn,i)||(cn[i]=[]),cn[i].push({name:e,func:n})}})),cn[ys(r,y).name]=[{name:"wrapper",func:r}],$i.prototype.clone=Ri,$i.prototype.reverse=Ti,$i.prototype.value=Li,xi.prototype.at=Yl,xi.prototype.chain=Kl,xi.prototype.commit=Xl,xi.prototype.next=Zl,xi.prototype.plant=Jl,xi.prototype.reverse=tc,xi.prototype.toJSON=xi.prototype.valueOf=xi.prototype.value=ec,xi.prototype.first=xi.prototype.head,$e&&(xi.prototype[$e]=Ql),xi},Si=xi();an._=Si,i=function(){return Si}.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",h="add",u="remove",d="showStart",f="showEnd",g="hideStart",p="hideEnd",m="filter",v="sort",w="move",y="send",_="beforeSend",b="receive",x="beforeReceive",S="dragInit",C="dragStart",A="dragMove",k="dragScroll",$="dragEnd",R="dragReleaseStart",T="dragReleaseEnd",L="destroy",E="ontouchstart"in window,M=!!window.PointerEvent,O=!!window.navigator.msPointerEnabled,D=16777216;function I(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}I.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},I.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},I.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},I.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},I.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},I.prototype.countListeners=function(t){if(!this._events)return 0;var e=this._events[t];return e?e.length:0},I.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var P=M?"pointerout":O?"MSPointerOut":"",F=100;function W(t){P&&(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(P,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(P,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(){P&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var B=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],N={};function H(t,e){var n=N[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 N[e]=n,n;++r}return""}function U(){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 z=window.navigator.userAgent.toLowerCase(),G=z.indexOf("edge")>-1,j=z.indexOf("trident")>-1,V=z.indexOf("firefox")>-1,q=z.indexOf("android")>-1,Y=!!U()&&{passive:!0},K="touchAction",X=H(document.documentElement.style,K),Z="auto";function Q(t,e){this._element=t,this._emitter=new I,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,(G||j)&&(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 E?Q._touchEvents:M?Q._pointerEvents:O?Q._msPointerEvents:Q._mouseEvents}(),Q._emitter=new I,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),E&&(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=H(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",ht="dragMoveWrite",ut="dragScrollRead",dt="dragScrollWrite",ft="dragSortRead",gt="placeholderLayoutRead",pt="placeholderLayoutWrite",mt="placeholderResizeWrite",vt="autoScrollRead",wt="autoScrollWrite",yt="debounceRead",_t=0,bt=1,xt=2,St=new et(3);function Ct(t,e,n){St.add(_t,it+t,e),St.add(xt,rt+t,n)}function At(t){St.remove(_t,it+t),St.remove(xt,rt+t)}function kt(t,e,n){St.add(_t,ot+t,e),St.add(xt,st+t,n)}function $t(t){St.remove(_t,ot+t),St.remove(xt,st+t)}function Rt(t,e,n){St.add(_t,at+t,e),St.add(xt,lt+t,n)}function Tt(t){St.remove(_t,at+t),St.remove(xt,lt+t)}function Lt(t,e,n){St.add(_t,ct+t,e),St.add(xt,ht+t,n)}function Et(t){St.remove(_t,ct+t),St.remove(xt,ht+t)}function Mt(t,e,n){St.add(_t,ut+t,e),St.add(xt,dt+t,n)}function Ot(t){St.remove(_t,ut+t),St.remove(xt,dt+t)}function Dt(t,e){St.add(bt,ft+t,e)}function It(t){St.remove(bt,ft+t)}function Pt(t,e,n){St.add(_t,gt+t,e),St.add(xt,pt+t,n)}function Ft(t){St.remove(_t,gt+t),St.remove(xt,pt+t)}function Wt(t,e){St.add(xt,mt+t,e)}function Bt(t){St.remove(xt,mt+t)}function Nt(t,e){St.add(_t,vt,t),St.add(xt,wt,e)}function Ht(){St.remove(_t,vt),St.remove(xt,wt)}function Ut(t,e){St.add(_t,yt+t,e)}function zt(t){St.remove(_t,yt+t)}var Gt=1,jt=2,Vt=4,qt=8,Yt=Gt|qt,Kt=Gt|Vt,Xt=jt|qt,Zt=jt|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 he(t){return t===window?ie.scrollHeight-ie.clientHeight:t.scrollHeight-t.clientHeight}function ue(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 de(t){return t._drag._getGrid()._settings.dragAutoScroll}function fe(t){t._drag&&t._drag._prepareScroll()}function ge(t){if(t._drag&&t._isActive){var e=t._drag;e._scrollDiffX=e._scrollDiffY=0,t._setTranslate(e._left,e._top)}}function pe(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 we(t,e){this.pool=[],this.createItem=t,this.releaseItem=e}function ye(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 _e(t,e){if(!ye(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 be(t,e){var n=_e(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?Gt&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=de(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=de(t).onStart;Jt(e)&&e(t,this.element,this.direction)},me.prototype.onStop=function(){var t=this.item,e=de(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){Gt&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))},we.prototype.pick=function(){return this.pool.pop()||this.createItem()},we.prototype.release=function(t){this.releaseItem(t),-1===this.pool.indexOf(t)&&this.pool.push(t)},we.prototype.reset=function(){this.pool.length=0};var xe={width:0,height:0,left:0,right:0,top:0,bottom:0},Se={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[Gt]={},this._requests[jt]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new we((function(){return new me}),(function(t){t.reset()})),this._actionPool=new we((function(){return new ve}),(function(t){t.reset()})),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Ce.AXIS_X=Gt,Ce.AXIS_Y=jt,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(),Nt(this._readTick,this._writeTick))},Ce.prototype._startTicking=function(){this._isTicking=!0,Nt(this._readTick,this._writeTick)},Ce.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,Ht()},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=de(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,Gt),void(n&&this._cancelItemScroll(t,jt));var a=this._dragDirections[t._id],l=a[0],c=a[1];if(!l&&!c)return e&&this._cancelItemScroll(t,Gt),void(n&&this._cancelItemScroll(t,jt));for(var h=this._getItemHandleRect(t,i.handle,xe),u=Se,d=null,f=null,g=!0,p=!0,m=0,v=0,w=null,y=null,_=0,b=0,x=0,S=null,C=-1/0,A=0,k=0,$=null,R=0,T=0,L=null,E=-1/0,M=0,O=0,D=null,I=0,P=0,F=0;F<r.length;F++)d=r[F],g=e&&l&&d.axis!==jt,p=n&&c&&d.axis!==Gt,v=d.priority||0,(!g||v<C)&&(!p||v<E)||(f=se(d.element||d),b=g?ce(f):-1,x=p?he(f):-1,(b||x)&&(u=ue(f,u),m=be(h,u),m<=0||(g&&v>=C&&b>0&&(v>C||m>k)&&(y=null,w=pe("number"===typeof d.threshold?d.threshold:o,s,h.width,u.width),l===Kt?(_=u.right+w.offset-h.right,_<=w.value&&ae(f)<b&&(y=Kt)):l===Yt&&(_=h.left-(u.left-w.offset),_<=w.value&&ae(f)>0&&(y=Yt)),null!==y&&(S=f,C=v,A=w.value,k=m,$=y,R=_,T=b)),p&&v>=E&&x>0&&(v>E||m>O)&&(y=null,w=pe("number"===typeof d.threshold?d.threshold:o,s,h.height,u.height),c===Zt?(_=u.bottom+w.offset-h.bottom,_<=w.value&&le(f)<x&&(y=Zt)):c===Xt&&(_=h.top-(u.top-w.offset),_<=w.value&&le(f)>0&&(y=Xt)),null!==y&&(L=f,E=v,M=w.value,O=m,D=y,I=_,P=x)))));e&&(S?this._requestItemScroll(t,Gt,S,$,A,R,T):this._cancelItemScroll(t,Gt)),n&&(L?this._requestItemScroll(t,jt,L,D,M,I,P):this._cancelItemScroll(t,jt))},Ce.prototype._updateScrollRequest=function(t){for(var e=t.item,n=de(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,xe),l=Se,c=null,h=null,u=!1,d=null,f=null,g=null,p=null,m=null,v=null,w=0;w<r;w++)if(c=i[w],h=se(c.element||c),h===t.element){if(u=!!(Gt&t.direction),u){if(c.axis===jt)continue}else if(c.axis===Gt)continue;if(m=u?ce(h):he(h),m<=0)break;if(l=ue(h,l),d=be(a,l),d<=0)break;if(f=pe("number"===typeof c.threshold?c.threshold:o,s,u?a.width:a.height,u?l.width:l.height),g=t.direction===Yt?a.left-(l.left-f.offset):t.direction===Kt?l.right+f.offset-a.right:t.direction===Xt?a.top-(l.top-f.offset):l.bottom+f.offset-a.bottom,g>f.value)break;if(p=u?ae(h):le(h),v=Vt&t.direction?p>=m:p<=0,v)break;return t.maxValue=m,t.threshold=f.value,t.distance=g,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[Gt],c=this._requests[jt],h=0;h<a.length;h++)t=a[h],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,Gt))),s=!0,n=c[t._id],n&&n.isActive&&(s=!this._updateScrollRequest(n),s&&(r=!0,this._cancelItemScroll(t,jt))),r&&(this._requestOverlapCheck[t._id]=0,this._checkItemOverlap(t,o,s))},Ce.prototype._requestAction=function(t,e){for(var n=this._actions,i=e===Gt,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[Gt][t],n=o[jt][t],e&&this._requestAction(e,Gt),n&&this._requestAction(n,jt);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++)fe(n[t]);for(t=0;t<n.length;t++)ge(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[Gt][n];i&&(this._cancelItemScroll(t,Gt),delete this._requests[Gt][n]);var r=this._requests[jt][n];r&&(this._cancelItemScroll(t,jt),delete this._requests[jt][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[Gt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrollingY=function(t){var e=this._requests[jt][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 Ae=window.Element.prototype,ke=Ae.matches||Ae.matchesSelector||Ae.webkitMatchesSelector||Ae.mozMatchesSelector||Ae.msMatchesSelector||Ae.oMatchesSelector||function(){return!1};function $e(t,e){return ke.call(t,e)}function Re(t,e){e&&(t.classList?t.classList.add(e):$e(t,"."+e)||(t.className+=" "+e))}var Te=[],Le="number";function Ee(t,e,n){var i=typeof n===Le?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 Ie=H(document.documentElement.style,"transform")||"transform",Pe=/([A-Z])/g,Fe=/^(webkit-|moz-|ms-|o-)/,We=/^(-m-s-)/;function Be(t){var e=t.replace(Pe,"-$1").toLowerCase();return e=e.replace(Fe,"-$1"),e=e.replace(We,"-ms-"),e}var Ne=Be(Ie),He="none",Ue="inline",ze="none",Ge="display";function je(t){var e=ee(t,Ne);if(!e||e===He)return!1;var n=ee(t,Ge);return n!==Ue&&n!==ze}function Ve(t){var e=document,n=t||e;while(n&&n!==e&&"static"===ee(n,"position")&&!je(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,Ne);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 hn=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,un=0,dn=1,fn=2,gn=!!U()&&{passive:!0};function pn(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:pn.defaultStartPredicate,this._startPredicateState=un,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}pn.autoScroller=new Ce,pn.defaultStartPredicate=function(t,e,n){var i=t._drag;if(e.isFirst&&e.srcEvent.button)return!1;if(!hn&&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)},pn.defaultSortPredicate=function(){var t={},e={},n={},i=[],s=1,a=100;function l(n,r,o){var s,a,l,c,h,u,d,f,g,p,m=null,v=r._settings.dragSort,w=-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(p=0;p<a.length;p++)if(l=a[p],!l._isDestroyed){l._updateBoundingRect(),u=Math.max(0,l._left),d=Math.max(0,l._top),f=Math.min(window.innerWidth,l._right),g=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")&&(h=c.getBoundingClientRect(),u=Math.max(u,h.left),d=Math.max(d,h.top),f=Math.min(f,h.right),g=Math.min(g,h.bottom)),"fixed"===ee(c,"position"))break;c=c.parentNode}u>=f||d>=g||(e.left=u,e.top=d,e.width=f-u,e.height=g-d,s=be(t,e),s>o&&s>w&&(w=s,m=l))}return i.length=0,m}return function(i,c){var h=i._drag,u=h._getGrid(),d=c&&"number"===typeof c.threshold?c.threshold:50,f=c&&c.action===r?r:o,g=c&&c.migrateAction===r?r:o;d=Math.min(Math.max(d,s),a),t.width=i._width,t.height=i._height,t.left=h._clientX,t.top=h._clientY;var p=l(i,u,d);if(!p)return null;var m,v,w,y=i.getGrid()!==p,_=0,b=0,x=0,S=-1,C=!1;for(p===u?(t.left=h._gridX+i._marginLeft,t.top=h._gridY+i._marginTop):(p._updateBorders(1,0,1,0),_=p._left+p._borderLeft,b=p._top+p._borderTop),w=0;w<p._items.length;w++)m=p._items[w],m._isActive&&m!==i&&(C=!0,e.width=m._width,e.height=m._height,e.left=m._left+m._marginLeft+_,e.top=m._top+m._marginTop+b,v=be(t,e),v>x&&(S=w,x=v));return y&&x<d&&(S=C?S:0,x=d),x>=d?(n.grid=p,n.index=S,n.action=y?g:f,n):null}}(),pn.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var t=this._item,e=t._id;if(pn.autoScroller.removeItem(t),Tt(e),Et(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()}},pn.prototype.sort=function(t){var e=this._item;this._isActive&&e._isActive&&this._dragMoveEvent&&(!0===t?this._handleSort():Dt(e._id,this._handleSort))},pn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),pn.autoScroller.removeItem(this._item),this._isDestroyed=!0)},pn.prototype._getGrid=function(){return n[this._gridId]||null},pn.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},pn.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,gn)},pn.prototype._unbindScrollListeners=function(){var t,e=this._scrollers;for(t=0;t<e.length;t++)e[t].removeEventListener("scroll",this._onScroll,gn);e.length=0},pn.prototype._resolveStartPredicate=function(t){var e=this._startPredicateData;if(!(t.distance<e.distance||e.delay))return this._resetStartPredicate(),!0},pn.prototype._forceResolveStartPredicate=function(t){this._isDestroyed||this._startPredicateState!==dn||(this._startPredicateState=fn,this._onStart(t))},pn.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)},pn.prototype._resetHeuristics=function(t,e){this._blockedSortIndex=null,this._sortX1=this._sortX2=t,this._sortY1=this._sortY2=e},pn.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},pn.prototype._resetStartPredicate=function(){var t=this._startPredicateData;t&&(t.delayTimer&&(t.delayTimer=window.clearTimeout(t.delayTimer)),this._startPredicateData=null)},pn.prototype._handleSort=function(){if(this._isActive){var t=this._getGrid()._settings;if(!t.dragSort||!t.dragAutoScroll.sortDuringScroll&&pn.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))}}},pn.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Dt(this._item._id,this._handleSort)},pn.prototype._cancelSort=function(){this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),It(this._item._id)},pn.prototype._finishSort=function(){var t=this._getGrid()._settings.dragSort,e=t&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},pn.prototype._checkOverlap=function(){if(this._isActive){var t,e,n,i,s,a,l,c,h=this._item,u=this._getGrid()._settings;t=Jt(u.dragSortPredicate)?u.dragSortPredicate(h,this._dragMoveEvent):pn.defaultSortPredicate(h,u.dragSortPredicate),t&&"number"===typeof t.index&&(l=t.action===r?r:o,e=h.getGrid(),i=t.grid||e,c=e!==i,n=e._items.indexOf(h),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(_)&&e._emit(_,{item:h,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),i._hasListeners(x)&&i._emit(x,{item:h,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),h._gridId=i._id,this._isMigrating=h._gridId!==this._gridId,e._items.splice(n,1),Ee(i._items,h,s),h._sortData=null,e._hasListeners(y)&&e._emit(y,{item:h,fromGrid:e,fromIndex:n,toGrid:i,toIndex:s}),i._hasListeners(b)&&i._emit(b,{item:h,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(w)&&e._emit(w,{item:h,fromIndex:n,toIndex:s,action:l}),e.layout())))}},pn.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,h=this._getGrid()._settings,u=r.parentNode,d=o?h.itemVisibleClass:h.itemHiddenClass,f=o?l.itemVisibleClass:l.itemHiddenClass;this._isMigrating=!1,this.destroy(),h.itemClass!==l.itemClass&&(cn(r,h.itemClass),Re(r,l.itemClass)),d!==f&&(cn(r,d),Re(r,f)),c!==u&&(c.appendChild(r),e=Ze(u,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 pn(n):null,c!==u&&n._setTranslate(t.x,t.y),n._visibility.setStyles(o?l.visibleStyles:l.hiddenStyles),i.start()},pn.prototype._preStartCheck=function(t){this._startPredicateState===un&&(this._startPredicateState=dn),this._startPredicateState===dn?(this._startPredicateResult=this._startPredicate(this._item,t),!0===this._startPredicateResult?(this._startPredicateState=fn,this._onStart(t)):!1===this._startPredicateResult&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=un)):this._startPredicateState===fn&&this._isActive&&this._onMove(t)},pn.prototype._preEndCheck=function(t){var e=this._startPredicateState===fn;this._startPredicate(this._item,t),this._startPredicateState=un,e&&this._isActive&&(this._isStarted?this._onEnd(t):this.stop())},pn.prototype._onStart=function(t){var e=this._item;e._isActive&&(this._isActive=!0,this._dragStartEvent=t,pn.autoScroller.addItem(e),Rt(e._id,this._prepareStart,this._applyStart))},pn.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 h=Ze(s,r);this._containerDiffX=h.left,this._containerDiffY=h.top}}}},pn.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(S,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)}}},pn.prototype._onMove=function(t){var e=this._item;e._isActive?(this._dragMoveEvent=t,Lt(e._id,this._prepareMove,this._applyMove),Dt(e._id,this._handleSort)):this.stop()},pn.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}}},pn.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(A,t,this._dragMoveEvent),pn.autoScroller.updateItem(t))}},pn.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()},pn.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}}},pn.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(k,t,this._scrollEvent))}},pn.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),Et(e._id),Ot(e._id),this._finishSort(),this._unbindScrollListeners(),o._containerDiffX=this._containerDiffX,o._containerDiffY=this._containerDiffY,this._reset(),cn(n,r.itemDraggingClass),pn.autoScroller.removeItem(e),i._emit($,e,t),this._isMigrating?this._finishMigration():o.start()):this.stop()};var wn=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,yn={};function _n(t){var e=yn[t];return e||(e=t.replace(wn,""),e!==t&&(e=e[0].toLowerCase()+e.slice(1)),yn[t]=e,e)}var bn="[native code]";function xn(t){var e=window.Symbol;return!!(t&&Jt(e)&&Jt(e.toString)&&e(t).toString().indexOf(bn)>-1)}function Sn(t,e){for(var n in e)t.style[n]=e[n]}var Cn=!(!Element||!Jt(Element.prototype.animate)),An=!(!Element||!xn(Element.prototype.animate));function kn(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:_n(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 kn,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 Ln(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}kn.prototype.start=function(t,e,n){if(!this._isDestroyed){var i=this._element,r=n||{};if(!Cn)return Sn(i,e),this._callback=Jt(r.onFinish)?r.onFinish:null,void this._onFinish();var o,s,a,l=this._animation,c=this._props,h=this._values,u=r.duration||300,d=r.easing||"ease",f=!1;if(l&&(s=0,u===this._duration&&d===this._easing||(f=!0),!f)){for(o in e)if(++s,a=c.indexOf(o),-1===a||e[o]!==h[a]){f=!0;break}s!==c.length&&(f=!0)}if(f&&l.cancel(),this._callback=Jt(r.onFinish)?r.onFinish:null,!l||f){for(o in c.length=h.length=0,e)c.push(o),h.push(e[o]);this._duration=u,this._easing=d,this._animation=i.animate([$n(t,An),$n(e,An)],{duration:u,easing:d}),this._animation.onfinish=this._onFinish,Sn(i,e)}}},kn.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},kn.prototype.getCurrentStyles=function(){return vn(element,currentProps)},kn.prototype.isAnimating=function(){return!!this._animation},kn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},kn.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()&&Sn(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(),h=!e&&c._settings.layoutDuration>0;if(!h||this._didMigrate)return Ft(n._id),this._element.style[Ie]=Rn(a,l),this._animation.stop(),void(this._didMigrate&&(c.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=a,this._nextTransY=l,Pt(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[Ie]=Rn(e,n),a[Ie]=Rn(i,r),t.start(s,a,{duration:o.layoutDuration,easing:o.layoutEasing,onFinish:this._onLayoutEnd})}else t.isAnimating()&&(this._element.style[Ie]=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(_,this._onMigrate),e.off(g,this._onHide),n.on(T,this._onReleaseEnd),n.on(a,this._onLayoutStart),n.on(_,this._onMigrate),n.on(g,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),Sn(t,{position:"absolute",left:"0px",top:"0px",width:e._width+"px",height:e._height+"px"}),t.style[Ie]=Rn(e._left+e._marginLeft,e._top+e._marginTop),n.on(a,this._onLayoutStart),n.on(T,this._onReleaseEnd),n.on(_,this._onMigrate),n.on(g,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(_,this._onMigrate),n.off(g,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},Ln.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)}},Ln.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)}},Ln.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},Ln.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Ln.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}},Ln.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 En=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 kn(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 kn(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&&(At(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(At(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[Ie]="",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<En&&r<En)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[Ie]=Rn(t._tX,t._tY),this._targetStyles[Ie]=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,h,u,d,f=this._item,g=f._element,p=f.isActive(),m=f.isVisible(),v=f.getGrid(),w=v._settings,S=t._settings,C=t._element,A=t._items,k=v._items.indexOf(f),$=n||document.body;if("number"===typeof e)i=Me(A,e,1);else{if(r=t.getItem(e),!r)return;i=A.indexOf(r)}(f.isPositioning()||this._isActive||f.isReleasing())&&(l=ln(g),c=l.x,h=l.y),f.isPositioning()&&f._layout.stop(!0,c,h),this._isActive&&(c-=this._containerDiffX,h-=this._containerDiffY,this.stop(!0,c,h)),f.isReleasing()&&(c-=f._dragRelease._containerDiffX,h-=f._dragRelease._containerDiffY,f._dragRelease.stop(!0,c,h)),f._visibility.stop(!0),f._drag&&f._drag.destroy(),v._hasListeners(_)&&v._emit(_,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),t._hasListeners(x)&&t._emit(x,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),w.itemClass!==S.itemClass&&(cn(g,w.itemClass),Re(g,S.itemClass)),u=m?w.itemVisibleClass:w.itemHiddenClass,d=m?S.itemVisibleClass:S.itemHiddenClass,u!==d&&(cn(g,u),Re(g,d)),v._items.splice(k,1),Ee(A,f,i),f._gridId=t._id,p?(o=g.parentNode,$!==o&&($.appendChild(g),s=Ze($,o,!0),l||(l=ln(g),c=l.x,h=l.y),f._setTranslate(c+s.left,h+s.top))):C.appendChild(g),f._visibility.setStyles(m?S.visibleStyles:S.hiddenStyles),p&&(a=Ze($,C,!0)),f._refreshDimensions(),f._sortData=null,f._drag=S.dragEnabled?new pn(f):null,p?(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(y)&&v._emit(y,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),t._hasListeners(b)&&t._emit(b,{item:f,fromGrid:v,fromIndex:k,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,h=t?a.showEasing:a.hideEasing,u=e||c<=0;if(l){if($t(r._id),u)return Sn(s,l),o.stop(),void(n&&n());o.isAnimating()&&(o._animation.onfinish=null),kt(r._id,(function(){i=vn(s,l)}),(function(){o.start(i,l,{duration:c,easing:h,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 In=0;function Pn(){return++In}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=Pn(),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 I,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 pn(this):null,this._dragRelease=new Ln(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,h,u,d,f,g=t.items,p=t.slots,m=!!(s&e),v=!!(s&n),w=!!(s&i),y=!!(s&r),_=!!(s&o),b="number"===typeof g[0];if(!g.length)return t;for(c=b?2:1,a=0;a<g.length;a+=c)b?(u=g[a],d=g[a+1]):(h=g[a],u=h._width+h._marginLeft+h._marginRight,d=h._height+h._marginTop+h._marginBottom),_&&(u=l(u),d=l(d)),f=this.computeNextSlot(t,u,d,m,v),v?f.left+f.width>t.width&&(t.width=f.left+f.width):f.top+f.height>t.height&&(t.height=f.top+f.height),p[++this.slotIndex]=f.left,p[++this.slotIndex]=f.top,(w||y)&&this.slotSizes.push(f.width,f.height);if(w)for(a=0;a<p.length;a+=2)p[a]=t.width-(p[a]+this.slotSizes[a]);if(y)for(a=1;a<p.length;a+=2)p[a]=t.height-(p[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,h,u,d=this.slotData,f=this.currentRects,g=this.nextRects,p=!1;for(g.length=0,d.left=null,d.top=null,d.width=e,d.height=n,h=0;h<f.length;h++)if(l=f[h],l&&(o=this.getRect(l),d.width<=o.width+s&&d.height<=o.height+s)){d.left=o.left,d.top=o.top;break}if(null===d.left&&(r?(d.left=t.width,d.top=0):(d.left=0,d.top=t.height),i||(p=!0)),!r&&d.top+d.height>t.height+s&&(d.left>a&&g.push(this.addRect(0,t.height,d.left,1/0)),d.left+d.width<t.width-a&&g.push(this.addRect(d.left+d.width,t.height,t.width-d.left-d.width,1/0)),t.height=d.top+d.height),r&&d.left+d.width>t.width+s&&(d.top>a&&g.push(this.addRect(t.width,0,1/0,d.top)),d.top+d.height<t.height-a&&g.push(this.addRect(t.width,d.top+d.height,1/0,t.height-d.top-d.height)),t.width=d.left+d.width),!p)for(i&&(h=0);h<f.length;h++)if(l=f[h],l)for(o=this.getRect(l),c=this.splitRect(o,d),u=0;u<c.length;u++)l=c[u],o=this.getRect(l),(r?o.left+s<t.width-s:o.top+s<t.height-s)&&g.push(l);return g.length>1&&this.purgeRects(g).sort(r?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=g,this.nextRects=f,d},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 h=1,u=2,d=3,f=4,g=new c;self.onmessage=function(t){var e=new Float32Array(t.data),n=e.subarray(f,e.length),i=new Float32Array(n.length),r=e[d],o={items:n,slots:i,width:e[h],height:e[u]};g.computeLayout(o,r),e[h]=o.width,e[u]=o.height,e.set(o.slots,f),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[Ie]=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(),Nn=null,Hn=[];function Un(t,e){var n=[];if(t>0){Nn||(Nn=URL.createObjectURL(new Blob(["("+Wn.toString()+")(true)"],{type:"application/javascript"})));for(var i,r=0;r<t;r++)i=new Worker(Nn),e&&(i.onmessage=e),n.push(i),Hn.push(i)}return n}function zn(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=Hn.indexOf(e),n>-1&&Hn.splice(n,1);Nn&&!Hn.length&&(URL.revokeObjectURL(Nn),Nn=null)}function Gn(){return!!(window.Worker&&window.URL&&window.Blob)}var jn=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&&Gn())try{this._workers=Un(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?jn:0:this._options&jn,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,h,u=new Float32Array(ti+2*n.length);for(u[Xn]=e,u[Zn]=a.width,u[Qn]=a.height,u[Jn]=a._settings,l=0,c=ti-1,h;l<n.length;l++)h=n[l],u[++c]=h._width+h._marginLeft+h._marginRight,u[++c]=h._height+h._marginTop+h._marginBottom;return this._layoutQueue.push(e),this._layouts[e]=a,this._layoutCallbacks[e]=o,this._layoutWorkerData[e]=u,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]);zn(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?Ut(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 zt(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 hi(t){return typeof t===ai&&ci.call(t)===li}function ui(){}function di(t){return si(t)?Array.prototype.slice.call(t):Array.prototype.concat(t)}var fi="number",gi="string",pi="instant",mi=0;function vi(t,e){typeof t===gi&&(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=wi(vi.defaultOptions,e);r.visibleStyles=Si(r.visibleStyles),r.hiddenStyles=Si(r.hiddenStyles),Jt(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=Pn(),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 I,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),n[this._id]=this,Re(t,r.containerClass),bi(this,r.layoutOnResize),this.add(_i(t,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function wi(t,e){var n=yi({},t);return e&&(n=yi(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 yi(t,e){var n,i,r,o=Object.keys(e),s=o.length;for(r=0;r<s;r++)i=o[r],n=hi(e[i]),hi(t[i])&&n?t[i]=yi(yi({},t[i]),e[i]):n?t[i]=yi({},e[i]):Array.isArray(e[i])?t[i]=e[i].slice(0):t[i]=e[i];return t}function _i(t,e){if("*"===e)return t.children;if(typeof e===gi){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 bi(t,e){typeof e!==fi&&(e=!0===e?0:-1),e>=0&&(t._resizeHandler=ii((function(){t.refreshItems().layout()}),e),window.addEventListener("resize",t._resizeHandler))}function xi(t){t._resizeHandler&&(t._resizeHandler(!0),window.removeEventListener("resize",t._resizeHandler),t._resizeHandler=null)}function Si(t){var e,n,i={},r=document.documentElement.style;for(e in t)t[e]&&(n=H(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 Ai(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=pn,vi.ItemDragRelease=Ln,vi.ItemDragPlaceholder=Tn,vi.Emitter=I,vi.Animator=kn,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===fi)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,h=this._settings.layout;return Jt(h)?a=h(this,i,o,l,c,this._onLayoutDataReceived):(vi.defaultPacker.setOptions(h),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=di(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,u=!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&&(u=!0,o._layout._skipNextAnimation=!0);for(s=0;s<n.length;s++)o=n[s],o._refreshDimensions(),o._refreshSortData();return Ee(c,n,a.index),this._hasListeners(h)&&this._emit(h,n.slice(0)),u&&l&&this.layout(l===pi,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=[],h=[];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),h.push(l.indexOf(i)),i._destroy(o.removeElements),this._items.splice(n,1)));return this._hasListeners(u)&&this._emit(u,c.slice(0),h),a&&s&&this.layout(s===pi,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===gi,a=Jt(t),l=e||{},c=!0===l.instant,h=l.syncWithLayout,u=l.layout?l.layout:void 0===l.layout,d=Jt(l.onFinish)?l.onFinish:null,f=-1,g=ui;if(d&&(g=function(){++f&&d(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:h,onFinish:g,layout:!1}):g(),o.length?this.hide(o,{instant:c,syncWithLayout:h,onFinish:g,layout:!1}):g(),(r.length||o.length)&&(this._hasListeners(m)&&this._emit(m,r.slice(0),o.slice(0)),u&&this.layout(u===pi,Jt(u)?u:void 0)),this},vi.prototype.sort=function(){var t,e,n,i;function r(r,o){for(var s,a,l,c,h=0,u=0;u<t.length;u++)if(s=t[u][0],a=t[u][1],l=(r._sortData?r:r._refreshSortData())._sortData[s],c=(o._sortData?o:o._refreshSortData())._sortData[s],h="desc"===a||!a&&e?c<l?-1:c>l?1:0:l<c?-1:l>c?1:0,h)return h;return h||(i||(i=Ci(n)),h=e?Ai(i,o,r):Ai(i,r,o)),h}function o(r,o){var s=e?-t(r,o):t(r,o);return s||(i||(i=Ci(n)),s=e?Ai(i,o,r):Ai(i,r,o)),s}return function(s,a){if(this._isDestroyed||this._items.length<2)return this;var l=this._items,c=a||{},h=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===gi)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),h&&this.layout(h===pi,Jt(h)?h: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,h=l.action===r,u=h?r:o,d=this.getItem(t),f=this.getItem(e);return d&&f&&d!==f&&(i=a.indexOf(d),s=a.indexOf(f),h?De(a,i,s):Oe(a,i,s),this._hasListeners(w)&&this._emit(w,{item:d,fromIndex:i,toIndex:s,action:u}),c&&this.layout(c===pi,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===pi,Jt(s)?s:void 0),a&&e.layout(a===pi,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(xi(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(L),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,h=this._nextLayoutData.instant,u=this._nextLayoutData.onFinish,d=e.items.length,f=d;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<d;o++)n=e.items[o],n?(i=e.slots[2*o],r=e.slots[2*o+1],n._canSkipLayout(i,r)?--f:(n._left=i,n._top=r,n.isActive()&&!n.isDragging()?t.push(n):--f)):--f;if(e.styles&&Sn(this._element,e.styles),!this._hasListeners(a)||(this._emit(a,e.items.slice(0),!0===h),this._layout.id===e.id)){var g=function(){if(!(--f>0)){var t=s._layout.id!==e.id,n=Jt(h)?h:u;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 g(),this;for(this._isLayoutFinished=!1,o=0;o<t.length;o++){if(this._layout.id!==e.id)break;t[o]._layout.start(!0===h,g)}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,h=l.onFinish,u=l.layout?l.layout:void 0===l.layout,m=s.length,v=e?d:g,w=e?f:p,y=e?"show":"hide",_=!1,b=[],x=[];if(m){for(r=0;r<s.length;r++)i=s[r],(e&&!i._isActive||!e&&i._isActive)&&(_=!0),i._layout._skipNextAnimation=!(!e||i._isActive),e&&i._visibility._isHidden&&x.push(i),e?i._addToLayout():i._removeFromLayout();x.length&&(this.refreshItems(x,!0),x.length=0),_&&!1!==l.syncWithLayout?this.on(a,S):S(),_&&u&&this.layout(u===pi,Jt(u)?u:void 0)}else Jt(h)&&h(s);function S(){for(_&&!1!==l.syncWithLayout&&o.off(a,S),o._hasListeners(v)&&o._emit(v,s.slice(0)),r=0;r<s.length;r++)s[r]._gridId===o._id?s[r]._visibility[y](c,(function(t,e){t||b.push(e),--m<1&&(Jt(h)&&h(b.slice(0)),o._hasListeners(w)&&o._emit(w,b.slice(0)))})):--m<1&&(Jt(h)&&h(b.slice(0)),o._hasListeners(w)&&o._emit(w,b.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,h,u,d,f=1,g=t.length,p="";for(i=0;i<g;i++)if("string"===typeof t[i])p+=t[i];else if("object"===typeof t[i]){if(a=t[i],a.keys)for(n=e[f],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[f++];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)&&(u=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)?p+=n:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",n=n.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+n).length,l=a.width&&h>0?c.repeat(h):"",p+=a.align?d+n+l:"0"===c?d+l+n:l+d+n)}return p}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))}()},16575:function(t,e,n){"use strict";n.d(e,{Z:function(){return sr}});var i,r,o=n(6041),s=n(68571),a=n(56632),l=n(34948),c=(n(18178),n(58188),n(28673),n(52356),n(6886),n(74279),n(97890),n(5377),n(8373),n(15290),n(79321),n(77950),n(48319),n(43450),n(96928),n(13675),n(94898),n(5825),n(67170),n(38857),n(58329),n(76279),n(427),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(46297),n(98882),n(49228),n(32501),n(93244),n(43430),n(27233),n(92656),n(19866),n(95342),n(21850),n(1939),n(85940),n(74083),n(99805),n(90103),n(74069),!0),h="u-",u="uplot",d=h+"hz",f=h+"vt",g=h+"title",p=h+"wrap",m=h+"under",v=h+"over",w=h+"axis",y=h+"off",_=h+"select",b=h+"cursor-x",x=h+"cursor-y",S=h+"cursor-pt",C=h+"legend",A=h+"live",k=h+"inline",$=h+"thead",R=h+"series",T=h+"marker",L=h+"label",E=h+"value",M="width",O="height",D="top",I="bottom",P="left",F="right",W="#000",B=W+"0",N="mousemove",H="mousedown",U="mouseup",z="mouseenter",G="mouseleave",j="dblclick",V="resize",q="scroll",Y="change",K="dppxchange",X="undefined"!=typeof window,Z=X?document:null,Q=X?window:null,J=X?navigator:null;function tt(){var t=devicePixelRatio;i!=t&&(i=t,r&&pt(Y,r,tt),r=matchMedia("(min-resolution: ".concat(i-.001,"dppx) and (max-resolution: ").concat(i+.001,"dppx)")),gt(Y,r,tt),Q.dispatchEvent(new CustomEvent(K)))}function et(t,e){if(null!=e){var n=t.classList;!n.contains(e)&&n.add(e)}}function nt(t,e){var n=t.classList;n.contains(e)&&n.remove(e)}function it(t,e,n){t.style[e]=n+"px"}function rt(t,e,n,i){var r=Z.createElement(t);return null!=e&&et(r,e),null!=n&&n.insertBefore(r,i),r}function ot(t,e){return rt("div",t,e)}var st=new WeakMap;function at(t,e,n,i,r){var o="translate("+e+"px,"+n+"px)",s=st.get(t);o!=s&&(t.style.transform=o,st.set(t,o),e<0||n<0||e>i||n>r?et(t,y):nt(t,y))}var lt=new WeakMap;function ct(t,e,n){var i=e+n,r=lt.get(t);i!=r&&(lt.set(t,i),t.style.background=e,t.style.borderColor=n)}var ht=new WeakMap;function ut(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},ft=(0,l.Z)((0,l.Z)({},dt),{},{capture:!0});function gt(t,e,n,i){e.addEventListener(t,n,i?ft:dt)}function pt(t,e,n,i){e.removeEventListener(t,n,i?ft:dt)}function mt(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:Ft((n+i)/2),e[r]<t?n=r:i=r;return t-e[n]<=e[i]-t?n:i}function vt(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=Yt,o=-Yt;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=Nt(r,t[s]),o=Ht(o,t[s]));return[r,o]}function yt(t,e,n){for(var i=Yt,r=-Yt,o=e;o<=n;o++)t[o]>0&&(i=Nt(i,t[o]),r=Ht(r,t[o]));return[i==Yt?1:i,r==-Yt?10:r]}X&&tt();var _t=[0,0];function bt(t,e,n,i){return _t[0]=n<0?se(t,-n):t,_t[1]=i<0?se(e,-i):e,_t}function xt(t,e,n,i){var r,o,s,a=zt(t),l=10==n?Gt:jt;return t==e&&(-1==a?(t*=n,e/=n):(t/=n,e*=n)),i?(r=Ft(l(t)),o=Bt(l(e)),s=bt(Ut(n,r),Ut(n,o),r,o),t=s[0],e=s[1]):(r=Ft(l(Pt(t))),o=Ft(l(Pt(e))),s=bt(Ut(n,r),Ut(n,o),r,o),t=oe(t,s[0]),e=re(e,s[1])),[t,e]}function St(t,e,n,i){var r=xt(t,e,n,i);return 0==t&&(r[0]=0),0==e&&(r[1]=0),r}var Ct=.1,At={mode:3,pad:Ct},kt={pad:0,soft:null,mode:0},$t={min:kt,max:kt};function Rt(t,e,n,i){return pe(n)?Et(t,e,n):(kt.pad=n,kt.soft=i?0:null,kt.mode=i?3:0,Et(t,e,$t))}function Tt(t,e){return null==t?e:t}function Lt(t,e,n){e=Tt(e,0),n=Tt(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=Tt(i.pad,0),s=Tt(r.pad,0),a=Tt(i.hard,-Yt),l=Tt(r.hard,Yt),c=Tt(i.soft,Yt),h=Tt(r.soft,-Yt),u=Tt(i.mode,0),d=Tt(r.mode,0),f=e-t;f<1e-9&&(f=0,0!=t&&0!=e||(f=1e-9,2==u&&c!=Yt&&(o=0),2==d&&h!=-Yt&&(s=0)));var g=f||Pt(e)||1e3,p=Gt(g),m=Ut(10,Ft(p)),v=g*(0==f?0==t?.1:1:o),w=se(oe(t-v,m/10),9),y=t>=c&&(1==u||3==u&&w<=c||2==u&&w>=c)?c:Yt,_=Ht(a,w<y&&t>=y?y:Nt(y,w)),b=g*(0==f?0==e?.1:1:s),x=se(re(e+b,m/10),9),S=e<=h&&(1==d||3==d&&x>=h||2==d&&x<=h)?h:-Yt,C=Nt(l,x>S&&e<=S?S:Ht(S,x));return _==C&&0==_&&(C=100),[_,C]}var Mt=new Intl.NumberFormat(X?J.language:"en-US"),Ot=function(t){return Mt.format(t)},Dt=Math,It=Dt.PI,Pt=Dt.abs,Ft=Dt.floor,Wt=Dt.round,Bt=Dt.ceil,Nt=Dt.min,Ht=Dt.max,Ut=Dt.pow,zt=Dt.sign,Gt=Dt.log10,jt=Dt.log2,Vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Dt.sinh(t)*e},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Dt.asinh(t/e)},Yt=1/0;function Kt(t){return 1+(0|Gt((t^t>>31)-(t>>31)))}function Xt(t,e){return Wt(t/e)*e}function Zt(t,e,n){return Nt(Ht(t,e),n)}function Qt(t){return"function"==typeof t?t:function(){return t}}var 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 Bt(t/e)*e}function oe(t,e){return Ft(t/e)*e}function se(t,e){return Wt(t*(e=Math.pow(10,e)))/e}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(Ut(t,s),a),c=0;c<i.length;c++){var h=i[c]*l,u=(h>=0&&s>=0?0:a)+(s>=o[c]?0:o[c]),d=se(h,u);r.push(d),ae.set(d,u)}return r}var he={},ue=[],de=[null,null],fe=Array.isArray;function ge(t){return"string"==typeof t}function pe(t){var e=!1;if(null!=t){var n=t.constructor;e=null==n||n==Object}return e}function me(t){return null!=t&&"object"==(0,a.Z)(t)}var ve=Object.getPrototypeOf(Uint8Array);function we(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe;if(fe(t)){var i=t.find((function(t){return null!=t}));if(fe(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 ve)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 ye(t){for(var e=arguments,n=1;n<e.length;n++){var i=e[n];for(var r in i)pe(t[r])?ye(t[r],we(i[r])):t[r]=we(i[r])}return t}var _e=0,be=1,xe=2;function Se(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 Ce(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,h=new Map,u=0;u<c;u++)h.set(l[0][u],u);for(var d=0;d<t.length;d++)for(var f=t[d],g=f[0],p=1;p<f.length;p++){for(var m=f[p],v=Array(c).fill(void 0),w=e?e[d][p]:be,y=[],_=0;_<m.length;_++){var b=m[_],x=h.get(g[_]);null===b?w!=_e&&(v[x]=b,w==xe&&y.push(x)):v[x]=b}Se(v,y,c),l.push(v)}return l}var Ae="undefined"==typeof queueMicrotask?function(t){return Promise.resolve().then(t)}:queueMicrotask,ke=["January","February","March","April","May","June","July","August","September","October","November","December"],$e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Re(t){return t.slice(0,3)}var Te=$e.map(Re),Le=ke.map(Re),Ee={MMMM:ke,MMM:Le,WWWW:$e,WWW:Te};function Me(t){return(t<10?"0":"")+t}function Oe(t){return(t<10?"00":t<100?"0":"")+t}var De={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 Me(t.getMonth()+1)},M:function(t){return t.getMonth()+1},DD:function(t){return Me(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 Me(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 Me(t.getMinutes())},m:function(t){return t.getMinutes()},ss:function(t){return Me(t.getSeconds())},s:function(t){return t.getSeconds()},fff:function(t){return Oe(t.getMilliseconds())}};function Ie(t,e){e=e||Ee;var n,i=[],r=/\{([a-z]+)\}|[^{]+/gi;while(n=r.exec(t))i.push("{"==n[0][0]?De[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 Pe=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function Fe(t,e){var n;return"UTC"==e||"Etc/UTC"==e?n=new Date(+t+6e4*t.getTimezoneOffset()):e==Pe?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}var We=function(t){return t%1==0},Be=[1,2,2.5,5],Ne=ce(10,-16,0,Be),He=ce(10,0,16,Be),Ue=He.filter(We),ze=Ne.concat(He),Ge="\n",je="{YYYY}",Ve=Ge+je,qe="{M}/{D}",Ye=Ge+qe,Ke=Ye+"/{YY}",Xe="{aa}",Ze="{h}:{mm}",Qe=Ze+Xe,Je=Ge+Qe,tn=":{ss}",en=null;function nn(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,Be).filter(We):ce(10,-3,0,Be),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,je,en,en,en,en,en,en,1],[28*r,"{MMM}",Ve,en,en,en,en,en,1],[r,qe,Ve,en,en,en,en,en,1],[i,"{h}"+Xe,Ke,en,Ye,en,en,en,1],[n,Qe,Ke,en,Ye,en,en,en,1],[e,tn,Ke+" "+Qe,en,Ye+" "+Qe,en,Je,en,1],[t,tn+".{fff}",Ke+" "+Qe,en,Ye+" "+Qe,en,Je,en,1]];function h(e){return function(a,l,c,h,u,d){var f=[],g=u>=s,p=u>=o&&u<s,m=e(c),v=se(m*t,3),w=vn(m.getFullYear(),g?0:m.getMonth(),p||g?1:m.getDate()),y=se(w*t,3);if(p||g)for(var _=p?u/o:0,b=g?u/s:0,x=v==y?v:se(vn(w.getFullYear()+b,w.getMonth()+_,1)*t,3),S=new Date(Wt(x/t)),C=S.getFullYear(),A=S.getMonth(),k=0;x<=h;k++){var $=vn(C+b*k,A+_*k,1),R=$-e(se($*t,3));x=se((+$+R)*t,3),x<=h&&f.push(x)}else{var T=u>=r?r:u,L=Ft(c)-Ft(v),E=y+L+re(v-y,T);f.push(E);var M=e(E),O=M.getHours()+M.getMinutes()/n+M.getSeconds()/i,D=u/i,I=a.axes[l]._space,P=d/I;while(1){if(E=se(E+u,1==t?0:3),E>h)break;if(D>1){var F=Ft(se(O+D,6))%24,W=e(E),B=W.getHours(),N=B-F;N>1&&(N=-1),E-=N*i,O=(O+D)%24;var H=f[f.length-1],U=se((E-H)/u,3);U*P>=.7&&f.push(E)}else f.push(E)}}return f}}return[l,c,h]}var rn=nn(1),on=(0,s.Z)(rn,3),sn=on[0],an=on[1],ln=on[2],cn=nn(.001),hn=(0,s.Z)(cn,3),un=hn[0],dn=hn[1],fn=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 pn(t,e){return function(n,i,r,o,s){var a,l,c,h,u,d,f=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(),g=n.getMinutes(),p=n.getSeconds(),m=i!=a&&f[2]||r!=l&&f[3]||o!=c&&f[4]||s!=h&&f[5]||g!=u&&f[6]||p!=d&&f[7]||f[1];return a=i,l=r,c=o,h=s,u=g,d=p,m(n)}))}}function mn(t,e){var n=Ie(e);return function(e,i,r,o,s){return i.map((function(e){return n(t(e))}))}}function vn(t,e,n){return new Date(t,e,n)}function wn(t,e){return e(t)}ce(2,-53,53,[1]);var yn="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function _n(t,e){return function(n,i){return e(t(i))}}function bn(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 Sn={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:bn,fill:xn,dash:"solid"},idx:null,idxs:null,values:[]};function Cn(t,e){var n=t.cursor.points,i=ot(),r=n.size(t,e);it(i,M,r),it(i,O,r);var o=r/-2;it(i,"marginLeft",o),it(i,"marginTop",o);var s=n.width(t,e,r);return s&&it(i,"borderWidth",s),i}function An(t,e){var n=t.series[e].points;return n._fill||n._stroke}function kn(t,e){var n=t.series[e].points;return n._stroke||n._fill}function $n(t,e){var n=t.series[e].points;return ni(n.width,1)}function Rn(t,e,n){return n}var Tn=[0,0];function Ln(t,e,n){return Tn[0]=e,Tn[1]=n,Tn}function En(t,e,n){return function(t){0==t.button&&n(t)}}function Mn(t,e,n){return n}var On={show:!0,x:!0,y:!0,lock:!1,move:Ln,points:{show:Cn,size:$n,width:0,stroke:kn,fill:An},bind:{mousedown:En,mouseup:En,click:En,dblclick:En,mousemove:Mn,mouseleave:Mn,mouseenter:Mn},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:Rn,idxs:null},Dn={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},In=ye({},Dn,{filter:te}),Pn=ye({},In,{size:10}),Fn=ye({},Dn,{show:!1}),Wn='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"',Bn="bold "+Wn,Nn=1.5,Hn={show:!0,scale:"x",stroke:W,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Bn,side:2,grid:In,ticks:Pn,border:Fn,font:Wn,rotate:0},Un="Value",zn="Time",Gn={show:!0,scale:"x",auto:!1,sorted:1,min:Yt,max:-Yt,idxs:[]};function jn(t,e,n,i,r){return e.map((function(t){return null==t?"":Ot(t)}))}function Vn(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 qn(t,e,n,i,r,o,s){var a=[],l=t.scales[t.axes[e].scale].log,c=10==l?Gt:jt,h=Ft(c(n));r=Ut(l,h),h<0&&(r=se(r,-h));var u=n;do{a.push(u),u=se(u+r,ae.get(r)),u>=r*l&&(r=u)}while(u<=i);return a}function Yn(t,e,n,i,r,o,s){var a=t.scales[t.axes[e].scale],l=a.asinh,c=i>l?qn(t,e,Ht(l,n),i,r):[l],h=i>=0&&n<=0?[0]:[],u=n<-l?qn(t,e,Ht(l,-i),-n,r):[l];return u.reverse().map((function(t){return-t})).concat(h,c)}var Kn=/./,Xn=/[12357]/,Zn=/[125]/,Qn=/1/;function Jn(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,h=l(10,s),u=l(9,s)-h>=c?Kn:l(7,s)-h>=c?Xn:l(5,s)-h>=c?Zn:Qn;return e.map((function(t){return 4==a.distr&&0==t||u.test(t)?t:null}))}function ti(t,e){return null==e?"":Ot(e)}var ei={show:!0,scale:"y",stroke:W,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Bn,side:3,grid:In,ticks:Pn,border:Fn,font:Wn,rotate:0};function ni(t,e){var n=3+2*(t||1);return se(n*e,3)}function ii(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),h=t.series[e],u=c/(h.points.space*i);return o[1]-o[0]<=u}var ri={scale:null,auto:!0,sorted:0,min:Yt,max:-Yt},oi={show:!0,auto:!0,sorted:0,alpha:1,facets:[ye({},ri,{scale:"x"}),ye({},ri,{scale:"y"})]},si={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(t,e,n,i,r){return r},alpha:1,points:{show:ii,filter:null},values:null,min:Yt,max:-Yt,idxs:[],path:null,clip:null};function ai(t,e,n,i,r){return n/10}var li={time:c,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ci=ye({},li,{time:!1,ori:1}),hi={};function ui(t,e){var n=hi[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&&(hi[t]=n)),n}var di=1,fi=2;function gi(t,e,n){var i=t.series[e],r=t.scales,o=t.bbox,s=2==t.mode?r[i.facets[0].scale]:r[t.series[0].scale],a=t._data[0],l=t._data[e],c=s,h=2==t.mode?r[i.facets[1].scale]:r[i.scale],u=o.left,d=o.top,f=o.width,g=o.height,p=t.valToPosH,m=t.valToPosV;return 0==c.ori?n(i,a,l,c,h,p,m,u,d,f,g,Si,Ai,$i,Ti,Ei):n(i,a,l,c,h,m,p,d,u,g,f,Ci,ki,Ri,Li,Mi)}function pi(t,e){for(var n=0,i=0,r=Tt(t.bands,ue),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 mi(t,e,n,i,r){var o=t.scales[t.series[e].scale];return-1==r?o.min:1==r?o.max:3==o.distr?1==o.dir?o.min:o.max:0}function vi(t,e,n,i,r,o){return gi(t,e,(function(t,e,s,a,l,c,h,u,d,f,g){var p,m,v=t.pxRound,w=a.dir*(0==a.ori?1:-1),y=0==a.ori?Ai:ki;1==w?(p=n,m=i):(p=i,m=n);var _=v(c(e[p],a,f,u)),b=v(h(s[p],l,g,d)),x=v(c(e[m],a,f,u)),S=v(h(1==o?l.max:l.min,l,g,d)),C=new Path2D(r);return y(C,x,S),y(C,_,S),y(C,_,b),C}))}function wi(t,e,n,i,r,o){var s=null;if(t.length>0){s=new Path2D;for(var a=0==e?$i:Ri,l=n,c=0;c<t.length;c++){var h=t[c];if(h[1]>h[0]){var u=h[0]-l;u>0&&a(s,l,i,u,i+o),l=h[1]}}var d=n+r-l;d>0&&a(s,l,i,d,i+o)}return s}function yi(t,e,n){var i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function _i(t,e,n,i,r,o,s){for(var a=[],l=1==r?n:i;l>=n&&l<=i;l+=r){var c=e[l];if(null===c){var h=l,u=l;if(1==r)while(++l<=i&&null===e[l])u=l;else while(--l>=n&&null===e[l])u=l;var d=o(t[h]),f=u==h?d:o(t[u]),g=s<=0?o(t[h-r]):d;d=g;var p=s>=0?o(t[u+r]):f;f=p,f>=d&&a.push([d,f])}}return a}function bi(t){return 0==t?Jt:1==t?Wt:function(e){return Xt(e,t)}}function xi(t){var e=0==t?Si:Ci,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=Nt(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 Si=function(t,e,n){t.moveTo(e,n)},Ci=function(t,e,n){t.moveTo(n,e)},Ai=function(t,e,n){t.lineTo(e,n)},ki=function(t,e,n){t.lineTo(n,e)},$i=xi(0),Ri=xi(1),Ti=function(t,e,n,i,r,o){t.arc(e,n,i,r,o)},Li=function(t,e,n,i,r,o){t.arc(n,e,i,r,o)},Ei=function(t,e,n,i,r,o,s){t.bezierCurveTo(e,n,i,r,o,s)},Mi=function(t,e,n,i,r,o,s){t.bezierCurveTo(n,e,r,i,s,o)};function Oi(t){return function(t,e,n,r,o){return gi(t,e,(function(e,s,a,l,c,h,u,d,f,g,p){var m,v,w=e.pxRound,y=e.points;0==l.ori?(m=Si,v=Ti):(m=Ci,v=Li);var _=se(y.width*i,3),b=(y.size-y.width)/2*i,x=se(2*b,3),S=new Path2D,C=new Path2D,A=t.bbox,k=A.left,$=A.top,R=A.width,T=A.height;$i(C,k-x,$-x,R+2*x,T+2*x);var L=function(t){if(null!=a[t]){var e=w(h(s[t],l,g,d)),n=w(u(a[t],c,p,f));m(S,e+b,n),v(S,e,n,b,0,2*It)}};if(o)o.forEach(L);else for(var E=n;E<=r;E++)L(E);return{stroke:_>0?S:null,fill:S,clip:C,flags:di|fi}}))}}function Di(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 Ii=Di(Ai),Pi=Di(ki);function Fi(t){var e=Tt(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,n,i,r){return gi(t,n,(function(a,l,c,h,u,d,f,g,p,m,v){var w,y,_=a.pxRound,b=function(t){return _(d(t,h,m,g))},x=function(t){return _(f(t,u,v,p))};0==h.ori?(w=Ai,y=Ii):(w=ki,y=Pi);for(var S,C,A,k=h.dir*(0==h.ori?1:-1),$={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:di},R=$.stroke,T=Yt,L=-Yt,E=b(l[1==k?i:r]),M=vt(c,i,r,1*k),O=vt(c,i,r,-1*k),D=b(l[M]),I=b(l[O]),P=1==k?i:r;P>=i&&P<=r;P+=k){var F=b(l[P]);F==E?null!=c[P]&&(C=x(c[P]),T==Yt&&(w(R,F,C),S=C),T=Nt(C,T),L=Ht(C,L)):(T!=Yt&&(y(R,E,T,L,S,C),A=E),null!=c[P]?(C=x(c[P]),w(R,F,C),T=L=S=C):(T=Yt,L=-Yt),E=F)}T!=Yt&&T!=L&&A!=E&&y(R,E,T,L,S,C);var W=pi(t,n),B=(0,s.Z)(W,2),N=B[0],H=B[1];if(null!=a.fill||0!=N){var U=$.fill=new Path2D(R),z=a.fillTo(t,n,a.min,a.max,N),G=x(z);w(U,I,G),w(U,D,G)}if(!a.spanGaps){var j,V=[];(j=V).push.apply(j,(0,o.Z)(_i(l,c,i,r,k,b,e))),$.gaps=V=a.gaps(t,n,i,r,V),$.clip=wi(V,h.ori,g,p,m,v)}return 0!=H&&($.band=2==H?[vi(t,n,i,r,R,-1),vi(t,n,i,r,R,1)]:vi(t,n,i,r,R,H)),$}))}}function Wi(t){var e=Tt(t.align,1),n=Tt(t.ascDesc,!1),r=Tt(t.alignGaps,0);return function(t,a,l,c){return gi(t,a,(function(h,u,d,f,g,p,m,v,w,y,_){var b=h.pxRound,x=function(t){return b(p(t,f,y,v))},S=function(t){return b(m(t,g,_,w))},C=0==f.ori?Ai:ki,A={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:di},k=A.stroke,$=f.dir*(0==f.ori?1:-1);l=vt(d,l,c,1),c=vt(d,l,c,-1);var R=S(d[1==$?l:c]),T=x(u[1==$?l:c]),L=T;C(k,T,R);for(var E=1==$?l:c;E>=l&&E<=c;E+=$){var M=d[E];if(null!=M){var O=x(u[E]),D=S(M);1==e?C(k,O,R):C(k,L,D),C(k,O,D),R=D,L=O}}var I=pi(t,a),P=(0,s.Z)(I,2),F=P[0],W=P[1];if(null!=h.fill||0!=F){var B=A.fill=new Path2D(k),N=h.fillTo(t,a,h.min,h.max,F),H=S(N);C(B,L,H),C(B,T,H)}if(!h.spanGaps){var U,z=[];(U=z).push.apply(U,(0,o.Z)(_i(u,d,l,c,$,x,r)));var G=h.width*i/2,j=n||1==e?G:-G,V=n||-1==e?-G:G;z.forEach((function(t){t[0]+=j,t[1]+=V})),A.gaps=z=h.gaps(t,a,l,c,z),A.clip=wi(z,f.ori,v,w,y,_)}return 0!=W&&(A.band=2==W?[vi(t,a,l,c,k,-1),vi(t,a,l,c,k,1)]:vi(t,a,l,c,k,W)),A}))}}function Bi(t){t=t||he;var e=Tt(t.size,[.6,Yt,1]),n=t.align||0,r=(t.gap||0)*i,o=Tt(t.radius,0),a=1-e[0],l=Tt(e[1],Yt)*i,c=Tt(e[2],1)*i,h=Tt(t.disp,he),u=Tt(t.each,(function(t){})),d=h.fill,f=h.stroke;return function(t,e,g,p){return gi(t,e,(function(m,v,w,y,_,b,x,S,C,A,k){var $,R,T=m.pxRound,L=y.dir*(0==y.ori?1:-1),E=_.dir*(1==_.ori?1:-1),M=0==y.ori?$i:Ri,O=0==y.ori?u:function(t,e,n,i,r,o,s){u(t,e,n,r,i,s,o)},D=pi(t,e),I=(0,s.Z)(D,2),P=I[0],F=I[1],W=3==_.distr?1==P?_.max:_.min:0,B=x(W,_,k,C),N=T(m.width*i),H=!1,U=null,z=null,G=null,j=null;null==d||0!=N&&null==f||(H=!0,U=d.values(t,e,g,p),z=new Map,new Set(U).forEach((function(t){null!=t&&z.set(t,new Path2D)})),N>0&&(G=f.values(t,e,g,p),j=new Map,new Set(G).forEach((function(t){null!=t&&j.set(t,new Path2D)}))));var V=h.x0,q=h.size;if(null!=V&&null!=q){v=V.values(t,e,g,p),2==V.unit&&(v=v.map((function(e){return t.posToVal(S+e*A,y.key,!0)})));var Y=q.values(t,e,g,p);R=2==q.unit?Y[0]*A:b(Y[0],y,A,S)-b(0,y,A,S),R=T(R-N),$=1==L?-N/2:R+N/2}else{var K=A;if(v.length>1)for(var X=null,Z=0,Q=1/0;Z<v.length;Z++)if(void 0!==w[Z]){if(null!=X){var J=Pt(v[Z]-v[X]);J<Q&&(Q=J,K=Pt(b(v[Z],y,A,S)-b(v[X],y,A,S)))}X=Z}var tt=K*a;R=T(Nt(l,Ht(c,K-tt))-N-r),$=(0==n?R/2:n==L?0:R)-n*L*r/2}var et,nt={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:di|fi};0!=F&&(nt.band=new Path2D,et=T(x(1==F?_.max:_.min,_,k,C)));var it=H?null:new Path2D,rt=nt.band,ot=h.y0,st=h.y1,at=null;null!=ot&&null!=st&&(w=st.values(t,e,g,p),at=ot.values(t,e,g,p));for(Z=1==L?g:p;Z>=g&&Z<=p;Z+=L){var lt=w[Z];if(void 0!==lt){var ct=2!=y.distr||null!=h?v[Z]:Z,ht=b(ct,y,A,S),ut=x(Tt(lt,W),_,k,C);null!=at&&null!=lt&&(B=x(at[Z],_,k,C));var dt=T(ht-$),ft=T(Ht(ut,B)),gt=T(Nt(ut,B)),pt=ft-gt,mt=o*R;null!=lt&&(H?(N>0&&null!=G[Z]&&M(j.get(G[Z]),dt,gt+Ft(N/2),R,Ht(0,pt-N),mt),null!=U[Z]&&M(z.get(U[Z]),dt,gt+Ft(N/2),R,Ht(0,pt-N),mt)):M(it,dt,gt+Ft(N/2),R,Ht(0,pt-N),mt),O(t,e,Z,dt-N/2,gt,R+N,pt)),0!=F&&(E*F==1?(ft=gt,gt=et):(gt=ft,ft=et),pt=ft-gt,M(rt,dt-N/2,gt,R+N,Ht(0,pt),0))}}return N>0&&(nt.stroke=H?j:it),nt.fill=H?z:it,nt}))}}function Ni(t,e){var n=Tt(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,i,r,a){return gi(e,i,(function(l,c,h,u,d,f,g,p,m,v,w){var y,_,b,x=l.pxRound,S=function(t){return x(f(t,u,v,p))},C=function(t){return x(g(t,d,w,m))};0==u.ori?(y=Si,b=Ai,_=Ei):(y=Ci,b=ki,_=Mi);var A=u.dir*(0==u.ori?1:-1);r=vt(h,r,a,1),a=vt(h,r,a,-1);for(var k=S(c[1==A?r:a]),$=k,R=[],T=[],L=1==A?r:a;L>=r&&L<=a;L+=A){var E=h[L];if(null!=E){var M=c[L],O=S(M);R.push($=O),T.push(C(h[L]))}}var D={stroke:t(R,T,y,b,_,x),fill:null,clip:null,band:null,gaps:null,flags:di},I=D.stroke,P=pi(e,i),F=(0,s.Z)(P,2),W=F[0],B=F[1];if(null!=l.fill||0!=W){var N=D.fill=new Path2D(I),H=l.fillTo(e,i,l.min,l.max,W),U=C(H);b(N,$,U),b(N,k,U)}if(!l.spanGaps){var z,G=[];(z=G).push.apply(z,(0,o.Z)(_i(c,h,r,a,A,S,n))),D.gaps=G=l.gaps(e,i,r,a,G),D.clip=wi(G,u.ori,p,m,v,w)}return 0!=B&&(D.band=2==B?[vi(e,i,r,a,I,-1),vi(e,i,r,a,I,1)]:vi(e,i,r,a,I,B)),D}))}}function Hi(t){return Ni(Ui,t)}function Ui(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),h=Array(s-1),u=Array(s-1),d=0;d<s-1;d++)h[d]=e[d+1]-e[d],u[d]=t[d+1]-t[d],c[d]=h[d]/u[d];l[0]=c[0];for(var f=1;f<s-1;f++)0===c[f]||0===c[f-1]||c[f-1]>0!==c[f]>0?l[f]=0:(l[f]=3*(u[f-1]+u[f])/((2*u[f]+u[f-1])/c[f-1]+(u[f]+2*u[f-1])/c[f]),isFinite(l[f])||(l[f]=0));l[s-1]=c[s-2];for(var g=0;g<s-1;g++)r(a,t[g]+u[g]/3,e[g]+l[g]*u[g]/3,t[g+1]-u[g]/3,e[g+1]-l[g+1]*u[g]/3,t[g+1],e[g+1])}return a}var zi=new Set;function Gi(){zi.forEach((function(t){t.syncRect(!0)}))}X&&(gt(V,Q,Gi),gt(q,Q,Gi,!0),gt(K,Q,(function(){sr.pxRatio=i})));var ji=Fi(),Vi=Oi();function qi(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 Ki(t,i,e,n)}))}function Yi(t,e){return t.map((function(t,n){return 0==n?null:ye({},e,t)}))}function Ki(t,e,n,i){return ye({},0==e?n:i,t)}function Xi(t,e,n){return null==e?de:[e,n]}var Zi=Xi;function Qi(t,e,n){return null==e?de:Rt(e,n,Ct,!0)}function Ji(t,e,n,i){return null==e?de:xt(e,n,t.scales[i].log,!1)}var tr=Ji;function er(t,e,n,i){return null==e?de:St(e,n,t.scales[i].log,!1)}var nr=er;function ir(t,e,n,i,r){var o=Ht(Kt(t),Kt(e)),s=e-t,a=mt(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 rr(t){var e,n;return t=t.replace(/(\d+)px/,(function(t,r){return(e=Wt((n=+r)*i))+"px"})),[t,e,n]}function or(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 sr(t,e,n){var r={mode:Tt(t.mode,1)},o=r.mode;function a(t,e){var n=3==e.distr?Gt(t>0?t:e.clamp(r,t,e.min,e.max,e.key)):4==e.distr?qt(t,e.asinh):t;return(n-e._min)/(e._max-e._min)}function l(t,e,n,i){var r=a(t,e);return i+n*(-1==e.dir?1-r:r)}function c(t,e,n,i){var r=a(t,e);return i+n*(-1==e.dir?r:1-r)}function h(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 W=!1;r.status=0;var V=r.root=ot(u);if(null!=t.id&&(V.id=t.id),et(V,t.class),t.title){var q=ot(g,V);q.textContent=t.title}var Y=rt("canvas"),X=r.ctx=Y.getContext("2d"),J=ot(p,V),tt=r.under=ot(m,J);J.appendChild(Y);var st=r.over=ot(v,J);t=we(t);var lt=+Tt(t.pxAlign,1),ht=bi(lt);(t.plugins||[]).forEach((function(e){e.opts&&(t=e.opts(r,t)||t)}));var dt=t.ms||.001,ft=r.series=1==o?qi(t.series||[],Gn,si,!1):Yi(t.series||[null],oi),vt=r.axes=qi(t.axes||[],Hn,ei,!0),_t=r.scales={},bt=r.bands=t.bands||[];bt.forEach((function(t){t.fill=Qt(t.fill||null),t.dir=Tt(t.dir,-1)}));var kt=2==o?ft[1].facets[0].scale:ft[0].scale,$t={axes:lr,series:Di},Et=(t.drawOrder||["axes","series"]).map((function(t){return $t[t]}));function Mt(e){var n=_t[e];if(null==n){var i=(t.scales||he)[e]||he;if(null!=i.from)Mt(i.from),_t[e]=ye({},_t[i.from],i,{key:e});else{n=_t[e]=ye({},e==kt?li:ci,i),n.key=e;var r=n.time,s=n.range,a=fe(s);if((e!=kt||2==o&&!r)&&(!a||null!=s[0]&&null!=s[1]||(s={min:null==s[0]?At:{mode:1,hard:s[0],soft:s[0]},max:null==s[1]?At:{mode:1,hard:s[1],soft:s[1]}},a=!1),!a&&pe(s))){var l=s;s=function(t,e,n){return null==e?de:Rt(e,n,l)}}n.range=Qt(s||(r?Zi:e==kt?3==n.distr?tr:4==n.distr?nr:Xi:3==n.distr?Ji:4==n.distr?er:Qi)),n.auto=Qt(!a&&n.auto),n.clamp=Qt(n.clamp||ai),n._min=n._max=null}}}for(var Ot in Mt("x"),Mt("y"),1==o&&ft.forEach((function(t){Mt(t.scale)})),vt.forEach((function(t){Mt(t.scale)})),t.scales)Mt(Ot);var Dt,Ft,zt=_t[kt],jt=zt.distr;0==zt.ori?(et(V,d),Dt=l,Ft=c):(et(V,f),Dt=c,Ft=l);var Kt={};for(var Jt in _t){var oe=_t[Jt];null==oe.min&&null==oe.max||(Kt[Jt]={min:oe.min,max:oe.max},oe.min=oe.max=null)}var ae,le=t.tzDate||function(t){return new Date(Wt(t/dt))},ce=t.fmtDate||Ie,ve=1==dt?ln(le):fn(le),_e=pn(le,gn(1==dt?an:dn,ce)),be=_n(le,wn(yn,ce)),xe=[],Se=r.legend=ye({},Sn,t.legend),Ce=Se.show,ke=Se.markers;Se.idxs=xe,ke.width=Qt(ke.width),ke.dash=Qt(ke.dash),ke.stroke=Qt(ke.stroke),ke.fill=Qt(ke.fill);var $e,Re=[],Te=[],Le=!1,Ee={};if(Se.live){var Me=ft[1]?ft[1].values:null;for(var Oe in Le=null!=Me,$e=Le?Me(r,1,0):{_:0},$e)Ee[Oe]="--"}if(Ce)if(ae=rt("table",C,V),Le){var De=rt("tr",$,ae);for(var Pe in rt("th",null,De),$e)rt("th",L,De).textContent=Pe}else et(ae,k),Se.live&&et(ae,A);var Fe={show:!0},We={show:!1};function Be(t,e){if(0==e&&(Le||!Se.live||2==o))return de;var n=[],i=rt("tr",R,ae,ae.childNodes[e]);et(i,t.class),t.show||et(i,y);var s=rt("th",null,i);if(ke.show){var a=ot(T,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=ot(L,s);for(var h in c.textContent=t.label,e>0&&(ke.show||(c.style.color=t.width>0?ke.stroke(r,e):ke.fill(r,e)),He("click",s,(function(e){if(!$n._lock){var n=ft.indexOf(t);if((e.ctrlKey||e.metaKey)!=Se.isolate){var i=ft.some((function(t,e){return e>0&&e!=n&&t.show}));ft.forEach((function(t,e){e>0&&Wr(e,i?e==n?Fe:We:Fe,!0,vo.setSeries)}))}else Wr(n,{show:!t.show},!0,vo.setSeries)}})),Ln&&He(z,s,(function(e){$n._lock||Wr(ft.indexOf(t),zr,!0,vo.setSeries)}))),$e){var u=rt("td",E,i);u.textContent="--",n.push(u)}return[i,n]}var Ne=new Map;function He(t,e,n){var i=Ne.get(e)||{},o=$n.bind[t](r,e,n);o&&(gt(t,e,i[t]=o),Ne.set(e,i))}function Ge(t,e,n){var i=Ne.get(e)||{};for(var r in i)null!=t&&r!=t||(pt(r,e,i[r]),delete i[r]);null==t&&Ne.delete(e)}var je=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,cn=!1;function hn(t,e,n){(n||t!=r.width||e!=r.height)&&vn(t,e),cr(!1),rn=!0,nn=!0,on=cn=$n.left>=0,Sr()}function vn(t,e){r.width=je=qe=t,r.height=Ve=Ye=e,Ke=Xe=0,An(),kn();var n=r.bbox;Ze=n.left=Xt(Ke*i,.5),Qe=n.top=Xt(Xe*i,.5),Je=n.width=Xt(qe*i,.5),tn=n.height=Xt(Ye*i,.5)}var bn=3;function xn(){var t=!1,e=0;while(!t){e++;var n=sr(e),i=ar(e);t=e==bn||n&&i,t||(vn(r.width,r.height),nn=!0)}}function Cn(t){var e=t.width,n=t.height;hn(e,n)}function An(){var t=!1,e=!1,n=!1,i=!1;vt.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,h=a+c;h>0&&(l?(qe-=h,3==s?(Ke+=h,i=!0):n=!0):(Ye-=h,0==s?(Xe+=h,t=!0):e=!0))}})),Fn[0]=t,Fn[1]=n,Fn[2]=e,Fn[3]=i,qe-=_i[1]+_i[3],Ke+=_i[3],Ye-=_i[2]+_i[0],Xe+=_i[0]}function kn(){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}}vt.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=Cn;var $n=r.cursor=ye({},On,{drag:{y:2==o}},t.cursor);$n.idxs=xe,$n._lock=!1;var Rn=$n.points;Rn.show=Qt(Rn.show),Rn.size=Qt(Rn.size),Rn.stroke=Qt(Rn.stroke),Rn.width=Qt(Rn.width),Rn.fill=Qt(Rn.fill);var Tn=r.focus=ye({},t.focus||{alpha:.3},$n.focus),Ln=Tn.prox>=0,En=[null];function Mn(t,e){if(e>0){var n=$n.points.show(r,e);if(n)return et(n,S),et(n,t.class),at(n,-10,-10,qe,Ye),st.insertBefore(n,En[e]),n}}function Dn(t,e){if(1==o||e>0){var n=1==o&&_t[t.scale].time,i=t.value;t.value=n?ge(i)?_n(le,wn(i,ce)):i||be:i||ti,t.label=t.label||(n?zn:Un)}if(e>0){t.width=null==t.width?1:t.width,t.paths=t.paths||ji||ee,t.fillTo=Qt(t.fillTo||mi),t.pxAlign=+Tt(t.pxAlign,lt),t.pxRound=bi(t.pxAlign),t.stroke=Qt(t.stroke||null),t.fill=Qt(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;var r=ni(t.width,1),s=t.points=ye({},{size:r,width:Ht(1,.2*r),stroke:t.stroke,space:2*r,paths:Vi,_stroke:null,_fill:null},t.points);s.show=Qt(s.show),s.filter=Qt(s.filter),s.fill=Qt(s.fill),s.stroke=Qt(s.stroke),s.paths=Qt(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]),Se.values.push(null)}if($n.show){xe.splice(e,0,null);var l=Mn(t,e);l&&En.splice(e,0,l)}mo("addSeries",e)}function In(t,e){e=null==e?ft.length:e,t=Ki(t,e,Gn,si),ft.splice(e,0,t),Dn(ft[e],e)}function Pn(t){if(ft.splice(t,1),Ce){Se.values.splice(t,1),Te.splice(t,1);var e=Re.splice(t,1)[0];Ge(null,e.firstChild),e.remove()}$n.show&&(xe.splice(t,1),En.length>1&&En.splice(t,1)[0].remove()),mo("delSeries",t)}r.addSeries=In,r.delSeries=Pn;var Fn=[!1,!1,!1,!1];function Wn(t,e){if(t._show=t.show,t.show){var n=t.side%2,i=_t[t.scale];null==i&&(t.scale=n?ft[1].scale:kt,i=_t[t.scale]);var o=i.time;t.size=Qt(t.size),t.space=Qt(t.space),t.rotate=Qt(t.rotate),t.incrs=Qt(t.incrs||(2==i.distr?Ue:o?1==dt?sn:un:ze)),t.splits=Qt(t.splits||(o&&1==i.distr?ve:3==i.distr?qn:4==i.distr?Yn:Vn)),t.stroke=Qt(t.stroke),t.grid.stroke=Qt(t.grid.stroke),t.ticks.stroke=Qt(t.ticks.stroke),t.border.stroke=Qt(t.border.stroke);var s=t.values;t.values=fe(s)&&!fe(s[0])?Qt(s):o?fe(s)?pn(le,gn(s,ce)):ge(s)?mn(le,s):s||_e:s||jn,t.filter=Qt(t.filter||(i.distr>=3?Jn:te)),t.font=rr(t.font),t.labelFont=rr(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&&(Fn[e]=!0,t._el=ot(w,J))}}function Bn(t,e,n,i){var r=(0,s.Z)(n,4),o=r[0],a=r[1],l=r[2],c=r[3],h=e%2,u=0;return 0==h&&(c||a)&&(u=0==e&&!o||2==e&&!l?Wt(Hn.size/3):0),1==h&&(o||l)&&(u=1==e&&!a||3==e&&!c?Wt(ei.size/2):0),u}var Kn,Xn,Zn,Qn,ii,ri,hi,gi,pi,vi,wi,yi=r.padding=(t.padding||[Bn,Bn,Bn,Bn]).map((function(t){return Qt(Tt(t,Bn))})),_i=r._padding=yi.map((function(t,e){return t(r,e,Fn,0)})),xi=null,Si=null,Ci=1==o?ft[0].idxs:null,Ai=null,ki=!1;function $i(t,n){if(e=null==t?[]:we(t,me),2==o){Kn=0;for(var i=1;i<ft.length;i++)Kn+=e[i][0].length;r.data=e=t}else if(null==e[0]&&(e[0]=[]),r.data=e.slice(),Ai=e[0],Kn=Ai.length,2==jt){e[0]=Array(Kn);for(var s=0;s<Kn;s++)e[0][s]=s}if(r._data=e,cr(!0),mo("setData"),2==jt&&(rn=!0),!1!==n){var a=zt;a.auto(r,ki)?Ri():Fr(kt,a.min,a.max),on=$n.left>=0,cn=!0,Sr()}}function Ri(){var t,n;if(ki=!0,1==o)if(Kn>0){if(xi=Ci[0]=0,Si=Ci[1]=Kn-1,t=e[0][xi],n=e[0][Si],2==jt)t=xi,n=Si;else if(1==Kn)if(3==jt){var i=xt(t,t,zt.log,!1),r=(0,s.Z)(i,2);t=r[0],n=r[1]}else if(4==jt){var a=St(t,t,zt.log,!1),l=(0,s.Z)(a,2);t=l[0],n=l[1]}else if(zt.time)n=t+Wt(86400/dt);else{var c=Rt(t,n,Ct,!0),h=(0,s.Z)(c,2);t=h[0],n=h[1]}}else xi=Ci[0]=t=null,Si=Ci[1]=n=null;Fr(kt,t,n)}function Ti(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:B,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";t!=Xn&&(X.strokeStyle=Xn=t),r!=Zn&&(X.fillStyle=Zn=r),e!=Qn&&(X.lineWidth=Qn=e),o!=ri&&(X.lineJoin=ri=o),i!=hi&&(X.lineCap=hi=i),n!=ii&&X.setLineDash(ii=n)}function Li(t,e,n,i){e!=Zn&&(X.fillStyle=Zn=e),t!=gi&&(X.font=gi=t),n!=pi&&(X.textAlign=pi=n),i!=vi&&(X.textBaseline=vi=i)}function Ei(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&t.auto(r,ki)&&(null==e||null==e.min)){var s=Tt(xi,0),a=Tt(Si,i.length-1),l=null==n.min?3==t.distr?yt(i,s,a):wt(i,s,a,o):[n.min,n.max];t.min=Nt(t.min,n.min=l[0]),t.max=Ht(t.max,n.max=l[1])}}function Mi(){var t=we(_t,me);for(var n in t){var i=t[n],a=Kt[n];if(null!=a&&null!=a.min)ye(i,a),n==kt&&cr(!0);else if(n!=kt||2==o)if(0==Kn&&null==i.from){var l=i.range(r,null,null,n);i.min=l[0],i.max=l[1]}else i.min=Yt,i.max=-Yt}if(Kn>0)for(var c in ft.forEach((function(n,i){if(1==o){var a=n.scale,l=t[a],c=Kt[a];if(0==i){var h=l.range(r,l.min,l.max,a);l.min=h[0],l.max=h[1],xi=mt(l.min,e[0]),Si=mt(l.max,e[0]),e[0][xi]<l.min&&xi++,e[0][Si]>l.max&&Si--,n.min=Ai[xi],n.max=Ai[Si]}else n.show&&n.auto&&Ei(l,c,n,e[i],n.sorted);n.idxs[0]=xi,n.idxs[1]=Si}else if(i>0&&n.show&&n.auto){var u=(0,s.Z)(n.facets,2),d=u[0],f=u[1],g=d.scale,p=f.scale,m=(0,s.Z)(e[i],2),v=m[0],w=m[1];Ei(t[g],Kt[g],d,v,d.sorted),Ei(t[p],Kt[p],f,w,f.sorted),n.min=f.min,n.max=f.max}})),t){var h=t[c],u=Kt[c];if(null==h.from&&(null==u||null==u.min)){var d=h.range(r,h.min==Yt?null:h.min,h.max==-Yt?null:h.max,c);h.min=d[0],h.max=d[1]}}for(var f in t){var g=t[f];if(null!=g.from){var p=t[g.from];if(null==p.min)g.min=g.max=null;else{var m=g.range(r,p.min,p.max,f);g.min=m[0],g.max=m[1]}}}var v={},w=!1;for(var y in t){var _=t[y],b=_t[y];if(b.min!=_.min||b.max!=_.max){b.min=_.min,b.max=_.max;var x=b.distr;b._min=3==x?Gt(b.min):4==x?qt(b.min,b.asinh):b.min,b._max=3==x?Gt(b.max):4==x?qt(b.max,b.asinh):b.max,v[y]=w=!0}}if(w){for(var S in ft.forEach((function(t,e){2==o?e>0&&v.y&&(t._paths=null):v[t.scale]&&(t._paths=null)})),v)rn=!0,mo("setScale",S);$n.show&&(on=cn=$n.left>=0)}for(var C in Kt)Kt[C]=null}function Oi(t){var e=Zt(xi-1,0,Kn-1),n=Zt(Si+1,0,Kn-1);while(null==t[e]&&e>0)e--;while(null==t[n]&&n<Kn-1)n++;return[e,n]}function Di(){Kn>0&&(ft.forEach((function(t,n){if(n>0&&t.show&&null==t._paths){var i=Oi(e[n]);t._paths=t.paths(r,n,i[0],i[1])}})),ft.forEach((function(t,e){if(e>0&&t.show){wi!=t.alpha&&(X.globalAlpha=wi=t.alpha),Ii(e,!1),t._paths&&Pi(e,!1),Ii(e,!0);var n=t.points.show(r,e,xi,Si),i=t.points.filter(r,e,n,t._paths?t._paths.gaps:null);(n||i)&&(t.points._paths=t.points.paths(r,e,xi,Si,i),Pi(e,!0)),1!=wi&&(X.globalAlpha=wi=1),mo("drawSeries",e)}})))}function Ii(t,e){var n=e?ft[t].points:ft[t];n._stroke=n.stroke(r,t),n._fill=n.fill(r,t)}function Pi(t,e){var n=e?ft[t].points:ft[t],r=n._stroke,o=n._fill,s=n._paths,a=s.stroke,l=s.fill,c=s.clip,h=s.flags,u=null,d=se(n.width*i,3),f=d%2/2;e&&null==o&&(o=d>0?"#fff":r);var g=1==n.pxAlign;if(g&&X.translate(f,f),!e){var p=Ze,m=Qe,v=Je,w=tn,y=d*i/2;0==n.min&&(w+=y),0==n.max&&(m-=y,w+=y),u=new Path2D,u.rect(p,m,v,w)}e?Bi(r,d,n.dash,n.cap,o,a,l,h,c):Fi(t,r,d,n.dash,n.cap,o,a,l,h,u,c),g&&X.translate(-f,-f)}function Fi(t,n,i,o,s,a,l,c,h,u,d){var f=!1;bt.forEach((function(g,p){if(g.series[0]==t){var m,v=ft[g.series[1]],w=e[g.series[1]],y=(v._paths||he).band;fe(y)&&(y=1==g.dir?y[0]:y[1]);var _=null;v.show&&y&&Lt(w,xi,Si)?(_=g.fill(r,p)||a,m=v._paths.clip):y=null,Bi(n,i,o,s,_,l,c,h,u,d,m,y),f=!0}})),f||Bi(n,i,o,s,a,l,c,h,u,d)}r.setData=$i;var Wi=di|fi;function Bi(t,e,n,i,r,o,s,a,l,c,h,u){Ti(t,e,n,i,r),(l||c||u)&&(X.save(),l&&X.clip(l),c&&X.clip(c)),u?(a&Wi)==Wi?(X.clip(u),h&&X.clip(h),Hi(r,s),Ni(t,o,e)):a&fi?(Hi(r,s),X.clip(u),Ni(t,o,e)):a&di&&(X.save(),X.clip(u),h&&X.clip(h),Hi(r,s),X.restore(),Ni(t,o,e)):(Hi(r,s),Ni(t,o,e)),(l||c||u)&&X.restore()}function Ni(t,e,n){n>0&&(e instanceof Map?e.forEach((function(t,e){X.strokeStyle=Xn=e,X.stroke(t)})):null!=e&&t&&X.stroke(e))}function Hi(t,e){e instanceof Map?e.forEach((function(t,e){X.fillStyle=Zn=e,X.fill(t)})):null!=e&&t&&X.fill(e)}function Ui(t,e,n,i){var o,s=vt[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=ir(e,n,l,i,a)}return s._found=o}function Gi(t,e,n,i,r,o,s,a,l,c){var h=s%2/2;1==lt&&X.translate(h,h),Ti(a,s,l,c,a),X.beginPath();var u,d,f,g,p=r+(0==i||3==i?-o:o);0==n?(d=r,g=p):(u=r,f=p);for(var m=0;m<t.length;m++)null!=e[m]&&(0==n?u=f=t[m]:d=g=t[m],X.moveTo(u,d),X.lineTo(f,g));X.stroke(),1==lt&&X.translate(-h,-h)}function sr(t){var e=!0;return vt.forEach((function(n,i){if(n.show){var o=_t[n.scale];if(null!=o.min){n._show||(e=!1,n._show=!0,cr(!1));var a=n.side,l=a%2,c=o.min,h=o.max,u=Ui(i,c,h,0==l?qe:Ye),d=(0,s.Z)(u,2),f=d[0],g=d[1];if(0!=g){var p=2==o.distr,m=n._splits=n.splits(r,i,c,h,f,g,p),v=2==o.distr?m.map((function(t){return Ai[t]})):m,w=2==o.distr?Ai[m[1]]-Ai[m[0]]:f,y=n._values=n.values(r,n.filter(r,v,i,g,w),i,g,w);n._rotate=2==a?n.rotate(r,y,i,g):0;var _=n._size;n._size=Bt(n.size(r,y,i,t)),null!=_&&n._size!=_&&(e=!1)}}else n._show&&(e=!1,n._show=!1,cr(!1))}})),e}function ar(t){var e=!0;return yi.forEach((function(n,i){var o=n(r,i,Fn,t);o!=_i[i]&&(e=!1),_i[i]=o})),e}function lr(){for(var t=function(t){var e=vt[t];if(!e.show||!e._show)return"continue";var n=e.side,o=n%2,a=void 0,l=void 0,c=e.stroke(r,t),u=0==n||3==n?-1:1;if(e.label){var d=e.labelGap*u,f=Wt((e._lpos+d)*i);Li(e.labelFont[0],c,"center",2==n?D:I),X.save(),1==o?(a=l=0,X.translate(f,Wt(Qe+tn/2)),X.rotate((3==n?-It:It)/2)):(a=Wt(Ze+Je/2),l=f),X.fillText(e.label,a,l),X.restore()}var g=(0,s.Z)(e._found,2),p=g[0],m=g[1];if(0==m)return"continue";var v=_t[e.scale],w=0==o?Je:tn,y=0==o?Ze:Qe,_=Wt(e.gap*i),b=e._splits,x=2==v.distr?b.map((function(t){return Ai[t]})):b,S=2==v.distr?Ai[b[1]]-Ai[b[0]]:p,C=e.ticks,A=e.border,k=C.show?Wt(C.size*i):0,$=e._rotate*-It/180,R=ht(e._pos*i),T=(k+_)*u,L=R+T;l=0==o?L:0,a=1==o?L:0;var E=e.font[0],M=1==e.align?P:2==e.align?F:$>0?P:$<0?F:0==o?"center":3==n?F:P,O=$||1==o?"middle":2==n?D:I;Li(E,c,M,O);for(var W=e.font[1]*Nn,B=b.map((function(t){return ht(h(t,v,w,y))})),N=e._values,H=0;H<N.length;H++){var U=N[H];if(null!=U){0==o?a=B[H]:l=B[H],U=""+U;for(var z=-1==U.indexOf("\n")?[U]:U.split(/\n/gm),G=0;G<z.length;G++){var j=z[G];$?(X.save(),X.translate(a,l+G*W),X.rotate($),X.fillText(j,0,0),X.restore()):X.fillText(j,a,l+G*W)}}}C.show&&Gi(B,C.filter(r,x,t,m,S),o,n,R,k,se(C.width*i,3),C.stroke(r,t),C.dash,C.cap);var V=e.grid;V.show&&Gi(B,V.filter(r,x,t,m,S),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),A.show&&Gi([R],[1],0==o?1:0,0==o?1:2,1==o?Qe:Ze,1==o?tn:Je,se(A.width*i,3),A.stroke(r,t),A.dash,A.cap)},e=0;e<vt.length;e++)t(e);mo("drawAxes")}function cr(t){ft.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,ur,dr,fr,gr,pr,mr,vr,wr,yr,_r,br,xr=!1;function Sr(){xr||(Ae(Cr),xr=!0)}function Cr(){en&&(Mi(),en=!1),rn&&(xn(),rn=!1),nn&&(it(tt,P,Ke),it(tt,D,Xe),it(tt,M,qe),it(tt,O,Ye),it(st,P,Ke),it(st,D,Xe),it(st,M,qe),it(st,O,Ye),it(J,M,je),it(J,O,Ve),Y.width=Wt(je*i),Y.height=Wt(Ve*i),vt.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;it(e,a?"left":"top",r-s),it(e,a?"width":"height",i),it(e,a?"top":"left",a?Xe:Ke),it(e,a?"height":"width",a?Ye:qe),nt(e,y)}else et(e,y)})),Xn=Zn=Qn=ri=hi=gi=pi=vi=ii=null,wi=1,io(!0),mo("setSize"),nn=!1),je>0&&Ve>0&&(X.clearRect(0,0,Y.width,Y.height),mo("drawClear"),Et.forEach((function(t){return t()})),mo("draw")),$n.show&&on&&(eo(null,!0,!1),on=!1),W||(W=!0,r.status=1,mo("ready")),ki=!1,xr=!1}function Ar(t,n){var i=_t[t];if(null==i.from){if(0==Kn){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(Kn>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;t==kt&&2==i.distr&&Kn>0&&(n.min=mt(n.min,e[0]),n.max=mt(n.max,e[0]),n.min==n.max&&n.max++),Kt[t]=n,en=!0,Sr()}}r.redraw=function(t,e){rn=e||!1,!1!==t?Fr(kt,zt.min,zt.max):Sr()},r.setScale=Ar;var kr=!1,$r=$n.drag,Rr=$r.x,Tr=$r.y;$n.show&&($n.x&&(hr=ot(b,st)),$n.y&&(ur=ot(x,st)),0==zt.ori?(dr=hr,fr=ur):(dr=ur,fr=hr),_r=$n.left,br=$n.top);var Lr,Er,Mr,Or=r.select=ye({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Dr=Or.show?ot(_,Or.over?st:tt):null;function Ir(t,e){if(Or.show){for(var n in t)it(Dr,n,Or[n]=t[n]);!1!==e&&mo("setSelect")}}function Pr(t,e){var n=ft[t],i=Ce?Re[t]:null;n.show?i&&nt(i,y):(i&&et(i,y),En.length>1&&at(En[t],-10,-10,qe,Ye))}function Fr(t,e,n){Ar(t,{min:e,max:n})}function Wr(t,e,n,i){null!=e.focus&&Gr(t),null!=e.show&&ft.forEach((function(n,i){i>0&&(t==i||null==t)&&(n.show=e.show,Pr(i,e.show),Fr(2==o?n.facets[1].scale:n.scale,null,null),Sr())})),!1!==n&&mo("setSeries",t,e),i&&_o("setSeries",r,t,e)}function Br(t,e){ye(bt[t],e)}function Nr(t,e){t.fill=Qt(t.fill||null),t.dir=Tt(t.dir,-1),e=null==e?bt.length:e,bt.splice(e,0,t)}function Hr(t){null==t?bt.length=0:bt.splice(t,1)}function Ur(t,e){ft[t].alpha=e,$n.show&&En[t]&&(En[t].style.opacity=e),Ce&&Re[t]&&(Re[t].style.opacity=e)}r.setSelect=Ir,r.setSeries=Wr,r.addBand=Nr,r.setBand=Br,r.delBand=Hr;var zr={focus:!0};function Gr(t){if(t!=Mr){var e=null==t,n=1!=Tn.alpha;ft.forEach((function(i,r){var o=e||0==r||r==t;i._focus=e?null:o,n&&Ur(r,o?1:Tn.alpha)})),Mr=t,n&&Sr()}}function jr(t,e,n){var r=_t[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,h=r.distr;return 3==h?Ut(10,c):4==h?Vt(c,r.asinh):c}function Vr(t,n){var i=jr(t,kt,n);return mt(i,e[0],xi,Si)}function qr(t){t(r),Sr()}function Yr(t,e){it(Dr,P,Or.left=t),it(Dr,M,Or.width=e)}function Kr(t,e){it(Dr,D,Or.top=t),it(Dr,O,Or.height=e)}Ce&&Ln&&gt(G,ae,(function(t){$n._lock||null!=Mr&&Wr(null,zr,!0,vo.setSeries)})),r.valToIdx=function(t){return mt(t,e[0])},r.posToIdx=Vr,r.posToVal=jr,r.valToPos=function(t,e,n){return 0==_t[e].ori?l(t,_t[e],n?Je:qe,n?Ze:0):c(t,_t[e],n?tn:Ye,n?Qe:0)},r.batch=qr,r.setCursor=function(t,e,n){_r=t.left,br=t.top,eo(null,e,n)};var Xr=0==zt.ori?Yr:Kr,Zr=1==zt.ori?Yr:Kr;function Qr(){if(Ce&&Se.live)for(var t=2==o?1:0;t<ft.length;t++)if(0!=t||!Le){var e=Se.values[t],n=0;for(var i in e)Te[t][n++].firstChild.nodeValue=e[i]}}function Jr(t,e){if(null!=t){var n=t.idx;Se.idx=n,ft.forEach((function(t,e){(e>0||!Le)&&to(e,n)}))}Ce&&Se.live&&Qr(),cn=!1,!1!==e&&mo("setLegend")}function to(t,n){var i;if(null==n)i=Ee;else{var o=ft[t],s=0==t&&2==jt?Ai:e[t];i=Le?o.values(r,t,n):{_:o.value(r,s[n],t,n)}}Se.values[t]=i}function eo(t,n,i){wr=_r,yr=br;var a,l=$n.move(r,_r,br),c=(0,s.Z)(l,2);_r=c[0],br=c[1],$n.show&&(dr&&at(dr,Wt(_r),0,qe,Ye),fr&&at(fr,0,Wt(br),qe,Ye));var h=xi>Si;Lr=Yt;var u=0==zt.ori?qe:Ye,d=1==zt.ori?qe:Ye;if(_r<0||0==Kn||h){a=null;for(var f=0;f<ft.length;f++)f>0&&En.length>1&&at(En[f],-10,-10,qe,Ye);if(Ln&&Wr(null,zr,!0,null==t&&vo.setSeries),Se.live){xe.fill(null),cn=!0;for(var g=0;g<ft.length;g++)Se.values[g]=Ee}}else{var p,m,v;1==o&&(p=0==zt.ori?_r:br,m=jr(p,kt),a=mt(m,e[0],xi,Si),v=re(Dt(e[0][a],zt,u,0),.5));for(var w=2==o?1:0;w<ft.length;w++){var y=ft[w],_=xe[w],b=1==o?e[w][_]:e[w][1][_],x=$n.dataIdx(r,w,a,m),S=1==o?e[w][x]:e[w][1][x];cn=cn||S!=b||x!=_,xe[w]=x;var C=x==a?v:re(Dt(1==o?e[0][x]:e[w][0][x],zt,u,0),.5);if(w>0&&y.show){var A=null==S?-10:re(Ft(S,1==o?_t[y.scale]:_t[y.facets[1].scale],d,0),.5);if(A>0&&1==o){var k=Pt(A-br);k<=Lr&&(Lr=k,Er=w)}var $=void 0,R=void 0;if(0==zt.ori?($=C,R=A):($=A,R=C),cn&&En.length>1){ct(En[w],$n.points.fill(r,w),$n.points.stroke(r,w));var T=void 0,L=void 0,E=void 0,M=void 0,O=!0,D=$n.points.bbox;if(null!=D){O=!1;var I=D(r,w);E=I.left,M=I.top,T=I.width,L=I.height}else E=$,M=R,T=L=$n.points.size(r,w);ut(En[w],T,L,O),at(En[w],E,M,qe,Ye)}}if(Se.live){if(!cn||0==w&&Le)continue;to(w,x)}}}if($n.idx=a,$n.left=_r,$n.top=br,cn&&(Se.idx=a,Jr()),Or.show&&kr)if(null!=t){var P=(0,s.Z)(vo.scales,2),F=P[0],B=P[1],H=(0,s.Z)(vo.match,2),U=H[0],z=H[1],G=(0,s.Z)(t.cursor.sync.scales,2),j=G[0],V=G[1],q=t.cursor.drag;if(Rr=q._x,Tr=q._y,Rr||Tr){var Y,K,X,Z,Q,J=t.select,tt=J.left,et=J.top,nt=J.width,it=J.height,rt=t.scales[F].ori,ot=t.posToVal,st=null!=F&&U(F,j),lt=null!=B&&z(B,V);st&&Rr?(0==rt?(Y=tt,K=nt):(Y=et,K=it),X=_t[F],Z=Dt(ot(Y,j),X,u,0),Q=Dt(ot(Y+K,j),X,u,0),Xr(Nt(Z,Q),Pt(Q-Z))):Xr(0,u),lt&&Tr?(1==rt?(Y=tt,K=nt):(Y=et,K=it),X=_t[B],Z=Ft(ot(Y,V),X,d,0),Q=Ft(ot(Y+K,V),X,d,0),Zr(Nt(Z,Q),Pt(Q-Z))):Zr(0,d)}else ao()}else{var ht=Pt(wr-gr),dt=Pt(yr-pr);if(1==zt.ori){var gt=ht;ht=dt,dt=gt}Rr=$r.x&&ht>=$r.dist,Tr=$r.y&&dt>=$r.dist;var pt,vt,wt=$r.uni;null!=wt?Rr&&Tr&&(Rr=ht>=wt,Tr=dt>=wt,Rr||Tr||(dt>ht?Tr=!0:Rr=!0)):$r.x&&$r.y&&(Rr||Tr)&&(Rr=Tr=!0),Rr&&(0==zt.ori?(pt=mr,vt=_r):(pt=vr,vt=br),Xr(Nt(pt,vt),Pt(vt-pt)),Tr||Zr(0,d)),Tr&&(1==zt.ori?(pt=mr,vt=_r):(pt=vr,vt=br),Zr(Nt(pt,vt),Pt(vt-pt)),Rr||Xr(0,u)),Rr||Tr||(Xr(0,0),Zr(0,0))}if($r._x=Rr,$r._y=Tr,null==t){if(i){if(null!=wo){var yt=(0,s.Z)(vo.scales,2),bt=yt[0],xt=yt[1];vo.values[0]=null!=bt?jr(0==zt.ori?_r:br,bt):null,vo.values[1]=null!=xt?jr(1==zt.ori?_r:br,xt):null}_o(N,r,_r,br,qe,Ye,a)}if(Ln){var St=i&&vo.setSeries,Ct=Tn.prox;null==Mr?Lr<=Ct&&Wr(Er,zr,!0,St):Lr>Ct?Wr(null,zr,!0,St):Er!=Mr&&Wr(Er,zr,!0,St)}}W&&!1!==n&&mo("setCursor")}r.setLegend=Jr;var no=null;function io(t){!0===t?no=null:(no=st.getBoundingClientRect(),mo("syncRect",no))}function ro(t,e,n,i,r,o,s){$n._lock||(oo(t,e,n,i,r,o,s,!1,null!=t),null!=t?eo(null,!0,!0):eo(e,!0,!1))}function oo(t,e,n,i,o,a,l,c,u){if(null==no&&io(!1),null!=t)n=t.clientX-no.left,i=t.clientY-no.top;else{if(n<0||i<0)return _r=-10,void(br=-10);var d=(0,s.Z)(vo.scales,2),f=d[0],g=d[1],p=e.cursor.sync,m=(0,s.Z)(p.values,2),v=m[0],w=m[1],y=(0,s.Z)(p.scales,2),_=y[0],b=y[1],x=(0,s.Z)(vo.match,2),S=x[0],C=x[1],A=e.axes[0].side%2==1,k=0==zt.ori?qe:Ye,$=1==zt.ori?qe:Ye,R=A?a:o,T=A?o:a,L=A?i:n,E=A?n:i;if(n=null!=_?S(f,_)?h(v,_t[f],k,0):-10:k*(L/R),i=null!=b?C(g,b)?h(w,_t[g],$,0):-10:$*(E/T),1==zt.ori){var M=n;n=i,i=M}}if(u&&((n<=1||n>=qe-1)&&(n=Xt(n,qe)),(i<=1||i>=Ye-1)&&(i=Xt(i,Ye))),c){gr=n,pr=i;var O=$n.move(r,n,i),D=(0,s.Z)(O,2);mr=D[0],vr=D[1]}else _r=n,br=i}var so={width:0,height:0};function ao(){Ir(so,!1)}function lo(t,e,n,i,o,s,a){kr=!0,Rr=Tr=$r._x=$r._y=!1,oo(t,e,n,i,o,s,a,!0,!1),null!=t&&(He(U,Z,co),_o(H,r,mr,vr,qe,Ye,null))}function co(t,e,n,i,o,s,a){kr=$r._x=$r._y=!1,oo(t,e,n,i,o,s,a,!1,!0);var l=Or.left,c=Or.top,h=Or.width,u=Or.height,d=h>0||u>0;if(d&&Ir(Or),$r.setScale&&d){var f=l,g=h,p=c,m=u;if(1==zt.ori&&(f=c,g=u,p=l,m=h),Rr&&Fr(kt,jr(f,kt),jr(f+g,kt)),Tr)for(var v in _t){var w=_t[v];v!=kt&&null==w.from&&w.min!=Yt&&Fr(v,jr(p+m,v),jr(p,v))}ao()}else $n.lock&&($n._lock=!$n._lock,$n._lock||eo(null,!0,!1));null!=t&&(Ge(U,Z),_o(U,r,_r,br,qe,Ye,null))}function ho(t,e,n,i,r,o,s){if(!$n._lock){var a=kr;if(kr){var l,c,h=!0,u=!0,d=10;0==zt.ori?(l=Rr,c=Tr):(l=Tr,c=Rr),l&&c&&(h=_r<=d||_r>=qe-d,u=br<=d||br>=Ye-d),l&&h&&(_r=_r<mr?0:qe),c&&u&&(br=br<vr?0:Ye),eo(null,!0,!0),kr=!1}_r=-10,br=-10,eo(null,!0,!0),a&&(kr=a)}}function uo(t,e,n,i,o,s,a){Ri(),ao(),null!=t&&_o(j,r,_r,br,qe,Ye,null)}function fo(){vt.forEach(or),hn(r.width,r.height,!0)}gt(K,Q,fo);var go={};go.mousedown=lo,go.mousemove=ro,go.mouseup=co,go.dblclick=uo,go["setSeries"]=function(t,e,n,i){Wr(n,i,!0,!1)},$n.show&&(He(H,st,lo),He(N,st,ro),He(z,st,io),He(G,st,ho),He(j,st,uo),zi.add(r),r.syncRect=io);var po=r.hooks=t.hooks||{};function mo(t,e,n){t in po&&po[t].forEach((function(t){t.call(null,r,e,n)}))}(t.plugins||[]).forEach((function(t){for(var e in t.hooks)po[e]=(po[e]||[]).concat(t.hooks[e])}));var vo=ye({key:null,setSeries:!1,filters:{pub:ne,sub:ne},scales:[kt,ft[1]?ft[1].scale:null],match:[ie,ie],values:[null,null]},$n.sync);$n.sync=vo;var wo=vo.key,yo=ui(wo);function _o(t,e,n,i,r,o,s){vo.filters.pub(t,e,n,i,r,o,s)&&yo.pub(t,e,n,i,r,o,s)}function bo(t,e,n,i,r,o,s){vo.filters.sub(t,e,n,i,r,o,s)&&go[t](null,e,n,i,r,o,s)}function xo(){yo.unsub(r),zi.delete(r),Ne.clear(),pt(K,Q,fo),V.remove(),mo("destroy")}function So(){mo("init",t,e),$i(e||t.data,!1),Kt[kt]?Ar(kt,Kt[kt]):Ri(),hn(t.width,t.height),eo(null,!0,!1),Ir(Or,!1)}return yo.sub(r),r.pub=bo,r.destroy=xo,ft.forEach(Dn),vt.forEach(Wn),n?n instanceof HTMLElement?(n.appendChild(V),So()):n(r,So):So(),r}sr.assign=ye,sr.fmtNum=Ot,sr.rangeNum=Rt,sr.rangeLog=xt,sr.rangeAsinh=St,sr.orient=gi,sr.pxRatio=i,sr.join=Ce,sr.fmtDate=Ie,sr.tzDate=Fe,sr.sync=ui,sr.addGap=yi,sr.clipGaps=wi;var ar=sr.paths={points:Oi};ar.linear=Fi,ar.stepped=Wi,ar.bars=Bi,ar.spline=Hi},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})},56706: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)}))}}},84282: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(31644);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}}}}},70021: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(96882),n(38859),n(17525),n(18275),n(95094),n(71372),n(96928),n(1939),n(52506),n(32501);var i=n(56632);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="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(R){c=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var r=e&&e.prototype instanceof f?e:f,o=Object.create(r.prototype),s=new A(i||[]);return o._invoke=function(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 $()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=x(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=u(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)}}}(t,n,s),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(R){return{type:"throw",arg:R}}}t.wrap=h;var d={};function f(){}function g(){}function p(){}var m={};c(m,s,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(k([])));w&&w!==e&&n.call(w,s)&&(m=w);var y=p.prototype=f.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,s,a,l){var c=u(t[o],t,s);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==(0,i.Z)(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,l)}),(function(t){r("throw",t,a,l)})):e.resolve(d).then((function(t){h.value=t,a(h)}),(function(t){return r("throw",t,a,l)}))}l(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var r=i.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var e=t[s];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:$}}function $(){return{value:void 0,done:!0}}return g.prototype=p,c(y,"constructor",p),c(p,"constructor",g),g.displayName=c(p,l,"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,p):(t.__proto__=p,c(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var s=new b(h(e,n,i,r),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(y),c(y,l,"Generator"),c(y,s,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},t.values=k,A.prototype={constructor:A,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(C),!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),C(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;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}},6041:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(17002);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(31644);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=322.js.map