(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerpolicy&&(s.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?s.credentials="include":r.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();/**
* @vue/shared v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Cs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const et={},po=[],Zn=()=>{},KC=()=>!1,ul=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),zf=e=>e.startsWith("onUpdate:"),Et=Object.assign,Wf=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},YC=Object.prototype.hasOwnProperty,st=(e,t)=>YC.call(e,t),Le=Array.isArray,go=e=>Vo(e)==="[object Map]",xs=e=>Vo(e)==="[object Set]",om=e=>Vo(e)==="[object Date]",XC=e=>Vo(e)==="[object RegExp]",Ne=e=>typeof e=="function",ut=e=>typeof e=="string",Fi=e=>typeof e=="symbol",gt=e=>e!==null&&typeof e=="object",Vf=e=>(gt(e)||Ne(e))&&Ne(e.then)&&Ne(e.catch),Cb=Object.prototype.toString,Vo=e=>Cb.call(e),JC=e=>Vo(e).slice(8,-1),ds=e=>Vo(e)==="[object Object]",jf=e=>ut(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mo=Cs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_u=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},QC=/-(\w)/g,Mn=_u(e=>e.replace(QC,(t,n)=>n?n.toUpperCase():"")),ZC=/\B([A-Z])/g,An=_u(e=>e.replace(ZC,"-$1").toLowerCase()),bu=_u(e=>e.charAt(0).toUpperCase()+e.slice(1)),mc=_u(e=>e?`on${bu(e)}`:""),Tn=(e,t)=>!Object.is(e,t),vo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},xb=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},Lc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Oc=e=>{const t=ut(e)?Number(e):NaN;return isNaN(t)?e:t};let am;const Gf=()=>am||(am=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),ex="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",tx=Cs(ex);function Nt(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],r=ut(i)?sx(i):Nt(i);if(r)for(const s in r)t[s]=r[s]}return t}else if(ut(e)||gt(e))return e}const nx=/;(?![^(]*\))/g,ix=/:([^]+)/,rx=/\/\*[^]*?\*\//g;function sx(e){const t={};return e.replace(rx,"").split(nx).forEach(n=>{if(n){const i=n.split(ix);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function ox(e){let t="";if(!e||ut(e))return t;for(const n in e){const i=e[n];if(ut(i)||typeof i=="number"){const r=n.startsWith("--")?n:An(n);t+=`${r}:${i};`}}return t}function Ge(e){let t="";if(ut(e))t=e;else if(Le(e))for(let n=0;n<e.length;n++){const i=Ge(e[n]);i&&(t+=i+" ")}else if(gt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Ed(e){if(!e)return null;let{class:t,style:n}=e;return t&&!ut(t)&&(e.class=Ge(t)),n&&(e.style=Nt(n)),e}const Mb="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ax=Cs(Mb),lm=Cs(Mb+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function qf(e){return!!e||e===""}const lx=Cs("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),cx=Cs("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan");function ux(e){if(e==null)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"}const hx=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function dx(e,t){return e.replace(hx,n=>t?n==='"'?'\\\\\\"':`\\\\${n}`:`\\${n}`)}function fx(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=zr(e[i],t[i]);return n}function zr(e,t){if(e===t)return!0;let n=om(e),i=om(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=Fi(e),i=Fi(t),n||i)return e===t;if(n=Le(e),i=Le(t),n||i)return n&&i?fx(e,t):!1;if(n=gt(e),i=gt(t),n||i){if(!n||!i)return!1;const r=Object.keys(e).length,s=Object.keys(t).length;if(r!==s)return!1;for(const o in e){const u=e.hasOwnProperty(o),a=t.hasOwnProperty(o);if(u&&!a||!u&&a||!zr(e[o],t[o]))return!1}}return String(e)===String(t)}function wu(e,t){return e.findIndex(n=>zr(n,t))}const kb=e=>!!(e&&e.__v_isRef===!0),$e=e=>ut(e)?e:e==null?"":Le(e)||gt(e)&&(e.toString===Cb||!Ne(e.toString))?kb(e)?$e(e.value):JSON.stringify(e,$b,2):String(e),$b=(e,t)=>kb(t)?$b(e,t.value):go(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,r],s)=>(n[Sh(i,s)+" =>"]=r,n),{})}:xs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Sh(n))}:Fi(t)?Sh(t):gt(t)&&!Le(t)&&!ds(t)?String(t):t,Sh=(e,t="")=>{var n;return Fi(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let wn;class Ib{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=wn,!t&&wn&&(this.index=(wn.scopes||(wn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=wn;try{return wn=this,t()}finally{wn=n}}}on(){wn=this}off(){wn=this.parent}stop(t){if(this._active){let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.scopes)for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function Rb(e){return new Ib(e)}function px(){return wn}function AQ(e,t=!1){wn&&wn.cleanups.push(e)}let vt;const Th=new WeakSet;class Pc{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,wn&&wn.active&&wn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Th.has(this)&&(Th.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ob(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,cm(this),Pb(this);const t=vt,n=fi;vt=this,fi=!0;try{return this.fn()}finally{Nb(this),vt=t,fi=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Xf(t);this.deps=this.depsTail=void 0,cm(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Th.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ad(this)&&this.run()}get dirty(){return Ad(this)}}let Lb=0,xa;function Ob(e){e.flags|=8,e.next=xa,xa=e}function Kf(){Lb++}function Yf(){if(--Lb>0)return;let e;for(;xa;){let t=xa;for(xa=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function Pb(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Nb(e,t=!1){let n,i=e.depsTail,r=i;for(;r;){const s=r.prevDep;r.version===-1?(r===i&&(i=s),Xf(r,t),gx(r)):n=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=n,e.depsTail=i}function Ad(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Db(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Db(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ua))return;e.globalVersion=Ua;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ad(e)){e.flags&=-3;return}const n=vt,i=fi;vt=e,fi=!0;try{Pb(e);const r=e.fn(e._value);(t.version===0||Tn(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{vt=n,fi=i,Nb(e,!0),e.flags&=-3}}function Xf(e,t=!1){const{dep:n,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i),!n.subs)if(n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Xf(s,!0)}else n.map&&!t&&(n.map.delete(n.key),n.map.size||za.delete(n.target))}function gx(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function CQ(e,t){e.effect instanceof Pc&&(e=e.effect.fn);const n=new Pc(e);t&&Et(n,t);try{n.run()}catch(r){throw n.stop(),r}const i=n.run.bind(n);return i.effect=n,i}function xQ(e){e.effect.stop()}let fi=!0;const Fb=[];function lr(){Fb.push(fi),fi=!1}function cr(){const e=Fb.pop();fi=e===void 0?!0:e}function cm(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=vt;vt=void 0;try{t()}finally{vt=n}}}let Ua=0;class mx{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Su{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.target=void 0,this.map=void 0,this.key=void 0}track(t){if(!vt||!fi||vt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==vt)n=this.activeLink=new mx(vt,this),vt.deps?(n.prevDep=vt.depsTail,vt.depsTail.nextDep=n,vt.depsTail=n):vt.deps=vt.depsTail=n,vt.flags&4&&Bb(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=vt.depsTail,n.nextDep=void 0,vt.depsTail.nextDep=n,vt.depsTail=n,vt.deps===n&&(vt.deps=i)}return n}trigger(t){this.version++,Ua++,this.notify(t)}notify(t){Kf();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Yf()}}}function Bb(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Bb(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}const za=new WeakMap,fs=Symbol(""),Cd=Symbol(""),Wa=Symbol("");function fn(e,t,n){if(fi&&vt){let i=za.get(e);i||za.set(e,i=new Map);let r=i.get(n);r||(i.set(n,r=new Su),r.target=e,r.map=i,r.key=n),r.track()}}function rr(e,t,n,i,r,s){const o=za.get(e);if(!o){Ua++;return}const u=a=>{a&&a.trigger()};if(Kf(),t==="clear")o.forEach(u);else{const a=Le(e),h=a&&jf(n);if(a&&n==="length"){const c=Number(i);o.forEach((l,d)=>{(d==="length"||d===Wa||!Fi(d)&&d>=c)&&u(l)})}else switch(n!==void 0&&u(o.get(n)),h&&u(o.get(Wa)),t){case"add":a?h&&u(o.get("length")):(u(o.get(fs)),go(e)&&u(o.get(Cd)));break;case"delete":a||(u(o.get(fs)),go(e)&&u(o.get(Cd)));break;case"set":go(e)&&u(o.get(fs));break}}Yf()}function vx(e,t){var n;return(n=za.get(e))==null?void 0:n.get(t)}function Bs(e){const t=it(e);return t===e?t:(fn(t,"iterate",Wa),ei(e)?t:t.map(hn))}function Tu(e){return fn(e=it(e),"iterate",Wa),e}const yx={__proto__:null,[Symbol.iterator](){return Eh(this,Symbol.iterator,hn)},concat(...e){return Bs(this).concat(...e.map(t=>Le(t)?Bs(t):t))},entries(){return Eh(this,"entries",e=>(e[1]=hn(e[1]),e))},every(e,t){return ji(this,"every",e,t,void 0,arguments)},filter(e,t){return ji(this,"filter",e,t,n=>n.map(hn),arguments)},find(e,t){return ji(this,"find",e,t,hn,arguments)},findIndex(e,t){return ji(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ji(this,"findLast",e,t,hn,arguments)},findLastIndex(e,t){return ji(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ji(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ah(this,"includes",e)},indexOf(...e){return Ah(this,"indexOf",e)},join(e){return Bs(this).join(e)},lastIndexOf(...e){return Ah(this,"lastIndexOf",e)},map(e,t){return ji(this,"map",e,t,void 0,arguments)},pop(){return sa(this,"pop")},push(...e){return sa(this,"push",e)},reduce(e,...t){return um(this,"reduce",e,t)},reduceRight(e,...t){return um(this,"reduceRight",e,t)},shift(){return sa(this,"shift")},some(e,t){return ji(this,"some",e,t,void 0,arguments)},splice(...e){return sa(this,"splice",e)},toReversed(){return Bs(this).toReversed()},toSorted(e){return Bs(this).toSorted(e)},toSpliced(...e){return Bs(this).toSpliced(...e)},unshift(...e){return sa(this,"unshift",e)},values(){return Eh(this,"values",hn)}};function Eh(e,t,n){const i=Tu(e),r=i[t]();return i!==e&&!ei(e)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=n(s.value)),s}),r}const _x=Array.prototype;function ji(e,t,n,i,r,s){const o=Tu(e),u=o!==e&&!ei(e),a=o[t];if(a!==_x[t]){const l=a.apply(e,s);return u?hn(l):l}let h=n;o!==e&&(u?h=function(l,d){return n.call(this,hn(l),d,e)}:n.length>2&&(h=function(l,d){return n.call(this,l,d,e)}));const c=a.call(o,h,i);return u&&r?r(c):c}function um(e,t,n,i){const r=Tu(e);let s=n;return r!==e&&(ei(e)?n.length>3&&(s=function(o,u,a){return n.call(this,o,u,a,e)}):s=function(o,u,a){return n.call(this,o,hn(u),a,e)}),r[t](s,...i)}function Ah(e,t,n){const i=it(e);fn(i,"iterate",Wa);const r=i[t](...n);return(r===-1||r===!1)&&Qf(n[0])?(n[0]=it(n[0]),i[t](...n)):r}function sa(e,t,n=[]){lr(),Kf();const i=it(e)[t].apply(e,n);return Yf(),cr(),i}const bx=Cs("__proto__,__v_isRef,__isVue"),Hb=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fi));function wx(e){Fi(e)||(e=String(e));const t=it(this);return fn(t,"has",e),t.hasOwnProperty(e)}class Ub{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){const r=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(r?s?qb:Gb:s?jb:Vb).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const o=Le(t);if(!r){let a;if(o&&(a=yx[n]))return a;if(n==="hasOwnProperty")return wx}const u=Reflect.get(t,n,Ht(t)?t:i);return(Fi(n)?Hb.has(n):bx(n))||(r||fn(t,"get",n),s)?u:Ht(u)?o&&jf(n)?u:u.value:gt(u)?r?Kb(u):jo(u):u}}class zb extends Ub{constructor(t=!1){super(!1,t)}set(t,n,i,r){let s=t[n];if(!this._isShallow){const a=vs(s);if(!ei(i)&&!vs(i)&&(s=it(s),i=it(i)),!Le(t)&&Ht(s)&&!Ht(i))return a?!1:(s.value=i,!0)}const o=Le(t)&&jf(n)?Number(n)<t.length:st(t,n),u=Reflect.set(t,n,i,Ht(t)?t:r);return t===it(r)&&(o?Tn(i,s)&&rr(t,"set",n,i):rr(t,"add",n,i)),u}deleteProperty(t,n){const i=st(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&i&&rr(t,"delete",n,void 0),r}has(t,n){const i=Reflect.has(t,n);return(!Fi(n)||!Hb.has(n))&&fn(t,"has",n),i}ownKeys(t){return fn(t,"iterate",Le(t)?"length":fs),Reflect.ownKeys(t)}}class Wb extends Ub{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Sx=new zb,Tx=new Wb,Ex=new zb(!0),Ax=new Wb(!0),Jf=e=>e,Eu=e=>Reflect.getPrototypeOf(e);function Pl(e,t,n=!1,i=!1){e=e.__v_raw;const r=it(e),s=it(t);n||(Tn(t,s)&&fn(r,"get",t),fn(r,"get",s));const{has:o}=Eu(r),u=i?Jf:n?Zf:hn;if(o.call(r,t))return u(e.get(t));if(o.call(r,s))return u(e.get(s));e!==r&&e.get(t)}function Nl(e,t=!1){const n=this.__v_raw,i=it(n),r=it(e);return t||(Tn(e,r)&&fn(i,"has",e),fn(i,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Dl(e,t=!1){return e=e.__v_raw,!t&&fn(it(e),"iterate",fs),Reflect.get(e,"size",e)}function hm(e,t=!1){!t&&!ei(e)&&!vs(e)&&(e=it(e));const n=it(this);return Eu(n).has.call(n,e)||(n.add(e),rr(n,"add",e,e)),this}function dm(e,t,n=!1){!n&&!ei(t)&&!vs(t)&&(t=it(t));const i=it(this),{has:r,get:s}=Eu(i);let o=r.call(i,e);o||(e=it(e),o=r.call(i,e));const u=s.call(i,e);return i.set(e,t),o?Tn(t,u)&&rr(i,"set",e,t):rr(i,"add",e,t),this}function fm(e){const t=it(this),{has:n,get:i}=Eu(t);let r=n.call(t,e);r||(e=it(e),r=n.call(t,e)),i&&i.call(t,e);const s=t.delete(e);return r&&rr(t,"delete",e,void 0),s}function pm(){const e=it(this),t=e.size!==0,n=e.clear();return t&&rr(e,"clear",void 0,void 0),n}function Fl(e,t){return function(i,r){const s=this,o=s.__v_raw,u=it(o),a=t?Jf:e?Zf:hn;return!e&&fn(u,"iterate",fs),o.forEach((h,c)=>i.call(r,a(h),a(c),s))}}function Bl(e,t,n){return function(...i){const r=this.__v_raw,s=it(r),o=go(s),u=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,h=r[e](...i),c=n?Jf:t?Zf:hn;return!t&&fn(s,"iterate",a?Cd:fs),{next(){const{value:l,done:d}=h.next();return d?{value:l,done:d}:{value:u?[c(l[0]),c(l[1])]:c(l),done:d}},[Symbol.iterator](){return this}}}}function gr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Cx(){const e={get(s){return Pl(this,s)},get size(){return Dl(this)},has:Nl,add:hm,set:dm,delete:fm,clear:pm,forEach:Fl(!1,!1)},t={get(s){return Pl(this,s,!1,!0)},get size(){return Dl(this)},has:Nl,add(s){return hm.call(this,s,!0)},set(s,o){return dm.call(this,s,o,!0)},delete:fm,clear:pm,forEach:Fl(!1,!0)},n={get(s){return Pl(this,s,!0)},get size(){return Dl(this,!0)},has(s){return Nl.call(this,s,!0)},add:gr("add"),set:gr("set"),delete:gr("delete"),clear:gr("clear"),forEach:Fl(!0,!1)},i={get(s){return Pl(this,s,!0,!0)},get size(){return Dl(this,!0)},has(s){return Nl.call(this,s,!0)},add:gr("add"),set:gr("set"),delete:gr("delete"),clear:gr("clear"),forEach:Fl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Bl(s,!1,!1),n[s]=Bl(s,!0,!1),t[s]=Bl(s,!1,!0),i[s]=Bl(s,!0,!0)}),[e,n,t,i]}const[xx,Mx,kx,$x]=Cx();function Au(e,t){const n=t?e?$x:kx:e?Mx:xx;return(i,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(st(n,r)&&r in i?n:i,r,s)}const Ix={get:Au(!1,!1)},Rx={get:Au(!1,!0)},Lx={get:Au(!0,!1)},Ox={get:Au(!0,!0)},Vb=new WeakMap,jb=new WeakMap,Gb=new WeakMap,qb=new WeakMap;function Px(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Nx(e){return e.__v_skip||!Object.isExtensible(e)?0:Px(JC(e))}function jo(e){return vs(e)?e:Cu(e,!1,Sx,Ix,Vb)}function Dx(e){return Cu(e,!1,Ex,Rx,jb)}function Kb(e){return Cu(e,!0,Tx,Lx,Gb)}function MQ(e){return Cu(e,!0,Ax,Ox,qb)}function Cu(e,t,n,i,r){if(!gt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const o=Nx(e);if(o===0)return e;const u=new Proxy(e,o===2?i:n);return r.set(e,u),u}function ps(e){return vs(e)?ps(e.__v_raw):!!(e&&e.__v_isReactive)}function vs(e){return!!(e&&e.__v_isReadonly)}function ei(e){return!!(e&&e.__v_isShallow)}function Qf(e){return e?!!e.__v_raw:!1}function it(e){const t=e&&e.__v_raw;return t?it(t):e}function Fx(e){return!st(e,"__v_skip")&&Object.isExtensible(e)&&xb(e,"__v_skip",!0),e}const hn=e=>gt(e)?jo(e):e,Zf=e=>gt(e)?Kb(e):e;function Ht(e){return e?e.__v_isRef===!0:!1}function li(e){return Yb(e,!1)}function xu(e){return Yb(e,!0)}function Yb(e,t){return Ht(e)?e:new Bx(e,t)}class Bx{constructor(t,n){this.dep=new Su,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:it(t),this._value=n?t:hn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||ei(t)||vs(t);t=i?t:it(t),Tn(t,n)&&(this._rawValue=t,this._value=i?t:hn(t),this.dep.trigger())}}function kQ(e){e.dep&&e.dep.trigger()}function Nr(e){return Ht(e)?e.value:e}function $Q(e){return Ne(e)?e():Nr(e)}const Hx={get:(e,t,n)=>t==="__v_raw"?e:Nr(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const r=e[t];return Ht(r)&&!Ht(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};function Xb(e){return ps(e)?e:new Proxy(e,Hx)}class Ux{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Su,{get:i,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function zx(e){return new Ux(e)}function IQ(e){const t=Le(e)?new Array(e.length):{};for(const n in e)t[n]=Jb(e,n);return t}class Wx{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return vx(it(this._object),this._key)}}class Vx{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function RQ(e,t,n){return Ht(e)?e:Ne(e)?new Vx(e):gt(e)&&arguments.length>1?Jb(e,t,n):li(e)}function Jb(e,t,n){const i=e[t];return Ht(i)?i:new Wx(e,t,n)}class jx{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Su(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ua-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&vt!==this)return Ob(this),!0}get value(){const t=this.dep.track();return Db(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Gx(e,t,n=!1){let i,r;return Ne(e)?i=e:(i=e.get,r=e.set),new jx(i,r,n)}const LQ={GET:"get",HAS:"has",ITERATE:"iterate"},OQ={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Hl={},Nc=new WeakMap;let Tr;function PQ(){return Tr}function qx(e,t=!1,n=Tr){if(n){let i=Nc.get(n);i||Nc.set(n,i=[]),i.push(e)}}function Kx(e,t,n=et){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:u,call:a}=n,h=_=>r?_:ei(_)||r===!1||r===0?er(_,1):er(_);let c,l,d,f,p=!1,g=!1;if(Ht(e)?(l=()=>e.value,p=ei(e)):ps(e)?(l=()=>h(e),p=!0):Le(e)?(g=!0,p=e.some(_=>ps(_)||ei(_)),l=()=>e.map(_=>{if(Ht(_))return _.value;if(ps(_))return h(_);if(Ne(_))return a?a(_,2):_()})):Ne(e)?t?l=a?()=>a(e,2):e:l=()=>{if(d){lr();try{d()}finally{cr()}}const _=Tr;Tr=c;try{return a?a(e,3,[f]):e(f)}finally{Tr=_}}:l=Zn,t&&r){const _=l,w=r===!0?1/0:r;l=()=>er(_(),w)}const m=px(),v=()=>{c.stop(),m&&Wf(m.effects,c)};if(s&&t){const _=t;t=(...w)=>{_(...w),v()}}let y=g?new Array(e.length).fill(Hl):Hl;const S=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const w=c.run();if(r||p||(g?w.some((b,C)=>Tn(b,y[C])):Tn(w,y))){d&&d();const b=Tr;Tr=c;try{const C=[w,y===Hl?void 0:g&&y[0]===Hl?[]:y,f];a?a(t,3,C):t(...C),y=w}finally{Tr=b}}}else c.run()};return u&&u(S),c=new Pc(l),c.scheduler=o?()=>o(S,!1):S,f=_=>qx(_,!1,c),d=c.onStop=()=>{const _=Nc.get(c);if(_){if(a)a(_,4);else for(const w of _)w();Nc.delete(c)}},t?i?S(!0):y=c.run():o?o(S.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function er(e,t=1/0,n){if(t<=0||!gt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ht(e))er(e.value,t,n);else if(Le(e))for(let i=0;i<e.length;i++)er(e[i],t,n);else if(xs(e)||go(e))e.forEach(i=>{er(i,t,n)});else if(ds(e)){for(const i in e)er(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&er(e[i],t,n)}return e}/**
* @vue/runtime-core v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const gs=[];function Yx(e){gs.push(e)}function Xx(){gs.pop()}let Ch=!1;function wr(e,...t){if(Ch)return;Ch=!0,lr();const n=gs.length?gs[gs.length-1].component:null,i=n&&n.appContext.config.warnHandler,r=Jx();if(i)Go(i,n,11,[e+t.map(s=>{var o,u;return(u=(o=s.toString)==null?void 0:o.call(s))!=null?u:JSON.stringify(s)}).join(""),n&&n.proxy,r.map(({vnode:s})=>`at <${V0(n,s.type)}>`).join(`
`),r]);else{const s=[`[Vue warn]: ${e}`,...t];r.length&&s.push(`
`,...Qx(r)),console.warn(...s)}cr(),Ch=!1}function Jx(){let e=gs[gs.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const i=e.component&&e.component.parent;e=i&&i.vnode}return t}function Qx(e){const t=[];return e.forEach((n,i)=>{t.push(...i===0?[]:[`
`],...Zx(n))}),t}function Zx({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",i=e.component?e.component.parent==null:!1,r=` at <${V0(e.component,e.type,i)}`,s=">"+n;return e.props?[r,...eM(e.props),s]:[r+s]}function eM(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(i=>{t.push(...Qb(i,e[i]))}),n.length>3&&t.push(" ..."),t}function Qb(e,t,n){return ut(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ht(t)?(t=Qb(e,it(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Ne(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=it(t),n?t:[`${e}=`,t])}function NQ(e,t){}const DQ={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},tM={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush",[15]:"component update",[16]:"app unmount cleanup function"};function Go(e,t,n,i){try{return i?e(...i):e()}catch(r){qo(r,t,n)}}function mi(e,t,n,i){if(Ne(e)){const r=Go(e,t,n,i);return r&&Vf(r)&&r.catch(s=>{qo(s,t,n)}),r}if(Le(e)){const r=[];for(let s=0;s<e.length;s++)r.push(mi(e[s],t,n,i));return r}}function qo(e,t,n,i=!0){const r=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||et;if(t){let u=t.parent;const a=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${n}`;for(;u;){const c=u.ec;if(c){for(let l=0;l<c.length;l++)if(c[l](e,a,h)===!1)return}u=u.parent}if(s){lr(),Go(s,null,10,[e,a,h]),cr();return}}nM(e,n,r,i,o)}function nM(e,t,n,i=!0,r=!1){if(r)throw e;console.error(e)}let Va=!1,xd=!1;const En=[];let Ei=0;const yo=[];let Er=null,Ys=0;const Zb=Promise.resolve();let ep=null;function Wr(e){const t=ep||Zb;return e?t.then(this?e.bind(this):e):t}function iM(e){let t=Va?Ei+1:0,n=En.length;for(;t<n;){const i=t+n>>>1,r=En[i],s=ja(r);s<e||s===e&&r.flags&2?t=i+1:n=i}return t}function tp(e){if(!(e.flags&1)){const t=ja(e),n=En[En.length-1];!n||!(e.flags&2)&&t>=ja(n)?En.push(e):En.splice(iM(t),0,e),e.flags|=1,e0()}}function e0(){!Va&&!xd&&(xd=!0,ep=Zb.then(t0))}function Md(e){Le(e)?yo.push(...e):Er&&e.id===-1?Er.splice(Ys+1,0,e):e.flags&1||(yo.push(e),e.flags|=1),e0()}function gm(e,t,n=Va?Ei+1:0){for(;n<En.length;n++){const i=En[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;En.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Dc(e){if(yo.length){const t=[...new Set(yo)].sort((n,i)=>ja(n)-ja(i));if(yo.length=0,Er){Er.push(...t);return}for(Er=t,Ys=0;Ys<Er.length;Ys++){const n=Er[Ys];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Er=null,Ys=0}}const ja=e=>e.id==null?e.flags&2?-1:1/0:e.id;function t0(e){xd=!1,Va=!0;const t=Zn;try{for(Ei=0;Ei<En.length;Ei++){const n=En[Ei];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Go(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Ei<En.length;Ei++){const n=En[Ei];n&&(n.flags&=-2)}Ei=0,En.length=0,Dc(),Va=!1,ep=null,(En.length||yo.length)&&t0()}}let Xs,Ul=[];function n0(e,t){var n,i;Xs=e,Xs?(Xs.enabled=!0,Ul.forEach(({event:r,args:s})=>Xs.emit(r,...s)),Ul=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{n0(s,t)}),setTimeout(()=>{Xs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ul=[])},3e3)):Ul=[]}let Kt=null,Mu=null;function Ga(e){const t=Kt;return Kt=e,Mu=e&&e.type.__scopeId||null,t}function FQ(e){Mu=e}function BQ(){Mu=null}const HQ=e=>pt;function pt(e,t=Kt,n){if(!t||e._n)return e;const i=(...r)=>{i._d&&$m(-1);const s=Ga(t);let o;try{o=e(...r)}finally{Ga(s),i._d&&$m(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function gn(e,t){if(Kt===null)return e;const n=gl(Kt),i=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[s,o,u,a=et]=t[r];s&&(Ne(s)&&(s={mounted:s,updated:s}),s.deep&&er(o),i.push({dir:s,instance:n,value:o,oldValue:void 0,arg:u,modifiers:a}))}return e}function xi(e,t,n,i){const r=e.dirs,s=t&&t.dirs;for(let o=0;o<r.length;o++){const u=r[o];s&&(u.oldValue=s[o].value);let a=u.dir[i];a&&(lr(),mi(a,n,8,[e.el,u,e,t]),cr())}}const i0=Symbol("_vte"),r0=e=>e.__isTeleport,Ma=e=>e&&(e.disabled||e.disabled===""),rM=e=>e&&(e.defer||e.defer===""),mm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,vm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,kd=(e,t)=>{const n=e&&e.to;return ut(n)?t?t(n):null:n},sM={name:"Teleport",__isTeleport:!0,process(e,t,n,i,r,s,o,u,a,h){const{mc:c,pc:l,pbc:d,o:{insert:f,querySelector:p,createText:g,createComment:m}}=h,v=Ma(t.props);let{shapeFlag:y,children:S,dynamicChildren:_}=t;if(e==null){const w=t.el=g(""),b=t.anchor=g("");f(w,n,i),f(b,n,i);const C=(R,T)=>{y&16&&(r&&r.isCE&&(r.ce._teleportTarget=R),c(S,R,T,r,s,o,u,a))},M=()=>{const R=t.target=kd(t.props,p),T=s0(R,t,g,f);R&&(o!=="svg"&&mm(R)?o="svg":o!=="mathml"&&vm(R)&&(o="mathml"),v||(C(R,T),vc(t)))};v&&(C(n,b),vc(t)),rM(t.props)?Jt(M,s):M()}else{t.el=e.el,t.targetStart=e.targetStart;const w=t.anchor=e.anchor,b=t.target=e.target,C=t.targetAnchor=e.targetAnchor,M=Ma(e.props),R=M?n:b,T=M?w:C;if(o==="svg"||mm(b)?o="svg":(o==="mathml"||vm(b))&&(o="mathml"),_?(d(e.dynamicChildren,_,R,r,s,o,u),dp(e,t,!0)):a||l(e,t,R,T,r,s,o,u,!1),v)M?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):zl(t,n,w,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=kd(t.props,p);A&&zl(t,A,null,h,0)}else M&&zl(t,b,C,h,1);vc(t)}},remove(e,t,n,{um:i,o:{remove:r}},s){const{shapeFlag:o,children:u,anchor:a,targetStart:h,targetAnchor:c,target:l,props:d}=e;if(l&&(r(h),r(c)),s&&r(a),o&16){const f=s||!Ma(d);for(let p=0;p<u.length;p++){const g=u[p];i(g,t,n,f,!!g.dynamicChildren)}}},move:zl,hydrate:oM};function zl(e,t,n,{o:{insert:i},m:r},s=2){s===0&&i(e.targetAnchor,t,n);const{el:o,anchor:u,shapeFlag:a,children:h,props:c}=e,l=s===2;if(l&&i(o,t,n),(!l||Ma(c))&&a&16)for(let d=0;d<h.length;d++)r(h[d],t,n,2);l&&i(u,t,n)}function oM(e,t,n,i,r,s,{o:{nextSibling:o,parentNode:u,querySelector:a,insert:h,createText:c}},l){const d=t.target=kd(t.props,a);if(d){const f=d._lpa||d.firstChild;if(t.shapeFlag&16)if(Ma(t.props))t.anchor=l(o(e),t,u(e),n,i,r,s),t.targetStart=f,t.targetAnchor=f&&o(f);else{t.anchor=o(e);let p=f;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,d._lpa=t.targetAnchor&&o(t.targetAnchor);break}}p=o(p)}t.targetAnchor||s0(d,t,c,h),l(f&&o(f),t,d,n,i,r,s)}vc(t)}return t.anchor&&o(t.anchor)}const Ms=sM;function vc(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function s0(e,t,n,i){const r=t.targetStart=n(""),s=t.targetAnchor=n("");return r[i0]=s,e&&(i(r,e),i(s,e)),s}const Ar=Symbol("_leaveCb"),Wl=Symbol("_enterCb");function o0(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return dl(()=>{e.isMounted=!0}),op(()=>{e.isUnmounting=!0}),e}const Yn=[Function,Array],a0={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Yn,onEnter:Yn,onAfterEnter:Yn,onEnterCancelled:Yn,onBeforeLeave:Yn,onLeave:Yn,onAfterLeave:Yn,onLeaveCancelled:Yn,onBeforeAppear:Yn,onAppear:Yn,onAfterAppear:Yn,onAppearCancelled:Yn},l0=e=>{const t=e.subTree;return t.component?l0(t.component):t},aM={name:"BaseTransition",props:a0,setup(e,{slots:t}){const n=pn(),i=o0();return()=>{const r=t.default&&np(t.default(),!0);if(!r||!r.length)return;const s=c0(r),o=it(e),{mode:u}=o;if(i.isLeaving)return xh(s);const a=ym(s);if(!a)return xh(s);let h=qa(a,o,i,n,d=>h=d);a.type!==jt&&Vr(a,h);const c=n.subTree,l=c&&ym(c);if(l&&l.type!==jt&&!ci(a,l)&&l0(n).type!==jt){const d=qa(l,o,i,n);if(Vr(l,d),u==="out-in"&&a.type!==jt)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave},xh(s);u==="in-out"&&a.type!==jt&&(d.delayLeave=(f,p,g)=>{const m=u0(i,l);m[String(l.key)]=l,f[Ar]=()=>{p(),f[Ar]=void 0,delete h.delayedLeave},h.delayedLeave=g})}return s}}};function c0(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==jt){t=n;break}}return t}const lM=aM;function u0(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function qa(e,t,n,i,r){const{appear:s,mode:o,persisted:u=!1,onBeforeEnter:a,onEnter:h,onAfterEnter:c,onEnterCancelled:l,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:m,onAppear:v,onAfterAppear:y,onAppearCancelled:S}=t,_=String(e.key),w=u0(n,e),b=(R,T)=>{R&&mi(R,i,9,T)},C=(R,T)=>{const A=T[1];b(R,T),Le(R)?R.every(P=>P.length<=1)&&A():R.length<=1&&A()},M={mode:o,persisted:u,beforeEnter(R){let T=a;if(!n.isMounted)if(s)T=m||a;else return;R[Ar]&&R[Ar](!0);const A=w[_];A&&ci(e,A)&&A.el[Ar]&&A.el[Ar](),b(T,[R])},enter(R){let T=h,A=c,P=l;if(!n.isMounted)if(s)T=v||h,A=y||c,P=S||l;else return;let I=!1;const E=R[Wl]=L=>{I||(I=!0,L?b(P,[R]):b(A,[R]),M.delayedLeave&&M.delayedLeave(),R[Wl]=void 0)};T?C(T,[R,E]):E()},leave(R,T){const A=String(e.key);if(R[Wl]&&R[Wl](!0),n.isUnmounting)return T();b(d,[R]);let P=!1;const I=R[Ar]=E=>{P||(P=!0,T(),E?b(g,[R]):b(p,[R]),R[Ar]=void 0,w[A]===e&&delete w[A])};w[A]=e,f?C(f,[R,I]):I()},clone(R){const T=qa(R,t,n,i,r);return r&&r(T),T}};return M}function xh(e){if(hl(e))return e=sr(e),e.children=null,e}function ym(e){if(!hl(e))return r0(e.type)&&e.children?c0(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ne(n.default))return n.default()}}function Vr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function np(e,t=!1,n){let i=[],r=0;for(let s=0;s<e.length;s++){let o=e[s];const u=n==null?o.key:String(n)+String(o.key!=null?o.key:s);o.type===tt?(o.patchFlag&128&&r++,i=i.concat(np(o.children,t,u))):(t||o.type!==jt)&&i.push(u!=null?sr(o,{key:u}):o)}if(r>1)for(let s=0;s<i.length;s++)i[s].patchFlag=-2;return i}/*! #__NO_SIDE_EFFECTS__ */function ks(e,t){return Ne(e)?(()=>Et({name:e.name},t,{setup:e}))():e}function UQ(){const e=pn();if(e)return(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++}function ip(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function zQ(e){const t=pn(),n=xu(null);if(t){const r=t.refs===et?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:s=>n.value=s})}return n}function Fc(e,t,n,i,r=!1){if(Le(e)){e.forEach((p,g)=>Fc(p,t&&(Le(t)?t[g]:t),n,i,r));return}if(Dr(i)&&!r)return;const s=i.shapeFlag&4?gl(i.component):i.el,o=r?null:s,{i:u,r:a}=e,h=t&&t.r,c=u.refs===et?u.refs={}:u.refs,l=u.setupState,d=it(l),f=l===et?()=>!1:p=>st(d,p);if(h!=null&&h!==a&&(ut(h)?(c[h]=null,f(h)&&(l[h]=null)):Ht(h)&&(h.value=null)),Ne(a))Go(a,u,12,[o,c]);else{const p=ut(a),g=Ht(a);if(p||g){const m=()=>{if(e.f){const v=p?f(a)?l[a]:c[a]:a.value;r?Le(v)&&Wf(v,s):Le(v)?v.includes(s)||v.push(s):p?(c[a]=[s],f(a)&&(l[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else p?(c[a]=o,f(a)&&(l[a]=o)):g&&(a.value=o,e.k&&(c[e.k]=o))};o?(m.id=-1,Jt(m,n)):m()}}}let _m=!1;const is=()=>{_m||(console.error("Hydration completed but contains mismatches."),_m=!0)},cM=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",uM=e=>e.namespaceURI.includes("MathML"),Vl=e=>{if(e.nodeType===1){if(cM(e))return"svg";if(uM(e))return"mathml"}},us=e=>e.nodeType===8;function hM(e){const{mt:t,p:n,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:u,insert:a,createComment:h}}=e,c=(S,_)=>{if(!_.hasChildNodes()){__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&wr("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),n(null,S,_),Dc(),_._vnode=S;return}l(_.firstChild,S,null,null,null),Dc(),_._vnode=S},l=(S,_,w,b,C,M=!1)=>{M=M||!!_.dynamicChildren;const R=us(S)&&S.data==="[",T=()=>g(S,_,w,b,C,R),{type:A,ref:P,shapeFlag:I,patchFlag:E}=_;let L=S.nodeType;_.el=S,E===-2&&(M=!1,_.dynamicChildren=null);let O=null;switch(A){case Fr:L!==3?_.children===""?(a(_.el=r(""),o(S),S),O=S):O=T():(S.data!==_.children&&(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&wr("Hydration text mismatch in",S.parentNode,`
  - rendered on server: ${JSON.stringify(S.data)}
  - expected on client: ${JSON.stringify(_.children)}`),is(),S.data=_.children),O=s(S));break;case jt:y(S)?(O=s(S),v(_.el=S.content.firstChild,S,w)):L!==8||R?O=T():O=s(S);break;case bo:if(R&&(S=s(S),L=S.nodeType),L===1||L===3){O=S;const B=!_.children.length;for(let U=0;U<_.staticCount;U++)B&&(_.children+=O.nodeType===1?O.outerHTML:O.data),U===_.staticCount-1&&(_.anchor=O),O=s(O);return R?s(O):O}else T();break;case tt:R?O=p(S,_,w,b,C,M):O=T();break;default:if(I&1)(L!==1||_.type.toLowerCase()!==S.tagName.toLowerCase())&&!y(S)?O=T():O=d(S,_,w,b,C,M);else if(I&6){_.slotScopeIds=C;const B=o(S);if(R?O=m(S):us(S)&&S.data==="teleport start"?O=m(S,S.data,"teleport end"):O=s(S),t(_,B,null,w,b,Vl(B),M),Dr(_)){let U;R?(U=Ee(tt),U.anchor=O?O.previousSibling:B.lastChild):U=S.nodeType===3?ri(""):Ee("div"),U.el=S,_.component.subTree=U}}else I&64?L!==8?O=T():O=_.type.hydrate(S,_,w,b,C,M,e,f):I&128?O=_.type.hydrate(S,_,w,b,Vl(o(S)),C,M,e,l):__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&wr("Invalid HostVNode type:",A,`(${typeof A})`)}return P!=null&&Fc(P,null,b,_),O},d=(S,_,w,b,C,M)=>{M=M||!!_.dynamicChildren;const{type:R,props:T,patchFlag:A,shapeFlag:P,dirs:I,transition:E}=_,L=R==="input"||R==="option";if(L||A!==-1){I&&xi(_,null,w,"created");let O=!1;if(y(S)){O=k0(b,E)&&w&&w.vnode.props&&w.vnode.props.appear;const U=S.content.firstChild;O&&E.beforeEnter(U),v(U,S,w),_.el=S=U}if(P&16&&!(T&&(T.innerHTML||T.textContent))){let U=f(S.firstChild,_,S,w,b,C,M),z=!1;for(;U;){_a(S,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!z&&(wr("Hydration children mismatch on",S,`
Server rendered element contains more child nodes than client vdom.`),z=!0),is());const j=U;U=U.nextSibling,u(j)}}else if(P&8){let U=_.children;U[0]===`
`&&(S.tagName==="PRE"||S.tagName==="TEXTAREA")&&(U=U.slice(1)),S.textContent!==U&&(_a(S,0)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&wr("Hydration text content mismatch on",S,`
  - rendered on server: ${S.textContent}
  - expected on client: ${_.children}`),is()),S.textContent=_.children)}if(T){if(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||L||!M||A&48){const U=S.tagName.includes("-");for(const z in T)__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!(I&&I.some(j=>j.dir.created))&&dM(S,z,T[z],_,w)&&is(),(L&&(z.endsWith("value")||z==="indeterminate")||ul(z)&&!mo(z)||z[0]==="."||U)&&i(S,z,null,T[z],void 0,w)}else if(T.onClick)i(S,"onClick",null,T.onClick,void 0,w);else if(A&4&&ps(T.style))for(const U in T.style)T.style[U]}let B;(B=T&&T.onVnodeBeforeMount)&&On(B,w,_),I&&xi(_,null,w,"beforeMount"),((B=T&&T.onVnodeMounted)||I||O)&&P0(()=>{B&&On(B,w,_),O&&E.enter(S),I&&xi(_,null,w,"mounted")},b)}return S.nextSibling},f=(S,_,w,b,C,M,R)=>{R=R||!!_.dynamicChildren;const T=_.children,A=T.length;let P=!1;for(let I=0;I<A;I++){const E=R?T[I]:T[I]=Pn(T[I]),L=E.type===Fr;S?(L&&!R&&I+1<A&&Pn(T[I+1]).type===Fr&&(a(r(S.data.slice(E.children.length)),w,s(S)),S.data=E.children),S=l(S,E,b,C,M,R)):L&&!E.children?a(E.el=r(""),w):(_a(w,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!P&&(wr("Hydration children mismatch on",w,`
Server rendered element contains fewer child nodes than client vdom.`),P=!0),is()),n(null,E,w,null,b,C,Vl(w),M))}return S},p=(S,_,w,b,C,M)=>{const{slotScopeIds:R}=_;R&&(C=C?C.concat(R):R);const T=o(S),A=f(s(S),_,T,w,b,C,M);return A&&us(A)&&A.data==="]"?s(_.anchor=A):(is(),a(_.anchor=h("]"),T,A),A)},g=(S,_,w,b,C,M)=>{if(_a(S.parentElement,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&wr(`Hydration node mismatch:
- rendered on server:`,S,S.nodeType===3?"(text)":us(S)&&S.data==="["?"(start of fragment)":"",`
- expected on client:`,_.type),is()),_.el=null,M){const A=m(S);for(;;){const P=s(S);if(P&&P!==A)u(P);else break}}const R=s(S),T=o(S);return u(S),n(null,_,T,R,w,b,Vl(T),C),R},m=(S,_="[",w="]")=>{let b=0;for(;S;)if(S=s(S),S&&us(S)&&(S.data===_&&b++,S.data===w)){if(b===0)return s(S);b--}return S},v=(S,_,w)=>{const b=_.parentNode;b&&b.replaceChild(S,_);let C=w;for(;C;)C.vnode.el===_&&(C.vnode.el=C.subTree.el=S),C=C.parent},y=S=>S.nodeType===1&&S.tagName==="TEMPLATE";return[c,l]}function dM(e,t,n,i,r){let s,o,u,a;if(t==="class")u=e.getAttribute("class"),a=Ge(n),fM(bm(u||""),bm(a))||(s=2,o="class");else if(t==="style"){u=e.getAttribute("style")||"",a=ut(n)?n:ox(Nt(n));const h=wm(u),c=wm(a);if(i.dirs)for(const{dir:l,value:d}of i.dirs)l.name==="show"&&!d&&c.set("display","none");r&&h0(r,i,c),pM(h,c)||(s=3,o="style")}else(e instanceof SVGElement&&cx(t)||e instanceof HTMLElement&&(lm(t)||lx(t)))&&(lm(t)?(u=e.hasAttribute(t),a=qf(n)):n==null?(u=e.hasAttribute(t),a=!1):(e.hasAttribute(t)?u=e.getAttribute(t):t==="value"&&e.tagName==="TEXTAREA"?u=e.value:u=!1,a=ux(n)?String(n):!1),u!==a&&(s=4,o=t));if(s!=null&&!_a(e,s)){const h=d=>d===!1?"(not rendered)":`${o}="${d}"`,c=`Hydration ${d0[s]} mismatch on`,l=`
  - rendered on server: ${h(u)}
  - expected on client: ${h(a)}
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch.`;return wr(c,e,l),!0}return!1}function bm(e){return new Set(e.trim().split(/\s+/))}function fM(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function wm(e){const t=new Map;for(const n of e.split(";")){let[i,r]=n.split(":");i=i.trim(),r=r&&r.trim(),i&&r&&t.set(i,r)}return t}function pM(e,t){if(e.size!==t.size)return!1;for(const[n,i]of e)if(i!==t.get(n))return!1;return!0}function h0(e,t,n){const i=e.subTree;if(e.getCssVars&&(t===i||i&&i.type===tt&&i.children.includes(t))){const r=e.getCssVars();for(const s in r)n.set(`--${dx(s,!1)}`,String(r[s]))}t===i&&e.parent&&h0(e.parent,e.vnode,n)}const Sm="data-allow-mismatch",d0={[0]:"text",[1]:"children",[2]:"class",[3]:"style",[4]:"attribute"};function _a(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Sm);)e=e.parentElement;const n=e&&e.getAttribute(Sm);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return t===0&&i.includes("children")?!0:n.split(",").includes(d0[t])}}const WQ=(e=1e4)=>t=>{const n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)};function gM(e){const{top:t,left:n,bottom:i,right:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:o}=window;return(t>0&&t<s||i>0&&i<s)&&(n>0&&n<o||r>0&&r<o)}const VQ=e=>(t,n)=>{const i=new IntersectionObserver(r=>{for(const s of r)if(!!s.isIntersecting){i.disconnect(),t();break}},e);return n(r=>{if(r instanceof Element){if(gM(r))return t(),i.disconnect(),!1;i.observe(r)}}),()=>i.disconnect()},jQ=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},GQ=(e=[])=>(t,n)=>{ut(e)&&(e=[e]);let i=!1;const r=o=>{i||(i=!0,s(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},s=()=>{n(o=>{for(const u of e)o.removeEventListener(u,r)})};return n(o=>{for(const u of e)o.addEventListener(u,r,{once:!0})}),s};function mM(e,t){if(us(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(us(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const Dr=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function kn(e){Ne(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:r=200,hydrate:s,timeout:o,suspensible:u=!0,onError:a}=e;let h=null,c,l=0;const d=()=>(l++,h=null,f()),f=()=>{let p;return h||(p=h=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),a)return new Promise((m,v)=>{a(g,()=>m(d()),()=>v(g),l+1)});throw g}).then(g=>p!==h&&h?h:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),c=g,g)))};return ks({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(p,g,m){const v=s?()=>{const y=s(m,S=>mM(p,S));y&&(g.bum||(g.bum=[])).push(y)}:m;c?v():f().then(()=>!g.isUnmounted&&v())},get __asyncResolved(){return c},setup(){const p=Gt;if(ip(p),c)return()=>Mh(c,p);const g=S=>{h=null,qo(S,p,13,!i)};if(u&&p.suspense||pl)return f().then(S=>()=>Mh(S,p)).catch(S=>(g(S),()=>i?Ee(i,{error:S}):null));const m=li(!1),v=li(),y=li(!!r);return r&&setTimeout(()=>{y.value=!1},r),o!=null&&setTimeout(()=>{if(!m.value&&!v.value){const S=new Error(`Async component timed out after ${o}ms.`);g(S),v.value=S}},o),f().then(()=>{m.value=!0,p.parent&&hl(p.parent.vnode)&&p.parent.update()}).catch(S=>{g(S),v.value=S}),()=>{if(m.value&&c)return Mh(c,p);if(v.value&&i)return Ee(i,{error:v.value});if(n&&!y.value)return Ee(n)}}})}function Mh(e,t){const{ref:n,props:i,children:r,ce:s}=t.vnode,o=Ee(e,i,r);return o.ref=n,o.ce=s,delete t.vnode.ce,o}const hl=e=>e.type.__isKeepAlive,vM={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=pn(),i=n.ctx;if(!i.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const r=new Map,s=new Set;let o=null;const u=n.suspense,{renderer:{p:a,m:h,um:c,o:{createElement:l}}}=i,d=l("div");i.activate=(y,S,_,w,b)=>{const C=y.component;h(y,S,_,0,u),a(C.vnode,y,S,_,C,u,w,y.slotScopeIds,b),Jt(()=>{C.isDeactivated=!1,C.a&&vo(C.a);const M=y.props&&y.props.onVnodeMounted;M&&On(M,C.parent,y)},u)},i.deactivate=y=>{const S=y.component;Hc(S.m),Hc(S.a),h(y,d,null,1,u),Jt(()=>{S.da&&vo(S.da);const _=y.props&&y.props.onVnodeUnmounted;_&&On(_,S.parent,y),S.isDeactivated=!0},u)};function f(y){kh(y),c(y,n,u,!0)}function p(y){r.forEach((S,_)=>{const w=jc(S.type);w&&!y(w)&&g(_)})}function g(y){const S=r.get(y);S&&(!o||!ci(S,o))?f(S):o&&kh(o),r.delete(y),s.delete(y)}Pi(()=>[e.include,e.exclude],([y,S])=>{y&&p(_=>ba(y,_)),S&&p(_=>!ba(S,_))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&(Uc(n.subTree.type)?Jt(()=>{r.set(m,jl(n.subTree))},n.subTree.suspense):r.set(m,jl(n.subTree)))};return dl(v),sp(v),op(()=>{r.forEach(y=>{const{subTree:S,suspense:_}=n,w=jl(S);if(y.type===w.type&&y.key===w.key){kh(w);const b=w.component.da;b&&Jt(b,_);return}f(y)})}),()=>{if(m=null,!t.default)return o=null;const y=t.default(),S=y[0];if(y.length>1)return o=null,y;if(!_s(S)||!(S.shapeFlag&4)&&!(S.shapeFlag&128))return o=null,S;let _=jl(S);if(_.type===jt)return o=null,_;const w=_.type,b=jc(Dr(_)?_.type.__asyncResolved||{}:w),{include:C,exclude:M,max:R}=e;if(C&&(!b||!ba(C,b))||M&&b&&ba(M,b))return _.shapeFlag&=-257,o=_,S;const T=_.key==null?w:_.key,A=r.get(T);return _.el&&(_=sr(_),S.shapeFlag&128&&(S.ssContent=_)),m=T,A?(_.el=A.el,_.component=A.component,_.transition&&Vr(_,_.transition),_.shapeFlag|=512,s.delete(T),s.add(T)):(s.add(T),R&&s.size>parseInt(R,10)&&g(s.values().next().value)),_.shapeFlag|=256,o=_,Uc(S.type)?S:_}}},qQ=vM;function ba(e,t){return Le(e)?e.some(n=>ba(n,t)):ut(e)?e.split(",").includes(t):XC(e)?(e.lastIndex=0,e.test(t)):!1}function yM(e,t){f0(e,"a",t)}function _M(e,t){f0(e,"da",t)}function f0(e,t,n=Gt){const i=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ku(t,i,n),n){let r=n.parent;for(;r&&r.parent;)hl(r.parent.vnode)&&bM(i,t,n,r),r=r.parent}}function bM(e,t,n,i){const r=ku(t,e,i,!0);$u(()=>{Wf(i[t],r)},n)}function kh(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function jl(e){return e.shapeFlag&128?e.ssContent:e}function ku(e,t,n=Gt,i=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{lr();const u=bs(n),a=mi(t,n,e,o);return u(),cr(),a});return i?r.unshift(s):r.push(s),s}}const ur=e=>(t,n=Gt)=>{(!pl||e==="sp")&&ku(e,(...i)=>t(...i),n)},rp=ur("bm"),dl=ur("m"),wM=ur("bu"),sp=ur("u"),op=ur("bum"),$u=ur("um"),SM=ur("sp"),TM=ur("rtg"),EM=ur("rtc");function AM(e,t=Gt){ku("ec",e,t)}const ap="components",CM="directives";function Ae(e,t){return lp(ap,e,!0,t)||e}const p0=Symbol.for("v-ndc");function Iu(e){return ut(e)?lp(ap,e,!1)||e:e||p0}function g0(e){return lp(CM,e)}function lp(e,t,n=!0,i=!1){const r=Kt||Gt;if(r){const s=r.type;if(e===ap){const u=jc(s,!1);if(u&&(u===t||u===Mn(t)||u===bu(Mn(t))))return s}const o=Tm(r[e]||s[e],t)||Tm(r.appContext[e],t);return!o&&i?s:o}}function Tm(e,t){return e&&(e[t]||e[Mn(t)]||e[bu(Mn(t))])}function ti(e,t,n,i){let r;const s=n&&n[i],o=Le(e);if(o||ut(e)){const u=o&&ps(e);let a=!1;u&&(a=!ei(e),e=Tu(e)),r=new Array(e.length);for(let h=0,c=e.length;h<c;h++)r[h]=t(a?hn(e[h]):e[h],h,void 0,s&&s[h])}else if(typeof e=="number"){r=new Array(e);for(let u=0;u<e;u++)r[u]=t(u+1,u,void 0,s&&s[u])}else if(gt(e))if(e[Symbol.iterator])r=Array.from(e,(u,a)=>t(u,a,void 0,s&&s[a]));else{const u=Object.keys(e);r=new Array(u.length);for(let a=0,h=u.length;a<h;a++){const c=u[a];r[a]=t(e[c],c,a,s&&s[a])}}else r=[];return n&&(n[i]=r),r}function KQ(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(Le(i))for(let r=0;r<i.length;r++)e[i[r].name]=i[r].fn;else i&&(e[i.name]=i.key?(...r)=>{const s=i.fn(...r);return s&&(s.key=i.key),s}:i.fn)}return e}function Ut(e,t,n={},i,r){if(Kt.ce||Kt.parent&&Dr(Kt.parent)&&Kt.parent.ce)return t!=="default"&&(n.name=t),oe(),Ue(tt,null,[Ee("slot",n,i&&i())],64);let s=e[t];s&&s._c&&(s._d=!1),oe();const o=s&&cp(s(n)),u=Ue(tt,{key:(n.key||o&&o.key||`_${t}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&e._===1?64:-2);return!r&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),s&&s._c&&(s._d=!0),u}function cp(e){return e.some(t=>_s(t)?!(t.type===jt||t.type===tt&&!cp(t.children)):!0)?e:null}function ii(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:mc(i)]=e[i];return n}const $d=e=>e?H0(e)?gl(e):$d(e.parent):null,ka=Et(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$d(e.parent),$root:e=>$d(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>up(e),$forceUpdate:e=>e.f||(e.f=()=>{tp(e.update)}),$nextTick:e=>e.n||(e.n=Wr.bind(e.proxy)),$watch:e=>YM.bind(e)}),$h=(e,t)=>e!==et&&!e.__isScriptSetup&&st(e,t),Id={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:r,props:s,accessCache:o,type:u,appContext:a}=e;let h;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if($h(i,t))return o[t]=1,i[t];if(r!==et&&st(r,t))return o[t]=2,r[t];if((h=e.propsOptions[0])&&st(h,t))return o[t]=3,s[t];if(n!==et&&st(n,t))return o[t]=4,n[t];Rd&&(o[t]=0)}}const c=ka[t];let l,d;if(c)return t==="$attrs"&&fn(e.attrs,"get",""),c(e);if((l=u.__cssModules)&&(l=l[t]))return l;if(n!==et&&st(n,t))return o[t]=4,n[t];if(d=a.config.globalProperties,st(d,t))return d[t]},set({_:e},t,n){const{data:i,setupState:r,ctx:s}=e;return $h(r,t)?(r[t]=n,!0):i!==et&&st(i,t)?(i[t]=n,!0):st(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:r,propsOptions:s}},o){let u;return!!n[o]||e!==et&&st(e,o)||$h(t,o)||(u=s[0])&&st(u,o)||st(i,o)||st(ka,o)||st(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:st(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},xM=Et({},Id,{get(e,t){if(t!==Symbol.unscopables)return Id.get(e,t,e)},has(e,t){return t[0]!=="_"&&!tx(t)}});function YQ(){return null}function XQ(){return null}function JQ(e){}function QQ(e){}function ZQ(){return null}function eZ(){}function tZ(e,t){return null}function nZ(){return m0().slots}function iZ(){return m0().attrs}function m0(){const e=pn();return e.setupContext||(e.setupContext=W0(e))}function Ka(e){return Le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function rZ(e,t){const n=Ka(e);for(const i in t){if(i.startsWith("__skip"))continue;let r=n[i];r?Le(r)||Ne(r)?r=n[i]={type:r,default:t[i]}:r.default=t[i]:r===null&&(r=n[i]={default:t[i]}),r&&t[`__skip_${i}`]&&(r.skipFactory=!0)}return n}function sZ(e,t){return!e||!t?e||t:Le(e)&&Le(t)?e.concat(t):Et({},Ka(e),Ka(t))}function oZ(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function aZ(e){const t=pn();let n=e();return Dd(),Vf(n)&&(n=n.catch(i=>{throw bs(t),i})),[n,()=>bs(t)]}let Rd=!0;function MM(e){const t=up(e),n=e.proxy,i=e.ctx;Rd=!1,t.beforeCreate&&Em(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:o,watch:u,provide:a,inject:h,created:c,beforeMount:l,mounted:d,beforeUpdate:f,updated:p,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:S,unmounted:_,render:w,renderTracked:b,renderTriggered:C,errorCaptured:M,serverPrefetch:R,expose:T,inheritAttrs:A,components:P,directives:I,filters:E}=t;if(h&&kM(h,i,null),o)for(const B in o){const U=o[B];Ne(U)&&(i[B]=U.bind(n))}if(r){const B=r.call(n,n);gt(B)&&(e.data=jo(B))}if(Rd=!0,s)for(const B in s){const U=s[B],z=Ne(U)?U.bind(n,n):Ne(U.get)?U.get.bind(n,n):Zn,j=!Ne(U)&&Ne(U.set)?U.set.bind(n):Zn,q=Rt({get:z,set:j});Object.defineProperty(i,B,{enumerable:!0,configurable:!0,get:()=>q.value,set:ne=>q.value=ne})}if(u)for(const B in u)v0(u[B],i,n,B);if(a){const B=Ne(a)?a.call(n):a;Reflect.ownKeys(B).forEach(U=>{yc(U,B[U])})}c&&Em(c,e,"c");function O(B,U){Le(U)?U.forEach(z=>B(z.bind(n))):U&&B(U.bind(n))}if(O(rp,l),O(dl,d),O(wM,f),O(sp,p),O(yM,g),O(_M,m),O(AM,M),O(EM,b),O(TM,C),O(op,y),O($u,_),O(SM,R),Le(T))if(T.length){const B=e.exposed||(e.exposed={});T.forEach(U=>{Object.defineProperty(B,U,{get:()=>n[U],set:z=>n[U]=z})})}else e.exposed||(e.exposed={});w&&e.render===Zn&&(e.render=w),A!=null&&(e.inheritAttrs=A),P&&(e.components=P),I&&(e.directives=I),R&&ip(e)}function kM(e,t,n=Zn){Le(e)&&(e=Ld(e));for(const i in e){const r=e[i];let s;gt(r)?"default"in r?s=jn(r.from||i,r.default,!0):s=jn(r.from||i):s=jn(r),Ht(s)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):t[i]=s}}function Em(e,t,n){mi(Le(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function v0(e,t,n,i){let r=i.includes(".")?I0(n,i):()=>n[i];if(ut(e)){const s=t[e];Ne(s)&&Pi(r,s)}else if(Ne(e))Pi(r,e.bind(n));else if(gt(e))if(Le(e))e.forEach(s=>v0(s,t,n,i));else{const s=Ne(e.handler)?e.handler.bind(n):t[e.handler];Ne(s)&&Pi(r,s,e)}}function up(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,u=s.get(t);let a;return u?a=u:!r.length&&!n&&!i?a=t:(a={},r.length&&r.forEach(h=>Bc(a,h,o,!0)),Bc(a,t,o)),gt(t)&&s.set(t,a),a}function Bc(e,t,n,i=!1){const{mixins:r,extends:s}=t;s&&Bc(e,s,n,!0),r&&r.forEach(o=>Bc(e,o,n,!0));for(const o in t)if(!(i&&o==="expose")){const u=$M[o]||n&&n[o];e[o]=u?u(e[o],t[o]):t[o]}return e}const $M={data:Am,props:Cm,emits:Cm,methods:wa,computed:wa,beforeCreate:vn,created:vn,beforeMount:vn,mounted:vn,beforeUpdate:vn,updated:vn,beforeDestroy:vn,beforeUnmount:vn,destroyed:vn,unmounted:vn,activated:vn,deactivated:vn,errorCaptured:vn,serverPrefetch:vn,components:wa,directives:wa,watch:RM,provide:Am,inject:IM};function Am(e,t){return t?e?function(){return Et(Ne(e)?e.call(this,this):e,Ne(t)?t.call(this,this):t)}:t:e}function IM(e,t){return wa(Ld(e),Ld(t))}function Ld(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function vn(e,t){return e?[...new Set([].concat(e,t))]:t}function wa(e,t){return e?Et(Object.create(null),e,t):t}function Cm(e,t){return e?Le(e)&&Le(t)?[...new Set([...e,...t])]:Et(Object.create(null),Ka(e),Ka(t??{})):t}function RM(e,t){if(!e)return t;if(!t)return e;const n=Et(Object.create(null),e);for(const i in t)n[i]=vn(e[i],t[i]);return n}function y0(){return{app:null,config:{isNativeTag:KC,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let LM=0;function OM(e,t){return function(i,r=null){Ne(i)||(i=Et({},i)),r!=null&&!gt(r)&&(r=null);const s=y0(),o=new WeakSet,u=[];let a=!1;const h=s.app={_uid:LM++,_component:i,_props:r,_container:null,_context:s,_instance:null,version:mk,get config(){return s.config},set config(c){},use(c,...l){return o.has(c)||(c&&Ne(c.install)?(o.add(c),c.install(h,...l)):Ne(c)&&(o.add(c),c(h,...l))),h},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),h},component(c,l){return l?(s.components[c]=l,h):s.components[c]},directive(c,l){return l?(s.directives[c]=l,h):s.directives[c]},mount(c,l,d){if(!a){const f=h._ceVNode||Ee(i,r);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),l&&t?t(f,c):e(f,c,d),a=!0,h._container=c,c.__vue_app__=h,gl(f.component)}},onUnmount(c){u.push(c)},unmount(){a&&(mi(u,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(c,l){return s.provides[c]=l,h},runWithContext(c){const l=ms;ms=h;try{return c()}finally{ms=l}}};return h}}let ms=null;function yc(e,t){if(Gt){let n=Gt.provides;const i=Gt.parent&&Gt.parent.provides;i===n&&(n=Gt.provides=Object.create(i)),n[e]=t}}function jn(e,t,n=!1){const i=Gt||Kt;if(i||ms){const r=ms?ms._context.provides:i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Ne(t)?t.call(i&&i.proxy):t}}function lZ(){return!!(Gt||Kt||ms)}const _0={},b0=()=>Object.create(_0),w0=e=>Object.getPrototypeOf(e)===_0;function PM(e,t,n,i=!1){const r={},s=b0();e.propsDefaults=Object.create(null),S0(e,t,r,s);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=i?r:Dx(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function NM(e,t,n,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=e,u=it(r),[a]=e.propsOptions;let h=!1;if((i||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let l=0;l<c.length;l++){let d=c[l];if(Ru(e.emitsOptions,d))continue;const f=t[d];if(a)if(st(s,d))f!==s[d]&&(s[d]=f,h=!0);else{const p=Mn(d);r[p]=Od(a,u,p,f,e,!1)}else f!==s[d]&&(s[d]=f,h=!0)}}}else{S0(e,t,r,s)&&(h=!0);let c;for(const l in u)(!t||!st(t,l)&&((c=An(l))===l||!st(t,c)))&&(a?n&&(n[l]!==void 0||n[c]!==void 0)&&(r[l]=Od(a,u,l,void 0,e,!0)):delete r[l]);if(s!==u)for(const l in s)(!t||!st(t,l)&&!0)&&(delete s[l],h=!0)}h&&rr(e.attrs,"set","")}function S0(e,t,n,i){const[r,s]=e.propsOptions;let o=!1,u;if(t)for(let a in t){if(mo(a))continue;const h=t[a];let c;r&&st(r,c=Mn(a))?!s||!s.includes(c)?n[c]=h:(u||(u={}))[c]=h:Ru(e.emitsOptions,a)||(!(a in i)||h!==i[a])&&(i[a]=h,o=!0)}if(s){const a=it(n),h=u||et;for(let c=0;c<s.length;c++){const l=s[c];n[l]=Od(r,a,l,h[l],e,!st(h,l))}}return o}function Od(e,t,n,i,r,s){const o=e[n];if(o!=null){const u=st(o,"default");if(u&&i===void 0){const a=o.default;if(o.type!==Function&&!o.skipFactory&&Ne(a)){const{propsDefaults:h}=r;if(n in h)i=h[n];else{const c=bs(r);i=h[n]=a.call(null,t),c()}}else i=a;r.ce&&r.ce._setProp(n,i)}o[0]&&(s&&!u?i=!1:o[1]&&(i===""||i===An(n))&&(i=!0))}return i}const DM=new WeakMap;function T0(e,t,n=!1){const i=n?DM:t.propsCache,r=i.get(e);if(r)return r;const s=e.props,o={},u=[];let a=!1;if(!Ne(e)){const c=l=>{a=!0;const[d,f]=T0(l,t,!0);Et(o,d),f&&u.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return gt(e)&&i.set(e,po),po;if(Le(s))for(let c=0;c<s.length;c++){const l=Mn(s[c]);xm(l)&&(o[l]=et)}else if(s)for(const c in s){const l=Mn(c);if(xm(l)){const d=s[c],f=o[l]=Le(d)||Ne(d)?{type:d}:Et({},d),p=f.type;let g=!1,m=!0;if(Le(p))for(let v=0;v<p.length;++v){const y=p[v],S=Ne(y)&&y.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(m=!1)}else g=Ne(p)&&p.name==="Boolean";f[0]=g,f[1]=m,(g||st(f,"default"))&&u.push(l)}}const h=[o,u];return gt(e)&&i.set(e,h),h}function xm(e){return e[0]!=="$"&&!mo(e)}const E0=e=>e[0]==="_"||e==="$stable",hp=e=>Le(e)?e.map(Pn):[Pn(e)],FM=(e,t,n)=>{if(t._n)return t;const i=pt((...r)=>hp(t(...r)),n);return i._c=!1,i},A0=(e,t,n)=>{const i=e._ctx;for(const r in e){if(E0(r))continue;const s=e[r];if(Ne(s))t[r]=FM(r,s,i);else if(s!=null){const o=hp(s);t[r]=()=>o}}},C0=(e,t)=>{const n=hp(t);e.slots.default=()=>n},x0=(e,t,n)=>{for(const i in t)(n||i!=="_")&&(e[i]=t[i])},BM=(e,t,n)=>{const i=e.slots=b0();if(e.vnode.shapeFlag&32){const r=t._;r?(x0(i,t,n),n&&xb(i,"_",r,!0)):A0(t,i)}else t&&C0(e,t)},HM=(e,t,n)=>{const{vnode:i,slots:r}=e;let s=!0,o=et;if(i.shapeFlag&32){const u=t._;u?n&&u===1?s=!1:x0(r,t,n):(s=!t.$stable,A0(t,r)),o=t}else t&&(C0(e,t),o={default:1});if(s)for(const u in r)!E0(u)&&o[u]==null&&delete r[u]};function UM(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(Gf().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const Jt=P0;function zM(e){return M0(e)}function WM(e){return M0(e,hM)}function M0(e,t){UM();const n=Gf();n.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:u,createComment:a,setText:h,setElementText:c,parentNode:l,nextSibling:d,setScopeId:f=Zn,insertStaticContent:p}=e,g=(F,N,W,ee=null,re=null,ce=null,fe=void 0,ye=null,ge=!!N.dynamicChildren)=>{if(F===N)return;F&&!ci(F,N)&&(ee=Y(F),ne(F,re,ce,!0),F=null),N.patchFlag===-2&&(ge=!1,N.dynamicChildren=null);const{type:ve,ref:Z,shapeFlag:ae}=N;switch(ve){case Fr:m(F,N,W,ee);break;case jt:v(F,N,W,ee);break;case bo:F==null&&y(N,W,ee,fe);break;case tt:P(F,N,W,ee,re,ce,fe,ye,ge);break;default:ae&1?w(F,N,W,ee,re,ce,fe,ye,ge):ae&6?I(F,N,W,ee,re,ce,fe,ye,ge):(ae&64||ae&128)&&ve.process(F,N,W,ee,re,ce,fe,ye,ge,ue)}Z!=null&&re&&Fc(Z,F&&F.ref,ce,N||F,!N)},m=(F,N,W,ee)=>{if(F==null)i(N.el=u(N.children),W,ee);else{const re=N.el=F.el;N.children!==F.children&&h(re,N.children)}},v=(F,N,W,ee)=>{F==null?i(N.el=a(N.children||""),W,ee):N.el=F.el},y=(F,N,W,ee)=>{[F.el,F.anchor]=p(F.children,N,W,ee,F.el,F.anchor)},S=({el:F,anchor:N},W,ee)=>{let re;for(;F&&F!==N;)re=d(F),i(F,W,ee),F=re;i(N,W,ee)},_=({el:F,anchor:N})=>{let W;for(;F&&F!==N;)W=d(F),r(F),F=W;r(N)},w=(F,N,W,ee,re,ce,fe,ye,ge)=>{N.type==="svg"?fe="svg":N.type==="math"&&(fe="mathml"),F==null?b(N,W,ee,re,ce,fe,ye,ge):R(F,N,re,ce,fe,ye,ge)},b=(F,N,W,ee,re,ce,fe,ye)=>{let ge,ve;const{props:Z,shapeFlag:ae,transition:K,dirs:se}=F;if(ge=F.el=o(F.type,ce,Z&&Z.is,Z),ae&8?c(ge,F.children):ae&16&&M(F.children,ge,null,ee,re,Ih(F,ce),fe,ye),se&&xi(F,null,ee,"created"),C(ge,F,F.scopeId,fe,ee),Z){for(const _e in Z)_e!=="value"&&!mo(_e)&&s(ge,_e,null,Z[_e],ce,ee);"value"in Z&&s(ge,"value",null,Z.value,ce),(ve=Z.onVnodeBeforeMount)&&On(ve,ee,F)}se&&xi(F,null,ee,"beforeMount");const be=k0(re,K);be&&K.beforeEnter(ge),i(ge,N,W),((ve=Z&&Z.onVnodeMounted)||be||se)&&Jt(()=>{ve&&On(ve,ee,F),be&&K.enter(ge),se&&xi(F,null,ee,"mounted")},re)},C=(F,N,W,ee,re)=>{if(W&&f(F,W),ee)for(let ce=0;ce<ee.length;ce++)f(F,ee[ce]);if(re){let ce=re.subTree;if(N===ce||Uc(ce.type)&&(ce.ssContent===N||ce.ssFallback===N)){const fe=re.vnode;C(F,fe,fe.scopeId,fe.slotScopeIds,re.parent)}}},M=(F,N,W,ee,re,ce,fe,ye,ge=0)=>{for(let ve=ge;ve<F.length;ve++){const Z=F[ve]=ye?Cr(F[ve]):Pn(F[ve]);g(null,Z,N,W,ee,re,ce,fe,ye)}},R=(F,N,W,ee,re,ce,fe)=>{const ye=N.el=F.el;let{patchFlag:ge,dynamicChildren:ve,dirs:Z}=N;ge|=F.patchFlag&16;const ae=F.props||et,K=N.props||et;let se;if(W&&rs(W,!1),(se=K.onVnodeBeforeUpdate)&&On(se,W,N,F),Z&&xi(N,F,W,"beforeUpdate"),W&&rs(W,!0),(ae.innerHTML&&K.innerHTML==null||ae.textContent&&K.textContent==null)&&c(ye,""),ve?T(F.dynamicChildren,ve,ye,W,ee,Ih(N,re),ce):fe||U(F,N,ye,null,W,ee,Ih(N,re),ce,!1),ge>0){if(ge&16)A(ye,ae,K,W,re);else if(ge&2&&ae.class!==K.class&&s(ye,"class",null,K.class,re),ge&4&&s(ye,"style",ae.style,K.style,re),ge&8){const be=N.dynamicProps;for(let _e=0;_e<be.length;_e++){const Oe=be[_e],qe=ae[Oe],Fe=K[Oe];(Fe!==qe||Oe==="value")&&s(ye,Oe,qe,Fe,re,W)}}ge&1&&F.children!==N.children&&c(ye,N.children)}else!fe&&ve==null&&A(ye,ae,K,W,re);((se=K.onVnodeUpdated)||Z)&&Jt(()=>{se&&On(se,W,N,F),Z&&xi(N,F,W,"updated")},ee)},T=(F,N,W,ee,re,ce,fe)=>{for(let ye=0;ye<N.length;ye++){const ge=F[ye],ve=N[ye],Z=ge.el&&(ge.type===tt||!ci(ge,ve)||ge.shapeFlag&70)?l(ge.el):W;g(ge,ve,Z,null,ee,re,ce,fe,!0)}},A=(F,N,W,ee,re)=>{if(N!==W){if(N!==et)for(const ce in N)!mo(ce)&&!(ce in W)&&s(F,ce,N[ce],null,re,ee);for(const ce in W){if(mo(ce))continue;const fe=W[ce],ye=N[ce];fe!==ye&&ce!=="value"&&s(F,ce,ye,fe,re,ee)}"value"in W&&s(F,"value",N.value,W.value,re)}},P=(F,N,W,ee,re,ce,fe,ye,ge)=>{const ve=N.el=F?F.el:u(""),Z=N.anchor=F?F.anchor:u("");let{patchFlag:ae,dynamicChildren:K,slotScopeIds:se}=N;se&&(ye=ye?ye.concat(se):se),F==null?(i(ve,W,ee),i(Z,W,ee),M(N.children||[],W,Z,re,ce,fe,ye,ge)):ae>0&&ae&64&&K&&F.dynamicChildren?(T(F.dynamicChildren,K,W,re,ce,fe,ye),(N.key!=null||re&&N===re.subTree)&&dp(F,N,!0)):U(F,N,W,Z,re,ce,fe,ye,ge)},I=(F,N,W,ee,re,ce,fe,ye,ge)=>{N.slotScopeIds=ye,F==null?N.shapeFlag&512?re.ctx.activate(N,W,ee,fe,ge):E(N,W,ee,re,ce,fe,ge):L(F,N,ge)},E=(F,N,W,ee,re,ce,fe)=>{const ye=F.component=B0(F,ee,re);if(hl(F)&&(ye.ctx.renderer=ue),U0(ye,!1,fe),ye.asyncDep){if(re&&re.registerDep(ye,O,fe),!F.el){const ge=ye.subTree=Ee(jt);v(null,ge,N,W)}}else O(ye,F,N,W,re,ce,fe)},L=(F,N,W)=>{const ee=N.component=F.component;if(ek(F,N,W))if(ee.asyncDep&&!ee.asyncResolved){B(ee,N,W);return}else ee.next=N,ee.update();else N.el=F.el,ee.vnode=N},O=(F,N,W,ee,re,ce,fe)=>{const ye=()=>{if(F.isMounted){let{next:ae,bu:K,u:se,parent:be,vnode:_e}=F;{const mt=$0(F);if(mt){ae&&(ae.el=_e.el,B(F,ae,fe)),mt.asyncDep.then(()=>{F.isUnmounted||ye()});return}}let Oe=ae,qe;rs(F,!1),ae?(ae.el=_e.el,B(F,ae,fe)):ae=_e,K&&vo(K),(qe=ae.props&&ae.props.onVnodeBeforeUpdate)&&On(qe,be,ae,_e),rs(F,!0);const Fe=_c(F),je=F.subTree;F.subTree=Fe,g(je,Fe,l(je.el),Y(je),F,re,ce),ae.el=Fe.el,Oe===null&&fp(F,Fe.el),se&&Jt(se,re),(qe=ae.props&&ae.props.onVnodeUpdated)&&Jt(()=>On(qe,be,ae,_e),re)}else{let ae;const{el:K,props:se}=N,{bm:be,m:_e,parent:Oe,root:qe,type:Fe}=F,je=Dr(N);if(rs(F,!1),be&&vo(be),!je&&(ae=se&&se.onVnodeBeforeMount)&&On(ae,Oe,N),rs(F,!0),K&&Ce){const mt=()=>{F.subTree=_c(F),Ce(K,F.subTree,F,re,null)};je&&Fe.__asyncHydrate?Fe.__asyncHydrate(K,F,mt):mt()}else{qe.ce&&qe.ce._injectChildStyle(Fe);const mt=F.subTree=_c(F);g(null,mt,W,ee,F,re,ce),N.el=mt.el}if(_e&&Jt(_e,re),!je&&(ae=se&&se.onVnodeMounted)){const mt=N;Jt(()=>On(ae,Oe,mt),re)}(N.shapeFlag&256||Oe&&Dr(Oe.vnode)&&Oe.vnode.shapeFlag&256)&&F.a&&Jt(F.a,re),F.isMounted=!0,N=W=ee=null}};F.scope.on();const ge=F.effect=new Pc(ye);F.scope.off();const ve=F.update=ge.run.bind(ge),Z=F.job=ge.runIfDirty.bind(ge);Z.i=F,Z.id=F.uid,ge.scheduler=()=>tp(Z),rs(F,!0),ve()},B=(F,N,W)=>{N.component=F;const ee=F.vnode.props;F.vnode=N,F.next=null,NM(F,N.props,ee,W),HM(F,N.children,W),lr(),gm(F),cr()},U=(F,N,W,ee,re,ce,fe,ye,ge=!1)=>{const ve=F&&F.children,Z=F?F.shapeFlag:0,ae=N.children,{patchFlag:K,shapeFlag:se}=N;if(K>0){if(K&128){j(ve,ae,W,ee,re,ce,fe,ye,ge);return}else if(K&256){z(ve,ae,W,ee,re,ce,fe,ye,ge);return}}se&8?(Z&16&&le(ve,re,ce),ae!==ve&&c(W,ae)):Z&16?se&16?j(ve,ae,W,ee,re,ce,fe,ye,ge):le(ve,re,ce,!0):(Z&8&&c(W,""),se&16&&M(ae,W,ee,re,ce,fe,ye,ge))},z=(F,N,W,ee,re,ce,fe,ye,ge)=>{F=F||po,N=N||po;const ve=F.length,Z=N.length,ae=Math.min(ve,Z);let K;for(K=0;K<ae;K++){const se=N[K]=ge?Cr(N[K]):Pn(N[K]);g(F[K],se,W,null,re,ce,fe,ye,ge)}ve>Z?le(F,re,ce,!0,!1,ae):M(N,W,ee,re,ce,fe,ye,ge,ae)},j=(F,N,W,ee,re,ce,fe,ye,ge)=>{let ve=0;const Z=N.length;let ae=F.length-1,K=Z-1;for(;ve<=ae&&ve<=K;){const se=F[ve],be=N[ve]=ge?Cr(N[ve]):Pn(N[ve]);if(ci(se,be))g(se,be,W,null,re,ce,fe,ye,ge);else break;ve++}for(;ve<=ae&&ve<=K;){const se=F[ae],be=N[K]=ge?Cr(N[K]):Pn(N[K]);if(ci(se,be))g(se,be,W,null,re,ce,fe,ye,ge);else break;ae--,K--}if(ve>ae){if(ve<=K){const se=K+1,be=se<Z?N[se].el:ee;for(;ve<=K;)g(null,N[ve]=ge?Cr(N[ve]):Pn(N[ve]),W,be,re,ce,fe,ye,ge),ve++}}else if(ve>K)for(;ve<=ae;)ne(F[ve],re,ce,!0),ve++;else{const se=ve,be=ve,_e=new Map;for(ve=be;ve<=K;ve++){const mn=N[ve]=ge?Cr(N[ve]):Pn(N[ve]);mn.key!=null&&_e.set(mn.key,ve)}let Oe,qe=0;const Fe=K-be+1;let je=!1,mt=0;const qn=new Array(Fe);for(ve=0;ve<Fe;ve++)qn[ve]=0;for(ve=se;ve<=ae;ve++){const mn=F[ve];if(qe>=Fe){ne(mn,re,ce,!0);continue}let Kn;if(mn.key!=null)Kn=_e.get(mn.key);else for(Oe=be;Oe<=K;Oe++)if(qn[Oe-be]===0&&ci(mn,N[Oe])){Kn=Oe;break}Kn===void 0?ne(mn,re,ce,!0):(qn[Kn-be]=ve+1,Kn>=mt?mt=Kn:je=!0,g(mn,N[Kn],W,null,re,ce,fe,ye,ge),qe++)}const Zr=je?VM(qn):po;for(Oe=Zr.length-1,ve=Fe-1;ve>=0;ve--){const mn=be+ve,Kn=N[mn],Ns=mn+1<Z?N[mn+1].el:ee;qn[ve]===0?g(null,Kn,W,Ns,re,ce,fe,ye,ge):je&&(Oe<0||ve!==Zr[Oe]?q(Kn,W,Ns,2):Oe--)}}},q=(F,N,W,ee,re=null)=>{const{el:ce,type:fe,transition:ye,children:ge,shapeFlag:ve}=F;if(ve&6){q(F.component.subTree,N,W,ee);return}if(ve&128){F.suspense.move(N,W,ee);return}if(ve&64){fe.move(F,N,W,ue);return}if(fe===tt){i(ce,N,W);for(let ae=0;ae<ge.length;ae++)q(ge[ae],N,W,ee);i(F.anchor,N,W);return}if(fe===bo){S(F,N,W);return}if(ee!==2&&ve&1&&ye)if(ee===0)ye.beforeEnter(ce),i(ce,N,W),Jt(()=>ye.enter(ce),re);else{const{leave:ae,delayLeave:K,afterLeave:se}=ye,be=()=>i(ce,N,W),_e=()=>{ae(ce,()=>{be(),se&&se()})};K?K(ce,be,_e):_e()}else i(ce,N,W)},ne=(F,N,W,ee=!1,re=!1)=>{const{type:ce,props:fe,ref:ye,children:ge,dynamicChildren:ve,shapeFlag:Z,patchFlag:ae,dirs:K,cacheIndex:se}=F;if(ae===-2&&(re=!1),ye!=null&&Fc(ye,null,W,F,!0),se!=null&&(N.renderCache[se]=void 0),Z&256){N.ctx.deactivate(F);return}const be=Z&1&&K,_e=!Dr(F);let Oe;if(_e&&(Oe=fe&&fe.onVnodeBeforeUnmount)&&On(Oe,N,F),Z&6)ie(F.component,W,ee);else{if(Z&128){F.suspense.unmount(W,ee);return}be&&xi(F,null,N,"beforeUnmount"),Z&64?F.type.remove(F,N,W,ue,ee):ve&&!ve.hasOnce&&(ce!==tt||ae>0&&ae&64)?le(ve,N,W,!1,!0):(ce===tt&&ae&384||!re&&Z&16)&&le(ge,N,W),ee&&G(F)}(_e&&(Oe=fe&&fe.onVnodeUnmounted)||be)&&Jt(()=>{Oe&&On(Oe,N,F),be&&xi(F,null,N,"unmounted")},W)},G=F=>{const{type:N,el:W,anchor:ee,transition:re}=F;if(N===tt){X(W,ee);return}if(N===bo){_(F);return}const ce=()=>{r(W),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(F.shapeFlag&1&&re&&!re.persisted){const{leave:fe,delayLeave:ye}=re,ge=()=>fe(W,ce);ye?ye(F.el,ce,ge):ge()}else ce()},X=(F,N)=>{let W;for(;F!==N;)W=d(F),r(F),F=W;r(N)},ie=(F,N,W)=>{const{bum:ee,scope:re,job:ce,subTree:fe,um:ye,m:ge,a:ve}=F;Hc(ge),Hc(ve),ee&&vo(ee),re.stop(),ce&&(ce.flags|=8,ne(fe,F,N,W)),ye&&Jt(ye,N),Jt(()=>{F.isUnmounted=!0},N),N&&N.pendingBranch&&!N.isUnmounted&&F.asyncDep&&!F.asyncResolved&&F.suspenseId===N.pendingId&&(N.deps--,N.deps===0&&N.resolve())},le=(F,N,W,ee=!1,re=!1,ce=0)=>{for(let fe=ce;fe<F.length;fe++)ne(F[fe],N,W,ee,re)},Y=F=>{if(F.shapeFlag&6)return Y(F.component.subTree);if(F.shapeFlag&128)return F.suspense.next();const N=d(F.anchor||F.el),W=N&&N[i0];return W?d(W):N};let J=!1;const te=(F,N,W)=>{F==null?N._vnode&&ne(N._vnode,null,null,!0):g(N._vnode||null,F,N,null,null,null,W),N._vnode=F,J||(J=!0,gm(),Dc(),J=!1)},ue={p:g,um:ne,m:q,r:G,mt:E,mc:M,pc:U,pbc:T,n:Y,o:e};let Se,Ce;return t&&([Se,Ce]=t(ue)),{render:te,hydrate:Se,createApp:OM(te,Se)}}function Ih({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function k0(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function dp(e,t,n=!1){const i=e.children,r=t.children;if(Le(i)&&Le(r))for(let s=0;s<i.length;s++){const o=i[s];let u=r[s];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=r[s]=Cr(r[s]),u.el=o.el),!n&&u.patchFlag!==-2&&dp(o,u)),u.type===Fr&&(u.el=o.el)}}function VM(e){const t=e.slice(),n=[0];let i,r,s,o,u;const a=e.length;for(i=0;i<a;i++){const h=e[i];if(h!==0){if(r=n[n.length-1],e[r]<h){t[i]=r,n.push(i);continue}for(s=0,o=n.length-1;s<o;)u=s+o>>1,e[n[u]]<h?s=u+1:o=u;h<e[n[s]]&&(s>0&&(t[i]=n[s-1]),n[s]=i)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=t[o];return n}function $0(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:$0(t)}function Hc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const jM=Symbol.for("v-scx"),GM=()=>jn(jM);function cZ(e,t){return fl(e,null,t)}function qM(e,t){return fl(e,null,{flush:"post"})}function KM(e,t){return fl(e,null,{flush:"sync"})}function Pi(e,t,n){return fl(e,t,n)}function fl(e,t,n=et){const{immediate:i,deep:r,flush:s,once:o}=n,u=Et({},n);let a;if(pl)if(s==="sync"){const d=GM();a=d.__watcherHandles||(d.__watcherHandles=[])}else if(!t||i)u.once=!0;else{const d=()=>{};return d.stop=Zn,d.resume=Zn,d.pause=Zn,d}const h=Gt;u.call=(d,f,p)=>mi(d,h,f,p);let c=!1;s==="post"?u.scheduler=d=>{Jt(d,h&&h.suspense)}:s!=="sync"&&(c=!0,u.scheduler=(d,f)=>{f?d():tp(d)}),u.augmentJob=d=>{t&&(d.flags|=4),c&&(d.flags|=2,h&&(d.id=h.uid,d.i=h))};const l=Kx(e,t,u);return a&&a.push(l),l}function YM(e,t,n){const i=this.proxy,r=ut(e)?e.includes(".")?I0(i,e):()=>i[e]:e.bind(i,i);let s;Ne(t)?s=t:(s=t.handler,n=t);const o=bs(this),u=fl(r,s.bind(i),n);return o(),u}function I0(e,t){const n=t.split(".");return()=>{let i=e;for(let r=0;r<n.length&&i;r++)i=i[n[r]];return i}}function uZ(e,t,n=et){const i=pn(),r=Mn(t),s=An(t),o=R0(e,t),u=zx((a,h)=>{let c,l=et,d;return KM(()=>{const f=e[t];Tn(c,f)&&(c=f,h())}),{get(){return a(),n.get?n.get(c):c},set(f){const p=n.set?n.set(f):f;if(!Tn(p,c)&&!(l!==et&&Tn(f,l)))return;const g=i.vnode.props;g&&(t in g||r in g||s in g)&&(`onUpdate:${t}`in g||`onUpdate:${r}`in g||`onUpdate:${s}`in g)||(c=f,h()),i.emit(`update:${t}`,p),Tn(f,p)&&Tn(f,l)&&!Tn(p,d)&&h(),l=f,d=p}}});return u[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?o||et:u,done:!1}:{done:!0}}}},u}const R0=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Mn(t)}Modifiers`]||e[`${An(t)}Modifiers`];function XM(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||et;let r=n;const s=t.startsWith("update:"),o=s&&R0(i,t.slice(7));o&&(o.trim&&(r=n.map(c=>ut(c)?c.trim():c)),o.number&&(r=n.map(Lc)));let u,a=i[u=mc(t)]||i[u=mc(Mn(t))];!a&&s&&(a=i[u=mc(An(t))]),a&&mi(a,e,6,r);const h=i[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,mi(h,e,6,r)}}function L0(e,t,n=!1){const i=t.emitsCache,r=i.get(e);if(r!==void 0)return r;const s=e.emits;let o={},u=!1;if(!Ne(e)){const a=h=>{const c=L0(h,t,!0);c&&(u=!0,Et(o,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!u?(gt(e)&&i.set(e,null),null):(Le(s)?s.forEach(a=>o[a]=null):Et(o,s),gt(e)&&i.set(e,o),o)}function Ru(e,t){return!e||!ul(t)?!1:(t=t.slice(2).replace(/Once$/,""),st(e,t[0].toLowerCase()+t.slice(1))||st(e,An(t))||st(e,t))}function _c(e){const{type:t,vnode:n,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:u,emit:a,render:h,renderCache:c,props:l,data:d,setupState:f,ctx:p,inheritAttrs:g}=e,m=Ga(e);let v,y;try{if(n.shapeFlag&4){const _=r||i,w=_;v=Pn(h.call(w,_,c,l,f,d,p)),y=u}else{const _=t;v=Pn(_.length>1?_(l,{attrs:u,slots:o,emit:a}):_(l,null)),y=t.props?u:QM(u)}}catch(_){$a.length=0,qo(_,e,1),v=Ee(jt)}let S=v;if(y&&g!==!1){const _=Object.keys(y),{shapeFlag:w}=S;_.length&&w&7&&(s&&_.some(zf)&&(y=ZM(y,s)),S=sr(S,y,!1,!0))}return n.dirs&&(S=sr(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&Vr(S,n.transition),v=S,Ga(m),v}function JM(e,t=!0){let n;for(let i=0;i<e.length;i++){const r=e[i];if(_s(r)){if(r.type!==jt||r.children==="v-if"){if(n)return;n=r}}else return}return n}const QM=e=>{let t;for(const n in e)(n==="class"||n==="style"||ul(n))&&((t||(t={}))[n]=e[n]);return t},ZM=(e,t)=>{const n={};for(const i in e)(!zf(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function ek(e,t,n){const{props:i,children:r,component:s}=e,{props:o,children:u,patchFlag:a}=t,h=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return i?Mm(i,o,h):!!o;if(a&8){const c=t.dynamicProps;for(let l=0;l<c.length;l++){const d=c[l];if(o[d]!==i[d]&&!Ru(h,d))return!0}}}else return(r||u)&&(!u||!u.$stable)?!0:i===o?!1:i?o?Mm(i,o,h):!0:!!o;return!1}function Mm(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){const s=i[r];if(t[s]!==e[s]&&!Ru(n,s))return!0}return!1}function fp({vnode:e,parent:t},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=t.vnode).el=n,t=t.parent;else break}}const Uc=e=>e.__isSuspense;let Pd=0;const tk={name:"Suspense",__isSuspense:!0,process(e,t,n,i,r,s,o,u,a,h){if(e==null)nk(t,n,i,r,s,o,u,a,h);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}ik(e,t,n,i,r,o,u,a,h)}},hydrate:rk,normalize:sk},hZ=tk;function Ya(e,t){const n=e.props&&e.props[t];Ne(n)&&n()}function nk(e,t,n,i,r,s,o,u,a){const{p:h,o:{createElement:c}}=a,l=c("div"),d=e.suspense=O0(e,r,i,t,l,n,s,o,u,a);h(null,d.pendingBranch=e.ssContent,l,null,i,d,s,o),d.deps>0?(Ya(e,"onPending"),Ya(e,"onFallback"),h(null,e.ssFallback,t,n,i,null,s,o),_o(d,e.ssFallback)):d.resolve(!1,!0)}function ik(e,t,n,i,r,s,o,u,{p:a,um:h,o:{createElement:c}}){const l=t.suspense=e.suspense;l.vnode=t,t.el=e.el;const d=t.ssContent,f=t.ssFallback,{activeBranch:p,pendingBranch:g,isInFallback:m,isHydrating:v}=l;if(g)l.pendingBranch=d,ci(d,g)?(a(g,d,l.hiddenContainer,null,r,l,s,o,u),l.deps<=0?l.resolve():m&&(v||(a(p,f,n,i,r,null,s,o,u),_o(l,f)))):(l.pendingId=Pd++,v?(l.isHydrating=!1,l.activeBranch=g):h(g,r,l),l.deps=0,l.effects.length=0,l.hiddenContainer=c("div"),m?(a(null,d,l.hiddenContainer,null,r,l,s,o,u),l.deps<=0?l.resolve():(a(p,f,n,i,r,null,s,o,u),_o(l,f))):p&&ci(d,p)?(a(p,d,n,i,r,l,s,o,u),l.resolve(!0)):(a(null,d,l.hiddenContainer,null,r,l,s,o,u),l.deps<=0&&l.resolve()));else if(p&&ci(d,p))a(p,d,n,i,r,l,s,o,u),_o(l,d);else if(Ya(t,"onPending"),l.pendingBranch=d,d.shapeFlag&512?l.pendingId=d.component.suspenseId:l.pendingId=Pd++,a(null,d,l.hiddenContainer,null,r,l,s,o,u),l.deps<=0)l.resolve();else{const{timeout:y,pendingId:S}=l;y>0?setTimeout(()=>{l.pendingId===S&&l.fallback(f)},y):y===0&&l.fallback(f)}}function O0(e,t,n,i,r,s,o,u,a,h,c=!1){const{p:l,m:d,um:f,n:p,o:{parentNode:g,remove:m}}=h;let v;const y=ok(e);y&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const S=e.props?Oc(e.props.timeout):void 0,_=s,w={vnode:e,parent:t,parentComponent:n,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:Pd++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(b=!1,C=!1){const{vnode:M,activeBranch:R,pendingBranch:T,pendingId:A,effects:P,parentComponent:I,container:E}=w;let L=!1;w.isHydrating?w.isHydrating=!1:b||(L=R&&T.transition&&T.transition.mode==="out-in",L&&(R.transition.afterLeave=()=>{A===w.pendingId&&(d(T,E,s===_?p(R):s,0),Md(P))}),R&&(g(R.el)===E&&(s=p(R)),f(R,I,w,!0)),L||d(T,E,s,0)),_o(w,T),w.pendingBranch=null,w.isInFallback=!1;let O=w.parent,B=!1;for(;O;){if(O.pendingBranch){O.effects.push(...P),B=!0;break}O=O.parent}!B&&!L&&Md(P),w.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!C&&t.resolve()),Ya(M,"onResolve")},fallback(b){if(!w.pendingBranch)return;const{vnode:C,activeBranch:M,parentComponent:R,container:T,namespace:A}=w;Ya(C,"onFallback");const P=p(M),I=()=>{!w.isInFallback||(l(null,b,T,P,R,null,A,u,a),_o(w,b))},E=b.transition&&b.transition.mode==="out-in";E&&(M.transition.afterLeave=I),w.isInFallback=!0,f(M,R,null,!0),E||I()},move(b,C,M){w.activeBranch&&d(w.activeBranch,b,C,M),w.container=b},next(){return w.activeBranch&&p(w.activeBranch)},registerDep(b,C,M){const R=!!w.pendingBranch;R&&w.deps++;const T=b.vnode.el;b.asyncDep.catch(A=>{qo(A,b,0)}).then(A=>{if(b.isUnmounted||w.isUnmounted||w.pendingId!==b.suspenseId)return;b.asyncResolved=!0;const{vnode:P}=b;Fd(b,A,!1),T&&(P.el=T);const I=!T&&b.subTree.el;C(b,P,g(T||b.subTree.el),T?null:p(b.subTree),w,o,M),I&&m(I),fp(b,P.el),R&&--w.deps===0&&w.resolve()})},unmount(b,C){w.isUnmounted=!0,w.activeBranch&&f(w.activeBranch,n,b,C),w.pendingBranch&&f(w.pendingBranch,n,b,C)}};return w}function rk(e,t,n,i,r,s,o,u,a){const h=t.suspense=O0(t,i,n,e.parentNode,document.createElement("div"),null,r,s,o,u,!0),c=a(e,h.pendingBranch=t.ssContent,n,h,s,o);return h.deps===0&&h.resolve(!1,!0),c}function sk(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=km(i?n.default:n),e.ssFallback=i?km(n.fallback):Ee(jt)}function km(e){let t;if(Ne(e)){const n=ys&&e._c;n&&(e._d=!1,oe()),e=e(),n&&(e._d=!0,t=dn,N0())}return Le(e)&&(e=JM(e)),e=Pn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function P0(e,t){t&&t.pendingBranch?Le(e)?t.effects.push(...e):t.effects.push(e):Md(e)}function _o(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,i&&i.subTree===n&&(i.vnode.el=r,fp(i,r))}function ok(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const tt=Symbol.for("v-fgt"),Fr=Symbol.for("v-txt"),jt=Symbol.for("v-cmt"),bo=Symbol.for("v-stc"),$a=[];let dn=null;function oe(e=!1){$a.push(dn=e?null:[])}function N0(){$a.pop(),dn=$a[$a.length-1]||null}let ys=1;function $m(e){ys+=e,e<0&&dn&&(dn.hasOnce=!0)}function D0(e){return e.dynamicChildren=ys>0?dn||po:null,N0(),ys>0&&dn&&dn.push(e),e}function me(e,t,n,i,r,s){return D0(de(e,t,n,i,r,s,!0))}function Ue(e,t,n,i,r){return D0(Ee(e,t,n,i,r,!0))}function _s(e){return e?e.__v_isVNode===!0:!1}function ci(e,t){return e.type===t.type&&e.key===t.key}function dZ(e){}const F0=({key:e})=>e??null,bc=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ut(e)||Ht(e)||Ne(e)?{i:Kt,r:e,k:t,f:!!n}:e:null);function de(e,t=null,n=null,i=0,r=null,s=e===tt?0:1,o=!1,u=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&F0(t),ref:t&&bc(t),scopeId:Mu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Kt};return u?(pp(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=ut(n)?8:16),ys>0&&!o&&dn&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&dn.push(a),a}const Ee=ak;function ak(e,t=null,n=null,i=0,r=null,s=!1){if((!e||e===p0)&&(e=jt),_s(e)){const u=sr(e,t,!0);return n&&pp(u,n),ys>0&&!s&&dn&&(u.shapeFlag&6?dn[dn.indexOf(e)]=u:dn.push(u)),u.patchFlag=-2,u}if(pk(e)&&(e=e.__vccOpts),t){t=zc(t);let{class:u,style:a}=t;u&&!ut(u)&&(t.class=Ge(u)),gt(a)&&(Qf(a)&&!Le(a)&&(a=Et({},a)),t.style=Nt(a))}const o=ut(e)?1:Uc(e)?128:r0(e)?64:gt(e)?4:Ne(e)?2:0;return de(e,t,n,i,r,o,s,!0)}function zc(e){return e?Qf(e)||w0(e)?Et({},e):e:null}function sr(e,t,n=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:u,transition:a}=e,h=t?Ot(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&F0(h),ref:t&&t.ref?n&&s?Le(s)?s.concat(bc(t)):[s,bc(t)]:bc(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==tt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sr(e.ssContent),ssFallback:e.ssFallback&&sr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&Vr(c,a.clone(c)),c}function ri(e=" ",t=0){return Ee(Fr,null,e,t)}function fZ(e,t){const n=Ee(bo,null,e);return n.staticCount=t,n}function Be(e="",t=!1){return t?(oe(),Ue(jt,null,e)):Ee(jt,null,e)}function Pn(e){return e==null||typeof e=="boolean"?Ee(jt):Le(e)?Ee(tt,null,e.slice()):typeof e=="object"?Cr(e):Ee(Fr,null,String(e))}function Cr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:sr(e)}function pp(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Le(t))n=16;else if(typeof t=="object")if(i&65){const r=t.default;r&&(r._c&&(r._d=!1),pp(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!w0(t)?t._ctx=Kt:r===3&&Kt&&(Kt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ne(t)?(t={default:t,_ctx:Kt},n=32):(t=String(t),i&64?(n=16,t=[ri(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ot(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const r in i)if(r==="class")t.class!==i.class&&(t.class=Ge([t.class,i.class]));else if(r==="style")t.style=Nt([t.style,i.style]);else if(ul(r)){const s=t[r],o=i[r];o&&s!==o&&!(Le(s)&&s.includes(o))&&(t[r]=s?[].concat(s,o):o)}else r!==""&&(t[r]=i[r])}return t}function On(e,t,n,i=null){mi(e,t,7,[n,i])}const lk=y0();let ck=0;function B0(e,t,n){const i=e.type,r=(t?t.appContext:e.appContext)||lk,s={uid:ck++,vnode:e,type:i,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ib(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:T0(i,r),emitsOptions:L0(i,r),emit:null,emitted:null,propsDefaults:et,inheritAttrs:i.inheritAttrs,ctx:et,data:et,props:et,attrs:et,slots:et,refs:et,setupState:et,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=XM.bind(null,s),e.ce&&e.ce(s),s}let Gt=null;const pn=()=>Gt||Kt;let Wc,Nd;{const e=Gf(),t=(n,i)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};Wc=t("__VUE_INSTANCE_SETTERS__",n=>Gt=n),Nd=t("__VUE_SSR_SETTERS__",n=>pl=n)}const bs=e=>{const t=Gt;return Wc(e),e.scope.on(),()=>{e.scope.off(),Wc(t)}},Dd=()=>{Gt&&Gt.scope.off(),Wc(null)};function H0(e){return e.vnode.shapeFlag&4}let pl=!1;function U0(e,t=!1,n=!1){t&&Nd(t);const{props:i,children:r}=e.vnode,s=H0(e);PM(e,i,s,t),BM(e,r,n);const o=s?uk(e,t):void 0;return t&&Nd(!1),o}function uk(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Id);const{setup:i}=n;if(i){const r=e.setupContext=i.length>1?W0(e):null,s=bs(e);lr();const o=Go(i,e,0,[e.props,r]);if(cr(),s(),Vf(o)){if(Dr(e)||ip(e),o.then(Dd,Dd),t)return o.then(u=>{Fd(e,u,t)}).catch(u=>{qo(u,e,0)});e.asyncDep=o}else Fd(e,o,t)}else z0(e,t)}function Fd(e,t,n){Ne(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:gt(t)&&(e.setupState=Xb(t)),z0(e,n)}let Vc,Bd;function pZ(e){Vc=e,Bd=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,xM))}}const gZ=()=>!Vc;function z0(e,t,n){const i=e.type;if(!e.render){if(!t&&Vc&&!i.render){const r=i.template||up(e).template;if(r){const{isCustomElement:s,compilerOptions:o}=e.appContext.config,{delimiters:u,compilerOptions:a}=i,h=Et(Et({isCustomElement:s,delimiters:u},o),a);i.render=Vc(r,h)}}e.render=i.render||Zn,Bd&&Bd(e)}{const r=bs(e);lr();try{MM(e)}finally{cr(),r()}}}const hk={get(e,t){return fn(e,"get",""),e[t]}};function W0(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,hk),slots:e.slots,emit:e.emit,expose:t}}function gl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Xb(Fx(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ka)return ka[n](e)},has(t,n){return n in t||n in ka}})):e.proxy}const dk=/(?:^|[-_])(\w)/g,fk=e=>e.replace(dk,t=>t.toUpperCase()).replace(/[-_]/g,"");function jc(e,t=!0){return Ne(e)?e.displayName||e.name:e.name||t&&e.__name}function V0(e,t,n=!1){let i=jc(t);if(!i&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(i=r[1])}if(!i&&e&&e.parent){const r=s=>{for(const o in s)if(s[o]===t)return o};i=r(e.components||e.parent.type.components)||r(e.appContext.components)}return i?fk(i):n?"App":"Anonymous"}function pk(e){return Ne(e)&&"__vccOpts"in e}const Rt=(e,t)=>Gx(e,t,pl);function ml(e,t,n){const i=arguments.length;return i===2?gt(t)&&!Le(t)?_s(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&_s(n)&&(n=[n]),Ee(e,t,n))}function mZ(){}function vZ(e,t,n,i){const r=n[i];if(r&&gk(r,e))return r;const s=t();return s.memo=e.slice(),s.cacheIndex=i,n[i]=s}function gk(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(Tn(n[i],t[i]))return!1;return ys>0&&dn&&dn.push(e),!0}const mk="3.5.8",yZ=Zn,_Z=tM,bZ=Xs,wZ=n0,vk={createComponentInstance:B0,setupComponent:U0,renderComponentRoot:_c,setCurrentRenderingInstance:Ga,isVNode:_s,normalizeVNode:Pn,getComponentPublicInstance:gl,ensureValidVNode:cp,pushWarningContext:Yx,popWarningContext:Xx},SZ=vk,TZ=null,EZ=null,AZ=null;/**
* @vue/runtime-dom v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Hd;const Im=typeof window<"u"&&window.trustedTypes;if(Im)try{Hd=Im.createPolicy("vue",{createHTML:e=>e})}catch{}const j0=Hd?e=>Hd.createHTML(e):e=>e,yk="http://www.w3.org/2000/svg",_k="http://www.w3.org/1998/Math/MathML",Ji=typeof document<"u"?document:null,Rm=Ji&&Ji.createElement("template"),bk={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const r=t==="svg"?Ji.createElementNS(yk,e):t==="mathml"?Ji.createElementNS(_k,e):n?Ji.createElement(e,{is:n}):Ji.createElement(e);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>Ji.createTextNode(e),createComment:e=>Ji.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ji.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,r,s){const o=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{Rm.innerHTML=j0(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const u=Rm.content;if(i==="svg"||i==="mathml"){const a=u.firstChild;for(;a.firstChild;)u.appendChild(a.firstChild);u.removeChild(a)}t.insertBefore(u,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},mr="transition",oa="animation",xo=Symbol("_vtc"),G0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},q0=Et({},a0,G0),wk=e=>(e.displayName="Transition",e.props=q0,e),CZ=wk((e,{slots:t})=>ml(lM,K0(e),t)),ss=(e,t=[])=>{Le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Lm=e=>e?Le(e)?e.some(t=>t.length>1):e.length>1:!1;function K0(e){const t={};for(const P in e)P in G0||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:i,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:h=o,appearToClass:c=u,leaveFromClass:l=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,p=Sk(r),g=p&&p[0],m=p&&p[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:S,onLeave:_,onLeaveCancelled:w,onBeforeAppear:b=v,onAppear:C=y,onAppearCancelled:M=S}=t,R=(P,I,E)=>{Sr(P,I?c:u),Sr(P,I?h:o),E&&E()},T=(P,I)=>{P._isLeaving=!1,Sr(P,l),Sr(P,f),Sr(P,d),I&&I()},A=P=>(I,E)=>{const L=P?C:y,O=()=>R(I,P,E);ss(L,[I,O]),Om(()=>{Sr(I,P?a:s),Yi(I,P?c:u),Lm(L)||Pm(I,i,g,O)})};return Et(t,{onBeforeEnter(P){ss(v,[P]),Yi(P,s),Yi(P,o)},onBeforeAppear(P){ss(b,[P]),Yi(P,a),Yi(P,h)},onEnter:A(!1),onAppear:A(!0),onLeave(P,I){P._isLeaving=!0;const E=()=>T(P,I);Yi(P,l),Yi(P,d),X0(),Om(()=>{!P._isLeaving||(Sr(P,l),Yi(P,f),Lm(_)||Pm(P,i,m,E))}),ss(_,[P,E])},onEnterCancelled(P){R(P,!1),ss(S,[P])},onAppearCancelled(P){R(P,!0),ss(M,[P])},onLeaveCancelled(P){T(P),ss(w,[P])}})}function Sk(e){if(e==null)return null;if(gt(e))return[Rh(e.enter),Rh(e.leave)];{const t=Rh(e);return[t,t]}}function Rh(e){return Oc(e)}function Yi(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[xo]||(e[xo]=new Set)).add(t)}function Sr(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[xo];n&&(n.delete(t),n.size||(e[xo]=void 0))}function Om(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Tk=0;function Pm(e,t,n,i){const r=e._endId=++Tk,s=()=>{r===e._endId&&i()};if(n!=null)return setTimeout(s,n);const{type:o,timeout:u,propCount:a}=Y0(e,t);if(!o)return i();const h=o+"end";let c=0;const l=()=>{e.removeEventListener(h,d),s()},d=f=>{f.target===e&&++c>=a&&l()};setTimeout(()=>{c<a&&l()},u+1),e.addEventListener(h,d)}function Y0(e,t){const n=window.getComputedStyle(e),i=p=>(n[p]||"").split(", "),r=i(`${mr}Delay`),s=i(`${mr}Duration`),o=Nm(r,s),u=i(`${oa}Delay`),a=i(`${oa}Duration`),h=Nm(u,a);let c=null,l=0,d=0;t===mr?o>0&&(c=mr,l=o,d=s.length):t===oa?h>0&&(c=oa,l=h,d=a.length):(l=Math.max(o,h),c=l>0?o>h?mr:oa:null,d=c?c===mr?s.length:a.length:0);const f=c===mr&&/\b(transform|all)(,|$)/.test(i(`${mr}Property`).toString());return{type:c,timeout:l,propCount:d,hasTransform:f}}function Nm(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>Dm(n)+Dm(e[i])))}function Dm(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function X0(){return document.body.offsetHeight}function Ek(e,t,n){const i=e[xo];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Gc=Symbol("_vod"),J0=Symbol("_vsh"),Lu={beforeMount(e,{value:t},{transition:n}){e[Gc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):aa(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),aa(e,!0),i.enter(e)):i.leave(e,()=>{aa(e,!1)}):aa(e,t))},beforeUnmount(e,{value:t}){aa(e,t)}};function aa(e,t){e.style.display=t?e[Gc]:"none",e[J0]=!t}function Ak(){Lu.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Q0=Symbol("");function xZ(e){const t=pn();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>qc(s,r))},i=()=>{const r=e(t.proxy);t.ce?qc(t.ce,r):Ud(t.subTree,r),n(r)};rp(()=>{qM(i)}),dl(()=>{const r=new MutationObserver(i);r.observe(t.subTree.el.parentNode,{childList:!0}),$u(()=>r.disconnect())})}function Ud(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Ud(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)qc(e.el,t);else if(e.type===tt)e.children.forEach(n=>Ud(n,t));else if(e.type===bo){let{el:n,anchor:i}=e;for(;n&&(qc(n,t),n!==i);)n=n.nextSibling}}function qc(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const r in t)n.setProperty(`--${r}`,t[r]),i+=`--${r}: ${t[r]};`;n[Q0]=i}}const Ck=/(^|;)\s*display\s*:/;function xk(e,t,n){const i=e.style,r=ut(n);let s=!1;if(n&&!r){if(t)if(ut(t))for(const o of t.split(";")){const u=o.slice(0,o.indexOf(":")).trim();n[u]==null&&wc(i,u,"")}else for(const o in t)n[o]==null&&wc(i,o,"");for(const o in n)o==="display"&&(s=!0),wc(i,o,n[o])}else if(r){if(t!==n){const o=i[Q0];o&&(n+=";"+o),i.cssText=n,s=Ck.test(n)}}else t&&e.removeAttribute("style");Gc in e&&(e[Gc]=s?i.display:"",e[J0]&&(i.display="none"))}const Fm=/\s*!important$/;function wc(e,t,n){if(Le(n))n.forEach(i=>wc(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Mk(e,t);Fm.test(n)?e.setProperty(An(i),n.replace(Fm,""),"important"):e[i]=n}}const Bm=["Webkit","Moz","ms"],Lh={};function Mk(e,t){const n=Lh[t];if(n)return n;let i=Mn(t);if(i!=="filter"&&i in e)return Lh[t]=i;i=bu(i);for(let r=0;r<Bm.length;r++){const s=Bm[r]+i;if(s in e)return Lh[t]=s}return t}const Hm="http://www.w3.org/1999/xlink";function Um(e,t,n,i,r,s=ax(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Hm,t.slice(6,t.length)):e.setAttributeNS(Hm,t,n):n==null||s&&!qf(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Fi(n)?String(n):n)}function kk(e,t,n,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?j0(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const o=r==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(o!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const o=typeof e[t];o==="boolean"?n=qf(n):n==null&&o==="string"?(n="",s=!0):o==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(t)}function tr(e,t,n,i){e.addEventListener(t,n,i)}function $k(e,t,n,i){e.removeEventListener(t,n,i)}const zm=Symbol("_vei");function Ik(e,t,n,i,r=null){const s=e[zm]||(e[zm]={}),o=s[t];if(i&&o)o.value=i;else{const[u,a]=Rk(t);if(i){const h=s[t]=Pk(i,r);tr(e,u,h,a)}else o&&($k(e,u,o,a),s[t]=void 0)}}const Wm=/(?:Once|Passive|Capture)$/;function Rk(e){let t;if(Wm.test(e)){t={};let i;for(;i=e.match(Wm);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):An(e.slice(2)),t]}let Oh=0;const Lk=Promise.resolve(),Ok=()=>Oh||(Lk.then(()=>Oh=0),Oh=Date.now());function Pk(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;mi(Nk(i,n.value),t,5,[i])};return n.value=e,n.attached=Ok(),n}function Nk(e,t){if(Le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>r=>!r._stopped&&i&&i(r))}else return t}const Vm=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dk=(e,t,n,i,r,s)=>{const o=r==="svg";t==="class"?Ek(e,i,o):t==="style"?xk(e,n,i):ul(t)?zf(t)||Ik(e,t,n,i,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Fk(e,t,i,o))?(kk(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Um(e,t,i,o,s,t!=="value")):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Um(e,t,i,o))};function Fk(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vm(t)&&Ne(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Vm(t)&&ut(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!ut(n)))}const jm={};/*! #__NO_SIDE_EFFECTS__ */function Bk(e,t,n){const i=ks(e,t);ds(i)&&Et(i,t);class r extends gp{constructor(o){super(i,o,n)}}return r.def=i,r}/*! #__NO_SIDE_EFFECTS__ */const MZ=(e,t)=>Bk(e,t,t$),Hk=typeof HTMLElement<"u"?HTMLElement:class{};class gp extends Hk{constructor(t,n={},i=zd){super(),this._def=t,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==zd?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof gp){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,Wr(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(i=>{for(const r of i)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(i,r=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:s,styles:o}=i;let u;if(s&&!Le(s))for(const a in s){const h=s[a];(h===Number||h&&h.type===Number)&&(a in this._props&&(this._props[a]=Oc(this._props[a])),(u||(u=Object.create(null)))[Mn(a)]=!0)}this._numberProps=u,r&&this._resolveProps(i),this.shadowRoot&&this._applyStyles(o),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>t(this._def=i,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(!!n)for(const i in n)st(this,i)||Object.defineProperty(this,i,{get:()=>Nr(n[i])})}_resolveProps(t){const{props:n}=t,i=Le(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&i.includes(r)&&this._setProp(r,this[r]);for(const r of i.map(Mn))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):jm;const r=Mn(t);n&&this._numberProps&&this._numberProps[r]&&(i=Oc(i)),this._setProp(r,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,r=!1){n!==this._props[t]&&(n===jm?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),r&&this._instance&&this._update(),i&&(n===!0?this.setAttribute(An(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(An(t),n+""):n||this.removeAttribute(An(t))))}_update(){e$(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Ee(this._def,Et(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const r=(s,o)=>{this.dispatchEvent(new CustomEvent(s,ds(o[0])?Et({detail:o},o[0]):{detail:o}))};i.emit=(s,...o)=>{r(s,o),An(s)!==s&&r(An(s),o)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let r=t.length-1;r>=0;r--){const s=document.createElement("style");i&&s.setAttribute("nonce",i),s.textContent=t[r],this.shadowRoot.prepend(s)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const r=t[i],s=r.getAttribute("name")||"default",o=this._slots[s],u=r.parentNode;if(o)for(const a of o){if(n&&a.nodeType===1){const h=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(h,"");let l;for(;l=c.nextNode();)l.setAttribute(h,"")}u.insertBefore(a,r)}else for(;r.firstChild;)u.insertBefore(r.firstChild,r);u.removeChild(r)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function Uk(e){const t=pn(),n=t&&t.ce;return n||null}function kZ(){const e=Uk();return e&&e.shadowRoot}function $Z(e="$style"){{const t=pn();if(!t)return et;const n=t.type.__cssModules;if(!n)return et;const i=n[e];return i||et}}const Z0=new WeakMap,ew=new WeakMap,Kc=Symbol("_moveCb"),Gm=Symbol("_enterCb"),zk=e=>(delete e.props.mode,e),Wk=zk({name:"TransitionGroup",props:Et({},q0,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=pn(),i=o0();let r,s;return sp(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!qk(r[0].el,n.vnode.el,o))return;r.forEach(Vk),r.forEach(jk);const u=r.filter(Gk);X0(),u.forEach(a=>{const h=a.el,c=h.style;Yi(h,o),c.transform=c.webkitTransform=c.transitionDuration="";const l=h[Kc]=d=>{d&&d.target!==h||(!d||/transform$/.test(d.propertyName))&&(h.removeEventListener("transitionend",l),h[Kc]=null,Sr(h,o))};h.addEventListener("transitionend",l)})}),()=>{const o=it(e),u=K0(o);let a=o.tag||tt;if(r=[],s)for(let h=0;h<s.length;h++){const c=s[h];c.el&&c.el instanceof Element&&(r.push(c),Vr(c,qa(c,u,i,n)),Z0.set(c,c.el.getBoundingClientRect()))}s=t.default?np(t.default()):[];for(let h=0;h<s.length;h++){const c=s[h];c.key!=null&&Vr(c,qa(c,u,i,n))}return Ee(a,null,s)}}}),IZ=Wk;function Vk(e){const t=e.el;t[Kc]&&t[Kc](),t[Gm]&&t[Gm]()}function jk(e){ew.set(e,e.el.getBoundingClientRect())}function Gk(e){const t=Z0.get(e),n=ew.get(e),i=t.left-n.left,r=t.top-n.top;if(i||r){const s=e.el.style;return s.transform=s.webkitTransform=`translate(${i}px,${r}px)`,s.transitionDuration="0s",e}}function qk(e,t,n){const i=e.cloneNode(),r=e[xo];r&&r.forEach(u=>{u.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),n.split(/\s+/).forEach(u=>u&&i.classList.add(u)),i.style.display="none";const s=t.nodeType===1?t:t.parentNode;s.appendChild(i);const{hasTransform:o}=Y0(i);return s.removeChild(i),o}const jr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Le(t)?n=>vo(t,n):t};function Kk(e){e.target.composing=!0}function qm(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ni=Symbol("_assign"),Bi={created(e,{modifiers:{lazy:t,trim:n,number:i}},r){e[ni]=jr(r);const s=i||r.props&&r.props.type==="number";tr(e,t?"change":"input",o=>{if(o.target.composing)return;let u=e.value;n&&(u=u.trim()),s&&(u=Lc(u)),e[ni](u)}),n&&tr(e,"change",()=>{e.value=e.value.trim()}),t||(tr(e,"compositionstart",Kk),tr(e,"compositionend",qm),tr(e,"change",qm))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:r,number:s}},o){if(e[ni]=jr(o),e.composing)return;const u=(s||e.type==="number")&&!/^0\d/.test(e.value)?Lc(e.value):e.value,a=t??"";u!==a&&(document.activeElement===e&&e.type!=="range"&&(i&&t===n||r&&e.value.trim()===a)||(e.value=a))}},mp={deep:!0,created(e,t,n){e[ni]=jr(n),tr(e,"change",()=>{const i=e._modelValue,r=Mo(e),s=e.checked,o=e[ni];if(Le(i)){const u=wu(i,r),a=u!==-1;if(s&&!a)o(i.concat(r));else if(!s&&a){const h=[...i];h.splice(u,1),o(h)}}else if(xs(i)){const u=new Set(i);s?u.add(r):u.delete(r),o(u)}else o(tw(e,s))})},mounted:Km,beforeUpdate(e,t,n){e[ni]=jr(n),Km(e,t,n)}};function Km(e,{value:t,oldValue:n},i){e._modelValue=t;let r;Le(t)?r=wu(t,i.props.value)>-1:xs(t)?r=t.has(i.props.value):r=zr(t,tw(e,!0)),e.checked!==r&&(e.checked=r)}const vp={created(e,{value:t},n){e.checked=zr(t,n.props.value),e[ni]=jr(n),tr(e,"change",()=>{e[ni](Mo(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[ni]=jr(i),t!==n&&(e.checked=zr(t,i.props.value))}},Yk={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const r=xs(t);tr(e,"change",()=>{const s=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Lc(Mo(o)):Mo(o));e[ni](e.multiple?r?new Set(s):s:s[0]),e._assigning=!0,Wr(()=>{e._assigning=!1})}),e[ni]=jr(i)},mounted(e,{value:t,modifiers:{number:n}}){Ym(e,t)},beforeUpdate(e,t,n){e[ni]=jr(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Ym(e,t)}};function Ym(e,t,n){const i=e.multiple,r=Le(t);if(!(i&&!r&&!xs(t))){for(let s=0,o=e.options.length;s<o;s++){const u=e.options[s],a=Mo(u);if(i)if(r){const h=typeof a;h==="string"||h==="number"?u.selected=t.some(c=>String(c)===String(a)):u.selected=wu(t,a)>-1}else u.selected=t.has(a);else if(zr(Mo(u),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!i&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Mo(e){return"_value"in e?e._value:e.value}function tw(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const yp={created(e,t,n){Gl(e,t,n,null,"created")},mounted(e,t,n){Gl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){Gl(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){Gl(e,t,n,i,"updated")}};function nw(e,t){switch(e){case"SELECT":return Yk;case"TEXTAREA":return Bi;default:switch(t){case"checkbox":return mp;case"radio":return vp;default:return Bi}}}function Gl(e,t,n,i,r){const o=nw(e.tagName,n.props&&n.props.type)[r];o&&o(e,t,n,i)}function Xk(){Bi.getSSRProps=({value:e})=>({value:e}),vp.getSSRProps=({value:e},t)=>{if(t.props&&zr(t.props.value,e))return{checked:!0}},mp.getSSRProps=({value:e},t)=>{if(Le(e)){if(t.props&&wu(e,t.props.value)>-1)return{checked:!0}}else if(xs(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},yp.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=nw(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const Jk=["ctrl","shift","alt","meta"],Qk={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Jk.some(n=>e[`${n}Key`]&&!t.includes(n))},Bt=(e,t)=>{const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(r,...s)=>{for(let o=0;o<t.length;o++){const u=Qk[t[o]];if(u&&u(r,t))return}return e(r,...s)})},Zk={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},no=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=r=>{if(!("key"in r))return;const s=An(r.key);if(t.some(o=>o===s||Zk[o]===s))return e(r)})},iw=Et({patchProp:Dk},bk);let Ia,Xm=!1;function rw(){return Ia||(Ia=zM(iw))}function sw(){return Ia=Xm?Ia:WM(iw),Xm=!0,Ia}const e$=(...e)=>{rw().render(...e)},RZ=(...e)=>{sw().hydrate(...e)},zd=(...e)=>{const t=rw().createApp(...e),{mount:n}=t;return t.mount=i=>{const r=aw(i);if(!r)return;const s=t._component;!Ne(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,ow(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},t$=(...e)=>{const t=sw().createApp(...e),{mount:n}=t;return t.mount=i=>{const r=aw(i);if(r)return n(r,!0,ow(r))},t};function ow(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function aw(e){return ut(e)?document.querySelector(e):e}let Jm=!1;const LZ=()=>{Jm||(Jm=!0,Xk(),Ak())},lw=Object.prototype.toString;function cw(e){switch(lw.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return or(e,Error)}}function Ko(e,t){return lw.call(e)===`[object ${t}]`}function _p(e){return Ko(e,"ErrorEvent")}function Qm(e){return Ko(e,"DOMError")}function n$(e){return Ko(e,"DOMException")}function Ni(e){return Ko(e,"String")}function bp(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function wp(e){return e===null||bp(e)||typeof e!="object"&&typeof e!="function"}function ko(e){return Ko(e,"Object")}function Ou(e){return typeof Event<"u"&&or(e,Event)}function i$(e){return typeof Element<"u"&&or(e,Element)}function r$(e){return Ko(e,"RegExp")}function Pu(e){return Boolean(e&&e.then&&typeof e.then=="function")}function s$(e){return ko(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function uw(e){return typeof e=="number"&&e!==e}function or(e,t){try{return e instanceof t}catch{return!1}}function hw(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function wo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Zm(e,t){if(!Array.isArray(e))return"";const n=[];for(let i=0;i<e.length;i++){const r=e[i];try{hw(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function o$(e,t,n=!1){return Ni(e)?r$(t)?t.test(e):Ni(t)?n?e===t:e.includes(t):!1:!1}function Yo(e,t=[],n=!1){return t.some(i=>o$(e,i,n))}function a$(e,t,n=250,i,r,s,o){if(!s.exception||!s.exception.values||!o||!or(o.originalException,Error))return;const u=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;u&&(s.exception.values=l$(Wd(e,t,r,o.originalException,i,s.exception.values,u,0),n))}function Wd(e,t,n,i,r,s,o,u){if(s.length>=n+1)return s;let a=[...s];if(or(i[r],Error)){ev(o,u);const h=e(t,i[r]),c=a.length;tv(h,r,c,u),a=Wd(e,t,n,i[r],r,[h,...a],h,c)}return Array.isArray(i.errors)&&i.errors.forEach((h,c)=>{if(or(h,Error)){ev(o,u);const l=e(t,h),d=a.length;tv(l,`errors[${c}]`,d,u),a=Wd(e,t,n,h,r,[l,...a],l,d)}}),a}function ev(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function tv(e,t,n,i){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:i}}function l$(e,t){return e.map(n=>(n.value&&(n.value=wo(n.value,t)),n))}function ql(e){return e&&e.Math==Math?e:void 0}const nt=typeof globalThis=="object"&&ql(globalThis)||typeof window=="object"&&ql(window)||typeof self=="object"&&ql(self)||typeof global=="object"&&ql(global)||function(){return this}()||{};function Sp(){return nt}function dw(e,t,n){const i=n||nt,r=i.__SENTRY__=i.__SENTRY__||{};return r[e]||(r[e]=t())}const So=Sp(),c$=80;function ws(e,t={}){if(!e)return"<unknown>";try{let n=e;const i=5,r=[];let s=0,o=0;const u=" > ",a=u.length;let h;const c=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||c$;for(;n&&s++<i&&(h=u$(n,c),!(h==="html"||s>1&&o+r.length*a+h.length>=l));)r.push(h),o+=h.length,n=n.parentNode;return r.reverse().join(u)}catch{return"<unknown>"}}function u$(e,t){const n=e,i=[];let r,s,o,u,a;if(!n||!n.tagName)return"";if(So.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;i.push(n.tagName.toLowerCase());const h=t&&t.length?t.filter(l=>n.getAttribute(l)).map(l=>[l,n.getAttribute(l)]):null;if(h&&h.length)h.forEach(l=>{i.push(`[${l[0]}="${l[1]}"]`)});else if(n.id&&i.push(`#${n.id}`),r=n.className,r&&Ni(r))for(s=r.split(/\s+/),a=0;a<s.length;a++)i.push(`.${s[a]}`);const c=["aria-label","type","name","title","alt"];for(a=0;a<c.length;a++)o=c[a],u=n.getAttribute(o),u&&i.push(`[${o}="${u}"]`);return i.join("")}function h$(){try{return So.document.location.href}catch{return""}}function d$(e){return So.document&&So.document.querySelector?So.document.querySelector(e):null}function fw(e){if(!So.HTMLElement)return null;let t=e;const n=5;for(let i=0;i<n;i++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Xo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,f$="Sentry Logger ",Vd=["debug","info","warn","error","log","assert","trace"],Yc={};function Hi(e){if(!("console"in nt))return e();const t=nt.console,n={},i=Object.keys(Yc);i.forEach(r=>{const s=Yc[r];n[r]=t[r],t[r]=s});try{return e()}finally{i.forEach(r=>{t[r]=n[r]})}}function p$(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Xo?Vd.forEach(n=>{t[n]=(...i)=>{e&&Hi(()=>{nt.console[n](`${f$}[${n}]:`,...i)})}}):Vd.forEach(n=>{t[n]=()=>{}}),t}const pe=p$(),g$=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function m$(e){return e==="http"||e==="https"}function vl(e,t=!1){const{host:n,path:i,pass:r,port:s,projectId:o,protocol:u,publicKey:a}=e;return`${u}://${a}${t&&r?`:${r}`:""}@${n}${s?`:${s}`:""}/${i&&`${i}/`}${o}`}function v$(e){const t=g$.exec(e);if(!t){Hi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,i,r="",s,o="",u]=t.slice(1);let a="",h=u;const c=h.split("/");if(c.length>1&&(a=c.slice(0,-1).join("/"),h=c.pop()),h){const l=h.match(/^\d+/);l&&(h=l[0])}return pw({host:s,pass:r,path:a,projectId:h,port:o,protocol:n,publicKey:i})}function pw(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function y$(e){if(!Xo)return!0;const{port:t,projectId:n,protocol:i}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(pe.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?m$(i)?t&&isNaN(parseInt(t,10))?(pe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(pe.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(pe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function _$(e){const t=typeof e=="string"?v$(e):pw(e);if(!(!t||!y$(t)))return t}class $i extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function Qt(e,t,n){if(!(t in e))return;const i=e[t],r=n(i);typeof r=="function"&&gw(r,i),e[t]=r}function Xa(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Xo&&pe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function gw(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Xa(e,"__sentry_original__",t)}catch{}}function Tp(e){return e.__sentry_original__}function b$(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function mw(e){if(cw(e))return{message:e.message,name:e.name,stack:e.stack,...iv(e)};if(Ou(e)){const t={type:e.type,target:nv(e.target),currentTarget:nv(e.currentTarget),...iv(e)};return typeof CustomEvent<"u"&&or(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function nv(e){try{return i$(e)?ws(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function iv(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function w$(e,t=40){const n=Object.keys(mw(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return wo(n[0],t);for(let i=n.length;i>0;i--){const r=n.slice(0,i).join(", ");if(!(r.length>t))return i===n.length?r:wo(r,t)}return""}function Nn(e){return jd(e,new Map)}function jd(e,t){if(S$(e)){const n=t.get(e);if(n!==void 0)return n;const i={};t.set(e,i);for(const r of Object.keys(e))typeof e[r]<"u"&&(i[r]=jd(e[r],t));return i}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const i=[];return t.set(e,i),e.forEach(r=>{i.push(jd(r,t))}),i}return e}function S$(e){if(!ko(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const vw=50,rv=/\(error: (.*)\)/,sv=/captureMessage|captureException/;function yw(...e){const t=e.sort((n,i)=>n[0]-i[0]).map(n=>n[1]);return(n,i=0)=>{const r=[],s=n.split(`
`);for(let o=i;o<s.length;o++){const u=s[o];if(u.length>1024)continue;const a=rv.test(u)?u.replace(rv,"$1"):u;if(!a.match(/\S*Error: /)){for(const h of t){const c=h(a);if(c){r.push(c);break}}if(r.length>=vw)break}}return E$(r)}}function T$(e){return Array.isArray(e)?yw(...e):e}function E$(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),sv.test(t[t.length-1].function||"")&&(t.pop(),sv.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,vw).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const Ph="<anonymous>";function ar(e){try{return!e||typeof e!="function"?Ph:e.name||Ph}catch{return Ph}}const Sc={},ov={};function $s(e,t){Sc[e]=Sc[e]||[],Sc[e].push(t)}function Is(e,t){ov[e]||(t(),ov[e]=!0)}function pi(e,t){const n=e&&Sc[e];if(!!n)for(const i of n)try{i(t)}catch(r){Xo&&pe.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${ar(i)}
Error:`,r)}}function A$(e){const t="console";$s(t,e),Is(t,C$)}function C$(){"console"in nt&&Vd.forEach(function(e){e in nt.console&&Qt(nt.console,e,function(t){return Yc[e]=t,function(...n){pi("console",{args:n,level:e});const r=Yc[e];r&&r.apply(nt.console,n)}})})}function Yt(){const e=nt,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const i=new Uint8Array(1);return t.getRandomValues(i),i[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,i=>(i^(n()&15)>>i/4).toString(16))}function _w(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Rr(e){const{message:t,event_id:n}=e;if(t)return t;const i=_w(e);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function Gd(e,t,n){const i=e.exception=e.exception||{},r=i.values=i.values||[],s=r[0]=r[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function Ja(e,t){const n=_w(e);if(!n)return;const i={type:"generic",handled:!0},r=n.mechanism;if(n.mechanism={...i,...r,...t},t&&"data"in t){const s={...r&&r.data,...t.data};n.mechanism.data=s}}function av(e){if(e&&e.__sentry_captured__)return!0;try{Xa(e,"__sentry_captured__",!0)}catch{}return!1}function Ep(e){return Array.isArray(e)?e:[e]}const Js=nt,x$=1e3;let lv,qd,Kd;function bw(e){const t="dom";$s(t,e),Is(t,M$)}function M$(){if(!Js.document)return;const e=pi.bind(null,"dom"),t=cv(e,!0);Js.document.addEventListener("click",t,!1),Js.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Js[n]&&Js[n].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Qt(i,"addEventListener",function(r){return function(s,o,u){if(s==="click"||s=="keypress")try{const a=this,h=a.__sentry_instrumentation_handlers__=a.__sentry_instrumentation_handlers__||{},c=h[s]=h[s]||{refCount:0};if(!c.handler){const l=cv(e);c.handler=l,r.call(this,s,l,u)}c.refCount++}catch{}return r.call(this,s,o,u)}}),Qt(i,"removeEventListener",function(r){return function(s,o,u){if(s==="click"||s=="keypress")try{const a=this,h=a.__sentry_instrumentation_handlers__||{},c=h[s];c&&(c.refCount--,c.refCount<=0&&(r.call(this,s,c.handler,u),c.handler=void 0,delete h[s]),Object.keys(h).length===0&&delete a.__sentry_instrumentation_handlers__)}catch{}return r.call(this,s,o,u)}}))})}function k$(e){if(e.type!==qd)return!1;try{if(!e.target||e.target._sentryId!==Kd)return!1}catch{}return!0}function $$(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function cv(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const i=I$(n);if($$(n.type,i))return;Xa(n,"_sentryCaptured",!0),i&&!i._sentryId&&Xa(i,"_sentryId",Yt());const r=n.type==="keypress"?"input":n.type;k$(n)||(e({event:n,name:r,global:t}),qd=n.type,Kd=i?i._sentryId:void 0),clearTimeout(lv),lv=Js.setTimeout(()=>{Kd=void 0,qd=void 0},x$)}}function I$(e){try{return e.target}catch{return null}}const Yd=Sp();function ww(){if(!("fetch"in Yd))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Xd(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function R$(){if(typeof EdgeRuntime=="string")return!0;if(!ww())return!1;if(Xd(Yd.fetch))return!0;let e=!1;const t=Yd.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Xd(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Xo&&pe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Ap(e){const t="fetch";$s(t,e),Is(t,L$)}function L$(){!R$()||Qt(nt,"fetch",function(e){return function(...t){const{method:n,url:i}=O$(t),r={args:t,fetchData:{method:n,url:i},startTimestamp:Date.now()};return pi("fetch",{...r}),e.apply(nt,t).then(s=>{const o={...r,endTimestamp:Date.now(),response:s};return pi("fetch",o),s},s=>{const o={...r,endTimestamp:Date.now(),error:s};throw pi("fetch",o),s})}})}function Jd(e,t){return!!e&&typeof e=="object"&&!!e[t]}function uv(e){return typeof e=="string"?e:e?Jd(e,"url")?e.url:e.toString?e.toString():"":""}function O$(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,i]=e;return{url:uv(n),method:Jd(i,"method")?String(i.method).toUpperCase():"GET"}}const t=e[0];return{url:uv(t),method:Jd(t,"method")?String(t.method).toUpperCase():"GET"}}let Kl=null;function Sw(e){const t="error";$s(t,e),Is(t,P$)}function P$(){Kl=nt.onerror,nt.onerror=function(e,t,n,i,r){return pi("error",{column:i,error:r,line:n,msg:e,url:t}),Kl&&!Kl.__SENTRY_LOADER__?Kl.apply(this,arguments):!1},nt.onerror.__SENTRY_INSTRUMENTED__=!0}let Yl=null;function Tw(e){const t="unhandledrejection";$s(t,e),Is(t,N$)}function N$(){Yl=nt.onunhandledrejection,nt.onunhandledrejection=function(e){return pi("unhandledrejection",e),Yl&&!Yl.__SENTRY_LOADER__?Yl.apply(this,arguments):!0},nt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Xl=Sp();function D$(){const e=Xl.chrome,t=e&&e.app&&e.app.runtime,n="history"in Xl&&!!Xl.history.pushState&&!!Xl.history.replaceState;return!t&&n}const la=nt;let Jl;function Nu(e){const t="history";$s(t,e),Is(t,F$)}function F$(){if(!D$())return;const e=la.onpopstate;la.onpopstate=function(...n){const i=la.location.href,r=Jl;if(Jl=i,pi("history",{from:r,to:i}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...i){const r=i.length>2?i[2]:void 0;if(r){const s=Jl,o=String(r);Jl=o,pi("history",{from:s,to:o})}return n.apply(this,i)}}Qt(la.history,"pushState",t),Qt(la.history,"replaceState",t)}const B$=nt,Lr="__sentry_xhr_v3__";function Cp(e){const t="xhr";$s(t,e),Is(t,H$)}function H$(){if(!B$.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;Qt(e,"open",function(t){return function(...n){const i=Date.now(),r=Ni(n[0])?n[0].toUpperCase():void 0,s=U$(n[1]);if(!r||!s)return t.apply(this,n);this[Lr]={method:r,url:s,request_headers:{}},r==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const u=this[Lr];if(!!u&&this.readyState===4){try{u.status_code=this.status}catch{}const a={args:[r,s],endTimestamp:Date.now(),startTimestamp:i,xhr:this};pi("xhr",a)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Qt(this,"onreadystatechange",function(u){return function(...a){return o(),u.apply(this,a)}}):this.addEventListener("readystatechange",o),Qt(this,"setRequestHeader",function(u){return function(...a){const[h,c]=a,l=this[Lr];return l&&Ni(h)&&Ni(c)&&(l.request_headers[h.toLowerCase()]=c),u.apply(this,a)}}),t.apply(this,n)}}),Qt(e,"send",function(t){return function(...n){const i=this[Lr];if(!i)return t.apply(this,n);n[0]!==void 0&&(i.body=n[0]);const r={args:[i.method,i.url],startTimestamp:Date.now(),xhr:this};return pi("xhr",r),t.apply(this,n)}})}function U$(e){if(Ni(e))return e;try{return e.toString()}catch{}}function z$(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function W$(){return"npm"}function V$(){return!z$()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function hv(){return typeof window<"u"&&(!V$()||j$())}function j$(){return nt.process!==void 0&&nt.process.type==="renderer"}function G$(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(r){if(e)return t.has(r)?!0:(t.add(r),!1);for(let s=0;s<t.length;s++)if(t[s]===r)return!0;return t.push(r),!1}function i(r){if(e)t.delete(r);else for(let s=0;s<t.length;s++)if(t[s]===r){t.splice(s,1);break}}return[n,i]}function Mi(e,t=100,n=1/0){try{return Qd("",e,t,n)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function Ew(e,t=3,n=100*1024){const i=Mi(e,t);return X$(i)>n?Ew(e,t-1,n):i}function Qd(e,t,n=1/0,i=1/0,r=G$()){const[s,o]=r;if(t==null||["number","boolean","string"].includes(typeof t)&&!uw(t))return t;const u=q$(e,t);if(!u.startsWith("[object "))return u;if(t.__sentry_skip_normalization__)return t;const a=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(a===0)return u.replace("object ","");if(s(t))return"[Circular ~]";const h=t;if(h&&typeof h.toJSON=="function")try{const f=h.toJSON();return Qd("",f,a-1,i,r)}catch{}const c=Array.isArray(t)?[]:{};let l=0;const d=mw(t);for(const f in d){if(!Object.prototype.hasOwnProperty.call(d,f))continue;if(l>=i){c[f]="[MaxProperties ~]";break}const p=d[f];c[f]=Qd(f,p,a-1,i,r),l++}return o(t),c}function q$(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(hw(t))return"[VueViewModel]";if(s$(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${ar(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=K$(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function K$(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Y$(e){return~-encodeURI(e).split(/%..|./).length}function X$(e){return Y$(JSON.stringify(e))}var Qi;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const i=2;e[e.REJECTED=i]="REJECTED"})(Qi||(Qi={}));function $o(e){return new Vn(t=>{t(e)})}function xp(e){return new Vn((t,n)=>{n(e)})}class Vn{constructor(t){Vn.prototype.__init.call(this),Vn.prototype.__init2.call(this),Vn.prototype.__init3.call(this),Vn.prototype.__init4.call(this),this._state=Qi.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Vn((i,r)=>{this._handlers.push([!1,s=>{if(!t)i(s);else try{i(t(s))}catch(o){r(o)}},s=>{if(!n)r(s);else try{i(n(s))}catch(o){r(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Vn((n,i)=>{let r,s;return this.then(o=>{s=!1,r=o,t&&t()},o=>{s=!0,r=o,t&&t()}).then(()=>{if(s){i(r);return}n(r)})})}__init(){this._resolve=t=>{this._setResult(Qi.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Qi.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Qi.PENDING){if(Pu(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Qi.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Qi.RESOLVED&&n[1](this._value),this._state===Qi.REJECTED&&n[2](this._value),n[0]=!0)})}}}function J$(e){const t=[];function n(){return e===void 0||t.length<e}function i(o){return t.splice(t.indexOf(o),1)[0]}function r(o){if(!n())return xp(new $i("Not adding Promise because buffer limit was reached."));const u=o();return t.indexOf(u)===-1&&t.push(u),u.then(()=>i(u)).then(null,()=>i(u).then(null,()=>{})),u}function s(o){return new Vn((u,a)=>{let h=t.length;if(!h)return u(!0);const c=setTimeout(()=>{o&&o>0&&u(!1)},o);t.forEach(l=>{$o(l).then(()=>{--h||(clearTimeout(c),u(!0))},a)})})}return{$:t,add:r,drain:s}}function Tc(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:i,relative:t[5]+n+i}}const Q$=["fatal","error","warning","log","info","debug"];function Z$(e){return e==="warn"?"warning":Q$.includes(e)?e:"log"}const Aw=1e3;function yl(){return Date.now()/Aw}function eI(){const{performance:e}=nt;if(!e||!e.now)return yl;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Aw}const Jo=eI(),vi=(()=>{const{performance:e}=nt;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),i=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,s=r<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number"?Math.abs(o+n-i):t,h=a<t;return s||h?r<=a?e.timeOrigin:o:i})(),Zd="baggage",Cw="sentry-",tI=/^sentry-/,nI=8192;function iI(e){if(!Ni(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((i,r)=>{const s=dv(r);for(const o of Object.keys(s))i[o]=s[o];return i},{});else{if(!e)return;t=dv(e)}const n=Object.entries(t).reduce((i,[r,s])=>{if(r.match(tI)){const o=r.slice(Cw.length);i[o]=s}return i},{});if(Object.keys(n).length>0)return n}function ef(e){if(!e)return;const t=Object.entries(e).reduce((n,[i,r])=>(r&&(n[`${Cw}${i}`]=r),n),{});return rI(t)}function dv(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,i])=>(t[n]=i,t),{})}function rI(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,i],r)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(i)}`,o=r===0?s:`${t},${s}`;return o.length>nI?(Xo&&pe.warn(`Not adding key: ${n} with val: ${i} to baggage header due to exceeding baggage size limits.`),t):o},"")}const sI=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function oI(e){if(!e)return;const t=e.match(sI);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function aI(e,t){const n=oI(e),i=iI(t),{traceId:r,parentSpanId:s,parentSampled:o}=n||{},u={traceId:r||Yt(),spanId:Yt().substring(16),sampled:o};return s&&(u.parentSpanId=s),i&&(u.dsc=i),{traceparentData:n,dynamicSamplingContext:i,propagationContext:u}}function Mp(e=Yt(),t=Yt().substring(16),n){let i="";return n!==void 0&&(i=n?"-1":"-0"),`${e}-${t}${i}`}function Rs(e,t=[]){return[e,t]}function lI(e,t){const[n,i]=e;return[n,[...i,t]]}function fv(e,t){const n=e[1];for(const i of n){const r=i[0].type;if(t(i,r))return!0}return!1}function tf(e,t){return(t||new TextEncoder).encode(e)}function cI(e,t){const[n,i]=e;let r=JSON.stringify(n);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[tf(r,t),o]:r.push(typeof o=="string"?tf(o,t):o)}for(const o of i){const[u,a]=o;if(s(`
${JSON.stringify(u)}
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let h;try{h=JSON.stringify(a)}catch{h=JSON.stringify(Mi(a))}s(h)}}return typeof r=="string"?r:uI(r)}function uI(e){const t=e.reduce((r,s)=>r+s.length,0),n=new Uint8Array(t);let i=0;for(const r of e)n.set(r,i),i+=r.length;return n}function hI(e,t){const n=typeof e.data=="string"?tf(e.data,t):e.data;return[Nn({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const dI={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function pv(e){return dI[e]}function kp(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function xw(e,t,n,i){const r=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&i&&{dsn:vl(i)},...r&&{trace:Nn({...r})}}}function fI(e,t,n){const i=[{type:"client_report"},{timestamp:n||yl(),discarded_events:e}];return Rs(t?{dsn:t}:{},[i])}const pI=60*1e3;function gI(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const i=Date.parse(`${e}`);return isNaN(i)?pI:i-t}function mI(e,t){return e[t]||e.all||0}function Mw(e,t,n=Date.now()){return mI(e,t)>n}function kw(e,{statusCode:t,headers:n},i=Date.now()){const r={...e},s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(const u of s.trim().split(",")){const[a,h]=u.split(":",2),c=parseInt(a,10),l=(isNaN(c)?60:c)*1e3;if(!h)r.all=i+l;else for(const d of h.split(";"))r[d]=i+l}else o?r.all=i+gI(o,i):t===429&&(r.all=i+60*1e3);return r}function vI(e,t){return e??t()}function Nh(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}const Pe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Du="production";function $p(){return dw("globalEventProcessors",()=>[])}function yI(e){$p().push(e)}function Xc(e,t,n,i=0){return new Vn((r,s)=>{const o=e[i];if(t===null||typeof o!="function")r(t);else{const u=o({...t},n);Pe&&o.id&&u===null&&pe.log(`Event processor "${o.id}" dropped event`),Pu(u)?u.then(a=>Xc(e,a,n,i+1).then(r)).then(null,s):Xc(e,u,n,i+1).then(r).then(null,s)}})}function $w(e){const t=Jo(),n={sid:Yt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>_I(n)};return e&&Ss(n,e),n}function Ss(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Jo(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Yt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Iw(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Ss(e,n)}function _I(e){return Nn({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const bI=0,Rw=1;function Ip(e){const{spanId:t,traceId:n}=e.spanContext(),{data:i,op:r,parent_span_id:s,status:o,tags:u,origin:a}=ln(e);return Nn({data:i,op:r,parent_span_id:s,span_id:t,status:o,tags:u,trace_id:n,origin:a})}function Fu(e){const{traceId:t,spanId:n}=e.spanContext(),i=Lp(e);return Mp(t,n,i)}function Rp(e){return typeof e=="number"?gv(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?gv(e.getTime()):Jo()}function gv(e){return e>9999999999?e/1e3:e}function ln(e){return wI(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function wI(e){return typeof e.getSpanJSON=="function"}function Lp(e){const{traceFlags:t}=e.spanContext();return Boolean(t&Rw)}function Lw(e,t,n,i,r,s){const{normalizeDepth:o=3,normalizeMaxBreadth:u=1e3}=e,a={...t,event_id:t.event_id||n.event_id||Yt(),timestamp:t.timestamp||yl()},h=n.integrations||e.integrations.map(m=>m.name);SI(a,e),AI(a,h),t.type===void 0&&TI(a,e.stackParser);const c=xI(i,n.captureContext);n.mechanism&&Ja(a,n.mechanism);const l=r&&r.getEventProcessors?r.getEventProcessors():[],d=HI().getScopeData();if(s){const m=s.getScopeData();_v(d,m)}if(c){const m=c.getScopeData();_v(d,m)}const f=[...n.attachments||[],...d.attachments];f.length&&(n.attachments=f),Dw(a,d);const p=[...l,...$p(),...d.eventProcessors];return Xc(p,a,n).then(m=>(m&&EI(m),typeof o=="number"&&o>0?CI(m,o,u):m))}function SI(e,t){const{environment:n,release:i,dist:r,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:Du),e.release===void 0&&i!==void 0&&(e.release=i),e.dist===void 0&&r!==void 0&&(e.dist=r),e.message&&(e.message=wo(e.message,s));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=wo(o.value,s));const u=e.request;u&&u.url&&(u.url=wo(u.url,s))}const mv=new WeakMap;function TI(e,t){const n=nt._sentryDebugIds;if(!n)return;let i;const r=mv.get(t);r?i=r:(i=new Map,mv.set(t,i));const s=Object.keys(n).reduce((o,u)=>{let a;const h=i.get(u);h?a=h:(a=t(u),i.set(u,a));for(let c=a.length-1;c>=0;c--){const l=a[c];if(l.filename){o[l.filename]=n[u];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(u=>{u.filename&&(u.debug_id=s[u.filename])})})}catch{}}function EI(e){const t={};try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(r=>{r.debug_id&&(r.abs_path?t[r.abs_path]=r.debug_id:r.filename&&(t[r.filename]=r.debug_id),delete r.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(i=>{n.push({type:"sourcemap",code_file:i,debug_id:t[i]})})}function AI(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function CI(e,t,n){if(!e)return null;const i={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(r=>({...r,...r.data&&{data:Mi(r.data,t,n)}}))},...e.user&&{user:Mi(e.user,t,n)},...e.contexts&&{contexts:Mi(e.contexts,t,n)},...e.extra&&{extra:Mi(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&i.contexts&&(i.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(i.contexts.trace.data=Mi(e.contexts.trace.data,t,n))),e.spans&&(i.spans=e.spans.map(r=>{const s=ln(r).data;return s&&(r.data=Mi(s,t,n)),r})),i}function xI(e,t){if(!t)return e;const n=e?e.clone():new Ii;return n.update(t),n}function MI(e){if(!!e)return kI(e)?{captureContext:e}:II(e)?{captureContext:e}:e}function kI(e){return e instanceof Ii||typeof e=="function"}const $I=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function II(e){return Object.keys(e).some(t=>$I.includes(t))}function Bu(e,t){return oi().captureException(e,MI(t))}function Ow(e,t){return oi().captureEvent(e,t)}function Gr(e,t){oi().addBreadcrumb(e,t)}function RI(e,t){oi().setContext(e,t)}function LI(...e){const t=oi();if(e.length===2){const[n,i]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,i(n))):t.withScope(i)}return t.withScope(e[0])}function At(){return oi().getClient()}function si(){return oi().getScope()}function vv(e){const t=At(),n=bl(),i=si(),{release:r,environment:s=Du}=t&&t.getOptions()||{},{userAgent:o}=nt.navigator||{},u=$w({release:r,environment:s,user:i.getUser()||n.getUser(),...o&&{userAgent:o},...e}),a=n.getSession();return a&&a.status==="ok"&&Ss(a,{status:"exited"}),Pw(),n.setSession(u),i.setSession(u),u}function Pw(){const e=bl(),t=si(),n=t.getSession()||e.getSession();n&&Iw(n),Nw(),e.setSession(),t.setSession()}function Nw(){const e=bl(),t=si(),n=At(),i=t.getSession()||e.getSession();i&&n&&n.captureSession&&n.captureSession(i)}function yv(e=!1){if(e){Pw();return}Nw()}function Io(e){return e.transaction}function Hu(e,t,n){const i=t.getOptions(),{publicKey:r}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},o=Nn({environment:i.environment||Du,release:i.release,user_segment:s,public_key:r,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function Qa(e){const t=At();if(!t)return{};const n=Hu(ln(e).trace_id||"",t,si()),i=Io(e);if(!i)return n;const r=i&&i._frozenDynamicSamplingContext;if(r)return r;const{sampleRate:s,source:o}=i.metadata;s!=null&&(n.sample_rate=`${s}`);const u=ln(i);return o&&o!=="url"&&(n.transaction=u.description),n.sampled=String(Lp(i)),t.emit&&t.emit("createDsc",n),n}function Dw(e,t){const{fingerprint:n,span:i,breadcrumbs:r,sdkProcessingMetadata:s,propagationContext:o}=t;OI(e,t),i&&DI(e,i),FI(e,n),PI(e,r),NI(e,s,o)}function _v(e,t){const{extra:n,tags:i,user:r,contexts:s,level:o,sdkProcessingMetadata:u,breadcrumbs:a,fingerprint:h,eventProcessors:c,attachments:l,propagationContext:d,transactionName:f,span:p}=t;ca(e,"extra",n),ca(e,"tags",i),ca(e,"user",r),ca(e,"contexts",s),ca(e,"sdkProcessingMetadata",u),o&&(e.level=o),f&&(e.transactionName=f),p&&(e.span=p),a.length&&(e.breadcrumbs=[...e.breadcrumbs,...a]),h.length&&(e.fingerprint=[...e.fingerprint,...h]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...d}}function ca(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[t][i]=n[i])}}function OI(e,t){const{extra:n,tags:i,user:r,contexts:s,level:o,transactionName:u}=t,a=Nn(n);a&&Object.keys(a).length&&(e.extra={...a,...e.extra});const h=Nn(i);h&&Object.keys(h).length&&(e.tags={...h,...e.tags});const c=Nn(r);c&&Object.keys(c).length&&(e.user={...c,...e.user});const l=Nn(s);l&&Object.keys(l).length&&(e.contexts={...l,...e.contexts}),o&&(e.level=o),u&&(e.transaction=u)}function PI(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function NI(e,t,n){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t,propagationContext:n}}function DI(e,t){e.contexts={trace:Ip(t),...e.contexts};const n=Io(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Qa(t),...e.sdkProcessingMetadata};const i=ln(n).description;i&&(e.tags={transaction:i,...e.tags})}}function FI(e,t){e.fingerprint=e.fingerprint?Ep(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const BI=100;let Dh;class Ii{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=bv()}static clone(t){return t?t.clone():new Ii}clone(){const t=new Ii;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Ss(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof Ii?n:this}return t instanceof Ii?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):ko(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=bv(),this}addBreadcrumb(t,n){const i=typeof n=="number"?n:BI;if(i<=0)return this;const r={timestamp:yl(),...t},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>i?s.slice(-i):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:i,_tags:r,_extra:s,_user:o,_level:u,_fingerprint:a,_eventProcessors:h,_propagationContext:c,_sdkProcessingMetadata:l,_transactionName:d,_span:f}=this;return{breadcrumbs:t,attachments:n,contexts:i,tags:r,extra:s,user:o,level:u,fingerprint:a||[],eventProcessors:h,propagationContext:c,sdkProcessingMetadata:l,transactionName:d,span:f}}applyToEvent(t,n={},i=[]){Dw(t,this.getScopeData());const r=[...i,...$p(),...this._eventProcessors];return Xc(r,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const i=n&&n.event_id?n.event_id:Yt();if(!this._client)return pe.warn("No client configured on scope - will not capture exception!"),i;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...n,event_id:i},this),i}captureMessage(t,n,i){const r=i&&i.event_id?i.event_id:Yt();if(!this._client)return pe.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...i,event_id:r},this),r}captureEvent(t,n){const i=n&&n.event_id?n.event_id:Yt();return this._client?(this._client.captureEvent(t,{...n,event_id:i},this),i):(pe.warn("No client configured on scope - will not capture event!"),i)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function HI(){return Dh||(Dh=new Ii),Dh}function bv(){return{traceId:Yt(),spanId:Yt().substring(16)}}const Za="7.94.1",Fw=parseFloat(Za),UI=100;class Bw{constructor(t,n,i,r=Fw){this._version=r;let s;n?s=n:(s=new Ii,s.setClient(t));let o;i?o=i:(o=new Ii,o.setClient(t)),this._stack=[{scope:s}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();let i;try{i=t(n)}catch(r){throw this.popScope(),r}return Pu(i)?i.then(r=>(this.popScope(),r),r=>{throw this.popScope(),r}):(this.popScope(),i)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const i=this._lastEventId=n&&n.event_id?n.event_id:Yt(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...n,event_id:i}),i}captureMessage(t,n,i){const r=this._lastEventId=i&&i.event_id?i.event_id:Yt(),s=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:s,...i,event_id:r}),r}captureEvent(t,n){const i=n&&n.event_id?n.event_id:Yt();return t.type||(this._lastEventId=i),this.getScope().captureEvent(t,{...n,event_id:i}),i}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:i,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=UI}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:yl(),...t},h=s?Hi(()=>s(a,n)):a;h!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",h,n),i.addBreadcrumb(h,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:i}=this.getStackTop();i&&t(n)}run(t){const n=wv(this);try{t(this)}finally{wv(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return Pe&&pe.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const i=this._callExtensionMethod("startTransaction",t,n);return Pe&&!i&&(this.getClient()?pe.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):pe.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),i}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,i=n.getSession();i&&Iw(i),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:i}=this.getStackTop(),{release:r,environment:s=Du}=i&&i.getOptions()||{},{userAgent:o}=nt.navigator||{},u=$w({release:r,environment:s,user:n.getUser(),...o&&{userAgent:o},...t}),a=n.getSession&&n.getSession();return a&&a.status==="ok"&&Ss(a,{status:"exited"}),this.endSession(),n.setSession(u),u}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return Boolean(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),i=t.getSession();i&&n&&n.captureSession&&n.captureSession(i)}_callExtensionMethod(t,...n){const r=_l().__SENTRY__;if(r&&r.extensions&&typeof r.extensions[t]=="function")return r.extensions[t].apply(this,n);Pe&&pe.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function _l(){return nt.__SENTRY__=nt.__SENTRY__||{extensions:{},hub:void 0},nt}function wv(e){const t=_l(),n=nf(t);return Hw(t,e),n}function oi(){const e=_l();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return zI(e)}function bl(){return oi().getIsolationScope()}function zI(e=_l()){return(!WI(e)||nf(e).isOlderThan(Fw))&&Hw(e,new Bw),nf(e)}function WI(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function nf(e){return dw("hub",()=>new Bw,e)}function Hw(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function Qo(e){return(e||oi()).getScope().getTransaction()}let Sv=!1;function VI(){Sv||(Sv=!0,Sw(rf),Tw(rf))}function rf(){const e=Qo();if(e){const t="internal_error";Pe&&pe.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}rf.tag="sentry_tracingErrorCallback";const To="sentry.source",io="sentry.sample_rate",Ql="sentry.op";class Uw{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Op{constructor(t={}){this._traceId=t.traceId||Yt(),this._spanId=t.spanId||Yt().substring(16),this._startTime=t.startTimestamp||Jo(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this._attributes=t.attributes?{...t.attributes}:{},this.instrumenter=t.instrumenter||"sentry",this.origin=t.origin||"manual",this._name=t.name||t.description,t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.op&&this.setAttribute(Ql,t.op),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp)}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Ql]}set op(t){this.setAttribute(Ql,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:i}=this;return{spanId:t,traceId:n,traceFlags:i?Rw:bI}}startChild(t){const n=new Op({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const i=Io(this);if(n.transaction=i,Pe&&i){const r=t&&t.op||"< unknown op >",s=ln(n).description||"< unknown name >",o=i.spanContext().spanId,u=`[Tracing] Starting '${r}' span on transaction '${s}' (${o}).`;pe.log(u),this._logMessage=u}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);const n=jI(t);return n!=="unknown_error"&&this.setStatus(n),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=Io(this);if(Pe&&n&&n.spanContext().spanId!==this._spanId){const i=this._logMessage;i&&pe.log(i.replace("Starting","Finishing"))}this._endTime=Rp(t)}toTraceparent(){return Fu(this)}toContext(){return Nn({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this.parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return Ip(this)}getSpanJSON(){return Nn({data:this._getData(),description:this._name,op:this._attributes[Ql],parent_span_id:this.parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this.origin})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,i=Object.keys(t).length>0,r=Object.keys(n).length>0;if(!(!i&&!r))return i&&r?{...t,...n}:i?t:n}}function jI(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}class zw extends Op{constructor(t,n){super(t),this._measurements={},this._contexts={},this._hub=n||oi(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const i=this._metadata.dynamicSamplingContext;i&&(this._frozenDynamicSamplingContext={...i})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[To]&&{source:this._attributes[To]},...this._attributes[io]&&{sampleRate:this._attributes[io]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(To,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Uw(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,i=""){this._measurements[t]={value:n,unit:i}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=Rp(t),i=this._finishTransaction(n);if(!!i)return this._hub.captureEvent(i)}toContext(){const t=super.toContext();return Nn({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Qa(this)}setHub(t){this._hub=t}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(Pe&&pe.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){Pe&&pe.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const i=this.spanRecorder?this.spanRecorder.spans.filter(a=>a!==this&&ln(a).timestamp):[];if(this._trimEnd&&i.length>0){const a=i.map(h=>ln(h).timestamp).filter(Boolean);this._endTime=a.reduce((h,c)=>h>c?h:c)}const{metadata:r}=this,{source:s}=r,o={contexts:{...this._contexts,trace:Ip(this)},spans:i,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:Qa(this)},...s&&{transaction_info:{source:s}}};return Object.keys(this._measurements).length>0&&(Pe&&pe.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),o.measurements=this._measurements),Pe&&pe.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),o}}const Ec={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},GI="finishReason",Hs=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class qI extends Uw{constructor(t,n,i,r){super(r),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=i}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...i)=>(this._popActivity(t.spanContext().spanId),n.apply(t,i)),ln(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class KI extends zw{constructor(t,n,i=Ec.idleTimeout,r=Ec.finalTimeout,s=Ec.heartbeatInterval,o=!1,u=!1){super(t,n),this._idleHub=n,this._idleTimeout=i,this._finalTimeout=r,this._heartbeatInterval=s,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Hs[4],this._autoFinishAllowed=!u,o&&(Pe&&pe.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),u||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Hs[3],this.end())},this._finalTimeout)}end(t){const n=Rp(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(GI,this._finishReason),this.spanRecorder){Pe&&pe.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const i of this._beforeFinishCallbacks)i(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(i=>{if(i.spanContext().spanId===this.spanContext().spanId)return!0;ln(i).timestamp||(i.setStatus("cancelled"),i.end(n),Pe&&pe.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(i,void 0,2)));const{start_timestamp:r,timestamp:s}=ln(i),o=r&&r<n,u=(this._finalTimeout+this._idleTimeout)/1e3,a=s&&r&&s-r<u;if(Pe){const h=JSON.stringify(i,void 0,2);o?a||pe.log("[Tracing] discarding Span since it finished after Transaction final timeout",h):pe.log("[Tracing] discarding Span since it happened after Transaction was finished",h)}return o&&a}),Pe&&pe.log("[Tracing] flushing IdleTransaction")}else Pe&&pe.log("[Tracing] No active IdleTransaction");if(this._onScope){const i=this._idleHub.getScope();i.getTransaction()===this&&i.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const n=r=>{this._finished||this._pushActivity(r)},i=r=>{this._finished||this._popActivity(r)};this.spanRecorder=new qI(n,i,this.spanContext().spanId,t),Pe&&pe.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Hs[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(Pe&&pe.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Hs[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),Pe&&pe.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,Pe&&pe.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(Pe&&pe.log(`[Tracing] popActivity ${t}`),delete this.activities[t],Pe&&pe.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=Jo();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=Hs[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(Pe&&pe.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Hs[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){Pe&&pe.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Uu(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=At(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Ww(e,t,n){if(!Uu(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(io,Number(e.sampled)),e;let i;return typeof t.tracesSampler=="function"?(i=t.tracesSampler(n),e.setAttribute(io,Number(i))):n.parentSampled!==void 0?i=n.parentSampled:typeof t.tracesSampleRate<"u"?(i=t.tracesSampleRate,e.setAttribute(io,Number(i))):(i=1,e.setAttribute(io,i)),YI(i)?i?(e.sampled=Math.random()<i,e.sampled?(Pe&&pe.log(`[Tracing] starting ${e.op} transaction - ${ln(e).description}`),e):(Pe&&pe.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),e)):(Pe&&pe.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(Pe&&pe.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function YI(e){return uw(e)||!(typeof e=="number"||typeof e=="boolean")?(Pe&&pe.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(Pe&&pe.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function XI(){const t=this.getScope().getSpan();return t?{"sentry-trace":Fu(t)}:{}}function JI(e,t){const n=this.getClient(),i=n&&n.getOptions()||{},r=i.instrumenter||"sentry",s=e.instrumenter||"sentry";r!==s&&(Pe&&pe.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${r}\` instrumenter.
The transaction will not be sampled. Please use the ${r} instrumentation to start transactions.`),e.sampled=!1);let o=new zw(e,this);return o=Ww(o,i,{parentSampled:e.parentSampled,transactionContext:e,...t}),o.isRecording()&&o.initSpanRecorder(i._experiments&&i._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function Tv(e,t,n,i,r,s,o,u=!1){const a=e.getClient(),h=a&&a.getOptions()||{};let c=new KI(t,e,n,i,o,r,u);return c=Ww(c,h,{parentSampled:t.parentSampled,transactionContext:t,...s}),c.isRecording()&&c.initSpanRecorder(h._experiments&&h._experiments.maxSpans),a&&a.emit&&a.emit("startTransaction",c),c}function QI(){const e=_l();!e.__SENTRY__||(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=JI),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=XI),VI())}function Vw(){return si().getSpan()}function ZI(e,t,n){const i=Qo();i&&i.setMeasurement(e,t,n)}function eR(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function tR(e,t,n,i){const r=kp(n),s={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!i&&t&&{dsn:vl(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Rs(s,[o])}function nR(e,t,n,i){const r=kp(n),s=e.type&&e.type!=="replay_event"?e.type:"event";eR(e,n&&n.sdk);const o=xw(e,r,i,t);return delete e.sdkProcessingMetadata,Rs(o,[[{type:s},e]])}const iR="7";function rR(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function sR(e){return`${rR(e)}${e.projectId}/envelope/`}function oR(e,t){return b$({sentry_key:e.publicKey,sentry_version:iR,...t&&{sentry_client:`${t.name}/${t.version}`}})}function aR(e,t={}){const n=typeof t=="string"?t:t.tunnel,i=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${sR(e)}?${oR(e,i)}`}const Ev=[];function lR(e){const t={};return e.forEach(n=>{const{name:i}=n,r=t[i];r&&!r.isDefaultInstance&&n.isDefaultInstance||(t[i]=n)}),Object.keys(t).map(n=>t[n])}function cR(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let i;Array.isArray(n)?i=[...t,...n]:typeof n=="function"?i=Ep(n(t)):i=t;const r=lR(i),s=hR(r,o=>o.name==="Debug");if(s!==-1){const[o]=r.splice(s,1);r.push(o)}return r}function uR(e,t){const n={};return t.forEach(i=>{i&&jw(e,i,n)}),n}function jw(e,t,n){if(n[t.name]){Pe&&pe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ev.indexOf(t.name)===-1&&(t.setupOnce(yI,oi),Ev.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const i=t.preprocessEvent.bind(t);e.on("preprocessEvent",(r,s)=>i(r,s,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const i=t.processEvent.bind(t),r=Object.assign((s,o)=>i(s,o,e),{id:t.name});e.addEventProcessor(r)}Pe&&pe.log(`Integration installed: ${t.name}`)}function hR(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function hr(e,t){return Object.assign(function(...i){return t(...i)},{id:e})}function dR(e){let t="";for(const n of e){const i=Object.entries(n.tags),r=i.length>0?`|#${i.map(([s,o])=>`${s}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}
`}return t}function fR(e,t,n,i){const r={sent_at:new Date().toISOString()};n&&n.sdk&&(r.sdk={name:n.sdk.name,version:n.sdk.version}),!!i&&t&&(r.dsn=vl(t));const s=pR(e);return Rs(r,[s])}function pR(e){const t=dR(e);return[{type:"statsd",length:t.length},t]}const Av="Not capturing exception because it's already been captured.";class gR{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_$(t.dsn):Pe&&pe.warn("No DSN provided, client will not send events."),this._dsn){const n=aR(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,i){if(av(t)){Pe&&pe.log(Av);return}let r=n&&n.event_id;return this._process(this.eventFromException(t,n).then(s=>this._captureEvent(s,n,i)).then(s=>{r=s})),r}captureMessage(t,n,i,r){let s=i&&i.event_id;const o=bp(t)?t:String(t),u=wp(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(u.then(a=>this._captureEvent(a,i,r)).then(a=>{s=a})),s}captureEvent(t,n,i){if(n&&n.originalException&&av(n.originalException)){Pe&&pe.log(Av);return}let r=n&&n.event_id;return this._process(this._captureEvent(t,n,i).then(s=>{r=s})),r}captureSession(t){typeof t.release!="string"?Pe&&pe.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ss(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(i=>n.flush(t).then(r=>i&&r))):$o(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return Pe&&pe.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){jw(this,t,this._integrations)}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let i=nR(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])i=lI(i,hI(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(i);r&&r.then(s=>this.emit("afterSendEvent",t,s),null)}sendSession(t){const n=tR(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,i){if(this._options.sendClientReports){const r=`${t}:${n}`;Pe&&pe.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}captureAggregateMetrics(t){Pe&&pe.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=fR(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(i=>i(...n))}_setupIntegrations(){this._integrations=uR(this,this._options.integrations),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let i=!1,r=!1;const s=n.exception&&n.exception.values;if(s){r=!0;for(const a of s){const h=a.mechanism;if(h&&h.handled===!1){i=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&i)&&(Ss(t,{...i&&{status:"crashed"},errors:t.errors||Number(r||i)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Vn(n=>{let i=0;const r=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(i+=r,t&&i>=t&&(clearInterval(s),n(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,i,r=bl()){const s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),Lw(s,t,n,i,this,r).then(u=>{if(u===null)return u;const{propagationContext:a}=u.sdkProcessingMetadata||{};if(!(u.contexts&&u.contexts.trace)&&a){const{traceId:c,spanId:l,parentSpanId:d,dsc:f}=a;u.contexts={trace:{trace_id:c,span_id:l,parent_span_id:d},...u.contexts};const p=f||Hu(c,this,i);u.sdkProcessingMetadata={dynamicSamplingContext:p,...u.sdkProcessingMetadata}}return u})}_captureEvent(t,n={},i){return this._processEvent(t,n,i).then(r=>r.event_id,r=>{if(Pe){const s=r;s.logLevel==="log"?pe.log(s.message):pe.warn(s)}})}_processEvent(t,n,i){const r=this.getOptions(),{sampleRate:s}=r,o=qw(t),u=Gw(t),a=t.type||"error",h=`before send for type \`${a}\``;if(u&&typeof s=="number"&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",t),xp(new $i(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const c=a==="replay_event"?"replay":a;return this._prepareEvent(t,n,i).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",c,t),new $i("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return l;const f=vR(r,l,n);return mR(f,h)}).then(l=>{if(l===null)throw this.recordDroppedEvent("before_send",c,t),new $i(`${h} returned \`null\`, will not send event.`,"log");const d=i&&i.getSession();!o&&d&&this._updateSessionFromEvent(d,l);const f=l.transaction_info;if(o&&f&&l.transaction!==t.transaction){const p="custom";l.transaction_info={...f,source:p}}return this.sendEvent(l,n),l}).then(null,l=>{throw l instanceof $i?l:(this.captureException(l,{data:{__sentry__:!0},originalException:l}),new $i(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${l}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{Pe&&pe.error("Error while sending event:",n)});Pe&&pe.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[i,r]=n.split(":");return{reason:i,category:r,quantity:t[n]}})}}function mR(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Pu(e))return e.then(i=>{if(!ko(i)&&i!==null)throw new $i(n);return i},i=>{throw new $i(`${t} rejected with ${i}`)});if(!ko(e)&&e!==null)throw new $i(n);return e}function vR(e,t,n){const{beforeSend:i,beforeSendTransaction:r}=e;return Gw(t)&&i?i(t,n):qw(t)&&r?r(t,n):t}function Gw(e){return e.type===void 0}function qw(e){return e.type==="transaction"}function yR(e){const t=At();!t||!t.addEventProcessor||t.addEventProcessor(e)}function _R(e,t){t.debug===!0&&(Pe?pe.enable():Hi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),si().update(t.initialScope);const i=new e(t);bR(i),wR(i)}function bR(e){const n=oi().getStackTop();n.client=e,n.scope.setClient(e)}function wR(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const SR=30;function Kw(e,t,n=J$(e.bufferSize||SR)){let i={};const r=o=>n.drain(o);function s(o){const u=[];if(fv(o,(l,d)=>{const f=pv(d);if(Mw(i,f)){const p=Cv(l,d);e.recordDroppedEvent("ratelimit_backoff",f,p)}else u.push(l)}),u.length===0)return $o();const a=Rs(o[0],u),h=l=>{fv(a,(d,f)=>{const p=Cv(d,f);e.recordDroppedEvent(l,pv(f),p)})},c=()=>t({body:cI(a,e.textEncoder)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&Pe&&pe.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),i=kw(i,l),l),l=>{throw h("network_error"),l});return n.add(c).then(l=>l,l=>{if(l instanceof $i)return Pe&&pe.error("Skipped sending event because buffer is full."),h("queue_overflow"),$o();throw l})}return s.__sentry__baseTransport__=!0,{send:s,flush:r}}function Cv(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function TR(e,t){const n=t&&CR(t)?t.getClient():t,i=n&&n.getDsn(),r=n&&n.getOptions().tunnel;return AR(e,i)||ER(e,r)}function ER(e,t){return t?xv(e)===xv(t):!1}function AR(e,t){return t?e.includes(t.host):!1}function xv(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function CR(e){return e.getClient!==void 0}const xR=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],MR=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Yw="InboundFilters",kR=(e={})=>({name:Yw,setupOnce(){},processEvent(t,n,i){const r=i.getOptions(),s=RR(e,r);return LR(t,s)?null:t}}),$R=kR,IR=hr(Yw,$R);function RR(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:xR],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:MR],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function LR(e,t){return t.ignoreInternal&&BR(e)?(Pe&&pe.warn(`Event dropped due to being internal Sentry Error.
Event: ${Rr(e)}`),!0):OR(e,t.ignoreErrors)?(Pe&&pe.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${Rr(e)}`),!0):PR(e,t.ignoreTransactions)?(Pe&&pe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${Rr(e)}`),!0):NR(e,t.denyUrls)?(Pe&&pe.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${Rr(e)}.
Url: ${Jc(e)}`),!0):DR(e,t.allowUrls)?!1:(Pe&&pe.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${Rr(e)}.
Url: ${Jc(e)}`),!0)}function OR(e,t){return e.type||!t||!t.length?!1:FR(e).some(n=>Yo(n,t))}function PR(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Yo(n,t):!1}function NR(e,t){if(!t||!t.length)return!1;const n=Jc(e);return n?Yo(n,t):!1}function DR(e,t){if(!t||!t.length)return!0;const n=Jc(e);return n?Yo(n,t):!0}function FR(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),Pe&&t.length===0&&pe.error(`Could not extract message for event ${Rr(e)}`),t}function BR(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function HR(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Jc(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?HR(t):null}catch{return Pe&&pe.error(`Cannot extract url for event ${Rr(e)}`),null}}let Mv;const Xw="FunctionToString",UR=()=>({name:Xw,setupOnce(){Mv=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Tp(this)||this;return Mv.apply(t,e)}}catch{}}}),zR=UR,WR=hr(Xw,zR),yt=nt;let sf=0;function Jw(){return sf>0}function VR(){sf++,setTimeout(()=>{sf--})}function Ro(e,t={},n){if(typeof e!="function")return e;try{const r=e.__sentry_wrapped__;if(r)return r;if(Tp(e))return e}catch{return e}const i=function(){const r=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const s=r.map(o=>Ro(o,t));return e.apply(this,s)}catch(s){throw VR(),LI(o=>{o.addEventProcessor(u=>(t.mechanism&&(Gd(u,void 0,void 0),Ja(u,t.mechanism)),u.extra={...u.extra,arguments:r},u)),Bu(s)}),s}};try{for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}catch{}gw(i,e),Xa(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}const ir=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Qw(e,t){const n=Pp(e,t),i={type:t&&t.name,value:KR(t)};return n.length&&(i.stacktrace={frames:n}),i.type===void 0&&i.value===""&&(i.value="Unrecoverable error caught"),i}function jR(e,t,n,i){const r=At(),s=r&&r.getOptions().normalizeDepth,o={exception:{values:[{type:Ou(t)?t.constructor.name:i?"UnhandledRejection":"Error",value:JR(t,{isUnhandledRejection:i})}]},extra:{__serialized__:Ew(t,s)}};if(n){const u=Pp(e,n);u.length&&(o.exception.values[0].stacktrace={frames:u})}return o}function Fh(e,t){return{exception:{values:[Qw(e,t)]}}}function Pp(e,t){const n=t.stacktrace||t.stack||"",i=qR(t);try{return e(n,i)}catch{}return[]}const GR=/Minified React error #\d+;/i;function qR(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(GR.test(e.message))return 1}return 0}function KR(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function YR(e,t,n,i){const r=n&&n.syntheticException||void 0,s=Np(e,t,r,i);return Ja(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),$o(s)}function XR(e,t,n="info",i,r){const s=i&&i.syntheticException||void 0,o=of(e,t,s,r);return o.level=n,i&&i.event_id&&(o.event_id=i.event_id),$o(o)}function Np(e,t,n,i,r){let s;if(_p(t)&&t.error)return Fh(e,t.error);if(Qm(t)||n$(t)){const o=t;if("stack"in t)s=Fh(e,t);else{const u=o.name||(Qm(o)?"DOMError":"DOMException"),a=o.message?`${u}: ${o.message}`:u;s=of(e,a,n,i),Gd(s,a)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return cw(t)?Fh(e,t):ko(t)||Ou(t)?(s=jR(e,t,n,r),Ja(s,{synthetic:!0}),s):(s=of(e,t,n,i),Gd(s,`${t}`,void 0),Ja(s,{synthetic:!0}),s)}function of(e,t,n,i){const r={};if(i&&n){const s=Pp(e,n);s.length&&(r.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(bp(t)){const{__sentry_template_string__:s,__sentry_template_values__:o}=t;return r.logentry={message:s,params:o},r}return r.message=t,r}function JR(e,{isUnhandledRejection:t}){const n=w$(e),i=t?"promise rejection":"exception";return _p(e)?`Event \`ErrorEvent\` captured as ${i} with message \`${e.message}\``:Ou(e)?`Event \`${QR(e)}\` (type=${e.type}) captured as ${i}`:`Object captured as ${i} with keys: ${n}`}function QR(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ZR(e,{metadata:t,tunnel:n,dsn:i}){const r={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!i&&{dsn:vl(i)}},s=eL(e);return Rs(r,[s])}function eL(e){return[{type:"user_report"},e]}class tL extends gR{constructor(t){const n=yt.SENTRY_SDK_SOURCE||W$();t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${n}:@sentry/browser`,version:Za}],version:Za},super(t),t.sendClientReports&&yt.document&&yt.document.addEventListener("visibilitychange",()=>{yt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return YR(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",i){return XR(this._options.stackParser,t,n,i,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ir&&pe.warn("SDK not enabled, will not capture user feedback.");return}const n=ZR(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,i)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){ir&&pe.log("No outcomes to send");return}if(!this._dsn){ir&&pe.log("No dsn provided, will not send outcomes");return}ir&&pe.log("Sending outcomes:",t);const n=fI(t,this._options.tunnel&&vl(this._dsn));this._sendEnvelope(n)}}let Sa;function nL(){if(Sa)return Sa;if(Xd(yt.fetch))return Sa=yt.fetch.bind(yt);const e=yt.document;let t=yt.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const i=n.contentWindow;i&&i.fetch&&(t=i.fetch),e.head.removeChild(n)}catch(n){ir&&pe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Sa=t.bind(yt)}function iL(){Sa=void 0}function rL(e,t=nL()){let n=0,i=0;function r(s){const o=s.body.length;n+=o,i++;const u={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&i<15,...e.fetchOptions};try{return t(e.url,u).then(a=>(n-=o,i--,{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}))}catch(a){return iL(),n-=o,i--,xp(a)}}return Kw(e,r)}const sL=4;function oL(e){function t(n){return new Vn((i,r)=>{const s=new XMLHttpRequest;s.onerror=r,s.onreadystatechange=()=>{s.readyState===sL&&i({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&s.setRequestHeader(o,e.headers[o]);s.send(n.body)})}return Kw(e,t)}const zu="?",aL=30,lL=40,cL=50;function Dp(e,t,n,i){const r={filename:e,function:t,in_app:!0};return n!==void 0&&(r.lineno=n),i!==void 0&&(r.colno=i),r}const uL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hL=/\((\S*)(?::(\d+))(?::(\d+))\)/,dL=e=>{const t=uL.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const s=hL.exec(t[2]);s&&(t[2]=s[1],t[3]=s[2],t[4]=s[3])}const[i,r]=Zw(t[1]||zu,t[2]);return Dp(r,i,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},fL=[aL,dL],pL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,gL=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,mL=e=>{const t=pL.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=gL.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let i=t[3],r=t[1]||zu;return[r,i]=Zw(r,i),Dp(i,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},vL=[cL,mL],yL=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_L=e=>{const t=yL.exec(e);return t?Dp(t[2],t[1]||zu,+t[3],t[4]?+t[4]:void 0):void 0},bL=[lL,_L],wL=[fL,vL,bL],SL=yw(...wL),Zw=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,i=e.indexOf("safari-web-extension")!==-1;return n||i?[e.indexOf("@")!==-1?e.split("@")[0]:zu,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},eS="GlobalHandlers",TL=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:eS,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(AL(n),kv("onerror")),t.onunhandledrejection&&(CL(n),kv("onunhandledrejection"))}}},EL=hr(eS,TL);function AL(e){Sw(t=>{const{stackParser:n,attachStacktrace:i}=nS();if(At()!==e||Jw())return;const{msg:r,url:s,line:o,column:u,error:a}=t,h=a===void 0&&Ni(r)?kL(r,s,o,u):tS(Np(n,a||r,void 0,i,!1),s,o,u);h.level="error",Ow(h,{originalException:a,mechanism:{handled:!1,type:"onerror"}})})}function CL(e){Tw(t=>{const{stackParser:n,attachStacktrace:i}=nS();if(At()!==e||Jw())return;const r=xL(t),s=wp(r)?ML(r):Np(n,r,void 0,i,!0);s.level="error",Ow(s,{originalException:r,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function xL(e){if(wp(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function ML(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function kL(e,t,n,i){const r=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=_p(e)?e.message:e,o="Error";const u=s.match(r);return u&&(o=u[1],s=u[2]),tS({exception:{values:[{type:o,value:s}]}},t,n,i)}function tS(e,t,n,i){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{},u=o.stacktrace=o.stacktrace||{},a=u.frames=u.frames||[],h=isNaN(parseInt(i,10))?void 0:i,c=isNaN(parseInt(n,10))?void 0:n,l=Ni(t)&&t.length>0?t:h$();return a.length===0&&a.push({colno:h,filename:l,function:"?",in_app:!0,lineno:c}),e}function kv(e){ir&&pe.log(`Global Handler attached: ${e}`)}function nS(){const e=At();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const $L=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],iS="TryCatch",IL=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:iS,setupOnce(){t.setTimeout&&Qt(yt,"setTimeout",$v),t.setInterval&&Qt(yt,"setInterval",$v),t.requestAnimationFrame&&Qt(yt,"requestAnimationFrame",LL),t.XMLHttpRequest&&"XMLHttpRequest"in yt&&Qt(XMLHttpRequest.prototype,"send",OL);const n=t.eventTarget;n&&(Array.isArray(n)?n:$L).forEach(PL)}}},RL=hr(iS,IL);function $v(e){return function(...t){const n=t[0];return t[0]=Ro(n,{mechanism:{data:{function:ar(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function LL(e){return function(t){return e.apply(this,[Ro(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ar(e)},handled:!1,type:"instrument"}})])}}function OL(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Qt(n,r,function(s){const o={mechanism:{data:{function:r,handler:ar(s)},handled:!1,type:"instrument"}},u=Tp(s);return u&&(o.mechanism.data.handler=ar(u)),Ro(s,o)})}),e.apply(this,t)}}function PL(e){const t=yt,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Qt(n,"addEventListener",function(i){return function(r,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=Ro(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ar(s),target:e},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[r,Ro(s,{mechanism:{data:{function:"addEventListener",handler:ar(s),target:e},handled:!1,type:"instrument"}}),o])}}),Qt(n,"removeEventListener",function(i){return function(r,s,o){const u=s;try{const a=u&&u.__sentry_wrapped__;a&&i.call(this,r,a,o)}catch{}return i.call(this,r,u,o)}}))}const Zl=1024,rS="Breadcrumbs",NL=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:rS,setupOnce(){},setup(n){t.console&&A$(HL(n)),t.dom&&bw(BL(n,t.dom)),t.xhr&&Cp(UL(n)),t.fetch&&Ap(zL(n)),t.history&&Nu(WL(n)),t.sentry&&n.on&&n.on("beforeSendEvent",FL(n))}}},DL=hr(rS,NL);function FL(e){return function(n){At()===e&&Gr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Rr(n)},{event:n})}}function BL(e,t){return function(i){if(At()!==e)return;let r,s,o=typeof t=="object"?t.serializeAttribute:void 0,u=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;u&&u>Zl&&(ir&&pe.warn(`\`dom.maxStringLength\` cannot exceed ${Zl}, but a value of ${u} was configured. Sentry will use ${Zl} instead.`),u=Zl),typeof o=="string"&&(o=[o]);try{const h=i.event,c=VL(h)?h.target:h;r=ws(c,{keyAttrs:o,maxStringLength:u}),s=fw(c)}catch{r="<unknown>"}if(r.length===0)return;const a={category:`ui.${i.name}`,message:r};s&&(a.data={"ui.component_name":s}),Gr(a,{event:i.event,name:i.name,global:i.global})}}function HL(e){return function(n){if(At()!==e)return;const i={category:"console",data:{arguments:n.args,logger:"console"},level:Z$(n.level),message:Zm(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)i.message=`Assertion failed: ${Zm(n.args.slice(1)," ")||"console.assert"}`,i.data.arguments=n.args.slice(1);else return;Gr(i,{input:n.args,level:n.level})}}function UL(e){return function(n){if(At()!==e)return;const{startTimestamp:i,endTimestamp:r}=n,s=n.xhr[Lr];if(!i||!r||!s)return;const{method:o,url:u,status_code:a,body:h}=s,c={method:o,url:u,status_code:a},l={xhr:n.xhr,input:h,startTimestamp:i,endTimestamp:r};Gr({category:"xhr",data:c,type:"http"},l)}}function zL(e){return function(n){if(At()!==e)return;const{startTimestamp:i,endTimestamp:r}=n;if(!!r&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:i,endTimestamp:r};Gr({category:"fetch",data:s,level:"error",type:"http"},o)}else{const s=n.response,o={...n.fetchData,status_code:s&&s.status},u={input:n.args,response:s,startTimestamp:i,endTimestamp:r};Gr({category:"fetch",data:o,type:"http"},u)}}}function WL(e){return function(n){if(At()!==e)return;let i=n.from,r=n.to;const s=Tc(yt.location.href);let o=i?Tc(i):void 0;const u=Tc(r);(!o||!o.path)&&(o=s),s.protocol===u.protocol&&s.host===u.host&&(r=u.relative),s.protocol===o.protocol&&s.host===o.host&&(i=o.relative),Gr({category:"navigation",data:{from:i,to:r}})}}function VL(e){return!!e&&!!e.target}const jL="cause",GL=5,sS="LinkedErrors",qL=(e={})=>{const t=e.limit||GL,n=e.key||jL;return{name:sS,setupOnce(){},preprocessEvent(i,r,s){const o=s.getOptions();a$(Qw,o.stackParser,o.maxValueLength,n,t,i,r)}}},KL=hr(sS,qL),oS="HttpContext",YL=()=>({name:oS,setupOnce(){},preprocessEvent(e){if(!yt.navigator&&!yt.location&&!yt.document)return;const t=e.request&&e.request.url||yt.location&&yt.location.href,{referrer:n}=yt.document||{},{userAgent:i}=yt.navigator||{},r={...e.request&&e.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},s={...e.request,...t&&{url:t},headers:r};e.request=s}}),XL=hr(oS,YL),aS="Dedupe",JL=()=>{let e;return{name:aS,setupOnce(){},processEvent(t){if(t.type)return t;try{if(ZL(t,e))return ir&&pe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},QL=hr(aS,JL);function ZL(e,t){return t?!!(eO(e,t)||tO(e,t)):!1}function eO(e,t){const n=e.message,i=t.message;return!(!n&&!i||n&&!i||!n&&i||n!==i||!cS(e,t)||!lS(e,t))}function tO(e,t){const n=Iv(t),i=Iv(e);return!(!n||!i||n.type!==i.type||n.value!==i.value||!cS(e,t)||!lS(e,t))}function lS(e,t){let n=Rv(e),i=Rv(t);if(!n&&!i)return!0;if(n&&!i||!n&&i||(n=n,i=i,i.length!==n.length))return!1;for(let r=0;r<i.length;r++){const s=i[r],o=n[r];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function cS(e,t){let n=e.fingerprint,i=t.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;n=n,i=i;try{return n.join("")===i.join("")}catch{return!1}}function Iv(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Rv(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const uS=[new IR,new WR,new RL,new DL,new EL,new KL,new QL,new XL];function nO(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=uS),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),yt.SENTRY_RELEASE&&yt.SENTRY_RELEASE.id&&(e.release=yt.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:T$(e.stackParser||SL),integrations:cR(e),transport:e.transport||(ww()?rL:oL)};_R(tL,t),e.autoSessionTracking&&iO()}function iO(){if(typeof yt.document>"u"){ir&&pe.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}vv({ignoreDuration:!0}),yv(),Nu(({from:e,to:t})=>{e!==void 0&&e!==t&&(vv({ignoreDuration:!0}),yv())})}const It=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ot=nt;function rO(){ot&&ot.document?ot.document.addEventListener("visibilitychange",()=>{const e=Qo();if(ot.document.hidden&&e){const t="cancelled",{op:n,status:i}=ln(e);It&&pe.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),i||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):It&&pe.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Fp=(e,t,n)=>{let i,r;return s=>{t.value>=0&&(s||n)&&(r=t.value-(i||0),(r||i===void 0)&&(i=t.value,t.delta=r,e(t)))}},sO=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,oO=()=>{const e=ot.performance.timing,t=ot.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const i in e)i!=="navigationStart"&&i!=="toJSON"&&(n[i]=Math.max(e[i]-e.navigationStart,0));return n},hS=()=>ot.__WEB_VITALS_POLYFILL__?ot.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||oO()):ot.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],dS=()=>{const e=hS();return e&&e.activationStart||0},Bp=(e,t)=>{const n=hS();let i="navigate";return n&&(ot.document.prerendering||dS()>0?i="prerender":i=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:sO(),navigationType:i}},Wu=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(r=>{t(r.getEntries())});return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch{}},Vu=(e,t)=>{const n=i=>{(i.type==="pagehide"||ot.document.visibilityState==="hidden")&&(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},aO=e=>{const t=Bp("CLS",0);let n,i=0,r=[];const s=u=>{u.forEach(a=>{if(!a.hadRecentInput){const h=r[0],c=r[r.length-1];i&&r.length!==0&&a.startTime-c.startTime<1e3&&a.startTime-h.startTime<5e3?(i+=a.value,r.push(a)):(i=a.value,r=[a]),i>t.value&&(t.value=i,t.entries=r,n&&n())}})},o=Wu("layout-shift",s);if(o){n=Fp(e,t);const u=()=>{s(o.takeRecords()),n(!0)};return Vu(u),u}};let Ac=-1;const lO=()=>ot.document.visibilityState==="hidden"&&!ot.document.prerendering?0:1/0,cO=()=>{Vu(({timeStamp:e})=>{Ac=e},!0)},Hp=()=>(Ac<0&&(Ac=lO(),cO()),{get firstHiddenTime(){return Ac}}),uO=e=>{const t=Hp(),n=Bp("FID");let i;const r=u=>{u.startTime<t.firstHiddenTime&&(n.value=u.processingStart-u.startTime,n.entries.push(u),i(!0))},s=u=>{u.forEach(r)},o=Wu("first-input",s);i=Fp(e,n),o&&Vu(()=>{s(o.takeRecords()),o.disconnect()},!0)},Lv={},hO=e=>{const t=Hp(),n=Bp("LCP");let i;const r=o=>{const u=o[o.length-1];if(u){const a=Math.max(u.startTime-dS(),0);a<t.firstHiddenTime&&(n.value=a,n.entries=[u],i())}},s=Wu("largest-contentful-paint",r);if(s){i=Fp(e,n);const o=()=>{Lv[n.id]||(r(s.takeRecords()),s.disconnect(),Lv[n.id]=!0,i(!0))};return["keydown","click"].forEach(u=>{addEventListener(u,o,{once:!0,capture:!0})}),Vu(o,!0),o}},Ra={},Qc={};let fS,pS,gS;function dO(e){return Up("cls",e,pO,fS)}function mS(e){return Up("lcp",e,mO,gS)}function fO(e){return Up("fid",e,gO,pS)}function ju(e,t){return vS(e,t),Qc[e]||(vO(e),Qc[e]=!0),yS(e,t)}function Gu(e,t){const n=Ra[e];if(!(!n||!n.length))for(const i of n)try{i(t)}catch(r){It&&pe.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${ar(i)}
Error:`,r)}}function pO(){aO(e=>{Gu("cls",{metric:e}),fS=e})}function gO(){uO(e=>{Gu("fid",{metric:e}),pS=e})}function mO(){hO(e=>{Gu("lcp",{metric:e}),gS=e})}function Up(e,t,n,i){return vS(e,t),Qc[e]||(n(),Qc[e]=!0),i&&t({metric:i}),yS(e,t)}function vO(e){const t={};e==="event"&&(t.durationThreshold=0),Wu(e,n=>{Gu(e,{entries:n})},t)}function vS(e,t){Ra[e]=Ra[e]||[],Ra[e].push(t)}function yS(e,t){return()=>{const n=Ra[e];if(!n)return;const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}function Bh(e){return typeof e=="number"&&isFinite(e)}function Lo(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const yO=2147483647;function Wt(e){return e/1e3}function _S(){return ot&&ot.addEventListener&&ot.performance}let Ov=0,Lt={},Ai,La;function _O(){const e=_S();if(e&&vi){e.mark&&ot.performance.mark("sentry-tracing-init");const t=EO(),n=SO(),i=TO();return()=>{t(),n(),i()}}return()=>{}}function bO(){ju("longtask",({entries:e})=>{for(const t of e){const n=Qo();if(!n)return;const i=Wt(vi+t.startTime),r=Wt(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:i,endTimestamp:i+r})}})}function wO(){ju("event",({entries:e})=>{for(const t of e){const n=Qo();if(!n)return;if(t.name==="click"){const i=Wt(vi+t.startTime),r=Wt(t.duration),s={description:ws(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:i,endTimestamp:i+r},o=fw(t.target);o&&(s.attributes={"ui.component_name":o}),n.startChild(s)}}})}function SO(){return dO(({metric:e})=>{const t=e.entries.pop();!t||(It&&pe.log("[Measurements] Adding CLS"),Lt.cls={value:e.value,unit:""},La=t)})}function TO(){return mS(({metric:e})=>{const t=e.entries.pop();!t||(It&&pe.log("[Measurements] Adding LCP"),Lt.lcp={value:e.value,unit:"millisecond"},Ai=t)})}function EO(){return fO(({metric:e})=>{const t=e.entries.pop();if(!t)return;const n=Wt(vi),i=Wt(t.startTime);It&&pe.log("[Measurements] Adding FID"),Lt.fid={value:e.value,unit:"millisecond"},Lt["mark.fid"]={value:n+i,unit:"second"}})}function AO(e){const t=_S();if(!t||!ot.performance.getEntries||!vi)return;It&&pe.log("[Tracing] Adding & adjusting spans using Performance API");const n=Wt(vi),i=t.getEntries();let r,s;const{op:o,start_timestamp:u}=ln(e);if(i.slice(Ov).forEach(a=>{const h=Wt(a.startTime),c=Wt(a.duration);if(!(e.op==="navigation"&&u&&n+h<u))switch(a.entryType){case"navigation":{xO(e,a,n),r=n+Wt(a.responseStart),s=n+Wt(a.requestStart);break}case"mark":case"paint":case"measure":{CO(e,a,h,c,n);const l=Hp(),d=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&d&&(It&&pe.log("[Measurements] Adding FP"),Lt.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&d&&(It&&pe.log("[Measurements] Adding FCP"),Lt.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{kO(e,a,a.name,h,c,n);break}}}),Ov=Math.max(i.length-1,0),$O(e),o==="pageload"){typeof r=="number"&&u&&(It&&pe.log("[Measurements] Adding TTFB"),Lt.ttfb={value:(r-u)*1e3,unit:"millisecond"},typeof s=="number"&&s<=r&&(Lt["ttfb.requestTime"]={value:(r-s)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(h=>{if(!Lt[h]||!u||n>=u)return;const c=Lt[h].value,l=n+Wt(c),d=Math.abs((l-u)*1e3),f=d-c;It&&pe.log(`[Measurements] Normalized ${h} from ${c} to ${d} (${f})`),Lt[h].value=d});const a=Lt["mark.fid"];a&&Lt.fid&&(Lo(e,{description:"first input delay",endTimestamp:a.value+Wt(Lt.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete Lt["mark.fid"]),"fcp"in Lt||delete Lt.cls,Object.keys(Lt).forEach(h=>{ZI(h,Lt[h].value,Lt[h].unit)}),IO(e)}Ai=void 0,La=void 0,Lt={}}function CO(e,t,n,i,r){const s=r+n,o=s+i;return Lo(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s}),s}function xO(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(i=>{ec(e,t,i,n)}),ec(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),ec(e,t,"fetch",n,"cache","domainLookupStart"),ec(e,t,"domainLookup",n,"DNS"),MO(e,t,n)}function ec(e,t,n,i,r,s){const o=s?t[s]:t[`${n}End`],u=t[`${n}Start`];!u||!o||Lo(e,{op:"browser",origin:"auto.browser.browser.metrics",description:r||n,startTimestamp:i+Wt(u),endTimestamp:i+Wt(o)})}function MO(e,t,n){t.responseEnd&&(Lo(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Wt(t.requestStart),endTimestamp:n+Wt(t.responseEnd)}),Lo(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Wt(t.responseStart),endTimestamp:n+Wt(t.responseEnd)}))}function kO(e,t,n,i,r,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Tc(n),u={};Hh(u,t,"transferSize","http.response_transfer_size"),Hh(u,t,"encodedBodySize","http.response_content_length"),Hh(u,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(u["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(u["url.scheme"]=o.protocol.split(":").pop()),o.host&&(u["server.address"]=o.host),u["url.same_origin"]=n.includes(ot.location.origin);const a=s+i,h=a+r;Lo(e,{description:n.replace(ot.location.origin,""),endTimestamp:h,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:a,data:u})}function $O(e){const t=ot.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Bh(n.rtt)&&(Lt["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Bh(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Bh(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function IO(e){Ai&&(It&&pe.log("[Measurements] Adding LCP Data"),Ai.element&&e.setTag("lcp.element",ws(Ai.element)),Ai.id&&e.setTag("lcp.id",Ai.id),Ai.url&&e.setTag("lcp.url",Ai.url.trim().slice(0,200)),e.setTag("lcp.size",Ai.size)),La&&La.sources&&(It&&pe.log("[Measurements] Adding CLS Data"),La.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,ws(t.node))))}function Hh(e,t,n,i){const r=t[n];r!=null&&r<yO&&(e[i]=r)}function RO(e,t,n,i,r="auto.http.browser"){if(!Uu()||!e.fetchData)return;const s=t(e.fetchData.url);if(e.endTimestamp&&s){const d=e.fetchData.__span;if(!d)return;const f=i[d];if(f){if(e.response){f.setHttpStatus(e.response.status);const p=e.response&&e.response.headers&&e.response.headers.get("content-length");if(p){const g=parseInt(p);g>0&&f.setAttribute("http.response_content_length",g)}}else e.error&&f.setStatus("internal_error");f.end(),delete i[d]}return}const o=si(),u=At(),a=Vw(),{method:h,url:c}=e.fetchData,l=s&&a?a.startChild({data:{url:c,type:"fetch","http.method":h},description:`${h} ${c}`,op:"http.client",origin:r}):void 0;if(l&&(e.fetchData.__span=l.spanContext().spanId,i[l.spanContext().spanId]=l),n(e.fetchData.url)&&u){const d=e.args[0];e.args[1]=e.args[1]||{};const f=e.args[1];f.headers=LO(d,u,o,f,l)}return l}function LO(e,t,n,i,r){const s=r||n.getSpan(),o=s&&Io(s),{traceId:u,sampled:a,dsc:h}=n.getPropagationContext(),c=s?Fu(s):Mp(u,void 0,a),l=o?Qa(o):h||Hu(u,t,n),d=ef(l),f=i.headers||(typeof Request<"u"&&or(e,Request)?e.headers:void 0);if(f)if(typeof Headers<"u"&&or(f,Headers)){const p=new Headers(f);return p.append("sentry-trace",c),d&&p.append(Zd,d),p}else if(Array.isArray(f)){const p=[...f,["sentry-trace",c]];return d&&p.push([Zd,d]),p}else{const p="baggage"in f?f.baggage:void 0,g=[];return Array.isArray(p)?g.push(...p):p&&g.push(p),d&&g.push(d),{...f,"sentry-trace":c,baggage:g.length>0?g.join(","):void 0}}else return{"sentry-trace":c,baggage:d}}const af=["localhost",/^\/(?!\/)/],lf={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:af,tracePropagationTargets:af};function OO(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:i,tracingOrigins:r,shouldCreateSpanForRequest:s,enableHTTPTimings:o}={traceFetch:lf.traceFetch,traceXHR:lf.traceXHR,...e},u=typeof s=="function"?s:c=>!0,a=c=>FO(c,i||r),h={};t&&Ap(c=>{const l=RO(c,u,a,h);o&&l&&Pv(l)}),n&&Cp(c=>{const l=BO(c,u,a,h);o&&l&&Pv(l)})}function PO(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Pv(e){const{url:t}=ln(e).data||{};if(!t||typeof t!="string")return;const n=ju("resource",({entries:i})=>{i.forEach(r=>{PO(r)&&r.name.endsWith(t)&&(DO(r).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function NO(e){let t="unknown",n="unknown",i="";for(const r of e){if(r==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(r))){t=i==="h"?"http":i,n=e.split(i)[1];break}i+=r}return i===e&&(t=i),{name:t,version:n}}function wi(e=0){return((vi||performance.timeOrigin)+e)/1e3}function DO(e){const{name:t,version:n}=NO(e.nextHopProtocol),i=[];return i.push(["network.protocol.version",n],["network.protocol.name",t]),vi?[...i,["http.request.redirect_start",wi(e.redirectStart)],["http.request.fetch_start",wi(e.fetchStart)],["http.request.domain_lookup_start",wi(e.domainLookupStart)],["http.request.domain_lookup_end",wi(e.domainLookupEnd)],["http.request.connect_start",wi(e.connectStart)],["http.request.secure_connection_start",wi(e.secureConnectionStart)],["http.request.connection_end",wi(e.connectEnd)],["http.request.request_start",wi(e.requestStart)],["http.request.response_start",wi(e.responseStart)],["http.request.response_end",wi(e.responseEnd)]]:i}function FO(e,t){return Yo(e,t||af)}function BO(e,t,n,i){const r=e.xhr,s=r&&r[Lr];if(!Uu()||!r||r.__sentry_own_request__||!s)return;const o=t(s.url);if(e.endTimestamp&&o){const c=r.__sentry_xhr_span_id__;if(!c)return;const l=i[c];l&&s.status_code!==void 0&&(l.setHttpStatus(s.status_code),l.end(),delete i[c]);return}const u=si(),a=Vw(),h=o&&a?a.startChild({data:{type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(h&&(r.__sentry_xhr_span_id__=h.spanContext().spanId,i[r.__sentry_xhr_span_id__]=h),r.setRequestHeader&&n(s.url))if(h){const c=h&&Io(h),l=c&&Qa(c),d=ef(l);Nv(r,Fu(h),d)}else{const c=At(),{traceId:l,sampled:d,dsc:f}=u.getPropagationContext(),p=Mp(l,void 0,d),g=f||(c?Hu(l,c,u):void 0),m=ef(g);Nv(r,p,m)}return h}function Nv(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Zd,n)}catch{}}function HO(e,t=!0,n=!0){if(!ot||!ot.location){It&&pe.warn("Could not initialize routing instrumentation due to invalid location");return}let i=ot.location.href,r;t&&(r=e({name:ot.location.pathname,startTimestamp:vi?vi/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&Nu(({to:s,from:o})=>{if(o===void 0&&i&&i.indexOf(s)!==-1){i=void 0;return}o!==s&&(i=void 0,r&&(It&&pe.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.end()),r=e({name:ot.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const UO="BrowserTracing",zO={...Ec,markBackgroundTransactions:!0,routingInstrumentation:HO,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...lf};class WO{constructor(t){this.name=UO,this._hasSetTracePropagationTargets=!1,QI(),It&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...zO,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=_O(),this.options.enableLongTask&&bO(),this.options._experiments.enableInteractions&&wO()}setupOnce(t,n){this._getCurrentHub=n;const r=n().getClient(),s=r&&r.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:u,startTransactionOnPageLoad:a,markBackgroundTransactions:h,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:d,enableHTTPTimings:f,_experiments:p}=this.options,g=s&&s.tracePropagationTargets,m=g||this.options.tracePropagationTargets;It&&this._hasSetTracePropagationTargets&&g&&pe.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(v=>{const y=this._createRouteTransaction(v);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(y,v,n),y},a,u),h&&rO(),p.enableInteractions&&this._registerInteractionListener(),OO({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:d,enableHTTPTimings:f})}_createRouteTransaction(t){if(!this._getCurrentHub){It&&pe.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:i,idleTimeout:r,finalTimeout:s,heartbeatInterval:o}=this.options,u=t.op==="pageload",a=u?Dv("sentry-trace"):"",h=u?Dv("baggage"):"",{traceparentData:c,dynamicSamplingContext:l,propagationContext:d}=aI(a,h),f={...t,...c,metadata:{...t.metadata,dynamicSamplingContext:c&&!l?{}:l},trimEnd:!0},p=typeof i=="function"?i(f):f,g=p===void 0?{...f,sampled:!1}:p;g.metadata=g.name!==f.name?{...g.metadata,source:"custom"}:g.metadata,this._latestRouteName=g.name;const m=t.data&&t.data[To],v=g.metadata&&g.metadata.source;this._latestRouteSource=m||v,g.sampled===!1&&It&&pe.log(`[Tracing] Will not send ${g.op} transaction because of beforeNavigate.`),It&&pe.log(`[Tracing] Starting ${g.op} transaction on scope`);const{location:y}=ot,S=Tv(n,g,r,s,!0,{location:y},o,u);u&&(ot.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(ot.document.readyState)&&S.sendAutoFinishSignal()}),["interactive","complete"].includes(ot.document.readyState)&&S.sendAutoFinishSignal());const _=n.getScope();return u&&c?_.setPropagationContext(d):_.setPropagationContext({traceId:S.spanContext().traceId,spanId:S.spanContext().spanId,parentSpanId:S.parentSpanId,sampled:Lp(S)}),S.registerBeforeFinishCallback(w=>{this._collectWebVitals(),AO(w)}),S}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:i,finalTimeout:r,heartbeatInterval:s}=this.options,o="ui.action.click",u=Qo();if(u&&u.op&&["navigation","pageload"].includes(u.op)){It&&pe.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){It&&pe.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){It&&pe.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const a=this._getCurrentHub(),{location:h}=ot,c={name:this._latestRouteName,op:o,trimEnd:!0,data:{[To]:this._latestRouteSource||"url"}};t=Tv(a,c,i,r,!0,{location:h},s)};["click"].forEach(i=>{addEventListener(i,n,{once:!1,capture:!0})})}}function Dv(e){const t=d$(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}const wt=nt,zp="sentryReplaySession",VO="replay_event",Wp="Unable to send Replay",jO=3e5,GO=9e5,qO=5e3,KO=5500,YO=6e4,XO=5e3,JO=3,Fv=15e4,tc=5e3,QO=3e3,ZO=300,Vp=2e7,eP=4999,tP=15e3,Bv=36e5;function nP(e,t){return e??t()}function Zc(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}var Vt;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Vt||(Vt={}));function iP(e){return e.nodeType===e.ELEMENT_NODE}function Oa(e){const t=Zc([e,"optionalAccess",n=>n.host]);return Boolean(Zc([t,"optionalAccess",n=>n.shadowRoot])===e)}function Pa(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function rP(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function sP(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function eu(e){try{const t=e.rules||e.cssRules;return t?rP(Array.from(t,bS).join("")):null}catch{return null}}function bS(e){let t;if(aP(e))try{t=eu(e.styleSheet)||sP(e)}catch{}else if(lP(e)&&e.selectorText.includes(":"))return oP(e.cssText);return t||e.cssText}function oP(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function aP(e){return"styleSheet"in e}function lP(e){return"selectorText"in e}class wS{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=Zc([this,"access",i=>i.getMeta,"call",i=>i(t),"optionalAccess",i=>i.id]);return nP(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const i=n.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,n)}replace(t,n){const i=this.getNode(t);if(i){const r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(n,r)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function cP(){return new wS}function qu({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function el({isMasked:e,element:t,value:n,maskInputFn:i}){let r=n||"";return e?(i&&(r=i(r,t)),"*".repeat(r.length)):r}function Oo(e){return e.toLowerCase()}function cf(e){return e.toUpperCase()}const Hv="__rrweb_original__";function uP(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let i=0;i<e.width;i+=n)for(let r=0;r<e.height;r+=n){const s=t.getImageData,o=Hv in s?s[Hv]:s;if(new Uint32Array(o.call(t,i,r,Math.min(n,e.width-i),Math.min(n,e.height-r)).data.buffer).some(a=>a!==0))return!1}return!0}function jp(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Oo(t):null}function tu(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let hP=1;const dP=new RegExp("[^a-z0-9-_:]"),tl=-2;function Gp(){return hP++}function fP(e){if(e instanceof HTMLFormElement)return"form";const t=Oo(e.tagName);return dP.test(t)?"div":t}function pP(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Us,Uv;const gP=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,mP=/^(?:[a-z+]+:)?\/\//i,vP=/^www\..*/i,yP=/^(data:)([^,]*),(.*)/i;function nu(e,t){return(e||"").replace(gP,(n,i,r,s,o,u)=>{const a=r||o||u,h=i||s||"";if(!a)return n;if(mP.test(a)||vP.test(a))return`url(${h}${a}${h})`;if(yP.test(a))return`url(${h}${a}${h})`;if(a[0]==="/")return`url(${h}${pP(t)+a}${h})`;const c=t.split("/"),l=a.split("/");c.pop();for(const d of l)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${h}${c.join("/")}${h})`})}const _P=/^[^ \t\n\r\u000c]+/,bP=/^[, \t\n\r\u000c]+/;function wP(e,t){if(t.trim()==="")return t;let n=0;function i(s){let o;const u=s.exec(t.substring(n));return u?(o=u[0],n+=o.length,o):""}const r=[];for(;i(bP),!(n>=t.length);){let s=i(_P);if(s.slice(-1)===",")s=ro(e,s.substring(0,s.length-1)),r.push(s);else{let o="";s=ro(e,s);let u=!1;for(;;){const a=t.charAt(n);if(a===""){r.push((s+o).trim());break}else if(u)a===")"&&(u=!1);else if(a===","){n+=1,r.push((s+o).trim());break}else a==="("&&(u=!0);o+=a,n+=1}}}return r.join(", ")}function ro(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function SP(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function qp(){const e=document.createElement("a");return e.href="",e.href}function SS(e,t,n,i,r,s){return i&&(n==="src"||n==="href"&&!(t==="use"&&i[0]==="#")||n==="xlink:href"&&i[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?ro(e,i):n==="srcset"?wP(e,i):n==="style"?nu(i,qp()):t==="object"&&n==="data"?ro(e,i):typeof s=="function"?s(n,i,r):i)}function TS(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function TP(e,t,n,i){try{if(i&&e.matches(i))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function EP(e,t){for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}return!1}function hs(e,t,n=1/0,i=0){return!e||e.nodeType!==e.ELEMENT_NODE||i>n?-1:t(e)?i:hs(e.parentNode,t,n,i+1)}function so(e,t){return n=>{const i=n;if(i===null)return!1;try{if(e){if(typeof e=="string"){if(i.matches(`.${e}`))return!0}else if(EP(i,e))return!0}return!!(t&&i.matches(t))}catch{return!1}}}function Po(e,t,n,i,r,s){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;let u=-1,a=-1;if(s){if(a=hs(o,so(i,r)),a<0)return!0;u=hs(o,so(t,n),a>=0?a:1/0)}else{if(u=hs(o,so(t,n)),u<0)return!1;a=hs(o,so(i,r),u>=0?u:1/0)}return u>=0?a>=0?u<=a:!0:a>=0?!1:!!s}catch{}return!!s}function AP(e,t,n){const i=e.contentWindow;if(!i)return;let r=!1,s;try{s=i.document.readyState}catch{return}if(s!=="complete"){const u=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(u),r=!0,t()});return}const o="about:blank";if(i.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function CP(e,t,n){let i=!1,r;try{r=e.sheet}catch{return}if(r)return;const s=setTimeout(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}function xP(e,t){const{doc:n,mirror:i,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:u,maskAttributeFn:a,maskTextClass:h,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,dataURLOptions:v={},inlineImages:y,recordCanvas:S,keepIframeSrcFn:_,newlyAddedElement:w=!1}=t,b=MP(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Vt.Document,childNodes:[],compatMode:e.compatMode}:{type:Vt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Vt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return $P(e,{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:f,maskAttributeFn:a,maskInputOptions:p,maskInputFn:m,dataURLOptions:v,inlineImages:y,recordCanvas:S,keepIframeSrcFn:_,newlyAddedElement:w,rootId:b,maskAllText:u,maskTextClass:h,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d});case e.TEXT_NODE:return kP(e,{maskAllText:u,maskTextClass:h,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:g,maskInputOptions:p,maskInputFn:m,rootId:b});case e.CDATA_SECTION_NODE:return{type:Vt.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Vt.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function MP(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function kP(e,t){const{maskAllText:n,maskTextClass:i,unmaskTextClass:r,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:u,maskInputOptions:a,maskInputFn:h,rootId:c}=t,l=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const f=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0,g=l==="TEXTAREA"?!0:void 0;if(f&&d){try{e.nextSibling||e.previousSibling||Zc([e,"access",v=>v.parentNode,"access",v=>v.sheet,"optionalAccess",v=>v.cssRules])&&(d=eu(e.parentNode.sheet))}catch(v){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${v}`,e)}d=nu(d,qp())}p&&(d="SCRIPT_PLACEHOLDER");const m=Po(e,i,s,r,o,n);if(!f&&!p&&!g&&d&&m&&(d=u?u(d):d.replace(/[\S]/g,"*")),g&&d&&(a.textarea||m)&&(d=h?h(d,e.parentNode):d.replace(/[\S]/g,"*")),l==="OPTION"&&d){const v=qu({type:null,tagName:l,maskInputOptions:a});d=el({isMasked:Po(e,i,s,r,o,v),element:e,value:d,maskInputFn:h})}return{type:Vt.Text,textContent:d||"",isStyle:f,rootId:c}}function $P(e,t){const{doc:n,blockClass:i,blockSelector:r,unblockSelector:s,inlineStylesheet:o,maskInputOptions:u={},maskAttributeFn:a,maskInputFn:h,dataURLOptions:c={},inlineImages:l,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:g,maskAllText:m,maskTextClass:v,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:_}=t,w=TP(e,i,r,s),b=fP(e);let C={};const M=e.attributes.length;for(let T=0;T<M;T++){const A=e.attributes[T];TS(b,A.name,A.value)||(C[A.name]=SS(n,b,Oo(A.name),A.value,e,a))}if(b==="link"&&o){const T=Array.from(n.styleSheets).find(P=>P.href===e.href);let A=null;T&&(A=eu(T)),A&&(delete C.rel,delete C.href,C._cssText=nu(A,T.href))}if(b==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const T=eu(e.sheet);T&&(C._cssText=nu(T,qp()))}if(b==="input"||b==="textarea"||b==="select"||b==="option"){const T=e,A=jp(T),P=tu(T,cf(b),A),I=T.checked;if(A!=="submit"&&A!=="button"&&P){const E=Po(T,v,S,y,_,qu({type:A,tagName:cf(b),maskInputOptions:u}));C.value=el({isMasked:E,element:T,value:P,maskInputFn:h})}I&&(C.checked=I)}if(b==="option"&&(e.selected&&!u.select?C.selected=!0:delete C.selected),b==="canvas"&&d){if(e.__context==="2d")uP(e)||(C.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const T=e.toDataURL(c.type,c.quality),A=document.createElement("canvas");A.width=e.width,A.height=e.height;const P=A.toDataURL(c.type,c.quality);T!==P&&(C.rr_dataURL=T)}}if(b==="img"&&l){Us||(Us=n.createElement("canvas"),Uv=Us.getContext("2d"));const T=e,A=T.crossOrigin;T.crossOrigin="anonymous";const P=()=>{T.removeEventListener("load",P);try{Us.width=T.naturalWidth,Us.height=T.naturalHeight,Uv.drawImage(T,0,0),C.rr_dataURL=Us.toDataURL(c.type,c.quality)}catch(I){console.warn(`Cannot inline img src=${T.currentSrc}! Error: ${I}`)}A?C.crossOrigin=A:T.removeAttribute("crossorigin")};T.complete&&T.naturalWidth!==0?P():T.addEventListener("load",P)}if((b==="audio"||b==="video")&&(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),w){const{width:T,height:A}=e.getBoundingClientRect();C={class:C.class,rr_width:`${T}px`,rr_height:`${A}px`}}b==="iframe"&&!f(C.src)&&(e.contentDocument||(C.rr_src=C.src),delete C.src);let R;try{customElements.get(b)&&(R=!0)}catch{}return{type:Vt.Element,tagName:b,attributes:C,childNodes:[],isSVG:SP(e)||void 0,needBlock:w,rootId:g,isCustom:R}}function bt(e){return e==null?"":e.toLowerCase()}function IP(e,t){if(t.comment&&e.type===Vt.Comment)return!0;if(e.type===Vt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(bt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||bt(e.attributes.name)==="application-name"||bt(e.attributes.rel)==="icon"||bt(e.attributes.rel)==="apple-touch-icon"||bt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&bt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(bt(e.attributes.property).match(/^(og|twitter|fb):/)||bt(e.attributes.name).match(/^(og|twitter):/)||bt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(bt(e.attributes.name)==="robots"||bt(e.attributes.name)==="googlebot"||bt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(bt(e.attributes.name)==="author"||bt(e.attributes.name)==="generator"||bt(e.attributes.name)==="framework"||bt(e.attributes.name)==="publisher"||bt(e.attributes.name)==="progid"||bt(e.attributes.property).match(/^article:/)||bt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(bt(e.attributes.name)==="google-site-verification"||bt(e.attributes.name)==="yandex-verification"||bt(e.attributes.name)==="csrf-token"||bt(e.attributes.name)==="p:domain_verify"||bt(e.attributes.name)==="verify-v1"||bt(e.attributes.name)==="verification"||bt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function oo(e,t){const{doc:n,mirror:i,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:a,unmaskTextClass:h,maskTextSelector:c,unmaskTextSelector:l,skipChild:d=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskAttributeFn:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:y,dataURLOptions:S={},inlineImages:_=!1,recordCanvas:w=!1,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:M=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:P=!1}=t;let{preserveWhiteSpace:I=!0}=t;const E=xP(e,{doc:n,mirror:i,blockClass:r,blockSelector:s,maskAllText:u,unblockSelector:o,maskTextClass:a,unmaskTextClass:h,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:v,dataURLOptions:S,inlineImages:_,recordCanvas:w,keepIframeSrcFn:A,newlyAddedElement:P});if(!E)return console.warn(e,"not serialized"),null;let L;i.hasNode(e)?L=i.getId(e):IP(E,y)||!I&&E.type===Vt.Text&&!E.isStyle&&!E.textContent.replace(/^\s+|\s+$/gm,"").length?L=tl:L=Gp();const O=Object.assign(E,{id:L});if(i.add(e,O),L===tl)return null;b&&b(e);let B=!d;if(O.type===Vt.Element){B=B&&!O.needBlock,delete O.needBlock;const U=e.shadowRoot;U&&Pa(U)&&(O.isShadowHost=!0)}if((O.type===Vt.Document||O.type===Vt.Element)&&B){y.headWhitespace&&O.type===Vt.Element&&O.tagName==="head"&&(I=!1);const U={doc:n,mirror:i,blockClass:r,blockSelector:s,maskAllText:u,unblockSelector:o,maskTextClass:a,unmaskTextClass:h,maskTextSelector:c,unmaskTextSelector:l,skipChild:d,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:y,dataURLOptions:S,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:M,onStylesheetLoad:R,stylesheetLoadTimeout:T,keepIframeSrcFn:A};for(const z of Array.from(e.childNodes)){const j=oo(z,U);j&&O.childNodes.push(j)}if(iP(e)&&e.shadowRoot)for(const z of Array.from(e.shadowRoot.childNodes)){const j=oo(z,U);j&&(Pa(e.shadowRoot)&&(j.isShadow=!0),O.childNodes.push(j))}}return e.parentNode&&Oa(e.parentNode)&&Pa(e.parentNode)&&(O.isShadow=!0),O.type===Vt.Element&&O.tagName==="iframe"&&AP(e,()=>{const U=e.contentDocument;if(U&&C){const z=oo(U,{doc:U,mirror:i,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:a,unmaskTextClass:h,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:y,dataURLOptions:S,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:M,onStylesheetLoad:R,stylesheetLoadTimeout:T,keepIframeSrcFn:A});z&&C(e,z)}},M),O.type===Vt.Element&&O.tagName==="link"&&O.attributes.rel==="stylesheet"&&CP(e,()=>{if(R){const U=oo(e,{doc:n,mirror:i,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:a,unmaskTextClass:h,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:y,dataURLOptions:S,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:M,onStylesheetLoad:R,stylesheetLoadTimeout:T,keepIframeSrcFn:A});U&&R(e,U)}},T),O}function RP(e,t){const{mirror:n=new wS,blockClass:i="rr-block",blockSelector:r=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:u="rr-mask",unmaskTextClass:a=null,maskTextSelector:h=null,unmaskTextSelector:c=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskAttributeFn:g,maskTextFn:m,maskInputFn:v,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:R,keepIframeSrcFn:T=()=>!1}=t||{};return oo(e,{doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,maskAllText:o,maskTextClass:u,unmaskTextClass:a,maskTextSelector:h,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:l,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:S,inlineImages:d,recordCanvas:f,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:R,keepIframeSrcFn:T,newlyAddedElement:!1})}function xr(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function Cn(e,t,n=document){const i={capture:!0,passive:!0};return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}const Qs=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let zv={map:{},getId(){return console.error(Qs),-1},getNode(){return console.error(Qs),null},removeNodeFromMap(){console.error(Qs)},has(){return console.error(Qs),!1},reset(){console.error(Qs)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(zv=new Proxy(zv,{get(e,t,n){return t==="map"&&console.error(Qs),Reflect.get(e,t,n)}}));function nl(e,t,n={}){let i=null,r=0;return function(...s){const o=Date.now();!r&&n.leading===!1&&(r=o);const u=t-(o-r),a=this;u<=0||u>t?(i&&(clearTimeout(i),i=null),r=o,e.apply(a,s)):!i&&n.trailing!==!1&&(i=setTimeout(()=>{r=n.leading===!1?0:Date.now(),i=null,e.apply(a,s)},u))}}function ES(e,t,n,i,r=window){const s=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,i?n:{set(o){setTimeout(()=>{n.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>ES(e,t,s||{},!0)}function Kp(e,t,n){try{if(!(t in e))return()=>{};const i=e[t],r=n(i);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=r,()=>{e[t]=i}}catch{return()=>{}}}let iu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(iu=()=>new Date().getTime());function AS(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:xr([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||xr([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||xr([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:xr([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||xr([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||xr([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function CS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ui(e,t,n,i,r){if(!e)return!1;const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!s)return!1;const o=so(t,n);if(!r){const h=i&&s.matches(i);return o(s)&&!h}const u=hs(s,o);let a=-1;return u<0?!1:(i&&(a=hs(s,so(null,i))),u>-1&&a<0?!0:u<a)}function LP(e,t){return t.getId(e)!==-1}function Uh(e,t){return t.getId(e)===tl}function MS(e,t){if(Oa(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?MS(e.parentNode,t):!0:!0}function uf(e){return Boolean(e.changedTouches)}function OP(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function kS(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function $S(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function hf(e){return Boolean(xr([e,"optionalAccess",t=>t.shadowRoot]))}class PP{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return vI(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let i;return n===void 0?i=this.id++:i=n,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function IS(e){let t=null;return xr([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function NP(e){let t=e,n;for(;n=IS(t);)t=n;return t}function DP(e){const t=e.ownerDocument;if(!t)return!1;const n=NP(e);return t.contains(n)}function RS(e){const t=e.ownerDocument;return t?t.contains(e)||DP(e):!1}let zh;function FP(){if(zh)return zh;const e=window.document;let t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const i=n.contentWindow;i&&i.requestAnimationFrame&&(t=i.requestAnimationFrame),e.head.removeChild(n)}catch{}return zh=t.bind(window)}function BP(...e){return FP()(...e)}var Ye=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Ye||{}),Xe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Xe||{}),yn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(yn||{}),Xi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Xi||{});function HP(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}function Wv(e){return"__ln"in e}class UP{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let i=0;i<t;i++)n=HP([n,"optionalAccess",r=>r.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Wv(t.previousSibling)){const i=t.previousSibling.__ln.next;n.next=i,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,i&&(i.previous=n)}else if(t.nextSibling&&Wv(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;n.previous=i,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,i&&(i.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Vv=(e,t)=>`${e}@${t}`;class zP{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,i=new UP,r=a=>{let h=a,c=tl;for(;c===tl;)h=h&&h.nextSibling,c=h&&this.mirror.getId(h);return c},s=a=>{if(!a.parentNode||!RS(a))return;const h=Oa(a.parentNode)?this.mirror.getId(IS(a)):this.mirror.getId(a.parentNode),c=r(a);if(h===-1||c===-1)return i.addNode(a);const l=oo(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{kS(d,this.mirror)&&this.iframeManager.addIframe(d),$S(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),hf(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(d,f)=>{this.iframeManager.attachIframe(d,f),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,f)=>{this.stylesheetManager.attachLinkElement(d,f)}});l&&(t.push({parentId:h,nextId:c,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)jv(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||s(a);for(const a of this.addedSet)!Gv(this.droppedSet,a)&&!jv(this.removes,a,this.mirror)||Gv(this.movedSet,a)?s(a):this.droppedSet.add(a);let o=null;for(;i.length;){let a=null;if(o){const h=this.mirror.getId(o.value.parentNode),c=r(o.value);h!==-1&&c!==-1&&(a=o)}if(!a){let h=i.tail;for(;h;){const c=h;if(h=h.previous,c){const l=this.mirror.getId(c.value.parentNode);if(r(c.value)===-1)continue;if(l!==-1){a=c;break}else{const f=c.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=f.parentNode.host;if(this.mirror.getId(p)!==-1){a=c;break}}}}}}if(!a){for(;i.head;)i.removeNode(i.head.value);break}o=a.previous,i.removeNode(a.value),s(a.value)}const u={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:h}=a;if(typeof h.style=="string"){const c=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);c.length<h.style.length&&(c+l).split("var(").length===h.style.split("var(").length&&(h.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:h}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(u))},this.processMutation=t=>{if(Uh(t.target,this.mirror))return;let n;try{n=document.implementation.createHTMLDocument()}catch{n=this.doc}switch(t.type){case"characterData":{const i=t.target.textContent;!ui(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&i!==t.oldValue&&this.texts.push({value:Po(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&i?this.maskTextFn?this.maskTextFn(i):i.replace(/[\S]/g,"*"):i,node:t.target});break}case"attributes":{const i=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const u=jp(i),a=i.tagName;s=tu(i,a,u);const h=qu({maskInputOptions:this.maskInputOptions,tagName:a,type:u}),c=Po(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,h);s=el({isMasked:c,element:i,value:s,maskInputFn:this.maskInputFn})}if(ui(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let o=this.attributes.find(u=>u.node===t.target);if(i.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!i.contentDocument)r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o)),r==="type"&&i.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&i.setAttribute("data-rr-is-password","true"),!TS(i.tagName,r)&&(o.attributes[r]=SS(this.doc,Oo(i.tagName),Oo(r),s,i,this.maskAttributeFn),r==="style")){const u=n.createElement("span");t.oldValue&&u.setAttribute("style",t.oldValue);for(const a of Array.from(i.style)){const h=i.style.getPropertyValue(a),c=i.style.getPropertyPriority(a);h!==u.style.getPropertyValue(a)||c!==u.style.getPropertyPriority(a)?c===""?o.styleDiff[a]=h:o.styleDiff[a]=[h,c]:o._unchangedStyles[a]=[h,c]}for(const a of Array.from(u.style))i.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(ui(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(i=>this.genAdds(i,t.target)),t.removedNodes.forEach(i=>{const r=this.mirror.getId(i),s=Oa(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ui(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Uh(i,this.mirror)||!LP(i,this.mirror)||(this.addedSet.has(i)?(df(this.addedSet,i),this.droppedSet.add(i)):this.addedSet.has(t.target)&&r===-1||MS(t.target,this.mirror)||(this.movedSet.has(i)&&this.movedMap[Vv(r,s)]?df(this.movedSet,i):this.removes.push({parentId:s,id:r,isShadow:Oa(t.target)&&Pa(t.target)?!0:void 0})),this.mapRemoves.push(i))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Uh(t,this.mirror))return;this.movedSet.add(t);let i=null;n&&this.mirror.hasNode(n)&&(i=this.mirror.getId(n)),i&&i!==-1&&(this.movedMap[Vv(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ui(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(i=>this.genAdds(i)),hf(t)&&t.shadowRoot.childNodes.forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function df(e,t){e.delete(t),t.childNodes.forEach(n=>df(e,n))}function jv(e,t,n){return e.length===0?!1:LS(e,t,n)}function LS(e,t,n){const{parentNode:i}=t;if(!i)return!1;const r=n.getId(i);return e.some(s=>s.id===r)?!0:LS(e,i,n)}function Gv(e,t){return e.size===0?!1:OS(e,t)}function OS(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:OS(e,n):!1}let Na;function WP(e){Na=e}function VP(){Na=void 0}const rt=e=>Na?(...n)=>{try{return e(...n)}catch(i){if(Na&&Na(i)===!0)return()=>{};throw i}}:e;function ki(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}const ao=[];function wl(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function PS(e,t){const n=new zP;ao.push(n),n.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const r=ki([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);r&&window[r]&&(i=window[r]);const s=new i(rt(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function jP({mousemoveCb:e,sampling:t,doc:n,mirror:i}){if(t.mousemove===!1)return()=>{};const r=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],u;const a=nl(rt(l=>{const d=Date.now()-u;e(o.map(f=>(f.timeOffset-=d,f)),l),o=[],u=null}),s),h=rt(nl(rt(l=>{const d=wl(l),{clientX:f,clientY:p}=uf(l)?l.changedTouches[0]:l;u||(u=iu()),o.push({x:f,y:p,id:i.getId(d),timeOffset:iu()-u}),a(typeof DragEvent<"u"&&l instanceof DragEvent?Xe.Drag:l instanceof MouseEvent?Xe.MouseMove:Xe.TouchMove)}),r,{trailing:!1})),c=[Cn("mousemove",h,n),Cn("touchmove",h,n),Cn("drag",h,n)];return rt(()=>{c.forEach(l=>l())})}function GP({mouseInteractionCb:e,doc:t,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const u=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let h=null;const c=l=>d=>{const f=wl(d);if(ui(f,i,r,s,!0))return;let p=null,g=l;if("pointerType"in d){switch(d.pointerType){case"mouse":p=Xi.Mouse;break;case"touch":p=Xi.Touch;break;case"pen":p=Xi.Pen;break}p===Xi.Touch?yn[l]===yn.MouseDown?g="TouchStart":yn[l]===yn.MouseUp&&(g="TouchEnd"):Xi.Pen}else uf(d)&&(p=Xi.Touch);p!==null?(h=p,(g.startsWith("Touch")&&p===Xi.Touch||g.startsWith("Mouse")&&p===Xi.Mouse)&&(p=null)):yn[l]===yn.Click&&(p=h,h=null);const m=uf(d)?d.changedTouches[0]:d;if(!m)return;const v=n.getId(f),{clientX:y,clientY:S}=m;rt(e)({type:yn[g],id:v,x:y,y:S,...p!==null&&{pointerType:p}})};return Object.keys(yn).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&u[l]!==!1).forEach(l=>{let d=Oo(l);const f=c(l);if(window.PointerEvent)switch(yn[l]){case yn.MouseDown:case yn.MouseUp:d=d.replace("mouse","pointer");break;case yn.TouchStart:case yn.TouchEnd:return}a.push(Cn(d,f,t))}),rt(()=>{a.forEach(l=>l())})}function NS({scrollCb:e,doc:t,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,sampling:o}){const u=rt(nl(rt(a=>{const h=wl(a);if(!h||ui(h,i,r,s,!0))return;const c=n.getId(h);if(h===t&&t.defaultView){const l=AS(t.defaultView);e({id:c,x:l.left,y:l.top})}else e({id:c,x:h.scrollLeft,y:h.scrollTop})}),o.scroll||100));return Cn("scroll",u,t)}function qP({viewportResizeCb:e},{win:t}){let n=-1,i=-1;const r=rt(nl(rt(()=>{const s=CS(),o=xS();(n!==s||i!==o)&&(e({width:Number(o),height:Number(s)}),n=s,i=o)}),200));return Cn("resize",r,t)}const KP=["INPUT","TEXTAREA","SELECT"],qv=new WeakMap;function YP({inputCb:e,doc:t,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,ignoreClass:o,ignoreSelector:u,maskInputOptions:a,maskInputFn:h,sampling:c,userTriggeredOnInput:l,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:g}){function m(C){let M=wl(C);const R=C.isTrusted,T=M&&cf(M.tagName);if(T==="OPTION"&&(M=M.parentElement),!M||!T||KP.indexOf(T)<0||ui(M,i,r,s,!0))return;const A=M;if(A.classList.contains(o)||u&&A.matches(u))return;const P=jp(M);let I=tu(A,T,P),E=!1;const L=qu({maskInputOptions:a,tagName:T,type:P}),O=Po(M,d,p,f,g,L);(P==="radio"||P==="checkbox")&&(E=M.checked),I=el({isMasked:O,element:M,value:I,maskInputFn:h}),v(M,l?{text:I,isChecked:E,userTriggered:R}:{text:I,isChecked:E});const B=M.name;P==="radio"&&B&&E&&t.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach(U=>{if(U!==M){const z=el({isMasked:O,element:U,value:tu(U,T,P),maskInputFn:h});v(U,l?{text:z,isChecked:!E,userTriggered:!1}:{text:z,isChecked:!E})}})}function v(C,M){const R=qv.get(C);if(!R||R.text!==M.text||R.isChecked!==M.isChecked){qv.set(C,M);const T=n.getId(C);rt(e)({...M,id:T})}}const S=(c.input==="last"?["change"]:["input","change"]).map(C=>Cn(C,rt(m),t)),_=t.defaultView;if(!_)return()=>{S.forEach(C=>C())};const w=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),b=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&S.push(...b.map(C=>ES(C[0],C[1],{set(){rt(m)({target:this,isTrusted:!1})}},!1,_))),rt(()=>{S.forEach(C=>C())})}function ru(e){const t=[];function n(i,r){if(nc("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||nc("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||nc("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||nc("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const o=Array.from(i.parentRule.cssRules).indexOf(i);r.unshift(o)}else if(i.parentStyleSheet){const o=Array.from(i.parentStyleSheet.cssRules).indexOf(i);r.unshift(o)}return r}return n(e,t)}function Mr(e,t,n){let i,r;return e?(e.ownerNode?i=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:i}):{}}function XP({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const r=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:rt((c,l,d)=>{const[f,p]=d,{id:g,styleId:m}=Mr(l,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,adds:[{rule:f,index:p}]}),c.apply(l,d)})});const s=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:rt((c,l,d)=>{const[f]=d,{id:p,styleId:g}=Mr(l,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,removes:[{index:f}]}),c.apply(l,d)})});let o;i.CSSStyleSheet.prototype.replace&&(o=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:rt((c,l,d)=>{const[f]=d,{id:p,styleId:g}=Mr(l,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,replace:f}),c.apply(l,d)})}));let u;i.CSSStyleSheet.prototype.replaceSync&&(u=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:rt((c,l,d)=>{const[f]=d,{id:p,styleId:g}=Mr(l,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,replaceSync:f}),c.apply(l,d)})}));const a={};ic("CSSGroupingRule")?a.CSSGroupingRule=i.CSSGroupingRule:(ic("CSSMediaRule")&&(a.CSSMediaRule=i.CSSMediaRule),ic("CSSConditionRule")&&(a.CSSConditionRule=i.CSSConditionRule),ic("CSSSupportsRule")&&(a.CSSSupportsRule=i.CSSSupportsRule));const h={};return Object.entries(a).forEach(([c,l])=>{h[c]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(h[c].insertRule,{apply:rt((d,f,p)=>{const[g,m]=p,{id:v,styleId:y}=Mr(f.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||y&&y!==-1)&&e({id:v,styleId:y,adds:[{rule:g,index:[...ru(f),m||0]}]}),d.apply(f,p)})}),l.prototype.deleteRule=new Proxy(h[c].deleteRule,{apply:rt((d,f,p)=>{const[g]=p,{id:m,styleId:v}=Mr(f.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||v&&v!==-1)&&e({id:m,styleId:v,removes:[{index:[...ru(f),g]}]}),d.apply(f,p)})})}),rt(()=>{i.CSSStyleSheet.prototype.insertRule=r,i.CSSStyleSheet.prototype.deleteRule=s,o&&(i.CSSStyleSheet.prototype.replace=o),u&&(i.CSSStyleSheet.prototype.replaceSync=u),Object.entries(a).forEach(([c,l])=>{l.prototype.insertRule=h[c].insertRule,l.prototype.deleteRule=h[c].deleteRule})})}function DS({mirror:e,stylesheetManager:t},n){let i=null;n.nodeName==="#document"?i=e.getId(n):i=e.getId(n.host);const r=n.nodeName==="#document"?ki([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):ki([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),s=ki([r,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(ki([r,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return i===null||i===-1||!r||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return ki([s,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const u=ki([s,"access",a=>a.set,"optionalAccess",a=>a.call,"call",a=>a(this,o)]);if(i!==null&&i!==-1)try{t.adoptStyleSheets(o,i)}catch{}return u}}),rt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function JP({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:i},{win:r}){const s=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:rt((u,a,h)=>{const[c,l,d]=h;if(n.has(c))return s.apply(a,[c,l,d]);const{id:f,styleId:p}=Mr(ki([a,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),t,i.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,set:{property:c,value:l,priority:d},index:ru(a.parentRule)}),u.apply(a,h)})});const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:rt((u,a,h)=>{const[c]=h;if(n.has(c))return o.apply(a,[c]);const{id:l,styleId:d}=Mr(ki([a,"access",f=>f.parentRule,"optionalAccess",f=>f.parentStyleSheet]),t,i.styleMirror);return(l&&l!==-1||d&&d!==-1)&&e({id:l,styleId:d,remove:{property:c},index:ru(a.parentRule)}),u.apply(a,h)})}),rt(()=>{r.CSSStyleDeclaration.prototype.setProperty=s,r.CSSStyleDeclaration.prototype.removeProperty=o})}function QP({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:i,mirror:r,sampling:s,doc:o}){const u=rt(h=>nl(rt(c=>{const l=wl(c);if(!l||ui(l,t,n,i,!0))return;const{currentTime:d,volume:f,muted:p,playbackRate:g}=l;e({type:h,id:r.getId(l),currentTime:d,volume:f,muted:p,playbackRate:g})}),s.media||500)),a=[Cn("play",u(0),o),Cn("pause",u(1),o),Cn("seeked",u(2),o),Cn("volumechange",u(3),o),Cn("ratechange",u(4),o)];return rt(()=>{a.forEach(h=>h())})}function ZP({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const i=[],r=new WeakMap,s=n.FontFace;n.FontFace=function(a,h,c){const l=new s(a,h,c);return r.set(l,{family:a,buffer:typeof h!="string",descriptors:c,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),l};const o=Kp(t.fonts,"add",function(u){return function(a){return setTimeout(rt(()=>{const h=r.get(a);h&&(e(h),r.delete(a))}),0),u.apply(this,[a])}});return i.push(()=>{n.FontFace=s}),i.push(o),rt(()=>{i.forEach(u=>u())})}function eN(e){const{doc:t,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,selectionCb:o}=e;let u=!0;const a=rt(()=>{const h=t.getSelection();if(!h||u&&ki([h,"optionalAccess",d=>d.isCollapsed]))return;u=h.isCollapsed||!1;const c=[],l=h.rangeCount||0;for(let d=0;d<l;d++){const f=h.getRangeAt(d),{startContainer:p,startOffset:g,endContainer:m,endOffset:v}=f;ui(p,i,r,s,!0)||ui(m,i,r,s,!0)||c.push({start:n.getId(p),startOffset:g,end:n.getId(m),endOffset:v})}o({ranges:c})});return a(),Cn("selectionchange",a)}function tN({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Kp(n.customElements,"define",function(r){return function(s,o,u){try{t({define:{name:s}})}catch{}return r.apply(this,[s,o,u])}})}function nN(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const i=PS(e,e.doc),r=jP(e),s=GP(e),o=NS(e),u=qP(e,{win:n}),a=YP(e),h=QP(e),c=XP(e,{win:n}),l=DS(e,e.doc),d=JP(e,{win:n}),f=e.collectFonts?ZP(e):()=>{},p=eN(e),g=tN(e),m=[];for(const v of e.plugins)m.push(v.observer(v.callback,n,v.options));return rt(()=>{ao.forEach(v=>v.reset()),i.disconnect(),r(),s(),o(),u(),a(),h(),c(),l(),d(),f(),p(),g(),m.forEach(v=>v())})}function nc(e){return typeof window[e]<"u"}function ic(e){return Boolean(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ff{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,i,r){const s=i||this.getIdToRemoteIdMap(t),o=r||this.getRemoteIdToIdMap(t);let u=s.get(n);return u||(u=this.generateIdFn(),s.set(n,u),o.set(u,n)),u}getIds(t,n){const i=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,i,r))}getRemoteId(t,n,i){const r=i||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=r.get(n);return s||-1}getRemoteIds(t,n){const i=this.getRemoteIdToIdMap(t);return n.map(r=>this.getRemoteId(t,r,i))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function Kv(e){let t,n=e[0],i=1;for(;i<e.length;){const r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...o)=>n.call(t,...o)),t=void 0)}return n}class iN{constructor(){this.crossOriginIframeMirror=new ff(Gp),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class rN{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ff(Gp),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ff(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Kv([this,"access",i=>i.loadListener,"optionalCall",i=>i(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const r=this.crossOriginIframeMap.get(t.source);if(!r)return;const s=this.transformCrossOriginEvent(r,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Ye.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:Ye.IncrementalSnapshot,data:{source:Xe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ye.Meta:case Ye.Load:case Ye.DomContentLoaded:return!1;case Ye.Plugin:return n;case Ye.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Ye.IncrementalSnapshot:switch(n.data.source){case Xe.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(i.node,r)}),n.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case Xe.Drag:case Xe.TouchMove:case Xe.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case Xe.ViewportResize:return!1;case Xe.MediaInteraction:case Xe.MouseInteraction:case Xe.Scroll:case Xe.CanvasMutation:case Xe.Input:return this.replaceIds(n.data,t,["id"]),n;case Xe.StyleSheetRule:case Xe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Xe.Font:return n;case Xe.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),n;case Xe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Kv([n,"access",i=>i.data,"access",i=>i.styles,"optionalAccess",i=>i.forEach,"call",i=>i(r=>{this.replaceStyleIds(r,t,["styleId"])})]),n}}return!1}replace(t,n,i,r){for(const s of r)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(i,n[s]):n[s]=t.getId(i,n[s]));return n}replaceIds(t,n,i){return this.replace(this.crossOriginIframeMirror,t,n,i)}replaceStyleIds(t,n,i){return this.replace(this.crossOriginIframeStyleMirror,t,n,i)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,n)})}patchRootIdOnNode(t,n){t.type!==Vt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,n)})}}class sN{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class oN{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Pa(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const i=PS({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(NS({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(DS({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const i=this;this.restoreHandlers.push(Kp(t.prototype,"attachShadow",function(r){return function(s){const o=r.call(this,s);return this.shadowRoot&&RS(this)&&i.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Yv{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class aN{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new PP,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const i={id:n,styleIds:[]},r=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),r.push({styleId:o,rules:Array.from(s.rules||CSSRule,(u,a)=>({rule:bS(u),index:a}))})),i.styleIds.push(o)}r.length>0&&(i.styles=r),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class lN{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){BP(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const i=this.nodeMap.get(t);return i&&Array.from(i).some(r=>r!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function Ft(e){const t=e;return t.timestamp=iu(),t}let su;const ai=cP();function Br(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:u="rr-ignore",ignoreSelector:a=null,maskAllText:h=!1,maskTextClass:c="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:f=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:v,maskAttributeFn:y,maskInputFn:S,maskTextFn:_,packFn:w,sampling:b={},dataURLOptions:C={},mousemoveWait:M,recordCanvas:R=!1,recordCrossOriginIframes:T=!1,recordAfter:A=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:I=!1,inlineImages:E=!1,plugins:L,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:B=new Set([]),errorHandler:U,onMutation:z,getCanvasManager:j}=e;WP(U);const q=T?window.parent===window:!0;let ne=!1;if(!q)try{window.parent.document&&(ne=!1)}catch{ne=!0}if(q&&!t)throw new Error("emit function is required");M!==void 0&&b.mousemove===void 0&&(b.mousemove=M),ai.reset();const G=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:m!==void 0?m:{},X=v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:v==="all",headMetaDescKeywords:v==="all"}:v||{};OP();let ie,le=0;const Y=fe=>{for(const ye of L||[])ye.eventProcessor&&(fe=ye.eventProcessor(fe));return w&&!ne&&(fe=w(fe)),fe},J=(fe,ye)=>{if(Nh([ao,"access",ge=>ge[0],"optionalAccess",ge=>ge.isFrozen,"call",ge=>ge()])&&fe.type!==Ye.FullSnapshot&&!(fe.type===Ye.IncrementalSnapshot&&fe.data.source===Xe.Mutation)&&ao.forEach(ge=>ge.unfreeze()),q)Nh([t,"optionalCall",ge=>ge(Y(fe),ye)]);else if(ne){const ge={type:"rrweb",event:Y(fe),origin:window.location.origin,isCheckout:ye};window.parent.postMessage(ge,"*")}if(fe.type===Ye.FullSnapshot)ie=fe,le=0;else if(fe.type===Ye.IncrementalSnapshot){if(fe.data.source===Xe.Mutation&&fe.data.isAttachIframe)return;le++;const ge=i&&le>=i,ve=n&&fe.timestamp-ie.timestamp>n;(ge||ve)&&ce(!0)}},te=fe=>{J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.Mutation,...fe}}))},ue=fe=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.Scroll,...fe}})),Se=fe=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...fe}})),Ce=fe=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.AdoptedStyleSheet,...fe}})),F=new aN({mutationCb:te,adoptedStyleSheetCb:Ce}),N=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new iN:new rN({mirror:ai,mutationCb:te,stylesheetManager:F,recordCrossOriginIframes:T,wrappedEmit:J});for(const fe of L||[])fe.getMirror&&fe.getMirror({nodeMirror:ai,crossOriginIframeMirror:N.crossOriginIframeMirror,crossOriginIframeStyleMirror:N.crossOriginIframeStyleMirror});const W=new lN,ee=uN(j,{mirror:ai,win:window,mutationCb:fe=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...fe}})),recordCanvas:R,blockClass:r,blockSelector:s,unblockSelector:o,sampling:b.canvas,dataURLOptions:C}),re=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new sN:new oN({mutationCb:te,scrollCb:ue,bypassOptions:{onMutation:z,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:h,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:G,dataURLOptions:C,maskAttributeFn:y,maskTextFn:_,maskInputFn:S,recordCanvas:R,inlineImages:E,sampling:b,slimDOMOptions:X,iframeManager:N,stylesheetManager:F,canvasManager:ee,keepIframeSrcFn:O,processedNodeManager:W},mirror:ai}),ce=(fe=!1)=>{J(Ft({type:Ye.Meta,data:{href:window.location.href,width:xS(),height:CS()}}),fe),F.reset(),re.init(),ao.forEach(ge=>ge.lock());const ye=RP(document,{mirror:ai,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:h,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskAllInputs:G,maskAttributeFn:y,maskInputFn:S,maskTextFn:_,slimDOM:X,dataURLOptions:C,recordCanvas:R,inlineImages:E,onSerialize:ge=>{kS(ge,ai)&&N.addIframe(ge),$S(ge,ai)&&F.trackLinkElement(ge),hf(ge)&&re.addShadowRoot(ge.shadowRoot,document)},onIframeLoad:(ge,ve)=>{N.attachIframe(ge,ve),re.observeAttachShadow(ge)},onStylesheetLoad:(ge,ve)=>{F.attachLinkElement(ge,ve)},keepIframeSrcFn:O});if(!ye)return console.warn("Failed to snapshot the document");J(Ft({type:Ye.FullSnapshot,data:{node:ye,initialOffset:AS(window)}})),ao.forEach(ge=>ge.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&F.adoptStyleSheets(document.adoptedStyleSheets,ai.getId(document))};su=ce;try{const fe=[],ye=ve=>rt(nN)({onMutation:z,mutationCb:te,mousemoveCb:(Z,ae)=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:ae,positions:Z}})),mouseInteractionCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.MouseInteraction,...Z}})),scrollCb:ue,viewportResizeCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.ViewportResize,...Z}})),inputCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.Input,...Z}})),mediaInteractionCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.MediaInteraction,...Z}})),styleSheetRuleCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.StyleSheetRule,...Z}})),styleDeclarationCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.StyleDeclaration,...Z}})),canvasMutationCb:Se,fontCb:Z=>J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.Font,...Z}})),selectionCb:Z=>{J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.Selection,...Z}}))},customElementCb:Z=>{J(Ft({type:Ye.IncrementalSnapshot,data:{source:Xe.CustomElement,...Z}}))},blockClass:r,ignoreClass:u,ignoreSelector:a,maskAllText:h,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskInputOptions:G,inlineStylesheet:p,sampling:b,recordCanvas:R,inlineImages:E,userTriggeredOnInput:P,collectFonts:I,doc:ve,maskAttributeFn:y,maskInputFn:S,maskTextFn:_,keepIframeSrcFn:O,blockSelector:s,unblockSelector:o,slimDOMOptions:X,dataURLOptions:C,mirror:ai,iframeManager:N,stylesheetManager:F,shadowDomManager:re,processedNodeManager:W,canvasManager:ee,ignoreCSSAttributes:B,plugins:Nh([L,"optionalAccess",Z=>Z.filter,"call",Z=>Z(ae=>ae.observer),"optionalAccess",Z=>Z.map,"call",Z=>Z(ae=>({observer:ae.observer,options:ae.options,callback:K=>J(Ft({type:Ye.Plugin,data:{plugin:ae.name,payload:K}}))}))])||[]},{});N.addLoadListener(ve=>{try{fe.push(ye(ve.contentDocument))}catch(Z){console.warn(Z)}});const ge=()=>{ce(),fe.push(ye(document))};return document.readyState==="interactive"||document.readyState==="complete"?ge():(fe.push(Cn("DOMContentLoaded",()=>{J(Ft({type:Ye.DomContentLoaded,data:{}})),A==="DOMContentLoaded"&&ge()})),fe.push(Cn("load",()=>{J(Ft({type:Ye.Load,data:{}})),A==="load"&&ge()},window))),()=>{fe.forEach(ve=>ve()),W.destroy(),su=void 0,VP()}}catch(fe){console.warn(fe)}}function cN(e){if(!su)throw new Error("please take full snapshot after start recording");su(e)}Br.mirror=ai;Br.takeFullSnapshot=cN;function uN(e,t){try{return e?e(t):new Yv}catch{return console.warn("Unable to initialize CanvasManager"),new Yv}}const hN=3,dN=5;function Yp(e){return e>9999999999?e:e*1e3}function Wh(e){return e>9999999999?e/1e3:e}function Sl(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Ye.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Mi(t,10,1e3)}}),t.category==="console")))}const fN="button,a";function FS(e){return e.closest(fN)||e}function BS(e){const t=HS(e);return!t||!(t instanceof Element)?t:FS(t)}function HS(e){return pN(e)?e.target:e}function pN(e){return typeof e=="object"&&!!e&&"target"in e}let kr;function gN(e){return kr||(kr=[],mN()),kr.push(e),()=>{const t=kr?kr.indexOf(e):-1;t>-1&&kr.splice(t,1)}}function mN(){Qt(wt,"open",function(e){return function(...t){if(kr)try{kr.forEach(n=>n())}catch{}return e.apply(wt,t)}})}function vN(e,t,n){e.handleClick(t,n)}class yN{constructor(t,n,i=Sl){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=i}addListeners(){const t=gN(()=>{this._lastMutation=Xv()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(bN(n,this._ignoreSelector)||!wN(t))return;const i={timestamp:Wh(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(r=>r.node===i.node&&Math.abs(r.timestamp-i.timestamp)<1)||(this._clicks.push(i),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Wh(t)}registerScroll(t=Date.now()){this._lastScroll=Wh(t)}registerClick(t){const n=FS(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Xv();this._clicks.forEach(i=>{!i.mutationAfter&&this._lastMutation&&(i.mutationAfter=i.timestamp<=this._lastMutation?this._lastMutation-i.timestamp:void 0),!i.scrollAfter&&this._lastScroll&&(i.scrollAfter=i.timestamp<=this._lastScroll?this._lastScroll-i.timestamp:void 0),i.timestamp+this._timeout<=n&&t.push(i)});for(const i of t){const r=this._clicks.indexOf(i);r>-1&&(this._generateBreadcrumbs(i),this._clicks.splice(r,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,i=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,r=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!i&&!r,{clickCount:o,clickBreadcrumb:u}=t;if(s){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,h=a<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:u.message,timestamp:u.timestamp,category:"ui.slowClickDetected",data:{...u.data,url:wt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:h,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const a={type:"default",message:u.message,timestamp:u.timestamp,category:"ui.multiClick",data:{...u.data,url:wt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const _N=["A","BUTTON","INPUT"];function bN(e,t){return!!(!_N.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function wN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Xv(){return Date.now()/1e3}function SN(e,t){try{if(!TN(t))return;const{source:n}=t.data;if(n===Xe.Mutation&&e.registerMutation(t.timestamp),n===Xe.Scroll&&e.registerScroll(t.timestamp),EN(t)){const{type:i,id:r}=t.data,s=Br.mirror.getNode(r);s instanceof HTMLElement&&i===yn.Click&&e.registerClick(s)}}catch{}}function TN(e){return e.type===hN}function EN(e){return e.data.source===Xe.MouseInteraction}function Ri(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ou;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(ou||(ou={}));const AN=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function CN(e){const t={};for(const n in e)if(AN.has(n)){let i=n;(n==="data-testid"||n==="data-test-id")&&(i="testId"),t[i]=e[n]}return t}const xN=e=>t=>{if(!e.isEnabled())return;const n=MN(t);if(!n)return;const i=t.name==="click",r=i?t.event:void 0;i&&e.clickDetector&&r&&r.target&&!r.altKey&&!r.metaKey&&!r.ctrlKey&&!r.shiftKey&&vN(e.clickDetector,n,BS(t.event)),Sl(e,n)};function US(e,t){const n=Br.mirror.getId(e),i=n&&Br.mirror.getNode(n),r=i&&Br.mirror.getMeta(i),s=r&&$N(r)?r:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(o=>o.type===ou.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:CN(s.attributes)}}:{}}}function MN(e){const{target:t,message:n}=kN(e);return Ri({category:`ui.${e.name}`,...US(t,n)})}function kN(e){const t=e.name==="click";let n,i=null;try{i=t?BS(e.event):HS(e.event),n=ws(i,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:i,message:n}}function $N(e){return e.type===ou.Element}function IN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=RN(t);!n||Sl(e,n)}function RN(e){const{metaKey:t,shiftKey:n,ctrlKey:i,altKey:r,key:s,target:o}=e;if(!o||LN(o)||!s)return null;const u=t||i||r,a=s.length===1;if(!u&&a)return null;const h=ws(o,{maxStringLength:200})||"<unknown>",c=US(o,h);return Ri({category:"ui.keyDown",message:h,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:i,altKey:r,key:s}})}function LN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Jv={resource:FN,paint:NN,navigation:DN};function ON(e){return e.map(PN).filter(Boolean)}function PN(e){return Jv[e.entryType]?Jv[e.entryType](e):null}function No(e){return((vi||wt.performance.timeOrigin)+e)/1e3}function NN(e){const{duration:t,entryType:n,name:i,startTime:r}=e,s=No(r);return{type:n,name:i,start:s,end:s+t,data:void 0}}function DN(e){const{entryType:t,name:n,decodedBodySize:i,duration:r,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:u,domContentLoadedEventEnd:a,domInteractive:h,loadEventStart:c,loadEventEnd:l,redirectCount:d,startTime:f,transferSize:p,type:g}=e;return r===0?null:{type:`${t}.${g}`,start:No(f),end:No(s),name:n,data:{size:p,decodedBodySize:i,encodedBodySize:o,duration:r,domInteractive:h,domContentLoadedEventStart:u,domContentLoadedEventEnd:a,loadEventStart:c,loadEventEnd:l,domComplete:s,redirectCount:d}}}function FN(e){const{entryType:t,initiatorType:n,name:i,responseEnd:r,startTime:s,decodedBodySize:o,encodedBodySize:u,responseStatus:a,transferSize:h}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:No(s),end:No(r),name:i,data:{size:h,statusCode:a,decodedBodySize:o,encodedBodySize:u}}}function BN(e){const t=e.entries,n=t[t.length-1],i=n?n.element:void 0,r=e.value,s=No(r);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:s,end:s,data:{value:r,size:r,nodeId:i?Br.mirror.getId(i):void 0}}}function HN(e){function t(r){e.performanceEntries.includes(r)||e.performanceEntries.push(r)}function n({entries:r}){r.forEach(t)}const i=[];return["navigation","paint","resource"].forEach(r=>{i.push(ju(r,n))}),i.push(mS(({metric:r})=>{e.replayPerformanceEntries.push(BN(r))})),()=>{i.forEach(r=>r())}}const _t=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,UN='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function zN(){const e=new Blob([UN]);return URL.createObjectURL(e)}function Sn(e,t){!_t||(pe.info(e),t&&zS(e))}function Eo(e,t){!_t||(pe.info(e),t&&setTimeout(()=>{zS(e)},0))}function zS(e){Gr({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class Xp extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Vp}.`)}}class WS{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Vp)throw new Xp;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Yp(t):null}}class WN{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:i})=>{i.success?t():n()},{once:!0}),this._worker.addEventListener("error",i=>{n(i)},{once:!0})}),this._ensureReadyPromise)}destroy(){Sn("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const i=this._getAndIncrementId();return new Promise((r,s)=>{const o=({data:u})=>{const a=u;if(a.method===t&&a.id===i){if(this._worker.removeEventListener("message",o),!a.success){_t&&pe.error("[Replay]",a.response),s(new Error("Error in compression worker"));return}r(a.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:i,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class VN{constructor(t){this._worker=new WN(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Yp(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const i=JSON.stringify(t);return this._totalSize+=i.length,this._totalSize>Vp?Promise.reject(new Xp):this._sendEventToWorker(i)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{_t&&pe.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class jN{constructor(t){this._fallback=new WS,this._compression=new VN(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{Sn("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,i=[];for(const r of t)i.push(this._compression.addEvent(r));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(i)}catch(r){_t&&pe.warn("[Replay] Failed to add events when switching buffers.",r)}}}function GN({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=qN(t);if(n)return n}return Sn("[Replay] Using simple buffer"),new WS}function qN(e){try{const t=e||KN();if(!t)return;Sn(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new jN(n)}catch{Sn("[Replay] Failed to create compression worker")}}function KN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?zN():""}function Jp(){try{return"sessionStorage"in wt&&!!wt.sessionStorage}catch{return!1}}function YN(e){XN(),e.session=void 0}function XN(){if(!!Jp())try{wt.sessionStorage.removeItem(zp)}catch{}}function VS(e){return e===void 0?!1:Math.random()<e}function jS(e){const t=Date.now(),n=e.id||Yt(),i=e.started||t,r=e.lastActivity||t,s=e.segmentId||0,o=e.sampled,u=e.previousSessionId;return{id:n,started:i,lastActivity:r,segmentId:s,sampled:o,previousSessionId:u}}function Qp(e){if(!!Jp())try{wt.sessionStorage.setItem(zp,JSON.stringify(e))}catch{}}function JN(e,t){return VS(e)?"session":t?"buffer":!1}function Qv({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:i}={}){const r=JN(e,t),s=jS({sampled:r,previousSessionId:i});return n&&Qp(s),s}function QN(e){if(!Jp())return null;try{const t=wt.sessionStorage.getItem(zp);if(!t)return null;const n=JSON.parse(t);return Eo("[Replay] Loading existing session",e),jS(n)}catch{return null}}function pf(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function GS(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:i=Date.now()}){return pf(e.started,t,i)||pf(e.lastActivity,n,i)}function qS(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!GS(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Vh({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:i},r){const s=r.stickySession&&QN(e);return s?qS(s,{sessionIdleExpire:t,maxReplayDuration:n})?(Eo("[Replay] Session in sessionStorage is expired, creating new one..."),Qv(r,{previousSessionId:s.id})):s:(Eo("[Replay] Creating new session",e),Qv(r,{previousSessionId:i}))}function ZN(e){return e.type===Ye.Custom}function Zp(e,t,n){return YS(e,t)?(KS(e,t,n),!0):!1}function eD(e,t,n){return YS(e,t)?KS(e,t,n):Promise.resolve(null)}async function KS(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const i=e.getOptions(),r=tD(t,i.beforeAddRecordingEvent);return r?await e.eventBuffer.addEvent(r):void 0}catch(i){const r=i&&i instanceof Xp?"addEventSizeExceeded":"addEvent";_t&&pe.error(i),await e.stop({reason:r});const s=At();s&&s.recordDroppedEvent("internal_sdk_error","replay")}}function YS(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Yp(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Sn(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function tD(e,t){try{if(typeof t=="function"&&ZN(e))return t(e)}catch(n){return _t&&pe.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function eg(e){return!e.type}function gf(e){return e.type==="transaction"}function nD(e){return e.type==="replay_event"}function Zv(e){return e.type==="feedback"}function XS(e){const t=sD();return(n,i)=>{if(!e.isEnabled()||!eg(n)&&!gf(n))return;const r=i&&i.statusCode;if(!(t&&(!r||r<200||r>=300))){if(gf(n)){iD(e,n);return}rD(e,n)}}}function iD(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function rD(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:i}=e.getOptions();typeof i=="function"&&!i(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function sD(){const e=At();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function oD(e){return t=>{!e.isEnabled()||!eg(t)||aD(e,t)}}function aD(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const i=Ri({category:"replay.hydrate-error"});Sl(e,i)}}function lD(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function cD(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Ye.Custom,timestamp:t.timestamp*1e3,data:{timestamp:t.timestamp,tag:"breadcrumb",payload:{category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function uD(e,t){return e.recordingMode!=="buffer"||t.message===Wp||!t.exception||t.type?!1:VS(e.getOptions().errorSampleRate)}function hD(e,t=!1){const n=t?XS(e):void 0;return Object.assign((i,r)=>e.isEnabled()?nD(i)?(delete i.breadcrumbs,i):!eg(i)&&!gf(i)&&!Zv(i)||!e.checkAndHandleExpiredSession()?i:Zv(i)?(e.flush(),i.contexts.feedback.replay_id=e.getSessionId(),cD(e,i),i):lD(i,r)&&!e.getOptions()._experiments.captureExceptions?(_t&&pe.log("[Replay] Ignoring error from rrweb internals",i),null):((uD(e,i)||e.recordingMode==="session")&&(i.tags={...i.tags,replayId:e.getSessionId()}),n&&n(i,{statusCode:200}),i):i,{id:"Replay"})}function Ku(e,t){return t.map(({type:n,start:i,end:r,name:s,data:o})=>{const u=e.throttledAddEvent({type:Ye.Custom,timestamp:i,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:i,endTimestamp:r,data:o}}});return typeof u=="string"?Promise.resolve(null):u})}function dD(e){const{from:t,to:n}=e,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:n,data:{previous:t}}}function fD(e){return t=>{if(!e.isEnabled())return;const n=dD(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Ku(e,[n]),!1)))}}function pD(e,t){return _t&&e.getOptions()._experiments.traceInternals?!1:TR(t,At())}function Yu(e,t){!e.isEnabled()||t!==null&&(pD(e,t.name)||e.addUpdate(()=>(Ku(e,[t]),!0)))}function gD(e){const{startTimestamp:t,endTimestamp:n,fetchData:i,response:r}=e;if(!n)return null;const{method:s,url:o}=i;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:s,statusCode:r?r.status:void 0}}}function mD(e){return t=>{if(!e.isEnabled())return;const n=gD(t);Yu(e,n)}}function vD(e){const{startTimestamp:t,endTimestamp:n,xhr:i}=e,r=i[Lr];if(!t||!n||!r)return null;const{method:s,url:o,status_code:u}=r;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:s,statusCode:u}}}function yD(e){return t=>{if(!e.isEnabled())return;const n=vD(t);Yu(e,n)}}function Xu(e,t){if(!!e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=e1(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function JS(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function QS(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[e1(e)];if(!e)return[void 0]}catch{return _t&&pe.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return _t&&pe.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function au(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},i=n.warnings||[];return n.warnings=[...i,t],e._meta=n,e}function ZS(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:i,url:r,method:s,statusCode:o,request:u,response:a}=t;return{type:e,start:n/1e3,end:i/1e3,name:r,data:Nn({method:s,statusCode:o,request:u,response:a})}}function il(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Hr(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const i={headers:e,size:t},{body:r,warnings:s}=_D(n);return i.body=r,s&&s.length>0&&(i._meta={warnings:s}),i}function mf(e,t){return Object.keys(e).reduce((n,i)=>{const r=i.toLowerCase();return t.includes(r)&&e[i]&&(n[r]=e[i]),n},{})}function e1(e){return new URLSearchParams(e).toString()}function _D(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Fv,n=bD(e);if(t){const i=e.slice(0,Fv);return n?{body:i,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${i}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function bD(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function lu(e,t){const n=wD(e);return Yo(n,t)}function wD(e,t=wt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(wt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const i=n.href;return!e.endsWith("/")&&i.endsWith("/")?i.slice(0,-1):i}async function SD(e,t,n){try{const i=await ED(e,t,n),r=ZS("resource.fetch",i);Yu(n.replay,r)}catch(i){_t&&pe.error("[Replay] Failed to capture fetch breadcrumb",i)}}function TD(e,t,n){const{input:i,response:r}=t,s=i?t1(i):void 0,o=Xu(s,n.textEncoder),u=r?JS(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),u!==void 0&&(e.data.response_body_size=u)}async function ED(e,t,n){const i=Date.now(),{startTimestamp:r=i,endTimestamp:s=i}=t,{url:o,method:u,status_code:a=0,request_body_size:h,response_body_size:c}=e.data,l=lu(o,n.networkDetailAllowUrls)&&!lu(o,n.networkDetailDenyUrls),d=l?AD(n,t.input,h):il(h),f=await CD(l,n,t.response,c);return{startTimestamp:r,endTimestamp:s,url:o,method:u,statusCode:a,request:d,response:f}}function AD({networkCaptureBodies:e,networkRequestHeaders:t},n,i){const r=n?kD(n,t):{};if(!e)return Hr(r,i,void 0);const s=t1(n),[o,u]=QS(s),a=Hr(r,i,o);return u?au(a,u):a}async function CD(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:i},r,s){if(!e&&s!==void 0)return il(s);const o=r?n1(r.headers,i):{};if(!r||!t&&s!==void 0)return Hr(o,s,void 0);const[u,a]=await MD(r),h=xD(u,{networkCaptureBodies:t,textEncoder:n,responseBodySize:s,captureDetails:e,headers:o});return a?au(h,a):h}function xD(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:r,headers:s}){try{const o=e&&e.length&&i===void 0?Xu(e,n):i;return r?t?Hr(s,o,e):Hr(s,o,void 0):il(o)}catch(o){return _t&&pe.warn("[Replay] Failed to serialize response body",o),Hr(s,i,void 0)}}async function MD(e){const t=$D(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await ID(t)]}catch(n){return _t&&pe.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function t1(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function n1(e,t){const n={};return t.forEach(i=>{e.get(i)&&(n[i]=e.get(i))}),n}function kD(e,t){return e.length===1&&typeof e[0]!="string"?ey(e[0],t):e.length===2?ey(e[1],t):{}}function ey(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?n1(n,t):Array.isArray(n)?{}:mf(n,t):{}}function $D(e){try{return e.clone()}catch(t){_t&&pe.warn("[Replay] Failed to clone response body",t)}}function ID(e){return new Promise((t,n)=>{const i=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);RD(e).then(r=>t(r),r=>n(r)).finally(()=>clearTimeout(i))})}async function RD(e){return await e.text()}async function LD(e,t,n){try{const i=PD(e,t,n),r=ZS("resource.xhr",i);Yu(n.replay,r)}catch(i){_t&&pe.error("[Replay] Failed to capture xhr breadcrumb",i)}}function OD(e,t,n){const{xhr:i,input:r}=t;if(!i)return;const s=Xu(r,n.textEncoder),o=i.getResponseHeader("content-length")?JS(i.getResponseHeader("content-length")):BD(i.response,i.responseType,n.textEncoder);s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}function PD(e,t,n){const i=Date.now(),{startTimestamp:r=i,endTimestamp:s=i,input:o,xhr:u}=t,{url:a,method:h,status_code:c=0,request_body_size:l,response_body_size:d}=e.data;if(!a)return null;if(!u||!lu(a,n.networkDetailAllowUrls)||lu(a,n.networkDetailDenyUrls)){const b=il(l),C=il(d);return{startTimestamp:r,endTimestamp:s,url:a,method:h,statusCode:c,request:b,response:C}}const f=u[Lr],p=f?mf(f.request_headers,n.networkRequestHeaders):{},g=mf(ND(u),n.networkResponseHeaders),[m,v]=n.networkCaptureBodies?QS(o):[void 0],[y,S]=n.networkCaptureBodies?DD(u):[void 0],_=Hr(p,l,m),w=Hr(g,d,y);return{startTimestamp:r,endTimestamp:s,url:a,method:h,statusCode:c,request:v?au(_,v):_,response:S?au(w,S):w}}function ND(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,i)=>{const[r,s]=i.split(": ");return n[r.toLowerCase()]=s,n},{}):{}}function DD(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return FD(e.response,e.responseType)}catch(n){t.push(n)}return _t&&pe.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function FD(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return _t&&pe.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return _t&&pe.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function BD(e,t,n){try{const i=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Xu(i,n)}catch{return}}function HD(e){const t=At();try{const n=new TextEncoder,{networkDetailAllowUrls:i,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:u}=e.getOptions(),a={replay:e,textEncoder:n,networkDetailAllowUrls:i,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:u};t&&t.on?t.on("beforeAddBreadcrumb",(h,c)=>UD(a,h,c)):(Ap(mD(e)),Cp(yD(e)))}catch{}}function UD(e,t,n){if(!!t.data)try{zD(t)&&VD(n)&&(OD(t,n,e),LD(t,n,e)),WD(t)&&jD(n)&&(TD(t,n,e),SD(t,n,e))}catch{_t&&pe.warn("Error when enriching network breadcrumb")}}function zD(e){return e.category==="xhr"}function WD(e){return e.category==="fetch"}function VD(e){return e&&e.xhr}function jD(e){return e&&e.response}let ty=null;function GD(e){return!!e.category}const qD=e=>t=>{if(!e.isEnabled())return;const n=KD(t);!n||Sl(e,n)};function KD(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return ty===t||!t||(ty=t,!GD(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?YD(t):Ri(t)}function YD(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Ri(e);let n=!1;const i=t.map(r=>{if(!r)return r;if(typeof r=="string")return r.length>tc?(n=!0,`${r.slice(0,tc)}\u2026`):r;if(typeof r=="object")try{const s=Mi(r,7);return JSON.stringify(s).length>tc?(n=!0,`${JSON.stringify(s,null,2).slice(0,tc)}\u2026`):s}catch{}return r});return Ri({...e,data:{...e.data,arguments:i,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function XD(e){const t=si(),n=At();t.addScopeListener(qD(e)),bw(xN(e)),Nu(fD(e)),HD(e);const i=hD(e,!ny(n));n&&n.addEventProcessor?n.addEventProcessor(i):yR(i),ny(n)&&(n.on("beforeSendEvent",oD(e)),n.on("afterSendEvent",XS(e)),n.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),n.on("startTransaction",r=>{e.lastTransaction=r}),n.on("finishTransaction",r=>{e.lastTransaction=r}),n.on("beforeSendFeedback",(r,s)=>{const o=e.getSessionId();s&&s.includeReplay&&e.isEnabled()&&o&&(e.flush(),r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=o))}))}function ny(e){return!!(e&&e.on)}async function JD(e){try{return Promise.all(Ku(e,[QD(wt.performance.memory)]))}catch{return[]}}function QD(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}=e,r=Date.now()/1e3;return{type:"memory",name:"memory",start:r,end:r,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}}}}function ZD(e,t,n){let i,r,s;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function u(){return a(),i=e(),i}function a(){r!==void 0&&clearTimeout(r),s!==void 0&&clearTimeout(s),r=s=void 0}function h(){return r!==void 0||s!==void 0?u():i}function c(){return r&&clearTimeout(r),r=setTimeout(u,t),o&&s===void 0&&(s=setTimeout(u,o)),i}return c.cancel=a,c.flush=h,c}function eF(e){let t=!1;return(n,i)=>{if(!e.checkAndHandleExpiredSession()){_t&&pe.warn("[Replay] Received replay event after session expired.");return}const r=i||!t;t=!0,e.clickDetector&&SN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&r&&e.setInitialState(),!Zp(e,n,r))return!0;if(!r)return!1;if(nF(e,r),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const s=e.eventBuffer.getEarliestTimestamp();s&&(Sn(`[Replay] Updating session start time to earliest event in buffer to ${new Date(s)}`,e.getOptions()._experiments.traceInternals),e.session.started=s,e.getOptions().stickySession&&Qp(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function tF(e){const t=e.getOptions();return{type:Ye.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function nF(e,t){!t||!e.session||e.session.segmentId!==0||Zp(e,tF(e),!1)}function iF(e,t,n,i){return Rs(xw(e,kp(e),i,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function rF({recordingData:e,headers:t}){let n;const i=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${i}${e}`;else{const s=new TextEncoder().encode(i);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function sF({client:e,scope:t,replayId:n,event:i}){const r=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:r};e.emit&&e.emit("preprocessEvent",i,s);const o=await Lw(e.getOptions(),i,s,t,e,bl());if(!o)return null;o.platform=o.platform||"javascript";const u=e.getSdkMetadata&&e.getSdkMetadata(),{name:a,version:h}=u&&u.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:h||"0.0.0"},o}async function oF({recordingData:e,replayId:t,segmentId:n,eventContext:i,timestamp:r,session:s}){const o=rF({recordingData:e,headers:{segment_id:n}}),{urls:u,errorIds:a,traceIds:h,initialTimestamp:c}=i,l=At(),d=si(),f=l&&l.getTransport(),p=l&&l.getDsn();if(!l||!f||!p||!s.sampled)return;const g={type:VO,replay_start_timestamp:c/1e3,timestamp:r/1e3,error_ids:a,trace_ids:h,urls:u,replay_id:t,segment_id:n,replay_type:s.sampled},m=await sF({scope:d,client:l,replayId:t,event:g});if(!m){l.recordDroppedEvent("event_processor","replay",g),Sn("An event processor returned `null`, will not send event.");return}delete m.sdkProcessingMetadata;const v=iF(m,o,p,l.getOptions().tunnel);let y;try{y=await f.send(v)}catch(_){const w=new Error(Wp);try{w.cause=_}catch{}throw w}if(!y)return y;if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new i1(y.statusCode);const S=kw({},y);if(Mw(S,"replay"))throw new r1(S);return y}class i1 extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class r1 extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function s1(e,t={count:0,interval:XO}){const{recordingData:n,options:i}=e;if(!!n.length)try{return await oF(e),!0}catch(r){if(r instanceof i1||r instanceof r1)throw r;if(RI("Replays",{_retryCount:t.count}),_t&&i._experiments&&i._experiments.captureExceptions&&Bu(r),t.count>=JO){const s=new Error(`${Wp} - max retries exceeded`);try{s.cause=r}catch{}throw s}return t.interval*=++t.count,new Promise((s,o)=>{setTimeout(async()=>{try{await s1(e,t),s(!0)}catch(u){o(u)}},t.interval)})}}const o1="__THROTTLED",aF="__SKIPPED";function lF(e,t,n){const i=new Map,r=u=>{const a=u-n;i.forEach((h,c)=>{c<a&&i.delete(c)})},s=()=>[...i.values()].reduce((u,a)=>u+a,0);let o=!1;return(...u)=>{const a=Math.floor(Date.now()/1e3);if(r(a),s()>=t){const c=o;return o=!0,c?aF:o1}o=!1;const h=i.get(a)||0;return i.set(a,h+1),e(...u)}}class $r{constructor({options:t,recordingOptions:n}){$r.prototype.__init.call(this),$r.prototype.__init2.call(this),$r.prototype.__init3.call(this),$r.prototype.__init4.call(this),$r.prototype.__init5.call(this),$r.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:jO,sessionIdleExpire:GO},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=ZD(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=lF((o,u)=>eD(this,o,u),300,5);const{slowClickTimeout:i,slowClickIgnoreSelectors:r}=this.getOptions(),s=i?{threshold:Math.min(QO,i),timeout:i,scrollTimeout:ZO,ignoreSelector:r?r.join(","):""}:void 0;s&&(this.clickDetector=new yN(this,s))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:i}=this._options;if(!(n<=0&&i<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Eo(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Eo("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=Vh({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Eo("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Vh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Br({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:YO},emit:eF(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!!this._isEnabled){this._isEnabled=!1;try{Sn(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,YN(this)}catch(i){this._handleException(i)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Sn("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Sn("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Sn("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const i=this.stopRecording();!t||!i||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&pf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${wt.location.pathname}${wt.location.hash}${wt.location.search}`,n=`${wt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const i=this._throttledAddEvent(t,n);if(i===o1){const r=Ri({category:"replay.throttled"});this.addUpdate(()=>!Zp(this,{type:dN,timestamp:r.timestamp||0,data:{tag:"breadcrumb",payload:r,metric:!0}}))}return i}getCurrentRoute(){const t=this.lastTransaction||si().getTransaction(),i=(t&&ln(t).data||{})[To];if(!(!t||!i||!["route","custom"].includes(i)))return ln(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=GN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){_t&&pe.error("[Replay]",t),_t&&this._options._experiments&&this._options._experiments.captureExceptions&&Bu(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,i=Vh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=i}_checkSession(){if(!this.session)return!1;const t=this.session;return qS(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){!this._isEnabled||(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{wt.document.addEventListener("visibilitychange",this._handleVisibilityChange),wt.addEventListener("blur",this._handleWindowBlur),wt.addEventListener("focus",this._handleWindowFocus),wt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(XD(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=HN(this)}_removeListeners(){try{wt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),wt.removeEventListener("blur",this._handleWindowBlur),wt.removeEventListener("focus",this._handleWindowFocus),wt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{wt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Ri({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Ri({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{IN(this,t)}}_doChangeToBackgroundTasks(t){!this.session||GS(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Sn("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Ye.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=ON(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Ku(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;const i=n.getEarliestTimestamp();i&&i<this._context.initialTimestamp&&(this._context.initialTimestamp=i)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){_t&&pe.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await JD(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const i=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await s1({replayId:t,recordingData:s,segmentId:r,eventContext:i,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const i=At();i&&i.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){_t&&pe.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,r=Date.now()-n;this._debouncedFlush.cancel();const s=r<this._options.minReplayDuration,o=r>this._options.maxReplayDuration+5e3;if(s||o){Sn(`[Replay] Session duration (${Math.floor(r/1e3)}s) is too ${s?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),s&&this._debouncedFlush();return}const u=this.eventBuffer;if(u&&this.session.segmentId===0&&!u.hasCheckout&&Sn("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(a){_t&&pe.error(a)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Qp(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,i=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,s=i&&n>i;if(n>r||s){const o=Ri({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(o)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function ua(e,t,n,i){const r=typeof i=="string"?i.split(","):[],s=[...e,...r,...t];return typeof n<"u"&&(typeof n=="string"&&s.push(`.${n}`),Hi(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),s.join(",")}function cF({mask:e,unmask:t,block:n,unblock:i,ignore:r,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:a,ignoreClass:h}){const c=['base[href="/"]'],l=ua(e,[".sentry-mask","[data-sentry-mask]"],u,a),d=ua(t,[".sentry-unmask","[data-sentry-unmask]"]),f={maskTextSelector:l,unmaskTextSelector:d,blockSelector:ua(n,[".sentry-block","[data-sentry-block]",...c],s,o),unblockSelector:ua(i,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:ua(r,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],h)};return s instanceof RegExp&&(f.blockClass=s),u instanceof RegExp&&(f.maskTextClass=u),f}function uF({el:e,key:t,maskAttributes:n,maskAllText:i,privacyOptions:r,value:s}){return!i||r.unmaskTextSelector&&e.matches(r.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const iy='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',hF=["content-length","content-type","accept"];let ry=!1;class Ju{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=qO,flushMaxDelay:n=KO,minReplayDuration:i=eP,maxReplayDuration:r=Bv,stickySession:s=!0,useCompression:o=!0,workerUrl:u,_experiments:a={},sessionSampleRate:h,errorSampleRate:c,maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:p=750,mutationLimit:g=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:v=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:S=[],networkCaptureBodies:_=!0,networkRequestHeaders:w=[],networkResponseHeaders:b=[],mask:C=[],maskAttributes:M=["title","placeholder"],unmask:R=[],block:T=[],unblock:A=[],ignore:P=[],maskFn:I,beforeAddRecordingEvent:E,beforeErrorSampling:L,blockClass:O,blockSelector:B,maskInputOptions:U,maskTextClass:z,maskTextSelector:j,ignoreClass:q}={}){this.name=Ju.id;const ne=cF({mask:C,unmask:R,block:T,unblock:A,ignore:P,blockClass:O,blockSelector:B,maskTextClass:z,maskTextSelector:j,ignoreClass:q});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{...U||{},password:!0},maskTextFn:I,maskInputFn:I,maskAttributeFn:(G,X,ie)=>uF({maskAttributes:M,maskAllText:l,privacyOptions:ne,key:G,value:X,el:ie}),...ne,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:G=>{try{G.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(i,tP),maxReplayDuration:Math.min(r,Bv),stickySession:s,sessionSampleRate:h,errorSampleRate:c,useCompression:o,workerUrl:u,blockAllMedia:f,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:p,mutationLimit:g,slowClickTimeout:m,slowClickIgnoreSelectors:v,networkDetailAllowUrls:y,networkDetailDenyUrls:S,networkCaptureBodies:_,networkRequestHeaders:sy(w),networkResponseHeaders:sy(b),beforeAddRecordingEvent:E,beforeErrorSampling:L,_experiments:a},typeof h=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysSessionSampleRate: ${h} })`),this._initialOptions.sessionSampleRate=h),typeof c=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysOnErrorSampleRate: ${c} })`),this._initialOptions.errorSampleRate=c),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${iy}`:iy),this._isInitialized&&hv())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ry}set _isInitialized(t){ry=t}setupOnce(){!hv()||(this._setup(),setTimeout(()=>this._initialize()))}start(){!this._replay||this._replay.start()}startBuffering(){!this._replay||this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){!this._replay||(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=dF(this._initialOptions);this._replay=new $r({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=At().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Ju.__initStatic();function dF(e){const t=At(),n=t&&t.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...Nn(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Hi(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(i.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(i.errorSampleRate=n.replaysOnErrorSampleRate),i):(Hi(()=>{console.warn("SDK client is not available.")}),i)}function sy(e){return[...hF,...e.map(t=>t.toLowerCase())]}const a1=["activate","mount","update"],fF=/(?:^|[-_])(\w)/g,pF=e=>e.replace(fF,t=>t.toUpperCase()).replace(/[-_]/g,""),gF="<Root>",jh="<Anonymous>",mF=(e,t)=>e.repeat?e.repeat(t):e,Da=(e,t)=>{if(!e)return jh;if(e.$root===e)return gF;if(!e.$options)return jh;const n=e.$options;let i=n.name||n._componentTag;const r=n.__file;if(!i&&r){const s=r.match(/([^/\\]+)\.vue$/);s&&(i=s[1])}return(i?`<${pF(i)}>`:jh)+(r&&t!==!1?` at ${r}`:"")},vF=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return`

found in

${t.map((r,s)=>`${(s===0?"---> ":mF(" ",5+s*2))+(Array.isArray(r)?`${Da(r[0])}... (${r[1]} recursive calls)`:Da(r))}`).join(`
`)}`}return`

(found in ${Da(e)})`},yF=(e,t)=>{const{errorHandler:n,warnHandler:i,silent:r}=e.config;e.config.errorHandler=(s,o,u)=>{const a=Da(o,!1),h=o?vF(o):"",c={componentName:a,lifecycleHook:u,trace:h};if(t.attachProps&&o&&(o.$options&&o.$options.propsData?c.propsData=o.$options.propsData:o.$props&&(c.propsData=o.$props)),setTimeout(()=>{Bu(s,{captureContext:{contexts:{vue:c}},mechanism:{handled:!1}})}),typeof n=="function"&&n.call(e,s,o,u),t.logErrors){const l=typeof console<"u",d=`Error in ${u}: "${s&&s.toString()}"`;i?i.call(null,d,o,h):l&&!r&&Hi(()=>{console.error(`[Vue warn]: ${d}${h}`)})}}},_F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,oy="ui.vue",bF={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function ay(){return si().getTransaction()}function wF(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{e.$root&&e.$root.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.end(t),e.$root.$_sentryRootSpan=void 0)},n)}const SF=e=>{const t=(e.hooks||[]).concat(a1).filter((i,r,s)=>s.indexOf(i)===r),n={};for(const i of t){const r=bF[i];if(!r){_F&&pe.warn(`Unknown hook: ${i}`);continue}for(const s of r)n[s]=function(){const o=this.$root===this;if(o){const h=ay();h&&(this.$_sentryRootSpan=this.$_sentryRootSpan||h.startChild({description:"Application Render",op:`${oy}.render`,origin:"auto.ui.vue"}))}const u=Da(this,!1),a=Array.isArray(e.trackComponents)?e.trackComponents.indexOf(u)>-1:e.trackComponents;if(!(!o&&!a))if(this.$_sentrySpans=this.$_sentrySpans||{},s==r[0]){const h=this.$root&&this.$root.$_sentryRootSpan||ay();if(h){const c=this.$_sentrySpans[i];c&&c.end(),this.$_sentrySpans[i]=h.startChild({description:`Vue <${u}>`,op:`${oy}.${i}`,origin:"auto.ui.vue"})}}else{const h=this.$_sentrySpans[i];if(!h)return;h.end(),wF(this,Jo(),e.timeout)}}}return n},TF=nt,EF={Vue:TF.Vue,attachProps:!0,logErrors:!0,hooks:a1,timeout:2e3,trackComponents:!1},l1="Vue",AF=(e={})=>({name:l1,setupOnce(){},setup(t){CF(t,e)}}),c1=AF;hr(l1,c1);function CF(e,t){const n={...EF,...e.getOptions(),...t};if(!n.Vue&&!n.app){Hi(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?Ep(n.app).forEach(r=>ly(r,n)):n.Vue&&ly(n.Vue,n)}const ly=(e,t)=>{const n=e;(n._instance&&n._instance.isMounted)===!0&&Hi(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),yF(e,t),Uu(t)&&e.mixin(SF({...t,...t.tracingOptions}))};function xF(e={}){const t={_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Za}],version:Za}},defaultIntegrations:[...uS,c1()],...e};nO(t)}function MF(){return u1().__VUE_DEVTOOLS_GLOBAL_HOOK__}function u1(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const kF=typeof Proxy=="function",$F="devtools-plugin:setup",IF="plugin:settings:set";let zs,vf;function RF(){var e;return zs!==void 0||(typeof window<"u"&&window.performance?(zs=!0,vf=window.performance):typeof global<"u"&&((e=global.perf_hooks)===null||e===void 0?void 0:e.performance)?(zs=!0,vf=global.perf_hooks.performance):zs=!1),zs}function LF(){return RF()?vf.now():Date.now()}class OF{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const i={};if(t.settings)for(const o in t.settings){const u=t.settings[o];i[o]=u.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},i);try{const o=localStorage.getItem(r),u=JSON.parse(o);Object.assign(s,u)}catch{}this.fallbacks={getSettings(){return s},setSettings(o){try{localStorage.setItem(r,JSON.stringify(o))}catch{}s=o},now(){return LF()}},n&&n.on(IF,(o,u)=>{o===this.plugin.id&&this.fallbacks.setSettings(u)}),this.proxiedOn=new Proxy({},{get:(o,u)=>this.target?this.target.on[u]:(...a)=>{this.onQueue.push({method:u,args:a})}}),this.proxiedTarget=new Proxy({},{get:(o,u)=>this.target?this.target[u]:u==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(u)?(...a)=>(this.targetQueue.push({method:u,args:a,resolve:()=>{}}),this.fallbacks[u](...a)):(...a)=>new Promise(h=>{this.targetQueue.push({method:u,args:a,resolve:h})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function PF(e,t){const n=e,i=u1(),r=MF(),s=kF&&n.enableEarlyProxy;if(r&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))r.emit($F,e,t);else{const o=s?new OF(n,r):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:o}),o&&t(o.proxiedTarget)}}/*!
 * vuex v4.1.0
 * (c) 2022 Evan You
 * @license MIT
 */var h1="store";function OZ(e){return e===void 0&&(e=null),jn(e!==null?e:h1)}function Zo(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function NF(e){return e!==null&&typeof e=="object"}function DF(e){return e&&typeof e.then=="function"}function FF(e,t){return function(){return e(t)}}function d1(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var i=t.indexOf(e);i>-1&&t.splice(i,1)}}function f1(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Qu(e,n,[],e._modules.root,!0),tg(e,n,t)}function tg(e,t,n){var i=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,o={},u={},a=Rb(!0);a.run(function(){Zo(s,function(h,c){o[c]=FF(h,e),u[c]=Rt(function(){return o[c]()}),Object.defineProperty(e.getters,c,{get:function(){return u[c].value},enumerable:!0})})}),e._state=jo({data:t}),e._scope=a,e.strict&&WF(e),i&&n&&e._withCommit(function(){i.data=null}),r&&r.stop()}function Qu(e,t,n,i,r){var s=!n.length,o=e._modules.getNamespace(n);if(i.namespaced&&(e._modulesNamespaceMap[o],e._modulesNamespaceMap[o]=i),!s&&!r){var u=ng(t,n.slice(0,-1)),a=n[n.length-1];e._withCommit(function(){u[a]=i.state})}var h=i.context=BF(e,o,n);i.forEachMutation(function(c,l){var d=o+l;HF(e,d,c,h)}),i.forEachAction(function(c,l){var d=c.root?l:o+l,f=c.handler||c;UF(e,d,f,h)}),i.forEachGetter(function(c,l){var d=o+l;zF(e,d,c,h)}),i.forEachChild(function(c,l){Qu(e,t,n.concat(l),c,r)})}function BF(e,t,n){var i=t==="",r={dispatch:i?e.dispatch:function(s,o,u){var a=cu(s,o,u),h=a.payload,c=a.options,l=a.type;return(!c||!c.root)&&(l=t+l),e.dispatch(l,h)},commit:i?e.commit:function(s,o,u){var a=cu(s,o,u),h=a.payload,c=a.options,l=a.type;(!c||!c.root)&&(l=t+l),e.commit(l,h,c)}};return Object.defineProperties(r,{getters:{get:i?function(){return e.getters}:function(){return p1(e,t)}},state:{get:function(){return ng(e.state,n)}}}),r}function p1(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Object.keys(e.getters).forEach(function(r){if(r.slice(0,i)===t){var s=r.slice(i);Object.defineProperty(n,s,{get:function(){return e.getters[r]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function HF(e,t,n,i){var r=e._mutations[t]||(e._mutations[t]=[]);r.push(function(o){n.call(e,i.state,o)})}function UF(e,t,n,i){var r=e._actions[t]||(e._actions[t]=[]);r.push(function(o){var u=n.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},o);return DF(u)||(u=Promise.resolve(u)),e._devtoolHook?u.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):u})}function zF(e,t,n,i){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(s){return n(i.state,i.getters,s.state,s.getters)})}function WF(e){Pi(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function ng(e,t){return t.reduce(function(n,i){return n[i]},e)}function cu(e,t,n){return NF(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var VF="vuex bindings",cy="vuex:mutations",Gh="vuex:actions",Ws="vuex",jF=0;function GF(e,t){PF({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[VF]},function(n){n.addTimelineLayer({id:cy,label:"Vuex Mutations",color:uy}),n.addTimelineLayer({id:Gh,label:"Vuex Actions",color:uy}),n.addInspector({id:Ws,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(i){if(i.app===e&&i.inspectorId===Ws)if(i.filter){var r=[];y1(r,t._modules.root,i.filter,""),i.rootNodes=r}else i.rootNodes=[v1(t._modules.root,"")]}),n.on.getInspectorState(function(i){if(i.app===e&&i.inspectorId===Ws){var r=i.nodeId;p1(t,r),i.state=YF(JF(t._modules,r),r==="root"?t.getters:t._makeLocalGettersCache,r)}}),n.on.editInspectorState(function(i){if(i.app===e&&i.inspectorId===Ws){var r=i.nodeId,s=i.path;r!=="root"&&(s=r.split("/").filter(Boolean).concat(s)),t._withCommit(function(){i.set(t._state.data,s,i.state.value)})}}),t.subscribe(function(i,r){var s={};i.payload&&(s.payload=i.payload),s.state=r,n.notifyComponentUpdate(),n.sendInspectorTree(Ws),n.sendInspectorState(Ws),n.addTimelineEvent({layerId:cy,event:{time:Date.now(),title:i.type,data:s}})}),t.subscribeAction({before:function(i,r){var s={};i.payload&&(s.payload=i.payload),i._id=jF++,i._time=Date.now(),s.state=r,n.addTimelineEvent({layerId:Gh,event:{time:i._time,title:i.type,groupId:i._id,subtitle:"start",data:s}})},after:function(i,r){var s={},o=Date.now()-i._time;s.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},i.payload&&(s.payload=i.payload),s.state=r,n.addTimelineEvent({layerId:Gh,event:{time:Date.now(),title:i.type,groupId:i._id,subtitle:"end",data:s}})}})})}var uy=8702998,qF=6710886,KF=16777215,g1={label:"namespaced",textColor:KF,backgroundColor:qF};function m1(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function v1(e,t){return{id:t||"root",label:m1(t),tags:e.namespaced?[g1]:[],children:Object.keys(e._children).map(function(n){return v1(e._children[n],t+n+"/")})}}function y1(e,t,n,i){i.includes(n)&&e.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:t.namespaced?[g1]:[]}),Object.keys(t._children).forEach(function(r){y1(e,t._children[r],n,i+r+"/")})}function YF(e,t,n){t=n==="root"?t:t[n];var i=Object.keys(t),r={state:Object.keys(e.state).map(function(o){return{key:o,editable:!0,value:e.state[o]}})};if(i.length){var s=XF(t);r.getters=Object.keys(s).map(function(o){return{key:o.endsWith("/")?m1(o):o,editable:!1,value:yf(function(){return s[o]})}})}return r}function XF(e){var t={};return Object.keys(e).forEach(function(n){var i=n.split("/");if(i.length>1){var r=t,s=i.pop();i.forEach(function(o){r[o]||(r[o]={_custom:{value:{},display:o,tooltip:"Module",abstract:!0}}),r=r[o]._custom.value}),r[s]=yf(function(){return e[n]})}else t[n]=yf(function(){return e[n]})}),t}function JF(e,t){var n=t.split("/").filter(function(i){return i});return n.reduce(function(i,r,s){var o=i[r];if(!o)throw new Error('Missing module "'+r+'" for path "'+t+'".');return s===n.length-1?o:o._children},t==="root"?e:e.root._children)}function yf(e){try{return e()}catch(t){return t}}var _i=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var i=t.state;this.state=(typeof i=="function"?i():i)||{}},_1={namespaced:{configurable:!0}};_1.namespaced.get=function(){return!!this._rawModule.namespaced};_i.prototype.addChild=function(t,n){this._children[t]=n};_i.prototype.removeChild=function(t){delete this._children[t]};_i.prototype.getChild=function(t){return this._children[t]};_i.prototype.hasChild=function(t){return t in this._children};_i.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};_i.prototype.forEachChild=function(t){Zo(this._children,t)};_i.prototype.forEachGetter=function(t){this._rawModule.getters&&Zo(this._rawModule.getters,t)};_i.prototype.forEachAction=function(t){this._rawModule.actions&&Zo(this._rawModule.actions,t)};_i.prototype.forEachMutation=function(t){this._rawModule.mutations&&Zo(this._rawModule.mutations,t)};Object.defineProperties(_i.prototype,_1);var Ls=function(t){this.register([],t,!1)};Ls.prototype.get=function(t){return t.reduce(function(n,i){return n.getChild(i)},this.root)};Ls.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(i,r){return n=n.getChild(r),i+(n.namespaced?r+"/":"")},"")};Ls.prototype.update=function(t){b1([],this.root,t)};Ls.prototype.register=function(t,n,i){var r=this;i===void 0&&(i=!0);var s=new _i(n,i);if(t.length===0)this.root=s;else{var o=this.get(t.slice(0,-1));o.addChild(t[t.length-1],s)}n.modules&&Zo(n.modules,function(u,a){r.register(t.concat(a),u,i)})};Ls.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),i=t[t.length-1],r=n.getChild(i);!r||!r.runtime||n.removeChild(i)};Ls.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),i=t[t.length-1];return n?n.hasChild(i):!1};function b1(e,t,n){if(t.update(n),n.modules)for(var i in n.modules){if(!t.getChild(i))return;b1(e.concat(i),t.getChild(i),n.modules[i])}}function QF(e){return new Fn(e)}var Fn=function(t){var n=this;t===void 0&&(t={});var i=t.plugins;i===void 0&&(i=[]);var r=t.strict;r===void 0&&(r=!1);var s=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Ls(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=s;var o=this,u=this,a=u.dispatch,h=u.commit;this.dispatch=function(d,f){return a.call(o,d,f)},this.commit=function(d,f,p){return h.call(o,d,f,p)},this.strict=r;var c=this._modules.root.state;Qu(this,c,[],this._modules.root),tg(this,c),i.forEach(function(l){return l(n)})},ig={state:{configurable:!0}};Fn.prototype.install=function(t,n){t.provide(n||h1,this),t.config.globalProperties.$store=this;var i=this._devtools!==void 0?this._devtools:!1;i&&GF(t,this)};ig.state.get=function(){return this._state.data};ig.state.set=function(e){};Fn.prototype.commit=function(t,n,i){var r=this,s=cu(t,n,i),o=s.type,u=s.payload,a={type:o,payload:u},h=this._mutations[o];!h||(this._withCommit(function(){h.forEach(function(l){l(u)})}),this._subscribers.slice().forEach(function(c){return c(a,r.state)}))};Fn.prototype.dispatch=function(t,n){var i=this,r=cu(t,n),s=r.type,o=r.payload,u={type:s,payload:o},a=this._actions[s];if(!!a){try{this._actionSubscribers.slice().filter(function(c){return c.before}).forEach(function(c){return c.before(u,i.state)})}catch{}var h=a.length>1?Promise.all(a.map(function(c){return c(o)})):a[0](o);return new Promise(function(c,l){h.then(function(d){try{i._actionSubscribers.filter(function(f){return f.after}).forEach(function(f){return f.after(u,i.state)})}catch{}c(d)},function(d){try{i._actionSubscribers.filter(function(f){return f.error}).forEach(function(f){return f.error(u,i.state,d)})}catch{}l(d)})})}};Fn.prototype.subscribe=function(t,n){return d1(t,this._subscribers,n)};Fn.prototype.subscribeAction=function(t,n){var i=typeof t=="function"?{before:t}:t;return d1(i,this._actionSubscribers,n)};Fn.prototype.watch=function(t,n,i){var r=this;return Pi(function(){return t(r.state,r.getters)},n,Object.assign({},i))};Fn.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};Fn.prototype.registerModule=function(t,n,i){i===void 0&&(i={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),Qu(this,this.state,t,this._modules.get(t),i.preserveState),tg(this,this.state)};Fn.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var i=ng(n.state,t.slice(0,-1));delete i[t[t.length-1]]}),f1(this)};Fn.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};Fn.prototype.hotUpdate=function(t){this._modules.update(t),f1(this,!0)};Fn.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(Fn.prototype,ig);const ZF={},e2={},t2={getTranslations(){return{}}},n2={},i2={namespaced:!0,state:ZF,getters:t2,mutations:e2,actions:n2};var rg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function w1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PZ(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}var S1={exports:{}},sg={exports:{}},T1=function(t,n){return function(){for(var r=new Array(arguments.length),s=0;s<r.length;s++)r[s]=arguments[s];return t.apply(n,r)}},r2=T1,Jr=Object.prototype.toString;function og(e){return Array.isArray(e)}function _f(e){return typeof e>"u"}function s2(e){return e!==null&&!_f(e)&&e.constructor!==null&&!_f(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function E1(e){return Jr.call(e)==="[object ArrayBuffer]"}function o2(e){return Jr.call(e)==="[object FormData]"}function a2(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&E1(e.buffer),t}function l2(e){return typeof e=="string"}function c2(e){return typeof e=="number"}function A1(e){return e!==null&&typeof e=="object"}function Cc(e){if(Jr.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function u2(e){return Jr.call(e)==="[object Date]"}function h2(e){return Jr.call(e)==="[object File]"}function d2(e){return Jr.call(e)==="[object Blob]"}function C1(e){return Jr.call(e)==="[object Function]"}function f2(e){return A1(e)&&C1(e.pipe)}function p2(e){return Jr.call(e)==="[object URLSearchParams]"}function g2(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function m2(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function ag(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),og(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function bf(){var e={};function t(r,s){Cc(e[s])&&Cc(r)?e[s]=bf(e[s],r):Cc(r)?e[s]=bf({},r):og(r)?e[s]=r.slice():e[s]=r}for(var n=0,i=arguments.length;n<i;n++)ag(arguments[n],t);return e}function v2(e,t,n){return ag(t,function(r,s){n&&typeof r=="function"?e[s]=r2(r,n):e[s]=r}),e}function y2(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var Bn={isArray:og,isArrayBuffer:E1,isBuffer:s2,isFormData:o2,isArrayBufferView:a2,isString:l2,isNumber:c2,isObject:A1,isPlainObject:Cc,isUndefined:_f,isDate:u2,isFile:h2,isBlob:d2,isFunction:C1,isStream:f2,isURLSearchParams:p2,isStandardBrowserEnv:m2,forEach:ag,merge:bf,extend:v2,trim:g2,stripBOM:y2},Vs=Bn;function hy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var x1=function(t,n,i){if(!n)return t;var r;if(i)r=i(n);else if(Vs.isURLSearchParams(n))r=n.toString();else{var s=[];Vs.forEach(n,function(a,h){a===null||typeof a>"u"||(Vs.isArray(a)?h=h+"[]":a=[a],Vs.forEach(a,function(l){Vs.isDate(l)?l=l.toISOString():Vs.isObject(l)&&(l=JSON.stringify(l)),s.push(hy(h)+"="+hy(l))}))}),r=s.join("&")}if(r){var o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t},_2=Bn;function Zu(){this.handlers=[]}Zu.prototype.use=function(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};Zu.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};Zu.prototype.forEach=function(t){_2.forEach(this.handlers,function(i){i!==null&&t(i)})};var b2=Zu,w2=Bn,S2=function(t,n){w2.forEach(t,function(r,s){s!==n&&s.toUpperCase()===n.toUpperCase()&&(t[n]=r,delete t[s])})},M1=function(t,n,i,r,s){return t.config=n,i&&(t.code=i),t.request=r,t.response=s,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},k1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qh,dy;function $1(){if(dy)return qh;dy=1;var e=M1;return qh=function(n,i,r,s,o){var u=new Error(n);return e(u,i,r,s,o)},qh}var Kh,fy;function T2(){if(fy)return Kh;fy=1;var e=$1();return Kh=function(n,i,r){var s=r.config.validateStatus;!r.status||!s||s(r.status)?n(r):i(e("Request failed with status code "+r.status,r.config,null,r.request,r))},Kh}var Yh,py;function E2(){if(py)return Yh;py=1;var e=Bn;return Yh=e.isStandardBrowserEnv()?function(){return{write:function(i,r,s,o,u,a){var h=[];h.push(i+"="+encodeURIComponent(r)),e.isNumber(s)&&h.push("expires="+new Date(s).toGMTString()),e.isString(o)&&h.push("path="+o),e.isString(u)&&h.push("domain="+u),a===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(i){var r=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(i){this.write(i,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Yh}var Xh,gy;function A2(){return gy||(gy=1,Xh=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Xh}var Jh,my;function C2(){return my||(my=1,Jh=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),Jh}var Qh,vy;function x2(){if(vy)return Qh;vy=1;var e=A2(),t=C2();return Qh=function(i,r){return i&&!e(r)?t(i,r):r},Qh}var Zh,yy;function M2(){if(yy)return Zh;yy=1;var e=Bn,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Zh=function(i){var r={},s,o,u;return i&&e.forEach(i.split(`
`),function(h){if(u=h.indexOf(":"),s=e.trim(h.substr(0,u)).toLowerCase(),o=e.trim(h.substr(u+1)),s){if(r[s]&&t.indexOf(s)>=0)return;s==="set-cookie"?r[s]=(r[s]?r[s]:[]).concat([o]):r[s]=r[s]?r[s]+", "+o:o}}),r},Zh}var ed,_y;function k2(){if(_y)return ed;_y=1;var e=Bn;return ed=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),r;function s(o){var u=o;return n&&(i.setAttribute("href",u),u=i.href),i.setAttribute("href",u),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return r=s(window.location.href),function(u){var a=e.isString(u)?s(u):u;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),ed}var td,by;function eh(){if(by)return td;by=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,td=e,td}var nd,wy;function Sy(){if(wy)return nd;wy=1;var e=Bn,t=T2(),n=E2(),i=x1,r=x2(),s=M2(),o=k2(),u=$1(),a=k1,h=eh();return nd=function(l){return new Promise(function(f,p){var g=l.data,m=l.headers,v=l.responseType,y;function S(){l.cancelToken&&l.cancelToken.unsubscribe(y),l.signal&&l.signal.removeEventListener("abort",y)}e.isFormData(g)&&delete m["Content-Type"];var _=new XMLHttpRequest;if(l.auth){var w=l.auth.username||"",b=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var C=r(l.baseURL,l.url);_.open(l.method.toUpperCase(),i(C,l.params,l.paramsSerializer),!0),_.timeout=l.timeout;function M(){if(!!_){var T="getAllResponseHeaders"in _?s(_.getAllResponseHeaders()):null,A=!v||v==="text"||v==="json"?_.responseText:_.response,P={data:A,status:_.status,statusText:_.statusText,headers:T,config:l,request:_};t(function(E){f(E),S()},function(E){p(E),S()},P),_=null}}if("onloadend"in _?_.onloadend=M:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(M)},_.onabort=function(){!_||(p(u("Request aborted",l,"ECONNABORTED",_)),_=null)},_.onerror=function(){p(u("Network Error",l,null,_)),_=null},_.ontimeout=function(){var A=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",P=l.transitional||a;l.timeoutErrorMessage&&(A=l.timeoutErrorMessage),p(u(A,l,P.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",_)),_=null},e.isStandardBrowserEnv()){var R=(l.withCredentials||o(C))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;R&&(m[l.xsrfHeaderName]=R)}"setRequestHeader"in _&&e.forEach(m,function(A,P){typeof g>"u"&&P.toLowerCase()==="content-type"?delete m[P]:_.setRequestHeader(P,A)}),e.isUndefined(l.withCredentials)||(_.withCredentials=!!l.withCredentials),v&&v!=="json"&&(_.responseType=l.responseType),typeof l.onDownloadProgress=="function"&&_.addEventListener("progress",l.onDownloadProgress),typeof l.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(y=function(T){!_||(p(!T||T&&T.type?new h("canceled"):T),_.abort(),_=null)},l.cancelToken&&l.cancelToken.subscribe(y),l.signal&&(l.signal.aborted?y():l.signal.addEventListener("abort",y))),g||(g=null),_.send(g)})},nd}var on=Bn,Ty=S2,$2=M1,I2=k1,R2={"Content-Type":"application/x-www-form-urlencoded"};function Ey(e,t){!on.isUndefined(e)&&on.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function L2(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Sy()),e}function O2(e,t,n){if(on.isString(e))try{return(t||JSON.parse)(e),on.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}var th={transitional:I2,adapter:L2(),transformRequest:[function(t,n){return Ty(n,"Accept"),Ty(n,"Content-Type"),on.isFormData(t)||on.isArrayBuffer(t)||on.isBuffer(t)||on.isStream(t)||on.isFile(t)||on.isBlob(t)?t:on.isArrayBufferView(t)?t.buffer:on.isURLSearchParams(t)?(Ey(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):on.isObject(t)||n&&n["Content-Type"]==="application/json"?(Ey(n,"application/json"),O2(t)):t}],transformResponse:[function(t){var n=this.transitional||th.transitional,i=n&&n.silentJSONParsing,r=n&&n.forcedJSONParsing,s=!i&&this.responseType==="json";if(s||r&&on.isString(t)&&t.length)try{return JSON.parse(t)}catch(o){if(s)throw o.name==="SyntaxError"?$2(o,this,"E_JSON_PARSE"):o}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};on.forEach(["delete","get","head"],function(t){th.headers[t]={}});on.forEach(["post","put","patch"],function(t){th.headers[t]=on.merge(R2)});var lg=th,P2=Bn,N2=lg,D2=function(t,n,i){var r=this||N2;return P2.forEach(i,function(o){t=o.call(r,t,n)}),t},id,Ay;function I1(){return Ay||(Ay=1,id=function(t){return!!(t&&t.__CANCEL__)}),id}var Cy=Bn,rd=D2,F2=I1(),B2=lg,H2=eh();function sd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new H2("canceled")}var U2=function(t){sd(t),t.headers=t.headers||{},t.data=rd.call(t,t.data,t.headers,t.transformRequest),t.headers=Cy.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Cy.forEach(["delete","get","head","post","put","patch","common"],function(r){delete t.headers[r]});var n=t.adapter||B2.adapter;return n(t).then(function(r){return sd(t),r.data=rd.call(t,r.data,r.headers,t.transformResponse),r},function(r){return F2(r)||(sd(t),r&&r.response&&(r.response.data=rd.call(t,r.response.data,r.response.headers,t.transformResponse))),Promise.reject(r)})},Un=Bn,R1=function(t,n){n=n||{};var i={};function r(c,l){return Un.isPlainObject(c)&&Un.isPlainObject(l)?Un.merge(c,l):Un.isPlainObject(l)?Un.merge({},l):Un.isArray(l)?l.slice():l}function s(c){if(Un.isUndefined(n[c])){if(!Un.isUndefined(t[c]))return r(void 0,t[c])}else return r(t[c],n[c])}function o(c){if(!Un.isUndefined(n[c]))return r(void 0,n[c])}function u(c){if(Un.isUndefined(n[c])){if(!Un.isUndefined(t[c]))return r(void 0,t[c])}else return r(void 0,n[c])}function a(c){if(c in n)return r(t[c],n[c]);if(c in t)return r(void 0,t[c])}var h={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:a};return Un.forEach(Object.keys(t).concat(Object.keys(n)),function(l){var d=h[l]||s,f=d(l);Un.isUndefined(f)&&d!==a||(i[l]=f)}),i},od,xy;function L1(){return xy||(xy=1,od={version:"0.26.1"}),od}var z2=L1().version,cg={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){cg[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var My={};cg.transitional=function(t,n,i){function r(s,o){return"[Axios v"+z2+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return function(s,o,u){if(t===!1)throw new Error(r(o," has been removed"+(n?" in "+n:"")));return n&&!My[o]&&(My[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,u):!0}};function W2(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var i=Object.keys(e),r=i.length;r-- >0;){var s=i[r],o=t[s];if(o){var u=e[s],a=u===void 0||o(u,s,e);if(a!==!0)throw new TypeError("option "+s+" must be "+a);continue}if(n!==!0)throw Error("Unknown option "+s)}}var V2={assertOptions:W2,validators:cg},O1=Bn,j2=x1,ky=b2,$y=U2,nh=R1,P1=V2,js=P1.validators;function Tl(e){this.defaults=e,this.interceptors={request:new ky,response:new ky}}Tl.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=nh(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var i=n.transitional;i!==void 0&&P1.assertOptions(i,{silentJSONParsing:js.transitional(js.boolean),forcedJSONParsing:js.transitional(js.boolean),clarifyTimeoutError:js.transitional(js.boolean)},!1);var r=[],s=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(n)===!1||(s=s&&f.synchronous,r.unshift(f.fulfilled,f.rejected))});var o=[];this.interceptors.response.forEach(function(f){o.push(f.fulfilled,f.rejected)});var u;if(!s){var a=[$y,void 0];for(Array.prototype.unshift.apply(a,r),a=a.concat(o),u=Promise.resolve(n);a.length;)u=u.then(a.shift(),a.shift());return u}for(var h=n;r.length;){var c=r.shift(),l=r.shift();try{h=c(h)}catch(d){l(d);break}}try{u=$y(h)}catch(d){return Promise.reject(d)}for(;o.length;)u=u.then(o.shift(),o.shift());return u};Tl.prototype.getUri=function(t){return t=nh(this.defaults,t),j2(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};O1.forEach(["delete","get","head","options"],function(t){Tl.prototype[t]=function(n,i){return this.request(nh(i||{},{method:t,url:n,data:(i||{}).data}))}});O1.forEach(["post","put","patch"],function(t){Tl.prototype[t]=function(n,i,r){return this.request(nh(r||{},{method:t,url:n,data:i}))}});var G2=Tl,ad,Iy;function q2(){if(Iy)return ad;Iy=1;var e=eh();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var i;this.promise=new Promise(function(o){i=o});var r=this;this.promise.then(function(s){if(!!r._listeners){var o,u=r._listeners.length;for(o=0;o<u;o++)r._listeners[o](s);r._listeners=null}}),this.promise.then=function(s){var o,u=new Promise(function(a){r.subscribe(a),o=a}).then(s);return u.cancel=function(){r.unsubscribe(o)},u},n(function(o){r.reason||(r.reason=new e(o),i(r.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]},t.prototype.unsubscribe=function(i){if(!!this._listeners){var r=this._listeners.indexOf(i);r!==-1&&this._listeners.splice(r,1)}},t.source=function(){var i,r=new t(function(o){i=o});return{token:r,cancel:i}},ad=t,ad}var ld,Ry;function K2(){return Ry||(Ry=1,ld=function(t){return function(i){return t.apply(null,i)}}),ld}var cd,Ly;function Y2(){if(Ly)return cd;Ly=1;var e=Bn;return cd=function(n){return e.isObject(n)&&n.isAxiosError===!0},cd}var Oy=Bn,X2=T1,xc=G2,J2=R1,Q2=lg;function N1(e){var t=new xc(e),n=X2(xc.prototype.request,t);return Oy.extend(n,xc.prototype,t),Oy.extend(n,t),n.create=function(r){return N1(J2(e,r))},n}var zi=N1(Q2);zi.Axios=xc;zi.Cancel=eh();zi.CancelToken=q2();zi.isCancel=I1();zi.VERSION=L1().version;zi.all=function(t){return Promise.all(t)};zi.spread=K2();zi.isAxiosError=Y2();sg.exports=zi;sg.exports.default=zi;(function(e){e.exports=sg.exports})(S1);const Ta=w1(S1.exports),Z2="modulepreload",eB=function(e){return"/"+e},Py={},ft=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=eB(s),s in Py)return;Py[s]=!0;const o=s.endsWith(".css"),u=o?'[rel="stylesheet"]':"";if(!!i)for(let c=r.length-1;c>=0;c--){const l=r[c];if(l.href===s&&(!o||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${u}`))return;const h=document.createElement("link");if(h.rel=o?"stylesheet":Z2,o||(h.as="script",h.crossOrigin=""),h.href=s,document.head.appendChild(h),o)return new Promise((c,l)=>{h.addEventListener("load",c),h.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t())};/*!
  * vue-router v4.2.2
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */const Zs=typeof window<"u";function tB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const dt=Object.assign;function ud(e,t){const n={};for(const i in t){const r=t[i];n[i]=yi(r)?r.map(e):e(r)}return n}const Fa=()=>{},yi=Array.isArray,nB=/\/$/,iB=e=>e.replace(nB,"");function hd(e,t,n="/"){let i,r={},s="",o="";const u=t.indexOf("#");let a=t.indexOf("?");return u<a&&u>=0&&(a=-1),a>-1&&(i=t.slice(0,a),s=t.slice(a+1,u>-1?u:t.length),r=e(s)),u>-1&&(i=i||t.slice(0,u),o=t.slice(u,t.length)),i=aB(i??t,n),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:o}}function rB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Ny(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function sB(e,t,n){const i=t.matched.length-1,r=n.matched.length-1;return i>-1&&i===r&&Do(t.matched[i],n.matched[r])&&D1(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Do(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function D1(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!oB(e[n],t[n]))return!1;return!0}function oB(e,t){return yi(e)?Dy(e,t):yi(t)?Dy(t,e):e===t}function Dy(e,t){return yi(t)?e.length===t.length&&e.every((n,i)=>n===t[i]):e.length===1&&e[0]===t}function aB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),i=e.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=n.length-1,o,u;for(o=0;o<i.length;o++)if(u=i[o],u!==".")if(u==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+i.slice(o-(o===i.length?1:0)).join("/")}var rl;(function(e){e.pop="pop",e.push="push"})(rl||(rl={}));var Ba;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ba||(Ba={}));function lB(e){if(!e)if(Zs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),iB(e)}const cB=/^[^#]+#/;function uB(e,t){return e.replace(cB,"#")+t}function hB(e,t){const n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect();return{behavior:t.behavior,left:i.left-n.left-(t.left||0),top:i.top-n.top-(t.top||0)}}const ih=()=>({left:window.pageXOffset,top:window.pageYOffset});function dB(e){let t;if("el"in e){const n=e.el,i=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=hB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Fy(e,t){return(history.state?history.state.position-t:-1)+e}const wf=new Map;function fB(e,t){wf.set(e,t)}function pB(e){const t=wf.get(e);return wf.delete(e),t}let gB=()=>location.protocol+"//"+location.host;function F1(e,t){const{pathname:n,search:i,hash:r}=t,s=e.indexOf("#");if(s>-1){let u=r.includes(e.slice(s))?e.slice(s).length:1,a=r.slice(u);return a[0]!=="/"&&(a="/"+a),Ny(a,"")}return Ny(n,e)+i+r}function mB(e,t,n,i){let r=[],s=[],o=null;const u=({state:d})=>{const f=F1(e,location),p=n.value,g=t.value;let m=0;if(d){if(n.value=f,t.value=d,o&&o===p){o=null;return}m=g?d.position-g.position:0}else i(f);r.forEach(v=>{v(n.value,p,{delta:m,type:rl.pop,direction:m?m>0?Ba.forward:Ba.back:Ba.unknown})})};function a(){o=n.value}function h(d){r.push(d);const f=()=>{const p=r.indexOf(d);p>-1&&r.splice(p,1)};return s.push(f),f}function c(){const{history:d}=window;!d.state||d.replaceState(dt({},d.state,{scroll:ih()}),"")}function l(){for(const d of s)d();s=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:a,listen:h,destroy:l}}function By(e,t,n,i=!1,r=!1){return{back:e,current:t,forward:n,replaced:i,position:window.history.length,scroll:r?ih():null}}function vB(e){const{history:t,location:n}=window,i={value:F1(e,n)},r={value:t.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(a,h,c){const l=e.indexOf("#"),d=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+a:gB()+e+a;try{t[c?"replaceState":"pushState"](h,"",d),r.value=h}catch(f){console.error(f),n[c?"replace":"assign"](d)}}function o(a,h){const c=dt({},t.state,By(r.value.back,a,r.value.forward,!0),h,{position:r.value.position});s(a,c,!0),i.value=a}function u(a,h){const c=dt({},r.value,t.state,{forward:a,scroll:ih()});s(c.current,c,!0);const l=dt({},By(i.value,a,null),{position:c.position+1},h);s(a,l,!1),i.value=a}return{location:i,state:r,push:u,replace:o}}function yB(e){e=lB(e);const t=vB(e),n=mB(e,t.state,t.location,t.replace);function i(s,o=!0){o||n.pauseListeners(),history.go(s)}const r=dt({location:"",base:e,go:i,createHref:uB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function _B(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),yB(e)}function bB(e){return typeof e=="string"||e&&typeof e=="object"}function B1(e){return typeof e=="string"||typeof e=="symbol"}const vr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},H1=Symbol("");var Hy;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Hy||(Hy={}));function Fo(e,t){return dt(new Error,{type:e,[H1]:!0},t)}function Gi(e,t){return e instanceof Error&&H1 in e&&(t==null||!!(e.type&t))}const Uy="[^/]+?",wB={sensitive:!1,strict:!1,start:!0,end:!0},SB=/[.+*?^${}()[\]/\\]/g;function TB(e,t){const n=dt({},wB,t),i=[];let r=n.start?"^":"";const s=[];for(const h of e){const c=h.length?[]:[90];n.strict&&!h.length&&(r+="/");for(let l=0;l<h.length;l++){const d=h[l];let f=40+(n.sensitive?.25:0);if(d.type===0)l||(r+="/"),r+=d.value.replace(SB,"\\$&"),f+=40;else if(d.type===1){const{value:p,repeatable:g,optional:m,regexp:v}=d;s.push({name:p,repeatable:g,optional:m});const y=v||Uy;if(y!==Uy){f+=10;try{new RegExp(`(${y})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${p}" (${y}): `+_.message)}}let S=g?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;l||(S=m&&h.length<2?`(?:/${S})`:"/"+S),m&&(S+="?"),r+=S,f+=20,m&&(f+=-8),g&&(f+=-20),y===".*"&&(f+=-50)}c.push(f)}i.push(c)}if(n.strict&&n.end){const h=i.length-1;i[h][i[h].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const o=new RegExp(r,n.sensitive?"":"i");function u(h){const c=h.match(o),l={};if(!c)return null;for(let d=1;d<c.length;d++){const f=c[d]||"",p=s[d-1];l[p.name]=f&&p.repeatable?f.split("/"):f}return l}function a(h){let c="",l=!1;for(const d of e){(!l||!c.endsWith("/"))&&(c+="/"),l=!1;for(const f of d)if(f.type===0)c+=f.value;else if(f.type===1){const{value:p,repeatable:g,optional:m}=f,v=p in h?h[p]:"";if(yi(v)&&!g)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const y=yi(v)?v.join("/"):v;if(!y)if(m)d.length<2&&(c.endsWith("/")?c=c.slice(0,-1):l=!0);else throw new Error(`Missing required param "${p}"`);c+=y}}return c||"/"}return{re:o,score:i,keys:s,parse:u,stringify:a}}function EB(e,t){let n=0;for(;n<e.length&&n<t.length;){const i=t[n]-e[n];if(i)return i;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function AB(e,t){let n=0;const i=e.score,r=t.score;for(;n<i.length&&n<r.length;){const s=EB(i[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-i.length)===1){if(zy(i))return 1;if(zy(r))return-1}return r.length-i.length}function zy(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const CB={type:0,value:""},xB=/[a-zA-Z0-9_]/;function MB(e){if(!e)return[[]];if(e==="/")return[[CB]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${n})/"${h}": ${f}`)}let n=0,i=n;const r=[];let s;function o(){s&&r.push(s),s=[]}let u=0,a,h="",c="";function l(){!h||(n===0?s.push({type:0,value:h}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:h,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),h="")}function d(){h+=a}for(;u<e.length;){if(a=e[u++],a==="\\"&&n!==2){i=n,n=4;continue}switch(n){case 0:a==="/"?(h&&l(),o()):a===":"?(l(),n=1):d();break;case 4:d(),n=i;break;case 1:a==="("?n=2:xB.test(a)?d():(l(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&u--);break;case 2:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=3:c+=a;break;case 3:l(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&u--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${h}"`),l(),o(),r}function kB(e,t,n){const i=TB(MB(e.path),n),r=dt(i,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function $B(e,t){const n=[],i=new Map;t=jy({strict:!1,end:!0,sensitive:!1},t);function r(c){return i.get(c)}function s(c,l,d){const f=!d,p=IB(c);p.aliasOf=d&&d.record;const g=jy(t,c),m=[p];if("alias"in c){const S=typeof c.alias=="string"?[c.alias]:c.alias;for(const _ of S)m.push(dt({},p,{components:d?d.record.components:p.components,path:_,aliasOf:d?d.record:p}))}let v,y;for(const S of m){const{path:_}=S;if(l&&_[0]!=="/"){const w=l.record.path,b=w[w.length-1]==="/"?"":"/";S.path=l.record.path+(_&&b+_)}if(v=kB(S,l,g),d?d.alias.push(v):(y=y||v,y!==v&&y.alias.push(v),f&&c.name&&!Vy(v)&&o(c.name)),p.children){const w=p.children;for(let b=0;b<w.length;b++)s(w[b],v,d&&d.children[b])}d=d||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&a(v)}return y?()=>{o(y)}:Fa}function o(c){if(B1(c)){const l=i.get(c);l&&(i.delete(c),n.splice(n.indexOf(l),1),l.children.forEach(o),l.alias.forEach(o))}else{const l=n.indexOf(c);l>-1&&(n.splice(l,1),c.record.name&&i.delete(c.record.name),c.children.forEach(o),c.alias.forEach(o))}}function u(){return n}function a(c){let l=0;for(;l<n.length&&AB(c,n[l])>=0&&(c.record.path!==n[l].record.path||!U1(c,n[l]));)l++;n.splice(l,0,c),c.record.name&&!Vy(c)&&i.set(c.record.name,c)}function h(c,l){let d,f={},p,g;if("name"in c&&c.name){if(d=i.get(c.name),!d)throw Fo(1,{location:c});g=d.record.name,f=dt(Wy(l.params,d.keys.filter(y=>!y.optional).map(y=>y.name)),c.params&&Wy(c.params,d.keys.map(y=>y.name))),p=d.stringify(f)}else if("path"in c)p=c.path,d=n.find(y=>y.re.test(p)),d&&(f=d.parse(p),g=d.record.name);else{if(d=l.name?i.get(l.name):n.find(y=>y.re.test(l.path)),!d)throw Fo(1,{location:c,currentLocation:l});g=d.record.name,f=dt({},l.params,c.params),p=d.stringify(f)}const m=[];let v=d;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:p,params:f,matched:m,meta:LB(m)}}return e.forEach(c=>s(c)),{addRoute:s,resolve:h,removeRoute:o,getRoutes:u,getRecordMatcher:r}}function Wy(e,t){const n={};for(const i of t)i in e&&(n[i]=e[i]);return n}function IB(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:RB(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function RB(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const i in e.components)t[i]=typeof n=="boolean"?n:n[i];return t}function Vy(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function LB(e){return e.reduce((t,n)=>dt(t,n.meta),{})}function jy(e,t){const n={};for(const i in e)n[i]=i in t?t[i]:e[i];return n}function U1(e,t){return t.children.some(n=>n===e||U1(e,n))}const z1=/#/g,OB=/&/g,PB=/\//g,NB=/=/g,DB=/\?/g,W1=/\+/g,FB=/%5B/g,BB=/%5D/g,V1=/%5E/g,HB=/%60/g,j1=/%7B/g,UB=/%7C/g,G1=/%7D/g,zB=/%20/g;function ug(e){return encodeURI(""+e).replace(UB,"|").replace(FB,"[").replace(BB,"]")}function WB(e){return ug(e).replace(j1,"{").replace(G1,"}").replace(V1,"^")}function Sf(e){return ug(e).replace(W1,"%2B").replace(zB,"+").replace(z1,"%23").replace(OB,"%26").replace(HB,"`").replace(j1,"{").replace(G1,"}").replace(V1,"^")}function VB(e){return Sf(e).replace(NB,"%3D")}function jB(e){return ug(e).replace(z1,"%23").replace(DB,"%3F")}function GB(e){return e==null?"":jB(e).replace(PB,"%2F")}function uu(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function qB(e){const t={};if(e===""||e==="?")return t;const i=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<i.length;++r){const s=i[r].replace(W1," "),o=s.indexOf("="),u=uu(o<0?s:s.slice(0,o)),a=o<0?null:uu(s.slice(o+1));if(u in t){let h=t[u];yi(h)||(h=t[u]=[h]),h.push(a)}else t[u]=a}return t}function Gy(e){let t="";for(let n in e){const i=e[n];if(n=VB(n),i==null){i!==void 0&&(t+=(t.length?"&":"")+n);continue}(yi(i)?i.map(s=>s&&Sf(s)):[i&&Sf(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function KB(e){const t={};for(const n in e){const i=e[n];i!==void 0&&(t[n]=yi(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return t}const YB=Symbol(""),qy=Symbol(""),rh=Symbol(""),hg=Symbol(""),Tf=Symbol("");function ha(){let e=[];function t(i){return e.push(i),()=>{const r=e.indexOf(i);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Ir(e,t,n,i,r){const s=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((o,u)=>{const a=l=>{l===!1?u(Fo(4,{from:n,to:t})):l instanceof Error?u(l):bB(l)?u(Fo(2,{from:t,to:l})):(s&&i.enterCallbacks[r]===s&&typeof l=="function"&&s.push(l),o())},h=e.call(i&&i.instances[r],t,n,a);let c=Promise.resolve(h);e.length<3&&(c=c.then(a)),c.catch(l=>u(l))})}function dd(e,t,n,i){const r=[];for(const s of e)for(const o in s.components){let u=s.components[o];if(!(t!=="beforeRouteEnter"&&!s.instances[o]))if(XB(u)){const h=(u.__vccOpts||u)[t];h&&r.push(Ir(h,n,i,s,o))}else{let a=u();r.push(()=>a.then(h=>{if(!h)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${s.path}"`));const c=tB(h)?h.default:h;s.components[o]=c;const d=(c.__vccOpts||c)[t];return d&&Ir(d,n,i,s,o)()}))}}return r}function XB(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ky(e){const t=jn(rh),n=jn(hg),i=Rt(()=>t.resolve(Nr(e.to))),r=Rt(()=>{const{matched:a}=i.value,{length:h}=a,c=a[h-1],l=n.matched;if(!c||!l.length)return-1;const d=l.findIndex(Do.bind(null,c));if(d>-1)return d;const f=Yy(a[h-2]);return h>1&&Yy(c)===f&&l[l.length-1].path!==f?l.findIndex(Do.bind(null,a[h-2])):d}),s=Rt(()=>r.value>-1&&e3(n.params,i.value.params)),o=Rt(()=>r.value>-1&&r.value===n.matched.length-1&&D1(n.params,i.value.params));function u(a={}){return ZB(a)?t[Nr(e.replace)?"replace":"push"](Nr(e.to)).catch(Fa):Promise.resolve()}return{route:i,href:Rt(()=>i.value.href),isActive:s,isExactActive:o,navigate:u}}const JB=ks({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ky,setup(e,{slots:t}){const n=jo(Ky(e)),{options:i}=jn(rh),r=Rt(()=>({[Xy(e.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[Xy(e.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:ml("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),QB=JB;function ZB(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function e3(e,t){for(const n in t){const i=t[n],r=e[n];if(typeof i=="string"){if(i!==r)return!1}else if(!yi(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function Yy(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Xy=(e,t,n)=>e??t??n,t3=ks({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const i=jn(Tf),r=Rt(()=>e.route||i.value),s=jn(qy,0),o=Rt(()=>{let h=Nr(s);const{matched:c}=r.value;let l;for(;(l=c[h])&&!l.components;)h++;return h}),u=Rt(()=>r.value.matched[o.value]);yc(qy,Rt(()=>o.value+1)),yc(YB,u),yc(Tf,r);const a=li();return Pi(()=>[a.value,u.value,e.name],([h,c,l],[d,f,p])=>{c&&(c.instances[l]=h,f&&f!==c&&h&&h===d&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),h&&c&&(!f||!Do(c,f)||!d)&&(c.enterCallbacks[l]||[]).forEach(g=>g(h))},{flush:"post"}),()=>{const h=r.value,c=e.name,l=u.value,d=l&&l.components[c];if(!d)return Jy(n.default,{Component:d,route:h});const f=l.props[c],p=f?f===!0?h.params:typeof f=="function"?f(h):f:null,m=ml(d,dt({},p,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(l.instances[c]=null)},ref:a}));return Jy(n.default,{Component:m,route:h})||m}}});function Jy(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const n3=t3;function i3(e){const t=$B(e.routes,e),n=e.parseQuery||qB,i=e.stringifyQuery||Gy,r=e.history,s=ha(),o=ha(),u=ha(),a=xu(vr);let h=vr;Zs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=ud.bind(null,Y=>""+Y),l=ud.bind(null,GB),d=ud.bind(null,uu);function f(Y,J){let te,ue;return B1(Y)?(te=t.getRecordMatcher(Y),ue=J):ue=Y,t.addRoute(ue,te)}function p(Y){const J=t.getRecordMatcher(Y);J&&t.removeRoute(J)}function g(){return t.getRoutes().map(Y=>Y.record)}function m(Y){return!!t.getRecordMatcher(Y)}function v(Y,J){if(J=dt({},J||a.value),typeof Y=="string"){const N=hd(n,Y,J.path),W=t.resolve({path:N.path},J),ee=r.createHref(N.fullPath);return dt(N,W,{params:d(W.params),hash:uu(N.hash),redirectedFrom:void 0,href:ee})}let te;if("path"in Y)te=dt({},Y,{path:hd(n,Y.path,J.path).path});else{const N=dt({},Y.params);for(const W in N)N[W]==null&&delete N[W];te=dt({},Y,{params:l(N)}),J.params=l(J.params)}const ue=t.resolve(te,J),Se=Y.hash||"";ue.params=c(d(ue.params));const Ce=rB(i,dt({},Y,{hash:WB(Se),path:ue.path})),F=r.createHref(Ce);return dt({fullPath:Ce,hash:Se,query:i===Gy?KB(Y.query):Y.query||{}},ue,{redirectedFrom:void 0,href:F})}function y(Y){return typeof Y=="string"?hd(n,Y,a.value.path):dt({},Y)}function S(Y,J){if(h!==Y)return Fo(8,{from:J,to:Y})}function _(Y){return C(Y)}function w(Y){return _(dt(y(Y),{replace:!0}))}function b(Y){const J=Y.matched[Y.matched.length-1];if(J&&J.redirect){const{redirect:te}=J;let ue=typeof te=="function"?te(Y):te;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=y(ue):{path:ue},ue.params={}),dt({query:Y.query,hash:Y.hash,params:"path"in ue?{}:Y.params},ue)}}function C(Y,J){const te=h=v(Y),ue=a.value,Se=Y.state,Ce=Y.force,F=Y.replace===!0,N=b(te);if(N)return C(dt(y(N),{state:typeof N=="object"?dt({},Se,N.state):Se,force:Ce,replace:F}),J||te);const W=te;W.redirectedFrom=J;let ee;return!Ce&&sB(i,ue,te)&&(ee=Fo(16,{to:W,from:ue}),q(ue,ue,!0,!1)),(ee?Promise.resolve(ee):T(W,ue)).catch(re=>Gi(re)?Gi(re,2)?re:j(re):U(re,W,ue)).then(re=>{if(re){if(Gi(re,2))return C(dt({replace:F},y(re.to),{state:typeof re.to=="object"?dt({},Se,re.to.state):Se,force:Ce}),J||W)}else re=P(W,ue,!0,F,Se);return A(W,ue,re),re})}function M(Y,J){const te=S(Y,J);return te?Promise.reject(te):Promise.resolve()}function R(Y){const J=X.values().next().value;return J&&typeof J.runWithContext=="function"?J.runWithContext(Y):Y()}function T(Y,J){let te;const[ue,Se,Ce]=r3(Y,J);te=dd(ue.reverse(),"beforeRouteLeave",Y,J);for(const N of ue)N.leaveGuards.forEach(W=>{te.push(Ir(W,Y,J))});const F=M.bind(null,Y,J);return te.push(F),le(te).then(()=>{te=[];for(const N of s.list())te.push(Ir(N,Y,J));return te.push(F),le(te)}).then(()=>{te=dd(Se,"beforeRouteUpdate",Y,J);for(const N of Se)N.updateGuards.forEach(W=>{te.push(Ir(W,Y,J))});return te.push(F),le(te)}).then(()=>{te=[];for(const N of Y.matched)if(N.beforeEnter&&!J.matched.includes(N))if(yi(N.beforeEnter))for(const W of N.beforeEnter)te.push(Ir(W,Y,J));else te.push(Ir(N.beforeEnter,Y,J));return te.push(F),le(te)}).then(()=>(Y.matched.forEach(N=>N.enterCallbacks={}),te=dd(Ce,"beforeRouteEnter",Y,J),te.push(F),le(te))).then(()=>{te=[];for(const N of o.list())te.push(Ir(N,Y,J));return te.push(F),le(te)}).catch(N=>Gi(N,8)?N:Promise.reject(N))}function A(Y,J,te){for(const ue of u.list())R(()=>ue(Y,J,te))}function P(Y,J,te,ue,Se){const Ce=S(Y,J);if(Ce)return Ce;const F=J===vr,N=Zs?history.state:{};te&&(ue||F?r.replace(Y.fullPath,dt({scroll:F&&N&&N.scroll},Se)):r.push(Y.fullPath,Se)),a.value=Y,q(Y,J,te,F),j()}let I;function E(){I||(I=r.listen((Y,J,te)=>{if(!ie.listening)return;const ue=v(Y),Se=b(ue);if(Se){C(dt(Se,{replace:!0}),ue).catch(Fa);return}h=ue;const Ce=a.value;Zs&&fB(Fy(Ce.fullPath,te.delta),ih()),T(ue,Ce).catch(F=>Gi(F,12)?F:Gi(F,2)?(C(F.to,ue).then(N=>{Gi(N,20)&&!te.delta&&te.type===rl.pop&&r.go(-1,!1)}).catch(Fa),Promise.reject()):(te.delta&&r.go(-te.delta,!1),U(F,ue,Ce))).then(F=>{F=F||P(ue,Ce,!1),F&&(te.delta&&!Gi(F,8)?r.go(-te.delta,!1):te.type===rl.pop&&Gi(F,20)&&r.go(-1,!1)),A(ue,Ce,F)}).catch(Fa)}))}let L=ha(),O=ha(),B;function U(Y,J,te){j(Y);const ue=O.list();return ue.length?ue.forEach(Se=>Se(Y,J,te)):console.error(Y),Promise.reject(Y)}function z(){return B&&a.value!==vr?Promise.resolve():new Promise((Y,J)=>{L.add([Y,J])})}function j(Y){return B||(B=!Y,E(),L.list().forEach(([J,te])=>Y?te(Y):J()),L.reset()),Y}function q(Y,J,te,ue){const{scrollBehavior:Se}=e;if(!Zs||!Se)return Promise.resolve();const Ce=!te&&pB(Fy(Y.fullPath,0))||(ue||!te)&&history.state&&history.state.scroll||null;return Wr().then(()=>Se(Y,J,Ce)).then(F=>F&&dB(F)).catch(F=>U(F,Y,J))}const ne=Y=>r.go(Y);let G;const X=new Set,ie={currentRoute:a,listening:!0,addRoute:f,removeRoute:p,hasRoute:m,getRoutes:g,resolve:v,options:e,push:_,replace:w,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:s.add,beforeResolve:o.add,afterEach:u.add,onError:O.add,isReady:z,install(Y){const J=this;Y.component("RouterLink",QB),Y.component("RouterView",n3),Y.config.globalProperties.$router=J,Object.defineProperty(Y.config.globalProperties,"$route",{enumerable:!0,get:()=>Nr(a)}),Zs&&!G&&a.value===vr&&(G=!0,_(r.location).catch(Se=>{}));const te={};for(const Se in vr)te[Se]=Rt(()=>a.value[Se]);Y.provide(rh,J),Y.provide(hg,jo(te)),Y.provide(Tf,a);const ue=Y.unmount;X.add(Y),Y.unmount=function(){X.delete(Y),X.size<1&&(h=vr,I&&I(),I=null,a.value=vr,G=!1,B=!1),ue()}}};function le(Y){return Y.reduce((J,te)=>J.then(()=>R(te)),Promise.resolve())}return ie}function r3(e,t){const n=[],i=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let o=0;o<s;o++){const u=t.matched[o];u&&(e.matched.find(h=>Do(h,u))?i.push(u):n.push(u));const a=e.matched[o];a&&(t.matched.find(h=>Do(h,a))||r.push(a))}return[n,i,r]}function NZ(){return jn(rh)}function DZ(){return jn(hg)}const Qy=/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/,Or=i3({history:_B(),routes:[{path:"/",name:"dashboard",redirect:{name:"pages",params:{tool:"pages:dashboard"}},meta:{requiresAuth:!0}},{name:"pages",path:"/admin/:tool?/:itemId?/:subpage?",component:()=>ft(()=>import("./BaseTemplate.37124165.js"),[]),props:e=>({tool:e.params.tool.split(":").join("/"),itemId:e.params.itemId,subpage:e.params.subpage}),meta:{requiresAuth:!0}},{name:"pages_shared",path:`/admin/:tool/:organizationId(${Qy.source})/:itemId(${Qy.source})/:subpage?`,component:()=>ft(()=>import("./BaseTemplate.37124165.js"),[]),props:e=>({tool:e.params.tool.split(":").join("/"),organizationId:e.params.organizationId,itemId:e.params.itemId,subpage:e.params.subpage}),meta:{requiresAuth:!0}},{name:"login",path:"/login",component:()=>ft(()=>import("./LoginTemplate.0b955e4c.js"),["assets/LoginTemplate.0b955e4c.js","assets/public-locale.4447ed26.js","assets/ms-sso-icon.d5f9ab50.js"]),meta:{hideForAuth:!0}},{name:"login-sso",path:"/login-sso",component:()=>ft(()=>import("./LoginSsoTemplate.59be951a.js"),[]),meta:{hideForAuth:!0}},{name:"maintenance",path:"/maintenance",component:()=>ft(()=>import("./MaintenanceTemplate.e9fb40ef.js"),[]),meta:{}},{name:"terms-of-use",path:"/terms-of-use",props:!0,component:()=>ft(()=>import("./TermsOfUseTemplate.08e68745.js"),["assets/TermsOfUseTemplate.08e68745.js","assets/public-locale.4447ed26.js"])},{name:"shared-dataset-link",path:"/verify-login/:token",component:()=>ft(()=>import("./SharedDataset.4cb201e2.js"),[])},{name:"register",path:"/register",component:()=>ft(()=>import("./RegisterTemplate.1598a2e1.js"),["assets/RegisterTemplate.1598a2e1.js","assets/public-locale.4447ed26.js","assets/ms-sso-icon.d5f9ab50.js"]),meta:{hideForAuth:!0}},{name:"register-sso",path:"/register-sso",component:()=>ft(()=>import("./RegisterSsoTemplate.aeac1d39.js"),[]),meta:{hideForAuth:!0}},{name:"password-reset",path:"/password-reset/:token?",component:()=>ft(()=>import("./PasswordResetTemplate.971be34f.js"),["assets/PasswordResetTemplate.971be34f.js","assets/PasswordResetForm.a7a4b489.js","assets/public-locale.4447ed26.js"])},{name:"password-set",path:"/password-set/:token?",component:()=>ft(()=>import("./PasswordSetTemplate.dccf198a.js"),["assets/PasswordSetTemplate.dccf198a.js","assets/PasswordResetForm.a7a4b489.js","assets/public-locale.4447ed26.js"])},{name:"log-viewer",path:"/log-viewer/:flowExecutionId",props:!0,component:()=>ft(()=>import("./LogViewer.4d8d93fd.js"),["assets/LogViewer.4d8d93fd.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/time.39bf66fa.js","assets/LogViewer.83caf43e.css"]),meta:{requiresAuth:!0}},{name:"downloads",path:"/downloads/:downloadFileId",component:()=>ft(()=>import("./DownloadDirect.e0694e4a.js"),["assets/DownloadDirect.e0694e4a.js","assets/download.cadf5707.js"]),meta:{requiresAuth:!0}},{name:"404NotFound",path:"/:patchMatch(.*)*",component:()=>ft(()=>Promise.resolve().then(()=>wQ),void 0),props:{addMargin:!0}}]});Or.beforeEach(async(e,t,n)=>{if(e.query["hub-auth-code"]){await Wn.dispatch("Auth/logout");try{await Wn.dispatch("Auth/loginWithAuthCode",{code:e.query["hub-auth-code"]}),delete e.query["hub-auth-code"],n(e)}catch{delete e.query["hub-auth-code"];const r=Object.keys(e.query).length>0?`${e.path}?${Object.keys(e.query).map(s=>`${s}=${e.query[s]}`).join("&")}`:e.path;n({name:"login",query:{redirect:r}})}return}if(await Wn.dispatch("Auth/attemptLogin")){if(e.meta.hideForAuth){if(e.query.redirect){n(e.query.redirect);return}n({name:"pages",params:{tool:"pages:dashboard"}});return}if(!Wn.getters["Auth/hasResourcePermission"](e.params.tool)){n({name:"pages",params:{tool:"pages:dashboard"}});return}const r=Wn.state.AppState.Tools.superAdminTools;if(Wn.state.AppState.Tools.resellerTools.includes(e.params?.tool?.replace(":","/"))&&!Wn.getters["Auth/isReseller"]){n({name:"pages",params:{tool:"pages:dashboard"}});return}if(r.includes(e.params?.tool?.replace(":","/"))&&!Wn.getters["Auth/isSuperAdmin"]){n({name:"pages",params:{tool:"pages:dashboard"}});return}n();return}if(!e.meta.requiresAuth){n();return}n({name:"login",query:{redirect:e.fullPath}})});Or.afterEach(e=>{Wn.dispatch("UserTrackingEvents/store",{event_type:"page_view",path:e.fullPath.split("?")[0]||null,utm_source:e.query.utm_source||null,utm_medium:e.query.utm_medium||null,utm_campaign:e.query.utm_campaign||null,session_id:e.query.session_id||null,user_id:Wn.state.Auth.user?.id||null})});function s3(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var Ts=1,Es=2,Ao=3,o3=4,Ef=5,Zy=6378137,a3=6356752314e-3,e_=.0066943799901413165,Ha=484813681109536e-20,we=Math.PI/2,l3=.16666666666666666,c3=.04722222222222222,u3=.022156084656084655,xe=1e-10,sn=.017453292519943295,Li=57.29577951308232,at=Math.PI/4,sl=Math.PI*2,Pt=3.14159265359,Hn={};Hn.greenwich=0;Hn.lisbon=-9.131906111111;Hn.paris=2.337229166667;Hn.bogota=-74.080916666667;Hn.madrid=-3.687938888889;Hn.rome=12.452333333333;Hn.bern=7.439583333333;Hn.jakarta=106.807719444444;Hn.ferro=-17.666666666667;Hn.brussels=4.367975;Hn.stockholm=18.058277777778;Hn.athens=23.7163375;Hn.oslo=10.722916666667;const h3={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var t_=/[\s_\-\/\(\)]/g;function qr(e,t){if(e[t])return e[t];for(var n=Object.keys(e),i=t.toLowerCase().replace(t_,""),r=-1,s,o;++r<n.length;)if(s=n[r],o=s.toLowerCase().replace(t_,""),o===i)return e[s]}function Af(e){var t={},n=e.split("+").map(function(u){return u.trim()}).filter(function(u){return u}).reduce(function(u,a){var h=a.split("=");return h.push(!0),u[h[0].toLowerCase()]=h[1],u},{}),i,r,s,o={proj:"projName",datum:"datumCode",rf:function(u){t.rf=parseFloat(u)},lat_0:function(u){t.lat0=u*sn},lat_1:function(u){t.lat1=u*sn},lat_2:function(u){t.lat2=u*sn},lat_ts:function(u){t.lat_ts=u*sn},lon_0:function(u){t.long0=u*sn},lon_1:function(u){t.long1=u*sn},lon_2:function(u){t.long2=u*sn},alpha:function(u){t.alpha=parseFloat(u)*sn},gamma:function(u){t.rectified_grid_angle=parseFloat(u)},lonc:function(u){t.longc=u*sn},x_0:function(u){t.x0=parseFloat(u)},y_0:function(u){t.y0=parseFloat(u)},k_0:function(u){t.k0=parseFloat(u)},k:function(u){t.k0=parseFloat(u)},a:function(u){t.a=parseFloat(u)},b:function(u){t.b=parseFloat(u)},r_a:function(){t.R_A=!0},zone:function(u){t.zone=parseInt(u,10)},south:function(){t.utmSouth=!0},towgs84:function(u){t.datum_params=u.split(",").map(function(a){return parseFloat(a)})},to_meter:function(u){t.to_meter=parseFloat(u)},units:function(u){t.units=u;var a=qr(h3,u);a&&(t.to_meter=a.to_meter)},from_greenwich:function(u){t.from_greenwich=u*sn},pm:function(u){var a=qr(Hn,u);t.from_greenwich=(a||parseFloat(u))*sn},nadgrids:function(u){u==="@null"?t.datumCode="none":t.nadgrids=u},axis:function(u){var a="ewnsud";u.length===3&&a.indexOf(u.substr(0,1))!==-1&&a.indexOf(u.substr(1,1))!==-1&&a.indexOf(u.substr(2,1))!==-1&&(t.axis=u)},approx:function(){t.approx=!0}};for(i in n)r=n[i],i in o?(s=o[i],typeof s=="function"?s(r):t[s]=r):t[i]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ol=1,q1=2,K1=3,hu=4,Y1=5,dg=-1,d3=/\s/,f3=/[A-Za-z]/,p3=/[A-Za-z84_]/,sh=/[,\]]/,X1=/[\d\.E\-\+]/;function dr(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ol}dr.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==hu)for(;d3.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case ol:return this.neutral(e);case q1:return this.keyword(e);case hu:return this.quoted(e);case Y1:return this.afterquote(e);case K1:return this.number(e);case dg:return}};dr.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=hu;return}if(sh.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)};dr.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ol;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ol,this.currentObject=this.stack.pop(),this.currentObject||(this.state=dg);return}};dr.prototype.number=function(e){if(X1.test(e)){this.word+=e;return}if(sh.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)};dr.prototype.quoted=function(e){if(e==='"'){this.state=Y1;return}this.word+=e};dr.prototype.keyword=function(e){if(p3.test(e)){this.word+=e;return}if(e==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ol;return}if(sh.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)};dr.prototype.neutral=function(e){if(f3.test(e)){this.word=e,this.state=q1;return}if(e==='"'){this.word="",this.state=hu;return}if(X1.test(e)){this.word=e,this.state=K1;return}if(sh.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)};dr.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===dg)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function g3(e){var t=new dr(e);return t.output()}function n_(e,t,n){Array.isArray(t)&&(n.unshift(t),t=null);var i=t?{}:e,r=n.reduce(function(s,o){return lo(o,s),s},i);t&&(e[t]=r)}function lo(e,t){if(!Array.isArray(e)){t[e]=!0;return}var n=e.shift();if(n==="PARAMETER"&&(n=e.shift()),e.length===1){if(Array.isArray(e[0])){t[n]={},lo(e[0],t[n]);return}t[n]=e[0];return}if(!e.length){t[n]=!0;return}if(n==="TOWGS84"){t[n]=e;return}if(n==="AXIS"){n in t||(t[n]=[]),t[n].push(e);return}Array.isArray(n)||(t[n]={});var i;switch(n){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[n]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&lo(e[2],t[n]);return;case"SPHEROID":case"ELLIPSOID":t[n]={name:e[0],a:e[1],rf:e[2]},e.length===4&&lo(e[3],t[n]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":e[0]=["name",e[0]],n_(t,n,e);return;default:for(i=-1;++i<e.length;)if(!Array.isArray(e[i]))return lo(e,t[n]);return n_(t,n,e)}}var m3=.017453292519943295;function v3(e,t){var n=t[0],i=t[1];!(n in e)&&i in e&&(e[n]=e[i],t.length===3&&(e[n]=t[2](e[n])))}function Si(e){return e*m3}function y3(e){if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",n=0,i=e.AXIS.length;n<i;++n){var r=[e.AXIS[n][0].toLowerCase(),e.AXIS[n][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var s=e.GEOGCS;e.type==="GEOGCS"&&(s=e),s&&(s.DATUM?e.datumCode=s.DATUM.name.toLowerCase():e.datumCode=s.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),(e.datumCode==="new_zealand_geodetic_datum_1949"||e.datumCode==="new_zealand_1949")&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode.slice(-6)==="_ferro"&&(e.datumCode=e.datumCode.slice(0,-6)),e.datumCode.slice(-8)==="_jakarta"&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),s.DATUM&&s.DATUM.SPHEROID&&(e.ellps=s.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=s.DATUM.SPHEROID.a,e.rf=parseFloat(s.DATUM.SPHEROID.rf,10)),s.DATUM&&s.DATUM.TOWGS84&&(e.datum_params=s.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);function o(h){var c=e.to_meter||1;return h*c}var u=function(h){return v3(e,h)},a=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Si],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Si],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",Si],["lat0","latitude_of_origin",Si],["lat0","standard_parallel_1",Si],["lat1","standard_parallel_1",Si],["lat2","standard_parallel_2",Si],["azimuth","Azimuth"],["alpha","azimuth",Si],["srsCode","name"]];a.forEach(u),!e.long0&&e.longc&&(e.projName==="Albers_Conic_Equal_Area"||e.projName==="Lambert_Azimuthal_Equal_Area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(e.projName==="Stereographic_South_Pole"||e.projName==="Polar Stereographic (variant B)")?(e.lat0=Si(e.lat1>0?90:-90),e.lat_ts=e.lat1):!e.lat_ts&&e.lat0&&e.projName==="Polar_Stereographic"&&(e.lat_ts=e.lat0,e.lat0=Si(e.lat0>0?90:-90))}function J1(e){var t=g3(e),n=t.shift(),i=t.shift();t.unshift(["name",i]),t.unshift(["type",n]);var r={};return lo(t,r),y3(r),r}function bn(e){var t=this;if(arguments.length===2){var n=arguments[1];typeof n=="string"?n.charAt(0)==="+"?bn[e]=Af(arguments[1]):bn[e]=J1(arguments[1]):bn[e]=n}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(i){Array.isArray(i)?bn.apply(t,i):bn(i)});if(typeof e=="string"){if(e in bn)return bn[e]}else"EPSG"in e?bn["EPSG:"+e.EPSG]=e:"ESRI"in e?bn["ESRI:"+e.ESRI]=e:"IAU2000"in e?bn["IAU2000:"+e.IAU2000]=e:console.log(e);return}}s3(bn);function _3(e){return typeof e=="string"}function b3(e){return e in bn}var w3=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function S3(e){return w3.some(function(t){return e.indexOf(t)>-1})}var T3=["3857","900913","3785","102113"];function E3(e){var t=qr(e,"authority");if(!!t){var n=qr(t,"epsg");return n&&T3.indexOf(n)>-1}}function A3(e){var t=qr(e,"extension");if(!!t)return qr(t,"proj4")}function C3(e){return e[0]==="+"}function x3(e){if(_3(e)){if(b3(e))return bn[e];if(S3(e)){var t=J1(e);if(E3(t))return bn["EPSG:3857"];var n=A3(t);return n?Af(n):t}if(C3(e))return Af(e)}else return e}function i_(e,t){e=e||{};var n,i;if(!t)return e;for(i in t)n=t[i],n!==void 0&&(e[i]=n);return e}function Ui(e,t,n){var i=e*t;return n/Math.sqrt(1-i*i)}function El(e){return e<0?-1:1}function Ie(e){return Math.abs(e)<=Pt?e:e-El(e)*sl}function gi(e,t,n){var i=e*n,r=.5*e;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(we-t))/i}function al(e,t){for(var n=.5*e,i,r,s=we-2*Math.atan(t),o=0;o<=15;o++)if(i=e*Math.sin(s),r=we-2*Math.atan(t*Math.pow((1-i)/(1+i),n))-s,s+=r,Math.abs(r)<=1e-10)return s;return-9999}function M3(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ui(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function k3(e){var t=e.x,n=e.y;if(n*Li>90&&n*Li<-90&&t*Li>180&&t*Li<-180)return null;var i,r;if(Math.abs(Math.abs(n)-we)<=xe)return null;if(this.sphere)i=this.x0+this.a*this.k0*Ie(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(at+.5*n));else{var s=Math.sin(n),o=gi(this.e,n,s);i=this.x0+this.a*this.k0*Ie(t-this.long0),r=this.y0-this.a*this.k0*Math.log(o)}return e.x=i,e.y=r,e}function $3(e){var t=e.x-this.x0,n=e.y-this.y0,i,r;if(this.sphere)r=we-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var s=Math.exp(-n/(this.a*this.k0));if(r=al(this.e,s),r===-9999)return null}return i=Ie(this.long0+t/(this.a*this.k0)),e.x=i,e.y=r,e}var I3=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const R3={init:M3,forward:k3,inverse:$3,names:I3};function L3(){}function r_(e){return e}var O3=["longlat","identity"];const P3={init:L3,forward:r_,inverse:r_,names:O3};var N3=[R3,P3],Mc={},du=[];function Q1(e,t){var n=du.length;return e.names?(du[n]=e,e.names.forEach(function(i){Mc[i.toLowerCase()]=n}),this):(console.log(t),!0)}function D3(e){if(!e)return!1;var t=e.toLowerCase();if(typeof Mc[t]<"u"&&du[Mc[t]])return du[Mc[t]]}function F3(){N3.forEach(Q1)}const B3={start:F3,add:Q1,get:D3};var Ve={};Ve.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ve.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ve.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ve.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ve.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ve.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ve.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ve.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ve.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ve.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ve.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ve.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ve.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ve.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ve.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ve.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};Ve.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ve.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ve.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ve.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ve.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ve.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ve.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ve.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ve.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ve.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ve.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ve.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ve.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ve.hough={a:6378270,rf:297,ellipseName:"Hough"};Ve.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ve.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ve.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ve.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ve.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ve.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ve.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ve.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ve.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ve.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ve.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ve.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var H3=Ve.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ve.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function U3(e,t,n,i){var r=e*e,s=t*t,o=(r-s)/r,u=0;i?(e*=1-o*(l3+o*(c3+o*u3)),r=e*e,o=0):u=Math.sqrt(o);var a=(r-s)/s;return{es:o,e:u,ep2:a}}function z3(e,t,n,i,r){if(!e){var s=qr(Ve,i);s||(s=H3),e=s.a,t=s.b,n=s.rf}return n&&!t&&(t=(1-1/n)*e),(n===0||Math.abs(e-t)<xe)&&(r=!0,t=e),{a:e,b:t,rf:n,sphere:r}}var en={};en.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};en.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};en.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};en.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};en.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};en.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};en.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};en.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};en.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};en.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};en.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};en.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};en.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};en.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};en.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};en.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};en.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function W3(e,t,n,i,r,s,o){var u={};return e===void 0||e==="none"?u.datum_type=Ef:u.datum_type=o3,t&&(u.datum_params=t.map(parseFloat),(u.datum_params[0]!==0||u.datum_params[1]!==0||u.datum_params[2]!==0)&&(u.datum_type=Ts),u.datum_params.length>3&&(u.datum_params[3]!==0||u.datum_params[4]!==0||u.datum_params[5]!==0||u.datum_params[6]!==0)&&(u.datum_type=Es,u.datum_params[3]*=Ha,u.datum_params[4]*=Ha,u.datum_params[5]*=Ha,u.datum_params[6]=u.datum_params[6]/1e6+1)),o&&(u.datum_type=Ao,u.grids=o),u.a=n,u.b=i,u.es=r,u.ep2=s,u}var Z1={};function V3(e,t){var n=new DataView(t),i=q3(n),r=K3(n,i);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var s=Y3(n,r,i),o={header:r,subgrids:s};return Z1[e]=o,o}function j3(e){if(e===void 0)return null;var t=e.split(",");return t.map(G3)}function G3(e){if(e.length===0)return null;var t=e[0]==="@";return t&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Z1[e]||null,isNull:!1}}function co(e){return e/3600*Math.PI/180}function q3(e){var t=e.getInt32(8,!1);return t===11?!1:(t=e.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function K3(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:Cf(e,56,56+8).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function Cf(e,t,n){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,n)))}function Y3(e,t,n){for(var i=176,r=[],s=0;s<t.nSubgrids;s++){var o=J3(e,i,n),u=Q3(e,i,o,n),a=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),h=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);r.push({ll:[co(o.lowerLongitude),co(o.lowerLatitude)],del:[co(o.longitudeInterval),co(o.latitudeInterval)],lim:[a,h],count:o.gridNodeCount,cvs:X3(u)})}return r}function X3(e){return e.map(function(t){return[co(t.longitudeShift),co(t.latitudeShift)]})}function J3(e,t,n){return{name:Cf(e,t+8,t+16).trim(),parent:Cf(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,n),upperLatitude:e.getFloat64(t+88,n),lowerLongitude:e.getFloat64(t+104,n),upperLongitude:e.getFloat64(t+120,n),latitudeInterval:e.getFloat64(t+136,n),longitudeInterval:e.getFloat64(t+152,n),gridNodeCount:e.getInt32(t+168,n)}}function Q3(e,t,n,i){for(var r=t+176,s=16,o=[],u=0;u<n.gridNodeCount;u++){var a={latitudeShift:e.getFloat32(r+u*s,i),longitudeShift:e.getFloat32(r+u*s+4,i),latitudeAccuracy:e.getFloat32(r+u*s+8,i),longitudeAccuracy:e.getFloat32(r+u*s+12,i)};o.push(a)}return o}function Di(e,t){if(!(this instanceof Di))return new Di(e);t=t||function(h){if(h)throw h};var n=x3(e);if(typeof n!="object"){t(e);return}var i=Di.projections.get(n.projName);if(!i){t(e);return}if(n.datumCode&&n.datumCode!=="none"){var r=qr(en,n.datumCode);r&&(n.datum_params=n.datum_params||(r.towgs84?r.towgs84.split(","):null),n.ellps=r.ellipse,n.datumName=r.datumName?r.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var s=z3(n.a,n.b,n.rf,n.ellps,n.sphere),o=U3(s.a,s.b,s.rf,n.R_A),u=j3(n.nadgrids),a=n.datum||W3(n.datumCode,n.datum_params,s.a,s.b,o.es,o.ep2,u);i_(this,n),i_(this,i),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=a,this.init(),t(null,this)}Di.projections=B3;Di.projections.start();function Z3(e,t){return e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11?!1:e.datum_type===Ts?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type===Es?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]:!0}function eT(e,t,n){var i=e.x,r=e.y,s=e.z?e.z:0,o,u,a,h;if(r<-we&&r>-1.001*we)r=-we;else if(r>we&&r<1.001*we)r=we;else{if(r<-we)return{x:-1/0,y:-1/0,z:e.z};if(r>we)return{x:1/0,y:1/0,z:e.z}}return i>Math.PI&&(i-=2*Math.PI),u=Math.sin(r),h=Math.cos(r),a=u*u,o=n/Math.sqrt(1-t*a),{x:(o+s)*h*Math.cos(i),y:(o+s)*h*Math.sin(i),z:(o*(1-t)+s)*u}}function tT(e,t,n,i){var r=1e-12,s=r*r,o=30,u,a,h,c,l,d,f,p,g,m,v,y,S,_=e.x,w=e.y,b=e.z?e.z:0,C,M,R;if(u=Math.sqrt(_*_+w*w),a=Math.sqrt(_*_+w*w+b*b),u/n<r){if(C=0,a/n<r)return M=we,R=-i,{x:e.x,y:e.y,z:e.z}}else C=Math.atan2(w,_);h=b/a,c=u/a,l=1/Math.sqrt(1-t*(2-t)*c*c),p=c*(1-t)*l,g=h*l,S=0;do S++,f=n/Math.sqrt(1-t*g*g),R=u*p+b*g-f*(1-t*g*g),d=t*f/(f+R),l=1/Math.sqrt(1-d*(2-d)*c*c),m=c*(1-d)*l,v=h*l,y=v*p-m*g,p=m,g=v;while(y*y>s&&S<o);return M=Math.atan(v/Math.abs(m)),{x:C,y:M,z:R}}function eH(e,t,n){if(t===Ts)return{x:e.x+n[0],y:e.y+n[1],z:e.z+n[2]};if(t===Es){var i=n[0],r=n[1],s=n[2],o=n[3],u=n[4],a=n[5],h=n[6];return{x:h*(e.x-a*e.y+u*e.z)+i,y:h*(a*e.x+e.y-o*e.z)+r,z:h*(-u*e.x+o*e.y+e.z)+s}}}function tH(e,t,n){if(t===Ts)return{x:e.x-n[0],y:e.y-n[1],z:e.z-n[2]};if(t===Es){var i=n[0],r=n[1],s=n[2],o=n[3],u=n[4],a=n[5],h=n[6],c=(e.x-i)/h,l=(e.y-r)/h,d=(e.z-s)/h;return{x:c+a*l-u*d,y:-a*c+l+o*d,z:u*c-o*l+d}}}function rc(e){return e===Ts||e===Es}function nH(e,t,n){if(Z3(e,t)||e.datum_type===Ef||t.datum_type===Ef)return n;var i=e.a,r=e.es;if(e.datum_type===Ao){var s=s_(e,!1,n);if(s!==0)return;i=Zy,r=e_}var o=t.a,u=t.b,a=t.es;if(t.datum_type===Ao&&(o=Zy,u=a3,a=e_),r===a&&i===o&&!rc(e.datum_type)&&!rc(t.datum_type))return n;if(n=eT(n,r,i),rc(e.datum_type)&&(n=eH(n,e.datum_type,e.datum_params)),rc(t.datum_type)&&(n=tH(n,t.datum_type,t.datum_params)),n=tT(n,a,o,u),t.datum_type===Ao){var h=s_(t,!0,n);if(h!==0)return}return n}function s_(e,t,n){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var i={x:-n.x,y:n.y},r={x:Number.NaN,y:Number.NaN},s=[],o=0;o<e.grids.length;o++){var u=e.grids[o];if(s.push(u.name),u.isNull){r=i;break}if(u.mandatory,u.grid===null){if(u.mandatory)return console.log("Unable to find mandatory grid '"+u.name+"'"),-1;continue}var a=u.grid.subgrids[0],h=(Math.abs(a.del[1])+Math.abs(a.del[0]))/1e4,c=a.ll[0]-h,l=a.ll[1]-h,d=a.ll[0]+(a.lim[0]-1)*a.del[0]+h,f=a.ll[1]+(a.lim[1]-1)*a.del[1]+h;if(!(l>i.y||c>i.x||f<i.y||d<i.x)&&(r=iH(i,t,a),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*Li+" "+i.y*Li+" tried: '"+s+"'"),-1):(n.x=-r.x,n.y=r.y,0)}function iH(e,t,n){var i={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return i;var r={x:e.x,y:e.y};r.x-=n.ll[0],r.y-=n.ll[1],r.x=Ie(r.x-Math.PI)+Math.PI;var s=o_(r,n);if(t){if(isNaN(s.x))return i;s.x=r.x-s.x,s.y=r.y-s.y;var o=9,u=1e-12,a,h;do{if(h=o_(s,n),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}a={x:r.x-(h.x+s.x),y:r.y-(h.y+s.y)},s.x+=a.x,s.y+=a.y}while(o--&&Math.abs(a.x)>u&&Math.abs(a.y)>u);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=Ie(s.x+n.ll[0]),i.y=s.y+n.ll[1]}else isNaN(s.x)||(i.x=e.x+s.x,i.y=e.y+s.y);return i}function o_(e,t){var n={x:e.x/t.del[0],y:e.y/t.del[1]},i={x:Math.floor(n.x),y:Math.floor(n.y)},r={x:n.x-1*i.x,y:n.y-1*i.y},s={x:Number.NaN,y:Number.NaN},o;if(i.x<0||i.x>=t.lim[0]||i.y<0||i.y>=t.lim[1])return s;o=i.y*t.lim[0]+i.x;var u={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var a={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var h={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var c={x:t.cvs[o][0],y:t.cvs[o][1]},l=r.x*r.y,d=r.x*(1-r.y),f=(1-r.x)*(1-r.y),p=(1-r.x)*r.y;return s.x=f*u.x+d*a.x+p*c.x+l*h.x,s.y=f*u.y+d*a.y+p*c.y+l*h.y,s}function a_(e,t,n){var i=n.x,r=n.y,s=n.z||0,o,u,a,h={};for(a=0;a<3;a++)if(!(t&&a===2&&n.z===void 0))switch(a===0?(o=i,"ew".indexOf(e.axis[a])!==-1?u="x":u="y"):a===1?(o=r,"ns".indexOf(e.axis[a])!==-1?u="y":u="x"):(o=s,u="z"),e.axis[a]){case"e":h[u]=o;break;case"w":h[u]=-o;break;case"n":h[u]=o;break;case"s":h[u]=-o;break;case"u":n[u]!==void 0&&(h.z=o);break;case"d":n[u]!==void 0&&(h.z=-o);break;default:return null}return h}function nT(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function rH(e){l_(e.x),l_(e.y)}function l_(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function sH(e,t){return(e.datum.datum_type===Ts||e.datum.datum_type===Es||e.datum.datum_type===Ao)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Ts||t.datum.datum_type===Es||t.datum.datum_type===Ao)&&e.datumCode!=="WGS84"}function fu(e,t,n,i){var r;Array.isArray(n)?n=nT(n):n={x:n.x,y:n.y,z:n.z,m:n.m};var s=n.z!==void 0;if(rH(n),e.datum&&t.datum&&sH(e,t)&&(r=new Di("WGS84"),n=fu(e,r,n,i),e=r),i&&e.axis!=="enu"&&(n=a_(e,!1,n)),e.projName==="longlat")n={x:n.x*sn,y:n.y*sn,z:n.z||0};else if(e.to_meter&&(n={x:n.x*e.to_meter,y:n.y*e.to_meter,z:n.z||0}),n=e.inverse(n),!n)return;if(e.from_greenwich&&(n.x+=e.from_greenwich),n=nH(e.datum,t.datum,n),!!n)return t.from_greenwich&&(n={x:n.x-t.from_greenwich,y:n.y,z:n.z||0}),t.projName==="longlat"?n={x:n.x*Li,y:n.y*Li,z:n.z||0}:(n=t.forward(n),t.to_meter&&(n={x:n.x/t.to_meter,y:n.y/t.to_meter,z:n.z||0})),i&&t.axis!=="enu"?a_(t,!0,n):(s||delete n.z,n)}var c_=Di("WGS84");function fd(e,t,n,i){var r,s,o;return Array.isArray(n)?(r=fu(e,t,n,i)||{x:NaN,y:NaN},n.length>2?typeof e.name<"u"&&e.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(s=fu(e,t,n,i),o=Object.keys(n),o.length===2||o.forEach(function(u){if(typeof e.name<"u"&&e.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(u==="x"||u==="y"||u==="z")return}else if(u==="x"||u==="y")return;s[u]=n[u]}),s)}function u_(e){return e instanceof Di?e:e.oProj?e.oProj:Di(e)}function Dn(e,t,n){e=u_(e);var i=!1,r;return typeof t>"u"?(t=e,e=c_,i=!0):(typeof t.x<"u"||Array.isArray(t))&&(n=t,t=e,e=c_,i=!0),t=u_(t),n?fd(e,t,n):(r={forward:function(s,o){return fd(e,t,s,o)},inverse:function(s,o){return fd(t,e,s,o)}},i&&(r.oProj=t),r)}var h_=6,iT="AJSAJS",rT="AFAFAF",uo=65,Ln=73,Jn=79,Ea=86,Aa=90;const oH={forward:sT,inverse:aH,toPoint:oT};function sT(e,t){return t=t||5,uH(lH({lat:e[1],lon:e[0]}),t)}function aH(e){var t=fg(lT(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function oT(e){var t=fg(lT(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function pd(e){return e*(Math.PI/180)}function d_(e){return 180*(e/Math.PI)}function lH(e){var t=e.lat,n=e.lon,i=6378137,r=.00669438,s=.9996,o,u,a,h,c,l,d,f=pd(t),p=pd(n),g,m;m=Math.floor((n+180)/6)+1,n===180&&(m=60),t>=56&&t<64&&n>=3&&n<12&&(m=32),t>=72&&t<84&&(n>=0&&n<9?m=31:n>=9&&n<21?m=33:n>=21&&n<33?m=35:n>=33&&n<42&&(m=37)),o=(m-1)*6-180+3,g=pd(o),u=r/(1-r),a=i/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),c=u*Math.cos(f)*Math.cos(f),l=Math.cos(f)*(p-g),d=i*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var v=s*a*(l+(1-h+c)*l*l*l/6+(5-18*h+h*h+72*c-58*u)*l*l*l*l*l/120)+5e5,y=s*(d+a*Math.tan(f)*(l*l/2+(5-h+9*c+4*c*c)*l*l*l*l/24+(61-58*h+h*h+600*c-330*u)*l*l*l*l*l*l/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(v),zoneNumber:m,zoneLetter:cH(t)}}function fg(e){var t=e.northing,n=e.easting,i=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var s=.9996,o=6378137,u=.00669438,a,h=(1-Math.sqrt(1-u))/(1+Math.sqrt(1-u)),c,l,d,f,p,g,m,v,y,S=n-5e5,_=t;i<"N"&&(_-=1e7),m=(r-1)*6-180+3,a=u/(1-u),g=_/s,v=g/(o*(1-u/4-3*u*u/64-5*u*u*u/256)),y=v+(3*h/2-27*h*h*h/32)*Math.sin(2*v)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*v)+151*h*h*h/96*Math.sin(6*v),c=o/Math.sqrt(1-u*Math.sin(y)*Math.sin(y)),l=Math.tan(y)*Math.tan(y),d=a*Math.cos(y)*Math.cos(y),f=o*(1-u)/Math.pow(1-u*Math.sin(y)*Math.sin(y),1.5),p=S/(c*s);var w=y-c*Math.tan(y)/f*(p*p/2-(5+3*l+10*d-4*d*d-9*a)*p*p*p*p/24+(61+90*l+298*d+45*l*l-252*a-3*d*d)*p*p*p*p*p*p/720);w=d_(w);var b=(p-(1+2*l+d)*p*p*p/6+(5-2*d+28*l-3*d*d+8*a+24*l*l)*p*p*p*p*p/120)/Math.cos(y);b=m+d_(b);var C;if(e.accuracy){var M=fg({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});C={top:M.lat,right:M.lon,bottom:w,left:b}}else C={lat:w,lon:b};return C}function cH(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function uH(e,t){var n="00000"+e.easting,i="00000"+e.northing;return e.zoneNumber+e.zoneLetter+hH(e.easting,e.northing,e.zoneNumber)+n.substr(n.length-5,t)+i.substr(i.length-5,t)}function hH(e,t,n){var i=aT(n),r=Math.floor(e/1e5),s=Math.floor(t/1e5)%20;return dH(r,s,i)}function aT(e){var t=e%h_;return t===0&&(t=h_),t}function dH(e,t,n){var i=n-1,r=iT.charCodeAt(i),s=rT.charCodeAt(i),o=r+e-1,u=s+t,a=!1;o>Aa&&(o=o-Aa+uo-1,a=!0),(o===Ln||r<Ln&&o>Ln||(o>Ln||r<Ln)&&a)&&o++,(o===Jn||r<Jn&&o>Jn||(o>Jn||r<Jn)&&a)&&(o++,o===Ln&&o++),o>Aa&&(o=o-Aa+uo-1),u>Ea?(u=u-Ea+uo-1,a=!0):a=!1,(u===Ln||s<Ln&&u>Ln||(u>Ln||s<Ln)&&a)&&u++,(u===Jn||s<Jn&&u>Jn||(u>Jn||s<Jn)&&a)&&(u++,u===Ln&&u++),u>Ea&&(u=u-Ea+uo-1);var h=String.fromCharCode(o)+String.fromCharCode(u);return h}function lT(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,n=null,i="",r,s=0;!/[A-Z]/.test(r=e.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+e;i+=r,s++}var o=parseInt(i,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+e;var u=e.charAt(s++);if(u<="A"||u==="B"||u==="Y"||u>="Z"||u==="I"||u==="O")throw"MGRSPoint zone letter "+u+" not handled: "+e;n=e.substring(s,s+=2);for(var a=aT(o),h=fH(n.charAt(0),a),c=pH(n.charAt(1),a);c<gH(u);)c+=2e6;var l=t-s;if(l%2!==0)throw`MGRSPoint has to have an even number 
of digits after the zone letter and two 100km letters - front 
half for easting meters, second half for 
northing meters`+e;var d=l/2,f=0,p=0,g,m,v,y,S;return d>0&&(g=1e5/Math.pow(10,d),m=e.substring(s,s+d),f=parseFloat(m)*g,v=e.substring(s+d),p=parseFloat(v)*g),y=f+h,S=p+c,{easting:y,northing:S,zoneLetter:u,zoneNumber:o,accuracy:g}}function fH(e,t){for(var n=iT.charCodeAt(t-1),i=1e5,r=!1;n!==e.charCodeAt(0);){if(n++,n===Ln&&n++,n===Jn&&n++,n>Aa){if(r)throw"Bad character: "+e;n=uo,r=!0}i+=1e5}return i}function pH(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var n=rT.charCodeAt(t-1),i=0,r=!1;n!==e.charCodeAt(0);){if(n++,n===Ln&&n++,n===Jn&&n++,n>Ea){if(r)throw"Bad character: "+e;n=uo,r=!0}i+=1e5}return i}function gH(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function Bo(e,t,n){if(!(this instanceof Bo))return new Bo(e,t,n);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if(typeof e=="object")this.x=e.x,this.y=e.y,this.z=e.z||0;else if(typeof e=="string"&&typeof t>"u"){var i=e.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=e,this.y=t,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Bo.fromMGRS=function(e){return new Bo(oT(e))};Bo.prototype.toMGRS=function(e){return sT([this.x,this.y],e)};var mH=1,vH=.25,f_=.046875,p_=.01953125,g_=.01068115234375,yH=.75,_H=.46875,bH=.013020833333333334,wH=.007120768229166667,SH=.3645833333333333,TH=.005696614583333333,EH=.3076171875;function cT(e){var t=[];t[0]=mH-e*(vH+e*(f_+e*(p_+e*g_))),t[1]=e*(yH-e*(f_+e*(p_+e*g_)));var n=e*e;return t[2]=n*(_H-e*(bH+e*wH)),n*=e,t[3]=n*(SH-e*TH),t[4]=n*e*EH,t}function oh(e,t,n,i){return n*=t,t*=t,i[0]*e-n*(i[1]+t*(i[2]+t*(i[3]+t*i[4])))}var AH=20;function uT(e,t,n){for(var i=1/(1-t),r=e,s=AH;s;--s){var o=Math.sin(r),u=1-t*o*o;if(u=(oh(r,o,Math.cos(r),n)-e)*(u*Math.sqrt(u))*i,r-=u,Math.abs(u)<xe)return r}return r}function CH(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=cT(this.es),this.ml0=oh(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function xH(e){var t=e.x,n=e.y,i=Ie(t-this.long0),r,s,o,u=Math.sin(n),a=Math.cos(n);if(this.es){var c=a*i,l=Math.pow(c,2),d=this.ep2*Math.pow(a,2),f=Math.pow(d,2),p=Math.abs(a)>xe?Math.tan(n):0,g=Math.pow(p,2),m=Math.pow(g,2);r=1-this.es*Math.pow(u,2),c=c/Math.sqrt(r);var v=oh(n,u,a,this.en);s=this.a*(this.k0*c*(1+l/6*(1-g+d+l/20*(5-18*g+m+14*d-58*g*d+l/42*(61+179*m-m*g-479*g)))))+this.x0,o=this.a*(this.k0*(v-this.ml0+u*i*c/2*(1+l/12*(5-g+9*d+4*f+l/30*(61+m-58*g+270*d-330*g*d+l/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var h=a*Math.sin(i);if(Math.abs(Math.abs(h)-1)<xe)return 93;if(s=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,o=a*Math.cos(i)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(o),h>=1){if(h-1>xe)return 93;o=0}else o=Math.acos(o);n<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return e.x=s,e.y=o,e}function MH(e){var t,n,i,r,s=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,n=uT(t,this.es,this.en),Math.abs(n)<we){var l=Math.sin(n),d=Math.cos(n),f=Math.abs(d)>xe?Math.tan(n):0,p=this.ep2*Math.pow(d,2),g=Math.pow(p,2),m=Math.pow(f,2),v=Math.pow(m,2);t=1-this.es*Math.pow(l,2);var y=s*Math.sqrt(t)/this.k0,S=Math.pow(y,2);t=t*f,i=n-t*S/(1-this.es)*.5*(1-S/12*(5+3*m-9*p*m+p-4*g-S/30*(61+90*m-252*p*m+45*v+46*p-S/56*(1385+3633*m+4095*v+1574*v*m)))),r=Ie(this.long0+y*(1-S/6*(1+2*m+p-S/20*(5+28*m+24*v+8*p*m+6*p-S/42*(61+662*m+1320*v+720*v*m))))/d)}else i=we*El(o),r=0;else{var u=Math.exp(s/this.k0),a=.5*(u-1/u),h=this.lat0+o/this.k0,c=Math.cos(h);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(a,2))),i=Math.asin(t),o<0&&(i=-i),a===0&&c===0?r=0:r=Ie(Math.atan2(a,c)+this.long0)}return e.x=r,e.y=i,e}var kH=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const kc={init:CH,forward:xH,inverse:MH,names:kH};function hT(e){var t=Math.exp(e);return t=(t-1/t)/2,t}function hi(e,t){e=Math.abs(e),t=Math.abs(t);var n=Math.max(e,t),i=Math.min(e,t)/(n||1);return n*Math.sqrt(1+Math.pow(i,2))}function $H(e){var t=1+e,n=t-1;return n===0?e:e*Math.log(t)/n}function IH(e){var t=Math.abs(e);return t=$H(t*(1+t/(hi(1,t)+1))),e<0?-t:t}function pg(e,t){for(var n=2*Math.cos(2*t),i=e.length-1,r=e[i],s=0,o;--i>=0;)o=-s+n*r+e[i],s=r,r=o;return t+o*Math.sin(2*t)}function RH(e,t){for(var n=2*Math.cos(t),i=e.length-1,r=e[i],s=0,o;--i>=0;)o=-s+n*r+e[i],s=r,r=o;return Math.sin(t)*o}function LH(e){var t=Math.exp(e);return t=(t+1/t)/2,t}function dT(e,t,n){for(var i=Math.sin(t),r=Math.cos(t),s=hT(n),o=LH(n),u=2*r*o,a=-2*i*s,h=e.length-1,c=e[h],l=0,d=0,f=0,p,g;--h>=0;)p=d,g=l,d=c,l=f,c=-p+u*d-a*l+e[h],f=-g+a*d+u*l;return u=i*o,a=r*s,[u*c-a*f,u*f+a*c]}function OH(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(kc.init.apply(this),this.forward=kc.forward,this.inverse=kc.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),n=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),n=n*t,this.cgb[1]=n*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=n*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),n=n*t,this.cgb[2]=n*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=n*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),n=n*t,this.cgb[3]=n*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=n*(1237/630+t*(-12/5+t*(-24832/14175))),n=n*t,this.cgb[4]=n*(4174/315+t*(-144838/6237)),this.cbg[4]=n*(-734/315+t*(109598/31185)),n=n*t,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=n*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=n*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),n=n*t,this.utg[2]=n*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=n*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),n=n*t,this.utg[3]=n*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=n*(49561/161280+t*(-179/168+t*(6601661/7257600))),n=n*t,this.utg[4]=n*(-4583/161280+t*(108847/3991680)),this.gtu[4]=n*(34729/80640+t*(-3418889/1995840)),n=n*t,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=n*(212378941/319334400);var i=pg(this.cbg,this.lat0);this.Zb=-this.Qn*(i+RH(this.gtu,2*i))}function PH(e){var t=Ie(e.x-this.long0),n=e.y;n=pg(this.cbg,n);var i=Math.sin(n),r=Math.cos(n),s=Math.sin(t),o=Math.cos(t);n=Math.atan2(i,o*r),t=Math.atan2(s*r,hi(i,r*o)),t=IH(Math.tan(t));var u=dT(this.gtu,2*n,2*t);n=n+u[0],t=t+u[1];var a,h;return Math.abs(t)<=2.623395162778?(a=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*n+this.Zb)+this.y0):(a=1/0,h=1/0),e.x=a,e.y=h,e}function NH(e){var t=(e.x-this.x0)*(1/this.a),n=(e.y-this.y0)*(1/this.a);n=(n-this.Zb)/this.Qn,t=t/this.Qn;var i,r;if(Math.abs(t)<=2.623395162778){var s=dT(this.utg,2*n,2*t);n=n+s[0],t=t+s[1],t=Math.atan(hT(t));var o=Math.sin(n),u=Math.cos(n),a=Math.sin(t),h=Math.cos(t);n=Math.atan2(o*h,hi(a,h*u)),t=Math.atan2(a,h*u),i=Ie(t+this.long0),r=pg(this.cgb,n)}else i=1/0,r=1/0;return e.x=i,e.y=r,e}var DH=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const $c={init:OH,forward:PH,inverse:NH,names:DH};function FH(e,t){if(e===void 0){if(e=Math.floor((Ie(t)+Math.PI)*30/Math.PI)+1,e<0)return 0;if(e>60)return 60}return e}var BH="etmerc";function HH(){var e=FH(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*sn,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,$c.init.apply(this),this.forward=$c.forward,this.inverse=$c.inverse}var UH=["Universal Transverse Mercator System","utm"];const zH={init:HH,names:UH,dependsOn:BH};function gg(e,t){return Math.pow((1-e)/(1+e),t)}var WH=20;function VH(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+at)/(Math.pow(Math.tan(.5*this.lat0+at),this.C)*gg(this.e*e,this.ratexp))}function jH(e){var t=e.x,n=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+at),this.C)*gg(this.e*Math.sin(n),this.ratexp))-we,e.x=this.C*t,e}function GH(e){for(var t=1e-14,n=e.x/this.C,i=e.y,r=Math.pow(Math.tan(.5*i+at)/this.K,1/this.C),s=WH;s>0&&(i=2*Math.atan(r*gg(this.e*Math.sin(e.y),-.5*this.e))-we,!(Math.abs(i-e.y)<t));--s)e.y=i;return s?(e.x=n,e.y=i,e):null}var qH=["gauss"];const mg={init:VH,forward:jH,inverse:GH,names:qH};function KH(){mg.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function YH(e){var t,n,i,r;return e.x=Ie(e.x-this.long0),mg.forward.apply(this,[e]),t=Math.sin(e.y),n=Math.cos(e.y),i=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*n*i),e.x=r*n*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*n*i),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function XH(e){var t,n,i,r,s;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,s=Math.sqrt(e.x*e.x+e.y*e.y)){var o=2*Math.atan2(s,this.R2);t=Math.sin(o),n=Math.cos(o),r=Math.asin(n*this.sinc0+e.y*t*this.cosc0/s),i=Math.atan2(e.x*t,s*this.cosc0*n-e.y*this.sinc0*t)}else r=this.phic0,i=0;return e.x=i,e.y=r,mg.inverse.apply(this,[e]),e.x=Ie(e.x+this.long0),e}var JH=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const QH={init:KH,forward:YH,inverse:XH,names:JH};function ZH(e,t,n){return t*=n,Math.tan(.5*(we+e))*Math.pow((1-t)/(1+t),.5*n)}function eU(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=xe&&(this.k0=.5*(1+El(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=xe&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=xe&&(this.k0=.5*this.cons*Ui(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/gi(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ui(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-we,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function tU(e){var t=e.x,n=e.y,i=Math.sin(n),r=Math.cos(n),s,o,u,a,h,c,l=Ie(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=xe&&Math.abs(n+this.lat0)<=xe?(e.x=NaN,e.y=NaN,e):this.sphere?(s=2*this.k0/(1+this.sinlat0*i+this.coslat0*r*Math.cos(l)),e.x=this.a*s*r*Math.sin(l)+this.x0,e.y=this.a*s*(this.coslat0*i-this.sinlat0*r*Math.cos(l))+this.y0,e):(o=2*Math.atan(this.ssfn_(n,i,this.e))-we,a=Math.cos(o),u=Math.sin(o),Math.abs(this.coslat0)<=xe?(h=gi(this.e,n*this.con,this.con*i),c=2*this.a*this.k0*h/this.cons,e.x=this.x0+c*Math.sin(t-this.long0),e.y=this.y0-this.con*c*Math.cos(t-this.long0),e):(Math.abs(this.sinlat0)<xe?(s=2*this.a*this.k0/(1+a*Math.cos(l)),e.y=s*u):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*u+this.cosX0*a*Math.cos(l))),e.y=s*(this.cosX0*u-this.sinX0*a*Math.cos(l))+this.y0),e.x=s*a*Math.sin(l)+this.x0,e))}function nU(e){e.x-=this.x0,e.y-=this.y0;var t,n,i,r,s,o=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var u=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,n=this.lat0,o<=xe?(e.x=t,e.y=n,e):(n=Math.asin(Math.cos(u)*this.sinlat0+e.y*Math.sin(u)*this.coslat0/o),Math.abs(this.coslat0)<xe?this.lat0>0?t=Ie(this.long0+Math.atan2(e.x,-1*e.y)):t=Ie(this.long0+Math.atan2(e.x,e.y)):t=Ie(this.long0+Math.atan2(e.x*Math.sin(u),o*this.coslat0*Math.cos(u)-e.y*this.sinlat0*Math.sin(u))),e.x=t,e.y=n,e)}else if(Math.abs(this.coslat0)<=xe){if(o<=xe)return n=this.lat0,t=this.long0,e.x=t,e.y=n,e;e.x*=this.con,e.y*=this.con,i=o*this.cons/(2*this.a*this.k0),n=this.con*al(this.e,i),t=this.con*Ie(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=xe?s=this.X0:(s=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/o),t=Ie(this.long0+Math.atan2(e.x*Math.sin(r),o*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),n=-1*al(this.e,Math.tan(.5*(we+s)));return e.x=t,e.y=n,e}var iU=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const rU={init:eU,forward:tU,inverse:nU,names:iU,ssfn_:ZH};function sU(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),n=this.a,i=this.rf,r=1/i,s=2*r-Math.pow(r,2),o=this.e=Math.sqrt(s);this.R=this.k0*n*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var u=Math.log(Math.tan(Math.PI/4+this.b0/2)),a=Math.log(Math.tan(Math.PI/4+e/2)),h=Math.log((1+o*t)/(1-o*t));this.K=u-this.alpha*a+this.alpha*o/2*h}function oU(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),i=-this.alpha*(t+n)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),s=this.alpha*(e.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(s))),u=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(s));return e.y=this.R/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))+this.y0,e.x=this.R*o+this.x0,e}function aU(e){for(var t=e.x-this.x0,n=e.y-this.y0,i=t/this.R,r=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),o=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),u=this.lambda0+o/this.alpha,a=0,h=s,c=-1e3,l=0;Math.abs(h-c)>1e-7;){if(++l>20)return;a=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),c=h,h=2*Math.atan(Math.exp(a))-Math.PI/2}return e.x=u,e.y=h,e}var lU=["somerc"];const cU={init:sU,forward:oU,inverse:aU,names:lU};var eo=1e-7;function uU(e){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],n=typeof e.PROJECTION=="object"?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||t.indexOf(n)!==-1}function hU(){var e,t,n,i,r,s,o,u,a,h,c=0,l,d=0,f=0,p=0,g=0,m=0,v=0;this.no_off=uU(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),y&&(v=this.alpha),S&&(c=this.rectified_grid_angle*sn),y||S)d=this.longc;else if(f=this.long1,g=this.lat1,p=this.long2,m=this.lat2,Math.abs(g-m)<=eo||(e=Math.abs(g))<=eo||Math.abs(e-we)<=eo||Math.abs(Math.abs(this.lat0)-we)<=eo||Math.abs(Math.abs(m)-we)<=eo)throw new Error;var _=1-this.es;t=Math.sqrt(_),Math.abs(this.lat0)>xe?(u=Math.sin(this.lat0),n=Math.cos(this.lat0),e=1-this.es*u*u,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/_),this.A=this.B*this.k0*t/e,i=this.B*t/(n*Math.sqrt(e)),r=i*i-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(gi(this.e,this.lat0,u),this.B)):(this.B=1/t,this.A=this.k0,this.E=i=r=1),y||S?(y?(l=Math.asin(Math.sin(v)/i),S||(c=v)):(l=c,v=Math.asin(i*Math.sin(l))),this.lam0=d-Math.asin(.5*(r-1/r)*Math.tan(l))/this.B):(s=Math.pow(gi(this.e,g,Math.sin(g)),this.B),o=Math.pow(gi(this.e,m,Math.sin(m)),this.B),r=this.E/s,a=(o-s)/(o+s),h=this.E*this.E,h=(h-o*s)/(h+o*s),e=f-p,e<-Math.pi?p-=sl:e>Math.pi&&(p+=sl),this.lam0=Ie(.5*(f+p)-Math.atan(h*Math.tan(.5*this.B*(f-p))/a)/this.B),l=Math.atan(2*Math.sin(this.B*Ie(f-this.lam0))/(r-1/r)),c=v=Math.asin(i*Math.sin(l))),this.singam=Math.sin(l),this.cosgam=Math.cos(l),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*l,this.v_pole_n=this.ArB*Math.log(Math.tan(at-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(at+r))}function dU(e){var t={},n,i,r,s,o,u,a,h;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-we)>xe){if(o=this.E/Math.pow(gi(this.e,e.y,Math.sin(e.y)),this.B),u=1/o,n=.5*(o-u),i=.5*(o+u),s=Math.sin(this.B*e.x),r=(n*this.singam-s*this.cosgam)/i,Math.abs(Math.abs(r)-1)<xe)throw new Error;h=.5*this.ArB*Math.log((1-r)/(1+r)),u=Math.cos(this.B*e.x),Math.abs(u)<eo?a=this.A*e.x:a=this.ArB*Math.atan2(n*this.cosgam+s*this.singam,u)}else h=e.y>0?this.v_pole_n:this.v_pole_s,a=this.ArB*e.y;return this.no_rot?(t.x=a,t.y=h):(a-=this.u_0,t.x=h*this.cosrot+a*this.sinrot,t.y=a*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function fU(e){var t,n,i,r,s,o,u,a={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(n=e.y,t=e.x):(n=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),i=Math.exp(-this.BrA*n),r=.5*(i-1/i),s=.5*(i+1/i),o=Math.sin(this.BrA*t),u=(o*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(u)-1)<xe)a.x=0,a.y=u<0?-we:we;else{if(a.y=this.E/Math.sqrt((1+u)/(1-u)),a.y=al(this.e,Math.pow(a.y,1/this.B)),a.y===1/0)throw new Error;a.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return a.x+=this.lam0,a}var pU=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const gU={init:hU,forward:dU,inverse:fU,names:pU};function mU(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<xe)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),n=Math.cos(this.lat1),i=Ui(this.e,t,n),r=gi(this.e,this.lat1,t),s=Math.sin(this.lat2),o=Math.cos(this.lat2),u=Ui(this.e,s,o),a=gi(this.e,this.lat2,s),h=gi(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>xe?this.ns=Math.log(i/u)/Math.log(r/a):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function vU(e){var t=e.x,n=e.y;Math.abs(2*Math.abs(n)-Math.PI)<=xe&&(n=El(n)*(we-2*xe));var i=Math.abs(Math.abs(n)-we),r,s;if(i>xe)r=gi(this.e,n,Math.sin(n)),s=this.a*this.f0*Math.pow(r,this.ns);else{if(i=n*this.ns,i<=0)return null;s=0}var o=this.ns*Ie(t-this.long0);return e.x=this.k0*(s*Math.sin(o))+this.x0,e.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,e}function yU(e){var t,n,i,r,s,o=(e.x-this.x0)/this.k0,u=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+u*u),n=1):(t=-Math.sqrt(o*o+u*u),n=-1);var a=0;if(t!==0&&(a=Math.atan2(n*o,n*u)),t!==0||this.ns>0){if(n=1/this.ns,i=Math.pow(t/(this.a*this.f0),n),r=al(this.e,i),r===-9999)return null}else r=-we;return s=Ie(a/this.ns+this.long0),e.x=s,e.y=r,e}var _U=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const bU={init:mU,forward:vU,inverse:yU,names:_U};function wU(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function SU(e){var t,n,i,r,s,o,u,a=e.x,h=e.y,c=Ie(a-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),i=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),s=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(r)),o=this.n*s,u=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=u*Math.cos(o)/1,e.x=u*Math.sin(o)/1,this.czech||(e.y*=-1,e.x*=-1),e}function TU(e){var t,n,i,r,s,o,u,a,h=e.x;e.x=e.y,e.y=h,this.czech||(e.y*=-1,e.x*=-1),o=Math.sqrt(e.x*e.x+e.y*e.y),s=Math.atan2(e.y,e.x),r=s/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),n=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(t)),e.x=this.long0-n/this.alfa,u=t,a=0;var c=0;do e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.e/2))-this.s45),Math.abs(u-e.y)<1e-10&&(a=1),u=e.y,c+=1;while(a===0&&c<15);return c>=15?null:e}var EU=["Krovak","krovak"];const AU={init:wU,forward:SU,inverse:TU,names:EU};function xn(e,t,n,i,r){return e*r-t*Math.sin(2*r)+n*Math.sin(4*r)-i*Math.sin(6*r)}function Al(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function Cl(e){return .375*e*(1+.25*e*(1+.46875*e))}function xl(e){return .05859375*e*e*(1+.75*e)}function Ml(e){return e*e*e*(35/3072)}function Ho(e,t,n){var i=t*n;return e/Math.sqrt(1-i*i)}function ea(e){return Math.abs(e)<we?e:e-El(e)*Math.PI}function pu(e,t,n,i,r){var s,o;s=e/t;for(var u=0;u<15;u++)if(o=(e-(t*s-n*Math.sin(2*s)+i*Math.sin(4*s)-r*Math.sin(6*s)))/(t-2*n*Math.cos(2*s)+4*i*Math.cos(4*s)-6*r*Math.cos(6*s)),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function CU(){this.sphere||(this.e0=Al(this.es),this.e1=Cl(this.es),this.e2=xl(this.es),this.e3=Ml(this.es),this.ml0=this.a*xn(this.e0,this.e1,this.e2,this.e3,this.lat0))}function xU(e){var t,n,i=e.x,r=e.y;if(i=Ie(i-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(i)),n=this.a*(Math.atan2(Math.tan(r),Math.cos(i))-this.lat0);else{var s=Math.sin(r),o=Math.cos(r),u=Ho(this.a,this.e,s),a=Math.tan(r)*Math.tan(r),h=i*Math.cos(r),c=h*h,l=this.es*o*o/(1-this.es),d=this.a*xn(this.e0,this.e1,this.e2,this.e3,r);t=u*h*(1-c*a*(1/6-(8-a+8*l)*c/120)),n=d-this.ml0+u*s/o*c*(.5+(5-a+6*l)*c/24)}return e.x=t+this.x0,e.y=n+this.y0,e}function MU(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,n=e.y/this.a,i,r;if(this.sphere){var s=n+this.lat0;i=Math.asin(Math.sin(s)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(s))}else{var o=this.ml0/this.a+n,u=pu(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(u)-we)<=xe)return e.x=this.long0,e.y=we,n<0&&(e.y*=-1),e;var a=Ho(this.a,this.e,Math.sin(u)),h=a*a*a/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(u),2),l=t*this.a/a,d=l*l;i=u-a*Math.tan(u)/h*l*l*(.5-(1+3*c)*l*l/24),r=l*(1-d*(c/3+(1+3*c)*c*d/15))/Math.cos(u)}return e.x=Ie(r+this.long0),e.y=ea(i),e}var kU=["Cassini","Cassini_Soldner","cass"];const $U={init:CU,forward:xU,inverse:MU,names:kU};function Ur(e,t){var n;return e>1e-7?(n=e*t,(1-e*e)*(t/(1-n*n)-.5/e*Math.log((1-n)/(1+n)))):2*t}var IU=1,RU=2,LU=3,OU=4;function PU(){var e=Math.abs(this.lat0);if(Math.abs(e-we)<xe?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<xe?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Ur(this.e,1),this.mmf=.5/(1-this.es),this.apa=VU(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Ur(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function NU(e){var t,n,i,r,s,o,u,a,h,c,l=e.x,d=e.y;if(l=Ie(l-this.long0),this.sphere){if(s=Math.sin(d),c=Math.cos(d),i=Math.cos(l),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n=this.mode===this.EQUIT?1+c*i:1+this.sinph0*s+this.cosph0*c*i,n<=xe)return null;n=Math.sqrt(2/n),t=n*c*Math.sin(l),n*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*c*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(d+this.lat0)<xe)return null;n=at-d*.5,n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)),t=n*Math.sin(l),n*=i}}else{switch(u=0,a=0,h=0,i=Math.cos(l),r=Math.sin(l),s=Math.sin(d),o=Ur(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(u=o/this.qp,a=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:h=1+this.sinb1*u+this.cosb1*a*i;break;case this.EQUIT:h=1+a*i;break;case this.N_POLE:h=we+d,o=this.qp-o;break;case this.S_POLE:h=d-we,o=this.qp+o;break}if(Math.abs(h)<xe)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?n=this.ymf*h*(this.cosb1*u-this.sinb1*a*i):n=(h=Math.sqrt(2/(1+a*i)))*u*this.ymf,t=this.xmf*h*a*r;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(h=Math.sqrt(o))*r,n=i*(this.mode===this.S_POLE?h:-h)):t=n=0;break}}return e.x=this.a*t+this.x0,e.y=this.a*n+this.y0,e}function DU(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,n=e.y/this.a,i,r,s,o,u,a,h;if(this.sphere){var c=0,l,d=0;if(l=Math.sqrt(t*t+n*n),r=l*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(r),c=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(l)<=xe?0:Math.asin(n*d/l),t*=d,n=c*l;break;case this.OBLIQ:r=Math.abs(l)<=xe?this.lat0:Math.asin(c*this.sinph0+n*d*this.cosph0/l),t*=d*this.cosph0,n=(c-Math.sin(r)*this.sinph0)*l;break;case this.N_POLE:n=-n,r=we-r;break;case this.S_POLE:r-=we;break}i=n===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,n)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,n*=this.dd,a=Math.sqrt(t*t+n*n),a<xe)return e.x=this.long0,e.y=this.lat0,e;o=2*Math.asin(.5*a/this.rq),s=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(h=s*this.sinb1+n*o*this.cosb1/a,u=this.qp*h,n=a*this.cosb1*s-n*this.sinb1*o):(h=n*o/a,u=this.qp*h,n=a*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),u=t*t+n*n,!u)return e.x=this.long0,e.y=this.lat0,e;h=1-u/this.qp,this.mode===this.S_POLE&&(h=-h)}i=Math.atan2(t,n),r=jU(Math.asin(h),this.apa)}return e.x=Ie(this.long0+i),e.y=r,e}var FU=.3333333333333333,BU=.17222222222222222,HU=.10257936507936508,UU=.06388888888888888,zU=.0664021164021164,WU=.016415012942191543;function VU(e){var t,n=[];return n[0]=e*FU,t=e*e,n[0]+=t*BU,n[1]=t*UU,t*=e,n[0]+=t*HU,n[1]+=t*zU,n[2]=t*WU,n}function jU(e,t){var n=e+e;return e+t[0]*Math.sin(n)+t[1]*Math.sin(n+n)+t[2]*Math.sin(n+n+n)}var GU=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const qU={init:PU,forward:NU,inverse:DU,names:GU,S_POLE:IU,N_POLE:RU,EQUIT:LU,OBLIQ:OU};function Kr(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function KU(){Math.abs(this.lat1+this.lat2)<xe||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ui(this.e3,this.sin_po,this.cos_po),this.qs1=Ur(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ui(this.e3,this.sin_po,this.cos_po),this.qs2=Ur(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ur(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>xe?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function YU(e){var t=e.x,n=e.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var i=Ur(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,s=this.ns0*Ie(t-this.long0),o=r*Math.sin(s)+this.x0,u=this.rh-r*Math.cos(s)+this.y0;return e.x=o,e.y=u,e}function XU(e){var t,n,i,r,s,o;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),i=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),i=-1),r=0,t!==0&&(r=Math.atan2(i*e.x,i*e.y)),i=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-i*i)/(2*this.ns0)):(n=(this.c-i*i)/this.ns0,o=this.phi1z(this.e3,n)),s=Ie(r/this.ns0+this.long0),e.x=s,e.y=o,e}function JU(e,t){var n,i,r,s,o,u=Kr(.5*t);if(e<xe)return u;for(var a=e*e,h=1;h<=25;h++)if(n=Math.sin(u),i=Math.cos(u),r=e*n,s=1-r*r,o=.5*s*s/i*(t/(1-a)-n/s+.5/e*Math.log((1-r)/(1+r))),u=u+o,Math.abs(o)<=1e-7)return u;return null}var QU=["Albers_Conic_Equal_Area","Albers","aea"];const ZU={init:KU,forward:YU,inverse:XU,names:QU,phi1z:JU};function ez(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function tz(e){var t,n,i,r,s,o,u,a,h=e.x,c=e.y;return i=Ie(h-this.long0),t=Math.sin(c),n=Math.cos(c),r=Math.cos(i),o=this.sin_p14*t+this.cos_p14*n*r,s=1,o>0||Math.abs(o)<=xe?(u=this.x0+this.a*s*n*Math.sin(i)/o,a=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*n*r)/o):(u=this.x0+this.infinity_dist*n*Math.sin(i),a=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*n*r)),e.x=u,e.y=a,e}function nz(e){var t,n,i,r,s,o;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),n=Math.sin(r),i=Math.cos(r),o=Kr(i*this.sin_p14+e.y*n*this.cos_p14/t),s=Math.atan2(e.x*n,t*this.cos_p14*i-e.y*this.sin_p14*n),s=Ie(this.long0+s)):(o=this.phic0,s=0),e.x=s,e.y=o,e}var iz=["gnom"];const rz={init:ez,forward:tz,inverse:nz,names:iz};function sz(e,t){var n=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-n)<1e-6)return t<0?-1*we:we;for(var i=Math.asin(.5*t),r,s,o,u,a=0;a<30;a++)if(s=Math.sin(i),o=Math.cos(i),u=e*s,r=Math.pow(1-u*u,2)/(2*o)*(t/(1-e*e)-s/(1-u*u)+.5/e*Math.log((1-u)/(1+u))),i+=r,Math.abs(r)<=1e-10)return i;return NaN}function oz(){this.sphere||(this.k0=Ui(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function az(e){var t=e.x,n=e.y,i,r,s=Ie(t-this.long0);if(this.sphere)i=this.x0+this.a*s*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var o=Ur(this.e,Math.sin(n));i=this.x0+this.a*this.k0*s,r=this.y0+this.a*o*.5/this.k0}return e.x=i,e.y=r,e}function lz(e){e.x-=this.x0,e.y-=this.y0;var t,n;return this.sphere?(t=Ie(this.long0+e.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(n=sz(this.e,2*e.y*this.k0/this.a),t=Ie(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=n,e}var cz=["cea"];const uz={init:oz,forward:az,inverse:lz,names:cz};function hz(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function dz(e){var t=e.x,n=e.y,i=Ie(t-this.long0),r=ea(n-this.lat0);return e.x=this.x0+this.a*i*this.rc,e.y=this.y0+this.a*r,e}function fz(e){var t=e.x,n=e.y;return e.x=Ie(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=ea(this.lat0+(n-this.y0)/this.a),e}var pz=["Equirectangular","Equidistant_Cylindrical","eqc"];const gz={init:hz,forward:dz,inverse:fz,names:pz};var m_=20;function mz(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Al(this.es),this.e1=Cl(this.es),this.e2=xl(this.es),this.e3=Ml(this.es),this.ml0=this.a*xn(this.e0,this.e1,this.e2,this.e3,this.lat0)}function vz(e){var t=e.x,n=e.y,i,r,s,o=Ie(t-this.long0);if(s=o*Math.sin(n),this.sphere)Math.abs(n)<=xe?(i=this.a*o,r=-1*this.a*this.lat0):(i=this.a*Math.sin(s)/Math.tan(n),r=this.a*(ea(n-this.lat0)+(1-Math.cos(s))/Math.tan(n)));else if(Math.abs(n)<=xe)i=this.a*o,r=-1*this.ml0;else{var u=Ho(this.a,this.e,Math.sin(n))/Math.tan(n);i=u*Math.sin(s),r=this.a*xn(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+u*(1-Math.cos(s))}return e.x=i+this.x0,e.y=r+this.y0,e}function yz(e){var t,n,i,r,s,o,u,a,h;if(i=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=xe)t=Ie(i/this.a+this.long0),n=0;else{o=this.lat0+r/this.a,u=i*i/this.a/this.a+o*o,a=o;var c;for(s=m_;s;--s)if(c=Math.tan(a),h=-1*(o*(a*c+1)-a-.5*(a*a+u)*c)/((a-o)/c-1),a+=h,Math.abs(h)<=xe){n=a;break}t=Ie(this.long0+Math.asin(i*Math.tan(a)/this.a)/Math.sin(n))}else if(Math.abs(r+this.ml0)<=xe)n=0,t=Ie(this.long0+i/this.a);else{o=(this.ml0+r)/this.a,u=i*i/this.a/this.a+o*o,a=o;var l,d,f,p,g;for(s=m_;s;--s)if(g=this.e*Math.sin(a),l=Math.sqrt(1-g*g)*Math.tan(a),d=this.a*xn(this.e0,this.e1,this.e2,this.e3,a),f=this.e0-2*this.e1*Math.cos(2*a)+4*this.e2*Math.cos(4*a)-6*this.e3*Math.cos(6*a),p=d/this.a,h=(o*(l*p+1)-p-.5*l*(p*p+u))/(this.es*Math.sin(2*a)*(p*p+u-2*o*p)/(4*l)+(o-p)*(l*f-2/Math.sin(2*a))-f),a-=h,Math.abs(h)<=xe){n=a;break}l=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),t=Ie(this.long0+Math.asin(i*l/this.a)/Math.sin(n))}return e.x=t,e.y=n,e}var _z=["Polyconic","poly"];const bz={init:mz,forward:vz,inverse:yz,names:_z};function wz(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Sz(e){var t,n=e.x,i=e.y,r=i-this.lat0,s=n-this.long0,o=r/Ha*1e-5,u=s,a=1,h=0;for(t=1;t<=10;t++)a=a*o,h=h+this.A[t]*a;var c=h,l=u,d=1,f=0,p,g,m=0,v=0;for(t=1;t<=6;t++)p=d*c-f*l,g=f*c+d*l,d=p,f=g,m=m+this.B_re[t]*d-this.B_im[t]*f,v=v+this.B_im[t]*d+this.B_re[t]*f;return e.x=v*this.a+this.x0,e.y=m*this.a+this.y0,e}function Tz(e){var t,n=e.x,i=e.y,r=n-this.x0,s=i-this.y0,o=s/this.a,u=r/this.a,a=1,h=0,c,l,d=0,f=0;for(t=1;t<=6;t++)c=a*o-h*u,l=h*o+a*u,a=c,h=l,d=d+this.C_re[t]*a-this.C_im[t]*h,f=f+this.C_im[t]*a+this.C_re[t]*h;for(var p=0;p<this.iterations;p++){var g=d,m=f,v,y,S=o,_=u;for(t=2;t<=6;t++)v=g*d-m*f,y=m*d+g*f,g=v,m=y,S=S+(t-1)*(this.B_re[t]*g-this.B_im[t]*m),_=_+(t-1)*(this.B_im[t]*g+this.B_re[t]*m);g=1,m=0;var w=this.B_re[1],b=this.B_im[1];for(t=2;t<=6;t++)v=g*d-m*f,y=m*d+g*f,g=v,m=y,w=w+t*(this.B_re[t]*g-this.B_im[t]*m),b=b+t*(this.B_im[t]*g+this.B_re[t]*m);var C=w*w+b*b;d=(S*w+_*b)/C,f=(_*w-S*b)/C}var M=d,R=f,T=1,A=0;for(t=1;t<=9;t++)T=T*M,A=A+this.D[t]*T;var P=this.lat0+A*Ha*1e5,I=this.long0+R;return e.x=I,e.y=P,e}var Ez=["New_Zealand_Map_Grid","nzmg"];const Az={init:wz,forward:Sz,inverse:Tz,names:Ez};function Cz(){}function xz(e){var t=e.x,n=e.y,i=Ie(t-this.long0),r=this.x0+this.a*i,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return e.x=r,e.y=s,e}function Mz(e){e.x-=this.x0,e.y-=this.y0;var t=Ie(this.long0+e.x/this.a),n=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=n,e}var kz=["Miller_Cylindrical","mill"];const $z={init:Cz,forward:xz,inverse:Mz,names:kz};var Iz=20;function Rz(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=cT(this.es)}function Lz(e){var t,n,i=e.x,r=e.y;if(i=Ie(i-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var s=this.n*Math.sin(r),o=Iz;o;--o){var u=(this.m*r+Math.sin(r)-s)/(this.m+Math.cos(r));if(r-=u,Math.abs(u)<xe)break}t=this.a*this.C_x*i*(this.m+Math.cos(r)),n=this.a*this.C_y*r}else{var a=Math.sin(r),h=Math.cos(r);n=this.a*oh(r,a,h,this.en),t=this.a*i*h/Math.sqrt(1-this.es*a*a)}return e.x=t,e.y=n,e}function Oz(e){var t,n,i,r;return e.x-=this.x0,i=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,i=i/(this.C_x*(this.m+Math.cos(t))),this.m?t=Kr((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Kr(Math.sin(t)/this.n)),i=Ie(i+this.long0),t=ea(t)):(t=uT(e.y/this.a,this.es,this.en),r=Math.abs(t),r<we?(r=Math.sin(t),n=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),i=Ie(n)):r-xe<we&&(i=this.long0)),e.x=i,e.y=t,e}var Pz=["Sinusoidal","sinu"];const Nz={init:Rz,forward:Lz,inverse:Oz,names:Pz};function Dz(){}function Fz(e){for(var t=e.x,n=e.y,i=Ie(t-this.long0),r=n,s=Math.PI*Math.sin(n);;){var o=-(r+Math.sin(r)-s)/(1+Math.cos(r));if(r+=o,Math.abs(o)<xe)break}r/=2,Math.PI/2-Math.abs(n)<xe&&(i=0);var u=.900316316158*this.a*i*Math.cos(r)+this.x0,a=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=u,e.y=a,e}function Bz(e){var t,n;e.x-=this.x0,e.y-=this.y0,n=e.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),t=Math.asin(n);var i=Ie(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),n=(2*t+Math.sin(2*t))/Math.PI,Math.abs(n)>1&&(n=1);var r=Math.asin(n);return e.x=i,e.y=r,e}var Hz=["Mollweide","moll"];const Uz={init:Dz,forward:Fz,inverse:Bz,names:Hz};function zz(){Math.abs(this.lat1+this.lat2)<xe||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Al(this.es),this.e1=Cl(this.es),this.e2=xl(this.es),this.e3=Ml(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ui(this.e,this.sinphi,this.cosphi),this.ml1=xn(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<xe?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ui(this.e,this.sinphi,this.cosphi),this.ml2=xn(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=xn(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Wz(e){var t=e.x,n=e.y,i;if(this.sphere)i=this.a*(this.g-n);else{var r=xn(this.e0,this.e1,this.e2,this.e3,n);i=this.a*(this.g-r)}var s=this.ns*Ie(t-this.long0),o=this.x0+i*Math.sin(s),u=this.y0+this.rh-i*Math.cos(s);return e.x=o,e.y=u,e}function Vz(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var t,n,i,r;this.ns>=0?(n=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(n=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var s=0;if(n!==0&&(s=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=Ie(this.long0+s/this.ns),i=ea(this.g-n/this.a),e.x=r,e.y=i,e;var o=this.g-n/this.a;return i=pu(o,this.e0,this.e1,this.e2,this.e3),r=Ie(this.long0+s/this.ns),e.x=r,e.y=i,e}var jz=["Equidistant_Conic","eqdc"];const Gz={init:zz,forward:Wz,inverse:Vz,names:jz};function qz(){this.R=this.a}function Kz(e){var t=e.x,n=e.y,i=Ie(t-this.long0),r,s;Math.abs(n)<=xe&&(r=this.x0+this.R*i,s=this.y0);var o=Kr(2*Math.abs(n/Math.PI));(Math.abs(i)<=xe||Math.abs(Math.abs(n)-we)<=xe)&&(r=this.x0,n>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*o):s=this.y0+Math.PI*this.R*-Math.tan(.5*o));var u=.5*Math.abs(Math.PI/i-i/Math.PI),a=u*u,h=Math.sin(o),c=Math.cos(o),l=c/(h+c-1),d=l*l,f=l*(2/h-1),p=f*f,g=Math.PI*this.R*(u*(l-p)+Math.sqrt(a*(l-p)*(l-p)-(p+a)*(d-p)))/(p+a);i<0&&(g=-g),r=this.x0+g;var m=a+l;return g=Math.PI*this.R*(f*m-u*Math.sqrt((p+a)*(a+1)-m*m))/(p+a),n>=0?s=this.y0+g:s=this.y0-g,e.x=r,e.y=s,e}function Yz(e){var t,n,i,r,s,o,u,a,h,c,l,d,f;return e.x-=this.x0,e.y-=this.y0,l=Math.PI*this.R,i=e.x/l,r=e.y/l,s=i*i+r*r,o=-Math.abs(r)*(1+s),u=o-2*r*r+i*i,a=-2*o+1+2*r*r+s*s,f=r*r/a+(2*u*u*u/a/a/a-9*o*u/a/a)/27,h=(o-u*u/3/a)/a,c=2*Math.sqrt(-h/3),l=3*f/h/c,Math.abs(l)>1&&(l>=0?l=1:l=-1),d=Math.acos(l)/3,e.y>=0?n=(-c*Math.cos(d+Math.PI/3)-u/3/a)*Math.PI:n=-(-c*Math.cos(d+Math.PI/3)-u/3/a)*Math.PI,Math.abs(i)<xe?t=this.long0:t=Ie(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(i*i-r*r)+s*s))/2/i),e.x=t,e.y=n,e}var Xz=["Van_der_Grinten_I","VanDerGrinten","vandg"];const Jz={init:qz,forward:Kz,inverse:Yz,names:Xz};function Qz(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function Zz(e){var t=e.x,n=e.y,i=Math.sin(e.y),r=Math.cos(e.y),s=Ie(t-this.long0),o,u,a,h,c,l,d,f,p,g,m,v,y,S,_,w,b,C,M,R,T,A,P;return this.sphere?Math.abs(this.sin_p12-1)<=xe?(e.x=this.x0+this.a*(we-n)*Math.sin(s),e.y=this.y0-this.a*(we-n)*Math.cos(s),e):Math.abs(this.sin_p12+1)<=xe?(e.x=this.x0+this.a*(we+n)*Math.sin(s),e.y=this.y0+this.a*(we+n)*Math.cos(s),e):(C=this.sin_p12*i+this.cos_p12*r*Math.cos(s),w=Math.acos(C),b=w?w/Math.sin(w):1,e.x=this.x0+this.a*b*r*Math.sin(s),e.y=this.y0+this.a*b*(this.cos_p12*i-this.sin_p12*r*Math.cos(s)),e):(o=Al(this.es),u=Cl(this.es),a=xl(this.es),h=Ml(this.es),Math.abs(this.sin_p12-1)<=xe?(c=this.a*xn(o,u,a,h,we),l=this.a*xn(o,u,a,h,n),e.x=this.x0+(c-l)*Math.sin(s),e.y=this.y0-(c-l)*Math.cos(s),e):Math.abs(this.sin_p12+1)<=xe?(c=this.a*xn(o,u,a,h,we),l=this.a*xn(o,u,a,h,n),e.x=this.x0+(c+l)*Math.sin(s),e.y=this.y0+(c+l)*Math.cos(s),e):(d=i/r,f=Ho(this.a,this.e,this.sin_p12),p=Ho(this.a,this.e,i),g=Math.atan((1-this.es)*d+this.es*f*this.sin_p12/(p*r)),m=Math.atan2(Math.sin(s),this.cos_p12*Math.tan(g)-this.sin_p12*Math.cos(s)),m===0?M=Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):Math.abs(Math.abs(m)-Math.PI)<=xe?M=-Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):M=Math.asin(Math.sin(s)*Math.cos(g)/Math.sin(m)),v=this.e*this.sin_p12/Math.sqrt(1-this.es),y=this.e*this.cos_p12*Math.cos(m)/Math.sqrt(1-this.es),S=v*y,_=y*y,R=M*M,T=R*M,A=T*M,P=A*M,w=f*M*(1-R*_*(1-_)/6+T/8*S*(1-2*_)+A/120*(_*(4-7*_)-3*v*v*(1-7*_))-P/48*S),e.x=this.x0+w*Math.sin(m),e.y=this.y0+w*Math.cos(m),e))}function eW(e){e.x-=this.x0,e.y-=this.y0;var t,n,i,r,s,o,u,a,h,c,l,d,f,p,g,m,v,y,S,_,w,b,C,M;return this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y),t>2*we*this.a?void 0:(n=t/this.a,i=Math.sin(n),r=Math.cos(n),s=this.long0,Math.abs(t)<=xe?o=this.lat0:(o=Kr(r*this.sin_p12+e.y*i*this.cos_p12/t),u=Math.abs(this.lat0)-we,Math.abs(u)<=xe?this.lat0>=0?s=Ie(this.long0+Math.atan2(e.x,-e.y)):s=Ie(this.long0-Math.atan2(-e.x,e.y)):s=Ie(this.long0+Math.atan2(e.x*i,t*this.cos_p12*r-e.y*this.sin_p12*i))),e.x=s,e.y=o,e)):(a=Al(this.es),h=Cl(this.es),c=xl(this.es),l=Ml(this.es),Math.abs(this.sin_p12-1)<=xe?(d=this.a*xn(a,h,c,l,we),t=Math.sqrt(e.x*e.x+e.y*e.y),f=d-t,o=pu(f/this.a,a,h,c,l),s=Ie(this.long0+Math.atan2(e.x,-1*e.y)),e.x=s,e.y=o,e):Math.abs(this.sin_p12+1)<=xe?(d=this.a*xn(a,h,c,l,we),t=Math.sqrt(e.x*e.x+e.y*e.y),f=t-d,o=pu(f/this.a,a,h,c,l),s=Ie(this.long0+Math.atan2(e.x,e.y)),e.x=s,e.y=o,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),m=Math.atan2(e.x,e.y),p=Ho(this.a,this.e,this.sin_p12),v=Math.cos(m),y=this.e*this.cos_p12*v,S=-y*y/(1-this.es),_=3*this.es*(1-S)*this.sin_p12*this.cos_p12*v/(1-this.es),w=t/p,b=w-S*(1+S)*Math.pow(w,3)/6-_*(1+3*S)*Math.pow(w,4)/24,C=1-S*b*b/2-w*b*b*b/6,g=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*v),s=Ie(this.long0+Math.asin(Math.sin(m)*Math.sin(b)/Math.cos(g))),M=Math.sin(g),o=Math.atan2((M-this.es*C*this.sin_p12)*Math.tan(g),M*(1-this.es)),e.x=s,e.y=o,e))}var tW=["Azimuthal_Equidistant","aeqd"];const nW={init:Qz,forward:Zz,inverse:eW,names:tW};function iW(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function rW(e){var t,n,i,r,s,o,u,a,h=e.x,c=e.y;return i=Ie(h-this.long0),t=Math.sin(c),n=Math.cos(c),r=Math.cos(i),o=this.sin_p14*t+this.cos_p14*n*r,s=1,(o>0||Math.abs(o)<=xe)&&(u=this.a*s*n*Math.sin(i),a=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*n*r)),e.x=u,e.y=a,e}function sW(e){var t,n,i,r,s,o,u;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),n=Kr(t/this.a),i=Math.sin(n),r=Math.cos(n),o=this.long0,Math.abs(t)<=xe?(u=this.lat0,e.x=o,e.y=u,e):(u=Kr(r*this.sin_p14+e.y*i*this.cos_p14/t),s=Math.abs(this.lat0)-we,Math.abs(s)<=xe?(this.lat0>=0?o=Ie(this.long0+Math.atan2(e.x,-e.y)):o=Ie(this.long0-Math.atan2(-e.x,e.y)),e.x=o,e.y=u,e):(o=Ie(this.long0+Math.atan2(e.x*i,t*this.cos_p14*r-e.y*this.sin_p14*i)),e.x=o,e.y=u,e))}var oW=["ortho"];const aW={init:iW,forward:rW,inverse:sW,names:oW};var $t={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},lt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function lW(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=we-at/2?this.face=$t.TOP:this.lat0<=-(we-at/2)?this.face=$t.BOTTOM:Math.abs(this.long0)<=at?this.face=$t.FRONT:Math.abs(this.long0)<=we+at?this.face=this.long0>0?$t.RIGHT:$t.LEFT:this.face=$t.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function cW(e){var t={x:0,y:0},n,i,r,s,o,u,a={value:0};if(e.x-=this.long0,this.es!==0?n=Math.atan(this.one_minus_f_squared*Math.tan(e.y)):n=e.y,i=e.x,this.face===$t.TOP)s=we-n,i>=at&&i<=we+at?(a.value=lt.AREA_0,r=i-we):i>we+at||i<=-(we+at)?(a.value=lt.AREA_1,r=i>0?i-Pt:i+Pt):i>-(we+at)&&i<=-at?(a.value=lt.AREA_2,r=i+we):(a.value=lt.AREA_3,r=i);else if(this.face===$t.BOTTOM)s=we+n,i>=at&&i<=we+at?(a.value=lt.AREA_0,r=-i+we):i<at&&i>=-at?(a.value=lt.AREA_1,r=-i):i<-at&&i>=-(we+at)?(a.value=lt.AREA_2,r=-i-we):(a.value=lt.AREA_3,r=i>0?-i+Pt:-i-Pt);else{var h,c,l,d,f,p,g;this.face===$t.RIGHT?i=Co(i,+we):this.face===$t.BACK?i=Co(i,+Pt):this.face===$t.LEFT&&(i=Co(i,-we)),d=Math.sin(n),f=Math.cos(n),p=Math.sin(i),g=Math.cos(i),h=f*g,c=f*p,l=d,this.face===$t.FRONT?(s=Math.acos(h),r=sc(s,l,c,a)):this.face===$t.RIGHT?(s=Math.acos(c),r=sc(s,l,-h,a)):this.face===$t.BACK?(s=Math.acos(-h),r=sc(s,l,-c,a)):this.face===$t.LEFT?(s=Math.acos(-c),r=sc(s,l,h,a)):(s=r=0,a.value=lt.AREA_0)}return u=Math.atan(12/Pt*(r+Math.acos(Math.sin(r)*Math.cos(at))-we)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(u)*Math.cos(u))/(1-Math.cos(Math.atan(1/Math.cos(r))))),a.value===lt.AREA_1?u+=we:a.value===lt.AREA_2?u+=Pt:a.value===lt.AREA_3&&(u+=1.5*Pt),t.x=o*Math.cos(u),t.y=o*Math.sin(u),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,e.x=t.x,e.y=t.y,e}function uW(e){var t={lam:0,phi:0},n,i,r,s,o,u,a,h,c,l={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),n=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?l.value=lt.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(l.value=lt.AREA_1,n-=we):e.x<0&&-e.x>=Math.abs(e.y)?(l.value=lt.AREA_2,n=n<0?n+Pt:n-Pt):(l.value=lt.AREA_3,n+=we),c=Pt/12*Math.tan(n),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),u=Math.atan(o),r=Math.cos(n),s=Math.tan(i),a=1-r*r*s*s*(1-Math.cos(Math.atan(1/Math.cos(u)))),a<-1?a=-1:a>1&&(a=1),this.face===$t.TOP)h=Math.acos(a),t.phi=we-h,l.value===lt.AREA_0?t.lam=u+we:l.value===lt.AREA_1?t.lam=u<0?u+Pt:u-Pt:l.value===lt.AREA_2?t.lam=u-we:t.lam=u;else if(this.face===$t.BOTTOM)h=Math.acos(a),t.phi=h-we,l.value===lt.AREA_0?t.lam=-u+we:l.value===lt.AREA_1?t.lam=-u:l.value===lt.AREA_2?t.lam=-u-we:t.lam=u<0?-u-Pt:-u+Pt;else{var d,f,p;d=a,c=d*d,c>=1?p=0:p=Math.sqrt(1-c)*Math.sin(u),c+=p*p,c>=1?f=0:f=Math.sqrt(1-c),l.value===lt.AREA_1?(c=f,f=-p,p=c):l.value===lt.AREA_2?(f=-f,p=-p):l.value===lt.AREA_3&&(c=f,f=p,p=-c),this.face===$t.RIGHT?(c=d,d=-f,f=c):this.face===$t.BACK?(d=-d,f=-f):this.face===$t.LEFT&&(c=d,d=f,f=-c),t.phi=Math.acos(-p)-we,t.lam=Math.atan2(f,d),this.face===$t.RIGHT?t.lam=Co(t.lam,-we):this.face===$t.BACK?t.lam=Co(t.lam,-Pt):this.face===$t.LEFT&&(t.lam=Co(t.lam,+we))}if(this.es!==0){var g,m,v;g=t.phi<0?1:0,m=Math.tan(t.phi),v=this.b/Math.sqrt(m*m+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),g&&(t.phi=-t.phi)}return t.lam+=this.long0,e.x=t.lam,e.y=t.phi,e}function sc(e,t,n,i){var r;return e<xe?(i.value=lt.AREA_0,r=0):(r=Math.atan2(t,n),Math.abs(r)<=at?i.value=lt.AREA_0:r>at&&r<=we+at?(i.value=lt.AREA_1,r-=we):r>we+at||r<=-(we+at)?(i.value=lt.AREA_2,r=r>=0?r-Pt:r+Pt):(i.value=lt.AREA_3,r+=we)),r}function Co(e,t){var n=e+t;return n<-Pt?n+=sl:n>+Pt&&(n-=sl),n}var hW=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const dW={init:lW,forward:cW,inverse:uW,names:hW};var xf=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ca=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],fT=.8487,pT=1.3523,gT=Li/5,fW=1/gT,ho=18,gu=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},pW=function(e,t){return e[1]+t*(2*e[2]+t*3*e[3])};function gW(e,t,n,i){for(var r=t;i;--i){var s=e(r);if(r-=s,Math.abs(s)<n)break}return r}function mW(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function vW(e){var t=Ie(e.x-this.long0),n=Math.abs(e.y),i=Math.floor(n*gT);i<0?i=0:i>=ho&&(i=ho-1),n=Li*(n-fW*i);var r={x:gu(xf[i],n)*t,y:gu(Ca[i],n)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*fT+this.x0,r.y=r.y*this.a*pT+this.y0,r}function yW(e){var t={x:(e.x-this.x0)/(this.a*fT),y:Math.abs(e.y-this.y0)/(this.a*pT)};if(t.y>=1)t.x/=xf[ho][0],t.y=e.y<0?-we:we;else{var n=Math.floor(t.y*ho);for(n<0?n=0:n>=ho&&(n=ho-1);;)if(Ca[n][0]>t.y)--n;else if(Ca[n+1][0]<=t.y)++n;else break;var i=Ca[n],r=5*(t.y-i[0])/(Ca[n+1][0]-i[0]);r=gW(function(s){return(gu(i,s)-t.y)/pW(i,s)},r,xe,100),t.x/=gu(xf[n],r),t.y=(5*n+r)*sn,e.y<0&&(t.y=-t.y)}return t.x=Ie(t.x+this.long0),t}var _W=["Robinson","robin"];const bW={init:mW,forward:vW,inverse:yW,names:_W};function wW(){this.name="geocent"}function SW(e){var t=eT(e,this.es,this.a);return t}function TW(e){var t=tT(e,this.es,this.a,this.b);return t}var EW=["Geocentric","geocentric","geocent","Geocent"];const AW={init:wW,forward:SW,inverse:TW,names:EW};var un={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},da={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function CW(){if(Object.keys(da).forEach(function(n){if(typeof this[n]>"u")this[n]=da[n].def;else{if(da[n].num&&isNaN(this[n]))throw new Error("Invalid parameter value, must be numeric "+n+" = "+this[n]);da[n].num&&(this[n]=parseFloat(this[n]))}da[n].degrees&&(this[n]=this[n]*sn)}.bind(this)),Math.abs(Math.abs(this.lat0)-we)<xe?this.mode=this.lat0<0?un.S_POLE:un.N_POLE:Math.abs(this.lat0)<xe?this.mode=un.EQUIT:(this.mode=un.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function xW(e){e.x-=this.long0;var t=Math.sin(e.y),n=Math.cos(e.y),i=Math.cos(e.x),r,s;switch(this.mode){case un.OBLIQ:s=this.sinph0*t+this.cosph0*n*i;break;case un.EQUIT:s=n*i;break;case un.S_POLE:s=-t;break;case un.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),r=s*n*Math.sin(e.x),this.mode){case un.OBLIQ:s*=this.cosph0*t-this.sinph0*n*i;break;case un.EQUIT:s*=t;break;case un.N_POLE:s*=-(n*i);break;case un.S_POLE:s*=n*i;break}var o,u;return o=s*this.cg+r*this.sg,u=1/(o*this.sw*this.h1+this.cw),r=(r*this.cg-s*this.sg)*this.cw*u,s=o*u,e.x=r*this.a,e.y=s*this.a,e}function MW(e){e.x/=this.a,e.y/=this.a;var t={x:e.x,y:e.y},n,i,r;r=1/(this.pn1-e.y*this.sw),n=this.pn1*e.x*r,i=this.pn1*e.y*this.cw*r,e.x=n*this.cg+i*this.sg,e.y=i*this.cg-n*this.sg;var s=hi(e.x,e.y);if(Math.abs(s)<xe)t.x=0,t.y=e.y;else{var o,u;switch(u=1-s*s*this.pfact,u=(this.p-Math.sqrt(u))/(this.pn1/s+s/this.pn1),o=Math.sqrt(1-u*u),this.mode){case un.OBLIQ:t.y=Math.asin(o*this.sinph0+e.y*u*this.cosph0/s),e.y=(o-this.sinph0*Math.sin(t.y))*s,e.x*=u*this.cosph0;break;case un.EQUIT:t.y=Math.asin(e.y*u/s),e.y=o*s,e.x*=u;break;case un.N_POLE:t.y=Math.asin(o),e.y=-e.y;break;case un.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(e.x,e.y)}return e.x=t.x+this.long0,e.y=t.y,e}var kW=["Tilted_Perspective","tpers"];const $W={init:CW,forward:xW,inverse:MW,names:kW};function IW(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function RW(e){var t=e.x,n=e.y,i,r,s,o;if(t=t-this.long0,this.shape==="ellipse"){n=Math.atan(this.radius_p2*Math.tan(n));var u=this.radius_p/hi(this.radius_p*Math.cos(n),Math.sin(n));if(r=u*Math.cos(t)*Math.cos(n),s=u*Math.sin(t)*Math.cos(n),o=u*Math.sin(n),(this.radius_g-r)*r-s*s-o*o*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;i=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(s/hi(o,i)),e.y=this.radius_g_1*Math.atan(o/i)):(e.x=this.radius_g_1*Math.atan(s/i),e.y=this.radius_g_1*Math.atan(o/hi(s,i)))}else this.shape==="sphere"&&(i=Math.cos(n),r=Math.cos(t)*i,s=Math.sin(t)*i,o=Math.sin(n),i=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(s/hi(o,i)),e.y=this.radius_g_1*Math.atan(o/i)):(e.x=this.radius_g_1*Math.atan(s/i),e.y=this.radius_g_1*Math.atan(o/hi(s,i))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function LW(e){var t=-1,n=0,i=0,r,s,o,u;if(e.x=e.x/this.a,e.y=e.y/this.a,this.shape==="ellipse"){this.flip_axis?(i=Math.tan(e.y/this.radius_g_1),n=Math.tan(e.x/this.radius_g_1)*hi(1,i)):(n=Math.tan(e.x/this.radius_g_1),i=Math.tan(e.y/this.radius_g_1)*hi(1,n));var a=i/this.radius_p;if(r=n*n+a*a+t*t,s=2*this.radius_g*t,o=s*s-4*r*this.C,o<0)return e.x=Number.NaN,e.y=Number.NaN,e;u=(-s-Math.sqrt(o))/(2*r),t=this.radius_g+u*t,n*=u,i*=u,e.x=Math.atan2(n,t),e.y=Math.atan(i*Math.cos(e.x)/t),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if(this.shape==="sphere"){if(this.flip_axis?(i=Math.tan(e.y/this.radius_g_1),n=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+i*i)):(n=Math.tan(e.x/this.radius_g_1),i=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+n*n)),r=n*n+i*i+t*t,s=2*this.radius_g*t,o=s*s-4*r*this.C,o<0)return e.x=Number.NaN,e.y=Number.NaN,e;u=(-s-Math.sqrt(o))/(2*r),t=this.radius_g+u*t,n*=u,i*=u,e.x=Math.atan2(n,t),e.y=Math.atan(i*Math.cos(e.x)/t)}return e.x=e.x+this.long0,e}var OW=["Geostationary Satellite View","Geostationary_Satellite","geos"];const PW={init:IW,forward:RW,inverse:LW,names:OW};function NW(e){e.Proj.projections.add(kc),e.Proj.projections.add($c),e.Proj.projections.add(zH),e.Proj.projections.add(QH),e.Proj.projections.add(rU),e.Proj.projections.add(cU),e.Proj.projections.add(gU),e.Proj.projections.add(bU),e.Proj.projections.add(AU),e.Proj.projections.add($U),e.Proj.projections.add(qU),e.Proj.projections.add(ZU),e.Proj.projections.add(rz),e.Proj.projections.add(uz),e.Proj.projections.add(gz),e.Proj.projections.add(bz),e.Proj.projections.add(Az),e.Proj.projections.add($z),e.Proj.projections.add(Nz),e.Proj.projections.add(Uz),e.Proj.projections.add(Gz),e.Proj.projections.add(Jz),e.Proj.projections.add(nW),e.Proj.projections.add(aW),e.Proj.projections.add(dW),e.Proj.projections.add(bW),e.Proj.projections.add(AW),e.Proj.projections.add($W),e.Proj.projections.add(PW)}Dn.defaultDatum="WGS84";Dn.Proj=Di;Dn.WGS84=new Dn.Proj("WGS84");Dn.Point=Bo;Dn.toPoint=nT;Dn.defs=bn;Dn.nadgrid=V3;Dn.transform=fu;Dn.mgrs=oH;Dn.version="__VERSION__";NW(Dn);function mu(e,t=0){let n;return(...i)=>{const r=()=>e(...i);n&&clearTimeout(n),n=setTimeout(r,t)}}function DW(e,t=0){let n=null,i=null;return(...r)=>{i=r,n||(n=setTimeout(()=>{e(...i),n=null},t))}}function Ic(e,t=0){const n=10**t;return Math.round(parseFloat(e)*n)/n}function FW(){return navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language}function gd(e,t={}){return new Intl.NumberFormat(FW(),t).format(e)}function BW(e){return!!(e&&typeof e=="object"&&e.constructor===Object)}function HW(e){return!!(e&&Array.isArray(e))}const UW=e=>Number.isFinite(parseFloat(e));function zW(e=0){return new Promise(t=>setTimeout(()=>t(),e))}const mT=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),vT=(e=1e3,t=9999)=>Math.round(Math.random()*(t-e)+e);function FZ(e){const{resource_amount:t,cost_per_resource_amount:n,resource_name:i}=e;if(!parseFloat(n))return"free";const r=(o,u)=>{if(u==="compute_area")return o/1e6;if(o<1e6)return o;const a=o/1e6;return a===1?"million":`${a} million`},s={compute_point_count:"points",compute_execution_time:"seconds",compute_area:"km2"};return`${n} processing units per
                 ${r(t,i)}
                    ${s[i]??i}`}function BZ(e,t){const n=t.match(/\(([^()]+)\)/)[1].split(",").map(r=>r.trim().split(" ").map(Number));let i=!1;for(let r=0,s=n.length-1;r<n.length;s=r++){const o=n[r][0],u=n[r][1],a=n[s][0],h=n[s][1];u>e.y!=h>e.y&&e.x<(a-o)*(e.y-u)/(h-u)+o&&(i=!i)}return i}function yT(e,t){const n={...e};for(const i in t)typeof t[i]=="object"&&!Array.isArray(t[i])?n[i]=yT(e[i]||{},t[i]):n[i]=t[i];return n}function HZ(e,t="gb"){if(!UW(e))return"/";let n=1;t==="gb"&&(n=1024),t==="kb"&&(n=1/1024),t==="b"&&(n=1/(1024*1024));const i=e*n;if(i>100)return`${gd(Ic(i/1024,2))} GB`;const r=i*1024;return r>100?`${gd(Ic(i,2))} MB`:`${gd(Ic(r,2))} KB`}function UZ(e){const t=/PROJCS\["([^"]*)/,n=/GEOGCS\["([^"]*)/,i=/DATUM\["([^"]*)/,{srid:r,auth_name:s,proj4text:o,srtext:u}=e,a=Dn(o);let h=u.match(t);return h||(h=u.match(n)),h||(h=u.match(i)),h=h[1],`${h} [${a.oProj.units??"/"}] - ${s}:${r}`}function zZ(e){const{proj4text:t}=e;return Dn(t).oProj.units}class WW{constructor(){Ta.interceptors.request.use(t=>(t.method==="get"&&t.params?.decorators&&(t.params.decorators=HW(t.params.decorators)?t.params.decorators.toString(","):t.params.decorators),t),t=>Promise.reject(t)),Ta.interceptors.response.use(t=>t,async t=>{const{response:n}=t;throw n.status===503&&n?.data?.error_key==="maintenance"?(Or.push({name:"maintenance"}),t):n.status===412?(Or.push({name:"terms-of-use",params:{userId:n.data.user_id,organizationId:n.data.organization_id}}),t):n.status===403&&n.data.error_key==="acl-permission-denied"?(Wn.dispatch("Notifications/displayToastNotification",{msg:n.data.message,type:"error",timeout:6e4}),t):(n.status===401&&(Wn.dispatch("Auth/logout"),n.request.responseURL.includes("oauth/me")||Or.push({name:"login",query:{redirect:Or.currentRoute.value.fullPath}})),n)})}request(t,n={},i=!1){const r=window.ENV_VARS.API_URL,{headers:s={},...o}=n,u={data:null,params:null,type:"POST",headers:{"X-Requested-With":"XMLHttpRequest",...s},contentType:"json",...o};u.type.toLowerCase()==="get"&&Object.keys(u.data||{}).length&&(console.warn('[ajax.js] prefer using "params" over "data" option for GET requests'),u.params={...u.data,...u.params});const a={headers:u.headers,params:u.params,method:u.type,responseType:u.responseType},h=u.type.toLowerCase(),c=i?t:r+t;return["get"].includes(h)&&u.data!==null?console.warn("GET request should have parameters in param and not in data"):["post","put","patch"].includes(h)&&u.params!==null&&console.warn("POST, PUT and PATCH request should have parameters in data and not in params"),["post","put","patch"].includes(h)?Ta[u.type.toLowerCase()](c,u.data,a):Ta[u.type.toLowerCase()](c,a)}}const Q=new WW;class qi{static getModels(t){return Q.request("/ai-models",{type:"GET",params:t})}static getPublicModels(){return Q.request("/public/ai-models",{type:"GET"})}static getModelsAdmin(t){return Q.request("/admin/ai-models",{type:"GET",params:t})}static getModel(t,n){return Q.request(`/ai-models/${t}`,{type:"GET",params:n})}static createAiModel(t){return Q.request("/ai-models",{type:"POST",data:t})}static updateAiModel(t,n){return Q.request(`/ai-models/${t}`,{type:"PUT",data:n})}static deleteAiModel(t){return Q.request(`/ai-models/${t}`,{type:"DELETE"})}static saveAiModelSemanticClassesPrices(t,n){return Q.request(`/ai-models/${t}/ai-models-semantic-classes-prices`,{type:"POST",data:n})}static getDynamicPriceList(t,n){return Q.request(`/ai-models/${t}/dynamic-price-list`,{type:"POST",data:n})}static getDynamicPriceListPublic(t,n){return Q.request(`/public/ai-models/${t}/dynamic-price-list`,{type:"POST",data:n})}}const ze={flow:{flow_nodes:"flow_nodes",flow_nodes_decrypted:"flow_nodes_decrypted",flow_nodes_with_options:"flow_nodes_with_options",flow_edges:"flow_edges",flow_details:"flow_details",tags:"tags"},flow_executions:{flow:"flow",node_executions_billed_processing_units:"node_executions_billed_processing_units",cost:"cost"},dataset:{user:"user",datasource:"datasource",pointcloudDataset:"pointcloudDataset",imageDataset:"imageDataset",vectorDataset:"vectorDataset",userFeedback:"user_feedback",tags:"tags",organization:"organization",pointclouds:"pointclouds"},project:{user:"user",datasets:"datasets",flows:"flows"},session:{user:"user",input_ai_model:"input_ai_model",training_dataset:"training_dataset",validation_dataset:"validation_dataset"},ai_model:{user:"user",ai_training_session:"ai_training_session",semantic_classes_prices:"semantic_classes_prices"},organization:{billing_bundle:"billing_bundle",billing_bundle_limits:"billing_bundle_limits",billing_information:"billing_information",billing_periods:"billing_periods",active_billing_subscription_orders:"active_billing_subscription_orders",cli_licenses:"cli_licenses",cli_stats:"cli_stats",cli_consumption:"cli_consumption"},billing:{billing_bundle_limits:"billing_bundle_limits",billing_bundle_price:"billing_bundle_price"},billing_order:{organization:"organization",payments:"payments"}};/*!
  * shared v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */const vu=typeof window<"u",fr=(e,t=!1)=>t?Symbol.for(e):Symbol(e),VW=(e,t,n)=>jW({l:e,k:t,s:n}),jW=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),qt=e=>typeof e=="number"&&isFinite(e),GW=e=>bT(e)==="[object Date]",Yr=e=>bT(e)==="[object RegExp]",ah=e=>We(e)&&Object.keys(e).length===0,an=Object.assign;let v_;const nr=()=>v_||(v_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function y_(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const qW=Object.prototype.hasOwnProperty;function yu(e,t){return qW.call(e,t)}const xt=Array.isArray,St=e=>typeof e=="function",Me=e=>typeof e=="string",Je=e=>typeof e=="boolean",ct=e=>e!==null&&typeof e=="object",KW=e=>ct(e)&&St(e.then)&&St(e.catch),_T=Object.prototype.toString,bT=e=>_T.call(e),We=e=>{if(!ct(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},YW=e=>e==null?"":xt(e)||We(e)&&e.toString===_T?JSON.stringify(e,null,2):String(e);function XW(e,t=""){return e.reduce((n,i,r)=>r===0?n+i:n+t+i,"")}function vg(e){let t=e;return()=>++t}function JW(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const oc=e=>!ct(e)||xt(e);function Rc(e,t){if(oc(e)||oc(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:i,des:r}=n.pop();Object.keys(i).forEach(s=>{oc(i[s])||oc(r[s])?r[s]=i[s]:n.push({src:i[s],des:r[s]})})}}/*!
  * message-compiler v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */function QW(e,t,n){return{line:e,column:t,offset:n}}function Mf(e,t,n){const i={start:e,end:t};return n!=null&&(i.source=n),i}const ZW=/\{([0-9a-zA-Z]+)\}/g;function e4(e,...t){return t.length===1&&t4(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(ZW,(n,i)=>t.hasOwnProperty(i)?t[i]:"")}const wT=Object.assign,__=e=>typeof e=="string",t4=e=>e!==null&&typeof e=="object";function ST(e,t=""){return e.reduce((n,i,r)=>r===0?n+i:n+t+i,"")}const He={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},n4={[He.EXPECTED_TOKEN]:"Expected token: '{0}'",[He.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[He.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[He.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[He.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[He.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[He.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[He.EMPTY_PLACEHOLDER]:"Empty placeholder",[He.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[He.INVALID_LINKED_FORMAT]:"Invalid linked format",[He.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[He.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[He.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[He.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[He.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[He.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function ta(e,t,n={}){const{domain:i,messages:r,args:s}=n,o=e4((r||n4)[e]||"",...s||[]),u=new SyntaxError(String(o));return u.code=e,t&&(u.location=t),u.domain=i,u}function i4(e){throw e}const Ki=" ",r4="\r",_n=`
`,s4=String.fromCharCode(8232),o4=String.fromCharCode(8233);function a4(e){const t=e;let n=0,i=1,r=1,s=0;const o=C=>t[C]===r4&&t[C+1]===_n,u=C=>t[C]===_n,a=C=>t[C]===o4,h=C=>t[C]===s4,c=C=>o(C)||u(C)||a(C)||h(C),l=()=>n,d=()=>i,f=()=>r,p=()=>s,g=C=>o(C)||a(C)||h(C)?_n:t[C],m=()=>g(n),v=()=>g(n+s);function y(){return s=0,c(n)&&(i++,r=0),o(n)&&n++,n++,r++,t[n]}function S(){return o(n+s)&&s++,s++,t[n+s]}function _(){n=0,i=1,r=1,s=0}function w(C=0){s=C}function b(){const C=n+s;for(;C!==n;)y();s=0}return{index:l,line:d,column:f,peekOffset:p,charAt:g,currentChar:m,currentPeek:v,next:y,peek:S,reset:_,resetPeek:w,skipToPeek:b}}const yr=void 0,l4=".",b_="'",c4="tokenizer";function u4(e,t={}){const n=t.location!==!1,i=a4(e),r=()=>i.index(),s=()=>QW(i.line(),i.column(),i.index()),o=s(),u=r(),a={currentType:14,offset:u,startLoc:o,endLoc:o,lastType:14,lastOffset:u,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},h=()=>a,{onError:c}=t;function l(F,N,W,...ee){const re=h();if(N.column+=W,N.offset+=W,c){const ce=n?Mf(re.startLoc,N):null,fe=ta(F,ce,{domain:c4,args:ee});c(fe)}}function d(F,N,W){F.endLoc=s(),F.currentType=N;const ee={type:N};return n&&(ee.loc=Mf(F.startLoc,F.endLoc)),W!=null&&(ee.value=W),ee}const f=F=>d(F,14);function p(F,N){return F.currentChar()===N?(F.next(),N):(l(He.EXPECTED_TOKEN,s(),0,N),"")}function g(F){let N="";for(;F.currentPeek()===Ki||F.currentPeek()===_n;)N+=F.currentPeek(),F.peek();return N}function m(F){const N=g(F);return F.skipToPeek(),N}function v(F){if(F===yr)return!1;const N=F.charCodeAt(0);return N>=97&&N<=122||N>=65&&N<=90||N===95}function y(F){if(F===yr)return!1;const N=F.charCodeAt(0);return N>=48&&N<=57}function S(F,N){const{currentType:W}=N;if(W!==2)return!1;g(F);const ee=v(F.currentPeek());return F.resetPeek(),ee}function _(F,N){const{currentType:W}=N;if(W!==2)return!1;g(F);const ee=F.currentPeek()==="-"?F.peek():F.currentPeek(),re=y(ee);return F.resetPeek(),re}function w(F,N){const{currentType:W}=N;if(W!==2)return!1;g(F);const ee=F.currentPeek()===b_;return F.resetPeek(),ee}function b(F,N){const{currentType:W}=N;if(W!==8)return!1;g(F);const ee=F.currentPeek()===".";return F.resetPeek(),ee}function C(F,N){const{currentType:W}=N;if(W!==9)return!1;g(F);const ee=v(F.currentPeek());return F.resetPeek(),ee}function M(F,N){const{currentType:W}=N;if(!(W===8||W===12))return!1;g(F);const ee=F.currentPeek()===":";return F.resetPeek(),ee}function R(F,N){const{currentType:W}=N;if(W!==10)return!1;const ee=()=>{const ce=F.currentPeek();return ce==="{"?v(F.peek()):ce==="@"||ce==="%"||ce==="|"||ce===":"||ce==="."||ce===Ki||!ce?!1:ce===_n?(F.peek(),ee()):v(ce)},re=ee();return F.resetPeek(),re}function T(F){g(F);const N=F.currentPeek()==="|";return F.resetPeek(),N}function A(F){const N=g(F),W=F.currentPeek()==="%"&&F.peek()==="{";return F.resetPeek(),{isModulo:W,hasSpace:N.length>0}}function P(F,N=!0){const W=(re=!1,ce="",fe=!1)=>{const ye=F.currentPeek();return ye==="{"?ce==="%"?!1:re:ye==="@"||!ye?ce==="%"?!0:re:ye==="%"?(F.peek(),W(re,"%",!0)):ye==="|"?ce==="%"||fe?!0:!(ce===Ki||ce===_n):ye===Ki?(F.peek(),W(!0,Ki,fe)):ye===_n?(F.peek(),W(!0,_n,fe)):!0},ee=W();return N&&F.resetPeek(),ee}function I(F,N){const W=F.currentChar();return W===yr?yr:N(W)?(F.next(),W):null}function E(F){return I(F,W=>{const ee=W.charCodeAt(0);return ee>=97&&ee<=122||ee>=65&&ee<=90||ee>=48&&ee<=57||ee===95||ee===36})}function L(F){return I(F,W=>{const ee=W.charCodeAt(0);return ee>=48&&ee<=57})}function O(F){return I(F,W=>{const ee=W.charCodeAt(0);return ee>=48&&ee<=57||ee>=65&&ee<=70||ee>=97&&ee<=102})}function B(F){let N="",W="";for(;N=L(F);)W+=N;return W}function U(F){m(F);const N=F.currentChar();return N!=="%"&&l(He.EXPECTED_TOKEN,s(),0,N),F.next(),"%"}function z(F){let N="";for(;;){const W=F.currentChar();if(W==="{"||W==="}"||W==="@"||W==="|"||!W)break;if(W==="%")if(P(F))N+=W,F.next();else break;else if(W===Ki||W===_n)if(P(F))N+=W,F.next();else{if(T(F))break;N+=W,F.next()}else N+=W,F.next()}return N}function j(F){m(F);let N="",W="";for(;N=E(F);)W+=N;return F.currentChar()===yr&&l(He.UNTERMINATED_CLOSING_BRACE,s(),0),W}function q(F){m(F);let N="";return F.currentChar()==="-"?(F.next(),N+=`-${B(F)}`):N+=B(F),F.currentChar()===yr&&l(He.UNTERMINATED_CLOSING_BRACE,s(),0),N}function ne(F){m(F),p(F,"'");let N="",W="";const ee=ce=>ce!==b_&&ce!==_n;for(;N=I(F,ee);)N==="\\"?W+=G(F):W+=N;const re=F.currentChar();return re===_n||re===yr?(l(He.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),re===_n&&(F.next(),p(F,"'")),W):(p(F,"'"),W)}function G(F){const N=F.currentChar();switch(N){case"\\":case"'":return F.next(),`\\${N}`;case"u":return X(F,N,4);case"U":return X(F,N,6);default:return l(He.UNKNOWN_ESCAPE_SEQUENCE,s(),0,N),""}}function X(F,N,W){p(F,N);let ee="";for(let re=0;re<W;re++){const ce=O(F);if(!ce){l(He.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${N}${ee}${F.currentChar()}`);break}ee+=ce}return`\\${N}${ee}`}function ie(F){m(F);let N="",W="";const ee=re=>re!=="{"&&re!=="}"&&re!==Ki&&re!==_n;for(;N=I(F,ee);)W+=N;return W}function le(F){let N="",W="";for(;N=E(F);)W+=N;return W}function Y(F){const N=(W=!1,ee)=>{const re=F.currentChar();return re==="{"||re==="%"||re==="@"||re==="|"||re==="("||re===")"||!re||re===Ki?ee:re===_n||re===l4?(ee+=re,F.next(),N(W,ee)):(ee+=re,F.next(),N(!0,ee))};return N(!1,"")}function J(F){m(F);const N=p(F,"|");return m(F),N}function te(F,N){let W=null;switch(F.currentChar()){case"{":return N.braceNest>=1&&l(He.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),F.next(),W=d(N,2,"{"),m(F),N.braceNest++,W;case"}":return N.braceNest>0&&N.currentType===2&&l(He.EMPTY_PLACEHOLDER,s(),0),F.next(),W=d(N,3,"}"),N.braceNest--,N.braceNest>0&&m(F),N.inLinked&&N.braceNest===0&&(N.inLinked=!1),W;case"@":return N.braceNest>0&&l(He.UNTERMINATED_CLOSING_BRACE,s(),0),W=ue(F,N)||f(N),N.braceNest=0,W;default:let re=!0,ce=!0,fe=!0;if(T(F))return N.braceNest>0&&l(He.UNTERMINATED_CLOSING_BRACE,s(),0),W=d(N,1,J(F)),N.braceNest=0,N.inLinked=!1,W;if(N.braceNest>0&&(N.currentType===5||N.currentType===6||N.currentType===7))return l(He.UNTERMINATED_CLOSING_BRACE,s(),0),N.braceNest=0,Se(F,N);if(re=S(F,N))return W=d(N,5,j(F)),m(F),W;if(ce=_(F,N))return W=d(N,6,q(F)),m(F),W;if(fe=w(F,N))return W=d(N,7,ne(F)),m(F),W;if(!re&&!ce&&!fe)return W=d(N,13,ie(F)),l(He.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,W.value),m(F),W;break}return W}function ue(F,N){const{currentType:W}=N;let ee=null;const re=F.currentChar();switch((W===8||W===9||W===12||W===10)&&(re===_n||re===Ki)&&l(He.INVALID_LINKED_FORMAT,s(),0),re){case"@":return F.next(),ee=d(N,8,"@"),N.inLinked=!0,ee;case".":return m(F),F.next(),d(N,9,".");case":":return m(F),F.next(),d(N,10,":");default:return T(F)?(ee=d(N,1,J(F)),N.braceNest=0,N.inLinked=!1,ee):b(F,N)||M(F,N)?(m(F),ue(F,N)):C(F,N)?(m(F),d(N,12,le(F))):R(F,N)?(m(F),re==="{"?te(F,N)||ee:d(N,11,Y(F))):(W===8&&l(He.INVALID_LINKED_FORMAT,s(),0),N.braceNest=0,N.inLinked=!1,Se(F,N))}}function Se(F,N){let W={type:14};if(N.braceNest>0)return te(F,N)||f(N);if(N.inLinked)return ue(F,N)||f(N);switch(F.currentChar()){case"{":return te(F,N)||f(N);case"}":return l(He.UNBALANCED_CLOSING_BRACE,s(),0),F.next(),d(N,3,"}");case"@":return ue(F,N)||f(N);default:if(T(F))return W=d(N,1,J(F)),N.braceNest=0,N.inLinked=!1,W;const{isModulo:re,hasSpace:ce}=A(F);if(re)return ce?d(N,0,z(F)):d(N,4,U(F));if(P(F))return d(N,0,z(F));break}return W}function Ce(){const{currentType:F,offset:N,startLoc:W,endLoc:ee}=a;return a.lastType=F,a.lastOffset=N,a.lastStartLoc=W,a.lastEndLoc=ee,a.offset=r(),a.startLoc=s(),i.currentChar()===yr?d(a,14):Se(i,a)}return{nextToken:Ce,currentOffset:r,currentPosition:s,context:h}}const h4="parser",d4=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function f4(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(t||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"\uFFFD"}}}function p4(e={}){const t=e.location!==!1,{onError:n}=e;function i(v,y,S,_,...w){const b=v.currentPosition();if(b.offset+=_,b.column+=_,n){const C=t?Mf(S,b):null,M=ta(y,C,{domain:h4,args:w});n(M)}}function r(v,y,S){const _={type:v};return t&&(_.start=y,_.end=y,_.loc={start:S,end:S}),_}function s(v,y,S,_){_&&(v.type=_),t&&(v.end=y,v.loc&&(v.loc.end=S))}function o(v,y){const S=v.context(),_=r(3,S.offset,S.startLoc);return _.value=y,s(_,v.currentOffset(),v.currentPosition()),_}function u(v,y){const S=v.context(),{lastOffset:_,lastStartLoc:w}=S,b=r(5,_,w);return b.index=parseInt(y,10),v.nextToken(),s(b,v.currentOffset(),v.currentPosition()),b}function a(v,y){const S=v.context(),{lastOffset:_,lastStartLoc:w}=S,b=r(4,_,w);return b.key=y,v.nextToken(),s(b,v.currentOffset(),v.currentPosition()),b}function h(v,y){const S=v.context(),{lastOffset:_,lastStartLoc:w}=S,b=r(9,_,w);return b.value=y.replace(d4,f4),v.nextToken(),s(b,v.currentOffset(),v.currentPosition()),b}function c(v){const y=v.nextToken(),S=v.context(),{lastOffset:_,lastStartLoc:w}=S,b=r(8,_,w);return y.type!==12?(i(v,He.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),b.value="",s(b,_,w),{nextConsumeToken:y,node:b}):(y.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,Ti(y)),b.value=y.value||"",s(b,v.currentOffset(),v.currentPosition()),{node:b})}function l(v,y){const S=v.context(),_=r(7,S.offset,S.startLoc);return _.value=y,s(_,v.currentOffset(),v.currentPosition()),_}function d(v){const y=v.context(),S=r(6,y.offset,y.startLoc);let _=v.nextToken();if(_.type===9){const w=c(v);S.modifier=w.node,_=w.nextConsumeToken||v.nextToken()}switch(_.type!==10&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(_)),_=v.nextToken(),_.type===2&&(_=v.nextToken()),_.type){case 11:_.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(_)),S.key=l(v,_.value||"");break;case 5:_.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(_)),S.key=a(v,_.value||"");break;case 6:_.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(_)),S.key=u(v,_.value||"");break;case 7:_.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(_)),S.key=h(v,_.value||"");break;default:i(v,He.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const w=v.context(),b=r(7,w.offset,w.startLoc);return b.value="",s(b,w.offset,w.startLoc),S.key=b,s(S,w.offset,w.startLoc),{nextConsumeToken:_,node:S}}return s(S,v.currentOffset(),v.currentPosition()),{node:S}}function f(v){const y=v.context(),S=y.currentType===1?v.currentOffset():y.offset,_=y.currentType===1?y.endLoc:y.startLoc,w=r(2,S,_);w.items=[];let b=null;do{const R=b||v.nextToken();switch(b=null,R.type){case 0:R.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(R)),w.items.push(o(v,R.value||""));break;case 6:R.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(R)),w.items.push(u(v,R.value||""));break;case 5:R.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(R)),w.items.push(a(v,R.value||""));break;case 7:R.value==null&&i(v,He.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ti(R)),w.items.push(h(v,R.value||""));break;case 8:const T=d(v);w.items.push(T.node),b=T.nextConsumeToken||null;break}}while(y.currentType!==14&&y.currentType!==1);const C=y.currentType===1?y.lastOffset:v.currentOffset(),M=y.currentType===1?y.lastEndLoc:v.currentPosition();return s(w,C,M),w}function p(v,y,S,_){const w=v.context();let b=_.items.length===0;const C=r(1,y,S);C.cases=[],C.cases.push(_);do{const M=f(v);b||(b=M.items.length===0),C.cases.push(M)}while(w.currentType!==14);return b&&i(v,He.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),s(C,v.currentOffset(),v.currentPosition()),C}function g(v){const y=v.context(),{offset:S,startLoc:_}=y,w=f(v);return y.currentType===14?w:p(v,S,_,w)}function m(v){const y=u4(v,wT({},e)),S=y.context(),_=r(0,S.offset,S.startLoc);return t&&_.loc&&(_.loc.source=v),_.body=g(y),e.onCacheKey&&(_.cacheKey=e.onCacheKey(v)),S.currentType!==14&&i(y,He.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,v[S.offset]||""),s(_,y.currentOffset(),y.currentPosition()),_}return{parse:m}}function Ti(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"\u2026":t}function g4(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function w_(e,t){for(let n=0;n<e.length;n++)yg(e[n],t)}function yg(e,t){switch(e.type){case 1:w_(e.cases,t),t.helper("plural");break;case 2:w_(e.items,t);break;case 6:yg(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function m4(e,t={}){const n=g4(e);n.helper("normalize"),e.body&&yg(e.body,n);const i=n.context();e.helpers=Array.from(i.helpers)}function v4(e){const t=e.body;return t.type===2?S_(t):t.cases.forEach(n=>S_(n)),e}function S_(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const i=e.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;t.push(i.value)}if(t.length===e.items.length){e.static=ST(t);for(let n=0;n<e.items.length;n++){const i=e.items[n];(i.type===3||i.type===9)&&delete i.value}}}}const y4="minifier";function to(e){switch(e.t=e.type,e.type){case 0:const t=e;to(t.body),t.b=t.body,delete t.body;break;case 1:const n=e,i=n.cases;for(let c=0;c<i.length;c++)to(i[c]);n.c=i,delete n.cases;break;case 2:const r=e,s=r.items;for(let c=0;c<s.length;c++)to(s[c]);r.i=s,delete r.items,r.static&&(r.s=r.static,delete r.static);break;case 3:case 9:case 8:case 7:const o=e;o.value&&(o.v=o.value,delete o.value);break;case 6:const u=e;to(u.key),u.k=u.key,delete u.key,u.modifier&&(to(u.modifier),u.m=u.modifier,delete u.modifier);break;case 5:const a=e;a.i=a.index,delete a.index;break;case 4:const h=e;h.k=h.key,delete h.key;break;default:throw ta(He.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:y4,args:[e.type]})}delete e.type}const _4="parser";function b4(e,t){const{sourceMap:n,filename:i,breakLineCode:r,needIndent:s}=t,o=t.location!==!1,u={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:s,indentLevel:0};o&&e.loc&&(u.source=e.loc.source);const a=()=>u;function h(m,v){u.code+=m}function c(m,v=!0){const y=v?r:"";h(s?y+"  ".repeat(m):y)}function l(m=!0){const v=++u.indentLevel;m&&c(v)}function d(m=!0){const v=--u.indentLevel;m&&c(v)}function f(){c(u.indentLevel)}return{context:a,push:h,indent:l,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>u.needIndent}}function w4(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Uo(e,t.key),t.modifier?(e.push(", "),Uo(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function S4(e,t){const{helper:n,needIndent:i}=e;e.push(`${n("normalize")}([`),e.indent(i());const r=t.items.length;for(let s=0;s<r&&(Uo(e,t.items[s]),s!==r-1);s++)e.push(", ");e.deindent(i()),e.push("])")}function T4(e,t){const{helper:n,needIndent:i}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(i());const r=t.cases.length;for(let s=0;s<r&&(Uo(e,t.cases[s]),s!==r-1);s++)e.push(", ");e.deindent(i()),e.push("])")}}function E4(e,t){t.body?Uo(e,t.body):e.push("null")}function Uo(e,t){const{helper:n}=e;switch(t.type){case 0:E4(e,t);break;case 1:T4(e,t);break;case 2:S4(e,t);break;case 6:w4(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:throw ta(He.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:_4,args:[t.type]})}}const A4=(e,t={})=>{const n=__(t.mode)?t.mode:"normal",i=__(t.filename)?t.filename:"message.intl",r=!!t.sourceMap,s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
`,o=t.needIndent?t.needIndent:n!=="arrow",u=e.helpers||[],a=b4(e,{mode:n,filename:i,sourceMap:r,breakLineCode:s,needIndent:o});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(o),u.length>0&&(a.push(`const { ${ST(u.map(l=>`${l}: _${l}`),", ")} } = ctx`),a.newline()),a.push("return "),Uo(a,e),a.deindent(o),a.push("}"),delete e.helpers;const{code:h,map:c}=a.context();return{ast:e,code:h,map:c?c.toJSON():void 0}};function C4(e,t={}){const n=wT({},t),i=!!n.jit,r=!!n.minify,s=n.optimize==null?!0:n.optimize,u=p4(n).parse(e);return i?(s&&v4(u),r&&to(u),{ast:u,code:""}):(m4(u,n),A4(u,n))}/*!
  * core-base v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */function x4(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(nr().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(nr().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(nr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}const Qr=[];Qr[0]={w:[0],i:[3,0],["["]:[4],o:[7]};Qr[1]={w:[1],["."]:[2],["["]:[4],o:[7]};Qr[2]={w:[2],i:[3,0],[0]:[3,0]};Qr[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};Qr[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};Qr[5]={["'"]:[4,0],o:8,l:[5,0]};Qr[6]={['"']:[4,0],o:8,l:[6,0]};const M4=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function k4(e){return M4.test(e)}function $4(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function I4(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function R4(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:k4(t)?$4(t):"*"+t}function L4(e){const t=[];let n=-1,i=0,r=0,s,o,u,a,h,c,l;const d=[];d[0]=()=>{o===void 0?o=u:o+=u},d[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},d[2]=()=>{d[0](),r++},d[3]=()=>{if(r>0)r--,i=4,d[0]();else{if(r=0,o===void 0||(o=R4(o),o===!1))return!1;d[1]()}};function f(){const p=e[n+1];if(i===5&&p==="'"||i===6&&p==='"')return n++,u="\\"+p,d[0](),!0}for(;i!==null;)if(n++,s=e[n],!(s==="\\"&&f())){if(a=I4(s),l=Qr[i],h=l[a]||l.l||8,h===8||(i=h[0],h[1]!==void 0&&(c=d[h[1]],c&&(u=s,c()===!1))))return;if(i===7)return t}}const T_=new Map;function O4(e,t){return ct(e)?e[t]:null}function P4(e,t){if(!ct(e))return null;let n=T_.get(t);if(n||(n=L4(t),n&&T_.set(t,n)),!n)return null;const i=n.length;let r=e,s=0;for(;s<i;){const o=r[n[s]];if(o===void 0||St(r))return null;r=o,s++}return r}const N4=e=>e,D4=e=>"",F4="text",B4=e=>e.length===0?"":XW(e),H4=YW;function E_(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function U4(e){const t=qt(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(qt(e.named.count)||qt(e.named.n))?qt(e.named.count)?e.named.count:qt(e.named.n)?e.named.n:t:t}function z4(e,t){t.count||(t.count=e),t.n||(t.n=e)}function W4(e={}){const t=e.locale,n=U4(e),i=ct(e.pluralRules)&&Me(t)&&St(e.pluralRules[t])?e.pluralRules[t]:E_,r=ct(e.pluralRules)&&Me(t)&&St(e.pluralRules[t])?E_:void 0,s=v=>v[i(n,v.length,r)],o=e.list||[],u=v=>o[v],a=e.named||{};qt(e.pluralIndex)&&z4(n,a);const h=v=>a[v];function c(v){const y=St(e.messages)?e.messages(v):ct(e.messages)?e.messages[v]:!1;return y||(e.parent?e.parent.message(v):D4)}const l=v=>e.modifiers?e.modifiers[v]:N4,d=We(e.processor)&&St(e.processor.normalize)?e.processor.normalize:B4,f=We(e.processor)&&St(e.processor.interpolate)?e.processor.interpolate:H4,p=We(e.processor)&&Me(e.processor.type)?e.processor.type:F4,m={list:u,named:h,plural:s,linked:(v,...y)=>{const[S,_]=y;let w="text",b="";y.length===1?ct(S)?(b=S.modifier||b,w=S.type||w):Me(S)&&(b=S||b):y.length===2&&(Me(S)&&(b=S||b),Me(_)&&(w=_||w));const C=c(v)(m),M=w==="vnode"&&xt(C)&&b?C[0]:C;return b?l(b)(M,w):M},message:c,type:p,interpolate:f,normalize:d,values:an({},o,a)};return m}let ll=null;function V4(e){ll=e}function j4(e,t,n){ll&&ll.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const G4=q4("function:translate");function q4(e){return t=>ll&&ll.emit(e,t)}const K4={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,__EXTEND_POINT__:8},TT=He.__EXTEND_POINT__,os=vg(TT),di={INVALID_ARGUMENT:TT,INVALID_DATE_ARGUMENT:os(),INVALID_ISO_DATE_ARGUMENT:os(),NOT_SUPPORT_NON_STRING_MESSAGE:os(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:os(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:os(),NOT_SUPPORT_LOCALE_TYPE:os(),__EXTEND_POINT__:os()};function Oi(e){return ta(e,null,void 0)}function _g(e,t){return t.locale!=null?A_(t.locale):A_(e.locale)}let md;function A_(e){if(Me(e))return e;if(St(e)){if(e.resolvedOnce&&md!=null)return md;if(e.constructor.name==="Function"){const t=e();if(KW(t))throw Oi(di.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return md=t}else throw Oi(di.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Oi(di.NOT_SUPPORT_LOCALE_TYPE)}function Y4(e,t,n){return[...new Set([n,...xt(t)?t:ct(t)?Object.keys(t):Me(t)?[t]:[n]])]}function ET(e,t,n){const i=Me(n)?n:zo,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[n];for(;xt(o);)o=C_(s,o,t);const u=xt(t)||!We(t)?t:t.default?t.default:null;o=Me(u)?[u]:u,xt(o)&&C_(s,o,!1),r.__localeChainCache.set(i,s)}return s}function C_(e,t,n){let i=!0;for(let r=0;r<t.length&&Je(i);r++){const s=t[r];Me(s)&&(i=X4(e,t[r],n))}return i}function X4(e,t,n){let i;const r=t.split("-");do{const s=r.join("-");i=J4(e,s,n),r.splice(-1,1)}while(r.length&&i===!0);return i}function J4(e,t,n){let i=!1;if(!e.includes(t)&&(i=!0,t)){i=t[t.length-1]!=="!";const r=t.replace(/!/g,"");e.push(r),(xt(n)||We(n))&&n[r]&&(i=n[r])}return i}const Q4="9.9.0",lh=-1,zo="en-US",x_="",M_=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Z4(){return{upper:(e,t)=>t==="text"&&Me(e)?e.toUpperCase():t==="vnode"&&ct(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Me(e)?e.toLowerCase():t==="vnode"&&ct(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Me(e)?M_(e):t==="vnode"&&ct(e)&&"__v_isVNode"in e?M_(e.children):e}}let AT;function k_(e){AT=e}let CT;function eV(e){CT=e}let xT;function tV(e){xT=e}let MT=null;const $_=e=>{MT=e},nV=()=>MT;let kT=null;const I_=e=>{kT=e},iV=()=>kT;let R_=0;function rV(e={}){const t=St(e.onWarn)?e.onWarn:JW,n=Me(e.version)?e.version:Q4,i=Me(e.locale)||St(e.locale)?e.locale:zo,r=St(i)?zo:i,s=xt(e.fallbackLocale)||We(e.fallbackLocale)||Me(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,o=We(e.messages)?e.messages:{[r]:{}},u=We(e.datetimeFormats)?e.datetimeFormats:{[r]:{}},a=We(e.numberFormats)?e.numberFormats:{[r]:{}},h=an({},e.modifiers||{},Z4()),c=e.pluralRules||{},l=St(e.missing)?e.missing:null,d=Je(e.missingWarn)||Yr(e.missingWarn)?e.missingWarn:!0,f=Je(e.fallbackWarn)||Yr(e.fallbackWarn)?e.fallbackWarn:!0,p=!!e.fallbackFormat,g=!!e.unresolving,m=St(e.postTranslation)?e.postTranslation:null,v=We(e.processor)?e.processor:null,y=Je(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter,_=St(e.messageCompiler)?e.messageCompiler:AT,w=St(e.messageResolver)?e.messageResolver:CT||O4,b=St(e.localeFallbacker)?e.localeFallbacker:xT||Y4,C=ct(e.fallbackContext)?e.fallbackContext:void 0,M=e,R=ct(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,T=ct(M.__numberFormatters)?M.__numberFormatters:new Map,A=ct(M.__meta)?M.__meta:{};R_++;const P={version:n,cid:R_,locale:i,fallbackLocale:s,messages:o,modifiers:h,pluralRules:c,missing:l,missingWarn:d,fallbackWarn:f,fallbackFormat:p,unresolving:g,postTranslation:m,processor:v,warnHtmlMessage:y,escapeParameter:S,messageCompiler:_,messageResolver:w,localeFallbacker:b,fallbackContext:C,onWarn:t,__meta:A};return P.datetimeFormats=u,P.numberFormats=a,P.__datetimeFormatters=R,P.__numberFormatters=T,__INTLIFY_PROD_DEVTOOLS__&&j4(P,n,A),P}function bg(e,t,n,i,r){const{missing:s,onWarn:o}=e;if(s!==null){const u=s(e,n,t,r);return Me(u)?u:t}else return t}function fa(e,t,n){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function vd(e){return n=>sV(n,e)}function sV(e,t){const n=t.b||t.body;if((n.t||n.type)===1){const i=n,r=i.c||i.cases;return e.plural(r.reduce((s,o)=>[...s,L_(e,o)],[]))}else return L_(e,n)}function L_(e,t){const n=t.s||t.static;if(n)return e.type==="text"?n:e.normalize([n]);{const i=(t.i||t.items).reduce((r,s)=>[...r,kf(e,s)],[]);return e.normalize(i)}}function kf(e,t){const n=t.t||t.type;switch(n){case 3:const i=t;return i.v||i.value;case 9:const r=t;return r.v||r.value;case 4:const s=t;return e.interpolate(e.named(s.k||s.key));case 5:const o=t;return e.interpolate(e.list(o.i!=null?o.i:o.index));case 6:const u=t,a=u.m||u.modifier;return e.linked(kf(e,u.k||u.key),a?kf(e,a):void 0,e.type);case 7:const h=t;return h.v||h.value;case 8:const c=t;return c.v||c.value;default:throw new Error(`unhandled node type on format message part: ${n}`)}}const $T=e=>e;let fo=Object.create(null);const Wo=e=>ct(e)&&(e.t===0||e.type===0)&&("b"in e||"body"in e);function IT(e,t={}){let n=!1;const i=t.onError||i4;return t.onError=r=>{n=!0,i(r)},{...C4(e,t),detectError:n}}const oV=(e,t)=>{if(!Me(e))throw Oi(di.NOT_SUPPORT_NON_STRING_MESSAGE);{Je(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||$T)(e),r=fo[i];if(r)return r;const{code:s,detectError:o}=IT(e,t),u=new Function(`return ${s}`)();return o?u:fo[i]=u}};function aV(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&Me(e)){Je(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||$T)(e),r=fo[i];if(r)return r;const{ast:s,detectError:o}=IT(e,{...t,location:!1,jit:!0}),u=vd(s);return o?u:fo[i]=u}else{const n=e.cacheKey;if(n){const i=fo[n];return i||(fo[n]=vd(e))}else return vd(e)}}const O_=()=>"",Qn=e=>St(e);function P_(e,...t){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:u}=e,[a,h]=$f(...t),c=Je(h.missingWarn)?h.missingWarn:e.missingWarn,l=Je(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,d=Je(h.escapeParameter)?h.escapeParameter:e.escapeParameter,f=!!h.resolvedMessage,p=Me(h.default)||Je(h.default)?Je(h.default)?s?a:()=>a:h.default:n?s?a:()=>a:"",g=n||p!=="",m=_g(e,h);d&&lV(h);let[v,y,S]=f?[a,m,u[m]||{}]:RT(e,a,m,o,l,c),_=v,w=a;if(!f&&!(Me(_)||Wo(_)||Qn(_))&&g&&(_=p,w=_),!f&&(!(Me(_)||Wo(_)||Qn(_))||!Me(y)))return r?lh:a;let b=!1;const C=()=>{b=!0},M=Qn(_)?_:LT(e,a,y,_,w,C);if(b)return _;const R=hV(e,y,S,h),T=W4(R),A=cV(e,M,T),P=i?i(A,a):A;if(__INTLIFY_PROD_DEVTOOLS__){const I={timestamp:Date.now(),key:Me(a)?a:Qn(_)?_.key:"",locale:y||(Qn(_)?_.locale:""),format:Me(_)?_:Qn(_)?_.source:"",message:P};I.meta=an({},e.__meta,nV()||{}),G4(I)}return P}function lV(e){xt(e.list)?e.list=e.list.map(t=>Me(t)?y_(t):t):ct(e.named)&&Object.keys(e.named).forEach(t=>{Me(e.named[t])&&(e.named[t]=y_(e.named[t]))})}function RT(e,t,n,i,r,s){const{messages:o,onWarn:u,messageResolver:a,localeFallbacker:h}=e,c=h(e,i,n);let l={},d,f=null;const p="translate";for(let g=0;g<c.length&&(d=c[g],l=o[d]||{},(f=a(l,t))===null&&(f=l[t]),!(Me(f)||Wo(f)||Qn(f)));g++){const m=bg(e,t,d,s,p);m!==t&&(f=m)}return[f,d,l]}function LT(e,t,n,i,r,s){const{messageCompiler:o,warnHtmlMessage:u}=e;if(Qn(i)){const h=i;return h.locale=h.locale||n,h.key=h.key||t,h}if(o==null){const h=()=>i;return h.locale=n,h.key=t,h}const a=o(i,uV(e,n,r,i,u,s));return a.locale=n,a.key=t,a.source=i,a}function cV(e,t,n){return t(n)}function $f(...e){const[t,n,i]=e,r={};if(!Me(t)&&!qt(t)&&!Qn(t)&&!Wo(t))throw Oi(di.INVALID_ARGUMENT);const s=qt(t)?String(t):(Qn(t),t);return qt(n)?r.plural=n:Me(n)?r.default=n:We(n)&&!ah(n)?r.named=n:xt(n)&&(r.list=n),qt(i)?r.plural=i:Me(i)?r.default=i:We(i)&&an(r,i),[s,r]}function uV(e,t,n,i,r,s){return{locale:t,key:n,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>VW(t,n,o)}}function hV(e,t,n,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:u,fallbackWarn:a,missingWarn:h,fallbackContext:c}=e,d={locale:t,modifiers:r,pluralRules:s,messages:f=>{let p=o(n,f);if(p==null&&c){const[,,g]=RT(c,f,t,u,a,h);p=o(g,f)}if(Me(p)||Wo(p)){let g=!1;const v=LT(e,f,t,p,f,()=>{g=!0});return g?O_:v}else return Qn(p)?p:O_}};return e.processor&&(d.processor=e.processor),i.list&&(d.list=i.list),i.named&&(d.named=i.named),qt(i.plural)&&(d.pluralIndex=i.plural),d}function N_(e,...t){const{datetimeFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=e,{__datetimeFormatters:u}=e,[a,h,c,l]=If(...t),d=Je(c.missingWarn)?c.missingWarn:e.missingWarn;Je(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const f=!!c.part,p=_g(e,c),g=o(e,r,p);if(!Me(a)||a==="")return new Intl.DateTimeFormat(p,l).format(h);let m={},v,y=null;const S="datetime format";for(let b=0;b<g.length&&(v=g[b],m=n[v]||{},y=m[a],!We(y));b++)bg(e,a,v,d,S);if(!We(y)||!Me(v))return i?lh:a;let _=`${v}__${a}`;ah(l)||(_=`${_}__${JSON.stringify(l)}`);let w=u.get(_);return w||(w=new Intl.DateTimeFormat(v,an({},y,l)),u.set(_,w)),f?w.formatToParts(h):w.format(h)}const OT=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function If(...e){const[t,n,i,r]=e,s={};let o={},u;if(Me(t)){const a=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw Oi(di.INVALID_ISO_DATE_ARGUMENT);const h=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();u=new Date(h);try{u.toISOString()}catch{throw Oi(di.INVALID_ISO_DATE_ARGUMENT)}}else if(GW(t)){if(isNaN(t.getTime()))throw Oi(di.INVALID_DATE_ARGUMENT);u=t}else if(qt(t))u=t;else throw Oi(di.INVALID_ARGUMENT);return Me(n)?s.key=n:We(n)&&Object.keys(n).forEach(a=>{OT.includes(a)?o[a]=n[a]:s[a]=n[a]}),Me(i)?s.locale=i:We(i)&&(o=i),We(r)&&(o=r),[s.key||"",u,s,o]}function D_(e,t,n){const i=e;for(const r in n){const s=`${t}__${r}`;!i.__datetimeFormatters.has(s)||i.__datetimeFormatters.delete(s)}}function F_(e,...t){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=e,{__numberFormatters:u}=e,[a,h,c,l]=Rf(...t),d=Je(c.missingWarn)?c.missingWarn:e.missingWarn;Je(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const f=!!c.part,p=_g(e,c),g=o(e,r,p);if(!Me(a)||a==="")return new Intl.NumberFormat(p,l).format(h);let m={},v,y=null;const S="number format";for(let b=0;b<g.length&&(v=g[b],m=n[v]||{},y=m[a],!We(y));b++)bg(e,a,v,d,S);if(!We(y)||!Me(v))return i?lh:a;let _=`${v}__${a}`;ah(l)||(_=`${_}__${JSON.stringify(l)}`);let w=u.get(_);return w||(w=new Intl.NumberFormat(v,an({},y,l)),u.set(_,w)),f?w.formatToParts(h):w.format(h)}const PT=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Rf(...e){const[t,n,i,r]=e,s={};let o={};if(!qt(t))throw Oi(di.INVALID_ARGUMENT);const u=t;return Me(n)?s.key=n:We(n)&&Object.keys(n).forEach(a=>{PT.includes(a)?o[a]=n[a]:s[a]=n[a]}),Me(i)?s.locale=i:We(i)&&(o=i),We(r)&&(o=r),[s.key||"",u,s,o]}function B_(e,t,n){const i=e;for(const r in n){const s=`${t}__${r}`;!i.__numberFormatters.has(s)||i.__numberFormatters.delete(s)}}x4();/*!
  * vue-i18n v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */const dV="9.9.0";function fV(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(nr().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(nr().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(nr().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(nr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(nr().__INTLIFY_PROD_DEVTOOLS__=!1)}const NT=K4.__EXTEND_POINT__,_r=vg(NT);_r(),_r(),_r(),_r(),_r(),_r(),_r(),_r();const DT=di.__EXTEND_POINT__,$n=vg(DT),Xt={UNEXPECTED_RETURN_TYPE:DT,INVALID_ARGUMENT:$n(),MUST_BE_CALL_SETUP_TOP:$n(),NOT_INSTALLED:$n(),NOT_AVAILABLE_IN_LEGACY_MODE:$n(),REQUIRED_VALUE:$n(),INVALID_VALUE:$n(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:$n(),NOT_INSTALLED_WITH_PROVIDE:$n(),UNEXPECTED_ERROR:$n(),NOT_COMPATIBLE_LEGACY_VUE_I18N:$n(),BRIDGE_SUPPORT_VUE_2_ONLY:$n(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:$n(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:$n(),__EXTEND_POINT__:$n()};function Zt(e,...t){return ta(e,null,void 0)}const Lf=fr("__translateVNode"),Of=fr("__datetimeParts"),Pf=fr("__numberParts"),FT=fr("__setPluralRules");fr("__intlifyMeta");const BT=fr("__injectWithOption"),Nf=fr("__dispose");function cl(e){if(!ct(e))return e;for(const t in e)if(!!yu(e,t))if(!t.includes("."))ct(e[t])&&cl(e[t]);else{const n=t.split("."),i=n.length-1;let r=e,s=!1;for(let o=0;o<i;o++){if(n[o]in r||(r[n[o]]={}),!ct(r[n[o]])){s=!0;break}r=r[n[o]]}s||(r[n[i]]=e[t],delete e[t]),ct(r[n[i]])&&cl(r[n[i]])}return e}function ch(e,t){const{messages:n,__i18n:i,messageResolver:r,flatJson:s}=t,o=We(n)?n:xt(i)?{}:{[e]:{}};if(xt(i)&&i.forEach(u=>{if("locale"in u&&"resource"in u){const{locale:a,resource:h}=u;a?(o[a]=o[a]||{},Rc(h,o[a])):Rc(h,o)}else Me(u)&&Rc(JSON.parse(u),o)}),r==null&&s)for(const u in o)yu(o,u)&&cl(o[u]);return o}function HT(e){return e.type}function UT(e,t,n){let i=ct(t.messages)?t.messages:{};"__i18nGlobal"in n&&(i=ch(e.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{e.mergeLocaleMessage(s,i[s])});{if(ct(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])})}if(ct(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(o=>{e.mergeNumberFormat(o,t.numberFormats[o])})}}}function H_(e){return Ee(Fr,null,e,0)}const U_="__INTLIFY_META__",z_=()=>[],pV=()=>!1;let W_=0;function V_(e){return(t,n,i,r)=>e(n,i,pn()||void 0,r)}const gV=()=>{const e=pn();let t=null;return e&&(t=HT(e)[U_])?{[U_]:t}:null};function wg(e={},t){const{__root:n,__injectWithOption:i}=e,r=n===void 0,s=e.flatJson,o=vu?li:xu;let u=Je(e.inheritLocale)?e.inheritLocale:!0;const a=o(n&&u?n.locale.value:Me(e.locale)?e.locale:zo),h=o(n&&u?n.fallbackLocale.value:Me(e.fallbackLocale)||xt(e.fallbackLocale)||We(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),c=o(ch(a.value,e)),l=o(We(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=o(We(e.numberFormats)?e.numberFormats:{[a.value]:{}});let f=n?n.missingWarn:Je(e.missingWarn)||Yr(e.missingWarn)?e.missingWarn:!0,p=n?n.fallbackWarn:Je(e.fallbackWarn)||Yr(e.fallbackWarn)?e.fallbackWarn:!0,g=n?n.fallbackRoot:Je(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,v=St(e.missing)?e.missing:null,y=St(e.missing)?V_(e.missing):null,S=St(e.postTranslation)?e.postTranslation:null,_=n?n.warnHtmlMessage:Je(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const b=n?n.modifiers:We(e.modifiers)?e.modifiers:{};let C=e.pluralRules||n&&n.pluralRules,M;M=(()=>{r&&I_(null);const K={version:dV,locale:a.value,fallbackLocale:h.value,messages:c.value,modifiers:b,pluralRules:C,missing:y===null?void 0:y,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:S===null?void 0:S,warnHtmlMessage:_,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};K.datetimeFormats=l.value,K.numberFormats=d.value,K.__datetimeFormatters=We(M)?M.__datetimeFormatters:void 0,K.__numberFormatters=We(M)?M.__numberFormatters:void 0;const se=rV(K);return r&&I_(se),se})(),fa(M,a.value,h.value);function T(){return[a.value,h.value,c.value,l.value,d.value]}const A=Rt({get:()=>a.value,set:K=>{a.value=K,M.locale=a.value}}),P=Rt({get:()=>h.value,set:K=>{h.value=K,M.fallbackLocale=h.value,fa(M,a.value,K)}}),I=Rt(()=>c.value),E=Rt(()=>l.value),L=Rt(()=>d.value);function O(){return St(S)?S:null}function B(K){S=K,M.postTranslation=K}function U(){return v}function z(K){K!==null&&(y=V_(K)),v=K,M.missing=y}const j=(K,se,be,_e,Oe,qe)=>{T();let Fe;try{__INTLIFY_PROD_DEVTOOLS__&&$_(gV()),r||(M.fallbackContext=n?iV():void 0),Fe=K(M)}finally{__INTLIFY_PROD_DEVTOOLS__&&$_(null),r||(M.fallbackContext=void 0)}if(be!=="translate exists"&&qt(Fe)&&Fe===lh||be==="translate exists"&&!Fe){const[je,mt]=se();return n&&g?_e(n):Oe(je)}else{if(qe(Fe))return Fe;throw Zt(Xt.UNEXPECTED_RETURN_TYPE)}};function q(...K){return j(se=>Reflect.apply(P_,null,[se,...K]),()=>$f(...K),"translate",se=>Reflect.apply(se.t,se,[...K]),se=>se,se=>Me(se))}function ne(...K){const[se,be,_e]=K;if(_e&&!ct(_e))throw Zt(Xt.INVALID_ARGUMENT);return q(se,be,an({resolvedMessage:!0},_e||{}))}function G(...K){return j(se=>Reflect.apply(N_,null,[se,...K]),()=>If(...K),"datetime format",se=>Reflect.apply(se.d,se,[...K]),()=>x_,se=>Me(se))}function X(...K){return j(se=>Reflect.apply(F_,null,[se,...K]),()=>Rf(...K),"number format",se=>Reflect.apply(se.n,se,[...K]),()=>x_,se=>Me(se))}function ie(K){return K.map(se=>Me(se)||qt(se)||Je(se)?H_(String(se)):se)}const Y={normalize:ie,interpolate:K=>K,type:"vnode"};function J(...K){return j(se=>{let be;const _e=se;try{_e.processor=Y,be=Reflect.apply(P_,null,[_e,...K])}finally{_e.processor=null}return be},()=>$f(...K),"translate",se=>se[Lf](...K),se=>[H_(se)],se=>xt(se))}function te(...K){return j(se=>Reflect.apply(F_,null,[se,...K]),()=>Rf(...K),"number format",se=>se[Pf](...K),z_,se=>Me(se)||xt(se))}function ue(...K){return j(se=>Reflect.apply(N_,null,[se,...K]),()=>If(...K),"datetime format",se=>se[Of](...K),z_,se=>Me(se)||xt(se))}function Se(K){C=K,M.pluralRules=C}function Ce(K,se){return j(()=>{if(!K)return!1;const be=Me(se)?se:a.value,_e=W(be),Oe=M.messageResolver(_e,K);return Wo(Oe)||Qn(Oe)||Me(Oe)},()=>[K],"translate exists",be=>Reflect.apply(be.te,be,[K,se]),pV,be=>Je(be))}function F(K){let se=null;const be=ET(M,h.value,a.value);for(let _e=0;_e<be.length;_e++){const Oe=c.value[be[_e]]||{},qe=M.messageResolver(Oe,K);if(qe!=null){se=qe;break}}return se}function N(K){const se=F(K);return se??(n?n.tm(K)||{}:{})}function W(K){return c.value[K]||{}}function ee(K,se){if(s){const be={[K]:se};for(const _e in be)yu(be,_e)&&cl(be[_e]);se=be[K]}c.value[K]=se,M.messages=c.value}function re(K,se){c.value[K]=c.value[K]||{};const be={[K]:se};for(const _e in be)yu(be,_e)&&cl(be[_e]);se=be[K],Rc(se,c.value[K]),M.messages=c.value}function ce(K){return l.value[K]||{}}function fe(K,se){l.value[K]=se,M.datetimeFormats=l.value,D_(M,K,se)}function ye(K,se){l.value[K]=an(l.value[K]||{},se),M.datetimeFormats=l.value,D_(M,K,se)}function ge(K){return d.value[K]||{}}function ve(K,se){d.value[K]=se,M.numberFormats=d.value,B_(M,K,se)}function Z(K,se){d.value[K]=an(d.value[K]||{},se),M.numberFormats=d.value,B_(M,K,se)}W_++,n&&vu&&(Pi(n.locale,K=>{u&&(a.value=K,M.locale=K,fa(M,a.value,h.value))}),Pi(n.fallbackLocale,K=>{u&&(h.value=K,M.fallbackLocale=K,fa(M,a.value,h.value))}));const ae={id:W_,locale:A,fallbackLocale:P,get inheritLocale(){return u},set inheritLocale(K){u=K,K&&n&&(a.value=n.locale.value,h.value=n.fallbackLocale.value,fa(M,a.value,h.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:I,get modifiers(){return b},get pluralRules(){return C||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(K){f=K,M.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(K){p=K,M.fallbackWarn=p},get fallbackRoot(){return g},set fallbackRoot(K){g=K},get fallbackFormat(){return m},set fallbackFormat(K){m=K,M.fallbackFormat=m},get warnHtmlMessage(){return _},set warnHtmlMessage(K){_=K,M.warnHtmlMessage=K},get escapeParameter(){return w},set escapeParameter(K){w=K,M.escapeParameter=K},t:q,getLocaleMessage:W,setLocaleMessage:ee,mergeLocaleMessage:re,getPostTranslationHandler:O,setPostTranslationHandler:B,getMissingHandler:U,setMissingHandler:z,[FT]:Se};return ae.datetimeFormats=E,ae.numberFormats=L,ae.rt=ne,ae.te=Ce,ae.tm=N,ae.d=G,ae.n=X,ae.getDateTimeFormat=ce,ae.setDateTimeFormat=fe,ae.mergeDateTimeFormat=ye,ae.getNumberFormat=ge,ae.setNumberFormat=ve,ae.mergeNumberFormat=Z,ae[BT]=i,ae[Lf]=J,ae[Of]=ue,ae[Pf]=te,ae}function mV(e){const t=Me(e.locale)?e.locale:zo,n=Me(e.fallbackLocale)||xt(e.fallbackLocale)||We(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,i=St(e.missing)?e.missing:void 0,r=Je(e.silentTranslationWarn)||Yr(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=Je(e.silentFallbackWarn)||Yr(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=Je(e.fallbackRoot)?e.fallbackRoot:!0,u=!!e.formatFallbackMessages,a=We(e.modifiers)?e.modifiers:{},h=e.pluralizationRules,c=St(e.postTranslation)?e.postTranslation:void 0,l=Me(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,d=!!e.escapeParameterHtml,f=Je(e.sync)?e.sync:!0;let p=e.messages;if(We(e.sharedMessages)){const w=e.sharedMessages;p=Object.keys(w).reduce((C,M)=>{const R=C[M]||(C[M]={});return an(R,w[M]),C},p||{})}const{__i18n:g,__root:m,__injectWithOption:v}=e,y=e.datetimeFormats,S=e.numberFormats,_=e.flatJson;return{locale:t,fallbackLocale:n,messages:p,flatJson:_,datetimeFormats:y,numberFormats:S,missing:i,missingWarn:r,fallbackWarn:s,fallbackRoot:o,fallbackFormat:u,modifiers:a,pluralRules:h,postTranslation:c,warnHtmlMessage:l,escapeParameter:d,messageResolver:e.messageResolver,inheritLocale:f,__i18n:g,__root:m,__injectWithOption:v}}function Df(e={},t){{const n=wg(mV(e)),{__extender:i}=e,r={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(s){},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return Je(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=Je(s)?!s:s},get silentFallbackWarn(){return Je(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=Je(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(s){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[o,u,a]=s,h={};let c=null,l=null;if(!Me(o))throw Zt(Xt.INVALID_ARGUMENT);const d=o;return Me(u)?h.locale=u:xt(u)?c=u:We(u)&&(l=u),xt(a)?c=a:We(a)&&(l=a),Reflect.apply(n.t,n,[d,c||l||{},h])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[o,u,a]=s,h={plural:1};let c=null,l=null;if(!Me(o))throw Zt(Xt.INVALID_ARGUMENT);const d=o;return Me(u)?h.locale=u:qt(u)?h.plural=u:xt(u)?c=u:We(u)&&(l=u),Me(a)?h.locale=a:xt(a)?c=a:We(a)&&(l=a),Reflect.apply(n.t,n,[d,c||l||{},h])},te(s,o){return n.te(s,o)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,o){n.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){n.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,o){n.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){n.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,o){n.setNumberFormat(s,o)},mergeNumberFormat(s,o){n.mergeNumberFormat(s,o)},getChoiceIndex(s,o){return-1}};return r.__extender=i,r}}const Sg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function vV({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((i,r)=>[...i,...r.type===tt?r.children:[r]],[]):t.reduce((n,i)=>{const r=e[i];return r&&(n[i]=r()),n},{})}function zT(e){return tt}const yV=ks({name:"i18n-t",props:an({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>qt(e)||!isNaN(e)}},Sg),setup(e,t){const{slots:n,attrs:i}=t,r=e.i18n||Tg({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(l=>l!=="_"),o={};e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=Me(e.plural)?+e.plural:e.plural);const u=vV(t,s),a=r[Lf](e.keypath,u,o),h=an({},i),c=Me(e.tag)||ct(e.tag)?e.tag:zT();return ml(c,h,a)}}}),j_=yV;function _V(e){return xt(e)&&!Me(e[0])}function WT(e,t,n,i){const{slots:r,attrs:s}=t;return()=>{const o={part:!0};let u={};e.locale&&(o.locale=e.locale),Me(e.format)?o.key=e.format:ct(e.format)&&(Me(e.format.key)&&(o.key=e.format.key),u=Object.keys(e.format).reduce((d,f)=>n.includes(f)?an({},d,{[f]:e.format[f]}):d,{}));const a=i(e.value,o,u);let h=[o.key];xt(a)?h=a.map((d,f)=>{const p=r[d.type],g=p?p({[d.type]:d.value,index:f,parts:a}):[d.value];return _V(g)&&(g[0].key=`${d.type}-${f}`),g}):Me(a)&&(h=[a]);const c=an({},s),l=Me(e.tag)||ct(e.tag)?e.tag:zT();return ml(l,c,h)}}const bV=ks({name:"i18n-n",props:an({value:{type:Number,required:!0},format:{type:[String,Object]}},Sg),setup(e,t){const n=e.i18n||Tg({useScope:"parent",__useComponent:!0});return WT(e,t,PT,(...i)=>n[Pf](...i))}}),G_=bV,wV=ks({name:"i18n-d",props:an({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Sg),setup(e,t){const n=e.i18n||Tg({useScope:"parent",__useComponent:!0});return WT(e,t,OT,(...i)=>n[Of](...i))}}),q_=wV;function SV(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const i=n.__getInstance(t);return i!=null?i.__composer:e.global.__composer}}function TV(e){const t=o=>{const{instance:u,modifiers:a,value:h}=o;if(!u||!u.$)throw Zt(Xt.UNEXPECTED_ERROR);const c=SV(e,u.$),l=K_(h);return[Reflect.apply(c.t,c,[...Y_(l)]),c]};return{created:(o,u)=>{const[a,h]=t(u);vu&&e.global===h&&(o.__i18nWatcher=Pi(h.locale,()=>{u.instance&&u.instance.$forceUpdate()})),o.__composer=h,o.textContent=a},unmounted:o=>{vu&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:u})=>{if(o.__composer){const a=o.__composer,h=K_(u);o.textContent=Reflect.apply(a.t,a,[...Y_(h)])}},getSSRProps:o=>{const[u]=t(o);return{textContent:u}}}}function K_(e){if(Me(e))return{path:e};if(We(e)){if(!("path"in e))throw Zt(Xt.REQUIRED_VALUE,"path");return e}else throw Zt(Xt.INVALID_VALUE)}function Y_(e){const{path:t,locale:n,args:i,choice:r,plural:s}=e,o={},u=i||{};return Me(n)&&(o.locale=n),qt(r)&&(o.plural=r),qt(s)&&(o.plural=s),[t,u,o]}function EV(e,t,...n){const i=We(n[0])?n[0]:{},r=!!i.useI18nComponentName;(Je(i.globalInstall)?i.globalInstall:!0)&&([r?"i18n":j_.name,"I18nT"].forEach(o=>e.component(o,j_)),[G_.name,"I18nN"].forEach(o=>e.component(o,G_)),[q_.name,"I18nD"].forEach(o=>e.component(o,q_))),e.directive("t",TV(t))}function AV(e,t,n){return{beforeCreate(){const i=pn();if(!i)throw Zt(Xt.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const s=r.i18n;if(r.__i18n&&(s.__i18n=r.__i18n),s.__root=t,this===this.$root)this.$i18n=X_(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Df(s);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=X_(e,r);else{this.$i18n=Df({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&UT(t,r,r),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,o)=>this.$i18n.te(s,o),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=pn();if(!i)throw Zt(Xt.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(i),delete this.$i18n}}}function X_(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[FT](t.pluralizationRules||e.pluralizationRules);const n=ch(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(i=>e.mergeLocaleMessage(i,n[i])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,t.datetimeFormats[i])),t.numberFormats&&Object.keys(t.numberFormats).forEach(i=>e.mergeNumberFormat(i,t.numberFormats[i])),e}const CV=fr("global-vue-i18n");function xV(e={},t){const n=__VUE_I18N_LEGACY_API__&&Je(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,i=Je(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,s=new Map,[o,u]=MV(e,n),a=fr("");function h(d){return s.get(d)||null}function c(d,f){s.set(d,f)}function l(d){s.delete(d)}{const d={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return r},async install(f,...p){if(f.__VUE_I18N_SYMBOL__=a,f.provide(f.__VUE_I18N_SYMBOL__,d),We(p[0])){const v=p[0];d.__composerExtend=v.__composerExtend,d.__vueI18nExtend=v.__vueI18nExtend}let g=null;!n&&i&&(g=DV(f,d.global)),__VUE_I18N_FULL_INSTALL__&&EV(f,d,...p),__VUE_I18N_LEGACY_API__&&n&&f.mixin(AV(u,u.__composer,d));const m=f.unmount;f.unmount=()=>{g&&g(),d.dispose(),m()}},get global(){return u},dispose(){o.stop()},__instances:s,__getInstance:h,__setInstance:c,__deleteInstance:l};return d}}function Tg(e={}){const t=pn();if(t==null)throw Zt(Xt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Zt(Xt.NOT_INSTALLED);const n=kV(t),i=IV(n),r=HT(t),s=$V(e,r);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Zt(Xt.NOT_AVAILABLE_IN_LEGACY_MODE);return PV(t,s,i,e)}if(s==="global")return UT(i,e,r),i;if(s==="parent"){let a=RV(n,t,e.__useComponent);return a==null&&(a=i),a}const o=n;let u=o.__getInstance(t);if(u==null){const a=an({},e);"__i18n"in r&&(a.__i18n=r.__i18n),i&&(a.__root=i),u=wg(a),o.__composerExtend&&(u[Nf]=o.__composerExtend(u)),OV(o,t,u),o.__setInstance(t,u)}return u}function MV(e,t,n){const i=Rb();{const r=__VUE_I18N_LEGACY_API__&&t?i.run(()=>Df(e)):i.run(()=>wg(e));if(r==null)throw Zt(Xt.UNEXPECTED_ERROR);return[i,r]}}function kV(e){{const t=jn(e.isCE?CV:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Zt(e.isCE?Xt.NOT_INSTALLED_WITH_PROVIDE:Xt.UNEXPECTED_ERROR);return t}}function $V(e,t){return ah(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function IV(e){return e.mode==="composition"?e.global:e.global.__composer}function RV(e,t,n=!1){let i=null;const r=t.root;let s=LV(t,n);for(;s!=null;){const o=e;if(e.mode==="composition")i=o.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const u=o.__getInstance(s);u!=null&&(i=u.__composer,n&&i&&!i[BT]&&(i=null))}if(i!=null||r===s)break;s=s.parent}return i}function LV(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function OV(e,t,n){dl(()=>{},t),$u(()=>{const i=n;e.__deleteInstance(t);const r=i[Nf];r&&(r(),delete i[Nf])},t)}function PV(e,t,n,i={}){const r=t==="local",s=xu(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Zt(Xt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=Je(i.inheritLocale)?i.inheritLocale:!Me(i.locale),u=li(!r||o?n.locale.value:Me(i.locale)?i.locale:zo),a=li(!r||o?n.fallbackLocale.value:Me(i.fallbackLocale)||xt(i.fallbackLocale)||We(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:u.value),h=li(ch(u.value,i)),c=li(We(i.datetimeFormats)?i.datetimeFormats:{[u.value]:{}}),l=li(We(i.numberFormats)?i.numberFormats:{[u.value]:{}}),d=r?n.missingWarn:Je(i.missingWarn)||Yr(i.missingWarn)?i.missingWarn:!0,f=r?n.fallbackWarn:Je(i.fallbackWarn)||Yr(i.fallbackWarn)?i.fallbackWarn:!0,p=r?n.fallbackRoot:Je(i.fallbackRoot)?i.fallbackRoot:!0,g=!!i.fallbackFormat,m=St(i.missing)?i.missing:null,v=St(i.postTranslation)?i.postTranslation:null,y=r?n.warnHtmlMessage:Je(i.warnHtmlMessage)?i.warnHtmlMessage:!0,S=!!i.escapeParameter,_=r?n.modifiers:We(i.modifiers)?i.modifiers:{},w=i.pluralRules||r&&n.pluralRules;function b(){return[u.value,a.value,h.value,c.value,l.value]}const C=Rt({get:()=>s.value?s.value.locale.value:u.value,set:N=>{s.value&&(s.value.locale.value=N),u.value=N}}),M=Rt({get:()=>s.value?s.value.fallbackLocale.value:a.value,set:N=>{s.value&&(s.value.fallbackLocale.value=N),a.value=N}}),R=Rt(()=>s.value?s.value.messages.value:h.value),T=Rt(()=>c.value),A=Rt(()=>l.value);function P(){return s.value?s.value.getPostTranslationHandler():v}function I(N){s.value&&s.value.setPostTranslationHandler(N)}function E(){return s.value?s.value.getMissingHandler():m}function L(N){s.value&&s.value.setMissingHandler(N)}function O(N){return b(),N()}function B(...N){return s.value?O(()=>Reflect.apply(s.value.t,null,[...N])):O(()=>"")}function U(...N){return s.value?Reflect.apply(s.value.rt,null,[...N]):""}function z(...N){return s.value?O(()=>Reflect.apply(s.value.d,null,[...N])):O(()=>"")}function j(...N){return s.value?O(()=>Reflect.apply(s.value.n,null,[...N])):O(()=>"")}function q(N){return s.value?s.value.tm(N):{}}function ne(N,W){return s.value?s.value.te(N,W):!1}function G(N){return s.value?s.value.getLocaleMessage(N):{}}function X(N,W){s.value&&(s.value.setLocaleMessage(N,W),h.value[N]=W)}function ie(N,W){s.value&&s.value.mergeLocaleMessage(N,W)}function le(N){return s.value?s.value.getDateTimeFormat(N):{}}function Y(N,W){s.value&&(s.value.setDateTimeFormat(N,W),c.value[N]=W)}function J(N,W){s.value&&s.value.mergeDateTimeFormat(N,W)}function te(N){return s.value?s.value.getNumberFormat(N):{}}function ue(N,W){s.value&&(s.value.setNumberFormat(N,W),l.value[N]=W)}function Se(N,W){s.value&&s.value.mergeNumberFormat(N,W)}const Ce={get id(){return s.value?s.value.id:-1},locale:C,fallbackLocale:M,messages:R,datetimeFormats:T,numberFormats:A,get inheritLocale(){return s.value?s.value.inheritLocale:o},set inheritLocale(N){s.value&&(s.value.inheritLocale=N)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(h.value)},get modifiers(){return s.value?s.value.modifiers:_},get pluralRules(){return s.value?s.value.pluralRules:w},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:d},set missingWarn(N){s.value&&(s.value.missingWarn=N)},get fallbackWarn(){return s.value?s.value.fallbackWarn:f},set fallbackWarn(N){s.value&&(s.value.missingWarn=N)},get fallbackRoot(){return s.value?s.value.fallbackRoot:p},set fallbackRoot(N){s.value&&(s.value.fallbackRoot=N)},get fallbackFormat(){return s.value?s.value.fallbackFormat:g},set fallbackFormat(N){s.value&&(s.value.fallbackFormat=N)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:y},set warnHtmlMessage(N){s.value&&(s.value.warnHtmlMessage=N)},get escapeParameter(){return s.value?s.value.escapeParameter:S},set escapeParameter(N){s.value&&(s.value.escapeParameter=N)},t:B,getPostTranslationHandler:P,setPostTranslationHandler:I,getMissingHandler:E,setMissingHandler:L,rt:U,d:z,n:j,tm:q,te:ne,getLocaleMessage:G,setLocaleMessage:X,mergeLocaleMessage:ie,getDateTimeFormat:le,setDateTimeFormat:Y,mergeDateTimeFormat:J,getNumberFormat:te,setNumberFormat:ue,mergeNumberFormat:Se};function F(N){N.locale.value=u.value,N.fallbackLocale.value=a.value,Object.keys(h.value).forEach(W=>{N.mergeLocaleMessage(W,h.value[W])}),Object.keys(c.value).forEach(W=>{N.mergeDateTimeFormat(W,c.value[W])}),Object.keys(l.value).forEach(W=>{N.mergeNumberFormat(W,l.value[W])}),N.escapeParameter=S,N.fallbackFormat=g,N.fallbackRoot=p,N.fallbackWarn=f,N.missingWarn=d,N.warnHtmlMessage=y}return rp(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Zt(Xt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const N=s.value=e.proxy.$i18n.__composer;t==="global"?(u.value=N.locale.value,a.value=N.fallbackLocale.value,h.value=N.messages.value,c.value=N.datetimeFormats.value,l.value=N.numberFormats.value):r&&F(N)}),Ce}const NV=["locale","fallbackLocale","availableLocales"],J_=["t","rt","d","n","tm","te"];function DV(e,t){const n=Object.create(null);return NV.forEach(r=>{const s=Object.getOwnPropertyDescriptor(t,r);if(!s)throw Zt(Xt.UNEXPECTED_ERROR);const o=Ht(s.value)?{get(){return s.value.value},set(u){s.value.value=u}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,r,o)}),e.config.globalProperties.$i18n=n,J_.forEach(r=>{const s=Object.getOwnPropertyDescriptor(t,r);if(!s||!s.value)throw Zt(Xt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,s)}),()=>{delete e.config.globalProperties.$i18n,J_.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}fV();__INTLIFY_JIT_COMPILATION__?k_(aV):k_(oV);eV(P4);tV(ET);if(__INTLIFY_PROD_DEVTOOLS__){const e=nr();e.__INTLIFY__=!0,V4(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}class VT{static getTranslations(){return Q.request("/translations",{type:"GET"})}static getPublicTranslations(t){return Q.request(`/translations/public/${t}`,{type:"GET"})}}let Q_=!1,Z_=!1;const Tt=xV({formatFallbackMessages:!0,silentFallbackWarn:!0,silentTranslationWarn:!0}),FV=async e=>{if(!Q_||!Tt.global.availableLocales.includes(e)){const{data:t}=await VT.getTranslations();Tt.global.setLocaleMessage(e,t),Q_=!0}return Tt.global.locale=e,Wr()},WZ=async e=>{if(!Z_||!Tt.global.availableLocales.includes(e)){const{data:t}=await VT.getPublicTranslations(e);Tt.global.setLocaleMessage(e,t),Z_=!0}return Tt.global.locale=e,Wr()},{t:br}=Tt.global,BV={models:[],modelsAdmin:[],modelsPrivate:[],modelsTorch:[],loading:{},allLoaded:!1},HV={set(e,t){const n=e.models.findIndex(({id:i})=>i===t.id);t.is_public||e.modelsPrivate.push(t),t.framework!=null&&t.framework.includes("Torch")&&e.modelsTorch.push(t),n>=0?e.models.splice(n,1,t):e.models.push(t)},removeModel(e,t){const n=e.models.findIndex(({id:i})=>i===t);n>=0&&e.models.splice(n,1)},setModelsAdmin(e,t){e.modelsAdmin=t}},UV={getAsync({commit:e},{id:t,params:n={}}){return qi.getModel(t,{decorators:[ze.ai_model.ai_training_session],...n}).then(({data:i})=>(e("set",i),i))},forceGetAll({state:e,commit:t,rootState:n},i){if(e.loading.all)return e.loading.all;const s=(n.Auth.is_logged_in?qi.getModels:qi.getPublicModels)(i).then(({data:o})=>(o.forEach(u=>{t("set",u)}),e.allLoaded=!0,delete e.loading.all,o));return e.loading.all=s,s},getModelsAsync({state:e,dispatch:t},n){return e.allLoaded?e.models:t("forceGetAll",n)},getModelsAdminAsync({commit:e},t){return qi.getModelsAdmin(t).then(({data:n})=>(e("setModelsAdmin",n),n)).catch(()=>[])},createAiModel(e,t){return qi.createAiModel(t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:br("AI model successfully created."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:br("Failed to create AI model."),type:"error"},{root:!0}),n})},updateAiModel(e,{id:t,...n}){return qi.updateAiModel(t,n).then(({data:i})=>(e.commit("set",i),e.dispatch("Notifications/displayToastNotification",{msg:br("AI model successfully updated."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:br("Failed to update AI model."),type:"error"},{root:!0}),i})},deleteAiModel(e,{id:t}){return qi.deleteAiModel(t).then(({data:n})=>(e.commit("removeModel",t),e.dispatch("Notifications/displayToastNotification",{msg:br("AI model successfully deleted."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:br("Failed to delete AI model."),type:"error"},{root:!0}),n})},saveAiModelSemanticClassesPrices({dispatch:e},{id:t,payload:n}){return qi.saveAiModelSemanticClassesPrices(t,n).then(({data:i})=>(e("Notifications/displayToastNotification",{msg:br("AI model pricing updated successfully"),type:"success"},{root:!0}),i)).catch(i=>{throw e("Notifications/displayToastNotification",{msg:br("Failed to update AI model pricing."),type:"error"},{root:!0}),i})},getDynamicPriceList(e,{id:t,...n}){return qi.getDynamicPriceList(t,n).then(({data:i})=>i)}},zV={namespaced:!0,state:BV,mutations:HV,actions:UV};class Ze{static getDatasets(t,n){return Q.request(`/organization/${t}/datasets`,{type:"GET",params:{...n}})}static getDatasetsAdmin(t){return Q.request("/admin/datasets",{type:"GET",params:{...t}})}static getDataset(t,n,i){return Q.request(`/organization/${t}/datasets/${n}`,{type:"GET",params:{...i}})}static createDataset(t,n){return Q.request(`/organization/${t}/datasets`,{type:"POST",data:n})}static editDataset(t,n,i){return Q.request(`/organization/${t}/datasets/${n}`,{type:"PUT",data:i})}static deleteDataset(t,n){return Q.request(`/organization/${t}/datasets?dataset_ids=${n.join(",")}`,{type:"DELETE"})}static getImages(t,n){return Q.request(`/organization/${t}/datasets/${n}/images`,{type:"GET"})}static duplicateDataset(t,n){return Q.request(`/organization/${t}/datasets/${n}/duplicate`,{type:"POST"})}static preprocess(t,n){return Q.request(`/organization/${t}/datasets/${n}/preprocess`,{type:"POST"})}static retile(t,n){return Q.request(`/organization/${t}/datasets/${n}/retile`,{type:"POST"})}static runAllCommands(t,n){return Q.request(`/organization/${t}/datasets/${n}/run-all-commands`,{type:"POST"})}static runUserCommands(t,n){return Q.request(`/organization/${t}/datasets/${n}/run-user-commands`,{type:"POST"})}static deletePointWorkerCommand(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/point-worker/${i}`,{type:"DELETE"})}static createVirtualTiles(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/virtual_tiles`,{type:"POST",data:i})}static removeVirtualTiles(t,n){return Q.request(`/organization/${t}/datasets/${n}/virtual_tiles`,{type:"DELETE"})}static getVirtualTiles(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/virtual_tiles`,{type:"GET",params:i})}static updateVirtualTile(t,n,i,r){return Q.request(`/organization/${t}/datasets/${n}/virtual_tiles/${i}`,{type:"PUT",data:r})}static bulkUpdateVirtualTiles(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/virtual_tiles/bulk_update`,{type:"POST",data:i})}static getDatasetRasters(t,n){return Q.request(`/organization/${t}/datasets/${n}/rasters_visualize`,{type:"GET"})}static getPresignedRasterUrl(t,n){return Q.request(`/organization/${t}/rasters/${n}/presign`,{type:"GET"})}static get3DObjects(t,n){return Q.request(`/organization/${t}/datasets/${n}/objects`,{type:"GET"})}static shareDataset(t,n,i){return Q.request(`/organization/${t}/share-with-user`,{type:"POST",data:{asset_model:"App\\Domains\\Datasets\\Models\\DatasetModel",asset_id:n,action:"read",user_email:i}})}static setDatasetFreeToDownload(t,n){return Q.request("/admin/free-datasets",{type:"POST",data:{dataset_id:t,enabled:n}})}static getVectorDatasetVectors(t,n){return Q.request(`/organization/${t}/datasets/${n}/vectors`,{type:"GET"})}static editVectorDatasetVector(t,n,i,r){return Q.request(`/organization/${t}/datasets/${n}/vectors/${i}`,{type:"PUT",data:r})}static deleteVectorDatasetVector(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/vectors/${i}`,{type:"DELETE"})}static getForestInventoryReport(t,n){return Q.request(`/organization/${t}/datasets/${n}/forest_inventory_report/show`,{type:"GET"})}static getForestInventoryReportV2(t,n){return Q.request(`/organization/${t}/datasets/${n}/forest_inventory_report_v2/show`,{type:"GET"})}static convertSchema(t,n,i){return Q.request(`/admin/datasets/pointclouds/${t}/convert-schema`,{type:"PUT",data:{pointcloud_schema:n,source_folder:i}})}}const{t:Mt}=Tt.global;function eb(){this.status=404,this.data={message:"Dataset not found"}}const WV={stroke:{color:"#3399CC",width:1.25},fill:{color:"#ffffff",opacity:.4},point:{radius:5,fill:{color:"#ffffff",opacity:.4},stroke:{color:"#3399CC",width:1.25}}},VV={datasets:[],virtualTiles:{},pagination:{},DEFAULT_VECTOR_STYLES:WV},jV={set(e,t){const n=e.datasets.findIndex(i=>i.id===t.id);n>=0?e.datasets.splice(n,1,t):e.datasets.push(t)}},GV={get(e){return t=>e.datasets.find(n=>n.id===t)},getVirtualTiles(e){return t=>e.virtualTiles[t]||[]},baseDatasetDecorators(e,t,n){return n.Auth?.user?.is_guest?[ze.dataset.user]:[ze.dataset.user,ze.dataset.tags]},getDatasetOrganizationId(e,t,n){return i=>{const r=t.get(i);return r&&r.organization_id?r.organization_id:n.Auth?.organization.id}}},qV={getAsync({dispatch:e,getters:t,rootState:n},{datasetId:i,organizationId:r,params:s}){return r===void 0&&(r=n.Auth.organization.id),Ze.getDataset(r,i,{...s,decorators:[...s?.decorators||[],...t.baseDatasetDecorators]}).then(({data:o})=>{if(o.length===0)throw new eb;return e("set",o)})},getAsyncAdmin({dispatch:e,getters:t},{datasetId:n,params:i}){return Ze.getDatasetsAdmin({"filter[id]":`i=${n}`,...i,decorators:[...i?.decorators||[],...t.baseDatasetDecorators]}).then(({data:r})=>{if(r?.items.length===0)throw new eb;return e("set",r?.items[0])})},getDatasetsAsync({dispatch:e,state:t,rootState:n,getters:i},r){return Ze.getDatasets(n.Auth.organization.id,{order_by:"created_at",order_direction:"desc",...r,decorators:[...r?.decorators||[],...i.baseDatasetDecorators]}).then(({data:s})=>{t.datasets=[],s.items.map(o=>e("set",o)),t.pagination=s.pagination}).then(()=>t.datasets)},createDataset(e,t){return Ze.createDataset(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset created successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset creation failed."),type:"error"},{root:!0}),n})},duplicateDataset(e,t){return Ze.duplicateDataset(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset duplicated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset duplication failed."),type:"error"},{root:!0}),n})},preprocess(e,t){return Ze.preprocess(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset preprocessing started successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset preprocess failed."),type:"error"},{root:!0}),n})},retile(e,t){return Ze.retile(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset re-tiling started successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset re-tile failed."),type:"error"},{root:!0}),n})},runAllCommands(e,t){return Ze.runAllCommands(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset applying all commands started successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset run all commands failed."),type:"error"},{root:!0}),n})},runUserCommands(e,t){return Ze.runUserCommands(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},editDataset(e,t){return t?.tags&&(t.tags=t.tags.map(n=>typeof n!="string"?n.tag_id:n)),Ze.editDataset(e.rootState.Auth.organization.id,t.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset updated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset update failed."),type:"error"},{root:!0}),n})},delete({commit:e,dispatch:t,rootGetters:n,rootState:i},r){return Ze.deleteDataset(i.Auth.organization.id,[r]).then(async({data:s})=>{const o=n["AppState/ImageDatasets/getDatasetImageDataset"](r);return o&&await e("AppState/ImageDatasets/delete",o.id,{root:!0}),t("Notifications/displayToastNotification",{msg:Mt("Dataset deleted successfully."),type:"success"},{root:!0}),s[0]}).catch(s=>{throw t("Notifications/displayToastNotification",{msg:Mt("Dataset deletion failed."),type:"error"},{root:!0}),s})},bulkDelete({commit:e,dispatch:t,rootGetters:n,rootState:i},r){return Ze.deleteDataset(i.Auth.organization.id,[r]).then(async({data:s,index:o})=>{const u=n["AppState/ImageDatasets/getDatasetImageDataset"](r[o]);return u&&await e("AppState/ImageDatasets/delete",u.id,{root:!0}),t("Notifications/displayToastNotification",{msg:Mt("{value} datasets deleted successfully.",{value:s.length}),type:"success"},{root:!0}),s}).catch(s=>{throw t("Notifications/displayToastNotification",{msg:Mt("Datasets deletion failed."),type:"error"},{root:!0}),s})},getPointcloudDataset(e,t){return Ze.getDataset(e.getters.getDatasetOrganizationId(t),t,{decorators:[ze.dataset.datasource,ze.dataset.pointcloudDataset,ze.dataset.pointclouds]}).then(({data:n})=>n)},getImages(e,t){return Ze.getImages(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},async set({dispatch:e,commit:t,getters:n},i){const{image_dataset:r,user:s,datasource:o}=i;return r&&await e("AppState/ImageDatasets/set",r,{root:!0}),s&&await e("AppState/Users/set",s,{root:!0}),o&&await e("AppState/Datasources/set",o,{root:!0}),t("set",i),n.get(i.id)},deletePointWorkerCommand(e,{datasetId:t,commandId:n}){return Ze.deletePointWorkerCommand(e.rootState.Auth.organization.id,t,n).then(({data:i})=>i)},createVirtualTiles(e,{datasetId:t,method:n,length:i}){return Ze.createVirtualTiles(e.rootState.Auth.organization.id,t,{method:n,length:i}).then(({data:r})=>r)},getVirtualTiles({state:e,rootState:t},{datasetId:n,params:i}){return Ze.getVirtualTiles(t.Auth.organization.id,n,i).then(({data:r})=>(e.virtualTiles[n]=r,r))},removeVirtualTiles({state:e,rootState:t},n){return Ze.removeVirtualTiles(t.Auth.organization.id,n).then(({data:i})=>(e.virtualTiles[n]=[],i))},updateVirtualTile({state:e,rootState:t},{datasetId:n,tileId:i,assignee:r,status:s,timeSpent:o}){return Ze.updateVirtualTile(t.Auth.organization.id,n,i,{assignee:r,qc_status:s,time_spent:o}).then(({data:u})=>{const a=e.virtualTiles[n].findIndex(h=>h.id===i);return e.virtualTiles[n].splice(a,1,{...e.virtualTiles[n][a],assignee:r,qc_status:s,time_spent:o}),u})},async bulkUpdateVirtualTiles({rootState:e,dispatch:t},{datasetId:n,tileIds:i,assignee:r,status:s}){try{const{data:o}=await Ze.bulkUpdateVirtualTiles(e.Auth.organization.id,n,{tile_ids:i,assignee:r,qc_status:s});return await t("getVirtualTiles",{datasetId:n}),o}catch(o){throw t("Notifications/displayToastNotification",{msg:Mt("Failed to update virtual tiles"),type:"error"},{root:!0}),o}},getDatasetRasters(e,{datasetOrganizationId:t,datasetId:n}){return Ze.getDatasetRasters(t,n).then(({data:i})=>i)},getPresignedRasterUrl(e,{rasterOrganizationId:t,rasterId:n}){return Ze.getPresignedRasterUrl(t,n).then(({data:i})=>i)},get3DObjects(e,t){return Ze.get3DObjects(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},shareDataset(e,{datasetId:t,email:n}){return Ze.shareDataset(e.rootState.Auth.organization.id,t,n).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mt("Dataset shared successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mt("Failed to share dataset."),type:"error"},{root:!0}),i})},setDatasetFreeToDownload(e,{datasetId:t,enabled:n}){return Ze.setDatasetFreeToDownload(t,n).then(()=>{e.dispatch("Notifications/displayToastNotification",{msg:Mt(n?"Dataset was made free to download.":"Dataset was made pay to download."),type:"success"},{root:!0})}).catch(i=>{let r=Mt(n?"Failed to make dataset free to download.":"Failed to make dataset pay to download.");throw i.status===422&&i?.data?.errors?.dataset_id?.includes("The dataset id has already been taken.")&&(r=Mt("Dataset was already made free to download.")),e.dispatch("Notifications/displayToastNotification",{msg:r,type:"error"},{root:!0}),i})},getVectorDatasetVectors(e,{datasetId:t}){return Ze.getVectorDatasetVectors(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},editVectorDatasetVector({dispatch:e,rootState:t},{datasetId:n,vectorId:i,payload:r}){return Ze.editVectorDatasetVector(t.Auth.organization.id,n,i,r).then(({data:s})=>(e("Notifications/displayToastNotification",{msg:"Vector updated successfully.",type:"success"},{root:!0}),s)).catch(s=>{throw e("Notifications/displayToastNotification",{msg:"Vector update failed.",type:"error"},{root:!0}),s})},deleteVectorDatasetVector({dispatch:e,rootState:t},{datasetId:n,vectorId:i}){return Ze.deleteVectorDatasetVector(t.Auth.organization.id,n,i).then(({data:r})=>(e("Notifications/displayToastNotification",{msg:"Vector deleted successfully.",type:"success"},{root:!0}),r)).catch(r=>{throw e("Notifications/displayToastNotification",{msg:"Vector deletion failed.",type:"error"},{root:!0}),r})},getForestInventoryReport(e,{datasetId:t}){return Ze.getForestInventoryReport(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},getForestInventoryReportV2(e,{datasetId:t}){return Ze.getForestInventoryReportV2(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},convertSchema(e,{datasetId:t,convertTo:n,sourceFolder:i}){return Ze.convertSchema(t,n,i).then(({data:r})=>r)}},KV={namespaced:!0,state:VV,getters:GV,mutations:jV,actions:qV},YV={datasources:[]},XV={set(e,t){const n=e.datasources.findIndex(i=>i.id===t.id);n>=0?e.datasources.splice(n,1,t):e.datasources.push(t)},delete(e,t){const n=e.datasources.findIndex(({id:i})=>i===t);e.datasources.splice(n,1)}},JV={get(e){return t=>e.datasources.find(({id:n})=>n===t)}},QV={async set({commit:e},t){return e("set",t),t}},ZV={namespaced:!0,state:YV,getters:JV,mutations:XV,actions:QV};class ht{static getFlows(t,n={},i={}){return Q.request(`/organization/${t}/flows`,{type:"GET",params:n,...i})}static getPublicFlowTemplates(t={},n={}){return Q.request("/public/flow-templates",{type:"GET",params:t,...n})}static getFlowTemplates(t,n={},i={}){return Q.request(`/organization/${t}/flow-templates`,{type:"GET",params:n,...i})}static getFlowsAdmin(t){return Q.request("/admin/flows",{type:"GET",params:{...t}})}static getPublicFlowNodeDefinitions(){return Q.request("/public/flow-node-definitions",{type:"GET"})}static getFlowNodeDefinitions(t={},n={}){return Q.request("/flow-node-definitions",{type:"GET",params:t,...n})}static getFlowNodeDefinition(t,n={},i={}){return Q.request(`/flow-node-definitions/${t}`,{type:"GET",params:n,...i})}static getFlowNodeTypes(t={},n={}){return Q.request("/flow-node-types",{type:"GET",params:t,...n})}static getFlowExecutions(t,n={},i={}){return Q.request(`/organization/${t}/flow-execution`,{type:"GET",params:n,...i})}static getOrganizationFlowExecutions(t,n={},i={}){return Q.request(`/flow-execution/organization/${t}`,{type:"GET",params:n,...i})}static getFlowExecution(t,n,i={},r={}){return Q.request(`/organization/${t}/flow-execution/${n}`,{type:"GET",params:i,...r})}static getFlowExecutionsAdmin(t){return Q.request("/admin/flow-execution",{type:"GET",params:{...t}})}static getFlowNodeExecutions(t,n,i={}){return Q.request(`/organization/${t}/flow-execution/${n}/flow-node-executions`,{type:"GET",...i})}static getFlow(t,n,i={},r={}){return Q.request(`/organization/${t}/flows/${n}`,{type:"GET",params:i,...r})}static createFlow(t,n,i={}){return Q.request(`/organization/${t}/flows`,{type:"POST",data:n,...i})}static updateFlow(t,n,i,r={}){return Q.request(`/organization/${t}/flows/${n}`,{type:"PUT",data:i,...r})}static deleteFlow(t,n,i={}){return Q.request(`/organization/${t}/flows/${n}`,{type:"DELETE",...i})}static duplicateFlow(t,n,i,r={}){return Q.request(`/organization/${t}/flows/${n}`,{type:"POST",data:i,...r})}static getFlowValidation(t,n={},i={}){return Q.request(`/flows/validate/${t}`,{type:"GET",params:n,...i})}static validateFlow(t,n={}){return Q.request("/flows/validate",{type:"POST",data:t,...n})}static validateFlowPublic(t,n={}){return Q.request("/public/flows/validate",{type:"POST",data:t,...n})}static getFlowEstimateResources(t,n={},i={}){return Q.request(`/flows/estimate-resources/${t}`,{type:"GET",params:n,...i})}static estimateResources(t,n={}){return Q.request("/flows/estimate-resources",{type:"POST",data:t,...n})}static estimateResourcesPublic(t,n={}){return Q.request("/public/flows/estimate-resources",{type:"POST",data:t,...n})}static executeFlow(t,n,i={}){return Q.request(`/organization/${t}/flow-execution/flow/${n}`,{type:"POST",...i})}static stopFlow(t,n,i={}){return Q.request(`/organization/${t}/flow-execution/${n}/stop`,{type:"POST",...i})}static startLogQuery(t,n={}){return Q.request(`/flow-execution/${t}/log`,{type:"POST",...n})}static getLog(t,n={}){return Q.request(`/flow-execution/${t}/log`,{type:"GET",...n})}static submitFlowExecutionDatasetUserFeedback(t,n,i={}){return Q.request(`/organization/${t}/flow-execution-datasets/${n}/user-feedback`,{type:"POST",data:i})}static launch(t,n){return Q.request(`/organization/${t}/flows/${n.flow_id}/launch`,{type:"POST",data:n})}}const jT=(e,{key:t,value:n})=>{t.split(".").reduce((i,r,s,o)=>{if(s+1===o.length)i[r]=n;else if(!Object.prototype.hasOwnProperty.call(i,r)){const u=s+1>=o.length?n:{};i[r]=u}return i[r]},e.settings)},GT=(e,{key:t,promise:n})=>{e.loading[t]=n},qT=(e,t)=>{delete e.loading[t]},KT=e=>t=>!t||!e.settings?e.settings||{}:t.split(".").reduce((n,i)=>Object.prototype.hasOwnProperty.call(n,i)?n[i]:void 0,e.settings),e5={node_definitions:[],loading:{},settings:{all_loaded:!1}},t5={set(e,t){const n=e.node_definitions.findIndex(({id:i})=>i===t.id);n>=0?e.node_definitions.splice(n,1,t):e.node_definitions.push(t)},setSetting:jT,setLoading:GT,deleteLoading:qT},n5={get(e){return t=>e.node_definitions.find(({id:n})=>n===t)},getAll(e){return()=>e.node_definitions},getSetting:KT},i5={getAsync({getters:e,dispatch:t},{nodeDefinitionId:n,params:i}){return e.get(n)||t("forceGet",{nodeDefinitionId:n,params:i})},forceGet({state:e,getters:t,commit:n},{nodeDefinitionId:i,params:r}){let s=e.loading[i];return s||(s=ht.getFlowNodeDefinition(i,r).then(({data:o})=>{n("set",o)}).finally(()=>{n("deleteLoading",i)}),n("setLoading",{key:i,promise:s})),s.then(()=>t.get(i))},getAllAsync({getters:e,dispatch:t}){return e.getSetting("all_loaded")?e.getAll():t("forceGetAll")},forceGetAll({state:e,commit:t,getters:n,rootState:i}){if(e.loading.all)return e.loading.all;const s=(i.Auth.is_logged_in?ht.getFlowNodeDefinitions:ht.getPublicFlowNodeDefinitions)().then(({data:o})=>(o.forEach(u=>{t("set",u)}),t("setSetting",{key:"all_loaded",value:!0}),n.getAll())).finally(()=>{t("deleteLoading","all")});return t("setLoading",{key:"all",promise:s}),s}},r5={state:e5,getters:n5,mutations:t5,actions:i5,namespaced:!0},s5={node_types:[],loading:{},settings:{all_loaded:!1}},o5={set(e,t){const n=e.node_types.findIndex(({id:i})=>i===t.id);n>=0?e.node_types.splice(n,1,t):e.node_types.push(t)},setSetting:jT,setLoading:GT,deleteLoading:qT},a5={get(e){return t=>e.node_types.find(({id:n})=>n===t)},getAll(e){return()=>e.node_types},getSetting:KT},l5={getAllAsync({getters:e,dispatch:t}){return e.getSetting("all_loaded")?e.getAll():t("forceGetAll")},forceGetAll({state:e,commit:t,getters:n}){if(e.loading.all)return e.loading.all;const i=ht.getFlowNodeTypes().then(({data:r})=>(r.forEach(s=>{t("set",s)}),t("setSetting",{key:"all_loaded",value:!0}),n.getAll())).finally(()=>{t("deleteLoading","all")});return t("setLoading",{key:"all",promise:i}),i}},c5={state:s5,getters:a5,mutations:o5,actions:l5,namespaced:!0};class u5{static submitUserFeedback(t={}){return Q.request("/user-feedback",{type:"POST",data:t})}}const{t:tn}=Tt.global;function tb(){this.status=404,this.data={message:"Flow not found"}}function nb(){this.status=404,this.data={message:"Flow execution not found"}}const h5={flows:[],flowTemplates:[],flowExecutions:[],flowExecutionsPagination:{}},d5={setFlowExecutions(e,t){const n=t.map(i=>(i.title=i.flow?.title,i));e.flowExecutions=n},setFlowExecutionsPagination(e,t){e.flowExecutionsPagination=t},setFlows(e,t){e.flows=t},setFlowTemplates(e,t){e.flowTemplates=t}},f5={getAsync(e,{flowId:t,params:n}){return ht.getFlow(e.rootState.Auth.organization.id,t,n).then(({data:i})=>{if(i.length===0)throw new tb;return i})},getAsyncAdmin(e,{flowId:t,params:n}){return ht.getFlowsAdmin({"filter[id]":`i=${t}`,...n}).then(({data:i})=>{if(i?.items.length===0)throw new tb;return i.items[0]})},getFlows({commit:e,rootState:t},n){return ht.getFlows(t.Auth.organization.id,n).then(({data:i})=>(e("setFlows",i),i))},getFlowTemplates({commit:e,rootState:t},n){return(t.Auth.is_logged_in?r=>ht.getFlowTemplates(t.Auth.organization.id,r):ht.getPublicFlowTemplates)({decorators:[ze.flow.flow_nodes_with_options,ze.flow.tags],...n}).then(({data:r})=>(e("setFlowTemplates",r),r))},create(e,t){return ht.createFlow(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow created successfully."),type:"success"},{root:!0}),n.id)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow creation failed."),type:"error"},{root:!0}),n})},update(e,t){return t?.tags&&(t.tags=t.tags.map(n=>typeof n!="string"?n.tag_id:n)),ht.updateFlow(e.rootState.Auth.organization.id,t.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow updated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow update failed."),type:"error"},{root:!0}),n})},delete(e,t){return ht.deleteFlow(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow deleted successfully."),type:"success"},{root:!0}),n.id)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow deletion failed."),type:"error"},{root:!0}),n})},duplicate(e,{flowId:t,projectId:n}){return ht.duplicateFlow(e.rootState.Auth.organization.id,t,{project_id:n}).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow duplicated successfully."),type:"success"},{root:!0}),i.id)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow duplication failed."),type:"error"},{root:!0}),i})},getFlowValidation(e,t){return ht.getFlowValidation(t).then(({data:n})=>n)},validateFlow(e,t){return ht.validateFlow(t).then(({data:n})=>n)},getEstimateResources(e,t){return ht.getFlowEstimateResources(t).then(({data:n})=>n)},estimateResources(e,t){return ht.estimateResources(t).then(({data:n})=>n)},execute(e,t){return ht.executeFlow(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow execution started successfully."),type:"success"},{root:!0}),n)).catch(n=>{if(e.dispatch("Notifications/displayToastNotification",{msg:n.data.message??tn("Failed to start flow execution."),type:"error"},{root:!0}),n.status===404&&n.data.error_key==="statistics-missing"){const i=/\[(.*)\]/g,r=n.data.message.match(i)[0];e.dispatch("Notifications/displayToastNotification",{content:`
                            <div>
                                Can't run flow, dataset
                                <span class="font-bold">
                                    ${r}
                                </span>
                                has not yet finished processing.
                            </div>
                        `,type:"info",timeout:6e4},{root:!0})}throw n.status===405&&e.dispatch("Notifications/displayToastNotification",{msg:tn("You have reached the maximum number of concurrent processing flows. To process more flows in parallel, please upgrade your plan. For more information contract support@flai.ai."),type:"info",timeout:6e4},{root:!0}),n})},stop(e,t){return ht.stopFlow(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Flow execution stopped successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:tn("Failed to stop flow execution."),type:"error"},{root:!0}),n})},async getFlowExecution(e,{flowExecutionId:t,params:n}){return ht.getFlowExecution(e.rootState.Auth.organization.id,t,n).then(({data:i})=>{if(i.length===0)throw new nb;return i})},getFlowExecutionAdmin(e,{flowExecutionId:t,params:n}){return ht.getFlowExecutionsAdmin({"filter[id]":`u=${t}`,...n}).then(({data:i})=>{if(i?.items.length===0)throw new nb;return i.items[0]})},getFlowExecutions({commit:e,rootState:t},n){return ht.getFlowExecutions(t.Auth.organization.id,{...n}).then(({data:i})=>(e("setFlowExecutions",i.items),e("setFlowExecutionsPagination",i.pagination),i))},getFlowExecutionsAdmin({commit:e},t){return ht.getFlowExecutionsAdmin({...t}).then(({data:n})=>(e("setFlowExecutions",n.items),e("setFlowExecutionsPagination",n.pagination),n))},getOrganizationFlowExecutions({commit:e,rootState:t},n){const i=t.Auth.user.organization.id;return ht.getFlowExecutions(i,{...n,"filter[organization_id]":`u=${i}`}).then(({data:r})=>(e("setFlowExecutions",r.items),e("setFlowExecutionsPagination",r.pagination),r))},getFlowNodeExecutions(e,t){return ht.getFlowNodeExecutions(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},submitUserFeedback(e,{feedback:t}){return u5.submitUserFeedback(t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:tn("Feedback submitted."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:tn("Failed to submit feedback."),type:"error"},{root:!0}),n})},launch({rootState:e,dispatch:t},n){return ht.launch(e.Auth.organization.id,n).then(({data:i})=>(t("Notifications/displayToastNotification",{msg:tn("Flow execution started successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw t("Notifications/displayToastNotification",{msg:tn("Failed to start flow."),type:"error"},{root:!0}),i})}},p5={namespaced:!0,state:h5,mutations:d5,actions:f5},g5={image_datasets:[]},m5={set(e,t){const n=e.image_datasets.findIndex(i=>i.id===t.id);n>=0?e.image_datasets.splice(n,1,t):e.image_datasets.push(t)},delete(e,t){const n=e.image_datasets.findIndex(i=>i.id===t);n>=0&&e.image_datasets.splice(n,1)}},v5={getImageDatasets(e){return t=>e.image_datasets.find(n=>n.id===t)},getDatasetImageDataset(e){return t=>e.image_datasets.find(n=>n.dataset_id===t)}},y5={set({commit:e},t){return e("set",t),t}},_5={namespaced:!0,state:g5,getters:v5,mutations:m5,actions:y5};class b5{static getImages(t,n={},i={}){return Q.request(`/organization/${t}/images`,{type:"GET",params:n,...i})}static getImage(t,n,i={},r={}){return Q.request(`/organization/${t}/images/${n}`,{type:"GET",params:i,...r})}static createImage(t,n,i={}){return Q.request(`/organization/${t}/images`,{type:"POST",data:n,...i})}static updateImage(t,n,i,r={}){return Q.request(`/organization/${t}/images/${n}`,{type:"PUT",data:i,...r})}static deleteImage(t,n,i,r={}){return Q.request(`/organization/${t}/images/${n}`,{type:"DELETE",data:i,...r})}}const w5={images:[]},S5={update(e,t){const n=t.id;return b5.updateImage(e.rootState.Auth.organization.id,n,t).then(({data:i})=>i)}},T5={namespaced:!0,state:w5,actions:S5};class ac{static getCommands(t,n){return Q.request(`/organization/${t}/point-worker/get-commands/${n}`,{type:"GET"})}static setCommand(t,n){return Q.request(`/organization/${t}/point-worker/set-command`,{type:"POST",data:n})}static getCommandById(t,n){return Q.request(`/organization/${t}/point-worker/get-command-by-id/${n}`,{type:"GET"})}static getNextInstanceId(t,n){return Q.request(`/organization/${t}/point-worker/get-next-instance-id/${n}`,{type:"GET"})}}const E5={pendingCommands:{}},A5={setPendingCommands(e,{datasetId:t,commands:n}){e.pendingCommands[t]=n},removePendingCommands(e,{datasetId:t,commandIds:n}){e.pendingCommands[t]=e.pendingCommands[t].filter(i=>!n.includes(i.id))},addPendingCommand(e,{datasetId:t,command:n}){e.pendingCommands[t]||(e.pendingCommands[t]=[]),e.pendingCommands[t].push(n)}},C5={},x5={getCommands(e,t){return ac.getCommands(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.commit("setPendingCommands",{datasetId:t,commands:n.filter(i=>i.potree_status==="pending")}),n))},getCommandById(e,t){return ac.getCommandById(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},setCommand(e,t){return ac.setCommand(e.rootState.Auth.organization.id,t).then(({data:n})=>{if(e.rootState.Auth.organization.apply_point_worker_commands)return n;const i=e.rootState.Auth.user.id;return e.commit("addPendingCommand",{datasetId:t.dataset_id,command:{id:n.id,potree_status:"pending",created_by:i}}),n})},async undoCommand(e,t){const n=e.state.pendingCommands[t].slice(-1)[0].id;return e.dispatch("AppState/Datasets/deletePointWorkerCommand",{datasetId:t,commandId:n},{root:!0}).then(({success:i})=>(e.commit("removePendingCommands",{datasetId:t,commandIds:[i]}),i)).catch(i=>{i.status===404&&e.commit("removePendingCommands",{datasetId:t,commandIds:[n]})})},runAllCommands(e,t){return e.dispatch("AppState/Datasets/runAllCommands",t,{root:!0}).then(n=>(e.commit("removePendingCommands",{datasetId:t,commandIds:n}),n))},runUserCommands(e,t){return e.dispatch("AppState/Datasets/runUserCommands",t,{root:!0}).then(n=>(e.commit("removePendingCommands",{datasetId:t,commandIds:n}),n))},getNextInstanceId(e,t){return ac.getNextInstanceId(e.rootState.Auth.organization.id,t).then(({data:n})=>n)}},M5={namespaced:!0,state:E5,getters:C5,mutations:A5,actions:x5};class as{static getProjects(t,n,i={}){return Q.request(`/organization/${t}/projects`,{type:"GET",params:n,...i})}static getProjectsAdmin(t){return Q.request("/admin/projects",{type:"GET",params:t})}static getProject(t,n,i,r={}){return Q.request(`/organization/${t}/projects/${n}`,{type:"GET",params:i,...r})}static createProject(t,n,i={}){return Q.request(`/organization/${t}/projects`,{type:"POST",data:n,...i})}static editProject(t,n,i,r={}){return Q.request(`/organization/${t}/projects/${n}`,{type:"PUT",data:i,...r})}static removeProject(t,n,i={}){return Q.request(`/organization/${t}/projects/${n}`,{type:"DELETE",...i})}}const k5={projectId:null,datasets:[],datasetsPagination:{},flows:[],flowsPagination:{},flowExecutions:[],flowExecutionsPagination:{},multiViews:[],multiViewsPagination:{},loading:{datasets:!0,flows:!0,flowExecutions:!0,multiViews:!0}},$5={setDatasets(e,{items:t,pagination:n}){e.datasets=t,e.datasetsPagination=n},setFlows(e,{items:t,pagination:n}){e.flows=t,e.flowsPagination=n},setFlowExecutions(e,{items:t,pagination:n}){e.flowExecutions=t,e.flowExecutionsPagination=n},setMultiViews(e,{items:t,pagination:n}){e.multiViews=t,e.multiViewsPagination=n},setLoading(e,{key:t,value:n}){e.loading[t]=n}},I5={async setProjectId({state:e},t){e.projectId=t},async getDatasets({state:e,commit:t,rootState:n},i){return t("setLoading",{key:"datasets",value:!0}),Ze.getDatasets(n.Auth.organization.id,{order_by:"created_at",order_direction:"desc",attributes:"with_project_id","filter[project_id]":e.projectId,...i,decorators:[...i?.decorators||[],...n.Auth?.user?.is_guest?[ze.dataset.user]:[ze.dataset.user,ze.dataset.tags]]}).then(({data:r})=>(t("setDatasets",r),e.datasets)).finally(()=>{t("setLoading",{key:"datasets",value:!1})})},getFlows({state:e,commit:t,rootState:n},i){return t("setLoading",{key:"flows",value:!0}),ht.getFlows(n.Auth.organization.id,{order_by:"created_at",order_direction:"desc",decorators:[ze.flow.flow_details],"filter[project_id]":e.projectId,"filter[is_template]":"b=0",...i}).then(({data:r})=>(t("setFlows",r),e.flows)).finally(()=>{t("setLoading",{key:"flows",value:!1})})},getFlowExecutions({state:e,commit:t,rootState:n},i){return t("setLoading",{key:"flowExecutions",value:!0}),ht.getFlowExecutions(n.Auth.organization.id,{"filter[project_id]":`u=${e.projectId}`,order_by:"created_at",order_direction:"desc",...i}).then(({data:r})=>(t("setFlowExecutions",r),e.flowExecutions)).finally(()=>{t("setLoading",{key:"flowExecutions",value:!1})})},async getMultiViews({state:e,commit:t,dispatch:n},i){t("setLoading",{key:"multiViews",value:!0});const r=await n("AppState/MultiViews/getMultiViewsWithViewports",{projectId:e.projectId,params:{order_by:"created_at",order_direction:"desc",...i}},{root:!0}),s={id:`project-${e.projectId}`,multiview_title:"Default",isDefault:!0,projectId:e.projectId,sync_viewports:!1,viewports:[],viewportRows:[]};return r.items.unshift(s),t("setMultiViews",r),t("setLoading",{key:"multiViews",value:!1}),e.multiViews}},R5={namespaced:!0,state:k5,mutations:$5,actions:I5},{t:cs}=Tt.global;function yd(){this.status=404,this.data={message:cs("Project not found")}}const L5={projects:[],pagination:{}},O5={SET_PROJECTS:(e,t=[])=>{e.projects=t},delete(e,t){const n=e.projects.findIndex(({id:i})=>i===t);e.projects.splice(n,1)}},P5={getAsync(e,{projectId:t,params:n}){return as.getProject(e.rootState.Auth.organization.id,t,n).then(({data:i})=>{if(i.length===0)throw new yd;return i})},getProjects({state:e,commit:t,rootState:n},i){return as.getProjects(n.Auth.organization.id,{decorators:[ze.project.user],order_by:"created_at",order_direction:"desc",...i}).then(({data:r})=>(t("SET_PROJECTS",r.items),e.pagination=r.pagination,r.items))},getProject(e,t){const n={decorators:[ze.project.user]};return as.getProject(e.rootState.Auth.organization.id,t,n).then(({data:i})=>{if(i.length===0)throw new yd;return i})},getProjectAdmin(e,t){const n={decorators:[ze.project.user]};return as.getProjectsAdmin({"filter[id]":`i=${t}`,...n}).then(({data:i})=>{if(i?.items.length===0)throw new yd;return i.items[0]})},create(e,t){return as.createProject(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:cs("Project created successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:cs("Project creation failed."),type:"error"},{root:!0}),n})},update(e,t){const n=t.id;return as.editProject(e.rootState.Auth.organization.id,n,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:cs("Project updated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:cs("Project update failed."),type:"error"},{root:!0}),i})},delete({commit:e,dispatch:t,rootState:n},i){return as.removeProject(n.Auth.organization.id,i).then(({data:r})=>(t("Notifications/displayToastNotification",{msg:cs("Project deleted successfully."),type:"success"},{root:!0}),e("delete",i),r)).catch(r=>{throw t("Notifications/displayToastNotification",{msg:cs("Project deletion failed."),type:"error"},{root:!0}),r})}},N5={namespaced:!0,state:L5,mutations:O5,actions:P5,modules:{Details:R5}};class _d{static createProjectDataset(t,n,i={}){return Q.request(`/organization/${t}/project_datasets`,{type:"POST",data:n,...i})}static removeProjectDataset(t,n,i={}){return Q.request(`/organization/${t}/project_datasets/${n}`,{type:"DELETE",...i})}static downloadProjectDatasets(t,n){return Q.request(`/organization/${t}/project_datasets/${n}/download`,{type:"POST"})}}const{t:lc}=Tt.global,D5={project_datasets:[]},F5={},B5={create(e,t){return _d.createProjectDataset(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:lc("Dataset successfully added to project."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:lc("Failed to to add dataset to project."),type:"error"},{root:!0}),n})},remove(e,t){return _d.removeProjectDataset(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:lc("Dataset successfully removed from project."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:lc("Failed to to remove dataset from project."),type:"error"},{root:!0}),n})},downloadDatasets(e,t){return _d.downloadProjectDatasets(e.rootState.Auth.organization.id,t).then(({data:n})=>n)}},H5={namespaced:!0,state:D5,mutations:F5,actions:B5},ib={decorators:[ze.session.user,ze.session.input_ai_model,ze.session.training_dataset,ze.session.validation_dataset]};class pa{static getSessions(t){return Q.request(`/organization/${t}/ai-models/ai-training-sessions`,{type:"GET",params:ib})}static getSession(t,n){return Q.request(`/organization/${t}/ai-models/ai-training-sessions/${n}`,{type:"GET",params:ib})}static createSession(t,n){return Q.request(`/organization/${t}/ai-models/ai-training-sessions`,{type:"POST",data:n})}static deleteSession(t,n){return Q.request(`/organization/${t}/ai-models/ai-training-sessions/${n}`,{type:"DELETE"})}static getSessionDatasetValidationMetrics(t,n){return Q.request(`/organization/${t}/ai-models/ai-training-sessions/${n}/dataset-validation-metrics`,{type:"GET"})}}const{t:cc}=Tt.global,U5={sessions:[]},z5={SET_SESSIONS:(e,t=[])=>{e.sessions=t},REMOVE_SESSION:(e,t)=>{const n=e.sessions.findIndex(i=>i.id===t);n>=0&&e.sessions.splice(n)}},W5={getSessions({commit:e,rootState:t}){return pa.getSessions(t.Auth.organization.id).then(({data:n})=>{e("SET_SESSIONS",n)})},getSession(e,t){return pa.getSession(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},createSession(e,t){return pa.createSession(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:cc("Session created successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:cc("Session creation failed."),type:"error"},{root:!0}),n})},deleteSession(e,{sessionId:t}){return pa.deleteSession(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:cc("Session deleted successfully."),type:"success"},{root:!0}),e.commit("REMOVE_SESSION",n.id),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:cc("Session deletion failed."),type:"error"},{root:!0}),n})},getSessionDatasetValidationMetrics(e,{sessionId:t}){return pa.getSessionDatasetValidationMetrics(e.rootState.Auth.organization.id,t).then(({data:n})=>n)}},V5={namespaced:!0,state:U5,mutations:z5,actions:W5},Ct={MAIN_NAVIGATION_TOP:"MAIN_NAVIGATION_TOP",MAIN_NAVIGATION_BOTTOM:"MAIN_NAVIGATION_BOTTOM",MAIN_HEADER_LEFT:"MAIN_HEADER_LEFT",MAIN_HEADER_RIGHT:"MAIN_HEADER_RIGHT",MAIN_CONTENT:"MAIN_CONTENT"},rb="label",zn="tool",j5={},G5={pages:{type:rb},"pages/dashboard":{type:zn,positions:[{group:1,order:1,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}],settings:{}},"pages/projects":{type:zn,positions:[{group:1,order:2,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"pages/catalogue":{type:zn,positions:[{group:1,order:3,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"general/flai-hub":{type:zn,positions:[{group:1,order:4,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"pages/ai-models":{type:zn,positions:[{group:1,order:5,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"pages/ai-learning-point":{type:zn,positions:[{group:1,order:6,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"pages/downloads":{type:zn,positions:[{group:1,order:7,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"pages/cli-dashboard":{type:zn,positions:[{group:1,order:8,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}]},"pages/reseller-dashboard":{type:zn,positions:[{group:1,order:10,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}],settings:{}},"pages/admin":{type:zn,positions:[{group:1,order:11,contentPosition:Ct.MAIN_CONTENT,buttonPosition:Ct.MAIN_NAVIGATION_TOP}],settings:{}},general:{type:rb},"general/user-profile":{type:zn,positions:[{group:1,order:1,buttonPosition:Ct.MAIN_HEADER_RIGHT}]},"general/docs":{type:zn,positions:[{group:2,order:1,buttonPosition:Ct.MAIN_NAVIGATION_BOTTOM}]},"general/support":{type:zn,positions:[{group:2,order:2,buttonPosition:Ct.MAIN_NAVIGATION_BOTTOM}]},...j5},q5={tools:Object.freeze(G5),placeholders:Object.freeze(Ct),superAdminTools:["pages/admin"],resellerTools:["pages/reseller-dashboard"]},K5={toolsOnPlaceholder(e,t,n,i){let r=window.ENV_VARS.DISABLED_TOOLS||[];return i["Auth/isSuperAdmin"]||(r=r.concat(e.superAdminTools)),i["Auth/isReseller"]||(r=r.concat(e.resellerTools)),Object.keys(e.placeholders).reduce((s,o)=>(s.button[o]=[],s.content[o]=[],Object.entries(e.tools).filter(([u,a])=>!r.includes(u)&&a.positions).forEach(([u,a])=>{a.positions.forEach(h=>{h.buttonPosition===o&&s.button[o].push(u),h.contentPosition===o&&s.content[o].push(u)})}),s),{button:{},content:{}})}},Y5={state:q5,getters:K5,namespaced:!0};class Ci{static getUsers(t,n={}){return Q.request(`/organization/${t}/users`,{type:"GET",...n})}static inviteUser(t,n,i={}){return Q.request(`/organization/${t}/user/invite`,{type:"POST",data:n,...i})}static createUser(t,n){return Q.request(`/organization/${t}/users`,{type:"POST",data:n})}static resendInvite(t,n,i={}){return Q.request(`/organization/${t}/user/${n}/resend-invitation`,{type:"POST",...i})}static deleteUser(t,n,i={}){return Q.request(`/organization/${t}/users/${n}`,{type:"DELETE",...i})}static updateUser(t,n,i,r={}){return Q.request(`/organization/${t}/users/${n}`,{type:"PUT",data:i,...r})}static switchToOrganization(t,n={}){return Q.request(`/organization/${t}/switch`,{type:"post",...n})}static adminUpdateUserPassword(t,n,i){return Q.request(`/organization/${t}/user/${n}/update-password`,{type:"PUT",data:{password:i}})}}const{t:Xn}=Tt.global,X5={users:[]},J5={set(e,t){const n=e.users.findIndex(({id:i})=>i===t.id);n>=0?e.users.splice(n,1,t):e.users.push(t)},SET_USERS:(e,t=[])=>{e.users=t},delete(e,t){const n=e.users.findIndex(({id:i})=>i===t);e.users.splice(n,1)}},Q5={get(e){return t=>e.users.find(({id:n})=>n===t)}},Z5={set({commit:e},t){return e("set",t),t},getUsers({commit:e,rootState:t}){return Ci.getUsers(t.Auth.organization.id).then(({data:n})=>{e("SET_USERS",n)})},invite(e,t){return Ci.inviteUser(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Xn("User invitation successful."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Xn("User invitation failed."),type:"error"},{root:!0}),n})},createUser(e,t){return Ci.createUser(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Xn("User creation successful."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Xn("User creation failed."),type:"error"},{root:!0}),n})},resendInvite(e,t){return Ci.resendInvite(e.rootState.Auth.organization.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Xn("Successfully resend user invite."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Xn("Failed to resend user invite."),type:"error"},{root:!0}),n})},switch(e,t){return Ci.switchToOrganization(t).then(()=>e.dispatch("Auth/logout",{},{root:!0})).then(()=>window.location.reload())},delete({commit:e,dispatch:t,rootState:n},i){return Ci.deleteUser(n.Auth.organization.id,i).then(({data:r})=>(t("Notifications/displayToastNotification",{msg:Xn("User deleted successfully."),type:"success"},{root:!0}),e("delete",i),r)).catch(r=>{throw t("Notifications/displayToastNotification",{msg:Xn("User deletion failed."),type:"error"},{root:!0}),r})},update(e,t){const n=t.id;return Ci.updateUser(e.rootState.Auth.organization.id,n,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Xn("User updated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Xn("User update failed."),type:"error"},{root:!0}),i})},adminUpdateUserPassword(e,{id:t,password:n}){return Ci.adminUpdateUserPassword(e.rootState.Auth.user_active_organization_id,t,n).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Xn("User password updated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Xn("User password update failed."),type:"error"},{root:!0}),i})}},ej={state:X5,getters:Q5,mutations:J5,actions:Z5,namespaced:!0};class Pr{static getOrganizations(t,n={}){return Q.request("/organizations",{type:"GET",params:t,...n})}static getOrganization(t,n,i={}){return Q.request(`/organizations/${t}/show`,{type:"GET",params:n,...i})}static createOrganization(t,n,i={}){return Q.request("/organizations",{type:"POST",data:t,params:n,...i})}static updateOrganization(t,n,i={}){return Q.request(`/organizations/${t}`,{type:"PUT",data:n,...i})}}const{t:uc}=Tt.global,tj={organizations:[],pagination:{}},nj={SET_ORGANIZATIONS:(e,t=[])=>{e.organizations=t.items,e.pagination=t.pagination}},ij={getAsync(e,{organizationId:t,params:n}){return Pr.getOrganization(t,n).then(({data:i})=>i)},getOrganizations({commit:e},t){return Pr.getOrganizations(t).then(({data:n})=>(e("SET_ORGANIZATIONS",n),n.items))},create(e,t){return Pr.createOrganization(t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:uc("Organization created successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:uc("Organization creation failed."),type:"error"},{root:!0}),n})},updateOrganization(e,t){return Pr.updateOrganization(t.id,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:uc("Organization updated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:uc("Organization update failed."),type:"error"},{root:!0}),n})}},rj={namespaced:!0,state:tj,mutations:nj,actions:ij};class sj{static getFailedJobs(t,n={}){return Q.request("/failed-jobs",{type:"GET",params:t,...n})}}const oj={failed_jobs:[],pagination:{}},aj={SET_FAILED_JOBS:(e,t=[])=>{e.failed_jobs=t},SET_PAGINATION:(e,t={})=>{e.pagination=t}},lj={getFailedJobs({commit:e},t){return sj.getFailedJobs(t).then(({data:n})=>{e("SET_FAILED_JOBS",n.items),e("SET_PAGINATION",n.pagination)})}},cj={namespaced:!0,state:oj,mutations:aj,actions:lj};class sb{static getFailedPublishEvents(t,n={}){return Q.request("/failed-publish-events",{type:"GET",params:t,...n})}static republishFailedPublishEvents(t,n,i={}){return Q.request(`/failed-publish-events/${t}/republish`,{type:"POST",data:{},params:n,...i})}}const uj={failedPublishEvents:[],pagination:{}},hj={SET_FAILED_PUBLISH_EVENTS:(e,t=[])=>{e.failedPublishEvents=t},SET_PAGINATION:(e,t={})=>{e.pagination=t}},dj={getFailedPublishEvents({commit:e},t){return sb.getFailedPublishEvents(t).then(({data:n})=>{e("SET_FAILED_PUBLISH_EVENTS",n.items),e("SET_PAGINATION",n.pagination)})},republish(e,t){return sb.republishFailedPublishEvents(t).then(({data:n})=>n)}},fj={namespaced:!0,state:uj,mutations:hj,actions:dj};class Gs{static createDownload(t,{items:n,options:i,datasource:r}){return Q.request(`/organization/${t}/downloads`,{type:"POST",data:{items:n,export_options:i,export_datasource:r}})}static getDownloads(t,n,i={}){return Q.request(`/organization/${t}/downloads`,{type:"GET",params:{...n},...i})}static getDownloadUrl(t,n,i,r={}){return Q.request(`/organization/${t}/file-downloads/${n}/download`,{type:"GET",params:{...i},...r})}static makeFreeDownload(t){return Q.request(`/file-downloads/${t}/make-free`,{type:"POST"})}static getConnectedPayableItems(t,n){return Q.request(`/organization/${t}/file-downloads/connected-payable-items`,{type:"GET",params:{download_file_ids:n}})}static getNonAppliedPUInfo(t,n){return Q.request(`/organization/${t}/file-downloads/${n}/non-applied-pu-info`,{type:"GET"})}}const{t:pj}=Tt.global,gj={projects:[],downloads:[],pagination:{}},mj={set(e,t){const n=e.downloads.findIndex(i=>i.id===t.id);n>=0?e.downloads.splice(n,1,t):e.downloads.push(t)}},vj={download({commit:e,dispatch:t,rootState:n},i){return Gs.createDownload(n.Auth.organization.id,i).then(({data:r})=>r)},getDownloadsAsync({commit:e,state:t,rootState:n},i){return Gs.getDownloads(n.Auth.organization.id,{decorators:["files","queue_items"],order_by:"created_at",order_direction:"desc",...i}).then(({data:r})=>{t.downloads=[],r.items.map(s=>e("set",s)),t.pagination=r.pagination}).then(()=>t.downloads)},getDownloadUrl({commit:e,dispatch:t,rootState:n},{downloadFileId:i,tryDownload:r}){return Gs.getDownloadUrl(n.Auth.organization.id,i,{tryDownload:r}).then(({data:s})=>s)},makeFreeDownload(e,t){return Gs.makeFreeDownload(t).then(({data:n})=>{e.commit("set",n),e.dispatch("Notifications/displayToastNotification",{msg:pj("Download is now free."),type:"success"},{root:!0})})},getConnectedPayableItems({rootState:e},t){return Gs.getConnectedPayableItems(e.Auth.organization.id,t).then(({data:n})=>n)},getNonAppliedPUInfo({rootState:e},t){return Gs.getNonAppliedPUInfo(e.Auth.organization.id,t).then(({data:n})=>n)}},yj={namespaced:!0,state:gj,mutations:mj,actions:vj},VZ={INVOICE:"invoice",CARD:"card"},jZ={SUCCESS:"success",CANCEL:"cancel"},GZ={CANCEL_AT_PERIOD_END:"cancel_at_period_end"},qZ={ACTIVE_SUBSCRIPTION:"active_subscription"},KZ={ACTIVE:"active"};class kt{static getBillingBundles(t={},n={}){return Q.request("/billing/bundles-valid",{type:"GET",params:{decorators:[ze.billing.billing_bundle_limits,ze.billing.billing_bundle_price],...t},options:n})}static getBillingBundle(t,n={},i={}){const r=`/billing/bundles/${t}`;return Q.request(r,{type:"GET",params:{decorators:[ze.billing.billing_bundle_limits,ze.billing.billing_bundle_price],...n},options:i})}static createBillingOrder(t){const n="/billing/orders";return Q.request(n,{type:"POST",data:t})}static cancelBillingOrderSubscription(t,n){const i=`/billing/orders/subscriptions/${t}/cancel`;return Q.request(i,{type:"POST",data:n})}static renewBillingOrderSubscription(t){const n=`/billing/orders/subscriptions/${t}/renew`;return Q.request(n,{type:"POST"})}static getBillingOrder(t,n={},i={}){const r=`/billing/orders/${t}`;return Q.request(r,{type:"GET",params:n,options:i})}static getOrganizationBilling(t,n={},i={}){const r=`/organizations/${t}/consumption`;return Q.request(r,{type:"GET",params:n,options:i})}static getOrganizationBillingByBillingPeriod(t,n,i={},r={}){const s=`/organizations/${t}/consumption/billing-period/${n}`;return Q.request(s,{type:"GET",params:i,options:r})}static getAllOrganizationsBilling(t={},n={}){return Q.request("/organizations/consumption",{type:"GET",params:t,options:n})}static changeOrganizationBillingPlan(t,n,i,r={}){return Q.request(`/organizations/${t}/billing-bundle`,{type:"PUT",data:{billing_bundle_id:n,force_flags:i},...r})}static getOrganizationBilledFlowExecutions(t){return Q.request(`/organization/${t.organizationId}/flow-execution`,{type:"GET",params:{decorators:[ze.flow_executions.node_executions_billed_processing_units],...t}})}static cancelFlowExecutionBilling(t,n){return Q.request(`/flow-execution/organization/${t}/execution/${n}/cancel_processing_units`,{type:"POST"})}static getBillingCountries(t,n={}){return Q.request("/billing/countries",{type:"GET",params:t,...n})}static getBillingCountry(t){return Q.request(`/billing/countries/${t}`,{type:"GET"})}static orderPayableItems(t){return Q.request("/billing/orders/payable-items",{type:"POST",data:t})}static getMinimumOrder(t,n={}){return Q.request("/billing/minimum-order",{type:"GET",params:t,...n})}static getBulkDiscount(t){return Q.request(`/public/billing/bulk-discounts/discount-pus/${t}`,{type:"GET"})}static getOrganizationOrders(t,n){return Q.request(`/organizations/${t}/orders`,{type:"GET",params:n})}static getOrganizationOrder(t,n){return Q.request(`/organizations/${t}/orders/${n}`,{type:"GET"})}static getAllOrganizationsOrders(t){return Q.request("/organizations/orders",{type:"GET",params:t})}static getOrder(t){return Q.request(`/organizations/orders/${t}`,{type:"GET"})}static getPaymentInvoicePresignUrl(t){return Q.request(`/billing/payments/${t}/download-invoice`,{type:"GET"})}static cancelChildOrder(t){return Q.request(`/billing/orders/subsidiary-orders/${t}/cancel`,{type:"POST"})}static getAvailableGrantedProcessingUnits(t){return Q.request(`/billing/available-granted-resources/processing_units/organizations/${t}`,{type:"GET"})}}const{t:In}=Tt.global,_j={organizationBillings:{},organizationBillingsBundle:{},organizationBillingPeriods:{},billingResourceNamePrices:{},billingBundles:[],billedFlows:[],billedFlowsPagination:{},billingCountries:[],billingCountriesPagination:{},minimumOrder:{},displayNames:{processing_units:"Processing units",storage:"Storage",users:"Users"},units:{storage:"GB",compute_execution_time:"s"},orders:[],ordersPagination:{},currencies:{eur:{symbol:"\u20AC"},jpy:{symbol:"JP\xA5"}}},bj=(e,t)=>Object.keys(t).reduce((n,i)=>(n[i]={},t[i].forEach(r=>{n[i][r.resource_name]={id:r.id,name:e.displayNames[r.resource_name]||r.resource_name,value:e.displayNames[r.value]||r.value}}),n),{}),wj={getFormattedOrganizationBillings(e){return bj(e,e.organizationBillings)},getOrganizationBillingsBundle(e){return e.organizationBillingsBundle}},Sj={setOrganizationBilling(e,{billing:t,organizationId:n}){t.length!==0&&(e.organizationBillings[n]=t)},setOrganizationBillingBundle(e,{bundleInfo:t,organizationId:n}){e.organizationBillingsBundle[n]={...t,organization_name:t.name,organization_id:n,bundle_name:t.billing_bundle[0].bundle_name,limits:t.billing_bundle_limits.reduce((i,r)=>(i[r.resource_name]=r,i),{}),max_parallel_flow_executions:t.billing_bundle[0].max_parallel_flow_executions}},setOrganizationBillingPeriods(e,{billingPeriods:t,organizationId:n}){e.organizationBillingPeriods[n]=t},setOrganizationBillingPeriodConsumption(e,{billingPeriodId:t,organizationId:n,consumption:i}){const r=e.organizationBillingPeriods[n].findIndex(s=>s.id===t);e.organizationBillingPeriods[n][r].consumption=i.reduce((s,o)=>(s[o.resource_name]={name:o.resource_name,value:o.value,over_bundle_limit:o.over_bundle_limit??null},s),{})},setBillingBundles(e,t){e.billingBundles=Object.values(t)},setBillingCountries:(e,t={})=>{e.billingCountries=t.items,e.billingCountriesPagination=t.pagination},setMinimumOrder:(e,t={})=>{e.minimumOrder=t.items},setOrders(e,t){e.orders=t},setOrdersPagination(e,t){e.ordersPagination=t}},Tj={async getOrganizationBillingInfo({commit:e,rootState:t}){const{data:n}=await kt.getOrganizationBilling(t.Auth.organization.id);return e("setOrganizationBilling",{billing:n,organizationId:t.Auth.organization.id}),n},async getOrganizationBillingInfoById({commit:e},t){const{data:n}=await kt.getOrganizationBilling(t);return e("setOrganizationBilling",{billing:n,organizationId:t}),n},async getAllOrganizationsBillingInfo({commit:e}){const{data:t}=await kt.getAllOrganizationsBilling();return Object.keys(t).forEach(n=>{e("setOrganizationBilling",{billing:t[n],organizationId:n})}),t},async getOrganizationBillingBundle({commit:e},t){const{data:n}=await Pr.getOrganization(t,{decorators:[ze.organization.billing_bundle,ze.organization.billing_bundle_limits,ze.organization.billing_information,ze.organization.billing_periods,ze.organization.active_billing_subscription_orders]});return e("setOrganizationBillingBundle",{bundleInfo:n,organizationId:t}),e("setOrganizationBillingPeriods",{organizationId:t,billingPeriods:n.billing_periods}),n},async getOrganizationBillingPeriodConsumption({state:e,commit:t},{organizationId:n,billingPeriodId:i}){const r=e.organizationBillingPeriods[n].find(o=>o.id===i);if(r.consumption)return r;const{data:s}=await kt.getOrganizationBillingByBillingPeriod(n,i);return t("setOrganizationBillingPeriodConsumption",{billingPeriodId:i,organizationId:n,consumption:s}),r},async getAllOrganizationsBillingBundle({commit:e}){const{data:t}=await Pr.getOrganizations({decorators:[ze.organization.billing_bundle,ze.organization.billing_bundle_limits,ze.organization.billing_periods]});return t.items.forEach(n=>{e("setOrganizationBillingBundle",{bundleInfo:n,organizationId:n.id}),e("setOrganizationBillingPeriods",{billingPeriods:n.billing_periods,organizationId:n.id})}),t.items},async updateOrganizationBillingInfo({dispatch:e,state:t},{id:n,payload:i}){return Pr.updateOrganization(n,i).then(({data:r})=>(e("Notifications/displayToastNotification",{msg:In("Billing information updated successfully."),type:"success"},{root:!0}),t.organizationBillingsBundle[n].billing_information=i,r)).catch(r=>{throw e("Notifications/displayToastNotification",{msg:In("Failed to update billing information."),type:"error"},{root:!0}),r})},async getBillingBundles({commit:e}){return kt.getBillingBundles().then(({data:t})=>(e("setBillingBundles",t),t))},async getBillingBundle(e,{billingBundleId:t}){return kt.getBillingBundle(t).then(({data:n})=>n)},async getBillingOrder(e,{order_id:t}){return kt.getBillingOrder(t).then(({data:n})=>n)},async changeBillingPlan({dispatch:e},{organizationId:t,billingPlanId:n,forceFlags:i,showError:r=!0}){try{return await kt.changeOrganizationBillingPlan(t,n,i),e("Notifications/displayToastNotification",{msg:In("Billing plan successfully changed."),type:"success"},{root:!0}),e("getOrganizationBillingBundle",t)}catch(s){throw r&&e("Notifications/displayToastNotification",{msg:In("Failed to change billing plan."),type:"error"},{root:!0}),s}},async getOrganizationBilledFlowExecutions({state:e},t){return t.organizationId?kt.getOrganizationBilledFlowExecutions(t).then(({data:n})=>(e.billedFlows=n.items.reduce((i,r)=>{const s=r.node_executions_billed_processing_units,o={id:r.id,flow_title:r.flow_title,finished_at:r.finished_at,created_at:r.created_at};return s&&s.length>0?(o.is_canceled=s[0].billed_processing_units[0].canceled_billing_id!==null,o.value=s.reduce((u,a)=>(u+=parseFloat(a.billed_processing_units[0].value),u),0),o.is_canceled&&(o.message="Already canceled")):o.message="Nothing to cancel",i.push(o),i},[]),e.billedFlowsPagination=n.pagination,e.billedFlows)):(e.billedFlowsPagination=[],Promise.resolve([]))},cancelFlowExecutionBilling(e,{organizationId:t,flowExecutionId:n}){return kt.cancelFlowExecutionBilling(t,n).then(({data:i})=>{const r=e.state.billedFlows.find(s=>s.id===i.canceled_billings[0]);return r&&(r.is_canceled=!0),e.dispatch("Notifications/displayToastNotification",{msg:In("Billing canceled successfully."),type:"success"},{root:!0}),i}).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:In("Billing cancellation failed."),type:"error"},{root:!0}),i})},createBillingOrder(e,t){return kt.createBillingOrder(t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:In("Order created successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:In("Order creation failed."),type:"error"},{root:!0}),n})},cancelBillingOrderSubscription(e,{id:t,payload:n}){return kt.cancelBillingOrderSubscription(t,n).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:In("Subscription canceled successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:In("Subscription cancellation failed."),type:"error"},{root:!0}),i})},renewBillingOrderSubscription(e,{id:t}){return kt.renewBillingOrderSubscription(t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:In("Subscription renewed successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:In("Subscription renew failed."),type:"error"},{root:!0}),n})},getBillingCountries({commit:e},t){return kt.getBillingCountries(t).then(({data:n})=>(e("setBillingCountries",n),n.items))},getBillingCountry(e,t){return kt.getBillingCountry(t).then(({data:n})=>n)},orderPayableItems(e,{flowExecutions:t,qualityControlJobs:n,paymentMethod:i="card"}){return kt.orderPayableItems({payment_type_key:i,flow_execution_ids:t,quality_control_job_ids:n}).then(({data:r})=>r)},getMinimumOrder({commit:e},t){return kt.getMinimumOrder(t).then(({data:n})=>(e("setMinimumOrder",n),n))},getBulkDiscount(e,t){return kt.getBulkDiscount(t).then(({data:n})=>n)},getOrganizationOrders({commit:e,rootState:t},n){return kt.getOrganizationOrders(t.Auth.organization.id,{order_by:"created_at",order_direction:"desc",decorators:["payments"],...n}).then(({data:i})=>{e("setOrders",i.items),e("setOrdersPagination",i.pagination)})},getPaymentInvoicePresignUrl(e,t){return kt.getPaymentInvoicePresignUrl(t).then(({data:n})=>n)},cancelChildOrder(e,t){return kt.cancelChildOrder(t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:In("Order canceled successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:In("Order cancelation failed."),type:"error"},{root:!0}),n})},getAvailableGrantedProcessingUnits({rootState:e}){return kt.getAvailableGrantedProcessingUnits(e.Auth.organization.id).then(({data:t})=>t)}},Ej={state:_j,getters:wj,mutations:Sj,actions:Tj,namespaced:!0},bd=["classifications","activeClassifications","selectedClassification","selectedInstanceId","editMode"],Aj=["activeAttributeName","pointSize","pointSizing","shape"],ob=["pointBudget","cameraProjection","showMeasurementPoiLabels"],Cj={},xj={getTableSort(e){return t=>e.tableSorting?.[t]??{property:null,order:"asc"}},getTableFilters(e){return t=>e.tableFilters?.[t]??{}},getTablePageSize(e){return t=>e.tablePageSize?.[t]??10},getActiveTab(e){return t=>e.activeTab?.[t]??0},isNavBarCollapsed(e){return()=>e.isNavBarCollapsed??!1},getDataDisplayType(e){return t=>e.dataDisplayType?.[t]??"card"},getVirtualTileSelectedId(e){return t=>e.virtualTiles?.[t]?.selectedId??null},getMultiViewSync(e){return t=>e.multiView?.[t]?.sync??!1},showCatalogueMap(e){return()=>e.showCatalogueMap??!1},getForcedMinVisibleCopcFiles(e){return t=>e.potree?.[t]?.stateProperty?.forcedMinVisibleCopcFiles??0}},Mj={setTableSort(e,{tableName:t,property:n,order:i}){e.tableSorting[t]={property:n,order:i}},setTableFilter(e,{tableName:t,property:n,filter:i,type:r}){e.tableFilters[t]?e.tableFilters[t][n]={filter:i,type:r}:e.tableFilters[t]={[n]:{filter:i,type:r}},(i===null||i==="")&&delete e.tableFilters[t][n],Array.isArray(i)&&i.length===0&&delete e.tableFilters[t][n],i?.from===null&&i?.to===null&&delete e.tableFilters[t][n]},clearTableFilters(e,{tableName:t}){delete e.tableFilters[t]},setTablePageSize(e,{tableName:t,pageSize:n}){e.tablePageSize[t]=n},setNavBarCollapsed(e,t){e.isNavBarCollapsed=t},setActiveTab(e,{tabsName:t,activeTab:n}){e.activeTab[t]=n},setDataDisplayType(e,{dataName:t,displayType:n}){e.dataDisplayType[t]=n},setVirtualTileSelectedId(e,{datasetId:t,selectedId:n}){e.virtualTiles[t]||(e.virtualTiles[t]={}),e.virtualTiles[t].selectedId=n},removeVirtualTileState(e,{datasetId:t}){delete e.virtualTiles[t]},setMultiViewSync(e,{multiViewId:t,sync:n}){var i;(i=e.multiView)[t]??(i[t]={}),e.multiView[t].sync=n},setShowCatalogueMap(e,t){e.showCatalogueMap=t},setPotreePropertiesProperty(e,{id:t,property:n,value:i,multiViewId:r,viewportId:s}){var o,u,a,h,c,l;if(r){e.multiView??(e.multiView={}),(o=e.multiView)[r]??(o[r]={}),(u=e.multiView[r])[s]??(u[s]={potree:{}}),(a=e.multiView[r][s].potree)[t]??(a[t]={}),(h=e.multiView[r][s].potree[t]).properties??(h.properties={}),e.multiView[r][s].potree[t].properties[n]=i;return}(c=e.potree)[t]??(c[t]={}),(l=e.potree[t]).properties??(l.properties={}),e.potree[t].properties[n]=i},setPotreePocAttributeProperty(e,{id:t,property:n,value:i,multiViewId:r,viewportId:s}){var o,u,a,h,c,l;if(r){e.multiView??(e.multiView={}),(o=e.multiView)[r]??(o[r]={}),(u=e.multiView[r])[s]??(u[s]={potree:{}}),(a=e.multiView[r][s].potree)[t]??(a[t]={}),(h=e.multiView[r][s].potree[t]).pocAttributeProperty??(h.pocAttributeProperty={}),e.multiView[r][s].potree[t].pocAttributeProperty[n]=i;return}(c=e.potree)[t]??(c[t]={}),(l=e.potree[t]).pocAttributeProperty??(l.pocAttributeProperty={}),e.potree[t].pocAttributeProperty[n]=i},setPotreeStateProperty(e,{id:t,property:n,value:i,multiViewId:r,viewportId:s}){var o,u,a,h,c,l;if(r){e.multiView??(e.multiView={}),(o=e.multiView)[r]??(o[r]={}),(u=e.multiView[r])[s]??(u[s]={potree:{}}),(a=e.multiView[r][s].potree)[t]??(a[t]={}),(h=e.multiView[r][s].potree[t]).stateProperty??(h.stateProperty={}),e.multiView[r][s].potree[t].stateProperty[n]=i;return}(c=e.potree)[t]??(c[t]={}),(l=e.potree[t]).stateProperty??(l.stateProperty={}),e.potree[t].stateProperty[n]=i},setPotreeCamera(e,{id:t,value:n,multiViewId:i,viewportId:r}){var s,o,u,a,h,c;if(i){e.multiView??(e.multiView={}),(s=e.multiView)[i]??(s[i]={}),(o=e.multiView[i])[r]??(o[r]={potree:{}}),(u=e.multiView[i][r].potree)[t]??(u[t]={}),(a=e.multiView[i][r].potree[t]).camera??(a.camera={}),e.multiView[i][r].potree[t].camera=n;return}(h=e.potree)[t]??(h[t]={}),(c=e.potree[t]).camera??(c.camera={}),e.potree[t].camera=n},setUserState(e,t){if(!t){e.isNavBarCollapsed=!1,e.tableSorting={},e.tableFilters={},e.tablePageSize={},e.activeTab={},e.potree={},e.dataDisplayType={},e.virtualTiles={},e.multiView={},e.showCatalogueMap=!1;return}e.isNavBarCollapsed=t?.isNavBarCollapsed??!1,e.showCatalogueMap=t?.showCatalogueMap??!1,!t.tableSorting||Array.isArray(t.tableSorting)?e.tableSorting={}:e.tableSorting=t.tableSorting,!t.tableFilters||Array.isArray(t.tableFilters)?e.tableFilters={}:(Object.keys(t.tableFilters).forEach(n=>{Array.isArray(t.tableFilters[n])&&(t.tableFilters[n]={})}),e.tableFilters=t.tableFilters),!t.tablePageSize||Array.isArray(t.tablePageSize)?e.tablePageSize={}:e.tablePageSize=t.tablePageSize,!t.activeTab||Array.isArray(t.activeTab)?e.activeTab={}:e.activeTab=t.activeTab,!t.potree||Array.isArray(t.potree)?e.potree={}:e.potree=t.potree,!t.dataDisplayType||Array.isArray(t.dataDisplayType)?e.dataDisplayType={}:e.dataDisplayType=t.dataDisplayType,!t.virtualTiles||Array.isArray(t.virtualTiles)?e.virtualTiles={}:e.virtualTiles=t.virtualTiles,!t.multiView||Array.isArray(t.multiView)?e.multiView={}:e.multiView=t.multiView},resetUserState(e){e.activeTab={},e.isNavBarCollapsed=!1,e.potree={},e.tableSorting={},e.tableFilters={},e.tablePageSize={},e.dataDisplayType={},e.virtualTiles={},e.multiView={},e.showCatalogueMap=!1}},kj={setTableSort({commit:e,dispatch:t},{tableName:n,property:i,order:r}){e("setTableSort",{tableName:n,property:i,order:r}),t("saveStateDebounced")},setTableFilter({commit:e,dispatch:t},{tableName:n,property:i,filter:r,type:s}){e("setTableFilter",{tableName:n,property:i,filter:r,type:s}),t("saveStateDebounced")},setTablePageSize({commit:e,dispatch:t},{tableName:n,pageSize:i}){e("setTablePageSize",{tableName:n,pageSize:i}),t("saveStateDebounced")},clearTableFilters({commit:e,dispatch:t},{tableName:n}){e("clearTableFilters",{tableName:n}),t("saveStateDebounced")},setNavBarCollapsed({commit:e,dispatch:t},n){e("setNavBarCollapsed",n),t("saveStateDebounced")},setActiveTab({commit:e,dispatch:t},{tabsName:n,activeTab:i}){e("setActiveTab",{tabsName:n,activeTab:i}),t("saveStateDebounced")},setDataDisplayType({commit:e,dispatch:t},{dataName:n,displayType:i}){e("setDataDisplayType",{dataName:n,displayType:i}),t("saveStateDebounced")},setVirtualTileSelectedId({commit:e,dispatch:t},{datasetId:n,selectedId:i}){e("setVirtualTileSelectedId",{datasetId:n,selectedId:i}),t("saveStateDebounced")},removeVirtualTileState({commit:e,dispatch:t},{datasetId:n}){e("removeVirtualTileState",{datasetId:n}),t("saveStateDebounced")},setMultiViewSync({commit:e,dispatch:t},{multiViewId:n,sync:i}){e("setMultiViewSync",{multiViewId:n,sync:i}),t("saveStateDebounced")},setShowCatalogueMap({commit:e,dispatch:t},n){e("setShowCatalogueMap",n),t("saveStateDebounced")},setPotreeProperties({commit:e,dispatch:t},{id:n,type:i,property:r,value:s,multiViewId:o,viewportId:u}){if(i==="propertiesProperty")switch(r){case"classifications":{const a=Object.keys(s.json).filter(h=>s.json[h].visible).map(h=>h);e("setPotreePropertiesProperty",{property:r,value:a,id:n,multiViewId:o,viewportId:u});break}default:e("setPotreePropertiesProperty",{property:r,value:s,id:n,multiViewId:o,viewportId:u});break}i==="pocAttributeProperty"&&e("setPotreePocAttributeProperty",{property:r,value:s,id:n,multiViewId:o,viewportId:u}),i==="stateProperty"&&e("setPotreeStateProperty",{property:r,value:s,id:n,multiViewId:o,viewportId:u}),i==="camera"&&e("setPotreeCamera",{id:n,value:s,multiViewId:o,viewportId:u}),t("saveStateDebounced")},saveState({state:e,rootState:t}){t.Auth?.user?.is_guest!==!0&&Ci.updateUser(t.Auth.organization.id,t.Auth.user.id,{frontend_state:e})},saveStateDebounced:mu(({state:e,rootState:t})=>{t.Auth?.user?.is_guest!==!0&&Ci.updateUser(t.Auth.organization.id,t.Auth.user.id,{frontend_state:e})},1e3),resetUserState({commit:e,dispatch:t}){e("resetUserState"),t("saveState")}},$j={state:Cj,getters:xj,mutations:Mj,actions:kj,namespaced:!0},Ij={user_settings:{auto_potree_reload:!1,show_editor_tips:!0}},Rj={},Lj={setUserSetting(e,{property:t,value:n}){e.user_settings[t]=n}},Oj={setUserSetting({commit:e},{property:t,value:n}){const i=JSON.parse(localStorage.getItem("userSettings"))||{};i[t]=n,localStorage.setItem("userSettings",JSON.stringify(i)),e("setUserSetting",{property:t,value:n})},loadUserSettings({commit:e}){const t=JSON.parse(localStorage.getItem("userSettings"));t&&typeof t=="object"&&Object.keys(t).forEach(n=>{e("setUserSetting",{property:n,value:t[n]})})}},Pj={state:Ij,getters:Rj,mutations:Lj,actions:Oj,namespaced:!0};class Nj{static getNewsletters(t){return Q.request("/newsletters",{type:"GET",params:t})}}const Dj={getNewsletters(){return Nj.getNewsletters({page_size:5,order_by:"created_at",order_direction:"desc"}).then(({data:e})=>e.items)}},Fj={actions:Dj,namespaced:!0};class ab{static getSrids(t,n={}){return Q.request("/srids",{type:"GET",params:t,...n})}static getSrid(t,n,i={}){return Q.request(`/srids/${t}`,{type:"GET",params:n,...i})}}const Bj={srids:[],pagination:{}},Hj={SET_SRIDS:(e,t={})=>{e.srids=t.items,e.pagination=t.pagination}},Uj={getSrids({commit:e},t){return ab.getSrids(t).then(({data:n})=>(e("SET_SRIDS",n),n.items))},getSrid(e,t){return ab.getSrid(t).then(({data:n})=>n)}},zj={namespaced:!0,state:Bj,mutations:Hj,actions:Uj};var YT={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(rg,function(){var n=1e3,i=6e4,r=36e5,s="millisecond",o="second",u="minute",a="hour",h="day",c="week",l="month",d="quarter",f="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var E=["th","st","nd","rd"],L=I%100;return"["+I+(E[(L-20)%10]||E[L]||E[0])+"]"}},S=function(I,E,L){var O=String(I);return!O||O.length>=E?I:""+Array(E+1-O.length).join(L)+I},_={s:S,z:function(I){var E=-I.utcOffset(),L=Math.abs(E),O=Math.floor(L/60),B=L%60;return(E<=0?"+":"-")+S(O,2,"0")+":"+S(B,2,"0")},m:function I(E,L){if(E.date()<L.date())return-I(L,E);var O=12*(L.year()-E.year())+(L.month()-E.month()),B=E.clone().add(O,l),U=L-B<0,z=E.clone().add(O+(U?-1:1),l);return+(-(O+(L-B)/(U?B-z:z-B))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:l,y:f,w:c,d:h,D:p,h:a,m:u,s:o,ms:s,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},w="en",b={};b[w]=y;var C=function(I){return I instanceof A},M=function I(E,L,O){var B;if(!E)return w;if(typeof E=="string"){var U=E.toLowerCase();b[U]&&(B=U),L&&(b[U]=L,B=U);var z=E.split("-");if(!B&&z.length>1)return I(z[0])}else{var j=E.name;b[j]=E,B=j}return!O&&B&&(w=B),B||!O&&w},R=function(I,E){if(C(I))return I.clone();var L=typeof E=="object"?E:{};return L.date=I,L.args=arguments,new A(L)},T=_;T.l=M,T.i=C,T.w=function(I,E){return R(I,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var A=function(){function I(L){this.$L=M(L.locale,null,!0),this.parse(L)}var E=I.prototype;return E.parse=function(L){this.$d=function(O){var B=O.date,U=O.utc;if(B===null)return new Date(NaN);if(T.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var z=B.match(m);if(z){var j=z[2]-1||0,q=(z[7]||"0").substring(0,3);return U?new Date(Date.UTC(z[1],j,z[3]||1,z[4]||0,z[5]||0,z[6]||0,q)):new Date(z[1],j,z[3]||1,z[4]||0,z[5]||0,z[6]||0,q)}}return new Date(B)}(L),this.$x=L.x||{},this.init()},E.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},E.$utils=function(){return T},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(L,O){var B=R(L);return this.startOf(O)<=B&&B<=this.endOf(O)},E.isAfter=function(L,O){return R(L)<this.startOf(O)},E.isBefore=function(L,O){return this.endOf(O)<R(L)},E.$g=function(L,O,B){return T.u(L)?this[O]:this.set(B,L)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(L,O){var B=this,U=!!T.u(O)||O,z=T.p(L),j=function(J,te){var ue=T.w(B.$u?Date.UTC(B.$y,te,J):new Date(B.$y,te,J),B);return U?ue:ue.endOf(h)},q=function(J,te){return T.w(B.toDate()[J].apply(B.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(te)),B)},ne=this.$W,G=this.$M,X=this.$D,ie="set"+(this.$u?"UTC":"");switch(z){case f:return U?j(1,0):j(31,11);case l:return U?j(1,G):j(0,G+1);case c:var le=this.$locale().weekStart||0,Y=(ne<le?ne+7:ne)-le;return j(U?X-Y:X+(6-Y),G);case h:case p:return q(ie+"Hours",0);case a:return q(ie+"Minutes",1);case u:return q(ie+"Seconds",2);case o:return q(ie+"Milliseconds",3);default:return this.clone()}},E.endOf=function(L){return this.startOf(L,!1)},E.$set=function(L,O){var B,U=T.p(L),z="set"+(this.$u?"UTC":""),j=(B={},B[h]=z+"Date",B[p]=z+"Date",B[l]=z+"Month",B[f]=z+"FullYear",B[a]=z+"Hours",B[u]=z+"Minutes",B[o]=z+"Seconds",B[s]=z+"Milliseconds",B)[U],q=U===h?this.$D+(O-this.$W):O;if(U===l||U===f){var ne=this.clone().set(p,1);ne.$d[j](q),ne.init(),this.$d=ne.set(p,Math.min(this.$D,ne.daysInMonth())).$d}else j&&this.$d[j](q);return this.init(),this},E.set=function(L,O){return this.clone().$set(L,O)},E.get=function(L){return this[T.p(L)]()},E.add=function(L,O){var B,U=this;L=Number(L);var z=T.p(O),j=function(G){var X=R(U);return T.w(X.date(X.date()+Math.round(G*L)),U)};if(z===l)return this.set(l,this.$M+L);if(z===f)return this.set(f,this.$y+L);if(z===h)return j(1);if(z===c)return j(7);var q=(B={},B[u]=i,B[a]=r,B[o]=n,B)[z]||1,ne=this.$d.getTime()+L*q;return T.w(ne,this)},E.subtract=function(L,O){return this.add(-1*L,O)},E.format=function(L){var O=this,B=this.$locale();if(!this.isValid())return B.invalidDate||g;var U=L||"YYYY-MM-DDTHH:mm:ssZ",z=T.z(this),j=this.$H,q=this.$m,ne=this.$M,G=B.weekdays,X=B.months,ie=function(te,ue,Se,Ce){return te&&(te[ue]||te(O,U))||Se[ue].slice(0,Ce)},le=function(te){return T.s(j%12||12,te,"0")},Y=B.meridiem||function(te,ue,Se){var Ce=te<12?"AM":"PM";return Se?Ce.toLowerCase():Ce},J={YY:String(this.$y).slice(-2),YYYY:T.s(this.$y,4,"0"),M:ne+1,MM:T.s(ne+1,2,"0"),MMM:ie(B.monthsShort,ne,X,3),MMMM:ie(X,ne),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:ie(B.weekdaysMin,this.$W,G,2),ddd:ie(B.weekdaysShort,this.$W,G,3),dddd:G[this.$W],H:String(j),HH:T.s(j,2,"0"),h:le(1),hh:le(2),a:Y(j,q,!0),A:Y(j,q,!1),m:String(q),mm:T.s(q,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:z};return U.replace(v,function(te,ue){return ue||J[te]||z.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(L,O,B){var U,z=T.p(O),j=R(L),q=(j.utcOffset()-this.utcOffset())*i,ne=this-j,G=T.m(this,j);return G=(U={},U[f]=G/12,U[l]=G,U[d]=G/3,U[c]=(ne-q)/6048e5,U[h]=(ne-q)/864e5,U[a]=ne/r,U[u]=ne/i,U[o]=ne/n,U)[z]||ne,B?G:T.a(G)},E.daysInMonth=function(){return this.endOf(l).$D},E.$locale=function(){return b[this.$L]},E.locale=function(L,O){if(!L)return this.$L;var B=this.clone(),U=M(L,O,!0);return U&&(B.$L=U),B},E.clone=function(){return T.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},I}(),P=A.prototype;return R.prototype=P,[["$ms",s],["$s",o],["$m",u],["$H",a],["$W",h],["$M",l],["$y",f],["$D",p]].forEach(function(I){P[I[1]]=function(E){return this.$g(E,I[0],I[1])}}),R.extend=function(I,E){return I.$i||(I(E,A,R),I.$i=!0),R},R.locale=M,R.isDayjs=C,R.unix=function(I){return R(1e3*I)},R.en=b[w],R.Ls=b,R.p={},R})})(YT);const cn=YT.exports;class ls{static getNotes(t,n){return Q.request(`/organization/${t}/datasets/${n}/collaboration_notes`,{type:"GET"})}static getThread(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/collaboration_notes/${i}/thread`,{type:"GET"})}static createNote(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/collaboration_notes`,{type:"POST",data:i})}static deleteNote(t,n,i){return Q.request(`/organization/${t}/datasets/${n}/collaboration_notes/${i}`,{type:"DELETE"})}static updateNote(t,n,i,r){return Q.request(`/organization/${t}/datasets/${n}/collaboration_notes/${i}`,{type:"PUT",data:r})}}const{t:hc}=Tt.global,Wj={collaborationNotes:{}},Vj={updateCollaborationNotes(e,{notes:t,datasetId:n}){t.forEach(i=>{const r=e.collaborationNotes[n].findIndex(s=>s.id===i.id);r>=0?e.collaborationNotes[n].splice(r,1,i):e.collaborationNotes[n].push(i)})}},wd=(e,t)=>e?[...e].sort((i,r)=>cn(i.created_at)-cn(r.created_at)).reduce((i,r)=>{const s=i.find(o=>o.id===r.parent_note_id);return t==="open"&&r.resolved||t==="resolved"&&(!s&&!r.resolved||s&&!s.resolved)||(r.parent_note_id||i.push({...r,children:[]}),s&&s.children.push({...r})),i},[]):[],jj={getCollaborationThreadsAll(e){return t=>wd(e.collaborationNotes[t],"all")},getCollaborationThreadsResolved(e){return t=>wd(e.collaborationNotes[t],"resolved")},getCollaborationThreadsOpen(e){return t=>wd(e.collaborationNotes[t],"open")}},Gj={async createNote({dispatch:e,rootState:t},{datasetId:n,data:i}){const{data:r}=await ls.createNote(t.Auth.organization.id,n,i);return await e("getNotes",{datasetId:n}),r},deleteNote({state:e,dispatch:t,rootState:n},{datasetId:i,data:r}){return ls.deleteNote(n.Auth.organization.id,i,r.id).then(({data:s})=>{if(r.parent_note_id){const o=e.collaborationNotes[i].findIndex(u=>u.id===r.id);e.collaborationNotes[i].splice(o,1),t("getThread",{datasetId:i,parentNoteId:r.parent_note_id}).then(()=>s)}else e.collaborationNotes[i]=e.collaborationNotes[i].filter(o=>o.id!==r.id&&o.parent_note_id!==r.id)}).catch(()=>{t("Notifications/displayToastNotification",{msg:hc("Failed to delete comment."),type:"error"},{root:!0})})},updateNote({state:e,dispatch:t,rootState:n},{datasetId:i,data:r}){return ls.updateNote(n.Auth.organization.id,i,r.id,{note:r.note}).then(({data:s})=>{const o=e.collaborationNotes[i].findIndex(u=>u.id===r.id);return e.collaborationNotes[i].splice(o,1,r),s}).catch(()=>{t("Notifications/displayToastNotification",{msg:hc("Failed to update note."),type:"error"},{root:!0})})},resolveThread({state:e,dispatch:t,rootState:n},{datasetId:i,data:r}){return ls.updateNote(n.Auth.organization.id,i,r.id,{resolved:!0}).then(()=>{const s=e.collaborationNotes[i].findIndex(o=>o.id===r.id);e.collaborationNotes[i].splice(s,1,{...r,resolved:!0})}).catch(()=>{t("Notifications/displayToastNotification",{msg:hc("Failed to resolve thread."),type:"error"},{root:!0})})},reopenThread({state:e,dispatch:t,rootState:n},{datasetId:i,data:r}){return ls.updateNote(n.Auth.organization.id,i,r.id,{resolved:!1}).then(()=>{const s=e.collaborationNotes[i].findIndex(o=>o.id===r.id);e.collaborationNotes[i].splice(s,1,{...r,resolved:!1})}).catch(()=>{t("Notifications/displayToastNotification",{msg:hc("Failed to re-open thread."),type:"error"},{root:!0})})},getNotes({state:e,rootState:t},{datasetId:n}){return ls.getNotes(t.Auth.organization.id,n).then(({data:i})=>(e.collaborationNotes[n]=i,i))},getThread({commit:e,rootState:t},{datasetId:n,parentNoteId:i}){return ls.getThread(t.Auth.organization.id,n,i).then(({data:r})=>{e("updateCollaborationNotes",{notes:r,datasetId:n})})}},qj={namespaced:!0,state:Wj,getters:jj,mutations:Vj,actions:Gj};var dc,Kj=new Uint8Array(16);function Yj(){if(!dc&&(dc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!dc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dc(Kj)}const Xj=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Jj(e){return typeof e=="string"&&Xj.test(e)}var rn=[];for(var Sd=0;Sd<256;++Sd)rn.push((Sd+256).toString(16).substr(1));function Qj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(rn[e[t+0]]+rn[e[t+1]]+rn[e[t+2]]+rn[e[t+3]]+"-"+rn[e[t+4]]+rn[e[t+5]]+"-"+rn[e[t+6]]+rn[e[t+7]]+"-"+rn[e[t+8]]+rn[e[t+9]]+"-"+rn[e[t+10]]+rn[e[t+11]]+rn[e[t+12]]+rn[e[t+13]]+rn[e[t+14]]+rn[e[t+15]]).toLowerCase();if(!Jj(n))throw TypeError("Stringified UUID is invalid");return n}function Xr(e,t,n){e=e||{};var i=e.random||(e.rng||Yj)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return Qj(i)}class Rn{static createMultiView(t,n,i,r={}){return Q.request(`/organization/${t}/projects/${i}/multiviews`,{type:"POST",data:n,...r})}static updateMultiView(t,n,i,r={}){return Q.request(`/organization/${t}/projects/${i}/multiviews/${n.id}`,{type:"PUT",data:n,...r})}static deleteMultiView(t,n,i,r={}){return Q.request(`/organization/${t}/projects/${i}/multiviews/${n}`,{type:"DELETE",...r})}static createMultiViewViewportDataset(t,n,i,r,s,o={}){return Q.request(`/organization/${t}/projects/${i}/multiviews/${r}/viewports/${s}/viewport_datasets`,{type:"POST",data:n,...o})}static updateMultiViewViewportDataset(t,n,i,r,s,o,u={}){return Q.request(`/organization/${t}/projects/${i}/multiviews/${r}/viewports/${s}/viewport_datasets/${o}`,{type:"PUT",data:n,...u})}static deleteMultiViewViewportDatasets(t,n,i,r,s,o={}){return Q.request(`/organization/${t}/projects/${n}/multiviews/${i}/viewports/${r}/viewport_datasets/${s}`,{type:"DELETE",...o})}static createMultiViewViewport(t,n,i,r,s={}){return Q.request(`/organization/${t}/projects/${i}/multiviews/${r}/viewports`,{type:"POST",data:n,...s})}static deleteMultiViewViewport(t,n,i,r,s={}){return Q.request(`/organization/${t}/projects/${n}/multiviews/${i}/viewports/${r}`,{type:"DELETE",...s})}static getMultiViews(t,n,i,r={}){return Q.request(`/organization/${t}/projects/${n}/multiviews`,{type:"GET",params:i,...r})}static getMultiView(t,n,i,r,s={}){return Q.request(`/organization/${t}/projects/${n}/multiviews/${i}`,{type:"GET",params:r,...s})}static getMultiViewViewports(t,n,i,r,s={}){return Q.request(`/organization/${t}/projects/${n}/multiviews/${i}/viewports`,{type:"GET",params:r,...s})}static getMultiViewViewportDatasets(t,n,i,r,s,o={}){return Q.request(`/organization/${t}/projects/${n}/multiviews/${i}/viewports/${r}/viewport_datasets`,{type:"GET",params:s,...o})}}function Zj(){this.status=404,this.data={message:"Multi view not found"}}const e6={},t6={},n6={},i6={createMultiView(e,{multiView:t,projectId:n}){return Rn.createMultiView(e.rootState.Auth.organization.id,t,n).then(({data:i})=>i)},async updateMultiView(e,{multiView:t,projectId:n,viewportChanges:i,removedViewports:r,addedViewports:s}){await Promise.all(Object.keys(i).flatMap(a=>["addedDatasets","removedDatasets","changedDatasets"].filter(h=>i[a][h]!==void 0).flatMap(h=>i[a][h].map(c=>h==="addedDatasets"?Rn.createMultiViewViewportDataset(e.rootState.Auth.organization.id,c,n,t.id,a):h==="removedDatasets"?Rn.deleteMultiViewViewportDatasets(e.rootState.Auth.organization.id,n,t.id,a,c.id):h==="changedDatasets"?Rn.updateMultiViewViewportDataset(e.rootState.Auth.organization.id,c,n,t.id,a,c.id):null)))),await Promise.all(r.map(a=>Rn.deleteMultiViewViewport(e.rootState.Auth.organization.id,t.id,n,a)));const o=await Promise.all(s.map(a=>Rn.createMultiViewViewport(e.rootState.Auth.organization.id,{viewport_type:a.viewport_type,project_id:n,multiview_id:t.id},n,t.id)));await Promise.all(s.flatMap((a,h)=>a.datasets.map(c=>Rn.createMultiViewViewportDataset(e.rootState.Auth.organization.id,{...c,viewport_id:o[h].data.id},n,t.id,o[h].data.id))));const u=s.map(a=>a.viewport_id);return t.viewports_location=t.viewports_location.map(a=>{const h=u.findIndex(c=>c===a.viewport_id);return h>=0?{...a,viewport_id:o[h].data.id}:a}),await Rn.updateMultiView(e.rootState.Auth.organization.id,t,n),{id:t.id}},deleteMultiView(e,{multiViewId:t,projectId:n}){return Rn.deleteMultiView(e.rootState.Auth.organization.id,t,n).then(({data:i})=>i)},getMultiViews(e,{projectId:t}){return Rn.getMultiViews(e.rootState.Auth.organization.id,t).then(({data:n})=>n)},getMultiViewViewports(e,{projectId:t,multiViewId:n}){return Rn.getMultiViewViewports(e.rootState.Auth.organization.id,t,n).then(({data:i})=>i)},getMultiViewViewportDatasets(e,{projectId:t,multiViewId:n,viewportId:i}){return Rn.getMultiViewViewportDatasets(e.rootState.Auth.organization.id,t,n,i).then(({data:r})=>r)},async getMultiViewsWithViewports({dispatch:e,rootState:t},{projectId:n,params:i}){const{data:{items:r,pagination:s}}=await Rn.getMultiViews(t.Auth.organization.id,n,i),o=await Promise.all(r.map(u=>e("getMultiViewViewports",{projectId:n,multiViewId:u.id})));return{items:r.map((u,a)=>({...u,viewports:o[a],viewportRows:u.viewports_location.reduce((h,c,l)=>{h[c.row]===void 0&&(h[c.row]={viewports:[],flexBasis:c.row_flex_basis,id:Xr()});const d=c.viewport_id?o[a].find(f=>f.id===c.viewport_id):o[a][l];return h[c.row].viewports.push({flexBasis:c.flex_basis,id:d.id,viewportType:o.viewport_type}),h},[])})),pagination:s}},async getMultiViewWithViewportsAndDatasets({dispatch:e,rootState:t},{projectId:n,multiViewId:i}){if(i.split("project-").length>1)return e("getDefaultProjectMultiView",{projectId:n,multiViewId:i});const{data:r}=await Rn.getMultiView(t.Auth.organization.id,n,i);if(r.length===0)throw new Zj;const s=await e("getMultiViewViewports",{projectId:n,multiViewId:i}),o=await Promise.all(s.map(d=>e("getMultiViewViewportDatasets",{projectId:n,multiViewId:i,viewportId:d.id}))),u=o.flatMap(d=>d).length>0?{"filter[id]":`i=${o.flatMap(d=>d).map(d=>d.dataset_id).join(",")}`}:{},a=await e("AppState/Datasets/getDatasetsAsync",u,{root:!0}),{id:h,multiview_title:c,sync_viewports:l}=r;return{id:h,multiViewTitle:c,syncViewports:l,projectId:r.project_id,viewports:s,viewportRows:r.viewports_location.reduce((d,f,p)=>{d[f.row]===void 0&&(d[f.row]={viewports:[],flexBasis:f.row_flex_basis,id:Xr()});const g=f.viewport_id?s.find(v=>v.id===f.viewport_id):s[p],m=o.find(v=>v.length>0&&v[0].viewport_id===g.id)||[];return d[f.row].viewports.push({flexBasis:f.flex_basis,id:g.id,viewport_type:g.viewport_type,datasets:[...m].sort((v,y)=>v.dataset_order-y.dataset_order).map(v=>({...a.find(y=>y.id===v.dataset_id),dataset_order:v.dataset_order,vp_dataset_id:v.id}))}),d},[])}},async getDefaultProjectMultiView({rootState:e},{projectId:t,multiViewId:n}){const{data:{items:i}}=await Ze.getDatasets(e.Auth.organization.id,{order_by:"created_at",order_direction:"desc",attributes:"with_project_id","filter[project_id]":t,page_size:50,decorators:e.Auth?.user?.is_guest?[ze.dataset.user]:[ze.dataset.user,ze.dataset.tags]}),r=i.filter(u=>u.dataset_type_key==="pointcloud"),s=i.filter(u=>u.dataset_type_key!=="pointcloud"),o=[];return r.length>0&&o.push({datasets:r,viewport_type:"potree",id:"potree"}),s.length>0&&o.push({datasets:s,viewport_type:"maps",id:"maps"}),{id:n,multiViewTitle:"All datasets (default)",syncViewports:!1,projectId:t,viewportRows:[{viewports:o}]}}},r6={state:e6,getters:t6,mutations:n6,actions:i6,namespaced:!0},Zi={BOX:"vector_3d_boxes",POINT:"vector_points",LINE_STRING:"vector_linestrings",POLYGON:"vector_polygons"},fc={attribute_code:"",attribute_name:""};class pc{static getPois(t,n,i,r){return Q.request(`/organization/${t}/datasets/${n}/${i}`,{type:"GET",params:r})}static getPoi(t,n,i,r,s){return Q.request(`/organization/${t}/datasets/${n}/${i}/${r}`,{type:"GET",params:s})}static createPoi(t,n,i,r){return Q.request(`/organization/${t}/datasets/${n}/${i}`,{type:"POST",data:r})}static updatePoi(t,n,i,r,s){return Q.request(`/organization/${t}/datasets/${n}/${i}/${r}`,{type:"PUT",data:s})}static deletePoi(t,n,i,r){return Q.request(`/organization/${t}/datasets/${n}/${i}/${r}`,{type:"DELETE"})}}const{t:qs}=Tt.global,s6={pois:{}},o6={setPoi(e,{datasetId:t,poi:n}){const i=e.pois[t].findIndex(r=>r.id===n.id);i>=0?e.pois[t][i]=n:e.pois[t].push(n)},removePoi(e,{datasetId:t,id:n}){const i=e.pois[t].findIndex(r=>r.id===n);i>=0&&e.pois[t].splice(i,1)}},a6={getPois({state:e,rootState:t},{datasetId:n,params:i}){const r=Object.values(Zi).map(s=>pc.getPois(t.Auth.organization.id,n,s,i));return Promise.all(r).then(s=>s.flatMap(({data:o},u)=>o.map(a=>({...a,type:Object.keys(Zi)[u]})))).then(s=>(e.pois[n]=s,s))},updatePoi({commit:e,dispatch:t,rootState:n},{datasetId:i,poiType:r,poi:s}){return pc.updatePoi(n.Auth.organization.id,i,r,s.id,s).then(({data:o})=>(e("setPoi",{datasetId:i,poi:s}),t("Notifications/displayToastNotification",{msg:qs("Poi successfully updated."),type:"success"},{root:!0}),o)).catch(o=>{throw t("Notifications/displayToastNotification",{msg:qs("Failed to update Poi."),type:"error"},{root:!0}),o})},createPoi({commit:e,dispatch:t,rootState:n},{datasetId:i,poiType:r,poi:s}){return pc.createPoi(n.Auth.organization.id,i,r,s).then(({data:o})=>(e("setPoi",{datasetId:i,poi:s}),t("Notifications/displayToastNotification",{msg:qs("Poi successfully created."),type:"success"},{root:!0}),o)).catch(o=>{throw t("Notifications/displayToastNotification",{msg:qs("Failed to create Poi."),type:"error"},{root:!0}),o})},deletePoi({commit:e,dispatch:t,rootState:n},{datasetId:i,poiType:r,id:s}){pc.deletePoi(n.Auth.organization.id,i,r,s).then(({data:o})=>(e("removePoi",{datasetId:i,id:s}),t("Notifications/displayToastNotification",{msg:qs("Poi successfully deleted."),type:"success"},{root:!0}),o)).catch(o=>{throw t("Notifications/displayToastNotification",{msg:qs("Failed to delete Poi."),type:"error"},{root:!0}),o})}},l6={namespaced:!0,state:s6,mutations:o6,actions:a6};class ga{static cacheClear(t={}){return Q.request("/admin/cache-clear",{type:"POST",...t})}static stripeProductsSync(t={}){return Q.request("/admin/stripe-products-sync",{type:"POST",...t})}static stripePricesSync(t={}){return Q.request("/admin/stripe-prices-sync",{type:"POST",...t})}static importOpenData(t={},n={}){return Q.request("/admin/import-open-data",{type:"POST",data:t,...n})}static restoreDataset(t){return Q.request(`/admin/datasets/${t}/restore`,{type:"PUT"})}}const c6={pointcloud:"pointCloudDatasets",vector:"vectorDatasets",raster:"rasterDatasets",image:"imageDatasets"},u6={pointCloudDatasets:{items:[],pagination:{}},vectorDatasets:{items:[],pagination:{}},rasterDatasets:{items:[],pagination:{}},imageDatasets:{items:[],pagination:{}},orders:{items:[],pagination:{}}},h6={},d6={setDatasets(e,{datasets:t,type:n}){e[n].items=t.items,e[n].pagination=t.pagination},setOrders(e,{orders:t}){e.orders.items=t.items,e.orders.pagination=t.pagination}},f6={getDatasetsAdmin({commit:e},t){return Ze.getDatasetsAdmin({order_by:"created_at",order_direction:"desc",...t,decorators:[...t?.decorators||[],ze.dataset.user,ze.dataset.tags]}).then(({data:n})=>{const i=c6[t["filter[dataset_type_key]"]];e("setDatasets",{datasets:n,type:i})})},getOrdersAdmin({commit:e},t){return kt.getAllOrganizationsOrders({order_by:"created_at",order_direction:"desc",decorators:[ze.billing_order.payments,ze.billing_order.organization],...t}).then(({data:n})=>{e("setOrders",{orders:n})})},cacheClear(e){return ga.cacheClear().then(t=>{e.dispatch("Notifications/displayToastNotification",{msg:t.data.message,type:"success"},{root:!0})}).catch(t=>{throw e.dispatch("Notifications/displayToastNotification",{msg:t.data.message||"Unknown error.",type:"error"},{root:!0}),t})},stripeProductsSync(e){return ga.stripeProductsSync().then(t=>{e.dispatch("Notifications/displayToastNotification",{msg:t.data.message,type:"success"},{root:!0})}).catch(t=>{throw e.dispatch("Notifications/displayToastNotification",{msg:t.data.message||"Unknown error.",type:"error"},{root:!0}),t})},stripePricesSync(e){return ga.stripePricesSync().then(t=>{e.dispatch("Notifications/displayToastNotification",{msg:t.data.message,type:"success"},{root:!0})}).catch(t=>{throw e.dispatch("Notifications/displayToastNotification",{msg:t.data.message||"Unknown error.",type:"error"},{root:!0}),t})},importOpenData(e,t){return ga.importOpenData(t).then(n=>{e.dispatch("Notifications/displayToastNotification",{msg:n.data.message,type:"success"},{root:!0})}).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:n.data.message||"Unknown error.",type:"error"},{root:!0}),n})},restoreDataset(e,t){return ga.restoreDataset(t).then(n=>{e.dispatch("Notifications/displayToastNotification",{msg:n.data.message,type:"success"},{root:!0})}).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:n.data.message||"Unknown error.",type:"error"},{root:!0}),n})}},p6={namespaced:!0,state:u6,getters:h6,mutations:d6,actions:f6};class lb{static getTags(t,n){return Q.request(`/organization/${t}/tags`,{type:"GET",params:n})}static createTag(t,n){return Q.request(`/organization/${t}/tags`,{type:"POST",data:n})}}const g6={datasetTags:[],datasetTagsPagination:{}},m6={setDatasetTags(e,t){e.datasetTags=t.items,e.datasetTagsPagination=t.pagination}},v6={},y6={getDatasetTags({state:e,commit:t,rootState:n},i){return lb.getTags(n.Auth.organization.id,{"filter[type]":"datasets",order_by:"name",order_direction:"asc",page_size:50,...i}).then(({data:r})=>(t("setDatasetTags",r),e.datasetTags))},async createTag({dispatch:e,rootState:t},n){const{data:i}=await lb.createTag(t.Auth.organization.id,n);switch(n.type){case"datasets":await e("getDatasetTags");break;default:console.warn("Tag type does not exist")}return i}},_6={state:g6,getters:v6,mutations:m6,actions:y6,namespaced:!0},b6={processingDatasets:[],runningFlows:[]},w6={},S6={},T6={getProcessingDatasets({state:e,rootState:t}){return Ze.getDatasets(t.Auth.organization.id,{order_by:"created_at",order_direction:"desc","filter[status]":"i=created,importing,preprocessing","filter[user_id]":"i!=00000000-0000-0000-0000-000000000000","filter[created_at]":`t>=${cn().subtract(7,"day").utc().format("YYYY-MM-DD HH:mm:ss")}`}).then(({data:n})=>(e.processingDatasets=n.items,n.items))},getRunningFlows({state:e,rootState:t}){return ht.getFlowExecutions(t.Auth.organization.id,{order_by:"created_at",order_direction:"desc","filter[status]":"i!=finished,failed","filter[is_system_flow]":"b=0","filter[created_at]":`t>=${cn().subtract(7,"day").utc().format("YYYY-MM-DD HH:mm:ss")}`}).then(({data:n})=>(e.runningFlows=n.items,n.items))},async getActiveJobs({state:e,dispatch:t}){return await t("getProcessingDatasets"),await t("getRunningFlows"),[...e.processingDatasets,...e.runningFlows]}},E6={namespaced:!0,state:b6,getters:w6,mutations:S6,actions:T6};class ma{static getQCJobs(t){return Q.request(`/organization/${t}/quality-control-jobs`,{type:"GET"})}static getQCJob(t,n){return Q.request(`/organization/${t}/quality-control-jobs/${n}`,{type:"GET"})}static createQCJob(t,n){return Q.request(`/organization/${t}/quality-control-jobs`,{type:"POST",data:n})}static deleteQCJob(t,n){return Q.request(`/organization/${t}/quality-control-jobs/${n}`,{type:"DELETE"})}static calculateQCJobPrice(t,{dataset_id:n,semantic_label_definitions_to_qc:i}){return Q.request(`/organization/${t}/quality-control-jobs/calculate-price`,{type:"POST",data:{dataset_id:n,semantic_label_definitions_to_qc:i}})}}const{t:Ff}=Tt.global;function A6(){this.status=404,this.data={message:Ff("Project not found")}}const C6={qcJobs:[]},x6={},M6={},k6={async getQCJobs({state:e,rootState:t}){const{data:n}=await ma.getQCJobs(t.Auth.organization.id);return e.qcJobs=n,n},async getQCJob({rootState:e},{qcJobId:t}){return ma.getQCJob(e.Auth.organization.id,t).then(({data:n})=>{if(n.length===0)throw new A6;return n})},async createQCJob({rootState:e,dispatch:t},n){return ma.createQCJob(e.Auth.organization.id,n).then(({data:i})=>(t("Notifications/displayToastNotification",{msg:Ff("QC job submitted successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw t("Notifications/displayToastNotification",{msg:Ff("Failed to submit QC job."),type:"error"},{root:!0}),i})},async deleteQCJob({rootState:e},{qcJobId:t}){return ma.deleteQCJob(e.Auth.organization.id,t).then(({data:n})=>n)},async calculateQCJobPrice({rootState:e},t){return ma.calculateQCJobPrice(e.Auth.organization.id,t).then(({data:n})=>n)}},$6={namespaced:!0,state:C6,getters:x6,mutations:M6,actions:k6};class va{static getCLIReleases(t){return Q.request(`/organization/${t}/cli-releases`,{type:"GET"})}static getCLILicenseTemplates(t){return Q.request(`/organization/${t}/cli-license-templates`,{type:"GET"})}static getMyCLILicenses(t){return Q.request(`/organization/${t}/my-cli-licenses`,{type:"GET"})}static purchaseLicense(t,n,{number_of_licenses:i,payment_type_key:r}){return Q.request(`/organization/${t}/cli-license-templates/${n}/cli-licenses`,{type:"POST",data:{number_of_licenses:i,payment_type_key:r}})}static createLicenseSA(t){return Q.request("/cli-licenses",{type:"POST",data:t})}static updateLicenseSA(t,n){return Q.request(`/cli-licenses/${t}`,{type:"PUT",data:n})}}const{t:gc}=Tt.global,cb=e=>e.type==="volume"?`${e.license_name} ${Ic(e.volume_resource_amount/1e9,2)} billion points valid until ${cn(e.valid_until).utc().format("YYYY-MM-DD")}`:`${e.license_name} valid until ${cn(e.valid_until).utc().format("YYYY-MM-DD")}`,ub=e=>{const t=cn(),n=cn.utc(e.valid_until).local();return t.isAfter(n)},I6={latestCLIRelease:null,CLIReleases:[],CLILicenseTemplates:[],CLILicenses:[],CLILicensesEnabled:!1,CLIConsumption:{},CLIStats:{},adminOrganizationsCLILicenses:{},adminOrganizationsCLILicensesPagination:{}},R6={},L6={},O6={async getCLIReleases({state:e,rootState:t}){const{data:n}=await va.getCLIReleases(t.Auth.organization.id);return e.CLIReleases=n,e.latestCLIRelease=n.find(i=>i.is_latest),n},async getCLILicenseTemplates({state:e,rootState:t}){const{data:n}=await va.getCLILicenseTemplates(t.Auth.organization.id);e.CLILicenseTemplates=n},async getCLILicenseInfo({state:e,rootState:t,dispatch:n}){const i=await n("AppState/Organizations/getAsync",{organizationId:t.Auth.organization.id,params:{decorators:[ze.organization.cli_licenses,ze.organization.cli_stats,ze.organization.cli_consumption,ze.organization.billing_bundle]}},{root:!0});return e.CLILicenses=i.cli_licenses.map(r=>({...r,title:cb(r),is_expired:ub(r)})),e.CLIConsumption=i.cli_consumption,e.CLIStats=i.cli_stats,e.CLILicensesEnabled=i.billing_bundle?.[0].cli_licenses_enabled??!1,i},async purchaseLicense({rootState:e},{licenseTemplateId:t,payload:n}){return va.purchaseLicense(e.Auth.organization.id,t,n).then(({data:i})=>i)},async createLicenseSA({dispatch:e},t){try{await va.createLicenseSA(t),e("Notifications/displayToastNotification",{msg:gc("License added to organization."),type:"success"},{root:!0})}catch(n){throw e("Notifications/displayToastNotification",{msg:gc("Failed to add license to organization."),type:"error"},{root:!0}),console.error(n),n}},async updateLicenseSA({dispatch:e},{licenseId:t,payload:n}){try{await va.updateLicenseSA(t,n),e("Notifications/displayToastNotification",{msg:gc("License updated successfully."),type:"success"},{root:!0})}catch(i){throw e("Notifications/displayToastNotification",{msg:gc("Failed to update license."),type:"error"},{root:!0}),console.error(i),i}},async getOrganizationsLicensesSA({state:e},t){try{const{data:n}=await Pr.getOrganizations({"filter[all_licenses_count]":"n>=1",decorators:[ze.organization.cli_licenses,ze.organization.cli_stats,ze.organization.cli_consumption],...t});e.adminOrganizationsCLILicenses=n.items.map(i=>({...i,cli_licenses:i.cli_licenses.map(r=>({...r,title:cb(r),is_expired:ub(r)})).sort((r,s)=>cn(r.valid_until).isAfter(cn(s.valid_until)))})),e.adminOrganizationsCLILicensesPagination=n.pagination}catch(n){throw console.error(n),n}}},P6={namespaced:!0,state:I6,getters:R6,mutations:L6,actions:O6};class hb{static get(t){return Q.request("/admin/autoscale-config",{type:"GET",params:{...t}})}static update(t,n){return Q.request(`/admin/autoscale-config/${t}`,{type:"PUT",data:n})}}const{t:db}=Tt.global,N6={autoscaleConfigsPagination:{},autoscaleConfigs:{}},D6={},F6={},B6={async get({state:e},t){const{data:n}=await hb.get(t);e.autoscaleConfigs=n.items,e.autoscaleConfigsPagination=n.pagination},async update({dispatch:e},{ascId:t,payload:n}){console.log(n);try{await hb.update(t,n),e("Notifications/displayToastNotification",{msg:db("Autoscale Config updated successfully."),type:"success"},{root:!0})}catch(i){throw e("Notifications/displayToastNotification",{msg:db("Failed to update autoscale config."),type:"error"},{root:!0}),console.error(i),i}}},H6={namespaced:!0,state:N6,getters:D6,mutations:F6,actions:B6},U6={},z6={},W6={},V6={confirmDelete(){return Promise.resolve(!0)}},j6={state:U6,getters:W6,mutations:z6,actions:V6,modules:{AiModels:zV,Datasets:KV,Datasources:ZV,Downloads:yj,FlowNodeDefinitions:r5,FlowNodeTypes:c5,Flows:p5,ImageDatasets:_5,Images:T5,PointWorker:M5,Projects:N5,ProjectDatasets:H5,Sessions:V5,Tools:Y5,Users:ej,Organizations:rj,FailedJobs:cj,FailedPublishEvents:fj,Billing:Ej,UserState:$j,UserSettings:Pj,Newsletters:Fj,SpatialRefSys:zj,CollaborationNotes:qj,MultiViews:r6,Pois:l6,Admin:p6,Tags:_6,ActiveJobs:E6,QCJobs:$6,CLILicenses:P6,AutoscaleConfig:H6},namespaced:!0},G6="view-super-admin-panel",q6="super-admin",K6="datasets-download",Y6="pages:downloads",X6="pages:admin",fb={[Y6]:K6,[X6]:G6};class nn{static login(t){return Q.request("/oauth/token",{type:"POST",data:t})}static register(t){return Q.request("/register",{type:"POST",data:t})}static registerSso(t){return Q.request("/sso/register",{type:"POST",data:t})}static requestPasswordReset(t){return Q.request("/auth/invoke-password-reset",{type:"POST",data:t})}static resetPassword(t){return Q.request("/auth/password-reset",{type:"POST",data:t})}static getNewAccessToken(t){return Q.request("/oauth/token",{type:"POST",headers:{},data:t})}static getUserData(){return Q.request("/oauth/me",{type:"GET"})}static getSsoUser(t){return Q.request(`/sso/users/token/${t}`,{type:"GET"})}static changePassword(t){return Q.request("/auth/password-change",{type:"POST",data:t})}static getPersonalAccessTokens(t,n){return Q.request(`/organization/${t}/users/${n}/personal-access-tokens`,{type:"GET"})}static getPersonalAccessToken(t,n,i){return Q.request(`/organization/${t}/users/${n}/personal-access-tokens/${i}`,{type:"GET"})}static createPersonalAccessToken(t,n,i){return Q.request(`/organization/${t}/users/${n}/personal-access-tokens`,{type:"POST",data:i})}static revokePersonalAccessToken(t,n,i){return Q.request(`/organization/${t}/users/${n}/personal-access-tokens/${i}`,{type:"DELETE"})}static getPersonalAccessTokenAbilities(t){return Q.request(`/organizations/${t}/personal-access-token-abilities`,{type:"GET"})}static verifyGuestLogin(t){return Q.request(t,{type:"GET"})}static loginSso(t){return Q.request("/sso/oauth/token",{type:"POST",data:t})}static getSsoProviderRedirect(t,n){return Q.request(`/sso/redirect/${t}`,{type:"GET",params:n})}}class J6{static sendConsent(t,n){return Q.request(`/organization/${t}/user/consent`,{type:"POST",data:n})}}const{t:Ks}=Tt.global,Q6={is_logged_in:!1,user:null,organization:null,parent_organization:null,permissions:null,permissions_frontend:null,personalAccessTokenAbilities:{},attemptLoginPromise:null},Z6={getUserInitials(e){const{first_name:t,last_name:n}=e.user;if(n)return t.charAt(0).toUpperCase()+n.charAt(0).toUpperCase();const i=t.split(" ");return i[0].charAt(0).toUpperCase()+i.slice(-1)[0].charAt(0).toUpperCase()},isSuperAdmin(e){return e.permissions?e.permissions.includes(q6):!1},getUserId(e){return e.user?.id},isReseller(e){return e.organization.type==="parent"||e.user.organization_id===e.parent_organization?.id},hasResourcePermission:(e,t)=>n=>t.isSuperAdmin||!(n in fb)?!0:e.permissions_frontend?!!e.permissions_frontend.includes(fb[n]):!1,getUserCurrency(e,t,n){return{currency:e.organization.currency,symbol:n.AppState.Billing.currencies[e.organization.currency]?n.AppState.Billing.currencies[e.organization.currency].symbol:e.organization.currency}}},e8={logout:e=>{e.user=null,e.is_logged_in=!1},setIsLoggedIn:(e,t)=>{e.is_logged_in=t},setUser:(e,t)=>{e.user=t},setOrganization:(e,t)=>{e.organization=t},setParentOrganization:(e,t)=>{e.parent_organization=t},setPermissions:(e,t)=>{e.permissions=t},setPermissionsFrontend:(e,t)=>{e.permissions_frontend=t},setPersonalAccessTokenAbilities:(e,t)=>{e.personalAccessTokenAbilities=t}},t8={logout({commit:e}){return navigator.serviceWorker.controller.postMessage("clearTokens"),e("logout"),!0},attemptLogin({state:e,dispatch:t}){if(e.is_logged_in)return!0;if(e.attemptLoginPromise)return e.attemptLoginPromise;const n=t("getUserData").then(()=>!0).catch(()=>!1).finally(i=>(e.attemptLoginPromise=null,i));return e.attemptLoginPromise=n,n},login({dispatch:e},t){return nn.login({grant_type:"password",client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET,...t}).catch(n=>{throw e("Notifications/displayToastNotification",{msg:Ks("Login failed."),type:"error"},{root:!0}),n}).then(async()=>{try{await e("getUserData")}catch(n){if(n.response.status===412)throw n}return!0})},loginWithAuthCode({dispatch:e},t){return nn.login({grant_type:"authorization_code_grant",client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET,...t}).catch(n=>{throw e("Notifications/displayToastNotification",{msg:Ks("Login failed."),type:"error"},{root:!0}),n}).then(async()=>{try{await e("getUserData")}catch(n){if(n.response.status===412)throw n}return!0})},register(e,t){return nn.register(t)},registerSso(e,t){return nn.registerSso(t)},requestPasswordReset(e,t){return nn.requestPasswordReset(t)},resetPassword(e,t){return nn.resetPassword(t)},changePassword(e,t){return nn.changePassword(t)},setIsLoggedIn({commit:e},t=!1){e("setIsLoggedIn",t)},getUserData({state:e,dispatch:t,commit:n}){return nn.getUserData().then(({data:i})=>{const r=e?.user?.id;n("setUser",i),n("setOrganization",i.organization),n("setParentOrganization",i.parent_organization[0]??null),n("setPermissions",i.user_permissions),n("setPermissionsFrontend",i.user_permissions_frontend),n("setIsLoggedIn",!0),r!==i?.id&&n("AppState/UserState/setUserState",i.frontend_state,{root:!0}),e.userDataPromise=null}).then(()=>FV(e.user.locale)).then(()=>t("AppState/UserSettings/loadUserSettings",{},{root:!0}))},getSsoUser(e,t){return nn.getSsoUser(t).then(({data:n})=>n)},getPersonalAccessTokens({state:e}){return nn.getPersonalAccessTokens(e.organization.id,e.user.id).then(({data:t})=>t)},getPersonalAccessToken({state:e},t){return nn.getPersonalAccessToken(e.organization.id,e.user.id,t).then(({data:n})=>n)},createPersonalAccessToken({state:e,dispatch:t},n){return nn.createPersonalAccessToken(e.organization.id,e.user.id,n).then(async({data:i})=>(t("Notifications/displayToastNotification",{msg:Ks("Successfully created personal access token."),type:"success"},{root:!0}),i)).catch(i=>{throw t("Notifications/displayToastNotification",{msg:Ks("Failed to create personal access token."),type:"error"},{root:!0}),i})},revokePersonalAccessToken({state:e,dispatch:t},n){return nn.revokePersonalAccessToken(e.organization.id,e.user.id,n).then(async({data:i})=>(t("Notifications/displayToastNotification",{msg:Ks("Successfully revoked personal access token."),type:"success"},{root:!0}),i)).catch(i=>{throw t("Notifications/displayToastNotification",{msg:Ks("Failed to revoke personal access token."),type:"error"},{root:!0}),i})},async guestLogin({dispatch:e},t){try{return await nn.verifyGuestLogin(t),await e("getUserData"),!0}catch{return e("Modals/openModal",{title:"Sharing link has expired",message:"Register to try our app for free.",confirmButton:{text:"Continue"},cancelButton:null},{root:!0}),!1}},async getPersonalAccessTokenAbilities({commit:e,rootState:t}){return nn.getPersonalAccessTokenAbilities(t.Auth.organization.id).then(({data:n})=>e("setPersonalAccessTokenAbilities",n))},async loginSso({dispatch:e},t){try{return await nn.loginSso({...t,client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET}),await e("getUserData"),!0}catch(n){if(n.response.status===412)throw n;return!1}},getSsoProviderRedirect(e,{provider:t,params:n}){return nn.getSsoProviderRedirect(t,n).then(({data:i})=>i)},sendTOSConsent(e,{organizationId:t,payload:n}){return J6.sendConsent(t,n).then(({data:i})=>i)}},n8={namespaced:!0,state:Q6,mutations:e8,actions:t8,getters:Z6},i8={},r8={},s8={getId(){}},o8={},a8={namespaced:!0,state:i8,getters:s8,mutations:r8,actions:o8},{t:l8}=Tt.global,c8={openModals:[]},u8={closeModal(e,t){const n=e.openModals.findIndex(i=>i.id===t);n!==-1&&e.openModals.splice(n,1)},closeAllModals(e){e.openModals=[]},openModal(e,t){e.openModals.push(t)}},h8={},d8={openModal({commit:e},t){return t.id=t.id||Xr(),e("openModal",t),t.id},openDeleteModal({commit:e},{title:t,message:n,content:i,onClick:r,confirmButtonText:s}){const o={id:Xr(),title:t,message:n,content:i,confirmButton:{text:s||l8("Delete"),type:"delete",onClick:r}};e("openModal",o)},closeModal({commit:e},t){e("closeModal",t)},closeAllModals({commit:e}){e("closeAllModals")}},f8={namespaced:!0,state:c8,getters:h8,mutations:u8,actions:d8};var XT={};(function(e){(function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(u){return r(o(u),arguments)}function i(u,a){return n.apply(null,[u].concat(a||[]))}function r(u,a){var h=1,c=u.length,l,d="",f,p,g,m,v,y,S,_;for(f=0;f<c;f++)if(typeof u[f]=="string")d+=u[f];else if(typeof u[f]=="object"){if(g=u[f],g.keys)for(l=a[h],p=0;p<g.keys.length;p++){if(l==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',g.keys[p],g.keys[p-1]));l=l[g.keys[p]]}else g.param_no?l=a[g.param_no]:l=a[h++];if(t.not_type.test(g.type)&&t.not_primitive.test(g.type)&&l instanceof Function&&(l=l()),t.numeric_arg.test(g.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(n("[sprintf] expecting number but found %T",l));switch(t.number.test(g.type)&&(S=l>=0),g.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,g.width?parseInt(g.width):0);break;case"e":l=g.precision?parseFloat(l).toExponential(g.precision):parseFloat(l).toExponential();break;case"f":l=g.precision?parseFloat(l).toFixed(g.precision):parseFloat(l);break;case"g":l=g.precision?String(Number(l.toPrecision(g.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=g.precision?l.substring(0,g.precision):l;break;case"t":l=String(!!l),l=g.precision?l.substring(0,g.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=g.precision?l.substring(0,g.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=g.precision?l.substring(0,g.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}t.json.test(g.type)?d+=l:(t.number.test(g.type)&&(!S||g.sign)?(_=S?"+":"-",l=l.toString().replace(t.sign,"")):_="",v=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",y=g.width-(_+l).length,m=g.width&&y>0?v.repeat(y):"",d+=g.align?_+l+m:v==="0"?_+m+l:m+_+l)}return d}var s=Object.create(null);function o(u){if(s[u])return s[u];for(var a=u,h,c=[],l=0;a;){if((h=t.text.exec(a))!==null)c.push(h[0]);else if((h=t.modulo.exec(a))!==null)c.push("%");else if((h=t.placeholder.exec(a))!==null){if(h[2]){l|=1;var d=[],f=h[2],p=[];if((p=t.key.exec(f))!==null)for(d.push(p[1]);(f=f.substring(p[0].length))!=="";)if((p=t.key_access.exec(f))!==null)d.push(p[1]);else if((p=t.index_access.exec(f))!==null)d.push(p[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");h[2]=d}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:h[0],param_no:h[1],keys:h[2],sign:h[3],pad_char:h[4],align:h[5],width:h[6],precision:h[7],type:h[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(h[0].length)}return s[u]=c}e.sprintf=n,e.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i)})()})(XT);class Td{static getNotifications(t,n={},i={}){return Q.request(`/organization/${t}/notifications`,{type:"GET",params:n,...i})}static getUnseenNotifications(t,n={},i={}){return Q.request(`/organization/${t}/notifications/unseen`,{type:"GET",params:n,...i})}static markNotificationAsSeen(t,n,i={}){return Q.request(`/organization/${t}/notifications/seen/${n}`,{type:"PUT",...i})}static markNotificationAsUnseen(t,n,i={}){return Q.request(`/organization/${t}/notifications/unseen/${n}`,{type:"PUT",...i})}}const pb=e=>{const t={id:e.id,userId:e.user_id,msg:e.message.replacements.length>0?XT.vsprintf(e.message.message,e.message.replacements):e.message.message,createdAt:e.created_at,seen:e.seen,title:e.class_name.split("\\").slice(-1)[0],type:e.type};return e.class_name==="App\\Domains\\Datasets\\Models\\DatasetModel"&&(t.link={name:"pages",params:{tool:"pages:catalogue",itemId:e.class_id,subpage:"show"}}),e.class_name==="App\\Domains\\Downloads\\Models\\DownloadModel"&&(t.link={name:"pages",params:{tool:"pages:downloads"}}),t},p8={notifications:[],toastNotifications:[],toastNotificationsCloseTimeouts:{},showOnlyUnseenNotifications:!0},g8={displayToastNotification(e,t){e.toastNotifications.push(t)},removeToastNotification(e,{id:t}){const n=e.toastNotifications.findIndex(i=>i.id===t);e.toastNotifications.splice(n,1)},setNotifications(e,t){e.notifications=t.filter(n=>n.type!=="system")},addNotification(e,t){e.notifications.unshift(t)},setShowOnlyUnseenNotifications(e,t){e.showOnlyUnseenNotifications=t},markNotificationAsSeen(e,{id:t}){e.notifications.find(n=>n.id===t).seen=!0},markNotificationAsUnseen(e,{id:t}){e.notifications.find(n=>n.id===t).seen=!1}},m8={getToastNotifications(e){return e.toastNotifications},getNotifications(e){return e.notifications.map(pb)},getUnseenNotifications(e){return e.notifications.filter(t=>!t.seen).map(pb)}},v8={async displayToastNotification({commit:e,dispatch:t},{timeout:n=1e4,...i}){const r=Xr();e("displayToastNotification",{...i,id:r}),t("setToastNotificationCloseTimeout",{id:r,timeout:n})},async stopToastNotificationTimeout({dispatch:e},t){e("removeToastNotificationCloseTimeout",t)},async startToastNotificationTimeout({dispatch:e},{timeout:t=5e3,...n}){e("setToastNotificationCloseTimeout",{...n,timeout:t})},setToastNotificationCloseTimeout({state:e,commit:t},{id:n,timeout:i}){if(e.toastNotificationsCloseTimeouts[n])try{clearTimeout(e.toastNotificationsCloseTimeouts[n])}catch{}e.toastNotificationsCloseTimeouts[n]=setTimeout(()=>t("removeToastNotification",{id:n}),i)},removeToastNotificationCloseTimeout({state:e},{id:t}){if(!!e.toastNotificationsCloseTimeouts[t])try{clearTimeout(e.toastNotificationsCloseTimeouts[t]),delete e.toastNotificationsCloseTimeouts[t]}catch{}},async removeToastNotification({commit:e},t){e("removeToastNotification",t)},async getNotifications({commit:e,rootState:t}){Td.getNotifications(t.Auth.organization.id,{"filter[type]":"!=system"}).then(({data:n})=>e("setNotifications",n))},async addNotification({commit:e},t){e("addNotification",t)},async setShowOnlyUnseenNotifications({commit:e},t){e("setShowOnlyUnseenNotifications",t)},async markNotificationAsSeen({commit:e,rootState:t},n){Td.markNotificationAsSeen(t.Auth.organization.id,n.id),e("markNotificationAsSeen",n)},async markNotificationAsUnseen({commit:e,rootState:t},n){Td.markNotificationAsUnseen(t.Auth.organization.id,n.id),e("markNotificationAsUnseen",n)},async toggleNotificationSeenStatus({dispatch:e},t){return t.seen?e("markNotificationAsSeen",t):e("markNotificationAsUnseen",t)}},y8={namespaced:!0,state:p8,getters:m8,mutations:g8,actions:v8},_8={entered:[],coordinates:{},dragging:{},sortable:{}},b8={getSortable(e){return t=>e.sortable[t]},getSortableListGroup(e,t){return(n,i)=>i.reduce((r,s)=>(r.list||[])[s],t.getSortable(n))},getSortableListItem(e,t){return(n,i,r)=>t.getSortableListGroup(n,i).list[r]},isItemDroppable(e,t){return(n,i,r)=>{const{droppable:s=!0}=t.getSortableListItem(n,i,r),{dragging:o={}}=e;if(!!!Object.keys(o).length)return s;const h=[...o.parent_indexes,o.item_index].reduce((c,l,d)=>l===i[d],!0);return s&&!h}},getSortableList(e){return t=>e.sortable[t].list}},w8={addChildListGroup(e,{droppedOnItem:t,movedItem:n}){t.list||(t.list=[]),t.list.push(n)},addSortable(e,{sortableId:t,sortable:n}){e.sortable[t]={...n}},clearSortable(e,t){e.sortable[t].list=[]},removeSortable(e,t){delete e.sortable[t]},setEntered(e,t=[]){e.entered=t},setCoordinates(e,t={}){e.coordinates=t},setDragging(e,t={}){e.dragging=t}},S8={reorderItems({state:e,getters:t,dispatch:n},{draggedItem:i,droppedOnItem:r}){const{pageY:s,middleY:o}=e.coordinates,u=s<=o?0:1,a=t.getSortableListGroup(r.sortable_id,r.parent_indexes),h=t.getSortableListGroup(i.sortable_id,i.parent_indexes),[c]=h.list.splice(i.item_index,1),l=r.sortable_id===i.sortable_id&&i.parent_indexes.join("")===r.parent_indexes.join(""),d=i.item_index<r.item_index;let f=r.item_index+u;return l&&d&&(f-=1),a.list.splice(f,0,c),n("cleanDraggingState")},createChildListGroup({getters:e,commit:t,dispatch:n},{sortableId:i,itemIndex:r,parentIndexes:s,draggedItem:o}){const u=e.getSortableListGroup(o.sortable_id,o.parent_indexes),[a]=u.list.splice(o.item_index,1),h=e.getSortableListGroup(i,[...s,r]);return t("addChildListGroup",{droppedOnItem:h,movedItem:a}),n("cleanDraggingState")},addNewItem({getters:e,commit:t,dispatch:n},{sortableId:i,parentIndexes:r=[],item:s}){const o=e.getSortableListGroup(i,r);return t("addChildListGroup",{droppedOnItem:o,movedItem:s}),n("cleanDraggingState")},async cleanDraggingState({commit:e}){return await zW(200),e("setEntered"),e("setDragging"),e("setCoordinates"),!0}},T8={state:_8,getters:b8,mutations:w8,actions:S8,namespaced:!0};class E8{static validateArguments(t,n){let i=!0;const r={};return Object.keys(n).forEach(s=>{const{required:o}=n[s];o&&(i=i&&t[s]!==void 0),t[s]!==void 0&&(r[s]=t[s])}),i&&r}}class A8{constructor(t,n,i,r){this.name=t,this.potreeStoreId=n,this.PUB_CONNECTORS=i,this.SUB_CONNECTORS=r,this.functionCallbacks={},this.messageListener=({data:s,origin:o})=>{if(o!==window.parent.ENV_VARS.BASE_URL)return;const{cmd:u,functionCallbackId:a=null,args:h=!1,potreeStoreId:c}=s;if(!(t==="client"&&this.potreeStoreId!==c)){if(typeof this.functionCallbacks[a]?.callback=="function")this.functionCallbacks[a].callback(h),delete this.functionCallbacks[a];else if(u){const l=u.split("."),d=l.pop(),f=l.reduce((g,m)=>g[m]||{},this.SUB_CONNECTORS);f[d]||console.error(this.name,`Method ${d} does not exists`);let p;if(typeof f[d]=="function"&&(p=f[d](this,h)),p===void 0)return;p instanceof Promise?p.then(g=>{this.sendCmd(u,g,a||void 0)}).catch(()=>{console.error(`Error while getting results for function "${u}"`)}):this.sendCmd(u,p,a||void 0)}}},this.initFunctions(),this.registerMessageListener()}destroy(){window.removeEventListener("message",this.messageListener)}registerMessageListener(){window.addEventListener("message",this.messageListener,!1)}sendCmd(t,n={},i=void 0){}initFunctions(){Object.keys(this.PUB_CONNECTORS).forEach(t=>{this[t]||(this[t]={});const n=this.PUB_CONNECTORS[t].getClientSettings();Object.keys(n).forEach(i=>{if(this[i]){console.error(`[Potree ERROR] Function '${i}' already exist`);return}const r=this[t];r[i]=this.functionSetter(i,n[i],[t])})})}functionSetter(t,n,i){const s=`${i.join(".")}.${t}`;return(...o)=>{let u,a;const h=`${s}-${this.name}${Xr()}`;if([u,a]=o,typeof o[0]=="function"&&([a]=o,u={}),typeof o[1]=="object"&&(u=o[1]),a&&(this.functionCallbacks[h]={callback:a}),!n.argsDefinition){console.error(`Arguments definition for ${i.join("/")} -> ${t} not set.`);return}const c=E8.validateArguments(u,n.argsDefinition);if(c===!1){console.error(this.name,`Arguments for ${i.join("/")} -> ${t} not valid.`);return}this.sendCmd(s,{...c},h)}}debounce(t,n=0){let i;return(...r)=>{const s=()=>t(...r);i&&clearTimeout(i),i=setTimeout(s,n)}}throttle(t,n=0){let i=null,r=null;return(...s)=>{r=s;const o=()=>{t(...r),i=null};i||(n===0&&(i=o()),i=setTimeout(o,n))}}}class zt{constructor(t={}){this.settings=t}getClientSettings(){return Object.keys(this.settings).reduce((t,n)=>(t[n]={argsDefinition:this.settings[n].argsDefinition},t),{})}}class C8 extends zt{constructor(){super({load:{argsDefinition:{path:{required:!1},name:{required:!1},append:{required:!1},classifications:{required:!1},defaultAttribute:{required:!1},tilesUpdatedAt:{required:!1},initialLoad:{required:!1},options:{required:!1}}},settings:{argsDefinition:{}},boundingBox:{argsDefinition:{}},setCameraPosition:{argsDefinition:{position:{required:!0}}}})}}const x8=new C8;class M8 extends zt{constructor(){super({toJson:{argsDefinition:{}},toDxf:{argsDefinition:{}}})}}const k8=new M8;class $8 extends zt{constructor(){super({pointBudget:{argsDefinition:{value:{required:!0}}},fov:{argsDefinition:{value:{required:!0}}}})}}const I8=new $8;class R8 extends zt{constructor(){super({enable:{argsDefinition:{value:{required:!0}}},radius:{argsDefinition:{value:{required:!0}}},strength:{argsDefinition:{value:{required:!0}}},opacity:{argsDefinition:{value:{required:!0}}}})}}const L8=new R8;class O8 extends zt{constructor(){super({background:{argsDefinition:{type:{required:!0}}}})}}const P8=new O8;class N8 extends zt{constructor(){super({splatQuality:{argsDefinition:{type:{required:!0}}},minNodeSize:{argsDefinition:{value:{required:!0}}},boundingBox:{argsDefinition:{enabled:{required:!0}}},freeze:{argsDefinition:{enabled:{required:!0}}},loadOBJ:{argsDefinition:{url:{required:!0},zOffset:{required:!1}}},showHideOBJs:{argsDefinition:{show:{required:!0}}},changeOBJDisplay:{argsDefinition:{type:{required:!0}}},setLengthUnit:{argsDefinition:{unit:{required:!0}}},getCopcFilesInsideView:{argsDefinition:{copcFiles:{required:!0}}},setVisibleCopcFileBoundingBoxes:{argsDefinition:{boundingBoxes:{required:!0},uuid:{required:!0}}},drawBoxesWireFrames:{argsDefinition:{boxes:{required:!0}}},hideBoxesWireFrames:{argsDefinition:{}},forceShiftKey:{argsDefinition:{}},forceRightClickOnRenderElement:{argsDefinition:{}}})}}const D8=new N8;class F8 extends zt{constructor(){super({point:{argsDefinition:{}},angle:{argsDefinition:{}},distance:{argsDefinition:{}},height:{argsDefinition:{}},circle:{argsDefinition:{}},azimuth:{argsDefinition:{}},area:{argsDefinition:{}},aoi:{argsDefinition:{}},volume:{argsDefinition:{}},volumeClip:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},volumeResetOrientation:{argsDefinition:{uuid:{required:!0}}},volumeMakeUniform:{argsDefinition:{uuid:{required:!0}}},sphereDistance:{argsDefinition:{}},profile:{argsDefinition:{}},annotation:{argsDefinition:{}},annotationTitle:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},annotationDbId:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},annotationIsHighlighted:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},annotationDescription:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},addAnnotation:{argsDefinition:{dbId:{required:!1},position:{required:!0},title:{required:!0}}},showHideAnnotations:{argsDefinition:{show:{required:!0}}},removeAllAnnotations:{argsDefinition:{}},removeAll:{argsDefinition:{}},showHideLabels:{argsDefinition:{value:{required:!0}}},visible:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},remove:{argsDefinition:{uuid:{required:!0}}},profileFromMeasure:{argsDefinition:{uuid:{required:!0}}},profileWidth:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},show2dProfile:{argsDefinition:{uuid:{required:!0}}},hideAllOutsideClip:{argsDefinition:{clipTask:{required:!0}}}})}}const B8=new F8;class H8 extends zt{constructor(){super({volume:{argsDefinition:{}},polygon:{argsDefinition:{}},box:{argsDefinition:{}},remove:{argsDefinition:{}},clipTask:{argsDefinition:{type:{required:!0}}},clipMethod:{argsDefinition:{type:{required:!0}}}})}}const U8=new H8;class z8 extends zt{constructor(){super({earth:{argsDefinition:{}},fly:{argsDefinition:{}},helicopter:{argsDefinition:{}},orbit:{argsDefinition:{}},fullExtent:{argsDefinition:{}},navigationCube:{argsDefinition:{}},compass:{argsDefinition:{}},cameraAnimation:{argsDefinition:{}},cameraAnimationPlay:{argsDefinition:{uuid:{required:!0}}},cameraAnimationDuration:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},cameraAnimationTime:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},cameraAnimationControlPointAdd:{argsDefinition:{uuid:{required:!0},index:{required:!0}}},cameraAnimationControlPointRemove:{argsDefinition:{uuid:{required:!0},index:{required:!0}}},speed:{argsDefinition:{value:{required:!0}}},cameraProjection:{argsDefinition:{type:{required:!0}}},left:{argsDefinition:{}},right:{argsDefinition:{}},front:{argsDefinition:{}},back:{argsDefinition:{}},top:{argsDefinition:{}},bottom:{argsDefinition:{}},leftTargetView:{argsDefinition:{}},rightTargetView:{argsDefinition:{}},frontTargetView:{argsDefinition:{}},backTargetView:{argsDefinition:{}},topTargetView:{argsDefinition:{}},bottomTargetView:{argsDefinition:{}},navigate:{argsDefinition:{}},moveTo:{argsDefinition:{position:{required:!0},target:{required:!0}}},centerPointCloud:{argsDefinition:{uuid:{required:!0}}},centerVirtualTile:{argsDefinition:{polygon:{required:!0}}},setViewPosition:{argsDefinition:{position:{required:!0}}},centerPolygonWith3DExtents:{argsDefinition:{polygon:{required:!0},extents:{required:!0}}}})}}const W8=new z8;class V8 extends zt{constructor(){super({init:{argsDefinition:{uuid:{required:!0}}},activeAttributeName:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbGamma:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbBrightness:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbContrast:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},heightRange:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},getHeightRangeAll:{argsDefinition:{}},gradientRepeat:{argsDefinition:{type:{required:!0}}},intensityRange:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},getIntensityRange:{argsDefinition:{uuid:{required:!0}}},getIntensityRangeAll:{argsDefinition:{}},intensityGamma:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},intensityBrightness:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},intensityContrast:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},intensityWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},elevationWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},classificationWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},pointSize:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},pointSizing:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},shape:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},pointOpacity:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},visible:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},updateAttributeRanges:{argsDefinition:{ranges:{required:!0}}}})}}const j8=new V8;class G8 extends zt{constructor(){super({classifications:{argsDefinition:{}},classificationsList:{argsDefinition:{}},activeClassification:{argsDefinition:{name:{required:!0}}},toggleAllVisibility:{argsDefinition:{}},visibility:{argsDefinition:{code:{required:!0},checked:{required:!0}}},setColor:{argsDefinition:{code:{required:!0},rgba:{required:!0}}},setClassification:{argsDefinition:{classifications:{required:!0}}}})}}const q8=new G8;class K8 extends zt{constructor(){super({load:{argsDefinition:{path:{required:!0},projection:{required:!1}}},closeViewer:{argsDefinition:{}},loadFromArray:{argsDefinition:{uuid:{required:!0},images:{required:!0},path:{required:!1},projection:{required:!1}}},focusByIndex:{argsDefinition:{uuid:{required:!0},index:{required:!0}}},focusByFileName:{argsDefinition:{uuid:{required:!0},path:{required:!0},target:{required:!1},targetSettings:{required:!1}}},remove:{argsDefinition:{uuid:{required:!0}}}})}}const Y8=new K8;class X8 extends zt{constructor(){super({zoomToObject:{argsDefinition:{uuid:{required:!0},zoomMode:{required:!0}}},zoomToPosition:{argsDefinition:{position:{required:!0}}},cameraToTarget:{argsDefinition:{position:{required:!0}}}})}}const J8=new X8;class Q8 extends zt{constructor(){super({setEditMode:{argsDefinition:{enabled:{required:!1}}},editFeature:{argsDefinition:{feature:{required:!0},userData:{required:!1}}},removeFeature:{argsDefinition:{userData:{required:!1}}}})}}const Z8=new Q8;class eG extends zt{constructor(){super({init:{argsDefinition:{points:{required:!0},position:{required:!1}}},getProjection:{argsDefinition:{}},toggle:{argsDefinition:{}},play:{argsDefinition:{}},pause:{argsDefinition:{}},reverse:{argsDefinition:{}},startPlayMode:{argsDefinition:{}},stopPlayMode:{argsDefinition:{}},setYaw:{argsDefinition:{value:{required:!1}}},setPitch:{argsDefinition:{value:{required:!1}}},setElevation:{argsDefinition:{value:{required:!1}}},setSpeed:{argsDefinition:{value:{required:!1}}},setPercent:{argsDefinition:{value:{required:!0}}}})}}const tG=new eG;class nG extends zt{constructor(){super({renderVectors:{argsDefinition:{vectors:{required:!0},id:{required:!0}}},visible:{argsDefinition:{value:{required:!0},id:{required:!0}}},vectorColor:{argsDefinition:{value:{required:!0},id:{required:!0}}},lineWidth:{argsDefinition:{value:{required:!0},id:{required:!0}}},lineOpacity:{argsDefinition:{value:{required:!0},id:{required:!0}}},pointSize:{argsDefinition:{value:{required:!0},id:{required:!0}}},removeVector:{argsDefinition:{datasetId:{required:!0},vectorId:{required:!0}}}})}}const iG=new nG,gb={PointCloudLoader:x8,PointCloudExport:k8,Appearance:I8,EyeDomeLighting:L8,Background:P8,Other:D8,Measurement:B8,Clipping:U8,Navigation:W8,Attribute:j8,Filters:q8,Images360:Y8,Zoom:J8,Editor:Z8,AnimationPlayer:tG,Vectors:iG};class rG extends zt{constructor(){super({front:{argsDefinition:{}},back:{argsDefinition:{}},left:{argsDefinition:{}},right:{argsDefinition:{}},top:{argsDefinition:{}},bottom:{argsDefinition:{}},polygon:{argsDefinition:{}},rectangle:{argsDefinition:{}},strip:{argsDefinition:{}},lineUp:{argsDefinition:{}},lineDown:{argsDefinition:{}},runLastCommand:{argsDefinition:{}},remove:{argsDefinition:{}},clipTask:{argsDefinition:{type:{required:!0}}},moveClip:{argsDefinition:{direction:{required:!0}}},clipMethod:{argsDefinition:{type:{required:!0}}},confirm:{argsDefinition:{}},navigate:{argsDefinition:{}},setVirtualTile:{argsDefinition:{virtualTile:{required:!0}}},showClipOutsidePoints:{argsDefinition:{value:{required:!0}}},reenterClip:{argsDefinition:{}}})}}const sG=new rG;class oG extends zt{constructor(){super({selectedClassification:{argsDefinition:{value:{required:!0}}},toggleActiveClassification:{argsDefinition:{value:{required:!0}}},activeClassifications:{argsDefinition:{list:{required:!0}}},clearActiveClassifications:{argsDefinition:{}},classificationType:{argsDefinition:{value:{required:!0}}},selectedInstanceId:{argsDefinition:{value:{required:!0}}},activeInstances:{argsDefinition:{list:{required:!0}}},visibleInstances:{argsDefinition:{list:{required:!0}}},discolorHiddenInstances:{argsDefinition:{value:{required:!0}}},invertVisibleInstances:{argsDefinition:{value:{required:!0}}},randomizeInstanceColors:{argsDefinition:{}},randomInstanceColorSeed:{argsDefinition:{value:{required:!0}}}})}}const aG=new oG;class lG extends zt{constructor(){super({setCommands:{argsDefinition:{commands:{required:!0}}},undoCommand:{argsDefinition:{fit:{required:!1},tilesUpdatedAt:{required:!1}}},reloadPointCloud:{argsDefinition:{path:{required:!1},name:{required:!1},fit:{required:!1},tilesUpdatedAt:{required:!1}}},reloadAllPointClouds:{argsDefinition:{fit:{required:!1},tilesUpdatedAt:{required:!1}}}})}}const cG=new lG;class uG extends zt{constructor(){super({setPois:{argsDefinition:{pois:{required:!0}}},box:{argsDefinition:{attributes:{required:!1}}},point:{argsDefinition:{attributes:{required:!1}}},line:{argsDefinition:{attributes:{required:!1}}},polygon:{argsDefinition:{attributes:{required:!1}}},addPolygon:{argsDefinition:{polygon:{required:!0},options:{required:!1}}},confirm:{argsDefinition:{}},updatePoi:{argsDefinition:{uuid:{required:!0},poiId:{required:!1},poiAttributes:{required:!1}}},remove:{argsDefinition:{uuid:{required:!0},type:{required:!0}}},removeAll:{argsDefinition:{}},poiVisibility:{argsDefinition:{names:{required:!0}}},attributeNameCount:{argsDefinition:{name:{required:!0}}}})}}const hG=new uG,dG={ClippingEditor:sG,AttributeEditor:aG,PointWorker:cG,Poi:hG};class fG{cameraPosition(t,n){t.store.dispatch("setCameraPosition",n)}selectedPosition(t,n){t.store.dispatch("setSelectedPosition",n)}moveSpeed(t,n){t.store.dispatch("setMoveSpeed",n)}pointCloudUpdated(t,{uuid:n,data:i}){t.store.dispatch("updatePointCloud",{uuid:n,data:i})}measurementUpdated(t,{uuid:n,data:i}){t.store.dispatch("updateMeasurement",{uuid:n,data:i})}pointMeasurementUpdated(t,{uuid:n,data:i}){t.store.dispatch("updateSelectedPointMeasure",{uuid:n,data:i})}measurementRemoved(t,{uuid:n}){t.store.dispatch("removeMeasurement",n)}volumeUpdated(t,{uuid:n,data:i}){t.store.dispatch("updateMeasurement",{uuid:n,data:i})}volumeRemoved(t,{uuid:n}){t.store.dispatch("removeMeasurement",n)}profileUpdated(t,{uuid:n,data:i}){t.store.dispatch("updateMeasurement",{uuid:n,data:i})}profileRemoved(t,{uuid:n}){t.store.dispatch("removeMeasurement",n)}annotationUpdated(t,{uuid:n,data:i}){t.store.dispatch("updateAnnotation",{uuid:n,data:i})}annotationRemoved(t,{uuid:n}){t.store.dispatch("removeAnnotation",n)}cameraAnimationUpdated(t,{uuid:n,data:i}){t.store.dispatch("updateCameraAnimation",{uuid:n,data:i})}cameraAnimationRemoved(t,{uuid:n}){t.store.dispatch("removeCameraAnimation",n)}toggleAllVisibility(t,{checked:n}){t.store.dispatch("toggleAllVisibility",n)}images360Updated(t,{uuid:n,data:i}){t.store.dispatch("updateImages360",{uuid:n,data:i})}images360Removed(t,{uuid:n}){t.store.dispatch("removeImages360",n)}image360Focus(t,{file:n}){t.store.dispatch("updateImage360File",{file:n})}fovUpdated(t,{fov:n}){t.store.dispatch("updateFov",{fov:n})}evlOpacityUpdated(t,{opacity:n}){t.store.dispatch("updateEvlOpacity",{opacity:n})}serverReady(t){t.store.dispatch("serverReady",void 0)}commandAdded(t,n){t.store.dispatch("commandAdded",n)}commandsChanged(t,n){t.store.dispatch("commandsChanged",n)}clipTaskChanged(t,{clipTask:n}){t.store.dispatch("updateClipTask",{clipTask:n})}polygonClipVolumeUpdated(t,{count:n,maxCount:i}){t.store.dispatch("updatePolygonClipVolume",{count:n,maxCount:i})}boxClipVolumeUpdated(t,{count:n}){t.store.dispatch("updateBoxClipVolume",{count:n})}keyPressed(t,{mainKeyCode:n,alterKeyCode:i}){t.store.dispatch("updateKeyPressed",{mainKeyCode:n,alterKeyCode:i})}setSelection(t,n){t.store.dispatch("Poi/updateSelectedPoi",n)}selectInstanceId(t,n){t.store.dispatch("selectInstanceId",n)}virtualTileChanged(t,{virtualTile:n}){t.store.dispatch("updateVirtualTile",{virtualTile:n})}vectorSelected(t,{vector:n}){t.store.dispatch("selectVector",{vector:n})}}const pG=new fG;class gG{setProperty(t,n){t.store.dispatch("AnimationPlayer/setProperty",n)}}const mG=new gG,vG={Push:pG,AnimationPlayerPush:mG},Bf={DEFAULT:0,EDITOR:1};class yG extends A8{constructor(t,n,i=Bf.DEFAULT){const r=i===Bf.EDITOR?{...gb,...dG}:gb;super("client",n.state.moduleId,r,vG),this.element=t,this.store=n,this.mode=i}sendCmd(t,n={},i=void 0){const r=JSON.parse(JSON.stringify(n));this.element.contentWindow.postMessage({cmd:t,args:r,functionCallbackId:i},window.ENV_VARS.BASE_URL)}}class Eg{constructor(t=1/0,n=1/0){this.max_pending_promises=t,this.max_queued_promises=n,this.pending_promises=0,this.queue=[]}enqueue(t){return new Promise((n,i)=>{if(this.queue.length>this.max_queued_promises){i(new Error("Queue limit reached"));return}this.queue.push({promiseGenerator:t,resolve:n,reject:i}),this.dequeue()})}prequeue(t){return new Promise((n,i)=>{if(this.queue.length>this.max_queued_promises){i(new Error("Queue limit reached"));return}this.queue.unshift({promiseGenerator:t,resolve:n,reject:i}),this.dequeue()})}get pendingLength(){return this.pending_promises}get queueLength(){return this.queue.length}static resolveWith(t){return typeof t?.then=="function"?t:new Promise(n=>{n(t)})}dequeue(){if(this.pending_promises>=this.max_pending_promises)return!1;const t=this.queue.shift();if(!t)return!1;try{this.pending_promises+=1,Eg.resolveWith(t.promiseGenerator()).then(n=>{this.pending_promises-=1,t.resolve(n),this.dequeue()}).catch(n=>{this.pending_promises-=1,t.reject(n),this.dequeue()})}catch(n){this.pending_promises-=1,t.reject(n),this.dequeue()}return!0}}const{t:mb}=Tt.global,_G={pocAttributeProperty:{pointSize:{value:.5},shape:{value:1}},stateProperty:{pointBudget:{value:2e3*1e3}}},bG=()=>({moduleId:"",client:!1,ready:!1,loaded:!1,loadPointCloudError:!1,forcedPointCloud:!1,loadingPanoramas:!1,keyPressed:void 0,filePath:"",tilesUpdatedAt:null,cameraShouldUpdate:!1,disableKeyboardShortcuts:!1,selectingInstanceId:{selecting:!1,type:"to"},multiViewId:null,viewportId:null,selectedVector:null,copcFilesExtents:{},queueLoaderPreset:[],queueActionsPreset:[],queue:new Eg(1),properties:{selectedObject:void 0,pointcloudId:void 0,datasetId:void 0,position:{},selectedPosition:{},cameraControlMode:"orbit",moveSpeed:{sliderValue:0,displayValue:0},pointCloudsAttribute:{},classifications:{},classificationsList:[],images360:[],image360file:"",polygonClipVolumeCount:0,boxClipVolumeCount:0,clipCameraPositionStack:[],commandsCount:0,activeClassifications:[],selectedClassification:"",selectedInstanceId:0,activeInstances:[],visibleInstances:[],discolorHiddenInstances:!1,invertVisibleInstances:!1,camera:{},editMode:"CLASSIFICATION",lengthUnit:"m",showClipOutsidePoints:!1,showCopcFilesExtents:!1,pointSize:3,pointSizeType:0,pointShape:1},objects:{pointClouds:{},measurements:{},annotations:{},cameraAnimations:{},images360:{},vectors:{}},counters:{pointClouds:0,measurements:0,annotations:0,cameraAnimations:1,images360:0},editor:{wkt:"",srid:"",id:"",editing:!1,targetSettings:void 0},autoOpenPanorama:!1,forcedPosition:void 0,classificationsAll:!0,rgbGammaOptions:{min:0,max:4,step:.01},rgbBrightnessOptions:{min:-1,max:1,step:.01},rgbContrastOptions:{min:-1,max:1,step:.01},heightRangeOptions:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER,step:1},heightRange:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER},intensityRangeOptions:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER,step:1},intensityRange:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER},intensityGammaOptions:{min:0,max:4,step:.01},intensityBrightnessOptions:{min:-1,max:1,step:.01},intensityContrastOptions:{min:-1,max:1,step:.01},weightOptions:{min:0,max:1,step:.01},gradientRepeatOptions:["CLAMP","REPEAT","MIRRORED_REPEAT"],gradientRepeat:"CLAMP",pointBudgetOptions:{min:1e3*1e3,max:10*1e3*1e3,step:1e3},pointBudget:2e3*1e3,fovOptions:{min:10,max:100,step:1},fov:60,edlEnabled:!0,edlRadiusOptions:{min:1,max:4,step:.01},edlRadius:1.4,edlStrengthOptions:{min:0,max:5,step:.01},edlStrength:.4,edlOpacityOptions:{min:0,max:1,step:.01},edlOpacity:1,backgroundOptions:["skybox","gradient","black","white","none"],background:"gradient",splatQualityOptions:["standard","hq"],splatQuality:"standard",minNodeSizeOptions:{min:10,max:1e3,step:1},minNodeSize:10,showBoundingBoxes:!1,freeze:!1,showMeasurementPoiLabels:!0,clipTaskOptions:["NONE","HIGHLIGHT","SHOW_INSIDE","SHOW_OUTSIDE"],clipTask:"HIGHLIGHT",clipMethodOptions:["INSIDE_ANY","INSIDE_ALL"],clipMethod:"INSIDE_ANY",cameraProjectionOptions:["PERSPECTIVE","ORTHOGRAPHIC"],cameraProjection:"PERSPECTIVE",moveSpeedOptions:{min:0,max:1,step:.01},pointSizeOptions:{min:0,max:15,step:.01},pointSizingOptions:{0:"FIXED",1:"ATTENUATED",2:"ADAPTIVE"},shapeOptions:{0:"SQUARE",1:"CIRCLE",2:"PARABOLOID"},pointOpacityOptions:{min:0,max:1,step:.001},cameraAnimationTimeOptions:{min:0,max:1,step:.001},cameraAnimationTime:0,pocAttribute:"rgba",tracePosition:!0,traceBoundingBox:!0,tracePositionCenter:!0,recenter:!1}),wG={},SG={setStateProperty(e,{property:t,value:n}){e[t]=n},setStatePropertiesProperty(e,{property:t,value:n}){e.properties[t]=n},setStateEditorProperty(e,{property:t,value:n}){e.editor[t]=n},setStatePocAttribute(e,{uuid:t,value:n}){e.properties.pointCloudsAttribute[t]=n;const{min:i,max:r}=n.heightRange;i<e.heightRange.min&&(e.heightRange.min=Math.round(i),e.heightRangeOptions.min=Math.round(i)),r>e.heightRange.max&&(e.heightRange.max=Math.round(r),e.heightRangeOptions.max=Math.round(r))},setStatePocAttributeProperty(e,{uuid:t,property:n,value:i}){e.properties.pointCloudsAttribute[t][n]=i},setStateCountersProperty(e,{property:t,value:n}){e.counters[t]=n},setStateObjectsProperty(e,{group:t=!1,property:n,value:i}){t?e.objects[t][n]=i:e.objects[n]=i},deleteStateObjectsProperty(e,{group:t=!1,uuid:n}){t?delete e.objects[t][n]:delete e.object[n]}},TG={runFromLoaderQueue({state:e},t){return e.ready?e.queue.enqueue(t):(e.queueLoaderPreset.push(t),!0)},frameLoaded(e,t){const{commit:n}=e,i=new yG(t,e,Bf.EDITOR);n("setStateProperty",{property:"client",value:i})},serverReady({commit:e,dispatch:t}){return e("setStateProperty",{property:"ready",value:!0}),t("loadPresets")},setFilePath({commit:e},t){e("setStateProperty",{property:"filePath",value:t})},setTilesUpdatedAt({commit:e},t){e("setStateProperty",{property:"tilesUpdatedAt",value:t})},setCommands({dispatch:e,state:t},n){return e("runFromLoaderQueue",()=>{t.client.PointWorker.setCommands({commands:n},()=>{})})},commandAdded({state:e,dispatch:t},n){const i={dataset_id:e.properties.datasetId,...n};return t("AppState/PointWorker/setCommand",i,{root:!0}).catch(r=>{throw r.status===422&&r.data?t("Notifications/displayToastNotification",{msg:r.data.message??mb("Unknown server error."),type:"warning",timeout:1e4},{root:!0}):t("Notifications/displayToastNotification",{msg:mb("Failed to send command to server."),type:"error"},{root:!0}),e.client.PointWorker.undoCommand({},()=>{}),r})},async reloadPointCloud({state:e,dispatch:t}){t("AppState/PointWorker/getCommands",e.properties.datasetId,{root:!0}).then(n=>t("setCommands",n)).then(()=>{e.client.PointWorker.reloadPointCloud({path:e.filePath,tilesUpdatedAt:e.tilesUpdatedAt},()=>{})})},async reloadAllPointClouds({state:e,dispatch:t}){t("AppState/PointWorker/getCommands",e.properties.datasetId,{root:!0}).then(n=>t("setCommands",n)).then(()=>{e.client.PointWorker.reloadAllPointClouds({tilesUpdatedAt:e.tilesUpdatedAt},()=>{})})},commandsChanged({commit:e},{count:t}){e("setStatePropertiesProperty",{property:"commandsCount",value:t})},updateKeyPressed({commit:e},{mainKeyCode:t,alterKeyCode:n}){setTimeout(()=>{e("setStateProperty",{property:"keyPressed",value:{mainKeyCode:t,alterKeyCode:n}})},0)},destroy({commit:e,dispatch:t,state:n}){n.client&&n.client.destroy(),e("setStateProperty",{property:"ready",value:!1}),e("setStateProperty",{property:"client",value:null}),e("setStateProperty",{property:"cameraShouldUpdate",value:!1}),t("reset")},reset({commit:e}){e("setStateProperty",{property:"loaded",value:!1}),e("setStateProperty",{property:"loadPointCloudError",value:!1}),e("setStateProperty",{property:"forcedPointCloud",value:!1}),e("setStateProperty",{property:"tilesUpdatedAt",value:null}),e("setStatePropertiesProperty",{property:"position",value:{}}),e("setStateObjectsProperty",{property:"pointClouds",value:{}}),e("setStateObjectsProperty",{property:"measurements",value:{}}),e("setStateObjectsProperty",{property:"annotations",value:{}}),e("setStateObjectsProperty",{property:"cameraAnimations",value:{}}),e("setStateObjectsProperty",{property:"images360",value:{}}),e("setStatePropertiesProperty",{property:"camera",value:{}}),e("setStateCountersProperty",{property:"pointClouds",value:0}),e("setStateCountersProperty",{property:"measurements",value:0}),e("setStateCountersProperty",{property:"annotations",value:0}),e("setStateCountersProperty",{property:"cameraAnimations",value:1}),e("setStateCountersProperty",{property:"images360",value:0}),e("setStatePropertiesProperty",{property:"image360file",value:""}),e("setStatePropertiesProperty",{property:"selectedObject",value:void 0}),e("setStateProperty",{property:"tracePosition",value:!0}),e("setStateProperty",{property:"traceBoundingBox",value:!0}),e("setStateProperty",{property:"tracePositionCenter",value:!0}),e("setStateProperty",{property:"pointSize",value:.5}),e("setStateProperty",{property:"pointSizing",value:"ADAPTIVE"}),e("setStateProperty",{property:"shape",value:"CIRCLE"}),e("setStateProperty",{property:"pointOpacity",value:1})},loadPresets({state:e}){let t;return[...e.queueLoaderPreset,...e.queueActionsPreset].forEach(n=>{t=e.queue.enqueue(n)}),e.queueLoaderPreset=[],e.queueActionsPreset=[],t||Promise.resolve()},async loadPointCloud({state:e,dispatch:t},n){e.forcedPointCloud=!0;const i=BW(n),r="n/a";return i||(n={path:n,name:r}),n.name||(n.name=r),t("loadPointCloudNoDispatch",n)},loadPointCloudNoDispatch({dispatch:e},t){return e("runFromLoaderQueue",()=>e("loadPointCloudInPotree",t))},loadPointCloudInPotree({state:e,rootState:t,commit:n,dispatch:i},{path:r,name:s,append:o=!0,classifications:u={},defaultAttribute:a,initialLoad:h=!0}){return new Promise(c=>{if(h){const d=(e.multiViewId?t.AppState.UserState.multiView?.[e.multiViewId]?.[e.viewportId]?.potree?.[e.properties.datasetId]:t.AppState.UserState.potree[e.properties.datasetId])?.properties?.classifications;d&&Object.keys(u).forEach(p=>{d.includes(p)?u[p].visible=!0:u[p].visible=!1});const f=Object.values(u).every(p=>p.visible);i("toggleAllVisibility",f)}e.client.PointCloudLoader.load({path:r,name:s,append:o,classifications:u,defaultAttribute:a,tilesUpdatedAt:e.tilesUpdatedAt,initialLoad:h,options:{pointSize:e.properties.pointSize,pointSizeType:e.properties.pointSizeType,pointShape:e.properties.pointShape}},l=>{if(!l){n("setStateProperty",{property:"loadPointCloudError",value:!0}),c(l);return}i("setStatePropertiesProperty",{property:"classificationsList",cmd:"Filters.classificationsList",dispatchRoot:!1}),i("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.classifications",dispatchRoot:!1}),e.client.PointCloudLoader.settings(d=>{const f=[];return f.push(i("initSettings",d)),f.push(i("restoreUserState",h)),setTimeout(()=>{e.ready&&(e.cameraShouldUpdate=!0)},3e3),Promise.all(f).then(()=>{n("setStateProperty",{property:"loaded",value:l}),c(l)})}),i("updateAttributesAcrossPointClouds")})})},initSettings({state:e,commit:t},n){Object.keys(n).filter(i=>Object.prototype.hasOwnProperty.call(e,i)).forEach(i=>{t("setStateProperty",{property:i,value:n[i]})})},setObjectVisibility({state:e},t){e.client&&e.client.Measurement.visible(t)},setCameraPosition({state:e,commit:t,dispatch:n},i){t("setStatePropertiesProperty",{property:"camera",value:i}),e.cameraShouldUpdate&&n("AppState/UserState/setPotreeProperties",{type:"camera",value:i,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0})},setSelectedPosition(){},setMoveSpeed({commit:e},t){e("setStatePropertiesProperty",{property:"moveSpeed",value:t})},updatePointCloud({state:e,commit:t},{uuid:n,data:i}){t("setStateObjectsProperty",{group:"pointClouds",property:n,value:i}),t("setStateCountersProperty",{property:"pointClouds",value:Object.keys(e.objects.pointClouds).length}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.pointClouds[n]}),t("setStatePropertiesProperty",{property:"pointcloudId",value:n})},updatePointCloudVisibility({state:e},{uuid:t,value:n}){e.client.Attribute.visible({uuid:t,value:n},i=>{e.objects.pointClouds[t].visible=i})},centerPointCloud({state:e},{uuid:t}){e.client.Navigation.centerPointCloud({uuid:t})},updateMeasurement({state:e,commit:t},{uuid:n,data:i}){t("setStateObjectsProperty",{group:"measurements",property:n,value:i}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.measurements[n]}),t("setStateCountersProperty",{property:"measurements",value:Object.keys(e.objects.measurements).length})},updateSelectedPointMeasure({commit:e},{uuid:t,data:n}){e("setStatePropertiesProperty",{property:"selectedPointMeasure",value:{uuid:t,data:n}})},removeMeasurement({state:e,commit:t},n){!n||(n===e.properties.selectedObject?.uuid&&t("setStatePropertiesProperty",{property:"selectedObject",value:void 0}),t("deleteStateObjectsProperty",{group:"measurements",uuid:n}),t("setStateCountersProperty",{property:"measurements",value:Object.keys(e.objects.measurements).length}))},updateAnnotation({state:e,commit:t},{uuid:n,data:i}){t("setStateObjectsProperty",{group:"annotations",property:n,value:i}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.annotations[n]}),t("setStateCountersProperty",{property:"annotations",value:Object.keys(e.objects.annotations).length})},removeAnnotation({state:e,commit:t},n){t("deleteStateObjectsProperty",{group:"annotations",uuid:n}),t("setStateCountersProperty",{property:"annotations",value:Object.keys(e.objects.annotations).length})},updateCameraAnimation({state:e,commit:t},{uuid:n,data:i}){t("setStateObjectsProperty",{group:"cameraAnimations",property:n,value:i}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.cameraAnimations[n]}),t("setStateCountersProperty",{property:"cameraAnimations",value:Object.keys(e.objects.cameraAnimations).length})},removeCameraAnimation({state:e,commit:t},n){t("deleteStateObjectsProperty",{group:"measurements",uuid:n}),t("setStateCountersProperty",{property:"cameraAnimations",value:Object.keys(e.objects.cameraAnimations).length})},updateFov({commit:e},{fov:t}){e("setStateProperty",{property:"fov",value:t})},updateEvlOpacity({commit:e},{opacity:t}){e("setStateProperty",{property:"edlOpacity",value:t})},toggleAllVisibility({commit:e},t){e("setStateProperty",{property:"classificationsAll",value:t})},initPointCloudAttribute({state:e,commit:t},n){!e.client||e.client.Attribute.init({uuid:n},i=>{t("setStatePocAttribute",{uuid:n,value:i})})},setPocAttributeProperty({state:e,commit:t,dispatch:n},{uuid:i,property:r,cmd:s,params:o,dispatchRoot:u=!0}){const[a,h]=s.split(".");return!e.client||!a||!h?Promise.resolve():new Promise(c=>{e.client[a][h](o,l=>{t("setStatePocAttributeProperty",{uuid:i,property:r,value:l}),Aj.includes(r)&&u&&n("AppState/UserState/setPotreeProperties",{type:"pocAttributeProperty",property:r,value:o,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),c(l)})})},setStatePropertiesProperty({state:e,commit:t,dispatch:n},{property:i,cmd:r,params:s,dispatchRoot:o=!0}){if(!e.client)return Promise.resolve();if(!r)return t("setStatePropertiesProperty",{property:i,value:s}),bd.includes(i)&&o&&n("AppState/UserState/setPotreeProperties",{type:"propertiesProperty",property:i,value:s,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),Promise.resolve(s);const[u,a]=r.split(".");return!u||!a?Promise.resolve():s?new Promise(h=>{e.client[u][a](s,c=>{t("setStatePropertiesProperty",{property:i,value:c}),bd.includes(i)&&o&&n("AppState/UserState/setPotreeProperties",{type:"propertiesProperty",property:i,value:c,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(c)})}):new Promise(h=>{e.client[u][a](c=>{t("setStatePropertiesProperty",{property:i,value:c}),bd.includes(i)&&o&&n("AppState/UserState/setPotreeProperties",{type:"propertiesProperty",property:i,value:c,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(c)})})},setStateProperty({state:e,commit:t,dispatch:n},{property:i,cmd:r,params:s,dispatchRoot:o=!0}){const[u,a]=r.split(".");return!e.client||!u||!a?Promise.resolve():s?new Promise(h=>{e.client[u][a](s,c=>{t("setStateProperty",{property:i,value:c}),ob.includes(i)&&o&&n("AppState/UserState/setPotreeProperties",{type:"stateProperty",property:i,value:s,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(c)})}):new Promise(h=>{e.client[u][a](c=>{t("setStateProperty",{property:i,value:c}),ob.includes(i)&&o&&n("AppState/UserState/setPotreeProperties",{type:"stateProperty",property:i,value:s,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(c)})})},setStateObjectsProperty({state:e,commit:t},{group:n,property:i,cmd:r,params:s}){const[o,u]=r.split(".");return!e.client||!o||!u?Promise.resolve():new Promise(a=>{e.client[o][u](s,h=>{t("setStateObjectsProperty",{group:n,property:i,value:h}),a(h)})})},updateClipTask({state:e,commit:t},{clipTask:n}){const i=e.clipTaskOptions[n];e.client.Measurement.hideAllOutsideClip({clipTask:n}),t("setStateProperty",{property:"clipTask",value:i})},updateVirtualTile({state:e},{virtualTile:t}){const n=t?2:1;e.client.Measurement.hideAllOutsideClip({clipTask:n})},updatePolygonClipVolume({commit:e},{count:t}){e("setStatePropertiesProperty",{property:"polygonClipVolumeCount",value:t})},updateBoxClipVolume({state:e,commit:t},{count:n}){if(n>e.properties.boxClipVolumeCount)e.properties.clipCameraPositionStack.push(e.properties.camera);else{const i=e.properties.clipCameraPositionStack.pop();e.client.Navigation.moveTo(i)}t("setStatePropertiesProperty",{property:"boxClipVolumeCount",value:n})},toggleClassificationVisibility({state:e,dispatch:t},{code:n,checked:i}){!e.client||e.client.Filters.visibility({code:n,checked:i},r=>{t("setStatePropertiesProperty",{property:"classifications",params:r}),!i&&e.properties.activeClassifications.includes(n)&&t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.toggleActiveClassification",params:{value:n}}),i&&e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:n}})})},toggleClassificationsVisibilityAll({state:e,dispatch:t}){!e.client||e.client.Filters.toggleAllVisibility(n=>{t("setStatePropertiesProperty",{property:"classifications",params:n});const i=Object.keys(n.json).filter(r=>n.json[r].visible);i.length===0?(t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:""}}),t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.activeClassifications",params:{list:[]}})):e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:i[0]}})})},changeSelectedClassification({state:e,dispatch:t},{code:n}){!e.client||e.client.AttributeEditor.selectedClassification({value:n},i=>{t("setStatePropertiesProperty",{property:"selectedClassification",params:i}),Object.keys(e.properties.classifications.json).filter(r=>e.properties.classifications.json[r].visible).includes(n)||t("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.visibility",params:{code:n,checked:!0}})})},toggleActiveClassification({state:e,dispatch:t},{code:n}){!e.client||e.client.AttributeEditor.toggleActiveClassification({value:n},i=>{t("setStatePropertiesProperty",{property:"activeClassifications",params:i}),e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:n}}),Object.keys(e.properties.classifications.json).filter(r=>e.properties.classifications.json[r].visible).includes(n)||t("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.visibility",params:{code:n,checked:!0}})})},restoreUserState({state:e,dispatch:t,rootState:n},i){let r=e.multiViewId?n.AppState.UserState.multiView?.[e.multiViewId]?.[e.viewportId]?.potree?.[e.properties.datasetId]:n.AppState.UserState.potree[e.properties.datasetId],s=[];if(r=yT(_G,r),r?.pocAttributeProperty&&(s=s.concat(Object.keys(r.pocAttributeProperty).map(c=>{const{value:l}=r.pocAttributeProperty[c],d=e.properties.pointcloudId;return["shape","pointSizing","pointSize"].includes(c)&&t("setStatePropertiesProperty",{property:{shape:"pointShape",pointSize:"pointSize",pointSizing:"pointSizeType"}[c],params:l}),t("setPocAttributeProperty",{property:c,uuid:d,cmd:`Attribute.${c}`,dispatchRoot:!1,params:{uuid:d,value:l}})}))),!i)return Promise.all(s);r?.properties?.activeClassifications&&s.push(t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.activeClassifications",dispatchRoot:!1,params:{list:r.properties.activeClassifications}}));const o=r?.properties?.selectedClassification,u=o&&Object.keys(e.properties.classifications.json).includes(o)?o:Object.keys(e.properties.classifications.json)[0],a=n.AppState.PointWorker.pendingCommands[e.properties.datasetId],h=a&&a.length>0?a.slice(-1)[0].command_name:null;if(n.Auth?.user?.is_guest===!0?s.push(t("setStatePropertiesProperty",{property:"editMode",cmd:"AttributeEditor.classificationType",params:{value:"VIEW"}})):h?s.push(t("setStatePropertiesProperty",{property:"editMode",cmd:"AttributeEditor.classificationType",params:{value:h==="set_instance"?"INSTANCE":"CLASSIFICATION"}})):r?.properties?.editMode&&s.push(t("setStatePropertiesProperty",{property:"editMode",cmd:"AttributeEditor.classificationType",params:{value:r.properties.editMode}})),r?.properties?.selectedInstanceId&&s.push(t("setStatePropertiesProperty",{property:"selectedInstanceId",cmd:"AttributeEditor.selectedInstanceId",params:{value:r.properties.selectedInstanceId}})),s.push(t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",dispatchRoot:!1,params:{value:u}})),r?.stateProperty){const{pointBudget:c,cameraProjection:l,showMeasurementPoiLabels:d}=r.stateProperty;c&&s.push(t("setStateProperty",{property:"pointBudget",cmd:"Appearance.pointBudget",dispatchRoot:!1,params:c})),l&&s.push(t("setStateProperty",{property:"cameraProjection",cmd:"Navigation.cameraProjection",dispatchRoot:!1,params:l})),d&&s.push(t("setStateProperty",{property:"showMeasurementPoiLabels",cmd:"Measurement.showHideLabels",dispatchRoot:!1,params:d}))}if(r?.camera){const{position:c,target:l}=r.camera;[c?.x,c?.y,c?.z,l?.x,l?.y,l?.z].every(f=>typeof f=="number")&&e.client.Navigation.moveTo(r.camera)}return Promise.all(s)},loadNotesToPotree({state:e},{notes:t}){const n=/\(([^)]+)\)/;e.client.Measurement.removeAllAnnotations(),t.forEach(i=>{const r=i.geom.data.match(n)[1].split(" ").map(o=>parseFloat(o));let s=i.note;s.length>20&&(s=s.split(`
`)[0].slice(0,20),s+="..."),e.client.Measurement.addAnnotation({position:r,title:s,dbId:i.id})})},removeNoteFromPotree({state:e},{noteId:t}){const n=Object.values(e.objects.annotations).find(i=>i.dbId===t);e.client.Measurement.remove({uuid:n.uuid})},setCameraControlMode({state:e,commit:t},{mode:n}){!e.client||(n==="fly"&&(e.client.Navigation.fly(),t("setStateProperty",{property:"cameraControlMode",value:"fly"})),n==="orbit"&&(e.client.Navigation.orbit(),t("setStateProperty",{property:"cameraControlMode",value:"orbit"})))},selectInstanceId({state:e,dispatch:t},{uuid:n,data:i}){if(!e.selectingInstanceId.selecting)return;let r=null;switch(e.selectingInstanceId.type){case"to":r=t("setStatePropertiesProperty",{property:"selectedInstanceId",cmd:"AttributeEditor.selectedInstanceId",params:{value:i.instanceId}});break;case"from":r=t("setStatePropertiesProperty",{property:"activeInstances",cmd:"AttributeEditor.activeInstances",params:{list:[i.instanceId]}});break;case"visible":r=t("setStatePropertiesProperty",{property:"visibleInstances",cmd:"AttributeEditor.visibleInstances",params:{list:[i.instanceId]}});break}r.then(()=>{e.selectingInstanceId.selecting=!1,e.client.Measurement.remove({uuid:n})})},selectVector({commit:e},{vector:t}){e("setStateProperty",{property:"selectedVector",value:t})},updateAttributesAcrossPointClouds({state:e}){e.client.Attribute.getIntensityRangeAll(({min:t,max:n})=>{t<e.intensityRangeOptions.min&&(e.intensityRangeOptions.min=t),n>e.intensityRangeOptions.max&&(e.intensityRangeOptions.max=n),e.intensityRange.min===Number.MAX_SAFE_INTEGER&&(e.intensityRange.min=t),e.intensityRange.max===Number.MIN_SAFE_INTEGER&&(e.intensityRange.max=n)}),e.client.Attribute.getHeightRangeAll(({min:t,max:n})=>{t<e.heightRangeOptions.min&&(e.heightRangeOptions.min=t),n>e.heightRangeOptions.max&&(e.heightRangeOptions.max=n),e.heightRange.min===Number.MAX_SAFE_INTEGER&&(e.heightRange.min=t),e.heightRange.max===Number.MIN_SAFE_INTEGER&&(e.heightRange.max=n)}),e.client.Attribute.updateAttributeRanges({ranges:{intensityRange:[e.intensityRange.min,e.intensityRange.max],elevationRange:[e.heightRange.min,e.heightRange.max]}})}},EG={state:bG,getters:wG,mutations:SG,actions:TG,namespaced:!0},AG=()=>({potreeStoreId:null,enabled:!1,selectedPoi:void 0,currentColorIndex:0,attribute_names:[],active_attribute_names:[],oldSelectedPoiAttributes:{},pois:[]}),CG={setProperty(e,{key:t,value:n}){({}).hasOwnProperty.call(e,t)&&(e[t]=n)},setActiveAttributeName(e,{name:t}){const n=e.active_attribute_names.indexOf(t);n>-1?e.active_attribute_names.splice(n,1):e.active_attribute_names.push(t)}},xG={getPotreeClient(e,t,n){return n.Tools.GeneralAdvancedPotree[e.potreeStoreId].client}},MG={load({state:e,dispatch:t},{datasetId:n,params:i}){return t("AppState/Pois/getPois",{datasetId:n,params:i},{root:!0}).then(r=>(e.attribute_names=[],e.active_attribute_names=[],e.pois=[],r.forEach(s=>{const o=s?.attribute_name;o&&e.pois.push(s),o&&e.attribute_names.indexOf(o)===-1&&(e.attribute_names.push(o),e.active_attribute_names.push(o))}),e.pois))},save({state:e,commit:t,dispatch:n,getters:i,rootState:r,rootGetters:s}){return new Promise((o,u)=>{const{uuid:a,data:h}=e.selectedPoi||{},c=i.getPotreeClient,{datasetId:l}=r.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties,d={...e.selectedPoi.data.poiAttributes};d.id=h.poiId;const f=Zi[d.type.toUpperCase()],{srid:p}=s["AppState/Datasets/get"](l);if(f===Zi.BOX&&(d.box={bbox:h.bbox,matrix:h.matrix}),f===Zi.POINT){const g=h.points[0].position,m=`POINT Z (${g.x} ${g.y} ${g.z})`;d.geometry={srid:p,data:m}}if(f===Zi.LINE_STRING){const m=`LINESTRING Z (${h.points.map(v=>`${v.position.x} ${v.position.y} ${v.position.z}`).join(", ")})`;d.geometry={srid:p,data:m}}if(f===Zi.POLYGON){const g=h.points.map(v=>`${v.position.x} ${v.position.y} ${v.position.z}`),m=`POLYGON Z ((${g.join(", ")}, ${g[0]}))`;d.geometry={srid:p,data:m}}h.poiId?n("AppState/Pois/updatePoi",{datasetId:l,poiType:f,poi:d},{root:!0}).then(g=>{t("setProperty",{key:"selectedPoi",value:void 0});const m=d.attribute_name;m&&e.attribute_names.indexOf(m)===-1&&(e.attribute_names.push(m),e.active_attribute_names.push(m)),e.pois=[...e.pois.filter(v=>v.id!==g.id),{...d,geom:d.geometry,id:g.id}],o()}).catch(g=>u(g)):n("AppState/Pois/createPoi",{datasetId:l,poiType:f,poi:d},{root:!0}).then(g=>{t("setProperty",{key:"selectedPoi",value:void 0}),c.Poi.updatePoi({uuid:a,poiId:g.id,poiAttributes:d},v=>{v?o():u()});const m=d.attribute_name;m&&e.attribute_names.indexOf(m)===-1&&(e.attribute_names.push(m),e.active_attribute_names.push(m)),e.pois=[...e.pois,{...d,geom:d.geometry,id:g.id}]}).catch(g=>{c.Poi.remove({uuid:h.uuid,type:h.poiAttributes.type}),u(g)})})},delete({state:e,getters:t,dispatch:n,rootState:i}){return new Promise((r,s)=>{const{data:o}=e.selectedPoi||{};if(!o.poiId){r();return}const u=t.getPotreeClient,a=o?.poiAttributes?.attribute_name;u.Poi.attributeNameCount({name:a},l=>{if(l<2){const d=[...e.attribute_names],f=[...e.active_attribute_names];let p=d.indexOf(a);p>-1&&(d.splice(p,1),e.attribute_names=[...d]),p=f.indexOf(a),p>-1&&(f.splice(p,1),e.active_attribute_names=[...f])}});const{datasetId:h}=i.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties,c=Zi[o?.poiAttributes?.type.toUpperCase()];c||s(new Error(`POI type ${o.name} does not exist.`)),n("AppState/Pois/deletePoi",{datasetId:h,poiType:c,id:o.poiId},{root:!0}).then(()=>{const l=e.pois.findIndex(d=>d.id===o.poiId);l>=0&&e.pois.splice(l,1),r()}).catch(l=>{s(l)})})},showPois({getters:e},t){return new Promise((n,i)=>{e.getPotreeClient.Poi.setPois({pois:t},s=>{s?n():i()})})},removePois({getters:e}){return new Promise((t,n)=>{e.getPotreeClient.Poi.removeAll(r=>{r?t():n()})})},setPoiAttributes({state:e,getters:t},n){return new Promise((i,r)=>{if(!e.selectedPoi){i();return}const s=t.getPotreeClient;e.selectedPoi.data.poiAttributes=n,s.Poi.updatePoi({uuid:e.selectedPoi.uuid,poiAttributes:n},o=>{o?i():r()})})},updateSelectedPoi({state:e,commit:t},{uuid:n,data:i}){const{poiAttributes:r}=e.selectedPoi?.data||{};r&&!Object.values(r).find(o=>o==="")&&t("setProperty",{key:"oldSelectedPoiAttributes",value:{...r}});const s=i?.poiAttributes?.type;if(!e.enabled||!s||!Object.keys(Zi).includes(s.toUpperCase())){t("setProperty",{key:"selectedPoi",value:void 0});return}t("setProperty",{key:"selectedPoi",value:{uuid:n,data:i}})},poiBox({getters:e}){e.getPotreeClient.Poi.box({attributes:{...fc}})},poiPoint({getters:e}){e.getPotreeClient.Poi.point({attributes:{...fc}})},poiLine({getters:e}){e.getPotreeClient.Poi.line({attributes:{...fc}})},poiPolygon({getters:e}){e.getPotreeClient.Poi.polygon({attributes:{...fc}})},setProperty({commit:e},t){e("setProperty",t)}},kG={namespaced:!0,state:AG,getters:xG,mutations:CG,actions:MG},vb=e=>{const t=/\(\(([^)]+)\)\)/;return e.match(t)[1].split(",").flatMap(r=>r.split(" ").map(s=>parseFloat(s)))},$G=()=>({potreeStoreId:null,selectedUsersFilter:[],selectedStatusesFilter:[],enabled:!1,autoCenterTiles:!0}),IG={getPotreeClient(e,t,n){return n.Tools.GeneralAdvancedPotree[e.potreeStoreId].client},pointCloudId(e,t,n){return n.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties.pointcloudId},datasetId(e,t,n){return n.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties.datasetId},selectedIndex(e,t){const n=t.filteredVirtualTiles.findIndex(i=>i.id===t.selectedTileId);return n>=0?n:0},virtualTiles(e,t,n,i){return i["AppState/Datasets/getVirtualTiles"](t.datasetId)??[]},filteredVirtualTiles(e,t){return t.virtualTiles.filter(n=>{const i=e.selectedUsersFilter.length>0?e.selectedUsersFilter.some(s=>s==="/"?[null,"/"].includes(n.assignee):n.assignee===s):!0,r=e.selectedStatusesFilter.length>0?e.selectedStatusesFilter.some(s=>s==="/"?[null,"/"].includes(n.qc_status):n.qc_status===s):!0;return i&&r})},selectedTileId(e,t,n,i){return i["AppState/UserState/getVirtualTileSelectedId"](t.datasetId)}},RG={setProperty(e,{key:t,value:n}){({}).hasOwnProperty.call(e,t)&&(e[t]=n)}},LG={enableVirtualTiles({state:e,dispatch:t},n){e.enabled=n,t("dispatchVirtualTileToPotree")},setSelectedTileId({getters:e,dispatch:t},{tileId:n}){t("AppState/UserState/setVirtualTileSelectedId",{datasetId:e.datasetId,selectedId:n},{root:!0}),t("dispatchVirtualTileToPotree")},toggleUserFilter({state:e,getters:t,dispatch:n},i){const r=e.selectedUsersFilter.indexOf(i);r===-1?e.selectedUsersFilter.push(i):e.selectedUsersFilter.splice(r,1),t.filteredVirtualTiles.length>0&&t.filteredVirtualTiles.findIndex(s=>s.id===t.selectedTileId)===-1&&n("setSelectedTileId",{tileId:t.filteredVirtualTiles[0]?.id}),t.filteredVirtualTiles.length===0&&n("setSelectedTileId",{tileId:t.filteredVirtualTiles[0]?.id})},toggleStatusFilter({state:e,getters:t,dispatch:n},i){const r=e.selectedStatusesFilter.indexOf(i);r===-1?e.selectedStatusesFilter.push(i):e.selectedStatusesFilter.splice(r,1),t.filteredVirtualTiles.length>0&&t.filteredVirtualTiles.findIndex(s=>s.id===t.selectedTileId)===-1&&n("setSelectedTileId",{tileId:t.filteredVirtualTiles[0]?.id})},clearUsersFilter({state:e}){e.selectedUsersFilter=[]},clearStatusesFilter({state:e}){e.selectedStatusesFilter=[]},nextVirtualTile({state:e,getters:t,dispatch:n}){!e.enabled||(t.selectedIndex>=t.filteredVirtualTiles.length-1?n("setSelectedTileId",{tileId:t.filteredVirtualTiles[0]?.id}):n("setSelectedTileId",{tileId:t.filteredVirtualTiles[t.selectedIndex+1]?.id}))},prevVirtualTile({state:e,getters:t,dispatch:n}){!e.enabled||(t.selectedIndex<=0?n("setSelectedTileId",{tileId:t.filteredVirtualTiles.slice(-1)[0]?.id}):n("setSelectedTileId",{tileId:t.filteredVirtualTiles[t.selectedIndex-1]?.id}))},centerVirtualTile({state:e,getters:t}){if(!e.enabled||!t.getPotreeClient)return;const n=t.filteredVirtualTiles[t.selectedIndex];t.getPotreeClient.Navigation.centerVirtualTile({polygon:vb(n.geom.data)})},dispatchVirtualTileToPotree({state:e,getters:t,dispatch:n}){if(!t.getPotreeClient)return;const i=t.filteredVirtualTiles[t.selectedIndex];if(!e.enabled||!i){t.getPotreeClient.ClippingEditor.setVirtualTile({virtualTile:null});return}const r=vb(i.geom.data);t.getPotreeClient.ClippingEditor.setVirtualTile({virtualTile:r}),e.autoCenterTiles&&n("centerVirtualTile")},autoCenterTiles({state:e},t){e.autoCenterTiles=t}},OG={namespaced:!0,state:$G,mutations:RG,getters:IG,actions:LG},{t:yb}=Tt.global,PG={},NG={},DG={},FG={registerNewPotreeModule({state:e,commit:t},n){this.registerModule(["Tools","GeneralAdvancedPotree",n],EG),this.registerModule(["Tools","GeneralAdvancedPotree",n,"Poi"],kG),this.registerModule(["Tools","GeneralAdvancedPotree",n,"VirtualTiles"],OG),e.GeneralAdvancedPotree[n].moduleId=n,t(`GeneralAdvancedPotree/${n}/Poi/setProperty`,{key:"potreeStoreId",value:n}),t(`GeneralAdvancedPotree/${n}/VirtualTiles/setProperty`,{key:"potreeStoreId",value:n})},unregisterPotreeModule(e,t){this.unregisterModule(["Tools","GeneralAdvancedPotree",t])},potreeSetTilesUpdatedAt({state:e,dispatch:t},{tilesUpdatedAt:n,datasetId:i}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(r=>{const{pointClouds:s}=e.GeneralAdvancedPotree[r].objects;Object.keys(s).findIndex(u=>s[u].title===i)!==-1&&t(`GeneralAdvancedPotree/${r}/setTilesUpdatedAt`,n)})},potreeReloadAllPointClouds({state:e,rootState:t,dispatch:n},{datasetId:i}){let r=!1;const s=t.AppState.UserSettings.user_settings.auto_potree_reload;Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(o=>{const{pointClouds:u}=e.GeneralAdvancedPotree[o].objects,a=Object.keys(u).findIndex(h=>u[h].title===i)!==-1;a&&(r=!0),a&&s&&n(`GeneralAdvancedPotree/${o}/reloadAllPointClouds`)}),r&&s?n("Notifications/displayToastNotification",{msg:yb("Reclassification commands were applied to this dataset, point cloud viewer was reloaded."),type:"info",timeout:2e4},{root:!0}):r&&!s&&n("Notifications/displayToastNotification",{msg:yb("Reclassification commands were applied to this dataset, reload the page to see changes."),type:"info",timeout:2e4},{root:!0})},disableAllPotreeShortcuts({commit:e}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(t=>{e(`GeneralAdvancedPotree/${t}/setStateProperty`,{property:"disableKeyboardShortcuts",value:!0})})},enableAllPotreeShortcuts({commit:e}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(t=>{e(`GeneralAdvancedPotree/${t}/setStateProperty`,{property:"disableKeyboardShortcuts",value:!1})})}},BG={state:PG,getters:DG,mutations:NG,actions:FG,modules:{GeneralAdvancedPotree:{namespaced:!0}},namespaced:!0},HG={userTips:{hubMap:{tips:[{selector:'[data-user-tips="hub-search-button"]',title:"Search button",text:"Explore numerous open datasets across various regions and dates on the map. Simply zoom to your area of interest and press search.",position:"right"},{selector:'[data-user-tips="hub-dataset-list-open"]',title:"Open dataset list",text:"To open or close the dataset list by clicking on the button icon.",position:"top"},{selector:'[data-user-tips="hub-dataset-list"]',title:"Dataset list",text:"If multiple datasets exist in the same location, click on the dataset name to view them. If only one dataset is available, it will open automatically.",position:"top"}]},hubPotree:{tips:[{selector:'[data-user-tips="hub-potree-view"]',title:"View 3D point clouds",text:"View point clouds by zooming in, rotating, and panning.",position:"bottom"},{selector:'[data-user-tips="hub-potree-measure-tools"]',title:"Measure tools",text:"Measure heights, distances, areas, and volumes.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-cross-section-tools"]',title:"Cross section tools",text:"Create cross sections by selecting two points on the point cloud and clicking C on keyboard or Enter clip mode button.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-aoi-tools"]',title:"Area of interest",text:"For analysis, areas must be up to 5km\xB2 to save on compute resources. Use the AOI tool to select the area if it's under 5km\xB2; otherwise, the AOI tool isn't necessary.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-download"]',title:"Download",text:"We will clip the selected area and prepare it for download.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-analysis"]',title:"Run Analysis",text:"You can easily launch different AI-based analyses for various use cases.",position:"bottom-left",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-legend"]',title:"Legend",text:"Use it to turn on and off point cloud classification (layers).",position:"left"},{selector:'[data-user-tips="hub-potree-settings"]',title:"Settings",text:"Change point budget, point size, attributes and more.",position:"top-left"}]},hubPotreeAoi:{tips:[{selector:'[data-user-tips="hub-potree-aoi-tools"]',title:"Area of interest",text:"For analysis, areas must be up to 5km\xB2 to save on compute resources. Use the AOI tool to select the area if it's under 5km\xB2; otherwise, the AOI tool isn't necessary.",position:"bottom",showOnMobile:!1}]},visibleTips:null}},UG={},zG={},WG={showTips({state:e},{tipsName:t,forceShow:n=!1}){if(e.userTips[t]){const i=`${t}-seen`;let r=!1;try{r=JSON.parse(localStorage.getItem(i))===!0}catch{}(n||!r)&&(e.visibleTips=e.userTips[t].tips,localStorage.setItem(i,"true"))}},hideTips({state:e}){e.visibleTips=null}},VG={namespaced:!0,state:HG,getters:zG,mutations:UG,actions:WG},jG=Ta.create({baseURL:window.ENV_VARS.API_URL});class GG{static store(t={}){jG.post("/user-events",t).then(({data:n})=>n)}}const qG={},KG={},YG={store(e,t){function n(i){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(i)}return n(t.session_id)&&localStorage.setItem("session_id",t.session_id),localStorage.getItem("session_id")===null&&localStorage.setItem("session_id",Xr()),t={...t,session_id:localStorage.getItem("session_id"),referrer:document.referrer,user_agent:navigator.userAgent,host:window.location.host},GG.store(t)}},XG={namespaced:!0,state:qG,mutations:KG,actions:YG},JG={},QG={removeLoader(){}},ZG={},eq={setLoader(){}},Wn=QF({modules:{AppState:j6,App:i2,Auth:n8,Map:a8,Modals:f8,Notifications:y8,Sortable:T8,Tools:BG,UserTips:VG,UserTrackingEvents:XG},state:JG,getters:ZG,mutations:QG,actions:eq}),Os={computed:{isDisabled(){return!this.$store.getters["Auth/hasResourcePermission"](this.resourceName)},disabledClass(){return this.isDisabled?"disabled":""},resourceName(){return this.urlSafeToolNamespace}},methods:{openRedirectToBillingModal(){this.$store.dispatch("Modals/openModal",{title:"Upgrade billing plan",message:`
                    Downloads are not available in the Freemium billing plan.
                    Upgrade your plan in order to access downloads.
                `,confirmButton:{text:"Upgrade",onClick:()=>{this.$router.push({name:"pages",params:{tool:"pages:organization"},query:{tab:"billing_plan"}})}}})}}},Re=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},tq={name:"PagesDashboardButton",mixins:[Os],inject:["urlSafeToolNamespace"]};function nq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{class:Ge(e.disabledClass),to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"settings"}),de("span",null,$e(e.$t("Admin")),1)]),_:1},8,["class","to"])}const iq=Re(tq,[["render",nq]]),rq={name:"PagesDashboardButton",inject:["urlSafeToolNamespace"]};function sq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"assessment"}),de("span",null,$e(e.$t("Dashboard")),1)]),_:1},8,["to"])}const oq=Re(rq,[["render",sq]]),aq={name:"DownloadsButton",mixins:[Os],inject:["urlSafeToolNamespace"]};function lq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return e.isDisabled?(oe(),me("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=(...a)=>e.openRedirectToBillingModal&&e.openRedirectToBillingModal(...a))},[Ee(o,{name:"download"}),de("span",null,$e(e.$t("Downloads")),1)])):(oe(),Ue(u,{key:1,to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"download"}),de("span",null,$e(e.$t("Downloads")),1)]),_:1},8,["to"]))}const cq=Re(aq,[["render",lq]]),uq={name:"PagesProjectsButton",mixins:[Os],inject:["urlSafeToolNamespace"]};function hq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{class:Ge(e.disabledClass),to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"class"}),de("span",null,$e(e.$t("Projects")),1)]),_:1},8,["class","to"])}const dq=Re(uq,[["render",hq]]),fq={name:"PagesCatalogueButton",mixins:[Os],inject:["urlSafeToolNamespace"]};function pq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{class:Ge(e.disabledClass),to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"collections_bookmark"}),de("span",null,$e(e.$t("Catalogue")),1)]),_:1},8,["class","to"])}const gq=Re(fq,[["render",pq]]),mq={name:"PagesAImodelsButton",mixins:[Os],inject:["urlSafeToolNamespace"]};function vq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{class:Ge(e.disabledClass),to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"precision_manufacturing"}),de("span",null,$e(e.$t("AI models")),1)]),_:1},8,["class","to"])}const yq=Re(mq,[["render",vq]]),_q={name:"PagesAILearningPointButton",mixins:[Os],inject:["urlSafeToolNamespace"]};function bq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{class:Ge(e.disabledClass),to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"school"}),de("span",null,$e(e.$t("AI learning point")),1)]),_:1},8,["class","to"])}const wq=Re(_q,[["render",bq]]),Sq={name:"PagesUiComponentsButton",inject:["urlSafeToolNamespace"]};function Tq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"format_list_bulleted"}),t[0]||(t[0]=de("span",null,"UI components",-1))]),_:1},8,["to"])}const Eq=Re(Sq,[["render",Tq]]),Aq={name:"UserMenu",computed:{userInitials(){return this.$store.getters["Auth/getUserInitials"]}},methods:{logout(){this.$store.dispatch("Auth/logout").then(()=>{window.location.reload()})}}},Cq={class:"pt-5 px-5"},xq={class:"btn link black font-normal"},Mq={class:"btn link black font-normal"},kq={class:"pb-5 px-5"};function $q(e,t,n,i,r,s){const o=Ae("router-link"),u=Ae("flai-popover");return oe(),Ue(u,{position:"bottom-left",initials:s.userInitials,"hide-close-icon":"","hide-arrow":""},{default:pt(()=>[de("div",Cq,[Ee(o,{to:{name:"pages",params:{tool:"pages:user-settings"}}},{default:pt(()=>[de("button",xq,$e(e.$t("Settings")),1)]),_:1}),Ee(o,{to:{name:"pages",params:{tool:"pages:organization"}}},{default:pt(()=>[de("button",Mq,$e(e.$t("My organization")),1)]),_:1})]),t[1]||(t[1]=de("hr",null,null,-1)),de("div",kq,[de("button",{class:"btn link black font-normal",onClick:t[0]||(t[0]=Bt((...a)=>s.logout&&s.logout(...a),["prevent"]))},$e(e.$t("Logout")),1)])]),_:1},8,["initials"])}const Iq=Re(Aq,[["render",$q]]);var JT={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(rg,function(){return function(n,i,r){n=n||{};var s=i.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(h,c,l,d){return s.fromToBase(h,c,l,d)}r.en.relativeTime=o,s.fromToBase=function(h,c,l,d,f){for(var p,g,m,v=l.$locale().relativeTime||o,y=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],S=y.length,_=0;_<S;_+=1){var w=y[_];w.d&&(p=d?r(h).diff(l,w.d,!0):l.diff(h,w.d,!0));var b=(n.rounding||Math.round)(Math.abs(p));if(m=p>0,b<=w.r||!w.r){b<=1&&_>0&&(w=y[_-1]);var C=v[w.l];f&&(b=f(""+b)),g=typeof C=="string"?C.replace("%d",b):C(b,c,w.l,m);break}}if(c)return g;var M=m?v.future:v.past;return typeof M=="function"?M(g):M.replace("%s",g)},s.to=function(h,c){return u(h,c,this,!0)},s.from=function(h,c){return u(h,c,this)};var a=function(h){return h.$u?r.utc():r()};s.toNow=function(h){return this.to(a(this),h)},s.fromNow=function(h){return this.from(a(this),h)}}})})(JT);const QT=JT.exports;var ZT={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(rg,function(){var n="minute",i=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(s,o,u){var a=o.prototype;u.utc=function(g){var m={date:g,utc:!0,args:arguments};return new o(m)},a.utc=function(g){var m=u(this.toDate(),{locale:this.$L,utc:!0});return g?m.add(this.utcOffset(),n):m},a.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var h=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),h.call(this,g)};var c=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(g,m){var v=this.$utils().u;if(v(g))return this.$u?0:v(this.$offset)?l.call(this):this.$offset;if(typeof g=="string"&&(g=function(w){w===void 0&&(w="");var b=w.match(i);if(!b)return null;var C=(""+b[0]).match(r)||["-",0,0],M=C[0],R=60*+C[1]+ +C[2];return R===0?0:M==="+"?R:-R}(g),g===null))return this;var y=Math.abs(g)<=16?60*g:g,S=this;if(m)return S.$offset=y,S.$u=g===0,S;if(g!==0){var _=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(S=this.local().add(y+_,n)).$offset=y,S.$x.$localOffset=_}else S=this.utc();return S};var d=a.format;a.format=function(g){var m=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,m)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var p=a.diff;a.diff=function(g,m,v){if(g&&this.$u===g.$u)return p.call(this,g,m,v);var y=this.local(),S=u(g).local();return p.call(y,S,m,v)}}})})(ZT);const eE=ZT.exports;cn.extend(QT);cn.extend(eE);const Rq={name:"NotificationItem",props:{title:{type:String,required:!0},msg:{type:String,required:!0},createdAt:{type:String,required:!0},userId:{type:String,required:!0},type:{type:String,default:"notify",validator:e=>["notify","system","warning","error"].includes(e)},seen:{type:Boolean,default:!1},link:{type:Object,default:null}},emits:["update:seen","link-clicked"],computed:{timeAgo(){return cn.utc(this.createdAt).fromNow()},userName(){const{first_name:e,last_name:t}=this.$store.getters["AppState/Users/get"](this.userId);return!e&&!t?"unknown":`${e} ${t}`},tooltip(){return this.seen?"Mark as unseen":"Mark as seen"},typeClass(){return{notify:"info",system:"info",warning:"warning",error:"error"}[this.type]}}},Lq={class:"d-flex notification-item p-2"},Oq={class:"flex-1"},Pq={class:"mb-1"},Nq={class:"d-flex items-center"},Dq={class:"d-flex items-center"},Fq={key:1},Bq={class:"d-flex items-center text-sm"},Hq={class:"d-flex items-center"};function Uq(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link"),a=Ae("flai-field-type"),h=Ae("flai-tooltip");return oe(),me("div",Lq,[de("div",Oq,[de("h3",Pq,[n.link?(oe(),Ue(u,{key:0,to:n.link,onClick:t[0]||(t[0]=c=>e.$emit("link-clicked"))},{default:pt(()=>[de("div",Nq,[de("span",Dq,$e(n.msg),1),Ee(o,{name:"open_in_new",class:"ml-2"})])]),_:1},8,["to"])):(oe(),me("div",Fq,$e(n.msg),1))]),de("div",Bq,[de("div",Hq,[de("span",null,$e(s.userName),1),t[2]||(t[2]=de("span",{class:"mx-1"},"-",-1)),de("span",null,$e(s.timeAgo),1)]),de("span",{class:Ge([`tag_${s.typeClass}`,"tag text-sm ml-1"])},$e(n.type),3)])]),Ee(h,{content:s.tooltip,"delay-display-for":100},{title:pt(()=>[Ee(a,{"model-value":n.seen,class:"flex-0",definition:"boolean",attributes:{name:"seen"},"onUpdate:modelValue":t[1]||(t[1]=c=>e.$emit("update:seen",c))},null,8,["model-value"])]),_:1},8,["content"])])}const zq=Re(Rq,[["render",Uq],["__scopeId","data-v-950c6af1"]]);cn.extend(QT);cn.extend(eE);const Wq={name:"NotificationItem",props:{job:{type:Object,required:!0}},computed:{title(){return this.job.dataset_name?this.job.dataset_name:this.job.flow_title},msg(){return this.job.dataset_name?`Importing dataset (${this.job.status})`:`Processing flow (${this.job.status})`},timeAgo(){return cn.utc(this.job.created_at).fromNow()},userName(){const e=this.job.dataset_name?"user_id":"created_by",{first_name:t,last_name:n}=this.$store.getters["AppState/Users/get"](this.job[e]);return!t&&!n?"unknown":`${t} ${n}`}}},Vq={class:"d-flex notification-item p-2"},jq={class:"flex-1"},Gq={class:"mb-1"},qq={class:"font-normal"},Kq={class:"d-flex justify-between"},Yq={class:"d-flex text-sm"};function Xq(e,t,n,i,r,s){const o=Ae("flai-spinner");return oe(),me("div",Vq,[de("div",jq,[de("h3",Gq,[ri($e(s.title)+" ",1),de("small",qq,$e(s.timeAgo),1)]),de("div",Kq,[ri($e(s.msg)+" ",1),Ee(o,{size:"xs"})]),de("div",Yq,$e(s.userName),1)])])}const Jq=Re(Wq,[["render",Xq],["__scopeId","data-v-f60298f6"]]);const Qq={name:"NotificationArea",components:{NotificationItem:zq,ActiveJobItem:Jq},data(){return{loading:!0}},computed:{onlyUnseen:{get(){return this.$store.state.Notifications.showOnlyUnseenNotifications},set(e){this.$store.dispatch("Notifications/setShowOnlyUnseenNotifications",e)}},notifications(){return this.onlyUnseen?this.$store.getters["Notifications/getUnseenNotifications"]:this.$store.getters["Notifications/getNotifications"]},unseenNotifications(){return this.$store.getters["Notifications/getUnseenNotifications"]},processingDatasets(){return this.$store.state.AppState.ActiveJobs.processingDatasets},runningFlows(){return this.$store.state.AppState.ActiveJobs.runningFlows},activeJobsCount(){return this.processingDatasets.length+this.runningFlows.length}},async mounted(){try{await this.$store.dispatch("AppState/Users/getUsers"),await this.$store.dispatch("AppState/ActiveJobs/getActiveJobs"),this.$store.dispatch("Notifications/getNotifications"),this.loading=!1}catch{this.loading=!1}},methods:{toggleNotificationSeenStatus(e){this.$store.dispatch("Notifications/toggleNotificationSeenStatus",e)}}},Zq={class:"d-flex"},e9={class:"d-flex"},t9=["onClick"],n9={key:0,class:"tag tag_info"},i9={class:"p-5"},r9={class:"mb-1"},s9={class:"pb-5"},o9={key:0},a9={key:1},l9={key:0},c9={key:2},u9=["onClick"],h9={key:0,style:{"padding-top":"1px"}},d9={key:1,style:{"padding-top":"2px"}},f9={class:"p-5"},p9={class:"mb-1"},g9={class:"pb-5"},m9={key:0};function v9(e,t,n,i,r,s){const o=Ae("flai-spinner"),u=Ae("active-job-item"),a=Ae("flai-popover"),h=Ae("flai-icon"),c=Ae("flai-field-type"),l=Ae("notification-item");return oe(),me("div",Zq,[Ee(a,{width:500,position:"bottom-left","hide-close-icon":"","hide-arrow":""},{button:pt(({togglePopover:d})=>[de("div",e9,[de("button",{class:"btn link p-0 self-center relative",onClick:Bt(d,["stop"])},[de("span",null,$e(e.$t("Active Jobs")),1),r.loading?Be("",!0):(oe(),me("span",n9,$e(s.activeJobsCount),1))],8,t9),r.loading?(oe(),Ue(o,{key:0,size:"xs",class:"mx-1"})):Be("",!0)])]),default:pt(()=>[de("div",i9,[de("h2",r9,$e(e.$t("Active Jobs ({value})",{value:s.activeJobsCount})),1),t[1]||(t[1]=de("hr",null,null,-1)),de("div",s9,[s.activeJobsCount?Be("",!0):(oe(),me("div",o9,$e(e.$t("No active jobs.")),1)),s.processingDatasets.length>0?(oe(),me("div",a9,[de("h3",null,$e(e.$t("Datasets ({value})",{value:s.processingDatasets.length})),1),(oe(!0),me(tt,null,ti(s.processingDatasets,d=>(oe(),me("div",{key:d.id},[Ee(u,{job:d},null,8,["job"])]))),128)),s.runningFlows.length>0?(oe(),me("hr",l9)):Be("",!0)])):Be("",!0),s.runningFlows.length>0?(oe(),me("div",c9,[de("h3",null,$e(e.$t("Flows ({value})",{value:s.runningFlows.length})),1),(oe(!0),me(tt,null,ti(s.runningFlows,d=>(oe(),me("div",{key:d.id},[Ee(u,{job:d},null,8,["job"])]))),128))])):Be("",!0)])])]),_:1}),Ee(a,{width:500,position:"bottom-left","hide-close-icon":"","hide-arrow":""},{button:pt(({togglePopover:d})=>[de("button",{class:"btn link p-0 self-center relative",onClick:Bt(d,["stop"])},[Ee(h,{name:"bell"}),s.unseenNotifications.length?(oe(),me("span",{key:s.unseenNotifications?.[0].id,class:"badge"},[s.unseenNotifications.length>9?(oe(),me("span",h9,t[2]||(t[2]=[de("small",null,"9+",-1)]))):s.unseenNotifications.length?(oe(),me("span",d9,$e(s.unseenNotifications.length),1)):Be("",!0)])):Be("",!0)],8,u9)]),default:pt(({closePopover:d})=>[de("div",f9,[de("h2",p9,$e(e.$t("Notifications")),1),Ee(c,{modelValue:s.onlyUnseen,"onUpdate:modelValue":t[0]||(t[0]=f=>s.onlyUnseen=f),label:"Only show unseen",definition:"boolean",attributes:{name:"showOnlyUnseenNotifications"}},null,8,["modelValue"]),t[3]||(t[3]=de("hr",null,null,-1)),de("div",g9,[s.notifications.length?Be("",!0):(oe(),me("div",m9,$e(e.$t("No notifications to show.")),1)),(oe(!0),me(tt,null,ti(s.notifications,f=>(oe(),me("div",{key:f.id},[Ee(l,Ot({seen:f.seen,"onUpdate:seen":p=>f.seen=p,ref_for:!0},f,{"onUpdate:seen":p=>s.toggleNotificationSeenStatus(f),onLinkClicked:d}),null,16,["seen","onUpdate:seen","onLinkClicked"])]))),128))])])]),_:1})])}const y9=Re(Qq,[["render",v9],["__scopeId","data-v-f2b9d254"]]);const _9={name:"GeneralUserProfileButton",components:{UserMenu:Iq,NotificationArea:y9},computed:{user(){return this.$store.state.Auth.user},profilePic(){return{background:`url('/${this.user.profile_picture}')`}},guestOrganization(){return this.user.organization_id!==this.user.active_organization_id},organizationName(){return this.user.organization.name}}},b9={key:0,class:"d-flex items-center pt-3 pr-3 gap-4"},w9={key:0,class:"d-flex items-center span_failed"},S9={class:"d-flex justify-end"},T9={class:"d-flex justify-end"},E9={class:"text-main"};function A9(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("flai-copy-button"),a=Ae("notification-area"),h=Ae("user-menu");return s.user?(oe(),me("div",b9,[s.guestOrganization?(oe(),me("div",w9,[Ee(o,{name:"error",type:"error"}),de("span",null,$e(e.$t("USING {value} ORGANIZATION",{value:s.organizationName})),1),Ee(u,{"data-to-copy":s.user.organization.id,tooltip:"Copy organization id",class:"ml-2"},null,8,["data-to-copy"])])):Be("",!0),Ee(a),de("div",null,[de("div",S9,$e(s.user.name),1),de("div",T9,[de("small",E9,$e(s.user.email),1)])]),Ee(h)])):Be("",!0)}const C9=Re(_9,[["render",A9],["__scopeId","data-v-7b2c9d27"]]),x9={name:"GeneralSupportButton"},M9={class:"d-flex flex-col mb-6"},k9={href:"mailto:support@flai.ai",target:"_"},$9={class:"text-sm text-gray-light mt-3"};function I9(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",M9,[de("a",k9,[Ee(o,{name:"mail"}),de("span",null,$e(e.$t("Support")),1)]),de("span",$9," \xA9 "+$e(new Date().getFullYear())+" Flai d.o.o. ",1)])}const R9=Re(x9,[["render",I9]]),L9={name:"GeneralSupportButton",computed:{docsUrl(){return`https://${window.ENV_VARS.NGINX_SERVER_NAME_DOCS}?utm_source=app&utm_medium=app&utm_campaign=general&session_id=${localStorage.getItem("session_id")}`}}},O9={class:"d-flex flex-col mb-6"},P9=["href"];function N9(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",O9,[de("a",{href:s.docsUrl,target:"_blank"},[Ee(o,{name:"info"}),de("span",null,$e(e.$t("Documentation")),1)],8,P9)])}const D9=Re(L9,[["render",N9]]),F9={name:"FlaiHubButton",computed:{hubUrl(){return`https://${window.ENV_VARS.FLAI_HUB_URL}/#/?utm_source=app&utm_medium=app&utm_campaign=general&session_id=${localStorage.getItem("session_id")}`}}},B9={class:"d-flex flex-col"},H9=["href"];function U9(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",B9,[de("a",{href:s.hubUrl,target:"_blank"},[Ee(o,{name:"public"}),de("span",null,$e(e.$t("FlaiHub")),1)],8,H9)])}const z9=Re(F9,[["render",U9]]),W9={name:"PagesResellerDashboard",mixins:[Os],inject:["urlSafeToolNamespace"]};function V9(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{class:Ge(e.disabledClass),to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"settings"}),de("span",null,$e(e.$t("Reseller dashboard")),1)]),_:1},8,["class","to"])}const j9=Re(W9,[["render",V9]]),G9={name:"PagesCLicenseButton",inject:["urlSafeToolNamespace"]};function q9(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("router-link");return oe(),Ue(u,{to:{name:"pages",params:{tool:s.urlSafeToolNamespace}}},{default:pt(()=>[Ee(o,{name:"cli2"}),de("span",null,$e(e.$t("Flai CLI")),1)]),_:1},8,["to"])}const K9=Re(G9,[["render",q9]]),Y9=kn(()=>ft(()=>import("./Content.ef0b70e6.js"),["assets/Content.ef0b70e6.js","assets/Tabs.27821444.js","assets/Tabs.f9f5a443.css","assets/OrdersOverview.4cbf6e51.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/keyboardHandler.mixin.7e86a69b.js","assets/OrderItem.0770348c.js","assets/time.39bf66fa.js","assets/OrderItem.6ae7fda7.css","assets/api-pagination.8059ae15.js","assets/vue.runtime.esm-bundler.0fc2de45.js","assets/Content.7827a0d1.css"])),X9=kn(()=>ft(()=>import("./Content.6d16edae.js"),["assets/Content.6d16edae.js","assets/marked.esm.1cf17280.js","assets/Card.e6af9d36.js","assets/Card.60b8ca4d.css","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/ShareDatasetModal.1a78835c.js","assets/time.39bf66fa.js","assets/FlowExecutionCard.0ecb3416.js","assets/RunFlowMixin.001c02cf.js","assets/Content.c49c8109.css"])),J9=kn(()=>ft(()=>import("./Content.d474af8f.js"),["assets/Content.d474af8f.js","assets/marked.esm.1cf17280.js","assets/time.39bf66fa.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/keyboardHandler.mixin.7e86a69b.js","assets/Card.e6af9d36.js","assets/Card.60b8ca4d.css","assets/AddTagModal.933aacc4.js","assets/api-pagination.8059ae15.js","assets/remote-files-check.117923d9.js","assets/files.0cc5119a.js","assets/ShareDatasetModal.1a78835c.js","assets/DuplicateFlowModal.5c802167.js","assets/RunFlowMixin.001c02cf.js","assets/FlowExecutionCard.0ecb3416.js","assets/PotreeEditorPanel.4a94edc6.js","assets/SelectFlowModal.172b2c43.js","assets/SelectFlowModal.469266a1.css","assets/ChunkedUpload.362a0241.js","assets/PotreeEditorPanel.de237e17.css","assets/tools-pages-mixin.a198bd3d.js","assets/Content.374ba61b.css"])),Q9=kn(()=>ft(()=>import("./Content.146ce859.js"),["assets/Content.146ce859.js","assets/ChunkedUpload.362a0241.js","assets/files.0cc5119a.js","assets/FileDroparea.29978052.js","assets/AddTagModal.933aacc4.js","assets/time.39bf66fa.js","assets/api-pagination.8059ae15.js","assets/remote-files-check.117923d9.js","assets/SelectFlowModal.172b2c43.js","assets/marked.esm.1cf17280.js","assets/keyboardHandler.mixin.7e86a69b.js","assets/SelectFlowModal.469266a1.css","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/ShareDatasetModal.1a78835c.js","assets/PotreeEditorPanel.4a94edc6.js","assets/PotreeEditorPanel.de237e17.css","assets/DatasetImages.b9394fe3.js","assets/DatasetImages.74e33db4.css","assets/Card.e6af9d36.js","assets/Card.60b8ca4d.css","assets/Chart.f27f38b1.js","assets/tools-pages-mixin.a198bd3d.js","assets/Content.4ff2993b.css"])),Z9=kn(()=>ft(()=>import("./Content.211ac8bb.js"),["assets/Content.211ac8bb.js","assets/ChunkedUpload.362a0241.js","assets/files.0cc5119a.js","assets/FileDroparea.29978052.js","assets/time.39bf66fa.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/marked.esm.1cf17280.js","assets/Card.e6af9d36.js","assets/Card.60b8ca4d.css","assets/tools-pages-mixin.a198bd3d.js","assets/Content.36a0d8a1.css"])),e7=kn(()=>ft(()=>import("./Content.7fb2d9e5.js"),["assets/Content.7fb2d9e5.js","assets/api-pagination.8059ae15.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/Card.e6af9d36.js","assets/Card.60b8ca4d.css","assets/Chart.f27f38b1.js","assets/tools-pages-mixin.a198bd3d.js","assets/Content.2a4c4959.css"])),t7=kn(()=>ft(()=>import("./Content.bb9ca261.js"),["assets/Content.bb9ca261.js","assets/marked.esm.1cf17280.js","assets/keyboardHandler.mixin.7e86a69b.js","assets/CreateEditFlowMixin.5a32bc7a.js","assets/remote-files-check.117923d9.js","assets/files.0cc5119a.js","assets/time.39bf66fa.js","assets/api-pagination.8059ae15.js","assets/CreateEditFlowMixin.13323476.css","assets/SelectFlowModal.172b2c43.js","assets/SelectFlowModal.469266a1.css","assets/RunFlowMixin.001c02cf.js","assets/DuplicateFlowModal.5c802167.js","assets/tools-pages-mixin.a198bd3d.js","assets/Content.dbc0d494.css"])),n7=kn(()=>ft(()=>import("./Content.edc49e61.js"),["assets/Content.edc49e61.js","assets/CreateEditFlowMixin.5a32bc7a.js","assets/marked.esm.1cf17280.js","assets/remote-files-check.117923d9.js","assets/files.0cc5119a.js","assets/time.39bf66fa.js","assets/api-pagination.8059ae15.js","assets/keyboardHandler.mixin.7e86a69b.js","assets/CreateEditFlowMixin.13323476.css","assets/tools-pages-mixin.a198bd3d.js","assets/Content.a6f8cd17.css"])),i7=kn(()=>ft(()=>import("./Content.47002e63.js"),["assets/Content.47002e63.js","assets/Content.82db3894.css"])),r7=kn(()=>ft(()=>import("./Content.794fdd6e.js"),["assets/Content.794fdd6e.js","assets/time.39bf66fa.js","assets/api-pagination.8059ae15.js","assets/SelectPaymentMethodModal.39653ba9.js","assets/marked.esm.1cf17280.js","assets/OrderItem.0770348c.js","assets/OrderItem.6ae7fda7.css","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/Tabs.27821444.js","assets/Tabs.f9f5a443.css","assets/Content.5737b031.css"])),s7=kn(()=>ft(()=>import("./Content.b98ca68c.js"),["assets/Content.b98ca68c.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/download.cadf5707.js","assets/time.39bf66fa.js","assets/SelectPaymentMethodModal.39653ba9.js","assets/Content.76075926.css"])),o7=kn(()=>ft(()=>import("./Content.91070524.js"),["assets/Content.91070524.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/time.39bf66fa.js","assets/Tabs.27821444.js","assets/Tabs.f9f5a443.css","assets/Content.875c63a6.css"])),a7=kn(()=>ft(()=>import("./Content.ed098c27.js"),["assets/Content.ed098c27.js","assets/vue.runtime.esm-bundler.0fc2de45.js","assets/api-pagination.8059ae15.js","assets/DatasetImages.b9394fe3.js","assets/PotreeEditorPanel.4a94edc6.js","assets/keyboardHandler.mixin.7e86a69b.js","assets/time.39bf66fa.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/SelectFlowModal.172b2c43.js","assets/marked.esm.1cf17280.js","assets/SelectFlowModal.469266a1.css","assets/ChunkedUpload.362a0241.js","assets/files.0cc5119a.js","assets/PotreeEditorPanel.de237e17.css","assets/DatasetImages.74e33db4.css","assets/Tabs.27821444.js","assets/Tabs.f9f5a443.css","assets/tools-pages-mixin.a198bd3d.js","assets/Content.cc4acbf1.css"])),l7=kn(()=>ft(()=>import("./Content.eb3b80d5.js"),["assets/Content.eb3b80d5.js","assets/Tabs.27821444.js","assets/Tabs.f9f5a443.css","assets/OrdersOverview.4cbf6e51.js","assets/DataTable.42a4ab5e.js","assets/DataTablePagination.eb425f50.js","assets/DataTablePagination.543ad245.css","assets/DataTable.d576396e.css","assets/keyboardHandler.mixin.7e86a69b.js","assets/OrderItem.0770348c.js","assets/time.39bf66fa.js","assets/OrderItem.6ae7fda7.css"])),c7=kn(()=>ft(()=>import("./Content.94667661.js"),["assets/Content.94667661.js","assets/SelectPaymentMethodModal.39653ba9.js","assets/Content.f1401c26.css"])),u7={name:"ToolsWrapper",components:{PagesAdminContent:Y9,PagesAdminButton:iq,PagesDashboardContent:X9,PagesDashboardButton:oq,PagesProjectsContent:J9,PagesProjectsButton:dq,PagesCatalogueContent:Q9,PagesCatalogueButton:gq,PagesAiModelsContent:Z9,PagesAiModelsButton:yq,PagesAiLearningPointContent:e7,PagesAiLearningPointButton:wq,PagesFlowsContent:t7,PagesFlowExecutionsContent:n7,PagesUiComponentsButton:Eq,PagesUiComponentsContent:i7,GeneralUserProfileButton:C9,GeneralSupportButton:R9,GeneralDocsButton:D9,GeneralFlaiHubButton:z9,PagesOrganizationContent:r7,PagesUserSettingsContent:o7,PagesDownloadsContent:s7,PagesDownloadsButton:cq,PagesMultiViewsContent:a7,PagesResellerDashboardButton:j9,PagesResellerDashboardContent:l7,PagesCliDashboardButton:K9,PagesCliDashboardContent:c7},provide(){return{toolNamespace:this.toolNamespace,urlSafeToolNamespace:this.toolNamespace.split("/").join(":")}},props:{toolNamespace:{type:String,required:!0},displayType:{type:String,required:!0,validator:e=>["button","content"].includes(e)}},computed:{getComponentName(){const e=this.toolNamespace.split("/");e.push(this.displayType);const t=e.join("-"),n=i=>i.split("-").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join("");return this.$options.components[n(t)]?t:"flai-not-found-page"}}};function h7(e,t,n,i,r,s){return oe(),Ue(Iu(s.getComponentName))}const d7=Re(u7,[["render",h7]]),f7={props:{justify:{type:String,default:"",validator:e=>e?["start","center","end","between","around"].includes(e):!0},content:{type:String,default:"",validator:e=>e?["start","center","end","between","around"].includes(e):!0},flex:{type:String,default:"",validator:e=>e?["row","row-reverse","col","col-reverse"].includes(e):!0},items:{type:String,default:"",validator:e=>e?["stretch","start","end","center","baseline"].includes(e):!0}},computed:{justifyClass(){return this.justify?`justify-${this.justify}`:""},contentClass(){return this.content?`content-${this.content}`:""},flexClass(){return this.flex?`flex-${this.flex}`:""},itemsClass(){return this.items?`items-${this.items}`:""},allClasses(){return[this.justifyClass,this.contentClass,this.flexClass,this.itemsClass].filter(Boolean)}}},p7={name:"PlaceHolder",components:{ToolsWrapper:d7},mixins:[f7],props:{placeholder:{type:String,required:!0,validator:e=>Object.keys(Ct).includes(e)},displayType:{type:String,default:"button",validator:e=>["button","content"].includes(e)}},computed:{placeholderTools(){return this.$store.getters["AppState/Tools/toolsOnPlaceholder"][this.displayType][this.placeholder]}}},g7=["data-placeholder"];function m7(e,t,n,i,r,s){const o=Ae("tools-wrapper");return oe(),me("div",{"data-placeholder":n.placeholder,class:Ge([e.allClasses,"d-flex placeholder"])},[(oe(!0),me(tt,null,ti(s.placeholderTools,u=>(oe(),Ue(o,{key:u,"tool-namespace":u,"display-type":n.displayType},null,8,["tool-namespace","display-type"]))),128))],10,g7)}const tE=Re(p7,[["render",m7]]),nE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS8AAACuCAMAAABQm3sjAAAAY1BMVEUAAAAUT7cAAAAAAAAUT7cUT7cAAAAUT7cUT7cUT7cUT7cUT7cUT7cUT7cUT7cAAAAAAAAAAAAAAAAAAAAUT7cAAAAAAAAUT7cUT7cAAAAUT7cAAAAAAAAAAAAAAAAUT7cAAABcPE2yAAAAH3RSTlMAwIBAgEDAEPBg0DDgkKAQ8KBgsCAg4HBQ0LCQUDBwGEo98gAABhNJREFUeNrt3ddy2zAQQNFl700soqiy+P+vTOLJxHEkEVgQdIhy3uWx7wASBZAwbDEGQXDyP9yCIGjAAEW0QjrUze/jlj1p484PRtBYhmtqoLs/+patavvHHfRU4Loz0Ny6iQmZuhtoKMJ1IRCM14kRTFf9ZqbCXkHPyOIA9KKsVxCzn4wvpqjX2DNpvU6zUk2vR8s2aB+gDRW9xphtFGszxBT0urVss1aXd7HtvXymxAm0sLlXxxTpQAfcXvxcVgXj9uLmsisYt5dYLmvewzb16phix/8KvqXXianWHv46bEOve8uUu8DByfdqLmwHPhybfK8r28XBF16lewVsHzEcmnSvL7PRnosK2V4ntpcJjky218T+sGqAkXvRh9cljuOLKQNMstckmMr/s6fdBI+eiTnyWphcr4AJaP0RvmoeQp17OLAa1+QJvNIzvmsDzxqfCTj0fRbncMXrXM2GBeb7pPk7voQTP9d95XuU3hNSQk/I9ayZ9J6QZM3GT7i7AetgFLetC8s+47iCSa682dgAx6T7MhjJZfPoeDAOMAnjGIGn0fkSnypQMJl6i67ATgqWlE+aL0tT+Arm0qj3KitJr+Ji06JeMVvVqv0h258qSOD/aulDgz5I5UNloZfjV6VXZQXsaP+p5O/Rqwg9fCtdzgP8K/NWfCbe9BK2zlfSawSquU6RJz8nhIdb0gI+EF/SBF+xdV3wDu1DlmSoUhRTD/AJ13nwSfQlCvf9u716RR4S1MOuvXqmzGOXXnOORFWyY6+YKeMTehHGFl05W9orqVFOZWWvc4qy8sS6XomHG6SFZb2iFDdJC6t6nXGrtLCoV43bpfb0qlEFW3olOb7ger3j4SuuF20yul6vVfia60U7kcX1op3I4nq9kJT4juv1woJvuV7PZnzP9XqSpPie60W7lHC9/jUgUep9yL+x15Upc9vay6Okqs/RX6XnKv+eXtAxRU6wsVeEwuqZsEmpstd/2t8ONg2vcIDXstKiXhGKWQZ4Kwnt6VWjiHSGVUVuSa8BReQDf8/Sjl6h4LYiX2VFrxL5FhCSWdCrIIwursr8XhVylQmIWozvVSJXAcKS0vBeA3KFQFAY3uuMPDmQVGb3WpAnApIkNbpXyv/jiEKTew304cUfYAb3mpGjBLLa4F4hcpyBrDC414IcA9CV5vbK+dORrjK3F3LUIGG2t1cGEgZje0XIUYCM1NpeIMWztVcJUipTe4WEX5MgdL1cL5FeNUiJbO0Vul6ul+t1mF6V6+U+H10vd32vaS/3/fFb1idKU3slyDGDhMTY9S9Ajsqtr5LW73O3fv+F5/aH3P7jjr0yVD8hK4N7Fe7+if99f05m8v05O9z/VRrd64yKB1ho9v2FBXKd3f2rpPuj0wHE5ab3qgmPK/DVxt9/PyNfDYIy85/vgFIkmHt+6I8KVQXLrHg+bUBFD/RVdjz/CAuKKCPeKaSWPF8LEe146NfOqTXPb4OHYtLwXbEot+h8AIhQVFoN8CTJSrvOnwAPxeXVnMCn6LwgomW9IvrxOVUYhp73MbDs68X5GnOI85kO1UuD878O1Wt1Gcz1or3lu160Gel60T4jXS/awrvrRbuosLnXTWLt3eZe/gH+XYBOvTpt/7/CPr1ubN0E3xIs1aVXwDjunGALKpCHxvS6AkelIFeiTa+RcbQNcGTp5lygTS9gPD3wFDlusSSgUa8L4fjkXS71KwCdevVMRbDCQzlpBnr18hlf3wBXVqIEbwDNegVMQHu9wx+3rhs5xQiDS7deDRMz9f4v3YX9FKsYY2mYgH69IGYS4I2oRkHlZ61v6tWxNe0dxDxke72WZAvyLTN8UaTUQ4wy+rlH13jFHQSNUr3WJHNdro2sOktefMC+l8ErmUd4iUoXRjcCRxKFi/ecyguzATR3YnQBiImi6Bx+mKNI+1K/tTK9LOa7XiTN5Hrt/A7mg9Vi14tkbF0vkpPrRXNlJD3YrmMUMVivc71oOtdrt+v8CRyAW8tEgfNTE7teNLfJ9aI5Ta4XzSlmPFdw/jI+LrwNXOer8XSN3+xD2r34teYe+P7nLpTvnwJtBtYPOp/k8Aixbt0AAAAASUVORK5CYII=",v7={name:"MainNavigation",components:{PlaceHolder:tE},computed:{collapsed(){return this.$store.getters["AppState/UserState/isNavBarCollapsed"]()}},methods:{toggleCollapse(){this.$store.dispatch("AppState/UserState/setNavBarCollapsed",!this.collapsed)}}},y7={class:"d-flex flex-col"};function _7(e,t,n,i,r,s){const o=Ae("place-holder"),u=Ae("flai-icon");return oe(),me("section",{class:Ge([{collapsed:s.collapsed},"main-navigation"])},[de("div",y7,[t[1]||(t[1]=de("div",null,[de("img",{src:nE,class:"logo"})],-1)),Ee(o,{placeholder:"MAIN_NAVIGATION_TOP",flex:"col"})]),s.collapsed?Be("",!0):(oe(),Ue(o,{key:0,placeholder:"MAIN_NAVIGATION_BOTTOM",flex:"col"})),de("button",{class:"btn icon round toggle-collapse",onClick:t[0]||(t[0]=(...a)=>s.toggleCollapse&&s.toggleCollapse(...a))},[Ee(u,{name:s.collapsed?"arrow_forward":"arrow_back"},null,8,["name"])])],2)}const b7=Re(v7,[["render",_7]]),w7={name:"MainHeader",components:{PlaceHolder:tE}},S7={class:"d-flex header justify-between"};function T7(e,t,n,i,r,s){const o=Ae("place-holder");return oe(),me("section",S7,[Ee(o,{placeholder:"MAIN_HEADER_LEFT"}),Ee(o,{placeholder:"MAIN_HEADER_RIGHT"})])}const E7=Re(w7,[["render",T7]]);const A7={name:"ToastNotifications",computed:{notifications(){return this.$store.getters["Notifications/getToastNotifications"]}}},C7={class:"d-flex flex-col flex-1 fixed toast-container"};function x7(e,t,n,i,r,s){const o=Ae("flai-notification");return oe(),me("div",C7,[(oe(!0),me(tt,null,ti(s.notifications,u=>(oe(),Ue(o,{key:u.id,"model-value":!0,notification:u.msg,class:"m-1 shadow","html-content":u.content,type:u.type,onMouseenter:a=>e.$store.dispatch("Notifications/stopToastNotificationTimeout",u),onMouseleave:a=>e.$store.dispatch("Notifications/startToastNotificationTimeout",u),"onUpdate:modelValue":a=>e.$store.dispatch("Notifications/removeToastNotification",u)},null,8,["notification","html-content","type","onMouseenter","onMouseleave","onUpdate:modelValue"]))),128))])}const M7=Re(A7,[["render",x7],["__scopeId","data-v-f41bc223"]]);const k7={name:"Modal",props:{id:{type:String,required:!0},spinnerOnly:{type:Boolean,default:!1},title:{type:String,default:""},message:{type:String,default:""},content:{type:String,default:""},confirmButton:{type:Object,default:()=>({})},cancelButton:{type:Object,default:()=>({})},customClass:{type:String,default:null},allowEnterConfirm:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},handleClick:{type:Function,default:null},width:{type:String,default:null},height:{type:String,default:null},top:{type:String,default:null},dispatchClose:{type:Boolean,default:!0},showSpinner:{type:Boolean,default:!1}},emits:["close"],computed:{style(){let e="";return this.width&&(e+=`width: ${this.width};`),this.height&&(e+=`height: ${this.height};`),this.top&&(e+=`top: ${this.top};`),e}},mounted(){this.$refs.modal.focus()},methods:{close(){!this.closable||(this.cancelButton?.onClick&&this.cancelButton.onClick(),this.dispatchClose&&this.$store.dispatch("Modals/closeModal",this.id),this.$emit("close"))},confirm(){this.confirmButton.onClick&&this.confirmButton.onClick(),this.dispatchClose&&this.$store.dispatch("Modals/closeModal",this.id),this.$emit("close")},confirmWithEnter(){this.allowEnterConfirm&&this.confirm()}}},$7=["id"],I7={class:"d-flex p-4"},R7={class:"flex-1 m-0"},L7={class:"flai-modal-content-content d-flex p-4"},O7=["innerHTML"],P7={key:1,class:"flex-1"},N7={class:"d-flex justify-end p-3"};function D7(e,t,n,i,r,s){const o=Ae("flai-spinner"),u=Ae("flai-icon");return oe(),Ue(Ms,{to:"#root-portal"},[de("div",{id:n.id,ref:"modal",class:Ge([n.customClass,"flai-modal"]),tabindex:"-1",onKeydown:[t[2]||(t[2]=no((...a)=>s.close&&s.close(...a),["esc"])),t[3]||(t[3]=no((...a)=>s.confirmWithEnter&&s.confirmWithEnter(...a),["enter"]))],onClick:t[4]||(t[4]=(...a)=>n.handleClick&&n.handleClick(...a))},[n.spinnerOnly?(oe(),Ue(o,{key:0,size:"6xl",class:"spinner"})):(oe(),me("div",{key:1,class:"flai-modal-content",style:Nt(s.style)},[Ut(e.$slots,"header",{},()=>[de("div",I7,[de("h1",R7,$e(n.title),1),n.closable?(oe(),Ue(u,{key:0,class:"close-icon modal-button",name:"close",onClick:s.close},null,8,["onClick"])):Be("",!0)]),t[5]||(t[5]=de("hr",{class:"m-0"},null,-1))],!0),Ut(e.$slots,"content",{},()=>[n.showSpinner?(oe(),Ue(o,{key:0,size:"3xl",class:"spinner m-4"})):Be("",!0),de("div",L7,[n.content?(oe(),me("div",{key:0,class:"flex-1",innerHTML:n.content},null,8,O7)):(oe(),me("div",P7,$e(n.message),1))]),t[6]||(t[6]=de("hr",{class:"m-0"},null,-1))],!0),Ut(e.$slots,"footer",{},()=>[de("div",N7,[n.cancelButton&&n.closable?(oe(),me("button",{key:0,class:"btn secondary m-1 modal-button","data-test":"cancel-button",onClick:t[0]||(t[0]=(...a)=>s.close&&s.close(...a))},$e(n.cancelButton.text||e.$t("Cancel")),1)):Be("",!0),n.confirmButton?(oe(),me("button",{key:1,class:Ge([{delete:n.confirmButton.type==="delete"},"btn m-1 modal-button"]),"data-test":"confirm-button",onClick:t[1]||(t[1]=(...a)=>s.confirm&&s.confirm(...a))},$e(n.confirmButton.text||e.$t("Confirm")),3)):Be("",!0)])],!0)],4))],42,$7)])}const F7=Re(k7,[["render",D7],["__scopeId","data-v-db1703f0"]]);const B7={props:{tip:{type:Object,required:!0},hasPrev:{type:Boolean,required:!0},hasNext:{type:Boolean,required:!0}},emits:["prev-tip","next-tip","close-tips"],data(){return{element:null,openerStyle:{}}},watch:{tip:{async handler(e,t){t&&this.element&&this.element.classList.remove("user-tip-highlight");const{selector:n,customClass:i}=this.tip;try{this.element=await this.waitForElement(n),this.element.classList.add("user-tip-highlight"),i&&this.element.classList.add(i),this.$nextTick(()=>{const{x:r,y:s,top:o,bottom:u,left:a,right:h,width:c,height:l}=this.element.getBoundingClientRect();this.openerStyle={x:r,y:s,top:`${o}px`,bottom:`${u}px`,left:`${a}px`,right:`${h}px`,width:`${c}px`,height:`${l}px`,position:"absolute","pointer-events":"none"},this.$refs.opener.click()})}catch(r){this.$emit("close-tips"),console.error(r)}},immediate:!0}},beforeUnmount(){this.element&&this.element.classList.remove("user-tip-highlight")},methods:{waitForElement(e,t=5e3){const n=Date.now();return new Promise((i,r)=>{const s=setInterval(()=>{const o=document.querySelector(e);o?(clearInterval(s),i(o)):Date.now()-n>t&&(clearInterval(s),r(new Error(`${e} not found on page`)))},50)})}}},H7=["onClick"],U7={class:"p-3 user-tip-box"},z7={class:"text-gray"},W7={class:"d-flex justify-between mt-2"},V7={key:0,class:"d-flex justify-end gap-2"},j7=["disabled"],G7=["disabled"];function q7(e,t,n,i,r,s){const o=Ae("flai-popover");return r.element?(oe(),Ue(o,{key:r.element,width:n.tip.width,closable:!1,"z-index":1000001,position:n.tip.position,"hide-close-icon":"","hide-arrow":""},{button:pt(({openPopover:u})=>[de("div",{ref:"opener",style:Nt(r.openerStyle),onClick:u},null,12,H7)]),default:pt(()=>[de("div",U7,[de("h3",null,$e(n.tip.title),1),de("div",z7,$e(n.tip.text),1),de("div",W7,[de("button",{class:"btn sm",onClick:t[0]||(t[0]=u=>e.$emit("close-tips"))},$e(e.$t("Close")),1),n.hasPrev||n.hasNext?(oe(),me("div",V7,[de("button",{disabled:!n.hasPrev,class:"btn sm",onClick:t[1]||(t[1]=u=>e.$emit("prev-tip"))},$e(e.$t("Prev")),9,j7),de("button",{disabled:!n.hasNext,class:"btn sm",onClick:t[2]||(t[2]=u=>e.$emit("next-tip"))},$e(e.$t("Next")),9,G7)])):Be("",!0)])])]),_:1},8,["width","position"])):Be("",!0)}const K7=Re(B7,[["render",q7]]);const Y7={components:{UserTip:K7},data(){return{currentTipIndex:0}},computed:{tips(){return(this.$store.state.UserTips.visibleTips||[]).filter(t=>t.showOnMobile!==!this.$isMobile())}},methods:{prevTip(){this.currentTipIndex>=1&&this.currentTipIndex--},nextTip(){this.currentTipIndex<this.tips.length-1&&this.currentTipIndex++},closeTips(){this.$store.dispatch("UserTips/hideTips"),this.currentTipIndex=0}}},X7={key:0,class:"flai-modal user-tips-controller"};function J7(e,t,n,i,r,s){const o=Ae("user-tip");return oe(),Ue(Ms,{to:"#root-portal"},[s.tips.length>0?(oe(),me("div",X7,[Ee(o,{tip:s.tips[r.currentTipIndex],"has-prev":r.currentTipIndex>0,"has-next":r.currentTipIndex<s.tips.length-1,onPrevTip:s.prevTip,onNextTip:s.nextTip,onCloseTips:s.closeTips},null,8,["tip","has-prev","has-next","onPrevTip","onNextTip","onCloseTips"])])):Be("",!0)])}const Q7=Re(Y7,[["render",J7],["__scopeId","data-v-3f014d43"]]);var iE={exports:{}};/*!
 * Pusher JavaScript Library v7.6.0
 * https://pusher.com/
 *
 * Copyright 2020, Pusher
 * Released under the MIT licence.
 */(function(e,t){(function(i,r){e.exports=r()})(window,function(){return function(n){var i={};function r(s){if(i[s])return i[s].exports;var o=i[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=i,r.d=function(s,o,u){r.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:u})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,o){if(o&1&&(s=r(s)),o&8||o&4&&typeof s=="object"&&s&&s.__esModule)return s;var u=Object.create(null);if(r.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:s}),o&2&&typeof s!="string")for(var a in s)r.d(u,a,function(h){return s[h]}.bind(null,a));return u},r.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(o,"a",o),o},r.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},r.p="",r(r.s=2)}([function(n,i,r){var s=this&&this.__extends||function(){var g=function(m,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var _ in S)S.hasOwnProperty(_)&&(y[_]=S[_])},g(m,v)};return function(m,v){g(m,v);function y(){this.constructor=m}m.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(i,"__esModule",{value:!0});var o=256,u=function(){function g(m){m===void 0&&(m="="),this._paddingCharacter=m}return g.prototype.encodedLength=function(m){return this._paddingCharacter?(m+2)/3*4|0:(m*8+5)/6|0},g.prototype.encode=function(m){for(var v="",y=0;y<m.length-2;y+=3){var S=m[y]<<16|m[y+1]<<8|m[y+2];v+=this._encodeByte(S>>>3*6&63),v+=this._encodeByte(S>>>2*6&63),v+=this._encodeByte(S>>>1*6&63),v+=this._encodeByte(S>>>0*6&63)}var _=m.length-y;if(_>0){var S=m[y]<<16|(_===2?m[y+1]<<8:0);v+=this._encodeByte(S>>>3*6&63),v+=this._encodeByte(S>>>2*6&63),_===2?v+=this._encodeByte(S>>>1*6&63):v+=this._paddingCharacter||"",v+=this._paddingCharacter||""}return v},g.prototype.maxDecodedLength=function(m){return this._paddingCharacter?m/4*3|0:(m*6+7)/8|0},g.prototype.decodedLength=function(m){return this.maxDecodedLength(m.length-this._getPaddingLength(m))},g.prototype.decode=function(m){if(m.length===0)return new Uint8Array(0);for(var v=this._getPaddingLength(m),y=m.length-v,S=new Uint8Array(this.maxDecodedLength(y)),_=0,w=0,b=0,C=0,M=0,R=0,T=0;w<y-4;w+=4)C=this._decodeChar(m.charCodeAt(w+0)),M=this._decodeChar(m.charCodeAt(w+1)),R=this._decodeChar(m.charCodeAt(w+2)),T=this._decodeChar(m.charCodeAt(w+3)),S[_++]=C<<2|M>>>4,S[_++]=M<<4|R>>>2,S[_++]=R<<6|T,b|=C&o,b|=M&o,b|=R&o,b|=T&o;if(w<y-1&&(C=this._decodeChar(m.charCodeAt(w)),M=this._decodeChar(m.charCodeAt(w+1)),S[_++]=C<<2|M>>>4,b|=C&o,b|=M&o),w<y-2&&(R=this._decodeChar(m.charCodeAt(w+2)),S[_++]=M<<4|R>>>2,b|=R&o),w<y-3&&(T=this._decodeChar(m.charCodeAt(w+3)),S[_++]=R<<6|T,b|=T&o),b!==0)throw new Error("Base64Coder: incorrect characters for decoding");return S},g.prototype._encodeByte=function(m){var v=m;return v+=65,v+=25-m>>>8&0-65-26+97,v+=51-m>>>8&26-97-52+48,v+=61-m>>>8&52-48-62+43,v+=62-m>>>8&62-43-63+47,String.fromCharCode(v)},g.prototype._decodeChar=function(m){var v=o;return v+=(42-m&m-44)>>>8&-o+m-43+62,v+=(46-m&m-48)>>>8&-o+m-47+63,v+=(47-m&m-58)>>>8&-o+m-48+52,v+=(64-m&m-91)>>>8&-o+m-65+0,v+=(96-m&m-123)>>>8&-o+m-97+26,v},g.prototype._getPaddingLength=function(m){var v=0;if(this._paddingCharacter){for(var y=m.length-1;y>=0&&m[y]===this._paddingCharacter;y--)v++;if(m.length<4||v>2)throw new Error("Base64Coder: incorrect padding")}return v},g}();i.Coder=u;var a=new u;function h(g){return a.encode(g)}i.encode=h;function c(g){return a.decode(g)}i.decode=c;var l=function(g){s(m,g);function m(){return g!==null&&g.apply(this,arguments)||this}return m.prototype._encodeByte=function(v){var y=v;return y+=65,y+=25-v>>>8&0-65-26+97,y+=51-v>>>8&26-97-52+48,y+=61-v>>>8&52-48-62+45,y+=62-v>>>8&62-45-63+95,String.fromCharCode(y)},m.prototype._decodeChar=function(v){var y=o;return y+=(44-v&v-46)>>>8&-o+v-45+62,y+=(94-v&v-96)>>>8&-o+v-95+63,y+=(47-v&v-58)>>>8&-o+v-48+52,y+=(64-v&v-91)>>>8&-o+v-65+0,y+=(96-v&v-123)>>>8&-o+v-97+26,y},m}(u);i.URLSafeCoder=l;var d=new l;function f(g){return d.encode(g)}i.encodeURLSafe=f;function p(g){return d.decode(g)}i.decodeURLSafe=p,i.encodedLength=function(g){return a.encodedLength(g)},i.maxDecodedLength=function(g){return a.maxDecodedLength(g)},i.decodedLength=function(g){return a.decodedLength(g)}},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s="utf8: invalid string",o="utf8: invalid source encoding";function u(c){for(var l=new Uint8Array(a(c)),d=0,f=0;f<c.length;f++){var p=c.charCodeAt(f);p<128?l[d++]=p:p<2048?(l[d++]=192|p>>6,l[d++]=128|p&63):p<55296?(l[d++]=224|p>>12,l[d++]=128|p>>6&63,l[d++]=128|p&63):(f++,p=(p&1023)<<10,p|=c.charCodeAt(f)&1023,p+=65536,l[d++]=240|p>>18,l[d++]=128|p>>12&63,l[d++]=128|p>>6&63,l[d++]=128|p&63)}return l}i.encode=u;function a(c){for(var l=0,d=0;d<c.length;d++){var f=c.charCodeAt(d);if(f<128)l+=1;else if(f<2048)l+=2;else if(f<55296)l+=3;else if(f<=57343){if(d>=c.length-1)throw new Error(s);d++,l+=4}else throw new Error(s)}return l}i.encodedLength=a;function h(c){for(var l=[],d=0;d<c.length;d++){var f=c[d];if(f&128){var p=void 0;if(f<224){if(d>=c.length)throw new Error(o);var g=c[++d];if((g&192)!==128)throw new Error(o);f=(f&31)<<6|g&63,p=128}else if(f<240){if(d>=c.length-1)throw new Error(o);var g=c[++d],m=c[++d];if((g&192)!==128||(m&192)!==128)throw new Error(o);f=(f&15)<<12|(g&63)<<6|m&63,p=2048}else if(f<248){if(d>=c.length-2)throw new Error(o);var g=c[++d],m=c[++d],v=c[++d];if((g&192)!==128||(m&192)!==128||(v&192)!==128)throw new Error(o);f=(f&15)<<18|(g&63)<<12|(m&63)<<6|v&63,p=65536}else throw new Error(o);if(f<p||f>=55296&&f<=57343)throw new Error(o);if(f>=65536){if(f>1114111)throw new Error(o);f-=65536,l.push(String.fromCharCode(55296|f>>10)),f=56320|f&1023}}l.push(String.fromCharCode(f))}return l.join("")}i.decode=h},function(n,i,r){n.exports=r(3).default},function(n,i,r){r.r(i);var s=function(){function k(x,$){this.lastId=0,this.prefix=x,this.name=$}return k.prototype.create=function(x){this.lastId++;var $=this.lastId,D=this.prefix+$,H=this.name+"["+$+"]",V=!1,he=function(){V||(x.apply(null,arguments),V=!0)};return this[$]=he,{number:$,id:D,name:H,callback:he}},k.prototype.remove=function(x){delete this[x.number]},k}(),o=new s("_pusher_script_","Pusher.ScriptReceivers"),u={VERSION:"7.6.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},a=u,h=function(){function k(x){this.options=x,this.receivers=x.receivers||o,this.loading={}}return k.prototype.load=function(x,$,D){var H=this;if(H.loading[x]&&H.loading[x].length>0)H.loading[x].push(D);else{H.loading[x]=[D];var V=Ke.createScriptRequest(H.getPath(x,$)),he=H.receivers.create(function(Te){if(H.receivers.remove(he),H.loading[x]){var De=H.loading[x];delete H.loading[x];for(var ke=function(Dt){Dt||V.cleanup()},Qe=0;Qe<De.length;Qe++)De[Qe](Te,ke)}});V.send(he)}},k.prototype.getRoot=function(x){var $,D=Ke.getDocument().location.protocol;return x&&x.useTLS||D==="https:"?$=this.options.cdn_https:$=this.options.cdn_http,$.replace(/\/*$/,"")+"/"+this.options.version},k.prototype.getPath=function(x,$){return this.getRoot($)+"/"+x+this.options.suffix+".js"},k}(),c=h,l=new s("_pusher_dependencies","Pusher.DependenciesReceivers"),d=new c({cdn_http:a.cdn_http,cdn_https:a.cdn_https,version:a.VERSION,suffix:a.dependency_suffix,receivers:l}),f={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},p=function(k){var x="See:",$=f.urls[k];if(!$)return"";var D;return $.fullUrl?D=$.fullUrl:$.path&&(D=f.baseUrl+$.path),D?x+" "+D:""},g={buildLogSuffix:p},m;(function(k){k.UserAuthentication="user-authentication",k.ChannelAuthorization="channel-authorization"})(m||(m={}));var v=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),y=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),S=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),_=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),w=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),b=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),C=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),M=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),R=function(k){v(x,k);function x($){var D=this.constructor,H=k.call(this,$)||this;return Object.setPrototypeOf(H,D.prototype),H}return x}(Error),T=function(k){v(x,k);function x($,D){var H=this.constructor,V=k.call(this,D)||this;return V.status=$,Object.setPrototypeOf(V,H.prototype),V}return x}(Error),A=function(k,x,$,D,H){var V=Ke.createXHR();V.open("POST",$.endpoint,!0),V.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var he in $.headers)V.setRequestHeader(he,$.headers[he]);if($.headersProvider!=null){var Te=$.headersProvider();for(var he in Te)V.setRequestHeader(he,Te[he])}return V.onreadystatechange=function(){if(V.readyState===4)if(V.status===200){var De=void 0,ke=!1;try{De=JSON.parse(V.responseText),ke=!0}catch{H(new T(200,"JSON returned from "+D.toString()+" endpoint was invalid, yet status code was 200. Data was: "+V.responseText),null)}ke&&H(null,De)}else{var Qe="";switch(D){case m.UserAuthentication:Qe=g.buildLogSuffix("authenticationEndpoint");break;case m.ChannelAuthorization:Qe="Clients must be authorized to join private or presence channels. "+g.buildLogSuffix("authorizationEndpoint");break}H(new T(V.status,"Unable to retrieve auth string from "+D.toString()+" endpoint - "+("received status: "+V.status+" from "+$.endpoint+". "+Qe)),null)}},V.send(x),V},P=A;function I(k){return z(B(k))}var E=String.fromCharCode,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=function(k){var x=k.charCodeAt(0);return x<128?k:x<2048?E(192|x>>>6)+E(128|x&63):E(224|x>>>12&15)+E(128|x>>>6&63)+E(128|x&63)},B=function(k){return k.replace(/[^\x00-\x7F]/g,O)},U=function(k){var x=[0,2,1][k.length%3],$=k.charCodeAt(0)<<16|(k.length>1?k.charCodeAt(1):0)<<8|(k.length>2?k.charCodeAt(2):0),D=[L.charAt($>>>18),L.charAt($>>>12&63),x>=2?"=":L.charAt($>>>6&63),x>=1?"=":L.charAt($&63)];return D.join("")},z=window.btoa||function(k){return k.replace(/[\s\S]{1,3}/g,U)},j=function(){function k(x,$,D,H){var V=this;this.clear=$,this.timer=x(function(){V.timer&&(V.timer=H(V.timer))},D)}return k.prototype.isRunning=function(){return this.timer!==null},k.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},k}(),q=j,ne=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}();function G(k){window.clearTimeout(k)}function X(k){window.clearInterval(k)}var ie=function(k){ne(x,k);function x($,D){return k.call(this,setTimeout,G,$,function(H){return D(),null})||this}return x}(q),le=function(k){ne(x,k);function x($,D){return k.call(this,setInterval,X,$,function(H){return D(),H})||this}return x}(q),Y={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(k){return new ie(0,k)},method:function(k){var x=Array.prototype.slice.call(arguments,1);return function($){return $[k].apply($,x.concat(arguments))}}},J=Y;function te(k){for(var x=[],$=1;$<arguments.length;$++)x[$-1]=arguments[$];for(var D=0;D<x.length;D++){var H=x[D];for(var V in H)H[V]&&H[V].constructor&&H[V].constructor===Object?k[V]=te(k[V]||{},H[V]):k[V]=H[V]}return k}function ue(){for(var k=["Pusher"],x=0;x<arguments.length;x++)typeof arguments[x]=="string"?k.push(arguments[x]):k.push(se(arguments[x]));return k.join(" : ")}function Se(k,x){var $=Array.prototype.indexOf;if(k===null)return-1;if($&&k.indexOf===$)return k.indexOf(x);for(var D=0,H=k.length;D<H;D++)if(k[D]===x)return D;return-1}function Ce(k,x){for(var $ in k)Object.prototype.hasOwnProperty.call(k,$)&&x(k[$],$,k)}function F(k){var x=[];return Ce(k,function($,D){x.push(D)}),x}function N(k){var x=[];return Ce(k,function($){x.push($)}),x}function W(k,x,$){for(var D=0;D<k.length;D++)x.call($||window,k[D],D,k)}function ee(k,x){for(var $=[],D=0;D<k.length;D++)$.push(x(k[D],D,k,$));return $}function re(k,x){var $={};return Ce(k,function(D,H){$[H]=x(D)}),$}function ce(k,x){x=x||function(H){return!!H};for(var $=[],D=0;D<k.length;D++)x(k[D],D,k,$)&&$.push(k[D]);return $}function fe(k,x){var $={};return Ce(k,function(D,H){(x&&x(D,H,k,$)||Boolean(D))&&($[H]=D)}),$}function ye(k){var x=[];return Ce(k,function($,D){x.push([D,$])}),x}function ge(k,x){for(var $=0;$<k.length;$++)if(x(k[$],$,k))return!0;return!1}function ve(k,x){for(var $=0;$<k.length;$++)if(!x(k[$],$,k))return!1;return!0}function Z(k){return re(k,function(x){return typeof x=="object"&&(x=se(x)),encodeURIComponent(I(x.toString()))})}function ae(k){var x=fe(k,function(D){return D!==void 0}),$=ee(ye(Z(x)),J.method("join","=")).join("&");return $}function K(k){var x=[],$=[];return function D(H,V){var he,Te,De;switch(typeof H){case"object":if(!H)return null;for(he=0;he<x.length;he+=1)if(x[he]===H)return{$ref:$[he]};if(x.push(H),$.push(V),Object.prototype.toString.apply(H)==="[object Array]")for(De=[],he=0;he<H.length;he+=1)De[he]=D(H[he],V+"["+he+"]");else{De={};for(Te in H)Object.prototype.hasOwnProperty.call(H,Te)&&(De[Te]=D(H[Te],V+"["+JSON.stringify(Te)+"]"))}return De;case"number":case"string":case"boolean":return H}}(k,"$")}function se(k){try{return JSON.stringify(k)}catch{return JSON.stringify(K(k))}}var be=function(){function k(){this.globalLog=function(x){window.console&&window.console.log&&window.console.log(x)}}return k.prototype.debug=function(){for(var x=[],$=0;$<arguments.length;$++)x[$]=arguments[$];this.log(this.globalLog,x)},k.prototype.warn=function(){for(var x=[],$=0;$<arguments.length;$++)x[$]=arguments[$];this.log(this.globalLogWarn,x)},k.prototype.error=function(){for(var x=[],$=0;$<arguments.length;$++)x[$]=arguments[$];this.log(this.globalLogError,x)},k.prototype.globalLogWarn=function(x){window.console&&window.console.warn?window.console.warn(x):this.globalLog(x)},k.prototype.globalLogError=function(x){window.console&&window.console.error?window.console.error(x):this.globalLogWarn(x)},k.prototype.log=function(x){var $=ue.apply(this,arguments);if(_h.log)_h.log($);else if(_h.logToConsole){var D=x.bind(this);D($)}},k}(),_e=new be,Oe=function(k,x,$,D,H){($.headers!==void 0||$.headersProvider!=null)&&_e.warn("To send headers with the "+D.toString()+" request, you must use AJAX, rather than JSONP.");var V=k.nextAuthCallbackID.toString();k.nextAuthCallbackID++;var he=k.getDocument(),Te=he.createElement("script");k.auth_callbacks[V]=function(Qe){H(null,Qe)};var De="Pusher.auth_callbacks['"+V+"']";Te.src=$.endpoint+"?callback="+encodeURIComponent(De)+"&"+x;var ke=he.getElementsByTagName("head")[0]||he.documentElement;ke.insertBefore(Te,ke.firstChild)},qe=Oe,Fe=function(){function k(x){this.src=x}return k.prototype.send=function(x){var $=this,D="Error loading "+$.src;$.script=document.createElement("script"),$.script.id=x.id,$.script.src=$.src,$.script.type="text/javascript",$.script.charset="UTF-8",$.script.addEventListener?($.script.onerror=function(){x.callback(D)},$.script.onload=function(){x.callback(null)}):$.script.onreadystatechange=function(){($.script.readyState==="loaded"||$.script.readyState==="complete")&&x.callback(null)},$.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?($.errorScript=document.createElement("script"),$.errorScript.id=x.id+"_error",$.errorScript.text=x.name+"('"+D+"');",$.script.async=$.errorScript.async=!1):$.script.async=!0;var H=document.getElementsByTagName("head")[0];H.insertBefore($.script,H.firstChild),$.errorScript&&H.insertBefore($.errorScript,$.script.nextSibling)},k.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},k}(),je=Fe,mt=function(){function k(x,$){this.url=x,this.data=$}return k.prototype.send=function(x){if(!this.request){var $=ae(this.data),D=this.url+"/"+x.number+"?"+$;this.request=Ke.createScriptRequest(D),this.request.send(x)}},k.prototype.cleanup=function(){this.request&&this.request.cleanup()},k}(),qn=mt,Zr=function(k,x){return function($,D){var H="http"+(x?"s":"")+"://",V=H+(k.host||k.options.host)+k.options.path,he=Ke.createJSONPRequest(V,$),Te=Ke.ScriptReceivers.create(function(De,ke){o.remove(Te),he.cleanup(),ke&&ke.host&&(k.host=ke.host),D&&D(De,ke)});he.send(Te)}},mn={name:"jsonp",getAgent:Zr},Kn=mn;function Ns(k,x,$){var D=k+(x.useTLS?"s":""),H=x.useTLS?x.hostTLS:x.hostNonTLS;return D+"://"+H+$}function uh(k,x){var $="/app/"+k,D="?protocol="+a.PROTOCOL+"&client=js&version="+a.VERSION+(x?"&"+x:"");return $+D}var AE={getInitial:function(k,x){var $=(x.httpPath||"")+uh(k,"flash=false");return Ns("ws",x,$)}},CE={getInitial:function(k,x){var $=(x.httpPath||"/pusher")+uh(k);return Ns("http",x,$)}},xE={getInitial:function(k,x){return Ns("http",x,x.httpPath||"/pusher")},getPath:function(k,x){return uh(k)}},ME=function(){function k(){this._callbacks={}}return k.prototype.get=function(x){return this._callbacks[hh(x)]},k.prototype.add=function(x,$,D){var H=hh(x);this._callbacks[H]=this._callbacks[H]||[],this._callbacks[H].push({fn:$,context:D})},k.prototype.remove=function(x,$,D){if(!x&&!$&&!D){this._callbacks={};return}var H=x?[hh(x)]:F(this._callbacks);$||D?this.removeCallback(H,$,D):this.removeAllCallbacks(H)},k.prototype.removeCallback=function(x,$,D){W(x,function(H){this._callbacks[H]=ce(this._callbacks[H]||[],function(V){return $&&$!==V.fn||D&&D!==V.context}),this._callbacks[H].length===0&&delete this._callbacks[H]},this)},k.prototype.removeAllCallbacks=function(x){W(x,function($){delete this._callbacks[$]},this)},k}(),kE=ME;function hh(k){return"_"+k}var $E=function(){function k(x){this.callbacks=new kE,this.global_callbacks=[],this.failThrough=x}return k.prototype.bind=function(x,$,D){return this.callbacks.add(x,$,D),this},k.prototype.bind_global=function(x){return this.global_callbacks.push(x),this},k.prototype.unbind=function(x,$,D){return this.callbacks.remove(x,$,D),this},k.prototype.unbind_global=function(x){return x?(this.global_callbacks=ce(this.global_callbacks||[],function($){return $!==x}),this):(this.global_callbacks=[],this)},k.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},k.prototype.emit=function(x,$,D){for(var H=0;H<this.global_callbacks.length;H++)this.global_callbacks[H](x,$);var V=this.callbacks.get(x),he=[];if(D?he.push($,D):$&&he.push($),V&&V.length>0)for(var H=0;H<V.length;H++)V[H].fn.apply(V[H].context||window,he);else this.failThrough&&this.failThrough(x,$);return this},k}(),Wi=$E,IE=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),RE=function(k){IE(x,k);function x($,D,H,V,he){var Te=k.call(this)||this;return Te.initialize=Ke.transportConnectionInitializer,Te.hooks=$,Te.name=D,Te.priority=H,Te.key=V,Te.options=he,Te.state="new",Te.timeline=he.timeline,Te.activityTimeout=he.activityTimeout,Te.id=Te.timeline.generateUniqueID(),Te}return x.prototype.handlesActivityChecks=function(){return Boolean(this.hooks.handlesActivityChecks)},x.prototype.supportsPing=function(){return Boolean(this.hooks.supportsPing)},x.prototype.connect=function(){var $=this;if(this.socket||this.state!=="initialized")return!1;var D=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(D,this.options)}catch(H){return J.defer(function(){$.onError(H),$.changeState("closed")}),!1}return this.bindListeners(),_e.debug("Connecting",{transport:this.name,url:D}),this.changeState("connecting"),!0},x.prototype.close=function(){return this.socket?(this.socket.close(),!0):!1},x.prototype.send=function($){var D=this;return this.state==="open"?(J.defer(function(){D.socket&&D.socket.send($)}),!0):!1},x.prototype.ping=function(){this.state==="open"&&this.supportsPing()&&this.socket.ping()},x.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},x.prototype.onError=function($){this.emit("error",{type:"WebSocketError",error:$}),this.timeline.error(this.buildTimelineMessage({error:$.toString()}))},x.prototype.onClose=function($){$?this.changeState("closed",{code:$.code,reason:$.reason,wasClean:$.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},x.prototype.onMessage=function($){this.emit("message",$)},x.prototype.onActivity=function(){this.emit("activity")},x.prototype.bindListeners=function(){var $=this;this.socket.onopen=function(){$.onOpen()},this.socket.onerror=function(D){$.onError(D)},this.socket.onclose=function(D){$.onClose(D)},this.socket.onmessage=function(D){$.onMessage(D)},this.supportsPing()&&(this.socket.onactivity=function(){$.onActivity()})},x.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},x.prototype.changeState=function($,D){this.state=$,this.timeline.info(this.buildTimelineMessage({state:$,params:D})),this.emit($,D)},x.prototype.buildTimelineMessage=function($){return te({cid:this.id},$)},x}(Wi),LE=RE,OE=function(){function k(x){this.hooks=x}return k.prototype.isSupported=function(x){return this.hooks.isSupported(x)},k.prototype.createConnection=function(x,$,D,H){return new LE(this.hooks,x,$,D,H)},k}(),Ds=OE,PE=new Ds({urls:AE,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(Ke.getWebSocketAPI())},isSupported:function(){return Boolean(Ke.getWebSocketAPI())},getSocket:function(k){return Ke.createWebSocket(k)}}),Fg={urls:CE,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Bg=te({getSocket:function(k){return Ke.HTTPFactory.createStreamingSocket(k)}},Fg),Hg=te({getSocket:function(k){return Ke.HTTPFactory.createPollingSocket(k)}},Fg),Ug={isSupported:function(){return Ke.isXHRSupported()}},NE=new Ds(te({},Bg,Ug)),DE=new Ds(te({},Hg,Ug)),FE={ws:PE,xhr_streaming:NE,xhr_polling:DE},Rl=FE,BE=new Ds({file:"sockjs",urls:xE,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(k,x){return new window.SockJS(k,null,{js_path:d.getPath("sockjs",{useTLS:x.useTLS}),ignore_null_origin:x.ignoreNullOrigin})},beforeOpen:function(k,x){k.send(JSON.stringify({path:x}))}}),zg={isSupported:function(k){var x=Ke.isXDRSupported(k.useTLS);return x}},HE=new Ds(te({},Bg,zg)),UE=new Ds(te({},Hg,zg));Rl.xdr_streaming=HE,Rl.xdr_polling=UE,Rl.sockjs=BE;var zE=Rl,WE=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),VE=function(k){WE(x,k);function x(){var $=k.call(this)||this,D=$;return window.addEventListener!==void 0&&(window.addEventListener("online",function(){D.emit("online")},!1),window.addEventListener("offline",function(){D.emit("offline")},!1)),$}return x.prototype.isOnline=function(){return window.navigator.onLine===void 0?!0:window.navigator.onLine},x}(Wi),jE=new VE,GE=function(){function k(x,$,D){this.manager=x,this.transport=$,this.minPingDelay=D.minPingDelay,this.maxPingDelay=D.maxPingDelay,this.pingDelay=void 0}return k.prototype.createConnection=function(x,$,D,H){var V=this;H=te({},H,{activityTimeout:this.pingDelay});var he=this.transport.createConnection(x,$,D,H),Te=null,De=function(){he.unbind("open",De),he.bind("closed",ke),Te=J.now()},ke=function(Qe){if(he.unbind("closed",ke),Qe.code===1002||Qe.code===1003)V.manager.reportDeath();else if(!Qe.wasClean&&Te){var Dt=J.now()-Te;Dt<2*V.maxPingDelay&&(V.manager.reportDeath(),V.pingDelay=Math.max(Dt/2,V.minPingDelay))}};return he.bind("open",De),he},k.prototype.isSupported=function(x){return this.manager.isAlive()&&this.transport.isSupported(x)},k}(),qE=GE,Wg={decodeMessage:function(k){try{var x=JSON.parse(k.data),$=x.data;if(typeof $=="string")try{$=JSON.parse(x.data)}catch{}var D={event:x.event,channel:x.channel,data:$};return x.user_id&&(D.user_id=x.user_id),D}catch(H){throw{type:"MessageParseError",error:H,data:k.data}}},encodeMessage:function(k){return JSON.stringify(k)},processHandshake:function(k){var x=Wg.decodeMessage(k);if(x.event==="pusher:connection_established"){if(!x.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:x.data.socket_id,activityTimeout:x.data.activity_timeout*1e3}}else{if(x.event==="pusher:error")return{action:this.getCloseAction(x.data),error:this.getCloseError(x.data)};throw"Invalid handshake"}},getCloseAction:function(k){return k.code<4e3?k.code>=1002&&k.code<=1004?"backoff":null:k.code===4e3?"tls_only":k.code<4100?"refused":k.code<4200?"backoff":k.code<4300?"retry":"refused"},getCloseError:function(k){return k.code!==1e3&&k.code!==1001?{type:"PusherError",data:{code:k.code,message:k.reason||k.message}}:null}},es=Wg,KE=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),YE=function(k){KE(x,k);function x($,D){var H=k.call(this)||this;return H.id=$,H.transport=D,H.activityTimeout=D.activityTimeout,H.bindListeners(),H}return x.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},x.prototype.send=function($){return this.transport.send($)},x.prototype.send_event=function($,D,H){var V={event:$,data:D};return H&&(V.channel=H),_e.debug("Event sent",V),this.send(es.encodeMessage(V))},x.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},x.prototype.close=function(){this.transport.close()},x.prototype.bindListeners=function(){var $=this,D={message:function(V){var he;try{he=es.decodeMessage(V)}catch(Te){$.emit("error",{type:"MessageParseError",error:Te,data:V.data})}if(he!==void 0){switch(_e.debug("Event recd",he),he.event){case"pusher:error":$.emit("error",{type:"PusherError",data:he.data});break;case"pusher:ping":$.emit("ping");break;case"pusher:pong":$.emit("pong");break}$.emit("message",he)}},activity:function(){$.emit("activity")},error:function(V){$.emit("error",V)},closed:function(V){H(),V&&V.code&&$.handleCloseEvent(V),$.transport=null,$.emit("closed")}},H=function(){Ce(D,function(V,he){$.transport.unbind(he,V)})};Ce(D,function(V,he){$.transport.bind(he,V)})},x.prototype.handleCloseEvent=function($){var D=es.getCloseAction($),H=es.getCloseError($);H&&this.emit("error",H),D&&this.emit(D,{action:D,error:H})},x}(Wi),XE=YE,JE=function(){function k(x,$){this.transport=x,this.callback=$,this.bindListeners()}return k.prototype.close=function(){this.unbindListeners(),this.transport.close()},k.prototype.bindListeners=function(){var x=this;this.onMessage=function($){x.unbindListeners();var D;try{D=es.processHandshake($)}catch(H){x.finish("error",{error:H}),x.transport.close();return}D.action==="connected"?x.finish("connected",{connection:new XE(D.id,x.transport),activityTimeout:D.activityTimeout}):(x.finish(D.action,{error:D.error}),x.transport.close())},this.onClosed=function($){x.unbindListeners();var D=es.getCloseAction($)||"backoff",H=es.getCloseError($);x.finish(D,{error:H})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},k.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},k.prototype.finish=function(x,$){this.callback(te({transport:this.transport,action:x},$))},k}(),QE=JE,ZE=function(){function k(x,$){this.timeline=x,this.options=$||{}}return k.prototype.send=function(x,$){this.timeline.isEmpty()||this.timeline.send(Ke.TimelineTransport.getAgent(this,x),$)},k}(),eA=ZE,tA=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),nA=function(k){tA(x,k);function x($,D){var H=k.call(this,function(V,he){_e.debug("No callbacks on "+$+" for "+V)})||this;return H.name=$,H.pusher=D,H.subscribed=!1,H.subscriptionPending=!1,H.subscriptionCancelled=!1,H}return x.prototype.authorize=function($,D){return D(null,{auth:""})},x.prototype.trigger=function($,D){if($.indexOf("client-")!==0)throw new y("Event '"+$+"' does not start with 'client-'");if(!this.subscribed){var H=g.buildLogSuffix("triggeringClientEvents");_e.warn("Client event triggered before channel 'subscription_succeeded' event . "+H)}return this.pusher.send_event($,D,this.name)},x.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},x.prototype.handleEvent=function($){var D=$.event,H=$.data;if(D==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent($);else if(D==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent($);else if(D.indexOf("pusher_internal:")!==0){var V={};this.emit(D,H,V)}},x.prototype.handleSubscriptionSucceededEvent=function($){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",$.data)},x.prototype.handleSubscriptionCountEvent=function($){$.data.subscription_count&&(this.subscriptionCount=$.data.subscription_count),this.emit("pusher:subscription_count",$.data)},x.prototype.subscribe=function(){var $=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(D,H){D?($.subscriptionPending=!1,_e.error(D.toString()),$.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:D.message},D instanceof T?{status:D.status}:{}))):$.pusher.send_event("pusher:subscribe",{auth:H.auth,channel_data:H.channel_data,channel:$.name})}))},x.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},x.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},x.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},x}(Wi),dh=nA,iA=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),rA=function(k){iA(x,k);function x(){return k!==null&&k.apply(this,arguments)||this}return x.prototype.authorize=function($,D){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:$},D)},x}(dh),fh=rA,sA=function(){function k(){this.reset()}return k.prototype.get=function(x){return Object.prototype.hasOwnProperty.call(this.members,x)?{id:x,info:this.members[x]}:null},k.prototype.each=function(x){var $=this;Ce(this.members,function(D,H){x($.get(H))})},k.prototype.setMyID=function(x){this.myID=x},k.prototype.onSubscription=function(x){this.members=x.presence.hash,this.count=x.presence.count,this.me=this.get(this.myID)},k.prototype.addMember=function(x){return this.get(x.user_id)===null&&this.count++,this.members[x.user_id]=x.user_info,this.get(x.user_id)},k.prototype.removeMember=function(x){var $=this.get(x.user_id);return $&&(delete this.members[x.user_id],this.count--),$},k.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},k}(),oA=sA,aA=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),lA=function(k,x,$,D){function H(V){return V instanceof $?V:new $(function(he){he(V)})}return new($||($=Promise))(function(V,he){function Te(Qe){try{ke(D.next(Qe))}catch(Dt){he(Dt)}}function De(Qe){try{ke(D.throw(Qe))}catch(Dt){he(Dt)}}function ke(Qe){Qe.done?V(Qe.value):H(Qe.value).then(Te,De)}ke((D=D.apply(k,x||[])).next())})},cA=function(k,x){var $={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},D,H,V,he;return he={next:Te(0),throw:Te(1),return:Te(2)},typeof Symbol=="function"&&(he[Symbol.iterator]=function(){return this}),he;function Te(ke){return function(Qe){return De([ke,Qe])}}function De(ke){if(D)throw new TypeError("Generator is already executing.");for(;$;)try{if(D=1,H&&(V=ke[0]&2?H.return:ke[0]?H.throw||((V=H.return)&&V.call(H),0):H.next)&&!(V=V.call(H,ke[1])).done)return V;switch(H=0,V&&(ke=[ke[0]&2,V.value]),ke[0]){case 0:case 1:V=ke;break;case 4:return $.label++,{value:ke[1],done:!1};case 5:$.label++,H=ke[1],ke=[0];continue;case 7:ke=$.ops.pop(),$.trys.pop();continue;default:if(V=$.trys,!(V=V.length>0&&V[V.length-1])&&(ke[0]===6||ke[0]===2)){$=0;continue}if(ke[0]===3&&(!V||ke[1]>V[0]&&ke[1]<V[3])){$.label=ke[1];break}if(ke[0]===6&&$.label<V[1]){$.label=V[1],V=ke;break}if(V&&$.label<V[2]){$.label=V[2],$.ops.push(ke);break}V[2]&&$.ops.pop(),$.trys.pop();continue}ke=x.call(k,$)}catch(Qe){ke=[6,Qe],H=0}finally{D=V=0}if(ke[0]&5)throw ke[1];return{value:ke[0]?ke[1]:void 0,done:!0}}},uA=function(k){aA(x,k);function x($,D){var H=k.call(this,$,D)||this;return H.members=new oA,H}return x.prototype.authorize=function($,D){var H=this;k.prototype.authorize.call(this,$,function(V,he){return lA(H,void 0,void 0,function(){var Te,De;return cA(this,function(ke){switch(ke.label){case 0:return V?[3,3]:(he=he,he.channel_data==null?[3,1]:(Te=JSON.parse(he.channel_data),this.members.setMyID(Te.user_id),[3,3]));case 1:return[4,this.pusher.user.signinDonePromise];case 2:if(ke.sent(),this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else return De=g.buildLogSuffix("authorizationEndpoint"),_e.error("Invalid auth response for channel '"+this.name+"', "+("expected 'channel_data' field. "+De+", ")+"or the user should be signed in."),D("Invalid auth response"),[2];ke.label=3;case 3:return D(V,he),[2]}})})})},x.prototype.handleEvent=function($){var D=$.event;if(D.indexOf("pusher_internal:")===0)this.handleInternalEvent($);else{var H=$.data,V={};$.user_id&&(V.user_id=$.user_id),this.emit(D,H,V)}},x.prototype.handleInternalEvent=function($){var D=$.event,H=$.data;switch(D){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent($);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent($);break;case"pusher_internal:member_added":var V=this.members.addMember(H);this.emit("pusher:member_added",V);break;case"pusher_internal:member_removed":var he=this.members.removeMember(H);he&&this.emit("pusher:member_removed",he);break}},x.prototype.handleSubscriptionSucceededEvent=function($){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription($.data),this.emit("pusher:subscription_succeeded",this.members))},x.prototype.disconnect=function(){this.members.reset(),k.prototype.disconnect.call(this)},x}(fh),hA=uA,dA=r(1),ph=r(0),fA=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),pA=function(k){fA(x,k);function x($,D,H){var V=k.call(this,$,D)||this;return V.key=null,V.nacl=H,V}return x.prototype.authorize=function($,D){var H=this;k.prototype.authorize.call(this,$,function(V,he){if(V){D(V,he);return}var Te=he.shared_secret;if(!Te){D(new Error("No shared_secret key in auth payload for encrypted channel: "+H.name),null);return}H.key=Object(ph.decode)(Te),delete he.shared_secret,D(null,he)})},x.prototype.trigger=function($,D){throw new C("Client events are not currently supported for encrypted channels")},x.prototype.handleEvent=function($){var D=$.event,H=$.data;if(D.indexOf("pusher_internal:")===0||D.indexOf("pusher:")===0){k.prototype.handleEvent.call(this,$);return}this.handleEncryptedEvent(D,H)},x.prototype.handleEncryptedEvent=function($,D){var H=this;if(!this.key){_e.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!D.ciphertext||!D.nonce){_e.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+D);return}var V=Object(ph.decode)(D.ciphertext);if(V.length<this.nacl.secretbox.overheadLength){_e.error("Expected encrypted event ciphertext length to be "+this.nacl.secretbox.overheadLength+", got: "+V.length);return}var he=Object(ph.decode)(D.nonce);if(he.length<this.nacl.secretbox.nonceLength){_e.error("Expected encrypted event nonce length to be "+this.nacl.secretbox.nonceLength+", got: "+he.length);return}var Te=this.nacl.secretbox.open(V,he,this.key);if(Te===null){_e.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,function(De,ke){if(De){_e.error("Failed to make a request to the authEndpoint: "+ke+". Unable to fetch new key, so dropping encrypted event");return}if(Te=H.nacl.secretbox.open(V,he,H.key),Te===null){_e.error("Failed to decrypt event with new key. Dropping encrypted event");return}H.emit($,H.getDataToEmit(Te))});return}this.emit($,this.getDataToEmit(Te))},x.prototype.getDataToEmit=function($){var D=Object(dA.decode)($);try{return JSON.parse(D)}catch{return D}},x}(fh),gA=pA,mA=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),vA=function(k){mA(x,k);function x($,D){var H=k.call(this)||this;H.state="initialized",H.connection=null,H.key=$,H.options=D,H.timeline=H.options.timeline,H.usingTLS=H.options.useTLS,H.errorCallbacks=H.buildErrorCallbacks(),H.connectionCallbacks=H.buildConnectionCallbacks(H.errorCallbacks),H.handshakeCallbacks=H.buildHandshakeCallbacks(H.errorCallbacks);var V=Ke.getNetwork();return V.bind("online",function(){H.timeline.info({netinfo:"online"}),(H.state==="connecting"||H.state==="unavailable")&&H.retryIn(0)}),V.bind("offline",function(){H.timeline.info({netinfo:"offline"}),H.connection&&H.sendActivityCheck()}),H.updateStrategy(),H}return x.prototype.connect=function(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}},x.prototype.send=function($){return this.connection?this.connection.send($):!1},x.prototype.send_event=function($,D,H){return this.connection?this.connection.send_event($,D,H):!1},x.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},x.prototype.isUsingTLS=function(){return this.usingTLS},x.prototype.startConnecting=function(){var $=this,D=function(H,V){H?$.runner=$.strategy.connect(0,D):V.action==="error"?($.emit("error",{type:"HandshakeError",error:V.error}),$.timeline.error({handshakeError:V.error})):($.abortConnecting(),$.handshakeCallbacks[V.action](V))};this.runner=this.strategy.connect(0,D)},x.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},x.prototype.disconnectInternally=function(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var $=this.abandonConnection();$.close()}},x.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},x.prototype.retryIn=function($){var D=this;this.timeline.info({action:"retry",delay:$}),$>0&&this.emit("connecting_in",Math.round($/1e3)),this.retryTimer=new ie($||0,function(){D.disconnectInternally(),D.connect()})},x.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},x.prototype.setUnavailableTimer=function(){var $=this;this.unavailableTimer=new ie(this.options.unavailableTimeout,function(){$.updateState("unavailable")})},x.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},x.prototype.sendActivityCheck=function(){var $=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ie(this.options.pongTimeout,function(){$.timeline.error({pong_timed_out:$.options.pongTimeout}),$.retryIn(0)})},x.prototype.resetActivityCheck=function(){var $=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ie(this.activityTimeout,function(){$.sendActivityCheck()}))},x.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},x.prototype.buildConnectionCallbacks=function($){var D=this;return te({},$,{message:function(H){D.resetActivityCheck(),D.emit("message",H)},ping:function(){D.send_event("pusher:pong",{})},activity:function(){D.resetActivityCheck()},error:function(H){D.emit("error",H)},closed:function(){D.abandonConnection(),D.shouldRetry()&&D.retryIn(1e3)}})},x.prototype.buildHandshakeCallbacks=function($){var D=this;return te({},$,{connected:function(H){D.activityTimeout=Math.min(D.options.activityTimeout,H.activityTimeout,H.connection.activityTimeout||1/0),D.clearUnavailableTimer(),D.setConnection(H.connection),D.socket_id=D.connection.id,D.updateState("connected",{socket_id:D.socket_id})}})},x.prototype.buildErrorCallbacks=function(){var $=this,D=function(H){return function(V){V.error&&$.emit("error",{type:"WebSocketError",error:V.error}),H(V)}};return{tls_only:D(function(){$.usingTLS=!0,$.updateStrategy(),$.retryIn(0)}),refused:D(function(){$.disconnect()}),backoff:D(function(){$.retryIn(1e3)}),retry:D(function(){$.retryIn(0)})}},x.prototype.setConnection=function($){this.connection=$;for(var D in this.connectionCallbacks)this.connection.bind(D,this.connectionCallbacks[D]);this.resetActivityCheck()},x.prototype.abandonConnection=function(){if(!!this.connection){this.stopActivityCheck();for(var $ in this.connectionCallbacks)this.connection.unbind($,this.connectionCallbacks[$]);var D=this.connection;return this.connection=null,D}},x.prototype.updateState=function($,D){var H=this.state;if(this.state=$,H!==$){var V=$;V==="connected"&&(V+=" with new socket ID "+D.socket_id),_e.debug("State changed",H+" -> "+V),this.timeline.info({state:$,params:D}),this.emit("state_change",{previous:H,current:$}),this.emit($,D)}},x.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},x}(Wi),yA=vA,_A=function(){function k(){this.channels={}}return k.prototype.add=function(x,$){return this.channels[x]||(this.channels[x]=wA(x,$)),this.channels[x]},k.prototype.all=function(){return N(this.channels)},k.prototype.find=function(x){return this.channels[x]},k.prototype.remove=function(x){var $=this.channels[x];return delete this.channels[x],$},k.prototype.disconnect=function(){Ce(this.channels,function(x){x.disconnect()})},k}(),bA=_A;function wA(k,x){if(k.indexOf("private-encrypted-")===0){if(x.config.nacl)return Vi.createEncryptedChannel(k,x,x.config.nacl);var $="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",D=g.buildLogSuffix("encryptedChannelSupport");throw new C($+". "+D)}else{if(k.indexOf("private-")===0)return Vi.createPrivateChannel(k,x);if(k.indexOf("presence-")===0)return Vi.createPresenceChannel(k,x);if(k.indexOf("#")===0)throw new S('Cannot create a channel with name "'+k+'".');return Vi.createChannel(k,x)}}var SA={createChannels:function(){return new bA},createConnectionManager:function(k,x){return new yA(k,x)},createChannel:function(k,x){return new dh(k,x)},createPrivateChannel:function(k,x){return new fh(k,x)},createPresenceChannel:function(k,x){return new hA(k,x)},createEncryptedChannel:function(k,x,$){return new gA(k,x,$)},createTimelineSender:function(k,x){return new eA(k,x)},createHandshake:function(k,x){return new QE(k,x)},createAssistantToTheTransportManager:function(k,x,$){return new qE(k,x,$)}},Vi=SA,TA=function(){function k(x){this.options=x||{},this.livesLeft=this.options.lives||1/0}return k.prototype.getAssistant=function(x){return Vi.createAssistantToTheTransportManager(this,x,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},k.prototype.isAlive=function(){return this.livesLeft>0},k.prototype.reportDeath=function(){this.livesLeft-=1},k}(),Vg=TA,EA=function(){function k(x,$){this.strategies=x,this.loop=Boolean($.loop),this.failFast=Boolean($.failFast),this.timeout=$.timeout,this.timeoutLimit=$.timeoutLimit}return k.prototype.isSupported=function(){return ge(this.strategies,J.method("isSupported"))},k.prototype.connect=function(x,$){var D=this,H=this.strategies,V=0,he=this.timeout,Te=null,De=function(ke,Qe){Qe?$(null,Qe):(V=V+1,D.loop&&(V=V%H.length),V<H.length?(he&&(he=he*2,D.timeoutLimit&&(he=Math.min(he,D.timeoutLimit))),Te=D.tryStrategy(H[V],x,{timeout:he,failFast:D.failFast},De)):$(!0))};return Te=this.tryStrategy(H[V],x,{timeout:he,failFast:this.failFast},De),{abort:function(){Te.abort()},forceMinPriority:function(ke){x=ke,Te&&Te.forceMinPriority(ke)}}},k.prototype.tryStrategy=function(x,$,D,H){var V=null,he=null;return D.timeout>0&&(V=new ie(D.timeout,function(){he.abort(),H(!0)})),he=x.connect($,function(Te,De){Te&&V&&V.isRunning()&&!D.failFast||(V&&V.ensureAborted(),H(Te,De))}),{abort:function(){V&&V.ensureAborted(),he.abort()},forceMinPriority:function(Te){he.forceMinPriority(Te)}}},k}(),ts=EA,AA=function(){function k(x){this.strategies=x}return k.prototype.isSupported=function(){return ge(this.strategies,J.method("isSupported"))},k.prototype.connect=function(x,$){return CA(this.strategies,x,function(D,H){return function(V,he){if(H[D].error=V,V){xA(H)&&$(!0);return}W(H,function(Te){Te.forceMinPriority(he.transport.priority)}),$(null,he)}})},k}(),gh=AA;function CA(k,x,$){var D=ee(k,function(H,V,he,Te){return H.connect(x,$(V,Te))});return{abort:function(){W(D,MA)},forceMinPriority:function(H){W(D,function(V){V.forceMinPriority(H)})}}}function xA(k){return ve(k,function(x){return Boolean(x.error)})}function MA(k){!k.error&&!k.aborted&&(k.abort(),k.aborted=!0)}var kA=function(){function k(x,$,D){this.strategy=x,this.transports=$,this.ttl=D.ttl||1800*1e3,this.usingTLS=D.useTLS,this.timeline=D.timeline}return k.prototype.isSupported=function(){return this.strategy.isSupported()},k.prototype.connect=function(x,$){var D=this.usingTLS,H=IA(D),V=[this.strategy];if(H&&H.timestamp+this.ttl>=J.now()){var he=this.transports[H.transport];he&&(this.timeline.info({cached:!0,transport:H.transport,latency:H.latency}),V.push(new ts([he],{timeout:H.latency*2+1e3,failFast:!0})))}var Te=J.now(),De=V.pop().connect(x,function ke(Qe,Dt){Qe?(jg(D),V.length>0?(Te=J.now(),De=V.pop().connect(x,ke)):$(Qe)):(RA(D,Dt.transport.name,J.now()-Te),$(null,Dt))});return{abort:function(){De.abort()},forceMinPriority:function(ke){x=ke,De&&De.forceMinPriority(ke)}}},k}(),$A=kA;function mh(k){return"pusherTransport"+(k?"TLS":"NonTLS")}function IA(k){var x=Ke.getLocalStorage();if(x)try{var $=x[mh(k)];if($)return JSON.parse($)}catch{jg(k)}return null}function RA(k,x,$){var D=Ke.getLocalStorage();if(D)try{D[mh(k)]=se({timestamp:J.now(),transport:x,latency:$})}catch{}}function jg(k){var x=Ke.getLocalStorage();if(x)try{delete x[mh(k)]}catch{}}var LA=function(){function k(x,$){var D=$.delay;this.strategy=x,this.options={delay:D}}return k.prototype.isSupported=function(){return this.strategy.isSupported()},k.prototype.connect=function(x,$){var D=this.strategy,H,V=new ie(this.options.delay,function(){H=D.connect(x,$)});return{abort:function(){V.ensureAborted(),H&&H.abort()},forceMinPriority:function(he){x=he,H&&H.forceMinPriority(he)}}},k}(),Ll=LA,OA=function(){function k(x,$,D){this.test=x,this.trueBranch=$,this.falseBranch=D}return k.prototype.isSupported=function(){var x=this.test()?this.trueBranch:this.falseBranch;return x.isSupported()},k.prototype.connect=function(x,$){var D=this.test()?this.trueBranch:this.falseBranch;return D.connect(x,$)},k}(),ia=OA,PA=function(){function k(x){this.strategy=x}return k.prototype.isSupported=function(){return this.strategy.isSupported()},k.prototype.connect=function(x,$){var D=this.strategy.connect(x,function(H,V){V&&D.abort(),$(H,V)});return D},k}(),NA=PA;function ra(k){return function(){return k.isSupported()}}var DA=function(k,x,$){var D={};function H(rm,VC,jC,GC,qC){var sm=$(k,rm,VC,jC,GC,qC);return D[rm]=sm,sm}var V=Object.assign({},x,{hostNonTLS:k.wsHost+":"+k.wsPort,hostTLS:k.wsHost+":"+k.wssPort,httpPath:k.wsPath}),he=Object.assign({},V,{useTLS:!0}),Te=Object.assign({},x,{hostNonTLS:k.httpHost+":"+k.httpPort,hostTLS:k.httpHost+":"+k.httpsPort,httpPath:k.httpPath}),De={loop:!0,timeout:15e3,timeoutLimit:6e4},ke=new Vg({lives:2,minPingDelay:1e4,maxPingDelay:k.activityTimeout}),Qe=new Vg({lives:2,minPingDelay:1e4,maxPingDelay:k.activityTimeout}),Dt=H("ws","ws",3,V,ke),bi=H("wss","ws",3,he,ke),BC=H("sockjs","sockjs",1,Te),Qg=H("xhr_streaming","xhr_streaming",1,Te,Qe),HC=H("xdr_streaming","xdr_streaming",1,Te,Qe),Zg=H("xhr_polling","xhr_polling",1,Te),UC=H("xdr_polling","xdr_polling",1,Te),em=new ts([Dt],De),zC=new ts([bi],De),WC=new ts([BC],De),tm=new ts([new ia(ra(Qg),Qg,HC)],De),nm=new ts([new ia(ra(Zg),Zg,UC)],De),im=new ts([new ia(ra(tm),new gh([tm,new Ll(nm,{delay:4e3})]),nm)],De),bh=new ia(ra(im),im,WC),wh;return x.useTLS?wh=new gh([em,new Ll(bh,{delay:2e3})]):wh=new gh([em,new Ll(zC,{delay:2e3}),new Ll(bh,{delay:5e3})]),new $A(new NA(new ia(ra(Dt),wh,bh)),D,{ttl:18e5,timeline:x.timeline,useTLS:x.useTLS})},FA=DA,BA=function(){var k=this;k.timeline.info(k.buildTimelineMessage({transport:k.name+(k.options.useTLS?"s":"")})),k.hooks.isInitialized()?k.changeState("initialized"):k.hooks.file?(k.changeState("initializing"),d.load(k.hooks.file,{useTLS:k.options.useTLS},function(x,$){k.hooks.isInitialized()?(k.changeState("initialized"),$(!0)):(x&&k.onError(x),k.onClose(),$(!1))})):k.onClose()},HA={getRequest:function(k){var x=new window.XDomainRequest;return x.ontimeout=function(){k.emit("error",new _),k.close()},x.onerror=function($){k.emit("error",$),k.close()},x.onprogress=function(){x.responseText&&x.responseText.length>0&&k.onChunk(200,x.responseText)},x.onload=function(){x.responseText&&x.responseText.length>0&&k.onChunk(200,x.responseText),k.emit("finished",200),k.close()},x},abortRequest:function(k){k.ontimeout=k.onerror=k.onprogress=k.onload=null,k.abort()}},UA=HA,zA=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),WA=256*1024,VA=function(k){zA(x,k);function x($,D,H){var V=k.call(this)||this;return V.hooks=$,V.method=D,V.url=H,V}return x.prototype.start=function($){var D=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){D.close()},Ke.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send($)},x.prototype.close=function(){this.unloader&&(Ke.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},x.prototype.onChunk=function($,D){for(;;){var H=this.advanceBuffer(D);if(H)this.emit("chunk",{status:$,data:H});else break}this.isBufferTooLong(D)&&this.emit("buffer_too_long")},x.prototype.advanceBuffer=function($){var D=$.slice(this.position),H=D.indexOf(`
`);return H!==-1?(this.position+=H+1,D.slice(0,H)):null},x.prototype.isBufferTooLong=function($){return this.position===$.length&&$.length>WA},x}(Wi),jA=VA,vh;(function(k){k[k.CONNECTING=0]="CONNECTING",k[k.OPEN=1]="OPEN",k[k.CLOSED=3]="CLOSED"})(vh||(vh={}));var ns=vh,GA=1,qA=function(){function k(x,$){this.hooks=x,this.session=qg(1e3)+"/"+JA(8),this.location=KA($),this.readyState=ns.CONNECTING,this.openStream()}return k.prototype.send=function(x){return this.sendRaw(JSON.stringify([x]))},k.prototype.ping=function(){this.hooks.sendHeartbeat(this)},k.prototype.close=function(x,$){this.onClose(x,$,!0)},k.prototype.sendRaw=function(x){if(this.readyState===ns.OPEN)try{return Ke.createSocketRequest("POST",Gg(YA(this.location,this.session))).start(x),!0}catch{return!1}else return!1},k.prototype.reconnect=function(){this.closeStream(),this.openStream()},k.prototype.onClose=function(x,$,D){this.closeStream(),this.readyState=ns.CLOSED,this.onclose&&this.onclose({code:x,reason:$,wasClean:D})},k.prototype.onChunk=function(x){if(x.status===200){this.readyState===ns.OPEN&&this.onActivity();var $,D=x.data.slice(0,1);switch(D){case"o":$=JSON.parse(x.data.slice(1)||"{}"),this.onOpen($);break;case"a":$=JSON.parse(x.data.slice(1)||"[]");for(var H=0;H<$.length;H++)this.onEvent($[H]);break;case"m":$=JSON.parse(x.data.slice(1)||"null"),this.onEvent($);break;case"h":this.hooks.onHeartbeat(this);break;case"c":$=JSON.parse(x.data.slice(1)||"[]"),this.onClose($[0],$[1],!0);break}}},k.prototype.onOpen=function(x){this.readyState===ns.CONNECTING?(x&&x.hostname&&(this.location.base=XA(this.location.base,x.hostname)),this.readyState=ns.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},k.prototype.onEvent=function(x){this.readyState===ns.OPEN&&this.onmessage&&this.onmessage({data:x})},k.prototype.onActivity=function(){this.onactivity&&this.onactivity()},k.prototype.onError=function(x){this.onerror&&this.onerror(x)},k.prototype.openStream=function(){var x=this;this.stream=Ke.createSocketRequest("POST",Gg(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function($){x.onChunk($)}),this.stream.bind("finished",function($){x.hooks.onFinished(x,$)}),this.stream.bind("buffer_too_long",function(){x.reconnect()});try{this.stream.start()}catch($){J.defer(function(){x.onError($),x.onClose(1006,"Could not start streaming",!1)})}},k.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},k}();function KA(k){var x=/([^\?]*)\/*(\??.*)/.exec(k);return{base:x[1],queryString:x[2]}}function YA(k,x){return k.base+"/"+x+"/xhr_send"}function Gg(k){var x=k.indexOf("?")===-1?"?":"&";return k+x+"t="+ +new Date+"&n="+GA++}function XA(k,x){var $=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(k);return $[1]+x+$[3]}function qg(k){return Ke.randomInt(k)}function JA(k){for(var x=[],$=0;$<k;$++)x.push(qg(32).toString(32));return x.join("")}var QA=qA,ZA={getReceiveURL:function(k,x){return k.base+"/"+x+"/xhr_streaming"+k.queryString},onHeartbeat:function(k){k.sendRaw("[]")},sendHeartbeat:function(k){k.sendRaw("[]")},onFinished:function(k,x){k.onClose(1006,"Connection interrupted ("+x+")",!1)}},eC=ZA,tC={getReceiveURL:function(k,x){return k.base+"/"+x+"/xhr"+k.queryString},onHeartbeat:function(){},sendHeartbeat:function(k){k.sendRaw("[]")},onFinished:function(k,x){x===200?k.reconnect():k.onClose(1006,"Connection interrupted ("+x+")",!1)}},nC=tC,iC={getRequest:function(k){var x=Ke.getXHRAPI(),$=new x;return $.onreadystatechange=$.onprogress=function(){switch($.readyState){case 3:$.responseText&&$.responseText.length>0&&k.onChunk($.status,$.responseText);break;case 4:$.responseText&&$.responseText.length>0&&k.onChunk($.status,$.responseText),k.emit("finished",$.status),k.close();break}},$},abortRequest:function(k){k.onreadystatechange=null,k.abort()}},rC=iC,sC={createStreamingSocket:function(k){return this.createSocket(eC,k)},createPollingSocket:function(k){return this.createSocket(nC,k)},createSocket:function(k,x){return new QA(k,x)},createXHR:function(k,x){return this.createRequest(rC,k,x)},createRequest:function(k,x,$){return new jA(k,x,$)}},Kg=sC;Kg.createXDR=function(k,x){return this.createRequest(UA,k,x)};var oC=Kg,aC={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:o,DependenciesReceivers:l,getDefaultStrategy:FA,Transports:zE,transportConnectionInitializer:BA,HTTPFactory:oC,TimelineTransport:Kn,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(k){var x=this;window.Pusher=k;var $=function(){x.onDocumentBody(k.ready)};window.JSON?$():d.load("json2",{},$)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:P,jsonp:qe}},onDocumentBody:function(k){var x=this;document.body?k():setTimeout(function(){x.onDocumentBody(k)},0)},createJSONPRequest:function(k,x){return new qn(k,x)},createScriptRequest:function(k){return new je(k)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var k=this.getXHRAPI();return new k},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return jE},createWebSocket:function(k){var x=this.getWebSocketAPI();return new x(k)},createSocketRequest:function(k,x){if(this.isXHRSupported())return this.HTTPFactory.createXHR(k,x);if(this.isXDRSupported(x.indexOf("https:")===0))return this.HTTPFactory.createXDR(k,x);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var k=this.getXHRAPI();return Boolean(k)&&new k().withCredentials!==void 0},isXDRSupported:function(k){var x=k?"https:":"http:",$=this.getProtocol();return Boolean(window.XDomainRequest)&&$===x},addUnloadListener:function(k){window.addEventListener!==void 0?window.addEventListener("unload",k,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",k)},removeUnloadListener:function(k){window.addEventListener!==void 0?window.removeEventListener("unload",k,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",k)},randomInt:function(k){var x=function(){var $=window.crypto||window.msCrypto,D=$.getRandomValues(new Uint32Array(1))[0];return D/Math.pow(2,32)};return Math.floor(x()*k)}},Ke=aC,yh;(function(k){k[k.ERROR=3]="ERROR",k[k.INFO=6]="INFO",k[k.DEBUG=7]="DEBUG"})(yh||(yh={}));var Ol=yh,lC=function(){function k(x,$,D){this.key=x,this.session=$,this.events=[],this.options=D||{},this.sent=0,this.uniqueID=0}return k.prototype.log=function(x,$){x<=this.options.level&&(this.events.push(te({},$,{timestamp:J.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},k.prototype.error=function(x){this.log(Ol.ERROR,x)},k.prototype.info=function(x){this.log(Ol.INFO,x)},k.prototype.debug=function(x){this.log(Ol.DEBUG,x)},k.prototype.isEmpty=function(){return this.events.length===0},k.prototype.send=function(x,$){var D=this,H=te({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],x(H,function(V,he){V||D.sent++,$&&$(V,he)}),!0},k.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},k}(),cC=lC,uC=function(){function k(x,$,D,H){this.name=x,this.priority=$,this.transport=D,this.options=H||{}}return k.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},k.prototype.connect=function(x,$){var D=this;if(this.isSupported()){if(this.priority<x)return Yg(new w,$)}else return Yg(new R,$);var H=!1,V=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),he=null,Te=function(){V.unbind("initialized",Te),V.connect()},De=function(){he=Vi.createHandshake(V,function(bi){H=!0,Dt(),$(null,bi)})},ke=function(bi){Dt(),$(bi)},Qe=function(){Dt();var bi;bi=se(V),$(new b(bi))},Dt=function(){V.unbind("initialized",Te),V.unbind("open",De),V.unbind("error",ke),V.unbind("closed",Qe)};return V.bind("initialized",Te),V.bind("open",De),V.bind("error",ke),V.bind("closed",Qe),V.initialize(),{abort:function(){H||(Dt(),he?he.close():V.close())},forceMinPriority:function(bi){H||D.priority<bi&&(he?he.close():V.close())}}},k}(),hC=uC;function Yg(k,x){return J.defer(function(){x(k)}),{abort:function(){},forceMinPriority:function(){}}}var dC=Ke.Transports,fC=function(k,x,$,D,H,V){var he=dC[$];if(!he)throw new M($);var Te=(!k.enabledTransports||Se(k.enabledTransports,x)!==-1)&&(!k.disabledTransports||Se(k.disabledTransports,x)===-1),De;return Te?(H=Object.assign({ignoreNullOrigin:k.ignoreNullOrigin},H),De=new hC(x,D,V?V.getAssistant(he):he,H)):De=pC,De},pC={isSupported:function(){return!1},connect:function(k,x){var $=J.defer(function(){x(new R)});return{abort:function(){$.ensureAborted()},forceMinPriority:function(){}}}},gC=function(k,x){var $="socket_id="+encodeURIComponent(k.socketId);for(var D in x.params)$+="&"+encodeURIComponent(D)+"="+encodeURIComponent(x.params[D]);if(x.paramsProvider!=null){var H=x.paramsProvider();for(var D in H)$+="&"+encodeURIComponent(D)+"="+encodeURIComponent(H[D])}return $},mC=function(k){if(typeof Ke.getAuthorizers()[k.transport]>"u")throw"'"+k.transport+"' is not a recognized auth transport";return function(x,$){var D=gC(x,k);Ke.getAuthorizers()[k.transport](Ke,D,k,m.UserAuthentication,$)}},vC=mC,yC=function(k,x){var $="socket_id="+encodeURIComponent(k.socketId);$+="&channel_name="+encodeURIComponent(k.channelName);for(var D in x.params)$+="&"+encodeURIComponent(D)+"="+encodeURIComponent(x.params[D]);if(x.paramsProvider!=null){var H=x.paramsProvider();for(var D in H)$+="&"+encodeURIComponent(D)+"="+encodeURIComponent(H[D])}return $},_C=function(k){if(typeof Ke.getAuthorizers()[k.transport]>"u")throw"'"+k.transport+"' is not a recognized auth transport";return function(x,$){var D=yC(x,k);Ke.getAuthorizers()[k.transport](Ke,D,k,m.ChannelAuthorization,$)}},bC=_C,wC=function(k,x,$){var D={authTransport:x.transport,authEndpoint:x.endpoint,auth:{params:x.params,headers:x.headers}};return function(H,V){var he=k.channel(H.channelName),Te=$(he,D);Te.authorize(H.socketId,V)}},Fs=function(){return Fs=Object.assign||function(k){for(var x,$=1,D=arguments.length;$<D;$++){x=arguments[$];for(var H in x)Object.prototype.hasOwnProperty.call(x,H)&&(k[H]=x[H])}return k},Fs.apply(this,arguments)};function SC(k,x){var $={activityTimeout:k.activityTimeout||a.activityTimeout,cluster:k.cluster||a.cluster,httpPath:k.httpPath||a.httpPath,httpPort:k.httpPort||a.httpPort,httpsPort:k.httpsPort||a.httpsPort,pongTimeout:k.pongTimeout||a.pongTimeout,statsHost:k.statsHost||a.stats_host,unavailableTimeout:k.unavailableTimeout||a.unavailableTimeout,wsPath:k.wsPath||a.wsPath,wsPort:k.wsPort||a.wsPort,wssPort:k.wssPort||a.wssPort,enableStats:CC(k),httpHost:TC(k),useTLS:AC(k),wsHost:EC(k),userAuthenticator:xC(k),channelAuthorizer:kC(k,x)};return"disabledTransports"in k&&($.disabledTransports=k.disabledTransports),"enabledTransports"in k&&($.enabledTransports=k.enabledTransports),"ignoreNullOrigin"in k&&($.ignoreNullOrigin=k.ignoreNullOrigin),"timelineParams"in k&&($.timelineParams=k.timelineParams),"nacl"in k&&($.nacl=k.nacl),$}function TC(k){return k.httpHost?k.httpHost:k.cluster?"sockjs-"+k.cluster+".pusher.com":a.httpHost}function EC(k){return k.wsHost?k.wsHost:k.cluster?Xg(k.cluster):Xg(a.cluster)}function Xg(k){return"ws-"+k+".pusher.com"}function AC(k){return Ke.getProtocol()==="https:"?!0:k.forceTLS!==!1}function CC(k){return"enableStats"in k?k.enableStats:"disableStats"in k?!k.disableStats:!1}function xC(k){var x=Fs(Fs({},a.userAuthentication),k.userAuthentication);return"customHandler"in x&&x.customHandler!=null?x.customHandler:vC(x)}function MC(k,x){var $;return"channelAuthorization"in k?$=Fs(Fs({},a.channelAuthorization),k.channelAuthorization):($={transport:k.authTransport||a.authTransport,endpoint:k.authEndpoint||a.authEndpoint},"auth"in k&&("params"in k.auth&&($.params=k.auth.params),"headers"in k.auth&&($.headers=k.auth.headers)),"authorizer"in k&&($.customHandler=wC(x,$,k.authorizer))),$}function kC(k,x){var $=MC(k,x);return"customHandler"in $&&$.customHandler!=null?$.customHandler:bC($)}var $C=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),IC=function(k){$C(x,k);function x($){var D=k.call(this,function(H,V){_e.debug("No callbacks on watchlist events for "+H)})||this;return D.pusher=$,D.bindWatchlistInternalEvent(),D}return x.prototype.handleEvent=function($){var D=this;$.data.events.forEach(function(H){D.emit(H.name,H)})},x.prototype.bindWatchlistInternalEvent=function(){var $=this;this.pusher.connection.bind("message",function(D){var H=D.event;H==="pusher_internal:watchlist_events"&&$.handleEvent(D)})},x}(Wi),RC=IC;function LC(){var k,x,$=new Promise(function(D,H){k=D,x=H});return{promise:$,resolve:k,reject:x}}var OC=LC,PC=function(){var k=function(x,$){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var V in H)H.hasOwnProperty(V)&&(D[V]=H[V])},k(x,$)};return function(x,$){k(x,$);function D(){this.constructor=x}x.prototype=$===null?Object.create($):(D.prototype=$.prototype,new D)}}(),NC=function(k){PC(x,k);function x($){var D=k.call(this,function(H,V){_e.debug("No callbacks on user for "+H)})||this;return D.signin_requested=!1,D.user_data=null,D.serverToUserChannel=null,D.signinDonePromise=null,D._signinDoneResolve=null,D._onAuthorize=function(H,V){if(H){_e.warn("Error during signin: "+H),D._cleanup();return}D.pusher.send_event("pusher:signin",{auth:V.auth,user_data:V.user_data})},D.pusher=$,D.pusher.connection.bind("state_change",function(H){var V=H.previous,he=H.current;V!=="connected"&&he==="connected"&&D._signin(),V==="connected"&&he!=="connected"&&(D._cleanup(),D._newSigninPromiseIfNeeded())}),D.watchlist=new RC($),D.pusher.connection.bind("message",function(H){var V=H.event;V==="pusher:signin_success"&&D._onSigninSuccess(H.data),D.serverToUserChannel&&D.serverToUserChannel.name===H.channel&&D.serverToUserChannel.handleEvent(H)}),D}return x.prototype.signin=function(){this.signin_requested||(this.signin_requested=!0,this._signin())},x.prototype._signin=function(){!this.signin_requested||(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))},x.prototype._onSigninSuccess=function($){try{this.user_data=JSON.parse($.user_data)}catch{_e.error("Failed parsing user data after signin: "+$.user_data),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){_e.error("user_data doesn't contain an id. user_data: "+this.user_data),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()},x.prototype._subscribeChannels=function(){var $=this,D=function(H){H.subscriptionPending&&H.subscriptionCancelled?H.reinstateSubscription():!H.subscriptionPending&&$.pusher.connection.state==="connected"&&H.subscribe()};this.serverToUserChannel=new dh("#server-to-user-"+this.user_data.id,this.pusher),this.serverToUserChannel.bind_global(function(H,V){H.indexOf("pusher_internal:")===0||H.indexOf("pusher:")===0||$.emit(H,V)}),D(this.serverToUserChannel)},x.prototype._cleanup=function(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()},x.prototype._newSigninPromiseIfNeeded=function(){if(!!this.signin_requested&&!(this.signinDonePromise&&!this.signinDonePromise.done)){var $=OC(),D=$.promise,H=$.resolve;D.done=!1;var V=function(){D.done=!0};D.then(V).catch(V),this.signinDonePromise=D,this._signinDoneResolve=H}},x}(Wi),DC=NC,Jg=function(){function k(x,$){var D=this;if(FC(x),$=$||{},!$.cluster&&!($.wsHost||$.httpHost)){var H=g.buildLogSuffix("javascriptQuickStart");_e.warn("You should always specify a cluster when connecting. "+H)}"disableStats"in $&&_e.warn("The disableStats option is deprecated in favor of enableStats"),this.key=x,this.config=SC($,this),this.channels=Vi.createChannels(),this.global_emitter=new Wi,this.sessionID=Ke.randomInt(1e9),this.timeline=new cC(this.key,this.sessionID,{cluster:this.config.cluster,features:k.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Ol.INFO,version:a.VERSION}),this.config.enableStats&&(this.timelineSender=Vi.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+Ke.TimelineTransport.name}));var V=function(he){return Ke.getDefaultStrategy(D.config,he,fC)};this.connection=Vi.createConnectionManager(this.key,{getStrategy:V,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",function(){D.subscribeAll(),D.timelineSender&&D.timelineSender.send(D.connection.isUsingTLS())}),this.connection.bind("message",function(he){var Te=he.event,De=Te.indexOf("pusher_internal:")===0;if(he.channel){var ke=D.channel(he.channel);ke&&ke.handleEvent(he)}De||D.global_emitter.emit(he.event,he.data)}),this.connection.bind("connecting",function(){D.channels.disconnect()}),this.connection.bind("disconnected",function(){D.channels.disconnect()}),this.connection.bind("error",function(he){_e.warn(he)}),k.instances.push(this),this.timeline.info({instances:k.instances.length}),this.user=new DC(this),k.isReady&&this.connect()}return k.ready=function(){k.isReady=!0;for(var x=0,$=k.instances.length;x<$;x++)k.instances[x].connect()},k.getClientFeatures=function(){return F(fe({ws:Ke.Transports.ws},function(x){return x.isSupported({})}))},k.prototype.channel=function(x){return this.channels.find(x)},k.prototype.allChannels=function(){return this.channels.all()},k.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var x=this.connection.isUsingTLS(),$=this.timelineSender;this.timelineSenderTimer=new le(6e4,function(){$.send(x)})}},k.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},k.prototype.bind=function(x,$,D){return this.global_emitter.bind(x,$,D),this},k.prototype.unbind=function(x,$,D){return this.global_emitter.unbind(x,$,D),this},k.prototype.bind_global=function(x){return this.global_emitter.bind_global(x),this},k.prototype.unbind_global=function(x){return this.global_emitter.unbind_global(x),this},k.prototype.unbind_all=function(x){return this.global_emitter.unbind_all(),this},k.prototype.subscribeAll=function(){var x;for(x in this.channels.channels)this.channels.channels.hasOwnProperty(x)&&this.subscribe(x)},k.prototype.subscribe=function(x){var $=this.channels.add(x,this);return $.subscriptionPending&&$.subscriptionCancelled?$.reinstateSubscription():!$.subscriptionPending&&this.connection.state==="connected"&&$.subscribe(),$},k.prototype.unsubscribe=function(x){var $=this.channels.find(x);$&&$.subscriptionPending?$.cancelSubscription():($=this.channels.remove(x),$&&$.subscribed&&$.unsubscribe())},k.prototype.send_event=function(x,$,D){return this.connection.send_event(x,$,D)},k.prototype.shouldUseTLS=function(){return this.config.useTLS},k.prototype.signin=function(){this.user.signin()},k.instances=[],k.isReady=!1,k.logToConsole=!1,k.Runtime=Ke,k.ScriptReceivers=Ke.ScriptReceivers,k.DependenciesReceivers=Ke.DependenciesReceivers,k.auth_callbacks=Ke.auth_callbacks,k}(),_h=i.default=Jg;function FC(k){if(k==null)throw"You must pass your app key when you instantiate Pusher."}Ke.setup(Jg)}])})})(iE);const Z7=w1(iE.exports),{API_URL:eK,PUSHER_HOST:tK,PUSHER_APP_KEY:nK,PUSHER_PORT:iK}=window.ENV_VARS,rK=e=>new Z7(`${nK}`,{enabledTransports:["ws","wss"],wsHost:`${tK}`,wssPort:`${iK}`,authEndpoint:`${eK}/broadcasting/auth/`,...e});const sK={name:"TemplateWrapper",components:{MainHeader:E7,MainNavigation:b7,ToastNotifications:M7,Modal:F7,UserTipsController:Q7},data:()=>({scroll:0,pusher:null,subscribedChannels:[]}),computed:{currentRouteName(){return this.$route.name},pageIncludesNavigation(){return this.currentRouteName?.includes("pages")},modals(){return this.$store.state.Modals.openModals},navbarCollapsed(){return this.$store.getters["AppState/UserState/isNavBarCollapsed"]},loggedIn(){return this.$store.state.Auth.is_logged_in}},watch:{loggedIn(e){if(e){if(this.$store.state.Auth?.user?.is_guest)return;this.subscribeToNotifications()}else this.unsubscribeNotifications()}},mounted(){this.isSupportedBrowser()||this.$store.dispatch("Modals/openModal",{title:"Browser info",allowEnterConfirm:!0,message:`Your current web browser may not provide the best experience on this website.
                    For an optimal experience, we recommend using modern desktop browsers
                    such as Chrome, Firefox, Edge, or Brave.`,confirmButton:{text:"Ok"},cancelButton:null})},methods:{updateScrollPosition(e){this.scroll=e.target.scrollTop},async handleWebsocketNotification(e){if(e.class_name==="App\\Domains\\Admin\\Commands\\BroadcastDeployCompletedArtisanCommand"){this.$store.dispatch("Modals/openModal",{title:"New app version",allowEnterConfirm:!0,message:`A new version of the application has been deployed. Please reload the webpage
                        in order to enjoy new functionalities and bug fixes.`,confirmButton:{text:"Reload page",onClick:()=>{window.location.reload()}},cancelButton:null});return}if(e.class_name==="App\\Domains\\Datasets\\Models\\DatasetModel"&&this.handleUploadDatasetStatus(e,this),e.class_name==="App\\Domains\\Flows\\Models\\FlowExecutionModel"&&this.handleFlowExecutionStatus(e,this),e.class_name==="App\\Domains\\PointWorker\\Models\\PointWorkerCommandModel"){this.handleCommandsAppliedNotification(e,this);return}if(e.type==="system")return;const t={...e};t.user_id=this.$store.state.Auth.user.id,t.created_at=cn.utc().format(),this.$store.dispatch("Notifications/addNotification",t)},handleCommandsAppliedNotification:mu(async(e,t)=>{e.payload.potree_status==="done"&&setTimeout(async()=>{const{dataset_id:n}=await t.$store.dispatch("AppState/PointWorker/getCommandById",e.class_id);t.$store.dispatch("Tools/potreeSetTilesUpdatedAt",{tilesUpdatedAt:e.payload.tiles_updated_at,datasetId:n}).then(()=>{t.$store.dispatch("Tools/potreeReloadAllPointClouds",{datasetId:n})})},5e3)},1e3),handleFlowExecutionStatus(e){const t=this.$store.state.AppState.Projects.Details.flowExecutions.find(n=>n.id===e.class_id);t&&e.payload?.status&&(t.status=e.payload.status)},handleUploadDatasetStatus(e){if(this.fetchActiveJobsDebounced(this),e?.payload?.status||e?.payload?.data_size_in_gb){const t=this.$store.state.AppState.Datasets.datasets.find(i=>i.id===e.class_id);if(!t)return;e.payload.status&&(t.status=e.payload.status),e.payload.data_size_in_gb&&(t.data_size_in_gb=e.payload.data_size_in_gb);const n=this.$store.state.AppState.Projects.Details.datasets.find(i=>i.id===e.class_id);if(!n)return;e.payload.status&&(n.status=e.payload.status),e.payload.data_size_in_gb&&(n.data_size_in_gb=e.payload.data_size_in_gb)}},fetchActiveJobsDebounced:mu(async e=>{e.$store.dispatch("AppState/ActiveJobs/getActiveJobs")},1e3),async subscribeToNotifications(){const e=new Promise((t,n)=>{if(navigator.serviceWorker.controller){const i=new MessageChannel;i.port1.addEventListener("message",r=>{t(r.data)}),i.port1.start(),navigator.serviceWorker.controller.postMessage("getToken",[i.port2])}else n(new Error("Service worker not available"))});try{const t=await e;this.pusher=rK({auth:{headers:{Authorization:`Bearer ${t}`}}});const n=this.$store.state.Auth.user.id,i=this.$store.state.Auth.organization.id;this.subscribedChannels=["public",`private-user.${n}`,`private-organization.${i}`],this.subscribedChannels.forEach(r=>{this.pusher.subscribe(r).bind("App\\Util\\Broadcast\\FlaiBroadcast",this.handleWebsocketNotification)})}catch(t){console.error(t)}},unsubscribeNotifications(){!this.pusher||(this.subscribedChannels.forEach(e=>{this.pusher.unsubscribe(e)}),this.subscribedChannels=[])},login(){this.$router.push({name:"login"})},register(){this.$router.push({name:"register"})},isSupportedBrowser(){if(/iPhone|iPad|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))return!1;try{return["Chrome","Firefox","Edge","Brave"].some(t=>window.navigator.userAgent.includes(t))}catch{return!1}}}},oK={key:0,class:"d-flex w-full h-full"},aK={class:"d-flex flex-col flex-1 main"},lK={class:"d-flex justify-between",style:{height:"56px"}},cK={class:"d-flex gap-2 pt-4 pr-4"};function uK(e,t,n,i,r,s){const o=Ae("router-view"),u=Ae("toast-notifications"),a=Ae("modal"),h=Ae("user-tips-controller"),c=Ae("main-navigation"),l=Ae("main-header");return e.$store.state.Auth?.user?.is_guest?(oe(),me("div",oK,[de("div",aK,[de("div",lK,[t[4]||(t[4]=de("img",{src:nE,class:"h-full ml-4 mt-2"},null,-1)),de("div",cK,[de("button",{class:"btn secondary",onClick:t[0]||(t[0]=(...d)=>s.login&&s.login(...d))}," Login "),de("button",{class:"btn secondary",onClick:t[1]||(t[1]=(...d)=>s.register&&s.register(...d))}," Register ")])]),de("div",{class:"w-full h-full overflow-auto",onScroll:t[2]||(t[2]=(...d)=>s.updateScrollPosition&&s.updateScrollPosition(...d))},[Ee(o)],32)])])):(oe(),me("div",{key:1,class:Ge(["d-flex w-full h-full overflow-auto",{"navbar-collapsed":s.navbarCollapsed}])},[(oe(),Ue(Ms,{to:"#root-portal"},[Ee(u)])),(oe(!0),me(tt,null,ti(s.modals,d=>(oe(),Ue(a,Ot({key:d.id,ref_for:!0},d),null,16))),128)),Ee(h),s.pageIncludesNavigation?(oe(),Ue(c,{key:0})):Be("",!0),de("div",{class:Ge(["d-flex flex-col flex-1 main",s.currentRouteName])},[s.pageIncludesNavigation?(oe(),Ue(l,{key:0,class:Ge(["header",{shadow:e.scroll>10}])},null,8,["class"])):Be("",!0),de("div",{class:"w-full h-full overflow-auto",onScroll:t[3]||(t[3]=(...d)=>s.updateScrollPosition&&s.updateScrollPosition(...d))},[Ee(o)],32)],2)],2))}const hK=Re(sK,[["render",uK],["__scopeId","data-v-17996a45"]]),dK={install(e){e.config.globalProperties.$debug=!1}},fK={install(e){e.config.globalProperties.$enabled=t=>!(window.ENV_VARS.DISABLED_FUNCTIONALITIES||[]).includes(t)}},pK=e=>{e.use(dK),e.use(fK)};function Hf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Uf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_b(Object(n),!0).forEach(function(i){Hf(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var gK=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(i,r){if(!(typeof document>"u")){var s=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");if(o.async=!0,o.src=t,o.defer=n.defer,n.preconnectOrigin){var u=document.createElement("link");u.href=n.preconnectOrigin,u.rel="preconnect",s.appendChild(u)}s.appendChild(o),o.onload=i,o.onerror=r}})},mK=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(!i.length)return t;var s=i.shift();if(!(!ds(t)||!ds(s))){for(var o in s)ds(s[o])?(t[o]||Object.assign(t,Hf({},o,{})),e(t[o],s[o])):Object.assign(t,Hf({},o,s[o]));return e.apply(void 0,[t].concat(i))}},kl=function(){return!(typeof window>"u"||typeof document>"u")},bb=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;kl()},vK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return bb('Missing "appName" property inside the plugin options.',t.app_name==null),bb('Missing "name" property in the route.',t.screen_name==null),t};function yK(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("/"),i=t.split("/");return n[0]===""&&t[t.length-1]==="/"&&n.shift(),i.join("/")+n.join("/")}var _K=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},rE={},bK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=_K();rE=mK(n,t)},Gn=function(){return rE},As=function(){var e,t=Gn(),n=t.globalObjectName;!kl()||typeof window[n]>"u"||(e=window)[n].apply(e,arguments)},Ag=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=Gn(),r=i.config,s=i.includes;As.apply(void 0,["config",r.id].concat(t)),Array.isArray(s)&&s.forEach(function(o){As.apply(void 0,["config",o.id].concat(t))})},wb=function(t,n){!kl()||(window["ga-disable-".concat(t)]=n)},sE=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=Gn(),n=t.config,i=t.includes;wb(n.id,e),Array.isArray(i)&&i.forEach(function(r){return wb(r.id,e)})},oE=function(){sE(!0)},wK=function(){sE(!1)},aE,SK=function(t){aE=t},Cg=function(){return aE},Ps=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Gn(),i=n.includes,r=n.defaultGroupName;t.send_to==null&&Array.isArray(i)&&i.length&&(t.send_to=i.map(function(s){return s.id}).concat(r)),As("event",e,t)},lE=function(e){if(!!kl()){var t;if(typeof e=="string")t={page_path:e};else if(e.path||e.fullPath){var n=Gn(),i=n.pageTrackerUseFullPath,r=n.pageTrackerPrependBase,s=Cg(),o=s&&s.options.base,u=i?e.fullPath:e.path;t=Uf(Uf({},e.name&&{page_title:e.name}),{},{page_path:r?yK(u,o):u})}else t=e;t.page_location==null&&(t.page_location=window.location.href),t.send_page_view==null&&(t.send_page_view=!0),Ps("page_view",t)}},cE=function(e){var t=Gn(),n=t.appName;if(!!e){var i;typeof e=="string"?i={screen_name:e}:i=e,i.app_name=i.app_name||n,Ps("screen_view",i)}},TK=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ps.apply(void 0,["exception"].concat(t))},EK=function(e){Ag("linker",e)},AK=function(e){Ps("timing_complete",e)},CK=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];As.apply(void 0,["set"].concat(t))},xK=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Ps.apply(void 0,["refund"].concat(t))},MK=function(e){Ps("purchase",e)},kK=function(e){Ag({custom_map:e})},$K=Object.freeze({__proto__:null,query:As,config:Ag,optOut:oE,optIn:wK,pageview:lE,screenview:cE,exception:TK,linker:EK,time:AK,set:CK,refund:xK,purchase:MK,customMap:kK,event:Ps}),IK=function(t){t.config.globalProperties.$gtag=$K},RK=function(){if(!!kl()){var e=Gn(),t=e.enabled,n=e.globalObjectName,i=e.globalDataLayerName;return window[n]==null&&(window[i]=window[i]||[],window[n]=function(){window[i].push(arguments)}),window[n]("js",new Date),t||oE(),window[n]}},Sb=function(t){return Uf({send_page_view:!1},t)},uE=function(){var e=Gn(),t=e.config,n=e.includes;As("config",t.id,Sb(t.params)),Array.isArray(n)&&n.forEach(function(i){As("config",i.id,Sb(i.params))})},Tb=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Gn(),i=n.appName,r=n.pageTrackerTemplate,s=n.pageTrackerScreenviewEnabled,o=n.pageTrackerSkipSamePath;if(!(o&&e.path===t.path)){var u=e;if(Ne(r)?u=r(e,t):s&&(u=vK({app_name:i,screen_name:e.name})),s){cE(u);return}lE(u)}},Eb=function(t){var n=Gn(),i=n.pageTrackerExcludedRoutes;return i.includes(t.path)||i.includes(t.name)},LK=function(){var e=Gn(),t=e.onBeforeTrack,n=e.onAfterTrack,i=Cg();i.isReady().then(function(){Wr().then(function(){var r=i.currentRoute;uE(),!Eb(r.value)&&Tb(r.value)}),i.afterEach(function(r,s){Wr().then(function(){Eb(r)||(Ne(t)&&t(r,s),Tb(r,s),Ne(n)&&n(r,s))})})})},OK=function(){var e=Gn(),t=e.onReady,n=e.onError,i=e.globalObjectName,r=e.globalDataLayerName,s=e.config,o=e.customResourceURL,u=e.customPreconnectOrigin,a=e.deferScriptLoad,h=e.pageTrackerEnabled,c=e.disableScriptLoad,l=Boolean(h&&Cg());if(RK(),l?LK():uE(),!c)return gK("".concat(o,"?id=").concat(s.id,"&l=").concat(r),{preconnectOrigin:u,defer:a}).then(function(){t&&t(window[i])}).catch(function(d){return n&&n(d),d})},PK=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;IK(t),bK(n),SK(i),Gn().bootstrap&&OK()};const NK={install(e){e.use(PK,{config:{appName:window.ENV_VARS.BASE_URL,pageTrackerScreenviewEnabled:!0,id:window.ENV_VARS.GOOGLE_ANALYTICS_TRACKING_ID}},Or)}};var $l=function(t){window.__fathomClientQueue=window.__fathomClientQueue||[],window.__fathomClientQueue.push(t)},DK=function(){window.__fathomClientQueue=window.__fathomClientQueue||[],window.__fathomClientQueue.forEach(function(t){switch(t.type){case"trackPageview":hE(t.opts);return;case"trackGoal":dE(t.code,t.cents);return;case"enableTrackingForMe":HK();return;case"blockTrackingForMe":BK();return;case"setSite":UK(t.id);return}}),window.__fathomClientQueue=[]},Ab=function(t){var n=/(https?)(?=:|\/|$)/;t.forEach(function(i){n.exec(i)!==null&&console.warn("The include domain ".concat(i," might fail to work as intended as it begins with a transfer protocol (http://, https://). Consider removing the protocol portion of the string."))})},FK=function(t,n){var i=document.createElement("script"),r=document.getElementsByTagName("script")[0]||document.querySelector("body");i.id="fathom-script",i.async=!0,i.setAttribute("data-site",t),i.src=n&&n.url?n.url:"https://cdn.usefathom.com/script.js",n&&(n.auto!==void 0&&i.setAttribute("data-auto","".concat(n.auto)),n.honorDNT!==void 0&&i.setAttribute("data-honor-dnt","".concat(n.honorDNT)),n.canonical!==void 0&&i.setAttribute("data-canonical","".concat(n.canonical)),n.includedDomains&&(Ab(n.includedDomains),i.setAttribute("data-included-domains",n.includedDomains.join(","))),n.excludedDomains&&(Ab(n.excludedDomains),i.setAttribute("data-excluded-domains",n.excludedDomains.join(","))),n.spa&&i.setAttribute("data-spa",n.spa)),i.onload=DK,r.parentNode.insertBefore(i,r)},hE=function(t){window.fathom?t?window.fathom.trackPageview(t):window.fathom.trackPageview():$l({type:"trackPageview",opts:t})},dE=function(t,n){window.fathom?window.fathom.trackGoal(t,n):$l({type:"trackGoal",code:t,cents:n})},BK=function(){window.fathom?window.fathom.blockTrackingForMe():$l({type:"blockTrackingForMe"})},HK=function(){window.fathom?window.fathom.enableTrackingForMe():$l({type:"enableTrackingForMe"})},UK=function(t){window.fathom?window.fathom.setSite(t):$l({type:"setSite",id:t})};const zK={install(e){const t={};FK(window.ENV_VARS.FANTHOM_TRACKING_ID,{spa:"hash"}),t.trackPageview=hE,t.trackGoal=(n,i=0)=>dE(n,i),e.provide("$fathom",t)}},WK=e=>{window.ENV_VARS.ENABLE_ANALYTICS==="ENABLED"&&(e.use(NK),e.use(zK))},fE="html",pE="list-of-values",xg="plain-text-multi-row",Mg="plain-text-single-row",kg="password",VK=[fE,pE,xg,Mg,kg],gE="text",$g="decimal",Ig="integer",Rg="sequence-number",jK=[$g,Ig,Rg],mE="number",Lg="boolean",GK=[Lg],qK="boolean",Og="date",Pg="date-time",KK=[Og,Pg],vE="timestamp",yE="radio",_E="double-range-slider",bE="range",YK={[gE]:VK,[mE]:jK,[qK]:GK,[vE]:KK},XK=Object.values(YK).reduce((e,t)=>[...e,...t],[]),JK=[yE,_E,bE],QK={name:"FieldTypeInputErrors",props:{errors:{type:Array,required:!1,default:()=>[]}}},ZK={class:"input-errors"};function eY(e,t,n,i,r,s){return oe(),me("div",ZK,[(oe(!0),me(tt,null,ti(n.errors,o=>(oe(),me("p",{key:o},$e(o),1))),128))])}const tY=Re(QK,[["render",eY]]),nY={name:"FieldTypeInputHint",props:{hint:{type:String,required:!0}}},iY={class:"input-hint"};function rY(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",iY,[Ee(o,{name:"info"}),de("span",null,$e(n.hint),1)])}const sY=Re(nY,[["render",rY]]),na={props:{attributes:{type:Object,required:!1,default:()=>({})},parameters:{type:Object,required:!1,default:()=>({})},events:{type:Object,required:!1,default:()=>({})}},computed:{defaultAttributesValues(){throw new Error("default attributes values is not defined")},allowedAttributes(){throw new Error("Allowed attributes is not defined")},definitionType(){throw new Error("Text field type is not defined")},getAttributes(){const{validAttributes:e,invalidAttributes:t}=Object.entries(this.attributes).reduce((n,[i,r])=>(this.allowedAttributes.includes(i)?n.validAttributes[i]=r:n.invalidAttributes.push(i),n),{validAttributes:{},invalidAttributes:[]});return this.$debug&&t.includes("id")&&console.warn('"id" attribute should be added to allowedAttributes'),Object.entries(this.defaultAttributesValues).forEach(([n,i])=>{e[n]=e[n]??i}),["required","readonly","disabled"].filter(n=>this.allowedAttributes.includes(n)).forEach(n=>{e[n]=e[n]??!1}),this.$debug&&t.length&&console.warn(`Attributes "${t.join(", ")}" on ${this.definitionType} are invalid and will be ignored.`),e}}},oY={name:"BooleanDefinition",mixins:[na],props:{modelValue:{type:[String,Number,Boolean],default:null}},emits:["update:modelValue"],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","name","required"]},definitionType(){return Lg},getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},created(){this.correctValue()},methods:{correctValue(){typeof this.getValue!="boolean"&&(this.getValue=["1",1,"true"].includes(this.modelValue))}}};function aY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>s.getValue=o)},e.getAttributes,{type:"checkbox"},ii(e.events,!0)),null,16)),[[mp,s.getValue]])}const lY=Re(oY,[["render",aY]]),wE={mixins:[na],props:{modelValue:{type:String,default:null}},data(){return{native_type:vE}},computed:{getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e||null)}},showClearButton(){return this.parameters.clear_button&&this.getValue}}},cY={name:"DateTimeDefinition",mixins:[wE],computed:{defaultAttributesValues(){return{}},definitionType(){return Pg},allowedAttributes(){return["autocomplete","disabled","id","list","max","min","name","readonly","required","step"]}}};function uY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,{type:"datetime-local"},ii(e.events,!0)),null,16)),[[Bi,e.getValue]])}const hY=Re(cY,[["render",uY]]),dY={name:"DateDefinition",mixins:[wE],computed:{defaultAttributesValues(){return{}},definitionType(){return Og},allowedAttributes(){return["autocomplete","disabled","id","list","max","min","name","readonly","required","step"]}}};function fY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,{type:"date"},ii(e.events,!0)),null,16)),[[Bi,e.getValue]])}const pY=Re(dY,[["render",fY]]),Ng={mixins:[na],props:{modelValue:{type:[Number,String],default:null}},data(){return{native_type:mE}},computed:{getValue:{get(){return this.modelValue},set(e){if(!this.attributes.required&&[null,void 0,""].includes(e)){this.$emit("update:modelValue",null);return}const t=!!(this.attributes.min??!1)&&e<this.attributes.min,n=!!(this.attributes.max??!1)&&e>this.attributes.max;t?this.$emit("update:modelValue",this.attributes.min):n?this.$emit("update:modelValue",this.attributes.max):this.$emit("update:modelValue",e)}}}},gY={name:"DecimalDefinition",mixins:[Ng],computed:{defaultAttributesValues(){return{step:.1}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","list","max","min","name","placeholder","readonly","required","step"]},definitionType(){return $g}}};function mY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,{type:"number"},ii(e.events,!0)),null,16)),[[Bi,e.getValue,void 0,{number:!0}]])}const vY=Re(gY,[["render",mY]]);var SE={exports:{}};(function(e,t){(function(){var n="ace",i=function(){return this}();!i&&typeof window<"u"&&(i=window);var r=function(c,l,d){if(typeof c!="string"){r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=l),r.modules[c]||(r.payloads[c]=d,r.modules[c]=null)};r.modules={},r.payloads={};var s=function(c,l,d){if(typeof l=="string"){var f=a(c,l);if(f!=null)return d&&d(),f}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var p=[],g=0,m=l.length;g<m;++g){var v=a(c,l[g]);if(v==null&&o.original)return;p.push(v)}return d&&d.apply(null,p)||!0}},o=function(c,l){var d=s("",c,l);return d==null&&o.original?o.original.apply(this,arguments):d},u=function(c,l){if(l.indexOf("!")!==-1){var d=l.split("!");return u(c,d[0])+"!"+u(c,d[1])}if(l.charAt(0)=="."){var f=c.split("/").slice(0,-1).join("/");for(l=f+"/"+l;l.indexOf(".")!==-1&&p!=l;){var p=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},a=function(c,l){l=u(c,l);var d=r.modules[l];if(!d){if(d=r.payloads[l],typeof d=="function"){var f={},p={id:l,uri:"",exports:f,packaged:!0},g=function(v,y){return s(l,v,y)},m=d(g,f,p);f=m||p.exports,r.modules[l]=f,delete r.payloads[l]}d=r.modules[l]=f||d}return d};function h(c){var l=i;c&&(i[c]||(i[c]={}),l=i[c]),(!l.define||!l.define.packaged)&&(r.original=l.define,l.define=r,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(o.original=l.require,l.require=o,l.require.packaged=!0)}h(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,i,r){function s(o,u,a){Object.defineProperty(o,u,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||s(String.prototype,"startsWith",function(o,u){return u=u||0,this.lastIndexOf(o,u)===u}),String.prototype.endsWith||s(String.prototype,"endsWith",function(o,u){var a=this;(u===void 0||u>a.length)&&(u=a.length),u-=o.length;var h=a.indexOf(o,u);return h!==-1&&h===u}),String.prototype.repeat||s(String.prototype,"repeat",function(o){for(var u="",a=this;o>0;)o&1&&(u+=a),(o>>=1)&&(a+=a);return u}),String.prototype.includes||s(String.prototype,"includes",function(o,u){return this.indexOf(o,u)!=-1}),Object.assign||(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var u=Object(o),a=1;a<arguments.length;a++){var h=arguments[a];h!=null&&Object.keys(h).forEach(function(c){u[c]=h[c]})}return u}),Object.values||(Object.values=function(o){return Object.keys(o).map(function(u){return o[u]})}),Array.prototype.find||s(Array.prototype,"find",function(o){for(var u=this.length,a=arguments[1],h=0;h<u;h++){var c=this[h];if(o.call(a,c,h,this))return c}}),Array.prototype.findIndex||s(Array.prototype,"findIndex",function(o){for(var u=this.length,a=arguments[1],h=0;h<u;h++){var c=this[h];if(o.call(a,c,h,this))return h}}),Array.prototype.includes||s(Array.prototype,"includes",function(o,u){return this.indexOf(o,u)!=-1}),Array.prototype.fill||s(Array.prototype,"fill",function(o){for(var u=this,a=u.length>>>0,h=arguments[1],c=h>>0,l=c<0?Math.max(a+c,0):Math.min(c,a),d=arguments[2],f=d===void 0?a:d>>0,p=f<0?Math.max(a+f,0):Math.min(f,a);l<p;)u[l]=o,l++;return u}),Array.of||s(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,i,r){n("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(n,i,r){i.last=function(u){return u[u.length-1]},i.stringReverse=function(u){return u.split("").reverse().join("")},i.stringRepeat=function(u,a){for(var h="";a>0;)a&1&&(h+=u),(a>>=1)&&(u+=u);return h};var s=/^\s\s*/,o=/\s\s*$/;i.stringTrimLeft=function(u){return u.replace(s,"")},i.stringTrimRight=function(u){return u.replace(o,"")},i.copyObject=function(u){var a={};for(var h in u)a[h]=u[h];return a},i.copyArray=function(u){for(var a=[],h=0,c=u.length;h<c;h++)u[h]&&typeof u[h]=="object"?a[h]=this.copyObject(u[h]):a[h]=u[h];return a},i.deepCopy=function u(a){if(typeof a!="object"||!a)return a;var h;if(Array.isArray(a)){h=[];for(var c=0;c<a.length;c++)h[c]=u(a[c]);return h}if(Object.prototype.toString.call(a)!=="[object Object]")return a;h={};for(var c in a)h[c]=u(a[c]);return h},i.arrayToMap=function(u){for(var a={},h=0;h<u.length;h++)a[u[h]]=1;return a},i.createMap=function(u){var a=Object.create(null);for(var h in u)a[h]=u[h];return a},i.arrayRemove=function(u,a){for(var h=0;h<=u.length;h++)a===u[h]&&u.splice(h,1)},i.escapeRegExp=function(u){return u.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},i.escapeHTML=function(u){return(""+u).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},i.getMatchOffsets=function(u,a){var h=[];return u.replace(a,function(c){h.push({offset:arguments[arguments.length-2],length:c.length})}),h},i.deferredCall=function(u){var a=null,h=function(){a=null,u()},c=function(l){return c.cancel(),a=setTimeout(h,l||0),c};return c.schedule=c,c.call=function(){return this.cancel(),u(),c},c.cancel=function(){return clearTimeout(a),a=null,c},c.isPending=function(){return a},c},i.delayedCall=function(u,a){var h=null,c=function(){h=null,u()},l=function(d){h==null&&(h=setTimeout(c,d||a))};return l.delay=function(d){h&&clearTimeout(h),h=setTimeout(c,d||a)},l.schedule=l,l.call=function(){this.cancel(),u()},l.cancel=function(){h&&clearTimeout(h),h=null},l.isPending=function(){return h},l}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,i,r){i.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},i.getOS=function(){return i.isMac?i.OS.MAC:i.isLinux?i.OS.LINUX:i.OS.WINDOWS};var s=typeof navigator=="object"?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),u=s.userAgent||"",a=s.appName||"";i.isWin=o=="win",i.isMac=o=="mac",i.isLinux=o=="linux",i.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((u.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((u.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),i.isOldIE=i.isIE&&i.isIE<9,i.isGecko=i.isMozilla=u.match(/ Gecko\/\d+/),i.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",i.isWebKit=parseFloat(u.split("WebKit/")[1])||void 0,i.isChrome=parseFloat(u.split(" Chrome/")[1])||void 0,i.isEdge=parseFloat(u.split(" Edge/")[1])||void 0,i.isAIR=u.indexOf("AdobeAIR")>=0,i.isAndroid=u.indexOf("Android")>=0,i.isChromeOS=u.indexOf(" CrOS ")>=0,i.isIOS=/iPad|iPhone|iPod/.test(u)&&!window.MSStream,i.isIOS&&(i.isMac=!0),i.isMobile=i.isIOS||i.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,i,r){var s=n("./useragent"),o="http://www.w3.org/1999/xhtml";i.buildDom=function d(f,p,g){if(typeof f=="string"&&f){var m=document.createTextNode(f);return p&&p.appendChild(m),m}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var v=[],y=0;y<f.length;y++){var S=d(f[y],p,g);S&&v.push(S)}return v}var _=document.createElement(f[0]),w=f[1],b=1;w&&typeof w=="object"&&!Array.isArray(w)&&(b=2);for(var y=b;y<f.length;y++)d(f[y],_,g);return b==2&&Object.keys(w).forEach(function(C){var M=w[C];C==="class"?_.className=Array.isArray(M)?M.join(" "):M:typeof M=="function"||C=="value"||C[0]=="$"?_[C]=M:C==="ref"?g&&(g[M]=_):C==="style"?typeof M=="string"&&(_.style.cssText=M):M!=null&&_.setAttribute(C,M)}),p&&p.appendChild(_),_},i.getDocumentHead=function(d){return d||(d=document),d.head||d.getElementsByTagName("head")[0]||d.documentElement},i.createElement=function(d,f){return document.createElementNS?document.createElementNS(f||o,d):document.createElement(d)},i.removeChildren=function(d){d.innerHTML=""},i.createTextNode=function(d,f){var p=f?f.ownerDocument:document;return p.createTextNode(d)},i.createFragment=function(d){var f=d?d.ownerDocument:document;return f.createDocumentFragment()},i.hasCssClass=function(d,f){var p=(d.className+"").split(/\s+/g);return p.indexOf(f)!==-1},i.addCssClass=function(d,f){i.hasCssClass(d,f)||(d.className+=" "+f)},i.removeCssClass=function(d,f){for(var p=d.className.split(/\s+/g);;){var g=p.indexOf(f);if(g==-1)break;p.splice(g,1)}d.className=p.join(" ")},i.toggleCssClass=function(d,f){for(var p=d.className.split(/\s+/g),g=!0;;){var m=p.indexOf(f);if(m==-1)break;g=!1,p.splice(m,1)}return g&&p.push(f),d.className=p.join(" "),g},i.setCssClass=function(d,f,p){p?i.addCssClass(d,f):i.removeCssClass(d,f)},i.hasCssString=function(d,f){var p=0,g;if(f=f||document,g=f.querySelectorAll("style")){for(;p<g.length;)if(g[p++].id===d)return!0}},i.removeElementById=function(d,f){f=f||document,f.getElementById(d)&&f.getElementById(d).remove()};var u,a=[];i.useStrictCSP=function(d){u=d,d==!1?h():a||(a=[])};function h(){var d=a;a=null,d&&d.forEach(function(f){c(f[0],f[1])})}function c(d,f,p){if(!(typeof document>"u")){if(a){if(p)h();else if(p===!1)return a.push([d,f])}if(!u){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var m=g.ownerDocument||g;if(f&&i.hasCssString(f,g))return null;f&&(d+=`
/*# sourceURL=ace/css/`+f+" */");var v=i.createElement("style");v.appendChild(m.createTextNode(d)),f&&(v.id=f),g==m&&(g=i.getDocumentHead(m)),g.insertBefore(v,g.firstChild)}}}if(i.importCssString=c,i.importCssStylsheet=function(d,f){i.buildDom(["link",{rel:"stylesheet",href:d}],i.getDocumentHead(f))},i.scrollbarWidth=function(d){var f=i.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=i.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(f);var m=d&&d.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(p);var v=f.offsetWidth;g.overflow="scroll";var y=f.offsetWidth;return v===y&&(y=p.clientWidth),m.removeChild(p),v-y},i.computedStyle=function(d,f){return window.getComputedStyle(d,"")||{}},i.setStyle=function(d,f,p){d[f]!==p&&(d[f]=p)},i.HAS_CSS_ANIMATION=!1,i.HAS_CSS_TRANSFORMS=!1,i.HI_DPI=s.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,s.isChromeOS&&(i.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");i.HI_DPI&&l.style.transform!==void 0&&(i.HAS_CSS_TRANSFORMS=!0),!s.isEdge&&typeof l.style.animationName<"u"&&(i.HAS_CSS_ANIMATION=!0),l=null}i.HAS_CSS_TRANSFORMS?i.translate=function(d,f,p){d.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:i.translate=function(d,f,p){d.style.top=Math.round(p)+"px",d.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,i,r){/*
* based on code from:
*
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/var s=n("./dom");i.get=function(o,u){var a=new XMLHttpRequest;a.open("GET",o,!0),a.onreadystatechange=function(){a.readyState===4&&u(a.responseText)},a.send(null)},i.loadScript=function(o,u){var a=s.getDocumentHead(),h=document.createElement("script");h.src=o,a.appendChild(h),h.onload=h.onreadystatechange=function(c,l){(l||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,l||u())}},i.qualifyURL=function(o){var u=document.createElement("a");return u.href=o,u.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,i,r){i.inherits=function(s,o){s.super_=o,s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(s,o){for(var u in o)s[u]=o[u];return s},i.implement=function(s,o){i.mixin(s,o)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,i,r){var s={},o=function(){this.propagationStopped=!0},u=function(){this.defaultPrevented=!0};s._emit=s._dispatchEvent=function(a,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],l=this._defaultHandlers[a];if(!(!c.length&&!l)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=a),h.stopPropagation||(h.stopPropagation=o),h.preventDefault||(h.preventDefault=u),c=c.slice();for(var d=0;d<c.length&&(c[d](h,this),!h.propagationStopped);d++);if(l&&!h.defaultPrevented)return l(h,this)}},s._signal=function(a,h){var c=(this._eventRegistry||{})[a];if(!!c){c=c.slice();for(var l=0;l<c.length;l++)c[l](h,this)}},s.once=function(a,h){var c=this;if(this.on(a,function l(){c.off(a,l),h.apply(null,arguments)}),!h)return new Promise(function(l){h=l})},s.setDefaultHandler=function(a,h){var c=this._defaultHandlers;if(c||(c=this._defaultHandlers={_disabled_:{}}),c[a]){var l=c[a],d=c._disabled_[a];d||(c._disabled_[a]=d=[]),d.push(l);var f=d.indexOf(h);f!=-1&&d.splice(f,1)}c[a]=h},s.removeDefaultHandler=function(a,h){var c=this._defaultHandlers;if(!!c){var l=c._disabled_[a];if(c[a]==h)l&&this.setDefaultHandler(a,l.pop());else if(l){var d=l.indexOf(h);d!=-1&&l.splice(d,1)}}},s.on=s.addEventListener=function(a,h,c){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[a];return l||(l=this._eventRegistry[a]=[]),l.indexOf(h)==-1&&l[c?"unshift":"push"](h),h},s.off=s.removeListener=s.removeEventListener=function(a,h){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!!c){var l=c.indexOf(h);l!==-1&&c.splice(l,1)}},s.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},i.EventEmitter=s}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,i,r){var s=n("./oop"),o=n("./event_emitter").EventEmitter,u={setOptions:function(d){Object.keys(d).forEach(function(f){this.setOption(f,d[f])},this)},getOptions:function(d){var f={};if(d)Array.isArray(d)||(f=d,d=Object.keys(f));else{var p=this.$options;d=Object.keys(p).filter(function(g){return!p[g].hidden})}return d.forEach(function(g){f[g]=this.getOption(g)},this),f},setOption:function(d,f){if(this["$"+d]!==f){var p=this.$options[d];if(!p)return a('misspelled option "'+d+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(d,f);p.handlesSet||(this["$"+d]=f),p&&p.set&&p.set.call(this,f)}},getOption:function(d){var f=this.$options[d];return f?f.forwardTo?this[f.forwardTo]&&this[f.forwardTo].getOption(d):f&&f.get?f.get.call(this):this["$"+d]:a('misspelled option "'+d+'"')}};function a(d){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}function h(d,f){var p=new Error(d);p.data=f,typeof console=="object"&&console.error&&console.error(p),setTimeout(function(){throw p})}var c,l=function(){function d(){this.$defaultOptions={}}return d.prototype.defineOptions=function(f,p,g){return f.$options||(this.$defaultOptions[p]=f.$options={}),Object.keys(g).forEach(function(m){var v=g[m];typeof v=="string"&&(v={forwardTo:v}),v.name||(v.name=m),f.$options[v.name]=v,"initialValue"in v&&(f["$"+v.name]=v.initialValue)}),s.implement(f,u),this},d.prototype.resetOptions=function(f){Object.keys(f.$options).forEach(function(p){var g=f.$options[p];"value"in g&&f.setOption(p,g.value)})},d.prototype.setDefaultValue=function(f,p,g){if(!f){for(f in this.$defaultOptions)if(this.$defaultOptions[f][p])break;if(!this.$defaultOptions[f][p])return!1}var m=this.$defaultOptions[f]||(this.$defaultOptions[f]={});m[p]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,p,g):m[p].value=g)},d.prototype.setDefaultValues=function(f,p){Object.keys(p).forEach(function(g){this.setDefaultValue(f,g,p[g])},this)},d.prototype.setMessages=function(f){c=f},d.prototype.nls=function(f,p){var g=c&&c[f]||f;return p&&(g=g.replace(/\$(\$|[\d]+)/g,function(m,v){return v=="$"?"$":p[v]})),g},d}();l.prototype.warn=a,l.prototype.reportError=h,s.implement(l.prototype,o),i.AppConfig=l}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(n,i,r){r.exports=`.ace-tm .ace_gutter {
  background: #f0f0f0;
  color: #333;
}

.ace-tm .ace_print-margin {
  width: 1px;
  background: #e8e8e8;
}

.ace-tm .ace_fold {
    background-color: #6B72E6;
}

.ace-tm {
  background-color: #FFFFFF;
  color: black;
}

.ace-tm .ace_cursor {
  color: black;
}
        
.ace-tm .ace_invisible {
  color: rgb(191, 191, 191);
}

.ace-tm .ace_storage,
.ace-tm .ace_keyword {
  color: blue;
}

.ace-tm .ace_constant {
  color: rgb(197, 6, 11);
}

.ace-tm .ace_constant.ace_buildin {
  color: rgb(88, 72, 246);
}

.ace-tm .ace_constant.ace_language {
  color: rgb(88, 92, 246);
}

.ace-tm .ace_constant.ace_library {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_invalid {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.ace-tm .ace_support.ace_function {
  color: rgb(60, 76, 114);
}

.ace-tm .ace_support.ace_constant {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
  color: rgb(109, 121, 222);
}

.ace-tm .ace_keyword.ace_operator {
  color: rgb(104, 118, 135);
}

.ace-tm .ace_string {
  color: rgb(3, 106, 7);
}

.ace-tm .ace_comment {
  color: rgb(76, 136, 107);
}

.ace-tm .ace_comment.ace_doc {
  color: rgb(0, 102, 255);
}

.ace-tm .ace_comment.ace_doc.ace_tag {
  color: rgb(128, 159, 191);
}

.ace-tm .ace_constant.ace_numeric {
  color: rgb(0, 0, 205);
}

.ace-tm .ace_variable {
  color: rgb(49, 132, 149);
}

.ace-tm .ace_xml-pe {
  color: rgb(104, 104, 91);
}

.ace-tm .ace_entity.ace_name.ace_function {
  color: #0000A2;
}


.ace-tm .ace_heading {
  color: rgb(12, 7, 255);
}

.ace-tm .ace_list {
  color:rgb(185, 6, 144);
}

.ace-tm .ace_meta.ace_tag {
  color:rgb(0, 22, 142);
}

.ace-tm .ace_string.ace_regex {
  color: rgb(255, 0, 0)
}

.ace-tm .ace_marker-layer .ace_selection {
  background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
  background: rgb(252, 255, 0);
}

.ace-tm .ace_marker-layer .ace_stack {
  background: rgb(164, 229, 101);
}

.ace-tm .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgb(192, 192, 192);
}

.ace-tm .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-tm .ace_gutter-active-line {
    background-color : #dcdcdc;
}

.ace-tm .ace_marker-layer .ace_selected-word {
  background: rgb(250, 250, 255);
  border: 1px solid rgb(200, 200, 250);
}

.ace-tm .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

.ace-tm .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(n,i,r){i.isDark=!1,i.cssClass="ace-tm",i.cssText=n("./textmate.css"),i.$id="ace/theme/textmate";var s=n("../lib/dom");s.importCssString(i.cssText,i.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,i,r){var s=n("./lib/lang"),o=n("./lib/net"),u=n("./lib/dom"),a=n("./lib/app_config").AppConfig;r.exports=i=new a;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};i.get=function(d){if(!h.hasOwnProperty(d))throw new Error("Unknown config key: "+d);return h[d]},i.set=function(d,f){if(h.hasOwnProperty(d))h[d]=f;else if(this.setDefaultValue("",d,f)==!1)throw new Error("Unknown config key: "+d);d=="useStrictCSP"&&u.useStrictCSP(f)},i.all=function(){return s.copyObject(h)},i.$modes={},i.moduleUrl=function(d,f){if(h.$moduleUrls[d])return h.$moduleUrls[d];var p=d.split("/");f=f||p[p.length-2]||"";var g=f=="snippets"?"/":"-",m=p[p.length-1];if(f=="worker"&&g=="-"){var v=new RegExp("^"+f+"[\\-_]|[\\-_]"+f+"$","g");m=m.replace(v,"")}(!m||m==f)&&p.length>1&&(m=p[p.length-2]);var y=h[f+"Path"];return y==null?y=h.basePath:g=="/"&&(f=g=""),y&&y.slice(-1)!="/"&&(y+="/"),y+f+g+m+this.get("suffix")},i.setModuleUrl=function(d,f){return h.$moduleUrls[d]=f};var c=function(d,f){return d==="ace/theme/textmate"||d==="./theme/textmate"?f(null,n("./theme/textmate")):console.error("loader is not configured")};i.setLoader=function(d){c=d},i.dynamicModules=Object.create(null),i.$loading={},i.loadModule=function(d,f){var p,g;Array.isArray(d)&&(g=d[0],d=d[1]);var m=function(v){if(v&&!i.$loading[d])return f&&f(v);if(i.$loading[d]||(i.$loading[d]=[]),i.$loading[d].push(f),!(i.$loading[d].length>1)){var y=function(){c(d,function(S,_){i._emit("load.module",{name:d,module:_});var w=i.$loading[d];i.$loading[d]=null,w.forEach(function(b){b&&b(_)})})};if(!i.get("packaged"))return y();o.loadScript(i.moduleUrl(d,g),y),l()}};if(i.dynamicModules[d])i.dynamicModules[d]().then(function(v){v.default?m(v.default):m(v)});else{try{p=n(d)}catch{}m(p)}},i.setModuleLoader=function(d,f){i.dynamicModules[d]=f};var l=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$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"),l=function(){})};i.version="1.22.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,i,r){n("./lib/fixoldbrowsers");var s=n("./config");s.setLoader(function(h,c){n([h],function(l){c(null,l)})});var o=function(){return this||typeof window<"u"&&window}();r.exports=function(h){s.init=u,h.require=n},u(!0);function u(h){if(!(!o||!o.document)){s.set("packaged",h||n.packaged||r.packaged||o.define&&(void 0).packaged);var c={},l="",d=document.currentScript||document._currentScript,f=d&&d.ownerDocument||document;d&&d.src&&(l=d.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),g=0;g<p.length;g++){var m=p[g],v=m.src||m.getAttribute("src");if(!!v){for(var y=m.attributes,S=0,_=y.length;S<_;S++){var w=y[S];w.name.indexOf("data-ace-")===0&&(c[a(w.name.replace(/^data-ace-/,""))]=w.value)}var b=v.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(l=b[1])}}l&&(c.base=c.base||l,c.packaged=!0),c.basePath=c.base,c.workerPath=c.workerPath||c.base,c.modePath=c.modePath||c.base,c.themePath=c.themePath||c.base,delete c.base;for(var C in c)typeof c[C]<"u"&&s.set(C,c[C])}}function a(h){return h.replace(/-(.)/g,function(c,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,i,r){var s=function(u,a){return u.row-a.row||u.column-a.column},o=function(){function u(a,h,c,l){this.start={row:a,column:h},this.end={row:c,column:l}}return u.prototype.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},u.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},u.prototype.contains=function(a,h){return this.compare(a,h)==0},u.prototype.compareRange=function(a){var h,c=a.end,l=a.start;return h=this.compare(c.row,c.column),h==1?(h=this.compare(l.row,l.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(l.row,l.column),h==-1?-1:h==1?42:0)},u.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},u.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},u.prototype.intersects=function(a){var h=this.compareRange(a);return h==-1||h==0||h==1},u.prototype.isEnd=function(a,h){return this.end.row==a&&this.end.column==h},u.prototype.isStart=function(a,h){return this.start.row==a&&this.start.column==h},u.prototype.setStart=function(a,h){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=h)},u.prototype.setEnd=function(a,h){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=h)},u.prototype.inside=function(a,h){return this.compare(a,h)==0?!(this.isEnd(a,h)||this.isStart(a,h)):!1},u.prototype.insideStart=function(a,h){return this.compare(a,h)==0?!this.isEnd(a,h):!1},u.prototype.insideEnd=function(a,h){return this.compare(a,h)==0?!this.isStart(a,h):!1},u.prototype.compare=function(a,h){return!this.isMultiLine()&&a===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:a<this.start.row?-1:a>this.end.row?1:this.start.row===a?h>=this.start.column?0:-1:this.end.row===a?h<=this.end.column?0:1:0},u.prototype.compareStart=function(a,h){return this.start.row==a&&this.start.column==h?-1:this.compare(a,h)},u.prototype.compareEnd=function(a,h){return this.end.row==a&&this.end.column==h?1:this.compare(a,h)},u.prototype.compareInside=function(a,h){return this.end.row==a&&this.end.column==h?1:this.start.row==a&&this.start.column==h?-1:this.compare(a,h)},u.prototype.clipRows=function(a,h){if(this.end.row>h)var c={row:h+1,column:0};else if(this.end.row<a)var c={row:a,column:0};if(this.start.row>h)var l={row:h+1,column:0};else if(this.start.row<a)var l={row:a,column:0};return u.fromPoints(l||this.start,c||this.end)},u.prototype.extend=function(a,h){var c=this.compare(a,h);if(c==0)return this;if(c==-1)var l={row:a,column:h};else var d={row:a,column:h};return u.fromPoints(l||this.start,d||this.end)},u.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},u.prototype.isMultiLine=function(){return this.start.row!==this.end.row},u.prototype.clone=function(){return u.fromPoints(this.start,this.end)},u.prototype.collapseRows=function(){return this.end.column==0?new u(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new u(this.start.row,0,this.end.row,0)},u.prototype.toScreenRange=function(a){var h=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new u(h.row,h.column,c.row,c.column)},u.prototype.moveBy=function(a,h){this.start.row+=a,this.start.column+=h,this.end.row+=a,this.end.column+=h},u}();o.fromPoints=function(u,a){return new o(u.row,u.column,a.row,a.column)},o.comparePoints=s,o.comparePoints=function(u,a){return u.row-a.row||u.column-a.column},i.Range=o}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,i,r){/*! @license
	==========================================================================
	SproutCore -- JavaScript Application Framework
	copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.

	Permission is hereby granted, free of charge, to any person obtaining a
	copy of this software and associated documentation files (the "Software"),
	to deal in the Software without restriction, including without limitation
	the rights to use, copy, modify, merge, publish, distribute, sublicense,
	and/or sell copies of the Software, and to permit persons to whom the
	Software is furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
	FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
	DEALINGS IN THE SOFTWARE.

	SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.

	For more information about SproutCore, visit http://www.sproutcore.com


	==========================================================================
	@license */var s=n("./oop"),o=function(){var u={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:"*"}};u.PRINTABLE_KEYS[173]="-";var a,h;for(h in u.FUNCTION_KEYS)a=u.FUNCTION_KEYS[h].toLowerCase(),u[a]=parseInt(h,10);for(h in u.PRINTABLE_KEYS)a=u.PRINTABLE_KEYS[h].toLowerCase(),u[a]=parseInt(h,10);return s.mixin(u,u.MODIFIER_KEYS),s.mixin(u,u.PRINTABLE_KEYS),s.mixin(u,u.FUNCTION_KEYS),u.enter=u.return,u.escape=u.esc,u.del=u.delete,function(){for(var c=["cmd","ctrl","alt","shift"],l=Math.pow(2,c.length);l--;)u.KEY_MODS[l]=c.filter(function(d){return l&u.KEY_MODS[d]}).join("-")+"-"}(),u.KEY_MODS[0]="",u.KEY_MODS[-1]="input-",u}();s.mixin(i,o),i.keyCodeToString=function(u){var a=o[u];return typeof a!="string"&&(a=String.fromCharCode(u)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,i,r){var s=n("./keys"),o=n("./useragent"),u=null,a=0,h;function c(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){h={passive:!1}}})}catch{}}function l(){return h==null&&c(),h}function d(S,_,w){this.elem=S,this.type=_,this.callback=w}d.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var f=i.addListener=function(S,_,w,b){S.addEventListener(_,w,l()),b&&b.$toDestroy.push(new d(S,_,w))},p=i.removeListener=function(S,_,w){S.removeEventListener(_,w,l())};i.stopEvent=function(S){return i.stopPropagation(S),i.preventDefault(S),!1},i.stopPropagation=function(S){S.stopPropagation&&S.stopPropagation()},i.preventDefault=function(S){S.preventDefault&&S.preventDefault()},i.getButton=function(S){return S.type=="dblclick"?0:S.type=="contextmenu"||o.isMac&&S.ctrlKey&&!S.altKey&&!S.shiftKey?2:S.button},i.capture=function(S,_,w){var b=S&&S.ownerDocument||document;function C(M){_&&_(M),w&&w(M),p(b,"mousemove",_),p(b,"mouseup",C),p(b,"dragstart",C)}return f(b,"mousemove",_),f(b,"mouseup",C),f(b,"dragstart",C),C},i.addMouseWheelListener=function(S,_,w){f(S,"wheel",function(b){var C=.15,M=b.deltaX||0,R=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=M*C,b.wheelY=R*C;break;case b.DOM_DELTA_LINE:var T=15;b.wheelX=M*T,b.wheelY=R*T;break;case b.DOM_DELTA_PAGE:var A=150;b.wheelX=M*A,b.wheelY=R*A;break}_(b)},w)},i.addMultiMouseDownListener=function(S,_,w,b,C){var M=0,R,T,A,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function I(E){if(i.getButton(E)!==0?M=0:E.detail>1?(M++,M>4&&(M=1)):M=1,o.isIE){var L=Math.abs(E.clientX-R)>5||Math.abs(E.clientY-T)>5;(!A||L)&&(M=1),A&&clearTimeout(A),A=setTimeout(function(){A=null},_[M-1]||600),M==1&&(R=E.clientX,T=E.clientY)}if(E._clicks=M,w[b]("mousedown",E),M>4)M=0;else if(M>1)return w[b](P[M],E)}Array.isArray(S)||(S=[S]),S.forEach(function(E){f(E,"mousedown",I,C)})};var g=function(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)};i.getModifierString=function(S){return s.KEY_MODS[g(S)]};function m(S,_,w){var b=g(_);if(!o.isMac&&u){if(_.getModifierState&&(_.getModifierState("OS")||_.getModifierState("Win"))&&(b|=8),u.altGr)if((3&b)!=3)u.altGr=0;else return;if(w===18||w===17){var C="location"in _?_.location:_.keyLocation;if(w===17&&C===1)u[w]==1&&(a=_.timeStamp);else if(w===18&&b===3&&C===2){var M=_.timeStamp-a;M<50&&(u.altGr=!0)}}}if(w in s.MODIFIER_KEYS&&(w=-1),!b&&w===13){var C="location"in _?_.location:_.keyLocation;if(C===3&&(S(_,b,-w),_.defaultPrevented))return}if(o.isChromeOS&&b&8){if(S(_,b,w),_.defaultPrevented)return;b&=-9}return!b&&!(w in s.FUNCTION_KEYS)&&!(w in s.PRINTABLE_KEYS)?!1:S(_,b,w)}i.addCommandKeyListener=function(S,_,w){if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var b=null;f(S,"keydown",function(M){b=M.keyCode},w),f(S,"keypress",function(M){return m(_,M,b)},w)}else{var C=null;f(S,"keydown",function(M){u[M.keyCode]=(u[M.keyCode]||0)+1;var R=m(_,M,M.keyCode);return C=M.defaultPrevented,R},w),f(S,"keypress",function(M){C&&(M.ctrlKey||M.altKey||M.shiftKey||M.metaKey)&&(i.stopEvent(M),C=null)},w),f(S,"keyup",function(M){u[M.keyCode]=null},w),u||(v(),f(window,"focus",v))}};function v(){u=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!o.isOldIE){var y=1;i.nextTick=function(S,_){_=_||window;var w="zero-timeout-message-"+y++,b=function(C){C.data==w&&(i.stopPropagation(C),p(_,"message",b),S())};f(_,"message",b),_.postMessage(w,"*")}}i.$idleBlocked=!1,i.onIdle=function(S,_){return setTimeout(function w(){i.$idleBlocked?setTimeout(w,100):S()},_)},i.$idleBlockId=null,i.blockIdle=function(S){i.$idleBlockId&&clearTimeout(i.$idleBlockId),i.$idleBlocked=!0,i.$idleBlockId=setTimeout(function(){i.$idleBlocked=!1},S||100)},i.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),i.nextFrame?i.nextFrame=i.nextFrame.bind(window):i.nextFrame=function(S){setTimeout(S,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,i,r){var s;r.exports={lineMode:!1,pasteCancelled:function(){return s&&s>Date.now()-50?!0:s=!1},cancel:function(){s=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,i,r){var s=n("../lib/event"),o=n("../config").nls,u=n("../lib/useragent"),a=n("../lib/dom"),h=n("../lib/lang"),c=n("../clipboard"),l=u.isChrome<18,d=u.isIE,f=u.isChrome>63,p=400,g=n("../lib/keys"),m=g.KEY_MODS,v=u.isIOS,y=v?/\s/:/\n/,S=u.isMobile,_=function(w,b){var C=a.createElement("textarea");C.className="ace_text-input",C.setAttribute("wrap","off"),C.setAttribute("autocorrect","off"),C.setAttribute("autocapitalize","off"),C.setAttribute("spellcheck",!1),C.style.opacity="0",w.insertBefore(C,w.firstChild);var M=!1,R=!1,T=!1,A=!1,P="";S||(C.style.fontSize="1px");var I=!1,E=!1,L="",O=0,B=0,U=0;try{var z=document.activeElement===C}catch{}this.setAriaOptions=function(Z){Z.activeDescendant?(C.setAttribute("aria-haspopup","true"),C.setAttribute("aria-autocomplete",Z.inline?"both":"list"),C.setAttribute("aria-activedescendant",Z.activeDescendant)):(C.setAttribute("aria-haspopup","false"),C.setAttribute("aria-autocomplete","both"),C.removeAttribute("aria-activedescendant")),Z.role&&C.setAttribute("role",Z.role)},this.setAriaLabel=function(){if(b.session&&b.renderer.enableKeyboardAccessibility){var Z=b.session.selection.cursor.row;C.setAttribute("aria-roledescription",o("editor")),C.setAttribute("aria-label",o("Cursor at row $0",[Z+1]))}else C.removeAttribute("aria-roledescription"),C.removeAttribute("aria-label")},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),s.addListener(C,"blur",function(Z){E||(b.onBlur(Z),z=!1,S&&!v&&document.removeEventListener("selectionchange",G))},b),s.addListener(C,"focus",function(Z){if(!E){if(z=!0,u.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(Z),u.isEdge?setTimeout(j):j(),S&&!v&&document.addEventListener("selectionchange",G)}},b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),P||f||this.$focusScroll=="browser")return C.focus({preventScroll:!0});var Z=C.style.top;C.style.position="fixed",C.style.top="0px";try{var ae=C.getBoundingClientRect().top!=0}catch{return}var K=[];if(ae)for(var se=C.parentElement;se&&se.nodeType==1;)K.push(se),se.setAttribute("ace_nocontext",!0),!se.parentElement&&se.getRootNode?se=se.getRootNode().host:se=se.parentElement;C.focus({preventScroll:!0}),ae&&K.forEach(function(be){be.removeAttribute("ace_nocontext")}),setTimeout(function(){C.style.position="",C.style.top=="0px"&&(C.style.top=Z)},0)},this.blur=function(){C.blur()},this.isFocused=function(){return z},b.on("beforeEndOperation",function(){var Z=b.curOp,ae=Z&&Z.command&&Z.command.name;if(ae!="insertstring"){var K=ae&&(Z.docChanged||Z.selectionChanged);T&&K&&(L=C.value="",W()),j()}});var j=v?function(Z){if(!(!z||M&&!Z||A)){Z||(Z="");var ae=`
 ab`+Z+`cde fg
`;ae!=C.value&&(C.value=L=ae);var K=4,se=4+(Z.length||(b.selection.isEmpty()?0:1));(O!=K||B!=se)&&C.setSelectionRange(K,se),O=K,B=se}}:function(){if(!(T||A)&&!(!z&&!ie)){T=!0;var Z=0,ae=0,K="";if(b.session){var se=b.selection,be=se.getRange(),_e=se.cursor.row;if(Z=be.start.column,ae=be.end.column,K=b.session.getLine(_e),be.start.row!=_e){var Oe=b.session.getLine(_e-1);Z=be.start.row<_e-1?0:Z,ae+=Oe.length+1,K=Oe+`
`+K}else if(be.end.row!=_e){var qe=b.session.getLine(_e+1);ae=be.end.row>_e+1?qe.length:ae,ae+=K.length+1,K=K+`
`+qe}else S&&_e>0&&(K=`
`+K,ae+=1,Z+=1);K.length>p&&(Z<p&&ae<p?K=K.slice(0,p):(K=`
`,Z==ae?Z=ae=0:(Z=0,ae=1)))}var Fe=K+`

`;if(Fe!=L&&(C.value=L=Fe,O=B=Fe.length),ie&&(O=C.selectionStart,B=C.selectionEnd),B!=ae||O!=Z||C.selectionEnd!=B)try{C.setSelectionRange(Z,ae),O=Z,B=ae}catch{}T=!1}};this.resetSelection=j,z&&b.onFocus();var q=function(Z){return Z.selectionStart===0&&Z.selectionEnd>=L.length&&Z.value===L&&L&&Z.selectionEnd!==B},ne=function(Z){T||(M?M=!1:q(C)?(b.selectAll(),j()):S&&C.selectionStart!=O&&j())};function G(Z){if((!C||!C.parentNode)&&document.removeEventListener("selectionchange",G),!T&&C.selectionStart===C.selectionEnd){var ae=C.selectionStart-O,K=B-O;ae>0?ae=Math.max(ae-K,1):ae===0&&K&&(ae=-1);for(var se=Math.abs(ae),be=ae>0?g.right:g.left,_e=0;_e<se;_e++)b.onCommandKey({},0,be)}}var X=null;this.setInputHandler=function(Z){X=Z},this.getInputHandler=function(){return X};var ie=!1,le=function(Z,ae){if(ie&&(ie=!1),R)return j(),Z&&b.onPaste(Z),R=!1,"";for(var K=C.selectionStart,se=C.selectionEnd,be=O,_e=L.length-B,Oe=Z,qe=Z.length-K,Fe=Z.length-se,je=0;be>0&&L[je]==Z[je];)je++,be--;for(Oe=Oe.slice(je),je=1;_e>0&&L.length-je>O-1&&L[L.length-je]==Z[Z.length-je];)je++,_e--;qe-=je-1,Fe-=je-1;var mt=Oe.length-je+1;if(mt<0&&(be=-mt,mt=0),Oe=Oe.slice(0,mt),!ae&&!Oe&&!qe&&!be&&!_e&&!Fe)return"";A=!0;var qn=!1;return u.isAndroid&&Oe==". "&&(Oe="  ",qn=!0),Oe&&!be&&!_e&&!qe&&!Fe||I?b.onTextInput(Oe):b.onTextInput(Oe,{extendLeft:be,extendRight:_e,restoreStart:qe,restoreEnd:Fe}),A=!1,L=Z,O=K,B=se,U=Fe,qn?`
`:Oe},Y=function(Z){if(T)return N();if(Z&&Z.inputType){if(Z.inputType=="historyUndo")return b.execCommand("undo");if(Z.inputType=="historyRedo")return b.execCommand("redo")}var ae=C.value,K=le(ae,!0);(ae.length>p+100||y.test(K)||S&&O<1&&O==B)&&j()},J=function(Z,ae,K){var se=Z.clipboardData||window.clipboardData;if(!(!se||l)){var be=d||K?"Text":"text/plain";try{return ae?se.setData(be,ae)!==!1:se.getData(be)}catch(_e){if(!K)return J(_e,ae,!0)}}},te=function(Z,ae){var K=b.getCopyText();if(!K)return s.preventDefault(Z);J(Z,K)?(v&&(j(K),M=K,setTimeout(function(){M=!1},10)),ae?b.onCut():b.onCopy(),s.preventDefault(Z)):(M=!0,C.value=K,C.select(),setTimeout(function(){M=!1,j(),ae?b.onCut():b.onCopy()}))},ue=function(Z){te(Z,!0)},Se=function(Z){te(Z,!1)},Ce=function(Z){var ae=J(Z);c.pasteCancelled()||(typeof ae=="string"?(ae&&b.onPaste(ae,Z),u.isIE&&setTimeout(j),s.preventDefault(Z)):(C.value="",R=!0))};s.addCommandKeyListener(C,b.onCommandKey.bind(b),b),s.addListener(C,"select",ne,b),s.addListener(C,"input",Y,b),s.addListener(C,"cut",ue,b),s.addListener(C,"copy",Se,b),s.addListener(C,"paste",Ce,b),(!("oncut"in C)||!("oncopy"in C)||!("onpaste"in C))&&s.addListener(w,"keydown",function(Z){if(!(u.isMac&&!Z.metaKey||!Z.ctrlKey))switch(Z.keyCode){case 67:Se(Z);break;case 86:Ce(Z);break;case 88:ue(Z);break}},b);var F=function(Z){if(!(T||!b.onCompositionStart||b.$readOnly)&&(T={},!I)){Z.data&&(T.useTextareaForIME=!1),setTimeout(N,0),b._signal("compositionStart"),b.on("mousedown",ee);var ae=b.getSelectionRange();ae.end.row=ae.start.row,ae.end.column=ae.start.column,T.markerRange=ae,T.selectionStart=O,b.onCompositionStart(T),T.useTextareaForIME?(L=C.value="",O=0,B=0):(C.msGetInputContext&&(T.context=C.msGetInputContext()),C.getInputContext&&(T.context=C.getInputContext()))}},N=function(){if(!(!T||!b.onCompositionUpdate||b.$readOnly)){if(I)return ee();if(T.useTextareaForIME)b.onCompositionUpdate(C.value);else{var Z=C.value;le(Z),T.markerRange&&(T.context&&(T.markerRange.start.column=T.selectionStart=T.context.compositionStartOffset),T.markerRange.end.column=T.markerRange.start.column+B-T.selectionStart+U)}}},W=function(Z){!b.onCompositionEnd||b.$readOnly||(T=!1,b.onCompositionEnd(),b.off("mousedown",ee),Z&&Y())};function ee(){E=!0,C.blur(),C.focus(),E=!1}var re=h.delayedCall(N,50).schedule.bind(null,null);function ce(Z){Z.keyCode==27&&C.value.length<C.selectionStart&&(T||(L=C.value),O=B=-1,j()),re()}s.addListener(C,"compositionstart",F,b),s.addListener(C,"compositionupdate",N,b),s.addListener(C,"keyup",ce,b),s.addListener(C,"keydown",re,b),s.addListener(C,"compositionend",W,b),this.getElement=function(){return C},this.setCommandMode=function(Z){I=Z,C.readOnly=!1},this.setReadOnly=function(Z){I||(C.readOnly=Z)},this.setCopyWithEmptySelection=function(Z){},this.onContextMenu=function(Z){ie=!0,j(),b._emit("nativecontextmenu",{target:b,domEvent:Z}),this.moveToMouse(Z,!0)},this.moveToMouse=function(Z,ae){P||(P=C.style.cssText),C.style.cssText=(ae?"z-index:100000;":"")+(u.isIE?"opacity:0.1;":"")+"text-indent: -"+(O+B)*b.renderer.characterWidth*.5+"px;";var K=b.container.getBoundingClientRect(),se=a.computedStyle(b.container),be=K.top+(parseInt(se.borderTopWidth)||0),_e=K.left+(parseInt(K.borderLeftWidth)||0),Oe=K.bottom-be-C.clientHeight-2,qe=function(Fe){a.translate(C,Fe.clientX-_e-2,Math.min(Fe.clientY-be-2,Oe))};qe(Z),Z.type=="mousedown"&&(b.renderer.$isMousePressed=!0,clearTimeout(fe),u.isWin&&s.capture(b.container,qe,ye))},this.onContextMenuClose=ye;var fe;function ye(){clearTimeout(fe),fe=setTimeout(function(){P&&(C.style.cssText=P,P=""),b.renderer.$isMousePressed=!1,b.renderer.$keepTextAreaAtCursor&&b.renderer.$moveTextAreaToCursor()},0)}var ge=function(Z){b.textInput.onContextMenu(Z),ye()};s.addListener(C,"mouseup",ge,b),s.addListener(C,"mousedown",function(Z){Z.preventDefault(),ye()},b),s.addListener(b.renderer.scroller,"contextmenu",ge,b),s.addListener(C,"contextmenu",ge,b),v&&ve(w,b,C);function ve(Z,ae,K){var se=null,be=!1;K.addEventListener("keydown",function(Oe){se&&clearTimeout(se),be=!0},!0),K.addEventListener("keyup",function(Oe){se=setTimeout(function(){be=!1},100)},!0);var _e=function(Oe){if(document.activeElement===K&&!(be||T||ae.$mouseHandler.isMousePressed)&&!M){var qe=K.selectionStart,Fe=K.selectionEnd,je=null,mt=0;if(qe==0?je=g.up:qe==1?je=g.home:Fe>B&&L[Fe]==`
`?je=g.end:qe<O&&L[qe-1]==" "?(je=g.left,mt=m.option):qe<O||qe==O&&B!=O&&qe==Fe?je=g.left:Fe>B&&L.slice(0,Fe).split(`
`).length>2?je=g.down:Fe>B&&L[Fe-1]==" "?(je=g.right,mt=m.option):(Fe>B||Fe==B&&B!=O&&qe==Fe)&&(je=g.right),qe!==Fe&&(mt|=m.shift),je){var qn=ae.onCommandKey({},mt,je);if(!qn&&ae.commands){je=g.keyCodeToString(je);var Zr=ae.commands.findKeyCommand(mt,je);Zr&&ae.execCommand(Zr)}O=qe,B=Fe,j("")}}};document.addEventListener("selectionchange",_e),ae.on("destroy",function(){document.removeEventListener("selectionchange",_e)})}this.destroy=function(){C.parentElement&&C.parentElement.removeChild(C)}};i.TextInput=_,i.$setUserAgentForTests=function(w,b){S=w,v=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,i,r){var s=n("../lib/useragent"),o=0,u=550,a=function(){function l(d){d.$clickSelection=null;var f=d.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(d)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(d)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(d)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(d)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(d));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){d[g]=this[g]},this),d.selectByLines=this.extendSelectionBy.bind(d,"getLineRange"),d.selectByWords=this.extendSelectionBy.bind(d,"getWordRange")}return l.prototype.onMouseDown=function(d){var f=d.inSelection(),p=d.getDocumentPosition();this.mousedownEvent=d;var g=this.editor,m=d.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(p),m==2&&(g.textInput.onContextMenu(d.domEvent),s.isMozilla||d.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(d);return}return this.captureMouse(d),this.startSelect(p,d.domEvent._clicks>1),d.preventDefault()},l.prototype.startSelect=function(d,f){d=d||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(d):f||p.selection.moveToPosition(d),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var d,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)d=this.$clickSelection.end;else if(g==1)d=this.$clickSelection.start;else{var m=c(this.$clickSelection,p);p=m.cursor,d=m.anchor}f.selection.setSelectionAnchor(d.row,d.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(d){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),m=p.selection[d](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)f=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)f=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,f=m.start;else{var S=c(this.$clickSelection,g);g=S.cursor,f=S.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var d=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(d>o||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(d){var f=d.getDocumentPosition(),p=this.editor,g=p.session,m=g.getBracketRange(f);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},l.prototype.onTripleClick=function(d){var f=d.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},l.prototype.onQuadClick=function(d){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(d){if(!d.getAccelKey()){d.getShiftKey()&&d.wheelY&&!d.wheelX&&(d.wheelX=d.wheelY,d.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=d.domEvent.timeStamp,m=g-p.t,v=m?d.wheelX/m:p.vx,y=m?d.wheelY/m:p.vy;m<u&&(v=(v+p.vx)/2,y=(y+p.vy)/2);var S=Math.abs(v/y),_=!1;if(S>=1&&f.renderer.isScrollableBy(d.wheelX*d.speed,0)&&(_=!0),S<=1&&f.renderer.isScrollableBy(0,d.wheelY*d.speed)&&(_=!0),_)p.allowed=g;else if(g-p.allowed<u){var w=Math.abs(v)<=1.5*Math.abs(p.vx)&&Math.abs(y)<=1.5*Math.abs(p.vy);w?(_=!0,p.allowed=g):p.allowed=0}if(p.t=g,p.vx=v,p.vy=y,_)return f.renderer.scrollBy(d.wheelX*d.speed,d.wheelY*d.speed),d.stop()}},l}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,i.DefaultHandlers=a;function h(l,d,f,p){return Math.sqrt(Math.pow(f-l,2)+Math.pow(p-d,2))}function c(l,d){if(l.start.row==l.end.row)var f=2*d.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var f=d.column-4;else var f=2*d.row-l.start.row-l.end.row;return f<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(n,i,r){var s=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(v[S]=y[S])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),o=this&&this.__values||function(p){var g=typeof Symbol=="function"&&Symbol.iterator,m=g&&p[g],v=0;if(m)return m.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&v>=p.length&&(p=void 0),{value:p&&p[v++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},u=n("./lib/dom"),a=n("./range").Range,h="ace_tooltip",c=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=u.createElement("div"),this.$element.className=h,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,m){this.getElement().style.left=g+"px",this.getElement().style.top=m+"px"},p.prototype.setClassName=function(g){u.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=h+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,m,v){g!=null&&this.setText(g),m!=null&&v!=null&&this.setPosition(m,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=h,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),l=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var m=this.popups.indexOf(g);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,m,v,y;this.popups.sort(function(A,P){return P.priority-A.priority});var S=[];try{for(var _=o(this.popups),w=_.next();!w.done;w=_.next()){var b=w.value,C=!0;try{for(var M=(v=void 0,o(S)),R=M.next();!R.done;R=M.next()){var T=R.value;if(this.doPopupsOverlap(T,b)){C=!1;break}}}catch(A){v={error:A}}finally{try{R&&!R.done&&(y=M.return)&&y.call(M)}finally{if(v)throw v.error}}C?S.push(b):b.hide()}}catch(A){g={error:A}}finally{try{w&&!w.done&&(m=_.return)&&m.call(_)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,m){var v=g.getElement().getBoundingClientRect(),y=m.getElement().getBoundingClientRect();return v.left<y.right&&v.right>y.left&&v.top<y.bottom&&v.bottom>y.top},p}(),d=new l;i.popupManager=d,i.Tooltip=c;var f=function(p){s(g,p);function g(m){m===void 0&&(m=document.body);var v=p.call(this,m)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var y=v.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",v.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",function(){y.contains(document.activeElement)||this.hide()}.bind(v)),v}return g.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(m,v){this.lastEvent=m,this.lastT=Date.now();var y=v.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(m){var v=m.editor,y=m.getDocumentPosition(),S=v.session.getLine(y.row);if(y.column==S.length){var _=v.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),w=v.session.documentToScreenPosition(y.row,y.column);if(w.column!=_.column||w.row!=_.row)return!0}return!1},g.prototype.setDataProvider=function(m){this.$gatherData=m},g.prototype.showForRange=function(m,v,y,S){if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=m.renderer;this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.addMarker(v,m.session),this.range=a.fromPoints(v.start,v.end);var w=this.getElement();w.innerHTML="",w.appendChild(y),w.style.display="block";var b=_.textToScreenCoordinates(v.start.row,v.start.column),C=m.getCursorPosition(),M=w.clientHeight,R=_.scroller.getBoundingClientRect(),T=!0;this.row>C.row?T=!0:this.row<C.row&&(T=!1),b.pageY-M+_.lineHeight<R.top?T=!0:b.pageY+M>R.bottom&&(T=!1),T?b.pageY+=_.lineHeight:b.pageY-=M,w.style.maxWidth=R.width-(b.pageX-R.left)+"px",this.setPosition(b.pageX,b.pageY)}},g.prototype.addMarker=function(m,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(m,"ace_highlight-marker","text")},g.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,d.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||m.relatedTarget==this.getElement()||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},g}(c);i.HoverTooltip=f}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,i,r){var s=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),o=this&&this.__values||function(f){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&f[p],m=0;if(g)return g.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&m>=f.length&&(f=void 0),{value:f&&f[m++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},u=n("../lib/dom"),a=n("../lib/event"),h=n("../tooltip").Tooltip,c=n("../config").nls;function l(f){var p=f.editor,g=p.renderer.$gutterLayer,m=new d(p);f.editor.setDefaultHandler("guttermousedown",function(b){if(!(!p.isFocused()||b.getButton()!=0)){var C=g.getRegion(b);if(C!="foldWidgets"){var M=b.getDocumentPosition().row,R=p.session.selection;if(b.getShiftKey())R.selectTo(M,0);else{if(b.domEvent.detail==2)return p.selectAll(),b.preventDefault();f.$clickSelection=p.selection.getLineRange(M)}return f.setState("selectByLines"),f.captureMouse(b),b.preventDefault()}}});var v,y;function S(){var b=y.getDocumentPosition().row,C=p.session.getLength();if(b==C){var M=p.renderer.pixelToScreenCoordinates(0,y.y).row,R=y.$pos;if(M>p.session.documentToScreenRow(R.row,R.column))return _()}if(m.showTooltip(b),!!m.isOpen)if(p.on("mousewheel",_),f.$tooltipFollowsMouse)w(y);else{var T=g.$lines.cells[b].element.querySelector("[class*=ace_icon]"),A=T.getBoundingClientRect(),P=m.getElement().style;P.left=A.right+"px",P.top=A.bottom+"px"}}function _(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hide(),p._signal("hideGutterTooltip",m),p.off("mousewheel",_))}function w(b){m.setPosition(b.x,b.y)}f.editor.setDefaultHandler("guttermousemove",function(b){var C=b.domEvent.target||b.domEvent.srcElement;if(u.hasCssClass(C,"ace_fold-widget"))return _();m.isOpen&&f.$tooltipFollowsMouse&&w(b),y=b,!v&&(v=setTimeout(function(){v=null,y&&!f.isMousePressed?S():_()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(b){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,_()},50))},p),p.on("changeSession",_),p.on("input",_)}i.GutterHandler=l;var d=function(f){s(p,f);function p(g){var m=f.call(this,g.container)||this;return m.editor=g,m}return p.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),_=this.getHeight();g+=15,m+=15,g+S>v&&(g-=g+S-v),m+_>y&&(m-=20+_),h.prototype.setPosition.call(this,g,m)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var S=m.session.getFoldLine(g);if(S&&m.$showFoldedAnnotations){for(var _={error:[],warning:[],info:[]},w,b=g+1;b<=S.end.row;b++)if(!!m.$annotations[b])for(var C=0;C<m.$annotations[b].text.length;C++){var M=m.$annotations[b].type[C];if(_[M].push(m.$annotations[b].text[C]),M==="error"){w="error_fold";continue}if(M==="warning"){w="warning_fold";continue}}if(w==="error_fold"||w==="warning_fold"){var R="".concat(p.annotationsToSummaryString(_)," in folded code.");y.text.push(R),y.type.push(w)}}if(y.text.length===0)return this.hide();for(var T={error:[],warning:[],info:[]},A=m.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",b=0;b<y.text.length;b++){var P="<span class='ace_".concat(y.type[b]," ").concat(A,"' aria-label='").concat(p.annotationLabels[y.type[b].replace("_fold","")].singular,"' role=img> </span> ").concat(y.text[b]);T[y.type[b].replace("_fold","")].push(P)}var I=[].concat(T.error,T.warning,T.info).join("<br>");this.setHtml(I),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},p.annotationsToSummaryString=function(g){var m,v,y=[],S=["error","warning","info"];try{for(var _=o(S),w=_.next();!w.done;w=_.next()){var b=w.value;if(!!g[b].length){var C=g[b].length===1?p.annotationLabels[b].singular:p.annotationLabels[b].plural;y.push("".concat(g[b].length," ").concat(C))}}}catch(M){m={error:M}}finally{try{w&&!w.done&&(v=_.return)&&v.call(_)}finally{if(m)throw m.error}}return y.join(", ")},p}(h);i.GutterTooltip=d}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,i,r){var s=n("../lib/event"),o=n("../lib/useragent"),u=function(){function a(h,c){this.domEvent=h,this.editor=c,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){s.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){s.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,c=h.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=c.contains(l.row,l.column)}return this.$inSelection},a.prototype.getButton=function(){return s.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();i.MouseEvent=u}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,i,r){var s=n("../lib/dom"),o=n("../lib/event"),u=n("../lib/useragent"),a=200,h=200,c=5;function l(f){var p=f.editor,g=s.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent="\xA0";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(G){f[G]=this[G]},this),p.on("mousedown",this.onMouseDown.bind(f));var v=p.container,y,S,_,w,b,C,M=0,R,T,A,P,I;this.onDragStart=function(G){if(this.cancelDrag||!v.draggable){var X=this;return setTimeout(function(){X.startSelect(),X.captureMouse(G)},0),G.preventDefault()}b=p.getSelectionRange();var ie=G.dataTransfer;ie.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),ie.setDragImage&&ie.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),ie.clearData(),ie.setData("Text",p.session.getTextRange()),T=!0,this.setState("drag")},this.onDragEnd=function(G){if(v.draggable=!1,T=!1,this.setState(null),!p.getReadOnly()){var X=G.dataTransfer.dropEffect;!R&&X=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(G){if(!(p.getReadOnly()||!q(G.dataTransfer)))return S=G.clientX,_=G.clientY,y||B(),M++,G.dataTransfer.dropEffect=R=ne(G),o.preventDefault(G)},this.onDragOver=function(G){if(!(p.getReadOnly()||!q(G.dataTransfer)))return S=G.clientX,_=G.clientY,y||(B(),M++),z!==null&&(z=null),G.dataTransfer.dropEffect=R=ne(G),o.preventDefault(G)},this.onDragLeave=function(G){if(M--,M<=0&&y)return U(),R=null,o.preventDefault(G)},this.onDrop=function(G){if(!!C){var X=G.dataTransfer;if(T)switch(R){case"move":b.contains(C.row,C.column)?b={start:C,end:C}:b=p.moveText(b,C);break;case"copy":b=p.moveText(b,C,!0);break}else{var ie=X.getData("Text");b={start:C,end:p.session.insert(C,ie)},p.focus(),R=null}return U(),o.preventDefault(G)}},o.addListener(v,"dragstart",this.onDragStart.bind(f),p),o.addListener(v,"dragend",this.onDragEnd.bind(f),p),o.addListener(v,"dragenter",this.onDragEnter.bind(f),p),o.addListener(v,"dragover",this.onDragOver.bind(f),p),o.addListener(v,"dragleave",this.onDragLeave.bind(f),p),o.addListener(v,"drop",this.onDrop.bind(f),p);function E(G,X){var ie=Date.now(),le=!X||G.row!=X.row,Y=!X||G.column!=X.column;if(!P||le||Y)p.moveCursorToPosition(G),P=ie,I={x:S,y:_};else{var J=d(I.x,I.y,S,_);J>c?P=null:ie-P>=h&&(p.renderer.scrollCursorIntoView(),P=null)}}function L(G,X){var ie=Date.now(),le=p.renderer.layerConfig.lineHeight,Y=p.renderer.layerConfig.characterWidth,J=p.renderer.scroller.getBoundingClientRect(),te={x:{left:S-J.left,right:J.right-S},y:{top:_-J.top,bottom:J.bottom-_}},ue=Math.min(te.x.left,te.x.right),Se=Math.min(te.y.top,te.y.bottom),Ce={row:G.row,column:G.column};ue/Y<=2&&(Ce.column+=te.x.left<te.x.right?-3:2),Se/le<=1&&(Ce.row+=te.y.top<te.y.bottom?-1:1);var F=G.row!=Ce.row,N=G.column!=Ce.column,W=!X||G.row!=X.row;F||N&&!W?A?ie-A>=a&&p.renderer.scrollCursorIntoView(Ce):A=ie:A=null}function O(){var G=C;C=p.renderer.screenToTextCoordinates(S,_),E(C,G),L(C,G)}function B(){b=p.selection.toOrientedRange(),y=p.session.addMarker(b,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),O(),w=setInterval(O,20),M=0,o.addListener(document,"mousemove",j)}function U(){clearInterval(w),p.session.removeMarker(y),y=null,p.selection.fromOrientedRange(b),p.isFocused()&&!T&&p.$resetCursorStyle(),b=null,C=null,M=0,A=null,P=null,o.removeListener(document,"mousemove",j)}var z=null;function j(){z==null&&(z=setTimeout(function(){z!=null&&y&&U()},20))}function q(G){var X=G.types;return!X||Array.prototype.some.call(X,function(ie){return ie=="text/plain"||ie=="Text"})}function ne(G){var X=["copy","copymove","all","uninitialized"],ie=["move","copymove","linkmove","all","uninitialized"],le=u.isMac?G.altKey:G.ctrlKey,Y="uninitialized";try{Y=G.dataTransfer.effectAllowed.toLowerCase()}catch{}var J="none";return le&&X.indexOf(Y)>=0?J="copy":ie.indexOf(Y)>=0?J="move":X.indexOf(Y)>=0&&(J="copy"),J}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=u.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(u.isIE&&this.state=="dragReady"){var g=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(!!this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),m=f.getButton(),v=f.domEvent.detail||1;if(v===1&&m===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),p.getDragDelay()){if(u.isWebKit){this.cancelDrag=!0;var S=p.container;S.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(l.prototype);function d(f,p,g,m){return Math.sqrt(Math.pow(g-f,2)+Math.pow(m-p,2))}i.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,i,r){var s=n("./mouse_event").MouseEvent,o=n("../lib/event"),u=n("../lib/dom");i.addTouchListeners=function(a,h){var c="scroll",l,d,f,p,g,m,v=0,y,S=0,_=0,w=0,b,C;function M(){var E=window.navigator&&window.navigator.clipboard,L=!1,O=function(){var U=h.getCopyText(),z=h.session.getUndoManager().hasUndo();C.replaceChild(u.buildDom(L?["span",!U&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],U&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],U&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],E&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],z&&["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"]),C.firstChild)},B=function(U){var z=U.target.getAttribute("action");if(z=="more"||!L)return L=!L,O();z=="paste"?E.readText().then(function(j){h.execCommand(z,j)}):z&&((z=="cut"||z=="copy")&&(E?E.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(z)),C.firstChild.style.display="none",L=!1,z!="openCommandPallete"&&h.focus()};C=u.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(U){c="menu",U.stopPropagation(),U.preventDefault(),h.textInput.focus()},ontouchend:function(U){U.stopPropagation(),U.preventDefault(),B(U)},onclick:B},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function R(){C||M();var E=h.selection.cursor,L=h.renderer.textToScreenCoordinates(E.row,E.column),O=h.renderer.textToScreenCoordinates(0,0).pageX,B=h.renderer.scrollLeft,U=h.container.getBoundingClientRect();C.style.top=L.pageY-U.top-3+"px",L.pageX-U.left<U.width-70?(C.style.left="",C.style.right="10px"):(C.style.right="",C.style.left=O+B-U.left+"px"),C.style.display="",C.firstChild.style.display="none",h.on("input",T)}function T(E){C&&(C.style.display="none"),h.off("input",T)}function A(){g=null,clearTimeout(g);var E=h.selection.getRange(),L=E.contains(y.row,y.column);(E.isEmpty()||!L)&&(h.selection.moveToPosition(y),h.selection.selectWord()),c="wait",R()}function P(){g=null,clearTimeout(g),h.selection.moveToPosition(y);var E=S>=2?h.selection.getLineRange(y.row):h.session.getBracketRange(y);E&&!E.isEmpty()?h.selection.setRange(E):h.selection.selectWord(),c="wait"}o.addListener(a,"contextmenu",function(E){if(!!b){var L=h.textInput.getElement();L.focus()}},h),o.addListener(a,"touchstart",function(E){var L=E.touches;if(g||L.length>1){clearTimeout(g),g=null,f=-1,c="zoom";return}b=h.$mouseHandler.isMousePressed=!0;var O=h.renderer.layerConfig.lineHeight,B=h.renderer.layerConfig.lineHeight,U=E.timeStamp;p=U;var z=L[0],j=z.clientX,q=z.clientY;Math.abs(l-j)+Math.abs(d-q)>O&&(f=-1),l=E.clientX=j,d=E.clientY=q,_=w=0;var ne=new s(E,h);if(y=ne.getDocumentPosition(),U-f<500&&L.length==1&&!v)S++,E.preventDefault(),E.button=0,P();else{S=0;var G=h.selection.cursor,X=h.selection.isEmpty()?G:h.selection.anchor,ie=h.renderer.$cursorLayer.getPixelPosition(G,!0),le=h.renderer.$cursorLayer.getPixelPosition(X,!0),Y=h.renderer.scroller.getBoundingClientRect(),J=h.renderer.layerConfig.offset,te=h.renderer.scrollLeft,ue=function(F,N){return F=F/B,N=N/O-.75,F*F+N*N};if(E.clientX<Y.left){c="zoom";return}var Se=ue(E.clientX-Y.left-ie.left+te,E.clientY-Y.top-ie.top+J),Ce=ue(E.clientX-Y.left-le.left+te,E.clientY-Y.top-le.top+J);Se<3.5&&Ce<3.5&&(c=Se>Ce?"cursor":"anchor"),Ce<3.5?c="anchor":Se<3.5?c="cursor":c="scroll",g=setTimeout(A,450)}f=U},h),o.addListener(a,"touchend",function(E){b=h.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),c=="zoom"?(c="",v=0):g?(h.selection.moveToPosition(y),v=0,R()):c=="scroll"?(I(),T()):R(),clearTimeout(g),g=null},h),o.addListener(a,"touchmove",function(E){g&&(clearTimeout(g),g=null);var L=E.touches;if(!(L.length>1||c=="zoom")){var O=L[0],B=l-O.clientX,U=d-O.clientY;if(c=="wait")if(B*B+U*U>4)c="cursor";else return E.preventDefault();l=O.clientX,d=O.clientY,E.clientX=O.clientX,E.clientY=O.clientY;var z=E.timeStamp,j=z-p;if(p=z,c=="scroll"){var q=new s(E,h);q.speed=1,q.wheelX=B,q.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),j!=0&&(_=B/j,w=U/j),h._emit("mousewheel",q),q.propagationStopped||(_=w=0)}else{var ne=new s(E,h),G=ne.getDocumentPosition();c=="cursor"?h.selection.moveCursorToPosition(G):c=="anchor"&&h.selection.setSelectionAnchor(G.row,G.column),h.renderer.scrollCursorIntoView(G),E.preventDefault()}}},h);function I(){v+=60,m=setInterval(function(){v--<=0&&(clearInterval(m),m=null),Math.abs(_)<.01&&(_=0),Math.abs(w)<.01&&(w=0),v<20&&(_=.9*_),v<20&&(w=.9*w);var E=h.session.getScrollTop();h.renderer.scrollBy(10*_,10*w),E==h.session.getScrollTop()&&(v=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,i,r){var s=n("../lib/event"),o=n("../lib/useragent"),u=n("./default_handlers").DefaultHandlers,a=n("./default_gutter_handler").GutterHandler,h=n("./mouse_event").MouseEvent,c=n("./dragdrop_handler").DragdropHandler,l=n("./touch_handler").addTouchListeners,d=n("../config"),f=function(){function p(g){var m=this;this.editor=g,new u(this),new a(this),new c(this);var v=function(_){var w=!document.hasFocus||!document.hasFocus()||!g.isFocused()&&document.activeElement==(g.textInput&&g.textInput.getElement());w&&window.focus(),g.focus(),setTimeout(function(){g.isFocused()||g.focus()})},y=g.renderer.getMouseEventTarget();s.addListener(y,"click",this.onMouseEvent.bind(this,"click"),g),s.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),g),s.addMultiMouseDownListener([y,g.renderer.scrollBarV&&g.renderer.scrollBarV.inner,g.renderer.scrollBarH&&g.renderer.scrollBarH.inner,g.textInput&&g.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",g),s.addMouseWheelListener(g.container,this.onMouseWheel.bind(this,"mousewheel"),g),l(g.container,g);var S=g.renderer.$gutter;s.addListener(S,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),g),s.addListener(S,"click",this.onMouseEvent.bind(this,"gutterclick"),g),s.addListener(S,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),g),s.addListener(S,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),g),s.addListener(y,"mousedown",v,g),s.addListener(S,"mousedown",v,g),o.isIE&&g.renderer.scrollBarV&&(s.addListener(g.renderer.scrollBarV.element,"mousedown",v,g),s.addListener(g.renderer.scrollBarH.element,"mousedown",v,g)),g.on("mousemove",function(_){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var w=g.renderer.screenToTextCoordinates(_.x,_.y),b=g.session.selection.getRange(),C=g.renderer;!b.isEmpty()&&b.insideStart(w.row,w.column)?C.setCursorStyle("default"):C.setCursorStyle("")}},g)}return p.prototype.onMouseEvent=function(g,m){!this.editor.session||this.editor._emit(g,new h(m,this.editor))},p.prototype.onMouseMove=function(g,m){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(g,new h(m,this.editor))},p.prototype.onMouseWheel=function(g,m){var v=new h(m,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=m.wheelX,v.wheelY=m.wheelY,this.editor._emit(g,v)},p.prototype.setState=function(g){this.state=g},p.prototype.captureMouse=function(g,m){this.x=g.x,this.y=g.y,this.isMousePressed=!0;var v=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var S=this,_=function(R){if(!!R){if(o.isWebKit&&!R.which&&S.releaseMouse)return S.releaseMouse();S.x=R.clientX,S.y=R.clientY,m&&m(R),S.mouseEvent=new h(R,S.editor),S.$mouseMoved=!0}},w=function(R){v.off("beforeEndOperation",C),clearInterval(M),v.session&&b(),S[S.state+"End"]&&S[S.state+"End"](R),S.state="",S.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),S.$onCaptureMouseMove=S.releaseMouse=null,R&&S.onMouseEvent("mouseup",R),v.endOperation()},b=function(){S[S.state]&&S[S.state](),S.$mouseMoved=!1};if(o.isOldIE&&g.domEvent.type=="dblclick")return setTimeout(function(){w(g)});var C=function(R){!S.releaseMouse||v.curOp.command.name&&v.curOp.selectionChanged&&(S[S.state+"End"]&&S[S.state+"End"](),S.state="",S.releaseMouse())};v.on("beforeEndOperation",C),v.startOperation({command:{name:"mouse"}}),S.$onCaptureMouseMove=_,S.releaseMouse=s.capture(this.editor.container,_,w);var M=setInterval(b,20)},p.prototype.cancelContextMenu=function(){var g=function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",g),m&&m.domEvent&&s.stopEvent(m.domEvent))}.bind(this);setTimeout(g,10),this.editor.on("nativecontextmenu",g)},p.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},p}();f.prototype.releaseMouse=null,d.defineOptions(f.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),i.MouseHandler=f}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,i,r){var s=n("../lib/dom"),o=function(){function u(a){a.on("click",function(h){var c=h.getDocumentPosition(),l=a.session,d=l.getFoldAt(c.row,c.column,1);d&&(h.getAccelKey()?l.removeFold(d):l.expandFold(d),h.stop());var f=h.domEvent&&h.domEvent.target;f&&s.hasCssClass(f,"ace_inline_button")&&s.hasCssClass(f,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(h){var c=a.renderer.$gutterLayer.getRegion(h);if(c=="foldWidgets"){var l=h.getDocumentPosition().row,d=a.session;d.foldWidgets&&d.foldWidgets[l]&&a.session.onFoldWidgetClick(l,h),a.isFocused()||a.focus(),h.stop()}}),a.on("gutterdblclick",function(h){var c=a.renderer.$gutterLayer.getRegion(h);if(c=="foldWidgets"){var l=h.getDocumentPosition().row,d=a.session,f=d.getParentFoldRangeData(l,!0),p=f.range||f.firstRange;if(p){l=p.start.row;var g=d.getFoldAt(l,d.getLine(l).length,1);g?d.removeFold(g):(d.addFold("...",p),a.renderer.scrollCursorIntoView({row:p.start.row,column:0}))}h.stop()}})}return u}();i.FoldHandler=o}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,i,r){var s=n("../lib/keys"),o=n("../lib/event"),u=function(){function a(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return a.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},a.prototype.setKeyboardHandler=function(h){var c=this.$handlers;if(c[c.length-1]!=h){for(;c[c.length-1]&&c[c.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(c[c.length-1]);this.addKeyboardHandler(h,1)}},a.prototype.addKeyboardHandler=function(h,c){if(!!h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var l=this.$handlers.indexOf(h);l!=-1&&this.$handlers.splice(l,1),c==null?this.$handlers.push(h):this.$handlers.splice(c,0,h),l==-1&&h.attach&&h.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(h){var c=this.$handlers.indexOf(h);return c==-1?!1:(this.$handlers.splice(c,1),h.detach&&h.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var h=this.$data,c=h.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(c,h)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(h,c,l,d){for(var f,p=!1,g=this.$editor.commands,m=this.$handlers.length;m--&&(f=this.$handlers[m].handleKeyboard(this.$data,h,c,l,d),!(!(!f||!f.command)&&(f.command=="null"?p=!0:p=g.exec(f.command,this.$editor,f.args,d),p&&d&&h!=-1&&f.passEvent!=!0&&f.command.passEvent!=!0&&o.stopEvent(d),p))););return!p&&h==-1&&(f={command:"insertstring"},p=g.exec("insertstring",this.$editor,c)),p&&this.$editor._signal&&this.$editor._signal("keyboardActivity",f),p},a.prototype.onCommandKey=function(h,c,l){var d=s.keyCodeToString(l);return this.$callKeyboardHandlers(c,d,l,h)},a.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},a}();i.KeyBinding=u}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,i,r){var s=0,o=0,u=!1,a=!1,h=!1,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d=0,f=1,p=0,g=1,m=2,v=3,y=4,S=5,_=6,w=7,b=8,C=9,M=10,R=11,T=12,A=13,P=14,I=15,E=16,L=17,O=18,B=[O,O,O,O,O,O,O,O,O,_,S,_,b,S,O,O,O,O,O,O,O,O,O,O,O,O,O,O,S,S,S,_,b,y,y,R,R,R,y,y,y,y,y,M,C,M,C,C,m,m,m,m,m,m,m,m,m,m,C,y,y,y,y,y,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,y,y,y,y,y,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,y,y,y,y,O,O,O,O,O,O,S,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,C,y,R,R,R,R,y,y,y,y,p,y,y,O,y,y,R,R,m,m,y,p,y,y,y,m,p,y,y,y,y,y],U=[b,b,b,b,b,b,b,b,b,b,b,O,O,O,p,g,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b,S,A,P,I,E,L,C,R,R,R,R,R,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,C,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b];function z(G,X,ie,le){var Y=s?l:c,J=null,te=null,ue=null,Se=0,Ce=null,F=null,N=-1,W=null,ee=null,re=[];if(!le)for(W=0,le=[];W<ie;W++)le[W]=ne(G[W]);for(o=s,u=!1,a=!1,h=!1,ee=0;ee<ie;ee++){if(J=Se,re[ee]=te=q(G,le,re,ee),Se=Y[J][te],Ce=Se&240,Se&=15,X[ee]=ue=Y[Se][5],Ce>0)if(Ce==16){for(W=N;W<ee;W++)X[W]=1;N=-1}else N=-1;if(F=Y[Se][6],F)N==-1&&(N=ee);else if(N>-1){for(W=N;W<ee;W++)X[W]=ue;N=-1}le[ee]==S&&(X[ee]=0),o|=ue}if(h){for(W=0;W<ie;W++)if(le[W]==_){X[W]=s;for(var ce=W-1;ce>=0&&le[ce]==b;ce--)X[ce]=s}}}function j(G,X,ie){if(!(o<G)){if(G==1&&s==f&&!a){ie.reverse();return}for(var le=ie.length,Y=0,J,te,ue,Se;Y<le;){if(X[Y]>=G){for(J=Y+1;J<le&&X[J]>=G;)J++;for(te=Y,ue=J-1;te<ue;te++,ue--)Se=ie[te],ie[te]=ie[ue],ie[ue]=Se;Y=J}Y++}}}function q(G,X,ie,le){var Y=X[le],J,te,ue,Se;switch(Y){case p:case g:u=!1;case y:case v:return Y;case m:return u?v:m;case w:return u=!0,g;case b:return y;case C:return le<1||le+1>=X.length||(J=ie[le-1])!=m&&J!=v||(te=X[le+1])!=m&&te!=v?y:(u&&(te=v),te==J?te:y);case M:return J=le>0?ie[le-1]:S,J==m&&le+1<X.length&&X[le+1]==m?m:y;case R:if(le>0&&ie[le-1]==m)return m;if(u)return y;for(Se=le+1,ue=X.length;Se<ue&&X[Se]==R;)Se++;return Se<ue&&X[Se]==m?m:y;case T:for(ue=X.length,Se=le+1;Se<ue&&X[Se]==T;)Se++;if(Se<ue){var Ce=G[le],F=Ce>=1425&&Ce<=2303||Ce==64286;if(J=X[Se],F&&(J==g||J==w))return g}return le<1||(J=X[le-1])==S?y:ie[le-1];case S:return u=!1,a=!0,s;case _:return h=!0,y;case A:case P:case E:case L:case I:u=!1;case O:return y}}function ne(G){var X=G.charCodeAt(0),ie=X>>8;return ie==0?X>191?p:B[X]:ie==5?/[\u0591-\u05f4]/.test(G)?g:p:ie==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(G)?T:/[\u0660-\u0669\u066b-\u066c]/.test(G)?v:X==1642?R:/[\u06f0-\u06f9]/.test(G)?m:w:ie==32&&X<=8287?U[X&255]:ie==254&&X>=65136?w:y}i.L=p,i.R=g,i.EN=m,i.ON_R=3,i.AN=4,i.R_H=5,i.B=6,i.RLE=7,i.DOT="\xB7",i.doBidiReorder=function(G,X,ie){if(G.length<2)return{};var le=G.split(""),Y=new Array(le.length),J=new Array(le.length),te=[];s=ie?f:d,z(le,te,le.length,X);for(var ue=0;ue<Y.length;Y[ue]=ue,ue++);j(2,te,Y),j(1,te,Y);for(var ue=0;ue<Y.length-1;ue++)X[ue]===v?te[ue]=i.AN:te[ue]===g&&(X[ue]>w&&X[ue]<A||X[ue]===y||X[ue]===O)?te[ue]=i.ON_R:ue>0&&le[ue-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(le[ue])&&(te[ue-1]=te[ue]=i.R_H,ue++);le[le.length-1]===i.DOT&&(te[le.length-1]=i.B),le[0]==="\u202B"&&(te[0]=i.RLE);for(var ue=0;ue<Y.length;ue++)J[ue]=te[Y[ue]];return{logicalFromVisual:Y,bidiLevels:J}},i.hasBidiCharacters=function(G,X){for(var ie=!1,le=0;le<G.length;le++)X[le]=ne(G.charAt(le)),!ie&&(X[le]==g||X[le]==w||X[le]==v)&&(ie=!0);return ie},i.getVisualFromLogicalIdx=function(G,X){for(var ie=0;ie<X.logicalFromVisual.length;ie++)if(X.logicalFromVisual[ie]==G)return ie;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,i,r){var s=n("./lib/bidiutil"),o=n("./lib/lang"),u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function h(c){this.session=c,this.bidiMap={},this.currentRow=null,this.bidiUtil=s,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=u.test(c.getValue())}return h.prototype.isBidiRow=function(c,l,d){return this.seenBidi?(c!==this.currentRow&&(this.currentRow=c,this.updateRowLine(l,d),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(c){this.seenBidi?this.currentRow=null:c.action=="insert"&&u.test(c.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var c=0,l=this.session.$screenRowCache;if(l.length){var d=this.session.$getRowCacheIndex(l,this.currentRow);d>=0&&(c=this.session.$docRowCache[d])}return c},h.prototype.getSplitIndex=function(){var c=0,l=this.session.$screenRowCache;if(l.length)for(var d,f=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-c>0&&(d=this.session.$getRowCacheIndex(l,this.currentRow-c-1),d===f);)f=d,c++;else c=this.currentRow;return c},h.prototype.updateRowLine=function(c,l){c===void 0&&(c=this.getDocumentRow());var d=c===this.session.getLength()-1,f=d?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[c];p&&(l===void 0&&(l=this.getSplitIndex()),l>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=l<p.length?this.line.substring(p[l-1],p[l]):this.line.substring(p[p.length-1])):this.line=this.line.substring(0,p[l]),l==p.length&&(this.line+=this.showInvisibles?f:s.DOT))}else this.line+=this.showInvisibles?f:s.DOT;var g=this.session,m=0,v;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,S){return y==="	"||g.isFullWidth(y.charCodeAt(0))?(v=y==="	"?g.getScreenTabSize(S+m):2,m+=v-1,o.stringRepeat(s.DOT,v)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==s.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},h.prototype.updateBidiMap=function(){var c=[];s.hasBidiCharacters(this.line,c)||this.isRtlDir?this.bidiMap=s.doBidiReorder(this.line,c,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(c){if(this.characterWidth!==c.$characterSize.width){this.fontMetrics=c;var l=this.characterWidth=c.$characterSize.width,d=c.$measureCharWidth("\u05D4");this.charWidths[s.L]=this.charWidths[s.EN]=this.charWidths[s.ON_R]=l,this.charWidths[s.R]=this.charWidths[s.AN]=d,this.charWidths[s.R_H]=d*.45,this.charWidths[s.B]=this.charWidths[s.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(c){this.showInvisibles=c,this.currentRow=null},h.prototype.setEolChar=function(c){this.EOL=c},h.prototype.setContentWidth=function(c){this.contentWidth=c},h.prototype.isRtlLine=function(c){return this.$isRtl?!0:c!=null?this.session.getLine(c).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(c,l){for(var d=c.getCursorPosition(),f=c.selection.getSelectionAnchor().row;f<=d.row;f++)!l&&c.session.getLine(f).charAt(0)===c.session.$bidiHandler.RLE?c.session.doc.removeInLine(f,0,1):l&&c.session.getLine(f).charAt(0)!==c.session.$bidiHandler.RLE&&c.session.doc.insert({column:0,row:f},c.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(c){c-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,d=c>l?this.session.getOverwrite()?c:c-1:l,f=s.getVisualFromLogicalIdx(d,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&c<=l&&p[f]%2!==0&&f++;for(var m=0;m<f;m++)g+=this.charWidths[p[m]];return!this.session.getOverwrite()&&c>l&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},h.prototype.getSelections=function(c,l){var d=this.bidiMap,f=d.bidiLevels,p,g=[],m=0,v=Math.min(c,l)-this.wrapIndent,y=Math.max(c,l)-this.wrapIndent,S=!1,_=!1,w=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,C=0;C<f.length;C++)b=d.logicalFromVisual[C],p=f[C],S=b>=v&&b<y,S&&!_?w=m:!S&&_&&g.push({left:w,width:m-w}),m+=this.charWidths[p],_=S;if(S&&C===f.length&&g.push({left:w,width:m-w}),this.isRtlDir)for(var M=0;M<g.length;M++)g[M].left+=this.rtlLineOffset;return g},h.prototype.offsetToCol=function(d){this.isRtlDir&&(d-=this.rtlLineOffset);var l=0,d=Math.max(d,0),f=0,p=0,g=this.bidiMap.bidiLevels,m=this.charWidths[g[p]];for(this.wrapIndent&&(d-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);d>f+m/2;){if(f+=m,p===g.length-1){m=0;break}m=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(d<f&&p--,l=this.bidiMap.logicalFromVisual[p]):p>0&&g[p-1]%2===0&&g[p]%2!==0?l=1+(d>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&m===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?l=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&m!==0&&p--,l=this.bidiMap.logicalFromVisual[p]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},h}();i.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,i,r){var s=n("./lib/oop"),o=n("./lib/lang"),u=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,h=function(c){this.session=c,this.doc=c.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var l=this;this.cursor.on("change",function(d){l.$cursorChanged=!0,l.$silent||l._emit("changeCursor"),!l.$isEmpty&&!l.$silent&&l._emit("changeSelection"),!l.$keepDesiredColumnOnChange&&d.old.column!=d.value.column&&(l.$desiredColumn=null)}),this.anchor.on("change",function(){l.$anchorChanged=!0,!l.$isEmpty&&!l.$silent&&l._emit("changeSelection")})};(function(){s.implement(this,u),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.setAnchor=function(c,l){this.$isEmpty=!1,this.anchor.setPosition(c,l)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var c=this.anchor,l=this.lead;return c.row>l.row||c.row==l.row&&c.column>l.column},this.getRange=function(){var c=this.anchor,l=this.lead;return this.$isEmpty?a.fromPoints(l,l):this.isBackwards()?a.fromPoints(l,c):a.fromPoints(c,l)},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(c,l){var d=l?c.end:c.start,f=l?c.start:c.end;this.$setSelection(d.row,d.column,f.row,f.column)},this.$setSelection=function(c,l,d,f){if(!this.$silent){var p=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(c,l),this.cursor.setPosition(d,f),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||p!=this.$isEmpty||g)&&this._emit("changeSelection")}},this.$moveSelection=function(c){var l=this.lead;this.$isEmpty&&this.setSelectionAnchor(l.row,l.column),c.call(this)},this.selectTo=function(c,l){this.$moveSelection(function(){this.moveCursorTo(c,l)})},this.selectToPosition=function(c){this.$moveSelection(function(){this.moveCursorToPosition(c)})},this.moveTo=function(c,l){this.clearSelection(),this.moveCursorTo(c,l)},this.moveToPosition=function(c){this.clearSelection(),this.moveCursorToPosition(c)},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(c,l){if(typeof l>"u"){var d=c||this.lead;c=d.row,l=d.column}return this.session.getWordRange(c,l)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var c=this.getCursor(),l=this.session.getAWordRange(c.row,c.column);this.setSelectionRange(l)},this.getLineRange=function(c,l){var d=typeof c=="number"?c:this.lead.row,f,p=this.session.getFoldLine(d);return p?(d=p.start.row,f=p.end.row):f=d,l===!0?new a(d,0,f,this.session.getLine(f).length):new a(d,0,f+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(c,l,d){var f=c.column,p=c.column+l;return d<0&&(f=c.column-l,p=c.column),this.session.isTabStop(c)&&this.doc.getLine(c.row).slice(f,p).split(" ").length-1==l},this.moveCursorLeft=function(){var c=this.lead.getPosition(),l;if(l=this.session.getFoldAt(c.row,c.column,-1))this.moveCursorTo(l.start.row,l.start.column);else if(c.column===0)c.row>0&&this.moveCursorTo(c.row-1,this.doc.getLine(c.row-1).length);else{var d=this.session.getTabSize();this.wouldMoveIntoSoftTab(c,d,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-d):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var c=this.lead.getPosition(),l;if(l=this.session.getFoldAt(c.row,c.column,1))this.moveCursorTo(l.end.row,l.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var d=this.session.getTabSize(),c=this.lead;this.wouldMoveIntoSoftTab(c,d,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,d):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var c=this.lead.row,l=this.lead.column,d=this.session.documentToScreenRow(c,l),f=this.session.screenToDocumentPosition(d,0),p=this.session.getDisplayLine(c,null,f.row,f.column),g=p.match(/^\s*/);g[0].length!=l&&!this.session.$useEmacsStyleLineStart&&(f.column+=g[0].length),this.moveCursorToPosition(f)},this.moveCursorLineEnd=function(){var c=this.lead,l=this.session.getDocumentLastRowColumnPosition(c.row,c.column);if(this.lead.column==l.column){var d=this.session.getLine(l.row);if(l.column==d.length){var f=d.search(/\s+$/);f>0&&(l.column=f)}}this.moveCursorTo(l.row,l.column)},this.moveCursorFileEnd=function(){var c=this.doc.getLength()-1,l=this.doc.getLine(c).length;this.moveCursorTo(c,l)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var c=this.lead.row,l=this.lead.column,d=this.doc.getLine(c),f=d.substring(l);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var p=this.session.getFoldAt(c,l,1);if(p){this.moveCursorTo(p.end.row,p.end.column);return}if(this.session.nonTokenRe.exec(f)&&(l+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,f=d.substring(l)),l>=d.length){this.moveCursorTo(c,d.length),this.moveCursorRight(),c<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(f)&&(l+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,l)},this.moveCursorLongWordLeft=function(){var c=this.lead.row,l=this.lead.column,d;if(d=this.session.getFoldAt(c,l,-1)){this.moveCursorTo(d.start.row,d.start.column);return}var f=this.session.getFoldStringAt(c,l,-1);f==null&&(f=this.doc.getLine(c).substring(0,l));var p=o.stringReverse(f);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(p)&&(l-=this.session.nonTokenRe.lastIndex,p=p.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),l<=0){this.moveCursorTo(c,0),this.moveCursorLeft(),c>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(p)&&(l-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,l)},this.$shortWordEndIndex=function(c){var l=0,d,f=/\s/,p=this.session.tokenRe;if(p.lastIndex=0,this.session.tokenRe.exec(c))l=this.session.tokenRe.lastIndex;else{for(;(d=c[l])&&f.test(d);)l++;if(l<1){for(p.lastIndex=0;(d=c[l])&&!p.test(d);)if(p.lastIndex=0,l++,f.test(d))if(l>2){l--;break}else{for(;(d=c[l])&&f.test(d);)l++;if(l>2)break}}}return p.lastIndex=0,l},this.moveCursorShortWordRight=function(){var c=this.lead.row,l=this.lead.column,d=this.doc.getLine(c),f=d.substring(l),p=this.session.getFoldAt(c,l,1);if(p)return this.moveCursorTo(p.end.row,p.end.column);if(l==d.length){var g=this.doc.getLength();do c++,f=this.doc.getLine(c);while(c<g&&/^\s*$/.test(f));/^\s+/.test(f)||(f=""),l=0}var m=this.$shortWordEndIndex(f);this.moveCursorTo(c,l+m)},this.moveCursorShortWordLeft=function(){var c=this.lead.row,l=this.lead.column,d;if(d=this.session.getFoldAt(c,l,-1))return this.moveCursorTo(d.start.row,d.start.column);var f=this.session.getLine(c).substring(0,l);if(l===0){do c--,f=this.doc.getLine(c);while(c>0&&/^\s*$/.test(f));l=f.length,/\s+$/.test(f)||(f="")}var p=o.stringReverse(f),g=this.$shortWordEndIndex(p);return this.moveCursorTo(c,l-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(c,l){var d=this.session.documentToScreenPosition(this.lead.row,this.lead.column),f;if(l===0&&(c!==0&&(this.session.$bidiHandler.isBidiRow(d.row,this.lead.row)?(f=this.session.$bidiHandler.getPosLeft(d.column),d.column=Math.round(f/this.session.$bidiHandler.charWidths[0])):f=d.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?d.column=this.$desiredColumn:this.$desiredColumn=d.column),c!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var p=this.session.lineWidgets[this.lead.row];c<0?c-=p.rowsAbove||0:c>0&&(c+=p.rowCount-(p.rowsAbove||0))}var g=this.session.screenToDocumentPosition(d.row+c,d.column,f);c!==0&&l===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+l,l===0)},this.moveCursorToPosition=function(c){this.moveCursorTo(c.row,c.column)},this.moveCursorTo=function(c,l,d){var f=this.session.getFoldAt(c,l,1);f&&(c=f.start.row,l=f.start.column),this.$keepDesiredColumnOnChange=!0;var p=this.session.getLine(c);/[\uDC00-\uDFFF]/.test(p.charAt(l))&&p.charAt(l-1)&&(this.lead.row==c&&this.lead.column==l+1?l=l-1:l=l+1),this.lead.setPosition(c,l),this.$keepDesiredColumnOnChange=!1,d||(this.$desiredColumn=null)},this.moveCursorToScreen=function(c,l,d){var f=this.session.screenToDocumentPosition(c,l);this.moveCursorTo(f.row,f.column,d)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(c){this.setSelectionRange(c,c.cursor==c.start),this.$desiredColumn=c.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(c){var l=this.getRange();return c?(c.start.column=l.start.column,c.start.row=l.start.row,c.end.column=l.end.column,c.end.row=l.end.row):c=l,c.cursor=this.isBackwards()?c.start:c.end,c.desiredColumn=this.$desiredColumn,c},this.getRangeOfMovements=function(c){var l=this.getCursor();try{c(this);var d=this.getCursor();return a.fromPoints(l,d)}catch{return a.fromPoints(l,l)}finally{this.moveCursorToPosition(l)}},this.toJSON=function(){if(this.rangeCount)var c=this.ranges.map(function(l){var d=l.clone();return d.isBackwards=l.cursor==l.start,d});else{var c=this.getRange();c.isBackwards=this.isBackwards()}return c},this.fromJSON=function(c){if(c.start==null)if(this.rangeList&&c.length>1){this.toSingleRange(c[0]);for(var l=c.length;l--;){var d=a.fromPoints(c[l].start,c[l].end);c[l].isBackwards&&(d.cursor=d.start),this.addRange(d,!0)}return}else c=c[0];this.rangeList&&this.toSingleRange(c),this.setSelectionRange(c,c.isBackwards)},this.isEqual=function(c){if((c.length||this.rangeCount)&&c.length!=this.rangeCount)return!1;if(!c.length||!this.ranges)return this.getRange().isEqual(c);for(var l=this.ranges.length;l--;)if(!this.ranges[l].isEqual(c[l]))return!1;return!0}}).call(h.prototype),i.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(n,i,r){var s=n("./config"),o=2e3,u=function(){function a(h){this.states=h,this.regExps={},this.matchMappings={};for(var c in this.states){for(var l=this.states[c],d=[],f=0,p=this.matchMappings[c]={defaultToken:"text"},g="g",m=[],v=0;v<l.length;v++){var y=l[v];if(y.defaultToken&&(p.defaultToken=y.defaultToken),y.caseInsensitive&&g.indexOf("i")===-1&&(g+="i"),y.unicode&&g.indexOf("u")===-1&&(g+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var S=y.regex,_=new RegExp("(?:("+S+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||_==1?y.token=y.token[0]:_-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:_-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(_>1?y.onMatch=this.$applyToken:y.onMatch=y.token),_>1&&(/\\\d/.test(y.regex)?S=y.regex.replace(/\\([0-9]+)/g,function(w,b){return"\\"+(parseInt(b,10)+f+1)}):(_=1,S=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),p[f]=v,f+=_,d.push(S),y.onMatch||(y.onMatch=null)}}d.length||(p[0]=0,d.push("$")),m.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,g)},this),this.regExps[c]=new RegExp("("+d.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(h){o=h|0},a.prototype.$applyToken=function(h){var c=this.splitRegex.exec(h).slice(1),l=this.token.apply(this,c);if(typeof l=="string")return[{type:l,value:h}];for(var d=[],f=0,p=l.length;f<p;f++)c[f]&&(d[d.length]={type:l[f],value:c[f]});return d},a.prototype.$arrayTokens=function(h){if(!h)return[];var c=this.splitRegex.exec(h);if(!c)return"text";for(var l=[],d=this.tokenArray,f=0,p=d.length;f<p;f++)c[f+1]&&(l[l.length]={type:d[f],value:c[f+1]});return l},a.prototype.removeCapturingGroups=function(h){var c=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,d){return d?"(?:":l});return c},a.prototype.createSplitterRegexp=function(h,c){if(h.indexOf("(?=")!=-1){var l=0,d=!1,f={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(p,g,m,v,y,S){return d?d=y!="]":y?d=!0:v?(l==f.stack&&(f.end=S+1,f.stack=-1),l--):m&&(l++,m.length!=1&&(f.stack=l,f.start=S)),p}),f.end!=null&&/^\)*$/.test(h.substr(f.end))&&(h=h.substring(0,f.start)+h.substr(f.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(c||"").replace("g",""))},a.prototype.getLineTokens=function(h,c){if(c&&typeof c!="string"){var l=c.slice(0);c=l[0],c==="#tmp"&&(l.shift(),c=l.shift())}else var l=[];var d=c||"start",f=this.states[d];f||(d="start",f=this.states[d]);var p=this.matchMappings[d],g=this.regExps[d];g.lastIndex=0;for(var m,v=[],y=0,S=0,_={type:null,value:""};m=g.exec(h);){var w=p.defaultToken,b=null,C=m[0],M=g.lastIndex;if(M-C.length>y){var R=h.substring(y,M-C.length);_.type==w?_.value+=R:(_.type&&v.push(_),_={type:w,value:R})}for(var T=0;T<m.length-2;T++)if(m[T+1]!==void 0){b=f[p[T]],b.onMatch?w=b.onMatch(C,d,l,h):w=b.token,b.next&&(typeof b.next=="string"?d=b.next:d=b.next(d,l),f=this.states[d],f||(this.reportError("state doesn't exist",d),d="start",f=this.states[d]),p=this.matchMappings[d],y=M,g=this.regExps[d],g.lastIndex=M),b.consumeLineEnd&&(y=M);break}if(C){if(typeof w=="string")(!b||b.merge!==!1)&&_.type===w?_.value+=C:(_.type&&v.push(_),_={type:w,value:C});else if(w){_.type&&v.push(_),_={type:null,value:""};for(var T=0;T<w.length;T++)v.push(w[T])}}if(y==h.length)break;if(y=M,S++>o){for(S>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:h});y<h.length;)_.type&&v.push(_),_={value:h.substring(y,y+=500),type:"overflow"};d="start",l=[];break}}return _.type&&v.push(_),l.length>1&&l[0]!==d&&l.unshift("#tmp",d),{tokens:v,state:l.length?l:d}},a}();u.prototype.reportError=s.reportError,i.Tokenizer=u}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(n,i,r){var s=n("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(h,c){if(!c){for(var l in h)this.$rules[l]=h[l];return}for(var l in h){for(var d=h[l],f=0;f<d.length;f++){var p=d[f];(p.next||p.onMatch)&&(typeof p.next=="string"&&p.next.indexOf(c)!==0&&(p.next=c+p.next),p.nextState&&p.nextState.indexOf(c)!==0&&(p.nextState=c+p.nextState))}this.$rules[c+l]=d}},this.getRules=function(){return this.$rules},this.embedRules=function(h,c,l,d,f){var p=typeof h=="function"?new h().getRules():h;if(d)for(var g=0;g<d.length;g++)d[g]=c+d[g];else{d=[];for(var m in p)d.push(c+m)}if(this.addRules(p,c),l)for(var v=Array.prototype[f?"push":"unshift"],g=0;g<d.length;g++)v.apply(this.$rules[d[g]],s.deepCopy(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(c)},this.getEmbeds=function(){return this.$embeds};var u=function(h,c){return(h!="start"||c.length)&&c.unshift(this.nextState,h),this.nextState},a=function(h,c){return c.shift(),c.shift()||"start"};this.normalizeRules=function(){var h=0,c=this.$rules;function l(d){var f=c[d];f.processed=!0;for(var p=0;p<f.length;p++){var g=f[p],m=null;Array.isArray(g)&&(m=g,g={}),!g.regex&&g.start&&(g.regex=g.start,g.next||(g.next=[]),g.next.push({defaultToken:g.token},{token:g.token+".end",regex:g.end||g.start,next:"pop"}),g.token=g.token+".start",g.push=!0);var v=g.next||g.push;if(v&&Array.isArray(v)){var y=g.stateName;y||(y=g.token,typeof y!="string"&&(y=y[0]||""),c[y]&&(y+=h++)),c[y]=v,g.next=y,l(y)}else v=="pop"&&(g.next=a);if(g.push&&(g.nextState=g.next||g.push,g.next=u,delete g.push),g.rules)for(var S in g.rules)c[S]?c[S].push&&c[S].push.apply(c[S],g.rules[S]):c[S]=g.rules[S];var _=typeof g=="string"?g:g.include;if(_&&(_==="$self"&&(_="start"),Array.isArray(_)?m=_.map(function(b){return c[b]}):m=c[_]),m){var w=[p,1].concat(m);g.noEscape&&(w=w.filter(function(b){return!b.next})),f.splice.apply(f,w),p--}g.keywordMap&&(g.token=this.createKeywordMapper(g.keywordMap,g.defaultToken||"text",g.caseInsensitive),delete g.defaultToken)}}Object.keys(c).forEach(l,this)},this.createKeywordMapper=function(h,c,l,d){var f=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(p){for(var g=h[p],m=g.split(d||"|"),v=m.length;v--;){var y=m[v];this.$keywordList.push(y),l&&(y=y.toLowerCase()),f[y]=p}},this),h=null,l?function(p){return f[p.toLowerCase()]||c}:function(p){return f[p]||c}},this.getKeywords=function(){return this.$keywords}}).call(o.prototype),i.TextHighlightRules=o}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,i,r){var s=function(){this.$behaviours={}};(function(){this.add=function(o,u,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[o]:this.$behaviours[o]={}}this.$behaviours[o][u]=a},this.addBehaviours=function(o){for(var u in o)for(var a in o[u])this.add(u,a,o[u][a])},this.remove=function(o){this.$behaviours&&this.$behaviours[o]&&delete this.$behaviours[o]},this.inherit=function(o,u){if(typeof o=="function")var a=new o().getBehaviours(u);else var a=o.getBehaviours(u);this.addBehaviours(a)},this.getBehaviours=function(o){if(o){for(var u={},a=0;a<o.length;a++)this.$behaviours[o[a]]&&(u[o[a]]=this.$behaviours[o[a]]);return u}else return this.$behaviours}}).call(s.prototype),i.Behaviour=s}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,i,r){var s=n("./range").Range,o=function(){function u(a,h,c){this.$session=a,this.$row=h,this.$rowTokens=a.getTokens(h);var l=a.getTokenAt(h,c);this.$tokenIndex=l?l.index:-1}return u.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},u.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},u.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},u.prototype.getCurrentTokenRow=function(){return this.$row},u.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,h=this.$tokenIndex,c=a[h].start;if(c!==void 0)return c;for(c=0;h>0;)h-=1,c+=a[h].value.length;return c},u.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},u.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new s(this.$row,h,this.$row,h+a.value.length)},u}();i.TokenIterator=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,i,r){var s=n("../../lib/oop"),o=n("../behaviour").Behaviour,u=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,d={},f={'"':'"',"'":"'"},p=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,d.rangeCount!=v.multiSelect.rangeCount&&(d={rangeCount:v.multiSelect.rangeCount})),d[y])return l=d[y];l=d[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(v,y,S,_){var w=v.end.row-v.start.row;return{text:S+y+_,selection:[0,v.start.column+1,w,v.end.column+(w?0:1)]}},m=function(v){v=v||{},this.add("braces","insertion",function(y,S,_,w,b){var C=_.getCursorPosition(),M=w.doc.getLine(C.row);if(b=="{"){p(_);var R=_.getSelectionRange(),T=w.doc.getTextRange(R);if(T!==""&&T!=="{"&&_.getWrapBehavioursEnabled())return g(R,T,"{","}");if(m.isSaneInsertion(_,w))return/[\]\}\)]/.test(M[C.column])||_.inMultiSelectMode||v.braces?(m.recordAutoInsert(_,w,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(_,w,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){p(_);var A=M.substring(C.column,C.column+1);if(A=="}"){var P=w.$findOpeningBracket("}",{column:C.column+1,row:C.row});if(P!==null&&m.isAutoInsertedClosing(C,M,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
`||b==`\r
`){p(_);var I="";m.isMaybeInsertedClosing(C,M)&&(I=a.stringRepeat("}",l.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var A=M.substring(C.column,C.column+1);if(A==="}"){var E=w.findMatchingBracket({row:C.row,column:C.column+1},"}");if(!E)return null;var L=this.$getIndent(w.getLine(E.row))}else if(I)var L=this.$getIndent(M);else{m.clearMaybeInsertedClosing();return}var O=L+w.getTabString();return{text:`
`+O+`
`+L+I,selection:[1,O.length,1,O.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,S,_,w,b){var C=w.doc.getTextRange(b);if(!b.isMultiLine()&&C=="{"){p(_);var M=w.doc.getLine(b.start.row),R=M.substring(b.end.column,b.end.column+1);if(R=="}")return b.end.column++,b;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,S,_,w,b){if(b=="("){p(_);var C=_.getSelectionRange(),M=w.doc.getTextRange(C);if(M!==""&&_.getWrapBehavioursEnabled())return g(C,M,"(",")");if(m.isSaneInsertion(_,w))return m.recordAutoInsert(_,w,")"),{text:"()",selection:[1,1]}}else if(b==")"){p(_);var R=_.getCursorPosition(),T=w.doc.getLine(R.row),A=T.substring(R.column,R.column+1);if(A==")"){var P=w.$findOpeningBracket(")",{column:R.column+1,row:R.row});if(P!==null&&m.isAutoInsertedClosing(R,T,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,S,_,w,b){var C=w.doc.getTextRange(b);if(!b.isMultiLine()&&C=="("){p(_);var M=w.doc.getLine(b.start.row),R=M.substring(b.start.column+1,b.start.column+2);if(R==")")return b.end.column++,b}}),this.add("brackets","insertion",function(y,S,_,w,b){if(b=="["){p(_);var C=_.getSelectionRange(),M=w.doc.getTextRange(C);if(M!==""&&_.getWrapBehavioursEnabled())return g(C,M,"[","]");if(m.isSaneInsertion(_,w))return m.recordAutoInsert(_,w,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){p(_);var R=_.getCursorPosition(),T=w.doc.getLine(R.row),A=T.substring(R.column,R.column+1);if(A=="]"){var P=w.$findOpeningBracket("]",{column:R.column+1,row:R.row});if(P!==null&&m.isAutoInsertedClosing(R,T,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,S,_,w,b){var C=w.doc.getTextRange(b);if(!b.isMultiLine()&&C=="["){p(_);var M=w.doc.getLine(b.start.row),R=M.substring(b.start.column+1,b.start.column+2);if(R=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(y,S,_,w,b){var C=w.$mode.$quotes||f;if(b.length==1&&C[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;p(_);var M=b,R=_.getSelectionRange(),T=w.doc.getTextRange(R);if(T!==""&&(T.length!=1||!C[T])&&_.getWrapBehavioursEnabled())return g(R,T,M,M);if(!T){var A=_.getCursorPosition(),P=w.doc.getLine(A.row),I=P.substring(A.column-1,A.column),E=P.substring(A.column,A.column+1),L=w.getTokenAt(A.row,A.column),O=w.getTokenAt(A.row,A.column+1);if(I=="\\"&&L&&/escape/.test(L.type))return null;var B=L&&/string|escape/.test(L.type),U=!O||/string|escape/.test(O.type),z;if(E==M)z=B!==U,z&&/string\.end/.test(O.type)&&(z=!1);else{if(B&&!U||B&&U)return null;var j=w.$mode.tokenRe;j.lastIndex=0;var q=j.test(I);j.lastIndex=0;var ne=j.test(E),G=w.$mode.$pairQuotesAfter,X=G&&G[M]&&G[M].test(I);if(!X&&q||ne||E&&!/[\s;,.})\]\\]/.test(E))return null;var ie=P[A.column-2];if(I==M&&(ie==M||j.test(ie)))return null;z=!0}return{text:z?M+M:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,S,_,w,b){var C=w.$mode.$quotes||f,M=w.doc.getTextRange(b);if(!b.isMultiLine()&&C.hasOwnProperty(M)){p(_);var R=w.doc.getLine(b.start.row),T=R.substring(b.start.column+1,b.start.column+2);if(T==M)return b.end.column++,b}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,S,_,w,b){if(y==="doc-start"&&(b===`
`||b===`\r
`)&&_.selection.isEmpty()){var C=_.getCursorPosition(),M=w.doc.getLine(C.row),R=w.doc.getLine(C.row+1),T=this.$getIndent(M);if(/\s*\*/.test(R))return/^\s*\*/.test(M)?{text:b+T+"* ",selection:[1,3+T.length,1,3+T.length]}:{text:b+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(M.substring(0,C.column)))return{text:b+T+" * "+b+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})};m.isSaneInsertion=function(v,y){var S=v.getCursorPosition(),_=new u(y,S.row,S.column);if(!this.$matchTokenType(_.getCurrentToken()||"text",h)){if(/[)}\]]/.test(v.session.getLine(S.row)[S.column]))return!0;var w=new u(y,S.row,S.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",h))return!1}return _.stepForward(),_.getCurrentTokenRow()!==S.row||this.$matchTokenType(_.getCurrentToken()||"text",c)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,S){var _=v.getCursorPosition(),w=y.doc.getLine(_.row);this.isAutoInsertedClosing(_,w,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=_.row,l.autoInsertedLineEnd=S+w.substr(_.column),l.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,S){var _=v.getCursorPosition(),w=y.doc.getLine(_.row);this.isMaybeInsertedClosing(_,w)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=_.row,l.maybeInsertedLineStart=w.substr(0,_.column)+S,l.maybeInsertedLineEnd=w.substr(_.column),l.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,S){return l.autoInsertedBrackets>0&&v.row===l.autoInsertedRow&&S===l.autoInsertedLineEnd[0]&&y.substr(v.column)===l.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return l.maybeInsertedBrackets>0&&v.row===l.maybeInsertedRow&&y.substr(v.column)===l.maybeInsertedLineEnd&&y.substr(0,v.column)==l.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},s.inherits(m,o),i.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,i,r){for(var s=[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],o=0,u=[],a=0;a<s.length;a+=2)u.push(o+=s[a]),s[a+1]&&u.push(45,o+=s[a+1]);i.wordChars=String.fromCharCode.apply(null,u)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,i,r){var s=n("../config"),o=n("../tokenizer").Tokenizer,u=n("./text_highlight_rules").TextHighlightRules,a=n("./behaviour/cstyle").CstyleBehaviour,h=n("../unicode"),c=n("../lib/lang"),l=n("../token_iterator").TokenIterator,d=n("../range").Range,f=function(){this.HighlightRules=u};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(p,g,m,v){var y=g.doc,S=!0,_=!0,w=1/0,b=g.getTabSize(),C=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var T=this.lineCommentStart.map(c.escapeRegExp).join("|"),M=this.lineCommentStart[0];else var T=c.escapeRegExp(this.lineCommentStart),M=this.lineCommentStart;T=new RegExp("^(\\s*)(?:"+T+") ?"),C=g.getUseSoftTabs();var I=function(ne,G){var X=ne.match(T);if(!!X){var ie=X[1].length,le=X[0].length;!O(ne,ie,le)&&X[0][le-1]==" "&&le--,y.removeInLine(G,ie,le)}},L=M+" ",P=function(ne,G){(!S||/\S/.test(ne))&&(O(ne,w,w)?y.insertInLine({row:G,column:w},L):y.insertInLine({row:G,column:w},M))},E=function(ne,G){return T.test(ne)},O=function(ne,G,X){for(var ie=0;G--&&ne.charAt(G)==" ";)ie++;if(ie%b!=0)return!1;for(var ie=0;ne.charAt(X++)==" ";)ie++;return b>2?ie%b!=b-1:ie%b==0}}else{if(!this.blockComment)return!1;var M=this.blockComment.start,R=this.blockComment.end,T=new RegExp("^(\\s*)(?:"+c.escapeRegExp(M)+")"),A=new RegExp("(?:"+c.escapeRegExp(R)+")\\s*$"),P=function(z,j){E(z,j)||(!S||/\S/.test(z))&&(y.insertInLine({row:j,column:z.length},R),y.insertInLine({row:j,column:w},M))},I=function(z,j){var q;(q=z.match(A))&&y.removeInLine(j,z.length-q[0].length,z.length),(q=z.match(T))&&y.removeInLine(j,q[1].length,q[0].length)},E=function(z,j){if(T.test(z))return!0;for(var q=g.getTokens(j),ne=0;ne<q.length;ne++)if(q[ne].type==="comment")return!0}}function B(z){for(var j=m;j<=v;j++)z(y.getLine(j),j)}var U=1/0;B(function(z,j){var q=z.search(/\S/);q!==-1?(q<w&&(w=q),_&&!E(z,j)&&(_=!1)):U>z.length&&(U=z.length)}),w==1/0&&(w=U,S=!1,_=!1),C&&w%b!=0&&(w=Math.floor(w/b)*b),B(_?I:P)},this.toggleBlockComment=function(p,g,m,v){var y=this.blockComment;if(!!y){!y.start&&y[0]&&(y=y[0]);var S=new l(g,v.row,v.column),_=S.getCurrentToken();g.selection;var w=g.selection.toOrientedRange(),b,C;if(_&&/comment/.test(_.type)){for(var M,R;_&&/comment/.test(_.type);){var T=_.value.indexOf(y.start);if(T!=-1){var A=S.getCurrentTokenRow(),P=S.getCurrentTokenColumn()+T;M=new d(A,P,A,P+y.start.length);break}_=S.stepBackward()}for(var S=new l(g,v.row,v.column),_=S.getCurrentToken();_&&/comment/.test(_.type);){var T=_.value.indexOf(y.end);if(T!=-1){var A=S.getCurrentTokenRow(),P=S.getCurrentTokenColumn()+T;R=new d(A,P,A,P+y.end.length);break}_=S.stepForward()}R&&g.remove(R),M&&(g.remove(M),b=M.start.row,C=-y.start.length)}else C=y.start.length,b=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);w.start.row==b&&(w.start.column+=C),w.end.row==b&&(w.end.column+=C),g.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(p,g,m){return this.$getIndent(g)},this.checkOutdent=function(p,g,m){return!1},this.autoOutdent=function(p,g,m){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var m=p[g],v=m.prototype.$id,y=s.$modes[v];y||(s.$modes[v]=y=new m),s.$modes[g]||(s.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g<S.length;g++)(function(w){var b=S[g],C=w[b];w[S[g]]=function(){return this.$delegator(b,arguments,C)}})(this)},this.$delegator=function(p,g,m){var v=g[0]||"start";if(typeof v!="string"){if(Array.isArray(v[2])){var y=v[2][v[2].length-1],S=this.$modes[y];if(S)return S[p].apply(S,[v[1]].concat([].slice.call(g,1)))}v=v[0]||"start"}for(var _=0;_<this.$embeds.length;_++)if(!!this.$modes[this.$embeds[_]]){var w=v.split(this.$embeds[_]);if(!w[0]&&w[1]){g[0]=w[1];var S=this.$modes[this.$embeds[_]];return S[p].apply(S,g)}}var b=m.apply(this,g);return m?b:void 0},this.transformAction=function(p,g,m,v,y){if(this.$behaviour){var S=this.$behaviour.getBehaviours();for(var _ in S)if(S[_][g]){var w=S[_][g].apply(this,arguments);if(w)return w}}},this.getKeywords=function(p){if(!this.completionKeywords){var g=this.$tokenizer.rules,m=[];for(var v in g)for(var y=g[v],S=0,_=y.length;S<_;S++)if(typeof y[S].token=="string")/keyword|support|storage/.test(y[S].token)&&m.push(y[S].regex);else if(typeof y[S].token=="object"){for(var w=0,b=y[S].token.length;w<b;w++)if(/keyword|support|storage/.test(y[S].token[w])){var v=y[S].regex.match(/\(.+?\)/g)[w];m.push(v.substr(1,v.length-2))}}this.completionKeywords=m}return p?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(p,g,m,v){var y=this.$keywordList||this.$createKeywordList();return y.map(function(S){return{name:S,value:S,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(f.prototype),i.Mode=f}),ace.define("ace/apply_delta",["require","exports","module"],function(n,i,r){i.applyDelta=function(s,o,u){var a=o.start.row,h=o.start.column,c=s[a]||"";switch(o.action){case"insert":var l=o.lines;if(l.length===1)s[a]=c.substring(0,h)+o.lines[0]+c.substring(h);else{var d=[a,1].concat(o.lines);s.splice.apply(s,d),s[a]=c.substring(0,h)+s[a],s[a+o.lines.length-1]+=c.substring(h)}break;case"remove":var f=o.end.column,p=o.end.row;a===p?s[a]=c.substring(0,h)+c.substring(f):s.splice(a,p-a+1,c.substring(0,h)+s[p].substring(f));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,i,r){var s=n("./lib/oop"),o=n("./lib/event_emitter").EventEmitter,u=function(){function c(l,d,f){this.$onChange=this.onChange.bind(this),this.attach(l),typeof f>"u"?this.setPosition(d.row,d.column):this.setPosition(d,f)}return c.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},c.prototype.getDocument=function(){return this.document},c.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var d=h(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(d.row,d.column,!0)}},c.prototype.setPosition=function(l,d,f){var p;if(f?p={row:l,column:d}:p=this.$clipPositionToDocument(l,d),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},c.prototype.detach=function(){this.document.off("change",this.$onChange)},c.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},c.prototype.$clipPositionToDocument=function(l,d){var f={};return l>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):l<0?(f.row=0,f.column=0):(f.row=l,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,d))),d<0&&(f.column=0),f},c}();u.prototype.$insertRight=!1,s.implement(u.prototype,o);function a(c,l,d){var f=d?c.column<=l.column:c.column<l.column;return c.row<l.row||c.row==l.row&&f}function h(c,l,d){var f=c.action=="insert",p=(f?1:-1)*(c.end.row-c.start.row),g=(f?1:-1)*(c.end.column-c.start.column),m=c.start,v=f?m:c.end;return a(l,m,d)?{row:l.row,column:l.column}:a(v,l,!d)?{row:l.row+p,column:l.column+(l.row==v.row?g:0)}:{row:m.row,column:m.column}}i.Anchor=u}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,i,r){var s=n("./lib/oop"),o=n("./apply_delta").applyDelta,u=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,h=n("./anchor").Anchor,c=function(){function l(d){this.$lines=[""],d.length===0?this.$lines=[""]:Array.isArray(d)?this.insertMergedLines({row:0,column:0},d):this.insert({row:0,column:0},d)}return l.prototype.setValue=function(d){var f=this.getLength()-1;this.remove(new a(0,0,f,this.getLine(f).length)),this.insert({row:0,column:0},d||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(d,f){return new h(this,d,f)},l.prototype.$detectNewLine=function(d){var f=d.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=f?f[1]:`
`,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},l.prototype.setNewLineMode=function(d){this.$newLineMode!==d&&(this.$newLineMode=d,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(d){return d==`\r
`||d=="\r"||d==`
`},l.prototype.getLine=function(d){return this.$lines[d]||""},l.prototype.getLines=function(d,f){return this.$lines.slice(d,f+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(d){return this.getLinesForRange(d).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(d){var f;if(d.start.row===d.end.row)f=[this.getLine(d.start.row).substring(d.start.column,d.end.column)];else{f=this.getLines(d.start.row,d.end.row),f[0]=(f[0]||"").substring(d.start.column);var p=f.length-1;d.end.row-d.start.row==p&&(f[p]=f[p].substring(0,d.end.column))}return f},l.prototype.insertLines=function(d,f){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(d,f)},l.prototype.removeLines=function(d,f){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(d,f)},l.prototype.insertNewLine=function(d){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(d,["",""])},l.prototype.insert=function(d,f){return this.getLength()<=1&&this.$detectNewLine(f),this.insertMergedLines(d,this.$split(f))},l.prototype.insertInLine=function(d,f){var p=this.clippedPos(d.row,d.column),g=this.pos(d.row,d.column+f.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[f]},!0),this.clonePos(g)},l.prototype.clippedPos=function(d,f){var p=this.getLength();d===void 0?d=p:d<0?d=0:d>=p&&(d=p-1,f=void 0);var g=this.getLine(d);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:d,column:f}},l.prototype.clonePos=function(d){return{row:d.row,column:d.column}},l.prototype.pos=function(d,f){return{row:d,column:f}},l.prototype.$clipPosition=function(d){var f=this.getLength();return d.row>=f?(d.row=Math.max(0,f-1),d.column=this.getLine(f-1).length):(d.row=Math.max(0,d.row),d.column=Math.min(Math.max(d.column,0),this.getLine(d.row).length)),d},l.prototype.insertFullLines=function(d,f){d=Math.min(Math.max(d,0),this.getLength());var p=0;d<this.getLength()?(f=f.concat([""]),p=0):(f=[""].concat(f),d--,p=this.$lines[d].length),this.insertMergedLines({row:d,column:p},f)},l.prototype.insertMergedLines=function(d,f){var p=this.clippedPos(d.row,d.column),g={row:p.row+f.length-1,column:(f.length==1?p.column:0)+f[f.length-1].length};return this.applyDelta({start:p,end:g,action:"insert",lines:f}),this.clonePos(g)},l.prototype.remove=function(d){var f=this.clippedPos(d.start.row,d.start.column),p=this.clippedPos(d.end.row,d.end.column);return this.applyDelta({start:f,end:p,action:"remove",lines:this.getLinesForRange({start:f,end:p})}),this.clonePos(f)},l.prototype.removeInLine=function(d,f,p){var g=this.clippedPos(d,f),m=this.clippedPos(d,p);return this.applyDelta({start:g,end:m,action:"remove",lines:this.getLinesForRange({start:g,end:m})},!0),this.clonePos(g)},l.prototype.removeFullLines=function(d,f){d=Math.min(Math.max(0,d),this.getLength()-1),f=Math.min(Math.max(0,f),this.getLength()-1);var p=f==this.getLength()-1&&d>0,g=f<this.getLength()-1,m=p?d-1:d,v=p?this.getLine(m).length:0,y=g?f+1:f,S=g?0:this.getLine(y).length,_=new a(m,v,y,S),w=this.$lines.slice(d,f+1);return this.applyDelta({start:_.start,end:_.end,action:"remove",lines:this.getLinesForRange(_)}),w},l.prototype.removeNewLine=function(d){d<this.getLength()-1&&d>=0&&this.applyDelta({start:this.pos(d,this.getLine(d).length),end:this.pos(d+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(d,f){if(d instanceof a||(d=a.fromPoints(d.start,d.end)),f.length===0&&d.isEmpty())return d.start;if(f==this.getTextRange(d))return d.end;this.remove(d);var p;return f?p=this.insert(d.start,f):p=d.start,p},l.prototype.applyDeltas=function(d){for(var f=0;f<d.length;f++)this.applyDelta(d[f])},l.prototype.revertDeltas=function(d){for(var f=d.length-1;f>=0;f--)this.revertDelta(d[f])},l.prototype.applyDelta=function(d,f){var p=d.action=="insert";(p?d.lines.length<=1&&!d.lines[0]:!a.comparePoints(d.start,d.end))||(p&&d.lines.length>2e4?this.$splitAndapplyLargeDelta(d,2e4):(o(this.$lines,d,f),this._signal("change",d)))},l.prototype.$safeApplyDelta=function(d){var f=this.$lines.length;(d.action=="remove"&&d.start.row<f&&d.end.row<f||d.action=="insert"&&d.start.row<=f)&&this.applyDelta(d)},l.prototype.$splitAndapplyLargeDelta=function(d,f){for(var p=d.lines,g=p.length-f+1,m=d.start.row,v=d.start.column,y=0,S=0;y<g;y=S){S+=f-1;var _=p.slice(y,S);_.push(""),this.applyDelta({start:this.pos(m+y,v),end:this.pos(m+S,v=0),action:d.action,lines:_},!0)}d.lines=p.slice(y),d.start.row=m+y,d.start.column=v,this.applyDelta(d,!0)},l.prototype.revertDelta=function(d){this.$safeApplyDelta({start:this.clonePos(d.start),end:this.clonePos(d.end),action:d.action=="insert"?"remove":"insert",lines:d.lines.slice()})},l.prototype.indexToPosition=function(d,f){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,m=f||0,v=p.length;m<v;m++)if(d-=p[m].length+g,d<0)return{row:m,column:d+p[m].length+g};return{row:v-1,column:d+p[v-1].length+g}},l.prototype.positionToIndex=function(d,f){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,m=0,v=Math.min(d.row,p.length),y=f||0;y<v;++y)m+=p[y].length+g;return m+d.column},l.prototype.$split=function(d){return d.split(/\r\n|\r|\n/)},l}();c.prototype.$autoNewLine="",c.prototype.$newLineMode="auto",s.implement(c.prototype,u),i.Document=c}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,i,r){var s=n("./lib/oop"),o=n("./lib/event_emitter").EventEmitter,u=function(){function a(h,c){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var l=this;this.$worker=function(){if(!!l.running){for(var d=new Date,f=l.currentLine,p=-1,g=l.doc,m=f;l.lines[f];)f++;var v=g.getLength(),y=0;for(l.running=!1;f<v;){l.$tokenizeRow(f),p=f;do f++;while(l.lines[f]);if(y++,y%5===0&&new Date-d>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=f,p==-1&&(p=f),m<=p&&l.fireUpdateEvent(m,p)}}}return a.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(h,c){var l={first:h,last:c};this._signal("update",{data:l})},a.prototype.start=function(h){this.currentLine=Math.min(h||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)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(h){var c=h.start.row,l=h.end.row-c;if(l===0)this.lines[c]=null;else if(h.action=="remove")this.lines.splice(c,l+1,null),this.states.splice(c,l+1,null);else{var d=Array(l+1);d.unshift(c,1),this.lines.splice.apply(this.lines,d),this.states.splice.apply(this.states,d)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},a.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},a.prototype.$tokenizeRow=function(h){var c=this.doc.getLine(h),l=this.states[h-1],d=this.tokenizer.getLineTokens(c,l,h);return this.states[h]+""!=d.state+""?(this.states[h]=d.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=d.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();s.implement(u.prototype,o),i.BackgroundTokenizer=u}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,i,r){var s=n("./lib/lang"),o=n("./range").Range,u=function(){function a(h,c,l){l===void 0&&(l="text"),this.setRegexp(h),this.clazz=c,this.type=l}return a.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},a.prototype.update=function(h,c,l,d){if(!!this.regExp)for(var f=d.firstRow,p=d.lastRow,g={},m=f;m<=p;m++){var v=this.cache[m];v==null&&(v=s.getMatchOffsets(l.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(w){return new o(m,w.offset,m,w.offset+w.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var S=v[y].toScreenRange(l),_=S.toString();g[_]||(g[_]=!0,c.drawSingleLineMarker(h,S,this.clazz,d))}}},a}();u.prototype.MAX_RANGES=500,i.SearchHighlight=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,i,r){var s=n("../range").Range,o=function(){function u(a,h){this.foldData=a,Array.isArray(h)?this.folds=h:h=this.folds=[h];var c=h[h.length-1];this.range=new s(h[0].start.row,h[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return u.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(h){h.start.row+=a,h.end.row+=a})},u.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(h,c){return-h.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},u.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},u.prototype.walk=function(a,h,c){var l=0,d=this.folds,f,p,g,m=!0;h==null&&(h=this.end.row,c=this.end.column);for(var v=0;v<d.length;v++){if(f=d[v],p=f.range.compareStart(h,c),p==-1){a(null,h,c,l,m);return}if(g=a(null,f.start.row,f.start.column,l,m),g=!g&&a(f.placeholder,f.start.row,f.start.column,l),g||p===0)return;m=!f.sameRow,l=f.end.column}a(null,h,c,l,m)},u.prototype.getNextFoldTo=function(a,h){for(var c,l,d=0;d<this.folds.length;d++){if(c=this.folds[d],l=c.range.compareEnd(a,h),l==-1)return{fold:c,kind:"after"};if(l===0)return{fold:c,kind:"inside"}}return null},u.prototype.addRemoveChars=function(a,h,c){var l=this.getNextFoldTo(a,h),d,f;if(l){if(d=l.fold,l.kind=="inside"&&d.start.column!=h&&d.start.row!=a)window.console&&window.console.log(a,h,d);else if(d.start.row==a){f=this.folds;var p=f.indexOf(d);for(p===0&&(this.start.column+=c),p;p<f.length;p++){if(d=f[p],d.start.column+=c,!d.sameRow)return;d.end.column+=c}this.end.column+=c}}},u.prototype.split=function(a,h){var c=this.getNextFoldTo(a,h);if(!c||c.kind=="inside")return null;var l=c.fold,d=this.folds,f=this.foldData,p=d.indexOf(l),g=d[p-1];this.end.row=g.end.row,this.end.column=g.end.column,d=d.splice(p,d.length-p);var m=new u(f,d);return f.splice(f.indexOf(this)+1,0,m),m},u.prototype.merge=function(a){for(var h=a.folds,c=0;c<h.length;c++)this.addFold(h[c]);var l=this.foldData;l.splice(l.indexOf(a),1)},u.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(h){a.push("  "+h.toString())}),a.push("]"),a.join(`
`)},u.prototype.idxToPosition=function(a){for(var h=0,c=0;c<this.folds.length;c++){var l=this.folds[c];if(a-=l.start.column-h,a<0)return{row:l.start.row,column:l.start.column+a};if(a-=l.placeholder.length,a<0)return l.start;h=l.end.column}return{row:this.end.row,column:this.end.column+a}},u}();i.FoldLine=o}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,i,r){var s=n("./range").Range,o=s.comparePoints,u=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(h,c,l){for(var d=this.ranges,f=l||0;f<d.length;f++){var p=d[f],g=o(h,p.end);if(!(g>0)){var m=o(h,p.start);return g===0?c&&m!==0?-f-2:f:m>0||m===0&&!c?f:-f-1}}return-f-1},a.prototype.add=function(h){var c=!h.isEmpty(),l=this.pointIndex(h.start,c);l<0&&(l=-l-1);var d=this.pointIndex(h.end,c,l);return d<0?d=-d-1:d++,this.ranges.splice(l,d-l,h)},a.prototype.addList=function(h){for(var c=[],l=h.length;l--;)c.push.apply(c,this.add(h[l]));return c},a.prototype.substractPoint=function(h){var c=this.pointIndex(h);if(c>=0)return this.ranges.splice(c,1)},a.prototype.merge=function(){var h=[],c=this.ranges;c=c.sort(function(g,m){return o(g.start,m.start)});for(var l=c[0],d,f=1;f<c.length;f++){d=l,l=c[f];var p=o(d.end,l.start);p<0||p==0&&!d.isEmpty()&&!l.isEmpty()||(o(d.end,l.end)<0&&(d.end.row=l.end.row,d.end.column=l.end.column),c.splice(f,1),h.push(l),l=d,f--)}return this.ranges=c,h},a.prototype.contains=function(h,c){return this.pointIndex({row:h,column:c})>=0},a.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},a.prototype.rangeAtPoint=function(h){var c=this.pointIndex(h);if(c>=0)return this.ranges[c]},a.prototype.clipRows=function(h,c){var l=this.ranges;if(l[0].start.row>c||l[l.length-1].start.row<h)return[];var d=this.pointIndex({row:h,column:0});d<0&&(d=-d-1);var f=this.pointIndex({row:c,column:0},d);f<0&&(f=-f-1);for(var p=[],g=d;g<f;g++)p.push(l[g]);return p},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){!this.session||(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(h){for(var c=h.start,l=h.end,d=c.row,f=l.row,p=this.ranges,g=0,m=p.length;g<m;g++){var v=p[g];if(v.end.row>=d)break}if(h.action=="insert")for(var y=f-d,S=-c.column+l.column;g<m;g++){var v=p[g];if(v.start.row>d)break;if(v.start.row==d&&v.start.column>=c.column&&(v.start.column==c.column&&this.$bias<=0||(v.start.column+=S,v.start.row+=y)),v.end.row==d&&v.end.column>=c.column){if(v.end.column==c.column&&this.$bias<0)continue;v.end.column==c.column&&S>0&&g<m-1&&v.end.column>v.start.column&&v.end.column==p[g+1].start.column&&(v.end.column-=S),v.end.column+=S,v.end.row+=y}}else for(var y=d-f,S=c.column-l.column;g<m;g++){var v=p[g];if(v.start.row>f)break;v.end.row<f&&(d<v.end.row||d==v.end.row&&c.column<v.end.column)?(v.end.row=d,v.end.column=c.column):v.end.row==f?v.end.column<=l.column?(y||v.end.column>c.column)&&(v.end.column=c.column,v.end.row=c.row):(v.end.column+=S,v.end.row+=y):v.end.row>f&&(v.end.row+=y),v.start.row<f&&(d<v.start.row||d==v.start.row&&c.column<v.start.column)?(v.start.row=d,v.start.column=c.column):v.start.row==f?v.start.column<=l.column?(y||v.start.column>c.column)&&(v.start.column=c.column,v.start.row=c.row):(v.start.column+=S,v.start.row+=y):v.start.row>f&&(v.start.row+=y)}if(y!=0&&g<m)for(;g<m;g++){var v=p[g];v.start.row+=y,v.end.row+=y}},a}();u.prototype.comparePoints=o,i.RangeList=u}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,i,r){var s=this&&this.__extends||function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},d(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),o=n("../range_list").RangeList,u=function(d){s(f,d);function f(p,g){var m=d.call(this)||this;return m.foldLine=null,m.placeholder=g,m.range=p,m.start=p.start,m.end=p.end,m.sameRow=p.start.row==p.end.row,m.subFolds=m.ranges=[],m}return f.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},f.prototype.setFoldLine=function(p){this.foldLine=p,this.subFolds.forEach(function(g){g.setFoldLine(p)})},f.prototype.clone=function(){var p=this.range.clone(),g=new f(p,this.placeholder);return this.subFolds.forEach(function(m){g.subFolds.push(m.clone())}),g.collapseChildren=this.collapseChildren,g},f.prototype.addSubFold=function(p){if(!this.range.isEqual(p)){h(p,this.start);for(var S=p.start.row,_=p.start.column,g=0,m=-1;g<this.subFolds.length&&(m=this.subFolds[g].range.compare(S,_),m==1);g++);var v=this.subFolds[g],y=0;if(m==0){if(v.range.containsRange(p))return v.addSubFold(p);y=1}for(var S=p.range.end.row,_=p.range.end.column,w=g,m=-1;w<this.subFolds.length&&(m=this.subFolds[w].range.compare(S,_),m==1);w++);m==0&&w++;for(var b=this.subFolds.splice(g,w-g,p),C=m==0?b.length-1:b.length,M=y;M<C;M++)p.addSubFold(b[M]);return p.setFoldLine(this.foldLine),p}},f.prototype.restoreRange=function(p){return l(p,this.start)},f}(o);function a(d,f){d.row-=f.row,d.row==0&&(d.column-=f.column)}function h(d,f){a(d.start,f),a(d.end,f)}function c(d,f){d.row==0&&(d.column+=f.column),d.row+=f.row}function l(d,f){c(d.start,f),c(d.end,f)}i.Fold=u}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,i,r){var s=n("../range").Range,o=n("./fold_line").FoldLine,u=n("./fold").Fold,a=n("../token_iterator").TokenIterator,h=n("../mouse/mouse_event").MouseEvent;function c(){this.getFoldAt=function(l,d,f){var p=this.getFoldLine(l);if(!p)return null;for(var g=p.folds,m=0;m<g.length;m++){var v=g[m].range;if(v.contains(l,d)){if(f==1&&v.isEnd(l,d)&&!v.isEmpty())continue;if(f==-1&&v.isStart(l,d)&&!v.isEmpty())continue;return g[m]}}},this.getFoldsInRange=function(l){var d=l.start,f=l.end,p=this.$foldData,g=[];d.column+=1,f.column-=1;for(var m=0;m<p.length;m++){var v=p[m].range.compareRange(l);if(v!=2){if(v==-2)break;for(var y=p[m].folds,S=0;S<y.length;S++){var _=y[S];if(v=_.range.compareRange(l),v==-2)break;if(v==2)continue;if(v==42)break;g.push(_)}}}return d.column-=1,f.column+=1,g},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var d=[];l.forEach(function(f){d=d.concat(this.getFoldsInRange(f))},this)}else var d=this.getFoldsInRange(l);return d},this.getAllFolds=function(){for(var l=[],d=this.$foldData,f=0;f<d.length;f++)for(var p=0;p<d[f].folds.length;p++)l.push(d[f].folds[p]);return l},this.getFoldStringAt=function(l,d,f,p){if(p=p||this.getFoldLine(l),!p)return null;for(var g={end:{column:0}},m,v,y=0;y<p.folds.length;y++){v=p.folds[y];var S=v.range.compareEnd(l,d);if(S==-1){m=this.getLine(v.start.row).substring(g.end.column,v.start.column);break}else if(S===0)return null;g=v}return m||(m=this.getLine(v.start.row).substring(g.end.column)),f==-1?m.substring(0,d-g.end.column):f==1?m.substring(d-g.end.column):m},this.getFoldLine=function(l,d){var f=this.$foldData,p=0;for(d&&(p=f.indexOf(d)),p==-1&&(p=0),p;p<f.length;p++){var g=f[p];if(g.start.row<=l&&g.end.row>=l)return g;if(g.end.row>l)return null}return null},this.getNextFoldLine=function(l,d){var f=this.$foldData,p=0;for(d&&(p=f.indexOf(d)),p==-1&&(p=0),p;p<f.length;p++){var g=f[p];if(g.end.row>=l)return g}return null},this.getFoldedRowCount=function(l,d){for(var f=this.$foldData,p=d-l+1,g=0;g<f.length;g++){var m=f[g],v=m.end.row,y=m.start.row;if(v>=d){y<d&&(y>=l?p-=d-y:p=0);break}else v>=l&&(y>=l?p-=v-y:p-=v-l+1)}return p},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(d,f){return d.start.row-f.start.row}),l},this.addFold=function(l,d){var f=this.$foldData,p=!1,g;l instanceof u?g=l:(g=new u(d,l),g.collapseChildren=d.collapseChildren),this.$clipRangeToDocument(g.range);var m=g.start.row,v=g.start.column,y=g.end.row,S=g.end.column,_=this.getFoldAt(m,v,1),w=this.getFoldAt(y,S,-1);if(_&&w==_)return _.addSubFold(g);_&&!_.range.isStart(m,v)&&this.removeFold(_),w&&!w.range.isEnd(y,S)&&this.removeFold(w);var b=this.getFoldsInRange(g.range);b.length>0&&(this.removeFolds(b),g.collapseChildren||b.forEach(function(T){g.addSubFold(T)}));for(var C=0;C<f.length;C++){var M=f[C];if(y==M.start.row){M.addFold(g),p=!0;break}else if(m==M.end.row){if(M.addFold(g),p=!0,!g.sameRow){var R=f[C+1];if(R&&R.start.row==y){M.merge(R);break}}break}else if(y<=M.start.row)break}return p||(M=this.$addFoldLine(new o(this.$foldData,g))),this.$useWrapMode?this.$updateWrapData(M.start.row,M.start.row):this.$updateRowLengthCache(M.start.row,M.start.row),this.$modified=!0,this._signal("changeFold",{data:g,action:"add"}),g},this.addFolds=function(l){l.forEach(function(d){this.addFold(d)},this)},this.removeFold=function(l){var d=l.foldLine,f=d.start.row,p=d.end.row,g=this.$foldData,m=d.folds;if(m.length==1)g.splice(g.indexOf(d),1);else if(d.range.isEnd(l.end.row,l.end.column))m.pop(),d.end.row=m[m.length-1].end.row,d.end.column=m[m.length-1].end.column;else if(d.range.isStart(l.start.row,l.start.column))m.shift(),d.start.row=m[0].start.row,d.start.column=m[0].start.column;else if(l.sameRow)m.splice(m.indexOf(l),1);else{var v=d.split(l.start.row,l.start.column);m=v.folds,m.shift(),v.start.row=m[0].start.row,v.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(f,p):this.$updateRowLengthCache(f,p)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var d=[],f=0;f<l.length;f++)d.push(l[f]);d.forEach(function(p){this.removeFold(p)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(d){l.restoreRange(d),this.addFold(d)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(d){this.expandFold(d)},this)},this.unfold=function(l,d){var f,p;if(l==null)f=new s(0,0,this.getLength(),0),d==null&&(d=!0);else if(typeof l=="number")f=new s(l,0,l,this.getLine(l).length);else if("row"in l)f=s.fromPoints(l,l);else{if(Array.isArray(l))return p=[],l.forEach(function(m){p=p.concat(this.unfold(m))},this),p;f=l}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&s.comparePoints(p[0].start,f.start)<0&&s.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(d!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(l,d){return!!this.getFoldLine(l,d)},this.getRowFoldEnd=function(l,d){var f=this.getFoldLine(l,d);return f?f.end.row:l},this.getRowFoldStart=function(l,d){var f=this.getFoldLine(l,d);return f?f.start.row:l},this.getFoldDisplayLine=function(l,d,f,p,g){p==null&&(p=l.start.row),g==null&&(g=0),d==null&&(d=l.end.row),f==null&&(f=this.getLine(d).length);var m=this.doc,v="";return l.walk(function(y,S,_,w){if(!(S<p)){if(S==p){if(_<g)return;w=Math.max(g,w)}y!=null?v+=y:v+=m.getLine(S).substring(w,_)}},d,f),v},this.getDisplayLine=function(l,d,f,p){var g=this.getFoldLine(l);if(g)return this.getFoldDisplayLine(g,l,d,f,p);var m;return m=this.doc.getLine(l),m.substring(p||0,d||m.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(d){var f=d.folds.map(function(p){return p.clone()});return new o(l,f)}),l},this.toggleFold=function(l){var d=this.selection,f=d.getRange(),p,g;if(f.isEmpty()){var m=f.start;if(p=this.getFoldAt(m.row,m.column),p){this.expandFold(p);return}else(g=this.findMatchingBracket(m))?f.comparePoint(g)==1?f.end=g:(f.start=g,f.start.column++,f.end.column--):(g=this.findMatchingBracket({row:m.row,column:m.column+1}))?(f.comparePoint(g)==1?f.end=g:f.start=g,f.start.column++):f=this.getCommentFoldRange(m.row,m.column)||f}else{var v=this.getFoldsInRange(f);if(l&&v.length){this.expandFolds(v);return}else v.length==1&&(p=v[0])}if(p||(p=this.getFoldAt(f.start.row,f.start.column)),p&&p.range.toString()==f.toString()){this.expandFold(p);return}var y="...";if(!f.isMultiLine()){if(y=this.getTextRange(f),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,f)},this.getCommentFoldRange=function(l,d,f){var p=new a(this,l,d),g=p.getCurrentToken(),m=g&&g.type;if(g&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var v=new RegExp(m),y=new s;if(f!=1){do g=p.stepBackward();while(g&&v.test(g.type)&&!/^comment.end/.test(g.type));g=p.stepForward()}if(y.start.row=p.getCurrentTokenRow(),y.start.column=p.getCurrentTokenColumn()+(/^comment.start/.test(g.type)?g.value.length:2),p=new a(this,l,d),f!=-1){var S=-1;do if(g=p.stepForward(),S==-1){var _=this.getState(p.$row);v.test(_)||(S=p.$row)}else if(p.$row>S)break;while(g&&v.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return y.end.row=p.getCurrentTokenRow(),y.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(y.end.column+=g.value.length-2),y}},this.foldAll=function(l,d,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(!!g){d=d||this.getLength(),l=l||0;for(var m=l;m<d;m++)if(g[m]==null&&(g[m]=this.getFoldWidget(m)),g[m]=="start"&&!(p&&!p(m))){var v=this.getFoldWidgetRange(m);v&&v.isMultiLine()&&v.end.row<=d&&v.start.row>=l&&(m=v.end.row,v.collapseChildren=f,this.addFold("...",v))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(d){for(var f=l.getTokens(d),p=0;p<f.length;p++){var g=f[p];if(!(g.type=="text"&&/^\s+$/.test(g.value)))return!!/comment/.test(g.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var d=this.$foldMode;this.$setFolding(null),this.$setFolding(d)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(l,d){var f=this.foldWidgets;if(!f||d&&f[l])return{};for(var p=l-1,g;p>=0;){var m=f[p];if(m==null&&(m=f[p]=this.getFoldWidget(p)),m=="start"){var v=this.getFoldWidgetRange(p);if(g||(g=v),v&&v.end.row>=l)break}p--}return{range:p!==-1&&v,firstRange:g}},this.onFoldWidgetClick=function(l,d){d instanceof h&&(d=d.domEvent);var f={children:d.shiftKey,all:d.ctrlKey||d.metaKey,siblings:d.altKey},p=this.$toggleFoldWidget(l,f);if(!p){var g=d.target||d.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,d){if(!!this.getFoldWidget){var f=this.getFoldWidget(l),p=this.getLine(l),g=f==="end"?-1:1,m=this.getFoldAt(l,g===-1?0:p.length,g);if(m)return d.children||d.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(l,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(d.siblings){var y=this.getParentFoldRangeData(l);if(y.range)var S=y.range.start.row+1,_=y.range.end.row;this.foldAll(S,_,d.all?1e4:0)}else d.children?(_=v?v.end.row:this.getLength(),this.foldAll(l+1,_,d.all?1e4:0)):v&&(d.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(l){var d=this.selection.getCursor().row;d=this.getRowFoldStart(d);var f=this.$toggleFoldWidget(d,{});if(!f){var p=this.getParentFoldRangeData(d,!0);if(f=p.range||p.firstRange,f){d=f.start.row;var g=this.getFoldAt(d,this.getLine(d).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(l){var d=l.start.row,f=l.end.row-d;if(f===0)this.foldWidgets[d]=null;else if(l.action=="remove")this.foldWidgets.splice(d,f+1,null);else{var p=Array(f+1);p.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(l){var d=l.data;d.first!=d.last&&this.foldWidgets.length>d.first&&this.foldWidgets.splice(d.first,this.foldWidgets.length)}}i.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,i,r){var s=n("../token_iterator").TokenIterator,o=n("../range").Range;function u(){this.findMatchingBracket=function(a,h){if(a.column==0)return null;var c=h||this.getLine(a.row).charAt(a.column-1);if(c=="")return null;var l=c.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],a):this.$findOpeningBracket(l[2],a):null},this.getBracketRange=function(a){var h=this.getLine(a.row),c=!0,l,d=h.charAt(a.column-1),f=d&&d.match(/([\(\[\{])|([\)\]\}])/);if(f||(d=h.charAt(a.column),a={row:a.row,column:a.column+1},f=d&&d.match(/([\(\[\{])|([\)\]\}])/),c=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],a);if(!p)return null;l=o.fromPoints(a,p),c||(l.end.column++,l.start.column--),l.cursor=l.end}else{var p=this.$findOpeningBracket(f[2],a);if(!p)return null;l=o.fromPoints(p,a),c||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(a,h){var c=this.getLine(a.row),l=/([\(\[\{])|([\)\]\}])/,d=!h&&c.charAt(a.column-1),f=d&&d.match(l);if(f||(d=(h===void 0||h)&&c.charAt(a.column),a={row:a.row,column:a.column+1},f=d&&d.match(l)),!f)return null;var p=new o(a.row,a.column-1,a.row,a.column),g=f[1]?this.$findClosingBracket(f[1],a):this.$findOpeningBracket(f[2],a);if(!g)return[p];var m=new o(g.row,g.column,g.row,g.column+1);return[p,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,h,c){var l=this.$brackets[a],d=1,f=new s(this,h.row,h.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=h.column-f.getCurrentTokenColumn()-2,m=p.value;;){for(;g>=0;){var v=m.charAt(g);if(v==l){if(d-=1,d==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else v==a&&(d+=1);g-=1}do p=f.stepBackward();while(p&&!c.test(p.type));if(p==null)break;m=p.value,g=m.length-1}return null}},this.$findClosingBracket=function(a,h,c){var l=this.$brackets[a],d=1,f=new s(this,h.row,h.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){c||(c=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=h.column-f.getCurrentTokenColumn();;){for(var m=p.value,v=m.length;g<v;){var y=m.charAt(g);if(y==l){if(d-=1,d==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else y==a&&(d+=1);g+=1}do p=f.stepForward();while(p&&!c.test(p.type));if(p==null)break;g=0}return null}},this.getMatchingTags=function(a){var h=new s(this,a.row,a.column),c=this.$findTagName(h);if(!!c){var l=h.stepBackward();return l.value==="<"?this.$findClosingTag(h,c):this.$findOpeningTag(h,c)}},this.$findTagName=function(a){var h=a.getCurrentToken(),c=!1,l=!1;if(h&&h.type.indexOf("tag-name")===-1)do l?h=a.stepBackward():h=a.stepForward(),h&&(h.value==="/>"?l=!0:h.type.indexOf("tag-name")!==-1&&(c=!0));while(h&&!c);return h},this.$findClosingTag=function(a,h){var c,l=h.value,d=h.value,f=0,p=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);h=a.stepForward();var g=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length),m=!1;do if(c=h,h=a.stepForward(),h){if(h.value===">"&&!m){var v=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);m=!0}if(h.type.indexOf("tag-name")!==-1){if(l=h.value,d===l){if(c.value==="<")f++;else if(c.value==="</"&&(f--,f<0)){a.stepBackward();var y=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);h=a.stepForward();var S=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h=a.stepForward(),h&&h.value===">")var _=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(d===l&&h.value==="/>"&&(f--,f<0))var y=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),S=y,_=S,v=new o(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(h&&f>=0);if(p&&v&&y&&_&&g&&S)return{openTag:new o(p.start.row,p.start.column,v.end.row,v.end.column),closeTag:new o(y.start.row,y.start.column,_.end.row,_.end.column),openTagName:g,closeTagName:S}},this.$findOpeningTag=function(a,h){var c=a.getCurrentToken(),l=h.value,d=0,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,m=new o(f,p,f,g);a.stepForward();var v=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h=a.stepForward(),!(!h||h.value!==">")){var y=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(h=c,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+h.value.length,c=a.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(l===h.value)if(c.value==="<"){if(d++,d>0){var S=new o(f,p,f,g),_=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do h=a.stepForward();while(h&&h.value!==">");var w=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else c.value==="</"&&d--}else if(h.value==="/>"){for(var b=0,C=c;C;){if(C.type.indexOf("tag-name")!==-1&&C.value===l){d--;break}else if(C.value==="<")break;C=a.stepBackward(),b++}for(var M=0;M<b;M++)a.stepForward()}}while(c&&d<=0);if(_&&w&&m&&y&&S&&v)return{openTag:new o(_.start.row,_.start.column,w.end.row,w.end.column),closeTag:new o(m.start.row,m.start.column,y.end.row,y.end.column),openTagName:S,closeTagName:v}}}}i.BracketMatch=u}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,i,r){var s=n("./lib/oop"),o=n("./lib/lang"),u=n("./bidihandler").BidiHandler,a=n("./config"),h=n("./lib/event_emitter").EventEmitter,c=n("./selection").Selection,l=n("./mode/text").Mode,d=n("./range").Range,f=n("./document").Document,p=n("./background_tokenizer").BackgroundTokenizer,g=n("./search_highlight").SearchHighlight,m=function(){function T(A,P){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++T.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new p(new l().getTokenizer(),this);var I=this;this.bgTokenizer.on("update",function(E){I._signal("tokenizerUpdate",E)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof A!="object"||!A.getLine)&&(A=new f(A)),this.setDocument(A),this.selection=new c(this),this.$bidiHandler=new u(this),a.resetOptions(this),this.setMode(P),a._signal("session",this),this.destroyed=!1}return T.prototype.setDocument=function(A){this.doc&&this.doc.off("change",this.$onChange),this.doc=A,A.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},T.prototype.getDocument=function(){return this.doc},T.prototype.$resetRowCache=function(A){if(!A){this.$docRowCache=[],this.$screenRowCache=[];return}var P=this.$docRowCache.length,I=this.$getRowCacheIndex(this.$docRowCache,A)+1;P>I&&(this.$docRowCache.splice(I,P),this.$screenRowCache.splice(I,P))},T.prototype.$getRowCacheIndex=function(A,P){for(var I=0,E=A.length-1;I<=E;){var L=I+E>>1,O=A[L];if(P>O)I=L+1;else if(P<O)E=L-1;else return L}return I-1},T.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},T.prototype.onChangeFold=function(A){var P=A.data;this.$resetRowCache(P.start.row)},T.prototype.onChange=function(A){this.$modified=!0,this.$bidiHandler.onChange(A),this.$resetRowCache(A.start.row);var P=this.$updateInternalDataOnChange(A);!this.$fromUndo&&this.$undoManager&&(P&&P.length&&(this.$undoManager.add({action:"removeFolds",folds:P},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(A,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(A),this._signal("change",A)},T.prototype.setValue=function(A){this.doc.setValue(A),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},T.prototype.toString=function(){return this.doc.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.getState=function(A){return this.bgTokenizer.getState(A)},T.prototype.getTokens=function(A){return this.bgTokenizer.getTokens(A)},T.prototype.getTokenAt=function(A,P){var I=this.bgTokenizer.getTokens(A),E,L=0;if(P==null){var O=I.length-1;L=this.getLine(A).length}else for(var O=0;O<I.length&&(L+=I[O].value.length,!(L>=P));O++);return E=I[O],E?(E.index=O,E.start=L-E.value.length,E):null},T.prototype.setUndoManager=function(A){if(this.$undoManager=A,this.$informUndoManager&&this.$informUndoManager.cancel(),A){var P=this;A.addSession(this),this.$syncInformUndoManager=function(){P.$informUndoManager.cancel(),P.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},T.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},T.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},T.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"	"},T.prototype.setUseSoftTabs=function(A){this.setOption("useSoftTabs",A)},T.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},T.prototype.setTabSize=function(A){this.setOption("tabSize",A)},T.prototype.getTabSize=function(){return this.$tabSize},T.prototype.isTabStop=function(A){return this.$useSoftTabs&&A.column%this.$tabSize===0},T.prototype.setNavigateWithinSoftTabs=function(A){this.setOption("navigateWithinSoftTabs",A)},T.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},T.prototype.setOverwrite=function(A){this.setOption("overwrite",A)},T.prototype.getOverwrite=function(){return this.$overwrite},T.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},T.prototype.addGutterDecoration=function(A,P){this.$decorations[A]||(this.$decorations[A]=""),this.$decorations[A]+=" "+P,this._signal("changeBreakpoint",{})},T.prototype.removeGutterDecoration=function(A,P){this.$decorations[A]=(this.$decorations[A]||"").replace(" "+P,""),this._signal("changeBreakpoint",{})},T.prototype.getBreakpoints=function(){return this.$breakpoints},T.prototype.setBreakpoints=function(A){this.$breakpoints=[];for(var P=0;P<A.length;P++)this.$breakpoints[A[P]]="ace_breakpoint";this._signal("changeBreakpoint",{})},T.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},T.prototype.setBreakpoint=function(A,P){P===void 0&&(P="ace_breakpoint"),P?this.$breakpoints[A]=P:delete this.$breakpoints[A],this._signal("changeBreakpoint",{})},T.prototype.clearBreakpoint=function(A){delete this.$breakpoints[A],this._signal("changeBreakpoint",{})},T.prototype.addMarker=function(A,P,I,E){var L=this.$markerId++,O={range:A,type:I||"line",renderer:typeof I=="function"?I:null,clazz:P,inFront:!!E,id:L};return E?(this.$frontMarkers[L]=O,this._signal("changeFrontMarker")):(this.$backMarkers[L]=O,this._signal("changeBackMarker")),L},T.prototype.addDynamicMarker=function(A,P){if(!!A.update){var I=this.$markerId++;return A.id=I,A.inFront=!!P,P?(this.$frontMarkers[I]=A,this._signal("changeFrontMarker")):(this.$backMarkers[I]=A,this._signal("changeBackMarker")),A}},T.prototype.removeMarker=function(A){var P=this.$frontMarkers[A]||this.$backMarkers[A];if(!!P){var I=P.inFront?this.$frontMarkers:this.$backMarkers;delete I[A],this._signal(P.inFront?"changeFrontMarker":"changeBackMarker")}},T.prototype.getMarkers=function(A){return A?this.$frontMarkers:this.$backMarkers},T.prototype.highlight=function(A){if(!this.$searchHighlight){var P=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(P)}this.$searchHighlight.setRegexp(A)},T.prototype.highlightLines=function(A,P,I,E){typeof P!="number"&&(I=P,P=A),I||(I="ace_step");var L=new d(A,0,P,1/0);return L.id=this.addMarker(L,I,"fullLine",E),L},T.prototype.setAnnotations=function(A){this.$annotations=A,this._signal("changeAnnotation",{})},T.prototype.getAnnotations=function(){return this.$annotations||[]},T.prototype.clearAnnotations=function(){this.setAnnotations([])},T.prototype.$detectNewLine=function(A){var P=A.match(/^.*?(\r?\n)/m);P?this.$autoNewLine=P[1]:this.$autoNewLine=`
`},T.prototype.getWordRange=function(A,P){var I=this.getLine(A),E=!1;if(P>0&&(E=!!I.charAt(P-1).match(this.tokenRe)),E||(E=!!I.charAt(P).match(this.tokenRe)),E)var L=this.tokenRe;else if(/^\s+$/.test(I.slice(P-1,P+1)))var L=/\s/;else var L=this.nonTokenRe;var O=P;if(O>0){do O--;while(O>=0&&I.charAt(O).match(L));O++}for(var B=P;B<I.length&&I.charAt(B).match(L);)B++;return new d(A,O,A,B)},T.prototype.getAWordRange=function(A,P){for(var I=this.getWordRange(A,P),E=this.getLine(I.end.row);E.charAt(I.end.column).match(/[ \t]/);)I.end.column+=1;return I},T.prototype.setNewLineMode=function(A){this.doc.setNewLineMode(A)},T.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},T.prototype.setUseWorker=function(A){this.setOption("useWorker",A)},T.prototype.getUseWorker=function(){return this.$useWorker},T.prototype.onReloadTokenizer=function(A){var P=A.data;this.bgTokenizer.start(P.first),this._signal("tokenizerUpdate",A)},T.prototype.setMode=function(A,P){if(A&&typeof A=="object"){if(A.getTokenizer)return this.$onChangeMode(A);var I=A,E=I.path}else E=A||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[E]&&!I){this.$onChangeMode(this.$modes[E]),P&&P();return}this.$modeId=E,a.loadModule(["mode",E],function(L){if(this.$modeId!==E)return P&&P();this.$modes[E]&&!I?this.$onChangeMode(this.$modes[E]):L&&L.Mode&&(L=new L.Mode(I),I||(this.$modes[E]=L,L.$id=E),this.$onChangeMode(L)),P&&P()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},T.prototype.$onChangeMode=function(A,P){if(P||(this.$modeId=A.$id),this.$mode!==A){var I=this.$mode;this.$mode=A,this.$stopWorker(),this.$useWorker&&this.$startWorker();var E=A.getTokenizer();if(E.on!==void 0){var L=this.onReloadTokenizer.bind(this);E.on("update",L)}this.bgTokenizer.setTokenizer(E),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=A.tokenRe,this.nonTokenRe=A.nonTokenRe,P||(A.attachToSession&&A.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(A.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:I,mode:A}))}},T.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},T.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(A){a.warn("Could not load worker",A),this.$worker=null}},T.prototype.getMode=function(){return this.$mode},T.prototype.setScrollTop=function(A){this.$scrollTop===A||isNaN(A)||(this.$scrollTop=A,this._signal("changeScrollTop",A))},T.prototype.getScrollTop=function(){return this.$scrollTop},T.prototype.setScrollLeft=function(A){this.$scrollLeft===A||isNaN(A)||(this.$scrollLeft=A,this._signal("changeScrollLeft",A))},T.prototype.getScrollLeft=function(){return this.$scrollLeft},T.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},T.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var A=0;return this.lineWidgets.forEach(function(P){P&&P.screenWidth>A&&(A=P.screenWidth)}),this.lineWidgetWidth=A},T.prototype.$computeWidth=function(A){if(this.$modified||A){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var P=this.doc.getAllLines(),I=this.$rowLengthCache,E=0,L=0,O=this.$foldData[L],B=O?O.start.row:1/0,U=P.length,z=0;z<U;z++){if(z>B){if(z=O.end.row+1,z>=U)break;O=this.$foldData[L++],B=O?O.start.row:1/0}I[z]==null&&(I[z]=this.$getStringScreenWidth(P[z])[0]),I[z]>E&&(E=I[z])}this.screenWidth=E}},T.prototype.getLine=function(A){return this.doc.getLine(A)},T.prototype.getLines=function(A,P){return this.doc.getLines(A,P)},T.prototype.getLength=function(){return this.doc.getLength()},T.prototype.getTextRange=function(A){return this.doc.getTextRange(A||this.selection.getRange())},T.prototype.insert=function(A,P){return this.doc.insert(A,P)},T.prototype.remove=function(A){return this.doc.remove(A)},T.prototype.removeFullLines=function(A,P){return this.doc.removeFullLines(A,P)},T.prototype.undoChanges=function(A,P){if(!!A.length){this.$fromUndo=!0;for(var I=A.length-1;I!=-1;I--){var E=A[I];E.action=="insert"||E.action=="remove"?this.doc.revertDelta(E):E.folds&&this.addFolds(E.folds)}!P&&this.$undoSelect&&(A.selectionBefore?this.selection.fromJSON(A.selectionBefore):this.selection.setRange(this.$getUndoSelection(A,!0))),this.$fromUndo=!1}},T.prototype.redoChanges=function(A,P){if(!!A.length){this.$fromUndo=!0;for(var I=0;I<A.length;I++){var E=A[I];(E.action=="insert"||E.action=="remove")&&this.doc.$safeApplyDelta(E)}!P&&this.$undoSelect&&(A.selectionAfter?this.selection.fromJSON(A.selectionAfter):this.selection.setRange(this.$getUndoSelection(A,!1))),this.$fromUndo=!1}},T.prototype.setUndoSelect=function(A){this.$undoSelect=A},T.prototype.$getUndoSelection=function(A,P){function I(U){return P?U.action!=="insert":U.action==="insert"}for(var E,L,O=0;O<A.length;O++){var B=A[O];if(!!B.start){if(!E){I(B)?E=d.fromPoints(B.start,B.end):E=d.fromPoints(B.start,B.start);continue}I(B)?(L=B.start,E.compare(L.row,L.column)==-1&&E.setStart(L),L=B.end,E.compare(L.row,L.column)==1&&E.setEnd(L)):(L=B.start,E.compare(L.row,L.column)==-1&&(E=d.fromPoints(B.start,B.start)))}}return E},T.prototype.replace=function(A,P){return this.doc.replace(A,P)},T.prototype.moveText=function(A,P,I){var E=this.getTextRange(A),L=this.getFoldsInRange(A),O=d.fromPoints(P,P);if(!I){this.remove(A);var B=A.start.row-A.end.row,U=B?-A.end.column:A.start.column-A.end.column;U&&(O.start.row==A.end.row&&O.start.column>A.end.column&&(O.start.column+=U),O.end.row==A.end.row&&O.end.column>A.end.column&&(O.end.column+=U)),B&&O.start.row>=A.end.row&&(O.start.row+=B,O.end.row+=B)}if(O.end=this.insert(O.start,E),L.length){var z=A.start,j=O.start,B=j.row-z.row,U=j.column-z.column;this.addFolds(L.map(function(G){return G=G.clone(),G.start.row==z.row&&(G.start.column+=U),G.end.row==z.row&&(G.end.column+=U),G.start.row+=B,G.end.row+=B,G}))}return O},T.prototype.indentRows=function(A,P,I){I=I.replace(/\t/g,this.getTabString());for(var E=A;E<=P;E++)this.doc.insertInLine({row:E,column:0},I)},T.prototype.outdentRows=function(A){for(var P=A.collapseRows(),I=new d(0,0,0,0),E=this.getTabSize(),L=P.start.row;L<=P.end.row;++L){var O=this.getLine(L);I.start.row=L,I.end.row=L;for(var B=0;B<E&&O.charAt(B)==" ";++B);B<E&&O.charAt(B)=="	"?(I.start.column=B,I.end.column=B+1):(I.start.column=0,I.end.column=B),this.remove(I)}},T.prototype.$moveLines=function(A,P,I){if(A=this.getRowFoldStart(A),P=this.getRowFoldEnd(P),I<0){var E=this.getRowFoldStart(A+I);if(E<0)return 0;var L=E-A}else if(I>0){var E=this.getRowFoldEnd(P+I);if(E>this.doc.getLength()-1)return 0;var L=E-P}else{A=this.$clipRowToDocument(A),P=this.$clipRowToDocument(P);var L=P-A+1}var O=new d(A,0,P,Number.MAX_VALUE),B=this.getFoldsInRange(O).map(function(z){return z=z.clone(),z.start.row+=L,z.end.row+=L,z}),U=I==0?this.doc.getLines(A,P):this.doc.removeFullLines(A,P);return this.doc.insertFullLines(A+L,U),B.length&&this.addFolds(B),L},T.prototype.moveLinesUp=function(A,P){return this.$moveLines(A,P,-1)},T.prototype.moveLinesDown=function(A,P){return this.$moveLines(A,P,1)},T.prototype.duplicateLines=function(A,P){return this.$moveLines(A,P,0)},T.prototype.$clipRowToDocument=function(A){return Math.max(0,Math.min(A,this.doc.getLength()-1))},T.prototype.$clipColumnToRow=function(A,P){return P<0?0:Math.min(this.doc.getLine(A).length,P)},T.prototype.$clipPositionToDocument=function(A,P){if(P=Math.max(0,P),A<0)A=0,P=0;else{var I=this.doc.getLength();A>=I?(A=I-1,P=this.doc.getLine(I-1).length):P=Math.min(this.doc.getLine(A).length,P)}return{row:A,column:P}},T.prototype.$clipRangeToDocument=function(A){A.start.row<0?(A.start.row=0,A.start.column=0):A.start.column=this.$clipColumnToRow(A.start.row,A.start.column);var P=this.doc.getLength()-1;return A.end.row>P?(A.end.row=P,A.end.column=this.doc.getLine(P).length):A.end.column=this.$clipColumnToRow(A.end.row,A.end.column),A},T.prototype.setUseWrapMode=function(A){if(A!=this.$useWrapMode){if(this.$useWrapMode=A,this.$modified=!0,this.$resetRowCache(0),A){var P=this.getLength();this.$wrapData=Array(P),this.$updateWrapData(0,P-1)}this._signal("changeWrapMode")}},T.prototype.getUseWrapMode=function(){return this.$useWrapMode},T.prototype.setWrapLimitRange=function(A,P){(this.$wrapLimitRange.min!==A||this.$wrapLimitRange.max!==P)&&(this.$wrapLimitRange={min:A,max:P},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},T.prototype.adjustWrapLimit=function(A,P){var I=this.$wrapLimitRange;I.max<0&&(I={min:P,max:P});var E=this.$constrainWrapLimit(A,I.min,I.max);return E!=this.$wrapLimit&&E>1?(this.$wrapLimit=E,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},T.prototype.$constrainWrapLimit=function(A,P,I){return P&&(A=Math.max(P,A)),I&&(A=Math.min(I,A)),A},T.prototype.getWrapLimit=function(){return this.$wrapLimit},T.prototype.setWrapLimit=function(A){this.setWrapLimitRange(A,A)},T.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},T.prototype.$updateInternalDataOnChange=function(A){var P=this.$useWrapMode,I=A.action,E=A.start,L=A.end,O=E.row,B=L.row,U=B-O,z=null;if(this.$updating=!0,U!=0)if(I==="remove"){this[P?"$wrapData":"$rowLengthCache"].splice(O,U);var j=this.$foldData;z=this.getFoldsInRange(A),this.removeFolds(z);var q=this.getFoldLine(L.row),ne=0;if(q){q.addRemoveChars(L.row,L.column,E.column-L.column),q.shiftRow(-U);var G=this.getFoldLine(O);G&&G!==q&&(G.merge(q),q=G),ne=j.indexOf(q)+1}for(ne;ne<j.length;ne++){var q=j[ne];q.start.row>=L.row&&q.shiftRow(-U)}B=O}else{var X=Array(U);X.unshift(O,0);var ie=P?this.$wrapData:this.$rowLengthCache;ie.splice.apply(ie,X);var j=this.$foldData,q=this.getFoldLine(O),ne=0;if(q){var le=q.range.compareInside(E.row,E.column);le==0?(q=q.split(E.row,E.column),q&&(q.shiftRow(U),q.addRemoveChars(B,0,L.column-E.column))):le==-1&&(q.addRemoveChars(O,0,L.column-E.column),q.shiftRow(U)),ne=j.indexOf(q)+1}for(ne;ne<j.length;ne++){var q=j[ne];q.start.row>=O&&q.shiftRow(U)}}else{U=Math.abs(A.start.column-A.end.column),I==="remove"&&(z=this.getFoldsInRange(A),this.removeFolds(z),U=-U);var q=this.getFoldLine(O);q&&q.addRemoveChars(O,E.column,U)}return P&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,P?this.$updateWrapData(O,B):this.$updateRowLengthCache(O,B),z},T.prototype.$updateRowLengthCache=function(A,P,I){this.$rowLengthCache[A]=null,this.$rowLengthCache[P]=null},T.prototype.$updateWrapData=function(A,P){var I=this.doc.getAllLines(),E=this.getTabSize(),L=this.$wrapData,O=this.$wrapLimit,B,U,z=A;for(P=Math.min(P,I.length-1);z<=P;)U=this.getFoldLine(z,U),U?(B=[],U.walk(function(j,q,ne,G){var X;if(j!=null){X=this.$getDisplayTokens(j,B.length),X[0]=S;for(var ie=1;ie<X.length;ie++)X[ie]=_}else X=this.$getDisplayTokens(I[q].substring(G,ne),B.length);B=B.concat(X)}.bind(this),U.end.row,I[U.end.row].length+1),L[U.start.row]=this.$computeWrapSplits(B,O,E),z=U.end.row+1):(B=this.$getDisplayTokens(I[z]),L[z]=this.$computeWrapSplits(B,O,E),z++)},T.prototype.$computeWrapSplits=function(A,P,I){if(A.length==0)return[];var E=[],L=A.length,O=0,B=0,U=this.$wrapAsCode,z=this.$indentedSoftWrap,j=P<=Math.max(2*I,8)||z===!1?0:Math.floor(P/2);function q(){var le=0;if(j===0)return le;if(z)for(var Y=0;Y<A.length;Y++){var J=A[Y];if(J==b)le+=1;else if(J==C)le+=I;else{if(J==M)continue;break}}return U&&z!==!1&&(le+=I),Math.min(le,j)}function ne(le){for(var Y=le-O,J=O;J<le;J++){var te=A[J];(te===12||te===2)&&(Y-=1)}E.length||(G=q(),E.indent=G),B+=Y,E.push(B),O=le}for(var G=0;L-O>P-G;){var X=O+P-G;if(A[X-1]>=b&&A[X]>=b){ne(X);continue}if(A[X]==S||A[X]==_){for(X;X!=O-1&&A[X]!=S;X--);if(X>O){ne(X);continue}for(X=O+P,X;X<A.length&&A[X]==_;X++);if(X==A.length)break;ne(X);continue}for(var ie=Math.max(X-(P-(P>>2)),O-1);X>ie&&A[X]<S;)X--;if(U){for(;X>ie&&A[X]<S;)X--;for(;X>ie&&A[X]==w;)X--}else for(;X>ie&&A[X]<b;)X--;if(X>ie){ne(++X);continue}X=O+P,A[X]==y&&X--,ne(X-G)}return E},T.prototype.$getDisplayTokens=function(A,P){var I=[],E;P=P||0;for(var L=0;L<A.length;L++){var O=A.charCodeAt(L);if(O==9){E=this.getScreenTabSize(I.length+P),I.push(C);for(var B=1;B<E;B++)I.push(M)}else O==32?I.push(b):O>39&&O<48||O>57&&O<64?I.push(w):O>=4352&&R(O)?I.push(v,y):I.push(v)}return I},T.prototype.$getStringScreenWidth=function(A,P,I){if(P==0)return[0,0];P==null&&(P=1/0),I=I||0;var E,L;for(L=0;L<A.length&&(E=A.charCodeAt(L),E==9?I+=this.getScreenTabSize(I):E>=4352&&R(E)?I+=2:I+=1,!(I>P));L++);return[I,L]},T.prototype.getRowLength=function(A){var P=1;return this.lineWidgets&&(P+=this.lineWidgets[A]&&this.lineWidgets[A].rowCount||0),!this.$useWrapMode||!this.$wrapData[A]?P:this.$wrapData[A].length+P},T.prototype.getRowLineCount=function(A){return!this.$useWrapMode||!this.$wrapData[A]?1:this.$wrapData[A].length+1},T.prototype.getRowWrapIndent=function(A){if(this.$useWrapMode){var P=this.screenToDocumentPosition(A,Number.MAX_VALUE),I=this.$wrapData[P.row];return I.length&&I[0]<P.column?I.indent:0}else return 0},T.prototype.getScreenLastRowColumn=function(A){var P=this.screenToDocumentPosition(A,Number.MAX_VALUE);return this.documentToScreenColumn(P.row,P.column)},T.prototype.getDocumentLastRowColumn=function(A,P){var I=this.documentToScreenRow(A,P);return this.getScreenLastRowColumn(I)},T.prototype.getDocumentLastRowColumnPosition=function(A,P){var I=this.documentToScreenRow(A,P);return this.screenToDocumentPosition(I,Number.MAX_VALUE/10)},T.prototype.getRowSplitData=function(A){if(this.$useWrapMode)return this.$wrapData[A]},T.prototype.getScreenTabSize=function(A){return this.$tabSize-(A%this.$tabSize|0)},T.prototype.screenToDocumentRow=function(A,P){return this.screenToDocumentPosition(A,P).row},T.prototype.screenToDocumentColumn=function(A,P){return this.screenToDocumentPosition(A,P).column},T.prototype.screenToDocumentPosition=function(A,P,I){if(A<0)return{row:0,column:0};var E,L=0,O=0,B,U=0,z=0,j=this.$screenRowCache,q=this.$getRowCacheIndex(j,A),ne=j.length;if(ne&&q>=0)var U=j[q],L=this.$docRowCache[q],G=A>j[ne-1];else var G=!ne;for(var X=this.getLength()-1,ie=this.getNextFoldLine(L),le=ie?ie.start.row:1/0;U<=A&&(z=this.getRowLength(L),!(U+z>A||L>=X));)U+=z,L++,L>le&&(L=ie.end.row+1,ie=this.getNextFoldLine(L,ie),le=ie?ie.start.row:1/0),G&&(this.$docRowCache.push(L),this.$screenRowCache.push(U));if(ie&&ie.start.row<=L)E=this.getFoldDisplayLine(ie),L=ie.start.row;else{if(U+z<=A||L>X)return{row:X,column:this.getLine(X).length};E=this.getLine(L),ie=null}var Y=0,J=Math.floor(A-U);if(this.$useWrapMode){var te=this.$wrapData[L];te&&(B=te[J],J>0&&te.length&&(Y=te.indent,O=te[J-1]||te[te.length-1],E=E.substring(O)))}return I!==void 0&&this.$bidiHandler.isBidiRow(U+J,L,J)&&(P=this.$bidiHandler.offsetToCol(I)),O+=this.$getStringScreenWidth(E,P-Y)[1],this.$useWrapMode&&O>=B&&(O=B-1),ie?ie.idxToPosition(O):{row:L,column:O}},T.prototype.documentToScreenPosition=function(A,P){if(typeof P>"u")var I=this.$clipPositionToDocument(A.row,A.column);else I=this.$clipPositionToDocument(A,P);A=I.row,P=I.column;var E=0,L=null,O=null;O=this.getFoldAt(A,P,1),O&&(A=O.start.row,P=O.start.column);var B,U=0,z=this.$docRowCache,j=this.$getRowCacheIndex(z,A),q=z.length;if(q&&j>=0)var U=z[j],E=this.$screenRowCache[j],ne=A>z[q-1];else var ne=!q;for(var G=this.getNextFoldLine(U),X=G?G.start.row:1/0;U<A;){if(U>=X){if(B=G.end.row+1,B>A)break;G=this.getNextFoldLine(B,G),X=G?G.start.row:1/0}else B=U+1;E+=this.getRowLength(U),U=B,ne&&(this.$docRowCache.push(U),this.$screenRowCache.push(E))}var ie="";G&&U>=X?(ie=this.getFoldDisplayLine(G,A,P),L=G.start.row):(ie=this.getLine(A).substring(0,P),L=A);var le=0;if(this.$useWrapMode){var Y=this.$wrapData[L];if(Y){for(var J=0;ie.length>=Y[J];)E++,J++;ie=ie.substring(Y[J-1]||0,ie.length),le=J>0?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[U]&&this.lineWidgets[U].rowsAbove&&(E+=this.lineWidgets[U].rowsAbove),{row:E,column:le+this.$getStringScreenWidth(ie)[0]}},T.prototype.documentToScreenColumn=function(A,P){return this.documentToScreenPosition(A,P).column},T.prototype.documentToScreenRow=function(A,P){return this.documentToScreenPosition(A,P).row},T.prototype.getScreenLength=function(){var A=0,P=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,O=0,E=0,P=this.$foldData[E++],B=P?P.start.row:1/0;O<L;){var U=this.$wrapData[O];A+=U?U.length+1:1,O++,O>B&&(O=P.end.row+1,P=this.$foldData[E++],B=P?P.start.row:1/0)}else{A=this.getLength();for(var I=this.$foldData,E=0;E<I.length;E++)P=I[E],A-=P.end.row-P.start.row}return this.lineWidgets&&(A+=this.$getWidgetScreenLength()),A},T.prototype.$setFontMetrics=function(A){!this.$enableVarChar||(this.$getStringScreenWidth=function(P,I,E){if(I===0)return[0,0];I||(I=1/0),E=E||0;var L,O;for(O=0;O<P.length&&(L=P.charAt(O),L==="	"?E+=this.getScreenTabSize(E):E+=A.getCharacterWidth(L),!(E>I));O++);return[E,O]})},T.prototype.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()},T}();m.$uid=0,m.prototype.$modes=a.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=R,s.implement(m.prototype,h);var v=1,y=2,S=3,_=4,w=9,b=10,C=11,M=12;function R(T){return T<4352?!1:T>=4352&&T<=4447||T>=4515&&T<=4519||T>=4602&&T<=4607||T>=9001&&T<=9002||T>=11904&&T<=11929||T>=11931&&T<=12019||T>=12032&&T<=12245||T>=12272&&T<=12283||T>=12288&&T<=12350||T>=12353&&T<=12438||T>=12441&&T<=12543||T>=12549&&T<=12589||T>=12593&&T<=12686||T>=12688&&T<=12730||T>=12736&&T<=12771||T>=12784&&T<=12830||T>=12832&&T<=12871||T>=12880&&T<=13054||T>=13056&&T<=19903||T>=19968&&T<=42124||T>=42128&&T<=42182||T>=43360&&T<=43388||T>=44032&&T<=55203||T>=55216&&T<=55238||T>=55243&&T<=55291||T>=63744&&T<=64255||T>=65040&&T<=65049||T>=65072&&T<=65106||T>=65108&&T<=65126||T>=65128&&T<=65131||T>=65281&&T<=65376||T>=65504&&T<=65510}n("./edit_session/folding").Folding.call(m.prototype),n("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(T){if(!T||T=="off"?T=!1:T=="free"?T=!0:T=="printMargin"?T=-1:typeof T=="string"&&(T=parseInt(T,10)||!1),this.$wrap!=T)if(this.$wrap=T,!T)this.setUseWrapMode(!1);else{var A=typeof T=="number"?T:null;this.setWrapLimitRange(A,A),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(T){T=T=="auto"?this.$mode.type!="text":T!="text",T!=this.$wrapAsCode&&(this.$wrapAsCode=T,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(T){this.$useWorker=T,this.$stopWorker(),T&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(T){T=parseInt(T),T>0&&this.$tabSize!==T&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=T,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(T){this.setFoldStyle(T)},handlesSet:!0},overwrite:{set:function(T){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(T){this.doc.setNewLineMode(T)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(T){this.setMode(T)},get:function(){return this.$modeId},handlesSet:!0}}),i.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,i,r){var s=n("./lib/lang"),o=n("./lib/oop"),u=n("./range").Range,a=function(){function c(){this.$options={}}return c.prototype.set=function(l){return o.mixin(this.$options,l),this},c.prototype.getOptions=function(){return s.copyObject(this.$options)},c.prototype.setOptions=function(l){this.$options=l},c.prototype.find=function(l){var d=this.$options,f=this.$matchIterator(l,d);if(!f)return!1;var p=null;return f.forEach(function(g,m,v,y){return p=new u(g,m,v,y),m==y&&d.start&&d.start.start&&d.skipCurrent!=!1&&p.isEqual(d.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(l){var d=this.$options;if(!d.needle)return[];this.$assembleRegExp(d);var f=d.range,p=f?l.getLines(f.start.row,f.end.row):l.doc.getAllLines(),g=[],m=d.re;if(d.$isMultiLine){var v=m.length,y=p.length-v,S;e:for(var _=m.offset||0;_<=y;_++){for(var w=0;w<v;w++)if(p[_+w].search(m[w])==-1)continue e;var b=p[_],C=p[_+v-1],M=b.length-b.match(m[0])[0].length,R=C.match(m[v-1])[0].length;S&&S.end.row===_&&S.end.column>M||(g.push(S=new u(_,M,_+v-1,R)),v>2&&(_=_+v-2))}}else for(var T=0;T<p.length;T++)for(var A=s.getMatchOffsets(p[T],m),w=0;w<A.length;w++){var P=A[w];g.push(new u(T,P.offset,T,P.offset+P.length))}if(f){for(var I=f.start.column,E=f.end.column,T=0,w=g.length-1;T<w&&g[T].start.column<I&&g[T].start.row==0;)T++;for(var L=f.end.row-f.start.row;T<w&&g[w].end.column>E&&g[w].end.row==L;)w--;for(g=g.slice(T,w+1),T=0,w=g.length;T<w;T++)g[T].start.row+=f.start.row,g[T].end.row+=f.start.row}return g},c.prototype.replace=function(l,d){var f=this.$options,p=this.$assembleRegExp(f);if(f.$isMultiLine)return d;if(!!p){var g=p.exec(l);if(!g||g[0].length!=l.length)return null;if(d=l.replace(p,d),f.preserveCase){d=d.split("");for(var m=Math.min(l.length,l.length);m--;){var v=l[m];v&&v.toLowerCase()!=v?d[m]=d[m].toUpperCase():d[m]=d[m].toLowerCase()}d=d.join("")}return d}},c.prototype.$assembleRegExp=function(l,d){if(l.needle instanceof RegExp)return l.re=l.needle;var f=l.needle;if(!l.needle)return l.re=!1;l.regExp||(f=s.escapeRegExp(f)),l.wholeWord&&(f=h(f,l));var p=l.caseSensitive?"gm":"gmi";if(l.$isMultiLine=!d&&/[\n\r]/.test(f),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(f,p);try{var g=new RegExp(f,p)}catch{g=!1}return l.re=g},c.prototype.$assembleMultilineRegExp=function(l,d){for(var f=l.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),p=[],g=0;g<f.length;g++)try{p.push(new RegExp(f[g],d))}catch{return!1}return p},c.prototype.$matchIterator=function(l,d){var f=this.$assembleRegExp(d);if(!f)return!1;var p=d.backwards==!0,g=d.skipCurrent!=!1,m=d.range,v=d.start;v||(v=m?m[p?"end":"start"]:l.selection.getRange()),v.start&&(v=v[g!=p?"end":"start"]);var y=m?m.start.row:0,S=m?m.end.row:l.getLength()-1;if(p)var _=function(C){var M=v.row;if(!b(M,v.column,C)){for(M--;M>=y;M--)if(b(M,Number.MAX_VALUE,C))return;if(d.wrap!=!1){for(M=S,y=v.row;M>=y;M--)if(b(M,Number.MAX_VALUE,C))return}}};else var _=function(M){var R=v.row;if(!b(R,v.column,M)){for(R=R+1;R<=S;R++)if(b(R,0,M))return;if(d.wrap!=!1){for(R=y,S=v.row;R<=S;R++)if(b(R,0,M))return}}};if(d.$isMultiLine)var w=f.length,b=function(C,M,R){var T=p?C-w+1:C;if(!(T<0||T+w>l.getLength())){var A=l.getLine(T),P=A.search(f[0]);if(!(!p&&P<M||P===-1)){for(var I=1;I<w;I++)if(A=l.getLine(T+I),A.search(f[I])==-1)return;var E=A.match(f[w-1])[0].length;if(!(p&&E>M)&&R(T,P,T+w-1,E))return!0}}};else if(p)var b=function(M,R,T){var A=l.getLine(M),P=[],I,E=0;for(f.lastIndex=0;I=f.exec(A);){var L=I[0].length;if(E=I.index,!L){if(E>=A.length)break;f.lastIndex=E+=1}if(I.index+L>R)break;P.push(I.index,L)}for(var O=P.length-1;O>=0;O-=2){var B=P[O-1],L=P[O];if(T(M,B,M,B+L))return!0}};else var b=function(M,R,T){var A=l.getLine(M),P,I;for(f.lastIndex=R;I=f.exec(A);){var E=I[0].length;if(P=I.index,T(M,P,M,P+E))return!0;if(!E&&(f.lastIndex=P+=1,P>=A.length))return!1}};return{forEach:_}},c}();function h(c,l){function d(f){return/\w/.test(f)||l.regExp?"\\b":""}return d(c[0])+c+d(c[c.length-1])}i.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,i,r){var s=this&&this.__extends||function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},d(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),o=n("../lib/keys"),u=n("../lib/useragent"),a=o.KEY_MODS,h=function(){function d(f,p){this.$init(f,p,!1)}return d.prototype.$init=function(f,p,g){this.platform=p||(u.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=g},d.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},d.prototype.removeCommand=function(f,p){var g=f&&(typeof f=="string"?f:f.name);f=this.commands[g],p||delete this.commands[g];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==f)delete m[v];else if(Array.isArray(y)){var S=y.indexOf(f);S!=-1&&(y.splice(S,1),y.length==1&&(m[v]=y[0]))}}},d.prototype.bindKey=function(f,p,g){if(typeof f=="object"&&f&&(g==null&&(g=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(w){var b=this.parseKeys(w),C=a[b.hashId]+b.key;v+=(v?" ":"")+C,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var S=this.parseKeys(m),_=a[S.hashId]+S.key;this._addCommandToBinding(v+_,p,g)},this)}},d.prototype._addCommandToBinding=function(f,p,g){var m=this.commandKeyBinding,v;if(!p)delete m[f];else if(!m[f]||this.$singleCommand)m[f]=p;else{Array.isArray(m[f])?(v=m[f].indexOf(p))!=-1&&m[f].splice(v,1):m[f]=[m[f]],typeof g!="number"&&(g=c(p));var y=m[f];for(v=0;v<y.length;v++){var S=y[v],_=c(S);if(_>g)break}y.splice(v,0,p)}},d.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var g=f[p];if(!!g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},d.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},d.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},d.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},d.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(_){return _}),g=p.pop(),m=o[g];if(o.FUNCTION_KEYS[m])g=o.FUNCTION_KEYS[m].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var v=0,y=p.length;y--;){var S=o.KEY_MODS[p[y]];if(S==null)return typeof console<"u"&&console.error("invalid modifier "+p[y]+" in "+f),!1;v|=S}return{key:g,hashId:v}},d.prototype.findKeyCommand=function(f,p){var g=a[f]+p;return this.commandKeyBinding[g]},d.prototype.handleKeyboard=function(f,p,g,m){if(!(m<0)){var v=a[p]+g,y=this.commandKeyBinding[v];return f.$keyChain&&(f.$keyChain+=" "+v,y=this.commandKeyBinding[f.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||v,{command:"null"}):(f.$keyChain&&((!p||p==4)&&g.length==1?f.$keyChain=f.$keyChain.slice(0,-v.length-1):(p==-1||m>0)&&(f.$keyChain="")),{command:y})}},d.prototype.getStatusText=function(f,p){return p.$keyChain||""},d}();function c(d){return typeof d=="object"&&d.bindKey&&d.bindKey.position||(d.isDefault?-100:0)}var l=function(d){s(f,d);function f(p,g){var m=d.call(this,p,g)||this;return m.$singleCommand=!0,m}return f}(h);l.call=function(d,f,p){h.prototype.$init.call(d,f,p,!0)},h.call=function(d,f,p){h.prototype.$init.call(d,f,p,!1)},i.HashHandler=l,i.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,i,r){var s=this&&this.__extends||function(){var c=function(l,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},c(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(l,d);function f(){this.constructor=l}l.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),o=n("../lib/oop"),u=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,h=function(c){s(l,c);function l(d,f){var p=c.call(this,f,d)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return l.prototype.exec=function(d,f,p){if(Array.isArray(d)){for(var g=d.length;g--;)if(this.exec(d[g],f,p))return!0;return!1}if(typeof d=="string"&&(d=this.commands[d]),!d||f&&f.$readOnly&&!d.readOnly||this.$checkCommandState!=!1&&d.isAvailable&&!d.isAvailable(f))return!1;var m={editor:f,command:d,args:p};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},l.prototype.toggleRecording=function(d){if(!this.$inReplay)return d&&d._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(f){this.macro.push([f.command,f.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(d){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(d);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,d):this.exec(f[0],d,f[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(d){return d.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},l}(u);o.implement(h.prototype,a),i.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,i,r){var s=n("../lib/lang"),o=n("../config"),u=n("../range").Range;function a(c,l){return{win:c,mac:l}}i.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(c){o.loadModule("ace/ext/settings_menu",function(l){l.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(c){o.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(c){o.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(c,l){typeof l=="number"&&!isNaN(l)&&c.gotoLine(l),c.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(c){o.loadModule("ace/ext/searchbox",function(l){l.Search(c)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(c,l){c.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(c,l){c.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(c,l){c.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(c,l){c.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(c){},readOnly:!0},{name:"cut",description:"Cut",exec:function(c){var l=c.$copyWithEmptySelection&&c.selection.isEmpty(),d=l?c.selection.getLineRange():c.selection.getRange();c._emit("cut",d),d.isEmpty()||c.session.remove(d),c.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(c,l){c.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(c){o.loadModule("ace/ext/searchbox",function(l){l.Search(c,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(c){var l=c.selection.getRange();l.start.column=0,c.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(c){var l=c.selection.getRange();l.end.column=Number.MAX_VALUE,c.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(c,l){c.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(c,l){c.insert(s.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(c){c.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var l=c.selection.getRange();l.start.column=l.end.column=0,l.end.row++,c.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(c){c.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(c){for(var l=c.selection.isBackwards(),d=l?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),f=l?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),p=c.session.doc.getLine(d.row).length,g=c.session.doc.getTextRange(c.selection.getRange()),m=g.replace(/\n\s*/," ").length,v=c.session.doc.getLine(d.row),y=d.row+1;y<=f.row+1;y++){var S=s.stringTrimLeft(s.stringTrimRight(c.session.doc.getLine(y)));S.length!==0&&(S=" "+S),v+=S}f.row+1<c.session.doc.getLength()-1&&(v+=c.session.doc.getNewLineCharacter()),c.clearSelection(),c.session.doc.replace(new u(d.row,0,f.row+2,0),v),m>0?(c.selection.moveCursorTo(d.row,d.column),c.selection.selectTo(d.row,d.column+m)):(p=c.session.doc.getLine(d.row).length>p?p+1:p,c.selection.moveCursorTo(d.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(c){var l=c.session.doc.getLength()-1,d=c.session.doc.getLine(l).length,f=c.selection.rangeList.ranges,p=[];f.length<1&&(f=[c.selection.getRange()]);for(var g=0;g<f.length;g++)g==f.length-1&&(f[g].end.row===l&&f[g].end.column===d||p.push(new u(f[g].end.row,f[g].end.column,l,d))),g===0?f[g].start.row===0&&f[g].start.column===0||p.push(new u(0,0,f[g].start.row,f[g].start.column)):p.push(new u(f[g-1].end.row,f[g-1].end.column,f[g].start.row,f[g].start.column));c.exitMultiSelectMode(),c.clearSelection();for(var g=0;g<p.length;g++)c.selection.addRange(p[g],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(c){c.selection.clearSelection(),c.navigateLineEnd(),c.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(c){c.selection.clearSelection();var l=c.getCursorPosition();c.selection.moveTo(l.row-1,Number.MAX_VALUE),c.insert(`
`),l.row===0&&c.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:a("F1","F1"),exec:function(c){c.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(c){c.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)i.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(c){c.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,i,r){var s=n("./lib/dom"),o=function(){function u(a){this.session=a,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)}return u.prototype.getRowLength=function(a){var h;return this.lineWidgets?h=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[a]?1+h:this.$wrapData[a].length+1+h},u.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(a+=h.rowCount)}),a},u.prototype.$onChangeEditor=function(a){this.attach(a.editor)},u.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},u.prototype.detach=function(a){var h=this.editor;if(!!h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var c=this.session.lineWidgets;c&&c.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},u.prototype.updateOnFold=function(a,h){var c=h.lineWidgets;if(!(!c||!a.action)){for(var l=a.data,d=l.start.row,f=l.end.row,p=a.action=="add",g=d+1;g<f;g++)c[g]&&(c[g].hidden=p);c[f]&&(p?c[d]?c[f].hidden=p:c[d]=c[f]:(c[d]==c[f]&&(c[d]=void 0),c[f].hidden=p))}},u.prototype.updateOnChange=function(a){var h=this.session.lineWidgets;if(!!h){var c=a.start.row,l=a.end.row-c;if(l!==0)if(a.action=="remove"){var d=h.splice(c+1,l);!h[c]&&d[d.length-1]&&(h[c]=d.pop()),d.forEach(function(p){p&&this.removeLineWidget(p)},this),this.$updateRows()}else{var f=new Array(l);h[c]&&h[c].column!=null&&a.start.column>h[c].column&&c++,f.unshift(c,0),h.splice.apply(h,f),this.$updateRows()}}},u.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(!!a){var h=!0;a.forEach(function(c,l){if(c)for(h=!1,c.row=l;c.$oldWidget;)c.$oldWidget.row=l,c=c.$oldWidget}),h&&(this.session.lineWidgets=null)}},u.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[a.row];return h&&(a.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},u.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var h=this.editor.renderer;a.html&&!a.el&&(a.el=s.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=s.createElement("div"),a.el.textContent=a.text),a.el&&(s.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&s.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,h.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/h.layerConfig.lineHeight);var c=this.session.getFoldAt(a.row,0);if(a.$fold=c,c){var l=this.session.lineWidgets;a.row==c.end.row&&!l[c.start.row]?l[c.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(a),a},u.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[a.row];if(h==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;h;){if(h.$oldWidget==a){h.$oldWidget=a.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},u.prototype.getWidgetsAtRow=function(a){for(var h=this.session.lineWidgets,c=h&&h[a],l=[];c;)l.push(c),c=c.$oldWidget;return l},u.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},u.prototype.measureWidgets=function(a,h){var c=this.session._changedWidgets,l=h.layerConfig;if(!(!c||!c.length)){for(var d=1/0,f=0;f<c.length;f++){var p=c[f];if(!(!p||!p.el)&&p.session==this.session){if(!p._inDocument){if(this.session.lineWidgets[p.row]!=p)continue;p._inDocument=!0,h.container.appendChild(p.el)}p.h=p.el.offsetHeight,p.fixedWidth||(p.w=p.el.offsetWidth,p.screenWidth=Math.ceil(p.w/l.characterWidth));var g=p.h/l.lineHeight;p.coverLine&&(g-=this.session.getRowLineCount(p.row),g<0&&(g=0)),p.rowCount!=g&&(p.rowCount=g,p.row<d&&(d=p.row))}}d!=1/0&&(this.session._emit("changeFold",{data:{start:{row:d}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},u.prototype.renderWidgets=function(a,h){var c=h.layerConfig,l=this.session.lineWidgets;if(!!l){for(var d=Math.min(this.firstRow,c.firstRow),f=Math.max(this.lastRow,c.lastRow,l.length);d>0&&!l[d];)d--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,h.$cursorLayer.config=c;for(var p=d;p<=f;p++){var g=l[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,h.container.appendChild(g.el));var m=h.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(m+=c.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-c.offset+"px";var v=g.coverGutter?0:h.gutterWidth;g.fixedWidth||(v-=h.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=c.width+2*c.padding+"px"),g.fixedWidth?g.el.style.right=h.scrollBar.getWidth()+"px":g.el.style.right=""}}}},u}();i.LineWidgets=o}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,i,r){var s=n("../lib/keys"),o=n("../mouse/default_gutter_handler").GutterTooltip,u=function(){function a(h){this.editor=h,this.gutterLayer=h.renderer.$gutterLayer,this.element=h.renderer.$gutter,this.lines=h.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return a.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},a.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},a.prototype.$onGutterKeyDown=function(h){if(this.annotationTooltip.isOpen){h.preventDefault(),h.keyCode===s.escape&&this.annotationTooltip.hide();return}if(h.target===this.element){if(h.keyCode!=s.enter)return;h.preventDefault();var c=this.editor.getCursorPosition().row;this.editor.isRowVisible(c)||this.editor.scrollToLine(c,!0,!0),setTimeout(function(){var g=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),m=this.$findNearestFoldWidget(g),v=this.$findNearestAnnotation(g);if(!(m===null&&v===null)){if(m===null&&v!==null){this.activeRowIndex=v,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(m!==null&&v===null){this.activeRowIndex=m,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(v-g)<Math.abs(m-g)){this.activeRowIndex=v,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=m,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}if(h.keyCode===s.tab){h.preventDefault();return}if(h.keyCode===s.escape){h.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(h.keyCode===s.up){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(h.keyCode===s.down){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(h.keyCode===s.left&&(h.preventDefault(),this.$switchLane("annotation")),h.keyCode===s.right&&(h.preventDefault(),this.$switchLane("fold")),h.keyCode===s.enter||h.keyCode===s.space){switch(h.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var l=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),h),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==l&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(l),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var d=this.lines.cells[this.activeRowIndex].element.childNodes[2],f=d.getBoundingClientRect(),p=this.annotationTooltip.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(h){var c=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),l=this.$getFoldWidget(h).style.display!=="none";return c&&l},a.prototype.$isAnnotationVisible=function(h){var c=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),l=this.$getAnnotation(h).style.display!=="none";return c&&l},a.prototype.$getFoldWidget=function(h){var c=this.lines.get(h),l=c.element;return l.childNodes[1]},a.prototype.$getAnnotation=function(h){var c=this.lines.get(h),l=c.element;return l.childNodes[2]},a.prototype.$findNearestFoldWidget=function(h){if(this.$isFoldWidgetVisible(h))return h;for(var c=0;h-c>0||h+c<this.lines.getLength()-1;){if(c++,h-c>=0&&this.$isFoldWidgetVisible(h-c))return h-c;if(h+c<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(h+c))return h+c}return null},a.prototype.$findNearestAnnotation=function(h){if(this.$isAnnotationVisible(h))return h;for(var c=0;h-c>0||h+c<this.lines.getLength()-1;){if(c++,h-c>=0&&this.$isAnnotationVisible(h-c))return h-c;if(h+c<=this.lines.getLength()-1&&this.$isAnnotationVisible(h+c))return h+c}return null},a.prototype.$focusFoldWidget=function(h){if(h!=null){var c=this.$getFoldWidget(h);c.classList.add(this.editor.renderer.keyboardFocusClassName),c.focus()}},a.prototype.$focusAnnotation=function(h){if(h!=null){var c=this.$getAnnotation(h);c.classList.add(this.editor.renderer.keyboardFocusClassName),c.setAttribute("role","button"),c.focus()}},a.prototype.$blurFoldWidget=function(h){var c=this.$getFoldWidget(h);c.classList.remove(this.editor.renderer.keyboardFocusClassName),c.blur()},a.prototype.$blurAnnotation=function(h){var c=this.$getAnnotation(h);c.classList.remove(this.editor.renderer.keyboardFocusClassName),c.removeAttribute("role"),c.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isFoldWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=h,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isFoldWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=h,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$switchLane=function(h){switch(h){case"annotation":if(this.activeLane==="annotation")break;var c=this.$findNearestAnnotation(this.activeRowIndex);if(c==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldWidget(this.activeRowIndex);if(l==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(h){var c=this.lines.get(h);return c?c.row:null},a.prototype.$rowToRowIndex=function(h){for(var c=0;c<this.lines.getLength();c++){var l=this.lines.get(c);if(l.row==h)return c}return null},a}();i.GutterKeyboardHandler=u}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,i,r){var s=this&&this.__values||function(I){var E=typeof Symbol=="function"&&Symbol.iterator,L=E&&I[E],O=0;if(L)return L.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&O>=I.length&&(I=void 0),{value:I&&I[O++],done:!I}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},o=n("./lib/oop"),u=n("./lib/dom"),a=n("./lib/lang"),h=n("./lib/useragent"),c=n("./keyboard/textinput").TextInput,l=n("./mouse/mouse_handler").MouseHandler,d=n("./mouse/fold_handler").FoldHandler,f=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,S=n("./commands/default_commands").commands,_=n("./config"),w=n("./token_iterator").TokenIterator,b=n("./line_widgets").LineWidgets,C=n("./keyboard/gutter_handler").GutterKeyboardHandler,M=n("./config").nls,R=n("./clipboard"),T=n("./lib/keys"),A=function(){function I(E,L,O){this.$toDestroy=[];var B=E.getContainerElement();this.container=B,this.renderer=E,this.id="editor"+ ++I.$uid,this.commands=new y(h.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new c(E.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new d(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(U,z){z._$emitInputEvent.schedule(31)}),this.setSession(L||O&&O.session||new p("")),_.resetOptions(this),O&&this.setOptions(O),_._signal("editor",this)}return I.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.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)},I.prototype.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()},I.prototype.endOperation=function(E){if(this.curOp&&this.session){if(E&&E.returnValue===!1||!this.session)return this.curOp=null;if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var L=this.curOp.command,O=L&&L.scrollIntoView;if(O){switch(O){case"center-animate":O="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var B=this.selection.getRange(),U=this.renderer.layerConfig;(B.start.row>=U.lastRow||B.end.row<=U.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}O=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var z=this.selection.toJSON();this.curOp.selectionAfter=z,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(z),this.prevOp=this.curOp,this.curOp=null}},I.prototype.$historyTracker=function(E){if(!!this.$mergeUndoDeltas){var L=this.prevOp,O=this.$mergeableCommands,B=L.command&&E.command.name==L.command.name;if(E.command.name=="insertstring"){var U=E.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),B=B&&this.mergeNextCommand&&(!/\s/.test(U)||/\s/.test(L.args)),this.mergeNextCommand=!0}else B=B&&O.indexOf(E.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(B=!1),B?this.session.mergeUndoDeltas=!0:O.indexOf(E.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},I.prototype.setKeyboardHandler=function(E,L){if(E&&typeof E=="string"&&E!="ace"){this.$keybindingId=E;var O=this;_.loadModule(["keybinding",E],function(B){O.$keybindingId==E&&O.keyBinding.setKeyboardHandler(B&&B.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(E),L&&L()},I.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},I.prototype.setSession=function(E){if(this.session!=E){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){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 O=this.session.getSelection();O.off("changeCursor",this.$onCursorChange),O.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:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),E&&E._signal("changeEditor",{editor:this}),E&&!E.destroyed&&E.bgTokenizer.scheduleStart()}},I.prototype.getSession=function(){return this.session},I.prototype.setValue=function(E,L){return this.session.doc.setValue(E),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),E},I.prototype.getValue=function(){return this.session.getValue()},I.prototype.getSelection=function(){return this.selection},I.prototype.resize=function(E){this.renderer.onResize(E)},I.prototype.setTheme=function(E,L){this.renderer.setTheme(E,L)},I.prototype.getTheme=function(){return this.renderer.getTheme()},I.prototype.setStyle=function(E){this.renderer.setStyle(E)},I.prototype.unsetStyle=function(E){this.renderer.unsetStyle(E)},I.prototype.getFontSize=function(){return this.getOption("fontSize")||u.computedStyle(this.container).fontSize},I.prototype.setFontSize=function(E){this.setOption("fontSize",E)},I.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var E=this;this.$highlightPending=!0,setTimeout(function(){E.$highlightPending=!1;var L=E.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(X){L.removeMarker(X)}),L.$bracketHighlight=null);var O=E.getCursorPosition(),B=E.getKeyboardHandler(),U=B&&B.$getDirectionForHighlight&&B.$getDirectionForHighlight(E),z=L.getMatchingBracketRanges(O,U);if(!z){var j=new w(L,O.row,O.column),q=j.getCurrentToken();if(q&&/\b(?:tag-open|tag-name)/.test(q.type)){var ne=L.getMatchingTags(O);ne&&(z=[ne.openTagName,ne.closeTagName])}}if(!z&&L.$mode.getMatching&&(z=L.$mode.getMatching(E.session)),!z){E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide();return}var G="ace_bracket";Array.isArray(z)?z.length==1&&(G="ace_error_bracket"):z=[z],z.length==2&&(m.comparePoints(z[0].end,z[1].start)==0?z=[m.fromPoints(z[0].start,z[1].end)]:m.comparePoints(z[0].start,z[1].end)==0&&(z=[m.fromPoints(z[1].start,z[0].end)])),L.$bracketHighlight={ranges:z,markerIds:z.map(function(X){return L.addMarker(X,G,"text")})},E.getHighlightIndentGuides()&&E.renderer.$textLayer.$highlightIndentGuide()}},50)}},I.prototype.focus=function(){this.textInput.focus()},I.prototype.isFocused=function(){return this.textInput.isFocused()},I.prototype.blur=function(){this.textInput.blur()},I.prototype.onFocus=function(E){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",E))},I.prototype.onBlur=function(E){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",E))},I.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},I.prototype.onDocumentChange=function(E){var L=this.session.$useWrapMode,O=E.start.row==E.end.row?E.end.row:1/0;this.renderer.updateLines(E.start.row,O,L),this._signal("change",E),this.$cursorChange()},I.prototype.onTokenizerUpdate=function(E){var L=E.data;this.renderer.updateLines(L.first,L.last)},I.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},I.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},I.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},I.prototype.$updateHighlightActiveLine=function(){var E=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),E.$highlightLineMarker&&!L)E.removeMarker(E.$highlightLineMarker.id),E.$highlightLineMarker=null;else if(!E.$highlightLineMarker&&L){var O=new m(L.row,L.column,L.row,1/0);O.id=E.addMarker(O,"ace_active-line","screenLine"),E.$highlightLineMarker=O}else L&&(E.$highlightLineMarker.start.row=L.row,E.$highlightLineMarker.end.row=L.row,E.$highlightLineMarker.start.column=L.column,E._signal("changeBackMarker"))},I.prototype.onSelectionChange=function(E){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var O=this.selection.getRange(),B=this.getSelectionStyle();L.$selectionMarker=L.addMarker(O,"ace_selection",B)}var U=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(U),this._signal("changeSelection")},I.prototype.$getSelectionHighLightRegexp=function(){var E=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var O=L.start.column,B=L.end.column,U=E.getLine(L.start.row),z=U.substring(O,B);if(!(z.length>5e3||!/[\w\d]/.test(z))){var j=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:z}),q=U.substring(O-1,B+1);if(!!j.test(q))return j}}},I.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},I.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},I.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},I.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},I.prototype.onChangeMode=function(E){this.renderer.updateText(),this._emit("changeMode",E)},I.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},I.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},I.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},I.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},I.prototype.getCopyText=function(){var E=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),O=!1;if(!E&&this.$copyWithEmptySelection){O=!0;for(var B=this.selection.getAllRanges(),U=0;U<B.length;U++){var z=B[U];U&&B[U-1].start.row==z.start.row||(E+=this.session.getLine(z.start.row)+L)}}var j={text:E};return this._signal("copy",j),R.lineMode=O?j.text:!1,j.text},I.prototype.onCopy=function(){this.commands.exec("copy",this)},I.prototype.onCut=function(){this.commands.exec("cut",this)},I.prototype.onPaste=function(E,L){var O={text:E,event:L};this.commands.exec("paste",this,O)},I.prototype.$handlePaste=function(E){typeof E=="string"&&(E={text:E}),this._signal("paste",E);var L=E.text,O=L===R.lineMode,B=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)O?B.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(O)this.selection.rangeList.ranges.forEach(function(G){B.insert({row:G.start.row,column:0},L)});else{var U=L.split(/\r\n|\r|\n/),z=this.selection.rangeList.ranges,j=U.length==2&&(!U[0]||!U[1]);if(U.length!=z.length||j)return this.commands.exec("insertstring",this,L);for(var q=z.length;q--;){var ne=z[q];ne.isEmpty()||B.remove(ne),B.insert(ne.start,U[q])}}},I.prototype.execCommand=function(E,L){return this.commands.exec(E,this,L)},I.prototype.insert=function(E,L){var O=this.session,B=O.getMode(),U=this.getCursorPosition();if(this.getBehavioursEnabled()&&!L){var z=B.transformAction(O.getState(U.row),"insertion",this,O,E);z&&(E!==z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),E=z.text)}if(E=="	"&&(E=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&E.indexOf(`
`)==-1){var j=new m.fromPoints(U,U);j.end.column+=E.length,this.session.remove(j)}}else{var j=this.getSelectionRange();U=this.session.remove(j),this.clearSelection()}if(E==`
`||E==`\r
`){var X=O.getLine(U.row);if(U.column>X.search(/\S|$/)){var q=X.substr(U.column).search(/\S|$/);O.doc.removeInLine(U.row,U.column,U.column+q)}}this.clearSelection();var ne=U.column,G=O.getState(U.row),X=O.getLine(U.row),ie=B.checkOutdent(G,X,E);if(O.insert(U,E),z&&z.selection&&(z.selection.length==2?this.selection.setSelectionRange(new m(U.row,ne+z.selection[0],U.row,ne+z.selection[1])):this.selection.setSelectionRange(new m(U.row+z.selection[0],z.selection[1],U.row+z.selection[2],z.selection[3]))),this.$enableAutoIndent){if(O.getDocument().isNewLine(E)){var le=B.getNextLineIndent(G,X.slice(0,U.column),O.getTabString());O.insert({row:U.row+1,column:0},le)}ie&&B.autoOutdent(G,O,U.row)}},I.prototype.autoIndent=function(){var E=this.session,L=E.getMode(),O,B;if(this.selection.isEmpty())O=0,B=E.doc.getLength()-1;else{var U=this.getSelectionRange();O=U.start.row,B=U.end.row}for(var z="",j="",q="",ne,G,X,ie=E.getTabString(),le=O;le<=B;le++)le>0&&(z=E.getState(le-1),j=E.getLine(le-1),q=L.getNextLineIndent(z,j,ie)),ne=E.getLine(le),G=L.$getIndent(ne),q!==G&&(G.length>0&&(X=new m(le,0,le,G.length),E.remove(X)),q.length>0&&E.insert({row:le,column:0},q)),L.autoOutdent(z,E,le)},I.prototype.onTextInput=function(E,L){if(!L)return this.keyBinding.onTextInput(E);this.startOperation({command:{name:"insertstring"}});var O=this.applyComposition.bind(this,E,L);this.selection.rangeCount?this.forEachSelection(O):O(),this.endOperation()},I.prototype.applyComposition=function(E,L){if(L.extendLeft||L.extendRight){var O=this.selection.getRange();O.start.column-=L.extendLeft,O.end.column+=L.extendRight,O.start.column<0&&(O.start.row--,O.start.column+=this.session.getLine(O.start.row).length+1),this.selection.setRange(O),!E&&!O.isEmpty()&&this.remove()}if((E||!this.selection.isEmpty())&&this.insert(E,!0),L.restoreStart||L.restoreEnd){var O=this.selection.getRange();O.start.column-=L.restoreStart,O.end.column-=L.restoreEnd,this.selection.setRange(O)}},I.prototype.onCommandKey=function(E,L,O){return this.keyBinding.onCommandKey(E,L,O)},I.prototype.setOverwrite=function(E){this.session.setOverwrite(E)},I.prototype.getOverwrite=function(){return this.session.getOverwrite()},I.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},I.prototype.setScrollSpeed=function(E){this.setOption("scrollSpeed",E)},I.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},I.prototype.setDragDelay=function(E){this.setOption("dragDelay",E)},I.prototype.getDragDelay=function(){return this.getOption("dragDelay")},I.prototype.setSelectionStyle=function(E){this.setOption("selectionStyle",E)},I.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},I.prototype.setHighlightActiveLine=function(E){this.setOption("highlightActiveLine",E)},I.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},I.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.setHighlightSelectedWord=function(E){this.setOption("highlightSelectedWord",E)},I.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},I.prototype.setAnimatedScroll=function(E){this.renderer.setAnimatedScroll(E)},I.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},I.prototype.setShowInvisibles=function(E){this.renderer.setShowInvisibles(E)},I.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},I.prototype.setDisplayIndentGuides=function(E){this.renderer.setDisplayIndentGuides(E)},I.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},I.prototype.setHighlightIndentGuides=function(E){this.renderer.setHighlightIndentGuides(E)},I.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},I.prototype.setShowPrintMargin=function(E){this.renderer.setShowPrintMargin(E)},I.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},I.prototype.setPrintMarginColumn=function(E){this.renderer.setPrintMarginColumn(E)},I.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},I.prototype.setReadOnly=function(E){this.setOption("readOnly",E)},I.prototype.getReadOnly=function(){return this.getOption("readOnly")},I.prototype.setBehavioursEnabled=function(E){this.setOption("behavioursEnabled",E)},I.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},I.prototype.setWrapBehavioursEnabled=function(E){this.setOption("wrapBehavioursEnabled",E)},I.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},I.prototype.setShowFoldWidgets=function(E){this.setOption("showFoldWidgets",E)},I.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},I.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.remove=function(E){this.selection.isEmpty()&&(E=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var O=this.session,B=O.getState(L.start.row),U=O.getMode().transformAction(B,"deletion",this,O,L);if(L.end.column===0){var z=O.getTextRange(L);if(z[z.length-1]==`
`){var j=O.getLine(L.end.row);/^\s+$/.test(j)&&(L.end.column=j.length)}}U&&(L=U)}this.session.remove(L),this.clearSelection()},I.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},I.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},I.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},I.prototype.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()},I.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var E=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(E)},I.prototype.setGhostText=function(E,L){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(E,L)},I.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},I.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var E=this.getCursorPosition(),L=E.column;if(L!==0){var O=this.session.getLine(E.row),B,U;L<O.length?(B=O.charAt(L)+O.charAt(L-1),U=new m(E.row,L-1,E.row,L+1)):(B=O.charAt(L-1)+O.charAt(L-2),U=new m(E.row,L-2,E.row,L)),this.session.replace(U,B),this.session.selection.moveToPosition(U.end)}}},I.prototype.toLowerCase=function(){var E=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),O=this.session.getTextRange(L);this.session.replace(L,O.toLowerCase()),this.selection.setSelectionRange(E)},I.prototype.toUpperCase=function(){var E=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),O=this.session.getTextRange(L);this.session.replace(L,O.toUpperCase()),this.selection.setSelectionRange(E)},I.prototype.indent=function(){var E=this.session,L=this.getSelectionRange();if(L.start.row<L.end.row){var O=this.$getSelectedRows();E.indentRows(O.first,O.last,"	");return}else if(L.start.column<L.end.column){var B=E.getTextRange(L);if(!/^\s+$/.test(B)){var O=this.$getSelectedRows();E.indentRows(O.first,O.last,"	");return}}var U=E.getLine(L.start.row),z=L.start,j=E.getTabSize(),q=E.documentToScreenColumn(z.row,z.column);if(this.session.getUseSoftTabs())var ne=j-q%j,G=a.stringRepeat(" ",ne);else{for(var ne=q%j;U[L.start.column-1]==" "&&ne;)L.start.column--,ne--;this.selection.setSelectionRange(L),G="	"}return this.insert(G)},I.prototype.blockIndent=function(){var E=this.$getSelectedRows();this.session.indentRows(E.first,E.last,"	")},I.prototype.blockOutdent=function(){var E=this.session.getSelection();this.session.outdentRows(E.getRange())},I.prototype.sortLines=function(){for(var E=this.$getSelectedRows(),L=this.session,O=[],B=E.first;B<=E.last;B++)O.push(L.getLine(B));O.sort(function(j,q){return j.toLowerCase()<q.toLowerCase()?-1:j.toLowerCase()>q.toLowerCase()?1:0});for(var U=new m(0,0,0,0),B=E.first;B<=E.last;B++){var z=L.getLine(B);U.start.row=B,U.end.row=B,U.end.column=z.length,L.replace(U,O[B-E.first])}},I.prototype.toggleCommentLines=function(){var E=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(E,this.session,L.first,L.last)},I.prototype.toggleBlockComment=function(){var E=this.getCursorPosition(),L=this.session.getState(E.row),O=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,O,E)},I.prototype.getNumberAt=function(E,L){var O=/[\-]?[0-9]+(?:\.[0-9]+)?/g;O.lastIndex=0;for(var B=this.session.getLine(E);O.lastIndex<L;){var U=O.exec(B);if(U.index<=L&&U.index+U[0].length>=L){var z={value:U[0],start:U.index,end:U.index+U[0].length};return z}}return null},I.prototype.modifyNumber=function(E){var L=this.selection.getCursor().row,O=this.selection.getCursor().column,B=new m(L,O-1,L,O),U=this.session.getTextRange(B);if(!isNaN(parseFloat(U))&&isFinite(U)){var z=this.getNumberAt(L,O);if(z){var j=z.value.indexOf(".")>=0?z.start+z.value.indexOf(".")+1:z.end,q=z.start+z.value.length-j,ne=parseFloat(z.value);ne*=Math.pow(10,q),j!==z.end&&O<j?E*=Math.pow(10,z.end-O-1):E*=Math.pow(10,z.end-O),ne+=E,ne/=Math.pow(10,q);var G=ne.toFixed(q),X=new m(L,z.start,L,z.end);this.session.replace(X,G),this.moveCursorTo(L,Math.max(z.start+1,O+G.length-z.value.length))}}else this.toggleWord()},I.prototype.toggleWord=function(){var E=this.selection.getCursor().row,L=this.selection.getCursor().column;this.selection.selectWord();var O=this.getSelectedText(),B=this.selection.getWordRange().start.column,U=O.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),z=L-B-1;z<0&&(z=0);var j=0,q=0,ne=this;O.match(/[A-Za-z0-9_]+/)&&U.forEach(function(Se,Ce){q=j+Se.length,z>=j&&z<=q&&(O=Se,ne.selection.clearSelection(),ne.moveCursorTo(E,j+B),ne.selection.selectTo(E,q+B)),j=q});for(var G=this.$toggleWordPairs,X,ie=0;ie<G.length;ie++)for(var le=G[ie],Y=0;Y<=1;Y++){var J=+!Y,te=O.match(new RegExp("^\\s?_?("+a.escapeRegExp(le[Y])+")\\s?$","i"));if(te){var ue=O.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(te[1])+")($|\\s)","g"));ue&&(X=O.replace(new RegExp(a.escapeRegExp(le[Y]),"i"),function(Se){var Ce=le[J];return Se.toUpperCase()==Se?Ce=Ce.toUpperCase():Se.charAt(0).toUpperCase()==Se.charAt(0)&&(Ce=Ce.substr(0,0)+le[J].charAt(0).toUpperCase()+Ce.substr(1)),Ce}),this.insert(X),X="")}}},I.prototype.findLinkAt=function(E,L){var O,B,U=this.session.getLine(E),z=U.split(/((?:https?|ftp):\/\/[\S]+)/),j=L;j<0&&(j=0);var q=0,ne=0,G;try{for(var X=s(z),ie=X.next();!ie.done;ie=X.next()){var le=ie.value;if(ne=q+le.length,j>=q&&j<=ne&&le.match(/((?:https?|ftp):\/\/[\S]+)/)){G=le.replace(/[\s:.,'";}\]]+$/,"");break}q=ne}}catch(Y){O={error:Y}}finally{try{ie&&!ie.done&&(B=X.return)&&B.call(X)}finally{if(O)throw O.error}}return G},I.prototype.openLink=function(){var E=this.selection.getCursor(),L=this.findLinkAt(E.row,E.column);return L&&window.open(L,"_blank"),L!=null},I.prototype.removeLines=function(){var E=this.$getSelectedRows();this.session.removeFullLines(E.first,E.last),this.clearSelection()},I.prototype.duplicateSelection=function(){var E=this.selection,L=this.session,O=E.getRange(),B=E.isBackwards();if(O.isEmpty()){var U=O.start.row;L.duplicateLines(U,U)}else{var z=B?O.start:O.end,j=L.insert(z,L.getTextRange(O),!1);O.start=z,O.end=j,E.setSelectionRange(O,B)}},I.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},I.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},I.prototype.moveText=function(E,L,O){return this.session.moveText(E,L,O)},I.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},I.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},I.prototype.$moveLines=function(E,L){var O,B,U=this.selection;if(!U.inMultiSelectMode||this.inVirtualSelectionMode){var z=U.toOrientedRange();O=this.$getSelectedRows(z),B=this.session.$moveLines(O.first,O.last,L?0:E),L&&E==-1&&(B=0),z.moveBy(B,0),U.fromOrientedRange(z)}else{var j=U.rangeList.ranges;U.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var q=0,ne=0,G=j.length,X=0;X<G;X++){var ie=X;j[X].moveBy(q,0),O=this.$getSelectedRows(j[X]);for(var le=O.first,Y=O.last;++X<G;){ne&&j[X].moveBy(ne,0);var J=this.$getSelectedRows(j[X]);if(L&&J.first!=Y)break;if(!L&&J.first>Y+1)break;Y=J.last}for(X--,q=this.session.$moveLines(le,Y,L?0:E),L&&E==-1&&(ie=X+1);ie<=X;)j[ie].moveBy(q,0),ie++;L||(q=0),ne+=q}U.fromOrientedRange(U.ranges[0]),U.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},I.prototype.$getSelectedRows=function(E){return E=(E||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(E.start.row),last:this.session.getRowFoldEnd(E.end.row)}},I.prototype.onCompositionStart=function(E){this.renderer.showComposition(E)},I.prototype.onCompositionUpdate=function(E){this.renderer.setCompositionText(E)},I.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},I.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},I.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},I.prototype.isRowVisible=function(E){return E>=this.getFirstVisibleRow()&&E<=this.getLastVisibleRow()},I.prototype.isRowFullyVisible=function(E){return E>=this.renderer.getFirstFullyVisibleRow()&&E<=this.renderer.getLastFullyVisibleRow()},I.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},I.prototype.$moveByPage=function(E,L){var O=this.renderer,B=this.renderer.layerConfig,U=E*Math.floor(B.height/B.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(U,0)}):L===!1&&(this.selection.moveCursorBy(U,0),this.selection.clearSelection());var z=O.scrollTop;O.scrollBy(0,U*B.lineHeight),L!=null&&O.scrollCursorIntoView(null,.5),O.animateScrolling(z)},I.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},I.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},I.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},I.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},I.prototype.scrollPageDown=function(){this.$moveByPage(1)},I.prototype.scrollPageUp=function(){this.$moveByPage(-1)},I.prototype.scrollToRow=function(E){this.renderer.scrollToRow(E)},I.prototype.scrollToLine=function(E,L,O,B){this.renderer.scrollToLine(E,L,O,B)},I.prototype.centerSelection=function(){var E=this.getSelectionRange(),L={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(L,.5)},I.prototype.getCursorPosition=function(){return this.selection.getCursor()},I.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},I.prototype.getSelectionRange=function(){return this.selection.getRange()},I.prototype.selectAll=function(){this.selection.selectAll()},I.prototype.clearSelection=function(){this.selection.clearSelection()},I.prototype.moveCursorTo=function(E,L){this.selection.moveCursorTo(E,L)},I.prototype.moveCursorToPosition=function(E){this.selection.moveCursorToPosition(E)},I.prototype.jumpToMatching=function(E,L){var O=this.getCursorPosition(),B=new w(this.session,O.row,O.column),U=B.getCurrentToken(),z=0;U&&U.type.indexOf("tag-name")!==-1&&(U=B.stepBackward());var j=U||B.stepForward();if(!!j){var q,ne=!1,G={},X=O.column-j.start,ie,le={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(j.value.match(/[{}()\[\]]/g)){for(;X<j.value.length&&!ne;X++)if(!!le[j.value[X]])switch(ie=le[j.value[X]]+"."+j.type.replace("rparen","lparen"),isNaN(G[ie])&&(G[ie]=0),j.value[X]){case"(":case"[":case"{":G[ie]++;break;case")":case"]":case"}":G[ie]--,G[ie]===-1&&(q="bracket",ne=!0);break}}else j.type.indexOf("tag-name")!==-1&&(isNaN(G[j.value])&&(G[j.value]=0),U.value==="<"&&z>1?G[j.value]++:U.value==="</"&&G[j.value]--,G[j.value]===-1&&(q="tag",ne=!0));ne||(U=j,z++,j=B.stepForward(),X=0)}while(j&&!ne);if(!!q){var Y,J;if(q==="bracket")Y=this.session.getBracketRange(O),Y||(Y=new m(B.getCurrentTokenRow(),B.getCurrentTokenColumn()+X-1,B.getCurrentTokenRow(),B.getCurrentTokenColumn()+X-1),J=Y.start,(L||J.row===O.row&&Math.abs(J.column-O.column)<2)&&(Y=this.session.getBracketRange(J)));else if(q==="tag"){if(!j||j.type.indexOf("tag-name")===-1)return;if(Y=new m(B.getCurrentTokenRow(),B.getCurrentTokenColumn()-2,B.getCurrentTokenRow(),B.getCurrentTokenColumn()-2),Y.compare(O.row,O.column)===0){var te=this.session.getMatchingTags(O);te&&(te.openTag.contains(O.row,O.column)?(Y=te.closeTag,J=Y.start):(Y=te.openTag,te.closeTag.start.row===O.row&&te.closeTag.start.column===O.column?J=Y.end:J=Y.start))}J=J||Y.start}J=Y&&Y.cursor||J,J&&(E?Y&&L?this.selection.setRange(Y):Y&&Y.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(J.row,J.column):this.selection.moveTo(J.row,J.column))}}},I.prototype.gotoLine=function(E,L,O){this.selection.clearSelection(),this.session.unfold({row:E-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(E-1,L||0),this.isRowFullyVisible(E-1)||this.scrollToLine(E-1,!0,O)},I.prototype.navigateTo=function(E,L){this.selection.moveTo(E,L)},I.prototype.navigateUp=function(E){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(-E||-1,0)},I.prototype.navigateDown=function(E){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(E||1,0)},I.prototype.navigateLeft=function(E){if(this.selection.isEmpty())for(E=E||1;E--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},I.prototype.navigateRight=function(E){if(this.selection.isEmpty())for(E=E||1;E--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},I.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},I.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},I.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},I.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},I.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},I.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},I.prototype.replace=function(E,L){L&&this.$search.set(L);var O=this.$search.find(this.session),B=0;return O&&(this.$tryReplace(O,E)&&(B=1),this.selection.setSelectionRange(O),this.renderer.scrollSelectionIntoView(O.start,O.end)),B},I.prototype.replaceAll=function(E,L){L&&this.$search.set(L);var O=this.$search.findAll(this.session),B=0;if(!O.length)return B;var U=this.getSelectionRange();this.selection.moveTo(0,0);for(var z=O.length-1;z>=0;--z)this.$tryReplace(O[z],E)&&B++;return this.selection.setSelectionRange(U),B},I.prototype.$tryReplace=function(E,L){var O=this.session.getTextRange(E);return L=this.$search.replace(O,L),L!==null?(E.end=this.session.replace(E,L),E):null},I.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},I.prototype.find=function(E,L,O){L||(L={}),typeof E=="string"||E instanceof RegExp?L.needle=E:typeof E=="object"&&o.mixin(L,E);var B=this.selection.getRange();L.needle==null&&(E=this.session.getTextRange(B)||this.$search.$options.needle,E||(B=this.session.getWordRange(B.start.row,B.start.column),E=this.session.getTextRange(B)),this.$search.set({needle:E})),this.$search.set(L),L.start||this.$search.set({start:B});var U=this.$search.find(this.session);if(L.preventScroll)return U;if(U)return this.revealRange(U,O),U;L.backwards?B.start=B.end:B.end=B.start,this.selection.setRange(B)},I.prototype.findNext=function(E,L){this.find({skipCurrent:!0,backwards:!1},E,L)},I.prototype.findPrevious=function(E,L){this.find(E,{skipCurrent:!0,backwards:!0},L)},I.prototype.revealRange=function(E,L){this.session.unfold(E),this.selection.setSelectionRange(E);var O=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(E.start,E.end,.5),L!==!1&&this.renderer.animateScrolling(O)},I.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},I.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},I.prototype.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()},I.prototype.setAutoScrollEditorIntoView=function(E){if(!!E){var L,O=this,B=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var U=this.$scrollAnchor;U.style.cssText="position:absolute",this.container.insertBefore(U,this.container.firstChild);var z=this.on("changeSelection",function(){B=!0}),j=this.renderer.on("beforeRender",function(){B&&(L=O.renderer.container.getBoundingClientRect())}),q=this.renderer.on("afterRender",function(){if(B&&L&&(O.isFocused()||O.searchBox&&O.searchBox.isFocused())){var ne=O.renderer,G=ne.$cursorLayer.$pixelPos,X=ne.layerConfig,ie=G.top-X.offset;G.top>=0&&ie+L.top<0?B=!0:G.top<X.height&&G.top+L.top+X.lineHeight>window.innerHeight?B=!1:B=null,B!=null&&(U.style.top=ie+"px",U.style.left=G.left+"px",U.style.height=X.lineHeight+"px",U.scrollIntoView(B)),B=L=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",z),this.renderer.off("afterRender",q),this.renderer.off("beforeRender",j))}}},I.prototype.$resetCursorStyle=function(){var E=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;!L||(L.setSmoothBlinking(/smooth/.test(E)),L.isBlinking=!this.$readOnly&&E!="wide",u.setCssClass(L.element,"ace_slim-cursors",/slim/.test(E)))},I.prototype.prompt=function(E,L,O){var B=this;_.loadModule("ace/ext/prompt",function(U){U.prompt(B,E,L,O)})},I}();A.$uid=0,A.prototype.curOp=null,A.prototype.prevOp={},A.prototype.$mergeableCommands=["backspace","del","insertstring"],A.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(A.prototype,v),_.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(I){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:I})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(I){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(I){this.textInput.setReadOnly(I),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(I){this.textInput.setCopyWithEmptySelection(I)},initialValue:!1},cursorStyle:{set:function(I){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(I){this.setAutoScrollEditorIntoView(I)}},keyboardHandler:{set:function(I){this.setKeyboardHandler(I)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(I){this.session.setValue(I)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(I){this.setSession(I)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(I){this.renderer.$gutterLayer.setShowLineNumbers(I),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),I&&this.$relativeLineNumbers?P.attach(this):P.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(I){this.$showLineNumbers&&I?P.attach(this):P.detach(this)}},placeholder:{set:function(I){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var E=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(E&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),u.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!E&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),u.addCssClass(this.container,"ace_hasPlaceholder");var L=u.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!E&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(I){var E={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(B){B.blur(),B.renderer.scroller.focus()},readOnly:!0},L=function(B){if(B.target==this.renderer.scroller&&B.keyCode===T.enter){B.preventDefault();var U=this.getCursorPosition().row;this.isRowVisible(U)||this.scrollToLine(U,!0,!0),this.focus()}},O;I?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",M("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",M("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(E),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",M("editor")),this.renderer.$gutter.setAttribute("aria-label",M("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),O||(O=new C(this)),O.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(E),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),O&&O.removeListener())},initialValue:!1},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",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"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 P={getText:function(I,E){return(Math.abs(I.selection.lead.row-E)||E+1+(E<9?"\xB7":""))+""},getWidth:function(I,E,L){return Math.max(E.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(I,E){E.renderer.$loop.schedule(E.renderer.CHANGE_GUTTER)},attach:function(I){I.renderer.$gutterLayer.$renderer=this,I.on("changeSelection",this.update),this.update(null,I)},detach:function(I){I.renderer.$gutterLayer.$renderer==this&&(I.renderer.$gutterLayer.$renderer=null),I.off("changeSelection",this.update),this.update(null,I)}};i.Editor=A}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,i,r){var s=function(){function w(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return w.prototype.addSession=function(b){this.$session=b},w.prototype.add=function(b,C,M){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),C===!1||!this.lastDeltas){this.lastDeltas=[];var R=this.$undoStack.length;R>this.$undoDepth-1&&this.$undoStack.splice(0,R-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},w.prototype.addSelection=function(b,C){this.selections.push({value:b,rev:C||this.$rev})},w.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},w.prototype.markIgnored=function(b,C){C==null&&(C=this.$rev+1);for(var M=this.$undoStack,R=M.length;R--;){var T=M[R][0];if(T.id<=b)break;T.id<C&&(T.ignore=!0)}this.lastDeltas=null},w.prototype.getSelection=function(b,C){for(var M=this.selections,R=M.length;R--;){var T=M[R];if(T.rev<b)return C&&(T=M[R+1]),T}},w.prototype.getRevision=function(){return this.$rev},w.prototype.getDeltas=function(b,C){C==null&&(C=this.$rev+1);for(var M=this.$undoStack,R=null,T=0,A=M.length;A--;){var P=M[A][0];if(P.id<C&&!R&&(R=A+1),P.id<=b){T=A+1;break}}return M.slice(T,R)},w.prototype.getChangedRanges=function(b,C){C==null&&(C=this.$rev+1)},w.prototype.getChangedLines=function(b,C){C==null&&(C=this.$rev+1)},w.prototype.undo=function(b,C){this.lastDeltas=null;var M=this.$undoStack;if(!!o(M,M.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var R=M.pop(),T=null;return R&&(T=b.undoChanges(R,C),this.$redoStack.push(R),this.$syncRev()),this.$fromUndo=!1,T}},w.prototype.redo=function(b,C){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var M=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);_(this.$redoStack,M),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(A){A[0].id=++this.$maxRev},this)}var R=this.$redoStack.pop(),T=null;return R&&(T=b.redoChanges(R,C),this.$undoStack.push(R),this.$syncRev()),this.$fromUndo=!1,T},w.prototype.$syncRev=function(){var b=this.$undoStack,C=b[b.length-1],M=C&&C[0].id||0;this.$redoStackBaseRev=M,this.$rev=M},w.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},w.prototype.canUndo=function(){return this.$undoStack.length>0},w.prototype.canRedo=function(){return this.$redoStack.length>0},w.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},w.prototype.isAtBookmark=function(){return this.$rev===this.mark},w.prototype.toJSON=function(){},w.prototype.fromJSON=function(){},w.prototype.$prettyPrint=function(b){return b?l(b):l(this.$undoStack)+`
---
`+l(this.$redoStack)},w}();s.prototype.hasUndo=s.prototype.canUndo,s.prototype.hasRedo=s.prototype.canRedo,s.prototype.isClean=s.prototype.isAtBookmark,s.prototype.markClean=s.prototype.bookmark;function o(w,b){for(var C=b;C--;){var M=w[C];if(M&&!M[0].ignore){for(;C<b-1;){var R=p(w[C],w[C+1]);w[C]=R[0],w[C+1]=R[1],C++}return!0}}}var u=n("./range").Range,a=u.comparePoints;u.comparePoints;function h(w){return{row:w.row,column:w.column}}function c(w){return{start:h(w.start),end:h(w.end),action:w.action,lines:w.lines.slice()}}function l(w){if(w=w||this,Array.isArray(w))return w.map(l).join(`
`);var b="";return w.action?(b=w.action=="insert"?"+":"-",b+="["+w.lines+"]"):w.value&&(Array.isArray(w.value)?b=w.value.map(d).join(`
`):b=d(w.value)),w.start&&(b+=d(w)),(w.id||w.rev)&&(b+="	("+(w.id||w.rev)+")"),b}function d(w){return w.start.row+":"+w.start.column+"=>"+w.end.row+":"+w.end.column}function f(w,b){var C=w.action=="insert",M=b.action=="insert";if(C&&M)if(a(b.start,w.end)>=0)m(b,w,-1);else if(a(b.start,w.start)<=0)m(w,b,1);else return null;else if(C&&!M)if(a(b.start,w.end)>=0)m(b,w,-1);else if(a(b.end,w.start)<=0)m(w,b,-1);else return null;else if(!C&&M)if(a(b.start,w.start)>=0)m(b,w,1);else if(a(b.start,w.start)<=0)m(w,b,1);else return null;else if(!C&&!M)if(a(b.start,w.start)>=0)m(b,w,1);else if(a(b.end,w.start)<=0)m(w,b,-1);else return null;return[b,w]}function p(w,b){for(var C=w.length;C--;)for(var M=0;M<b.length;M++)if(!f(w[C],b[M])){for(;C<w.length;){for(;M--;)f(b[M],w[C]);M=b.length,C++}return[w,b]}return w.selectionBefore=b.selectionBefore=w.selectionAfter=b.selectionAfter=null,[b,w]}function g(w,b){var C=w.action=="insert",M=b.action=="insert";if(C&&M)a(w.start,b.start)<0?m(b,w,1):m(w,b,1);else if(C&&!M)a(w.start,b.end)>=0?m(w,b,-1):(a(w.start,b.start)<=0||m(w,u.fromPoints(b.start,w.start),-1),m(b,w,1));else if(!C&&M)a(b.start,w.end)>=0?m(b,w,-1):(a(b.start,w.start)<=0||m(b,u.fromPoints(w.start,b.start),-1),m(w,b,1));else if(!C&&!M)if(a(b.start,w.end)>=0)m(b,w,-1);else if(a(b.end,w.start)<=0)m(w,b,-1);else{var R,T;return a(w.start,b.start)<0&&(R=w,w=y(w,b.start)),a(w.end,b.end)>0&&(T=y(w,b.end)),v(b.end,w.start,w.end,-1),T&&!R&&(w.lines=T.lines,w.start=T.start,w.end=T.end,T=w),[b,R,T].filter(Boolean)}return[b,w]}function m(w,b,C){v(w.start,b.start,b.end,C),v(w.end,b.start,b.end,C)}function v(w,b,C,M){w.row==(M==1?b:C).row&&(w.column+=M*(C.column-b.column)),w.row+=M*(C.row-b.row)}function y(w,b){var C=w.lines,M=w.end;w.end=h(b);var R=w.end.row-w.start.row,T=C.splice(R,C.length),A=R?b.column:b.column-w.start.column;C.push(T[0].substring(0,A)),T[0]=T[0].substr(A);var P={start:h(b),end:M,lines:T,action:w.action};return P}function S(w,b){b=c(b);for(var C=w.length;C--;){for(var M=w[C],R=0;R<M.length;R++){var T=M[R],A=g(T,b);b=A[0],A.length!=2&&(A[2]?(M.splice(R+1,1,A[1],A[2]),R++):A[1]||(M.splice(R,1),R--))}M.length||w.splice(C,1)}return w}function _(w,b){for(var C=0;C<b.length;C++)for(var M=b[C],R=0;R<M.length;R++)S(w,M[R])}i.UndoManager=s}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,i,r){var s=n("../lib/dom"),o=function(){function u(a,h){this.element=a,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return u.prototype.moveContainer=function(a){s.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},u.prototype.pageChanged=function(a,h){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},u.prototype.computeLineTop=function(a,h,c){var l=h.firstRowScreen*h.lineHeight,d=Math.floor(l/this.canvasHeight),f=c.documentToScreenRow(a,0)*h.lineHeight;return f-d*this.canvasHeight},u.prototype.computeLineHeight=function(a,h,c){return h.lineHeight*c.getRowLineCount(a)},u.prototype.getLength=function(){return this.cells.length},u.prototype.get=function(a){return this.cells[a]},u.prototype.shift=function(){this.$cacheCell(this.cells.shift())},u.prototype.pop=function(){this.$cacheCell(this.cells.pop())},u.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var h=s.createFragment(this.element),c=0;c<a.length;c++)h.appendChild(a[c].element);this.element.appendChild(h)}else this.cells.push(a),this.element.appendChild(a.element)},u.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var h=s.createFragment(this.element),c=0;c<a.length;c++)h.appendChild(a[c].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},u.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},u.prototype.$cacheCell=function(a){!a||(a.element.remove(),this.cellCache.push(a))},u.prototype.createCell=function(a,h,c,l){var d=this.cellCache.pop();if(!d){var f=s.createElement("div");l&&l(f),this.element.appendChild(f),d={element:f,text:"",row:a}}return d.row=a,d},u}();i.Lines=o}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,i,r){var s=n("../lib/dom"),o=n("../lib/oop"),u=n("../lib/lang"),a=n("../lib/event_emitter").EventEmitter,h=n("./lines").Lines,c=n("../config").nls,l=function(){function f(p){this.element=s.createElement("div"),this.element.className="ace_layer ace_gutter-layer",p.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return f.prototype.setSession=function(p){this.session&&this.session.off("change",this.$updateAnnotations),this.session=p,p&&p.on("change",this.$updateAnnotations)},f.prototype.addGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(p,g)},f.prototype.removeGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(p,g)},f.prototype.setAnnotations=function(p){this.$annotations=[];for(var g=0;g<p.length;g++){var m=p[g],v=m.row,y=this.$annotations[v];y||(y=this.$annotations[v]={text:[],type:[]});var S=m.text,_=m.type;S=S?u.escapeHTML(S):m.html||"",y.text.indexOf(S)===-1&&(y.text.push(S),y.type.push(_));var w=m.className;w?y.className=w:_=="error"?y.className=" ace_error":_=="warning"&&y.className!=" ace_error"?y.className=" ace_warning":_=="info"&&!y.className&&(y.className=" ace_info")}},f.prototype.$updateAnnotations=function(p){if(!!this.$annotations.length){var g=p.start.row,m=p.end.row-g;if(m!==0)if(p.action=="remove")this.$annotations.splice(g,m+1,null);else{var v=new Array(m+1);v.unshift(g,1),this.$annotations.splice.apply(this.$annotations,v)}}},f.prototype.update=function(p){this.config=p;var g=this.session,m=p.firstRow,v=Math.min(p.lastRow+p.gutterOffset,g.getLength()-1);this.oldLastRow=v,this.config=p,this.$lines.moveContainer(p),this.$updateCursorRow();for(var y=g.getNextFoldLine(m),S=y?y.start.row:1/0,_=null,w=-1,b=m;;){if(b>S&&(b=y.end.row+1,y=g.getNextFoldLine(b,y),S=y?y.start.row:1/0),b>v){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}_=this.$lines.get(++w),_?_.row=b:(_=this.$lines.createCell(b,p,this.session,d),this.$lines.push(_)),this.$renderCell(_,p,y,b),b++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var S=m?m.getWidth(g,y,p):y.toString().length*p.characterWidth,_=this.$padding||this.$computePadding();S+=_.left+_.right,S!==this.gutterWidth&&!isNaN(S)&&(this.gutterWidth=S,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",S))},f.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<g.length;m++){var v=g[m];if(v.row>=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var m=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v<p.firstRow)return this.update(p);if(m<g.firstRow)return this.update(p);if(g.firstRow<p.firstRow)for(var y=this.session.getFoldedRowCount(g.firstRow,p.firstRow-1);y>0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();p.firstRow<g.firstRow&&this.$lines.unshift(this.$renderLines(p,p.firstRow,g.firstRow-1)),m>v&&this.$lines.push(this.$renderLines(p,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,m){for(var v=[],y=g,S=this.session.getNextFoldLine(y),_=S?S.start.row:1/0;y>_&&(y=S.end.row+1,S=this.session.getNextFoldLine(y,S),_=S?S.start.row:1/0),!(y>m);){var w=this.$lines.createCell(y,p,this.session,d);this.$renderCell(w,p,S,y),v.push(w),y++}return v},f.prototype.$renderCell=function(p,g,m,v){var y=p.element,S=this.session,_=y.childNodes[0],w=y.childNodes[1],b=y.childNodes[2],C=b.firstChild,M=S.$firstLineNumber,R=S.$breakpoints,T=S.$decorations,A=S.gutterRenderer||this.$renderer,P=this.$showFoldWidgets&&S.foldWidgets,I=m?m.start.row:Number.MAX_VALUE,E=g.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",O=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",B=(A?A.getText(S,v):v+M).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v<this.$cursorRow&&v>=I&&this.$cursorRow<=m.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),R[v]&&(L+=R[v]),T[v]&&(L+=T[v]),this.$annotations[v]&&v!==I&&(L+=this.$annotations[v].className),y.className!=L&&(y.className=L),P){var U=P[v];U==null&&(U=P[v]=S.getFoldWidget(v))}if(U){var L="ace_fold-widget ace_"+U;if(U=="start"&&v==I&&v<m.end.row){L+=" ace_closed";for(var z,j=!1,q=v+1;q<=m.end.row;q++)if(!!this.$annotations[q]){if(this.$annotations[q].className===" ace_error"){j=!0,z=" ace_error_fold";break}if(this.$annotations[q].className===" ace_warning"){j=!0,z=" ace_warning_fold";continue}}y.className+=z}else L+=" ace_open";w.className!=L&&(w.className=L),s.setStyle(w.style,"height",E),s.setStyle(w.style,"display","inline-block"),w.setAttribute("role","button"),w.setAttribute("tabindex","-1");var m=S.getFoldLine(B-1);m?(w.setAttribute("aria-label",c("Unfold rows $0 to $1",[B,m.end.row+1])),w.setAttribute("title",c("Unfold code"))):(w.setAttribute("aria-label",c("Fold at row $0",[B])),w.setAttribute("title",c("Fold code")))}else w&&(s.setStyle(w.style,"display","none"),w.setAttribute("tabindex","0"),w.removeAttribute("role"),w.removeAttribute("aria-label"));return j&&this.$showFoldedAnnotations?(b.className="ace_gutter_annotation",C.className=O,C.className+=z,s.setStyle(C.style,"height",E),s.setStyle(b.style,"display","block"),s.setStyle(b.style,"height",E),b.setAttribute("aria-label",c("Read annotations row $0",[B])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):this.$annotations[v]?(b.className="ace_gutter_annotation",C.className=O,this.$useSvgGutterIcons?C.className+=this.$annotations[v].className:y.classList.add(this.$annotations[v].className.replace(" ","")),s.setStyle(C.style,"height",E),s.setStyle(b.style,"display","block"),s.setStyle(b.style,"height",E),b.setAttribute("aria-label",c("Read annotations row $0",[B])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):(s.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0")),B!==_.data&&(_.data=B),s.setStyle(p.element.style,"height",this.$lines.computeLineHeight(v,g,S)+"px"),s.setStyle(p.element.style,"top",this.$lines.computeLineTop(v,g,S)+"px"),p.text=B,b.style.display==="none"&&w.style.display==="none"?p.element.setAttribute("aria-hidden",!0):p.element.setAttribute("aria-hidden",!1),p},f.prototype.setHighlightGutterLine=function(p){this.$highlightGutterLine=p},f.prototype.setShowLineNumbers=function(p){this.$renderer=!p&&{getWidth:function(){return 0},getText:function(){return""}}},f.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},f.prototype.setShowFoldWidgets=function(p){p?s.addCssClass(this.element,"ace_folding-enabled"):s.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=p,this.$padding=null},f.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},f.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var p=s.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(p.borderLeftWidth)||0)+(parseInt(p.paddingLeft)||0)+1,this.$padding.right=(parseInt(p.borderRightWidth)||0)+(parseInt(p.paddingRight)||0),this.$padding},f.prototype.getRegion=function(p){var g=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(p.x<g.left+m.left)return"markers";if(this.$showFoldWidgets&&p.x>m.right-g.right)return"foldWidgets"},f}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer="",l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,o.implement(l.prototype,a);function d(f){var p=document.createTextNode("");f.appendChild(p);var g=s.createElement("span");f.appendChild(g);var m=s.createElement("span");f.appendChild(m);var v=s.createElement("span");return m.appendChild(v),f}i.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,i,r){var s=n("../range").Range,o=n("../lib/dom"),u=function(){function h(c){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}return h.prototype.setPadding=function(c){this.$padding=c},h.prototype.setSession=function(c){this.session=c},h.prototype.setMarkers=function(c){this.markers=c},h.prototype.elt=function(c,l){var d=this.i!=-1&&this.element.childNodes[this.i];d?this.i++:(d=document.createElement("div"),this.element.appendChild(d),this.i=-1),d.style.cssText=l,d.className=c},h.prototype.update=function(c){if(!!c){this.config=c,this.i=0;var l;for(var d in this.markers){var f=this.markers[d];if(!f.range){f.update(l,this,this.session,c);continue}var p=f.range.clipRows(c.firstRow,c.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,c),m=this.$padding+p.start.column*c.characterWidth;f.renderer(l,p,m,g,c)}else f.type=="fullLine"?this.drawFullLineMarker(l,p,f.clazz,c):f.type=="screenLine"?this.drawScreenLineMarker(l,p,f.clazz,c):p.isMultiLine()?f.type=="text"?this.drawTextMarker(l,p,f.clazz,c):this.drawMultiLineMarker(l,p,f.clazz,c):this.drawSingleLineMarker(l,p,f.clazz+" ace_start ace_br15",c)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(c,l){return(c-l.firstRowScreen)*l.lineHeight},h.prototype.drawTextMarker=function(c,l,d,f,p){for(var g=this.session,m=l.start.row,v=l.end.row,y=m,S=0,_=0,w=g.getScreenLastRowColumn(y),b=new s(y,l.start.column,y,_);y<=v;y++)b.start.row=b.end.row=y,b.start.column=y==m?l.start.column:g.getRowWrapIndent(y),b.end.column=w,S=_,_=w,w=y+1<v?g.getScreenLastRowColumn(y+1):y==v?0:l.end.column,this.drawSingleLineMarker(c,b,d+(y==m?" ace_start":"")+" ace_br"+a(y==m||y==m+1&&l.start.column,S<_,_>w,y==v),f,y==v?0:1,p)},h.prototype.drawMultiLineMarker=function(c,l,d,f,p){var g=this.$padding,m=f.lineHeight,v=this.$getTop(l.start.row,f),y=g+l.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var S=l.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(c,S,d+" ace_br1 ace_start",f,null,p)}else this.elt(d+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var S=l.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(c,S,d+" ace_br12",f,null,p)}else{v=this.$getTop(l.end.row,f);var _=l.end.column*f.characterWidth;this.elt(d+" ace_br12","height:"+m+"px;width:"+_+"px;top:"+v+"px;left:"+g+"px;"+(p||""))}if(m=(l.end.row-l.start.row-1)*f.lineHeight,!(m<=0)){v=this.$getTop(l.start.row+1,f);var w=(l.start.column?1:0)|(l.end.column?0:8);this.elt(d+(w?" ace_br"+w:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(p||""))}},h.prototype.drawSingleLineMarker=function(c,l,d,f,p,g){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(c,l,d,f,p,g);var m=f.lineHeight,v=(l.end.column+(p||0)-l.start.column)*f.characterWidth,y=this.$getTop(l.start.row,f),S=this.$padding+l.start.column*f.characterWidth;this.elt(d,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+S+"px;"+(g||""))},h.prototype.drawBidiSingleLineMarker=function(c,l,d,f,p,g){var m=f.lineHeight,v=this.$getTop(l.start.row,f),y=this.$padding,S=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);S.forEach(function(_){this.elt(d,"height:"+m+"px;width:"+(_.width+(p||0))+"px;top:"+v+"px;left:"+(y+_.left)+"px;"+(g||""))},this)},h.prototype.drawFullLineMarker=function(c,l,d,f,p){var g=this.$getTop(l.start.row,f),m=f.lineHeight;l.start.row!=l.end.row&&(m+=this.$getTop(l.end.row,f)-g),this.elt(d,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},h.prototype.drawScreenLineMarker=function(c,l,d,f,p){var g=this.$getTop(l.start.row,f),m=f.lineHeight;this.elt(d,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},h}();u.prototype.$padding=0;function a(h,c,l,d){return(h?1:0)|(c?2:0)|(l?4:0)|(d?8:0)}i.Marker=u}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config"],function(n,i,r){var s=n("../lib/oop"),o=n("../lib/dom"),u=n("../lib/lang"),a=n("./lines").Lines,h=n("../lib/event_emitter").EventEmitter,c=n("../config").nls,l=function(){function d(f){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",f.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return d.prototype.$updateEolChar=function(){var f=this.session.doc,p=f.getNewLineCharacter()==`
`&&f.getNewLineMode()!="windows",g=p?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},d.prototype.setPadding=function(f){this.$padding=f,this.element.style.margin="0 "+f+"px"},d.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},d.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},d.prototype.$setFontMetrics=function(f){this.$fontMetrics=f,this.$fontMetrics.on("changeCharacterSize",function(p){this._signal("changeCharacterSize",p)}.bind(this)),this.$pollSizeChanges()},d.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},d.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},d.prototype.setSession=function(f){this.session=f,f&&this.$computeTabString()},d.prototype.setShowInvisibles=function(f){return this.showInvisibles==f?!1:(this.showInvisibles=f,typeof f=="string"?(this.showSpaces=/tab/i.test(f),this.showTabs=/space/i.test(f),this.showEOL=/eol/i.test(f)):this.showSpaces=this.showTabs=this.showEOL=f,this.$computeTabString(),!0)},d.prototype.setDisplayIndentGuides=function(f){return this.displayIndentGuides==f?!1:(this.displayIndentGuides=f,this.$computeTabString(),!0)},d.prototype.setHighlightIndentGuides=function(f){return this.$highlightIndentGuides===f?!1:(this.$highlightIndentGuides=f,f)},d.prototype.$computeTabString=function(){var f=this.session.getTabSize();this.tabSize=f;for(var p=this.$tabStrings=[0],g=1;g<f+1;g++)if(this.showTabs){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_tab",m.textContent=u.stringRepeat(this.TAB_CHAR,g),p.push(m)}else p.push(this.dom.createTextNode(u.stringRepeat(" ",g),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var v="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?u.stringRepeat(this.SPACE_CHAR,this.tabSize):u.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?u.stringRepeat(this.TAB_CHAR,this.tabSize):S,m=this.dom.createElement("span");m.className=v+y,m.textContent=S,this.$tabStrings[" "]=m;var m=this.dom.createElement("span");m.className=v+_,m.textContent=w,this.$tabStrings["	"]=m}},d.prototype.updateLines=function(f,p,g){if(this.config.lastRow!=f.lastRow||this.config.firstRow!=f.firstRow)return this.update(f);this.config=f;for(var m=Math.max(p,f.firstRow),v=Math.min(g,f.lastRow),y=this.element.childNodes,S=0,w=f.firstRow;w<m;w++){var b=this.session.getFoldLine(w);if(b)if(b.containsRow(m)){m=b.start.row;break}else w=b.end.row;S++}for(var _=!1,w=m,b=this.session.getNextFoldLine(w),C=b?b.start.row:1/0;w>C&&(w=b.end.row+1,b=this.session.getNextFoldLine(w,b),C=b?b.start.row:1/0),!(w>v);){var M=y[S++];if(M){this.dom.removeChildren(M),this.$renderLine(M,w,w==C?b:!1),_&&(M.style.top=this.$lines.computeLineTop(w,f,this.session)+"px");var R=f.lineHeight*this.session.getRowLength(w)+"px";M.style.height!=R&&(_=!0,M.style.height=R)}w++}if(_)for(;S<this.$lines.cells.length;){var T=this.$lines.cells[S++];T.element.style.top=this.$lines.computeLineTop(T.row,f,this.session)+"px"}},d.prototype.scrollLines=function(f){var p=this.config;if(this.config=f,this.$lines.pageChanged(p,f))return this.update(f);this.$lines.moveContainer(f);var g=f.lastRow,m=p?p.lastRow:-1;if(!p||m<f.firstRow)return this.update(f);if(g<p.firstRow)return this.update(f);if(!p||p.lastRow<f.firstRow)return this.update(f);if(f.lastRow<p.firstRow)return this.update(f);if(p.firstRow<f.firstRow)for(var v=this.session.getFoldedRowCount(p.firstRow,f.firstRow-1);v>0;v--)this.$lines.shift();if(p.lastRow>f.lastRow)for(var v=this.session.getFoldedRowCount(f.lastRow+1,p.lastRow);v>0;v--)this.$lines.pop();f.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLinesFragment(f,f.firstRow,p.firstRow-1)),f.lastRow>p.lastRow&&this.$lines.push(this.$renderLinesFragment(f,p.lastRow+1,f.lastRow)),this.$highlightIndentGuide()},d.prototype.$renderLinesFragment=function(f,p,g){for(var m=[],v=p,y=this.session.getNextFoldLine(v),S=y?y.start.row:1/0;v>S&&(v=y.end.row+1,y=this.session.getNextFoldLine(v,y),S=y?y.start.row:1/0),!(v>g);){var _=this.$lines.createCell(v,f,this.session),w=_.element;this.dom.removeChildren(w),o.setStyle(w.style,"height",this.$lines.computeLineHeight(v,f,this.session)+"px"),o.setStyle(w.style,"top",this.$lines.computeLineTop(v,f,this.session)+"px"),this.$renderLine(w,v,v==S?y:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",m.push(_),v++}return m},d.prototype.update=function(f){this.$lines.moveContainer(f),this.config=f;for(var p=f.firstRow,g=f.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(f,p,g))},d.prototype.$renderToken=function(f,p,g,m){for(var v=this,y=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,S=this.dom.createFragment(this.element),_,w=0;_=y.exec(m);){var b=_[1],C=_[2],M=_[3],R=_[4],T=_[5];if(!(!v.showSpaces&&C)){var A=w!=_.index?m.slice(w,_.index):"";if(w=_.index+_[0].length,A&&S.appendChild(this.dom.createTextNode(A,this.element)),b){var P=v.session.getScreenTabSize(p+_.index);S.appendChild(v.$tabStrings[P].cloneNode(!0)),p+=P-1}else if(C)if(v.showSpaces){var I=this.dom.createElement("span");I.className="ace_invisible ace_invisible_space",I.textContent=u.stringRepeat(v.SPACE_CHAR,C.length),S.appendChild(I)}else S.appendChild(this.com.createTextNode(C,this.element));else if(M){var I=this.dom.createElement("span");I.className="ace_invisible ace_invisible_space ace_invalid",I.textContent=u.stringRepeat(v.SPACE_CHAR,M.length),S.appendChild(I)}else if(R){p+=1;var I=this.dom.createElement("span");I.style.width=v.config.characterWidth*2+"px",I.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",I.textContent=v.showSpaces?v.SPACE_CHAR:R,S.appendChild(I)}else if(T){p+=1;var I=this.dom.createElement("span");I.style.width=v.config.characterWidth*2+"px",I.className="ace_cjk",I.textContent=T,S.appendChild(I)}}}if(S.appendChild(this.dom.createTextNode(w?m.slice(w):m,this.element)),this.$textToken[g.type])f.appendChild(S);else{var E="ace_"+g.type.replace(/\./g," ace_"),I=this.dom.createElement("span");g.type=="fold"&&(I.style.width=g.value.length*this.config.characterWidth+"px",I.setAttribute("title",c("Unfold code"))),I.className=E,I.appendChild(S),f.appendChild(I)}return p+m.length},d.prototype.renderIndentGuide=function(f,p,g){var m=p.search(this.$indentGuideRe);if(m<=0||m>=g)return p;if(p[0]==" "){m-=m%this.tabSize;for(var v=m/this.tabSize,y=0;y<v;y++)f.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(m)}else if(p[0]=="	"){for(var y=0;y<m;y++)f.appendChild(this.$tabStrings["	"].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(m)}return this.$highlightIndentGuide(),p},d.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var f=this.session.doc.$lines;if(!!f){var p=this.session.selection.getCursor(),g=/^\s*/.exec(this.session.doc.getLine(p.row))[0].length,m=Math.floor(g/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:m,start:p.row};var v=this.session.$bracketHighlight;if(v){for(var y=this.session.$bracketHighlight.ranges,S=0;S<y.length;S++)if(p.row!==y[S].start.row){this.$highlightIndentGuideMarker.end=y[S].start.row,p.row>y[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&f[p.row]!==""&&p.column===f[p.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=p.row+1;S<f.length;S++){var _=f[S],w=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=S,w<=g))break}}this.$renderHighlightIndentGuide()}}},d.prototype.$clearActiveIndentGuide=function(){for(var f=this.$lines.cells,p=0;p<f.length;p++){var g=f[p],m=g.element.childNodes;if(m.length>0){for(var v=0;v<m.length;v++)if(m[v].classList&&m[v].classList.contains("ace_indent-guide-active")){m[v].classList.remove("ace_indent-guide-active");break}}}},d.prototype.$setIndentGuideActive=function(f,p){var g=this.session.doc.getLine(f.row);if(g!==""){var m=f.element.childNodes;if(m){var v=m[p-1];v&&v.classList&&v.classList.contains("ace_indent-guide")&&v.classList.add("ace_indent-guide-active")}}},d.prototype.$renderHighlightIndentGuide=function(){if(!!this.$lines){var f=this.$lines.cells;this.$clearActiveIndentGuide();var p=this.$highlightIndentGuideMarker.indentLevel;if(p!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g<f.length;g++){var m=f[g];if(this.$highlightIndentGuideMarker.end&&m.row>=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,p)}}else for(var g=f.length-1;g>=0;g--){var m=f[g];if(this.$highlightIndentGuideMarker.end&&m.row<this.$highlightIndentGuideMarker.start){if(m.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,p)}}}},d.prototype.$createLineElement=function(f){var p=this.dom.createElement("div");return p.className="ace_line",p.style.height=this.config.lineHeight+"px",p},d.prototype.$renderWrappedLine=function(f,p,g){var m=0,v=0,y=g[0],S=0,_=this.$createLineElement();f.appendChild(_);for(var w=0;w<p.length;w++){var b=p[w],C=b.value;if(w==0&&this.displayIndentGuides){if(m=C.length,C=this.renderIndentGuide(_,C,y),!C)continue;m-=C.length}if(m+C.length<y)S=this.$renderToken(_,S,b,C),m+=C.length;else{for(;m+C.length>=y;)S=this.$renderToken(_,S,b,C.substring(0,y-m)),C=C.substring(y-m),m=y,_=this.$createLineElement(),f.appendChild(_),_.appendChild(this.dom.createTextNode(u.stringRepeat("\xA0",g.indent),this.element)),v++,S=0,y=g[v]||Number.MAX_VALUE;C.length!=0&&(m+=C.length,S=this.$renderToken(_,S,b,C))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,S,null,"",!0)},d.prototype.$renderSimpleLine=function(f,p){for(var g=0,m=0;m<p.length;m++){var v=p[m],y=v.value;if(!(m==0&&this.displayIndentGuides&&(y=this.renderIndentGuide(f,y),!y))){if(g+y.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(f,g,v,y);g=this.$renderToken(f,g,v,y)}}},d.prototype.$renderOverflowMessage=function(f,p,g,m,v){g&&this.$renderToken(f,p,g,m.slice(0,this.MAX_LINE_LENGTH-p));var y=this.dom.createElement("span");y.className="ace_inline_button ace_keyword ace_toggle_wrap",y.textContent=v?"<hide>":"<click to see more...>",f.appendChild(y)},d.prototype.$renderLine=function(f,p,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(p)),g)var m=this.$getFoldLineTokens(p,g);else var m=this.session.getTokens(p);var v=f;if(m.length){var y=this.session.getRowSplitData(p);if(y&&y.length){this.$renderWrappedLine(f,m,y);var v=f.lastChild}else{var v=f;this.$useLineGroups()&&(v=this.$createLineElement(),f.appendChild(v)),this.$renderSimpleLine(v,m)}}else this.$useLineGroups()&&(v=this.$createLineElement(),f.appendChild(v));if(this.showEOL&&v){g&&(p=g.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=p==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(S)}},d.prototype.$getFoldLineTokens=function(f,p){var g=this.session,m=[];function v(S,_,w){for(var b=0,C=0;C+S[b].value.length<_;)if(C+=S[b].value.length,b++,b==S.length)return;if(C!=_){var M=S[b].value.substring(_-C);M.length>w-_&&(M=M.substring(0,w-_)),m.push({type:S[b].type,value:M}),C=_+M.length,b+=1}for(;C<w&&b<S.length;){var M=S[b].value;M.length+C>w?m.push({type:S[b].type,value:M.substring(0,w-C)}):m.push(S[b]),C+=M.length,b+=1}}var y=g.getTokens(f);return p.walk(function(S,_,w,b,C){S!=null?m.push({type:"fold",value:S}):(C&&(y=g.getTokens(_)),y.length&&v(y,b,w))},p.end.row,this.session.getLine(p.end.row).length),m},d.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},d}();l.prototype.$textToken={text:!0,rparen:!0,lparen:!0},l.prototype.EOF_CHAR="\xB6",l.prototype.EOL_CHAR_LF="\xAC",l.prototype.EOL_CHAR_CRLF="\xA4",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="\u2014",l.prototype.SPACE_CHAR="\xB7",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,s.implement(l.prototype,h),i.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,i,r){var s=n("../lib/dom"),o=function(){function u(a){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return u.prototype.$updateOpacity=function(a){for(var h=this.cursors,c=h.length;c--;)s.setStyle(h[c].style,"opacity",a?"":"0")},u.prototype.$startCssAnimation=function(){for(var a=this.cursors,h=a.length;h--;)a[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},u.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},u.prototype.setPadding=function(a){this.$padding=a},u.prototype.setSession=function(a){this.session=a},u.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},u.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},u.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,s.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},u.prototype.addCursor=function(){var a=s.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},u.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},u.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},u.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},u.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),h()},this.blinkInterval),h()}},u.prototype.getPixelPosition=function(a,h){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),l=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,a.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),d=(c.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:d}},u.prototype.isCursorInView=function(a,h){return a.top>=0&&a.top<h.maxHeight},u.prototype.update=function(a){this.config=a;var h=this.session.$selectionMarkers,c=0,l=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var c=0,d=h.length;c<d;c++){var f=this.getPixelPosition(h[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<0)&&c>1)){var p=this.cursors[l++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,a,h[c],this.session):this.isCursorInView(f,a)?(s.setStyle(g,"display","block"),s.translate(p,f.left,f.top),s.setStyle(g,"width",Math.round(a.characterWidth)+"px"),s.setStyle(g,"height",a.lineHeight+"px")):s.setStyle(g,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=f,this.restartTimer()},u.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},u.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},u}();o.prototype.$padding=0,o.prototype.drawCursor=null,i.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,i,r){var s=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(v[S]=y[S])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),o=n("./lib/oop"),u=n("./lib/dom"),a=n("./lib/event"),h=n("./lib/event_emitter").EventEmitter,c=32768,l=function(){function p(g,m){this.element=u.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=u.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();o.implement(l.prototype,h);var d=function(p){s(g,p);function g(m,v){var y=p.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=u.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(m){this.element.style.height=m+"px"},g.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>c?(this.coeff=c/m,m=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},g.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},g}(l);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var f=function(p){s(g,p);function g(m,v){var y=p.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(m){this.element.style.width=m+"px"},g.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},g}(l);i.ScrollBar=d,i.ScrollBarV=d,i.ScrollBarH=f,i.VScrollBar=d,i.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,i,r){var s=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),o=n("./lib/oop"),u=n("./lib/dom"),a=n("./lib/event"),h=n("./lib/event_emitter").EventEmitter;u.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
  position: absolute;
  background: rgba(128, 128, 128, 0.6);
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 2px;
  z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
  position: absolute;
  z-index: 6;
  background: none;
  overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
  z-index: 6;
  right: 0;
  top: 0;
  width: 12px;
}
.ace_editor>.ace_sb-v div {
  z-index: 8;
  right: 0;
  width: 100%;
}
.ace_editor>.ace_sb-h {
  bottom: 0;
  left: 0;
  height: 12px;
}
.ace_editor>.ace_sb-h div {
  bottom: 0;
  height: 100%;
}
.ace_editor>.ace_sb_grabbed {
  z-index: 8;
  background: #000;
}`,"ace_scrollbar.css",!1);var c=function(){function f(p,g){this.element=u.createElement("div"),this.element.className="ace_sb"+g,this.inner=u.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();o.implement(c.prototype,h);var l=function(f){s(p,f);function p(g,m){var v=f.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,S=function(T){y=T.clientY},_=function(){clearInterval(M)},w=m.clientY,b=this.thumbTop,C=function(){if(y!==void 0){var T=v.scrollTopFromThumbTop(b+y-w);T!==v.scrollTop&&v._emit("scroll",{data:T})}};a.capture(this.inner,S,_);var M=setInterval(C,20);return a.preventDefault(m)}var R=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(R)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,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})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(c);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var d=function(f){s(p,f);function p(g,m){var v=f.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(a.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,S=function(T){y=T.clientX},_=function(){clearInterval(M)},w=m.clientX,b=this.thumbLeft,C=function(){if(y!==void 0){var T=v.scrollLeftFromThumbLeft(b+y-w);T!==v.scrollLeft&&v._emit("scroll",{data:T})}};a.capture(this.inner,S,_);var M=setInterval(C,20);return a.preventDefault(m)}var R=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(R)}),a.preventDefault(m)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,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})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(c);d.prototype.setInnerWidth=d.prototype.setScrollWidth,i.ScrollBar=l,i.ScrollBarV=l,i.ScrollBarH=d,i.VScrollBar=l,i.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,i,r){var s=n("./lib/event"),o=function(){function u(a,h){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var c=this;this._flush=function(l){c.pending=!1;var d=c.changes;if(d&&(s.blockIdle(100),c.changes=0,c.onRender(d)),c.changes){if(c.$recursionLimit--<0)return;c.schedule()}else c.$recursionLimit=2}}return u.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},u.prototype.clear=function(a){var h=this.changes;return this.changes=0,h},u}();i.RenderLoop=o}),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(n,i,r){var s=n("../lib/oop"),o=n("../lib/dom"),u=n("../lib/lang"),a=n("../lib/event"),h=n("../lib/useragent"),c=n("../lib/event_emitter").EventEmitter,l=512,d=typeof ResizeObserver=="function",f=200,p=function(){function g(m){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=u.stringRepeat("X",l),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",h.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=a.onIdle(function v(){m.checkForSizeChanges(),a.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/l};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=u.stringRepeat(m,l);var v=this.$main.getBoundingClientRect();return v.width/l},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=o.buildDom([m(0,0),m(f,0),m(0,f),m(f,f)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=b(1/y,m)}function S(j,q,ne){var G=j[1]*q[0]-j[0]*q[1];return[(-q[1]*ne[0]+q[0]*ne[1])/G,(+j[1]*ne[0]-j[0]*ne[1])/G]}function _(j,q){return[j[0]-q[0],j[1]-q[1]]}function w(j,q){return[j[0]+q[0],j[1]+q[1]]}function b(j,q){return[j*q[0],j*q[1]]}this.els||this.$initTransformMeasureNodes();function C(j){var q=j.getBoundingClientRect();return[q.left,q.top]}var M=C(this.els[0]),R=C(this.els[1]),T=C(this.els[2]),A=C(this.els[3]),P=S(_(A,R),_(A,T),_(w(R,T),w(A,M))),I=b(1+P[0],_(R,M)),E=b(1+P[1],_(T,M));if(v){var L=v,O=P[0]*L[0]/f+P[1]*L[1]/f+1,B=w(b(L[0],I),b(L[1],E));return w(b(1/O/f,B),M)}var U=_(m,M),z=S(_(I,b(P[0],U)),_(E,b(P[1],U)),U);return b(f,z)},g}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,c),i.FontMetrics=p}),ace.define("ace/css/editor.css",["require","exports","module"],function(n,i,r){r.exports=`
.ace_br1 {border-top-left-radius    : 3px;}
.ace_br2 {border-top-right-radius   : 3px;}
.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}
.ace_br4 {border-bottom-right-radius: 3px;}
.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}
.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}
.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}
.ace_br8 {border-bottom-left-radius : 3px;}
.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}
.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}
.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}


.ace_editor {
    position: relative;
    overflow: hidden;
    padding: 0;
    font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
    direction: ltr;
    text-align: left;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.ace_scroller {
    position: absolute;
    overflow: hidden;
    top: 0;
    bottom: 0;
    background-color: inherit;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: text;
}

.ace_content {
    position: absolute;
    box-sizing: border-box;
    min-width: 100%;
    contain: style size layout;
    font-variant-ligatures: no-common-ligatures;
}

.ace_keyboard-focus:focus {
    box-shadow: inset 0 0 0 2px #5E9ED6;
    outline: none;
}

.ace_dragging .ace_scroller:before{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    background: rgba(250, 250, 250, 0.01);
    z-index: 1000;
}
.ace_dragging.ace_dark .ace_scroller:before{
    background: rgba(0, 0, 0, 0.01);
}

.ace_gutter {
    position: absolute;
    overflow : hidden;
    width: auto;
    top: 0;
    bottom: 0;
    left: 0;
    cursor: default;
    z-index: 4;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    contain: style size layout;
}

.ace_gutter-active-line {
    position: absolute;
    left: 0;
    right: 0;
}

.ace_scroller.ace_scroll-left:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
    pointer-events: none;
}

.ace_gutter-cell, .ace_gutter-cell_svg-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding-left: 19px;
    padding-right: 6px;
    background-repeat: no-repeat;
}

.ace_gutter-cell_svg-icons .ace_gutter_annotation {
    margin-left: -14px;
    float: left;
}

.ace_gutter-cell .ace_gutter_annotation {
    margin-left: -19px;
    float: left;
}

.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 2px center;
}

.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 2px center;
}

.ace_gutter-cell.ace_info, .ace_icon.ace_info {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
    background-repeat: no-repeat;
    background-position: 2px center;
}
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
}

.ace_icon_svg.ace_error {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
    background-color: crimson;
}
.ace_icon_svg.ace_warning {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
    background-color: darkorange;
}
.ace_icon_svg.ace_info {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
    background-color: royalblue;
}

.ace_icon_svg.ace_error_fold {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
    background-color: crimson;
}
.ace_icon_svg.ace_warning_fold {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
    background-color: darkorange;
}

.ace_scrollbar {
    contain: strict;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 6;
}

.ace_scrollbar-inner {
    position: absolute;
    cursor: text;
    left: 0;
    top: 0;
}

.ace_scrollbar-v{
    overflow-x: hidden;
    overflow-y: scroll;
    top: 0;
}

.ace_scrollbar-h {
    overflow-x: scroll;
    overflow-y: hidden;
    left: 0;
}

.ace_print-margin {
    position: absolute;
    height: 100%;
}

.ace_text-input {
    position: absolute;
    z-index: 0;
    width: 0.5em;
    height: 1em;
    opacity: 0;
    background: transparent;
    -moz-appearance: none;
    appearance: none;
    border: none;
    resize: none;
    outline: none;
    overflow: hidden;
    font: inherit;
    padding: 0 1px;
    margin: 0 -1px;
    contain: strict;
    -ms-user-select: text;
    -moz-user-select: text;
    -webkit-user-select: text;
    user-select: text;
    /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
    white-space: pre!important;
}
.ace_text-input.ace_composition {
    background: transparent;
    color: inherit;
    z-index: 1000;
    opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker { 
    border-bottom: 1px solid;
    position: absolute;
    border-radius: 0;
    margin-top: 1px;
}

[ace_nocontext=true] {
    transform: none!important;
    filter: none!important;
    clip-path: none!important;
    mask : none!important;
    contain: none!important;
    perspective: none!important;
    mix-blend-mode: initial!important;
    z-index: auto;
}

.ace_layer {
    z-index: 1;
    position: absolute;
    overflow: hidden;
    /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
    word-wrap: normal;
    white-space: pre;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    /* setting pointer-events: auto; on node under the mouse, which changes
        during scroll, will break mouse wheel scrolling in Safari */
    pointer-events: none;
}

.ace_gutter-layer {
    position: relative;
    width: auto;
    text-align: right;
    pointer-events: auto;
    height: 1000000px;
    contain: style size layout;
}

.ace_text-layer {
    font: inherit !important;
    position: absolute;
    height: 1000000px;
    width: 1000000px;
    contain: style size layout;
}

.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
    contain: style size layout;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
    contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line, 
.ace_hidpi .ace_text-layer > .ace_line_group {
    contain: strict;
}

.ace_cjk {
    display: inline-block;
    text-align: center;
}

.ace_cursor-layer {
    z-index: 4;
}

.ace_cursor {
    z-index: 4;
    position: absolute;
    box-sizing: border-box;
    border-left: 2px solid;
    /* workaround for smooth cursor repaintng whole screen in chrome */
    transform: translatez(0);
}

.ace_multiselect .ace_cursor {
    border-left-width: 1px;
}

.ace_slim-cursors .ace_cursor {
    border-left-width: 1px;
}

.ace_overwrite-cursors .ace_cursor {
    border-left-width: 0;
    border-bottom: 1px solid;
}

.ace_hidden-cursors .ace_cursor {
    opacity: 0.2;
}

.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
    opacity: 0;
}

.ace_smooth-blinking .ace_cursor {
    transition: opacity 0.18s;
}

.ace_animate-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: step-end;
    animation-name: blink-ace-animate;
    animation-iteration-count: infinite;
}

.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: ease-in-out;
    animation-name: blink-ace-animate-smooth;
}
    
@keyframes blink-ace-animate {
    from, to { opacity: 1; }
    60% { opacity: 0; }
}

@keyframes blink-ace-animate-smooth {
    from, to { opacity: 1; }
    45% { opacity: 1; }
    60% { opacity: 0; }
    85% { opacity: 0; }
}

.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
    position: absolute;
    z-index: 3;
}

.ace_marker-layer .ace_selection {
    position: absolute;
    z-index: 5;
}

.ace_marker-layer .ace_bracket {
    position: absolute;
    z-index: 6;
}

.ace_marker-layer .ace_error_bracket {
    position: absolute;
    border-bottom: 1px solid #DE5555;
    border-radius: 0;
}

.ace_marker-layer .ace_active-line {
    position: absolute;
    z-index: 2;
}

.ace_marker-layer .ace_selected-word {
    position: absolute;
    z-index: 4;
    box-sizing: border-box;
}

.ace_line .ace_fold {
    box-sizing: border-box;

    display: inline-block;
    height: 11px;
    margin-top: -2px;
    vertical-align: middle;

    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
    background-repeat: no-repeat, repeat-x;
    background-position: center center, top left;
    color: transparent;

    border: 1px solid black;
    border-radius: 2px;

    cursor: pointer;
    pointer-events: auto;
}

.ace_dark .ace_fold {
}

.ace_fold:hover{
    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}

.ace_tooltip {
    background-color: #f5f5f5;
    border: 1px solid gray;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: black;
    max-width: 100%;
    padding: 3px 4px;
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    cursor: default;
    white-space: pre;
    word-wrap: break-word;
    line-height: normal;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    pointer-events: none;
}

.ace_tooltip.ace_dark {
    background-color: #636363;
    color: #fff;
}

.ace_tooltip:focus {
    outline: 1px solid #5E9ED6;
}

.ace_icon {
    display: inline-block;
    width: 18px;
    vertical-align: top;
}

.ace_icon_svg {
    display: inline-block;
    width: 12px;
    vertical-align: top;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 12px;
    -webkit-mask-position: center;
}

.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
    padding-right: 13px;
}

.ace_fold-widget {
    box-sizing: border-box;

    margin: 0 -12px 0 1px;
    display: none;
    width: 11px;
    vertical-align: top;

    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: center;

    border-radius: 3px;
    
    border: 1px solid transparent;
    cursor: pointer;
}

.ace_folding-enabled .ace_fold-widget {
    display: inline-block;   
}

.ace_fold-widget.ace_end {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}

.ace_fold-widget.ace_closed {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}

.ace_fold-widget:hover {
    border: 1px solid rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

.ace_fold-widget:active {
    border: 1px solid rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
 * Dark version for fold widgets
 */
.ace_dark .ace_fold-widget {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}

.ace_inline_button {
    border: 1px solid lightgray;
    display: inline-block;
    margin: -1px 8px;
    padding: 0 5px;
    pointer-events: auto;
    cursor: pointer;
}
.ace_inline_button:hover {
    border-color: gray;
    background: rgba(200,200,200,0.2);
    display: inline-block;
    pointer-events: auto;
}

.ace_fold-widget.ace_invalid {
    background-color: #FFB4B4;
    border-color: #DE5555;
}

.ace_fade-fold-widgets .ace_fold-widget {
    transition: opacity 0.4s ease 0.05s;
    opacity: 0;
}

.ace_fade-fold-widgets:hover .ace_fold-widget {
    transition: opacity 0.05s ease 0.05s;
    opacity:1;
}

.ace_underline {
    text-decoration: underline;
}

.ace_bold {
    font-weight: bold;
}

.ace_nobold .ace_bold {
    font-weight: normal;
}

.ace_italic {
    font-style: italic;
}


.ace_error-marker {
    background-color: rgba(255, 0, 0,0.2);
    position: absolute;
    z-index: 9;
}

.ace_highlight-marker {
    background-color: rgba(255, 255, 0,0.2);
    position: absolute;
    z-index: 8;
}

.ace_mobile-menu {
    position: absolute;
    line-height: 1.5;
    border-radius: 4px;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    background: white;
    box-shadow: 1px 3px 2px grey;
    border: 1px solid #dcdcdc;
    color: black;
}
.ace_dark > .ace_mobile-menu {
    background: #333;
    color: #ccc;
    box-shadow: 1px 3px 2px grey;
    border: 1px solid #444;

}
.ace_mobile-button {
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
}
.ace_mobile-button:hover {
    background-color: #eee;
    opacity:1;
}
.ace_mobile-button:active {
    background-color: #ddd;
}

.ace_placeholder {
    font-family: arial;
    transform: scale(0.9);
    transform-origin: left;
    white-space: pre;
    opacity: 0.7;
    margin: 0 10px;
}

.ace_ghost_text {
    opacity: 0.5;
    font-style: italic;
    white-space: pre;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,i,r){var s=n("../lib/dom"),o=n("../lib/oop"),u=n("../lib/event_emitter").EventEmitter,a=function(){function h(c,l){this.canvas=s.createElement("canvas"),this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.canvasHeight=c.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=c.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=0+"px",this.canvas.style.right=0+"px",this.canvas.style.zIndex=7+"px",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)"},c.element.appendChild(this.canvas)}return h.prototype.$updateDecorators=function(c){var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(c){this.maxHeight=c.maxHeight,this.lineHeight=c.lineHeight,this.canvasHeight=c.height;var d=(c.lastRow+1)*this.lineHeight;d<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var f=this.canvas.getContext("2d");function p(A,P){return A.priority<P.priority?-1:A.priority>P.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(A){A.priority=m[A.type]||null}),g=g.sort(p);for(var v=this.renderer.session.$foldData,y=0;y<g.length;y++){var S=g[y].row,_=this.compensateFoldRows(S,v),w=Math.round((S-_)*this.lineHeight*this.heightRatio),b=Math.round((S-_)*this.lineHeight*this.heightRatio),C=Math.round(((S-_)*this.lineHeight+this.lineHeight)*this.heightRatio),M=C-b;if(M<this.minDecorationHeight){var R=(b+C)/2|0;R<this.halfMinDecorationHeight?R=this.halfMinDecorationHeight:R+this.halfMinDecorationHeight>this.canvasHeight&&(R=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(R-this.halfMinDecorationHeight),C=Math.round(R+this.halfMinDecorationHeight)}f.fillStyle=l[g[y].type]||null,f.fillRect(0,w,this.canvasWidth,C-b)}}var T=this.renderer.session.selection.getCursor();if(T){var _=this.compensateFoldRows(T.row,v),w=Math.round((T.row-_)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,w,this.canvasWidth,2)}},h.prototype.compensateFoldRows=function(c,l){var d=0;if(l&&l.length>0)for(var f=0;f<l.length;f++)c>l[f].start.row&&c<l[f].end.row?d+=c-l[f].start.row:c>=l[f].end.row&&(d+=l[f].end.row-l[f].start.row);return d},h}();o.implement(a.prototype,u),i.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","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(n,i,r){var s=n("./lib/oop"),o=n("./lib/dom"),u=n("./lib/lang"),a=n("./config"),h=n("./layer/gutter").Gutter,c=n("./layer/marker").Marker,l=n("./layer/text").Text,d=n("./layer/cursor").Cursor,f=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,S=n("./lib/event_emitter").EventEmitter,_=n("./css/editor.css"),w=n("./layer/decorators").Decorator,b=n("./lib/useragent");o.importCssString(_,"ace_editor.css",!1);var C=function(){function M(R,T){var A=this;this.container=R||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(T),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var P=this.$textLayer=new l(this.content);this.canvas=P.element,this.$markerFront=new c(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(I){A.$scrollAnimation||A.session.setScrollTop(I.data-A.scrollMargin.top)}),this.scrollBarH.on("scroll",function(I){A.$scrollAnimation||A.session.setScrollLeft(I.data-A.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(I){A.updateCharacterSize(),A.onResize(!0,A.gutterWidth,A.$size.width,A.$size.height),A._signal("changeCharacterSize",I)}),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=!b.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return M.prototype.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(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},M.prototype.setSession=function(R){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=R,R&&this.scrollMargin.top&&R.getScrollTop()<=0&&R.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(R),this.$markerBack.setSession(R),this.$markerFront.setSession(R),this.$gutterLayer.setSession(R),this.$textLayer.setSession(R),R&&(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))},M.prototype.updateLines=function(R,T,A){if(T===void 0&&(T=1/0),this.$changedLines?(this.$changedLines.firstRow>R&&(this.$changedLines.firstRow=R),this.$changedLines.lastRow<T&&(this.$changedLines.lastRow=T)):this.$changedLines={firstRow:R,lastRow:T},this.$changedLines.lastRow<this.layerConfig.firstRow)if(A)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},M.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},M.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},M.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},M.prototype.updateFull=function(R){R?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},M.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},M.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},M.prototype.onResize=function(R,T,A,P){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=R?1:0;var I=this.container;P||(P=I.clientHeight||I.scrollHeight),A||(A=I.clientWidth||I.scrollWidth);var E=this.$updateCachedSize(R,T,A,P);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!A&&!P)return this.resizing=0;R&&(this.$gutterLayer.$padding=null),R?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},M.prototype.$updateCachedSize=function(R,T,A,P){P-=this.$extraHeight||0;var I=0,E=this.$size,L={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(P&&(R||E.height!=P)&&(E.height=P,I|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",I=I|this.CHANGE_SCROLL),A&&(R||E.width!=A)){I|=this.CHANGE_SIZE,E.width=A,T==null&&(T=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=T,o.setStyle(this.scrollBarH.element.style,"left",T+"px"),o.setStyle(this.scroller.style,"left",T+this.margin.left+"px"),E.scrollerWidth=Math.max(0,A-T-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var O=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",O),o.setStyle(this.scroller.style,"right",O),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||R)&&(I|=this.CHANGE_FULL)}return E.$dirty=!A||!P,I&&this._signal("resize",L),I},M.prototype.onGutterResize=function(R){var T=this.$showGutter?R:0;T!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,T,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},M.prototype.adjustWrapLimit=function(){var R=this.$size.scrollerWidth-this.$padding*2,T=Math.floor(R/this.characterWidth);return this.session.adjustWrapLimit(T,this.$showPrintMargin&&this.$printMarginColumn)},M.prototype.setAnimatedScroll=function(R){this.setOption("animatedScroll",R)},M.prototype.getAnimatedScroll=function(){return this.$animatedScroll},M.prototype.setShowInvisibles=function(R){this.setOption("showInvisibles",R),this.session.$bidiHandler.setShowInvisibles(R)},M.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},M.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},M.prototype.setDisplayIndentGuides=function(R){this.setOption("displayIndentGuides",R)},M.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},M.prototype.setHighlightIndentGuides=function(R){this.setOption("highlightIndentGuides",R)},M.prototype.setShowPrintMargin=function(R){this.setOption("showPrintMargin",R)},M.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},M.prototype.setPrintMarginColumn=function(R){this.setOption("printMarginColumn",R)},M.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},M.prototype.getShowGutter=function(){return this.getOption("showGutter")},M.prototype.setShowGutter=function(R){return this.setOption("showGutter",R)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.setFadeFoldWidgets=function(R){this.setOption("fadeFoldWidgets",R)},M.prototype.setHighlightGutterLine=function(R){this.setOption("highlightGutterLine",R)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var R=o.createElement("div");R.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",R.appendChild(this.$printMarginEl),this.content.insertBefore(R,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&&this.session.$wrap==-1&&this.adjustWrapLimit()}},M.prototype.getContainerElement=function(){return this.container},M.prototype.getMouseEventTarget=function(){return this.scroller},M.prototype.getTextAreaContainer=function(){return this.container},M.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var R=this.textarea.style,T=this.$composition;if(!this.$keepTextAreaAtCursor&&!T){o.translate(this.textarea,-100,0);return}var A=this.$cursorLayer.$pixelPos;if(!!A){T&&T.markerRange&&(A=this.$cursorLayer.getPixelPosition(T.markerRange.start,!0));var P=this.layerConfig,I=A.top,E=A.left;I-=P.offset;var L=T&&T.useTextareaForIME||b.isMobile?this.lineHeight:1;if(I<0||I>P.height-L){o.translate(this.textarea,0,0);return}var O=1,B=this.$size.height-L;if(!T)I+=this.lineHeight;else if(T.useTextareaForIME){var U=this.textarea.value;O=this.characterWidth*this.session.$getStringScreenWidth(U)[0]}else I+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-O&&(E=this.$size.scrollerWidth-O),E+=this.gutterWidth+this.margin.left,o.setStyle(R,"height",L+"px"),o.setStyle(R,"width",O+"px"),o.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-O),Math.min(I,B))}}},M.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},M.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},M.prototype.getLastFullyVisibleRow=function(){var R=this.layerConfig,T=R.lastRow,A=this.session.documentToScreenRow(T,0)*R.lineHeight;return A-this.session.getScrollTop()>R.height-R.lineHeight?T-1:T},M.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},M.prototype.setPadding=function(R){this.$padding=R,this.$textLayer.setPadding(R),this.$cursorLayer.setPadding(R),this.$markerFront.setPadding(R),this.$markerBack.setPadding(R),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},M.prototype.setScrollMargin=function(R,T,A,P){var I=this.scrollMargin;I.top=R|0,I.bottom=T|0,I.right=P|0,I.left=A|0,I.v=I.top+I.bottom,I.h=I.left+I.right,I.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-I.top),this.updateFull()},M.prototype.setMargin=function(R,T,A,P){var I=this.margin;I.top=R|0,I.bottom=T|0,I.right=P|0,I.left=A|0,I.v=I.top+I.bottom,I.h=I.left+I.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},M.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},M.prototype.setHScrollBarAlwaysVisible=function(R){this.setOption("hScrollBarAlwaysVisible",R)},M.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},M.prototype.setVScrollBarAlwaysVisible=function(R){this.setOption("vScrollBarAlwaysVisible",R)},M.prototype.$updateScrollBarV=function(){var R=this.layerConfig.maxHeight,T=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(R-=(T-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>R-T&&(R=this.scrollTop+T,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(R+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},M.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},M.prototype.freeze=function(){this.$frozen=!0},M.prototype.unfreeze=function(){this.$frozen=!1},M.prototype.$renderChanges=function(R,T){if(this.$changes&&(R|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!R&&!T){this.$changes|=R;return}if(this.$size.$dirty)return this.$changes|=R,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",R),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var A=this.layerConfig;if(R&this.CHANGE_FULL||R&this.CHANGE_SIZE||R&this.CHANGE_TEXT||R&this.CHANGE_LINES||R&this.CHANGE_SCROLL||R&this.CHANGE_H_SCROLL){if(R|=this.$computeLayerConfig()|this.$loop.clear(),A.firstRow!=this.layerConfig.firstRow&&A.firstRowScreen==this.layerConfig.firstRowScreen){var P=this.scrollTop+(A.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;P>0&&(this.scrollTop=P,R=R|this.CHANGE_SCROLL,R|=this.$computeLayerConfig()|this.$loop.clear())}A=this.layerConfig,this.$updateScrollBarV(),R&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-A.offset);var I=A.width+2*this.$padding+"px",E=A.minHeight+"px";o.setStyle(this.content.style,"width",I),o.setStyle(this.content.style,"height",E)}if(R&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-A.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),R&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),this._signal("afterRender",R);return}if(R&this.CHANGE_SCROLL){this.$changedLines=null,R&this.CHANGE_TEXT||R&this.CHANGE_LINES?this.$textLayer.update(A):this.$textLayer.scrollLines(A),this.$showGutter&&(R&this.CHANGE_GUTTER||R&this.CHANGE_LINES?this.$gutterLayer.update(A):this.$gutterLayer.scrollLines(A)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A),this.$markerBack.update(A),this.$markerFront.update(A),this.$cursorLayer.update(A),this.$moveTextAreaToCursor(),this._signal("afterRender",R);return}R&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(A),this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):R&this.CHANGE_LINES?((this.$updateLines()||R&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):R&this.CHANGE_TEXT||R&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)):R&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(A),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(A)),R&this.CHANGE_CURSOR&&(this.$cursorLayer.update(A),this.$moveTextAreaToCursor()),R&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(A),R&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(A),this._signal("afterRender",R)},M.prototype.$autosize=function(){var R=this.session.getScreenLength()*this.lineHeight,T=this.$maxLines*this.lineHeight,A=Math.min(T,Math.max((this.$minLines||1)*this.lineHeight,R))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(A+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&A>this.$maxPixelHeight&&(A=this.$maxPixelHeight);var P=A<=2*this.lineHeight,I=!P&&R>T;if(A!=this.desiredHeight||this.$size.height!=this.desiredHeight||I!=this.$vScroll){I!=this.$vScroll&&(this.$vScroll=I,this.scrollBarV.setVisible(I));var E=this.container.clientWidth;this.container.style.height=A+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,A),this.desiredHeight=A,this._signal("autosize")}},M.prototype.$computeLayerConfig=function(){var R=this.session,T=this.$size,A=T.height<=2*this.lineHeight,P=this.session.getScreenLength(),I=P*this.lineHeight,E=this.$getLongestLine(),L=!A&&(this.$hScrollBarAlwaysVisible||T.scrollerWidth-E-2*this.$padding<0),O=this.$horizScroll!==L;O&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var B=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var U=T.scrollerHeight+this.lineHeight,z=!this.$maxLines&&this.$scrollPastEnd?(T.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;I+=z;var j=this.scrollMargin;this.session.setScrollTop(Math.max(-j.top,Math.min(this.scrollTop,I-T.scrollerHeight+j.bottom))),this.session.setScrollLeft(Math.max(-j.left,Math.min(this.scrollLeft,E+2*this.$padding-T.scrollerWidth+j.right)));var q=!A&&(this.$vScrollBarAlwaysVisible||T.scrollerHeight-I+z<0||this.scrollTop>j.top),ne=B!==q;ne&&(this.$vScroll=q,this.scrollBarV.setVisible(q));var G=this.scrollTop%this.lineHeight,X=Math.ceil(U/this.lineHeight)-1,ie=Math.max(0,Math.round((this.scrollTop-G)/this.lineHeight)),le=ie+X,Y,J,te=this.lineHeight;ie=R.screenToDocumentRow(ie,0);var ue=R.getFoldLine(ie);ue&&(ie=ue.start.row),Y=R.documentToScreenRow(ie,0),J=R.getRowLength(ie)*te,le=Math.min(R.screenToDocumentRow(le,0),R.getLength()-1),U=T.scrollerHeight+R.getRowLength(le)*te+J,G=this.scrollTop-Y*te;var Se=0;return(this.layerConfig.width!=E||O)&&(Se=this.CHANGE_H_SCROLL),(O||ne)&&(Se|=this.$updateCachedSize(!0,this.gutterWidth,T.width,T.height),this._signal("scrollbarVisibilityChanged"),ne&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:ie,firstRowScreen:Y,lastRow:le,lineHeight:te,characterWidth:this.characterWidth,minHeight:U,maxHeight:I,offset:G,gutterOffset:te?Math.max(0,Math.ceil((G+T.height-T.scrollerHeight)/te)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),Se},M.prototype.$updateLines=function(){if(!!this.$changedLines){var R=this.$changedLines.firstRow,T=this.$changedLines.lastRow;this.$changedLines=null;var A=this.layerConfig;if(!(R>A.lastRow+1)&&!(T<A.firstRow)){if(T===1/0){this.$showGutter&&this.$gutterLayer.update(A),this.$textLayer.update(A);return}return this.$textLayer.updateLines(A,R,T),!0}}},M.prototype.$getLongestLine=function(){var R=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(R+=1),this.$textLayer&&R>this.$textLayer.MAX_LINE_LENGTH&&(R=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(R*this.characterWidth))},M.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},M.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},M.prototype.addGutterDecoration=function(R,T){this.$gutterLayer.addGutterDecoration(R,T)},M.prototype.removeGutterDecoration=function(R,T){this.$gutterLayer.removeGutterDecoration(R,T)},M.prototype.updateBreakpoints=function(R){this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.setAnnotations=function(R){this.$gutterLayer.setAnnotations(R),this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},M.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},M.prototype.showCursor=function(){this.$cursorLayer.showCursor()},M.prototype.scrollSelectionIntoView=function(R,T,A){this.scrollCursorIntoView(R,A),this.scrollCursorIntoView(T,A)},M.prototype.scrollCursorIntoView=function(R,T,A){if(this.$size.scrollerHeight!==0){var P=this.$cursorLayer.getPixelPosition(R),I=P.left,E=P.top,L=A&&A.top||0,O=A&&A.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var B=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;B+L>E?(T&&B+L>E+this.lineHeight&&(E-=T*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):B+this.$size.scrollerHeight-O<E+this.lineHeight&&(T&&B+this.$size.scrollerHeight-O<E-this.lineHeight&&(E+=T*this.$size.scrollerHeight),this.session.setScrollTop(E+this.lineHeight+O-this.$size.scrollerHeight));var U=this.scrollLeft,z=2*this.layerConfig.characterWidth;I-z<U?(I-=z,I<this.$padding+z&&(I=-this.scrollMargin.left),this.session.setScrollLeft(I)):(I+=z,U+this.$size.scrollerWidth<I+this.characterWidth?this.session.setScrollLeft(Math.round(I+this.characterWidth-this.$size.scrollerWidth)):U<=this.$padding&&I-U<this.characterWidth&&this.session.setScrollLeft(0))}},M.prototype.getScrollTop=function(){return this.session.getScrollTop()},M.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},M.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},M.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},M.prototype.scrollToRow=function(R){this.session.setScrollTop(R*this.lineHeight)},M.prototype.alignCursor=function(R,T){typeof R=="number"&&(R={row:R,column:0});var A=this.$cursorLayer.getPixelPosition(R),P=this.$size.scrollerHeight-this.lineHeight,I=A.top-P*(T||0);return this.session.setScrollTop(I),I},M.prototype.$calcSteps=function(R,T){var A=0,P=this.STEPS,I=[],E=function(L,O,B){return B*(Math.pow(L-1,3)+1)+O};for(A=0;A<P;++A)I.push(E(A/this.STEPS,R,T-R));return I},M.prototype.scrollToLine=function(R,T,A,P){var I=this.$cursorLayer.getPixelPosition({row:R,column:0}),E=I.top;T&&(E-=this.$size.scrollerHeight/2);var L=this.scrollTop;this.session.setScrollTop(E),A!==!1&&this.animateScrolling(L,P)},M.prototype.animateScrolling=function(R,T){var A=this.scrollTop;if(!this.$animatedScroll)return;var P=this;if(R==A)return;if(this.$scrollAnimation){var I=this.$scrollAnimation.steps;if(I.length&&(R=I[0],R==A))return}var E=P.$calcSteps(R,A);this.$scrollAnimation={from:R,to:A,steps:E},clearInterval(this.$timer),P.session.setScrollTop(E.shift()),P.session.$scrollTop=A;function L(){P.$timer=clearInterval(P.$timer),P.$scrollAnimation=null,P.$stopAnimation=!1,T&&T()}this.$timer=setInterval(function(){if(P.$stopAnimation){L();return}if(!P.session)return clearInterval(P.$timer);E.length?(P.session.setScrollTop(E.shift()),P.session.$scrollTop=A):A!=null?(P.session.$scrollTop=-1,P.session.setScrollTop(A),A=null):L()},10)},M.prototype.scrollToY=function(R){this.scrollTop!==R&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=R)},M.prototype.scrollToX=function(R){this.scrollLeft!==R&&(this.scrollLeft=R),this.$loop.schedule(this.CHANGE_H_SCROLL)},M.prototype.scrollTo=function(R,T){this.session.setScrollTop(T),this.session.setScrollLeft(R)},M.prototype.scrollBy=function(R,T){T&&this.session.setScrollTop(this.session.getScrollTop()+T),R&&this.session.setScrollLeft(this.session.getScrollLeft()+R)},M.prototype.isScrollableBy=function(R,T){if(T<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||T>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||R<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||R>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},M.prototype.pixelToScreenCoordinates=function(R,T){var A;if(this.$hasCssTransforms){A={top:0,left:0};var P=this.$fontMetrics.transformCoordinates([R,T]);R=P[1]-this.gutterWidth-this.margin.left,T=P[0]}else A=this.scroller.getBoundingClientRect();var I=R+this.scrollLeft-A.left-this.$padding,E=I/this.characterWidth,L=Math.floor((T+this.scrollTop-A.top)/this.lineHeight),O=this.$blockCursor?Math.floor(E):Math.round(E);return{row:L,column:O,side:E-O>0?1:-1,offsetX:I}},M.prototype.screenToTextCoordinates=function(R,T){var A;if(this.$hasCssTransforms){A={top:0,left:0};var P=this.$fontMetrics.transformCoordinates([R,T]);R=P[1]-this.gutterWidth-this.margin.left,T=P[0]}else A=this.scroller.getBoundingClientRect();var I=R+this.scrollLeft-A.left-this.$padding,E=I/this.characterWidth,L=this.$blockCursor?Math.floor(E):Math.round(E),O=Math.floor((T+this.scrollTop-A.top)/this.lineHeight);return this.session.screenToDocumentPosition(O,Math.max(L,0),I)},M.prototype.textToScreenCoordinates=function(R,T){var A=this.scroller.getBoundingClientRect(),P=this.session.documentToScreenPosition(R,T),I=this.$padding+(this.session.$bidiHandler.isBidiRow(P.row,R)?this.session.$bidiHandler.getPosLeft(P.column):Math.round(P.column*this.characterWidth)),E=P.row*this.lineHeight;return{pageX:A.left+I-this.scrollLeft,pageY:A.top+E-this.scrollTop}},M.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},M.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},M.prototype.showComposition=function(R){this.$composition=R,R.cssText||(R.cssText=this.textarea.style.cssText),R.useTextareaForIME==null&&(R.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):R.markerId=this.session.addMarker(R.markerRange,"ace_composition_marker","text")},M.prototype.setCompositionText=function(R){var T=this.session.selection.cursor;this.addToken(R,"composition_placeholder",T.row,T.column),this.$moveTextAreaToCursor()},M.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var R=this.session.selection.cursor;this.removeExtraToken(R.row,R.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},M.prototype.setGhostText=function(R,T){var A=this.session.selection.cursor,P=T||{row:A.row,column:A.column};this.removeGhostText();var I=R.split(`
`);this.addToken(I[0],"ghost_text",P.row,P.column),this.$ghostText={text:R,position:{row:P.row,column:P.column}},I.length>1&&(this.$ghostTextWidget={text:I.slice(1).join(`
`),row:P.row,column:P.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},M.prototype.removeGhostText=function(){if(!!this.$ghostText){var R=this.$ghostText.position;this.removeExtraToken(R.row,R.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},M.prototype.addToken=function(R,T,A,P){var I=this.session;I.bgTokenizer.lines[A]=null;var E={type:T,value:R},L=I.getTokens(A);if(P==null||!L.length)L.push(E);else for(var O=0,B=0;B<L.length;B++){var U=L[B];if(O+=U.value.length,P<=O){var z=U.value.length-(O-P),j=U.value.slice(0,z),q=U.value.slice(z);L.splice(B,1,{type:U.type,value:j},E,{type:U.type,value:q});break}}this.updateLines(A,A)},M.prototype.removeExtraToken=function(R,T){this.session.bgTokenizer.lines[R]=null,this.updateLines(R,R)},M.prototype.setTheme=function(R,T){var A=this;if(this.$themeId=R,A._dispatchEvent("themeChange",{theme:R}),!R||typeof R=="string"){var P=R||this.$options.theme.initialValue;a.loadModule(["theme",P],I)}else I(R);function I(E){if(A.$themeId!=R)return T&&T();if(!E||!E.cssClass)throw new Error("couldn't load module "+R+" or it didn't call define");E.$id&&(A.$themeId=E.$id),o.importCssString(E.cssText,E.cssClass,A.container),A.theme&&o.removeCssClass(A.container,A.theme.cssClass);var L="padding"in E?E.padding:"padding"in(A.theme||{})?4:A.$padding;A.$padding&&L!=A.$padding&&A.setPadding(L),A.$theme=E.cssClass,A.theme=E,o.addCssClass(A.container,E.cssClass),o.setCssClass(A.container,"ace_dark",E.isDark),A.$size&&(A.$size.width=0,A.$updateSizeAsync()),A._dispatchEvent("themeLoaded",{theme:E}),T&&T()}},M.prototype.getTheme=function(){return this.$themeId},M.prototype.setStyle=function(R,T){o.setCssClass(this.container,R,T!==!1)},M.prototype.unsetStyle=function(R){o.removeCssClass(this.container,R)},M.prototype.setCursorStyle=function(R){o.setStyle(this.scroller.style,"cursor",R)},M.prototype.setMouseCursor=function(R){o.setStyle(this.scroller.style,"cursor",R)},M.prototype.attachToShadowRoot=function(){o.importCssString(_,"ace_editor.css",this.container)},M.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},M.prototype.$updateCustomScrollbar=function(R){var T=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,R===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(A){T.$scrollAnimation||T.session.setScrollTop(A.data-T.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(A){T.$scrollAnimation||T.session.setScrollLeft(A.data-T.scrollMargin.left)}),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.addEventListener("scroll",function(A){T.$scrollAnimation||T.session.setScrollTop(A.data-T.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(A){T.$scrollAnimation||T.session.setScrollLeft(A.data-T.scrollMargin.left)}))},M.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var R=this;this.$resizeTimer=u.delayedCall(function(){R.destroyed||R.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(T){var A=T[0].contentRect.width,P=T[0].contentRect.height;Math.abs(R.$size.width-A)>1||Math.abs(R.$size.height-P)>1?R.$resizeTimer.delay():R.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},M}();C.prototype.CHANGE_CURSOR=1,C.prototype.CHANGE_MARKER=2,C.prototype.CHANGE_GUTTER=4,C.prototype.CHANGE_SCROLL=8,C.prototype.CHANGE_LINES=16,C.prototype.CHANGE_TEXT=32,C.prototype.CHANGE_SIZE=64,C.prototype.CHANGE_MARKER_BACK=128,C.prototype.CHANGE_MARKER_FRONT=256,C.prototype.CHANGE_FULL=512,C.prototype.CHANGE_H_SCROLL=1024,C.prototype.$changes=0,C.prototype.$padding=null,C.prototype.$frozen=!1,C.prototype.STEPS=8,s.implement(C.prototype,S),a.defineOptions(C.prototype,"renderer",{useResizeObserver:{set:function(M){!M&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):M&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(M){this.$textLayer.setShowInvisibles(M)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(M){typeof M=="number"&&(this.$printMarginColumn=M),this.$showPrintMargin=!!M,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(M){this.$gutter.style.display=M?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(M){this.$gutterLayer.$useSvgGutterIcons=M},initialValue:!1},showFoldedAnnotations:{set:function(M){this.$gutterLayer.$showFoldedAnnotations=M},initialValue:!1},fadeFoldWidgets:{set:function(M){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",M)},initialValue:!1},showFoldWidgets:{set:function(M){this.$gutterLayer.setShowFoldWidgets(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(M){this.$textLayer.setDisplayIndentGuides(M)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(M){this.$textLayer.setHighlightIndentGuides(M)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(M){this.$gutterLayer.setHighlightGutterLine(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(M){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(M){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(M){typeof M=="number"&&(M=M+"px"),this.container.style.fontSize=M,this.updateFontSize()},initialValue:12},fontFamily:{set:function(M){this.container.style.fontFamily=M,this.updateFontSize()}},maxLines:{set:function(M){this.updateFull()}},minLines:{set:function(M){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(M){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(M){M=+M||0,this.$scrollPastEnd!=M&&(this.$scrollPastEnd=M,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(M){this.$gutterLayer.$fixedWidth=!!M,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(M){this.$updateCustomScrollbar(M)},initialValue:!1},theme:{set:function(M){this.setTheme(M)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),i.VirtualRenderer=C}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,i,r){var s=n("../lib/oop"),o=n("../lib/net"),u=n("../lib/event_emitter").EventEmitter,a=n("../config");function h(f){var p="importScripts('"+o.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(p),m.getBlob("application/javascript")}}function c(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=h(f),g=window.URL||window.webkitURL,m=g.createObjectURL(p);return new Worker(m)}return new Worker(f)}var l=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,u),this.$createWorkerFromOldConfig=function(f,p,g,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)m=m||a.moduleUrl(p,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var S={};f.forEach(function(_){S[_]=y(n.toUrl(_,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=c(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:S,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return o.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,p.push(m)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;!f||(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(l.prototype);var d=function(f,p,g){var m=null,v=!1,y=Object.create(u),S=[],_=new l({messageBuffer:S,terminate:function(){},postMessage:function(b){S.push(b),m&&(v?setTimeout(w):w())}});_.setEmitSync=function(b){v=b};var w=function(){var b=S.shift();b.command?m[b.command].apply(m,b.args):b.event&&y._signal(b.event,b.data)};return y.postMessage=function(b){_.onMessage({data:b})},y.callback=function(b,C){this.postMessage({type:"call",id:C,data:b})},y.emit=function(b,C){this.postMessage({type:"event",name:b,data:C})},a.loadModule(["worker",p],function(b){for(m=new b[g](y);S.length;)w()}),_};i.UIWorkerClient=d,i.WorkerClient=l,i.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,i,r){var s=n("./range").Range,o=n("./lib/event_emitter").EventEmitter,u=n("./lib/oop"),a=function(){function h(c,l,d,f,p,g){var m=this;this.length=l,this.session=c,this.doc=c.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=d;var v=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var c=this,l=this.doc,d=this.session;this.selectionBefore=d.selection.toJSON(),d.selection.inMultiSelectMode&&d.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=d.addMarker(new s(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=l.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),c.others.push(g)}),d.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,l=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=c.addMarker(new s(d.row,d.column,d.row,d.column+l.length),l.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var c=0;c<this.others.length;c++)this.session.removeMarker(this.others[c].markerId)}},h.prototype.onUpdate=function(c){if(this.$updating)return this.updateAnchors(c);var l=c;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var d=c.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,f=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,p=l.start.column-this.pos.column;if(this.updateAnchors(c),f&&(this.length+=d),f&&!this.session.$fromUndo){if(c.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.insertMergedLines(v,c.lines)}else if(c.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.remove(new s(v.row,v.column,v.row,v.column-d))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(c){this.pos.onChange(c);for(var l=this.others.length;l--;)this.others[l].onChange(c);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var c=this,l=this.session,d=function(p,g){l.removeMarker(p.markerId),p.markerId=l.addMarker(new s(p.row,p.column,p.row,p.column+c.length),g,null,!1)};d(this.pos,this.mainClass);for(var f=this.others.length;f--;)d(this.others[f],this.othersClass)}},h.prototype.onCursorChange=function(c){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},h.prototype.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},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),l=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,d=0;d<l;d++)c.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();u.implement(a.prototype,o),i.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,i,r){var s=n("../lib/event"),o=n("../lib/useragent");function u(h,c){return h.row==c.row&&h.column==c.column}function a(h){var c=h.domEvent,l=c.altKey,d=c.shiftKey,f=c.ctrlKey,p=h.getAccelKey(),g=h.getButton();if(f&&o.isMac&&(g=c.button),h.editor.inMultiSelectMode&&g==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!f&&!l&&!p){g===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(g===0){var m=h.editor,v=m.selection,y=m.inMultiSelectMode,S=h.getDocumentPosition(),_=v.getCursor(),w=h.inSelection()||v.isEmpty()&&u(S,_),b=h.x,C=h.y,M=function(q){b=q.clientX,C=q.clientY},R=m.session,T=m.renderer.pixelToScreenCoordinates(b,C),A=T,P;if(m.$mouseHandler.$enableJumpToDef)f&&l||p&&l?P=d?"block":"add":l&&m.$blockSelectEnabled&&(P="block");else if(p&&!l){if(P="add",!y&&d)return}else l&&m.$blockSelectEnabled&&(P="block");if(P&&o.isMac&&c.ctrlKey&&m.$mouseHandler.cancelContextMenu(),P=="add"){if(!y&&w)return;if(!y){var I=v.toOrientedRange();m.addSelectionMarker(I)}var E=v.rangeList.rangeAtPoint(S);m.inVirtualSelectionMode=!0,d&&(E=null,I=v.ranges[0]||I,m.removeSelectionMarker(I)),m.once("mouseup",function(){var q=v.toOrientedRange();E&&q.isEmpty()&&u(E.cursor,q.cursor)?v.substractPoint(q.cursor):(d?v.substractPoint(I.cursor):I&&(m.removeSelectionMarker(I),v.addRange(I)),v.addRange(q)),m.inVirtualSelectionMode=!1})}else if(P=="block"){h.stop(),m.inVirtualSelectionMode=!0;var L,O=[],B=function(){var q=m.renderer.pixelToScreenCoordinates(b,C),ne=R.screenToDocumentPosition(q.row,q.column,q.offsetX);u(A,q)&&u(ne,v.lead)||(A=q,m.selection.moveToPosition(ne),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(O),O=v.rectangularRangeBlock(A,T),m.$mouseHandler.$clickSelection&&O.length==1&&O[0].isEmpty()&&(O[0]=m.$mouseHandler.$clickSelection.clone()),O.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};y&&!p?v.toSingleRange():!y&&p&&(L=v.toOrientedRange(),m.addSelectionMarker(L)),d?T=R.documentToScreenPosition(v.lead):v.moveToPosition(S),A={row:-1,column:-1};var U=function(q){B(),clearInterval(j),m.removeSelectionMarkers(O),O.length||(O=[v.toOrientedRange()]),L&&(m.removeSelectionMarker(L),v.toSingleRange(L));for(var ne=0;ne<O.length;ne++)v.addRange(O[ne]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},z=B;s.capture(m.container,M,U);var j=setInterval(function(){z()},20);return h.preventDefault()}}}i.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,i,r){i.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(o){o.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(o){o.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(o){o.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(o){o.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(o){o.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(o){o.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(o){o.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(o){o.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(o){o.multiSelect.rangeCount>1?o.multiSelect.joinSelections():o.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(o){o.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(o){o.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(o){o.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],i.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(o){o.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(o){return o&&o.inMultiSelectMode}}];var s=n("../keyboard/hash_handler").HashHandler;i.keyboardHandler=new s(i.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(n,i,r){var s=n("./range_list").RangeList,o=n("./range").Range,u=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,h=n("./lib/event"),c=n("./lib/lang"),l=n("./commands/multi_select_commands");i.commands=l.defaultCommands.concat(l.multiSelectCommands);var d=n("./search").Search,f=new d;function p(_,w,b){return f.$options.wrap=!0,f.$options.needle=w,f.$options.backwards=b==-1,f.find(_)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(_,w){if(!!_){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(_),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(_);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}_.cursor||(_.cursor=_.end);var C=this.rangeList.add(_);return this.$onAddRange(_),C.length&&this.$onRemoveRange(C),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(_)}},this.toSingleRange=function(_){_=_||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),_&&this.fromOrientedRange(_)},this.substractPoint=function(_){var w=this.rangeList.substractPoint(_);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var _=this.rangeList.merge();_.length&&this.$onRemoveRange(_)},this.$onAddRange=function(_){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(_),this._signal("addRange",{range:_})},this.$onRemoveRange=function(_){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();_.push(w),this.rangeCount=0}for(var b=_.length;b--;){var C=this.ranges.indexOf(_[b]);this.ranges.splice(C,1)}this._signal("removeRange",{ranges:_}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var _=this.ranges.length?this.ranges:[this.getRange()],w=[],b=0;b<_.length;b++){var C=_[b],M=C.start.row,R=C.end.row;if(M===R)w.push(C.clone());else{for(w.push(new o(M,C.start.column,M,this.session.getLine(M).length));++M<R;)w.push(this.getLineRange(M,!0));w.push(new o(R,0,R,C.end.column))}b==0&&!this.isBackwards()&&(w=w.reverse())}this.toSingleRange();for(var b=w.length;b--;)this.addRange(w[b])},this.joinSelections=function(){var _=this.rangeList.ranges,w=_[_.length-1],b=o.fromPoints(_[0].start,w.end);this.toSingleRange(),this.setSelectionRange(b,w.cursor==w.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var _=this.rangeList.ranges,w=_[_.length-1],b=o.fromPoints(_[0].start,w.end);this.toSingleRange(),this.setSelectionRange(b,w.cursor==w.start)}else{var C=this.session.documentToScreenPosition(this.cursor),M=this.session.documentToScreenPosition(this.anchor),R=this.rectangularRangeBlock(C,M);R.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(_,w,b){var C=[],M=_.column<w.column;if(M)var R=_.column,T=w.column,A=_.offsetX,P=w.offsetX;else var R=w.column,T=_.column,A=w.offsetX,P=_.offsetX;var I=_.row<w.row;if(I)var E=_.row,L=w.row;else var E=w.row,L=_.row;R<0&&(R=0),E<0&&(E=0),E==L&&(b=!0);for(var O,B=E;B<=L;B++){var U=o.fromPoints(this.session.screenToDocumentPosition(B,R,A),this.session.screenToDocumentPosition(B,T,P));if(U.isEmpty()){if(O&&v(U.end,O))break;O=U.end}U.cursor=M?U.start:U.end,C.push(U)}if(I&&C.reverse(),!b){for(var z=C.length-1;C[z].isEmpty()&&z>0;)z--;if(z>0)for(var j=0;C[j].isEmpty();)j++;for(var q=z;q>=j;q--)C[q].isEmpty()&&C.splice(q,1)}return C}}.call(u.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(_){_.cursor||(_.cursor=_.end);var w=this.getSelectionStyle();return _.marker=this.session.addMarker(_,"ace_selection",w),this.session.$selectionMarkers.push(_),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,_},this.removeSelectionMarker=function(_){if(!!_.marker){this.session.removeMarker(_.marker);var w=this.session.$selectionMarkers.indexOf(_);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(_){for(var w=this.session.$selectionMarkers,b=_.length;b--;){var C=_[b];if(!!C.marker){this.session.removeMarker(C.marker);var M=w.indexOf(C);M!=-1&&w.splice(M,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(_){this.addSelectionMarker(_.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(_){this.removeSelectionMarkers(_.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(_){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(_){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(_){var w=_.command,b=_.editor;if(!!b.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?C=b.forEachSelection(w,_.args):w.multiSelectAction=="forEachLine"?C=b.forEachSelection(w,_.args,!0):w.multiSelectAction=="single"?(b.exitMultiSelectMode(),C=w.exec(b,_.args||{})):C=w.multiSelectAction(b,_.args||{});else{var C=w.exec(b,_.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return C}},this.forEachSelection=function(_,w,b){if(!this.inVirtualSelectionMode){var C=b&&b.keepOrder,M=b==!0||b&&b.$byLines,R=this.session,T=this.selection,A=T.rangeList,P=(C?T:A).ranges,I;if(!P.length)return _.exec?_.exec(this,w||{}):_(this,w||{});var E=T._eventRegistry;T._eventRegistry={};var L=new u(R);this.inVirtualSelectionMode=!0;for(var O=P.length;O--;){if(M)for(;O>0&&P[O].start.row==P[O-1].end.row;)O--;L.fromOrientedRange(P[O]),L.index=O,this.selection=R.selection=L;var B=_.exec?_.exec(this,w||{}):_(this,w||{});!I&&B!==void 0&&(I=B),L.toOrientedRange(P[O])}L.detach(),this.selection=R.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=E,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),I}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var _="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,b=[],C=0;C<w.length;C++)b.push(this.session.getTextRange(w[C]));var M=this.session.getDocument().getNewLineCharacter();_=b.join(M),_.length==(b.length-1)*M.length&&(_="")}else this.selection.isEmpty()||(_=this.session.getTextRange(this.getSelectionRange()));return _},this.$checkMultiselectChange=function(_,w){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&w==this.multiSelect.anchor)return;var C=w==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;C.row!=w.row||this.session.$clipPositionToDocument(C.row,C.column).column!=w.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(_,w,b){if(w=w||{},w.needle=_||w.needle,w.needle==null){var C=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();w.needle=this.session.getTextRange(C)}this.$search.set(w);var M=this.$search.findAll(this.session);if(!M.length)return 0;var R=this.multiSelect;b||R.toSingleRange(M[0]);for(var T=M.length;T--;)R.addRange(M[T],!0);return C&&R.rangeList.rangeAtPoint(C.start)&&R.addRange(C,!0),M.length},this.selectMoreLines=function(_,w){var b=this.selection.toOrientedRange(),C=b.cursor==b.end,M=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(M.column=this.selection.$desiredColumn);var R=this.session.screenToDocumentPosition(M.row+_,M.column);if(b.isEmpty())var A=R;else var T=this.session.documentToScreenPosition(C?b.end:b.start),A=this.session.screenToDocumentPosition(T.row+_,T.column);if(C){var P=o.fromPoints(R,A);P.cursor=P.start}else{var P=o.fromPoints(A,R);P.cursor=P.end}if(P.desiredColumn=M.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(w)var I=b.cursor;this.selection.addRange(P),I&&this.selection.substractPoint(I)},this.transposeSelections=function(_){for(var w=this.session,b=w.multiSelect,C=b.ranges,M=C.length;M--;){var R=C[M];if(R.isEmpty()){var T=w.getWordRange(R.start.row,R.start.column);R.start.row=T.start.row,R.start.column=T.start.column,R.end.row=T.end.row,R.end.column=T.end.column}}b.mergeOverlappingRanges();for(var A=[],M=C.length;M--;){var R=C[M];A.unshift(w.getTextRange(R))}_<0?A.unshift(A.pop()):A.push(A.shift());for(var M=C.length;M--;){var R=C[M],T=R.clone();w.replace(R,A[M]),R.start.row=T.start.row,R.start.column=T.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(_,w,b){var C=this.session,M=C.multiSelect,R=M.toOrientedRange();if(!(R.isEmpty()&&(R=C.getWordRange(R.start.row,R.start.column),R.cursor=_==-1?R.start:R.end,this.multiSelect.addRange(R),b))){var T=C.getTextRange(R),A=p(C,T,_);A&&(A.cursor=_==-1?A.start:A.end,this.session.unfold(A),this.multiSelect.addRange(A),this.renderer.scrollCursorIntoView(null,.5)),w&&this.multiSelect.substractPoint(R.cursor)}},this.alignCursors=function(){var _=this.session,w=_.multiSelect,b=w.ranges,C=-1,M=b.filter(function(z){if(z.cursor.row==C)return!0;C=z.cursor.row});if(!b.length||M.length==b.length-1){var R=this.selection.getRange(),T=R.start.row,A=R.end.row,P=T==A;if(P){var I=this.session.getLength(),E;do E=this.session.getLine(A);while(/[=:]/.test(E)&&++A<I);do E=this.session.getLine(T);while(/[=:]/.test(E)&&--T>0);T<0&&(T=0),A>=I&&(A=I-1)}var L=this.session.removeFullLines(T,A);L=this.$reAlignText(L,P),this.session.insert({row:T,column:0},L.join(`
`)+`
`),P||(R.start.column=0,R.end.column=L[L.length-1].length),this.selection.setRange(R)}else{M.forEach(function(z){w.substractPoint(z.cursor)});var O=0,B=1/0,U=b.map(function(z){var j=z.cursor,q=_.getLine(j.row),ne=q.substr(j.column).search(/\S/g);return ne==-1&&(ne=0),j.column>O&&(O=j.column),ne<B&&(B=ne),ne});b.forEach(function(z,j){var q=z.cursor,ne=O-q.column,G=U[j]-B;ne>G?_.insert(q,c.stringRepeat(" ",ne-G)):_.remove(new o(q.row,q.column,q.row,q.column-ne+G)),z.start.column=z.end.column=O,z.start.row=z.end.row=q.row,z.cursor=z.end}),w.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(_,w){var b=!0,C=!0,M,R,T;return _.map(function(L){var O=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return O?M==null?(M=O[1].length,R=O[2].length,T=O[3].length,O):(M+R+T!=O[1].length+O[2].length+O[3].length&&(C=!1),M!=O[1].length&&(b=!1),M>O[1].length&&(M=O[1].length),R<O[2].length&&(R=O[2].length),T>O[3].length&&(T=O[3].length),O):[L]}).map(w?P:b?C?I:P:E);function A(L){return c.stringRepeat(" ",L)}function P(L){return L[2]?A(M)+L[2]+A(R-L[2].length+T)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function I(L){return L[2]?A(M+R-L[2].length)+L[2]+A(T)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function E(L){return L[2]?A(M)+L[2]+A(T)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(m.prototype);function v(_,w){return _.row==w.row&&_.column==w.column}i.onSessionChange=function(_){var w=_.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var b=_.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(_){_.$multiselectOnSessionChange||(_.$onAddRange=_.$onAddRange.bind(_),_.$onRemoveRange=_.$onRemoveRange.bind(_),_.$onMultiSelect=_.$onMultiSelect.bind(_),_.$onSingleSelect=_.$onSingleSelect.bind(_),_.$multiselectOnSessionChange=i.onSessionChange.bind(_),_.$checkMultiselectChange=_.$checkMultiselectChange.bind(_),_.$multiselectOnSessionChange(_),_.on("changeSession",_.$multiselectOnSessionChange),_.on("mousedown",a),_.commands.addCommands(l.defaultCommands),S(_))}function S(_){if(!_.textInput)return;var w=_.textInput.getElement(),b=!1;h.addListener(w,"keydown",function(M){var R=M.keyCode==18&&!(M.ctrlKey||M.shiftKey||M.metaKey);_.$blockSelectEnabled&&R?b||(_.renderer.setMouseCursor("crosshair"),b=!0):b&&C()},_),h.addListener(w,"keyup",C,_),h.addListener(w,"blur",C,_);function C(M){b&&(_.renderer.setMouseCursor(""),b=!1)}}i.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(_){y(this),_?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(_){this.$blockSelectEnabled=_},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,i,r){var s=n("../../range").Range,o=i.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(u,a,h){var c=u.getLine(h);return this.foldingStartMarker.test(c)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(u,a,h){return null},this.indentationBlock=function(u,a,h){var c=/\S/,l=u.getLine(a),d=l.search(c);if(d!=-1){for(var f=h||l.length,p=u.getLength(),g=a,m=a;++a<p;){var v=u.getLine(a).search(c);if(v!=-1){if(v<=d){var y=u.getTokenAt(a,0);if(!y||y.type!=="string")break}m=a}}if(m>g){var S=u.getLine(m).length;return new s(g,f,m,S)}}},this.openingBracketBlock=function(u,a,h,c,l){var d={row:h,column:c+1},f=u.$findClosingBracket(a,d,l);if(!!f){var p=u.foldWidgets[f.row];return p==null&&(p=u.getFoldWidget(f.row)),p=="start"&&f.row>d.row&&(f.row--,f.column=u.getLine(f.row).length),s.fromPoints(d,f)}},this.closingBracketBlock=function(u,a,h,c,l){var d={row:h,column:c},f=u.$findOpeningBracket(a,d);if(!!f)return f.column++,d.column--,s.fromPoints(f,d)}}).call(o.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,i,r){var s=n("../line_widgets").LineWidgets,o=n("../lib/dom"),u=n("../range").Range,a=n("../config").nls;function h(l,d,f){for(var p=0,g=l.length-1;p<=g;){var m=p+g>>1,v=f(d,l[m]);if(v>0)p=m+1;else if(v<0)g=m-1;else return m}return-(p+1)}function c(l,d,f){var p=l.getAnnotations().sort(u.comparePoints);if(!!p.length){var g=h(p,{row:d,column:-1},u.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var m=p[g];if(!(!m||!f)){if(m.row===d){do m=p[g+=f];while(m&&m.row===d);if(!m)return p.slice()}var v=[];d=m.row;do v[f<0?"unshift":"push"](m),m=p[g+=f];while(m&&m.row==d);return v.length&&v}}}i.showErrorMarker=function(l,d){var f=l.session;f.widgetManager||(f.widgetManager=new s(f),f.widgetManager.attach(l));var p=l.getCursorPosition(),g=p.row,m=f.widgetManager.getWidgetsAtRow(g).filter(function(R){return R.type=="errorMarker"})[0];m?m.destroy():g-=d;var v=c(f,g,d),y;if(v){var S=v[0];p.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,p.row=S.row,y=l.renderer.$gutterLayer.$annotations[p.row]}else{if(m)return;y={text:[a("Looks good!")],className:"ace_ok"}}l.session.unfold(p.row),l.selection.moveToPosition(p);var _={row:p.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},w=_.el.appendChild(o.createElement("div")),b=_.el.appendChild(o.createElement("div"));b.className="error_widget_arrow "+y.className;var C=l.renderer.$cursorLayer.getPixelPosition(p).left;b.style.left=C+l.renderer.gutterWidth-5+"px",_.el.className="error_widget_wrapper",w.className="error_widget "+y.className,w.innerHTML=y.text.join("<br>"),w.appendChild(o.createElement("div"));var M=function(R,T,A){if(T===0&&(A==="esc"||A==="return"))return _.destroy(),{command:"null"}};_.destroy=function(){l.$mouseHandler.isMousePressed||(l.keyBinding.removeKeyboardHandler(M),f.widgetManager.removeLineWidget(_),l.off("changeSelection",_.destroy),l.off("changeSession",_.destroy),l.off("mouseup",_.destroy),l.off("change",_.destroy))},l.keyBinding.addKeyboardHandler(M),l.on("changeSelection",_.destroy),l.on("changeSession",_.destroy),l.on("mouseup",_.destroy),l.on("change",_.destroy),l.session.widgetManager.addLineWidget(_),_.el.onmousedown=l.focus.bind(l),l.renderer.scrollCursorIntoView(null,.5,{bottom:_.el.offsetHeight})},o.importCssString(`
    .error_widget_wrapper {
        background: inherit;
        color: inherit;
        border:none
    }
    .error_widget {
        border-top: solid 2px;
        border-bottom: solid 2px;
        margin: 5px 0;
        padding: 10px 40px;
        white-space: pre-wrap;
    }
    .error_widget.ace_error, .error_widget_arrow.ace_error{
        border-color: #ff5a5a
    }
    .error_widget.ace_warning, .error_widget_arrow.ace_warning{
        border-color: #F1D817
    }
    .error_widget.ace_info, .error_widget_arrow.ace_info{
        border-color: #5a5a5a
    }
    .error_widget.ace_ok, .error_widget_arrow.ace_ok{
        border-color: #5aaa5a
    }
    .error_widget_arrow {
        position: absolute;
        border: solid 5px;
        border-top-color: transparent!important;
        border-right-color: transparent!important;
        border-left-color: transparent!important;
        top: -5px;
    }
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","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(n,i,r){n("./loader_build")(i);var s=n("./lib/dom"),o=n("./range").Range,u=n("./editor").Editor,a=n("./edit_session").EditSession,h=n("./undomanager").UndoManager,c=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),i.config=n("./config"),i.edit=function(l,d){if(typeof l=="string"){var f=l;if(l=document.getElementById(f),!l)throw new Error("ace.edit can't find div #"+f)}if(l&&l.env&&l.env.editor instanceof u)return l.env.editor;var p="";if(l&&/input|textarea/i.test(l.tagName)){var g=l;p=g.value,l=s.createElement("pre"),g.parentNode.replaceChild(l,g)}else l&&(p=l.textContent,l.innerHTML="");var m=i.createEditSession(p),v=new u(new c(l),m,d),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return g&&(y.textarea=g),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},i.createEditSession=function(l,d){var f=new a(l,d);return f.setUndoManager(new h),f},i.Range=o,i.Editor=u,i.EditSession=a,i.UndoManager=h,i.VirtualRenderer=c,i.version=i.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n);for(var i in n)n.hasOwnProperty(i)&&(window.ace[i]=n[i]);window.ace.default=window.ace,e&&(e.exports=window.ace)})}()})(SE);var yY={exports:{}};(function(e,t){ace.define("ace/theme/chrome.css",["require","exports","module"],function(n,i,r){r.exports=`.ace-chrome .ace_gutter {
  background: #ebebeb;
  color: #333;
  overflow : hidden;
}

.ace-chrome .ace_print-margin {
  width: 1px;
  background: #e8e8e8;
}

.ace-chrome {
  background-color: #FFFFFF;
  color: black;
}

.ace-chrome .ace_cursor {
  color: black;
}

.ace-chrome .ace_invisible {
  color: rgb(191, 191, 191);
}

.ace-chrome .ace_constant.ace_buildin {
  color: rgb(88, 72, 246);
}

.ace-chrome .ace_constant.ace_language {
  color: rgb(88, 92, 246);
}

.ace-chrome .ace_constant.ace_library {
  color: rgb(6, 150, 14);
}

.ace-chrome .ace_invalid {
  background-color: rgb(153, 0, 0);
  color: white;
}

.ace-chrome .ace_fold {
}

.ace-chrome .ace_support.ace_function {
  color: rgb(60, 76, 114);
}

.ace-chrome .ace_support.ace_constant {
  color: rgb(6, 150, 14);
}

.ace-chrome .ace_support.ace_type,
.ace-chrome .ace_support.ace_class
.ace-chrome .ace_support.ace_other {
  color: rgb(109, 121, 222);
}

.ace-chrome .ace_variable.ace_parameter {
  font-style:italic;
  color:#FD971F;
}
.ace-chrome .ace_keyword.ace_operator {
  color: rgb(104, 118, 135);
}

.ace-chrome .ace_comment {
  color: #236e24;
}

.ace-chrome .ace_comment.ace_doc {
  color: #236e24;
}

.ace-chrome .ace_comment.ace_doc.ace_tag {
  color: #236e24;
}

.ace-chrome .ace_constant.ace_numeric {
  color: rgb(0, 0, 205);
}

.ace-chrome .ace_variable {
  color: rgb(49, 132, 149);
}

.ace-chrome .ace_xml-pe {
  color: rgb(104, 104, 91);
}

.ace-chrome .ace_entity.ace_name.ace_function {
  color: #0000A2;
}


.ace-chrome .ace_heading {
  color: rgb(12, 7, 255);
}

.ace-chrome .ace_list {
  color:rgb(185, 6, 144);
}

.ace-chrome .ace_marker-layer .ace_selection {
  background: rgb(181, 213, 255);
}

.ace-chrome .ace_marker-layer .ace_step {
  background: rgb(252, 255, 0);
}

.ace-chrome .ace_marker-layer .ace_stack {
  background: rgb(164, 229, 101);
}

.ace-chrome .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgb(192, 192, 192);
}

.ace-chrome .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-chrome .ace_gutter-active-line {
    background-color : #dcdcdc;
}

.ace-chrome .ace_marker-layer .ace_selected-word {
  background: rgb(250, 250, 255);
  border: 1px solid rgb(200, 200, 250);
}

.ace-chrome .ace_storage,
.ace-chrome .ace_keyword,
.ace-chrome .ace_meta.ace_tag {
  color: rgb(147, 15, 128);
}

.ace-chrome .ace_string.ace_regex {
  color: rgb(255, 0, 0)
}

.ace-chrome .ace_string {
  color: #1A1AA6;
}

.ace-chrome .ace_entity.ace_other.ace_attribute-name {
  color: #994409;
}

.ace-chrome .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}
  
.ace-chrome .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome.css","ace/lib/dom"],function(n,i,r){i.isDark=!1,i.cssClass="ace-chrome",i.cssText=n("./chrome.css");var s=n("../lib/dom");s.importCssString(i.cssText,i.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(n){e&&(e.exports=n)})}()})(yY);var _Y={exports:{}};(function(e,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,i,r){var s=n("../lib/oop");n("../lib/lang");var o=n("./text_highlight_rules").TextHighlightRules,u=i.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=i.supportFunction="rgb|rgba|url|attr|counter|counters",h=i.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",c=i.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=i.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=i.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=i.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=i.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":a,"support.constant":h,"support.type":u,"support.constant.color":c,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};s.inherits(g,o),i.CssHighlightRules=g}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,r){var s=n("../lib/oop"),o=n("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},u.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};s.inherits(u,o),u.getTagRule=function(a){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},u.getStartRule=function(a){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:a}},u.getEndRule=function(a){return{token:"comment.doc",regex:"\\*\\/",next:a}},i.JsDocCommentHighlightRules=u}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,i,r){var s=n("../lib/oop"),o=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,u=n("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",h=function(d){var f=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),p="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[o.getStartRule("doc-start"),l("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+p+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:f,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),l("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[l("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!d||!d.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!d||d.jsx!=!1)&&c.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};s.inherits(h,u);function c(){var d=a.replace("\\d","\\d\\-"),f={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"</?"+d,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(f);var p={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[p,f,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,l("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function l(d){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}i.JavaScriptHighlightRules=h}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,r){var s=n("../lib/oop"),o=n("./text_highlight_rules").TextHighlightRules,u=function(a){var h="[_:a-zA-Z\xC0-\uFFFF][-_:.a-zA-Z0-9\xC0-\uFFFF]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+h+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:h},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+h+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+h+":)?"+h+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===u&&this.normalizeRules()};(function(){this.embedTagRules=function(a,h,c){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(<)("+c+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:h+"start"}]}),this.$rules[c+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,d,f){return f.splice(0),this.token}}],this.embedRules(a,h,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+c+".tag-name.xml"],regex:"(</)("+c+"(?=\\s|>|$))",next:c+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),s.inherits(u,o),i.XmlHighlightRules=u}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,i,r){var s=n("../lib/oop"),o=n("../lib/lang"),u=n("./css_highlight_rules").CssHighlightRules,a=n("./javascript_highlight_rules").JavaScriptHighlightRules,h=n("./xml_highlight_rules").XmlHighlightRules,c=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){h.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(d,f){var p=c[f];return["meta.tag.punctuation."+(d=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(u,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};s.inherits(l,h),i.HtmlHighlightRules=l}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,i,r){var s=n("../config").$modes,o=n("../lib/oop"),u=n("../lib/lang"),a=n("./text_highlight_rules").TextHighlightRules,h=n("./html_highlight_rules").HtmlHighlightRules,c=function(d){return"(?:[^"+u.escapeRegExp(d)+"\\\\]|\\\\.)*"},l=function(){h.call(this);var d={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(p,g,m,v){var y=p.match(/^(\s*)([`~]+)(.*)/),S=/[\w-]+|$/.exec(y[3])[0];return s[S]||(S=""),m.unshift("githubblock",[],[y[1],y[2],S],g),this.token},next:"githubblock"},f=[{token:"support.function",regex:".*",onMatch:function(p,g,m,v){var y=m[1],S=m[2][0],_=m[2][1],w=m[2][2],b=/^(\s*)(`+|~+)\s*$/.exec(p);if(b&&b[1].length<S.length+3&&b[2].length>=_.length&&b[2][0]==_[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",w&&s[w]){var C=s[w].getTokenizer().getLineTokens(p,y.slice(0));return m[1]=C.state,C.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(p){return"markup.heading."+p.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},d,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+c("]")+")(\\]\\s*\\[)("+c("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+c("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+c('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},d,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:f}),this.normalizeRules()};o.inherits(l,a),i.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,i,r){var s=n("../../lib/oop"),o=n("./fold_mode").FoldMode,u=n("../../range").Range,a=i.FoldMode=function(){};s.inherits(a,o),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(h,c,l){var d=h.getLine(l);return this.foldingStartMarker.test(d)?d[0]=="`"&&h.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(h,c,l){var d=h.getLine(l),f=d.length,p=h.getLength(),g=l,m=l;if(!d.match(this.foldingStartMarker))return;if(d[0]=="`")if(h.bgTokenizer.getState(l)!=="start"){for(;++l<p&&(d=h.getLine(l),!(d[0]=="`"&d.substring(0,3)=="```")););return new u(g,f,l,0)}else{for(;l-- >0&&(d=h.getLine(l),!(d[0]=="`"&d.substring(0,3)=="```")););return new u(l,d.length,g,0)}var v;function y(M){return v=h.getTokens(M)[0],v&&v.type.lastIndexOf(S,0)===0}var S="markup.heading";function _(){var M=v.value[0];return M=="="?6:M=="-"?5:7-v.value.search(/[^#]|$/)}if(y(l)){for(var w=_();++l<p;)if(!!y(l)){var b=_();if(b>=w)break}if(m=l-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(h.getLine(m));)m--;if(m>g){var C=h.getLine(m).length;return new u(g,f,m,C)}}}}.call(a.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,i,r){var s=n("../range").Range,o=function(){};(function(){this.checkOutdent=function(u,a){return/^\s+$/.test(u)?/^\s*\}/.test(a):!1},this.autoOutdent=function(u,a){var h=u.getLine(a),c=h.match(/^(\s*\})/);if(!c)return 0;var l=c[1].length,d=u.findMatchingBracket({row:a,column:l});if(!d||d.row==a)return 0;var f=this.$getIndent(u.getLine(d.row));u.replace(new s(a,0,a,l-1),f)},this.$getIndent=function(u){return u.match(/^\s*/)[0]}}).call(o.prototype),i.MatchingBraceOutdent=o}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,i,r){var s=n("../../lib/oop"),o=n("../../range").Range,u=n("./fold_mode").FoldMode,a=i.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};s.inherits(a,u),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(h,c,l){var d=h.getLine(l);if(this.singleLineBlockCommentRe.test(d)&&!this.startRegionRe.test(d)&&!this.tripleStarBlockCommentRe.test(d))return"";var f=this._getFoldWidgetBase(h,c,l);return!f&&this.startRegionRe.test(d)?"start":f},this.getFoldWidgetRange=function(h,c,l,d){var f=h.getLine(l);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(h,f,l);var m=f.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(h,m[1],l,p);var g=h.getCommentFoldRange(l,p+m[0].length,1);return g&&!g.isMultiLine()&&(d?g=this.getSectionRange(h,l):c!="all"&&(g=null)),g}if(c!=="markbegin"){var m=f.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(h,m[1],l,p):h.getCommentFoldRange(l,p,-1)}}},this.getSectionRange=function(h,c){var l=h.getLine(c),d=l.search(/\S/),f=c,p=l.length;c=c+1;for(var g=c,m=h.getLength();++c<m;){l=h.getLine(c);var v=l.search(/\S/);if(v!==-1){if(d>v)break;var y=this.getFoldWidgetRange(h,"all",c);if(y){if(y.start.row<=f)break;if(y.isMultiLine())c=y.end.row;else if(d==v)break}g=c}}return new o(f,p,g,h.getLine(g).length)},this.getCommentRegionBlock=function(h,c,l){for(var d=c.search(/\s*$/),f=h.getLength(),p=l,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<f;){c=h.getLine(l);var v=g.exec(c);if(!!v&&(v[1]?m--:m++,!m))break}var y=l;if(y>p)return new o(p,d,y,c.length)}}.call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(n,i,r){var s=n("../lib/oop"),o=n("./text").Mode,u=n("./javascript_highlight_rules").JavaScriptHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,h=n("../worker/worker_client").WorkerClient,c=n("./behaviour/cstyle").CstyleBehaviour,l=n("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=u,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new l};s.inherits(d,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,f),y=v.tokens,S=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(f=="start"||f=="no_regex"){var _=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);_&&(m+=g)}else if(f=="doc-start"){if(S=="start"||S=="no_regex")return"";var _=p.match(/^\s*(\/?)\*/);_&&(_[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new h(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(d.prototype),i.Mode=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,i,r){var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var u=document.createElement("c").style;for(var a in u)if(typeof u[a]=="string"){var h=a.replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()});s.hasOwnProperty(h)||(s[h]=1)}}this.completionsDefined=!0},this.getCompletions=function(u,a,h,c){if(this.completionsDefined||this.defineCompletions(),u==="ruleset"||a.$mode.$id=="ace/mode/scss"){var l=a.getLine(h.row).substr(0,h.column),d=/\([^)]*$/.test(l);return d&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?(/([\w\-]+):[^:]*$/.test(l),this.getPropertyValueCompletions(u,a,h,c)):this.getPropertyCompletions(u,a,h,c,d)}return[]},this.getPropertyCompletions=function(u,a,h,c,l){l=l||!1;var d=Object.keys(s);return d.map(function(f){return{caption:f,snippet:f+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(u,a,h,c){var l=a.getLine(h.row).substr(0,h.column),d=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!d)return[];var f=[];return d in s&&typeof s[d]=="object"&&(f=Object.keys(s[d])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(o.prototype),i.CssCompletions=o}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,i,r){var s=n("../../lib/oop");n("../behaviour").Behaviour;var o=n("./cstyle").CstyleBehaviour,u=n("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(h,c,l,d,f){if(f===":"&&l.selection.isEmpty()){var p=l.getCursorPosition(),g=new u(d,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=d.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(h,c,l,d,f){var p=d.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=l.getCursorPosition(),m=new u(d,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=d.doc.getLine(f.start.row),S=y.substring(f.end.column,f.end.column+1);if(S===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(h,c,l,d,f){if(f===";"&&l.selection.isEmpty()){var p=l.getCursorPosition(),g=d.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(h,c,l,d,f){if(f==="!"&&l.selection.isEmpty()){var p=l.getCursorPosition(),g=d.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};s.inherits(a,o),i.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,i,r){var s=n("../lib/oop"),o=n("./text").Mode,u=n("./css_highlight_rules").CssHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,h=n("../worker/worker_client").WorkerClient,c=n("./css_completions").CssCompletions,l=n("./behaviour/css").CssBehaviour,d=n("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=u,this.$outdent=new a,this.$behaviour=new l,this.$completer=new c,this.foldingRules=new d};s.inherits(f,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var S=g.match(/^.*\{\s*$/);return S&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new h(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(f.prototype),i.Mode=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,i,r){var s=n("../../lib/oop"),o=n("../behaviour").Behaviour,u=n("../../token_iterator").TokenIterator;n("../../lib/lang");function a(c,l){return c&&c.type.lastIndexOf(l+".xml")>-1}var h=function(){this.add("string_dquotes","insertion",function(c,l,d,f,p){if(p=='"'||p=="'"){var g=p,m=f.doc.getTextRange(d.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&d.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=d.getCursorPosition(),y=f.doc.getLine(v.row),S=y.substring(v.column,v.column+1),_=new u(f,v.row,v.column),w=_.getCurrentToken();if(S==g&&(a(w,"attribute-value")||a(w,"string")))return{text:"",selection:[1,1]};if(w||(w=_.stepBackward()),!w)return;for(;a(w,"tag-whitespace")||a(w,"whitespace");)w=_.stepBackward();var b=!S||S.match(/\s/);if(a(w,"attribute-equals")&&(b||S==">")||a(w,"decl-attribute-equals")&&(b||S=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(c,l,d,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=f.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(c,l,d,f,p){if(p==">"){var g=d.getSelectionRange().start,m=new u(f,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(a(v,"tag-name")||a(v,"tag-whitespace")||a(v,"attribute-name")||a(v,"attribute-equals")||a(v,"attribute-value"))||a(v,"reference.attribute-value"))return;if(a(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column<y)return;if(g.column==y){var S=m.stepForward();if(S&&a(S,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var _=m.getCurrentTokenRow(),w=m.getCurrentTokenColumn();if(a(m.stepBackward(),"end-tag-open"))return;var b=v.value;return _==g.row&&(b=b.substring(0,g.column-w)),this.voidElements.hasOwnProperty(b.toLowerCase())?void 0:{text:"></"+b+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(c,l,d,f,p){if(p==`
`){var g=d.getCursorPosition(),m=f.getLine(g.row),v=new u(f,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var S=y.value,_=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[S]){var w=f.getTokenAt(g.row,g.column+1),m=f.getLine(_),b=this.$getIndent(m),C=b+f.getTabString();return w&&w.value==="</"?{text:`
`+C+`
`+b,selection:[1,C.length,1,C.length]}:{text:`
`+C}}}}})};s.inherits(h,o),i.XmlBehaviour=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,i,r){var s=n("../../lib/oop"),o=n("./fold_mode").FoldMode,u=i.FoldMode=function(a,h){this.defaultMode=a,this.subModes=h};s.inherits(u,o),function(){this.$getMode=function(a){typeof a!="string"&&(a=a[0]);for(var h in this.subModes)if(a.indexOf(h)===0)return this.subModes[h];return null},this.$tryMode=function(a,h,c,l){var d=this.$getMode(a);return d?d.getFoldWidget(h,c,l):""},this.getFoldWidget=function(a,h,c){return this.$tryMode(a.getState(c-1),a,h,c)||this.$tryMode(a.getState(c),a,h,c)||this.defaultMode.getFoldWidget(a,h,c)},this.getFoldWidgetRange=function(a,h,c){var l=this.$getMode(a.getState(c-1));return(!l||!l.getFoldWidget(a,h,c))&&(l=this.$getMode(a.getState(c))),(!l||!l.getFoldWidget(a,h,c))&&(l=this.defaultMode),l.getFoldWidgetRange(a,h,c)}}.call(u.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,i,r){var s=n("../../lib/oop"),o=n("../../range").Range,u=n("./fold_mode").FoldMode,a=i.FoldMode=function(l,d){u.call(this),this.voidElements=l||{},this.optionalEndTags=s.mixin({},this.voidElements),d&&s.mixin(this.optionalEndTags,d)};s.inherits(a,u);var h=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function c(l,d){return l.type.lastIndexOf(d+".xml")>-1}(function(){this.getFoldWidget=function(l,d,f){var p=this._getFirstTagInLine(l,f);return p?p.closing||!p.tagName&&p.selfClosing?d==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(l,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(l,f)},this.getCommentFoldWidget=function(l,d){return/comment/.test(l.getState(d))&&/<!-/.test(l.getLine(d))?"start":""},this._getFirstTagInLine=function(l,d){for(var f=l.getTokens(d),p=new h,g=0;g<f.length;g++){var m=f[g];if(c(m,"tag-open")){if(p.end.column=p.start.column+m.value.length,p.closing=c(m,"end-tag-open"),m=f[++g],!m)return null;for(p.tagName=m.value,p.end.column+=m.value.length,g++;g<f.length;g++)if(m=f[g],p.end.column+=m.value.length,c(m,"tag-close")){p.selfClosing=m.value=="/>";break}return p}else if(c(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(l,d,f,p){for(var g=l.getTokens(d),m=0,v=0;v<g.length;v++){var y=g[v];if(m+=y.value.length,!(m<p)&&c(y,"end-tag-open")&&(y=g[v+1],y&&y.value==f))return!0}return!1},this.getFoldWidgetRange=function(l,d,f){var p=l.getMatchingTags({row:f,column:0});return p?new o(p.openTag.end.row,p.openTag.end.column,p.closeTag.start.row,p.closeTag.start.column):this.getCommentFoldWidget(l,f)&&l.getCommentFoldRange(f,l.getLine(f).length)}}).call(a.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,i,r){var s=n("../../lib/oop"),o=n("./mixed").FoldMode,u=n("./xml").FoldMode,a=n("./cstyle").FoldMode,h=i.FoldMode=function(c,l){o.call(this,new u(c,l),{"js-":new a,"css-":new a})};s.inherits(h,o)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,i,r){var s=n("../token_iterator").TokenIterator,o=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],u=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=o.concat(u),h={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},c=Object.keys(h);function l(g,m){return g.type.lastIndexOf(m+".xml")>-1}function d(g,m){for(var v=new s(g,m.row,m.column),y=v.getCurrentToken();y&&!l(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function f(g,m){for(var v=new s(g,m.row,m.column),y=v.getCurrentToken();y&&!l(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var S=m.getTokenAt(v.row,v.column);if(!S)return[];if(l(S,"tag-name")||l(S,"tag-open")||l(S,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(l(S,"tag-whitespace")||l(S,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(l(S,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var _=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(_)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return c.map(function(S){return{value:S,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var S=d(m,v);if(!S)return[];var _=a;return S in h&&(_=_.concat(Object.keys(h[S]))),_.map(function(w){return{caption:w,snippet:w+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var S=d(m,v),_=f(m,v);if(!S)return[];var w=[];return S in h&&_ in h[S]&&typeof h[S][_]=="object"&&(w=Object.keys(h[S][_])),w.map(function(b){return{caption:b,snippet:b,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var S=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return S.map(function(_){return{caption:_,snippet:_,meta:"html entity",score:1e6}})}}).call(p.prototype),i.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,i,r){var s=n("../lib/oop"),o=n("../lib/lang"),u=n("./text").Mode,a=n("./javascript").Mode,h=n("./css").Mode,c=n("./html_highlight_rules").HtmlHighlightRules,l=n("./behaviour/xml").XmlBehaviour,d=n("./folding/html").FoldMode,f=n("./html_completions").HtmlCompletions,p=n("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=c,this.$behaviour=new l,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":h}),this.foldingRules=new d(this.voidElements,o.arrayToMap(m))};s.inherits(v,u),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=o.arrayToMap(g),this.getNextLineIndent=function(y,S,_){return this.$getIndent(S)},this.checkOutdent=function(y,S,_){return!1},this.getCompletions=function(y,S,_,w){return this.$completer.getCompletions(y,S,_,w)},this.createWorker=function(y){if(this.constructor==v){var S=new p(["ace"],"ace/mode/html_worker","Worker");return S.attachToDocument(y.getDocument()),this.fragmentContext&&S.call("setOptions",[{context:this.fragmentContext}]),S.on("error",function(_){y.setAnnotations(_.data)}),S.on("terminate",function(){y.clearAnnotations()}),S}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),i.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,r){var s=n("../lib/oop"),o=n("./text_highlight_rules").TextHighlightRules,u=i.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",a=i.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",h=function(){var c=this.createKeywordMapper({keyword:u,"support.function.builtin":a,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",d="(?:\\.\\d+)",f="(?:\\d+)",p="(?:(?:"+f+"?"+d+")|(?:"+f+"\\.))",g="(?:(?:"+p+"|"+f+"))",m="(?:"+g+"|"+p+")",v="(?:&"+f+")",y="[a-zA-Z_][a-zA-Z0-9_]*",S="(?:"+y+"(?==))",_="(?:\\$(?:SHLVL|\\$|\\!|\\?))",w="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(b,C,M){var R=b[2]=="-"?"indentedHeredoc":"heredoc",T=b.split(this.splitRegex);return M.push(R,T[4]),[{type:"constant",value:T[1]},{type:"text",value:T[2]},{type:"string",value:T[3]},{type:"support.class",value:T[4]},{type:"string",value:T[5]}]},rules:{heredoc:[{onMatch:function(b,C,M){return b===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^	+"},{onMatch:function(b,C,M){return b===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(b,C){return C[0]==="heredoc"||C[0]==="indentedHeredoc"?C[0]:b}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:_},{token:"variable",regex:S},{include:"variables"},{token:"support.function",regex:w},{token:"support.function",regex:v},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:l+"\\b"},{token:c,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};s.inherits(h,o),i.ShHighlightRules=h}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,i,r){var s=n("../lib/oop"),o=n("./text").Mode,u=n("./sh_highlight_rules").ShHighlightRules,a=n("../range").Range,h=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=u,this.foldingRules=new h,this.$behaviour=this.$defaultBehaviour};s.inherits(c,o),function(){this.lineCommentStart="#",this.getNextLineIndent=function(d,f,p){var g=this.$getIndent(f),m=this.getTokenizer().getLineTokens(f,d),v=m.tokens;if(v.length&&v[v.length-1].type=="comment")return g;if(d=="start"){var y=f.match(/^.*[\{\(\[:]\s*$/);y&&(g+=p)}return g};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(d,f,p){if(p!==`\r
`&&p!=="\r"&&p!==`
`)return!1;var g=this.getTokenizer().getLineTokens(f.trim(),d).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(d,f,p){p+=1;var g=this.$getIndent(f.getLine(p)),m=f.getTabString();g.slice(-m.length)==m&&f.remove(new a(p,g.length-m.length,p,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(c.prototype),i.Mode=c}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,i,r){var s=n("../lib/oop"),o=n("../lib/lang"),u=n("./text").Mode,a=n("./xml_highlight_rules").XmlHighlightRules,h=n("./behaviour/xml").XmlBehaviour,c=n("./folding/xml").FoldMode,l=n("../worker/worker_client").WorkerClient,d=function(){this.HighlightRules=a,this.$behaviour=new h,this.foldingRules=new c};s.inherits(d,u),function(){this.voidElements=o.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(f){var p=new l(["ace"],"ace/mode/xml_worker","Worker");return p.attachToDocument(f.getDocument()),p.on("error",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/xml"}.call(d.prototype),i.Mode=d}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,i,r){var s=n("../lib/oop"),o=n("./behaviour/cstyle").CstyleBehaviour,u=n("./text").Mode,a=n("./markdown_highlight_rules").MarkdownHighlightRules,h=n("./folding/markdown").FoldMode,c=function(){this.HighlightRules=a,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new h,this.$behaviour=new o({braces:!0})};s.inherits(c,u),function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,d,f){if(l=="listblock"){var p=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(d);if(!p)return"";var g=p[2];return g||(g=parseInt(p[3],10)+1+"."),p[1]+g+p[4]}else return this.$getIndent(d)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}.call(c.prototype),i.Mode=c}),function(){ace.require(["ace/mode/markdown"],function(n){e&&(e.exports=n)})}()})(_Y);const bY={name:"AceEditor",props:{modelValue:{type:String,required:!0},mode:{type:String,default:"text"},theme:{type:String,default:"chrome"},readonly:{type:Boolean,default:!1},height:{type:String,default:"150px"}},emits:["update:modelValue"],data(){return{editor:null}},watch:{modelValue(e){e!==this.editor.getValue()&&this.editor.setValue(e,1)},theme(e){this.editor.setTheme(`ace/theme/${e}`)},mode(e){this.editor.setOption("mode",`ace/mode/${e}`)},readonly(e){this.editor.setReadOnly(e)}},mounted(){this.editor=SE.exports.edit(this.$el),this.editor.setValue(this.modelValue,1),this.editor.setReadOnly(this.readonly),this.editor.setTheme(`ace/theme/${this.theme}`),this.editor.session.setMode(`ace/mode/${this.mode}`),this.editor.on("change",()=>{this.$emit("update:modelValue",this.editor.getValue())})},beforeUnmount(){this.editor.destroy()}};function wY(e,t,n,i,r,s){return oe(),me("div",{style:Nt([{height:n.height},{width:"100%"}]),onKeydown:t[0]||(t[0]=Bt(()=>{},["stop"])),onKeyup:t[1]||(t[1]=Bt(()=>{},["stop"])),onKeypress:t[2]||(t[2]=Bt(()=>{},["stop"]))},null,36)}const SY=Re(bY,[["render",wY]]),Il={mixins:[na],props:{modelValue:{type:[String,Number],default:""}},data(){return{native_type:gE}},computed:{getValue:{get(){return this.modelValue??""},set(e){this.$emit("update:modelValue",e)}}}},TY={name:"FieldTypeHtmlDefinition",components:{AceEditor:SY},mixins:[Il],computed:{defaultAttributesValues(){return{mode:"html",theme:"chrome"}},definitionType(){return fE},allowedAttributes(){return["disabled","height","id","mode","name","readonly","required","theme"]}}},EY={key:0,class:"overlay"};function AY(e,t,n,i,r,s){const o=Ae("ace-editor");return oe(),me("div",null,[Ee(o,Ot({modelValue:e.getValue,"onUpdate:modelValue":t[0]||(t[0]=u=>e.getValue=u)},e.getAttributes),null,16,["modelValue"]),e.getAttributes.disabled?(oe(),me("div",EY)):Be("",!0)])}const CY=Re(TY,[["render",AY]]),xY={name:"IntegerDefinition",mixins:[Ng],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","list","max","min","name","placeholder","readonly","required","step"]},definitionType(){return Ig}}};function MY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,{type:"number"},ii(e.events,!0)),null,16)),[[Bi,e.getValue,void 0,{number:!0}]])}const kY=Re(xY,[["render",MY]]),$Y={name:"FieldTypeListOfValuesDefinition",mixins:[Il],emits:["more-data","filter","update:modelValue"],data(){return{is_mouse_down:!1,selected_index:null,is_open:!1,is_top:!1,filter:null,placeholder:null,loading_bg_top:0}},computed:{defaultAttributesValues(){return{}},definitionType(){return pE},allowedAttributes(){return["autocomplete","autofocus","dirname","disabled","form","id","list","maxlength","minlength","name","pattern","placeholder","readonly","required","size","type"]},showMoreInputsWarning(){return Object.keys(this.parameters.options||{}).length>100&&Object.keys(this.getOptions).length===100},getFieldAttributes(){return{...this.attributes,value:this.getValue}},getFilterAttributes(){return{...this.attributes,name:this.attributes.name?`input_${this.attributes.name}`:void 0,required:this.attributes.required&&!this.getValue}},showRemoveOptionButton(){return this.parameters.allow_empty&&!(this.getAttributes.readonly||this.getAttributes.disabled)&&this.getOptions[this.selected_index||this.getValue]},getOptions(){let e=Array.isArray(this.parameters.options)?this.parameters.options.map(t=>[t.id,t.label,t.html]):Object.entries(this.parameters.options||{});if(this.filter&&!this.parameters.hasPagination){const t=this.filter.toLowerCase().replace(/\s/g,"");e=e.filter(([,n])=>{const i=(n||"").toString();return String(i.replace(/(<([^>]+)>)| /img,"")).toLowerCase().replace(" ","").includes(t)})}return this.parameters.sort!==!1&&(this.parameters.hasPagination?e.sort(([,t],[,n])=>t<n?-1:t>n?1:0):e.sort(([,t],[,n])=>(t||"").toString().localeCompare((n||"").toString(),"en",{numeric:!0}))),e.slice(0,e.length>100?100:e.length).reduce((t,[n,i,r])=>({...t,[n]:{value:i,html:r}}),{})}},watch:{is_open(e){this.loading_bg_top=0;const t=e?"addEventListener":"removeEventListener";document[t]("click",this.closeListenerFn),this.toggleCloseListenerForScrollEvent(t)},selected_index:"setPlaceholderValue",getValue:{handler:"setPlaceholderValue",immediate:!0},"parameters.options":"setPlaceholderValue",filter(e){this.emitFilterDebounced(this,e?.toLowerCase())}},beforeUnmount(){this.close()},methods:{setIsMouseDown(e=!1){this.is_mouse_down=e},clearFilterInput(){setTimeout(()=>{this.filter&&!this.is_mouse_down&&(this.filter=null)},100)},closeListenerFn(e){this.$el.contains(e.target)||this.close()},toggleCloseListenerForScrollEvent(e){const t=({parentNode:i})=>i===document?null:window.getComputedStyle(i).getPropertyValue("overflow").includes("auto")?i:t(i),n=t(this.$el);n&&n[e]("scroll",this.closeListenerFn)},selectOption(e,t){e.preventDefault(),this.getValue=t,this.filter=null,this.selected_index=null,this.close()},setPlaceholderValue(){this.$nextTick(()=>{if(this.parameters.plain_options)this.placeholder=this.parameters.plain_options[this.selected_index||this.getValue];else if(Array.isArray(this.parameters?.options))this.placeholder=this.parameters.options.find(e=>`${e.id}`==`${this.getValue}`)?.label;else{const e=this.parameters.options?.[this.selected_index||this.getValue];this.placeholder=(e?.title||e)??this.getAttributes.placeholder}this.placeholder=(this.placeholder||"").toString().replaceAll("&nbsp;","")})},keyDown(){!this.selected_index&&this.getValue&&(this.selected_index=this.getValue);const e=Object.keys(this.getOptions),t=e.indexOf(this.selected_index)+1;t>=e.length?[this.selected_index]=e:this.selected_index=e[t]},keyUp(){!this.selected_index&&this.getValue&&(this.selected_index=this.getValue);const e=Object.keys(this.getOptions),t=e.indexOf(this.selected_index)-1;t<0?[this.selected_index]=e.reverse():this.selected_index=e[t]},keyEsc(){this.close()},keyEnter(e){this.is_open&&e.preventDefault(),this.selected_index&&this.selectOption(e,this.selected_index)},onBlur(){this.selected_index&&(this.selected_index=null)},toggle(){this.is_open?this.close():this.open()},close(){this.selected_index=null,this.is_mouse_down=!1,this.is_open=!1},open(){this.getAttributes.disabled||this.getAttributes.readonly||(this.is_open=!0,this.$nextTick(this.setSelectMenuPosition))},checkScroll(e){const{scrollHeight:t,clientHeight:n,scrollTop:i}=e.target;this.loading_bg_top=i,!this.parameters.loading&&!this.showMoreInputsWarning&&i+n>=t&&this.$emit("more-data")},setSelectMenuPosition(){if(!this.$refs.selectMenu||!this.is_open)return;const e=200,t=105;this.$nextTick(()=>{const n=window.innerHeight-this.$refs.input.getBoundingClientRect().bottom,i=this.$refs.selectMenu.getBoundingClientRect().height,{top:r,bottom:s,left:o,width:u}=this.$refs.input.getBoundingClientRect(),a={left:o,width:u-2,maxHeight:void 0,top:void 0};this.is_top=i<t?!1:n<t,this.is_top?(a.maxHeight=i<e?i:e,a.top=r-a.maxHeight):(a.maxHeight=n<e?n-4:e,a.top=s),Object.entries(a).forEach(([h,c])=>{this.$refs.selectMenu.style[h]=`${c}px`})})},emitFilterDebounced:mu((e,t)=>{!e.is_open||e.$emit("filter",t)},500)}},IY=["placeholder","value"],RY={class:"btn-group"},LY=["disabled"],OY=["onClick","innerHTML"],PY=["onClick"],NY={key:1,class:"more-results"},DY={key:2,class:"more-results"};function FY(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("flai-spinner");return oe(),me("div",{class:"bg-white",onFocusout:t[13]||(t[13]=(...a)=>s.clearFilterInput&&s.clearFilterInput(...a))},[de("div",{ref:"input",class:Ge([{open:r.is_open,"top-position":r.is_top},"input-selection"])},[de("input",Ot({ref:"filter-input"},s.getFilterAttributes,{placeholder:r.placeholder,value:r.filter,type:"text",autocomplete:"off",onInput:t[0]||(t[0]=a=>r.filter=a.target.value),onBlur:t[1]||(t[1]=(...a)=>s.onBlur&&s.onBlur(...a)),onClick:t[2]||(t[2]=Bt((...a)=>s.open&&s.open(...a),["prevent"])),onKeyup:[t[3]||(t[3]=no(Bt((...a)=>s.keyUp&&s.keyUp(...a),["prevent"]),["up"])),t[4]||(t[4]=no(Bt((...a)=>s.keyDown&&s.keyDown(...a),["prevent"]),["down"]))],onKeydown:[t[5]||(t[5]=no(Bt((...a)=>s.keyEsc&&s.keyEsc(...a),["prevent"]),["esc"])),t[6]||(t[6]=no((...a)=>s.keyEnter&&s.keyEnter(...a),["enter"]))]}),null,16,IY),de("input",Ot({type:"hidden"},s.getFieldAttributes),null,16),de("div",RY,[s.showRemoveOptionButton?(oe(),me("button",{key:0,type:"button",class:"btn icon link",onClick:t[7]||(t[7]=Bt(a=>s.selectOption(a,null),["prevent"]))},[Ee(o,{name:"close"})])):Be("",!0),de("button",{disabled:e.getAttributes.disabled||e.getAttributes.readonly,type:"button",class:"btn icon link",onClick:t[8]||(t[8]=Bt((...a)=>s.toggle&&s.toggle(...a),["prevent"]))},[Ee(o,{name:r.is_open?"expand_less":"expand_more"},null,8,["name"])],8,LY)])],2),r.is_open?(oe(),Ue(Ms,{key:0,to:"#root-portal","ignore-parent-node":""},[de("ul",{ref:"selectMenu",class:Ge([{"top-position":r.is_top},"list-of-values-value-list"]),onScroll:t[12]||(t[12]=(...a)=>s.checkScroll&&s.checkScroll(...a))},[e.parameters.loading?(oe(),me("div",{key:0,class:"loading-bg",style:Nt(`top: ${r.loading_bg_top}px;`),onClick:t[9]||(t[9]=Bt(()=>{},["stop"]))},[Ee(u,{size:"3xl"})],4)):Be("",!0),(oe(!0),me(tt,null,ti(s.getOptions,(a,h)=>(oe(),me("li",{key:h,class:Ge({active:h===e.getValue,"active-index":h===r.selected_index}),onMousedown:t[10]||(t[10]=c=>s.setIsMouseDown(!0)),onMouseup:t[11]||(t[11]=c=>s.setIsMouseDown(!1))},[e.parameters.option_html?(oe(),me("div",{key:0,onClick:Bt(c=>s.selectOption(c,h),["prevent","stop"]),innerHTML:a.html},null,8,OY)):(oe(),me("div",{key:1,onClick:Bt(c=>s.selectOption(c,h),["prevent","stop"])},$e(a.value),9,PY))],34))),128)),Object.keys(s.getOptions).length===0?(oe(),me("li",NY," No options available. ")):Be("",!0),s.showMoreInputsWarning?(oe(),me("li",DY," More results are available. Use filter. ")):Be("",!0)],34)])):Be("",!0)],32)}const BY=Re($Y,[["render",FY]]),HY={name:"FieldTypePlainTextMultiRowDefinition",mixins:[Il],computed:{defaultAttributesValues(){return{rows:3}},allowedAttributes(){return["autocomplete","autofocus","cols","disabled","form","id","maxlength","minlength","name","placeholder","readonly","required","rows","spellcheck","wrap"]},definitionType(){return xg}}};function UY(e,t,n,i,r,s){return gn((oe(),me("textarea",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,ii(e.events,!0)),null,16)),[[Bi,e.getValue]])}const zY=Re(HY,[["render",UY]]),WY={name:"FieldTypePlainTextSingleRowDefinition",mixins:[Il],computed:{defaultAttributesValues(){return{}},definitionType(){return Mg},allowedAttributes(){return["autocomplete","autofocus","dirname","disabled","form","id","list","maxlength","minlength","name","pattern","placeholder","readonly","required","size","type"]},getType(){return["email","password","search","text","url"].includes(this.getAttributes.type)?this.getAttributes.type:(this.$debug&&this.getAttributes.type&&console.warn(`Type ${this.getAttributes.type} is not valid for plain-text-single-row inputs. Reverting to "text"`),"text")}}},VY=["type"];function jY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,{type:s.getType},ii(e.events,!0)),null,16,VY)),[[yp,e.getValue]])}const GY=Re(WY,[["render",jY]]),qY={name:"SequenceNumberDefinition",mixins:[Ng],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","list","max","min","name","placeholder","readonly","required","step","type"]},definitionType(){return Rg}}};function KY(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o)},e.getAttributes,{type:"number"},ii(e.events,!0)),null,16)),[[Bi,e.getValue,void 0,{number:!0}]])}const YY=Re(qY,[["render",KY]]);const XY={name:"PasswordDefinition",mixins:[Il],data(){return{showPassword:!1}},computed:{defaultAttributesValues(){return{}},definitionType(){return kg},allowedAttributes(){return["autocomplete","autofocus","dirname","disabled","form","id","list","maxlength","minlength","name","pattern","placeholder","readonly","required","size"]},getType(){return this.showPassword?"text":"password"}}},JY={class:"d-flex items-center"},QY=["type"];function ZY(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",JY,[gn(de("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=u=>e.getValue=u)},e.getAttributes,{type:s.getType,class:"flex-1"},ii(e.events,!0)),null,16,QY),[[yp,e.getValue]]),Ee(o,{name:r.showPassword?"visibility_off":"visibility",class:"toggle-icon ml-2",onClick:t[1]||(t[1]=u=>r.showPassword=!r.showPassword)},null,8,["name"])])}const eX=Re(XY,[["render",ZY],["__scopeId","data-v-b89585e6"]]),tX={name:"RadioDefinition",mixins:[na],props:{modelValue:{type:[String,Number],default:null}},emits:["update:modelValue"],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["disabled","id","name","required"]},definitionType(){return yE},options(){return(this.parameters.options||[]).map(e=>{const t=this.getAttributes.name||e.name;return{id:`${e.id||t||"id"}_${vT()}`.replaceAll(" ","-"),name:t,value:e.value,checked:this.getValue===e.value,required:this.getAttributes.required,disabled:e.disabled??this.getAttributes.disabled,label:e.label??e.value}})},getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}}},nX=["id","value","name","disabled","readonly","checked"],iX=["for"];function rX(e,t,n,i,r,s){return oe(),me("div",null,[(oe(!0),me(tt,null,ti(s.options,o=>(oe(),me("div",{key:o.id},[gn(de("input",{id:o.id,"onUpdate:modelValue":t[0]||(t[0]=u=>s.getValue=u),value:o.value,name:o.name,disabled:o.disabled,readonly:o.readonly,checked:o.checked,type:"radio"},null,8,nX),[[vp,s.getValue]]),de("label",{for:o.id},[de("span",{class:Ge(["definition-checkbox",{checked:o.checked}])},null,2),ri(" "+$e(o.label),1)],8,iX)]))),128))])}const sX=Re(tX,[["render",rX]]),TE={mixins:[na],props:{modelValue:{type:[Array,String,Number,Boolean,Object],default:()=>[]}},computed:{getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}}},oX={name:"RangeDefinition",mixins:[TE],computed:{defaultAttributesValues(){return{min:0,max:100,step:1}},allowedAttributes(){return["max","min","step","id","name","disabled"]},definitionType(){return bE}}};function aX(e,t,n,i,r,s){return gn((oe(),me("input",Ot({"onUpdate:modelValue":t[0]||(t[0]=o=>e.getValue=o),type:"range"},e.getAttributes),null,16)),[[Bi,e.getValue,void 0,{number:!0}]])}const lX=Re(oX,[["render",aX]]);const cX={name:"DoubleRangeDefinition",mixins:[TE],props:{modelValue:{type:Object,validator:e=>e.hasOwnProperty("from")&&e.hasOwnProperty("to"),default:()=>({from:null,to:null})}},emits:["update:modelValue"],data(){return{fromHover:!1,toHover:!1,fromActive:!1,toActive:!1,sliderEvents:e=>({mouseover:()=>{this[`${e}Hover`]=!0},mouseout:()=>{this[`${e}Hover`]=!1},mousedown:()=>{this[`${e}Active`]=!0},pointerup:()=>{this[`${e}Active`]=!1},touchstart:()=>{this[`${e}Active`]=!0},touchend:()=>{this[`${e}Active`]=!1},input:e==="from"?this.onFromInput:this.onToInput})}},computed:{defaultAttributesValues(){return{min:0,max:100,step:1}},numberInputStep(){return this.getAttributes.step<1?this.getAttributes.step:1},allowedAttributes(){return["max","min","step","id","name","disabled","fromdisabled","todisabled"]},definitionType(){return _E},fromStyle(){return`left: ${(Math.min(parseInt(this.from),parseInt(this.to)-1)-this.fromAttributes.min)/(this.fromAttributes.max-this.fromAttributes.min)*100}%`},toStyle(){return`right: ${100-(Math.max(parseInt(this.to),parseInt(this.from)+1)-this.toAttributes.min)/(this.toAttributes.max-this.toAttributes.min)*100}%`},betweenStyle(){return`${this.fromStyle}; ${this.toStyle}`},fromAttributes(){return{...this.getAttributes,disabled:this.getAttributes.disabled||this.getAttributes.fromdisabled,step:this.fromActive?this.attributes.step:1}},toAttributes(){return{...this.getAttributes,disabled:this.getAttributes.disabled||this.getAttributes.todisabled,step:this.toActive?this.attributes.step:1}},from:{get(){return this.modelValue.from},set(e){this.$emit("update:modelValue",{...this.modelValue,from:e})}},to:{get(){return this.modelValue.to},set(e){this.$emit("update:modelValue",{...this.modelValue,to:e})}}},methods:{onFromInput(e){const t=parseFloat(e.target.value);this.to>t?this.from=t:e.target.value=this.from},onToInput(e){const t=parseFloat(e.target.value);this.from<t?this.to=t:e.target.value=this.to}}},uX={class:"wrapper"},hX={class:"range-slider"},dX={class:"range-labels"},fX=["value"],pX=["value"],gX=["value"],mX=["value"],vX={class:"track-wrapper"};function yX(e,t,n,i,r,s){return oe(),me("div",uX,[de("div",hX,[de("div",dX,[de("input",Ot({type:"number",value:s.from},s.fromAttributes,{class:"range-label range-label-start",onChange:t[0]||(t[0]=(...o)=>s.onFromInput&&s.onFromInput(...o))}),null,16,fX),de("input",Ot({type:"number",value:s.to},s.toAttributes,{class:"range-label range-label-end",onChange:t[1]||(t[1]=(...o)=>s.onToInput&&s.onToInput(...o))}),null,16,pX)]),de("input",Ot({value:s.from,type:"range"},s.fromAttributes,ii(r.sliderEvents("from"),!0)),null,16,gX),de("input",Ot({value:s.to,type:"range"},s.toAttributes,ii(r.sliderEvents("to"),!0)),null,16,mX),de("div",vX,[t[2]||(t[2]=de("div",{class:"track"},null,-1)),de("div",{class:Ge(["range-between",{disabled:e.getAttributes.disabled}]),style:Nt(s.betweenStyle)},null,6),de("div",{class:Ge([{active:r.fromActive,hover:r.fromHover,disabled:s.fromAttributes.disabled},"thumb left"]),style:Nt(s.fromStyle)},null,6),de("div",{class:Ge([{active:r.toActive,hover:r.toHover,disabled:s.toAttributes.disabled},"thumb right"]),style:Nt(s.toStyle)},null,6)])])])}const _X=Re(cX,[["render",yX],["__scopeId","data-v-e1443606"]]),bX={name:"FieldType",components:{InputErrors:tY,InputHint:sY,BooleanDefinition:lY,DateTimeDefinition:hY,DateDefinition:pY,DecimalDefinition:vY,HtmlDefinition:CY,IntegerDefinition:kY,ListOfValuesDefinition:BY,PlainTextMultiRowDefinition:zY,PlainTextSingleRowDefinition:GY,SequenceNumberDefinition:YY,PasswordDefinition:eX,RadioDefinition:sX,RangeDefinition:lX,DoubleRangeSliderDefinition:_X},props:{modelValue:{default:null},definition:{type:String,required:!0,validator:e=>XK.includes(e)||JK.includes(e)},errors:{type:Array,required:!1,default:()=>[]},hint:{type:String,required:!1,default:null},label:{type:String,required:!1,default:""},attributes:{type:Object,required:!1,default:()=>({})},parameters:{type:Object,required:!1,default:()=>({})},events:{type:Object,default:()=>({})},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{getComponentName(){return`${this.definition}-definition`},getDefinitionVBind(){return{attributes:{...this.attributes,id:this.getId},parameters:this.parameters,events:this.getEvents}},getEvents(){return[Mg,xg,Lg,Og,Pg,$g,Ig,Rg,kg].includes(this.definition)?this.events:void 0},hasErrors(){return Object.keys(this.errors).length},getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},getId(){if(this.attributes.id)return this.attributes.id;const e=this.attributes.name||"id";return this.$debug&&!this.attributes.name&&console.warn('[FieldType] if possible add "name" to attributes parameter'),`${e}_${vT()}`},listeners(){return Object.keys(this.$attrs).reduce((e,t)=>(t.startsWith("on")&&!t.startsWith("onUpdate:")&&this.$attrs[t]instanceof Function&&(e[t]=this.$attrs[t]),e),{})}}},wX={class:"input-wrapper"},SX={key:0,class:"label-wrapper"},TX=["for"],EX={key:0},AX={class:"field-wrapper"};function CX(e,t,n,i,r,s){const o=Ae("input-errors"),u=Ae("input-hint");return oe(),me("div",{class:Ge([[`${n.definition}-definition`,{required:n.attributes.required,"has-errors":s.hasErrors,inline:n.inline}],"field-type"]),"data-flai":""},[de("div",wX,[n.label?(oe(),me("div",SX,[de("label",{for:s.getId},[ri($e(n.label)+" ",1),n.attributes.required?(oe(),me("span",EX,"*")):Be("",!0)],8,TX),Ut(e.$slots,"label-icons")])):Be("",!0),de("div",AX,[(oe(),Ue(Iu(s.getComponentName),Ot({modelValue:s.getValue,"onUpdate:modelValue":t[0]||(t[0]=a=>s.getValue=a)},{...s.getDefinitionVBind,...s.listeners}),null,16,["modelValue"]))])]),s.hasErrors?(oe(),Ue(o,{key:0,errors:n.errors},null,8,["errors"])):Be("",!0),n.hint?(oe(),Ue(u,{key:1,hint:n.hint},null,8,["hint"])):Be("",!0)],2)}const xX=Re(bX,[["render",CX]]),MX="/assets/icons.e9709be1.svg",kX={name:"FlaiIcon",props:{name:{type:String,required:!0},size:{default:"base",type:String,validator:e=>["2xl","xl","lg","base","sm"].includes(e)},type:{type:String,default:"main",validator:e=>["main","white","gray","success","warning","error"].includes(e)}},computed:{getSize(){return{"2xl":"2rem",xl:"1.75rem",lg:"1.5rem",base:"1.25rem",sm:"1rem"}[this.size]||"1.25rem"},url(){return`${MX}#${this.name}`}}},$X=["width","height"],IX=["xlink:href"];function RX(e,t,n,i,r,s){return oe(),me("svg",{width:s.getSize,height:s.getSize,class:Ge(`text-${n.type}`)},[de("use",{"xlink:href":s.url},null,8,IX)],10,$X)}const LX=Re(kX,[["render",RX]]);const OX={name:"Spinner",props:{size:{type:String,default:"base",validator:e=>["6xl","3xl","lg","base","sm","xs"].includes(e)},type:{type:String,default:"main",validator:e=>["main","white","success","warning","error"].includes(e)}},computed:{loaderStyle(){let e={"6xl":6.25,"3xl":2.5,lg:1.25,base:1,sm:.75,xs:.625}[this.size];e=`${e}rem`;let t={"6xl":12,"3xl":8,lg:6,base:4,sm:3,xs:3}[this.size];return t=`${t}px`,{border:`${t} solid var(--${this.type})`,width:e,height:e,"border-top":`${t} solid transparent`}}}},PX={class:"spinner"};function NX(e,t,n,i,r,s){return oe(),me("div",PX,[de("div",{class:"loader",style:Nt(s.loaderStyle)},null,4),Ut(e.$slots,"default",{},void 0,!0)])}const DX=Re(OX,[["render",NX],["__scopeId","data-v-7cdcde08"]]),FX={name:"Notification",props:{modelValue:{type:Boolean,default:!1},icon:{type:String,default:null},type:{type:String,default:"info",validator:e=>["info","success","warning","error"].includes(e)},notification:{type:String,default:null},closable:{type:Boolean,default:!0},htmlContent:{type:String,default:null}},emits:["update:modelValue"],computed:{getIcon(){return this.icon||{success:"check_circle"}[this.type]||this.type}},methods:{close(){this.$emit("update:modelValue",!1)}}},BX={class:"flex-1"},HX=["innerHTML"];function UX(e,t,n,i,r,s){const o=Ae("flai-icon");return n.modelValue?(oe(),me("div",{key:0,class:Ge([n.type,"notification items-center"])},[Ee(o,{name:s.getIcon,size:"xl"},null,8,["name"]),de("span",BX,[n.htmlContent?(oe(),me("div",{key:0,innerHTML:n.htmlContent},null,8,HX)):Ut(e.$slots,"default",{key:1},()=>[ri($e(n.notification),1)])]),n.closable?(oe(),Ue(o,{key:0,name:"close",onClick:s.close},null,8,["onClick"])):Be("",!0)],2)):Be("",!0)}const zX=Re(FX,[["render",UX]]),WX={name:"Panel",props:{dark:{type:Boolean,default:!1},noPadding:{type:Boolean,default:!1},noMargin:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},closed:{type:Boolean,default:!1},self:{type:String,default:"auto",validator:e=>["auto","start","center","end","stretch"].includes(e)},element:{type:String,default:"section"}},computed:{getClasses(){return[`self-${this.self}`,{dark:this.dark,"no-padding":this.noPadding,"no-margin":this.noMargin}]}}};function VX(e,t,n,i,r,s){return oe(),Ue(Iu(n.element),{class:Ge([s.getClasses,"flai-panel"])},{default:pt(()=>[Ut(e.$slots,"default")]),_:3},8,["class"])}const jX=Re(WX,[["render",VX]]),Dg={props:{justify:{type:String,default:"start",validator:e=>["start","center","end","between","around"].includes(e)},content:{type:String,default:"start",validator:e=>["start","center","end","between","around"].includes(e)},flex:{type:String,default:"row",validator:e=>["row","row-reverse","col","col-reverse"].includes(e)},items:{type:String,default:"stretch",validator:e=>["stretch","start","end","center","baseline"].includes(e)},noBorder:{type:Boolean,default:!1}},data(){return{closed:!1}},computed:{justifyClass(){return`justify-${this.justify}`},contentClass(){return`content-${this.content}`},flexClass(){return`flex-${this.flex}`},itemsClass(){return`items-${this.items}`},allClasses(){return[this.justifyClass,this.contentClass,this.flexClass,this.itemsClass]},border(){return this.noBorder||this.closed?"":"border"}},methods:{minimize(){this.closed=!0},maximize(){this.closed=!1}}},GX={name:"PanelHeader",mixins:[Dg],computed:{closable(){return this.$parent.closable},iconClass(){return this.closed?"expand_more":"expand_less"}},mounted(){this.closable&&this.$parent.closed&&this.toggle()},methods:{toggle(){const e=this.closed?"maximize":"minimize";[...this.$parent.$children].filter(t=>["PanelContent","PanelFooter"].includes(t.$options.name)).forEach(t=>{t[e]()}),this[e]()}}};function qX(e,t,n,i,r,s){return oe(),me("header",{class:Ge([[...e.allClasses,e.border,{"justify-between":s.closable}],"flai-panel-header"])},[Ut(e.$slots,"default"),s.closable?(oe(),me("i",{key:0,class:Ge(["ml-4",s.iconClass]),onClick:t[0]||(t[0]=Bt((...o)=>s.toggle&&s.toggle(...o),["prevent"]))},null,2)):Be("",!0)],2)}const KX=Re(GX,[["render",qX]]),YX={name:"PanelContent",mixins:[Dg],props:{flex:{type:String,default:"col",validator:e=>["row","row-reverse","col","col-reverse"].includes(e)},noPadding:{type:Boolean,default:!1},overflow:{type:String,default:"",validator:e=>e?["auto","hidden","visible","scroll"].includes(e):!0},gap:{type:[String,Number],default:null}},computed:{overflowClass(){return this.overflow?`overflow-${this.overflow}`:""},gapClass(){return this.gap??!1?`gap-${this.gap}`:""}}};function XX(e,t,n,i,r,s){return gn((oe(),me("div",{class:Ge([[e.justifyClass,e.flexClass,e.contentClass,s.overflowClass,s.gapClass,{"no-padding":n.noPadding}],"flai-panel-content"])},[Ut(e.$slots,"default")],2)),[[Lu,!e.closed]])}const JX=Re(YX,[["render",XX]]),QX={name:"PanelFooter",mixins:[Dg]};function ZX(e,t,n,i,r,s){return gn((oe(),me("footer",{class:Ge([[...e.allClasses,e.border],"flai-panel-footer"])},[Ut(e.$slots,"default")],2)),[[Lu,!e.closed]])}const eJ=Re(QX,[["render",ZX]]);class tJ{constructor(){this.events={},this.key={A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_ADD:107,NUMPAD_ENTER:108,NUMPAD_SUBTRACT:109,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,COLON:186,EQUALS:187,UNDERSCORE:189,QUESTION_MARK:191,TILDE:192,OPEN_BRACKET:219,BACKWARD_SLASH:220,CLOSED_BRACKET:221,QUOTES:222,LESS_THAN:188,GREATER_THAN:190,BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CONTROL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,HELP:47,NUM_LOCK:144};const t=this;this.keyFunction=n=>{this.keyPressed(n,t)},this.keyReleasedFunction=n=>{this.keyReleased(n,t)},this.keyFunctionFromElement=n=>{this.keyPressed(n,t,!0)},this.keyReleasedFunctionFromElement=n=>{this.keyReleased(n,t,!0)},document.addEventListener("keydown",n=>{this.keyFunction(n)}),document.addEventListener("keyup",n=>{this.keyReleasedFunction(n)})}add(t,n,i,r,s=!1){this.events[t]||(this.events[t]=[]);const o=Xr();return this.events[t].push({id:o,function:n,removeWhenPressed:i,isKeyPressed:!1,element:r,preventOnInputs:s}),r&&(r.addEventListener("keydown",this.keyFunctionFromElement),r.addEventListener("keyup",this.keyReleasedFunctionFromElement)),{index:o,key:t}}remove({key:t,index:n}){const i=(this.events[t]||[]).findIndex(({id:s})=>n===s);if(i<0)return;const{element:r}=this.events[t][i];r&&(r.removeEventListener("keydown",this.keyFunction),r.addEventListener("keyup",this.keyReleasedFunction)),this.events[t].splice(i,1)}keyPressed(t,n,i=!1){if(t.which&&n.events[t.which]){const{function:r,id:s,removeWhenPressed:o,element:u,preventOnInputs:a}=this.events?.[t.which]?.[this.events[t.which].length-1]||{};if(u&&!i||!this.events[t.which][this.events[t.which].length-1]||document.activeElement.tagName.toLowerCase()==="input"&&a)return;t.preventDefault(),t.stopPropagation(),r&&typeof r=="function"&&r(),this.events[t.which][this.events[t.which].length-1].isKeyPressed=!0,o&&this.remove({key:t.which,index:s})}}keyReleased(t,n,i=!1){if(t.which&&n.events[t.which]){const{element:r}=this.events?.[t.which]?.[this.events[t.which].length-1]||{};if(r&&!i)return;t.preventDefault(),t.stopPropagation(),this.events[t.which][this.events[t.which].length-1]&&(this.events[t.which][this.events[t.which].length-1].isKeyPressed=!1)}}}const ya=new tJ,nJ={data(){return{keyLoggersData:[]}},beforeUnmount(){this.__keyPressHandlerRemoveAll()},computed:{__key(){return ya.key}},methods:{__keyPressHandlerAdd(e,t,n=!0,i=void 0,r=!1){const s=ya.add(e,t,n,i,r);this.keyLoggersData.push(s)},__keyPressHandlerRemove(e){this.keyLoggersData.filter(({key:t})=>t===e).forEach(t=>{ya.remove(t)})},__keyPressHandlerRemoveAll(){this.keyLoggersData.forEach(e=>{ya.remove(e)}),this.keyLoggersData=[]},__keyPressed(){return Object.entries(ya.events).reduce((e,[t,n])=>({...e,[t]:n.some(({isKeyPressed:i})=>i)}),{})}}};const iJ={name:"Popover",mixins:[nJ],provide(){return{positionPopover:this.positionPopover,closePopover:this.closePopover}},props:{uid:{type:String,default:""},title:{type:String,default:""},icon:{type:String,default:""},iconEnd:{type:Boolean,default:!1},hideCloseIcon:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},initials:{type:String,default:""},width:{type:Number,default:220},minRequiredHeight:{type:Number,default:100},minHeight:{type:Number,default:void 0},maxHeight:{type:Number,default:void 0},zIndex:{type:Number,default:void 0},position:{type:String,default:"right",validator:e=>["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left","screen"].includes(e)},closable:{type:Boolean,default:!0}},data(){return{is_opened:!1,internal_position:"right",element_to_position_to:null,popover_position:{},arrow_styles:{top:0,left:0},close_styles:{top:0,left:0},alternative_positions:Object.freeze({top:["bottom","top-right","top-left","left","right","bottom-right","bottom-left","screen"],right:["left","top","bottom","screen"],bottom:["top","bottom-right","bottom-left","left","right","top-right","top-left","screen"],left:["right","top","bottom","screen"],"top-right":["top-left","bottom-right","right","bottom-left","left","bottom","screen"],"top-left":["top-right","bottom-left","left","bottom-right","right","bottom","screen"],"bottom-right":["bottom-left","top-right","right","top-left","left","top","screen"],"bottom-left":["bottom-right","top-left","left","top-right","right","top","screen"]})}},computed:{getMinRequiredHeight(){return this.minHeight&&this.minHeight>this.minRequiredHeight?this.minHeight:this.minRequiredHeight},getStyle(){const e=this.internal_position==="screen"?{zIndex:this.zIndex,...this.popover_position}:{width:this.width,minHeight:this.minHeight,maxHeight:this.maxHeight,zIndex:this.zIndex,...this.popover_position};return Object.entries(e).filter(([,t])=>(t??!1)!==!1).reduce((t,[n,i])=>({...t,[n]:["zIndex"].includes(n)?i:`${i}px`}),{})}},methods:{togglePopover(e){this.is_opened?this.closePopover():this.openPopover(e)},openPopover({target:e}={}){this.internal_position=this.position,this.popover_position={},this.element_to_position_to=e||this.$refs.button,this.is_opened=!0,this.closable&&this.__keyPressHandlerAdd(this.__key.ESC,this.closePopover,!0)},closePopover(){this.is_opened=!1,this.element_to_position_to=null},buttonPosition(){const e=this.element_to_position_to.getBoundingClientRect(),t=10;return e.width+100>window.screen.width||e.height+200>window.screen.height?{x:e.left+t,y:e.top+t}:{top:{x:e.left+e.width/2,y:e.top-t},"top-right":{x:e.right+t,y:e.bottom},"top-left":{x:e.left-t,y:e.bottom},right:{x:e.right+t,y:e.top+e.height/2},bottom:{x:e.left+e.width/2,y:e.bottom+t},"bottom-right":{x:e.right+t,y:e.top},"bottom-left":{x:e.left-t,y:e.top},left:{x:e.left-t,y:e.top+e.height/2},screen:{x:0,y:0}}[this.internal_position]},positionPopover(){delete this.popover_position.bottom,this.$nextTick(()=>{const e=this.$refs.portal.getBoundingClientRect(),t={x:e.width/2,y:e.height/2},n=this.internal_position.split("-").map(mT).join(""),i=this.buttonPosition(),r=this[`position${n}`](i,t,e);this.maxHeight&&e.height>=this.maxHeight&&(r.height=this.maxHeight),this.popover_position=r,this.positionArrow(i)})},positionArrow(e){if(this.internal_position==="screen"){this.arrow_styles={};return}this.arrow_styles={top:`${e.y}px`,left:`${e.x}px`,zIndex:this.zIndex+1}},positionTop(e,t,{height:n}){const i=this.getPositivePosition(e.y-n),r=i+n,s={left:this.getPositivePosition(e.x-t.x),top:i};if(r>e.y){if(!this.elementFits(i+e.y))return this.reposition();s.bottom=window.innerHeight-e.y}return s},positionBottom(e,t,{height:n}){const i=e.y,r={left:this.getPositivePosition(e.x-t.x)||this.getPositivePosition(t.x-e.x),top:i};if(i+n>window.innerHeight){if(!this.elementFits(window.innerHeight-i))return this.reposition();r.bottom=0}return r},positionRight(e,t,{width:n,height:i}){if(e.x+n>window.innerWidth)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:e.x,top:r,bottom:window.innerHeight<=r+i?0:void 0}},positionLeft(e,t,{width:n,height:i}){if(e.x-n<0)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:this.getPositivePosition(e.x-n),top:r,bottom:window.innerHeight<=r+i?0:void 0}},positionTopRight(e,t,{height:n,width:i}){if(e.x+i>window.innerWidth)return this.reposition();const r=this.getPositivePosition(e.y-n),s=r+n,o={left:e.x,top:r};if(s>e.y){if(!this.elementFits(r+e.y))return this.reposition();o.bottom=window.innerHeight-e.y}return o},positionTopLeft(e,t,{height:n,width:i}){if(e.x-i<0)return this.reposition();const r=this.getPositivePosition(e.y-n),s=r+n,o={left:this.getPositivePosition(e.x-i),top:r};if(s>e.y){if(!this.elementFits(r+e.y))return this.reposition();o.bottom=window.innerHeight-e.y}return o},positionBottomRight(e,t,{height:n,width:i}){if(e.x+i>window.innerWidth)return this.reposition();const r={left:e.x,top:e.y};if(window.innerHeight<=e.y+n){if(!this.elementFits(window.innerHeight-r.top))return this.reposition();r.bottom=0}return r},positionBottomLeft(e,t,{height:n,width:i}){if(e.x-i<0)return this.reposition();const r={left:this.getPositivePosition(e.x-i),top:e.y};if(window.innerHeight<=e.y+n){if(!this.elementFits(window.innerHeight-r.top))return this.reposition();r.bottom=0}return r},positionScreen(){return{top:0,left:0,right:0,bottom:0}},reposition(){this.$debug&&this.internal_position==="screen"&&console.warn("Trying to reposition screen position.");const e=this.alternative_positions[this.position],t=e.indexOf(this.internal_position);return this.internal_position=e[t+1]||"screen",this.positionPopover(),{}},elementFits(e){return e>=this.getMinRequiredHeight},getPositivePosition(e){return e<0?0:e}}},rJ={class:"flai-popover-wrapper"},sJ={key:2,class:"thumb","data-test":"user_menu"},oJ=["data-position"],aJ={class:"flai-popover-content-wrapper"},lJ={key:0,class:"flai-popover-close"},cJ={class:"flai-popover-content"};function uJ(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("flai-resize-observer"),a=g0("click-outside");return oe(),me("div",rJ,[Ut(e.$slots,"button",Ed(zc({openPopover:s.openPopover,closePopover:s.closePopover,togglePopover:s.togglePopover,isOpened:r.is_opened})),()=>[de("span",{ref:"button",class:Ge([{"flex-row-reverse":n.iconEnd,"btn link p-0":n.icon},"flai-popover-btn"]),onClick:t[0]||(t[0]=Bt(h=>s.togglePopover(),["prevent"]))},[n.icon?(oe(),Ue(o,{key:0,name:n.icon},null,8,["name"])):Be("",!0),n.title?(oe(),me(tt,{key:1},[ri($e(n.title),1)],64)):Be("",!0),n.initials?(oe(),me("div",sJ,$e(n.initials),1)):Be("",!0)],2)],!0),r.is_opened?(oe(),Ue(Ms,{key:0,to:"#root-portal","ignore-parent-node":""},[n.hideArrow?Be("",!0):(oe(),me("span",{key:0,style:Nt(r.arrow_styles),class:Ge([r.internal_position,"flai-popover-arrow"])},null,6)),gn((oe(),me("div",{ref:"portal",style:Nt(s.getStyle),"data-position":r.internal_position,class:Ge([r.internal_position,"flai-popover"])},[de("div",aJ,[n.hideCloseIcon?Be("",!0):(oe(),me("div",lJ,[Ee(o,{name:"close",onClick:s.closePopover},null,8,["onClick"])])),de("div",cJ,[Ee(u,{onResize:s.positionPopover},null,8,["onResize"]),Ut(e.$slots,"default",Ed(zc({closePopover:s.closePopover,positionPopover:s.positionPopover})),void 0,!0)])])],14,oJ)),[[a,s.closePopover]])])):Be("",!0)])}const hJ=Re(iJ,[["render",uJ],["__scopeId","data-v-dff8c8ac"]]),dJ={name:"SortableAddChildListGroup",inject:["sortableId"],props:{itemIndex:{type:Number,required:!0},parentIndexes:{type:Array,default:()=>[]}},methods:{handleDrop(e){try{const t=JSON.parse(e.dataTransfer.getData("text-plain"));this.$store.dispatch("Sortable/createChildListGroup",{sortableId:this.sortableId,itemIndex:this.itemIndex,parentIndexes:this.parentIndexes,draggedItem:t})}catch{this.$store.dispatch("Sortable/cleanDraggingState")}}}};function fJ(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",{class:"sortable-add-child-list-group",onDrop:t[0]||(t[0]=Bt((...u)=>s.handleDrop&&s.handleDrop(...u),["stop","prevent"]))},[Ee(o,{name:"add"})],32)}const pJ=Re(dJ,[["render",fJ]]),gJ={name:"SortableItem",components:{SortableAddChildListGroup:pJ},inject:["sortableId"],props:{itemIndex:{type:Number,required:!0},parentIndexes:{type:Array,default:()=>[]}},computed:{isDraggable(){return this.sortableItem.draggable??!0},entered:{get(){return this.$store.state.Sortable.entered},set(e){this.$store.commit("Sortable/setEntered",e)}},isDroppable(){return this.$store.getters["Sortable/isItemDroppable"](this.sortableId,this.parentIndexes,this.itemIndex)},isBeingDragged(){const{dragging:e}=this.$store.state.Sortable;return e&&e.item_index===this.itemIndex&&e.parent_indexes.join("")===this.parentIndexes.join("")},getComponent(){const e=this.sortableItem.component||this.$store.getters["Sortable/getSortable"](this.sortableId).component;return this.$debug&&!e&&console.warn('[SortableItem] component not defined. Falling back to "div"'),e||"div"},sortableItem(){return this.$store.getters["Sortable/getSortableListItem"](this.sortableId,this.parentIndexes,this.itemIndex)},getClasses(){return{"not-draggable":!this.isDraggable,"not-droppable":!this.isDroppable,"dragging-over":this.isBeingDraggedOver(),dragging:this.isBeingDragged}},draggingPayload(){return{sortable_id:this.sortableId,item_index:this.itemIndex,parent_indexes:[...this.parentIndexes]}},events(){const e={dragover:this.onDragover,dragenter:this.onDragenter,drop:this.onDrop};return this.isDroppable&&(e.dragleave=this.onDragleave),this.isDraggable&&(e.drag=this.onDrag,e.dragstart=this.onDragstart),e}},methods:{isBeingDraggedOver(){return this.$el&&this.entered.some(e=>this.$el.contains(e))},showAddChild(){return this.sortableItem.allow_nesting&&!(this.sortableItem.list||[]).length&&!this.isBeingDragged&&this.isBeingDraggedOver()},displayPlaceholder:DW((e,t)=>{const{pageY:n,pageX:i}=t,{bottom:r,height:s,left:o,right:u,top:a,width:h,x:c,y:l}=e.$el.getBoundingClientRect(),d=a+s/2;e.$store.commit("Sortable/setCoordinates",{pageY:n,pageX:i,middleY:d,bottom:r,height:s,left:o,right:u,top:a,width:h,x:c,y:l})},100),onDrag(e){e.preventDefault(),e.stopPropagation()},onDragenter(e){e.preventDefault(),e.stopPropagation(),this.isDroppable&&this.entered.push(e.target)},onDragleave(e){e.preventDefault(),e.stopPropagation(),this.entered=this.entered.filter(t=>t!==e.target)},onDragover(e){e.preventDefault(),e.stopPropagation(),this.isDroppable&&!this.isBeingDragged&&this.displayPlaceholder(this,e)},onDragstart(e){e.stopPropagation(),this.$store.commit("Sortable/setDragging",this.draggingPayload),e.dataTransfer.setData("text-plain",JSON.stringify(this.draggingPayload))},onDrop(e){if(e.preventDefault(),e.stopPropagation(),this.isBeingDragged||!this.isDroppable){this.$store.dispatch("Sortable/cleanDraggingState");return}try{const t=JSON.parse(e.dataTransfer.getData("text-plain"));this.$store.dispatch("Sortable/reorderItems",{draggedItem:t,droppedOnItem:this.draggingPayload})}catch(t){this.$store.dispatch("Sortable/cleanDraggingState"),this.$errorTracker.captureException(t)}}}},mJ=["draggable"];function vJ(e,t,n,i,r,s){const o=Ae("sortable-add-child-list-group");return oe(),me("div",Ot({draggable:s.isDraggable,class:[s.getClasses,"sortable-item"]},ii(s.events,!0)),[(oe(),Ue(Iu(s.getComponent),Ed(zc(s.sortableItem.props)),null,16)),Ut(e.$slots,"default"),s.showAddChild()?(oe(),Ue(o,{key:0,"item-index":n.itemIndex,"parent-indexes":[...n.parentIndexes]},null,8,["item-index","parent-indexes"])):Be("",!0)],16,mJ)}const yJ=Re(gJ,[["render",vJ]]),_J={name:"SortableList",components:{SortableItem:yJ},inject:["sortableId"],props:{parentIndexes:{type:Array,default:()=>[]}},computed:{sortableListGroup(){return this.$store.getters["Sortable/getSortableListGroup"](this.sortableId,this.parentIndexes)}}},bJ={key:0,class:"sortable-list"};function wJ(e,t,n,i,r,s){const o=Ae("sortable-list",!0),u=Ae("sortable-item");return s.sortableListGroup?(oe(),me("div",bJ,[(oe(!0),me(tt,null,ti(s.sortableListGroup.list,(a,h)=>(oe(),Ue(u,{key:[...n.parentIndexes,h].join("_"),"parent-indexes":n.parentIndexes,"item-index":h},{default:pt(()=>[(a.list||[]).length?(oe(),Ue(o,{key:0,"parent-indexes":[...n.parentIndexes,h]},null,8,["parent-indexes"])):Be("",!0)]),_:2},1032,["parent-indexes","item-index"]))),128))])):Be("",!0)}const SJ=Re(_J,[["render",wJ]]),TJ={name:"SortableIcon",inject:["sortableId"],computed:{coordinates(){return this.$store.state.Sortable.coordinates},canDisplay(){return!!Object.keys(this.coordinates||{}).length},getPosition(){const{clientWidth:e,clientHeight:t}=document.body,n={right:`${e-this.coordinates.x}px`};return this.coordinates.pageY<=this.coordinates.middleY?n.top=`${this.coordinates.y}px`:n.bottom=`${t-this.coordinates.bottom}px`,n}}};function EJ(e,t,n,i,r,s){const o=Ae("flai-icon");return s.canDisplay?(oe(),Ue(Ms,{key:0,to:"#root-portal","ignore-parent-node":""},[Ee(o,{style:Nt(s.getPosition),name:"arrow_right",class:"sortable-icon"},null,8,["style"])])):Be("",!0)}const AJ=Re(TJ,[["render",EJ]]),CJ={name:"Sortable",components:{SortableList:SJ,SortableIcon:AJ},provide(){return{sortableId:this.sortableId}},props:{sortableId:{type:String,required:!0},sortable:{type:Object,default:()=>({})}},computed:{getSortable(){return this.$store.getters["Sortable/getSortable"](this.sortableId)},isEmpty(){return this.getSortable&&!this.getSortable.list.length}},created(){this.getSortable||this.$store.commit("Sortable/addSortable",{sortableId:this.sortableId,sortable:this.sortable})},beforeUnmount(){this.$store.commit("Sortable/removeSortable",this.sortableId)}},xJ={class:"sortable-wrapper"};function MJ(e,t,n,i,r,s){const o=Ae("sortable-list"),u=Ae("sortable-icon");return oe(),me("div",xJ,[Ee(o),Ee(u)])}const kJ=Re(CJ,[["render",MJ]]),$J={name:"Tooltip",provide(){return{closeTooltip:this.closeTooltip}},props:{icon:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},width:{type:Number,default:void 0},position:{type:String,default:"top",validator:e=>["top","right","bottom","left"].includes(e)},delayDisplayFor:{type:Number,default:0}},data(){return{is_opened:!1,internal_position:"right",tooltip_position:{},arrow_styles:{top:0,left:0},alternative_positions:Object.freeze({top:["bottom","left","right"],right:["left","top","bottom"],bottom:["top","left","right"],left:["right","top","bottom"]}),timeout:null}},computed:{getStyle(){const e={...this.tooltip_position};return this.width&&(e.width=this.width),Object.entries(e).filter(([,t])=>(t??!1)!==!1).reduce((t,[n,i])=>({...t,[n]:`${i}px`}),{})}},mounted(){this.$debug&&!this.icon&&!this.title&&!(this.$slots.title||[]).length&&console.warn("[Tooltip] provide icon or title prop.")},methods:{openTooltip(){this.timeout=setTimeout(()=>{this.internal_position=this.position,this.tooltip_position={},this.is_opened=!0,this.positionTooltip(),clearTimeout(this.timeout)},this.delayDisplayFor)},closeTooltip(){this.tooltip_position={},this.is_opened=!1,this.timeout&&clearTimeout(this.timeout)},titlePosition(){const e=this.$el.getBoundingClientRect(),t=10;return{top:{x:e.left+e.width/2,y:e.top-t},right:{x:e.right+t,y:e.top+e.height/2},bottom:{x:e.left+e.width/2,y:e.bottom+t},left:{x:e.left-t,y:e.top+e.height/2}}[this.internal_position]},positionTooltip(){delete this.tooltip_position.bottom,this.$nextTick(()=>{const e=this.$refs.portal.getBoundingClientRect(),t={x:e.width/2,y:e.height/2},n=mT(this.internal_position),i=this.titlePosition(),r=this[`position${n}`](i,t,e);this.tooltip_position=r,this.positionArrow(i)})},positionArrow(e){this.arrow_styles={top:`${e.y}px`,left:`${e.x}px`}},positionTop(e,t,{height:n}){const i=this.getPositivePosition(e.y-n);return i+n>e.y?this.reposition():{left:this.getPositivePosition(e.x-t.x),top:i}},positionBottom(e,t,{height:n}){const i=e.y;return i+n>window.innerHeight?this.reposition():{left:this.getPositivePosition(e.x-t.x),top:i}},positionRight(e,t,{width:n,height:i}){if(e.x+n>window.innerWidth)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:e.x,top:r,bottom:window.innerHeight<=r+i?0:void 0}},positionLeft(e,t,{width:n,height:i}){if(e.x-n<0)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:this.getPositivePosition(e.x-n),top:r,bottom:window.innerHeight<=r+i?0:void 0}},reposition(){const e=this.alternative_positions[this.position],t=e.indexOf(this.internal_position);return this.internal_position=e[t+1]||e[0],this.positionTooltip(),{}},getPositivePosition(e){return e<0?0:e}}},IJ=["data-position"],RJ={class:"flai-tooltip-content"};function LJ(e,t,n,i,r,s){const o=Ae("flai-icon"),u=g0("click-outside");return oe(),me("span",{class:"flai-tooltip-title",onMouseenter:t[0]||(t[0]=(...a)=>s.openTooltip&&s.openTooltip(...a)),onMouseleave:t[1]||(t[1]=(...a)=>s.closeTooltip&&s.closeTooltip(...a))},[n.icon?(oe(),Ue(o,{key:0,name:n.icon,class:Ge({"mr-1":n.title})},null,8,["name","class"])):Be("",!0),n.title?(oe(),me(tt,{key:1},[ri($e(n.title),1)],64)):Be("",!0),Ut(e.$slots,"title"),r.is_opened?(oe(),Ue(Ms,{key:2,to:"#root-portal","ignore-parent-node":""},[de("span",{style:Nt(r.arrow_styles),class:Ge([r.internal_position,"flai-tooltip-arrow"])},null,6),gn((oe(),me("div",{ref:"portal",style:Nt(s.getStyle),"data-position":r.internal_position,class:Ge([r.internal_position,"flai-tooltip"])},[de("div",RJ,[Ut(e.$slots,"default",{},()=>[ri($e(n.content),1)])])],14,IJ)),[[u,s.closeTooltip]])])):Be("",!0)],32)}const OJ=Re($J,[["render",LJ]]),PJ={name:"ResizeObserver",emits:["resize"],data(){return{observer:null}},mounted(){this.$nextTick(()=>{this.observer=new ResizeObserver(([e])=>{this.$emit("resize",{width:e.contentRect.width,height:e.contentRect.height})}),this.observer.observe(this.$el)})},beforeUnmount(){this.observer.disconnect()}},NJ={class:"resize-observer"};function DJ(e,t,n,i,r,s){return oe(),me("div",NJ)}const FJ=Re(PJ,[["render",DJ]]);const BJ={data(){return{expanded:!1,slotItems:0}},computed:{style(){return this.expanded?`width: ${(this.slotItems+1)*34}px`:""}},mounted(){this.slotItems=this.$refs["button-wrapper"].children.length}},HJ={ref:"button-wrapper",class:"d-flex"};function UJ(e,t,n,i,r,s){const o=Ae("flai-icon");return oe(),me("div",{class:Ge([{expanded:r.expanded},"more-vertical"]),style:Nt(s.style),onMouseleave:t[1]||(t[1]=u=>r.expanded=!1)},[gn(de("div",HJ,[Ut(e.$slots,"default",{},void 0,!0)],512),[[Lu,r.expanded]]),de("button",{class:"btn link sm show-more gray",onMouseover:t[0]||(t[0]=u=>r.expanded=!0)},[Ee(o,{name:"more_vert"})],32)],38)}const zJ=Re(BJ,[["render",UJ],["__scopeId","data-v-18a09c01"]]);const WJ={name:"Details",props:{title:{type:String,required:!0},startOpen:{type:Boolean,default:!1},forceOpen:{type:Boolean,default:!1},hideSummary:{type:Boolean,default:!1}},data(){return{open:this.startOpen,animation:null,isClosing:null,isExpanding:null,preForceState:null,forceOpenState:this.forceOpen}},watch:{forceOpen(e){e?(this.preForceState=this.$refs.details.open,this.open=!0):this.open=this.preForceState}},methods:{toggle(){this.$refs.details.style.overflow="hidden",this.isClosing||!this.open?this.expand():this.shrink()},expand(){this.$refs.details.style.height=`${this.$refs.details.offsetHeight}px`,this.open=!0,window.requestAnimationFrame(()=>{this.isExpanding=!0;const e=`${this.$refs.details.offsetHeight}px`,t=`${this.$refs.summary.offsetHeight+this.$refs.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.$refs.details.animate({height:[e,t]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.resetState(!0),this.animation.oncancel=()=>{this.isExpanding=!0}})},shrink(){this.isClosing=!0;const e=`${this.$refs.details.offsetHeight}px`,t=`${this.$refs.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.$refs.details.animate({height:[e,t]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.resetState(!1),this.animation.oncancel=()=>{this.isClosing=!1}},resetState(e){this.open=e,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.$refs.details.style.height="",this.$refs.details.style.overflow=""}}},VJ=["open"],jJ={class:"m-0"},GJ={ref:"content",class:"content"};function qJ(e,t,n,i,r,s){return oe(),me("details",{ref:"details",open:r.open},[de("summary",{ref:"summary",class:Ge([{hidden:n.hideSummary},"rounded"]),onClick:t[0]||(t[0]=Bt((...o)=>s.toggle&&s.toggle(...o),["prevent"]))},[Ut(e.$slots,"title",{},()=>[de("h3",jJ,$e(n.title),1)],!0)],2),de("div",GJ,[Ut(e.$slots,"default",{},void 0,!0)],512)],8,VJ)}const KJ=Re(WJ,[["render",qJ],["__scopeId","data-v-a1bc23a1"]]),YJ={name:"ProgressBar",props:{progress:{type:[Number,Array],required:!0},showLabel:{type:Boolean,default:!0},label:{type:String,default:null},title:{type:String,default:""},height:{type:Number,default:null}},computed:{hasCustomColors(){return Array.isArray(this.progress)},progressStyle(){return{width:`${this.progress}%`,height:this.height?`${this.height}px`:""}},labelText(){return this.label?this.label:`${this.progress}%`}},methods:{getProgressItemStyle(e){return{backgroundColor:e.color,width:`${e.percentage}%`,height:this.height?`${this.height}px`:""}}}},XJ={class:"progress-bar"},JJ=["title"],QJ={key:0,class:"progress-bar-label"},ZJ={key:0,class:"progress-bar-label"},eQ=["title"];function tQ(e,t,n,i,r,s){return oe(),me("div",XJ,[s.hasCustomColors?(oe(!0),me(tt,{key:0},ti(n.progress,o=>(oe(),me("div",{key:o.color,class:"progress-bar-fill",style:Nt(s.getProgressItemStyle(o)),title:o.title},[o.label?(oe(),me("span",QJ,$e(o.label),1)):Be("",!0)],12,JJ))),128)):(oe(),me(tt,{key:1},[n.showLabel?(oe(),me("span",ZJ,$e(s.labelText),1)):Be("",!0),de("div",{class:"progress-bar-fill",style:Nt(s.progressStyle),title:n.title},null,12,eQ)],64))])}const nQ=Re(YJ,[["render",tQ]]);const iQ={name:"Breadcrumbs",props:{breadcrumbs:{type:Array,required:!0}}},rQ={class:"d-flex mb-4"},sQ={key:0,class:"mx-1 text-gray"};function oQ(e,t,n,i,r,s){const o=Ae("router-link");return oe(),me("div",rQ,[(oe(!0),me(tt,null,ti(n.breadcrumbs,(u,a)=>(oe(),me("div",{key:u.text,class:"d-flex items-center"},[Ee(o,{to:u.to},{default:pt(()=>[ri($e(u.text),1)]),_:2},1032,["to"]),a!==n.breadcrumbs.length-1?(oe(),me("span",sQ," > ")):Be("",!0)]))),128))])}const aQ=Re(iQ,[["render",oQ],["__scopeId","data-v-2e4c6ee8"]]),lQ={name:"CopyButton",props:{tooltip:{type:String,required:!0},dataToCopy:{type:String,required:!0}},data(){return{copySuccessful:!1}},methods:{copy(){navigator.clipboard.writeText(this.dataToCopy),this.copySuccessful=!0,setTimeout(()=>{this.copySuccessful=!1},1e3)}}},cQ=["disabled"];function uQ(e,t,n,i,r,s){const o=Ae("flai-icon"),u=Ae("flai-tooltip");return oe(),Ue(u,{content:n.tooltip,"delay-display-for":500},{title:pt(()=>[de("button",{class:"btn sm secondary",disabled:r.copySuccessful,onClick:t[0]||(t[0]=Bt((...a)=>s.copy&&s.copy(...a),["stop","prevent"]))},[r.copySuccessful?(oe(),Ue(o,{key:0,name:"check_circle"})):(oe(),Ue(o,{key:1,name:"file_copy"}))],8,cQ)]),_:1},8,["content"])}const hQ=Re(lQ,[["render",uQ]]),dQ="/assets/FLAI-robot.7f6ad07c.png";const fQ={name:"404Page",props:{status:{type:String,default:"404"},title:{type:String,default:""},message:{type:String,default:""},addMargin:{type:Boolean,default:!1}}},pQ={key:0},gQ={key:1},mQ={key:0},vQ={key:1},yQ={class:"d-flex flex-col items-center"},_Q={class:"bubble d-flex justify-center items-center"};function bQ(e,t,n,i,r,s){const o=Ae("router-link");return oe(),me("div",{class:Ge(["d-flex flex-col ml-5",{"m-5":n.addMargin}])},[Ut(e.$slots,"title",{},()=>[n.title?(oe(),me("h1",pQ,$e(n.title),1)):(oe(),me("h1",gQ,$e(e.$t("Page does not exist")),1))],!0),Ut(e.$slots,"message",{},()=>[n.message?(oe(),me("div",mQ,$e(n.message),1)):(oe(),me("div",vQ,[Ee(o,{to:{name:"pages",params:{tool:"pages:dashboard"}}},{default:pt(()=>[ri($e(e.$t("Return to dashboard")),1)]),_:1})]))],!0),de("div",yQ,[de("div",null,[de("div",_Q," Oh no, "+$e(n.status)+"! ",1),t[0]||(t[0]=de("div",{class:"pointer"},null,-1))]),t[1]||(t[1]=de("img",{class:"robot",src:dQ,alt:"Flai robot"},null,-1))])],2)}const EE=Re(fQ,[["render",bQ],["__scopeId","data-v-23b1200c"]]),wQ=Object.freeze(Object.defineProperty({__proto__:null,default:EE},Symbol.toStringTag,{value:"Module"})),SQ=e=>{e.component("FlaiFieldType",xX),e.component("FlaiIcon",LX),e.component("FlaiSpinner",DX),e.component("FlaiNotification",zX),e.component("FlaiPanel",jX),e.component("FlaiPanelHeader",KX),e.component("FlaiPanelContent",JX),e.component("FlaiPanelFooter",eJ),e.component("FlaiPopover",hJ),e.component("FlaiTooltip",OJ),e.component("FlaiSortable",kJ),e.component("FlaiResizeObserver",FJ),e.component("FlaiExpandableVertButtons",zJ),e.component("FlaiDetails",KJ),e.component("FlaiProgressBar",nQ),e.component("FlaiNotFoundPage",EE),e.component("FlaiBreadcrumbs",aQ),e.component("FlaiCopyButton",hQ)},TQ={beforeMount(e,t){let n=!1;e.onclick=i=>{i.stopImmediatePropagation(),n?n=!n:(n=!n,setTimeout(()=>{requestAnimationFrame(()=>{e.click(i,!0)})},0))},e.event=i=>{document.querySelector(".flatpickr-calendar.open")||document.querySelector(".flai-modal")||i.target.classList.contains("modal-button")||e!==i.target&&!e.contains(i.target)&&t.value(i)},setTimeout(()=>{document.body.addEventListener("click",e.event),document.body.addEventListener("drag",e.event)},0)},unmounted(e){document.body.removeEventListener("click",e.event),document.body.removeEventListener("drag",e.event)}},EQ=e=>{e.directive("click-outside",TQ)};"serviceWorker"in navigator&&(window.setTimeout(()=>{navigator.serviceWorker.controller||window.location.reload()},200),navigator.serviceWorker.register("/service-worker.js").then(e=>e).catch(e=>{console.info("ServiceWorker registration failed: ",e)}),navigator.serviceWorker.addEventListener("message",e=>{e.data==="getUserData"&&window.location.reload()}));const pr=zd(hK);pK(pr);WK(pr);SQ(pr);EQ(pr);pr.use(Or);pr.use(Wn);pr.use(Tt);window.ENV_VARS.ENVIRONMENT!=="local"&&xF({app:pr,dsn:"https://456fdc950a7af1f6e836f5f23b39dc1e@o4506621088694272.ingest.sentry.io/4506621091250176",integrations:[new WO({tracePropagationTargets:[/^https:\/\/api\.flai\.ai/]}),new Ju({maskAllText:!1,blockAllMedia:!1})],tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,environment:window.ENV_VARS.ENVIRONMENT});pr.mount("#app");export{ps as $,Q as A,cn as B,Ut as C,Ot as D,rg as E,tt as F,eE as G,Wn as H,Ic as I,w1 as J,Lu as K,ze as L,nJ as M,OZ as N,jo as O,Ib as P,LQ as Q,Pc as R,OQ as S,d7 as T,zx as U,CQ as V,Rb as W,px as X,PQ as Y,Qf as Z,Re as _,Ee as a,mZ as a$,vs as a0,Ht as a1,ei as a2,Fx as a3,AQ as a4,qx as a5,Xb as a6,Kb as a7,Dx as a8,MQ as a9,sr as aA,EZ as aB,Rt as aC,WM as aD,oZ as aE,zM as aF,KQ as aG,fZ as aH,kn as aI,ks as aJ,XQ as aK,JQ as aL,eZ as aM,QQ as aN,YQ as aO,ZQ as aP,bZ as aQ,pn as aR,np as aS,zc as aT,ml as aU,qo as aV,lZ as aW,WQ as aX,GQ as aY,jQ as aZ,VQ as a_,xu as aa,xQ as ab,it as ac,RQ as ad,IQ as ae,$Q as af,kQ as ag,Nr as ah,Mn as ai,bu as aj,Ed as ak,mc as al,lM as am,a0 as an,jt as ao,AZ as ap,DQ as aq,_Z as ar,qQ as as,bo as at,hZ as au,Ms as av,Fr as aw,NQ as ax,mi as ay,Go as az,de as b,Uk as b$,jn as b0,gk as b1,gZ as b2,_s as b3,rZ as b4,sZ as b5,Wr as b6,yM as b7,rp as b8,op as b9,UQ as bA,uZ as bB,GM as bC,nZ as bD,zQ as bE,o0 as bF,mk as bG,yZ as bH,cZ as bI,qM as bJ,KM as bK,aZ as bL,tZ as bM,vZ as bN,HQ as bO,CZ as bP,IZ as bQ,gp as bR,zd as bS,t$ as bT,Bk as bU,MZ as bV,RZ as bW,LZ as bX,e$ as bY,$Z as bZ,xZ as b_,wM as ba,_M as bb,AM as bc,dl as bd,EM as be,TM as bf,SM as bg,$u as bh,sp as bi,BQ as bj,yc as bk,FQ as bl,Md as bm,pZ as bn,g0 as bo,Iu as bp,TZ as bq,qa as br,$m as bs,wZ as bt,Vr as bu,jM as bv,SZ as bw,ii as bx,dZ as by,iZ as bz,me as c,kZ as c0,yp as c1,vp as c2,Yk as c3,Bi as c4,PZ as c5,HZ as c6,F7 as c7,Xr as c8,DW as c9,Dn as ca,BZ as cb,Y6 as cc,UZ as cd,Ky as ce,gd as cf,ft as cg,FZ as ch,zZ as ci,KZ as cj,VZ as ck,jZ as cl,XT as cm,GZ as cn,qZ as co,LX as cp,ri as d,Ue as e,Be as f,no as g,Bt as h,nE as i,Tt as j,DZ as k,li as l,Pi as m,WZ as n,oe as o,gn as p,ht as q,Ae as r,ti as s,$e as t,NZ as u,mp as v,pt as w,Ge as x,Nt as y,mu as z};
