diff --git a/.storybook/preview.js b/.storybook/preview.js index 6179418c..bce8bc02 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,5 +1,6 @@ import '../src/style/theme.scss' import '../src/style/app.scss' +import { BrowserRouter as Router } from 'react-router-dom'; export const parameters = { actions: { argTypesRegex: "^on[A-Z].*" }, @@ -10,3 +11,11 @@ export const parameters = { }, }, } + +export const decorators = [ + (Story) => ( + + + + ), +]; diff --git a/dist/cjs/index.js b/dist/cjs/index.js index 75b67592..13a7a3fb 100644 --- a/dist/cjs/index.js +++ b/dist/cjs/index.js @@ -1,10 +1,10 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material"),n=require("luxon"),i=require("react-dom"),r=require("react-router-dom");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=s(e),l=o(e),c=function(){return c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function d(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function c(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;ru?p:u),b=2*Math.PI*v,y=b*((100-o)/100),w=e.useRef(null);return e.useEffect((function(){var e,t;null===(e=w.current)||void 0===e||e.style.setProperty("--dasharray","".concat(b)),null===(t=w.current)||void 0===t||t.style.setProperty("--dashoffset","".concat(y))}),[b,o]),l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:"circular-progress-wrapper",style:{width:i,height:i}},l.default.createElement("svg",{className:"circular-progress",style:{width:i,height:i}},l.default.createElement("circle",{className:"circular-progress-track",cx:m,cy:m,fill:"transparent",r:v,stroke:a,strokeWidth:p}),l.default.createElement("circle",{className:"circular-progress-indicator",cx:m,cy:m,fill:"transparent",r:v,stroke:d,strokeWidth:u,strokeDasharray:b,strokeDashoffset:y,strokeLinecap:g}),l.default.createElement("circle",{className:"circular-progress-indicator-shiny",ref:w,style:{opacity:.3},cx:m,cy:m,fill:"transparent",r:v,stroke:"var(--white)",strokeWidth:u,strokeDasharray:b,strokeLinecap:g})),l.default.createElement("div",{className:"circular-progress-label"},l.default.createElement("span",{className:"circular-progress-label__progress"},"".concat(o>99?99:Math.floor(o),"%")))))}function Kt(e){var n,i=e.children,r=e.clear,o=void 0!==r&&r,s=e.data,a=void 0===s?bt:s,h=e.extraClass,d=void 0===h?bt:h,f=u(e,["children","clear","data","extraClass"]),g=v(((n={"tooltip-wrapper":!0,"clear-tooltip":o})[d]=!0,n));return l.default.createElement(t.Tooltip,c({enterNextDelay:400,enterDelay:400,title:a,classes:{tooltip:g,arrow:"tooltip-arrow"},placement:"top",arrow:!0},f),i)}function Qt(e){var t=e.data;return l.default.createElement(Kt,{data:t,placement:"right"},l.default.createElement($,{className:"component-info"}))}function qt(e){return l.default.createElement("span",{className:"checkbox-container"},l.default.createElement("input",c({className:"checkbox-input",type:"checkbox"},e)),l.default.createElement("span",{className:"checkmark"}))}function en(e){var t=e.onChange,n=e.oneColor,i=void 0!==n&&n,r=e.checked,o=e.disabled,s=void 0!==o&&o,a=e.tooltip,h=void 0===a?"":a,d=u(e,["onChange","oneColor","checked","disabled","tooltip"]),f=v({"one-color":i,"toggle-btn":!0,disabled:s});return l.default.createElement(Kt,{data:h},l.default.createElement("div",{className:f},l.default.createElement("input",c({type:"checkbox",checked:r,onChange:function(e){s||t(e)}},d)),l.default.createElement("span",null)))}var tn={isEllipsisActive:function(e){return e.offsetWidth>n&1)}),e)}),0).toString():""},formatOption:function(e,t){return void 0!==t?{label:e,value:t}:{label:e,value:e}},isEmpty:function(e){return null==e||e===bt||Array.isArray(e)&&!e.length||"[object Number]"===Object.prototype.toString.call(e)&&isNaN(e)||"object"==typeof e&&!Object.keys(e).length&&"[object Date]"!==Object.prototype.toString.call(e)},isString:function(e){return"string"==typeof e||e instanceof String},isObject:function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},insensitiveSort:function(e,t){return d([],h(e),!1).sort((function(e,n){return t?e[t].toLowerCase().localeCompare(n[t].toLowerCase()):e.toLowerCase().localeCompare(n.toLowerCase())}))},range:function(e,t,n){void 0===n&&(n=1);var i=e;t||(t=i,i=0);for(var r=[],o=i;o0?1:0)}),0)})).join(".")},formatStringOption:function(e){return{label:e,value:e}},parseParamsToQuery:function(e){return e?Object.entries(e).reduce((function(e,t){var n=h(t,2),i=n[0],r=n[1];return Array.isArray(r)?r.forEach((function(t){t&&e.append(i,t)})):tn.isObject(r)?Object.entries(r).forEach((function(t){var n=h(t,2),r=n[0],o=n[1];e.append("".concat(i,"[").concat(r,"]"),o)})):tn.isEmpty(r)||e.append(i,r),e}),new URLSearchParams):{}},dispatchCustomEvent:function(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))},isNumber:function(e){try{return!isNaN(e)}catch(e){return!1}},stringSort:function(e,t,n){var i=[e.values[n],t.values[n]],r=i[0]||bt,o=i[1]||bt;if(tn.isNumber(r)&&tn.isNumber(o)){if(tn.isEmpty(r))return 1;if(tn.isEmpty(o))return-1;var s=parseFloat(r),a=parseFloat(o);return s===a?0:s>a?1:-1}if(tn.isIp(r)||tn.isIp(o))return tn.isEmpty(r)?1:tn.isEmpty(o)?-1:Number(r.split(".").map((function(e){return"000".concat(e).slice(-3)})).join(""))-Number(o.split(".").map((function(e){return"000".concat(e).slice(-3)})).join(""));if(!tn.isString(r)||!tn.isString(o)){if(Array.isArray(r)&&Array.isArray(o)){if(r=r.length,o=o.length,!r)return 1;if(!o)return-1}return r===o?0:r>o?1:-1}return r.length?o.length?Intl.Collator(void 0,{numeric:!0}).compare(r,o):-1:1},isIp:function(e){if(!tn.isString(e))return!1;if(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(e)){return e.split(".").reduce((function(e,t){var n=parseInt(t,10);return e&&n>=0&&n<256}))}return!1},formatBytes:function(e,t){if(void 0===t&&(t=2),0===e)return{value:0,text:"Bytes"};var n=e<0;n&&(e*=-1);var i=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1e3));return{value:((n?-1*e:e)/Math.pow(1e3,r)).toFixed(i),text:"".concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r])}},formatBytesToString:function(e,t){if(tn.isEmpty(e))return null;var n=tn.formatBytes(e,t),i=n.value,r=n.text;return"".concat(i," ").concat(r)},getTimeDiffObject:function(e){return n.DateTime.fromISO(e).diffNow(["days","hours","minutes"]).toObject()},getTimeDiffString:function(e,t){if(void 0===t&&(t=!1),!e)return bt;var n=tn.getTimeDiffObject(e),i="";return["days","hours","minutes"].forEach((function(e){(!t||t&&""===i&&n[e])&&(i=n[e]<0?"".concat(i," ").concat(-1*Math.round(n[e])).concat(e.charAt(0)):"".concat(i," ").concat(Math.round(n[e])).concat(e.charAt(0)))})),i.trim()||"0m"},formatISODate:function(e,t,i,r){return void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),"".concat(n.DateTime.fromISO(e).toLocaleString({year:"2-digit",month:"2-digit",day:"2-digit"})," ").concat(r?n.DateTime.fromISO(e).toLocaleString(c(c(c({hour:"2-digit",minute:"2-digit"},i&&{second:"2-digit"}),t&&i&&{fractionalSecondDigits:3}),{hourCycle:"h23"})):bt)},formatDate:function(e,t,i,r){return void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),e instanceof n.DateTime||"DateTime"===Object.getPrototypeOf(e).constructor.name?tn.formatISODate(e.toISO(),i,t,r):"Not Valid DateTime Object"}};function nn(e){"."===e.key||"ArrowRight"===e.key?(tn.goToNextInput(),e.preventDefault()):"ArrowLeft"===e.key&&(tn.goToPreviousInput(),e.preventDefault())}function rn(e){"."===e.key||"ArrowRight"===e.key?(tn.goToNextInput(),e.preventDefault()):"ArrowLeft"===e.key&&(tn.goToPreviousInput(),e.preventDefault())}function on(e){"."===e.key||"ArrowRight"===e.key?(tn.goToNextInput(),e.preventDefault()):"ArrowLeft"===e.key&&(tn.goToPreviousInput(),e.preventDefault())}var sn={},an={},ln={exports:{}};!function(e,t){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"==typeof t){var r=o(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;an.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>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);o0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n=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]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i,r=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){ +h=f,function(){var e={}.hasOwnProperty;function t(){for(var n=[],i=0;ic?p:c),b=2*Math.PI*v,y=b*((100-o)/100),w=e.useRef(null);return e.useEffect((function(){var e,t;null===(e=w.current)||void 0===e||e.style.setProperty("--dasharray","".concat(b)),null===(t=w.current)||void 0===t||t.style.setProperty("--dashoffset","".concat(y))}),[b,o]),s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:"circular-progress-wrapper",style:{width:i,height:i}},s.default.createElement("svg",{className:"circular-progress",style:{width:i,height:i}},s.default.createElement("circle",{className:"circular-progress-track",cx:m,cy:m,fill:"transparent",r:v,stroke:l,strokeWidth:p}),s.default.createElement("circle",{className:"circular-progress-indicator",cx:m,cy:m,fill:"transparent",r:v,stroke:d,strokeWidth:c,strokeDasharray:b,strokeDashoffset:y,strokeLinecap:g}),s.default.createElement("circle",{className:"circular-progress-indicator-shiny",ref:w,style:{opacity:.3},cx:m,cy:m,fill:"transparent",r:v,stroke:"var(--white)",strokeWidth:c,strokeDasharray:b,strokeLinecap:g})),s.default.createElement("div",{className:"circular-progress-label"},s.default.createElement("span",{className:"circular-progress-label__progress"},"".concat(o>99?99:Math.floor(o),"%")))))}function Yt(e){var n,i=e.children,r=e.clear,o=void 0!==r&&r,u=e.data,c=void 0===u?mt:u,h=e.extraClass,d=void 0===h?mt:h,f=l(e,["children","clear","data","extraClass"]),g=p(((n={"tooltip-wrapper":!0,"clear-tooltip":o})[d]=!0,n));return s.default.createElement(t.Tooltip,a({enterNextDelay:400,enterDelay:400,title:c,classes:{tooltip:g,arrow:"tooltip-arrow"},placement:"top",arrow:!0},f),i)}function Jt(e){var t=e.data;return s.default.createElement(Yt,{data:t,placement:"right"},s.default.createElement(I,{className:"component-info"}))}function Kt(e){return s.default.createElement("span",{className:"checkbox-container"},s.default.createElement("input",a({className:"checkbox-input",type:"checkbox"},e)),s.default.createElement("span",{className:"checkmark"}))}function Qt(e){var t=e.onChange,n=e.oneColor,i=void 0!==n&&n,r=e.checked,o=e.disabled,u=void 0!==o&&o,c=e.tooltip,h=void 0===c?"":c,d=l(e,["onChange","oneColor","checked","disabled","tooltip"]),f=p({"one-color":i,"toggle-btn":!0,disabled:u});return s.default.createElement(Yt,{data:h},s.default.createElement("div",{className:f},s.default.createElement("input",a({type:"checkbox",checked:r,onChange:function(e){u||t(e)}},d)),s.default.createElement("span",null)))}class qt extends Error{}class en extends qt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class tn extends qt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class nn extends qt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class rn extends qt{}class on extends qt{constructor(e){super(`Invalid unit ${e}`)}}class sn extends qt{}class an extends qt{constructor(){super("Zone is an abstract class")}}const ln="numeric",un="short",cn="long",hn={year:ln,month:ln,day:ln},dn={year:ln,month:un,day:ln},fn={year:ln,month:un,day:ln,weekday:un},gn={year:ln,month:cn,day:ln},pn={year:ln,month:cn,day:ln,weekday:cn},mn={hour:ln,minute:ln},vn={hour:ln,minute:ln,second:ln},bn={hour:ln,minute:ln,second:ln,timeZoneName:un},yn={hour:ln,minute:ln,second:ln,timeZoneName:cn},wn={hour:ln,minute:ln,hourCycle:"h23"},Cn={hour:ln,minute:ln,second:ln,hourCycle:"h23"},Sn={hour:ln,minute:ln,second:ln,hourCycle:"h23",timeZoneName:un},xn={hour:ln,minute:ln,second:ln,hourCycle:"h23",timeZoneName:cn},An={year:ln,month:ln,day:ln,hour:ln,minute:ln},En={year:ln,month:ln,day:ln,hour:ln,minute:ln,second:ln},Rn={year:ln,month:un,day:ln,hour:ln,minute:ln},In={year:ln,month:un,day:ln,hour:ln,minute:ln,second:ln},kn={year:ln,month:un,day:ln,weekday:un,hour:ln,minute:ln},$n={year:ln,month:cn,day:ln,hour:ln,minute:ln,timeZoneName:un},Ln={year:ln,month:cn,day:ln,hour:ln,minute:ln,second:ln,timeZoneName:un},_n={year:ln,month:cn,day:ln,weekday:cn,hour:ln,minute:ln,timeZoneName:cn},Tn={year:ln,month:cn,day:ln,weekday:cn,hour:ln,minute:ln,second:ln,timeZoneName:cn};class Mn{get type(){throw new an}get name(){throw new an}get ianaName(){return this.name}get isUniversal(){throw new an}offsetName(e,t){throw new an}formatOffset(e,t){throw new an}offset(e){throw new an}equals(e){throw new an}get isValid(){throw new an}}let On=null;class Nn extends Mn{static get instance(){return null===On&&(On=new Nn),On}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ki(e,t,n)}formatOffset(e,t){return Ti(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let Bn={};const Fn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let Pn={};class Wn extends Mn{static create(e){return Pn[e]||(Pn[e]=new Wn(e)),Pn[e]}static resetCache(){Pn={},Bn={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=Wn.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ki(e,t,n,this.name)}formatOffset(e,t){return Ti(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(i=this.name,Bn[i]||(Bn[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Bn[i]);var i;let[r,o,s,a,l,u,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),i=[];for(let e=0;e=0?d:1e3+d,(Ei({year:r,month:o,day:s,hour:24===l?0:l,minute:u,second:c,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Dn={};let Gn={};function Hn(e,t={}){const n=JSON.stringify([e,t]);let i=Gn[n];return i||(i=new Intl.DateTimeFormat(e,t),Gn[n]=i),i}let Vn={};let zn={};let jn=null;function Zn(e,t,n,i,r){const o=e.listingMode(n);return"error"===o?null:"en"===o?i(t):r(t)}class Xn{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:r,...o}=n;if(!t||Object.keys(o).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let i=Vn[n];return i||(i=new Intl.NumberFormat(e,t),Vn[n]=i),i}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return mi(this.floor?Math.floor(e):Ci(e,3),this.padTo)}}class Un{constructor(e,t,n){let i;if(this.opts=n,e.zone.isUniversal){const t=e.offset/60*-1,r=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&Wn.create(r).valid?(i=r,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:Qo.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);const r={...this.opts};r.timeZone=r.timeZone||i,this.dtf=Hn(t,r)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Yn{constructor(e,t,n){this.opts={style:"long",...n},!t&&di()&&(this.rtf=function(e,t={}){const{base:n,...i}=t,r=JSON.stringify([e,i]);let o=zn[r];return o||(o=new Intl.RelativeTimeFormat(e,t),zn[r]=o),o}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",i=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${r[e][0]}`;case-1:return n?"yesterday":`last ${r[e][0]}`;case 0:return n?"today":`this ${r[e][0]}`}}const s=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,u=r[e],c=i?l?u[1]:u[2]||u[1]:l?r[e][0]:e;return s?`${a} ${c} ago`:`in ${a} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Jn{static fromOpts(e){return Jn.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,n,i=!1){const r=e||li.defaultLocale,o=r||(i?"en-US":jn||(jn=(new Intl.DateTimeFormat).resolvedOptions().locale,jn)),s=t||li.defaultNumberingSystem,a=n||li.defaultOutputCalendar;return new Jn(o,s,a,r)}static resetCache(){jn=null,Gn={},Vn={},zn={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n}={}){return Jn.create(e,t,n)}constructor(e,t,n,i){const[r,o,s]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,i;try{t=Hn(e).resolvedOptions(),i=e}catch(r){const o=e.substring(0,n);t=Hn(o).resolvedOptions(),i=o}const{numberingSystem:r,calendar:o}=t;return[i,r,o]}}(e);this.locale=r,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Jn.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,n=!0){return Zn(this,e,n,Fi,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const i=Qo.utc(2016,n,1);t.push(e(i))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[i][e]}))}weekdays(e,t=!1,n=!0){return Zn(this,e,n,Gi,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=function(e){const t=[];for(let n=1;n<=7;n++){const i=Qo.utc(2016,11,13+n);t.push(e(i))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[i][e]}))}meridiems(e=!0){return Zn(this,void 0,e,(()=>Hi),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Qo.utc(2016,11,13,9),Qo.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e,t=!0){return Zn(this,e,t,Zi,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Qo.utc(-40,1,1),Qo.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const i=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return i?i.value:null}numberFormatter(e={}){return new Xn(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Un(e,this.intl,t)}relFormatter(e={}){return new Yn(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let i=Dn[n];return i||(i=new Intl.ListFormat(e,t),Dn[n]=i),i}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let Kn=null;class Qn extends Mn{static get utcInstance(){return null===Kn&&(Kn=new Qn(0)),Kn}static instance(e){return 0===e?Qn.utcInstance:new Qn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Qn($i(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Ti(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Ti(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Ti(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class qn extends Mn{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ei(e,t){if(ui(e)||null===e)return t;if(e instanceof Mn)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?Nn.instance:"utc"===n||"gmt"===n?Qn.utcInstance:Qn.parseSpecifier(n)||Wn.create(e)}return ci(e)?Qn.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new qn(e)}let ti,ni=()=>Date.now(),ii="system",ri=null,oi=null,si=null,ai=60;class li{static get now(){return ni}static set now(e){ni=e}static set defaultZone(e){ii=e}static get defaultZone(){return ei(ii,Nn.instance)}static get defaultLocale(){return ri}static set defaultLocale(e){ri=e}static get defaultNumberingSystem(){return oi}static set defaultNumberingSystem(e){oi=e}static get defaultOutputCalendar(){return si}static set defaultOutputCalendar(e){si=e}static get twoDigitCutoffYear(){return ai}static set twoDigitCutoffYear(e){ai=e%100}static get throwOnInvalid(){return ti}static set throwOnInvalid(e){ti=e}static resetCaches(){Jn.resetCache(),Wn.resetCache()}}function ui(e){return void 0===e}function ci(e){return"number"==typeof e}function hi(e){return"number"==typeof e&&e%1==0}function di(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function fi(e,t,n){if(0!==e.length)return e.reduce(((e,i)=>{const r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function gi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pi(e,t,n){return hi(e)&&e>=t&&e<=n}function mi(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function bi(e){return ui(e)||null===e||""===e?void 0:parseInt(e,10)}function yi(e){return ui(e)||null===e||""===e?void 0:parseFloat(e)}function wi(e){if(!ui(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ci(e,t,n=!1){const i=10**t;return(n?Math.trunc:Math.round)(e*i)/i}function Si(e){return e%4==0&&(e%100!=0||e%400==0)}function xi(e){return Si(e)?366:365}function Ai(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?Si(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ei(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function Ri(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===i?53:52}function Ii(e){return e>99?e:e>li.twoDigitCutoffYear?1900+e:2e3+e}function ki(e,t,n,i=null){const r=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(r).find((e=>"timezonename"===e.type.toLowerCase()));return a?a.value:null}function $i(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function Li(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new sn(`Invalid unit value ${e}`);return t}function _i(e,t){const n={};for(const i in e)if(gi(e,i)){const r=e[i];if(null==r)continue;n[t(i)]=Li(r)}return n}function Ti(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${mi(n,2)}:${mi(i,2)}`;case"narrow":return`${r}${n}${i>0?`:${i}`:""}`;case"techie":return`${r}${mi(n,2)}${mi(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Mi(e){return function(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}(e,["hour","minute","second","millisecond"])}const Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],Ni=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Bi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Fi(e){switch(e){case"narrow":return[...Bi];case"short":return[...Ni];case"long":return[...Oi];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Pi=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wi=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Di=["M","T","W","T","F","S","S"];function Gi(e){switch(e){case"narrow":return[...Di];case"short":return[...Wi];case"long":return[...Pi];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Hi=["AM","PM"],Vi=["Before Christ","Anno Domini"],zi=["BC","AD"],ji=["B","A"];function Zi(e){switch(e){case"narrow":return[...ji];case"short":return[...zi];case"long":return[...Vi];default:return null}}function Xi(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const Ui={D:hn,DD:dn,DDD:gn,DDDD:pn,t:mn,tt:vn,ttt:bn,tttt:yn,T:wn,TT:Cn,TTT:Sn,TTTT:xn,f:An,ff:Rn,fff:$n,ffff:_n,F:En,FF:In,FFF:Ln,FFFF:Tn};class Yi{static create(e,t={}){return new Yi(e,t)}static parseFormat(e){let t=null,n="",i=!1;const r=[];for(let o=0;o0&&r.push({literal:i,val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&r.push({literal:!1,val:n}),n=s,t=s)}return n.length>0&&r.push({literal:i,val:n}),r}static macroTokenToFormatOpts(e){return Ui[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}formatInterval(e,t={}){return this.loc.dtFormatter(e.start,{...this.opts,...t}).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return mi(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,n)=>this.loc.extract(e,t,n),o=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=()=>n?function(e){return Hi[e.hour<12?0:1]}(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(t,i)=>n?function(e,t){return Fi(t)[e.month-1]}(e,t):r(i?{month:t}:{month:t,day:"numeric"},"month"),l=(t,i)=>n?function(e,t){return Gi(t)[e.weekday-1]}(e,t):r(i?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=Yi.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Zi(t)[e.year<0?0:1]}(e,t):r({era:t},"era");return Xi(Yi.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return i?r({day:"numeric"},"day"):this.num(e.day);case"dd":return i?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?r({month:"numeric"},"month"):this.num(e.month);case"MM":return i?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?r({year:"numeric"},"year"):this.num(e.year);case"yy":return i?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=Yi.parseFormat(t),r=i.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]),o=e.shiftTo(...r.map(n).filter((e=>e)));return Xi(i,(e=>t=>{const i=n(t);return i?this.num(e.get(i),t.length):t})(o))}}class Ji{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ki=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Qi(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function qi(...e){return t=>e.reduce((([e,n,i],r)=>{const[o,s,a]=r(t,i);return[{...e,...o},s||n,a]}),[{},null,1]).slice(0,2)}function er(e,...t){if(null==e)return[null,null];for(const[n,i]of t){const t=n.exec(e);if(t)return i(t)}return[null,null]}function tr(...e){return(t,n)=>{const i={};let r;for(r=0;rvoid 0!==e&&(t||e&&c)?-e:e;return[{years:d(yi(n)),months:d(yi(i)),weeks:d(yi(r)),days:d(yi(o)),hours:d(yi(s)),minutes:d(yi(a)),seconds:d(yi(l),"-0"===l),milliseconds:d(wi(u),h)}]}const vr={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function br(e,t,n,i,r,o,s){const a={year:2===t.length?Ii(bi(t)):bi(t),month:Ni.indexOf(n)+1,day:bi(i),hour:bi(r),minute:bi(o)};return s&&(a.second=bi(s)),e&&(a.weekday=e.length>3?Pi.indexOf(e)+1:Wi.indexOf(e)+1),a}const yr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function wr(e){const[,t,n,i,r,o,s,a,l,u,c,h]=e,d=br(t,r,i,n,o,s,a);let f;return f=l?vr[l]:u?0:$i(c,h),[d,new Qn(f)]}const Cr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Sr=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ar(e){const[,t,n,i,r,o,s,a]=e;return[br(t,r,i,n,o,s,a),Qn.utcInstance]}function Er(e){const[,t,n,i,r,o,s,a]=e;return[br(t,a,n,i,r,o,s),Qn.utcInstance]}const Rr=Qi(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,or),Ir=Qi(/(\d{4})-?W(\d\d)(?:-?(\d))?/,or),kr=Qi(/(\d{4})-?(\d{3})/,or),$r=Qi(rr),Lr=qi((function(e,t){return[{year:cr(e,t),month:cr(e,t+1,1),day:cr(e,t+2,1)},null,t+3]}),hr,dr,fr),_r=qi(sr,hr,dr,fr),Tr=qi(ar,hr,dr,fr),Mr=qi(hr,dr,fr);const Or=qi(hr);const Nr=Qi(/(\d{4})-(\d\d)-(\d\d)/,ur),Br=Qi(lr),Fr=qi(hr,dr,fr);const Pr={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Wr={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Pr},Dr=365.2425,Gr=30.436875,Hr={years:{quarters:4,months:12,weeks:52.1775,days:Dr,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Gr,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...Pr},Vr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],zr=Vr.slice(0).reverse();function jr(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Xr(i)}function Zr(e,t,n,i,r){const o=e[r][n],s=t[n]/o,a=!(Math.sign(s)===Math.sign(i[r]))&&0!==i[r]&&Math.abs(s)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(s):Math.trunc(s);i[r]+=a,t[n]-=a*o}class Xr{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?Hr:Wr;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Jn.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Xr.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new sn("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Xr({values:_i(e,Xr.normalizeUnit),loc:Jn.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ci(e))return Xr.fromMillis(e);if(Xr.isDuration(e))return e;if("object"==typeof e)return Xr.fromObject(e);throw new sn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return er(e,[pr,mr])}(e);return n?Xr.fromObject(n,t):Xr.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return er(e,[gr,Or])}(e);return n?Xr.fromObject(n,t):Xr.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new sn("need to specify a reason the Duration is invalid");const n=e instanceof Ji?e:new Ji(e,t);if(li.throwOnInvalid)throw new nn(n);return new Xr({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new on(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Yi.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"}toHuman(e={}){const t=Vr.map((t=>{const n=this.values[t];return ui(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ci(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const n=this.shiftTo("hours","minutes","seconds","milliseconds");let i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));let r=n.toFormat(i);return e.includePrefix&&(r="T"+r),r}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Xr.fromDurationLike(e),n={};for(const e of Vr)(gi(t.values,e)||gi(this.values,e))&&(n[e]=t.get(e)+this.get(e));return jr(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Xr.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=Li(e(this.values[n],n));return jr(this,{values:t},!0)}get(e){return this[Xr.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return jr(this,{values:{...this.values,..._i(e,Xr.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){return jr(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return function(e,t){zr.reduce(((n,i)=>ui(t[i])?n:(n&&Zr(e,t,n,t,i),i)),null)}(this.matrix,e),jr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return jr(this,{values:function(e){const t={};for(const[n,i]of Object.entries(e))0!==i&&(t[n]=i);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Xr.normalizeUnit(e)));const t={},n={},i=this.toObject();let r;for(const o of Vr)if(e.indexOf(o)>=0){r=o;let e=0;for(const t in n)e+=this.matrix[t][o]*n[t],n[t]=0;ci(i[o])&&(e+=i[o]);const s=Math.trunc(e);t[o]=s,n[o]=(1e3*e-1e3*s)/1e3;for(const e in i)Vr.indexOf(e)>Vr.indexOf(o)&&Zr(this.matrix,i,e,t,o)}else ci(i[o])&&(n[o]=i[o]);for(const e in n)0!==n[e]&&(t[r]+=e===r?n[e]:n[e]/this.matrix[r][e]);return jr(this,{values:t},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return jr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const i of Vr)if(t=this.values[i],n=e.values[i],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const Ur="Invalid Interval";class Yr{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new sn("need to specify a reason the Interval is invalid");const n=e instanceof Ji?e:new Ji(e,t);if(li.throwOnInvalid)throw new tn(n);return new Yr({invalid:n})}static fromDateTimes(e,t){const n=qo(e),i=qo(t),r=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Yr.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(qo).filter((e=>this.contains(e))).sort(),n=[];let{s:i}=this,r=0;for(;i+this.e?this.e:e;n.push(Yr.fromDateTimes(i,o)),i=o,r+=1}return n}splitBy(e){const t=Xr.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:i}=this,r=1;const o=[];for(;ie*r)));n=+e>+this.e?this.e:e,o.push(Yr.fromDateTimes(i,n)),i=n,r+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:Yr.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Yr.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const i=[],r=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),o=Array.prototype.concat(...r).sort(((e,t)=>e.time-t.time));for(const e of o)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!=+e.time&&i.push(Yr.fromDateTimes(t,e.time)),t=null);return Yr.merge(i)}difference(...e){return Yr.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ur}toLocaleString(e=hn,t={}){return this.isValid?Yi.create(this.s.loc.clone(t),e).formatInterval(this):Ur}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ur}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ur}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ur}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ur}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Xr.invalid(this.invalidReason)}mapEndpoints(e){return Yr.fromDateTimes(e(this.s),e(this.e))}}class Jr{static hasDST(e=li.defaultZone){const t=Qo.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Wn.isValidZone(e)}static normalizeZone(e){return ei(e,li.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||Jn.create(t,n,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||Jn.create(t,n,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Jn.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Jn.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Jn.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Jn.create(t,null,"gregory").eras(e)}static features(){return{relative:di()}}}function Kr(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Xr.fromMillis(i).as("days"))}function Qr(e,t,n,i){let[r,o,s,a]=function(e,t,n){const i=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Kr(e,t);return(n-n%7)/7}],["days",Kr]],r={},o=e;let s,a;for(const[l,u]of i)n.indexOf(l)>=0&&(s=l,r[l]=u(e,t),a=o.plus(r),a>t?(r[l]--,e=o.plus(r)):e=a);return[e,r,a,s]}(e,t,n);const l=t-r,u=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===u.length&&(s0?Xr.fromMillis(l,i).shiftTo(...u).plus(c):c}const qr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},eo={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},to=qr.hanidec.replace(/[\[|\]]/g,"").split("");function no({numberingSystem:e},t=""){return new RegExp(`${qr[e||"latn"]}${t}`)}function io(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&i<=r&&(t+=i-n)}}return parseInt(t,10)}return t}(e))}}const ro=`[ ${String.fromCharCode(160)}]`,oo=new RegExp(ro,"g");function so(e){return e.replace(/\./g,"\\.?").replace(oo,ro)}function ao(e){return e.replace(/\./g,"").replace(oo," ").toLowerCase()}function lo(e,t){return null===e?null:{regex:RegExp(e.map(so).join("|")),deser:([n])=>e.findIndex((e=>ao(n)===ao(e)))+t}}function uo(e,t){return{regex:e,deser:([,e,t])=>$i(e,t),groups:t}}function co(e){return{regex:e,deser:([e])=>e}}const ho={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let fo=null;function go(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=mo(Yi.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}function po(e,t,n){const i=go(Yi.parseFormat(n),e),r=i.map((t=>function(e,t){const n=no(t),i=no(t,"{2}"),r=no(t,"{3}"),o=no(t,"{4}"),s=no(t,"{6}"),a=no(t,"{1,2}"),l=no(t,"{1,3}"),u=no(t,"{1,6}"),c=no(t,"{1,9}"),h=no(t,"{2,4}"),d=no(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},g=(g=>{if(e.literal)return f(g);switch(g.val){case"G":return lo(t.eras("short",!1),0);case"GG":return lo(t.eras("long",!1),0);case"y":return io(u);case"yy":case"kk":return io(h,Ii);case"yyyy":case"kkkk":return io(o);case"yyyyy":return io(d);case"yyyyyy":return io(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return io(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return io(i);case"MMM":return lo(t.months("short",!0,!1),1);case"MMMM":return lo(t.months("long",!0,!1),1);case"LLL":return lo(t.months("short",!1,!1),1);case"LLLL":return lo(t.months("long",!1,!1),1);case"o":case"S":return io(l);case"ooo":case"SSS":return io(r);case"u":return co(c);case"uu":return co(a);case"uuu":case"E":case"c":return io(n);case"a":return lo(t.meridiems(),0);case"EEE":return lo(t.weekdays("short",!1,!1),1);case"EEEE":return lo(t.weekdays("long",!1,!1),1);case"ccc":return lo(t.weekdays("short",!0,!1),1);case"cccc":return lo(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return uo(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return uo(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return co(/[a-z_+-/]{1,256}?/i);default:return f(g)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return g.token=e,g}(t,e))),o=r.find((e=>e.invalidReason));if(o)return{input:t,tokens:i,invalidReason:o.invalidReason};{const[e,n]=function(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"");return[`^${t}$`,e]}(r),o=RegExp(e,"i"),[s,a]=function(e,t,n){const i=e.match(t);if(i){const e={};let t=1;for(const r in n)if(gi(n,r)){const o=n[r],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(e[o.token.val[0]]=o.deser(i.slice(t,t+s))),t+=s}return[i,e]}return[i,{}]}(t,o,n),[l,u,c]=a?function(e){let t,n=null;ui(e.z)||(n=Wn.create(e.z)),ui(e.Z)||(n||(n=new Qn(e.Z)),t=e.Z),ui(e.q)||(e.M=3*(e.q-1)+1),ui(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),ui(e.u)||(e.S=wi(e.u));const i=Object.keys(e).reduce(((t,n)=>{const i=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(t[i]=e[n]),t}),{});return[i,n,t]}(a):[null,null,void 0];if(gi(a,"a")&&gi(a,"H"))throw new rn("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:o,rawMatches:s,matches:a,result:l,zone:u,specificOffset:c}}}function mo(e,t){if(!e)return null;return Yi.create(t,e).formatDateTimeParts((fo||(fo=Qo.fromMillis(1555555555555)),fo)).map((t=>function(e,t){const{type:n,value:i}=e;if("literal"===n)return{literal:!0,val:i};const r=t[n];let o=ho[n];return"object"==typeof o&&(o=o[r]),o?{literal:!1,val:o}:void 0}(t,e)))}const vo=[0,31,59,90,120,151,181,212,243,273,304,334],bo=[0,31,60,91,121,152,182,213,244,274,305,335];function yo(e,t){return new Ji("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function wo(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const r=i.getUTCDay();return 0===r?7:r}function Co(e,t,n){return n+(Si(e)?bo:vo)[t-1]}function So(e,t){const n=Si(e)?bo:vo,i=n.findIndex((e=>eRi(t)?(s=t+1,a=1):s=t,{weekYear:s,weekNumber:a,weekday:o,...Mi(e)}}function Ao(e){const{weekYear:t,weekNumber:n,weekday:i}=e,r=wo(t,1,4),o=xi(t);let s,a=7*n+i-r-3;a<1?(s=t-1,a+=xi(s)):a>o?(s=t+1,a-=xi(t)):s=t;const{month:l,day:u}=So(s,a);return{year:s,month:l,day:u,...Mi(e)}}function Eo(e){const{year:t,month:n,day:i}=e;return{year:t,ordinal:Co(t,n,i),...Mi(e)}}function Ro(e){const{year:t,ordinal:n}=e,{month:i,day:r}=So(t,n);return{year:t,month:i,day:r,...Mi(e)}}function Io(e){const t=hi(e.year),n=pi(e.month,1,12),i=pi(e.day,1,Ai(e.year,e.month));return t?n?!i&&yo("day",e.day):yo("month",e.month):yo("year",e.year)}function ko(e){const{hour:t,minute:n,second:i,millisecond:r}=e,o=pi(t,0,23)||24===t&&0===n&&0===i&&0===r,s=pi(n,0,59),a=pi(i,0,59),l=pi(r,0,999);return o?s?a?!l&&yo("millisecond",r):yo("second",i):yo("minute",n):yo("hour",t)}const $o="Invalid DateTime",Lo=864e13;function _o(e){return new Ji("unsupported zone",`the zone "${e.name}" is not supported`)}function To(e){return null===e.weekData&&(e.weekData=xo(e.c)),e.weekData}function Mo(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Qo({...n,...t,old:n})}function Oo(e,t,n){let i=e-60*t*1e3;const r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;const o=n.offset(i);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}function No(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Bo(e,t,n){return Oo(Ei(e),t,n)}function Fo(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o={...e.c,year:i,month:r,day:Math.min(e.c.day,Ai(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=Xr.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Ei(o);let[l,u]=Oo(a,n,e.zone);return 0!==s&&(l+=s,u=e.zone.offset(l)),{ts:l,o:u}}function Po(e,t,n,i,r,o){const{setZone:s,zone:a}=n;if(e&&0!==Object.keys(e).length){const i=t||a,r=Qo.fromObject(e,{...n,zone:i,specificOffset:o});return s?r:r.setZone(a)}return Qo.invalid(new Ji("unparsable",`the input "${r}" can't be parsed as ${i}`))}function Wo(e,t,n=!0){return e.isValid?Yi.create(Jn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Do(e,t){const n=e.c.year>9999||e.c.year<0;let i="";return n&&e.c.year>=0&&(i+="+"),i+=mi(e.c.year,n?6:4),t?(i+="-",i+=mi(e.c.month),i+="-",i+=mi(e.c.day)):(i+=mi(e.c.month),i+=mi(e.c.day)),i}function Go(e,t,n,i,r,o){let s=mi(e.c.hour);return t?(s+=":",s+=mi(e.c.minute),0===e.c.second&&n||(s+=":")):s+=mi(e.c.minute),0===e.c.second&&n||(s+=mi(e.c.second),0===e.c.millisecond&&i||(s+=".",s+=mi(e.c.millisecond,3))),r&&(e.isOffsetFixed&&0===e.offset&&!o?s+="Z":e.o<0?(s+="-",s+=mi(Math.trunc(-e.o/60)),s+=":",s+=mi(Math.trunc(-e.o%60))):(s+="+",s+=mi(Math.trunc(e.o/60)),s+=":",s+=mi(Math.trunc(e.o%60)))),o&&(s+="["+e.zone.ianaName+"]"),s}const Ho={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Vo={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},zo={ordinal:1,hour:0,minute:0,second:0,millisecond:0},jo=["year","month","day","hour","minute","second","millisecond"],Zo=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Xo=["year","ordinal","hour","minute","second","millisecond"];function Uo(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new on(e);return t}function Yo(e,t){const n=ei(t.zone,li.defaultZone),i=Jn.fromObject(t),r=li.now();let o,s;if(ui(e.year))o=r;else{for(const t of jo)ui(e[t])&&(e[t]=Ho[t]);const t=Io(e)||ko(e);if(t)return Qo.invalid(t);const i=n.offset(r);[o,s]=Bo(e,i,n)}return new Qo({ts:o,zone:n,loc:i,o:s})}function Jo(e,t,n){const i=!!ui(n.round)||n.round,r=(e,r)=>{e=Ci(e,i||n.calendary?0:2,!0);return t.loc.clone(n).relFormatter(n).format(e,r)},o=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return r(o(n.unit),n.unit);for(const e of n.units){const t=o(e);if(Math.abs(t)>=1)return r(t,e)}return r(e>t?-0:0,n.units[n.units.length-1])}function Ko(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}class Qo{constructor(e){const t=e.zone||li.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Ji("invalid input"):null)||(t.isValid?null:_o(t));this.ts=ui(e.ts)?li.now():e.ts;let i=null,r=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,r]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);i=No(this.ts,e),n=Number.isNaN(i.year)?new Ji("invalid input"):null,i=n?null:i,r=n?null:e}}this._zone=t,this.loc=e.loc||Jn.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}static now(){return new Qo({})}static local(){const[e,t]=Ko(arguments),[n,i,r,o,s,a,l]=t;return Yo({year:n,month:i,day:r,hour:o,minute:s,second:a,millisecond:l},e)}static utc(){const[e,t]=Ko(arguments),[n,i,r,o,s,a,l]=t;return e.zone=Qn.utcInstance,Yo({year:n,month:i,day:r,hour:o,minute:s,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const n=(i=e,"[object Date]"===Object.prototype.toString.call(i)?e.valueOf():NaN);var i;if(Number.isNaN(n))return Qo.invalid("invalid input");const r=ei(t.zone,li.defaultZone);return r.isValid?new Qo({ts:n,zone:r,loc:Jn.fromObject(t)}):Qo.invalid(_o(r))}static fromMillis(e,t={}){if(ci(e))return e<-Lo||e>Lo?Qo.invalid("Timestamp out of range"):new Qo({ts:e,zone:ei(t.zone,li.defaultZone),loc:Jn.fromObject(t)});throw new sn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ci(e))return new Qo({ts:1e3*e,zone:ei(t.zone,li.defaultZone),loc:Jn.fromObject(t)});throw new sn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=ei(t.zone,li.defaultZone);if(!n.isValid)return Qo.invalid(_o(n));const i=li.now(),r=ui(t.specificOffset)?n.offset(i):t.specificOffset,o=_i(e,Uo),s=!ui(o.ordinal),a=!ui(o.year),l=!ui(o.month)||!ui(o.day),u=a||l,c=o.weekYear||o.weekNumber,h=Jn.fromObject(t);if((u||s)&&c)throw new rn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new rn("Can't mix ordinal dates with month/day");const d=c||o.weekday&&!u;let f,g,p=No(i,r);d?(f=Zo,g=Vo,p=xo(p)):s?(f=Xo,g=zo,p=Eo(p)):(f=jo,g=Ho);let m=!1;for(const e of f){ui(o[e])?o[e]=m?g[e]:p[e]:m=!0}const v=d?function(e){const t=hi(e.weekYear),n=pi(e.weekNumber,1,Ri(e.weekYear)),i=pi(e.weekday,1,7);return t?n?!i&&yo("weekday",e.weekday):yo("week",e.week):yo("weekYear",e.weekYear)}(o):s?function(e){const t=hi(e.year),n=pi(e.ordinal,1,xi(e.year));return t?!n&&yo("ordinal",e.ordinal):yo("year",e.year)}(o):Io(o),b=v||ko(o);if(b)return Qo.invalid(b);const y=d?Ao(o):s?Ro(o):o,[w,C]=Bo(y,r,n),S=new Qo({ts:w,zone:n,o:C,loc:h});return o.weekday&&u&&e.weekday!==S.weekday?Qo.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${S.toISO()}`):S}static fromISO(e,t={}){const[n,i]=function(e){return er(e,[Rr,Lr],[Ir,_r],[kr,Tr],[$r,Mr])}(e);return Po(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,i]=function(e){return er(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[yr,wr])}(e);return Po(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,i]=function(e){return er(e,[Cr,Ar],[Sr,Ar],[xr,Er])}(e);return Po(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(ui(e)||ui(t))throw new sn("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:r=null}=n,o=Jn.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),[s,a,l,u]=function(e,t,n){const{result:i,zone:r,specificOffset:o,invalidReason:s}=po(e,t,n);return[i,r,o,s]}(o,e,t);return u?Qo.invalid(u):Po(s,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return Qo.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,i]=function(e){return er(e,[Nr,Lr],[Br,Fr])}(e);return Po(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new sn("need to specify a reason the DateTime is invalid");const n=e instanceof Ji?e:new Ji(e,t);if(li.throwOnInvalid)throw new en(n);return new Qo({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=mo(e,Jn.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return go(Yi.parseFormat(e),Jn.fromObject(t)).map((e=>e.val)).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?To(this).weekYear:NaN}get weekNumber(){return this.isValid?To(this).weekNumber:NaN}get weekday(){return this.isValid?To(this).weekday:NaN}get ordinal(){return this.isValid?Eo(this.c).ordinal:NaN}get monthShort(){return this.isValid?Jr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Jr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Jr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Jr.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return Si(this.year)}get daysInMonth(){return Ai(this.year,this.month)}get daysInYear(){return this.isValid?xi(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ri(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:i}=Yi.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(Qn.instance(e),t)}toLocal(){return this.setZone(li.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=ei(e,li.defaultZone)).equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[i]=Bo(n,t,e)}return Mo(this,{ts:i,zone:e})}return Qo.invalid(_o(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Mo(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_i(e,Uo),n=!ui(t.weekYear)||!ui(t.weekNumber)||!ui(t.weekday),i=!ui(t.ordinal),r=!ui(t.year),o=!ui(t.month)||!ui(t.day),s=r||o,a=t.weekYear||t.weekNumber;if((s||i)&&a)throw new rn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new rn("Can't mix ordinal dates with month/day");let l;n?l=Ao({...xo(this.c),...t}):ui(t.ordinal)?(l={...this.toObject(),...t},ui(t.day)&&(l.day=Math.min(Ai(l.year,l.month),l.day))):l=Ro({...Eo(this.c),...t});const[u,c]=Bo(l,this.o,this.zone);return Mo(this,{ts:u,o:c})}plus(e){if(!this.isValid)return this;return Mo(this,Fo(this,Xr.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Mo(this,Fo(this,Xr.fromDurationLike(e).negate()))}startOf(e){if(!this.isValid)return this;const t={},n=Xr.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){const e=Math.ceil(this.month/3);t.month=3*(e-1)+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Yi.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):$o}toLocaleString(e=hn,t={}){return this.isValid?Yi.create(this.loc.clone(t),e).formatDateTime(this):$o}toLocaleParts(e={}){return this.isValid?Yi.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const o="extended"===e;let s=Do(this,o);return s+="T",s+=Go(this,o,t,n,i,r),s}toISODate({format:e="extended"}={}){return this.isValid?Do(this,"extended"===e):null}toISOWeekDate(){return Wo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:r=!1,format:o="extended"}={}){if(!this.isValid)return null;return(i?"T":"")+Go(this,"extended"===o,t,e,n,r)}toRFC2822(){return Wo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Wo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Do(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),Wo(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():$o}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Xr.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},r=(a=t,Array.isArray(a)?a:[a]).map(Xr.normalizeUnit),o=e.valueOf()>this.valueOf(),s=Qr(o?this:e,o?e:this,r,i);var a;return o?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(Qo.now(),e,t)}until(e){return this.isValid?Yr.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=n&&n<=i.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Qo.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf()),Math.min)}static max(...e){if(!e.every(Qo.isDateTime))throw new sn("max requires all arguments be DateTimes");return fi(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:i=null,numberingSystem:r=null}=n;return po(Jn.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return Qo.fromFormatExplain(e,t,n)}static get DATE_SHORT(){return hn}static get DATE_MED(){return dn}static get DATE_MED_WITH_WEEKDAY(){return fn}static get DATE_FULL(){return gn}static get DATE_HUGE(){return pn}static get TIME_SIMPLE(){return mn}static get TIME_WITH_SECONDS(){return vn}static get TIME_WITH_SHORT_OFFSET(){return bn}static get TIME_WITH_LONG_OFFSET(){return yn}static get TIME_24_SIMPLE(){return wn}static get TIME_24_WITH_SECONDS(){return Cn}static get TIME_24_WITH_SHORT_OFFSET(){return Sn}static get TIME_24_WITH_LONG_OFFSET(){return xn}static get DATETIME_SHORT(){return An}static get DATETIME_SHORT_WITH_SECONDS(){return En}static get DATETIME_MED(){return Rn}static get DATETIME_MED_WITH_SECONDS(){return In}static get DATETIME_MED_WITH_WEEKDAY(){return kn}static get DATETIME_FULL(){return $n}static get DATETIME_FULL_WITH_SECONDS(){return Ln}static get DATETIME_HUGE(){return _n}static get DATETIME_HUGE_WITH_SECONDS(){return Tn}}function qo(e){if(Qo.isDateTime(e))return e;if(e&&e.valueOf&&ci(e.valueOf()))return Qo.fromJSDate(e);if(e&&"object"==typeof e)return Qo.fromObject(e);throw new sn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var es={isEllipsisActive:function(e){return e.offsetWidth>n&1)}),e)}),0).toString():""},formatOption:function(e,t){return void 0!==t?{label:e,value:t}:{label:e,value:e}},isEmpty:function(e){return null==e||e===mt||Array.isArray(e)&&!e.length||"[object Number]"===Object.prototype.toString.call(e)&&isNaN(e)||"object"==typeof e&&!Object.keys(e).length&&"[object Date]"!==Object.prototype.toString.call(e)},isString:function(e){return"string"==typeof e||e instanceof String},isObject:function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},insensitiveSort:function(e,t){return c([],u(e),!1).sort((function(e,n){return t?e[t].toLowerCase().localeCompare(n[t].toLowerCase()):e.toLowerCase().localeCompare(n.toLowerCase())}))},range:function(e,t,n){void 0===n&&(n=1);var i=e;t||(t=i,i=0);for(var r=[],o=i;o0?1:0)}),0)})).join(".")},formatStringOption:function(e){return{label:e,value:e}},parseParamsToQuery:function(e){return e?Object.entries(e).reduce((function(e,t){var n=u(t,2),i=n[0],r=n[1];return Array.isArray(r)?r.forEach((function(t){t&&e.append(i,t)})):es.isObject(r)?Object.entries(r).forEach((function(t){var n=u(t,2),r=n[0],o=n[1];e.append("".concat(i,"[").concat(r,"]"),o)})):es.isEmpty(r)||e.append(i,r),e}),new URLSearchParams):{}},dispatchCustomEvent:function(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))},isNumber:function(e){try{return!isNaN(e)}catch(e){return!1}},stringSort:function(e,t,n){var i=[e.values[n],t.values[n]],r=i[0]||mt,o=i[1]||mt;if(es.isNumber(r)&&es.isNumber(o)){if(es.isEmpty(r))return 1;if(es.isEmpty(o))return-1;var s=parseFloat(r),a=parseFloat(o);return s===a?0:s>a?1:-1}if(es.isIp(r)||es.isIp(o))return es.isEmpty(r)?1:es.isEmpty(o)?-1:Number(r.split(".").map((function(e){return"000".concat(e).slice(-3)})).join(""))-Number(o.split(".").map((function(e){return"000".concat(e).slice(-3)})).join(""));if(!es.isString(r)||!es.isString(o)){if(Array.isArray(r)&&Array.isArray(o)){if(r=r.length,o=o.length,!r)return 1;if(!o)return-1}return r===o?0:r>o?1:-1}return r.length?o.length?Intl.Collator(void 0,{numeric:!0}).compare(r,o):-1:1},isIp:function(e){if(!es.isString(e))return!1;if(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(e)){return e.split(".").reduce((function(e,t){var n=parseInt(t,10);return e&&n>=0&&n<256}))}return!1},formatBytes:function(e,t){if(void 0===t&&(t=2),0===e)return{value:0,text:"Bytes"};var n=e<0;n&&(e*=-1);var i=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1e3));return{value:((n?-1*e:e)/Math.pow(1e3,r)).toFixed(i),text:"".concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r])}},formatBytesToString:function(e,t){if(es.isEmpty(e))return null;var n=es.formatBytes(e,t),i=n.value,r=n.text;return"".concat(i," ").concat(r)},getTimeDiffObject:function(e){return Qo.fromISO(e).diffNow(["days","hours","minutes"]).toObject()},getTimeDiffString:function(e,t){if(void 0===t&&(t=!1),!e)return mt;var n=es.getTimeDiffObject(e),i="";return["days","hours","minutes"].forEach((function(e){(!t||t&&""===i&&n[e])&&(i=n[e]<0?"".concat(i," ").concat(-1*Math.round(n[e])).concat(e.charAt(0)):"".concat(i," ").concat(Math.round(n[e])).concat(e.charAt(0)))})),i.trim()||"0m"},formatISODate:function(e,t,n,i){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===i&&(i=!0),"".concat(Qo.fromISO(e).toLocaleString({year:"2-digit",month:"2-digit",day:"2-digit"})," ").concat(i?Qo.fromISO(e).toLocaleString(a(a(a({hour:"2-digit",minute:"2-digit"},n&&{second:"2-digit"}),t&&n&&{fractionalSecondDigits:3}),{hourCycle:"h23"})):mt)},formatDate:function(e,t,n,i){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===i&&(i=!0),e instanceof Qo||"DateTime"===Object.getPrototypeOf(e).constructor.name?es.formatISODate(e.toISO(),n,t,i):"Not Valid DateTime Object"}};function ts(e){"."===e.key||"ArrowRight"===e.key?(es.goToNextInput(),e.preventDefault()):"ArrowLeft"===e.key&&(es.goToPreviousInput(),e.preventDefault())}function ns(e){"."===e.key||"ArrowRight"===e.key?(es.goToNextInput(),e.preventDefault()):"ArrowLeft"===e.key&&(es.goToPreviousInput(),e.preventDefault())}function is(e){"."===e.key||"ArrowRight"===e.key?(es.goToNextInput(),e.preventDefault()):"ArrowLeft"===e.key&&(es.goToPreviousInput(),e.preventDefault())}var rs={},os={},ss={exports:{}};!function(e,t){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"==typeof t){var r=o(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;an.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>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);o0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n=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]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i,r=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){ /* * based on code from: * @@ -12,7 +12,7 @@ f=p,function(){var e={}.hasOwnProperty;function t(){for(var n=[],i=0;i1&&(r=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l=function(t,n){return"ace/theme/textmate"==t?n(null,e("./theme/textmate")):console.error("loader is not configured")};t.setLoader=function(e){l=e},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch(e){}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){l(n,(function(e,i){t._emit("load.module",{name:n,module:i});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.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(){})};t.version="1.14.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||"undefined"!=typeof window&&window}();function o(t){if(r&&r.document){i.set("packaged",t||e.packaged||n.packaged||r.define&&(void 0).packaged);for(var o,s={},a="",l=document.currentScript||document._currentScript,c=(l&&l.ownerDocument||document).getElementsByTagName("script"),u=0;u1&&(r=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l=function(t,n){return"ace/theme/textmate"==t?n(null,e("./theme/textmate")):console.error("loader is not configured")};t.setLoader=function(e){l=e},t.$loading={},t.loadModule=function(n,i){var o,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{o=e(n)}catch(e){}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){l(n,(function(e,i){t._emit("load.module",{name:n,module:i});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return a();r.loadScript(t.moduleUrl(n,s),a),u()}};var u=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"),u=function(){})};t.version="1.14.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||"undefined"!=typeof window&&window}();function o(t){if(r&&r.document){i.set("packaged",t||e.packaged||n.packaged||r.define&&(void 0).packaged);for(var o,s={},a="",l=document.currentScript||document._currentScript,u=(l&&l.ownerDocument||document).getElementsByTagName("script"),c=0;c1?++h>4&&(h=1):h=1,o.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!s||(h=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[h-1]||600),1==h&&(a=e.clientX,l=e.clientY)}if(e._clicks=h,i[r]("mousedown",e),h>4)h=0;else if(h>1)return i[r](d[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",f,s)}))};var d=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=d(t);if(!o.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==s[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===l){t.timeStamp-a<50&&(s.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function g(){s=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[d(e)]},t.addCommandKeyListener=function(e,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;u(e,"keydown",(function(e){r=e.keyCode}),i),u(e,"keypress",(function(e){return f(n,e,r)}),i)}else{var a=null;u(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),u(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),u(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(g(),u(window,"focus",g))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var p=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+p++,r=function(o){o.data==i&&(t.stopPropagation(o),h(n,"message",r),e())};u(n,"message",r),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.rowDate.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(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,c=r.isIE,u=r.isChrome>63,h=400,d=e("../lib/keys"),f=d.KEY_MODS,g=r.isIOS,p=g?/\s/:/\n/,m=r.isMobile;t.TextInput=function(e,t){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",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,w=!1,C="";m||(n.style.fontSize="1px");var S=!1,x=!1,A="",R=0,I=0,E=0;try{var k=document.activeElement===n}catch(e){}this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role)},this.setAriaOptions({role:"textbox"}),i.addListener(n,"blur",(function(e){x||(t.onBlur(e),k=!1)}),t),i.addListener(n,"focus",(function(e){if(!x){if(k=!0,r.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),r.isEdge?setTimeout($):$()}}),t),this.$focusScroll=!1,this.focus=function(){if(C||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var r=n.parentElement;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}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return k},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);y&&r&&(A=n.value="",G()),$()}}));var $=g?function(e){if(k&&(!v||e)&&!w){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=A=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==R&&I==r||n.setSelectionRange(4,r),R=4,I=r}}:function(){if(!y&&!w&&(k||L)){y=!0;var e=0,i=0,r="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,i=s.end.column,r=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.rowa+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,e+=1);r.length>h&&(e0&&A[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&A.length-d>R-1&&A[A.length-d]==e[e.length-d];)d++,l--;u-=d-1,h-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!(i||c||u||a||l||h))return"";w=!0;var g=!1;return r.isAndroid&&". "==c&&(c=" ",g=!0),c&&!a&&!l&&!u&&!h||S?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),w=!1,A=e,R=o,I=s,E=h,g?"\n":c},M=function(e){if(y)return W();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=T(i,!0);(i.length>500||p.test(r)||m&&R<1&&R==I)&&$()},O=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return O(e,t,!0)}}},N=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);O(e,o)?(g&&($(o),v=o,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,$(),r?t.onCut():t.onCopy()})))},B=function(e){N(e,!0)},P=function(e){N(e,!1)},F=function(e){var o=O(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout($),i.preventDefault(e)):(n.value="",b=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){y||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=A.length&&e.value===A&&A&&e.selectionEnd!==I}(n)?m&&n.selectionStart!=R&&$():(t.selectAll(),$()))}),t),i.addListener(n,"input",M,t),i.addListener(n,"cut",B,t),i.addListener(n,"copy",P,t),i.addListener(n,"paste",F,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:P(e);break;case 86:F(e);break;case 88:B(e)}}),t);var W=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(S)return H();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;T(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+I-y.selectionStart+E)}}},G=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",H),e&&M())};function H(){x=!0,n.blur(),n.focus(),x=!1}var D,V=s.delayedCall(W,50).schedule.bind(null,null);function z(){clearTimeout(D),D=setTimeout((function(){C&&(n.style.cssText=C,C=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!S)){e.data&&(y.useTextareaForIME=!1),setTimeout(W,0),t._signal("compositionStart"),t.on("mousedown",H);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,y.markerRange=i,y.selectionStart=R,t.onCompositionStart(y),y.useTextareaForIME?(A=n.value="",R=0,I=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",W,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthI&&"\n"==A[o]?s=d.end:iI&&A.slice(0,o).split("\n").length>2?s=d.down:o>I&&" "==A[o-1]?(s=d.right,a=f.option):(o>I||o==I&&I!=R&&i==o)&&(s=d.right),i!==o&&(a|=f.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=d.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}R=i,I=o,$("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.$setUserAgentForTests=function(e,t){m=e,g=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.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 e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){e("./lib/oop");var i=e("./lib/dom"),r="ace_tooltip";function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(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(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,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),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.off("mousewheel",u))}function h(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();r&&e.$tooltipFollowsMouse&&h(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i){r=i.text.join("
"),c.setHtml(r);var d=i.className;if(d&&c.setClassName(d.trim()),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var f=n.domEvent.target.getBoundingClientRect(),g=c.getElement().style;g.left=f.right+"px",g.top=f.bottom+"px"}}}():u()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),s),s.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.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 e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.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(e,t,n){var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,h,d,f,g,p,m,v,b=t.container,y=0;function w(){var e=d;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!m||r||o?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};u/o<=2&&(d.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(d):p=i:p=null}(d,e)}function C(){h=t.selection.toOrientedRange(),s=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),y=0,r.addListener(document,"mousemove",A)}function S(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(h),t.isFocused()&&!g&&t.$resetCursorStyle(),h=null,d=null,y=0,p=null,m=null,r.removeListener(document,"mousemove",A)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;f||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&R(e.dataTransfer))return l=e.clientX,c=e.clientY,s||C(),y++,e.dataTransfer.dropEffect=f=I(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&R(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(C(),y++),null!==x&&(x=null),e.dataTransfer.dropEffect=f=I(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return S(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(g)switch(f){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:t.moveText(h,d);break;case"copy":h=t.moveText(h,d,!0)}else{var i=n.getData("Text");h={start:d,end:t.session.insert(d,i)},t.focus(),f=null}return S(),r.preventDefault(e)}},r.addListener(b,"dragstart",this.onDragStart.bind(e),t),r.addListener(b,"dragend",this.onDragEnd.bind(e),t),r.addListener(b,"dragenter",this.onDragEnter.bind(e),t),r.addListener(b,"dragover",this.onDragOver.bind(e),t),r.addListener(b,"dragleave",this.onDragLeave.bind(e),t),r.addListener(b,"drop",this.onDrop.bind(e),t);var x=null;function A(){null==x&&(x=setTimeout((function(){null!=x&&s&&S()}),20))}function R(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function I(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,f,g="scroll",p=0,m=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r,s,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,r=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void f.replaceChild(o.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["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);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){f||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left1)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var y=r[0],w=y.clientX,C=y.clientY;Math.abs(n-w)+Math.abs(s-C)>o&&(a=-1),n=e.clientX=w,s=e.clientY=C,v=b=0;var x=new i(e,t);if(h=x.getDocumentPosition(),f-a<500&&1==r.length&&!p)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=m>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{m=0;var A=t.selection.cursor,R=t.selection.isEmpty()?A:t.selection.anchor,I=t.renderer.$cursorLayer.getPixelPosition(A,!0),E=t.renderer.$cursorLayer.getPixelPosition(R,!0),k=t.renderer.scroller.getBoundingClientRect(),$=t.renderer.layerConfig.offset,_=t.renderer.scrollLeft,L=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientXM?"cursor":"anchor"),g=M<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(S,450)}a=f}),t),r.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==g?(g="",p=0):c?(t.selection.moveToPosition(h),p=0,w()):"scroll"==g?(p+=60,u=setInterval((function(){p--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),p<20&&(v*=.9),p<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(p=0)}),10),C()):w(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==g)){var o=r[0],a=n-o.clientX,u=s-o.clientY;if("wait"==g){if(!(a*a+u*u>4))return e.preventDefault();g="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==g){var f=new i(e,t);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)=e){for(o=h+1;o=e;)o++;for(a=h,l=o-1;a=t.length||2!=(l=n[r-1])&&3!=l||2!=(c=t[r+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(o)return 4;for(f=r+1,d=t.length;f=1425&&p<=2303||64286==p;if(l=t[f],m&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return o=!1,s=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case h:return 4}}function m(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:d[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?f[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var d=e.split(""),f=new Array(d.length),v=new Array(d.length),b=[];i=u?1:0,function(e,t,n,u){var h=i?c:l,d=null,f=null,g=null,v=0,b=null,y=-1,w=null,C=null,S=[];if(!u)for(w=0,u=[];w0)if(16==b){for(w=y;w-1){for(w=y;w=0&&8==u[x];x--)t[x]=i}}(d,b,d.length,n);for(var y=0;y7&&n[y]<13||4===n[y]||n[y]===h)?b[y]=t.ON_R:y>0&&"ل"===d[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[y])&&(b[y-1]=b[y]=t.R_H,y++);d[d.length-1]===t.DOT&&(b[d.length-1]=t.B),"‫"===d[0]&&(b[0]=t.RLE);for(y=0;y=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var a=0;at&&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(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+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?(e0&&r[i-1]%2==0&&r[i]%2!=0?t=1+(e>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?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._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(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},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(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),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(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},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(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?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(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,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(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(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!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;ru){var v=e.substring(u,m-p.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var b=0;br){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-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 e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},g=function(e){this.add("braces","insertion",(function(t,n,r,o,s){var l=r.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==s){d(r);var u=r.getSelectionRange(),h=o.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return f(u,h,"{","}");if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||e&&e.braces?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(r),"}"==c.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&g.isAutoInsertedClosing(l,c,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(r);var p="";if(g.isMaybeInsertedClosing(l,c)&&(p=a.stringRepeat("}",i.maybeInsertedBrackets),g.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!p)return void g.clearMaybeInsertedClosing();v=this.$getIndent(c)}var b=v+o.getTabString();return{text:"\n"+b+"\n"+v+p,selection:[1,b.length,1,b.length]}}g.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,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);if(")"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,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);if("]"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,n,i,r){var o=i.$mode.$quotes||h;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(),u=i.doc.getLine(c.row),g=u.substring(c.column-1,c.column),p=u.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 b,y=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(p==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var C=i.$mode.tokenRe;C.lastIndex=0;var S=C.test(g);C.lastIndex=0;var x=C.test(g);if(S||x)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;var A=u[c.column-2];if(g==s&&(A==s||C.test(A)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||h,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}))};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,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(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.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(e,t,n){var r=e.getCursorPosition(),o=t.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(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.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),t.CstyleBehaviour=g})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){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;s2?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(e,t){y(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},g),r.insertInLine({row:t,column:a},f))},b=function(e,t){var n;(n=e.match(m))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&r.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(p.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(C=e.length)})),a==1/0&&(a=C,o=!1,s=!1),u&&a%c!=0&&(a=Math.floor(a/c)*c),w(s?b:v)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o=(p=new c(t,i.row,i.column)).getCurrentToken();t.selection;var s,a,l=t.selection.toOrientedRange();if(o&&/comment/.test(o.type)){for(var h,d;o&&/comment/.test(o.type);){if(-1!=(m=o.value.indexOf(r.start))){var f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;h=new u(f,g,f,g+r.start.length);break}o=p.stepBackward()}var p;for(o=(p=new c(t,i.row,i.column)).getCurrentToken();o&&/comment/.test(o.type);){var m;if(-1!=(m=o.value.indexOf(r.end))){f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;d=new u(f,g,f,g+r.end.length);break}o=p.stepForward()}d&&t.remove(d),h&&(t.remove(h),s=h.start.row,a=-r.start.length)}else a=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=a),l.end.row==s&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+o,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),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(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<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(e,t,n){var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[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(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||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(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang");e("./lib/oop");var r=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&((u=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map((function(e){return new r(c,e.offset,c,e.offset+e.length)})),this.cache[c]=u.length?u:"");for(var h=u.length;h--;){var d=u[h].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,d,this.clazz,o))}}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort((function(e,t){return i(e.start,t.start)}));for(var n,r=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;si)break;if(u.start.row==i&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&su.start.column&&u.end.column==o[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-r,c=t.column-n.column;sr)break;u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>r&&(u.end.row+=l),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>r&&(u.start.row+=l)}if(0!=l&&s=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(e){n.addSubFold(e)})));for(var g=0;g0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);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!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(tu)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=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>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(i);if(s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(i)),!s)return null;var a=new r(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new r(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.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)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.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)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,o=t.value,s=0,a=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!c){var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(i=t.value))if("<"===n.value)s++;else if(""!==t.value)return;var f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===t.value&&--s<0)f=d=h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&s>=0);if(a&&u&&h&&f&&l&&d)return{openTag:new r(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new r(h.start.row,h.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,o=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);e.stepForward();var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++o>0){var d=new r(s,a,s,l),f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var p=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=e.stepBackward(),p++}for(var v=0;vn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.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(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;se&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;ls){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,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(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(p=this.getFoldLine(r.row)){p.addRemoveChars(r.row,r.column,i.column-r.column),p.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==p&&(h.merge(p),p=h),u=c.indexOf(p)+1}for(;u=r.row&&p.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);c=this.$foldData,u=0;if(p=this.getFoldLine(o)){var g=p.range.compareInside(i.row,i.column);0==g?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(s,0,r.column-i.column)):-1==g&&(p.addRemoveChars(o,0,r.column-i.column),p.shiftRow(a)),u=c.indexOf(p)+1}for(;u=o&&p.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(o))&&p.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=i<=Math.max(2*r,8)||!1===u?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;ii-f;){var g=a+i-f;if(n[g-1]>=10&&n[g]>=10)d(g);else if(n[g]!=e&&n[g]!=t){for(var p=Math.max(g-(i-(i>>2)),a-1);g>p&&n[g]p&&n[g]p&&9==n[g];)g--}else for(;g>p&&n[g]<10;)g--;g>p?d(++g):(2==n[g=a+i]&&g--,d(g-f))}else{for(;g!=a-1&&n[g]!=e;g--);if(g>a){d(g);continue}for(g=a+i;g39&&s<48||s>57&&s<64?r.push(9):s>=4352&&n(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),i=i||0,o=0;o=4352&&n(r)?i+=2:i+=1,!(i>t));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[u],o=this.$docRowCache[u];var d=e>c[h-1]}else d=!h;for(var f=this.getLength()-1,g=this.getNextFoldLine(o),p=g?g.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>p&&(o=g.end.row+1,p=(g=this.getNextFoldLine(o,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<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),g=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(r=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),g?g.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],r=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var g="";d&&a>=f?(g=this.getFoldDisplayLine(d,e,t),o=d.start.row):(g=this.getLine(e).substring(0,t),o=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;g.length>=m[v];)r++,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&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:p+this.$getStringScreenWidth(g)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);ir&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;an);o++);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=n}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),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(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,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(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;dp||(s.push(l=new o(h,p,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;vC&&s[d].end.row==S;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,r,o){var s=i?t-u+1:t;if(!(s<0||s+u>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&lr))return!!o(s,l,s+u-1,h)||void 0}}};else if(i)h=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(r(t,h,t,h+(c=a[u])))return!0}};else h=function(t,i,r){var o,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(r(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;ri)break}s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._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(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.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(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.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(e){e.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(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.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(e){e.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(e){e.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(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.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(e){e.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(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.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(e){e.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(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.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(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,f=e("./search").Search,g=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),C=function(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++C.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new d("")),b.resetOptions(this),n&&this.setOptions(n),b._signal("editor",this)};C.$uid=0,function(){r.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.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)}"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(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;b.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.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=e.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(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,r);if(!o){var s=new y(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(o=[a.openTagName,a.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==g.comparePoints(o[0].end,o[1].start)?o=[g.fromPoints(o[0].start,o[1].end)]:0==g.comparePoints(o[0].start,o[1].end)&&(o=[g.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.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 e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.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(e){this.renderer.updateText(),this._emit("changeMode",e)},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 e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new g(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var r=this.getSelectionRange();e=r.start.row,t=r.end.row}for(var o,s,a,l="",c="",u="",h=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=i.getNextLineIndent(l,c,h)),o=n.getLine(d),u!==(s=i.$getIndent(o))&&(s.length>0&&(a=new g(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),i.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),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 e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new g(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,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=a&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var u,h=this.$toggleWordPairs,d=0;d=l&&s<=c&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){a=d.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a},this.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){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,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;uf+1)break;f=g.last}for(u--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&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(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.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(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,u={},h=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h1?u[s.value]++:"=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&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(e){e.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(e){if(e){var t,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&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;b.loadModule("./ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(C.prototype),b.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){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(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=C})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!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),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},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(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,o=r.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var i=0;i=0?d(e,t,-1):(o(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?d(t,e,-1):(o(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=g(e,t.start)),o(e.end,t.end)>0&&(a=g(e,t.end)),f(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function g(e,t){var n=e.lines,i=e.end;e.end=s(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:i,lines:o,action:e.action}}function p(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;ro&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===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 e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,o,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,h=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=g&&this.$cursorRow<=n.end.row)&&(p+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[r]&&(p+=u[r]),h[r]&&(p+=h[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&&rn.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){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=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.id?4:0)|(c==l?8:0)),r,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(t.end.row,i);var u=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(r||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),t.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(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.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.MAX_CHUNK_LENGTH=250,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)for(;s0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":(c.className="ace_line",c.setAttribute("role","option")),i.push(l),o++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderTokenInChunks=function(e,t,n,i){for(var r,o=0;o=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;or[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(o=t.row+1;o0)for(var i=0;i=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row=s;)a=this.$renderTokenInChunks(l,a,u,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderTokenInChunks(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return void this.$renderOverflowMessage(e,n,r,o);n=this.$renderTokenInChunks(e,n,r,o)}}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderTokenInChunks(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"":"",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,i,o);r=e.lastChild}else{r=e;this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);on?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),r=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.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(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].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(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},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 e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!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 t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;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(e){e!=this.overwrite&&(this.overwrite=e,e?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),t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){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),e.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(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.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 e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}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(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var u=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(u,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=u,t.VScrollBar=c,t.HScrollBar=u})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(e){this.element=r.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,this.parent=e,this.width=this.VScrollWidth,this.renderer=t,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,r=t.clientY,s=this.thumbTop;o.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(s+i-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t>>=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=t};i.inherits(c,a),function(){this.classSuffix="-h",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,r=t.clientX,s=this.thumbLeft;o.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(s+i-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t>>=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},this.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),t.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(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,u=200,h=t.FontMetrics=function(e,t){this.charCount=t||250,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),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",this.charCount),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t=(e=e||this.$measureNode).getBoundingClientRect(),n={height:t.height,width:t.width/this.charCount};return 0===n.width||0===n.height?null:n},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,this.charCount),this.$main.getBoundingClientRect().width/this.charCount},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},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 e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(i(h,l),i(h,c),i(r(l,c),r(h,a))),f=o(1+d[0],i(l,a)),g=o(1+d[1],i(c,a));if(t){var p=t,m=d[0]*p[0]/u+d[1]*p[1]/u+1,v=r(o(p[0],f),o(p[1],g));return r(o(1/m/u,v),a)}var b=i(e,a),y=n(i(f,o(d[0],b)),i(g,o(d[1],b)),b);return o(u,y)}}).call(h.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,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< .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,s=function(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)};(function(){r.implement(this,o),this.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var o=this.renderer.session.$foldData,s=0;sthis.canvasHeight&&(d=this.canvasHeight-this.halfMinDecorationHeight),u=Math.round(d-this.halfMinDecorationHeight),h=Math.round(d+this.halfMinDecorationHeight)}n.fillStyle=t[i[s].type]||null,n.fillRect(0,c,this.canvasWidth,h-u)}}var f=this.renderer.session.selection.getCursor();if(f){l=this.compensateFoldRows(f.row,o),c=Math.round((f.row-l)*this.lineHeight*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2)}},this.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n}}).call(s.prototype),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,g=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,v=e("./css/editor.css"),b=e("./layer/decorators").Decorator,y=e("./lib/useragent"),w=y.isIE;r.importCssString(v,"ace_editor.css",!1);var C=function(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==o.get("useStrictCSP")&&o.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container,this.$textLayer.MAX_CHUNK_LENGTH),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),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=!y.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(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(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.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(e){e?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(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(e,t,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&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,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 e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.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 e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:w?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(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"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 e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,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(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,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(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+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(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=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,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&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(e&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"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+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)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var f,g,p=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-p)/this.lineHeight)),b=v+m,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),f=e.documentToScreenRow(v,0),g=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+g,p=this.scrollTop-f*y;var C=0;return(this.layerConfig.width!=r||s)&&(C=this.CHANGE_H_SCROLL),(s||d)&&(C|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:p,gutterOffset:y?Math.max(0,Math.ceil((p+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),C},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*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(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),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(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((t+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(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?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(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.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 e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(h):h())}});u.setEmitSync=function(e){r=e};var h=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){u.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)h()})),u},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.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=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.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=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.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(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},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 e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.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(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search);var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),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)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},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 e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)b--;if(b>0)for(var y=0;i[y].isEmpty();)y++;for(var w=b;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var d=e("./editor").Editor;function f(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){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(e){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(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(s)for(;f>0&&u[f].start.row==u[f-1].end.row;)f--;d.fromOrientedRange(u[f]),d.index=f,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===g||(i=g),d.toOrientedRange(u[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,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 e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;is&&(s=n.column),iu?e.insert(i,l.stringRepeat(" ",o-u)):e.remove(new r(i.row,i.column,i.row,i.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,f=h==d;if(f){var g,p=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d0);h<0&&(h=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.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)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=f,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++tc){var f=e.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,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(e,t,n){var i=e("./lib/dom");function r(e){this.session=e,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(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;at[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$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,t.container.appendChild(a.el));var l=t.$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:t.gutterWidth;a.fixedWidth||(c-=t.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=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,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 s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.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=e.renderer.$cursorLayer.getPixelPosition(s).left;g.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.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(e,t,n){e("./loader_build")(t);var i=e("./lib/dom"),r=e("./lib/event"),o=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;a=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(a=e.textContent,e.innerHTML="");var u=t.createEditSession(a),h=new s(new c(e),u,n),d={document:u,editor:h,onResize:h.resize.bind(h,null)};return l&&(d.textarea=l),r.addListener(window,"resize",d.onResize),h.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),h.container.env=h.env=d,h},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new l),n},t.Range=o,t.Editor=s,t.EditSession=a,t.UndoManager=l,t.VirtualRenderer=c,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}(ln);var cn={exports:{}},un={exports:{}},hn={},dn="function"==typeof Symbol&&Symbol.for,fn=dn?Symbol.for("react.element"):60103,gn=dn?Symbol.for("react.portal"):60106,pn=dn?Symbol.for("react.fragment"):60107,mn=dn?Symbol.for("react.strict_mode"):60108,vn=dn?Symbol.for("react.profiler"):60114,bn=dn?Symbol.for("react.provider"):60109,yn=dn?Symbol.for("react.context"):60110,wn=dn?Symbol.for("react.async_mode"):60111,Cn=dn?Symbol.for("react.concurrent_mode"):60111,Sn=dn?Symbol.for("react.forward_ref"):60112,xn=dn?Symbol.for("react.suspense"):60113,An=dn?Symbol.for("react.suspense_list"):60120,Rn=dn?Symbol.for("react.memo"):60115,In=dn?Symbol.for("react.lazy"):60116,En=dn?Symbol.for("react.block"):60121,kn=dn?Symbol.for("react.fundamental"):60117,$n=dn?Symbol.for("react.responder"):60118,_n=dn?Symbol.for("react.scope"):60119;function Ln(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case fn:switch(e=e.type){case wn:case Cn:case pn:case vn:case mn:case xn:return e;default:switch(e=e&&e.$$typeof){case yn:case Sn:case In:case Rn:case bn:return e;default:return t}}case gn:return t}}}function Tn(e){return Ln(e)===Cn}hn.AsyncMode=wn,hn.ConcurrentMode=Cn,hn.ContextConsumer=yn,hn.ContextProvider=bn,hn.Element=fn,hn.ForwardRef=Sn,hn.Fragment=pn,hn.Lazy=In,hn.Memo=Rn,hn.Portal=gn,hn.Profiler=vn,hn.StrictMode=mn,hn.Suspense=xn,hn.isAsyncMode=function(e){return Tn(e)||Ln(e)===wn},hn.isConcurrentMode=Tn,hn.isContextConsumer=function(e){return Ln(e)===yn},hn.isContextProvider=function(e){return Ln(e)===bn},hn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===fn},hn.isForwardRef=function(e){return Ln(e)===Sn},hn.isFragment=function(e){return Ln(e)===pn},hn.isLazy=function(e){return Ln(e)===In},hn.isMemo=function(e){return Ln(e)===Rn},hn.isPortal=function(e){return Ln(e)===gn},hn.isProfiler=function(e){return Ln(e)===vn},hn.isStrictMode=function(e){return Ln(e)===mn},hn.isSuspense=function(e){return Ln(e)===xn},hn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===pn||e===Cn||e===vn||e===mn||e===xn||e===An||"object"==typeof e&&null!==e&&(e.$$typeof===In||e.$$typeof===Rn||e.$$typeof===bn||e.$$typeof===yn||e.$$typeof===Sn||e.$$typeof===kn||e.$$typeof===$n||e.$$typeof===_n||e.$$typeof===En)},hn.typeOf=Ln;var Mn={}; +var i=e("./oop"),r=function(){var e,t,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(t in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i,r=e("./keys"),o=e("./useragent"),s=null,a=0;function l(){return null==i&&function(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(e){}}(),i}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){h(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=t.addListener=function(e,t,n,i){e.addEventListener(t,n,l()),i&&i.$toDestroy.push(new u(e,t,n))},h=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function r(e){t&&t(e),n&&n(e),h(i,"mousemove",t),h(i,"mouseup",r),h(i,"dragstart",r)}return c(i,"mousemove",t),c(i,"mouseup",r),c(i,"dragstart",r),r},t.addMouseWheelListener=function(e,t,n){c(e,"wheel",(function(e){var n=e.deltaX||0,i=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*i;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*i;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*i}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,r,s){var a,l,u,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,o.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;u&&!s||(h=1),u&&clearTimeout(u),u=setTimeout((function(){u=null}),n[h-1]||600),1==h&&(a=e.clientX,l=e.clientY)}if(e._clicks=h,i[r]("mousedown",e),h>4)h=0;else if(h>1)return i[r](d[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){c(e,"mousedown",f,s)}))};var d=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function f(e,t,n){var i=d(t);if(!o.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==s[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===l){t.timeStamp-a<50&&(s.altGr=!0)}}}if((n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function g(){s=Object.create(null)}if(t.getModifierString=function(e){return r.KEY_MODS[d(e)]},t.addCommandKeyListener=function(e,n,i){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;c(e,"keydown",(function(e){r=e.keyCode}),i),c(e,"keypress",(function(e){return f(n,e,r)}),i)}else{var a=null;c(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=f(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),c(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),c(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(g(),c(window,"focus",g))}},"object"==typeof window&&window.postMessage&&!o.isOldIE){var p=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+p++,r=function(o){o.data==i&&(t.stopPropagation(o),h(n,"message",r),e())};c(n,"message",r),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.rowDate.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(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,u=r.isIE,c=r.isChrome>63,h=400,d=e("../lib/keys"),f=d.KEY_MODS,g=r.isIOS,p=g?/\s/:/\n/,m=r.isMobile;t.TextInput=function(e,t){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",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,w=!1,C="";m||(n.style.fontSize="1px");var S=!1,x=!1,A="",E=0,R=0,I=0;try{var k=document.activeElement===n}catch(e){}this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role)},this.setAriaOptions({role:"textbox"}),i.addListener(n,"blur",(function(e){x||(t.onBlur(e),k=!1)}),t),i.addListener(n,"focus",(function(e){if(!x){if(k=!0,r.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),r.isEdge?setTimeout($):$()}}),t),this.$focusScroll=!1,this.focus=function(){if(C||c||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var r=n.parentElement;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}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return k},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);y&&r&&(A=n.value="",D()),$()}}));var $=g?function(e){if(k&&(!v||e)&&!w){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=A=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==E&&R==r||n.setSelectionRange(4,r),E=4,R=r}}:function(){if(!y&&!w&&(k||_)){y=!0;var e=0,i=0,r="";if(t.session){var o=t.selection,s=o.getRange(),a=o.cursor.row;if(e=s.start.column,i=s.end.column,r=t.session.getLine(a),s.start.row!=a){var l=t.session.getLine(a-1);e=s.start.rowa+1?u.length:i,i+=r.length+1,r=r+"\n"+u}else m&&a>0&&(r="\n"+r,i+=1,e+=1);r.length>h&&(e0&&A[d]==e[d];)d++,a--;for(u=u.slice(d),d=1;l>0&&A.length-d>E-1&&A[A.length-d]==e[e.length-d];)d++,l--;c-=d-1,h-=d-1;var f=u.length-d+1;if(f<0&&(a=-f,f=0),u=u.slice(0,f),!(i||u||c||a||l||h))return"";w=!0;var g=!1;return r.isAndroid&&". "==u&&(u=" ",g=!0),u&&!a&&!l&&!c&&!h||S?t.onTextInput(u):t.onTextInput(u,{extendLeft:a,extendRight:l,restoreStart:c,restoreEnd:h}),w=!1,A=e,E=o,R=s,I=h,g?"\n":u},M=function(e){if(y)return W();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=T(i,!0);(i.length>500||p.test(r)||m&&E<1&&E==R)&&$()},O=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!l){var r=u||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return O(e,t,!0)}}},N=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);O(e,o)?(g&&($(o),v=o,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,$(),r?t.onCut():t.onCopy()})))},B=function(e){N(e,!0)},F=function(e){N(e,!1)},P=function(e){var o=O(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout($),i.preventDefault(e)):(n.value="",b=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){y||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=A.length&&e.value===A&&A&&e.selectionEnd!==R}(n)?m&&n.selectionStart!=E&&$():(t.selectAll(),$()))}),t),i.addListener(n,"input",M,t),i.addListener(n,"cut",B,t),i.addListener(n,"copy",F,t),i.addListener(n,"paste",P,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:F(e);break;case 86:P(e);break;case 88:B(e)}}),t);var W=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(S)return G();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;T(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+R-y.selectionStart+I)}}},D=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",G),e&&M())};function G(){x=!0,n.blur(),n.focus(),x=!1}var H,V=s.delayedCall(W,50).schedule.bind(null,null);function z(){clearTimeout(H),H=setTimeout((function(){C&&(n.style.cssText=C,C=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!S)){e.data&&(y.useTextareaForIME=!1),setTimeout(W,0),t._signal("compositionStart"),t.on("mousedown",G);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,y.markerRange=i,y.selectionStart=E,t.onCompositionStart(y),y.useTextareaForIME?(A=n.value="",E=0,R=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),i.addListener(n,"compositionupdate",W,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthR&&"\n"==A[o]?s=d.end:iR&&A.slice(0,o).split("\n").length>2?s=d.down:o>R&&" "==A[o-1]?(s=d.right,a=f.option):(o>R||o==R&&R!=E&&i==o)&&(s=d.right),i!==o&&(a|=f.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=d.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}E=i,R=o,$("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.$setUserAgentForTests=function(e,t){m=e,g=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.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 e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){e("./lib/oop");var i=e("./lib/dom"),r="ace_tooltip";function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(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(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,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),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,u=new a(s.container);function c(){t&&(t=clearTimeout(t)),r&&(u.hide(),r=null,s._signal("hideGutterTooltip",u),s.off("mousewheel",c))}function h(e){u.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return c();r&&e.$tooltipFollowsMouse&&h(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return c();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return c()}if(r!=i){r=i.text.join("
"),u.setHtml(r);var d=i.className;if(d&&u.setClassName(d.trim()),u.show(),s._signal("showGutterTooltip",u),s.on("mousewheel",c),e.$tooltipFollowsMouse)h(n);else{var f=n.domEvent.target.getBoundingClientRect(),g=u.getElement().style;g.left=f.right+"px",g.top=f.bottom+"px"}}}():c()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,c()}),50))}),s),s.on("changeSession",c)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.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 e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.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(e,t,n){var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,u,c,h,d,f,g,p,m,v,b=t.container,y=0;function w(){var e=d;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!m||r||o?(t.moveCursorToPosition(e),m=i,v={x:l,y:u}):a(v.x,v.y,l,u)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,u),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:u-s.top,bottom:s.bottom-u}},c=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};c/o<=2&&(d.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(d):p=i:p=null}(d,e)}function C(){h=t.selection.toOrientedRange(),s=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(c),w(),c=setInterval(w,20),y=0,r.addListener(document,"mousemove",A)}function S(){clearInterval(c),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(h),t.isFocused()&&!g&&t.$resetCursorStyle(),h=null,d=null,y=0,p=null,m=null,r.removeListener(document,"mousemove",A)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;f||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&E(e.dataTransfer))return l=e.clientX,u=e.clientY,s||C(),y++,e.dataTransfer.dropEffect=f=R(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&E(e.dataTransfer))return l=e.clientX,u=e.clientY,s||(C(),y++),null!==x&&(x=null),e.dataTransfer.dropEffect=f=R(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return S(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(g)switch(f){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:t.moveText(h,d);break;case"copy":h=t.moveText(h,d,!0)}else{var i=n.getData("Text");h={start:d,end:t.session.insert(d,i)},t.focus(),f=null}return S(),r.preventDefault(e)}},r.addListener(b,"dragstart",this.onDragStart.bind(e),t),r.addListener(b,"dragend",this.onDragEnd.bind(e),t),r.addListener(b,"dragenter",this.onDragEnter.bind(e),t),r.addListener(b,"dragover",this.onDragOver.bind(e),t),r.addListener(b,"dragleave",this.onDragLeave.bind(e),t),r.addListener(b,"drop",this.onDrop.bind(e),t);var x=null;function A(){null==x&&(x=setTimeout((function(){null!=x&&s&&S()}),20))}function E(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function R(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,u,c,h,d,f,g="scroll",p=0,m=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r,s,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,r=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void f.replaceChild(o.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&["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);"paste"==a?e.readText().then((function(e){t.execCommand(a,e)})):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&t.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){f||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left1)return clearTimeout(u),u=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,c=t.renderer.layerConfig.lineHeight,f=e.timeStamp;l=f;var y=r[0],w=y.clientX,C=y.clientY;Math.abs(n-w)+Math.abs(s-C)>o&&(a=-1),n=e.clientX=w,s=e.clientY=C,v=b=0;var x=new i(e,t);if(h=x.getDocumentPosition(),f-a<500&&1==r.length&&!p)m++,e.preventDefault(),e.button=0,function(){u=null,clearTimeout(u),t.selection.moveToPosition(h);var e=m>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{m=0;var A=t.selection.cursor,E=t.selection.isEmpty()?A:t.selection.anchor,R=t.renderer.$cursorLayer.getPixelPosition(A,!0),I=t.renderer.$cursorLayer.getPixelPosition(E,!0),k=t.renderer.scroller.getBoundingClientRect(),$=t.renderer.layerConfig.offset,L=t.renderer.scrollLeft,_=function(e,t){return(e/=c)*e+(t=t/o-.75)*t};if(e.clientXM?"cursor":"anchor"),g=M<3.5?"anchor":T<3.5?"cursor":"scroll",u=setTimeout(S,450)}a=f}),t),r.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),"zoom"==g?(g="",p=0):u?(t.selection.moveToPosition(h),p=0,w()):"scroll"==g?(p+=60,c=setInterval((function(){p--<=0&&(clearInterval(c),c=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),p<20&&(v*=.9),p<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(p=0)}),10),C()):w(),clearTimeout(u),u=null}),t),r.addListener(e,"touchmove",(function(e){u&&(clearTimeout(u),u=null);var r=e.touches;if(!(r.length>1||"zoom"==g)){var o=r[0],a=n-o.clientX,c=s-o.clientY;if("wait"==g){if(!(a*a+c*c>4))return e.preventDefault();g="cursor"}n=o.clientX,s=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,d=h-l;if(l=h,"scroll"==g){var f=new i(e,t);f.speed=1,f.wheelX=a,f.wheelY=c,10*Math.abs(a)=e){for(o=h+1;o=e;)o++;for(a=h,l=o-1;a=t.length||2!=(l=n[r-1])&&3!=l||2!=(u=t[r+1])&&3!=u?4:(o&&(u=3),u==l?u:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(o)return 4;for(f=r+1,d=t.length;f=1425&&p<=2303||64286==p;if(l=t[f],m&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return o=!1,s=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case h:return 4}}function m(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:d[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?c:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?f[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,c){if(e.length<2)return{};var d=e.split(""),f=new Array(d.length),v=new Array(d.length),b=[];i=c?1:0,function(e,t,n,c){var h=i?u:l,d=null,f=null,g=null,v=0,b=null,y=-1,w=null,C=null,S=[];if(!c)for(w=0,c=[];w0)if(16==b){for(w=y;w-1){for(w=y;w=0&&8==c[x];x--)t[x]=i}}(d,b,d.length,n);for(var y=0;y7&&n[y]<13||4===n[y]||n[y]===h)?b[y]=t.ON_R:y>0&&"ل"===d[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[y])&&(b[y-1]=b[y]=t.R_H,y++);d[d.length-1]===t.DOT&&(b[d.length-1]=t.B),"‫"===d[0]&&(b[0]=t.RLE);for(y=0;y=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var a=0;at&&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(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,u=!1,c=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+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?(e0&&r[i-1]%2==0&&r[i]%2!=0?t=1+(e>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?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._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(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},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(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),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(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},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(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?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(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,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(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(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!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:u.token),h>1&&(/\\\d/.test(u.regex)?c=u.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(h=1,c=this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||a.push(u)),o[r]=l,r+=h,i.push(c),u.onMatch||(u.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;rc){var v=e.substring(c,m-p.length);d.type==f?d.value+=v:(d.type&&u.push(d),d={type:f,value:v})}for(var b=0;br){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:u,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-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 e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],c={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t])return i=c[t];i=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},g=function(e){this.add("braces","insertion",(function(t,n,r,o,s){var l=r.getCursorPosition(),u=o.doc.getLine(l.row);if("{"==s){d(r);var c=r.getSelectionRange(),h=o.doc.getTextRange(c);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return f(c,h,"{","}");if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(u[l.column])||r.inMultiSelectMode||e&&e.braces?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(r),"}"==u.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&g.isAutoInsertedClosing(l,u,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(r);var p="";if(g.isMaybeInsertedClosing(l,u)&&(p=a.stringRepeat("}",i.maybeInsertedBrackets),g.clearMaybeInsertedClosing()),"}"===u.substring(l.column,l.column+1)){var m=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!p)return void g.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+o.getTabString();return{text:"\n"+b+"\n"+v+p,selection:[1,b.length,1,b.length]}}g.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,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);if(")"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,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);if("]"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,n,i,r){var o=i.$mode.$quotes||h;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 u=n.getCursorPosition(),c=i.doc.getLine(u.row),g=c.substring(u.column-1,u.column),p=c.substring(u.column,u.column+1),m=i.getTokenAt(u.row,u.column),v=i.getTokenAt(u.row,u.column+1);if("\\"==g&&m&&/escape/.test(m.type))return null;var b,y=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(p==s)(b=y!==w)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!w)return null;if(y&&w)return null;var C=i.$mode.tokenRe;C.lastIndex=0;var S=C.test(g);C.lastIndex=0;var x=C.test(g);if(S||x)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;var A=c[u.column-2];if(g==s&&(A==s||C.test(A)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||h,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}))};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,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",u)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.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(e,t,n){var r=e.getCursorPosition(),o=t.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(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.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),t.CstyleBehaviour=g})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){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;s2?i%u!=u-1:i%u==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(e,t){y(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},g),r.insertInLine({row:t,column:a},f))},b=function(e,t){var n;(n=e.match(m))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&r.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(p.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(C=e.length)})),a==1/0&&(a=C,o=!1,s=!1),c&&a%u!=0&&(a=Math.floor(a/u)*u),w(s?b:v)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o=(p=new u(t,i.row,i.column)).getCurrentToken();t.selection;var s,a,l=t.selection.toOrientedRange();if(o&&/comment/.test(o.type)){for(var h,d;o&&/comment/.test(o.type);){if(-1!=(m=o.value.indexOf(r.start))){var f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;h=new c(f,g,f,g+r.start.length);break}o=p.stepBackward()}var p;for(o=(p=new u(t,i.row,i.column)).getCurrentToken();o&&/comment/.test(o.type);){var m;if(-1!=(m=o.value.indexOf(r.end))){f=p.getCurrentTokenRow(),g=p.getCurrentTokenColumn()+m;d=new c(f,g,f,g+r.end.length);break}o=p.stepForward()}d&&t.remove(d),h&&(t.remove(h),s=h.start.row,a=-r.start.length)}else a=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=a),l.end.row==s&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+o,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),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(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<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(e,t,n){var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[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(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||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(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang");e("./lib/oop");var r=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},u=s;u<=a;u++){var c=this.cache[u];null==c&&((c=i.getMatchOffsets(n.getLine(u),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new r(u,e.offset,u,e.offset+e.length)})),this.cache[u]=c.length?c:"");for(var h=c.length;h--;){var d=c[h].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,t.drawSingleLineMarker(e,d,this.clazz,o))}}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort((function(e,t){return i(e.start,t.start)}));for(var n,r=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=r-i,u=-t.column+n.column;si)break;if(c.start.row==i&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=u,c.start.row+=l)),c.end.row==i&&c.end.column>=t.column){if(c.end.column==t.column&&this.$bias<0)continue;c.end.column==t.column&&u>0&&sc.start.column&&c.end.column==o[s+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=l}}else for(l=i-r,u=t.column-n.column;sr)break;c.end.rowt.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=u,c.end.row+=l):c.end.row>r&&(c.end.row+=l),c.start.rowt.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=u,c.start.row+=l):c.start.row>r&&(c.start.row+=l)}if(0!=l&&s=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,u=n.end.row,c=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(u,c,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(u,c)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(e){n.addSubFold(e)})));for(var g=0;g0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);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!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(tc)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return u.end.row=r.getCurrentTokenRow(),u.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(u.end.column+=o.value.length-2),u}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=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>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,u=a.range.end.row;this.foldAll(l,u,t.all?1e4:0)}else t.children?(u=s?s.end.row:this.getLength(),this.foldAll(e+1,u,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(i);if(s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(i)),!s)return null;var a=new r(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new r(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.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)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,u=a.value;;){for(;l>=0;){var c=u.charAt(l);if(c==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(u=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.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)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var u=a.value,c=u.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,o=t.value,s=0,a=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),u=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!u){var c=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);u=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(i=t.value))if("<"===n.value)s++;else if(""!==t.value)return;var f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===t.value&&--s<0)f=d=h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),c=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&s>=0);if(a&&c&&h&&f&&l&&d)return{openTag:new r(a.start.row,a.start.column,c.end.row,c.end.column),closeTag:new r(h.start.row,h.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,o=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,u=new r(s,a,s,l);e.stepForward();var c=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++o>0){var d=new r(s,a,s,l),f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var p=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=e.stepBackward(),p++}for(var v=0;vn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.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(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;se&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;ls){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=u),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=u)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.start,u=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=s,e.end.row+=s,e})))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new c(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new c(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,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(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var u=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=0;if(p=this.getFoldLine(r.row)){p.addRemoveChars(r.row,r.column,i.column-r.column),p.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==p&&(h.merge(p),p=h),c=u.indexOf(p)+1}for(;c=r.row&&p.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);u=this.$foldData,c=0;if(p=this.getFoldLine(o)){var g=p.range.compareInside(i.row,i.column);0==g?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(s,0,r.column-i.column)):-1==g&&(p.addRemoveChars(o,0,r.column-i.column),p.shiftRow(a)),c=u.indexOf(p)+1}for(;c=o&&p.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(o))&&p.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,u=this.$wrapLimit,c=n;for(i=Math.min(i,s.length-1);c<=i;)(o=this.getFoldLine(c,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var u=1;u=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,u=this.$wrapAsCode,c=this.$indentedSoftWrap,h=i<=Math.max(2*r,8)||!1===c?0:Math.floor(i/2);function d(e){for(var t=e-a,i=a;ii-f;){var g=a+i-f;if(n[g-1]>=10&&n[g]>=10)d(g);else if(n[g]!=e&&n[g]!=t){for(var p=Math.max(g-(i-(i>>2)),a-1);g>p&&n[g]p&&n[g]p&&9==n[g];)g--}else for(;g>p&&n[g]<10;)g--;g>p?d(++g):(2==n[g=a+i]&&g--,d(g-f))}else{for(;g!=a-1&&n[g]!=e;g--);if(g>a){d(g);continue}for(g=a+i;g39&&s<48||s>57&&s<64?r.push(9):s>=4352&&n(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),i=i||0,o=0;o=4352&&n(r)?i+=2:i+=1,!(i>t));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=u[c],o=this.$docRowCache[c];var d=e>u[h-1]}else d=!h;for(var f=this.getLength()-1,g=this.getNextFoldLine(o),p=g?g.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>p&&(o=g.end.row+1,p=(g=this.getNextFoldLine(o,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<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),g=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(r=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),g?g.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,u=this.$getRowCacheIndex(l,e),c=l.length;if(c&&u>=0){a=l[u],r=this.$screenRowCache[u];var h=e>l[c-1]}else h=!c;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var g="";d&&a>=f?(g=this.getFoldDisplayLine(d,e,t),o=d.start.row):(g=this.getLine(e).substring(0,t),o=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;g.length>=m[v];)r++,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&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:p+this.$getStringScreenWidth(g)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);ir&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;an);o++);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=n}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),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(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,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(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,u=a.length,c=r.length-u;e:for(var h=a.offset||0;h<=c;h++){for(var d=0;dp||(s.push(l=new o(h,p,h+u-1,m)),u>2&&(h=h+u-2))}}else for(var v=0;vC&&s[d].end.row==S;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else u=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=l;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var c=n.length,h=function(t,r,o){var s=i?t-c+1:t;if(!(s<0||s+c>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&lr))return!!o(s,l,s+c-1,h)||void 0}}};else if(i)h=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var u=o[0].length;if(l=o.index,!u){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+u>i)break;a.push(o.index,u)}for(var c=a.length-1;c>=0;c-=2){var h=a[c-1];if(r(t,h,t,h+(u=a[c])))return!0}};else h=function(t,i,r){var o,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(r(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:u}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;ri)break}s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._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(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.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(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.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(e){e.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(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.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(e){e.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(e){e.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(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.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(e){e.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(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.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(e){e.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(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.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(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),u=n.row+1;u<=r.row+1;u++){var c=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(u)));0!==c.length&&(c=" "+c),l+=c}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,u=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,f=e("./search").Search,g=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),C=function(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++C.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new u(this),new c(this)),this.keyBinding=new h(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new d("")),b.resetOptions(this),n&&this.setOptions(n),b._signal("editor",this)};C.$uid=0,function(){r.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.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)}"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(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;b.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.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=e.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(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,r);if(!o){var s=new y(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(o=[a.openTagName,a.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==g.comparePoints(o[0].end,o[1].start)?o=[g.fromPoints(o[0].start,o[1].end)]:0==g.comparePoints(o[0].start,o[1].end)&&(o=[g.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.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 e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.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(e){this.renderer.updateText(),this._emit("changeMode",e)},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 e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var u=r.column,c=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(c,a,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(r.row,u+o.selection[0],r.row,u+o.selection[1])):this.selection.setSelectionRange(new g(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(c,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(c,n,r.row)}},this.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var r=this.getSelectionRange();e=r.start.row,t=r.end.row}for(var o,s,a,l="",u="",c="",h=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),u=n.getLine(d-1),c=i.getNextLineIndent(l,u,h)),o=n.getLine(d),c!==(s=i.$getIndent(o))&&(s.length>0&&(a=new g(d,0,d,s.length),n.remove(a)),c.length>0&&n.insert({row:d,column:0},c)),i.autoOutdent(l,n,d)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),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 e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new g(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,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=a&&o<=l&&(n=t,u.selection.clearSelection(),u.moveCursorTo(e,a+i),u.selection.selectTo(e,l+i)),a=l}));for(var c,h=this.$toggleWordPairs,d=0;d=l&&s<=u&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){a=d.replace(/[\s:.,'";}\]]+$/,"");break}l=u}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return a},this.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){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,t?0:e),t&&-1==e&&(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,u=s.length,c=0;cf+1)break;f=g.last}for(c--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(h=c+1);h<=c;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&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(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.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(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,u=!1,c={},h=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h1?c[s.value]++:"=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&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(e){e.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(e){if(e){var t,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&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;b.loadModule("./ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(C.prototype),b.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){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(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=C})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!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),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},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(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,o=r.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function u(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function c(e,t){for(var n=e.length;n--;)for(var i=0;i=0?d(e,t,-1):(o(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?d(t,e,-1):(o(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=g(e,t.start)),o(e.end,t.end)>0&&(a=g(e,t.end)),f(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function g(e,t){var n=e.lines,i=e.end;e.end=s(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:i,lines:o,action:e.action}}function p(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;ro&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,u),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===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 e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,u);this.$renderCell(a,e,o,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],u=s.$firstLineNumber,c=s.$breakpoints,h=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=g&&this.$cursorRow<=n.end.row)&&(p+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),c[r]&&(p+=c[r]),h[r]&&(p+=h[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&&rn.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){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=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.id?4:0)|(u==l?8:0)),r,u==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((u=t.clone()).end.row=u.start.row,u.end.column=this.session.getLine(u.start.row).length,this.drawBidiSingleLineMarker(e,u,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var u;(u=t.clone()).start.row=u.end.row,u.start.column=0,this.drawBidiSingleLineMarker(e,u,n+" ace_br12",i,null,r)}else{a=this.$getTop(t.end.row,i);var c=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+c+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),u=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+u+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(r||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),t.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(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.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.MAX_CHUNK_LENGTH=250,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nc&&(a=l.end.row+1,c=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==c&&l),u&&(h.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(u=!0,h.style.height=d)}a++}if(u)for(;s0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),u=l.element;this.dom.removeChildren(u),r.setStyle(u.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(u.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(u,o,o==a&&s),this.$useLineGroups()?u.className="ace_line_group":(u.className="ace_line",u.setAttribute("role","option")),i.push(l),o++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderTokenInChunks=function(e,t,n,i){for(var r,o=0;o=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;or[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(o=t.row+1;o0)for(var i=0;i=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row=s;)a=this.$renderTokenInChunks(l,a,c,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderTokenInChunks(l,a,c,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return void this.$renderOverflowMessage(e,n,r,o);n=this.$renderTokenInChunks(e,n,r,o)}}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderTokenInChunks(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"":"",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,i,o);r=e.lastChild}else{r=e;this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);on?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),r=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.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(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].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(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},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 e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!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 t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var u=this.session.getOverwrite();this.$setOverwrite(u),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?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),t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){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),e.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(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var u=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(u,l),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}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(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(u.prototype);var c=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(c,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(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=c,t.VScrollBar=u,t.HScrollBar=c})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var a=function(e){this.element=r.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,this.parent=e,this.width=this.VScrollWidth,this.renderer=t,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,r=t.clientY,s=this.thumbTop;o.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(s+i-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t>>=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},this.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(l.prototype);var u=function(e,t){a.call(this,e),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=t};i.inherits(u,a),function(){this.classSuffix="-h",i.implement(this,s),this.onMouseDown=function(e,t){if("mousedown"===e&&0===o.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,r=t.clientX,s=this.thumbLeft;o.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(s+i-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return o.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),o.preventDefault(t)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t>>=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},this.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},this.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),t.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(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,u="function"==typeof ResizeObserver,c=200,h=t.FontMetrics=function(e,t){this.charCount=t||250,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),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",this.charCount),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t=(e=e||this.$measureNode).getBoundingClientRect(),n={height:t.height,width:t.width/this.charCount};return 0===n.width||0===n.height?null:n},this.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,this.charCount),this.$main.getBoundingClientRect().width/this.charCount},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},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 e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(c,0),e(0,c),e(c,c)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),u=s(this.els[2]),h=s(this.els[3]),d=n(i(h,l),i(h,u),i(r(l,u),r(h,a))),f=o(1+d[0],i(l,a)),g=o(1+d[1],i(u,a));if(t){var p=t,m=d[0]*p[0]/c+d[1]*p[1]/c+1,v=r(o(p[0],f),o(p[1],g));return r(o(1/m/c,v),a)}var b=i(e,a),y=n(i(f,o(d[0],b)),i(g,o(d[1],b)),b);return o(c,y)}}).call(h.prototype)})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,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< .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n will-change: transform;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #FFF;\n background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_folding-enabled > .ace_gutter-cell {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,s=function(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)};(function(){r.implement(this,o),this.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var o=this.renderer.session.$foldData,s=0;sthis.canvasHeight&&(d=this.canvasHeight-this.halfMinDecorationHeight),c=Math.round(d-this.halfMinDecorationHeight),h=Math.round(d+this.halfMinDecorationHeight)}n.fillStyle=t[i[s].type]||null,n.fillRect(0,u,this.canvasWidth,h-c)}}var f=this.renderer.session.selection.getCursor();if(f){l=this.compensateFoldRows(f.row,o),u=Math.round((f.row-l)*this.lineHeight*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,u,this.canvasWidth,2)}},this.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n}}).call(s.prototype),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,g=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,v=e("./css/editor.css"),b=e("./layer/decorators").Decorator,y=e("./lib/useragent"),w=y.isIE;r.importCssString(v,"ace_editor.css",!1);var C=function(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),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 u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container,this.$textLayer.MAX_CHUNK_LENGTH),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),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=!y.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(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(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.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(e){e?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(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(e,t,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&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,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 e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.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 e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:w?0:1;if(o<0||o>i.height-a)r.translate(this.textarea,0,0);else{var l=1,u=this.$size.height-a;if(t)if(t.useTextareaForIME){var c=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(c)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,u))}}}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 e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,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(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,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(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+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(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=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,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&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(e&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"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+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)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=u;var c=this.scrollMargin;this.session.setScrollTop(Math.max(-c.top,Math.min(this.scrollTop,i-t.scrollerHeight+c.bottom))),this.session.setScrollLeft(Math.max(-c.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+c.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+u<0||this.scrollTop>c.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var f,g,p=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-p)/this.lineHeight)),b=v+m,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),f=e.documentToScreenRow(v,0),g=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+g,p=this.scrollTop-f*y;var C=0;return(this.layerConfig.width!=r||s)&&(C=this.CHANGE_H_SCROLL),(s||d)&&(C|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:p,gutterOffset:y?Math.max(0,Math.ceil((p+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),C},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*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(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),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(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((t+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(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?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(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.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 e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(o),u=[],c=new l({messageBuffer:u,terminate:function(){},postMessage:function(e){u.push(e),i&&(r?setTimeout(h):h())}});c.setEmitSync=function(e){r=e};var h=function(){var e=u.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){c.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);u.length;)h()})),c},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.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=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.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=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.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(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},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 e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.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(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),u=e("./commands/multi_select_commands");t.commands=u.defaultCommands.concat(u.multiSelectCommands);var c=new(0,e("./search").Search);var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),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)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},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 e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)b--;if(b>0)for(var y=0;i[y].isEmpty();)y++;for(var w=b;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var d=e("./editor").Editor;function f(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(u.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(u.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(u.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,u=l.rangeList,c=(r?l:u).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=c.length;f--;){if(s)for(;f>0&&c[f].start.row==c[f-1].end.row;)f--;d.fromOrientedRange(c[f]),d.index=f,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===g||(i=g),d.toOrientedRange(c[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,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 e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;is&&(s=n.column),ic?e.insert(i,l.stringRepeat(" ",o-c)):e.remove(new r(i.row,i.column,i.row,i.column-o+c)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),h=c.start.row,d=c.end.row,f=h==d;if(f){var g,p=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d0);h<0&&(h=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(c.start.column=0,c.end.column=m[m.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?u:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:u:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function u(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.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)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=f,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),u=t,c=t;++tu){var f=e.getLine(c).length;return new i(u,a,c,f)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,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(e,t,n){var i=e("./lib/dom");function r(e){this.session=e,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(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;at[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$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,t.container.appendChild(a.el));var l=t.$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 u=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(u-=t.scrollLeft),a.el.style.left=u+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():a-=t;var u,c=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,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 s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(c){var h=c[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,u=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;u={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.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 "+u.className;var p=e.renderer.$cursorLayer.getPixelPosition(s).left;g.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+u.className,f.innerHTML=u.text.join("
"),f.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.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(e,t,n){e("./loader_build")(t);var i=e("./lib/dom"),r=e("./lib/event"),o=e("./range").Range,s=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;a=l.value,e=i.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(a=e.textContent,e.innerHTML="");var c=t.createEditSession(a),h=new s(new u(e),c,n),d={document:c,editor:h,onResize:h.resize.bind(h,null)};return l&&(d.textarea=l),r.addListener(window,"resize",d.onResize),h.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),h.container.env=h.env=d,h},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new l),n},t.Range=o,t.Editor=s,t.EditSession=a,t.UndoManager=l,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}(ss);var as={exports:{}},ls={exports:{}},us={},cs="function"==typeof Symbol&&Symbol.for,hs=cs?Symbol.for("react.element"):60103,ds=cs?Symbol.for("react.portal"):60106,fs=cs?Symbol.for("react.fragment"):60107,gs=cs?Symbol.for("react.strict_mode"):60108,ps=cs?Symbol.for("react.profiler"):60114,ms=cs?Symbol.for("react.provider"):60109,vs=cs?Symbol.for("react.context"):60110,bs=cs?Symbol.for("react.async_mode"):60111,ys=cs?Symbol.for("react.concurrent_mode"):60111,ws=cs?Symbol.for("react.forward_ref"):60112,Cs=cs?Symbol.for("react.suspense"):60113,Ss=cs?Symbol.for("react.suspense_list"):60120,xs=cs?Symbol.for("react.memo"):60115,As=cs?Symbol.for("react.lazy"):60116,Es=cs?Symbol.for("react.block"):60121,Rs=cs?Symbol.for("react.fundamental"):60117,Is=cs?Symbol.for("react.responder"):60118,ks=cs?Symbol.for("react.scope"):60119;function $s(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case hs:switch(e=e.type){case bs:case ys:case fs:case ps:case gs:case Cs:return e;default:switch(e=e&&e.$$typeof){case vs:case ws:case As:case xs:case ms:return e;default:return t}}case ds:return t}}}function Ls(e){return $s(e)===ys}us.AsyncMode=bs,us.ConcurrentMode=ys,us.ContextConsumer=vs,us.ContextProvider=ms,us.Element=hs,us.ForwardRef=ws,us.Fragment=fs,us.Lazy=As,us.Memo=xs,us.Portal=ds,us.Profiler=ps,us.StrictMode=gs,us.Suspense=Cs,us.isAsyncMode=function(e){return Ls(e)||$s(e)===bs},us.isConcurrentMode=Ls,us.isContextConsumer=function(e){return $s(e)===vs},us.isContextProvider=function(e){return $s(e)===ms},us.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===hs},us.isForwardRef=function(e){return $s(e)===ws},us.isFragment=function(e){return $s(e)===fs},us.isLazy=function(e){return $s(e)===As},us.isMemo=function(e){return $s(e)===xs},us.isPortal=function(e){return $s(e)===ds},us.isProfiler=function(e){return $s(e)===ps},us.isStrictMode=function(e){return $s(e)===gs},us.isSuspense=function(e){return $s(e)===Cs},us.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===fs||e===ys||e===ps||e===gs||e===Cs||e===Ss||"object"==typeof e&&null!==e&&(e.$$typeof===As||e.$$typeof===xs||e.$$typeof===ms||e.$$typeof===vs||e.$$typeof===ws||e.$$typeof===Rs||e.$$typeof===Is||e.$$typeof===ks||e.$$typeof===Es)},us.typeOf=$s;var _s={}; /** @license React v16.13.1 * react-is.development.js * @@ -51,12 +51,12 @@ var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var p=e.type;switch(p){case l:case c:case i:case o:case r:case h:return p;default:var m=p&&p.$$typeof;switch(m){case a:case u:case g:case f:case s:return m;default:return d}}case n:return d}}}var w=l,C=c,S=a,x=s,A=t,R=u,I=i,E=g,k=f,$=n,_=o,L=r,T=h,M=!1;function O(e){return y(e)===c}Mn.AsyncMode=w,Mn.ConcurrentMode=C,Mn.ContextConsumer=S,Mn.ContextProvider=x,Mn.Element=A,Mn.ForwardRef=R,Mn.Fragment=I,Mn.Lazy=E,Mn.Memo=k,Mn.Portal=$,Mn.Profiler=_,Mn.StrictMode=L,Mn.Suspense=T,Mn.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||y(e)===l},Mn.isConcurrentMode=O,Mn.isContextConsumer=function(e){return y(e)===a},Mn.isContextProvider=function(e){return y(e)===s},Mn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Mn.isForwardRef=function(e){return y(e)===u},Mn.isFragment=function(e){return y(e)===i},Mn.isLazy=function(e){return y(e)===g},Mn.isMemo=function(e){return y(e)===f},Mn.isPortal=function(e){return y(e)===n},Mn.isProfiler=function(e){return y(e)===o},Mn.isStrictMode=function(e){return y(e)===r},Mn.isSuspense=function(e){return y(e)===h},Mn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===o||e===r||e===h||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===p)},Mn.typeOf=y}(),"production"===process.env.NODE_ENV?un.exports=hn:un.exports=Mn + */"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var p=e.type;switch(p){case l:case u:case i:case o:case r:case h:return p;default:var m=p&&p.$$typeof;switch(m){case a:case c:case g:case f:case s:return m;default:return d}}case n:return d}}}var w=l,C=u,S=a,x=s,A=t,E=c,R=i,I=g,k=f,$=n,L=o,_=r,T=h,M=!1;function O(e){return y(e)===u}_s.AsyncMode=w,_s.ConcurrentMode=C,_s.ContextConsumer=S,_s.ContextProvider=x,_s.Element=A,_s.ForwardRef=E,_s.Fragment=R,_s.Lazy=I,_s.Memo=k,_s.Portal=$,_s.Profiler=L,_s.StrictMode=_,_s.Suspense=T,_s.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||y(e)===l},_s.isConcurrentMode=O,_s.isContextConsumer=function(e){return y(e)===a},_s.isContextProvider=function(e){return y(e)===s},_s.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_s.isForwardRef=function(e){return y(e)===c},_s.isFragment=function(e){return y(e)===i},_s.isLazy=function(e){return y(e)===g},_s.isMemo=function(e){return y(e)===f},_s.isPortal=function(e){return y(e)===n},_s.isProfiler=function(e){return y(e)===o},_s.isStrictMode=function(e){return y(e)===r},_s.isSuspense=function(e){return y(e)===h},_s.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===o||e===r||e===h||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===c||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===p)},_s.typeOf=y}(),"production"===process.env.NODE_ENV?ls.exports=us:ls.exports=_s /* object-assign (c) Sindre Sorhus @license MIT -*/;var On=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable;function Pn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var Fn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,r=Pn(e),o=1;o1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),qn;function t(t,n,i,r,a){for(var l=t[n],c=0;c0?", expected one of type ["+a.join(", ")+"]":"")+".")}))},shape:function(e){return a((function(t,n,i,r,o){var a=t[n],l=h(a);if("object"!==l)return new s("Invalid "+r+" `"+o+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var u in e){var f=e[u];if("function"!=typeof f)return c(i,r,o,u,d(f));var g=f(a,u,i,r,o+"."+u,Yn);if(g)return g}return null}))},exact:function(e){return a((function(t,n,i,r,o){var a=t[n],l=h(a);if("object"!==l)return new s("Invalid "+r+" `"+o+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");var u=Un({},t[n],e);for(var f in u){var g=e[f];if(Jn(e,f)&&"function"!=typeof g)return c(i,r,o,f,d(g));if(!g)return new s("Invalid "+r+" `"+o+"` key `"+f+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=g(a,f,i,r,o+"."+f,Yn);if(p)return p}return null}))}};function o(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var n={},r=0;function o(o,a,l,c,u,h,d){if(c=c||i,h=h||l,d!==Yn){if(t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+l;!n[g]&&r<3&&(Qn("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return null==a[l]?o?null===a[l]?new s("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new s("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,h)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function l(e){return a((function(t,n,i,r,o,a){var l=t[n];return h(l)!==e?new s("Invalid "+r+" `"+o+"` of type `"+d(l)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null}))}function c(e,t,n,i,r){return new s((e||"React class")+": "+t+" type `"+n+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function u(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(u);if(null===t||e(t))return!0;var i=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!i)return!1;var r,o=i.call(t);if(i!==t.entries){for(;!(r=o.next()).done;)if(!u(r.value))return!1}else for(;!(r=o.next()).done;){var s=r.value;if(s&&!u(s[1]))return!1}return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return s.prototype=Error.prototype,r.checkPropTypes=Kn,r.resetWarningCache=Kn.resetWarningCache,r.PropTypes=r,r}(ii.isElement,!0)}else cn.exports=function(){function e(e,t,n,i,r,o){if(o!==ei){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ni,resetWarningCache:ti};return n.PropTypes=n,n}();var ri={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,r="[object Arguments]",o="[object Array]",s="[object Boolean]",a="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",m="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",w="[object ArrayBuffer]",C="[object DataView]",S=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[r]=A[o]=A[w]=A[s]=A[C]=A[a]=A[l]=A[c]=A[u]=A[h]=A[d]=A[p]=A[m]=A[v]=A[y]=!1;var R="object"==typeof g&&g&&g.Object===Object&&g,I="object"==typeof self&&self&&self.Object===Object&&self,E=R||I||Function("return this")(),k=t&&!t.nodeType&&t,$=k&&e&&!e.nodeType&&e,_=$&&$.exports===k,L=_&&R.process,T=function(){try{return L&&L.binding&&L.binding("util")}catch(e){}}(),M=T&&T.isTypedArray;function O(e,t){for(var n=-1,i=null==e?0:e.length;++na))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,h=!0,d=2&n?new we:void 0;for(o.set(e,t),o.set(t,e);++u-1},be.prototype.set=function(e,t){var n=this.__data__,i=xe(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(oe||be),string:new ve}},ye.prototype.delete=function(e){var t=Le(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Le(this,e).get(e)},ye.prototype.has=function(e){return Le(this,e).has(e)},ye.prototype.set=function(e,t){var n=Le(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,n),this},we.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new be,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof be){var i=n.__data__;if(!oe||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Me=te?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ze(e){return null!=e&&"object"==typeof e}var je=M?function(e){return function(t){return e(t)}}(M):function(e){return ze(e)&&De(e.length)&&!!A[Ae(e)]};function Ze(e){return null!=(t=e)&&De(t.length)&&!He(t)?Se(e):ke(e);var t}e.exports=function(e,t){return Ie(e,t)}}(ri,ri.exports);var oi={};Object.defineProperty(oi,"__esModule",{value:!0}),oi.getAceInstance=oi.debounce=oi.editorEvents=oi.editorOptions=void 0;oi.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];oi.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];oi.getAceInstance=function(){var e;return"undefined"==typeof window?(g.window={},e=ln.exports,delete g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=ln.exports,e};oi.debounce=function(e,t){var n=null;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,r)}),t)}};var si,ai=g&&g.__extends||(si=function(e,t){return si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},si(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}si(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),li=g&&g.__assign||function(){return li=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&this.handleMarkers(w);var A=this.editor.$options;fi.editorOptions.forEach((function(t){A.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(b)&&b.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),m&&this.editor.setKeyboardHandler("ace/keyboard/"+m),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var i=this.$editors.some((function(t){return t.session===e}));return i&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r-1},Yi.prototype.set=function(e,t){var n=this.__data__,i=Ki(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Ji.prototype.clear=function(){this.__data__={hash:new Ui,map:new(zi||Yi),string:new Ui}},Ji.prototype.delete=function(e){return er(this,e).delete(e)},Ji.prototype.get=function(e){return er(this,e).get(e)},Ji.prototype.has=function(e){return er(this,e).has(e)},Ji.prototype.set=function(e,t){return er(this,e).set(e,t),this};var nr=rr((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ar(e))return Xi?Xi.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return Ri.test(e)&&n.push(""),e.replace(Ii,(function(e,t,i,r){n.push(i?r.replace(Ei,"$1"):t||e)})),n}));function ir(e){if("string"==typeof e||ar(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function rr(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s),s};return n.cache=new(rr.Cache||Ji),n}rr.Cache=Ji;var or=Array.isArray;function sr(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ar(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Gi.call(e)}var lr=function(e,t,n){var i=null==e?void 0:Qi(e,t);return void 0===i?n:i},cr=g&&g.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ur=g&&g.__assign||function(){return ur=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers(C,t);for(i=0;ii.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var u=this.diff_halfMatch_(e,i);if(u){var h=u[0],d=u[1],f=u[2],g=u[3],p=u[4],m=this.diff_main(h,f,r,o),v=this.diff_main(d,g,r,o);return m.concat([new t.Diff(0,p)],v)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,o):this.diff_bisect_(e,i,o)},t.prototype.diff_lineMode_=function(e,i,r){var o=this.diff_linesToChars_(e,i);e=o.chars1,i=o.chars2;var s=o.lineArray,a=this.diff_main(e,i,!1,r);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,u=0,h="",d="";l=1&&u>=1){a.splice(l-c-u,c+u),l=l-c-u;for(var f=this.diff_main(h,d,!1,r),g=f.length-1;g>=0;g--)a.splice(l,0,f[g]);l+=f.length}u=0,c=0,h="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,r){for(var o=e.length,s=i.length,a=Math.ceil((o+s)/2),l=a,c=2*a,u=new Array(c),h=new Array(c),d=0;dr);y++){for(var w=-y+p;w<=y-m;w+=2){for(var C=l+w,S=(E=w==-y||w!=y&&u[C-1]o)m+=2;else if(S>s)p+=2;else if(g){if((R=l+f-w)>=0&&R=(A=o-h[R]))return this.diff_bisectSplit_(e,i,E,S,r)}}for(var x=-y+v;x<=y-b;x+=2){for(var A,R=l+x,I=(A=x==-y||x!=y&&h[R-1]o)b+=2;else if(I>s)v+=2;else if(!g){if((C=l+f-x)>=0&&C=(A=o-A))return this.diff_bisectSplit_(e,i,E,S,r)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(o,s,!1,r),u=this.diff_main(a,l,!1,r);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,s=-1,a=n.length;si?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,o,s,a,u]:null}var s,a,l,c,u,h=o(n,i,Math.ceil(n.length/4)),d=o(n,i,Math.ceil(n.length/2));return h||d?(s=d?h&&h[4].length>d[4].length?h:d:h,e.length>t.length?(a=s[0],l=s[1],c=s[2],u=s[3]):(c=s[0],u=s[1],a=s[2],l=s[3]),[a,l,c,u,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=0,c=0,u=0,h=0;a0?r[o-1]:-1,l=0,c=0,u=0,h=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=p?(g>=d.length/2||g>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,g))),e[a-1][1]=d.substring(0,d.length-g),e[a+1][1]=f.substring(g),a++):(p>=d.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,p))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-p),e[a+1][0]=n,e[a+1][1]=d.substring(p),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),o=i.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),a=o&&i.match(t.whitespaceRegex_),l=s&&r.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),u=l&&r.match(t.linebreakRegex_),h=c&&e.match(t.blanklineEndRegex_),d=u&&n.match(t.blanklineStartRegex_);return h||d?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var i=1;i=d&&(d=f,c=r,u=o,h=s)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=u,h?e[i+1][1]=h:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=!1,c=!1,u=!1,h=!1;a0?r[o-1]:-1,u=h=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,o=0,s=0,a="",l="";r1?(0!==o&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(r-o-s>0&&0==e[r-o-s-1][0]?e[r-o-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),r-=o+s,e.splice(r,o+s),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,o=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;rt));i++)s=r,a=o;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=//g,s=/\n/g,a=0;a");switch(l){case 1:t[a]=''+c+"";break;case n:t[a]=''+c+"";break;case 0:t[a]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function o(e,i){var o=e/t.length,s=Math.abs(n-i);return r.Match_Distance?o+s/r.Match_Distance:s?1:o}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(o(0,a),s)));var l,c,u=1<=g;v--){var b=i[e.charAt(v-1)];if(m[v]=0===f?(m[v+1]<<1|1)&b:(m[v+1]<<1|1)&b|(h[v+1]|h[v])<<1|1|h[v+1],m[v]&u){var y=o(f,v-1);if(y<=s){if(s=y,!((a=v-1)>n))break;g=Math.max(1,2*n-a)}}}if(o(f+1,n)>s)break;h=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===i&&void 0===r)s=e,o=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&void 0===r)o=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,s=r}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,u=0,h=0,d=o,f=o,g=0;g=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=f,u=h)}1!==p&&(u+=m.length),p!==n&&(h+=m.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(h=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||a>=h)&&(a=-1):a=this.match_main(t,u,c),-1==a)o[s]=!1,r-=e[s].length2-e[s].length1;else if(o[s]=!0,r=a-c,u==(l=-1==h?t.substring(a,a+u.length):t.substring(a,h+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+u.length);else{var d=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(d)/u.length>this.Patch_DeleteThreshold)o[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,g=0,p=0;ps[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}if(0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new t.Diff(0,i)),o.length1+=n,o.length2+=n;else if(n>s[s.length-1][1].length){a=n-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,a),o.length1+=a,o.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r2*i?(c.length1+=d.length,s+=d.length,u=!1,c.diffs.push(new t.Diff(h,d)),o.diffs.shift()):(d=d.substring(0,i-c.length1-this.Patch_Margin),c.length1+=d.length,s+=d.length,0===h?(c.length2+=d.length,a+=d.length):u=!1,c.diffs.push(new t.Diff(h,d)),d==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==f&&(c.length1+=f.length,c.length2+=f.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),u||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}!function(e,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};i.inherits(o,r),t.JsonHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};i.inherits(u,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(i+=n));return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/json"],(function(t){e&&(e.exports=t)}))}({exports:{}});var Gr=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Hr(t){var n=t.defaultInputValue,i=void 0===n?"":n,r=t.defaultMenuIsOpen,o=void 0!==r&&r,s=t.defaultValue,a=void 0===s?null:s,l=t.inputValue,c=t.menuIsOpen,u=t.onChange,h=t.onInputChange,d=t.onMenuClose,f=t.onMenuOpen,g=t.value,p=Wr(t,Gr),m=Fr(e.useState(void 0!==l?l:i),2),v=m[0],b=m[1],y=Fr(e.useState(void 0!==c?c:o),2),w=y[0],C=y[1],S=Fr(e.useState(void 0!==g?g:a),2),x=S[0],A=S[1],R=e.useCallback((function(e,t){"function"==typeof u&&u(e,t),A(e)}),[u]),I=e.useCallback((function(e,t){var n;"function"==typeof h&&(n=h(e,t)),b(void 0!==n?n:e)}),[h]),E=e.useCallback((function(){"function"==typeof f&&f(),C(!0)}),[f]),k=e.useCallback((function(){"function"==typeof d&&d(),C(!1)}),[d]),$=void 0!==l?l:v,_=void 0!==c?c:w,L=void 0!==g?g:x;return Nr(Nr({},p),{},{inputValue:$,menuIsOpen:_,onChange:R,onInputChange:I,onMenuClose:k,onMenuOpen:E,value:L})}function Dr(){return Dr=Object.assign||function(e){for(var t=1;t0?uo(Co,--yo):0,vo--,10===wo&&(vo=1,mo--),wo}function Ro(){return wo=yo2||$o(wo)>3?"":" "}function Oo(e,t){for(;--t&&Ro()&&!(wo<48||wo>102||wo>57&&wo<65||wo>70&&wo<97););return ko(e,Eo()+(t<6&&32==Io()&&32==Ro()))}function No(e){for(;Ro();)switch(wo){case e:return yo;case 34:case 39:34!==e&&39!==e&&No(wo);break;case 40:41===e&&No(e);break;case 92:Ro()}return yo}function Bo(e,t){for(;Ro()&&e+wo!==57&&(e+wo!==84||47!==Io()););return"/*"+ko(t,yo-1)+"*"+oo(47===e?e:Ro())}function Po(e){for(;!$o(Io());)Ro();return ko(e,yo)}function Fo(e){return Lo(Wo("",null,null,null,[""],e=_o(e),0,[0],e))}function Wo(e,t,n,i,r,o,s,a,l){for(var c=0,u=0,h=s,d=0,f=0,g=0,p=1,m=1,v=1,b=0,y="",w=r,C=o,S=i,x=y;m;)switch(g=b,b=Ro()){case 40:if(108!=g&&58==uo(x,h-1)){-1!=co(x+=lo(To(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=To(b);break;case 9:case 10:case 13:case 32:x+=Mo(g);break;case 92:x+=Oo(Eo()-1,7);continue;case 47:switch(Io()){case 42:case 47:po(Ho(Bo(Ro(),Eo()),t,n),l);break;default:x+="/"}break;case 123*p:a[c++]=fo(x)*v;case 125*p:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:f>0&&fo(x)-h&&po(f>32?Do(x+";",i,n,h-1):Do(lo(x," ","")+";",i,n,h-2),l);break;case 59:x+=";";default:if(po(S=Go(x,t,n,c,u,r,a,y,w=[],C=[],h),o),123===b)if(0===u)Wo(x,t,S,S,w,o,h,a,C);else switch(99===d&&110===uo(x,3)?100:d){case 100:case 109:case 115:Wo(e,S,S,i&&po(Go(e,S,S,0,0,r,a,y,r,w=[],h),C),r,C,h,a,i?w:C);break;default:Wo(x,S,S,S,[""],C,0,a,C)}}c=u=f=0,p=v=1,y=x="",h=s;break;case 58:h=1+fo(x),f=g;default:if(p<1)if(123==b)--p;else if(125==b&&0==p++&&125==Ao())continue;switch(x+=oo(b),b*p){case 38:v=u>0?1:(x+="\f",-1);break;case 44:a[c++]=(fo(x)-1)*v,v=1;break;case 64:45===Io()&&(x+=To(Ro())),d=Io(),u=h=fo(y=x+=Po(Eo())),b++;break;case 45:45===g&&2==fo(x)&&(p=0)}}return o}function Go(e,t,n,i,r,o,s,a,l,c,u){for(var h=r-1,d=0===r?o:[""],f=go(d),g=0,p=0,m=0;g0?d[v]+" "+b:lo(b,/&\f/g,d[v])))&&(l[m++]=y);return So(e,t,n,0===r?to:a,l,c,u)}function Ho(e,t,n){return So(e,t,n,eo,oo(wo),ho(e,2,-2),0)}function Do(e,t,n,i){return So(e,t,n,no,ho(e,0,i),ho(e,i+1,-1),i)}function Vo(e,t){for(var n="",i=go(e),r=0;r-1},qo=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},es=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},ts=function(e,t,n){qo(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),es(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!qo(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),es(e)))};function ns(e,t){switch(function(e,t){return 45^uo(e,0)?(((t<<2^uo(e,0))<<2^uo(e,1))<<2^uo(e,2))<<2^uo(e,3):0}(e,t)){case 5103:return qr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return qr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return qr+e+Qr+e+Kr+e+e;case 6828:case 4268:return qr+e+Kr+e+e;case 6165:return qr+e+Kr+"flex-"+e+e;case 5187:return qr+e+lo(e,/(\w+).+(:[^]+)/,qr+"box-$1$2"+Kr+"flex-$1$2")+e;case 5443:return qr+e+Kr+"flex-item-"+lo(e,/flex-|-self/,"")+e;case 4675:return qr+e+Kr+"flex-line-pack"+lo(e,/align-content|flex-|-self/,"")+e;case 5548:return qr+e+Kr+lo(e,"shrink","negative")+e;case 5292:return qr+e+Kr+lo(e,"basis","preferred-size")+e;case 6060:return qr+"box-"+lo(e,"-grow","")+qr+e+Kr+lo(e,"grow","positive")+e;case 4554:return qr+lo(e,/([^-])(transform)/g,"$1"+qr+"$2")+e;case 6187:return lo(lo(lo(e,/(zoom-|grab)/,qr+"$1"),/(image-set)/,qr+"$1"),e,"")+e;case 5495:case 3959:return lo(e,/(image-set\([^]*)/,qr+"$1$`$1");case 4968:return lo(lo(e,/(.+:)(flex-)?(.*)/,qr+"box-pack:$3"+Kr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+qr+e+e;case 4095:case 3583:case 4068:case 2532:return lo(e,/(.+)-inline(.+)/,qr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(fo(e)-1-t>6)switch(uo(e,t+1)){case 109:if(45!==uo(e,t+4))break;case 102:return lo(e,/(.+:)(.+)-([^]+)/,"$1"+qr+"$2-$3$1"+Qr+(108==uo(e,t+3)?"$3":"$2-$3"))+e;case 115:return~co(e,"stretch")?ns(lo(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==uo(e,t+1))break;case 6444:switch(uo(e,fo(e)-3-(~co(e,"!important")&&10))){case 107:return lo(e,":",":"+qr)+e;case 101:return lo(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qr+(45===uo(e,14)?"inline-":"")+"box$3$1"+qr+"$2$3$1"+Kr+"$2box$3")+e}break;case 5936:switch(uo(e,t+11)){case 114:return qr+e+Kr+lo(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return qr+e+Kr+lo(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return qr+e+Kr+lo(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return qr+e+Kr+e+e}return e}var is,rs,os="undefined"!=typeof document,ss=os?void 0:(is=function(){return Zo((function(){var e={};return function(t){return e[t]}}))},rs=new WeakMap,function(e){if(rs.has(e))return rs.get(e);var t=is(e);return rs.set(e,t),t}),as=[function(e,t,n,i){if(e.length>-1&&!e.return)switch(e.type){case no:e.return=ns(e.value,e.length);break;case io:return Vo([xo(e,{value:lo(e.value,"@","@"+qr)})],i);case to:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Vo([xo(e,{props:[lo(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return Vo([xo(e,{props:[lo(t,/:(plac\w+)/,":"+qr+"input-$1")]}),xo(e,{props:[lo(t,/:(plac\w+)/,":-moz-$1")]}),xo(e,{props:[lo(t,/:(plac\w+)/,Kr+"input-$1")]})],i)}return""}))}}],ls=function(e){var t=e.key;if("production"!==process.env.NODE_ENV&&!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");if(os&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||as;if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var r,o,s={},a=[];os&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=0;s--){var a=o[s];if(a.line1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Ks;function t(t,n,i,r,a){for(var l=t[n],u=0;u0?", expected one of type ["+a.join(", ")+"]":"")+".")}))},shape:function(e){return a((function(t,n,i,r,o){var a=t[n],l=h(a);if("object"!==l)return new s("Invalid "+r+" `"+o+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var f=e[c];if("function"!=typeof f)return u(i,r,o,c,d(f));var g=f(a,c,i,r,o+"."+c,Xs);if(g)return g}return null}))},exact:function(e){return a((function(t,n,i,r,o){var a=t[n],l=h(a);if("object"!==l)return new s("Invalid "+r+" `"+o+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");var c=Zs({},t[n],e);for(var f in c){var g=e[f];if(Us(e,f)&&"function"!=typeof g)return u(i,r,o,f,d(g));if(!g)return new s("Invalid "+r+" `"+o+"` key `"+f+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=g(a,f,i,r,o+"."+f,Xs);if(p)return p}return null}))}};function o(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var n={},r=0;function o(o,a,l,u,c,h,d){if(u=u||i,h=h||l,d!==Xs){if(t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=u+":"+l;!n[g]&&r<3&&(Js("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return null==a[l]?o?null===a[l]?new s("The "+c+" `"+h+"` is marked as required in `"+u+"`, but its value is `null`."):new s("The "+c+" `"+h+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,l,u,c,h)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function l(e){return a((function(t,n,i,r,o,a){var l=t[n];return h(l)!==e?new s("Invalid "+r+" `"+o+"` of type `"+d(l)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,n,i,r){return new s((e||"React class")+": "+t+" type `"+n+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var i=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!i)return!1;var r,o=i.call(t);if(i!==t.entries){for(;!(r=o.next()).done;)if(!c(r.value))return!1}else for(;!(r=o.next()).done;){var s=r.value;if(s&&!c(s[1]))return!1}return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return s.prototype=Error.prototype,r.checkPropTypes=Ys,r.resetWarningCache=Ys.resetWarningCache,r.PropTypes=r,r}(ta.isElement,!0)}else as.exports=function(){function e(e,t,n,i,r,o){if(o!==Qs){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ea,resetWarningCache:qs};return n.PropTypes=n,n}();var na={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,r="[object Arguments]",o="[object Array]",s="[object Boolean]",a="[object Date]",l="[object Error]",u="[object Function]",c="[object Map]",h="[object Number]",f="[object Object]",g="[object Promise]",p="[object RegExp]",m="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",w="[object ArrayBuffer]",C="[object DataView]",S=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[r]=A[o]=A[w]=A[s]=A[C]=A[a]=A[l]=A[u]=A[c]=A[h]=A[f]=A[p]=A[m]=A[v]=A[y]=!1;var E="object"==typeof d&&d&&d.Object===Object&&d,R="object"==typeof self&&self&&self.Object===Object&&self,I=E||R||Function("return this")(),k=t&&!t.nodeType&&t,$=k&&e&&!e.nodeType&&e,L=$&&$.exports===k,_=L&&E.process,T=function(){try{return _&&_.binding&&_.binding("util")}catch(e){}}(),M=T&&T.isTypedArray;function O(e,t){for(var n=-1,i=null==e?0:e.length;++na))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new we:void 0;for(o.set(e,t),o.set(t,e);++c-1},be.prototype.set=function(e,t){var n=this.__data__,i=xe(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(oe||be),string:new ve}},ye.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return _e(this,e).get(e)},ye.prototype.has=function(e){return _e(this,e).has(e)},ye.prototype.set=function(e,t){var n=_e(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,n),this},we.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new be,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof be){var i=n.__data__;if(!oe||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Me=te?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ze(e){return null!=e&&"object"==typeof e}var je=M?function(e){return function(t){return e(t)}}(M):function(e){return ze(e)&&He(e.length)&&!!A[Ae(e)]};function Ze(e){return null!=(t=e)&&He(t.length)&&!Ge(t)?Se(e):ke(e);var t}e.exports=function(e,t){return Re(e,t)}}(na,na.exports);var ia={};Object.defineProperty(ia,"__esModule",{value:!0}),ia.getAceInstance=ia.debounce=ia.editorEvents=ia.editorOptions=void 0;ia.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];ia.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];ia.getAceInstance=function(){var e;return"undefined"==typeof window?(d.window={},e=ss.exports,delete d.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=ss.exports,e};ia.debounce=function(e,t){var n=null;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,r)}),t)}};var ra,oa=d&&d.__extends||(ra=function(e,t){return ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ra(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ra(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),sa=d&&d.__assign||function(){return sa=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&this.handleMarkers(w);var A=this.editor.$options;ha.editorOptions.forEach((function(t){A.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(b)&&b.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),m&&this.editor.setKeyboardHandler("ace/keyboard/"+m),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var i=this.$editors.some((function(t){return t.session===e}));return i&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r-1},Za.prototype.set=function(e,t){var n=this.__data__,i=Ua(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Xa.prototype.clear=function(){this.__data__={hash:new ja,map:new(Ga||Za),string:new ja}},Xa.prototype.delete=function(e){return Ka(this,e).delete(e)},Xa.prototype.get=function(e){return Ka(this,e).get(e)},Xa.prototype.has=function(e){return Ka(this,e).has(e)},Xa.prototype.set=function(e,t){return Ka(this,e).set(e,t),this};var qa=tl((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(rl(e))return za?za.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return Sa.test(e)&&n.push(""),e.replace(xa,(function(e,t,i,r){n.push(i?r.replace(Aa,"$1"):t||e)})),n}));function el(e){if("string"==typeof e||rl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function tl(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s),s};return n.cache=new(tl.Cache||Xa),n}tl.Cache=Xa;var nl=Array.isArray;function il(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function rl(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Fa.call(e)}var ol=function(e,t,n){var i=null==e?void 0:Ya(e,t);return void 0===i?n:i},sl=d&&d.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),al=d&&d.__assign||function(){return al=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers(C,t);for(i=0;ii.length?e:i,l=e.length>i.length?i:e,u=a.indexOf(l);if(-1!=u)return s=[new t.Diff(1,a.substring(0,u)),new t.Diff(0,l),new t.Diff(1,a.substring(u+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var c=this.diff_halfMatch_(e,i);if(c){var h=c[0],d=c[1],f=c[2],g=c[3],p=c[4],m=this.diff_main(h,f,r,o),v=this.diff_main(d,g,r,o);return m.concat([new t.Diff(0,p)],v)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,o):this.diff_bisect_(e,i,o)},t.prototype.diff_lineMode_=function(e,i,r){var o=this.diff_linesToChars_(e,i);e=o.chars1,i=o.chars2;var s=o.lineArray,a=this.diff_main(e,i,!1,r);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,u=0,c=0,h="",d="";l=1&&c>=1){a.splice(l-u-c,u+c),l=l-u-c;for(var f=this.diff_main(h,d,!1,r),g=f.length-1;g>=0;g--)a.splice(l,0,f[g]);l+=f.length}c=0,u=0,h="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,r){for(var o=e.length,s=i.length,a=Math.ceil((o+s)/2),l=a,u=2*a,c=new Array(u),h=new Array(u),d=0;dr);y++){for(var w=-y+p;w<=y-m;w+=2){for(var C=l+w,S=(I=w==-y||w!=y&&c[C-1]o)m+=2;else if(S>s)p+=2;else if(g){if((E=l+f-w)>=0&&E=(A=o-h[E]))return this.diff_bisectSplit_(e,i,I,S,r)}}for(var x=-y+v;x<=y-b;x+=2){for(var A,E=l+x,R=(A=x==-y||x!=y&&h[E-1]o)b+=2;else if(R>s)v+=2;else if(!g){if((C=l+f-x)>=0&&C=(A=o-A))return this.diff_bisectSplit_(e,i,I,S,r)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),u=this.diff_main(o,s,!1,r),c=this.diff_main(a,l,!1,r);return u.concat(c)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,s=-1,a=n.length;si?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,o,s,a,c]:null}var s,a,l,u,c,h=o(n,i,Math.ceil(n.length/4)),d=o(n,i,Math.ceil(n.length/2));return h||d?(s=d?h&&h[4].length>d[4].length?h:d:h,e.length>t.length?(a=s[0],l=s[1],u=s[2],c=s[3]):(u=s[0],c=s[1],a=s[2],l=s[3]),[a,l,u,c,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=0,u=0,c=0,h=0;a0?r[o-1]:-1,l=0,u=0,c=0,h=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=p?(g>=d.length/2||g>=f.length/2)&&(e.splice(a,0,new t.Diff(0,f.substring(0,g))),e[a-1][1]=d.substring(0,d.length-g),e[a+1][1]=f.substring(g),a++):(p>=d.length/2||p>=f.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,p))),e[a-1][0]=1,e[a-1][1]=f.substring(0,f.length-p),e[a+1][0]=n,e[a+1][1]=d.substring(p),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),o=i.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),a=o&&i.match(t.whitespaceRegex_),l=s&&r.match(t.whitespaceRegex_),u=a&&i.match(t.linebreakRegex_),c=l&&r.match(t.linebreakRegex_),h=u&&e.match(t.blanklineEndRegex_),d=c&&n.match(t.blanklineStartRegex_);return h||d?5:u||c?4:o&&!a&&l?3:a||l?2:o||s?1:0}for(var i=1;i=d&&(d=f,u=r,c=o,h=s)}e[i-1][1]!=u&&(u?e[i-1][1]=u:(e.splice(i-1,1),i--),e[i][1]=c,h?e[i+1][1]=h:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],o=0,s=null,a=0,l=!1,u=!1,c=!1,h=!1;a0?r[o-1]:-1,c=h=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,o=0,s=0,a="",l="";r1?(0!==o&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(r-o-s>0&&0==e[r-o-s-1][0]?e[r-o-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),r-=o+s,e.splice(r,o+s),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,o=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(r=1;rt));i++)s=r,a=o;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=//g,s=/\n/g,a=0;a");switch(l){case 1:t[a]=''+u+"";break;case n:t[a]=''+u+"";break;case 0:t[a]=""+u+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function o(e,i){var o=e/t.length,s=Math.abs(n-i);return r.Match_Distance?o+s/r.Match_Distance:s?1:o}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(o(0,a),s)));var l,u,c=1<=g;v--){var b=i[e.charAt(v-1)];if(m[v]=0===f?(m[v+1]<<1|1)&b:(m[v+1]<<1|1)&b|(h[v+1]|h[v])<<1|1|h[v+1],m[v]&c){var y=o(f,v-1);if(y<=s){if(s=y,!((a=v-1)>n))break;g=Math.max(1,2*n-a)}}}if(o(f+1,n)>s)break;h=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===i&&void 0===r)s=e,o=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&void 0===r)o=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,s=r}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,u=0,c=0,h=0,d=o,f=o,g=0;g=2*this.Patch_Margin&&u&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,u=0,d=f,c=h)}1!==p&&(c+=m.length),p!==n&&(h+=m.length)}return u&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,c.substring(0,this.Match_MaxBits),u))&&(-1==(h=this.match_main(t,c.substring(c.length-this.Match_MaxBits),u+c.length-this.Match_MaxBits))||a>=h)&&(a=-1):a=this.match_main(t,c,u),-1==a)o[s]=!1,r-=e[s].length2-e[s].length1;else if(o[s]=!0,r=a-u,c==(l=-1==h?t.substring(a,a+c.length):t.substring(a,h+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+c.length);else{var d=this.diff_main(c,l,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(d)/c.length>this.Patch_DeleteThreshold)o[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,g=0,p=0;ps[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}if(0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new t.Diff(0,i)),o.length1+=n,o.length2+=n;else if(n>s[s.length-1][1].length){a=n-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,a),o.length1+=a,o.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r2*i?(u.length1+=d.length,s+=d.length,c=!1,u.diffs.push(new t.Diff(h,d)),o.diffs.shift()):(d=d.substring(0,i-u.length1-this.Patch_Margin),u.length1+=d.length,s+=d.length,0===h?(u.length2+=d.length,a+=d.length):c=!1,u.diffs.push(new t.Diff(h,d)),d==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(u.diffs)).substring(l.length-this.Patch_Margin);var f=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==f&&(u.length1+=f.length,u.length2+=f.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=f:u.diffs.push(new t.Diff(0,f))),c||e.splice(++r,0,u)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}!function(e,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};i.inherits(o,r),t.JsonHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(i==u)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,u=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};i.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(i+=n));return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(c.prototype),t.Mode=c})),ace.require(["ace/mode/json"],(function(t){e&&(e.exports=t)}))}({exports:{}});var Wl=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Dl(t){var n=t.defaultInputValue,i=void 0===n?"":n,r=t.defaultMenuIsOpen,o=void 0!==r&&r,s=t.defaultValue,a=void 0===s?null:s,l=t.inputValue,u=t.menuIsOpen,c=t.onChange,h=t.onInputChange,d=t.onMenuClose,f=t.onMenuOpen,g=t.value,p=Pl(t,Wl),m=Fl(e.useState(void 0!==l?l:i),2),v=m[0],b=m[1],y=Fl(e.useState(void 0!==u?u:o),2),w=y[0],C=y[1],S=Fl(e.useState(void 0!==g?g:a),2),x=S[0],A=S[1],E=e.useCallback((function(e,t){"function"==typeof c&&c(e,t),A(e)}),[c]),R=e.useCallback((function(e,t){var n;"function"==typeof h&&(n=h(e,t)),b(void 0!==n?n:e)}),[h]),I=e.useCallback((function(){"function"==typeof f&&f(),C(!0)}),[f]),k=e.useCallback((function(){"function"==typeof d&&d(),C(!1)}),[d]),$=void 0!==l?l:v,L=void 0!==u?u:w,_=void 0!==g?g:x;return Ol(Ol({},p),{},{inputValue:$,menuIsOpen:L,onChange:E,onInputChange:R,onMenuClose:k,onMenuOpen:I,value:_})}function Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?lu(bu,--mu):0,gu--,10===vu&&(gu=1,fu--),vu}function Su(){return vu=mu2||Ru(vu)>3?"":" "}function _u(e,t){for(;--t&&Su()&&!(vu<48||vu>102||vu>57&&vu<65||vu>70&&vu<97););return Eu(e,Au()+(t<6&&32==xu()&&32==Su()))}function Tu(e){for(;Su();)switch(vu){case e:return mu;case 34:case 39:34!==e&&39!==e&&Tu(vu);break;case 40:41===e&&Tu(e);break;case 92:Su()}return mu}function Mu(e,t){for(;Su()&&e+vu!==57&&(e+vu!==84||47!==xu()););return"/*"+Eu(t,mu-1)+"*"+iu(47===e?e:Su())}function Ou(e){for(;!Ru(xu());)Su();return Eu(e,mu)}function Nu(e){return ku(Bu("",null,null,null,[""],e=Iu(e),0,[0],e))}function Bu(e,t,n,i,r,o,s,a,l){for(var u=0,c=0,h=s,d=0,f=0,g=0,p=1,m=1,v=1,b=0,y="",w=r,C=o,S=i,x=y;m;)switch(g=b,b=Su()){case 40:if(108!=g&&58==lu(x,h-1)){-1!=au(x+=su($u(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=$u(b);break;case 9:case 10:case 13:case 32:x+=Lu(g);break;case 92:x+=_u(Au()-1,7);continue;case 47:switch(xu()){case 42:case 47:du(Pu(Mu(Su(),Au()),t,n),l);break;default:x+="/"}break;case 123*p:a[u++]=cu(x)*v;case 125*p:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+c:f>0&&cu(x)-h&&du(f>32?Wu(x+";",i,n,h-1):Wu(su(x," ","")+";",i,n,h-2),l);break;case 59:x+=";";default:if(du(S=Fu(x,t,n,u,c,r,a,y,w=[],C=[],h),o),123===b)if(0===c)Bu(x,t,S,S,w,o,h,a,C);else switch(99===d&&110===lu(x,3)?100:d){case 100:case 109:case 115:Bu(e,S,S,i&&du(Fu(e,S,S,0,0,r,a,y,r,w=[],h),C),r,C,h,a,i?w:C);break;default:Bu(x,S,S,S,[""],C,0,a,C)}}u=c=f=0,p=v=1,y=x="",h=s;break;case 58:h=1+cu(x),f=g;default:if(p<1)if(123==b)--p;else if(125==b&&0==p++&&125==Cu())continue;switch(x+=iu(b),b*p){case 38:v=c>0?1:(x+="\f",-1);break;case 44:a[u++]=(cu(x)-1)*v,v=1;break;case 64:45===xu()&&(x+=$u(Su())),d=xu(),c=h=cu(y=x+=Ou(Au())),b++;break;case 45:45===g&&2==cu(x)&&(p=0)}}return o}function Fu(e,t,n,i,r,o,s,a,l,u,c){for(var h=r-1,d=0===r?o:[""],f=hu(d),g=0,p=0,m=0;g0?d[v]+" "+b:su(b,/&\f/g,d[v])))&&(l[m++]=y);return yu(e,t,n,0===r?ql:a,l,u,c)}function Pu(e,t,n){return yu(e,t,n,Ql,iu(vu),uu(e,2,-2),0)}function Wu(e,t,n,i){return yu(e,t,n,eu,uu(e,0,i),uu(e,i+1,-1),i)}function Du(e,t){for(var n="",i=hu(e),r=0;r-1},Ju=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},Ku=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},Qu=function(e,t,n){Ju(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Ku(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!Ju(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Ku(e)))};function qu(e,t){switch(function(e,t){return 45^lu(e,0)?(((t<<2^lu(e,0))<<2^lu(e,1))<<2^lu(e,2))<<2^lu(e,3):0}(e,t)){case 5103:return Kl+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Kl+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Kl+e+Jl+e+Yl+e+e;case 6828:case 4268:return Kl+e+Yl+e+e;case 6165:return Kl+e+Yl+"flex-"+e+e;case 5187:return Kl+e+su(e,/(\w+).+(:[^]+)/,Kl+"box-$1$2"+Yl+"flex-$1$2")+e;case 5443:return Kl+e+Yl+"flex-item-"+su(e,/flex-|-self/,"")+e;case 4675:return Kl+e+Yl+"flex-line-pack"+su(e,/align-content|flex-|-self/,"")+e;case 5548:return Kl+e+Yl+su(e,"shrink","negative")+e;case 5292:return Kl+e+Yl+su(e,"basis","preferred-size")+e;case 6060:return Kl+"box-"+su(e,"-grow","")+Kl+e+Yl+su(e,"grow","positive")+e;case 4554:return Kl+su(e,/([^-])(transform)/g,"$1"+Kl+"$2")+e;case 6187:return su(su(su(e,/(zoom-|grab)/,Kl+"$1"),/(image-set)/,Kl+"$1"),e,"")+e;case 5495:case 3959:return su(e,/(image-set\([^]*)/,Kl+"$1$`$1");case 4968:return su(su(e,/(.+:)(flex-)?(.*)/,Kl+"box-pack:$3"+Yl+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Kl+e+e;case 4095:case 3583:case 4068:case 2532:return su(e,/(.+)-inline(.+)/,Kl+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(cu(e)-1-t>6)switch(lu(e,t+1)){case 109:if(45!==lu(e,t+4))break;case 102:return su(e,/(.+:)(.+)-([^]+)/,"$1"+Kl+"$2-$3$1"+Jl+(108==lu(e,t+3)?"$3":"$2-$3"))+e;case 115:return~au(e,"stretch")?qu(su(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==lu(e,t+1))break;case 6444:switch(lu(e,cu(e)-3-(~au(e,"!important")&&10))){case 107:return su(e,":",":"+Kl)+e;case 101:return su(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Kl+(45===lu(e,14)?"inline-":"")+"box$3$1"+Kl+"$2$3$1"+Yl+"$2box$3")+e}break;case 5936:switch(lu(e,t+11)){case 114:return Kl+e+Yl+su(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Kl+e+Yl+su(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Kl+e+Yl+su(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Kl+e+Yl+e+e}return e}var ec,tc,nc="undefined"!=typeof document,ic=nc?void 0:(ec=function(){return Vu((function(){var e={};return function(t){return e[t]}}))},tc=new WeakMap,function(e){if(tc.has(e))return tc.get(e);var t=ec(e);return tc.set(e,t),t}),rc=[function(e,t,n,i){if(e.length>-1&&!e.return)switch(e.type){case eu:e.return=qu(e.value,e.length);break;case tu:return Du([wu(e,{value:su(e.value,"@","@"+Kl)})],i);case ql:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Du([wu(e,{props:[su(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return Du([wu(e,{props:[su(t,/:(plac\w+)/,":"+Kl+"input-$1")]}),wu(e,{props:[su(t,/:(plac\w+)/,":-moz-$1")]}),wu(e,{props:[su(t,/:(plac\w+)/,Yl+"input-$1")]})],i)}return""}))}}],oc=function(e){var t=e.key;if("production"!==process.env.NODE_ENV&&!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");if(nc&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||rc;if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var r,o,s={},a=[];nc&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=0;s--){var a=o[s];if(a.line css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":if("production"!==process.env.NODE_ENV){var a=[],l=n.replace(Vs,(function(e,t,n){var i="animation"+a.length;return a.push("const "+i+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+i+"}"}));a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+l+"`")}}if(null==t)return n;var c=t[n];return void 0!==c?c:n}var na,ia,ra=/label:\s*([^\s;\n{]+)\s*(;|$)/g;"production"!==process.env.NODE_ENV&&(na=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var oa=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i=!0,r="";ia=void 0;var o,s=e[0];null==s||void 0===s.raw?(i=!1,r+=ta(n,t,s)):("production"!==process.env.NODE_ENV&&void 0===s[0]&&console.error(Gs),r+=s[0]);for(var a=1;a=4;++i,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+c;return"production"!==process.env.NODE_ENV?{name:u,styles:r,map:o,next:ia,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:u,styles:r,next:ia}},sa="undefined"!=typeof document,aa=function(e){return e()},la=!!a.useInsertionEffect&&a.useInsertionEffect,ca=sa&&la||aa,ua=la||e.useLayoutEffect,ha="undefined"!=typeof document,da={}.hasOwnProperty,fa=e.createContext("undefined"!=typeof HTMLElement?ls({key:"css"}):null);"production"!==process.env.NODE_ENV&&(fa.displayName="EmotionCacheContext"),fa.Provider;var ga=function(t){return e.forwardRef((function(n,i){var r=e.useContext(fa);return t(n,r,i)}))};ha||(ga=function(t){return function(n){var i=e.useContext(fa);return null===i?(i=ls({key:"css"}),e.createElement(fa.Provider,{value:i},t(n,i))):t(n,i)}});var pa=e.createContext({});"production"!==process.env.NODE_ENV&&(pa.displayName="EmotionThemeContext");var ma=function(e){var t=e.split(".");return t[t.length-1]},va=function(e){var t=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);return t||(t=/^([A-Za-z0-9$.]+)@/.exec(e))?ma(t[1]):void 0},ba=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),ya=function(e){return e.replace(/\$/g,"-")},wa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ca="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",Sa=function(e,t){if("production"!==process.env.NODE_ENV&&"string"==typeof t.css&&-1!==t.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+t.css+"`");var n={};for(var i in t)da.call(t,i)&&(n[i]=t[i]);if(n[wa]=e,"production"!==process.env.NODE_ENV&&t.css&&("object"!=typeof t.css||"string"!=typeof t.css.name||-1===t.css.name.indexOf("-"))){var r=function(e){if(e)for(var t=e.split("\n"),n=0;n component."),s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(r&&(r+=" "),r+=s)}}return r};function _a(e,t,n){var i=[],r=Bs(e,i,n);return i.length<2?n:r+t(i)}var La=function(t){var n,i=t.cache,r=t.serializedArr,o=ca((function(){for(var e="",t=0;te.brand+"/"+e.version)).join(" "),Ga):navigator.userAgent}())}const Xa=Math.round;function Ua(e){return Da(e)?e:e.contextElement}const Ya={x:1,y:1};function Ja(e){const t=Ua(e);if(!Ha(t))return Ya;const n=t.getBoundingClientRect(),{width:i,height:r,fallback:o}=function(e){const t=Fa(e);let n=parseFloat(t.width),i=parseFloat(t.height);const r=e.offsetWidth,o=e.offsetHeight,s=Xa(n)!==r||Xa(i)!==o;return s&&(n=r,i=o),{width:n,height:i,fallback:s}}(t);let s=(o?Xa(n.width):n.width)/i,a=(o?Xa(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}function Ka(e,t,n,i){var r,o;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect(),a=Ua(e);let l=Ya;t&&(i?Da(i)&&(l=Ja(i)):l=Ja(e));const c=a?Pa(a):window,u=!Za()&&n;let h=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,d=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,g=s.height/l.y;if(a){const e=Pa(a),t=i&&Da(i)?Pa(i):i;let n=e.frameElement;for(;n&&i&&t!==e;){const e=Ja(n),t=n.getBoundingClientRect(),i=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(i.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(i.paddingTop))*e.y,h*=e.x,d*=e.y,f*=e.x,g*=e.y,h+=t.x,d+=t.y,n=Pa(n).frameElement}}return{width:f,height:g,top:d,right:h+f,bottom:d+g,left:h,x:h,y:d}}function Qa(e){if("html"===Wa(e))return e;const t=e.assignedSlot||e.parentNode||(za(e)?e.host:null)||function(e){return((Va(e)?e.ownerDocument:e.document)||window.document).documentElement}(e);return za(t)?t.host:t}function qa(e){const t=Qa(e);return function(e){return["html","body","#document"].includes(Wa(e))}(t)?e.ownerDocument.body:Ha(t)&&ja(t)?t:qa(t)}function el(e,t){var n;void 0===t&&(t=[]);const i=qa(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Pa(i);return r?t.concat(o,o.visualViewport||[],ja(i)?i:[]):t.concat(i,el(i))}var tl="undefined"!=typeof document?e.useLayoutEffect:e.useEffect,nl=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],il=function(){};function rl(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ol(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r-1}function ul(e){return cl(e)?window.pageYOffset:e.scrollTop}function hl(e,t){cl(e)?window.scrollTo(0,t):e.scrollTop=t}function dl(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function fl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:il,r=ul(e),o=t-r,s=10,a=0;function l(){var t=dl(a+=s,r,o,n);hl(e,t),an.bottom?hl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):i.top-r=g)return{placement:"bottom",maxHeight:t};if(A>=g&&!s)return o&&fl(l,R,E),{placement:"bottom",maxHeight:t};if(!s&&A>=i||s&&S>=i)return o&&fl(l,R,E),{placement:"bottom",maxHeight:s?S-y:A-y};if("auto"===r||s){var k=t,$=s?C:x;return $>=i&&(k=Math.min($-y-a,t)),{placement:"top",maxHeight:k}}if("bottom"===r)return o&&hl(l,R),{placement:"bottom",maxHeight:t};break;case"top":if(C>=g)return{placement:"top",maxHeight:t};if(x>=g&&!s)return o&&fl(l,I,E),{placement:"top",maxHeight:t};if(!s&&x>=i||s&&C>=i){var _=t;return(!s&&x>=i||s&&C>=i)&&(_=s?C-w:x-w),o&&fl(l,I,E),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}var xl=function(e){return"auto"===e?"bottom":e},Al=e.createContext(null),Rl=function(t){var n=t.children,i=t.minMenuHeight,r=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,c=(e.useContext(Al)||{}).setPortalPlacement,u=e.useRef(null),h=Fr(e.useState(r),2),d=h[0],f=h[1],g=Fr(e.useState(null),2),p=g[0],m=g[1],v=l.spacing.controlHeight;return tl((function(){var e=u.current;if(e){var t="fixed"===s,n=Sl({maxHeight:r,menuEl:e,minHeight:i,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:v});f(n.maxHeight),m(n.placement),null==c||c(n.placement)}}),[r,o,s,a,i,c,v]),n({ref:u,placerProps:Nr(Nr({},t),{},{placement:p||xl(o),maxHeight:d})})},Il=function(e,t){var n=e.theme,i=n.spacing.baseUnit,r=n.colors;return Nr({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*i,"px ").concat(3*i,"px")})},El=Il,kl=Il,$l=function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({},ll(e,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)};$l.defaultProps={children:"No options"};var _l=function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({},ll(e,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)};_l.defaultProps={children:"Loading..."};var Ll,Tl=["size"];var Ml,Ol,Nl="production"===process.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+XG4pID0+IHtcbiAgY29uc3QgeyBpbm5lclByb3BzLCBpc1J0bCB9ID0gcHJvcHM7XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2xvYWRpbmdJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgICAgey4uLmlubmVyUHJvcHN9XG4gICAgPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezB9IG9mZnNldD17aXNSdGx9IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MTYwfSBvZmZzZXQgLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXszMjB9IG9mZnNldD17IWlzUnRsfSAvPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkxvYWRpbmdJbmRpY2F0b3IuZGVmYXVsdFByb3BzID0geyBzaXplOiA0IH07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},Bl=function(e){var t=e.size,n=Wr(e,Tl);return Ra("svg",Dr({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Nl},n))},Pl=function(e){return Ra(Bl,Dr({size:20},e),Ra("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Fl=function(e){return Ra(Bl,Dr({size:20},e),Ra("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Wl=function(e,t){var n=e.isFocused,i=e.theme,r=i.spacing.baseUnit,o=i.colors;return Nr({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*r,":hover":{color:n?o.neutral80:o.neutral40}})},Gl=Wl,Hl=Wl,Dl=function(){var e=ka.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Ll||(Ml=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Ol||(Ol=Ml.slice(0)),Ll=Object.freeze(Object.defineProperties(Ml,{raw:{value:Object.freeze(Ol)}})))),Vl=function(e){var t=e.delay,n=e.offset;return Ra("span",{css:ka({animation:"".concat(Dl," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===process.env.NODE_ENV?"":";label:LoadingDot;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+XG4pID0+IHtcbiAgY29uc3QgeyBpbm5lclByb3BzLCBpc1J0bCB9ID0gcHJvcHM7XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2xvYWRpbmdJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgICAgey4uLmlubmVyUHJvcHN9XG4gICAgPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezB9IG9mZnNldD17aXNSdGx9IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MTYwfSBvZmZzZXQgLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXszMjB9IG9mZnNldD17IWlzUnRsfSAvPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkxvYWRpbmdJbmRpY2F0b3IuZGVmYXVsdFByb3BzID0geyBzaXplOiA0IH07XG4iXX0= */")})},zl=function(e){var t=e.innerProps,n=e.isRtl;return Ra("div",Dr({},ll(e,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ra(Vl,{delay:0,offset:n}),Ra(Vl,{delay:160,offset:!0}),Ra(Vl,{delay:320,offset:!n}))};zl.defaultProps={size:4};var jl=["data"],Zl=["innerRef","isDisabled","isHidden","inputClassName"],Xl={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Ul={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Nr({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Xl)},Yl=function(e){return Nr({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Xl)},Jl=function(e){var t=e.children,n=e.innerProps;return Ra("div",n,t)};var Kl={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({},ll(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ra(Pl,null))},Control:function(e){var t=e.children,n=e.isDisabled,i=e.isFocused,r=e.innerRef,o=e.innerProps,s=e.menuIsOpen;return Ra("div",Dr({ref:r},ll(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":i,"control--menu-is-open":s}),o),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({},ll(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ra(Fl,null))},DownChevron:Fl,CrossIcon:Pl,Group:function(e){var t=e.children,n=e.cx,i=e.getStyles,r=e.getClassNames,o=e.Heading,s=e.headingProps,a=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Ra("div",Dr({},ll(e,"group",{group:!0}),a),Ra(o,Dr({},s,{selectProps:u,theme:c,getStyles:i,getClassNames:r,cx:n}),l),Ra("div",null,t))},GroupHeading:function(e){var t=al(e);t.data;var n=Wr(t,jl);return Ra("div",Dr({},ll(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({},ll(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ra("span",Dr({},t,ll(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,i=al(e),r=i.innerRef,o=i.isDisabled,s=i.isHidden,a=i.inputClassName,l=Wr(i,Zl);return Ra("div",Dr({},ll(e,"input",{"input-container":!0}),{"data-value":n||""}),Ra("input",Dr({className:t({input:!0},a),ref:r,style:Yl(s),disabled:o},l)))},LoadingIndicator:zl,Menu:function(e){var t=e.children,n=e.innerRef,i=e.innerProps;return Ra("div",Dr({},ll(e,"menu",{menu:!0}),{ref:n},i),t)},MenuList:function(e){var t=e.children,n=e.innerProps,i=e.innerRef,r=e.isMulti;return Ra("div",Dr({},ll(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:i},n),t)},MenuPortal:function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,l=t.menuPosition,c=e.useRef(null),u=e.useRef(null),h=Fr(e.useState(xl(a)),2),d=h[0],f=h[1],g=e.useMemo((function(){return{setPortalPlacement:f}}),[]),p=Fr(e.useState(null),2),m=p[0],v=p[1],b=e.useCallback((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||v({offset:n,rect:e})}}),[o,l,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);tl((function(){b()}),[b]);var y=e.useCallback((function(){"function"==typeof u.current&&(u.current(),u.current=null),o&&c.current&&(u.current=function(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=i,l=r&&!a,c=l||o?[...Da(e)?el(e):e.contextElement?el(e.contextElement):[],...el(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));let u,h=null;if(s){let i=!0;h=new ResizeObserver((()=>{i||n(),i=!1})),Da(e)&&!a&&h.observe(e),Da(e)||!e.contextElement||a||h.observe(e.contextElement),h.observe(t)}let d=a?Ka(e):null;return a&&function t(){const i=Ka(e);!d||i.x===d.x&&i.y===d.y&&i.width===d.width&&i.height===d.height||n(),d=i,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(u)}}(o,c.current,b,{elementResize:"ResizeObserver"in window}))}),[o,b]);tl((function(){y()}),[y]);var w=e.useCallback((function(e){c.current=e,y()}),[y]);if(!n&&"fixed"!==l||!m)return null;var C=Ra("div",Dr({ref:w},ll(Nr(Nr({},t),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return Ra(Al.Provider,{value:g},n?i.createPortal(C,n):C)},LoadingMessage:_l,NoOptionsMessage:$l,MultiValue:function(e){var t=e.children,n=e.components,i=e.data,r=e.innerProps,o=e.isDisabled,s=e.removeProps,a=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Ra(l,{data:i,innerProps:Nr(Nr({},ll(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),r),selectProps:a},Ra(c,{data:i,innerProps:Nr({},ll(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),Ra(u,{data:i,innerProps:Nr(Nr({},ll(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},MultiValueContainer:Jl,MultiValueLabel:Jl,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({role:"button"},n),t||Ra(Pl,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,i=e.isFocused,r=e.isSelected,o=e.innerRef,s=e.innerProps;return Ra("div",Dr({},ll(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":i,"option--is-selected":r}),{ref:o,"aria-disabled":n},s),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Ra("div",Dr({},ll(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,i=e.isDisabled,r=e.isRtl;return Ra("div",Dr({},ll(e,"container",{"--is-disabled":i,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,i=e.innerProps;return Ra("div",Dr({},ll(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),i),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,i=e.isMulti,r=e.hasValue;return Ra("div",Dr({},ll(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":r}),n),t)}},Ql=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ql(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(i,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,i=e.options,r=e.label,o=void 0===r?"":r,s=e.selectValue,a=e.isDisabled,l=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(o," focused, ").concat(c(s,n),".");if("menu"===t){var u=a?" disabled":"",h="".concat(l?"selected":"focused").concat(u);return"option ".concat(o," ").concat(h,", ").concat(c(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ic=function(t){var n=t.ariaSelection,i=t.focusedOption,r=t.focusedValue,o=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,c=t.id,u=l.ariaLiveMessages,h=l.getOptionLabel,d=l.inputValue,f=l.isMulti,g=l.isOptionDisabled,p=l.isSearchable,m=l.menuIsOpen,v=l.options,b=l.screenReaderStatus,y=l.tabSelectsValue,w=l["aria-label"],C=l["aria-live"],S=e.useMemo((function(){return Nr(Nr({},nc),u||{})}),[u]),x=e.useMemo((function(){var e,t="";if(n&&S.onChange){var i=n.option,r=n.options,o=n.removedValue,s=n.removedValues,l=n.value,c=o||i||(e=l,Array.isArray(e)?null:e),u=c?h(c):"",d=r||s||void 0,f=d?d.map(h):[],p=Nr({isDisabled:c&&g(c,a),label:u,labels:f},n);t=S.onChange(p)}return t}),[n,S,g,a,h]),A=e.useMemo((function(){var e="",t=i||r,n=!!(i&&a&&a.includes(i));if(t&&S.onFocus){var s={focused:t,label:h(t),isDisabled:g(t,a),isSelected:n,options:o,context:t===i?"menu":"value",selectValue:a};e=S.onFocus(s)}return e}),[i,r,h,g,S,o,a]),R=e.useMemo((function(){var e="";if(m&&v.length&&S.onFilter){var t=b({count:o.length});e=S.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,m,S,v,b]),I=e.useMemo((function(){var e="";if(S.guidance){var t=r?"value":m?"menu":"input";e=S.guidance({"aria-label":w,context:t,isDisabled:i&&g(i,a),isMulti:f,isSearchable:p,tabSelectsValue:y})}return e}),[w,i,r,f,g,p,m,S,a,y]),E="".concat(A," ").concat(R," ").concat(I),k=Ra(e.Fragment,null,Ra("span",{id:"aria-selection"},x),Ra("span",{id:"aria-context"},E)),$="initial-input-focus"===(null==n?void 0:n.action);return Ra(e.Fragment,null,Ra(tc,{id:c},$&&k),Ra(tc,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text"},s&&!$&&k))},rc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],oc=new RegExp("["+rc.map((function(e){return e.letters})).join("")+"]","g"),sc={},ac=0;ac1?t-1:0),i=1;i0,p=h-d-c,m=!1;p>t&&a.current&&(r&&r(e),a.current=!1),g&&l.current&&(s&&s(e),l.current=!1),g&&t>p?(i&&!a.current&&i(e),f.scrollTop=h,m=!0,a.current=!0):!g&&-t>c&&(o&&!l.current&&o(e),f.scrollTop=0,m=!0,l.current=!0),m&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[i,r,o,s]),d=e.useCallback((function(e){h(e,e.deltaY)}),[h]),f=e.useCallback((function(e){c.current=e.changedTouches[0].clientY}),[]),g=e.useCallback((function(e){var t=c.current-e.changedTouches[0].clientY;h(e,t)}),[h]),p=e.useCallback((function(e){if(e){var t=!!yl&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",g,t)}}),[g,f,d]),m=e.useCallback((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",g,!1))}),[g,f,d]);return e.useEffect((function(){if(n){var e=u.current;return p(e),function(){m(e)}}}),[n,p,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),s=function(t){var n=t.isEnabled,i=t.accountForScrollbars,r=void 0===i||i,o=e.useRef({}),s=e.useRef(null),a=e.useCallback((function(e){if(Sc){var t=document.body,n=t&&t.style;if(r&&mc.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&xc<1){var i=parseInt(o.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+i||0;Object.keys(vc).forEach((function(e){var t=vc[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&Cc()&&(t.addEventListener("touchmove",bc,Ac),e&&(e.addEventListener("touchstart",wc,Ac),e.addEventListener("touchmove",yc,Ac))),xc+=1}}),[r]),l=e.useCallback((function(e){if(Sc){var t=document.body,n=t&&t.style;xc=Math.max(xc-1,0),r&&xc<1&&mc.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Cc()&&(t.removeEventListener("touchmove",bc,Ac),e&&(e.removeEventListener("touchstart",wc,Ac),e.removeEventListener("touchmove",yc,Ac)))}}),[r]);return e.useEffect((function(){if(n){var e=s.current;return a(e),function(){l(e)}}}),[n,a,l]),function(e){s.current=e}}({isEnabled:i});return Ra(e.Fragment,null,i&&Ra("div",{onClick:Rc,css:Ic}),n((function(e){o(e),s(e)})))}var kc,$c="production"===process.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZTogc3RyaW5nO1xuICByZWFkb25seSBvbkZvY3VzOiBGb2N1c0V2ZW50SGFuZGxlcjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0+ID0gKHsgbmFtZSwgb25Gb2N1cyB9KSA9PiAoXG4gIDxpbnB1dFxuICAgIHJlcXVpcmVkXG4gICAgbmFtZT17bmFtZX1cbiAgICB0YWJJbmRleD17LTF9XG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},_c=function(e){var t=e.name,n=e.onFocus;return Ra("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:$c,value:"",onChange:function(){}})},Lc=function(e){return e.label},Tc=function(e){return e.value},Mc={clearIndicator:Hl,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,i=e.isFocused,r=e.theme,o=r.colors,s=r.borderRadius;return Nr({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:i?o.primary:o.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},dropdownIndicator:Gl,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,i=n.colors,r=n.spacing;return Nr({label:"group",cursor:"default",display:"block"},t?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,i=e.theme,r=i.spacing.baseUnit,o=i.colors;return Nr({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,i=e.value,r=e.theme,o=r.spacing,s=r.colors;return Nr(Nr({visibility:n?"hidden":"visible",transform:i?"translateZ(0)":""},Ul),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,i=e.size,r=e.theme,o=r.colors,s=r.spacing.baseUnit;return Nr({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*s})},loadingMessage:kl,menu:function(e,t){var n,i=e.placement,r=e.theme,o=r.borderRadius,s=r.spacing,a=r.colors;return Nr((Mr(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(i),"100%"),Mr(n,"position","absolute"),Mr(n,"width","100%"),Mr(n,"zIndex",1),n),t?{}:{backgroundColor:a.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,i=e.theme.spacing.baseUnit;return Nr({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:i,paddingTop:i})},menuPortal:function(e){var t=e.rect,n=e.offset,i=e.position;return{left:t.left,position:i,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,i=n.spacing,r=n.borderRadius,o=n.colors;return Nr({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:r/2,margin:i.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,i=n.borderRadius,r=n.colors,o=e.cropWithEllipsis;return Nr({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:i/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,i=n.spacing,r=n.borderRadius,o=n.colors,s=e.isFocused;return Nr({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:s?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:El,option:function(e,t){var n=e.isDisabled,i=e.isFocused,r=e.isSelected,o=e.theme,s=o.spacing,a=o.colors;return Nr({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?a.primary:i?a.primary25:"transparent",color:n?a.neutral20:r?a.neutral0:"inherit",padding:"".concat(2*s.baseUnit,"px ").concat(3*s.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,i=n.spacing,r=n.colors;return Nr({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,i=e.theme,r=i.spacing,o=i.colors;return Nr({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,i=e.isMulti,r=e.hasValue,o=e.selectProps.controlShouldRenderValue;return Nr({alignItems:"center",display:i&&r&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Oc={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Nc={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:pl(),captureMenuScroll:!pl(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Nr({ignoreCase:!0,ignoreAccents:!0,stringify:fc,trim:!0,matchFrom:"any"},kc),i=n.ignoreCase,r=n.ignoreAccents,o=n.stringify,s=n.trim,a=n.matchFrom,l=s?dc(t):t,c=s?dc(o(e)):o(e);return i&&(l=l.toLowerCase(),c=c.toLowerCase()),r&&(l=hc(l),c=uc(c)),"start"===a?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:Lc,getOptionValue:Tc,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Bc(e,t,n,i){return{type:"option",data:t,isDisabled:Dc(e,t,n),isSelected:Vc(e,t,n),label:Gc(e,t),value:Hc(e,t),index:i}}function Pc(e,t){return e.options.map((function(n,i){if("options"in n){var r=n.options.map((function(n,i){return Bc(e,n,t,i)})).filter((function(t){return Wc(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:i}:void 0}var o=Bc(e,n,t,i);return Wc(e,o)?o:void 0})).filter(wl)}function Fc(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Yr(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Wc(e,t){var n=e.inputValue,i=void 0===n?"":n,r=t.data,o=t.isSelected,s=t.label,a=t.value;return(!jc(e)||!o)&&zc(e,{label:s,value:a,data:r},i)}var Gc=function(e,t){return e.getOptionLabel(t)},Hc=function(e,t){return e.getOptionValue(t)};function Dc(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Vc(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=Hc(e,t);return n.some((function(t){return Hc(e,t)===i}))}function zc(e,t,n){return!e.filterOption||e.filterOption(t,n)}var jc=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Zc=1,Xc=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zr(e,t)}(s,e.Component);var n,i,r,o=Ur(s);function s(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=o.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var i=t.props,r=i.onChange,o=i.name;n.name=o,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,i){var r=t.props,o=r.closeMenuOnSelect,s=r.isMulti,a=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:a}),o&&(t.setState({inputIsHiddenAfterUpdate:!s}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:i})},t.selectOption=function(e){var n=t.props,i=n.blurInputOnSelect,r=n.isMulti,o=n.name,s=t.state.selectValue,a=r&&t.isOptionSelected(e,s),l=t.isOptionDisabled(e,s);if(a){var c=t.getOptionValue(e);t.setValue(s.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:o});r?t.setValue([].concat(Yr(s),[e]),"select-option",e):t.setValue(e,"select-option")}i&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,i=t.state.selectValue,r=t.getOptionValue(e),o=i.filter((function(e){return t.getOptionValue(e)!==r})),s=Cl(n,o,o[0]||null);t.onChange(s,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Cl(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,i=n[n.length-1],r=n.slice(0,n.length-1),o=Cl(e,r,r[0]||null);t.onChange(o,{action:"pop-value",removedValue:i})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),i=0;i5||o>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,i=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(i,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return jc(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,i=n.isMulti,r=n.backspaceRemovesValue,o=n.escapeClearsValue,s=n.inputValue,a=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,h=n.tabSelectsValue,d=n.openMenuOnFocus,f=t.state,g=f.focusedOption,p=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!i||s)return;t.focusValue("previous");break;case"ArrowRight":if(!i||s)return;t.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(p)t.removeValue(p);else{if(!r)return;i?t.popValue():a&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!h||!g||d&&t.isOptionSelected(g,m))return;t.selectOption(g);break;case"Enter":if(229===e.keyCode)break;if(c){if(!g)return;if(t.isComposing)return;t.selectOption(g);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:s}),t.onMenuClose()):a&&o&&t.clearValue();break;case" ":if(s)return;if(!c){t.openMenu("first");break}if(!g)return;t.selectOption(g);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++Zc),t.state.selectValue=sl(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),i=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[i]}return t}return n=s,i=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&gl(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,i=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&i&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(gl(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,i=n.selectValue,r=n.isFocused,o=this.buildFocusableOptions(),s="first"===e?0:o.length-1;if(!this.props.isMulti){var a=o.indexOf(i[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[s]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,i=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(i);i||(r=-1);var o=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===r?0:-1===r?o:r-1;break;case"next":r>-1&&r0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var r=0,o=i.indexOf(n);n||(o=-1),"up"===e?r=o>0?o-1:i.length-1:"down"===e?r=(o+1)%i.length:"pageup"===e?(r=o-t)<0&&(r=0):"pagedown"===e?(r=o+t)>i.length-1&&(r=i.length-1):"last"===e&&(r=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[r],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Oc):Nr(Nr({},Oc),this.props.theme):Oc}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getClassNames,r=this.getValue,o=this.selectOption,s=this.setValue,a=this.props,l=a.isMulti,c=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:i,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:o,selectProps:a,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Dc(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Vc(this.props,e,t)}},{key:"filterOption",value:function(e,t){return zc(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:i})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,r=e.inputValue,o=e.tabIndex,s=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,h=this.state,d=h.inputIsHidden,f=h.ariaSelection,g=this.commonProps,p=i||this.getElementId("input"),m=Nr(Nr(Nr({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox"},l&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?a.createElement(u,Dr({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:s,type:"text",value:r},m)):a.createElement(pc,Dr({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:il,onFocus:this.onInputFocus,disabled:t,tabIndex:o,inputMode:"none",form:s,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,r=t.MultiValueLabel,o=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,h=u.controlShouldRenderValue,d=u.isDisabled,f=u.isMulti,g=u.inputValue,p=u.placeholder,m=this.state,v=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!h)return g?null:a.createElement(l,Dr({},c,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),p);if(f)return v.map((function(t,s){var l=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return a.createElement(n,Dr({},c,{components:{Container:i,Label:r,Remove:o},isFocused:l,isDisabled:d,key:u,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(g)return null;var w=v[0];return a.createElement(s,Dr({},c,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,r=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||r)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(e,Dr({},t,{innerProps:s,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,r=n.isLoading,o=this.state.isFocused;return e&&r?a.createElement(e,Dr({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused;return a.createElement(n,Dr({},i,{isDisabled:r,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(e,Dr({},t,{innerProps:r,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,r=t.Menu,o=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,h=this.commonProps,d=this.state.focusedOption,f=this.props,g=f.captureMenuScroll,p=f.inputValue,m=f.isLoading,v=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,C=f.menuPlacement,S=f.menuPosition,x=f.menuPortalTarget,A=f.menuShouldBlockScroll,R=f.menuShouldScrollIntoView,I=f.noOptionsMessage,E=f.onMenuScrollToTop,k=f.onMenuScrollToBottom;if(!w)return null;var $,_=function(t,n){var i=t.type,r=t.data,o=t.isDisabled,s=t.isSelected,l=t.label,c=t.value,f=d===r,g=o?void 0:function(){return e.onOptionHover(r)},p=o?void 0:function(){return e.selectOption(r)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:p,onMouseMove:g,onMouseOver:g,tabIndex:-1};return a.createElement(u,Dr({},h,{innerProps:v,data:r,isDisabled:o,isSelected:s,key:m,label:l,type:i,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())$=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,o=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return a.createElement(n,Dr({},h,{key:l,data:r,options:o,Heading:i,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return _(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return _(t,"".concat(t.index))}));else if(m){var L=v({inputValue:p});if(null===L)return null;$=a.createElement(l,h,L)}else{var T=I({inputValue:p});if(null===T)return null;$=a.createElement(c,h,T)}var M={minMenuHeight:b,maxMenuHeight:y,menuPlacement:C,menuPosition:S,menuShouldScrollIntoView:R},O=a.createElement(Rl,Dr({},h,M),(function(t){var n=t.ref,i=t.placerProps,s=i.placement,l=i.maxHeight;return a.createElement(r,Dr({},h,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:s}),a.createElement(Ec,{captureEnabled:g,onTopArrive:E,onBottomArrive:k,lockEnabled:A},(function(t){return a.createElement(o,Dr({},h,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:l,focusedOption:d}),$)})))}));return x||"fixed"===S?a.createElement(s,Dr({},h,{appendTo:x,controlElement:this.controlRef,menuPlacement:C,menuPosition:S}),O):O}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,r=t.isMulti,o=t.name,s=t.required,l=this.state.selectValue;if(o&&!i){if(s&&!this.hasValue())return a.createElement(_c,{name:o,onFocus:this.onValueInputFocus});if(r){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return a.createElement("input",{name:o,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return a.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):a.createElement("input",{name:o,type:"hidden",value:""});return a.createElement("div",null,u)}var h=l[0]?this.getOptionValue(l[0]):"";return a.createElement("input",{name:o,type:"hidden",value:h})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,r=t.focusedValue,o=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return a.createElement(ic,Dr({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:r,isFocused:o,selectValue:s,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,r=e.ValueContainer,o=this.props,s=o.className,l=o.id,c=o.isDisabled,u=o.menuIsOpen,h=this.state.isFocused,d=this.commonProps=this.getCommonProps();return a.createElement(i,Dr({},d,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:h}),this.renderLiveRegion(),a.createElement(t,Dr({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:h,menuIsOpen:u}),a.createElement(r,Dr({},d,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),a.createElement(n,Dr({},d,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,s=t.isFocused,a=t.prevWasFocused,l=e.options,c=e.value,u=e.menuIsOpen,h=e.inputValue,d=e.isMulti,f=sl(c),g={};if(n&&(c!==n.value||l!==n.options||u!==n.menuIsOpen||h!==n.inputValue)){var p=u?function(e,t){return Fc(Pc(e,t))}(e,f):[],m=i?function(e,t){var n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i-1?n:t[0]}(t,p);g={selectValue:f,focusedOption:v,focusedValue:m,clearFocusValueOnUpdate:!1}}var b=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},y=o,w=s&&a;return s&&!w&&(y={value:Cl(d,f,f[0]||null),options:f,action:"initial-input-focus"},w=!a),"initial-input-focus"===(null==o?void 0:o.action)&&(y=null),Nr(Nr(Nr({},g),b),{},{prevProps:e,ariaSelection:y,prevWasFocused:w})}}],i&&Vr(n.prototype,i),r&&Vr(n,r),s}();Xc.defaultProps=Nc;var Uc=e.forwardRef((function(e,t){var n=Hr(e);return a.createElement(Xc,Dr({ref:t},n))}));function Yc(e){var t=e.data,n=t.label,i=t.icon,r=t.tooltip;return l.default.createElement(Kl.Option,c({},e,{className:i?"has-icon":bt}),l.default.createElement(Kt,{extraClass:"option-tooltip",data:r},l.default.createElement("div",{className:"option-wrapper"},i,n)))}function Jc(t){var n,i=t.children,r=void 0===i?bt:i,o=t.extraClasses,s=void 0===o?bt:o,a=t.style,c=void 0===a?{}:a,u=e.useRef(null),d=h(e.useState(bt),2),f=d[0],g=d[1];e.useEffect((function(){var e=function(){u.current&&tn.isEllipsisActive(u.current)?g(r):g(bt)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[r]);var p=v(((n={})[s]=!0,n["span-tooltip"]=!0,n));return l.default.createElement(Kt,{data:null==f?void 0:f.toString()},l.default.createElement("span",{className:p,ref:u,style:c},r))}function Kc(e){var t=e.data,n=t.icon,i=t.label;return l.default.createElement(Kl.SingleValue,c({},e),n,l.default.createElement(Jc,{extraClasses:"react-select__single-value-label"},i))}function Qc(e){var t=e.data,n=t.chipLabel,i=t.chipTooltip,r=t.label;return l.default.createElement(Kl.MultiValue,c({},e),l.default.createElement(Kt,{data:i||r,placement:"left"},l.default.createElement("span",null,n||r)))}function qc(e){var t=e.selectProps;return l.default.createElement(Kt,{data:t.clearText||bt},l.default.createElement("div",null,l.default.createElement(Kl.ClearIndicator,c({},e))))}function eu(n){var i,r=n.onChange,o=void 0===r?yt:r,s=n.options,a=n.value,d=n.wrapperClass,f=n.isMulti,g=n.label,p=n.disabled,m=n.sortOptions,b=n.error,y=n.placeholder,w=n.info,C=n.isRequired,S=n.redInfo,x=void 0===S?yt:S,A=n.isClearable,R=void 0===A||A,I=n.autoFocus,E=void 0!==I&&I,k=n.groupedOptions,_=void 0!==k&&k,L=u(n,["onChange","options","value","wrapperClass","isMulti","label","disabled","sortOptions","error","placeholder","info","isRequired","redInfo","isClearable","autoFocus","groupedOptions"]),T=h(e.useState(null),2),M=T[0],O=T[1],N=e.useMemo((function(){return _?s.reduce((function(e,t){return t.options.forEach((function(t){var n=t.label,i=t.value;return e.push(tn.formatOption(n,i))})),e}),[]):[]}),[JSON.stringify(s)]);e.useEffect((function(){if(O(m?tn.insensitiveSort(s,"label"):s),f){if(a){var e=a.filter((function(e){return s.find((function(t){return t.value===e}))}));tn.isEmpty(e)?o([]):e.length!==a.length&&o(e)}}else a&&!s.find((function(e){return e.value===a}))&&o(bt)}),[JSON.stringify(s)]);var B,P,F=v(((i={"select-wrapper":!0})[d]=!0,i["select-wrapper-is-multi"]=f,i["has-error"]=b,i["no-label"]=!g,i));return l.default.createElement(t.FormControl,{variant:"outlined",className:F},l.default.createElement("span",{className:"select-label field-1-label-content"},g,C&&l.default.createElement("span",{className:"required-star"},"*"),!!w&&l.default.createElement(Kt,{data:w},l.default.createElement($,null))),l.default.createElement(Uc,c({},L,{menuPosition:"fixed",isDisabled:p,styles:(B=!!b,P=!!g,{menuPortal:function(e,t){return c(c({},e),{zIndex:9999,top:t.offset===t.rect.top?t.offset+6:t.offset-6})},menu:function(e){return c(c({},e),{boxShadow:"0 0 0 2px var(--main-color)",backgroundColor:"var(--neutral-t4)"})},control:function(e,t){return c(c(c(c({},e),{height:P?48:32,minHeight:P?48:32}),B?{boxShadow:"0 0 0 1px var(--focus-key)"}:{boxShadow:t.isFocused?"0 0 0 1px var(--main-color)":0}),B?{borderColor:"var(--focus-key)","&:hover":{borderColor:"state.isFocused"}}:{borderColor:t.isFocused?"var(--main-color)":"var(--ironhide-t1)","&:hover":{borderColor:t.isFocused?"var(--main-color)":"var(--ironhide-t1)"}})},clearIndicator:function(e,t){var n=t.isDisabled;return c(c({},e),{cursor:"pointer",color:n?"var(--ironhide-key)":"var(--main-color)",":hover":{color:n?"var(--ironhide-key)":"var(--main-color)"}})},indicatorSeparator:function(e,t){return c(c({},e),{backgroundColor:t.isFocused?"var(--main-color)":"var(--ironhide-t1)"})},dropdownIndicator:function(e,t){return c(c({},e),{color:t.isDisabled?"var(--ironhide-key)":"var(--main-color)",":hover":{color:t.isDisabled?"var(--ironhide-key)":"var(--main-color)"},">svg":{transform:t.selectProps.menuIsOpen&&"rotate(180deg)"}})},option:function(e,t){var n=t.isDisabled;return c(c({},e),{color:"var(--text-color)",opacity:n&&".5",backgroundColor:n?"transparent":"var(--neutral-t4)",":hover":{backgroundColor:n?"transparent":"var(--ironhide-t3)"}})}}),autoFocus:E,value:f?a?a.map((function(e){return s.find((function(t){return t.value===e}))})):bt:_?N.find((function(e){return e.value===a})):s.find((function(e){return e.value===a}))||bt,options:M,autosize:!0,isMulti:f,isClearable:f&&R,onChange:function(e){if(f)o(e.map((function(e){return e.value})));else{var t=e.value;o(t)}},classNamePrefix:"react-select",dropdownAlign:{offset:[0,0]},components:{Option:Yc,SingleValue:Kc,MultiValue:Qc,ClearIndicator:qc},menuPortalTarget:document.body,closeMenuOnSelect:!f,placeholder:y||"Select..."})),l.default.createElement("span",{className:"select-error capitalize-first-letter"},b||x(a)))}var tu=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],nu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=String(e).toLowerCase(),r=String(n.getOptionValue(t)).toLowerCase(),o=String(n.getOptionLabel(t)).toLowerCase();return r===i||o===i},iu={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,i){return!(!e||t.some((function(t){return nu(e,t,i)}))||n.some((function(t){return nu(e,t,i)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}};var ru=e.forwardRef((function(t,n){var i=function(t){var n=t.allowCreateWhileLoading,i=void 0!==n&&n,r=t.createOptionPosition,o=void 0===r?"last":r,s=t.formatCreateLabel,a=void 0===s?iu.formatCreateLabel:s,l=t.isValidNewOption,c=void 0===l?iu.isValidNewOption:l,u=t.getNewOptionData,h=void 0===u?iu.getNewOptionData:u,d=t.onCreateOption,f=t.options,g=void 0===f?[]:f,p=t.onChange,m=Wr(t,tu),v=m.getOptionValue,b=void 0===v?Tc:v,y=m.getOptionLabel,w=void 0===y?Lc:y,C=m.inputValue,S=m.isLoading,x=m.isMulti,A=m.value,R=m.name,I=e.useMemo((function(){return c(C,sl(A),g,{getOptionValue:b,getOptionLabel:w})?h(C,a(C)):void 0}),[a,h,w,b,C,c,g,A]),E=e.useMemo((function(){return!i&&S||!I?g:"first"===o?[I].concat(Yr(g)):[].concat(Yr(g),[I])}),[i,o,S,I,g]),k=e.useCallback((function(e,t){if("select-option"!==t.action)return p(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==I)p(e,t);else if(d)d(C);else{var i=h(C,C),r={action:"create-option",name:R,option:i};p(Cl(x,[].concat(Yr(sl(A)),[i]),i),r)}}),[h,C,x,R,I,d,p,A]);return Nr(Nr({},m),{},{options:E,onChange:k})}(Hr(t));return a.createElement(Xc,Dr({ref:n},i))}));var ou=l.default.forwardRef((function(e,t){var n,i=e.label,r=void 0===i?bt:i,o=e.onChange,s=e.value,a=void 0===s?bt:s,d=e.error,f=e.placeholder,g=e.wrapperClass,p=void 0===g?"":g,m=e.tooltip,b=e.Icon,y=e.type,w=e.info,C=e.isRequired,S=e.allowDecimal,x=u(e,["label","onChange","value","error","placeholder","wrapperClass","tooltip","Icon","type","info","isRequired","allowDecimal"]),A=h(Tr(!1),2),R=A[0],I=A[1];var E=v(((n={})[p]=!0,n["text-box-field"]=!0,n["has-error"]=!!d,n["no-label"]=!r,n["has-icon"]=!!b,n)),k=v({field__input:!0,"is-type-password":"password"===y});return l.default.createElement(Kt,{data:m},l.default.createElement("div",{className:E},b&&l.default.createElement(b,{className:"text-box-icon"}),l.default.createElement("input",c({onKeyDown:function(e){"number"!==y||"e"!==e.key&&"E"!==e.key&&"-"!==e.key&&"+"!==e.key&&(S||"."!==e.key)||e.preventDefault()},step:"any",autoComplete:"new-password",className:k,placeholder:f,value:null===a?bt:a,onChange:function(e){Number.isNaN(e.target.valueAsNumber)?o(e.target.value):o(e.target.valueAsNumber>=0?e.target.valueAsNumber:0)},ref:t,type:R&&"password"===y?"text":y},x)),"password"===y&&l.default.createElement("span",{className:"password-icon"},tn.getPasswordIcon(R,I)),l.default.createElement("span",{className:"field__label-wrap"},l.default.createElement("span",{className:"field__label field-1-label-content"},r,C&&l.default.createElement("span",{className:"required-star"},"*"),!!w&&l.default.createElement(Kt,{data:w},l.default.createElement($,null)))),l.default.createElement("span",{className:"text-box-error capitalize-first-letter"},d)))}));function su(e){var n=e.open,i=e.anchorEl,r=e.onClickAway,o=e.items,s=e.disablePortal;return l.default.createElement(t.Popper,{open:n,anchorEl:i,transition:!0,disablePortal:s,className:"popper-wrapper",nonce:void 0,onResize:void 0,onResizeCapture:void 0},(function(e){var n=e.TransitionProps;return l.default.createElement(t.Grow,c({},n,{style:{transformOrigin:"center top"}}),l.default.createElement(t.Paper,{className:"menu-popper"},l.default.createElement(t.ClickAwayListener,{onClickAway:r},l.default.createElement(t.MenuList,{disablePadding:!0},o.map((function(e){return e.hideMenu?null:l.default.createElement(Kt,{key:e.key||e.text,data:(n=e.disabled,i=e.tooltip,void 0===n&&(n=""),void 0===i&&(i=""),tn.isString(n)?n:tn.isEmpty(i)?bt:i)},l.default.createElement("div",{className:"menu-popper-item-wrapper dropdown-lines-1 ".concat(e.extraClass)},l.default.createElement(t.MenuItem,{disabled:!!e.disabled,className:"menu-popper-item",onClick:function(t){t.stopPropagation(),e.onClick(),r()}},e.content||e.text),l.default.createElement(t.Divider,{className:"separator"})));var n,i}))))))}))}su.defaultProps={disablePortal:!1},su.propTypes={};const au=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}];var lu=(e,t=au,n="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let i=e||"";t[0].minDiversity=0,t[0].minLength=0;const r=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];n&&r.push({regex:`[${n}]`,message:"symbol"});let o={};o.contains=r.filter((e=>new RegExp(`${e.regex}`).test(i))).map((e=>e.message)),o.length=i.length;let s=t.filter((e=>o.contains.length>=e.minDiversity)).filter((e=>o.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(o,s[0]),o};var cu=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],i=0;i css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":if("production"!==process.env.NODE_ENV){var a=[],l=n.replace(Dc,(function(e,t,n){var i="animation"+a.length;return a.push("const "+i+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+i+"}"}));a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+l+"`")}}if(null==t)return n;var u=t[n];return void 0!==u?u:n}var qc,eh,th=/label:\s*([^\s;\n{]+)\s*(;|$)/g;"production"!==process.env.NODE_ENV&&(qc=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var nh=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i=!0,r="";eh=void 0;var o,s=e[0];null==s||void 0===s.raw?(i=!1,r+=Qc(n,t,s)):("production"!==process.env.NODE_ENV&&void 0===s[0]&&console.error(Fc),r+=s[0]);for(var a=1;a=4;++i,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+u;return"production"!==process.env.NODE_ENV?{name:c,styles:r,map:o,next:eh,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:c,styles:r,next:eh}},ih="undefined"!=typeof document,rh=function(e){return e()},oh=!!o.useInsertionEffect&&o.useInsertionEffect,sh=ih&&oh||rh,ah=oh||e.useLayoutEffect,lh="undefined"!=typeof document,uh={}.hasOwnProperty,ch=e.createContext("undefined"!=typeof HTMLElement?oc({key:"css"}):null);"production"!==process.env.NODE_ENV&&(ch.displayName="EmotionCacheContext"),ch.Provider;var hh=function(t){return e.forwardRef((function(n,i){var r=e.useContext(ch);return t(n,r,i)}))};lh||(hh=function(t){return function(n){var i=e.useContext(ch);return null===i?(i=oc({key:"css"}),e.createElement(ch.Provider,{value:i},t(n,i))):t(n,i)}});var dh=e.createContext({});"production"!==process.env.NODE_ENV&&(dh.displayName="EmotionThemeContext");var fh=function(e){var t=e.split(".");return t[t.length-1]},gh=function(e){var t=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);return t||(t=/^([A-Za-z0-9$.]+)@/.exec(e))?fh(t[1]):void 0},ph=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),mh=function(e){return e.replace(/\$/g,"-")},vh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",bh="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",yh=function(e,t){if("production"!==process.env.NODE_ENV&&"string"==typeof t.css&&-1!==t.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+t.css+"`");var n={};for(var i in t)uh.call(t,i)&&(n[i]=t[i]);if(n[vh]=e,"production"!==process.env.NODE_ENV&&t.css&&("object"!=typeof t.css||"string"!=typeof t.css.name||-1===t.css.name.indexOf("-"))){var r=function(e){if(e)for(var t=e.split("\n"),n=0;n component."),s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(r&&(r+=" "),r+=s)}}return r};function Ih(e,t,n){var i=[],r=Mc(e,i,n);return i.length<2?n:r+t(i)}var kh=function(t){var n,i=t.cache,r=t.serializedArr,o=sh((function(){for(var e="",t=0;te.brand+"/"+e.version)).join(" "),Fh):navigator.userAgent}())}const zh=Math.round;function jh(e){return Wh(e)?e:e.contextElement}const Zh={x:1,y:1};function Xh(e){const t=jh(e);if(!Ph(t))return Zh;const n=t.getBoundingClientRect(),{width:i,height:r,fallback:o}=function(e){const t=Nh(e);let n=parseFloat(t.width),i=parseFloat(t.height);const r=e.offsetWidth,o=e.offsetHeight,s=zh(n)!==r||zh(i)!==o;return s&&(n=r,i=o),{width:n,height:i,fallback:s}}(t);let s=(o?zh(n.width):n.width)/i,a=(o?zh(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}function Uh(e,t,n,i){var r,o;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect(),a=jh(e);let l=Zh;t&&(i?Wh(i)&&(l=Xh(i)):l=Xh(e));const u=a?Oh(a):window,c=!Vh()&&n;let h=(s.left+(c&&(null==(r=u.visualViewport)?void 0:r.offsetLeft)||0))/l.x,d=(s.top+(c&&(null==(o=u.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,g=s.height/l.y;if(a){const e=Oh(a),t=i&&Wh(i)?Oh(i):i;let n=e.frameElement;for(;n&&i&&t!==e;){const e=Xh(n),t=n.getBoundingClientRect(),i=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(i.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(i.paddingTop))*e.y,h*=e.x,d*=e.y,f*=e.x,g*=e.y,h+=t.x,d+=t.y,n=Oh(n).frameElement}}return{width:f,height:g,top:d,right:h+f,bottom:d+g,left:h,x:h,y:d}}function Yh(e){if("html"===Bh(e))return e;const t=e.assignedSlot||e.parentNode||(Gh(e)?e.host:null)||function(e){return((Dh(e)?e.ownerDocument:e.document)||window.document).documentElement}(e);return Gh(t)?t.host:t}function Jh(e){const t=Yh(e);return function(e){return["html","body","#document"].includes(Bh(e))}(t)?e.ownerDocument.body:Ph(t)&&Hh(t)?t:Jh(t)}function Kh(e,t){var n;void 0===t&&(t=[]);const i=Jh(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Oh(i);return r?t.concat(o,o.visualViewport||[],Hh(i)?i:[]):t.concat(i,Kh(i))}var Qh="undefined"!=typeof document?e.useLayoutEffect:e.useEffect,qh=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ed=function(){};function td(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function nd(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r-1}function ad(e){return sd(e)?window.pageYOffset:e.scrollTop}function ld(e,t){sd(e)?window.scrollTo(0,t):e.scrollTop=t}function ud(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function cd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ed,r=ad(e),o=t-r,s=10,a=0;function l(){var t=ud(a+=s,r,o,n);ld(e,t),an.bottom?ld(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):i.top-r=g)return{placement:"bottom",maxHeight:t};if(A>=g&&!s)return o&&cd(l,E,I),{placement:"bottom",maxHeight:t};if(!s&&A>=i||s&&S>=i)return o&&cd(l,E,I),{placement:"bottom",maxHeight:s?S-y:A-y};if("auto"===r||s){var k=t,$=s?C:x;return $>=i&&(k=Math.min($-y-a,t)),{placement:"top",maxHeight:k}}if("bottom"===r)return o&&ld(l,E),{placement:"bottom",maxHeight:t};break;case"top":if(C>=g)return{placement:"top",maxHeight:t};if(x>=g&&!s)return o&&cd(l,R,I),{placement:"top",maxHeight:t};if(!s&&x>=i||s&&C>=i){var L=t;return(!s&&x>=i||s&&C>=i)&&(L=s?C-w:x-w),o&&cd(l,R,I),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}var wd=function(e){return"auto"===e?"bottom":e},Cd=e.createContext(null),Sd=function(t){var n=t.children,i=t.minMenuHeight,r=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,u=(e.useContext(Cd)||{}).setPortalPlacement,c=e.useRef(null),h=Fl(e.useState(r),2),d=h[0],f=h[1],g=Fl(e.useState(null),2),p=g[0],m=g[1],v=l.spacing.controlHeight;return Qh((function(){var e=c.current;if(e){var t="fixed"===s,n=yd({maxHeight:r,menuEl:e,minHeight:i,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:v});f(n.maxHeight),m(n.placement),null==u||u(n.placement)}}),[r,o,s,a,i,u,v]),n({ref:c,placerProps:Ol(Ol({},t),{},{placement:p||wd(o),maxHeight:d})})},xd=function(e,t){var n=e.theme,i=n.spacing.baseUnit,r=n.colors;return Ol({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*i,"px ").concat(3*i,"px")})},Ad=xd,Ed=xd,Rd=function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({},od(e,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)};Rd.defaultProps={children:"No options"};var Id=function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({},od(e,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)};Id.defaultProps={children:"Loading..."};var kd,$d=["size"];var Ld,_d,Td="production"===process.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+XG4pID0+IHtcbiAgY29uc3QgeyBpbm5lclByb3BzLCBpc1J0bCB9ID0gcHJvcHM7XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2xvYWRpbmdJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgICAgey4uLmlubmVyUHJvcHN9XG4gICAgPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezB9IG9mZnNldD17aXNSdGx9IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MTYwfSBvZmZzZXQgLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXszMjB9IG9mZnNldD17IWlzUnRsfSAvPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkxvYWRpbmdJbmRpY2F0b3IuZGVmYXVsdFByb3BzID0geyBzaXplOiA0IH07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},Md=function(e){var t=e.size,n=Pl(e,$d);return Sh("svg",Gl({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Td},n))},Od=function(e){return Sh(Md,Gl({size:20},e),Sh("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Nd=function(e){return Sh(Md,Gl({size:20},e),Sh("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Bd=function(e,t){var n=e.isFocused,i=e.theme,r=i.spacing.baseUnit,o=i.colors;return Ol({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*r,":hover":{color:n?o.neutral80:o.neutral40}})},Fd=Bd,Pd=Bd,Wd=function(){var e=Eh.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(kd||(Ld=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],_d||(_d=Ld.slice(0)),kd=Object.freeze(Object.defineProperties(Ld,{raw:{value:Object.freeze(_d)}})))),Dd=function(e){var t=e.delay,n=e.offset;return Sh("span",{css:Eh({animation:"".concat(Wd," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===process.env.NODE_ENV?"":";label:LoadingDot;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+XG4pID0+IHtcbiAgY29uc3QgeyBpbm5lclByb3BzLCBpc1J0bCB9ID0gcHJvcHM7XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2xvYWRpbmdJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgICAgey4uLmlubmVyUHJvcHN9XG4gICAgPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezB9IG9mZnNldD17aXNSdGx9IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MTYwfSBvZmZzZXQgLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXszMjB9IG9mZnNldD17IWlzUnRsfSAvPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkxvYWRpbmdJbmRpY2F0b3IuZGVmYXVsdFByb3BzID0geyBzaXplOiA0IH07XG4iXX0= */")})},Gd=function(e){var t=e.innerProps,n=e.isRtl;return Sh("div",Gl({},od(e,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Sh(Dd,{delay:0,offset:n}),Sh(Dd,{delay:160,offset:!0}),Sh(Dd,{delay:320,offset:!n}))};Gd.defaultProps={size:4};var Hd=["data"],Vd=["innerRef","isDisabled","isHidden","inputClassName"],zd={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},jd={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ol({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},zd)},Zd=function(e){return Ol({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},zd)},Xd=function(e){var t=e.children,n=e.innerProps;return Sh("div",n,t)};var Ud={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({},od(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Sh(Od,null))},Control:function(e){var t=e.children,n=e.isDisabled,i=e.isFocused,r=e.innerRef,o=e.innerProps,s=e.menuIsOpen;return Sh("div",Gl({ref:r},od(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":i,"control--menu-is-open":s}),o),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({},od(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Sh(Nd,null))},DownChevron:Nd,CrossIcon:Od,Group:function(e){var t=e.children,n=e.cx,i=e.getStyles,r=e.getClassNames,o=e.Heading,s=e.headingProps,a=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Sh("div",Gl({},od(e,"group",{group:!0}),a),Sh(o,Gl({},s,{selectProps:c,theme:u,getStyles:i,getClassNames:r,cx:n}),l),Sh("div",null,t))},GroupHeading:function(e){var t=rd(e);t.data;var n=Pl(t,Hd);return Sh("div",Gl({},od(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({},od(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Sh("span",Gl({},t,od(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,i=rd(e),r=i.innerRef,o=i.isDisabled,s=i.isHidden,a=i.inputClassName,l=Pl(i,Vd);return Sh("div",Gl({},od(e,"input",{"input-container":!0}),{"data-value":n||""}),Sh("input",Gl({className:t({input:!0},a),ref:r,style:Zd(s),disabled:o},l)))},LoadingIndicator:Gd,Menu:function(e){var t=e.children,n=e.innerRef,i=e.innerProps;return Sh("div",Gl({},od(e,"menu",{menu:!0}),{ref:n},i),t)},MenuList:function(e){var t=e.children,n=e.innerProps,i=e.innerRef,r=e.isMulti;return Sh("div",Gl({},od(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:i},n),t)},MenuPortal:function(t){var i=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,l=t.menuPosition,u=e.useRef(null),c=e.useRef(null),h=Fl(e.useState(wd(a)),2),d=h[0],f=h[1],g=e.useMemo((function(){return{setPortalPlacement:f}}),[]),p=Fl(e.useState(null),2),m=p[0],v=p[1],b=e.useCallback((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||v({offset:n,rect:e})}}),[o,l,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);Qh((function(){b()}),[b]);var y=e.useCallback((function(){"function"==typeof c.current&&(c.current(),c.current=null),o&&u.current&&(c.current=function(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=i,l=r&&!a,u=l||o?[...Wh(e)?Kh(e):e.contextElement?Kh(e.contextElement):[],...Kh(t)]:[];u.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));let c,h=null;if(s){let i=!0;h=new ResizeObserver((()=>{i||n(),i=!1})),Wh(e)&&!a&&h.observe(e),Wh(e)||!e.contextElement||a||h.observe(e.contextElement),h.observe(t)}let d=a?Uh(e):null;return a&&function t(){const i=Uh(e);!d||i.x===d.x&&i.y===d.y&&i.width===d.width&&i.height===d.height||n(),d=i,c=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{l&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(c)}}(o,u.current,b,{elementResize:"ResizeObserver"in window}))}),[o,b]);Qh((function(){y()}),[y]);var w=e.useCallback((function(e){u.current=e,y()}),[y]);if(!i&&"fixed"!==l||!m)return null;var C=Sh("div",Gl({ref:w},od(Ol(Ol({},t),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return Sh(Cd.Provider,{value:g},i?n.createPortal(C,i):C)},LoadingMessage:Id,NoOptionsMessage:Rd,MultiValue:function(e){var t=e.children,n=e.components,i=e.data,r=e.innerProps,o=e.isDisabled,s=e.removeProps,a=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Sh(l,{data:i,innerProps:Ol(Ol({},od(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),r),selectProps:a},Sh(u,{data:i,innerProps:Ol({},od(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),Sh(c,{data:i,innerProps:Ol(Ol({},od(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},MultiValueContainer:Xd,MultiValueLabel:Xd,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({role:"button"},n),t||Sh(Od,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,i=e.isFocused,r=e.isSelected,o=e.innerRef,s=e.innerProps;return Sh("div",Gl({},od(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":i,"option--is-selected":r}),{ref:o,"aria-disabled":n},s),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Sh("div",Gl({},od(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,i=e.isDisabled,r=e.isRtl;return Sh("div",Gl({},od(e,"container",{"--is-disabled":i,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,i=e.innerProps;return Sh("div",Gl({},od(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),i),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,i=e.isMulti,r=e.hasValue;return Sh("div",Gl({},od(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":r}),n),t)}},Yd=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Jd(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(i,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,i=e.options,r=e.label,o=void 0===r?"":r,s=e.selectValue,a=e.isDisabled,l=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(o," focused, ").concat(u(s,n),".");if("menu"===t){var c=a?" disabled":"",h="".concat(l?"selected":"focused").concat(c);return"option ".concat(o," ").concat(h,", ").concat(u(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ef=function(t){var n=t.ariaSelection,i=t.focusedOption,r=t.focusedValue,o=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,u=t.id,c=l.ariaLiveMessages,h=l.getOptionLabel,d=l.inputValue,f=l.isMulti,g=l.isOptionDisabled,p=l.isSearchable,m=l.menuIsOpen,v=l.options,b=l.screenReaderStatus,y=l.tabSelectsValue,w=l["aria-label"],C=l["aria-live"],S=e.useMemo((function(){return Ol(Ol({},qd),c||{})}),[c]),x=e.useMemo((function(){var e,t="";if(n&&S.onChange){var i=n.option,r=n.options,o=n.removedValue,s=n.removedValues,l=n.value,u=o||i||(e=l,Array.isArray(e)?null:e),c=u?h(u):"",d=r||s||void 0,f=d?d.map(h):[],p=Ol({isDisabled:u&&g(u,a),label:c,labels:f},n);t=S.onChange(p)}return t}),[n,S,g,a,h]),A=e.useMemo((function(){var e="",t=i||r,n=!!(i&&a&&a.includes(i));if(t&&S.onFocus){var s={focused:t,label:h(t),isDisabled:g(t,a),isSelected:n,options:o,context:t===i?"menu":"value",selectValue:a};e=S.onFocus(s)}return e}),[i,r,h,g,S,o,a]),E=e.useMemo((function(){var e="";if(m&&v.length&&S.onFilter){var t=b({count:o.length});e=S.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,m,S,v,b]),R=e.useMemo((function(){var e="";if(S.guidance){var t=r?"value":m?"menu":"input";e=S.guidance({"aria-label":w,context:t,isDisabled:i&&g(i,a),isMulti:f,isSearchable:p,tabSelectsValue:y})}return e}),[w,i,r,f,g,p,m,S,a,y]),I="".concat(A," ").concat(E," ").concat(R),k=Sh(e.Fragment,null,Sh("span",{id:"aria-selection"},x),Sh("span",{id:"aria-context"},I)),$="initial-input-focus"===(null==n?void 0:n.action);return Sh(e.Fragment,null,Sh(Qd,{id:u},$&&k),Sh(Qd,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text"},s&&!$&&k))},tf=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],nf=new RegExp("["+tf.map((function(e){return e.letters})).join("")+"]","g"),rf={},of=0;of1?t-1:0),i=1;i0,p=h-d-u,m=!1;p>t&&a.current&&(r&&r(e),a.current=!1),g&&l.current&&(s&&s(e),l.current=!1),g&&t>p?(i&&!a.current&&i(e),f.scrollTop=h,m=!0,a.current=!0):!g&&-t>u&&(o&&!l.current&&o(e),f.scrollTop=0,m=!0,l.current=!0),m&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[i,r,o,s]),d=e.useCallback((function(e){h(e,e.deltaY)}),[h]),f=e.useCallback((function(e){u.current=e.changedTouches[0].clientY}),[]),g=e.useCallback((function(e){var t=u.current-e.changedTouches[0].clientY;h(e,t)}),[h]),p=e.useCallback((function(e){if(e){var t=!!md&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",g,t)}}),[g,f,d]),m=e.useCallback((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",g,!1))}),[g,f,d]);return e.useEffect((function(){if(n){var e=c.current;return p(e),function(){m(e)}}}),[n,p,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),s=function(t){var n=t.isEnabled,i=t.accountForScrollbars,r=void 0===i||i,o=e.useRef({}),s=e.useRef(null),a=e.useCallback((function(e){if(wf){var t=document.body,n=t&&t.style;if(r&&gf.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&Cf<1){var i=parseInt(o.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+i||0;Object.keys(pf).forEach((function(e){var t=pf[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&yf()&&(t.addEventListener("touchmove",mf,Sf),e&&(e.addEventListener("touchstart",bf,Sf),e.addEventListener("touchmove",vf,Sf))),Cf+=1}}),[r]),l=e.useCallback((function(e){if(wf){var t=document.body,n=t&&t.style;Cf=Math.max(Cf-1,0),r&&Cf<1&&gf.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&yf()&&(t.removeEventListener("touchmove",mf,Sf),e&&(e.removeEventListener("touchstart",bf,Sf),e.removeEventListener("touchmove",vf,Sf)))}}),[r]);return e.useEffect((function(){if(n){var e=s.current;return a(e),function(){l(e)}}}),[n,a,l]),function(e){s.current=e}}({isEnabled:i});return Sh(e.Fragment,null,i&&Sh("div",{onClick:xf,css:Af}),n((function(e){o(e),s(e)})))}var Rf,If="production"===process.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZTogc3RyaW5nO1xuICByZWFkb25seSBvbkZvY3VzOiBGb2N1c0V2ZW50SGFuZGxlcjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0+ID0gKHsgbmFtZSwgb25Gb2N1cyB9KSA9PiAoXG4gIDxpbnB1dFxuICAgIHJlcXVpcmVkXG4gICAgbmFtZT17bmFtZX1cbiAgICB0YWJJbmRleD17LTF9XG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},kf=function(e){var t=e.name,n=e.onFocus;return Sh("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:If,value:"",onChange:function(){}})},$f=function(e){return e.label},Lf=function(e){return e.value},_f={clearIndicator:Pd,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,i=e.isFocused,r=e.theme,o=r.colors,s=r.borderRadius;return Ol({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:i?o.primary:o.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},dropdownIndicator:Fd,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,i=n.colors,r=n.spacing;return Ol({label:"group",cursor:"default",display:"block"},t?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,i=e.theme,r=i.spacing.baseUnit,o=i.colors;return Ol({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,i=e.value,r=e.theme,o=r.spacing,s=r.colors;return Ol(Ol({visibility:n?"hidden":"visible",transform:i?"translateZ(0)":""},jd),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,i=e.size,r=e.theme,o=r.colors,s=r.spacing.baseUnit;return Ol({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*s})},loadingMessage:Ed,menu:function(e,t){var n,i=e.placement,r=e.theme,o=r.borderRadius,s=r.spacing,a=r.colors;return Ol((Tl(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(i),"100%"),Tl(n,"position","absolute"),Tl(n,"width","100%"),Tl(n,"zIndex",1),n),t?{}:{backgroundColor:a.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,i=e.theme.spacing.baseUnit;return Ol({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:i,paddingTop:i})},menuPortal:function(e){var t=e.rect,n=e.offset,i=e.position;return{left:t.left,position:i,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,i=n.spacing,r=n.borderRadius,o=n.colors;return Ol({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:r/2,margin:i.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,i=n.borderRadius,r=n.colors,o=e.cropWithEllipsis;return Ol({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:i/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,i=n.spacing,r=n.borderRadius,o=n.colors,s=e.isFocused;return Ol({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:s?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:Ad,option:function(e,t){var n=e.isDisabled,i=e.isFocused,r=e.isSelected,o=e.theme,s=o.spacing,a=o.colors;return Ol({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?a.primary:i?a.primary25:"transparent",color:n?a.neutral20:r?a.neutral0:"inherit",padding:"".concat(2*s.baseUnit,"px ").concat(3*s.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,i=n.spacing,r=n.colors;return Ol({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,i=e.theme,r=i.spacing,o=i.colors;return Ol({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,i=e.isMulti,r=e.hasValue,o=e.selectProps.controlShouldRenderValue;return Ol({alignItems:"center",display:i&&r&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Tf={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Mf={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:dd(),captureMenuScroll:!dd(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Ol({ignoreCase:!0,ignoreAccents:!0,stringify:hf,trim:!0,matchFrom:"any"},Rf),i=n.ignoreCase,r=n.ignoreAccents,o=n.stringify,s=n.trim,a=n.matchFrom,l=s?cf(t):t,u=s?cf(o(e)):o(e);return i&&(l=l.toLowerCase(),u=u.toLowerCase()),r&&(l=uf(l),u=lf(u)),"start"===a?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:$f,getOptionValue:Lf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Of(e,t,n,i){return{type:"option",data:t,isDisabled:Df(e,t,n),isSelected:Gf(e,t,n),label:Pf(e,t),value:Wf(e,t),index:i}}function Nf(e,t){return e.options.map((function(n,i){if("options"in n){var r=n.options.map((function(n,i){return Of(e,n,t,i)})).filter((function(t){return Ff(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:i}:void 0}var o=Of(e,n,t,i);return Ff(e,o)?o:void 0})).filter(vd)}function Bf(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Xl(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Ff(e,t){var n=e.inputValue,i=void 0===n?"":n,r=t.data,o=t.isSelected,s=t.label,a=t.value;return(!Vf(e)||!o)&&Hf(e,{label:s,value:a,data:r},i)}var Pf=function(e,t){return e.getOptionLabel(t)},Wf=function(e,t){return e.getOptionValue(t)};function Df(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Gf(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=Wf(e,t);return n.some((function(t){return Wf(e,t)===i}))}function Hf(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Vf=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},zf=1,jf=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vl(e,t)}(a,e.Component);var n,i,r,s=Zl(a);function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var i=t.props,r=i.onChange,o=i.name;n.name=o,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,i){var r=t.props,o=r.closeMenuOnSelect,s=r.isMulti,a=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:a}),o&&(t.setState({inputIsHiddenAfterUpdate:!s}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:i})},t.selectOption=function(e){var n=t.props,i=n.blurInputOnSelect,r=n.isMulti,o=n.name,s=t.state.selectValue,a=r&&t.isOptionSelected(e,s),l=t.isOptionDisabled(e,s);if(a){var u=t.getOptionValue(e);t.setValue(s.filter((function(e){return t.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:o});r?t.setValue([].concat(Xl(s),[e]),"select-option",e):t.setValue(e,"select-option")}i&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,i=t.state.selectValue,r=t.getOptionValue(e),o=i.filter((function(e){return t.getOptionValue(e)!==r})),s=bd(n,o,o[0]||null);t.onChange(s,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(bd(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,i=n[n.length-1],r=n.slice(0,n.length-1),o=bd(e,r,r[0]||null);t.onChange(o,{action:"pop-value",removedValue:i})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),i=0;i5||o>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,i=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(i,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return Vf(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,i=n.isMulti,r=n.backspaceRemovesValue,o=n.escapeClearsValue,s=n.inputValue,a=n.isClearable,l=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,h=n.tabSelectsValue,d=n.openMenuOnFocus,f=t.state,g=f.focusedOption,p=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!i||s)return;t.focusValue("previous");break;case"ArrowRight":if(!i||s)return;t.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(p)t.removeValue(p);else{if(!r)return;i?t.popValue():a&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!h||!g||d&&t.isOptionSelected(g,m))return;t.selectOption(g);break;case"Enter":if(229===e.keyCode)break;if(u){if(!g)return;if(t.isComposing)return;t.selectOption(g);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:s}),t.onMenuClose()):a&&o&&t.clearValue();break;case" ":if(s)return;if(!u){t.openMenu("first");break}if(!g)return;t.selectOption(g);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++zf),t.state.selectValue=id(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),i=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[i]}return t}return n=a,i=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&hd(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,i=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&i&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(hd(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,i=n.selectValue,r=n.isFocused,o=this.buildFocusableOptions(),s="first"===e?0:o.length-1;if(!this.props.isMulti){var a=o.indexOf(i[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[s]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,i=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(i);i||(r=-1);var o=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===r?0:-1===r?o:r-1;break;case"next":r>-1&&r0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var r=0,o=i.indexOf(n);n||(o=-1),"up"===e?r=o>0?o-1:i.length-1:"down"===e?r=(o+1)%i.length:"pageup"===e?(r=o-t)<0&&(r=0):"pagedown"===e?(r=o+t)>i.length-1&&(r=i.length-1):"last"===e&&(r=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[r],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Tf):Ol(Ol({},Tf),this.props.theme):Tf}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getClassNames,r=this.getValue,o=this.selectOption,s=this.setValue,a=this.props,l=a.isMulti,u=a.isRtl,c=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:i,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:o,selectProps:a,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Df(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Gf(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Hf(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:i})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,r=e.inputValue,s=e.tabIndex,a=e.form,l=e.menuIsOpen,u=e.required,c=this.getComponents().Input,h=this.state,d=h.inputIsHidden,f=h.ariaSelection,g=this.commonProps,p=i||this.getElementId("input"),m=Ol(Ol(Ol({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox"},l&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(c,Gl({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:p,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:a,type:"text",value:r},m)):o.createElement(ff,Gl({id:p,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ed,onFocus:this.onInputFocus,disabled:t,tabIndex:s,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,r=t.MultiValueLabel,s=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,u=this.commonProps,c=this.props,h=c.controlShouldRenderValue,d=c.isDisabled,f=c.isMulti,g=c.inputValue,p=c.placeholder,m=this.state,v=m.selectValue,b=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!h)return g?null:o.createElement(l,Gl({},u,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),p);if(f)return v.map((function(t,a){var l=t===b,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,Gl({},u,{components:{Container:i,Label:r,Remove:s},isFocused:l,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(g)return null;var w=v[0];return o.createElement(a,Gl({},u,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,r=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,Gl({},t,{innerProps:a,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,r=n.isLoading,s=this.state.isFocused;return e&&r?o.createElement(e,Gl({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:s})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,r=this.props.isDisabled,s=this.state.isFocused;return o.createElement(n,Gl({},i,{isDisabled:r,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,Gl({},t,{innerProps:r,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,r=t.Menu,s=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,h=this.commonProps,d=this.state.focusedOption,f=this.props,g=f.captureMenuScroll,p=f.inputValue,m=f.isLoading,v=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,C=f.menuPlacement,S=f.menuPosition,x=f.menuPortalTarget,A=f.menuShouldBlockScroll,E=f.menuShouldScrollIntoView,R=f.noOptionsMessage,I=f.onMenuScrollToTop,k=f.onMenuScrollToBottom;if(!w)return null;var $,L=function(t,n){var i=t.type,r=t.data,s=t.isDisabled,a=t.isSelected,l=t.label,u=t.value,f=d===r,g=s?void 0:function(){return e.onOptionHover(r)},p=s?void 0:function(){return e.selectOption(r)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:p,onMouseMove:g,onMouseOver:g,tabIndex:-1};return o.createElement(c,Gl({},h,{innerProps:v,data:r,isDisabled:s,isSelected:a,key:m,label:l,type:i,value:u,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())$=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,s=t.options,a=t.index,l="".concat(e.getElementId("group"),"-").concat(a),u="".concat(l,"-heading");return o.createElement(n,Gl({},h,{key:l,data:r,options:s,Heading:i,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return L(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return L(t,"".concat(t.index))}));else if(m){var _=v({inputValue:p});if(null===_)return null;$=o.createElement(l,h,_)}else{var T=R({inputValue:p});if(null===T)return null;$=o.createElement(u,h,T)}var M={minMenuHeight:b,maxMenuHeight:y,menuPlacement:C,menuPosition:S,menuShouldScrollIntoView:E},O=o.createElement(Sd,Gl({},h,M),(function(t){var n=t.ref,i=t.placerProps,a=i.placement,l=i.maxHeight;return o.createElement(r,Gl({},h,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:a}),o.createElement(Ef,{captureEnabled:g,onTopArrive:I,onBottomArrive:k,lockEnabled:A},(function(t){return o.createElement(s,Gl({},h,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:l,focusedOption:d}),$)})))}));return x||"fixed"===S?o.createElement(a,Gl({},h,{appendTo:x,controlElement:this.controlRef,menuPlacement:C,menuPosition:S}),O):O}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,r=t.isMulti,s=t.name,a=t.required,l=this.state.selectValue;if(s&&!i){if(a&&!this.hasValue())return o.createElement(kf,{name:s,onFocus:this.onValueInputFocus});if(r){if(n){var u=l.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:s,type:"hidden",value:u})}var c=l.length>0?l.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:s,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:s,type:"hidden",value:""});return o.createElement("div",null,c)}var h=l[0]?this.getOptionValue(l[0]):"";return o.createElement("input",{name:s,type:"hidden",value:h})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,r=t.focusedValue,s=t.isFocused,a=t.selectValue,l=this.getFocusableOptions();return o.createElement(ef,Gl({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:r,isFocused:s,selectValue:a,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,r=e.ValueContainer,s=this.props,a=s.className,l=s.id,u=s.isDisabled,c=s.menuIsOpen,h=this.state.isFocused,d=this.commonProps=this.getCommonProps();return o.createElement(i,Gl({},d,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:h}),this.renderLiveRegion(),o.createElement(t,Gl({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:h,menuIsOpen:c}),o.createElement(r,Gl({},d,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,Gl({},d,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,s=t.isFocused,a=t.prevWasFocused,l=e.options,u=e.value,c=e.menuIsOpen,h=e.inputValue,d=e.isMulti,f=id(u),g={};if(n&&(u!==n.value||l!==n.options||c!==n.menuIsOpen||h!==n.inputValue)){var p=c?function(e,t){return Bf(Nf(e,t))}(e,f):[],m=i?function(e,t){var n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i-1?n:t[0]}(t,p);g={selectValue:f,focusedOption:v,focusedValue:m,clearFocusValueOnUpdate:!1}}var b=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},y=o,w=s&&a;return s&&!w&&(y={value:bd(d,f,f[0]||null),options:f,action:"initial-input-focus"},w=!a),"initial-input-focus"===(null==o?void 0:o.action)&&(y=null),Ol(Ol(Ol({},g),b),{},{prevProps:e,ariaSelection:y,prevWasFocused:w})}}],i&&Hl(n.prototype,i),r&&Hl(n,r),Object.defineProperty(n,"prototype",{writable:!1}),a}();jf.defaultProps=Mf;var Zf=e.forwardRef((function(e,t){var n=Dl(e);return o.createElement(jf,Gl({ref:t},n))}));function Xf(e){var t=e.data,n=t.label,i=t.icon,r=t.tooltip;return s.default.createElement(Ud.Option,a({},e,{className:i?"has-icon":mt}),s.default.createElement(Yt,{extraClass:"option-tooltip",data:r},s.default.createElement("div",{className:"option-wrapper"},i,n)))}function Uf(t){var n,i=t.children,r=void 0===i?mt:i,o=t.extraClasses,a=void 0===o?mt:o,l=t.style,c=void 0===l?{}:l,h=e.useRef(null),d=u(e.useState(mt),2),f=d[0],g=d[1];e.useEffect((function(){var e=function(){h.current&&es.isEllipsisActive(h.current)?g(r):g(mt)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[r]);var m=p(((n={})[a]=!0,n["span-tooltip"]=!0,n));return s.default.createElement(Yt,{data:null==f?void 0:f.toString()},s.default.createElement("span",{className:m,ref:h,style:c},r))}function Yf(e){var t=e.data,n=t.icon,i=t.label;return s.default.createElement(Ud.SingleValue,a({},e),n,s.default.createElement(Uf,{extraClasses:"react-select__single-value-label"},i))}function Jf(e){var t=e.data,n=t.chipLabel,i=t.chipTooltip,r=t.label;return s.default.createElement(Ud.MultiValue,a({},e),s.default.createElement(Yt,{data:i||r,placement:"left"},s.default.createElement("span",null,n||r)))}function Kf(e){var t=e.selectProps;return s.default.createElement(Yt,{data:t.clearText||mt},s.default.createElement("div",null,s.default.createElement(Ud.ClearIndicator,a({},e))))}function Qf(n){var i,r=n.onChange,o=void 0===r?vt:r,c=n.options,h=n.value,d=n.wrapperClass,f=n.isMulti,g=n.label,m=n.disabled,v=n.sortOptions,b=n.error,y=n.placeholder,w=n.info,C=n.isRequired,S=n.redInfo,x=void 0===S?vt:S,A=n.isClearable,E=void 0===A||A,R=n.autoFocus,k=void 0!==R&&R,$=n.groupedOptions,L=void 0!==$&&$,_=l(n,["onChange","options","value","wrapperClass","isMulti","label","disabled","sortOptions","error","placeholder","info","isRequired","redInfo","isClearable","autoFocus","groupedOptions"]),T=u(e.useState(null),2),M=T[0],O=T[1],N=e.useMemo((function(){return L?c.reduce((function(e,t){return t.options.forEach((function(t){var n=t.label,i=t.value;return e.push(es.formatOption(n,i))})),e}),[]):[]}),[JSON.stringify(c)]);e.useEffect((function(){if(O(v?es.insensitiveSort(c,"label"):c),f){if(h){var e=h.filter((function(e){return c.find((function(t){return t.value===e}))}));es.isEmpty(e)?o([]):e.length!==h.length&&o(e)}}else h&&!c.find((function(e){return e.value===h}))&&o(mt)}),[JSON.stringify(c)]);var B,F,P=p(((i={"select-wrapper":!0})[d]=!0,i["select-wrapper-is-multi"]=f,i["has-error"]=b,i["no-label"]=!g,i));return s.default.createElement(t.FormControl,{variant:"outlined",className:P},s.default.createElement("span",{className:"select-label field-1-label-content"},g,C&&s.default.createElement("span",{className:"required-star"},"*"),!!w&&s.default.createElement(Yt,{data:w},s.default.createElement(I,null))),s.default.createElement(Zf,a({},_,{menuPosition:"fixed",isDisabled:m,styles:(B=!!b,F=!!g,{menuPortal:function(e,t){return a(a({},e),{zIndex:9999,top:t.offset===t.rect.top?t.offset+6:t.offset-6})},menu:function(e){return a(a({},e),{boxShadow:"0 0 0 2px var(--main-color)",backgroundColor:"var(--neutral-t4)"})},control:function(e,t){return a(a(a(a({},e),{height:F?48:32,minHeight:F?48:32}),B?{boxShadow:"0 0 0 1px var(--focus-key)"}:{boxShadow:t.isFocused?"0 0 0 1px var(--main-color)":0}),B?{borderColor:"var(--focus-key)","&:hover":{borderColor:"state.isFocused"}}:{borderColor:t.isFocused?"var(--main-color)":"var(--ironhide-t1)","&:hover":{borderColor:t.isFocused?"var(--main-color)":"var(--ironhide-t1)"}})},clearIndicator:function(e,t){var n=t.isDisabled;return a(a({},e),{cursor:"pointer",color:n?"var(--ironhide-key)":"var(--main-color)",":hover":{color:n?"var(--ironhide-key)":"var(--main-color)"}})},indicatorSeparator:function(e,t){return a(a({},e),{backgroundColor:t.isFocused?"var(--main-color)":"var(--ironhide-t1)"})},dropdownIndicator:function(e,t){return a(a({},e),{color:t.isDisabled?"var(--ironhide-key)":"var(--main-color)",":hover":{color:t.isDisabled?"var(--ironhide-key)":"var(--main-color)"},">svg":{transform:t.selectProps.menuIsOpen&&"rotate(180deg)"}})},option:function(e,t){var n=t.isDisabled;return a(a({},e),{color:"var(--text-color)",opacity:n&&".5",backgroundColor:n?"transparent":"var(--neutral-t4)",":hover":{backgroundColor:n?"transparent":"var(--ironhide-t3)"}})}}),autoFocus:k,value:f?h?h.map((function(e){return c.find((function(t){return t.value===e}))})):mt:L?N.find((function(e){return e.value===h})):c.find((function(e){return e.value===h}))||mt,options:M,autosize:!0,isMulti:f,isClearable:f&&E,onChange:function(e){if(f)o(e.map((function(e){return e.value})));else{var t=e.value;o(t)}},classNamePrefix:"react-select",dropdownAlign:{offset:[0,0]},components:{Option:Xf,SingleValue:Yf,MultiValue:Jf,ClearIndicator:Kf},menuPortalTarget:document.body,closeMenuOnSelect:!f,placeholder:y||"Select..."})),s.default.createElement("span",{className:"select-error capitalize-first-letter"},b||x(h)))}var qf=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],eg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=String(e).toLowerCase(),r=String(n.getOptionValue(t)).toLowerCase(),o=String(n.getOptionLabel(t)).toLowerCase();return r===i||o===i},tg={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,i){return!(!e||t.some((function(t){return eg(e,t,i)}))||n.some((function(t){return eg(e,t,i)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}};var ng=e.forwardRef((function(t,n){var i=function(t){var n=t.allowCreateWhileLoading,i=void 0!==n&&n,r=t.createOptionPosition,o=void 0===r?"last":r,s=t.formatCreateLabel,a=void 0===s?tg.formatCreateLabel:s,l=t.isValidNewOption,u=void 0===l?tg.isValidNewOption:l,c=t.getNewOptionData,h=void 0===c?tg.getNewOptionData:c,d=t.onCreateOption,f=t.options,g=void 0===f?[]:f,p=t.onChange,m=Pl(t,qf),v=m.getOptionValue,b=void 0===v?Lf:v,y=m.getOptionLabel,w=void 0===y?$f:y,C=m.inputValue,S=m.isLoading,x=m.isMulti,A=m.value,E=m.name,R=e.useMemo((function(){return u(C,id(A),g,{getOptionValue:b,getOptionLabel:w})?h(C,a(C)):void 0}),[a,h,w,b,C,u,g,A]),I=e.useMemo((function(){return!i&&S||!R?g:"first"===o?[R].concat(Xl(g)):[].concat(Xl(g),[R])}),[i,o,S,R,g]),k=e.useCallback((function(e,t){if("select-option"!==t.action)return p(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==R)p(e,t);else if(d)d(C);else{var i=h(C,C),r={action:"create-option",name:E,option:i};p(bd(x,[].concat(Xl(id(A)),[i]),i),r)}}),[h,C,x,E,R,d,p,A]);return Ol(Ol({},m),{},{options:I,onChange:k})}(Dl(t));return o.createElement(jf,Gl({ref:n},i))}));var ig=s.default.forwardRef((function(e,t){var n,i=e.label,r=void 0===i?mt:i,o=e.onChange,c=e.value,h=void 0===c?mt:c,d=e.error,f=e.placeholder,g=e.wrapperClass,m=void 0===g?"":g,v=e.tooltip,b=e.Icon,y=e.type,w=e.info,C=e.isRequired,S=e.allowDecimal,x=l(e,["label","onChange","value","error","placeholder","wrapperClass","tooltip","Icon","type","info","isRequired","allowDecimal"]),A=u($l(!1),2),E=A[0],R=A[1];var k=p(((n={})[m]=!0,n["text-box-field"]=!0,n["has-error"]=!!d,n["no-label"]=!r,n["has-icon"]=!!b,n)),$=p({field__input:!0,"is-type-password":"password"===y});return s.default.createElement(Yt,{data:v},s.default.createElement("div",{className:k},b&&s.default.createElement(b,{className:"text-box-icon"}),s.default.createElement("input",a({onKeyDown:function(e){"number"!==y||"e"!==e.key&&"E"!==e.key&&"-"!==e.key&&"+"!==e.key&&(S||"."!==e.key)||e.preventDefault()},step:"any",autoComplete:"new-password",className:$,placeholder:f,value:null===h?mt:h,onChange:function(e){Number.isNaN(e.target.valueAsNumber)?o(e.target.value):o(e.target.valueAsNumber>=0?e.target.valueAsNumber:0)},ref:t,type:E&&"password"===y?"text":y},x)),"password"===y&&s.default.createElement("span",{className:"password-icon"},es.getPasswordIcon(E,R)),s.default.createElement("span",{className:"field__label-wrap"},s.default.createElement("span",{className:"field__label field-1-label-content"},r,C&&s.default.createElement("span",{className:"required-star"},"*"),!!w&&s.default.createElement(Yt,{data:w},s.default.createElement(I,null)))),s.default.createElement("span",{className:"text-box-error capitalize-first-letter"},d)))}));function rg(e){var n=e.open,i=e.anchorEl,r=e.onClickAway,o=e.items,l=e.disablePortal;return s.default.createElement(t.Popper,{open:n,anchorEl:i,transition:!0,disablePortal:l,className:"popper-wrapper",nonce:void 0,onResize:void 0,onResizeCapture:void 0},(function(e){var n=e.TransitionProps;return s.default.createElement(t.Grow,a({},n,{style:{transformOrigin:"center top"}}),s.default.createElement(t.Paper,{className:"menu-popper"},s.default.createElement(t.ClickAwayListener,{onClickAway:r},s.default.createElement(t.MenuList,{disablePadding:!0},o.map((function(e){return e.hideMenu?null:s.default.createElement(Yt,{key:e.key||e.text,data:(n=e.disabled,i=e.tooltip,void 0===n&&(n=""),void 0===i&&(i=""),es.isString(n)?n:es.isEmpty(i)?mt:i)},s.default.createElement("div",{className:"menu-popper-item-wrapper dropdown-lines-1 ".concat(e.extraClass)},s.default.createElement(t.MenuItem,{disabled:!!e.disabled,className:"menu-popper-item",onClick:function(t){t.stopPropagation(),e.onClick(),r()}},e.content||e.text),s.default.createElement(t.Divider,{className:"separator"})));var n,i}))))))}))}rg.defaultProps={disablePortal:!1},rg.propTypes={};const og=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}];var sg=(e,t=og,n="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let i=e||"";t[0].minDiversity=0,t[0].minLength=0;const r=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];n&&r.push({regex:`[${n}]`,message:"symbol"});let o={};o.contains=r.filter((e=>new RegExp(`${e.regex}`).test(i))).map((e=>e.message)),o.length=i.length;let s=t.filter((e=>o.contains.length>=e.minDiversity)).filter((e=>o.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(o,s[0]),o};var ag=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],i=0;i @@ -72,5 +72,37 @@ object-assign * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */!function(e,t){(function(){var n,i="Expected a function",r="__lodash_hash_undefined__",o="__lodash_placeholder__",s=16,a=32,l=64,c=128,u=256,h=1/0,d=9007199254740991,f=NaN,p=4294967295,m=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",a],["partialRight",l],["rearg",u]],v="[object Arguments]",b="[object Array]",y="[object Boolean]",w="[object Date]",C="[object Error]",S="[object Function]",x="[object GeneratorFunction]",A="[object Map]",R="[object Number]",I="[object Object]",E="[object Promise]",k="[object RegExp]",$="[object Set]",_="[object String]",L="[object Symbol]",T="[object WeakMap]",M="[object ArrayBuffer]",O="[object DataView]",N="[object Float32Array]",B="[object Float64Array]",P="[object Int8Array]",F="[object Int16Array]",W="[object Int32Array]",G="[object Uint8Array]",H="[object Uint8ClampedArray]",D="[object Uint16Array]",V="[object Uint32Array]",z=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,Z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,Y=RegExp(X.source),J=RegExp(U.source),K=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ie.source),oe=/^\s+/,se=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ge=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ce=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Re="\\u2700-\\u27bf",Ie="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",$e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",_e="['’]",Le="["+xe+"]",Te="["+$e+"]",Me="["+Ae+"]",Oe="\\d+",Ne="["+Re+"]",Be="["+Ie+"]",Pe="[^"+xe+$e+Oe+Re+Ie+Ee+"]",Fe="\\ud83c[\\udffb-\\udfff]",We="[^"+xe+"]",Ge="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+Ee+"]",Ve="\\u200d",ze="(?:"+Be+"|"+Pe+")",je="(?:"+De+"|"+Pe+")",Ze="(?:['’](?:d|ll|m|re|s|t|ve))?",Xe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+Me+"|"+Fe+")"+"?",Ye="["+ke+"]?",Je=Ye+Ue+("(?:"+Ve+"(?:"+[We,Ge,He].join("|")+")"+Ye+Ue+")*"),Ke="(?:"+[Ne,Ge,He].join("|")+")"+Je,Qe="(?:"+[We+Me+"?",Me,Ge,He,Le].join("|")+")",qe=RegExp(_e,"g"),et=RegExp(Me,"g"),tt=RegExp(Fe+"(?="+Fe+")|"+Qe+Je,"g"),nt=RegExp([De+"?"+Be+"+"+Ze+"(?="+[Te,De,"$"].join("|")+")",je+"+"+Xe+"(?="+[Te,De+ze,"$"].join("|")+")",De+"?"+ze+"+"+Ze,De+"+"+Xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,Ke].join("|"),"g"),it=RegExp("["+Ve+xe+Ae+ke+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["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"],st=-1,at={};at[N]=at[B]=at[P]=at[F]=at[W]=at[G]=at[H]=at[D]=at[V]=!0,at[v]=at[b]=at[M]=at[y]=at[O]=at[w]=at[C]=at[S]=at[A]=at[R]=at[I]=at[k]=at[$]=at[_]=at[T]=!1;var lt={};lt[v]=lt[b]=lt[M]=lt[O]=lt[y]=lt[w]=lt[N]=lt[B]=lt[P]=lt[F]=lt[W]=lt[A]=lt[R]=lt[I]=lt[k]=lt[$]=lt[_]=lt[L]=lt[G]=lt[H]=lt[D]=lt[V]=!0,lt[C]=lt[S]=lt[T]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ht=parseInt,dt="object"==typeof g&&g&&g.Object===Object&&g,ft="object"==typeof self&&self&&self.Object===Object&&self,gt=dt||ft||Function("return this")(),pt=t&&!t.nodeType&&t,mt=pt&&e&&!e.nodeType&&e,vt=mt&&mt.exports===pt,bt=vt&&dt.process,yt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),wt=yt&&yt.isArrayBuffer,Ct=yt&&yt.isDate,St=yt&&yt.isMap,xt=yt&&yt.isRegExp,At=yt&&yt.isSet,Rt=yt&&yt.isTypedArray;function It(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Et(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r-1}function Mt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i-1;);return n}function nn(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var on=Xt({"À":"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"}),sn=Xt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ct[e]}function ln(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function un(e,t){return function(n){return e(t(n))}}function hn(e,t){for(var n=-1,i=e.length,r=0,s=[];++n",""":'"',"'":"'"});var bn=function e(t){var g=(t=null==t?gt:bn.defaults(gt.Object(),t,bn.pick(gt,ot))).Array,se=t.Date,xe=t.Error,Ae=t.Function,Re=t.Math,Ie=t.Object,Ee=t.RegExp,ke=t.String,$e=t.TypeError,_e=g.prototype,Le=Ae.prototype,Te=Ie.prototype,Me=t["__core-js_shared__"],Oe=Le.toString,Ne=Te.hasOwnProperty,Be=0,Pe=function(){var e=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Te.toString,We=Oe.call(Ie),Ge=gt._,He=Ee("^"+Oe.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=vt?t.Buffer:n,Ve=t.Symbol,ze=t.Uint8Array,je=De?De.allocUnsafe:n,Ze=un(Ie.getPrototypeOf,Ie),Xe=Ie.create,Ue=Te.propertyIsEnumerable,Ye=_e.splice,Je=Ve?Ve.isConcatSpreadable:n,Ke=Ve?Ve.iterator:n,Qe=Ve?Ve.toStringTag:n,tt=function(){try{var e=fo(Ie,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,ct=se&&se.now!==gt.Date.now&&se.now,dt=t.setTimeout!==gt.setTimeout&&t.setTimeout,ft=Re.ceil,pt=Re.floor,mt=Ie.getOwnPropertySymbols,bt=De?De.isBuffer:n,yt=t.isFinite,Wt=_e.join,Xt=un(Ie.keys,Ie),yn=Re.max,wn=Re.min,Cn=se.now,Sn=t.parseInt,xn=Re.random,An=_e.reverse,Rn=fo(t,"DataView"),In=fo(t,"Map"),En=fo(t,"Promise"),kn=fo(t,"Set"),$n=fo(t,"WeakMap"),_n=fo(Ie,"create"),Ln=$n&&new $n,Tn={},Mn=Go(Rn),On=Go(In),Nn=Go(En),Bn=Go(kn),Pn=Go($n),Fn=Ve?Ve.prototype:n,Wn=Fn?Fn.valueOf:n,Gn=Fn?Fn.toString:n;function Hn(e){if(ia(e)&&!Zs(e)&&!(e instanceof jn)){if(e instanceof zn)return e;if(Ne.call(e,"__wrapped__"))return Ho(e)}return new zn(e)}var Dn=function(){function e(){}return function(t){if(!na(t))return{};if(Xe)return Xe(t);e.prototype=t;var i=new e;return e.prototype=n,i}}();function Vn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function jn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ci(e,t,i,r,o,s){var a,l=1&t,c=2&t,u=4&t;if(i&&(a=o?i(e,r,o,s):i(e)),a!==n)return a;if(!na(e))return e;var h=Zs(e);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return _r(e,a)}else{var d=mo(e),f=d==S||d==x;if(Js(e))return Ar(e,l);if(d==I||d==v||f&&!o){if(a=c||f?{}:bo(e),!l)return c?function(e,t){return Lr(e,po(e),t)}(e,function(e,t){return e&&Lr(t,Oa(t),e)}(a,e)):function(e,t){return Lr(e,go(e),t)}(e,oi(a,e))}else{if(!lt[d])return o?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case M:return Rr(e);case y:case w:return new i(+e);case O:return function(e,t){var n=t?Rr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case B:case P:case F:case W:case G:case H:case D:case V:return Ir(e,n);case A:return new i;case R:case _:return new i(e);case k:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case $:return new i;case L:return r=e,Wn?Ie(Wn.call(r)):{}}var r}(e,d,l)}}s||(s=new Jn);var g=s.get(e);if(g)return g;s.set(e,a),la(e)?e.forEach((function(n){a.add(ci(n,t,i,n,e,s))})):ra(e)&&e.forEach((function(n,r){a.set(r,ci(n,t,i,r,e,s))}));var p=h?n:(u?c?oo:ro:c?Oa:Ma)(e);return kt(p||e,(function(n,r){p&&(n=e[r=n]),ni(a,r,ci(n,t,i,r,e,s))})),a}function ui(e,t,i){var r=i.length;if(null==e)return!r;for(e=Ie(e);r--;){var o=i[r],s=t[o],a=e[o];if(a===n&&!(o in e)||!s(a))return!1}return!0}function hi(e,t,r){if("function"!=typeof e)throw new $e(i);return Mo((function(){e.apply(n,r)}),t)}function di(e,t,n,i){var r=-1,o=Tt,s=!0,a=e.length,l=[],c=t.length;if(!a)return l;n&&(t=Ot(t,Qt(n))),i?(o=Mt,s=!1):t.length>=200&&(o=en,s=!1,t=new Yn(t));e:for(;++r-1},Xn.prototype.set=function(e,t){var n=this.__data__,i=ii(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new Zn,map:new(In||Xn),string:new Zn}},Un.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},Un.prototype.get=function(e){return uo(this,e).get(e)},Un.prototype.has=function(e){return uo(this,e).has(e)},Un.prototype.set=function(e,t){var n=uo(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,r),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Xn){var i=n.__data__;if(!In||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Un(i)}return n.set(e,t),this.size=n.size,this};var fi=Or(Ci),gi=Or(Si,!0);function pi(e,t){var n=!0;return fi(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function mi(e,t,i){for(var r=-1,o=e.length;++r0&&n(a)?t>1?bi(a,t-1,n,i,r):Nt(r,a):i||(r[r.length]=a)}return r}var yi=Nr(),wi=Nr(!0);function Ci(e,t){return e&&yi(e,t,Ma)}function Si(e,t){return e&&wi(e,t,Ma)}function xi(e,t){return Lt(t,(function(t){return qs(e[t])}))}function Ai(e,t){for(var i=0,r=(t=wr(t,e)).length;null!=e&&it}function ki(e,t){return null!=e&&Ne.call(e,t)}function $i(e,t){return null!=e&&t in Ie(e)}function _i(e,t,i){for(var r=i?Mt:Tt,o=e[0].length,s=e.length,a=s,l=g(s),c=1/0,u=[];a--;){var h=e[a];a&&t&&(h=Ot(h,Qt(t))),c=wn(h.length,c),l[a]=!i&&(t||o>=120&&h.length>=120)?new Yn(a&&h):n}h=e[0];var d=-1,f=l[0];e:for(;++d=a?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}))}function Zi(e,t,n){for(var i=-1,r=t.length,o={};++i-1;)a!==e&&Ye.call(a,l,1),Ye.call(e,l,1);return e}function Ui(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;wo(r)?Ye.call(e,r,1):dr(e,r)}}return e}function Yi(e,t){return e+pt(xn()*(t-e+1))}function Ji(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Ki(e,t){return Oo(ko(e,t,ol),e+"")}function Qi(e){return Qn(Da(e))}function qi(e,t){var n=Da(e);return Po(n,li(t,0,n.length))}function er(e,t,i,r){if(!na(e))return e;for(var o=-1,s=(t=wr(t,e)).length,a=s-1,l=e;null!=l&&++or?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=g(r);++i>>1,s=e[o];null!==s&&!ua(s)&&(n?s<=t:s=200){var c=t?null:Jr(e);if(c)return dn(c);s=!1,r=en,l=new Yn}else l=t?[]:a;e:for(;++i=r?e:rr(e,t,i)}var xr=it||function(e){return gt.clearTimeout(e)};function Ar(e,t){if(t)return e.slice();var n=e.length,i=je?je(n):new e.constructor(n);return e.copy(i),i}function Rr(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function Ir(e,t){var n=t?Rr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Er(e,t){if(e!==t){var i=e!==n,r=null===e,o=e==e,s=ua(e),a=t!==n,l=null===t,c=t==t,u=ua(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||r&&a&&c||!i&&c||!o)return 1;if(!r&&!s&&!u&&e1?i[o-1]:n,a=o>2?i[2]:n;for(s=e.length>3&&"function"==typeof s?(o--,s):n,a&&Co(i[0],i[1],a)&&(s=o<3?n:s,o=1),t=Ie(t);++r-1?o[s?t[a]:a]:n}}function Gr(e){return io((function(t){var r=t.length,o=r,s=zn.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new $e(i);if(s&&!l&&"wrapper"==ao(a))var l=new zn([],!0)}for(o=l?o:r;++o1&&y.reverse(),d&&ul))return!1;var u=s.get(e),h=s.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,g=2&i?new Yn:n;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return kt(m,(function(n){var i="_."+n[0];t&n[1]&&!Tt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(i),n)))}function Bo(e){var t=0,i=0;return function(){var r=Cn(),o=16-(r-i);if(i=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Po(e,t){var i=-1,r=e.length,o=r-1;for(t=t===n?r:t;++i1?e[t-1]:n;return i="function"==typeof i?(e.pop(),i):n,as(e,i)}));function gs(e){var t=Hn(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ms=io((function(e){var t=e.length,i=t?e[0]:0,r=this.__wrapped__,o=function(t){return ai(t,e)};return!(t>1||this.__actions__.length)&&r instanceof jn&&wo(i)?((r=r.slice(i,+i+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:n}),new zn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var vs=Tr((function(e,t,n){Ne.call(e,n)?++e[n]:si(e,n,1)}));var bs=Wr(jo),ys=Wr(Zo);function ws(e,t){return(Zs(e)?kt:fi)(e,co(t,3))}function Cs(e,t){return(Zs(e)?$t:gi)(e,co(t,3))}var Ss=Tr((function(e,t,n){Ne.call(e,n)?e[n].push(t):si(e,n,[t])}));var xs=Ki((function(e,t,n){var i=-1,r="function"==typeof t,o=Us(e)?g(e.length):[];return fi(e,(function(e){o[++i]=r?It(t,e,n):Li(e,t,n)})),o})),As=Tr((function(e,t,n){si(e,n,t)}));function Rs(e,t){return(Zs(e)?Ot:Gi)(e,co(t,3))}var Is=Tr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Es=Ki((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Co(e,t[0],t[1])?t=[]:n>2&&Co(t[0],t[1],t[2])&&(t=[t[0]]),ji(e,bi(t,1),[])})),ks=ct||function(){return gt.Date.now()};function $s(e,t,i){return t=i?n:t,t=e&&null==t?e.length:t,Qr(e,c,n,n,n,n,t)}function _s(e,t){var r;if("function"!=typeof t)throw new $e(i);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var Ls=Ki((function(e,t,n){var i=1;if(n.length){var r=hn(n,lo(Ls));i|=a}return Qr(e,i,t,n,r)})),Ts=Ki((function(e,t,n){var i=3;if(n.length){var r=hn(n,lo(Ts));i|=a}return Qr(t,i,e,n,r)}));function Ms(e,t,r){var o,s,a,l,c,u,h=0,d=!1,f=!1,g=!0;if("function"!=typeof e)throw new $e(i);function p(t){var i=o,r=s;return o=s=n,h=t,l=e.apply(r,i)}function m(e){return h=e,c=Mo(b,t),d?p(e):l}function v(e){var i=e-u;return u===n||i>=t||i<0||f&&e-h>=a}function b(){var e=ks();if(v(e))return y(e);c=Mo(b,function(e){var n=t-(e-u);return f?wn(n,a-(e-h)):n}(e))}function y(e){return c=n,g&&o?p(e):(o=s=n,l)}function w(){var e=ks(),i=v(e);if(o=arguments,s=this,u=e,i){if(c===n)return m(u);if(f)return xr(c),c=Mo(b,t),p(u)}return c===n&&(c=Mo(b,t)),l}return t=ba(t)||0,na(r)&&(d=!!r.leading,a=(f="maxWait"in r)?yn(ba(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g),w.cancel=function(){c!==n&&xr(c),h=0,o=u=s=c=n},w.flush=function(){return c===n?l:y(ks())},w}var Os=Ki((function(e,t){return hi(e,1,t)})),Ns=Ki((function(e,t,n){return hi(e,ba(t)||0,n)}));function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new $e(i);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Bs.Cache||Un),n}function Ps(e){if("function"!=typeof e)throw new $e(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bs.Cache=Un;var Fs=Cr((function(e,t){var n=(t=1==t.length&&Zs(t[0])?Ot(t[0],Qt(co())):Ot(bi(t,1),Qt(co()))).length;return Ki((function(i){for(var r=-1,o=wn(i.length,n);++r=t})),js=Ti(function(){return arguments}())?Ti:function(e){return ia(e)&&Ne.call(e,"callee")&&!Ue.call(e,"callee")},Zs=g.isArray,Xs=wt?Qt(wt):function(e){return ia(e)&&Ii(e)==M};function Us(e){return null!=e&&ta(e.length)&&!qs(e)}function Ys(e){return ia(e)&&Us(e)}var Js=bt||bl,Ks=Ct?Qt(Ct):function(e){return ia(e)&&Ii(e)==w};function Qs(e){if(!ia(e))return!1;var t=Ii(e);return t==C||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function qs(e){if(!na(e))return!1;var t=Ii(e);return t==S||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ea(e){return"number"==typeof e&&e==ma(e)}function ta(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ia(e){return null!=e&&"object"==typeof e}var ra=St?Qt(St):function(e){return ia(e)&&mo(e)==A};function oa(e){return"number"==typeof e||ia(e)&&Ii(e)==R}function sa(e){if(!ia(e)||Ii(e)!=I)return!1;var t=Ze(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==We}var aa=xt?Qt(xt):function(e){return ia(e)&&Ii(e)==k};var la=At?Qt(At):function(e){return ia(e)&&mo(e)==$};function ca(e){return"string"==typeof e||!Zs(e)&&ia(e)&&Ii(e)==_}function ua(e){return"symbol"==typeof e||ia(e)&&Ii(e)==L}var ha=Rt?Qt(Rt):function(e){return ia(e)&&ta(e.length)&&!!at[Ii(e)]};var da=Xr(Wi),fa=Xr((function(e,t){return e<=t}));function ga(e){if(!e)return[];if(Us(e))return ca(e)?pn(e):_r(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=mo(e);return(t==A?cn:t==$?dn:Da)(e)}function pa(e){return e?(e=ba(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function va(e){return e?li(ma(e),0,p):0}function ba(e){if("number"==typeof e)return e;if(ua(e))return f;if(na(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=na(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=me.test(e);return n||be.test(e)?ht(e.slice(2),n?2:8):pe.test(e)?f:+e}function ya(e){return Lr(e,Oa(e))}function wa(e){return null==e?"":ur(e)}var Ca=Mr((function(e,t){if(Ro(t)||Us(t))Lr(t,Ma(t),e);else for(var n in t)Ne.call(t,n)&&ni(e,n,t[n])})),Sa=Mr((function(e,t){Lr(t,Oa(t),e)})),xa=Mr((function(e,t,n,i){Lr(t,Oa(t),e,i)})),Aa=Mr((function(e,t,n,i){Lr(t,Ma(t),e,i)})),Ra=io(ai);var Ia=Ki((function(e,t){e=Ie(e);var i=-1,r=t.length,o=r>2?t[2]:n;for(o&&Co(t[0],t[1],o)&&(r=1);++i1),t})),Lr(e,oo(e),n),i&&(n=ci(n,7,to));for(var r=t.length;r--;)dr(n,t[r]);return n}));var Fa=io((function(e,t){return null==e?{}:function(e,t){return Zi(e,t,(function(t,n){return $a(e,n)}))}(e,t)}));function Wa(e,t){if(null==e)return{};var n=Ot(oo(e),(function(e){return[e]}));return t=co(t),Zi(e,n,(function(e,n){return t(e,n[0])}))}var Ga=Kr(Ma),Ha=Kr(Oa);function Da(e){return null==e?[]:qt(e,Ma(e))}var Va=Pr((function(e,t,n){return t=t.toLowerCase(),e+(n?za(t):t)}));function za(e){return Qa(wa(e).toLowerCase())}function ja(e){return(e=wa(e))&&e.replace(we,on).replace(et,"")}var Za=Pr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Xa=Pr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ua=Br("toLowerCase");var Ya=Pr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ja=Pr((function(e,t,n){return e+(n?" ":"")+Qa(t)}));var Ka=Pr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Br("toUpperCase");function qa(e,t,i){return e=wa(e),(t=i?n:t)===n?function(e){return rt.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var el=Ki((function(e,t){try{return It(e,n,t)}catch(e){return Qs(e)?e:new xe(e)}})),tl=io((function(e,t){return kt(t,(function(t){t=Wo(t),si(e,t,Ls(e[t],e))})),e}));function nl(e){return function(){return e}}var il=Gr(),rl=Gr(!0);function ol(e){return e}function sl(e){return Bi("function"==typeof e?e:ci(e,1))}var al=Ki((function(e,t){return function(n){return Li(n,e,t)}})),ll=Ki((function(e,t){return function(n){return Li(e,n,t)}}));function cl(e,t,n){var i=Ma(t),r=xi(t,i);null!=n||na(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=xi(t,Ma(t)));var o=!(na(n)&&"chain"in n&&!n.chain),s=qs(e);return kt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=_r(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Nt([this.value()],arguments))})})),e}function ul(){}var hl=zr(Ot),dl=zr(_t),fl=zr(Ft);function gl(e){return So(e)?Zt(Wo(e)):function(e){return function(t){return Ai(t,e)}}(e)}var pl=Zr(),ml=Zr(!0);function vl(){return[]}function bl(){return!1}var yl=Vr((function(e,t){return e+t}),0),wl=Yr("ceil"),Cl=Vr((function(e,t){return e/t}),1),Sl=Yr("floor");var xl,Al=Vr((function(e,t){return e*t}),1),Rl=Yr("round"),Il=Vr((function(e,t){return e-t}),0);return Hn.after=function(e,t){if("function"!=typeof t)throw new $e(i);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Hn.ary=$s,Hn.assign=Ca,Hn.assignIn=Sa,Hn.assignInWith=xa,Hn.assignWith=Aa,Hn.at=Ra,Hn.before=_s,Hn.bind=Ls,Hn.bindAll=tl,Hn.bindKey=Ts,Hn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Zs(e)?e:[e]},Hn.chain=gs,Hn.chunk=function(e,t,i){t=(i?Co(e,t,i):t===n)?1:yn(ma(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,s=0,a=g(ft(r/t));oo?0:o+i),(r=r===n||r>o?o:ma(r))<0&&(r+=o),r=i>r?0:va(r);i>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!aa(t))&&!(t=ur(t))&&ln(e)?Sr(pn(e),0,i):e.split(t,i):[]},Hn.spread=function(e,t){if("function"!=typeof e)throw new $e(i);return t=null==t?0:yn(ma(t),0),Ki((function(n){var i=n[t],r=Sr(n,0,t);return i&&Nt(r,i),It(e,this,r)}))},Hn.tail=function(e){var t=null==e?0:e.length;return t?rr(e,1,t):[]},Hn.take=function(e,t,i){return e&&e.length?rr(e,0,(t=i||t===n?1:ma(t))<0?0:t):[]},Hn.takeRight=function(e,t,i){var r=null==e?0:e.length;return r?rr(e,(t=r-(t=i||t===n?1:ma(t)))<0?0:t,r):[]},Hn.takeRightWhile=function(e,t){return e&&e.length?gr(e,co(t,3),!1,!0):[]},Hn.takeWhile=function(e,t){return e&&e.length?gr(e,co(t,3)):[]},Hn.tap=function(e,t){return t(e),e},Hn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new $e(i);return na(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ms(e,t,{leading:r,maxWait:t,trailing:o})},Hn.thru=ps,Hn.toArray=ga,Hn.toPairs=Ga,Hn.toPairsIn=Ha,Hn.toPath=function(e){return Zs(e)?Ot(e,Wo):ua(e)?[e]:_r(Fo(wa(e)))},Hn.toPlainObject=ya,Hn.transform=function(e,t,n){var i=Zs(e),r=i||Js(e)||ha(e);if(t=co(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:na(e)&&qs(o)?Dn(Ze(e)):{}}return(r?kt:Ci)(e,(function(e,i,r){return t(n,e,i,r)})),n},Hn.unary=function(e){return $s(e,1)},Hn.union=is,Hn.unionBy=rs,Hn.unionWith=os,Hn.uniq=function(e){return e&&e.length?hr(e):[]},Hn.uniqBy=function(e,t){return e&&e.length?hr(e,co(t,2)):[]},Hn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?hr(e,n,t):[]},Hn.unset=function(e,t){return null==e||dr(e,t)},Hn.unzip=ss,Hn.unzipWith=as,Hn.update=function(e,t,n){return null==e?e:fr(e,t,yr(n))},Hn.updateWith=function(e,t,i,r){return r="function"==typeof r?r:n,null==e?e:fr(e,t,yr(i),r)},Hn.values=Da,Hn.valuesIn=function(e){return null==e?[]:qt(e,Oa(e))},Hn.without=ls,Hn.words=qa,Hn.wrap=function(e,t){return Ws(yr(t),e)},Hn.xor=cs,Hn.xorBy=us,Hn.xorWith=hs,Hn.zip=ds,Hn.zipObject=function(e,t){return vr(e||[],t||[],ni)},Hn.zipObjectDeep=function(e,t){return vr(e||[],t||[],er)},Hn.zipWith=fs,Hn.entries=Ga,Hn.entriesIn=Ha,Hn.extend=Sa,Hn.extendWith=xa,cl(Hn,Hn),Hn.add=yl,Hn.attempt=el,Hn.camelCase=Va,Hn.capitalize=za,Hn.ceil=wl,Hn.clamp=function(e,t,i){return i===n&&(i=t,t=n),i!==n&&(i=(i=ba(i))==i?i:0),t!==n&&(t=(t=ba(t))==t?t:0),li(ba(e),t,i)},Hn.clone=function(e){return ci(e,4)},Hn.cloneDeep=function(e){return ci(e,5)},Hn.cloneDeepWith=function(e,t){return ci(e,5,t="function"==typeof t?t:n)},Hn.cloneWith=function(e,t){return ci(e,4,t="function"==typeof t?t:n)},Hn.conformsTo=function(e,t){return null==t||ui(e,t,Ma(t))},Hn.deburr=ja,Hn.defaultTo=function(e,t){return null==e||e!=e?t:e},Hn.divide=Cl,Hn.endsWith=function(e,t,i){e=wa(e),t=ur(t);var r=e.length,o=i=i===n?r:li(ma(i),0,r);return(i-=t.length)>=0&&e.slice(i,o)==t},Hn.eq=Ds,Hn.escape=function(e){return(e=wa(e))&&J.test(e)?e.replace(U,sn):e},Hn.escapeRegExp=function(e){return(e=wa(e))&&re.test(e)?e.replace(ie,"\\$&"):e},Hn.every=function(e,t,i){var r=Zs(e)?_t:pi;return i&&Co(e,t,i)&&(t=n),r(e,co(t,3))},Hn.find=bs,Hn.findIndex=jo,Hn.findKey=function(e,t){return Gt(e,co(t,3),Ci)},Hn.findLast=ys,Hn.findLastIndex=Zo,Hn.findLastKey=function(e,t){return Gt(e,co(t,3),Si)},Hn.floor=Sl,Hn.forEach=ws,Hn.forEachRight=Cs,Hn.forIn=function(e,t){return null==e?e:yi(e,co(t,3),Oa)},Hn.forInRight=function(e,t){return null==e?e:wi(e,co(t,3),Oa)},Hn.forOwn=function(e,t){return e&&Ci(e,co(t,3))},Hn.forOwnRight=function(e,t){return e&&Si(e,co(t,3))},Hn.get=ka,Hn.gt=Vs,Hn.gte=zs,Hn.has=function(e,t){return null!=e&&vo(e,t,ki)},Hn.hasIn=$a,Hn.head=Uo,Hn.identity=ol,Hn.includes=function(e,t,n,i){e=Us(e)?e:Da(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=yn(r+n,0)),ca(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Dt(e,t,n)>-1},Hn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=yn(i+r,0)),Dt(e,t,r)},Hn.inRange=function(e,t,i){return t=pa(t),i===n?(i=t,t=0):i=pa(i),function(e,t,n){return e>=wn(t,n)&&e=-9007199254740991&&e<=d},Hn.isSet=la,Hn.isString=ca,Hn.isSymbol=ua,Hn.isTypedArray=ha,Hn.isUndefined=function(e){return e===n},Hn.isWeakMap=function(e){return ia(e)&&mo(e)==T},Hn.isWeakSet=function(e){return ia(e)&&"[object WeakSet]"==Ii(e)},Hn.join=function(e,t){return null==e?"":Wt.call(e,t)},Hn.kebabCase=Za,Hn.last=Qo,Hn.lastIndexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var o=r;return i!==n&&(o=(o=ma(i))<0?yn(r+o,0):wn(o,r-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Ht(e,zt,o,!0)},Hn.lowerCase=Xa,Hn.lowerFirst=Ua,Hn.lt=da,Hn.lte=fa,Hn.max=function(e){return e&&e.length?mi(e,ol,Ei):n},Hn.maxBy=function(e,t){return e&&e.length?mi(e,co(t,2),Ei):n},Hn.mean=function(e){return jt(e,ol)},Hn.meanBy=function(e,t){return jt(e,co(t,2))},Hn.min=function(e){return e&&e.length?mi(e,ol,Wi):n},Hn.minBy=function(e,t){return e&&e.length?mi(e,co(t,2),Wi):n},Hn.stubArray=vl,Hn.stubFalse=bl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=Al,Hn.nth=function(e,t){return e&&e.length?zi(e,ma(t)):n},Hn.noConflict=function(){return gt._===this&&(gt._=Ge),this},Hn.noop=ul,Hn.now=ks,Hn.pad=function(e,t,n){e=wa(e);var i=(t=ma(t))?gn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return jr(pt(r),n)+e+jr(ft(r),n)},Hn.padEnd=function(e,t,n){e=wa(e);var i=(t=ma(t))?gn(e):0;return t&&it){var r=e;e=t,t=r}if(i||e%1||t%1){var o=xn();return wn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Yi(e,t)},Hn.reduce=function(e,t,n){var i=Zs(e)?Bt:Ut,r=arguments.length<3;return i(e,co(t,4),n,r,fi)},Hn.reduceRight=function(e,t,n){var i=Zs(e)?Pt:Ut,r=arguments.length<3;return i(e,co(t,4),n,r,gi)},Hn.repeat=function(e,t,i){return t=(i?Co(e,t,i):t===n)?1:ma(t),Ji(wa(e),t)},Hn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hn.result=function(e,t,i){var r=-1,o=(t=wr(t,e)).length;for(o||(o=1,e=n);++rd)return[];var n=p,i=wn(e,p);t=co(t),e-=p;for(var r=Jt(i,t);++n=s)return e;var l=i-gn(r);if(l<1)return r;var c=a?Sr(a,0,l).join(""):e.slice(0,l);if(o===n)return c+r;if(a&&(l+=c.length-l),aa(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=Ee(o.source,wa(ge.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(ur(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+r},Hn.unescape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(X,vn):e},Hn.uniqueId=function(e){var t=++Be;return wa(e)+t},Hn.upperCase=Ka,Hn.upperFirst=Qa,Hn.each=ws,Hn.eachRight=Cs,Hn.first=Uo,cl(Hn,(xl={},Ci(Hn,(function(e,t){Ne.call(Hn.prototype,t)||(xl[t]=e)})),xl),{chain:!1}),Hn.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hn[e].placeholder=Hn})),kt(["drop","take"],(function(e,t){jn.prototype[e]=function(i){i=i===n?1:yn(ma(i),0);var r=this.__filtered__&&!t?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(i,r.__takeCount__):r.__views__.push({size:wn(i,p),type:e+(r.__dir__<0?"Right":"")}),r},jn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),kt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;jn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),kt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");jn.prototype[e]=function(){return this[n](1).value()[0]}})),kt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");jn.prototype[e]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(ol)},jn.prototype.find=function(e){return this.filter(e).head()},jn.prototype.findLast=function(e){return this.reverse().find(e)},jn.prototype.invokeMap=Ki((function(e,t){return"function"==typeof e?new jn(this):this.map((function(n){return Li(n,e,t)}))})),jn.prototype.reject=function(e){return this.filter(Ps(co(e)))},jn.prototype.slice=function(e,t){e=ma(e);var i=this;return i.__filtered__&&(e>0||t<0)?new jn(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==n&&(i=(t=ma(t))<0?i.dropRight(-t):i.take(t-e)),i)},jn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},jn.prototype.toArray=function(){return this.take(p)},Ci(jn.prototype,(function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Hn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Hn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof jn,c=a[0],u=l||Zs(t),h=function(e){var t=o.apply(Hn,Nt([e],a));return r&&d?t[0]:t};u&&i&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,g=s&&!d,p=l&&!f;if(!s&&u){t=p?t:new jn(this);var m=e.apply(t,a);return m.__actions__.push({func:ps,args:[h],thisArg:n}),new zn(m,d)}return g&&p?e.apply(this,a):(m=this.thru(h),g?r?m.value()[0]:m.value():m)})})),kt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);Hn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Zs(r)?r:[],e)}return this[n]((function(n){return t.apply(Zs(n)?n:[],e)}))}})),Ci(jn.prototype,(function(e,t){var n=Hn[t];if(n){var i=n.name+"";Ne.call(Tn,i)||(Tn[i]=[]),Tn[i].push({name:t,func:n})}})),Tn[Hr(n,2).name]=[{name:"wrapper",func:n}],jn.prototype.clone=function(){var e=new jn(this.__wrapped__);return e.__actions__=_r(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_r(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_r(this.__views__),e},jn.prototype.reverse=function(){if(this.__filtered__){var e=new jn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},jn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Zs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){var i=-1,r=n.length;for(;++i=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Hn.prototype.plant=function(e){for(var t,i=this;i instanceof Vn;){var r=Ho(i);r.__index__=0,r.__values__=n,t?o.__wrapped__=r:t=r;var o=r;i=i.__wrapped__}return o.__wrapped__=e,t},Hn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof jn){var t=e;return this.__actions__.length&&(t=new jn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ns],thisArg:n}),new zn(t,this.__chain__)}return this.thru(ns)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return pr(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,Ke&&(Hn.prototype[Ke]=function(){return this}),Hn}();mt?((mt.exports=bn)._=bn,pt._=bn):gt._=bn}).call(g)}(fu,fu.exports);var gu=fu.exports,pu={exports:{}},mu={exports:{}};!function(e,t){function n(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function i(e){return function(){var t=this,i=arguments;return new Promise((function(r,o){var s=e.apply(t,i);function a(e){n(s,r,o,a,l,"next",e)}function l(e){n(s,r,o,a,l,"throw",e)}a(void 0)}))}}function r(){return(r=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var a={init:"init"},l=function(e){var t=e.value;return void 0===t?"":t},c=function(){return t.createElement(t.Fragment,null," ")},u={Cell:l,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function h(){for(var e=arguments.length,t=new Array(e),n=0;n(o="number"==typeof o?o:1/0)){var s=r;r=o,o=s}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=r&&n<=o}))}))};xe.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};var Ae=Object.freeze({__proto__:null,text:ge,exactText:pe,exactTextCase:me,includes:ve,includesAll:be,includesSome:ye,includesValue:we,exact:Ce,equals:Se,between:xe});a.resetFilters="resetFilters",a.setFilter="setFilter",a.setAllFilters="setAllFilters";var Re=function(e){e.stateReducers.push(Ie),e.useInstance.push(Ee)};function Ie(e,t,n,i){if(t.type===a.init)return r({filters:[]},e);if(t.type===a.resetFilters)return r({},e,{filters:i.initialState.filters||[]});if(t.type===a.setFilter){var o=t.columnId,s=t.filterValue,l=i.allColumns,c=i.filterTypes,u=l.find((function(e){return e.id===o}));if(!u)throw new Error("React-Table: Could not find a column with id: "+o);var h=T(u.filter,c||{},Ae),d=e.filters.find((function(e){return e.id===o})),f=m(s,d&&d.value);return M(h.autoRemove,f,u)?r({},e,{filters:e.filters.filter((function(e){return e.id!==o}))}):r({},e,d?{filters:e.filters.map((function(e){return e.id===o?{id:o,value:f}:e}))}:{filters:[].concat(e.filters,[{id:o,value:f}])})}if(t.type===a.setAllFilters){var g=t.filters,p=i.allColumns,v=i.filterTypes;return r({},e,{filters:m(g,e.filters).filter((function(e){var t=p.find((function(t){return t.id===e.id}));return!M(T(t.filter,v||{},Ae).autoRemove,e.value,t)}))})}}function Ee(e){var n=e.data,i=e.rows,r=e.flatRows,o=e.rowsById,s=e.allColumns,l=e.filterTypes,c=e.manualFilters,u=e.defaultCanFilter,h=void 0!==u&&u,d=e.disableFilters,f=e.state.filters,g=e.dispatch,p=e.autoResetFilters,m=void 0===p||p,b=t.useCallback((function(e,t){g({type:a.setFilter,columnId:e,filterValue:t})}),[g]),w=t.useCallback((function(e){g({type:a.setAllFilters,filters:e})}),[g]);s.forEach((function(e){var t=e.id,n=e.accessor,i=e.defaultCanFilter,r=e.disableFilters;e.canFilter=n?k(!0!==r&&void 0,!0!==d&&void 0,!0):k(i,h,!1),e.setFilter=function(t){return b(e.id,t)};var o=f.find((function(e){return e.id===t}));e.filterValue=o&&o.value}));var C=t.useMemo((function(){if(c||!f.length)return[i,r,o];var e=[],t={};return[function n(i,r){void 0===r&&(r=0);var o=i;return(o=f.reduce((function(e,t){var n=t.id,i=t.value,o=s.find((function(e){return e.id===n}));if(!o)return e;0===r&&(o.preFilteredRows=e);var a=T(o.filter,l||{},Ae);return a?(o.filteredRows=a(e,[n],i),o.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+o.id+"."),e)}),i)).forEach((function(i){e.push(i),t[i.id]=i,i.subRows&&(i.subRows=i.subRows&&i.subRows.length>0?n(i.subRows,r+1):i.subRows)})),o}(i),e,t]}),[c,f,i,r,o,s,l]),S=C[0],x=C[1],A=C[2];t.useMemo((function(){s.filter((function(e){return!f.find((function(t){return t.id===e.id}))})).forEach((function(e){e.preFilteredRows=S,e.filteredRows=S}))}),[S,f,s]);var R=v(m);y((function(){R()&&g({type:a.resetFilters})}),[g,c?null:n]),Object.assign(e,{preFilteredRows:i,preFilteredFlatRows:r,preFilteredRowsById:o,filteredRows:S,filteredFlatRows:x,filteredRowsById:A,rows:S,flatRows:x,rowsById:A,setFilter:b,setAllFilters:w})}Re.pluginName="useFilters",a.resetGlobalFilter="resetGlobalFilter",a.setGlobalFilter="setGlobalFilter";var ke=function(e){e.stateReducers.push($e),e.useInstance.push(_e)};function $e(e,t,n,i){if(t.type===a.resetGlobalFilter)return r({},e,{globalFilter:i.initialState.globalFilter||void 0});if(t.type===a.setGlobalFilter){var s=t.filterValue,l=i.userFilterTypes,c=T(i.globalFilter,l||{},Ae),u=m(s,e.globalFilter);return M(c.autoRemove,u)?(e.globalFilter,o(e,["globalFilter"])):r({},e,{globalFilter:u})}}function _e(e){var n=e.data,i=e.rows,r=e.flatRows,o=e.rowsById,s=e.allColumns,l=e.filterTypes,c=e.globalFilter,u=e.manualGlobalFilter,h=e.state.globalFilter,d=e.dispatch,f=e.autoResetGlobalFilter,g=void 0===f||f,p=e.disableGlobalFilter,m=t.useCallback((function(e){d({type:a.setGlobalFilter,filterValue:e})}),[d]),b=t.useMemo((function(){if(u||void 0===h)return[i,r,o];var e=[],t={},n=T(c,l||{},Ae);if(!n)return console.warn("Could not find a valid 'globalFilter' option."),i;s.forEach((function(e){var t=e.disableGlobalFilter;e.canFilter=k(!0!==t&&void 0,!0!==p&&void 0,!0)}));var a=s.filter((function(e){return!0===e.canFilter}));return[function i(r){return(r=n(r,a.map((function(e){return e.id})),h)).forEach((function(n){e.push(n),t[n.id]=n,n.subRows=n.subRows&&n.subRows.length?i(n.subRows):n.subRows})),r}(i),e,t]}),[u,h,c,l,s,i,r,o,p]),w=b[0],C=b[1],S=b[2],x=v(g);y((function(){x()&&d({type:a.resetGlobalFilter})}),[d,u?null:n]),Object.assign(e,{preGlobalFilteredRows:i,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:o,globalFilteredRows:w,globalFilteredFlatRows:C,globalFilteredRowsById:S,rows:w,flatRows:C,rowsById:S,setGlobalFilter:m,disableGlobalFilter:p})}function Le(e,t){return t.reduce((function(e,t){return e+("number"==typeof t?t:0)}),0)}ke.pluginName="useGlobalFilter";var Te=Object.freeze({__proto__:null,sum:Le,min:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e))})),t},max:function(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.max(t,e))})),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e),n=Math.max(n,e))})),t+".."+n},average:function(e){return Le(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort((function(e,t){return e-t}));return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),Me=[],Oe={};a.resetGroupBy="resetGroupBy",a.setGroupBy="setGroupBy",a.toggleGroupBy="toggleGroupBy";var Ne=function(e){e.getGroupByToggleProps=[Be],e.stateReducers.push(Pe),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.groupBy])})),e.visibleColumns.push(Fe),e.useInstance.push(Ge),e.prepareRow.push(He)};Ne.pluginName="useGroupBy";var Be=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(e){e.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Pe(e,t,n,i){if(t.type===a.init)return r({groupBy:[]},e);if(t.type===a.resetGroupBy)return r({},e,{groupBy:i.initialState.groupBy||[]});if(t.type===a.setGroupBy)return r({},e,{groupBy:t.value});if(t.type===a.toggleGroupBy){var o=t.columnId,s=t.value,l=void 0!==s?s:!e.groupBy.includes(o);return r({},e,l?{groupBy:[].concat(e.groupBy,[o])}:{groupBy:e.groupBy.filter((function(e){return e!==o}))})}}function Fe(e,t){var n=t.instance.state.groupBy,i=n.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean),r=e.filter((function(e){return!n.includes(e.id)}));return(e=[].concat(i,r)).forEach((function(e){e.isGrouped=n.includes(e.id),e.groupedIndex=n.indexOf(e.id)})),e}var We={};function Ge(e){var n=e.data,i=e.rows,o=e.flatRows,s=e.rowsById,l=e.allColumns,c=e.flatHeaders,u=e.groupByFn,h=void 0===u?De:u,f=e.manualGroupBy,g=e.aggregations,m=void 0===g?We:g,b=e.plugins,w=e.state.groupBy,C=e.dispatch,S=e.autoResetGroupBy,x=void 0===S||S,A=e.disableGroupBy,R=e.defaultCanGroupBy,I=e.getHooks;p(b,["useColumnOrder","useFilters"],"useGroupBy");var E=v(e);l.forEach((function(t){var n=t.accessor,i=t.defaultGroupBy,r=t.disableGroupBy;t.canGroupBy=n?k(t.canGroupBy,!0!==r&&void 0,!0!==A&&void 0,!0):k(t.canGroupBy,i,R,!1),t.canGroupBy&&(t.toggleGroupBy=function(){return e.toggleGroupBy(t.id)}),t.Aggregated=t.Aggregated||t.Cell}));var $=t.useCallback((function(e,t){C({type:a.toggleGroupBy,columnId:e,value:t})}),[C]),L=t.useCallback((function(e){C({type:a.setGroupBy,value:e})}),[C]);c.forEach((function(e){e.getGroupByToggleProps=d(I().getGroupByToggleProps,{instance:E(),header:e})}));var T=t.useMemo((function(){if(f||!w.length)return[i,o,s,Me,Oe,o,s];var e=w.filter((function(e){return l.find((function(t){return t.id===e}))})),t=[],n={},a=[],c={},u=[],d={},g=function i(o,s,f){if(void 0===s&&(s=0),s===e.length)return o.map((function(e){return r({},e,{depth:s})}));var g=e[s],p=h(o,g);return Object.entries(p).map((function(r,o){var h=r[0],p=r[1],v=g+":"+h,b=i(p,s+1,v=f?f+">"+v:v),y=s?_(p,"leafRows"):p,w=function(t,n,i){var r={};return l.forEach((function(o){if(e.includes(o.id))r[o.id]=n[0]?n[0].values[o.id]:null;else{var s="function"==typeof o.aggregate?o.aggregate:m[o.aggregate]||Te[o.aggregate];if(s){var a=n.map((function(e){return e.values[o.id]})),l=t.map((function(e){var t=e.values[o.id];if(!i&&o.aggregateValue){var n="function"==typeof o.aggregateValue?o.aggregateValue:m[o.aggregateValue]||Te[o.aggregateValue];if(!n)throw console.info({column:o}),new Error("React Table: Invalid column.aggregateValue option for column listed above");t=n(t,e,o)}return t}));r[o.id]=s(l,a)}else{if(o.aggregate)throw console.info({column:o}),new Error("React Table: Invalid column.aggregate option for column listed above");r[o.id]=null}}})),r}(y,p,s),C={id:v,isGrouped:!0,groupByID:g,groupByVal:h,values:w,subRows:b,leafRows:y,depth:s,index:o};return b.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(a.push(e),c[e.id]=e):(u.push(e),d[e.id]=e)})),C}))}(i);return g.forEach((function(e){t.push(e),n[e.id]=e,e.isGrouped?(a.push(e),c[e.id]=e):(u.push(e),d[e.id]=e)})),[g,t,n,a,c,u,d]}),[f,w,i,o,s,l,m,h]),M=T[0],O=T[1],N=T[2],B=T[3],P=T[4],F=T[5],W=T[6],G=v(x);y((function(){G()&&C({type:a.resetGroupBy})}),[C,f?null:n]),Object.assign(e,{preGroupedRows:i,preGroupedFlatRow:o,preGroupedRowsById:s,groupedRows:M,groupedFlatRows:O,groupedRowsById:N,onlyGroupedFlatRows:B,onlyGroupedRowsById:P,nonGroupedFlatRows:F,nonGroupedRowsById:W,rows:M,flatRows:O,rowsById:N,toggleGroupBy:$,setGroupBy:L})}function He(e){e.allCells.forEach((function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&(null==(n=e.subRows)?void 0:n.length)}))}function De(e,t){return e.reduce((function(e,n,i){var r=""+n.values[t];return e[r]=Array.isArray(e[r])?e[r]:[],e[r].push(n),e}),{})}var Ve=/([0-9]+)/gm;function ze(e,t){return e===t?0:e>t?1:-1}function je(e,t,n){return[e.values[n],t.values[n]]}function Ze(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var Xe=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var i=je(e,t,n),r=i[0],o=i[1];for(r=Ze(r),o=Ze(o),r=r.split(Ve).filter(Boolean),o=o.split(Ve).filter(Boolean);r.length&&o.length;){var s=r.shift(),a=o.shift(),l=parseInt(s,10),c=parseInt(a,10),u=[l,c].sort();if(isNaN(u[0])){if(s>a)return 1;if(a>s)return-1}else{if(isNaN(u[1]))return isNaN(l)?-1:1;if(l>c)return 1;if(c>l)return-1}}return r.length-o.length},datetime:function(e,t,n){var i=je(e,t,n),r=i[0],o=i[1];return ze(r=r.getTime(),o=o.getTime())},basic:function(e,t,n){var i=je(e,t,n);return ze(i[0],i[1])},string:function(e,t,n){var i=je(e,t,n),r=i[0],o=i[1];for(r=r.split("").filter(Boolean),o=o.split("").filter(Boolean);r.length&&o.length;){var s=r.shift(),a=o.shift(),l=s.toLowerCase(),c=a.toLowerCase();if(l>c)return 1;if(c>l)return-1;if(s>a)return 1;if(a>s)return-1}return r.length-o.length},number:function(e,t,n){var i=je(e,t,n),r=i[0],o=i[1],s=/[^0-9.]/gi;return ze(r=Number(String(r).replace(s,"")),o=Number(String(o).replace(s,"")))}});a.resetSortBy="resetSortBy",a.setSortBy="setSortBy",a.toggleSortBy="toggleSortBy",a.clearSortBy="clearSortBy",u.sortType="alphanumeric",u.sortDescFirst=!1;var Ue=function(e){e.getSortByToggleProps=[Ye],e.stateReducers.push(Je),e.useInstance.push(Ke)};Ue.pluginName="useSortBy";var Ye=function(e,t){var n=t.instance,i=t.column,r=n.isMultiSortEvent,o=void 0===r?function(e){return e.shiftKey}:r;return[e,{onClick:i.canSort?function(e){e.persist(),i.toggleSortBy(void 0,!n.disableMultiSort&&o(e))}:void 0,style:{cursor:i.canSort?"pointer":void 0},title:i.canSort?"Toggle SortBy":void 0}]};function Je(e,t,n,i){if(t.type===a.init)return r({sortBy:[]},e);if(t.type===a.resetSortBy)return r({},e,{sortBy:i.initialState.sortBy||[]});if(t.type===a.clearSortBy)return r({},e,{sortBy:e.sortBy.filter((function(e){return e.id!==t.columnId}))});if(t.type===a.setSortBy)return r({},e,{sortBy:t.sortBy});if(t.type===a.toggleSortBy){var o,s=t.columnId,l=t.desc,c=t.multi,u=i.allColumns,h=i.disableMultiSort,d=i.disableSortRemove,f=i.disableMultiRemove,g=i.maxMultiSortColCount,p=void 0===g?Number.MAX_SAFE_INTEGER:g,m=e.sortBy,v=u.find((function(e){return e.id===s})).sortDescFirst,b=m.find((function(e){return e.id===s})),y=m.findIndex((function(e){return e.id===s})),w=null!=l,C=[];return"toggle"!=(o=!h&&c?b?"toggle":"add":y!==m.length-1||1!==m.length?"replace":b?"toggle":"replace")||d||w||c&&f||!(b&&b.desc&&!v||!b.desc&&v)||(o="remove"),"replace"===o?C=[{id:s,desc:w?l:v}]:"add"===o?(C=[].concat(m,[{id:s,desc:w?l:v}])).splice(0,C.length-p):"toggle"===o?C=m.map((function(e){return e.id===s?r({},e,{desc:w?l:!b.desc}):e})):"remove"===o&&(C=m.filter((function(e){return e.id!==s}))),r({},e,{sortBy:C})}}function Ke(e){var n=e.data,i=e.rows,r=e.flatRows,o=e.allColumns,s=e.orderByFn,l=void 0===s?Qe:s,c=e.sortTypes,u=e.manualSortBy,h=e.defaultCanSort,f=e.disableSortBy,g=e.flatHeaders,m=e.state.sortBy,b=e.dispatch,w=e.plugins,C=e.getHooks,S=e.autoResetSortBy,x=void 0===S||S;p(w,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var A=t.useCallback((function(e){b({type:a.setSortBy,sortBy:e})}),[b]),R=t.useCallback((function(e,t,n){b({type:a.toggleSortBy,columnId:e,desc:t,multi:n})}),[b]),I=v(e);g.forEach((function(e){var t=e.accessor,n=e.canSort,i=e.disableSortBy,r=e.id,o=t?k(!0!==i&&void 0,!0!==f&&void 0,!0):k(h,n,!1);e.canSort=o,e.canSort&&(e.toggleSortBy=function(t,n){return R(e.id,t,n)},e.clearSortBy=function(){b({type:a.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=d(C().getSortByToggleProps,{instance:I(),column:e});var s=m.find((function(e){return e.id===r}));e.isSorted=!!s,e.sortedIndex=m.findIndex((function(e){return e.id===r})),e.isSortedDesc=e.isSorted?s.desc:void 0}));var E=t.useMemo((function(){if(u||!m.length)return[i,r];var e=[],t=m.filter((function(e){return o.find((function(t){return t.id===e.id}))}));return[function n(i){var r=l(i,t.map((function(e){var t=o.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,i=$(n)||(c||{})[n]||Xe[n];if(!i)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return i(t,n,e.id,e.desc)}})),t.map((function(e){var t=o.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return r.forEach((function(t){e.push(t),t.subRows&&0!==t.subRows.length&&(t.subRows=n(t.subRows))})),r}(i),e]}),[u,m,i,r,o,l,c]),_=E[0],L=E[1],T=v(x);y((function(){T()&&b({type:a.resetSortBy})}),[u?null:n]),Object.assign(e,{preSortedRows:i,preSortedFlatRows:r,sortedRows:_,sortedFlatRows:L,rows:_,flatRows:L,setSortBy:A,toggleSortBy:R})}function Qe(e,t,n){return[].concat(e).sort((function(e,i){for(var r=0;re.pageIndex?c=-1===o?s.length>=e.pageSize:l-1),c?r({},e,{pageIndex:l}):e}if(t.type===a.setPageSize){var u=t.pageSize,h=e.pageSize*e.pageIndex;return r({},e,{pageIndex:Math.floor(h/u),pageSize:u})}}function tt(e){var n=e.rows,i=e.autoResetPage,r=void 0===i||i,o=e.manualExpandedKey,s=void 0===o?"expanded":o,l=e.plugins,c=e.pageCount,u=e.paginateExpandedRows,h=void 0===u||u,d=e.expandSubRows,f=void 0===d||d,g=e.state,m=g.pageSize,b=g.pageIndex,w=g.expanded,C=g.globalFilter,S=g.filters,x=g.groupBy,A=g.sortBy,R=e.dispatch,I=e.data,E=e.manualPagination;p(l,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var k=v(r);y((function(){k()&&R({type:a.resetPage})}),[R,E?null:I,C,S,x,A]);var $=E?c:Math.ceil(n.length/m),_=t.useMemo((function(){return $>0?[].concat(new Array($)).fill(null).map((function(e,t){return t})):[]}),[$]),T=t.useMemo((function(){var e;if(E)e=n;else{var t=m*b,i=t+m;e=n.slice(t,i)}return h?e:L(e,{manualExpandedKey:s,expanded:w,expandSubRows:f})}),[f,w,s,E,b,m,h,n]),M=b>0,O=-1===$?T.length>=m:b<$-1,N=t.useCallback((function(e){R({type:a.gotoPage,pageIndex:e})}),[R]),B=t.useCallback((function(){return N((function(e){return e-1}))}),[N]),P=t.useCallback((function(){return N((function(e){return e+1}))}),[N]),F=t.useCallback((function(e){R({type:a.setPageSize,pageSize:e})}),[R]);Object.assign(e,{pageOptions:_,pageCount:$,page:T,canPreviousPage:M,canNextPage:O,gotoPage:N,previousPage:B,nextPage:P,setPageSize:F})}qe.pluginName="usePagination",a.resetPivot="resetPivot",a.togglePivot="togglePivot";var nt=function(e){e.getPivotToggleProps=[rt],e.stateReducers.push(ot),e.useInstanceAfterData.push(st),e.allColumns.push(at),e.accessValue.push(lt),e.materializedColumns.push(ct),e.materializedColumnsDeps.push(ut),e.visibleColumns.push(ht),e.visibleColumnsDeps.push(dt),e.useInstance.push(ft),e.prepareRow.push(gt)};nt.pluginName="usePivotColumns";var it=[],rt=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(e){e.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function ot(e,t,n,i){if(t.type===a.init)return r({pivotColumns:it},e);if(t.type===a.resetPivot)return r({},e,{pivotColumns:i.initialState.pivotColumns||it});if(t.type===a.togglePivot){var o=t.columnId,s=t.value,l=void 0!==s?s:!e.pivotColumns.includes(o);return r({},e,l?{pivotColumns:[].concat(e.pivotColumns,[o])}:{pivotColumns:e.pivotColumns.filter((function(e){return e!==o}))})}}function st(e){e.allColumns.forEach((function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)}))}function at(e,t){var n=t.instance;return e.forEach((function(e){e.isPivotSource=n.state.pivotColumns.includes(e.id),e.uniqueValues=new Set})),e}function lt(e,t){var n=t.column;return n.uniqueValues&&void 0!==e&&n.uniqueValues.add(e),e}function ct(e,t){var n=t.instance,i=n.allColumns,o=n.state;if(!o.pivotColumns.length||!o.groupBy||!o.groupBy.length)return e;var s=o.pivotColumns.map((function(e){return i.find((function(t){return t.id===e}))})).filter(Boolean),a=i.filter((function(e){return!e.isPivotSource&&!o.groupBy.includes(e.id)&&!o.pivotColumns.includes(e.id)})),l=x(function e(t,n,i){void 0===t&&(t=0),void 0===i&&(i=[]);var o=s[t];return o?Array.from(o.uniqueValues).sort().map((function(s){var a=r({},o,{Header:o.PivotHeader||"string"==typeof o.header?o.Header+": "+s:s,isPivotGroup:!0,parent:n,depth:t,id:n?n.id+"."+o.id+"."+s:o.id+"."+s,pivotValue:s});return a.columns=e(t+1,a,[].concat(i,[function(e){return e.values[o.id]===s}])),a})):a.map((function(e){return r({},e,{canPivot:!1,isPivoted:!0,parent:n,depth:t,id:""+(n?n.id+"."+e.id:e.id),accessor:function(t,n,r){if(i.every((function(e){return e(r)})))return r.values[e.id]}})}))}());return[].concat(e,l)}function ut(e,t){var n=t.instance.state,i=n.pivotColumns,r=n.groupBy;return[].concat(e,[i,r])}function ht(e,t){var n=t.instance.state;return e=e.filter((function(e){return!e.isPivotSource})),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter((function(e){return e.isGrouped||e.isPivoted}))),e}function dt(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function ft(e){var t=e.columns,n=e.allColumns,i=e.flatHeaders,r=e.getHooks,o=e.plugins,s=e.dispatch,l=e.autoResetPivot,c=void 0===l||l,u=e.manaulPivot,h=e.disablePivot,f=e.defaultCanPivot;p(o,["useGroupBy"],"usePivotColumns");var g=v(e);n.forEach((function(t){var n=t.accessor,i=t.defaultPivot,r=t.disablePivot;t.canPivot=n?k(t.canPivot,!0!==r&&void 0,!0!==h&&void 0,!0):k(t.canPivot,i,f,!1),t.canPivot&&(t.togglePivot=function(){return e.togglePivot(t.id)}),t.Aggregated=t.Aggregated||t.Cell})),i.forEach((function(e){e.getPivotToggleProps=d(r().getPivotToggleProps,{instance:g(),header:e})}));var m=v(c);y((function(){m()&&s({type:a.resetPivot})}),[s,u?null:t]),Object.assign(e,{togglePivot:function(e,t){s({type:a.togglePivot,columnId:e,value:t})}})}function gt(e){e.allCells.forEach((function(e){e.isPivoted=e.column.isPivoted}))}a.resetSelectedRows="resetSelectedRows",a.toggleAllRowsSelected="toggleAllRowsSelected",a.toggleRowSelected="toggleRowSelected",a.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var pt=function(e){e.getToggleRowSelectedProps=[mt],e.getToggleAllRowsSelectedProps=[vt],e.getToggleAllPageRowsSelectedProps=[bt],e.stateReducers.push(yt),e.useInstance.push(wt),e.prepareRow.push(Ct)};pt.pluginName="useRowSelect";var mt=function(e,t){var n=t.instance,i=t.row,r=n.manualRowSelectedKey,o=void 0===r?"isSelected":r;return[e,{onChange:function(e){i.toggleRowSelected(e.target.checked)},style:{cursor:"pointer"},checked:!(!i.original||!i.original[o])||i.isSelected,title:"Toggle Row Selected",indeterminate:i.isSomeSelected}]},vt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},bt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllPageRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some((function(e){var t=e.id;return n.state.selectedRowIds[t]})))}]};function yt(e,t,n,i){if(t.type===a.init)return r({selectedRowIds:{}},e);if(t.type===a.resetSelectedRows)return r({},e,{selectedRowIds:i.initialState.selectedRowIds||{}});if(t.type===a.toggleAllRowsSelected){var o=t.value,s=i.isAllRowsSelected,l=i.rowsById,c=i.nonGroupedRowsById,u=void 0===c?l:c,h=void 0!==o?o:!s,d=Object.assign({},e.selectedRowIds);return h?Object.keys(u).forEach((function(e){d[e]=!0})):Object.keys(u).forEach((function(e){delete d[e]})),r({},e,{selectedRowIds:d})}if(t.type===a.toggleRowSelected){var f=t.id,g=t.value,p=i.rowsById,m=i.selectSubRows,v=void 0===m||m,b=i.getSubRows,y=e.selectedRowIds[f],w=void 0!==g?g:!y;if(y===w)return e;var C=r({},e.selectedRowIds);return function e(t){var n=p[t];if(n&&(n.isGrouped||(w?C[t]=!0:delete C[t]),v&&b(n)))return b(n).forEach((function(t){return e(t.id)}))}(f),r({},e,{selectedRowIds:C})}if(t.type===a.toggleAllPageRowsSelected){var S=t.value,x=i.page,A=i.rowsById,R=i.selectSubRows,I=void 0===R||R,E=i.isAllPageRowsSelected,k=i.getSubRows,$=void 0!==S?S:!E,_=r({},e.selectedRowIds);return x.forEach((function(e){return function e(t){var n=A[t];if(n.isGrouped||($?_[t]=!0:delete _[t]),I&&k(n))return k(n).forEach((function(t){return e(t.id)}))}(e.id)})),r({},e,{selectedRowIds:_})}return e}function wt(e){var n=e.data,i=e.rows,r=e.getHooks,o=e.plugins,s=e.rowsById,l=e.nonGroupedRowsById,c=void 0===l?s:l,u=e.autoResetSelectedRows,h=void 0===u||u,f=e.state.selectedRowIds,g=e.selectSubRows,m=void 0===g||g,b=e.dispatch,w=e.page,C=e.getSubRows;p(o,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var S=t.useMemo((function(){var e=[];return i.forEach((function(t){var n=m?function e(t,n,i){if(n[t.id])return!0;var r=i(t);if(r&&r.length){var o=!0,s=!1;return r.forEach((function(t){s&&!o||(e(t,n,i)?s=!0:o=!1)})),!!o||!!s&&null}return!1}(t,f,C):!!f[t.id];t.isSelected=!!n,t.isSomeSelected=null===n,n&&e.push(t)})),e}),[i,m,f,C]),x=Boolean(Object.keys(c).length&&Object.keys(f).length),A=x;x&&Object.keys(c).some((function(e){return!f[e]}))&&(x=!1),x||w&&w.length&&w.some((function(e){var t=e.id;return!f[t]}))&&(A=!1);var R=v(h);y((function(){R()&&b({type:a.resetSelectedRows})}),[b,n]);var I=t.useCallback((function(e){return b({type:a.toggleAllRowsSelected,value:e})}),[b]),E=t.useCallback((function(e){return b({type:a.toggleAllPageRowsSelected,value:e})}),[b]),k=t.useCallback((function(e,t){return b({type:a.toggleRowSelected,id:e,value:t})}),[b]),$=v(e),_=d(r().getToggleAllRowsSelectedProps,{instance:$()}),L=d(r().getToggleAllPageRowsSelectedProps,{instance:$()});Object.assign(e,{selectedFlatRows:S,isAllRowsSelected:x,isAllPageRowsSelected:A,toggleRowSelected:k,toggleAllRowsSelected:I,getToggleAllRowsSelectedProps:_,getToggleAllPageRowsSelectedProps:L,toggleAllPageRowsSelected:E})}function Ct(e,t){var n=t.instance;e.toggleRowSelected=function(t){return n.toggleRowSelected(e.id,t)},e.getToggleRowSelectedProps=d(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}var St=function(e){return{}},xt=function(e){return{}};a.setRowState="setRowState",a.setCellState="setCellState",a.resetRowState="resetRowState";var At=function(e){e.stateReducers.push(Rt),e.useInstance.push(It),e.prepareRow.push(Et)};function Rt(e,t,n,i){var o=i.initialRowStateAccessor,s=void 0===o?St:o,l=i.initialCellStateAccessor,c=void 0===l?xt:l,u=i.rowsById;if(t.type===a.init)return r({rowState:{}},e);if(t.type===a.resetRowState)return r({},e,{rowState:i.initialState.rowState||{}});if(t.type===a.setRowState){var h,d=t.rowId,f=t.value,g=void 0!==e.rowState[d]?e.rowState[d]:s(u[d]);return r({},e,{rowState:r({},e.rowState,(h={},h[d]=m(f,g),h))})}if(t.type===a.setCellState){var p,v,b,y,w,C=t.rowId,S=t.columnId,x=t.value,A=void 0!==e.rowState[C]?e.rowState[C]:s(u[C]),R=void 0!==(null==A||null==(p=A.cellState)?void 0:p[S])?A.cellState[S]:c(null==(v=u[C])||null==(b=v.cells)?void 0:b.find((function(e){return e.column.id===S})));return r({},e,{rowState:r({},e.rowState,(w={},w[C]=r({},A,{cellState:r({},A.cellState||{},(y={},y[S]=m(x,R),y))}),w))})}}function It(e){var n=e.autoResetRowState,i=void 0===n||n,r=e.data,o=e.dispatch,s=t.useCallback((function(e,t){return o({type:a.setRowState,rowId:e,value:t})}),[o]),l=t.useCallback((function(e,t,n){return o({type:a.setCellState,rowId:e,columnId:t,value:n})}),[o]),c=v(i);y((function(){c()&&o({type:a.resetRowState})}),[r]),Object.assign(e,{setRowState:s,setCellState:l})}function Et(e,t){var n=t.instance,i=n.initialRowStateAccessor,r=void 0===i?St:i,o=n.initialCellStateAccessor,s=void 0===o?xt:o,a=n.state.rowState;e&&(e.state=void 0!==a[e.id]?a[e.id]:r(e),e.setState=function(t){return n.setRowState(e.id,t)},e.cells.forEach((function(t){e.state.cellState||(e.state.cellState={}),t.state=void 0!==e.state.cellState[t.column.id]?e.state.cellState[t.column.id]:s(t),t.setState=function(i){return n.setCellState(e.id,t.column.id,i)}})))}At.pluginName="useRowState",a.resetColumnOrder="resetColumnOrder",a.setColumnOrder="setColumnOrder";var kt=function(e){e.stateReducers.push($t),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.columnOrder])})),e.visibleColumns.push(_t),e.useInstance.push(Lt)};function $t(e,t,n,i){return t.type===a.init?r({columnOrder:[]},e):t.type===a.resetColumnOrder?r({},e,{columnOrder:i.initialState.columnOrder||[]}):t.type===a.setColumnOrder?r({},e,{columnOrder:m(t.columnOrder,e.columnOrder)}):void 0}function _t(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var i=[].concat(n),r=[].concat(e),o=[],s=function(){var e=i.shift(),t=r.findIndex((function(t){return t.id===e}));t>-1&&o.push(r.splice(t,1)[0])};r.length&&i.length;)s();return[].concat(o,r)}function Lt(e){var n=e.dispatch;e.setColumnOrder=t.useCallback((function(e){return n({type:a.setColumnOrder,columnOrder:e})}),[n])}kt.pluginName="useColumnOrder",u.canResize=!0,a.columnStartResizing="columnStartResizing",a.columnResizing="columnResizing",a.columnDoneResizing="columnDoneResizing",a.resetResize="resetResize";var Tt=function(e){e.getResizerProps=[Mt],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(Ot),e.useInstance.push(Bt),e.useInstanceBeforeDimensions.push(Nt)},Mt=function(e,t){var n=t.instance,i=t.header,r=n.dispatch,o=function(e,t){var n=!1;if("touchstart"===e.type){if(e.touches&&e.touches.length>1)return;n=!0}var i,o,s=function(e){var t=[];return function e(n){n.columns&&n.columns.length&&n.columns.map(e),t.push(n)}(e),t}(t).map((function(e){return[e.id,e.totalWidth]})),l=n?Math.round(e.touches[0].clientX):e.clientX,c=function(){window.cancelAnimationFrame(i),i=null,r({type:a.columnDoneResizing})},u=function(){window.cancelAnimationFrame(i),i=null,r({type:a.columnResizing,clientX:o})},h=function(e){o=e,i||(i=window.requestAnimationFrame(u))},d={mouse:{moveEvent:"mousemove",moveHandler:function(e){return h(e.clientX)},upEvent:"mouseup",upHandler:function(e){document.removeEventListener("mousemove",d.mouse.moveHandler),document.removeEventListener("mouseup",d.mouse.upHandler),c()}},touch:{moveEvent:"touchmove",moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(e){document.removeEventListener(d.touch.moveEvent,d.touch.moveHandler),document.removeEventListener(d.touch.upEvent,d.touch.moveHandler),c()}}},f=n?d.touch:d.mouse,g=!!function(){if("boolean"==typeof N)return N;var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return N=e}()&&{passive:!1};document.addEventListener(f.moveEvent,f.moveHandler,g),document.addEventListener(f.upEvent,f.upHandler,g),r({type:a.columnStartResizing,columnId:t.id,columnWidth:t.totalWidth,headerIdWidths:s,clientX:l})};return[e,{onMouseDown:function(e){return e.persist()||o(e,i)},onTouchStart:function(e){return e.persist()||o(e,i)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Ot(e,t){if(t.type===a.init)return r({columnResizing:{columnWidths:{}}},e);if(t.type===a.resetResize)return r({},e,{columnResizing:{columnWidths:{}}});if(t.type===a.columnStartResizing){var n=t.clientX,i=t.columnId,o=t.columnWidth,s=t.headerIdWidths;return r({},e,{columnResizing:r({},e.columnResizing,{startX:n,headerIdWidths:s,columnWidth:o,isResizingColumn:i})})}if(t.type===a.columnResizing){var l=t.clientX,c=e.columnResizing,u=c.startX,h=c.columnWidth,d=c.headerIdWidths,f=(l-u)/h,g={};return(void 0===d?[]:d).forEach((function(e){var t=e[0],n=e[1];g[t]=Math.max(n+n*f,0)})),r({},e,{columnResizing:r({},e.columnResizing,{columnWidths:r({},e.columnResizing.columnWidths,{},g)})})}return t.type===a.columnDoneResizing?r({},e,{columnResizing:r({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}Tt.pluginName="useResizeColumns";var Nt=function(e){var t=e.flatHeaders,n=e.disableResizing,i=e.getHooks,r=e.state.columnResizing,o=v(e);t.forEach((function(e){var t=k(!0!==e.disableResizing&&void 0,!0!==n&&void 0,!0);e.canResize=t,e.width=r.columnWidths[e.id]||e.originalWidth||e.width,e.isResizing=r.isResizingColumn===e.id,t&&(e.getResizerProps=d(i().getResizerProps,{instance:o(),header:e}))}))};function Bt(e){var n=e.plugins,i=e.dispatch,r=e.autoResetResize,o=void 0===r||r,s=e.columns;p(n,["useAbsoluteLayout"],"useResizeColumns");var l=v(o);y((function(){l()&&i({type:a.resetResize})}),[s]);var c=t.useCallback((function(){return i({type:a.resetResize})}),[i]);Object.assign(e,{resetResizing:c})}var Pt={position:"absolute",top:0},Ft=function(e){e.getTableBodyProps.push(Wt),e.getRowProps.push(Wt),e.getHeaderGroupProps.push(Wt),e.getFooterGroupProps.push(Wt),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:r({},Pt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:r({},Pt,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:r({},Pt,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]}))};Ft.pluginName="useAbsoluteLayout";var Wt=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},Gt={display:"inline-block",boxSizing:"border-box"},Ht=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},Dt=function(e){e.getRowProps.push(Ht),e.getHeaderGroupProps.push(Ht),e.getFooterGroupProps.push(Ht),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:r({},Gt,{width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:r({},Gt,{width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:r({},Gt,{width:n.totalWidth+"px"})}]}))};function Vt(e){e.getTableProps.push(zt),e.getRowProps.push(jt),e.getHeaderGroupProps.push(jt),e.getFooterGroupProps.push(jt),e.getHeaderProps.push(Zt),e.getCellProps.push(Xt),e.getFooterProps.push(Ut)}Dt.pluginName="useBlockLayout",Vt.pluginName="useFlexLayout";var zt=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},jt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Zt=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Xt=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},Ut=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function Yt(e){e.stateReducers.push(qt),e.getTableProps.push(Jt),e.getHeaderProps.push(Kt),e.getRowProps.push(Qt)}a.columnStartResizing="columnStartResizing",a.columnResizing="columnResizing",a.columnDoneResizing="columnDoneResizing",a.resetResize="resetResize",Yt.pluginName="useGridLayout";var Jt=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map((function(e){var t;return n.state.gridLayout.columnWidths[e.id]?n.state.gridLayout.columnWidths[e.id]+"px":(null==(t=n.state.columnResizing)?void 0:t.isResizingColumn)?n.state.gridLayout.startWidths[e.id]+"px":"number"==typeof e.width?e.width+"px":e.width})).join(" ")}}]},Kt=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Qt=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function qt(e,t,n,i){if(t.type===a.init)return r({gridLayout:{columnWidths:{}}},e);if(t.type===a.resetResize)return r({},e,{gridLayout:{columnWidths:{}}});if(t.type===a.columnStartResizing){var o=t.columnId,s=t.headerIdWidths,l=en(o);if(void 0!==l){var c=i.visibleColumns.reduce((function(e,t){var n;return r({},e,((n={})[t.id]=en(t.id),n))}),{}),u=i.visibleColumns.reduce((function(e,t){var n;return r({},e,((n={})[t.id]=t.minWidth,n))}),{}),h=i.visibleColumns.reduce((function(e,t){var n;return r({},e,((n={})[t.id]=t.maxWidth,n))}),{}),d=s.map((function(e){var t=e[0];return[t,en(t)]}));return r({},e,{gridLayout:r({},e.gridLayout,{startWidths:c,minWidths:u,maxWidths:h,headerIdGridWidths:d,columnWidth:l})})}return e}if(t.type===a.columnResizing){var f=t.clientX,g=e.columnResizing.startX,p=e.gridLayout,m=p.columnWidth,v=p.minWidths,b=p.maxWidths,y=p.headerIdGridWidths,w=(f-g)/m,C={};return(void 0===y?[]:y).forEach((function(e){var t=e[0],n=e[1];C[t]=Math.min(Math.max(v[t],n+n*w),b[t])})),r({},e,{gridLayout:r({},e.gridLayout,{columnWidths:r({},e.gridLayout.columnWidths,{},C)})})}return t.type===a.columnDoneResizing?r({},e,{gridLayout:r({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function en(e){var t,n=null==(t=document.getElementById("header-cell-"+e))?void 0:t.offsetWidth;if(void 0!==n)return n}e._UNSTABLE_usePivotColumns=nt,e.actions=a,e.defaultColumn=u,e.defaultGroupByFn=De,e.defaultOrderByFn=Qe,e.defaultRenderer=l,e.emptyRenderer=c,e.ensurePluginOrder=p,e.flexRender=C,e.functionalUpdate=m,e.loopHooks=g,e.makePropGetter=d,e.makeRenderer=w,e.reduceHooks=f,e.safeUseLayoutEffect=b,e.useAbsoluteLayout=Ft,e.useAsyncDebounce=function(e,n){void 0===n&&(n=0);var r=t.useRef({}),o=v(e),s=v(n);return t.useCallback(function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,a,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=l.length,n=new Array(t),a=0;a1?n-1:0),o=1;o=0||(r[n]=e[n]);return r}function s(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function a(e){var t=s(e,"string");return"symbol"==typeof t?t:String(t)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var l="Renderer Error ☝️",c={init:"init"},u=function(e){var t=e.value;return void 0===t?"":t},h=function(){return t.createElement(t.Fragment,null," ")},d={Cell:u,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function f(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&i>r)throw new Error("React Table: The "+n+" plugin hook must be placed after the "+t+" plugin hook!")}))}function y(e,t){return"function"==typeof e?e(t):e}function w(e){var n=t.useRef();return n.current=e,t.useCallback((function(){return n.current}),[])}var C="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function S(e,n){var i=t.useRef(!1);C((function(){i.current&&e(),i.current=!0}),n)}function x(e,n){void 0===n&&(n=0);var r=t.useRef({}),o=w(e),s=w(n);return t.useCallback(function(){var e=i(regeneratorRuntime.mark((function e(){var t,n,a,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=l.length,n=new Array(t),a=0;a1?n-1:0),o=1;o(o="number"==typeof o?o:1/0)){var s=r;r=o,o=s}return e.filter((function(e){return t.some((function(t){var n=e.values[t];return n>=r&&n<=o}))}))};Be.autoRemove=function(e){return!e||"number"!=typeof e[0]&&"number"!=typeof e[1]};var Pe=Object.freeze({__proto__:null,text:Ee,exactText:ke,exactTextCase:$e,includes:_e,includesAll:Le,includesSome:Te,includesValue:Me,exact:Oe,equals:Ne,between:Be});c.resetFilters="resetFilters",c.setFilter="setFilter",c.setAllFilters="setAllFilters";var Fe=function(e){e.stateReducers.push(We),e.useInstance.push(Ge)};function We(e,t,n,i){if(t.type===c.init)return r({filters:[]},e);if(t.type===c.resetFilters)return r({},e,{filters:i.initialState.filters||[]});if(t.type===c.setFilter){var o=t.columnId,s=t.filterValue,a=i.allColumns,l=i.filterTypes,u=a.find((function(e){return e.id===o}));if(!u)throw new Error("React-Table: Could not find a column with id: "+o);var h=G(u.filter,l||{},Pe),d=e.filters.find((function(e){return e.id===o})),f=y(s,d&&d.value);return H(h.autoRemove,f,u)?r({},e,{filters:e.filters.filter((function(e){return e.id!==o}))}):r({},e,d?{filters:e.filters.map((function(e){return e.id===o?{id:o,value:f}:e}))}:{filters:[].concat(e.filters,[{id:o,value:f}])})}if(t.type===c.setAllFilters){var g=t.filters,p=i.allColumns,m=i.filterTypes;return r({},e,{filters:y(g,e.filters).filter((function(e){var t=p.find((function(t){return t.id===e.id}));return!H(G(t.filter,m||{},Pe).autoRemove,e.value,t)}))})}}function Ge(e){var n=e.data,i=e.rows,r=e.flatRows,o=e.rowsById,s=e.allColumns,a=e.filterTypes,l=e.manualFilters,u=e.defaultCanFilter,h=void 0!==u&&u,d=e.disableFilters,f=e.state.filters,g=e.dispatch,p=e.autoResetFilters,m=void 0===p||p,v=t.useCallback((function(e,t){g({type:c.setFilter,columnId:e,filterValue:t})}),[g]),b=t.useCallback((function(e){g({type:c.setAllFilters,filters:e})}),[g]);s.forEach((function(e){var t=e.id,n=e.accessor,i=e.defaultCanFilter,r=e.disableFilters;e.canFilter=n?B(!0!==r&&void 0,!0!==d&&void 0,!0):B(i,h,!1),e.setFilter=function(t){return v(e.id,t)};var o=f.find((function(e){return e.id===t}));e.filterValue=o&&o.value}));var y=t.useMemo((function(){if(l||!f.length)return[i,r,o];var e=[],t={},n=function n(i,r){void 0===r&&(r=0);var o=i;return o=f.reduce((function(e,t){var n=t.id,i=t.value,o=s.find((function(e){return e.id===n}));if(!o)return e;0===r&&(o.preFilteredRows=e);var l=G(o.filter,a||{},Pe);return l?(o.filteredRows=l(e,[n],i),o.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+o.id+"."),e)}),i),o.forEach((function(i){e.push(i),t[i.id]=i,i.subRows&&(i.subRows=i.subRows&&i.subRows.length>0?n(i.subRows,r+1):i.subRows)})),o};return[n(i),e,t]}),[l,f,i,r,o,s,a]),C=y[0],x=y[1],A=y[2];t.useMemo((function(){var e=s.filter((function(e){return!f.find((function(t){return t.id===e.id}))}));e.forEach((function(e){e.preFilteredRows=C,e.filteredRows=C}))}),[C,f,s]);var R=w(m);S((function(){R()&&g({type:c.resetFilters})}),[g,l?null:n]),Object.assign(e,{preFilteredRows:i,preFilteredFlatRows:r,preFilteredRowsById:o,filteredRows:C,filteredFlatRows:x,filteredRowsById:A,rows:C,flatRows:x,rowsById:A,setFilter:v,setAllFilters:b})}Fe.pluginName="useFilters",c.resetGlobalFilter="resetGlobalFilter",c.setGlobalFilter="setGlobalFilter";var He=function(e){e.stateReducers.push(De),e.useInstance.push(Ve)};function De(e,t,n,i){if(t.type===c.resetGlobalFilter)return r({},e,{globalFilter:i.initialState.globalFilter||void 0});if(t.type===c.setGlobalFilter){var s=t.filterValue,a=i.userFilterTypes,l=G(i.globalFilter,a||{},Pe),u=y(s,e.globalFilter);return H(l.autoRemove,u)?(e.globalFilter,o(e,["globalFilter"])):r({},e,{globalFilter:u})}}function Ve(e){var n=e.data,i=e.rows,r=e.flatRows,o=e.rowsById,s=e.allColumns,a=e.filterTypes,l=e.globalFilter,u=e.manualGlobalFilter,h=e.state.globalFilter,d=e.dispatch,f=e.autoResetGlobalFilter,g=void 0===f||f,p=e.disableGlobalFilter,m=t.useCallback((function(e){d({type:c.setGlobalFilter,filterValue:e})}),[d]),v=t.useMemo((function(){if(u||void 0===h)return[i,r,o];var e=[],t={},n=G(l,a||{},Pe);if(!n)return console.warn("Could not find a valid 'globalFilter' option."),i;s.forEach((function(e){var t=e.disableGlobalFilter;e.canFilter=B(!0!==t&&void 0,!0!==p&&void 0,!0)}));var c=s.filter((function(e){return!0===e.canFilter})),d=function i(r){return r=n(r,c.map((function(e){return e.id})),h),r.forEach((function(n){e.push(n),t[n.id]=n,n.subRows=n.subRows&&n.subRows.length?i(n.subRows):n.subRows})),r};return[d(i),e,t]}),[u,h,l,a,s,i,r,o,p]),b=v[0],y=v[1],C=v[2],x=w(g);S((function(){x()&&d({type:c.resetGlobalFilter})}),[d,u?null:n]),Object.assign(e,{preGlobalFilteredRows:i,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:o,globalFilteredRows:b,globalFilteredFlatRows:y,globalFilteredRowsById:C,rows:b,flatRows:y,rowsById:C,setGlobalFilter:m,disableGlobalFilter:p})}function ze(e,t){return t.reduce((function(e,t){return e+("number"==typeof t?t:0)}),0)}function je(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e))})),t}function Ze(e){var t=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.max(t,e))})),t}function Xe(e){var t=e[0]||0,n=e[0]||0;return e.forEach((function(e){"number"==typeof e&&(t=Math.min(t,e),n=Math.max(n,e))})),t+".."+n}function Ue(e){return ze(null,e)/e.length}function Ye(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort((function(e,t){return e-t}));return e.length%2!=0?n[t]:(n[t-1]+n[t])/2}function Je(e){return Array.from(new Set(e).values())}function Ke(e){return new Set(e).size}function Qe(e){return e.length}He.pluginName="useGlobalFilter";var qe=Object.freeze({__proto__:null,sum:ze,min:je,max:Ze,minMax:Xe,average:Ue,median:Ye,unique:Je,uniqueCount:Ke,count:Qe}),et=[],tt={};c.resetGroupBy="resetGroupBy",c.setGroupBy="setGroupBy",c.toggleGroupBy="toggleGroupBy";var nt=function(e){e.getGroupByToggleProps=[it],e.stateReducers.push(rt),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.groupBy])})),e.visibleColumns.push(ot),e.useInstance.push(at),e.prepareRow.push(lt)};nt.pluginName="useGroupBy";var it=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(e){e.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function rt(e,t,n,i){if(t.type===c.init)return r({groupBy:[]},e);if(t.type===c.resetGroupBy)return r({},e,{groupBy:i.initialState.groupBy||[]});if(t.type===c.setGroupBy)return r({},e,{groupBy:t.value});if(t.type===c.toggleGroupBy){var o=t.columnId,s=t.value,a=void 0!==s?s:!e.groupBy.includes(o);return r({},e,a?{groupBy:[].concat(e.groupBy,[o])}:{groupBy:e.groupBy.filter((function(e){return e!==o}))})}}function ot(e,t){var n=t.instance.state.groupBy,i=n.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean),r=e.filter((function(e){return!n.includes(e.id)}));return(e=[].concat(i,r)).forEach((function(e){e.isGrouped=n.includes(e.id),e.groupedIndex=n.indexOf(e.id)})),e}var st={};function at(e){var n=e.data,i=e.rows,o=e.flatRows,s=e.rowsById,a=e.allColumns,l=e.flatHeaders,u=e.groupByFn,h=void 0===u?ct:u,d=e.manualGroupBy,f=e.aggregations,g=void 0===f?st:f,m=e.plugins,v=e.state.groupBy,y=e.dispatch,C=e.autoResetGroupBy,x=void 0===C||C,A=e.disableGroupBy,R=e.defaultCanGroupBy,I=e.getHooks;b(m,["useColumnOrder","useFilters"],"useGroupBy");var E=w(e);a.forEach((function(t){var n=t.accessor,i=t.defaultGroupBy,r=t.disableGroupBy;t.canGroupBy=n?B(t.canGroupBy,!0!==r&&void 0,!0!==A&&void 0,!0):B(t.canGroupBy,i,R,!1),t.canGroupBy&&(t.toggleGroupBy=function(){return e.toggleGroupBy(t.id)}),t.Aggregated=t.Aggregated||t.Cell}));var k=t.useCallback((function(e,t){y({type:c.toggleGroupBy,columnId:e,value:t})}),[y]),$=t.useCallback((function(e){y({type:c.setGroupBy,value:e})}),[y]);l.forEach((function(e){e.getGroupByToggleProps=p(I().getGroupByToggleProps,{instance:E(),header:e})}));var _=t.useMemo((function(){if(d||!v.length)return[i,o,s,et,tt,o,s];var e=v.filter((function(e){return a.find((function(t){return t.id===e}))})),t=function(t,n,i){var r={};return a.forEach((function(o){if(e.includes(o.id))r[o.id]=n[0]?n[0].values[o.id]:null;else{var s="function"==typeof o.aggregate?o.aggregate:g[o.aggregate]||qe[o.aggregate];if(s){var a=n.map((function(e){return e.values[o.id]})),l=t.map((function(e){var t=e.values[o.id];if(!i&&o.aggregateValue){var n="function"==typeof o.aggregateValue?o.aggregateValue:g[o.aggregateValue]||qe[o.aggregateValue];if(!n)throw console.info({column:o}),new Error("React Table: Invalid column.aggregateValue option for column listed above");t=n(t,e,o)}return t}));r[o.id]=s(l,a)}else{if(o.aggregate)throw console.info({column:o}),new Error("React Table: Invalid column.aggregate option for column listed above");r[o.id]=null}}})),r},n=[],l={},c=[],u={},f=[],p={},m=function i(o,s,a){if(void 0===s&&(s=0),s===e.length)return o.map((function(e){return r({},e,{depth:s})}));var d=e[s],g=h(o,d),m=Object.entries(g).map((function(e,r){var o=e[0],h=e[1],g=d+":"+o,m=i(h,s+1,g=a?a+">"+g:g),v=s?F(h,"leafRows"):h,b=t(v,h,s),y={id:g,isGrouped:!0,groupByID:d,groupByVal:o,values:b,subRows:m,leafRows:v,depth:s,index:r};return m.forEach((function(e){n.push(e),l[e.id]=e,e.isGrouped?(c.push(e),u[e.id]=e):(f.push(e),p[e.id]=e)})),y}));return m},b=m(i);return b.forEach((function(e){n.push(e),l[e.id]=e,e.isGrouped?(c.push(e),u[e.id]=e):(f.push(e),p[e.id]=e)})),[b,n,l,c,u,f,p]}),[d,v,i,o,s,a,g,h]),L=_[0],T=_[1],M=_[2],O=_[3],N=_[4],P=_[5],W=_[6],G=w(x);S((function(){G()&&y({type:c.resetGroupBy})}),[y,d?null:n]),Object.assign(e,{preGroupedRows:i,preGroupedFlatRow:o,preGroupedRowsById:s,groupedRows:L,groupedFlatRows:T,groupedRowsById:M,onlyGroupedFlatRows:O,onlyGroupedRowsById:N,nonGroupedFlatRows:P,nonGroupedRowsById:W,rows:L,flatRows:T,rowsById:M,toggleGroupBy:k,setGroupBy:$})}function lt(e){e.allCells.forEach((function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&(null==(n=e.subRows)?void 0:n.length)}))}function ct(e,t){return e.reduce((function(e,n,i){var r=""+n.values[t];return e[r]=Array.isArray(e[r])?e[r]:[],e[r].push(n),e}),{})}var ut=/([0-9]+)/gm,ht=function(e,t,n){var i=vt(e,t,n),r=i[0],o=i[1];for(r=bt(r),o=bt(o),r=r.split(ut).filter(Boolean),o=o.split(ut).filter(Boolean);r.length&&o.length;){var s=r.shift(),a=o.shift(),l=parseInt(s,10),c=parseInt(a,10),u=[l,c].sort();if(isNaN(u[0])){if(s>a)return 1;if(a>s)return-1}else{if(isNaN(u[1]))return isNaN(l)?-1:1;if(l>c)return 1;if(c>l)return-1}}return r.length-o.length};function dt(e,t,n){var i=vt(e,t,n),r=i[0],o=i[1];return mt(r=r.getTime(),o=o.getTime())}function ft(e,t,n){var i=vt(e,t,n);return mt(i[0],i[1])}function gt(e,t,n){var i=vt(e,t,n),r=i[0],o=i[1];for(r=r.split("").filter(Boolean),o=o.split("").filter(Boolean);r.length&&o.length;){var s=r.shift(),a=o.shift(),l=s.toLowerCase(),c=a.toLowerCase();if(l>c)return 1;if(c>l)return-1;if(s>a)return 1;if(a>s)return-1}return r.length-o.length}function pt(e,t,n){var i=vt(e,t,n),r=i[0],o=i[1],s=/[^0-9.]/gi;return mt(r=Number(String(r).replace(s,"")),o=Number(String(o).replace(s,"")))}function mt(e,t){return e===t?0:e>t?1:-1}function vt(e,t,n){return[e.values[n],t.values[n]]}function bt(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}var yt=Object.freeze({__proto__:null,alphanumeric:ht,datetime:dt,basic:ft,string:gt,number:pt});c.resetSortBy="resetSortBy",c.setSortBy="setSortBy",c.toggleSortBy="toggleSortBy",c.clearSortBy="clearSortBy",d.sortType="alphanumeric",d.sortDescFirst=!1;var wt=function(e){e.getSortByToggleProps=[Ct],e.stateReducers.push(St),e.useInstance.push(xt)};wt.pluginName="useSortBy";var Ct=function(e,t){var n=t.instance,i=t.column,r=n.isMultiSortEvent,o=void 0===r?function(e){return e.shiftKey}:r;return[e,{onClick:i.canSort?function(e){e.persist(),i.toggleSortBy(void 0,!n.disableMultiSort&&o(e))}:void 0,style:{cursor:i.canSort?"pointer":void 0},title:i.canSort?"Toggle SortBy":void 0}]};function St(e,t,n,i){if(t.type===c.init)return r({sortBy:[]},e);if(t.type===c.resetSortBy)return r({},e,{sortBy:i.initialState.sortBy||[]});if(t.type===c.clearSortBy){var o=e.sortBy.filter((function(e){return e.id!==t.columnId}));return r({},e,{sortBy:o})}if(t.type===c.setSortBy)return r({},e,{sortBy:t.sortBy});if(t.type===c.toggleSortBy){var s,a=t.columnId,l=t.desc,u=t.multi,h=i.allColumns,d=i.disableMultiSort,f=i.disableSortRemove,g=i.disableMultiRemove,p=i.maxMultiSortColCount,m=void 0===p?Number.MAX_SAFE_INTEGER:p,v=e.sortBy,b=h.find((function(e){return e.id===a})),y=b.sortDescFirst,w=v.find((function(e){return e.id===a})),C=v.findIndex((function(e){return e.id===a})),S=null!=l,x=[];return"toggle"!=(s=!d&&u?w?"toggle":"add":C!==v.length-1||1!==v.length?"replace":w?"toggle":"replace")||f||S||u&&g||!(w&&w.desc&&!y||!w.desc&&y)||(s="remove"),"replace"===s?x=[{id:a,desc:S?l:y}]:"add"===s?(x=[].concat(v,[{id:a,desc:S?l:y}])).splice(0,x.length-m):"toggle"===s?x=v.map((function(e){return e.id===a?r({},e,{desc:S?l:!w.desc}):e})):"remove"===s&&(x=v.filter((function(e){return e.id!==a}))),r({},e,{sortBy:x})}}function xt(e){var n=e.data,i=e.rows,r=e.flatRows,o=e.allColumns,s=e.orderByFn,a=void 0===s?At:s,l=e.sortTypes,u=e.manualSortBy,h=e.defaultCanSort,d=e.disableSortBy,f=e.flatHeaders,g=e.state.sortBy,m=e.dispatch,v=e.plugins,y=e.getHooks,C=e.autoResetSortBy,x=void 0===C||C;b(v,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var A=t.useCallback((function(e){m({type:c.setSortBy,sortBy:e})}),[m]),R=t.useCallback((function(e,t,n){m({type:c.toggleSortBy,columnId:e,desc:t,multi:n})}),[m]),I=w(e);f.forEach((function(e){var t=e.accessor,n=e.canSort,i=e.disableSortBy,r=e.id,o=t?B(!0!==i&&void 0,!0!==d&&void 0,!0):B(h,n,!1);e.canSort=o,e.canSort&&(e.toggleSortBy=function(t,n){return R(e.id,t,n)},e.clearSortBy=function(){m({type:c.clearSortBy,columnId:e.id})}),e.getSortByToggleProps=p(y().getSortByToggleProps,{instance:I(),column:e});var s=g.find((function(e){return e.id===r}));e.isSorted=!!s,e.sortedIndex=g.findIndex((function(e){return e.id===r})),e.isSortedDesc=e.isSorted?s.desc:void 0}));var E=t.useMemo((function(){if(u||!g.length)return[i,r];var e=[],t=g.filter((function(e){return o.find((function(t){return t.id===e.id}))})),n=function n(i){var r=a(i,t.map((function(e){var t=o.find((function(t){return t.id===e.id}));if(!t)throw new Error("React-Table: Could not find a column with id: "+e.id+" while sorting");var n=t.sortType,i=P(n)||(l||{})[n]||yt[n];if(!i)throw new Error("React-Table: Could not find a valid sortType of '"+n+"' for column '"+e.id+"'.");return function(t,n){return i(t,n,e.id,e.desc)}})),t.map((function(e){var t=o.find((function(t){return t.id===e.id}));return t&&t.sortInverted?e.desc:!e.desc})));return r.forEach((function(t){e.push(t),t.subRows&&0!==t.subRows.length&&(t.subRows=n(t.subRows))})),r};return[n(i),e]}),[u,g,i,r,o,a,l]),k=E[0],$=E[1],_=w(x);S((function(){_()&&m({type:c.resetSortBy})}),[u?null:n]),Object.assign(e,{preSortedRows:i,preSortedFlatRows:r,sortedRows:k,sortedFlatRows:$,rows:k,flatRows:$,setSortBy:A,toggleSortBy:R})}function At(e,t,n){return[].concat(e).sort((function(e,i){for(var r=0;re.pageIndex?l=-1===o?s.length>=e.pageSize:a-1),l?r({},e,{pageIndex:a}):e}if(t.type===c.setPageSize){var u=t.pageSize,h=e.pageSize*e.pageIndex;return r({},e,{pageIndex:Math.floor(h/u),pageSize:u})}}function kt(e){var n=e.rows,i=e.autoResetPage,r=void 0===i||i,o=e.manualExpandedKey,s=void 0===o?"expanded":o,a=e.plugins,l=e.pageCount,u=e.paginateExpandedRows,h=void 0===u||u,d=e.expandSubRows,f=void 0===d||d,g=e.state,p=g.pageSize,m=g.pageIndex,v=g.expanded,y=g.globalFilter,C=g.filters,x=g.groupBy,A=g.sortBy,R=e.dispatch,I=e.data,E=e.manualPagination;b(a,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var k=w(r);S((function(){k()&&R({type:c.resetPage})}),[R,E?null:I,y,C,x,A]);var $=E?l:Math.ceil(n.length/p),_=t.useMemo((function(){return $>0?[].concat(new Array($)).fill(null).map((function(e,t){return t})):[]}),[$]),L=t.useMemo((function(){var e;if(E)e=n;else{var t=p*m,i=t+p;e=n.slice(t,i)}return h?e:W(e,{manualExpandedKey:s,expanded:v,expandSubRows:f})}),[f,v,s,E,m,p,h,n]),T=m>0,M=-1===$?L.length>=p:m<$-1,O=t.useCallback((function(e){R({type:c.gotoPage,pageIndex:e})}),[R]),N=t.useCallback((function(){return O((function(e){return e-1}))}),[O]),B=t.useCallback((function(){return O((function(e){return e+1}))}),[O]),P=t.useCallback((function(e){R({type:c.setPageSize,pageSize:e})}),[R]);Object.assign(e,{pageOptions:_,pageCount:$,page:L,canPreviousPage:T,canNextPage:M,gotoPage:O,previousPage:N,nextPage:B,setPageSize:P})}It.pluginName=Rt,c.resetPivot="resetPivot",c.togglePivot="togglePivot";var $t=function(e){e.getPivotToggleProps=[Lt],e.stateReducers.push(Tt),e.useInstanceAfterData.push(Mt),e.allColumns.push(Ot),e.accessValue.push(Nt),e.materializedColumns.push(Bt),e.materializedColumnsDeps.push(Pt),e.visibleColumns.push(Ft),e.visibleColumnsDeps.push(Wt),e.useInstance.push(Gt),e.prepareRow.push(Ht)};$t.pluginName="usePivotColumns";var _t=[],Lt=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(e){e.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function Tt(e,t,n,i){if(t.type===c.init)return r({pivotColumns:_t},e);if(t.type===c.resetPivot)return r({},e,{pivotColumns:i.initialState.pivotColumns||_t});if(t.type===c.togglePivot){var o=t.columnId,s=t.value,a=void 0!==s?s:!e.pivotColumns.includes(o);return r({},e,a?{pivotColumns:[].concat(e.pivotColumns,[o])}:{pivotColumns:e.pivotColumns.filter((function(e){return e!==o}))})}}function Mt(e){e.allColumns.forEach((function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)}))}function Ot(e,t){var n=t.instance;return e.forEach((function(e){e.isPivotSource=n.state.pivotColumns.includes(e.id),e.uniqueValues=new Set})),e}function Nt(e,t){var n=t.column;return n.uniqueValues&&void 0!==e&&n.uniqueValues.add(e),e}function Bt(e,t){var n=t.instance,i=n.allColumns,o=n.state;if(!o.pivotColumns.length||!o.groupBy||!o.groupBy.length)return e;var s=o.pivotColumns.map((function(e){return i.find((function(t){return t.id===e}))})).filter(Boolean),a=i.filter((function(e){return!e.isPivotSource&&!o.groupBy.includes(e.id)&&!o.pivotColumns.includes(e.id)})),l=_(function e(t,n,i){void 0===t&&(t=0),void 0===i&&(i=[]);var o=s[t];return o?Array.from(o.uniqueValues).sort().map((function(s){var a=r({},o,{Header:o.PivotHeader||"string"==typeof o.header?o.Header+": "+s:s,isPivotGroup:!0,parent:n,depth:t,id:n?n.id+"."+o.id+"."+s:o.id+"."+s,pivotValue:s});return a.columns=e(t+1,a,[].concat(i,[function(e){return e.values[o.id]===s}])),a})):a.map((function(e){return r({},e,{canPivot:!1,isPivoted:!0,parent:n,depth:t,id:""+(n?n.id+"."+e.id:e.id),accessor:function(t,n,r){if(i.every((function(e){return e(r)})))return r.values[e.id]}})}))}());return[].concat(e,l)}function Pt(e,t){var n=t.instance.state,i=n.pivotColumns,r=n.groupBy;return[].concat(e,[i,r])}function Ft(e,t){var n=t.instance.state;return e=e.filter((function(e){return!e.isPivotSource})),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter((function(e){return e.isGrouped||e.isPivoted}))),e}function Wt(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function Gt(e){var t=e.columns,n=e.allColumns,i=e.flatHeaders,r=e.getHooks,o=e.plugins,s=e.dispatch,a=e.autoResetPivot,l=void 0===a||a,u=e.manaulPivot,h=e.disablePivot,d=e.defaultCanPivot;b(o,["useGroupBy"],"usePivotColumns");var f=w(e);n.forEach((function(t){var n=t.accessor,i=t.defaultPivot,r=t.disablePivot;t.canPivot=n?B(t.canPivot,!0!==r&&void 0,!0!==h&&void 0,!0):B(t.canPivot,i,d,!1),t.canPivot&&(t.togglePivot=function(){return e.togglePivot(t.id)}),t.Aggregated=t.Aggregated||t.Cell}));var g=function(e,t){s({type:c.togglePivot,columnId:e,value:t})};i.forEach((function(e){e.getPivotToggleProps=p(r().getPivotToggleProps,{instance:f(),header:e})}));var m=w(l);S((function(){m()&&s({type:c.resetPivot})}),[s,u?null:t]),Object.assign(e,{togglePivot:g})}function Ht(e){e.allCells.forEach((function(e){e.isPivoted=e.column.isPivoted}))}var Dt="useRowSelect";c.resetSelectedRows="resetSelectedRows",c.toggleAllRowsSelected="toggleAllRowsSelected",c.toggleRowSelected="toggleRowSelected",c.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var Vt=function(e){e.getToggleRowSelectedProps=[zt],e.getToggleAllRowsSelectedProps=[jt],e.getToggleAllPageRowsSelectedProps=[Zt],e.stateReducers.push(Xt),e.useInstance.push(Ut),e.prepareRow.push(Yt)};Vt.pluginName=Dt;var zt=function(e,t){var n=t.instance,i=t.row,r=n.manualRowSelectedKey,o=void 0===r?"isSelected":r;return[e,{onChange:function(e){i.toggleRowSelected(e.target.checked)},style:{cursor:"pointer"},checked:!(!i.original||!i.original[o])||i.isSelected,title:"Toggle Row Selected",indeterminate:i.isSomeSelected}]},jt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},Zt=function(e,t){var n=t.instance;return[e,{onChange:function(e){n.toggleAllPageRowsSelected(e.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some((function(e){var t=e.id;return n.state.selectedRowIds[t]})))}]};function Xt(e,t,n,i){if(t.type===c.init)return r({selectedRowIds:{}},e);if(t.type===c.resetSelectedRows)return r({},e,{selectedRowIds:i.initialState.selectedRowIds||{}});if(t.type===c.toggleAllRowsSelected){var o=t.value,s=i.isAllRowsSelected,a=i.rowsById,l=i.nonGroupedRowsById,u=void 0===l?a:l,h=void 0!==o?o:!s,d=Object.assign({},e.selectedRowIds);return h?Object.keys(u).forEach((function(e){d[e]=!0})):Object.keys(u).forEach((function(e){delete d[e]})),r({},e,{selectedRowIds:d})}if(t.type===c.toggleRowSelected){var f=t.id,g=t.value,p=i.rowsById,m=i.selectSubRows,v=void 0===m||m,b=i.getSubRows,y=e.selectedRowIds[f],w=void 0!==g?g:!y;if(y===w)return e;var C=r({},e.selectedRowIds),S=function e(t){var n=p[t];if(n&&(n.isGrouped||(w?C[t]=!0:delete C[t]),v&&b(n)))return b(n).forEach((function(t){return e(t.id)}))};return S(f),r({},e,{selectedRowIds:C})}if(t.type===c.toggleAllPageRowsSelected){var x=t.value,A=i.page,R=i.rowsById,I=i.selectSubRows,E=void 0===I||I,k=i.isAllPageRowsSelected,$=i.getSubRows,_=void 0!==x?x:!k,L=r({},e.selectedRowIds),T=function e(t){var n=R[t];if(n.isGrouped||(_?L[t]=!0:delete L[t]),E&&$(n))return $(n).forEach((function(t){return e(t.id)}))};return A.forEach((function(e){return T(e.id)})),r({},e,{selectedRowIds:L})}return e}function Ut(e){var n=e.data,i=e.rows,r=e.getHooks,o=e.plugins,s=e.rowsById,a=e.nonGroupedRowsById,l=void 0===a?s:a,u=e.autoResetSelectedRows,h=void 0===u||u,d=e.state.selectedRowIds,f=e.selectSubRows,g=void 0===f||f,m=e.dispatch,v=e.page,y=e.getSubRows;b(o,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var C=t.useMemo((function(){var e=[];return i.forEach((function(t){var n=g?Jt(t,d,y):!!d[t.id];t.isSelected=!!n,t.isSomeSelected=null===n,n&&e.push(t)})),e}),[i,g,d,y]),x=Boolean(Object.keys(l).length&&Object.keys(d).length),A=x;x&&Object.keys(l).some((function(e){return!d[e]}))&&(x=!1),x||v&&v.length&&v.some((function(e){var t=e.id;return!d[t]}))&&(A=!1);var R=w(h);S((function(){R()&&m({type:c.resetSelectedRows})}),[m,n]);var I=t.useCallback((function(e){return m({type:c.toggleAllRowsSelected,value:e})}),[m]),E=t.useCallback((function(e){return m({type:c.toggleAllPageRowsSelected,value:e})}),[m]),k=t.useCallback((function(e,t){return m({type:c.toggleRowSelected,id:e,value:t})}),[m]),$=w(e),_=p(r().getToggleAllRowsSelectedProps,{instance:$()}),L=p(r().getToggleAllPageRowsSelectedProps,{instance:$()});Object.assign(e,{selectedFlatRows:C,isAllRowsSelected:x,isAllPageRowsSelected:A,toggleRowSelected:k,toggleAllRowsSelected:I,getToggleAllRowsSelectedProps:_,getToggleAllPageRowsSelectedProps:L,toggleAllPageRowsSelected:E})}function Yt(e,t){var n=t.instance;e.toggleRowSelected=function(t){return n.toggleRowSelected(e.id,t)},e.getToggleRowSelectedProps=p(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}function Jt(e,t,n){if(t[e.id])return!0;var i=n(e);if(i&&i.length){var r=!0,o=!1;return i.forEach((function(e){o&&!r||(Jt(e,t,n)?o=!0:r=!1)})),!!r||!!o&&null}return!1}var Kt=function(e){return{}},Qt=function(e){return{}};c.setRowState="setRowState",c.setCellState="setCellState",c.resetRowState="resetRowState";var qt=function(e){e.stateReducers.push(en),e.useInstance.push(tn),e.prepareRow.push(nn)};function en(e,t,n,i){var o=i.initialRowStateAccessor,s=void 0===o?Kt:o,a=i.initialCellStateAccessor,l=void 0===a?Qt:a,u=i.rowsById;if(t.type===c.init)return r({rowState:{}},e);if(t.type===c.resetRowState)return r({},e,{rowState:i.initialState.rowState||{}});if(t.type===c.setRowState){var h,d=t.rowId,f=t.value,g=void 0!==e.rowState[d]?e.rowState[d]:s(u[d]);return r({},e,{rowState:r({},e.rowState,(h={},h[d]=y(f,g),h))})}if(t.type===c.setCellState){var p,m,v,b,w,C=t.rowId,S=t.columnId,x=t.value,A=void 0!==e.rowState[C]?e.rowState[C]:s(u[C]),R=void 0!==(null==A||null==(p=A.cellState)?void 0:p[S])?A.cellState[S]:l(null==(m=u[C])||null==(v=m.cells)?void 0:v.find((function(e){return e.column.id===S})));return r({},e,{rowState:r({},e.rowState,(w={},w[C]=r({},A,{cellState:r({},A.cellState||{},(b={},b[S]=y(x,R),b))}),w))})}}function tn(e){var n=e.autoResetRowState,i=void 0===n||n,r=e.data,o=e.dispatch,s=t.useCallback((function(e,t){return o({type:c.setRowState,rowId:e,value:t})}),[o]),a=t.useCallback((function(e,t,n){return o({type:c.setCellState,rowId:e,columnId:t,value:n})}),[o]),l=w(i);S((function(){l()&&o({type:c.resetRowState})}),[r]),Object.assign(e,{setRowState:s,setCellState:a})}function nn(e,t){var n=t.instance,i=n.initialRowStateAccessor,r=void 0===i?Kt:i,o=n.initialCellStateAccessor,s=void 0===o?Qt:o,a=n.state.rowState;e&&(e.state=void 0!==a[e.id]?a[e.id]:r(e),e.setState=function(t){return n.setRowState(e.id,t)},e.cells.forEach((function(t){e.state.cellState||(e.state.cellState={}),t.state=void 0!==e.state.cellState[t.column.id]?e.state.cellState[t.column.id]:s(t),t.setState=function(i){return n.setCellState(e.id,t.column.id,i)}})))}qt.pluginName="useRowState",c.resetColumnOrder="resetColumnOrder",c.setColumnOrder="setColumnOrder";var rn=function(e){e.stateReducers.push(on),e.visibleColumnsDeps.push((function(e,t){var n=t.instance;return[].concat(e,[n.state.columnOrder])})),e.visibleColumns.push(sn),e.useInstance.push(an)};function on(e,t,n,i){return t.type===c.init?r({columnOrder:[]},e):t.type===c.resetColumnOrder?r({},e,{columnOrder:i.initialState.columnOrder||[]}):t.type===c.setColumnOrder?r({},e,{columnOrder:y(t.columnOrder,e.columnOrder)}):void 0}function sn(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var i=[].concat(n),r=[].concat(e),o=[],s=function(){var e=i.shift(),t=r.findIndex((function(t){return t.id===e}));t>-1&&o.push(r.splice(t,1)[0])};r.length&&i.length;)s();return[].concat(o,r)}function an(e){var n=e.dispatch;e.setColumnOrder=t.useCallback((function(e){return n({type:c.setColumnOrder,columnOrder:e})}),[n])}rn.pluginName="useColumnOrder",d.canResize=!0,c.columnStartResizing="columnStartResizing",c.columnResizing="columnResizing",c.columnDoneResizing="columnDoneResizing",c.resetResize="resetResize";var ln=function(e){e.getResizerProps=[cn],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(un),e.useInstance.push(dn),e.useInstanceBeforeDimensions.push(hn)},cn=function(e,t){var n=t.instance,i=t.header,r=n.dispatch,o=function(e,t){var n=!1;if("touchstart"===e.type){if(e.touches&&e.touches.length>1)return;n=!0}var i,o,s=fn(t).map((function(e){return[e.id,e.totalWidth]})),a=n?Math.round(e.touches[0].clientX):e.clientX,l=function(){window.cancelAnimationFrame(i),i=null,r({type:c.columnDoneResizing})},u=function(){window.cancelAnimationFrame(i),i=null,r({type:c.columnResizing,clientX:o})},h=function(e){o=e,i||(i=window.requestAnimationFrame(u))},d={mouse:{moveEvent:"mousemove",moveHandler:function(e){return h(e.clientX)},upEvent:"mouseup",upHandler:function(e){document.removeEventListener("mousemove",d.mouse.moveHandler),document.removeEventListener("mouseup",d.mouse.upHandler),l()}},touch:{moveEvent:"touchmove",moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(e){document.removeEventListener(d.touch.moveEvent,d.touch.moveHandler),document.removeEventListener(d.touch.upEvent,d.touch.moveHandler),l()}}},f=n?d.touch:d.mouse,g=!!z()&&{passive:!1};document.addEventListener(f.moveEvent,f.moveHandler,g),document.addEventListener(f.upEvent,f.upHandler,g),r({type:c.columnStartResizing,columnId:t.id,columnWidth:t.totalWidth,headerIdWidths:s,clientX:a})};return[e,{onMouseDown:function(e){return e.persist()||o(e,i)},onTouchStart:function(e){return e.persist()||o(e,i)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function un(e,t){if(t.type===c.init)return r({columnResizing:{columnWidths:{}}},e);if(t.type===c.resetResize)return r({},e,{columnResizing:{columnWidths:{}}});if(t.type===c.columnStartResizing){var n=t.clientX,i=t.columnId,o=t.columnWidth,s=t.headerIdWidths;return r({},e,{columnResizing:r({},e.columnResizing,{startX:n,headerIdWidths:s,columnWidth:o,isResizingColumn:i})})}if(t.type===c.columnResizing){var a=t.clientX,l=e.columnResizing,u=l.startX,h=l.columnWidth,d=l.headerIdWidths,f=(a-u)/h,g={};return(void 0===d?[]:d).forEach((function(e){var t=e[0],n=e[1];g[t]=Math.max(n+n*f,0)})),r({},e,{columnResizing:r({},e.columnResizing,{columnWidths:r({},e.columnResizing.columnWidths,{},g)})})}return t.type===c.columnDoneResizing?r({},e,{columnResizing:r({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}ln.pluginName="useResizeColumns";var hn=function(e){var t=e.flatHeaders,n=e.disableResizing,i=e.getHooks,r=e.state.columnResizing,o=w(e);t.forEach((function(e){var t=B(!0!==e.disableResizing&&void 0,!0!==n&&void 0,!0);e.canResize=t,e.width=r.columnWidths[e.id]||e.originalWidth||e.width,e.isResizing=r.isResizingColumn===e.id,t&&(e.getResizerProps=p(i().getResizerProps,{instance:o(),header:e}))}))};function dn(e){var n=e.plugins,i=e.dispatch,r=e.autoResetResize,o=void 0===r||r,s=e.columns;b(n,["useAbsoluteLayout"],"useResizeColumns");var a=w(o);S((function(){a()&&i({type:c.resetResize})}),[s]);var l=t.useCallback((function(){return i({type:c.resetResize})}),[i]);Object.assign(e,{resetResizing:l})}function fn(e){var t=[],n=function e(n){n.columns&&n.columns.length&&n.columns.map(e),t.push(n)};return n(e),t}var gn={position:"absolute",top:0},pn=function(e){e.getTableBodyProps.push(mn),e.getRowProps.push(mn),e.getHeaderGroupProps.push(mn),e.getFooterGroupProps.push(mn),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:r({},gn,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:r({},gn,{left:n.column.totalLeft+"px",width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:r({},gn,{left:n.totalLeft+"px",width:n.totalWidth+"px"})}]}))};pn.pluginName="useAbsoluteLayout";var mn=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},vn={display:"inline-block",boxSizing:"border-box"},bn=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},yn=function(e){e.getRowProps.push(bn),e.getHeaderGroupProps.push(bn),e.getFooterGroupProps.push(bn),e.getHeaderProps.push((function(e,t){var n=t.column;return[e,{style:r({},vn,{width:n.totalWidth+"px"})}]})),e.getCellProps.push((function(e,t){var n=t.cell;return[e,{style:r({},vn,{width:n.column.totalWidth+"px"})}]})),e.getFooterProps.push((function(e,t){var n=t.column;return[e,{style:r({},vn,{width:n.totalWidth+"px"})}]}))};function wn(e){e.getTableProps.push(Cn),e.getRowProps.push(Sn),e.getHeaderGroupProps.push(Sn),e.getFooterGroupProps.push(Sn),e.getHeaderProps.push(xn),e.getCellProps.push(An),e.getFooterProps.push(Rn)}yn.pluginName="useBlockLayout",wn.pluginName="useFlexLayout";var Cn=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Sn=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},xn=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},An=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},Rn=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function In(e){e.stateReducers.push(_n),e.getTableProps.push(En),e.getHeaderProps.push(kn),e.getRowProps.push($n)}c.columnStartResizing="columnStartResizing",c.columnResizing="columnResizing",c.columnDoneResizing="columnDoneResizing",c.resetResize="resetResize",In.pluginName="useGridLayout";var En=function(e,t){var n=t.instance,i=n.visibleColumns.map((function(e){var t;return n.state.gridLayout.columnWidths[e.id]?n.state.gridLayout.columnWidths[e.id]+"px":(null==(t=n.state.columnResizing)?void 0:t.isResizingColumn)?n.state.gridLayout.startWidths[e.id]+"px":"number"==typeof e.width?e.width+"px":e.width}));return[e,{style:{display:"grid",gridTemplateColumns:i.join(" ")}}]},kn=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},$n=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function _n(e,t,n,i){if(t.type===c.init)return r({gridLayout:{columnWidths:{}}},e);if(t.type===c.resetResize)return r({},e,{gridLayout:{columnWidths:{}}});if(t.type===c.columnStartResizing){var o=t.columnId,s=t.headerIdWidths,a=Ln(o);if(void 0!==a){var l=i.visibleColumns.reduce((function(e,t){var n;return r({},e,((n={})[t.id]=Ln(t.id),n))}),{}),u=i.visibleColumns.reduce((function(e,t){var n;return r({},e,((n={})[t.id]=t.minWidth,n))}),{}),h=i.visibleColumns.reduce((function(e,t){var n;return r({},e,((n={})[t.id]=t.maxWidth,n))}),{}),d=s.map((function(e){var t=e[0];return[t,Ln(t)]}));return r({},e,{gridLayout:r({},e.gridLayout,{startWidths:l,minWidths:u,maxWidths:h,headerIdGridWidths:d,columnWidth:a})})}return e}if(t.type===c.columnResizing){var f=t.clientX,g=e.columnResizing.startX,p=e.gridLayout,m=p.columnWidth,v=p.minWidths,b=p.maxWidths,y=p.headerIdGridWidths,w=(f-g)/m,C={};return(void 0===y?[]:y).forEach((function(e){var t=e[0],n=e[1];C[t]=Math.min(Math.max(v[t],n+n*w),b[t])})),r({},e,{gridLayout:r({},e.gridLayout,{columnWidths:r({},e.gridLayout.columnWidths,{},C)})})}return t.type===c.columnDoneResizing?r({},e,{gridLayout:r({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function Ln(e){var t,n=null==(t=document.getElementById("header-cell-"+e))?void 0:t.offsetWidth;if(void 0!==n)return n}e._UNSTABLE_usePivotColumns=$t,e.actions=c,e.defaultColumn=d,e.defaultGroupByFn=ct,e.defaultOrderByFn=At,e.defaultRenderer=u,e.emptyRenderer=h,e.ensurePluginOrder=b,e.flexRender=R,e.functionalUpdate=y,e.loopHooks=v,e.makePropGetter=p,e.makeRenderer=A,e.reduceHooks=m,e.safeUseLayoutEffect=C,e.useAbsoluteLayout=pn,e.useAsyncDebounce=x,e.useBlockLayout=yn,e.useColumnOrder=rn,e.useExpanded=we,e.useFilters=Fe,e.useFlexLayout=wn,e.useGetLatest=w,e.useGlobalFilter=He,e.useGridLayout=In,e.useGroupBy=nt,e.useMountedLayoutEffect=S,e.usePagination=It,e.useResizeColumns=ln,e.useRowSelect=Vt,e.useRowState=qt,e.useSortBy=wt,e.useTable=ve,Object.defineProperty(e,"__esModule",{value:!0})}(vu.exports,l.default),"production"===process.env.NODE_ENV?pu.exports=mu.exports:pu.exports=vu.exports;var bu={setItem:function(e,t){return localStorage.setItem(e,t)},getItem:function(e){return localStorage.getItem(e)},removeItem:function(e){return localStorage.removeItem(e)},updateFilters:function(e,t){var n,i,r=null!==(i=bu.getItem(Ct))&&void 0!==i?i:"{}",o=JSON.parse(r),s=c({},o);return tn.isEmpty(t)?Reflect.deleteProperty(s,e):s=c(c({},s),((n={})[e]=t,n)),tn.isEmpty(s)?bu.removeItem(Ct):bu.setItem(Ct,JSON.stringify(s))},updateHidden:function(e,t){var n,i=null!==(n=bu.getItem(St))&&void 0!==n?n:"{}",r=JSON.parse(i),o=c({},r);o[e]=t,bu.setItem(St,JSON.stringify(o))}};function yu(n){var i=n.columns,r=n.colProperty,o=e.useRef(null),s=h(e.useState(!1),2),a=s[0],u=s[1],d=i.filter((function(e){return e.getToggleHiddenProps().checked})).length;return l.default.createElement("span",{className:"show-columns-wrapper",ref:o},l.default.createElement(Kt,{data:"Show/Hide columns"},l.default.createElement(t.IconButton,{onClick:function(){return u((function(e){return!e}))}},l.default.createElement(M,null))),l.default.createElement(t.Popper,{open:a,anchorEl:o.current,transition:!0,disablePortal:!0,className:"popper-wrapper",nonce:void 0,onResize:void 0,onResizeCapture:void 0},(function(e){var n=e.TransitionProps;return l.default.createElement(t.Grow,c({},n,{style:{transformOrigin:"center top"}}),l.default.createElement(t.Paper,{className:"menu-popper"},l.default.createElement(t.ClickAwayListener,{onClickAway:function(){return u(!1)}},l.default.createElement("div",{className:"show-columns"},i.map((function(e){var t=e.getToggleHiddenProps();return l.default.createElement("div",{key:e.id},l.default.createElement("div",{className:"show-columns-line"},l.default.createElement(qt,c({},t,{disabled:t.checked&&d<=2})),l.default.createElement("span",{className:"capitalize-first-letter"},e[r])))}))))))})))}function wu(n){var i=n.actions,r=n.row,o=n.disablePortal,s=h(Tr(!1),2),a=s[0],d=s[1],f=e.useRef(null),g=i.filter((function(e){var t=e.hideAction;return t instanceof Function?!(null==t?void 0:t(r.original)):!t})).map((function(e){var t=e.action,n=e.content,i=e.disabled,o=u(e,["action","content","disabled"]);return c(c(c({},o),{content:n instanceof Function?n(r.original):n,disabled:i instanceof Function?i(r.original):i}),t&&{onClick:function(){t(c(c({},r.original),r.state))}})}));var p=e.forwardRef((function(e,n){var i=e.children,r=u(e,["children"]);return l.default.createElement(t.IconButton,c({ref:n},r),i)}));return g.length?l.default.createElement("div",{className:"table-row-actions",ref:f},l.default.createElement(p,{className:"actions-btn",onClick:d},l.default.createElement(ce,null)),a&&l.default.createElement(su,{disablePortal:o,anchorEl:f.current,open:a,onClickAway:d,items:g})):l.default.createElement("div",{className:"table-row-actions-empty"})}function Cu(t){var n=t.cell.value,i=e.useRef(null),r=h(e.useState(bt),2),o=r[0],s=r[1],a=function(){i.current&&tn.isEllipsisActive(i.current)?s(n):s(bt)};return e.useEffect((function(){return a(),window.addEventListener("resize",a),function(){window.removeEventListener("resize",a)}}),[n]),l.default.createElement(Kt,{data:null==o?void 0:o.toString()},l.default.createElement("div",{className:"table-default-cell",ref:i},n))}function Su(e){var t=e.name,n=e.text,i=e.onDelete;return l.default.createElement("div",{className:"box-filter-container",key:t},l.default.createElement("span",{className:"filter-headline"},At["".concat(t.toUpperCase().replace(/\s/g,""))],l.default.createElement(H,{onClick:i})),l.default.createElement("span",{className:"filter-data"},Array.isArray(n)?n.join(", "):n))}var xu={length:function(e,t,n){var i=e.values[n].length,r=t.values[n].length;return i===r?0:i>r?1:-1}};function Au(n){var i=n.setFilter,r=n.value,o=n.children,s=n.columnTitle,a=void 0===s?bt:s,u=h(Tr(!1),2),d=u[0],f=u[1],g=e.useRef(null),p=e.useRef(null);!function(t,n,i,r){function o(e){e.key===n&&i()}void 0===r&&(r="keydown"),e.useEffect((function(){return t.current&&t.current.addEventListener(r,o),function(){t.current&&t.current.removeEventListener(r,o)}}),[t.current,i])}(p,"Enter",v);var m=tn.isEmpty(r)||tn.isString(r)&&0===(null==r?void 0:r.trim().length);function v(){m||(i(r),f())}return l.default.createElement("div",{className:"filter-table-wrapper"},l.default.createElement(Kt,{data:"Filter by ".concat(a.charAt(0).toUpperCase()).concat(a.slice(1))},l.default.createElement("span",{onClick:f,ref:g},l.default.createElement(ze,null))),d&&l.default.createElement(t.Popper,{open:d,anchorEl:g.current,transition:!0,className:"popper-wrapper",nonce:void 0,onResize:void 0,onResizeCapture:void 0},(function(e){var n=e.TransitionProps;return l.default.createElement(t.Grow,c({},n,{style:{transformOrigin:"center top"}}),l.default.createElement(t.Paper,null,l.default.createElement(t.ClickAwayListener,{onClickAway:f},l.default.createElement("div",{className:"filter-table-wrapper-data"},l.default.createElement("div",{className:"filter-table-wrapper-inside-filter",ref:p},o),l.default.createElement("div",{className:"filter-table-wrapper-btn"},l.default.createElement(Ut,{disable:m,onClick:v},"Filter"))))))})))}function Ru(e){var t=e.light,n=v({light:t,spinner:!0,center:!0});return l.default.createElement("div",{className:n},l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}),l.default.createElement("div",{className:"spinner-blade"}))}function Iu(e,t,n){void 0===n&&(n=!1);try{var i=e/t;return n?"var(--optimus-s2)":i>=1?"var(--focus-s1)":i>.97?"var(--optimus-key)":"var(--accent-key)"}catch(e){return"var(--accent-key)"}}function Eu(e){var t=tn.getTimeDiffString(e).split(" ");return"0d"!==t[0]?{value:t[0],exactValue:t.join(" ")}:"0h"!==t[1]?{value:t[1],exactValue:t.slice(1).join(" ")}:{value:t[2],exactValue:t[2]}}function ku(e){var t=e.date,n=void 0===t?null:t,i=e.showSeconds,r=void 0===i||i,o=e.showTime,s=void 0===o||o,a=e.disabled,c=v({"datetime-label":!0,"datetime-label-disabled":a});return l.default.createElement("span",{className:c},n?s?"".concat(tn.formatDate(n,r,!1).slice(0,9)," • ").concat(tn.formatDate(n,r,!1).slice(9)):"".concat(tn.formatDate(n,!1,!1,!1)):bt)}function $u(e){var t=e.month,n=e.date,i=e.selected,r=e.onSelect,o=e.minDate,s=void 0===o?null:o,a=e.maxDate,c=void 0===a?null:a;function u(){return t!==n.month||!!c&&n>c||!!s&&nt?t:n)}}),l.default.createElement("div",{className:"arrow-buttons"},l.default.createElement(Y,{className:"rotate180",onMouseDown:function(e){e.detail>1&&e.preventDefault()},onClick:function(){r((n+t+2)%(t+1))}}),l.default.createElement(Y,{onMouseDown:function(e){e.detail>1&&e.preventDefault()},onClick:function(){r((n+t)%(t+1))}})))}function Tu(t){var i=t.time,r=t.onSubmit,o=t.showSeconds,s=void 0===o||o,a=t.onNowSubmit,u=t.showNow,d=void 0===u||u,f={hour:!1,minute:!1,second:!1},g=h(e.useState(f),2),p=g[0],m=g[1],b=h(e.useState(i?i.hour:0),2),y=b[0],w=b[1],C=h(e.useState(i?i.minute:0),2),S=C[0],x=C[1],A=h(e.useState(i?i.second:0),2),R=A[0],I=A[1];function E(e,t){var n,o={hour:y,minute:S,second:R};r(i.set(c(c({},o),((n={})[e]=t,n))))}var k=v({"datetime-time":!0,"datetime-time-hour-min-only":!s}),$=v({"time-selector":!0,"time-selector-no-now":!d});return l.default.createElement("div",{className:k},l.default.createElement("div",{className:$},d&&l.default.createElement(Ut,{extraClass:"time-selector-now-btn",onClick:function(){return a(n.DateTime.now())}},"Now"),l.default.createElement(Lu,{value:y,max:23,numTitle:zt,initialNumState:f,numFocus:p,setNumFocus:m,onChange:function(e){Number.isNaN(e)||(w(e),E(zt,e))}}),l.default.createElement(Lu,{value:S,max:59,numTitle:jt,initialNumState:f,numFocus:p,setNumFocus:m,onChange:function(e){Number.isNaN(e)||(x(e),E(jt,e))}}),s&&l.default.createElement(Lu,{value:R,max:59,numTitle:Zt,initialNumState:f,numFocus:p,setNumFocus:m,onChange:function(e){Number.isNaN(e)||(I(e),E(Zt,e))}})))}function Mu(t){var i=t.onSubmit,r=t.initValue,o=void 0===r?n.DateTime.now():r,s=t.minDate,a=void 0===s?null:s,c=t.maxDate,u=void 0===c?null:c,d=t.showSeconds,f=void 0===d||d,g=t.showTime,p=void 0===g||g,m=t.canClear,v=void 0===m||m,b=t.showNow,y=h(e.useState(o),2),w=y[0],C=y[1];return l.default.createElement("div",{className:"calendar-wrapper"},l.default.createElement("div",null,l.default.createElement(_u,{date:w,onSubmit:p?C:i,minDate:a,maxDate:u})),p?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",null,l.default.createElement(Tu,{time:w,onSubmit:C,showSeconds:f,onNowSubmit:i,showNow:b})),l.default.createElement("div",{className:"calendar-actions"},l.default.createElement("div",{className:"calendar-actions-sub"},v&&l.default.createElement(Ut,{empty:!0,onClick:function(){return i(void 0)}},"Clear"),l.default.createElement(Ut,{onClick:function(){return i(w)}},"OK")))):null)}exports.ActionsCell=wu,exports.ApiCallCell=function(t){var n=t.cell,i=n.value,r=n.column,o=n.state,s=n.setState,a=r,c=a.apiCall,u=a.propertyKey,d=a.errorText,f=h(e.useState(null),2),g=f[0],p=f[1],m=h(e.useState(!0),2),v=m[0],b=m[1];return e.useEffect((function(){!function e(t){void 0===t&&(t=0),c(i).then((function(e){s(e[u]),b(!1)})).catch((function(){t<2?setTimeout((function(){return e(t+1)}),3e3*(t+1)):(p(d),b(!1))}))}()}),[]),v?l.default.createElement(Ru,null):l.default.createElement(Jc,null,g||o)},exports.BarCell=function(e){var t=e.cell.value;return l.default.createElement("div",{className:"bar-cell"},l.default.createElement("span",{className:"table-count-cell"},"".concat(t,"%")),l.default.createElement(Yt,{firstUsage:t/100,firstColor:"var(--accent-key)"}))},exports.BlocksCell=function(e){var t=e.cell.value,n=t.filter((function(e){var t=e.status;return t===Rt||t===Et||t===kt||t===It}));return l.default.createElement("div",{className:"blocks-cell"},l.default.createElement("span",{className:"table-count-cell"},"".concat(n.length,"/").concat(t.length)),l.default.createElement("div",{className:"blocks-wrapper"},t.map((function(e){var t,n=e.uid,i=e.status,r=v(((t={block:!0})[i]=!0,t));return l.default.createElement("div",{key:n,className:r})}))))},exports.Button=Ut,exports.CapacityBar=Yt,exports.CapacityCell=function(e){var t=e.cell,n=t.value,i=t.column.noDataLabel,r=void 0===i?"Unknown":i,o=n.used,s=n.total,a=n.isThin,c=n.maxThin,u=n.minThin,h=n.caution,d=tn.formatBytes(s,2),f=tn.formatBytes(o,2);return l.default.createElement("div",{className:"capacity-cell"},l.default.createElement("div",{className:"capacity-cell-headline"},l.default.createElement("span",{className:"label-4"},s?"".concat(f.value," ").concat(f.text," out of ").concat(d.value," ").concat(d.text," (").concat((o/s*100).toFixed(1),"%)"):r),a&&l.default.createElement(Kt,{data:"Thinly Provisioned Filesystem\nMax SSD: ".concat(tn.formatBytesToString(c),"\nMin SSD: ").concat(tn.formatBytesToString(u))},l.default.createElement("div",{className:"thin-provision"}))),l.default.createElement("div",{className:"capacity-cell-data"},l.default.createElement(Yt,{firstUsage:s?o/s:0,firstColor:Iu(o,s,h)})))},exports.Checkbox=qt,exports.CircularProgress=Jt,exports.CloseButton=function(){return l.default.createElement(t.IconButton,{className:"Toastify__close-button"},l.default.createElement(R,null))},exports.CustomTooltipCell=function(e){var t=e.value,n=e.tooltipData,i=void 0===n?bt:n;return l.default.createElement(Kt,{data:i},l.default.createElement("span",null,t))},exports.DataInfo=function(e){var t=e.label,n=e.value;return l.default.createElement("div",{className:"data-info"},l.default.createElement("div",{className:"data-info-label"},t),l.default.createElement("span",{className:"data-info-value body-copy-1"},n))},exports.DateCell=function(e){var t=e.cell,i=e.column,r=t.value,o=i.showMili,s=i.showRelative,a=n.DateTime.fromISO(r);return l.default.createElement(Kt,{data:a.toLocaleString({dateStyle:"full",timeStyle:"long"})},l.default.createElement("div",{className:"table-date-cell"},s?a.toRelative():tn.formatISODate(r,o)))},exports.DateTimePicker=function(n){var i=n.onChange,r=n.value,o=n.label,s=void 0===o?bt:o,a=n.minDate,u=n.maxDate,d=n.showSeconds,f=n.isRequired,g=n.error,p=n.disablePortal,m=n.showTime,b=n.showCalendarIcon,y=void 0!==b&&b,w=n.disabled,C=void 0!==w&&w,S=n.canClear,x=void 0===S||S,A=n.showNow,R=h(e.useState(!1),2),I=R[0],E=R[1],k=e.useRef(null),$=v({"picker-label":!0,"picker-label-disabled":C,"picker-label-active":I,"has-error":g,"picker-no-label":!s,"picker-label-show-calendar":y}),_=v({"datetime-picker":!0,"datetime-picker-no-label":!s});return l.default.createElement("div",{className:_,ref:k},l.default.createElement("div",{className:$,onClick:function(){return E((function(e){return!e}))}},s&&l.default.createElement("div",{className:"picker-label-title"},s,f&&l.default.createElement("span",{className:"required-star"},"*")),y?l.default.createElement(Ue,null):l.default.createElement(Y,{className:v({rotate180:I})}),l.default.createElement("div",{className:"picker-label-text"},l.default.createElement(ku,{date:r,showSeconds:d,showTime:m,disabled:C})),l.default.createElement("span",{className:"datetime-picker-error"},g)),l.default.createElement(t.Popper,{disablePortal:p,open:I,anchorEl:k.current,transition:!0,className:"popper-wrapper",nonce:void 0,onResize:void 0,onResizeCapture:void 0},(function(e){var n=e.TransitionProps;return l.default.createElement(t.Grow,c({},n,{style:{transformOrigin:"center top"}}),l.default.createElement(t.Paper,{className:"menu-popper menu-popper-calendar"},l.default.createElement(t.ClickAwayListener,{onClickAway:function(){return E(!1)}},l.default.createElement("div",{className:"date-time-wrapper"},l.default.createElement(Mu,{initValue:r,minDate:a,maxDate:u,onSubmit:function(e){i(e),E(!1)},showSeconds:d,showTime:m,canClear:x,showNow:A})))))})))},exports.EmptyPageMessage=function(e){var t=e.children;return l.default.createElement("div",{className:"empty-page-message"},t)},exports.ErrorPage=function(e){var t=e.error,n=void 0===t?"Something went wrong. Please refresh the page and try again.":t;return l.default.createElement("div",{className:"error-page-wrapper data-important"},l.default.createElement("span",null,n))},exports.FormSwitch=function(e){var t=e.onChange,n=e.oneColor,i=e.value,r=e.label,o=e.placeholder;e.isRequired;var s=e.info,a=void 0===s?bt:s,h=u(e,["onChange","oneColor","value","label","placeholder","isRequired","info"]);return l.default.createElement("div",{className:"form-switch"},l.default.createElement("div",null,l.default.createElement("span",{className:"form-switch-label"},r),a&&l.default.createElement(Kt,{data:a},l.default.createElement($,{className:"form-switch-info"}))),l.default.createElement(en,c({onChange:t,oneColor:n,checked:i||o||!1},h)))},exports.IconCell=function(e){var t=e.cell,n=t.value,i=t.column.Icon;return l.default.createElement("div",{className:"encrypted-cell"},n&&l.default.createElement(i,null))},exports.Info=Qt,exports.IpRangeTextBox=function(t){var n,i=t.label,r=t.onChange,o=t.value,s=t.error,a=t.wrapperClass,f=void 0===a?"":a,g=t.subnet,p=t.disabled,m=t.isRequired,b=t.info,y=u(t,["label","onChange","value","error","wrapperClass","subnet","disabled","isRequired","info"]),w=e.useRef(null),C=function(e){var t,n,i=[];if(e)for(var r=null===(t=e.ip)||void 0===t?void 0:t.split("."),o=null===(n=e.mask)||void 0===n?void 0:n.split("."),s=0;s<4;s++)"255"===o[s]&&i.push(r[s]);return i}(g),S=h(o?o.split("-"):[d(d([],h(C),!1),["","","",""],!1).slice(0,4).join("."),""],2),x=S[0],A=S[1],R=h(e.useState(d(d([],h(x.split(".")),!1),[A],!1)),2),I=R[0],E=R[1],k=v(((n={})[f]=!0,n["ip-range-text-box-field"]=!0,n["ip-range-text-box-disabled"]=p,n["has-error"]=!!s,n));return e.useEffect((function(){g&&(I.slice(0,4).some(tn.isEmpty)?r(bt):r("".concat(I.slice(0,4).join(".")).concat(I[4]!==bt?"-".concat(I[4]):bt)))}),[]),e.useLayoutEffect((function(){if(w.current){var e=Array.from(w.current.getElementsByTagName("input"));(e.find((function(e){return e.value===bt}))||e[0]).focus()}}),[]),l.default.createElement("div",{className:k},l.default.createElement("div",{className:"value-container",ref:w},tn.range(5).map((function(e){return l.default.createElement("div",{className:"ip-part-value-edit",key:"input_".concat(e)},l.default.createElement("input",c({value:I[e],disabled:C.length>=e+1,onKeyDown:nn,type:"number",onChange:function(t){return function(e,t){var n=d([],h(I),!1);n[e]=t.target.value&&Math.max(0,Math.min(255,parseInt(t.target.value,10))),n[e]>=100&&tn.goToNextInput(),E(n),n.slice(0,4).some(tn.isEmpty)?r(bt):r("".concat(n.slice(0,4).join(".")).concat(n[4]!==bt?"-".concat(n[4]):bt))}(e,t)}},y)),[".",".",".","-",bt][e])}))),l.default.createElement("span",{className:"field__label-wrap"},l.default.createElement("span",{className:"field__label field-1-label-content"},i,m&&l.default.createElement("span",{className:"required-star"},"*"),!!b&&l.default.createElement(Kt,{data:b},l.default.createElement($,null)))),l.default.createElement("span",{className:"ip-range-text-box-error capitalize-first-letter"},s))},exports.IpSubnetTextBox=function(t){var n,i=t.label,r=t.onChange,o=void 0===r?yt:r,s=t.value,a=t.error,f=t.wrapperClass,g=void 0===f?"":f,p=t.isRequired,m=t.info,b=u(t,["label","onChange","value","error","wrapperClass","isRequired","info"]),y=b.disabled,w=h(s?s.split("/"):["...",""],2),C=w[0],S=w[1],x=h(e.useState(d(d([],h(C.split(".")),!1),[tn.subnet2MaskOp(S)],!1)),2),A=x[0],R=x[1],I=v(((n={})[g]=!0,n["ip-subnet-text-box-field"]=!0,n.disabled=y,n["has-error"]=!!a,n)),E=e.useRef(null);return e.useEffect((function(){var e,t,n=document.activeElement;n.parentNode&&n.parentNode.parentNode===E.current&&(null===(e=E.current)||void 0===e||e.firstElementChild.firstElementChild.select(),null===(t=E.current)||void 0===t||t.firstElementChild.firstElementChild.focus())}),[E.current]),l.default.createElement("div",{className:I},l.default.createElement("div",{ref:E,className:"value-container"},tn.range(5).map((function(e){return l.default.createElement("div",{className:"ip-part-value-edit",key:"input_".concat(e)},l.default.createElement("input",c({value:A[e],onKeyDown:rn,type:"number",onChange:function(t){return function(e,t){var n=d([],h(A),!1);4===e?n[e]=t.target.value&&Math.max(0,Math.min(32,parseInt(t.target.value,10))):(n[e]=t.target.value&&Math.max(0,Math.min(255,parseInt(t.target.value,10))),n[e]>=100&&tn.goToNextInput()),R(n),n.some(tn.isEmpty)?o(bt):o("".concat(n.slice(0,4).join("."),"/").concat(tn.mask2SubnetOp(n.slice(4))))}(e,t)}},b)),[".",".",".","/"][e])}))),l.default.createElement("span",{className:"field__label-wrap"},l.default.createElement("span",{className:"field__label field-1-label-content"},i,p&&l.default.createElement("span",{className:"required-star"},"*"),!!m&&l.default.createElement(Kt,{data:m},l.default.createElement($,null)))),l.default.createElement("span",{className:"ip-subnet-error capitalize-first-letter"},a))},exports.IpTextBox=function(t){var n,i=t.label,r=t.onChange,o=void 0===r?yt:r,s=t.value,a=t.error,f=t.wrapperClass,g=void 0===f?"":f,p=t.isRequired,m=t.info,b=u(t,["label","onChange","value","error","wrapperClass","isRequired","info"]),y=b.disabled,w=h(e.useState(s?s.split("."):["","","",""]),2),C=w[0],S=w[1],x=v(((n={})[g]=!0,n["ip-text-box-field"]=!0,n["ip-text-box-disabled"]=y,n["has-error"]=!!a,n));return l.default.createElement("div",{className:x},l.default.createElement("div",{className:"value-container"},tn.range(4).map((function(e){return l.default.createElement("div",{className:"ip-part-value-edit",key:"input_".concat(e)},l.default.createElement("input",c({value:C[e],onKeyDown:on,type:"number",onChange:function(t){return function(e,t){var n=d([],h(C),!1);n[e]=t.target.value&&Math.max(0,Math.min(255,parseInt(t.target.value,10))),n[e]>=100&&tn.goToNextInput(),S(n),n.some(tn.isEmpty)?o(bt):o(n.join("."))}(e,t)}},b)),3!==e?".":bt)}))),l.default.createElement("span",{className:"field__label-wrap"},l.default.createElement("span",{className:"field__label field-1-label-content"},i,p&&l.default.createElement("span",{className:"required-star"},"*"),!!m&&l.default.createElement(Kt,{data:m},l.default.createElement($,null)))),l.default.createElement("span",{className:"ip-text-box-error capitalize-first-letter"},a))},exports.JsonBox=function(e){var t,n=e.label,i=e.error,r=e.wrapperClass,o=void 0===r?"":r,s=e.info,a=e.isRequired,h=e.disabled,d=u(e,["label","error","wrapperClass","info","isRequired","disabled"]),f=v(((t={"json-box":!0,"has-error":!!i})[o]=!0,t));return l.default.createElement("div",{className:f},l.default.createElement("span",{className:"json-box__label field-1-label-content"},n,a&&l.default.createElement("span",{className:"required-star"},"*"),!!s&&l.default.createElement(Kt,{data:s},l.default.createElement($,null))),l.default.createElement(Lr,c({readOnly:h},d,{tabSize:2})),l.default.createElement("span",{className:"json-box-error capitalize-first-letter"},i))},exports.JsonEditor=Lr,exports.Loader=function(){return l.default.createElement("div",{className:"loader-wrapper"},l.default.createElement("div",{className:"loading-bar"},l.default.createElement("div",{className:"fill-bar"})))},exports.LoginField=function(e){var t,n=e.label,i=e.onChange,r=e.value,o=void 0===r?bt:r,s=e.error,a=e.placeholder,d=e.type,f=e.wrapperClass,g=void 0===f?bt:f,p=e.tooltip,m=e.isRequired,b=u(e,["label","onChange","value","error","placeholder","type","wrapperClass","tooltip","isRequired"]),y=h(Tr(!1),2),w=y[0],C=y[1],S=v(((t={})[g]=!0,t["login-text-field"]=!0,t["has-error"]=!!s,t)),x=v({"login-field-input":!0,"is-type-password-login":"password"===d});return l.default.createElement("div",{className:S},l.default.createElement("span",{className:"login-field-label"},l.default.createElement("span",{className:"body-copy-1"},n),m&&l.default.createElement("span",{className:"required-star"},"*"),p?l.default.createElement(Qt,{data:p}):null),l.default.createElement("input",c({autoComplete:"new-password",className:x,placeholder:a,type:w&&"password"===d?"text":d,value:o,onChange:function(e){i(Number.isNaN(e.target.valueAsNumber)?e.target.value:e.target.valueAsNumber)}},b)),"password"===d&&l.default.createElement("span",{className:"login-password-icon"},tn.getPasswordIcon(w,C)),l.default.createElement("span",{className:"text-login-error capitalize-first-letter"},s))},exports.MenuPopper=su,exports.MultiSelectFilter=function(t){var n=t.column,i=n.filterValue,r=n.setFilter,o=n.preFilteredRows,s=n.id,a=void 0===s?bt:s,c=n.fixedOptions,u=n.Header,f=void 0===i?[]:Array.isArray(i)?i:[i],g=h(e.useState(f),2),p=g[0],m=g[1],v=(c||l.default.useMemo((function(){var e=new Set;return o.forEach((function(t){p&&!p.includes(t.values[a])&&e.add(t.values[a])})),d([],h(e.values()),!1)}),[a,o,p])).map((function(e){return tn.formatOption(e)}));return e.useEffect((function(){m(f)}),[JSON.stringify(f)]),l.default.createElement(Au,{setFilter:r,value:p,columnTitle:u},l.default.createElement("div",{className:"table-multi-select-filter"},l.default.createElement(eu,{options:v,onChange:function(e){m(d(d([],h(p),!1),[e],!1).sort())},value:null,autoFocus:!0,sortOptions:!0}),l.default.createElement("div",{className:"selected-options-wrapper"},p.map((function(e){return l.default.createElement("div",{key:e,className:"selected-option"},l.default.createElement(H,{onClick:function(){return t=e,n=p.filter((function(e){return e!==t})),void m(n);var t,n}}),l.default.createElement("span",{className:"dropdown-lines-1"},e))})))))},exports.NewPasswordTooltip=function(e){var t=e.passValue,n=lu(void 0===t?bt:t);return l.default.createElement("div",{className:"password-min-demand"},l.default.createElement("span",{className:"demand-headline"},"Password must contain:"),l.default.createElement("span",{className:n.length>=8?"valid":bt},"● At least 8 characters"),l.default.createElement("span",{className:n.contains.includes("uppercase")?"valid":bt},"● Uppercase letter"),l.default.createElement("span",{className:n.contains.includes("lowercase")?"valid":bt},"● Lowercase letter"),l.default.createElement("span",{className:n.contains.includes("number")||n.contains.includes("symbol")?"valid":bt},"● Number or special character"))},exports.NumInput=Lu,exports.ProgressCell=function(e){var t=e.cell.value,n=t.status,i=t.progress,r="N/A"!==i?"".concat(n," - ").concat(i):n;return l.default.createElement("div",null,r)},exports.RadioSwitch=function(e){var n=e.label,i=e.checked,r=e.onChange,o=e.value,s=e.disabled,a=e.info,c=v({disabled:s,"radio-switch":!0});return l.default.createElement("div",{className:c},l.default.createElement(t.Radio,{classes:{root:"radio-btn"},checked:i,disabled:s,onChange:function(e){r(e.target.value)},value:o}),l.default.createElement("span",{className:"radio-label"},n,!!a&&l.default.createElement(Kt,{data:a},l.default.createElement($,null))))},exports.Select=eu,exports.SelectFilter=function(t){var n=t.column,i=n.filterValue,r=n.setFilter,o=n.preFilteredRows,s=n.id,a=void 0===s?bt:s,c=n.Header,u=h(e.useState(tn.isEmpty(i)?[]:i),2),f=u[0],g=u[1],p=l.default.useMemo((function(){var e=new Set;return o.forEach((function(t){e.add(t.values[a])})),d([],h(e.values()),!1)}),[a,o]).map((function(e){return tn.formatOption(e)}));return l.default.createElement(Au,{setFilter:r,value:f,columnTitle:c},l.default.createElement("div",{className:"table-select-filter"},l.default.createElement(eu,{options:p,onChange:g,value:f,autoFocus:!0})))},exports.SeverityCell=function(e){var t,n=e.cell.value,i=Xt[n],r=v(((t={"event-severity":!0})[n.toLowerCase()]=!0,t));return l.default.createElement(Kt,{data:n,placement:"right"},l.default.createElement("div",{className:r},i?l.default.createElement(i,null):n))},exports.SpanTooltip=Jc,exports.StatusCell=function(e){var t=e.cell,n=t.value,i=t.column,r=t.row,o=i,s=o.getTooltip,a=o.showString,c=null==n?void 0:n.replaceAll("_"," "),u=s?s(r.original):c;return l.default.createElement(Kt,{data:u},l.default.createElement("div",{className:"status-cell-wrapper"},function(e){switch(e){case $t:case _t:case Tt:case Ot:case Nt:return l.default.createElement(fe,{className:"up"});case Bt:return l.default.createElement(Ae,{className:"updating"});case Pt:case Wt:return l.default.createElement(we,{className:"working"});case Lt:return l.default.createElement(ke,{className:"degraded-status"});case Ft:case Mt:case It:case kt:return l.default.createElement(we,{className:"working"});default:return l.default.createElement(Te,{className:"down"})}}(n),a&&l.default.createElement("span",{className:"status-string"},c)))},exports.Switch=en,exports.Tab=function(e){var t,n=e.title,i=e.subComponent,r=void 0===i?null:i,o=e.active,s=e.setActive,a=e.wrapperClass,c=void 0===a?bt:a,u=e.disabled,h=void 0!==u&&u,d=e.isSideTab,f=v(((t={"custom-tab":!0,"custom-tab-side":void 0!==d&&d,"tab-active":o})[c]=!0,t.disabled=h,t));return l.default.createElement("div",{className:f,onClick:s},l.default.createElement("div",{className:"tab-title"},n),r)},exports.Table=function(n){var i,o=n.columns,s=n.data,a=n.rowActions,u=void 0===a?[]:a,f=n.tableActions,g=n.title,p=n.defaultSort,m=void 0===p?bt:p,b=n.globalFilter,y=n.defaultGlobalFilter,w=n.checkRowSelected,C=n.getRowId,S=n.addFilterToUrl,x=n.RowSubComponent,A=n.listenerPrefix,R=n.onRowClick,I=void 0===R?yt:R,E=n.miniTable,k=n.filterCategory,$=n.fixedPageSize,_=n.disableActionsPortal,L=n.maxRows,T=n.emptyMessage,M=n.colPropForShowColumns,O=bu.getItem(Ct),N=O&&JSON.parse(O)[k]||bt,B=h(r.useSearchParams(),1)[0],P=bu.getItem(St),F=P&&JSON.parse(P)[k]||o.filter((function(e){return e.defaultHidden})).map((function(e){var t=e.Header,n=e.accessor;return tn.isString(n)?n:t})),W=l.default.useMemo((function(){return{Cell:Cu,width:100,sortType:tn.stringSort}}),[]),G=r.useNavigate(),H=S?e.useMemo((function(){return e=window.location.search?B:tn.parseParamsToQuery(N),d([],h(new URLSearchParams(e).entries()),!1).map((function(e){var t=h(e,2);return{id:t[0],value:t[1]}}));var e}),[]):[],D=pu.exports.useTable({columns:o,data:s,defaultColumn:W,globalFilter:b,initialState:c(c({pageSize:$||50},m&&{sortBy:[{id:m,desc:!1}]}),{filters:(i=H,i.reduce((function(e,t){var n=t.id,i=t.value,r=e.find((function(e){return e.id===n}));return r?r.value.push(i):e.push({id:n,value:[i]}),e}),[])),globalFilter:y,hiddenColumns:F}),autoResetFilters:!1,autoResetSortBy:!1,autoResetExpanded:!1,autoResetPage:!1,autoResetRowState:!1,autoResetGlobalFilter:!1,autoResetHiddenColumns:!1,getRowId:C,sortTypes:xu},pu.exports.useRowState,pu.exports.useFilters,pu.exports.useGlobalFilter,pu.exports.useSortBy,pu.exports.useExpanded,pu.exports.usePagination,pu.exports.useFlexLayout),V=D.getTableProps,z=D.getTableBodyProps,Z=D.headerGroups,X=D.rows,U=D.allColumns,J=D.prepareRow,K=D.canPreviousPage,Q=D.canNextPage,ee=D.pageCount,te=D.toggleSortBy,ne=D.gotoPage,ie=D.nextPage,re=D.setPageSize,se=D.previousPage,ae=D.page,le=D.state,ce=le.pageIndex,ue=le.filters,he=D.setFilter,de=D.setAllFilters,fe=D.visibleColumns,ge=D.setHiddenColumns,pe=!X.length,me=v({"empty-table":pe,"react-table":!0}),ve=v({"mini-table":E,"scroll-wrapper":!0}),be=e.useRef(null),ye=!!x,we=e.useMemo((function(){return ue.filter((function(e){var t=e.id;return U.find((function(e){return t===e.id}))}))}),[ue]);function Ce(e){var t,n=e.detail,i=n.value,r=n.id,o=(null===(t=ue.find((function(e){return e.id===r})))||void 0===t?void 0:t.value)||[],s=Array.isArray(o)?d([],h(o),!1):[o];(null==s?void 0:s.includes(i))?s.splice(s.indexOf(i),1):s.push(i),he(r,tn.isEmpty(s)?void 0:s)}e.useEffect((function(){ge((function(e){return bu.updateHidden(k,e),e}))}),[fe.length]),e.useEffect((function(){return A?(document.addEventListener("".concat(A).concat(xt),Ce),tn.dispatchCustomEvent("".concat(A).concat("table-filters"),ue),function(){document.removeEventListener("".concat(A).concat(xt),Ce)}):function(){}}),[ue]),e.useEffect((function(){if(S){var e=we.reduce((function(e,t){var n=t.id,i=t.value;return e[n]=i,e}),{}),t=tn.parseParamsToQuery(e);G({search:t.toString()},{replace:!0}),bu.updateFilters(k,e)}}),[we]),e.useEffect((function(){ne(0)}),[ee]),e.useEffect((function(){var e;null===(e=be.current)||void 0===e||e.scrollTo(0,0)}),[ce]),e.useEffect((function(){E&&!$&&re(X.length)}),[X.length]),e.useEffect((function(){$&&re($)}),[$]);var Se=e.useCallback(gu.debounce((function(){var e,t=null===(e=be.current)||void 0===e?void 0:e.clientHeight;!t||E||$||re(t/35)}),350),[]);return e.useEffect((function(){return Se(),window.addEventListener("resize",Se),function(){window.removeEventListener("resize",Se)}}),[]),l.default.createElement("div",{className:"react-table-wrapper"},!E&&l.default.createElement("div",{className:"table-top"},l.default.createElement("div",null,l.default.createElement("span",{className:"heading-4"},g),l.default.createElement("span",{className:"sub-title"},"".concat(X.length," ").concat(L?"(max ".concat(L,")"):bt)),U.length>2&&l.default.createElement(yu,{columns:U,colProperty:M||"Header"})),!tn.isEmpty(we)&&l.default.createElement("div",{className:"table-filters"},we.map((function(e){var t=e.id,n=e.value;return l.default.createElement(Su,{key:t,name:t,text:n,onDelete:function(){return he(t,void 0)}})})),l.default.createElement("div",{className:"table-filters-clear"},l.default.createElement(Kt,{data:"Clear Filters"},l.default.createElement(t.IconButton,{onClick:function(){return de([])}},l.default.createElement(oe,null))))),l.default.createElement("div",{className:"table-actions"},f)),l.default.createElement("div",{className:ve,ref:be},l.default.createElement("table",c({},V(),{className:me}),l.default.createElement("thead",{className:"sticky-header"},Z.map((function(e){return l.default.createElement("tr",c({},e.getHeaderGroupProps()),ye?l.default.createElement("th",{className:"table-header header-cell-for-expandable"}):null,e.headers.map((function(e){return l.default.createElement("th",c({},e.getHeaderProps(),{className:"table-header"}),l.default.createElement(Kt,{data:e.tooltip},l.default.createElement("span",{className:"table-headline ".concat(e.disableSort?"disable-sort":bt),onClick:function(){e.disableSort||te(e.id,void 0!==e.isSortedDesc&&!e.isSortedDesc)}},e.render("Header"))),e.Filter?e.render("Filter"):null,e.isSorted&&l.default.createElement("div",{className:"table-sort",onClick:function(){return te(e.id,!e.isSortedDesc)}},e.isSortedDesc?l.default.createElement(q,{className:"rotate180"}):l.default.createElement(q,null)))})),!tn.isEmpty(u)&&l.default.createElement("th",{className:"table-header table-header-actions"},bt))}))),l.default.createElement("tbody",c({},z(),{className:"table-body",emptymessage:T||"No ".concat(g||X)}),ae.map((function(e){var t=e;J(t);var n=v({"table-line":!0,clickable:I!==yt||ye,"is-expand":t.isExpanded,"is-selected":null==w?void 0:w(t.original)});return l.default.createElement(l.default.Fragment,{key:t.getRowProps().key},l.default.createElement("tr",c({},t.getRowProps(),{className:n}),ye&&l.default.createElement("td",c({className:"expand-cell",onClick:function(){return I(t.original)}},!!x&&{onClick:t.getToggleRowExpandedProps().onClick}),t.isExpanded?l.default.createElement(Y,null):l.default.createElement(Y,{className:"rotate270"})),t.cells.map((function(e){return l.default.createElement("td",c({},e.getCellProps(),{className:"table-cell",onClick:function(){return I(t.original)}},!!x&&{onClick:t.getToggleRowExpandedProps().onClick}),e.render("Cell"))})),!tn.isEmpty(u)&&l.default.createElement("td",{className:"td-actions"},l.default.createElement(wu,{row:t,actions:u,disablePortal:_}))),t.isExpanded&&x?l.default.createElement("tr",{className:"sub-table-line"},l.default.createElement("td",null,l.default.createElement(x,{row:t}))):null)}))))),(!E||$)&&l.default.createElement("div",{className:"footer"},l.default.createElement("div",{className:"pagination-wrapper"},l.default.createElement("div",{className:"pagination"},l.default.createElement(Kt,{data:K?"First Page":bt},l.default.createElement(j,{onClick:function(){return ne(0)},className:"rotate180",disabled:!K})),l.default.createElement(Kt,{data:K?"Previous Page":bt},l.default.createElement(Y,{onClick:se,className:"rotate90",disabled:!K})),l.default.createElement("span",{className:"note"},"".concat(ce+1," / ").concat(ee||1)),l.default.createElement(Kt,{data:Q?"Next Page":bt},l.default.createElement(Y,{onClick:ie,className:"rotate270",disabled:!Q})),l.default.createElement(Kt,{data:Q?"Last Page":bt},l.default.createElement(j,{onClick:function(){return ne(ee-1)},disabled:!Q}))))))},exports.TagsBox=function(n){var i,r=n.label,o=n.onChange,s=n.value,a=void 0===s?[]:s,d=n.error,f=n.placeholder,g=n.wrapperClass,p=void 0===g?"":g,m=n.tagsValidation,b=void 0===m?function(e){return e}:m,y=n.warning,w=n.isRequired,C=n.info,S=n.invalidTagText,x=n.disabled,A=n.isClearable,R=u(n,["label","onChange","value","error","placeholder","wrapperClass","tagsValidation","warning","isRequired","info","invalidTagText","disabled","isClearable"]),I=h(e.useState(bt),2),E=I[0],k=I[1],_=h(e.useState(!1),2),L=_[0],T=_[1],M=h(e.useState([]),2),O=M[0],N=M[1];e.useEffect((function(){N(null==a?void 0:a.map(tn.formatOption))}),[JSON.stringify(a)]),e.useEffect((function(){L&&T(!1)}),[E]);var B=v(((i={})[p]=!0,i["tagsbox-wrapper"]=!0,i["has-error"]=!!d,i));function P(e){e.stopPropagation();var t=Array.from(new Set("".concat(a).concat(wt).concat(E).split(wt).filter((function(e){return e}))));tn.isEmpty(b([E]))?T(!0):(o(b(t)),k(bt))}return l.default.createElement(t.FormControl,{className:B},l.default.createElement("span",{className:"tags-label field-1-label-content"},r,w&&l.default.createElement("span",{className:"required-star"},"*"),!!C&&l.default.createElement(Kt,{data:C},l.default.createElement($,null))),l.default.createElement(ru,c({components:{DropdownIndicator:null},inputValue:E,isClearable:A,isMulti:!0,isDisabled:x,onChange:function(e){o(e.map((function(e){return e.label})))},onInputChange:k,onKeyDown:function(e){if(new Set([wt,"Enter"]).has(e.key)){E&&e.preventDefault();var t=Array.from(new Set("".concat(a).concat(wt).concat(E).split(wt).filter((function(e){return e}))));tn.isEmpty(b([E]))?T(!0):(o(b(t)),k(bt))}},placeholder:f,noOptionsMessage:function(){return null},value:O,formatCreateLabel:function(e){return l.default.createElement("div",{onClick:P},"'".concat(e,"'"),L&&l.default.createElement("span",{className:"tags-invalid"}," - ".concat(S||"Invalid value")))},classNamePrefix:"react-tagsbox"},R)),l.default.createElement("span",{className:"tags-box-error capitalize-first-letter"},L||d),a&&!d&&y&&l.default.createElement("span",{className:"tags-warning"},y))},exports.TextArea=function(e){var t,n=e.label,i=e.onChange,r=e.value,o=e.error,s=e.placeholder,a=e.wrapperClass,h=void 0===a?"":a,d=e.isRequired,f=e.info,g=u(e,["label","onChange","value","error","placeholder","wrapperClass","isRequired","info"]);var p=v(((t={})[h]=!0,t["text-area-field"]=!0,t["has-error"]=!!o,t));return l.default.createElement("div",{className:p},l.default.createElement("textarea",c({className:"field__input",placeholder:s,value:null===r?bt:r,onChange:function(e){i(e.target.value)}},g)),l.default.createElement("span",{className:"field__label-wrap"},l.default.createElement("span",{className:"field__label field-1-label-content"},n,d&&l.default.createElement("span",{className:"required-star"},"*"),!!f&&l.default.createElement(Kt,{data:f},l.default.createElement($,null)))),l.default.createElement("span",{className:"text-area-error capitalize-first-letter"},o))},exports.TextBox=ou,exports.TextField=function(e){var t,n=e.label,i=e.onChange,r=e.value,o=e.error,s=e.wrapperClass,a=e.secondLabel,h=u(e,["label","onChange","value","error","wrapperClass","secondLabel"]),d=v(((t={})[s]=!0,t["text-field"]=!0,t["has-error"]=!!o,t));return l.default.createElement("div",{className:d},l.default.createElement("span",{className:"text-field-first-label label-5"},n),l.default.createElement("div",{className:"field-input-wrapper"},l.default.createElement("input",c({className:"field__input",value:r||bt,onChange:function(e){i(Number.isNaN(e.target.valueAsNumber)?e.target.value:e.target.valueAsNumber)}},h)),l.default.createElement("span",{className:"text-field-error capitalize-first-letter"},o)),l.default.createElement("span",{className:"text-field-second-label label-5"},a))},exports.TextFilter=function(t){var n=t.column,i=n.filterValue,r=n.setFilter,o=n.Header,s=h(e.useState(i),2),a=s[0],c=s[1];return e.useEffect((function(){c(i)}),[i]),l.default.createElement(Au,{setFilter:r,value:a,columnTitle:o},l.default.createElement("input",{autoFocus:!0,className:"table-text-filter",value:a||bt,onChange:function(e){c(e.target.value||void 0)}}))},exports.TextSelectBox=function(t){var n,i=t.label,r=t.onChange,o=t.value,s=t.wrapperClass,a=void 0===s?"":s,d=t.options,f=t.formatFunc,g=t.info,p=t.selectPlaceholder,m=t.error,b=t.isRequired,y=u(t,["label","onChange","value","wrapperClass","options","formatFunc","info","selectPlaceholder","error","isRequired"]),w=f(o),C=w.number,S=w.unit,x=h(e.useState(C),2),A=x[0],R=x[1],I=h(e.useState(S.value||p),2),E=I[0],k=I[1],$=v(((n={})[a]=!0,n["has-error"]=!!m,n["text-select-wrapper"]=!0,n));return l.default.createElement("div",{className:$},l.default.createElement("span",{className:"text-select-label field-1-label-content"},i,b&&l.default.createElement("span",{className:"required-star"},"*"),g&&l.default.createElement(Qt,{data:g})),l.default.createElement(ou,c({value:A,type:"number",onChange:function(e){tn.isEmpty(e)?r(void 0):tn.isEmpty(E)||r(Math.floor(E*e)),R(e)}},y)),l.default.createElement("div",{className:"spread-line"}),l.default.createElement(eu,{value:E,options:d,onChange:function(e){tn.isEmpty(e)||tn.isEmpty(A)?r(void 0):r(Math.floor(A*e)),k(e)}}),l.default.createElement("span",{className:"text-select-error capitalize-first-letter"},m))},exports.TieringCell=function(e){var t=e.cell.value;return l.default.createElement("div",{className:"tiering-cell"},t.map((function(e){return function(e){var t=e.mode,n=e.name,i=e.state,r=e.detachProgress,o=void 0===r?0:r;if("DETACHING"===i)return l.default.createElement(Kt,{data:"Object Store Bucket is being detached",key:n},l.default.createElement("div",null,l.default.createElement(Jt,{progress:"number"==typeof o?o:void 0})));var s=t===Gt?Ge:Be;return l.default.createElement(s,{key:n,className:t.toLowerCase()})}(e)})))},exports.TimeCell=function(e){var t=e.cell.value,i=n.Duration.fromMillis(1e3*t).shiftTo("months","weeks","days","hours","minutes","seconds").toObject(),r=bt,o=bt,s={};return Object.entries(i).forEach((function(e){var t=h(e,2),n=t[0],i=t[1];i&&(s[n]=i,r+="".concat(i).concat(Ht[n]," "))})),Object.entries(s).forEach((function(e,t){var n=h(e,2),i=n[0],r=n[1];t<2&&(o+="".concat(r).concat(Ht[i]," "))})),l.default.createElement(Kt,{data:r},l.default.createElement("div",null,t?o:bt))},exports.Toast=du,exports.ToggleButton=function(t){var n=t.options,i=t.value,r=t.onChange,o=e.useRef(null);return e.useEffect((function(){o.current&&Array.from(o.current.children).forEach((function(e){e.getAttribute("data-value")===i&&function(e){if(e){var t=e&&e.parentNode&&e.parentNode.parentNode&&e.parentNode.parentNode.firstChild;t&&(t.style.width="".concat(e.offsetWidth,"px"),t.style.height="".concat(e.offsetHeight+5,"px"),t.style.transform="translateX(".concat(e.offsetLeft,"px)"),t.style.display="block",Array.from(e.parentNode.children).forEach((function(e){return e.classList.remove("toggle-button-option-selected")})),e.classList.add("toggle-button-option-selected"))}}(e)}))}),[i]),l.default.createElement("div",{className:"toggle-button"},l.default.createElement("div",{className:"toggle-button-pad"}),l.default.createElement("div",{className:"toggle-button-options",ref:o},n.map((function(e){return l.default.createElement("span",{className:"toggle-button-option",key:e.value,"data-value":e.value,onClick:function(){r(e.value)}},e.label)}))))},exports.Tooltip=Kt,exports.UploadField=function(n){var i,r=n.label,o=n.onChange,s=void 0===o?yt:o,a=n.disabled,d=n.wrapperClass,f=void 0===d?"":d,g=n.placeholder,p=n.error,m=n.onReadError,b=u(n,["label","onChange","disabled","wrapperClass","placeholder","error","onReadError"]),y=e.useId(),w=h(e.useState(bt),2),C=w[0],S=w[1],x=v(((i={"upload-wrapper":!0})[f]=!0,i["upload-wrapper-disabled"]=a,i));return l.default.createElement("div",{className:x},l.default.createElement("input",c({id:y,disabled:a,placeholder:g,type:"file",onClick:function(e){e.target.value=bt},onChange:function(e){!function(e){try{var t=new FileReader;t.onload=function(t){S(e.name),s(t.target.result)},t.readAsText(e)}catch(e){m()}}(e.target.files[0])}},b)),l.default.createElement("label",{htmlFor:y,className:"button small"},r),l.default.createElement("span",{className:"upload-field-error capitalize-first-letter"},p),C&&l.default.createElement("div",{className:"file-name-wrapper"},l.default.createElement(Jc,{extraClasses:"file-name"},C),l.default.createElement(t.IconButton,{onClick:function(){S(bt),s(bt)}},l.default.createElement(H,null))))},exports.UptimeCell=function(t){var n=t.cell.value,i=h(e.useState(Eu(n).value),2),r=i[0],o=i[1],s=h(e.useState(Eu(n).exactValue),2),a=s[0],c=s[1];return e.useEffect((function(){var e=setInterval((function(){o(Eu(n).value),c(Eu(n).exactValue)}),1e4);return function(){clearInterval(e)}}),[n]),l.default.createElement(Kt,{data:a},l.default.createElement("div",null,r))}; + */!function(e,t){(function(){var n,i="Expected a function",r="__lodash_hash_undefined__",o="__lodash_placeholder__",s=16,a=32,l=64,u=128,c=256,h=1/0,f=9007199254740991,g=NaN,p=4294967295,m=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",a],["partialRight",l],["rearg",c]],v="[object Arguments]",b="[object Array]",y="[object Boolean]",w="[object Date]",C="[object Error]",S="[object Function]",x="[object GeneratorFunction]",A="[object Map]",E="[object Number]",R="[object Object]",I="[object Promise]",k="[object RegExp]",$="[object Set]",L="[object String]",_="[object Symbol]",T="[object WeakMap]",M="[object ArrayBuffer]",O="[object DataView]",N="[object Float32Array]",B="[object Float64Array]",F="[object Int8Array]",P="[object Int16Array]",W="[object Int32Array]",D="[object Uint8Array]",G="[object Uint8ClampedArray]",H="[object Uint16Array]",V="[object Uint32Array]",z=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,Z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,Y=RegExp(X.source),J=RegExp(U.source),K=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ie.source),oe=/^\s+/,se=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ge=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ce=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",Re="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",$e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Le="['’]",_e="["+xe+"]",Te="["+$e+"]",Me="["+Ae+"]",Oe="\\d+",Ne="["+Ee+"]",Be="["+Re+"]",Fe="[^"+xe+$e+Oe+Ee+Re+Ie+"]",Pe="\\ud83c[\\udffb-\\udfff]",We="[^"+xe+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Ge="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ie+"]",Ve="\\u200d",ze="(?:"+Be+"|"+Fe+")",je="(?:"+He+"|"+Fe+")",Ze="(?:['’](?:d|ll|m|re|s|t|ve))?",Xe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+Me+"|"+Pe+")"+"?",Ye="["+ke+"]?",Je=Ye+Ue+("(?:"+Ve+"(?:"+[We,De,Ge].join("|")+")"+Ye+Ue+")*"),Ke="(?:"+[Ne,De,Ge].join("|")+")"+Je,Qe="(?:"+[We+Me+"?",Me,De,Ge,_e].join("|")+")",qe=RegExp(Le,"g"),et=RegExp(Me,"g"),tt=RegExp(Pe+"(?="+Pe+")|"+Qe+Je,"g"),nt=RegExp([He+"?"+Be+"+"+Ze+"(?="+[Te,He,"$"].join("|")+")",je+"+"+Xe+"(?="+[Te,He+ze,"$"].join("|")+")",He+"?"+ze+"+"+Ze,He+"+"+Xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,Ke].join("|"),"g"),it=RegExp("["+Ve+xe+Ae+ke+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["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"],st=-1,at={};at[N]=at[B]=at[F]=at[P]=at[W]=at[D]=at[G]=at[H]=at[V]=!0,at[v]=at[b]=at[M]=at[y]=at[O]=at[w]=at[C]=at[S]=at[A]=at[E]=at[R]=at[k]=at[$]=at[L]=at[T]=!1;var lt={};lt[v]=lt[b]=lt[M]=lt[O]=lt[y]=lt[w]=lt[N]=lt[B]=lt[F]=lt[P]=lt[W]=lt[A]=lt[E]=lt[R]=lt[k]=lt[$]=lt[L]=lt[_]=lt[D]=lt[G]=lt[H]=lt[V]=!0,lt[C]=lt[S]=lt[T]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ht=parseInt,dt="object"==typeof d&&d&&d.Object===Object&&d,ft="object"==typeof self&&self&&self.Object===Object&&self,gt=dt||ft||Function("return this")(),pt=t&&!t.nodeType&&t,mt=pt&&e&&!e.nodeType&&e,vt=mt&&mt.exports===pt,bt=vt&&dt.process,yt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),wt=yt&&yt.isArrayBuffer,Ct=yt&&yt.isDate,St=yt&&yt.isMap,xt=yt&&yt.isRegExp,At=yt&&yt.isSet,Et=yt&&yt.isTypedArray;function Rt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function It(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r-1}function Mt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i-1;);return n}function nn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var on=Xt({"À":"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"}),sn=Xt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ut[e]}function ln(e){return it.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function hn(e,t){for(var n=-1,i=e.length,r=0,s=[];++n",""":'"',"'":"'"});var bn=function e(t){var d=(t=null==t?gt:bn.defaults(gt.Object(),t,bn.pick(gt,ot))).Array,se=t.Date,xe=t.Error,Ae=t.Function,Ee=t.Math,Re=t.Object,Ie=t.RegExp,ke=t.String,$e=t.TypeError,Le=d.prototype,_e=Ae.prototype,Te=Re.prototype,Me=t["__core-js_shared__"],Oe=_e.toString,Ne=Te.hasOwnProperty,Be=0,Fe=function(){var e=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pe=Te.toString,We=Oe.call(Re),De=gt._,Ge=Ie("^"+Oe.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=vt?t.Buffer:n,Ve=t.Symbol,ze=t.Uint8Array,je=He?He.allocUnsafe:n,Ze=cn(Re.getPrototypeOf,Re),Xe=Re.create,Ue=Te.propertyIsEnumerable,Ye=Le.splice,Je=Ve?Ve.isConcatSpreadable:n,Ke=Ve?Ve.iterator:n,Qe=Ve?Ve.toStringTag:n,tt=function(){try{var e=fo(Re,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,ut=se&&se.now!==gt.Date.now&&se.now,dt=t.setTimeout!==gt.setTimeout&&t.setTimeout,ft=Ee.ceil,pt=Ee.floor,mt=Re.getOwnPropertySymbols,bt=He?He.isBuffer:n,yt=t.isFinite,Wt=Le.join,Xt=cn(Re.keys,Re),yn=Ee.max,wn=Ee.min,Cn=se.now,Sn=t.parseInt,xn=Ee.random,An=Le.reverse,En=fo(t,"DataView"),Rn=fo(t,"Map"),In=fo(t,"Promise"),kn=fo(t,"Set"),$n=fo(t,"WeakMap"),Ln=fo(Re,"create"),_n=$n&&new $n,Tn={},Mn=Do(En),On=Do(Rn),Nn=Do(In),Bn=Do(kn),Fn=Do($n),Pn=Ve?Ve.prototype:n,Wn=Pn?Pn.valueOf:n,Dn=Pn?Pn.toString:n;function Gn(e){if(ia(e)&&!Zs(e)&&!(e instanceof jn)){if(e instanceof zn)return e;if(Ne.call(e,"__wrapped__"))return Go(e)}return new zn(e)}var Hn=function(){function e(){}return function(t){if(!na(t))return{};if(Xe)return Xe(t);e.prototype=t;var i=new e;return e.prototype=n,i}}();function Vn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function jn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ui(e,t,i,r,o,s){var a,l=1&t,u=2&t,c=4&t;if(i&&(a=o?i(e,r,o,s):i(e)),a!==n)return a;if(!na(e))return e;var h=Zs(e);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Lr(e,a)}else{var d=mo(e),f=d==S||d==x;if(Js(e))return Ar(e,l);if(d==R||d==v||f&&!o){if(a=u||f?{}:bo(e),!l)return u?function(e,t){return _r(e,po(e),t)}(e,function(e,t){return e&&_r(t,Oa(t),e)}(a,e)):function(e,t){return _r(e,go(e),t)}(e,oi(a,e))}else{if(!lt[d])return o?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case M:return Er(e);case y:case w:return new i(+e);case O:return function(e,t){var n=t?Er(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case B:case F:case P:case W:case D:case G:case H:case V:return Rr(e,n);case A:return new i;case E:case L:return new i(e);case k:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case $:return new i;case _:return r=e,Wn?Re(Wn.call(r)):{}}var r}(e,d,l)}}s||(s=new Jn);var g=s.get(e);if(g)return g;s.set(e,a),la(e)?e.forEach((function(n){a.add(ui(n,t,i,n,e,s))})):ra(e)&&e.forEach((function(n,r){a.set(r,ui(n,t,i,r,e,s))}));var p=h?n:(c?u?oo:ro:u?Oa:Ma)(e);return kt(p||e,(function(n,r){p&&(n=e[r=n]),ni(a,r,ui(n,t,i,r,e,s))})),a}function ci(e,t,i){var r=i.length;if(null==e)return!r;for(e=Re(e);r--;){var o=i[r],s=t[o],a=e[o];if(a===n&&!(o in e)||!s(a))return!1}return!0}function hi(e,t,r){if("function"!=typeof e)throw new $e(i);return Mo((function(){e.apply(n,r)}),t)}function di(e,t,n,i){var r=-1,o=Tt,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=Ot(t,Qt(n))),i?(o=Mt,s=!1):t.length>=200&&(o=en,s=!1,t=new Yn(t));e:for(;++r-1},Xn.prototype.set=function(e,t){var n=this.__data__,i=ii(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new Zn,map:new(Rn||Xn),string:new Zn}},Un.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Un.prototype.get=function(e){return co(this,e).get(e)},Un.prototype.has=function(e){return co(this,e).has(e)},Un.prototype.set=function(e,t){var n=co(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,r),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Xn){var i=n.__data__;if(!Rn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Un(i)}return n.set(e,t),this.size=n.size,this};var fi=Or(Ci),gi=Or(Si,!0);function pi(e,t){var n=!0;return fi(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function mi(e,t,i){for(var r=-1,o=e.length;++r0&&n(a)?t>1?bi(a,t-1,n,i,r):Nt(r,a):i||(r[r.length]=a)}return r}var yi=Nr(),wi=Nr(!0);function Ci(e,t){return e&&yi(e,t,Ma)}function Si(e,t){return e&&wi(e,t,Ma)}function xi(e,t){return _t(t,(function(t){return qs(e[t])}))}function Ai(e,t){for(var i=0,r=(t=wr(t,e)).length;null!=e&&it}function ki(e,t){return null!=e&&Ne.call(e,t)}function $i(e,t){return null!=e&&t in Re(e)}function Li(e,t,i){for(var r=i?Mt:Tt,o=e[0].length,s=e.length,a=s,l=d(s),u=1/0,c=[];a--;){var h=e[a];a&&t&&(h=Ot(h,Qt(t))),u=wn(h.length,u),l[a]=!i&&(t||o>=120&&h.length>=120)?new Yn(a&&h):n}h=e[0];var f=-1,g=l[0];e:for(;++f=a?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}))}function Zi(e,t,n){for(var i=-1,r=t.length,o={};++i-1;)a!==e&&Ye.call(a,l,1),Ye.call(e,l,1);return e}function Ui(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==o){var o=r;wo(r)?Ye.call(e,r,1):dr(e,r)}}return e}function Yi(e,t){return e+pt(xn()*(t-e+1))}function Ji(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Ki(e,t){return Oo(ko(e,t,ol),e+"")}function Qi(e){return Qn(Ha(e))}function qi(e,t){var n=Ha(e);return Fo(n,li(t,0,n.length))}function er(e,t,i,r){if(!na(e))return e;for(var o=-1,s=(t=wr(t,e)).length,a=s-1,l=e;null!=l&&++or?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=d(r);++i>>1,s=e[o];null!==s&&!ca(s)&&(n?s<=t:s=200){var u=t?null:Jr(e);if(u)return dn(u);s=!1,r=en,l=new Yn}else l=t?[]:a;e:for(;++i=r?e:rr(e,t,i)}var xr=it||function(e){return gt.clearTimeout(e)};function Ar(e,t){if(t)return e.slice();var n=e.length,i=je?je(n):new e.constructor(n);return e.copy(i),i}function Er(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function Rr(e,t){var n=t?Er(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ir(e,t){if(e!==t){var i=e!==n,r=null===e,o=e==e,s=ca(e),a=t!==n,l=null===t,u=t==t,c=ca(t);if(!l&&!c&&!s&&e>t||s&&a&&u&&!l&&!c||r&&a&&u||!i&&u||!o)return 1;if(!r&&!s&&!c&&e1?i[o-1]:n,a=o>2?i[2]:n;for(s=e.length>3&&"function"==typeof s?(o--,s):n,a&&Co(i[0],i[1],a)&&(s=o<3?n:s,o=1),t=Re(t);++r-1?o[s?t[a]:a]:n}}function Dr(e){return io((function(t){var r=t.length,o=r,s=zn.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new $e(i);if(s&&!l&&"wrapper"==ao(a))var l=new zn([],!0)}for(o=l?o:r;++o1&&y.reverse(),f&&cl))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var d=-1,f=!0,g=2&i?new Yn:n;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return kt(m,(function(n){var i="_."+n[0];t&n[1]&&!Tt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(i),n)))}function Bo(e){var t=0,i=0;return function(){var r=Cn(),o=16-(r-i);if(i=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Fo(e,t){var i=-1,r=e.length,o=r-1;for(t=t===n?r:t;++i1?e[t-1]:n;return i="function"==typeof i?(e.pop(),i):n,as(e,i)}));function gs(e){var t=Gn(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ms=io((function(e){var t=e.length,i=t?e[0]:0,r=this.__wrapped__,o=function(t){return ai(t,e)};return!(t>1||this.__actions__.length)&&r instanceof jn&&wo(i)?((r=r.slice(i,+i+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:n}),new zn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var vs=Tr((function(e,t,n){Ne.call(e,n)?++e[n]:si(e,n,1)}));var bs=Wr(jo),ys=Wr(Zo);function ws(e,t){return(Zs(e)?kt:fi)(e,uo(t,3))}function Cs(e,t){return(Zs(e)?$t:gi)(e,uo(t,3))}var Ss=Tr((function(e,t,n){Ne.call(e,n)?e[n].push(t):si(e,n,[t])}));var xs=Ki((function(e,t,n){var i=-1,r="function"==typeof t,o=Us(e)?d(e.length):[];return fi(e,(function(e){o[++i]=r?Rt(t,e,n):_i(e,t,n)})),o})),As=Tr((function(e,t,n){si(e,n,t)}));function Es(e,t){return(Zs(e)?Ot:Di)(e,uo(t,3))}var Rs=Tr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Is=Ki((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Co(e,t[0],t[1])?t=[]:n>2&&Co(t[0],t[1],t[2])&&(t=[t[0]]),ji(e,bi(t,1),[])})),ks=ut||function(){return gt.Date.now()};function $s(e,t,i){return t=i?n:t,t=e&&null==t?e.length:t,Qr(e,u,n,n,n,n,t)}function Ls(e,t){var r;if("function"!=typeof t)throw new $e(i);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var _s=Ki((function(e,t,n){var i=1;if(n.length){var r=hn(n,lo(_s));i|=a}return Qr(e,i,t,n,r)})),Ts=Ki((function(e,t,n){var i=3;if(n.length){var r=hn(n,lo(Ts));i|=a}return Qr(t,i,e,n,r)}));function Ms(e,t,r){var o,s,a,l,u,c,h=0,d=!1,f=!1,g=!0;if("function"!=typeof e)throw new $e(i);function p(t){var i=o,r=s;return o=s=n,h=t,l=e.apply(r,i)}function m(e){return h=e,u=Mo(b,t),d?p(e):l}function v(e){var i=e-c;return c===n||i>=t||i<0||f&&e-h>=a}function b(){var e=ks();if(v(e))return y(e);u=Mo(b,function(e){var n=t-(e-c);return f?wn(n,a-(e-h)):n}(e))}function y(e){return u=n,g&&o?p(e):(o=s=n,l)}function w(){var e=ks(),i=v(e);if(o=arguments,s=this,c=e,i){if(u===n)return m(c);if(f)return xr(u),u=Mo(b,t),p(c)}return u===n&&(u=Mo(b,t)),l}return t=ba(t)||0,na(r)&&(d=!!r.leading,a=(f="maxWait"in r)?yn(ba(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g),w.cancel=function(){u!==n&&xr(u),h=0,o=c=s=u=n},w.flush=function(){return u===n?l:y(ks())},w}var Os=Ki((function(e,t){return hi(e,1,t)})),Ns=Ki((function(e,t,n){return hi(e,ba(t)||0,n)}));function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new $e(i);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=e.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Bs.Cache||Un),n}function Fs(e){if("function"!=typeof e)throw new $e(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bs.Cache=Un;var Ps=Cr((function(e,t){var n=(t=1==t.length&&Zs(t[0])?Ot(t[0],Qt(uo())):Ot(bi(t,1),Qt(uo()))).length;return Ki((function(i){for(var r=-1,o=wn(i.length,n);++r=t})),js=Ti(function(){return arguments}())?Ti:function(e){return ia(e)&&Ne.call(e,"callee")&&!Ue.call(e,"callee")},Zs=d.isArray,Xs=wt?Qt(wt):function(e){return ia(e)&&Ri(e)==M};function Us(e){return null!=e&&ta(e.length)&&!qs(e)}function Ys(e){return ia(e)&&Us(e)}var Js=bt||bl,Ks=Ct?Qt(Ct):function(e){return ia(e)&&Ri(e)==w};function Qs(e){if(!ia(e))return!1;var t=Ri(e);return t==C||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function qs(e){if(!na(e))return!1;var t=Ri(e);return t==S||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ea(e){return"number"==typeof e&&e==ma(e)}function ta(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ia(e){return null!=e&&"object"==typeof e}var ra=St?Qt(St):function(e){return ia(e)&&mo(e)==A};function oa(e){return"number"==typeof e||ia(e)&&Ri(e)==E}function sa(e){if(!ia(e)||Ri(e)!=R)return!1;var t=Ze(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==We}var aa=xt?Qt(xt):function(e){return ia(e)&&Ri(e)==k};var la=At?Qt(At):function(e){return ia(e)&&mo(e)==$};function ua(e){return"string"==typeof e||!Zs(e)&&ia(e)&&Ri(e)==L}function ca(e){return"symbol"==typeof e||ia(e)&&Ri(e)==_}var ha=Et?Qt(Et):function(e){return ia(e)&&ta(e.length)&&!!at[Ri(e)]};var da=Xr(Wi),fa=Xr((function(e,t){return e<=t}));function ga(e){if(!e)return[];if(Us(e))return ua(e)?pn(e):Lr(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=mo(e);return(t==A?un:t==$?dn:Ha)(e)}function pa(e){return e?(e=ba(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function va(e){return e?li(ma(e),0,p):0}function ba(e){if("number"==typeof e)return e;if(ca(e))return g;if(na(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=na(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=me.test(e);return n||be.test(e)?ht(e.slice(2),n?2:8):pe.test(e)?g:+e}function ya(e){return _r(e,Oa(e))}function wa(e){return null==e?"":cr(e)}var Ca=Mr((function(e,t){if(Eo(t)||Us(t))_r(t,Ma(t),e);else for(var n in t)Ne.call(t,n)&&ni(e,n,t[n])})),Sa=Mr((function(e,t){_r(t,Oa(t),e)})),xa=Mr((function(e,t,n,i){_r(t,Oa(t),e,i)})),Aa=Mr((function(e,t,n,i){_r(t,Ma(t),e,i)})),Ea=io(ai);var Ra=Ki((function(e,t){e=Re(e);var i=-1,r=t.length,o=r>2?t[2]:n;for(o&&Co(t[0],t[1],o)&&(r=1);++i1),t})),_r(e,oo(e),n),i&&(n=ui(n,7,to));for(var r=t.length;r--;)dr(n,t[r]);return n}));var Pa=io((function(e,t){return null==e?{}:function(e,t){return Zi(e,t,(function(t,n){return $a(e,n)}))}(e,t)}));function Wa(e,t){if(null==e)return{};var n=Ot(oo(e),(function(e){return[e]}));return t=uo(t),Zi(e,n,(function(e,n){return t(e,n[0])}))}var Da=Kr(Ma),Ga=Kr(Oa);function Ha(e){return null==e?[]:qt(e,Ma(e))}var Va=Fr((function(e,t,n){return t=t.toLowerCase(),e+(n?za(t):t)}));function za(e){return Qa(wa(e).toLowerCase())}function ja(e){return(e=wa(e))&&e.replace(we,on).replace(et,"")}var Za=Fr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Xa=Fr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ua=Br("toLowerCase");var Ya=Fr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ja=Fr((function(e,t,n){return e+(n?" ":"")+Qa(t)}));var Ka=Fr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Br("toUpperCase");function qa(e,t,i){return e=wa(e),(t=i?n:t)===n?function(e){return rt.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var el=Ki((function(e,t){try{return Rt(e,n,t)}catch(e){return Qs(e)?e:new xe(e)}})),tl=io((function(e,t){return kt(t,(function(t){t=Wo(t),si(e,t,_s(e[t],e))})),e}));function nl(e){return function(){return e}}var il=Dr(),rl=Dr(!0);function ol(e){return e}function sl(e){return Bi("function"==typeof e?e:ui(e,1))}var al=Ki((function(e,t){return function(n){return _i(n,e,t)}})),ll=Ki((function(e,t){return function(n){return _i(e,n,t)}}));function ul(e,t,n){var i=Ma(t),r=xi(t,i);null!=n||na(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=xi(t,Ma(t)));var o=!(na(n)&&"chain"in n&&!n.chain),s=qs(e);return kt(r,(function(n){var i=t[n];e[n]=i,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),r=n.__actions__=Lr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Nt([this.value()],arguments))})})),e}function cl(){}var hl=zr(Ot),dl=zr(Lt),fl=zr(Pt);function gl(e){return So(e)?Zt(Wo(e)):function(e){return function(t){return Ai(t,e)}}(e)}var pl=Zr(),ml=Zr(!0);function vl(){return[]}function bl(){return!1}var yl=Vr((function(e,t){return e+t}),0),wl=Yr("ceil"),Cl=Vr((function(e,t){return e/t}),1),Sl=Yr("floor");var xl,Al=Vr((function(e,t){return e*t}),1),El=Yr("round"),Rl=Vr((function(e,t){return e-t}),0);return Gn.after=function(e,t){if("function"!=typeof t)throw new $e(i);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Gn.ary=$s,Gn.assign=Ca,Gn.assignIn=Sa,Gn.assignInWith=xa,Gn.assignWith=Aa,Gn.at=Ea,Gn.before=Ls,Gn.bind=_s,Gn.bindAll=tl,Gn.bindKey=Ts,Gn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Zs(e)?e:[e]},Gn.chain=gs,Gn.chunk=function(e,t,i){t=(i?Co(e,t,i):t===n)?1:yn(ma(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,s=0,a=d(ft(r/t));oo?0:o+i),(r=r===n||r>o?o:ma(r))<0&&(r+=o),r=i>r?0:va(r);i>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!aa(t))&&!(t=cr(t))&&ln(e)?Sr(pn(e),0,i):e.split(t,i):[]},Gn.spread=function(e,t){if("function"!=typeof e)throw new $e(i);return t=null==t?0:yn(ma(t),0),Ki((function(n){var i=n[t],r=Sr(n,0,t);return i&&Nt(r,i),Rt(e,this,r)}))},Gn.tail=function(e){var t=null==e?0:e.length;return t?rr(e,1,t):[]},Gn.take=function(e,t,i){return e&&e.length?rr(e,0,(t=i||t===n?1:ma(t))<0?0:t):[]},Gn.takeRight=function(e,t,i){var r=null==e?0:e.length;return r?rr(e,(t=r-(t=i||t===n?1:ma(t)))<0?0:t,r):[]},Gn.takeRightWhile=function(e,t){return e&&e.length?gr(e,uo(t,3),!1,!0):[]},Gn.takeWhile=function(e,t){return e&&e.length?gr(e,uo(t,3)):[]},Gn.tap=function(e,t){return t(e),e},Gn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new $e(i);return na(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ms(e,t,{leading:r,maxWait:t,trailing:o})},Gn.thru=ps,Gn.toArray=ga,Gn.toPairs=Da,Gn.toPairsIn=Ga,Gn.toPath=function(e){return Zs(e)?Ot(e,Wo):ca(e)?[e]:Lr(Po(wa(e)))},Gn.toPlainObject=ya,Gn.transform=function(e,t,n){var i=Zs(e),r=i||Js(e)||ha(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=r?i?new o:[]:na(e)&&qs(o)?Hn(Ze(e)):{}}return(r?kt:Ci)(e,(function(e,i,r){return t(n,e,i,r)})),n},Gn.unary=function(e){return $s(e,1)},Gn.union=is,Gn.unionBy=rs,Gn.unionWith=os,Gn.uniq=function(e){return e&&e.length?hr(e):[]},Gn.uniqBy=function(e,t){return e&&e.length?hr(e,uo(t,2)):[]},Gn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?hr(e,n,t):[]},Gn.unset=function(e,t){return null==e||dr(e,t)},Gn.unzip=ss,Gn.unzipWith=as,Gn.update=function(e,t,n){return null==e?e:fr(e,t,yr(n))},Gn.updateWith=function(e,t,i,r){return r="function"==typeof r?r:n,null==e?e:fr(e,t,yr(i),r)},Gn.values=Ha,Gn.valuesIn=function(e){return null==e?[]:qt(e,Oa(e))},Gn.without=ls,Gn.words=qa,Gn.wrap=function(e,t){return Ws(yr(t),e)},Gn.xor=us,Gn.xorBy=cs,Gn.xorWith=hs,Gn.zip=ds,Gn.zipObject=function(e,t){return vr(e||[],t||[],ni)},Gn.zipObjectDeep=function(e,t){return vr(e||[],t||[],er)},Gn.zipWith=fs,Gn.entries=Da,Gn.entriesIn=Ga,Gn.extend=Sa,Gn.extendWith=xa,ul(Gn,Gn),Gn.add=yl,Gn.attempt=el,Gn.camelCase=Va,Gn.capitalize=za,Gn.ceil=wl,Gn.clamp=function(e,t,i){return i===n&&(i=t,t=n),i!==n&&(i=(i=ba(i))==i?i:0),t!==n&&(t=(t=ba(t))==t?t:0),li(ba(e),t,i)},Gn.clone=function(e){return ui(e,4)},Gn.cloneDeep=function(e){return ui(e,5)},Gn.cloneDeepWith=function(e,t){return ui(e,5,t="function"==typeof t?t:n)},Gn.cloneWith=function(e,t){return ui(e,4,t="function"==typeof t?t:n)},Gn.conformsTo=function(e,t){return null==t||ci(e,t,Ma(t))},Gn.deburr=ja,Gn.defaultTo=function(e,t){return null==e||e!=e?t:e},Gn.divide=Cl,Gn.endsWith=function(e,t,i){e=wa(e),t=cr(t);var r=e.length,o=i=i===n?r:li(ma(i),0,r);return(i-=t.length)>=0&&e.slice(i,o)==t},Gn.eq=Hs,Gn.escape=function(e){return(e=wa(e))&&J.test(e)?e.replace(U,sn):e},Gn.escapeRegExp=function(e){return(e=wa(e))&&re.test(e)?e.replace(ie,"\\$&"):e},Gn.every=function(e,t,i){var r=Zs(e)?Lt:pi;return i&&Co(e,t,i)&&(t=n),r(e,uo(t,3))},Gn.find=bs,Gn.findIndex=jo,Gn.findKey=function(e,t){return Dt(e,uo(t,3),Ci)},Gn.findLast=ys,Gn.findLastIndex=Zo,Gn.findLastKey=function(e,t){return Dt(e,uo(t,3),Si)},Gn.floor=Sl,Gn.forEach=ws,Gn.forEachRight=Cs,Gn.forIn=function(e,t){return null==e?e:yi(e,uo(t,3),Oa)},Gn.forInRight=function(e,t){return null==e?e:wi(e,uo(t,3),Oa)},Gn.forOwn=function(e,t){return e&&Ci(e,uo(t,3))},Gn.forOwnRight=function(e,t){return e&&Si(e,uo(t,3))},Gn.get=ka,Gn.gt=Vs,Gn.gte=zs,Gn.has=function(e,t){return null!=e&&vo(e,t,ki)},Gn.hasIn=$a,Gn.head=Uo,Gn.identity=ol,Gn.includes=function(e,t,n,i){e=Us(e)?e:Ha(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=yn(r+n,0)),ua(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Ht(e,t,n)>-1},Gn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=yn(i+r,0)),Ht(e,t,r)},Gn.inRange=function(e,t,i){return t=pa(t),i===n?(i=t,t=0):i=pa(i),function(e,t,n){return e>=wn(t,n)&&e=-9007199254740991&&e<=f},Gn.isSet=la,Gn.isString=ua,Gn.isSymbol=ca,Gn.isTypedArray=ha,Gn.isUndefined=function(e){return e===n},Gn.isWeakMap=function(e){return ia(e)&&mo(e)==T},Gn.isWeakSet=function(e){return ia(e)&&"[object WeakSet]"==Ri(e)},Gn.join=function(e,t){return null==e?"":Wt.call(e,t)},Gn.kebabCase=Za,Gn.last=Qo,Gn.lastIndexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var o=r;return i!==n&&(o=(o=ma(i))<0?yn(r+o,0):wn(o,r-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Gt(e,zt,o,!0)},Gn.lowerCase=Xa,Gn.lowerFirst=Ua,Gn.lt=da,Gn.lte=fa,Gn.max=function(e){return e&&e.length?mi(e,ol,Ii):n},Gn.maxBy=function(e,t){return e&&e.length?mi(e,uo(t,2),Ii):n},Gn.mean=function(e){return jt(e,ol)},Gn.meanBy=function(e,t){return jt(e,uo(t,2))},Gn.min=function(e){return e&&e.length?mi(e,ol,Wi):n},Gn.minBy=function(e,t){return e&&e.length?mi(e,uo(t,2),Wi):n},Gn.stubArray=vl,Gn.stubFalse=bl,Gn.stubObject=function(){return{}},Gn.stubString=function(){return""},Gn.stubTrue=function(){return!0},Gn.multiply=Al,Gn.nth=function(e,t){return e&&e.length?zi(e,ma(t)):n},Gn.noConflict=function(){return gt._===this&&(gt._=De),this},Gn.noop=cl,Gn.now=ks,Gn.pad=function(e,t,n){e=wa(e);var i=(t=ma(t))?gn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return jr(pt(r),n)+e+jr(ft(r),n)},Gn.padEnd=function(e,t,n){e=wa(e);var i=(t=ma(t))?gn(e):0;return t&&it){var r=e;e=t,t=r}if(i||e%1||t%1){var o=xn();return wn(e+o*(t-e+ct("1e-"+((o+"").length-1))),t)}return Yi(e,t)},Gn.reduce=function(e,t,n){var i=Zs(e)?Bt:Ut,r=arguments.length<3;return i(e,uo(t,4),n,r,fi)},Gn.reduceRight=function(e,t,n){var i=Zs(e)?Ft:Ut,r=arguments.length<3;return i(e,uo(t,4),n,r,gi)},Gn.repeat=function(e,t,i){return t=(i?Co(e,t,i):t===n)?1:ma(t),Ji(wa(e),t)},Gn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Gn.result=function(e,t,i){var r=-1,o=(t=wr(t,e)).length;for(o||(o=1,e=n);++rf)return[];var n=p,i=wn(e,p);t=uo(t),e-=p;for(var r=Jt(i,t);++n=s)return e;var l=i-gn(r);if(l<1)return r;var u=a?Sr(a,0,l).join(""):e.slice(0,l);if(o===n)return u+r;if(a&&(l+=u.length-l),aa(o)){if(e.slice(l).search(o)){var c,h=u;for(o.global||(o=Ie(o.source,wa(ge.exec(o))+"g")),o.lastIndex=0;c=o.exec(h);)var d=c.index;u=u.slice(0,d===n?l:d)}}else if(e.indexOf(cr(o),l)!=l){var f=u.lastIndexOf(o);f>-1&&(u=u.slice(0,f))}return u+r},Gn.unescape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(X,vn):e},Gn.uniqueId=function(e){var t=++Be;return wa(e)+t},Gn.upperCase=Ka,Gn.upperFirst=Qa,Gn.each=ws,Gn.eachRight=Cs,Gn.first=Uo,ul(Gn,(xl={},Ci(Gn,(function(e,t){Ne.call(Gn.prototype,t)||(xl[t]=e)})),xl),{chain:!1}),Gn.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Gn[e].placeholder=Gn})),kt(["drop","take"],(function(e,t){jn.prototype[e]=function(i){i=i===n?1:yn(ma(i),0);var r=this.__filtered__&&!t?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(i,r.__takeCount__):r.__views__.push({size:wn(i,p),type:e+(r.__dir__<0?"Right":"")}),r},jn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),kt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;jn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),kt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");jn.prototype[e]=function(){return this[n](1).value()[0]}})),kt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");jn.prototype[e]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(ol)},jn.prototype.find=function(e){return this.filter(e).head()},jn.prototype.findLast=function(e){return this.reverse().find(e)},jn.prototype.invokeMap=Ki((function(e,t){return"function"==typeof e?new jn(this):this.map((function(n){return _i(n,e,t)}))})),jn.prototype.reject=function(e){return this.filter(Fs(uo(e)))},jn.prototype.slice=function(e,t){e=ma(e);var i=this;return i.__filtered__&&(e>0||t<0)?new jn(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==n&&(i=(t=ma(t))<0?i.dropRight(-t):i.take(t-e)),i)},jn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},jn.prototype.toArray=function(){return this.take(p)},Ci(jn.prototype,(function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Gn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Gn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof jn,u=a[0],c=l||Zs(t),h=function(e){var t=o.apply(Gn,Nt([e],a));return r&&d?t[0]:t};c&&i&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,f=!!this.__actions__.length,g=s&&!d,p=l&&!f;if(!s&&c){t=p?t:new jn(this);var m=e.apply(t,a);return m.__actions__.push({func:ps,args:[h],thisArg:n}),new zn(m,d)}return g&&p?e.apply(this,a):(m=this.thru(h),g?r?m.value()[0]:m.value():m)})})),kt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Le[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);Gn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Zs(r)?r:[],e)}return this[n]((function(n){return t.apply(Zs(n)?n:[],e)}))}})),Ci(jn.prototype,(function(e,t){var n=Gn[t];if(n){var i=n.name+"";Ne.call(Tn,i)||(Tn[i]=[]),Tn[i].push({name:t,func:n})}})),Tn[Gr(n,2).name]=[{name:"wrapper",func:n}],jn.prototype.clone=function(){var e=new jn(this.__wrapped__);return e.__actions__=Lr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Lr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Lr(this.__views__),e},jn.prototype.reverse=function(){if(this.__filtered__){var e=new jn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},jn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Zs(e),i=t<0,r=n?e.length:0,o=function(e,t,n){var i=-1,r=n.length;for(;++i=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Gn.prototype.plant=function(e){for(var t,i=this;i instanceof Vn;){var r=Go(i);r.__index__=0,r.__values__=n,t?o.__wrapped__=r:t=r;var o=r;i=i.__wrapped__}return o.__wrapped__=e,t},Gn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof jn){var t=e;return this.__actions__.length&&(t=new jn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ns],thisArg:n}),new zn(t,this.__chain__)}return this.thru(ns)},Gn.prototype.toJSON=Gn.prototype.valueOf=Gn.prototype.value=function(){return pr(this.__wrapped__,this.__actions__)},Gn.prototype.first=Gn.prototype.head,Ke&&(Gn.prototype[Ke]=function(){return this}),Gn}();mt?((mt.exports=bn)._=bn,pt._=bn):gt._=bn}).call(d)}(hg,hg.exports);var dg,fg,gg=hg.exports; +/** + * @remix-run/router v1.3.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function yg(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function wg(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function Cg(e,t,n,i){let r;void 0===i&&(i=!1),"string"==typeof e?r=bg(e):(r=pg({},e),mg(!r.pathname||!r.pathname.includes("?"),yg("?","pathname","search",r)),mg(!r.pathname||!r.pathname.includes("#"),yg("#","pathname","hash",r)),mg(!r.search||!r.search.includes("#"),yg("#","search","hash",r)));let o,s=""===e||""===r.pathname,a=s?"/":r.pathname;if(i||null==a)o=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:i="",hash:r=""}="string"==typeof e?bg(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:xg(i),hash:Ag(r)}}(r,o),u=a&&"/"!==a&&a.endsWith("/"),c=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(dg||(dg={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(fg||(fg={}));const Sg=e=>e.join("/").replace(/\/\/+/g,"/"),xg=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ag=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Eg="function"==typeof Object.is?Object.is: +/** + * React Router v6.8.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:Rg,useEffect:Ig,useLayoutEffect:kg,useDebugValue:$g}=o;let Lg=!1,_g=!1;function Tg(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Eg(n,e)}catch(e){return!0}}"undefined"==typeof window||void 0===window.document||window.document.createElement;"useSyncExternalStore"in o&&o.useSyncExternalStore;const Mg=o.createContext(null);"production"!==process.env.NODE_ENV&&(Mg.displayName="DataRouter");const Og=o.createContext(null);"production"!==process.env.NODE_ENV&&(Og.displayName="DataRouterState");const Ng=o.createContext(null);"production"!==process.env.NODE_ENV&&(Ng.displayName="Await");const Bg=o.createContext(null);"production"!==process.env.NODE_ENV&&(Bg.displayName="Navigation");const Fg=o.createContext(null);"production"!==process.env.NODE_ENV&&(Fg.displayName="Location");const Pg=o.createContext({outlet:null,matches:[]});"production"!==process.env.NODE_ENV&&(Pg.displayName="Route");const Wg=o.createContext(null);function Dg(){return null!=o.useContext(Fg)}function Gg(){return Dg()||("production"!==process.env.NODE_ENV?mg(!1,"useLocation() may be used only in the context of a component."):mg(!1)),o.useContext(Fg).location}function Hg(){Dg()||("production"!==process.env.NODE_ENV?mg(!1,"useNavigate() may be used only in the context of a component."):mg(!1));let{basename:e,navigator:t}=o.useContext(Bg),{matches:n}=o.useContext(Pg),{pathname:i}=Gg(),r=JSON.stringify(wg(n).map((e=>e.pathnameBase))),s=o.useRef(!1);o.useEffect((()=>{s.current=!0}));let a=o.useCallback((function(n,o){if(void 0===o&&(o={}),"production"!==process.env.NODE_ENV&&function(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}(s.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!s.current)return;if("number"==typeof n)return void t.go(n);let a=Cg(n,JSON.parse(r),i,"path"===o.relative);"/"!==e&&(a.pathname="/"===a.pathname?e:Sg([e,a.pathname])),(o.replace?t.replace:t.push)(a,o.state,o)}),[e,t,r,i]);return a}function Vg(e,t){let{relative:n}=void 0===t?{}:t,{matches:i}=o.useContext(Pg),{pathname:r}=Gg(),s=JSON.stringify(wg(i).map((e=>e.pathnameBase)));return o.useMemo((()=>Cg(e,JSON.parse(s),r,"path"===n)),[e,s,r,n])}var zg,jg,Zg; +/** + * React Router DOM v6.8.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +function Xg(){return Xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}"production"!==process.env.NODE_ENV&&(Wg.displayName="RouteError"),function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"}(zg||(zg={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(jg||(jg={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Zg||(Zg={})),new Promise((()=>{}));const Yg="get",Jg="application/x-www-form-urlencoded";function Kg(e){return null!=e&&"string"==typeof e.tagName}function Qg(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let i=e[n];return t.concat(Array.isArray(i)?i.map((e=>[n,e])):[[n,i]])}),[]))}function qg(e,t,n){let i,r,o,s;if(Kg(a=e)&&"form"===a.tagName.toLowerCase()){let a=n.submissionTrigger;i=n.method||e.getAttribute("method")||Yg,r=n.action||e.getAttribute("action")||t,o=n.encType||e.getAttribute("enctype")||Jg,s=new FormData(e),a&&a.name&&s.append(a.name,a.value)}else if(function(e){return Kg(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Kg(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a