@highstate/designer 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{Bgu2i7Bx.js → B3Ns2-bM.js} +1 -1
- package/.output/public/_nuxt/{BAygY6DR.js → DToExo9V.js} +1 -1
- package/.output/public/_nuxt/{BZTNJqjC.js → TC7QuZux.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/72747d94-8be2-403f-a1ba-dbd7fc7e2594.json +1 -0
- package/.output/public/_nuxt/{5oocCSgE.js → u3nCRAjk.js} +3 -3
- package/.output/server/index.mjs +45 -45
- package/.output/server/package.json +1 -1
- package/package.json +4 -4
- package/.output/public/_nuxt/builds/meta/866a6565-ae81-461a-8e84-e6848450930d.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./B3Ns2-bM.js","./DToExo9V.js","./error-404.BJkSn6RI.css","./TC7QuZux.js","./error-500.TOCKLquH.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var RQ=Object.defineProperty;var AQ=(t,e,n)=>e in t?RQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var bt=(t,e,n)=>AQ(t,typeof e!="symbol"?e+"":e,n);/**
|
|
3
3
|
* @vue/shared v3.5.13
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -48,7 +48,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
48
48
|
* @version 1.3.11
|
|
49
49
|
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
50
50
|
*/const Z_e=t=>t?Object.entries(t).reduce((e,[n,i])=>(n=n.charAt(0).toUpperCase()+n.slice(1),n=`on${n}`,{...e,[n]:i}),{}):{};function VL(t,e={},n){const{props:i,domProps:r,on:s,...a}=e,o=s?Z_e(s):{};return Bt(t,{...a,...i,...r,...o},n)}const J_e=t=>typeof t=="function"?t():t;var eme=Ke({name:"CodeMirror",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,default:""},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:()=>{}},lang:{type:Object,default:()=>{}},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:()=>{}},tag:{type:String,default:"div"}},emits:{"update:modelValue":(t="")=>!0,update:t=>!0,ready:t=>!0,focus:t=>!0,change:t=>!0,destroy:()=>!0},setup(t,e){const n=ve(),i=ve(t.modelValue),r=ut(new We),s=te({get:()=>r.value.hasFocus,set:x=>{x&&r.value.focus()}}),a=te({get:()=>r.value.state.selection,set:x=>r.value.dispatch({selection:x})}),o=te({get:()=>r.value.state.selection.main.head,set:x=>r.value.dispatch({selection:{anchor:x}})}),l=te({get:()=>r.value.state.toJSON(),set:x=>r.value.setState(Yt.fromJSON(x))}),u=ve(0),c=ve(0),d=te(()=>{const x=new Id,O=new Id;if(t.basic&&t.minimal)throw"[Vue CodeMirror] Both basic and minimal cannot be specified.";return[t.basic&&!t.minimal?Q_e:void 0,t.minimal&&!t.basic?X_e:void 0,We.updateListener.of(D=>{var L;e.emit("focus",r.value.hasFocus),u.value=(L=r.value.state.doc)==null?void 0:L.length,!(D.changes.empty||!D.docChanged)&&(t.linter&&(t.forceLinting&&OL(r.value),c.value=t.linter(r.value).length),e.emit("update",D))}),We.theme(t.theme,{dark:t.dark}),t.wrap?We.lineWrapping:void 0,t.tab?Bp.of([gpe]):void 0,t.indentUnit?db.of(t.indentUnit):void 0,Yt.allowMultipleSelections.of(t.allowMultipleSelections),t.tabSize?O.of(Yt.tabSize.of(t.tabSize)):void 0,t.phrases?Yt.phrases.of(t.phrases):void 0,Yt.readOnly.of(t.readonly),We.editable.of(!t.disabled),t.lineSeparator?Yt.lineSeparator.of(t.lineSeparator):void 0,t.lang?x.of(t.lang):void 0,t.linter?Rpe(t.linter,t.linterConfig):void 0,t.linter&&t.gutter?Lpe(t.gutterConfig):void 0,t.placeholder?Ide(t.placeholder):void 0,...t.extensions].filter(D=>!!D)});Ie(d,x=>{var O;(O=r.value)==null||O.dispatch({effects:Mt.reconfigure.of(x)})},{immediate:!0}),Ie(()=>t.modelValue,async x=>{if(r.value.composing||r.value.state.doc.toJSON().join(t.lineSeparator??`
|
|
51
|
-
`)===x)return;const O=!r.value.state.selection.ranges.every(D=>D.anchor<x.length&&D.head<x.length);r.value.dispatch({changes:{from:0,to:r.value.state.doc.length,insert:x},selection:O?{anchor:0,head:0}:r.value.state.selection,scrollIntoView:!0})},{immediate:!0}),Jn(async()=>{let x=i.value;n.value&&(n.value.childNodes[0]&&(i.value!==""&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),x=n.value.childNodes[0].innerText.trim()),r.value=new We({parent:n.value,state:Yt.create({doc:x,extensions:d.value}),dispatch:O=>{r.value.update([O]),!(O.changes.empty||!O.docChanged)&&(e.emit("update:modelValue",O.state.doc.toString()??""),e.emit("change",O.state))}}),await $t(),e.emit("ready",{view:r.value,state:r.value.state,container:n.value}))}),$a(()=>{r.value.destroy(),e.emit("destroy")});const h=()=>{!t.linter||!r.value||(t.forceLinting&&OL(r.value),c.value=Spe(r.value.state))},f=()=>{var x,O;(x=r.value)==null||x.dispatch({effects:Mt.reconfigure.of([])}),(O=r.value)==null||O.dispatch({effects:Mt.appendConfig.of(d.value)})},S=(x,O)=>r.value.state.sliceDoc(x,O),_=x=>r.value.state.doc.line(x+1).text,p=()=>r.value.state.doc.lines,v=()=>r.value.state.selection.main.head,m=()=>{let x;return(x=r.value.state.selection.ranges)!==null&&x!==void 0?x:[]},g=()=>{let x;return(x=r.value.state.sliceDoc(r.value.state.selection.main.from,r.value.state.selection.main.to))!==null&&x!==void 0?x:""},b=()=>{const x=r.value.state;return x?x.selection.ranges.map(O=>x.sliceDoc(O.from,O.to)):[]},y=()=>r.value.state.selection.ranges.some(x=>!x.empty),E=(x,O,D)=>r.value.dispatch({changes:{from:O,to:D,insert:x}}),T=x=>r.value.dispatch(r.value.state.replaceSelection(x)),C=x=>r.value.dispatch({selection:{anchor:x}}),w=(x,O)=>r.value.dispatch({selection:{anchor:x,head:O}}),R=(x,O)=>r.value.dispatch({selection:Oe.create(x,O)}),I=x=>r.value.dispatch({selection:Oe.create(a.value.ranges.map(O=>O.extend(x(O))))}),A={editor:n,view:r,cursor:o,selection:a,focus:s,length:u,json:l,diagnosticCount:c,dom:r.value.contentDOM,lint:h,forceReconfigure:f,getRange:S,getLine:_,lineCount:p,getCursor:v,listSelections:m,getSelection:g,getSelections:b,somethingSelected:y,replaceRange:E,replaceSelection:T,setCursor:C,setSelection:w,setSelections:R,extendSelectionsBy:I};return e.expose(A),A},render(){return VL(this.$props.tag,{ref:"editor",class:"vue-codemirror"},this.$slots.default?VL("aside",{style:"display: none;","aria-hidden":"true"},J_e(this.$slots.default)):void 0)}}),zL={};class zv{constructor(e,n,i,r,s,a,o,l,u,c=0,d){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=o,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new zv(e,[],n,i,i,0,[],0,r?new qL(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let o=s.dynamicPrecedence(r);if(o&&(this.score+=o),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(r,this.reducePos);return}let l=this.stack.length-(i-1)*3-(e&262144?6:0),u=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-u;c>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=c));let d=l?this.stack[l-1]:0,h=this.bufferBase+this.buffer.length-d;if(r<s.minRepeatTerm||e&131072){let f=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,u,f,h+4,!0)}if(e&262144)this.state=this.stack[l];else{let f=this.stack[l-3];this.state=s.getGoto(f,r,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(r,u)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,o=this.buffer.length;if(o==0&&a.parent&&(o=a.bufferBase-a.parent.bufferBase,a=a.parent),o>0&&a.buffer[o-4]==0&&a.buffer[o-1]>-1){if(n==i)return;if(a.buffer[o-2]>=n){a.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let o=!1;for(let l=a;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){o=!0;break}if(o)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;(r>this.pos||n<=a.maxNode)&&(this.pos=r,a.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new zv(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new tme(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;s<n.length;s+=2)(a=n[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&r.push(n[s],a);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let a=n[s+1];r.some((o,l)=>l&1&&o==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[r],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,u=this.stack.length-o*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return o<<19|65536|l}}else{let o=i(a,s+1);if(o!=null)return o}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new qL(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class qL{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class tme{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class qv{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new qv(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new qv(this.stack,this.pos,this.index)}}function K_(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let a=t.charCodeAt(i++),o=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class Sg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const YL=new Sg;class nme{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=YL,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let a=this.ranges[--r];s-=i.from-a.to,i=a}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,o=this.range;for(;o.to<=i;)o=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>o.to&&(this.chunk2=this.chunk2.slice(0,o.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=YL,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class md{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;ime(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}md.prototype.contextual=md.prototype.fallback=md.prototype.extend=!1;md.prototype.fallback=md.prototype.extend=!1;function ime(t,e,n,i,r,s){let a=0,o=1<<i,{dialect:l}=n.p.parser;e:for(;(o&t[a])!=0;){let u=t[a+1];for(let f=a+3;f<u;f+=2)if((t[f+1]&o)>0){let S=t[f];if(l.allows(S)&&(e.token.value==-1||e.token.value==S||rme(S,e.token.value,r,s))){e.acceptToken(S);break}}let c=e.next,d=0,h=t[a+2];if(e.next<0&&h>d&&t[u+h*3-3]==65535){a=t[u+h*3-1];continue e}for(;d<h;){let f=d+h>>1,S=u+f+(f<<1),_=t[S],p=t[S+1]||65536;if(c<_)h=f;else if(c>=p)d=f+1;else{a=t[S+2],e.advance();continue e}}break}}function WL(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function rme(t,e,n,i){let r=WL(n,i,e);return r<0||WL(n,i,t)<r}const Jr=typeof process<"u"&&zL&&/\bparse\b/.test(zL.LOG);let oy=null;function KL(t,e,n){let i=t.cursor(Fi.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class sme{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?KL(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?KL(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],a=this.start[n]+i.positions[r];if(a>e)return this.nextStart=a,null;if(s instanceof Ei){if(a==e){if(a<this.safeFrom)return null;let o=a+s.length;if(o<=this.safeTo){let l=s.prop(Kt.lookAhead);if(!l||o+l<this.fragment.to)return s}}this.index[n]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}}class ome{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Sg)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<s.length;u++){if((1<<u&a)==0)continue;let c=s[u],d=this.tokens[u];if(!(i&&!c.fallback)&&((c.contextual||d.start!=e.pos||d.mask!=a||d.context!=o)&&(this.updateCachedToken(d,c,e),d.mask=a,d.context=o),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let h=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(i=d,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new Sg,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Sg,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let o=s.specializers[a](this.stream.read(e.start,e.end),i);if(o>=0&&i.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:a}=e.p,{data:o}=a;for(let l=0;l<2;l++)for(let u=a.stateSlot(s,l?2:1);;u+=3){if(o[u]==65535)if(o[u+1]==1)u=ga(o,u+2);else{r==0&&o[u+1]==2&&(r=this.putAction(ga(o,u+2),n,i,r));break}o[u]==n&&(r=this.putAction(ga(o,u+1),n,i,r))}return r}}class ame{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new nme(n,r),this.tokens=new ome(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[zv.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new sme(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>n)i.push(o);else{if(this.advanceStack(o,i,e))continue;{r||(r=[],s=[]),r.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!i.length){let a=r&&cme(r);if(a)return Jr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Jr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return Jr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((o,l)=>l.score-o.score);i.length>a;)i.pop();i.some(o=>o.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let o=i[a];for(let l=a+1;l<i.length;l++){let u=i[l];if(o.sameState(u)||o.buffer.length>500&&u.buffer.length>500)if((o.score-u.score||o.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(a--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,a=Jr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(r);d;){let h=this.parser.nodeSet.types[d.type.id]==d.type?s.getGoto(e.state,d.type.id):-1;if(h>-1&&d.length&&(!u||(d.prop(Kt.contextHash)||0)==c))return e.useNode(d,h),Jr&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(d.type.id)})`),!0;if(!(d instanceof Ei)||d.children.length==0||d.positions[0]>0)break;let f=d.children[0];if(f instanceof Ei&&d.positions[0]==0)d=f;else break}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),Jr&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],d=l[u++],h=l[u++],f=u==l.length||!i,S=f?e:e.split(),_=this.tokens.mainToken;if(S.apply(c,d,_?_.start:S.pos,h),Jr&&console.log(a+this.stackID(S)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(d)} @ ${r}${S==e?"":", split"})`),f)return!0;S.pos>r?n.push(S):i.push(S)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return jL(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let a=0;a<e.length;a++){let o=e[a],l=n[a<<1],u=n[(a<<1)+1],c=Jr?this.stackID(o)+" -> ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),Jr&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let d=o.split(),h=c;for(let f=0;d.forceReduce()&&f<10&&(Jr&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)Jr&&(h=this.stackID(d)+" -> ");for(let f of o.recoverByInsert(l))Jr&&console.log(c+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,i);this.stream.end>o.pos?(u==o.pos&&(u++,l=0),o.recoverByDelete(l,u),Jr&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),jL(o,i)):(!r||r.score<o.score)&&(r=o)}return r}stackToTree(e){return e.close(),Ei.build({buffer:qv.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(oy||(oy=new WeakMap)).get(e);return n||oy.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function jL(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class lme{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}class Yv extends GW{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let o=0;o<e.repeatNodeCount;o++)n.push("");let i=Object.keys(e.topRules).map(o=>e.topRules[o][1]),r=[];for(let o=0;o<n.length;o++)r.push([]);function s(o,l,u){r[o].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let o of e.nodeProps){let l=o[0];typeof l=="string"&&(l=Kt[l]);for(let u=1;u<o.length;){let c=o[u++];if(c>=0)s(c,l,o[u++]);else{let d=o[u+-c];for(let h=-c;h>0;h--)s(o[u++],l,d);u++}}}this.nodeSet=new lx(n.map((o,l)=>Kr.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=BW;let a=K_(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(QL),this.states=K_(e.states,Uint32Array),this.data=K_(e.stateData),this.goto=K_(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(o=>typeof o=="number"?new md(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new ame(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],o=a&1,l=r[s++];if(o&&i)return l;for(let u=s+(a>>1);s<u;s++)if(r[s]==e)return l;if(o)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),a;;s+=3){if((a=i[s])==65535)if(i[s+1]==1)a=i[s=ga(i,s+2)];else{if(i[s+1]==2)return ga(i,s+2);break}if(a==n||a==0)return ga(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ga(this.data,s+2);else break;r=n(ga(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ga(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Yv.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(o=>o.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=QL(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let a=this.dialects[n[s]],o;(o=this.data[a++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[o]=1;return new lme(e,i,r)}static deserialize(e){return new Yv(e)}}function ga(t,e){return t[e]|t[e+1]<<16}function cme(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function QL(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const ume=HW({String:Ce.string,Number:Ce.number,"True False":Ce.bool,PropertyName:Ce.propertyName,Null:Ce.null,", :":Ce.separator,"[ ]":Ce.squareBracket,"{ }":Ce.brace}),dme=Yv.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[ume],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),hme=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=fme(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function fme(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const pme=Nv.define({name:"json",parser:dme.configure({props:[YW.add({Object:fL({except:/^\s*\}/}),Array:fL({except:/^\s*\]/})}),KW.add({"Object Array":Lhe})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function _me(){return new Che(pme)}const mme="#e5c07b",XL="#e06c75",gme="#56b6c2",vme="#ffffff",bg="#abb2bf",GO="#7d8799",Sme="#61afef",bme="#98c379",ZL="#d19a66",Eme="#c678dd",yme="#21252b",JL="#2c313a",eP="#282c34",ay="#353a42",Cme="#3E4451",tP="#528bff",Tme=We.theme({"&":{color:bg,backgroundColor:eP},".cm-content":{caretColor:tP},".cm-cursor, .cm-dropCursor":{borderLeftColor:tP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Cme},".cm-panels":{backgroundColor:yme,color:bg},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:eP,color:GO,border:"none"},".cm-activeLineGutter":{backgroundColor:JL},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ay},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ay,borderBottomColor:ay},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:JL,color:bg}}},{dark:!0}),wme=$p.define([{tag:Ce.keyword,color:Eme},{tag:[Ce.name,Ce.deleted,Ce.character,Ce.propertyName,Ce.macroName],color:XL},{tag:[Ce.function(Ce.variableName),Ce.labelName],color:Sme},{tag:[Ce.color,Ce.constant(Ce.name),Ce.standard(Ce.name)],color:ZL},{tag:[Ce.definition(Ce.name),Ce.separator],color:bg},{tag:[Ce.typeName,Ce.className,Ce.number,Ce.changed,Ce.annotation,Ce.modifier,Ce.self,Ce.namespace],color:mme},{tag:[Ce.operator,Ce.operatorKeyword,Ce.url,Ce.escape,Ce.regexp,Ce.link,Ce.special(Ce.string)],color:gme},{tag:[Ce.meta,Ce.comment],color:GO},{tag:Ce.strong,fontWeight:"bold"},{tag:Ce.emphasis,fontStyle:"italic"},{tag:Ce.strikethrough,textDecoration:"line-through"},{tag:Ce.link,color:GO,textDecoration:"underline"},{tag:Ce.heading,fontWeight:"bold",color:XL},{tag:[Ce.atom,Ce.bool,Ce.special(Ce.variableName)],color:ZL},{tag:[Ce.processingInstruction,Ce.string,Ce.inserted],color:bme},{tag:Ce.invalid,color:vme}]),Rme=[Tme,px(wme)],Ame=["title"],Ome=Ke({__name:"JsonEditor",props:Ap({name:{},arg:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=kl(t,"modelValue"),n=t.arg.schema.default??(t.arg.schema.type==="object"?{}:[]),i=ve(!1),r=ve(null),s=ve(JSON.stringify(e.value||n,null,2)),a=_me(),o=hme(),l=()=>{i.value=!1,s.value=JSON.stringify(e.value,null,2),r.value=null},u=()=>{try{e.value=JSON.parse(s.value),i.value=!1,r.value=null}catch(c){r.value=c instanceof Error?c.message:String(c)}};return(c,d)=>(_e(),Ne($N,{modelValue:ie(i),"onUpdate:modelValue":d[1]||(d[1]=h=>Lt(i)?i.value=h:null),width:"800",height:"600"},{activator:be(({props:h})=>[W(_n,rt(h,{variant:"outlined"}),{default:be(()=>[Et(Nn(("getDisplayName"in c?c.getDisplayName:ie(Us))(c.name,c.arg.meta)),1)]),_:2},1040)]),default:be(()=>[W(Is,{title:("getDisplayName"in c?c.getDisplayName:ie(Us))(c.name,c.arg.meta),variant:"flat",color:"#282c34"},{default:be(()=>[W(ie(eme),{modelValue:ie(s),"onUpdate:modelValue":d[0]||(d[0]=h=>Lt(s)?s.value=h:null),class:"editor",lang:ie(a),linter:ie(o),basic:"",extensions:[ie(Rme)]},null,8,["modelValue","lang","linter","extensions"]),W(zo,null,{default:be(()=>[ie(r)?(_e(),Ge("div",{key:0,class:"text-error text-truncate",title:ie(r)},Nn(ie(r)),9,Ame)):mt("",!0),W(Na),W(_n,{onClick:l},{default:be(()=>d[2]||(d[2]=[Et("Cancel")])),_:1}),W(_n,{onClick:u},{default:be(()=>d[3]||(d[3]=[Et("Save")])),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Ime=jn(Ome,[["__scopeId","data-v-0cbc41d5"]]),S6=Symbol.for("vuetify:selection-control-group"),b6=Ue({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:on,trueIcon:on,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:Ks},...jt(),...ro(),...$i()},"SelectionControlGroup"),Nme=Ue({...b6({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");vt()({name:"VSelectionControlGroup",props:Nme(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const i=Fn(t,"modelValue"),r=Os(),s=te(()=>t.id||`v-selection-control-group-${r}`),a=te(()=>t.name||s.value),o=new Set;return Kn(S6,{modelValue:i,forceUpdate:()=>{o.forEach(l=>l())},onForceUpdate:l=>{o.add(l),Zn(()=>{o.delete(l)})}}),Xd({[t.defaultsTarget]:{color:Ve(t,"color"),disabled:Ve(t,"disabled"),density:Ve(t,"density"),error:Ve(t,"error"),inline:Ve(t,"inline"),modelValue:i,multiple:te(()=>!!t.multiple||t.multiple==null&&Array.isArray(i.value)),name:a,falseIcon:Ve(t,"falseIcon"),trueIcon:Ve(t,"trueIcon"),readonly:Ve(t,"readonly"),ripple:Ve(t,"ripple"),type:Ve(t,"type"),valueComparator:Ve(t,"valueComparator")}}),Ft(()=>{var l;return W("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":t.inline},t.class],style:t.style,role:t.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}});const E6=Ue({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...jt(),...b6()},"VSelectionControl");function xme(t){const e=an(S6,void 0),{densityClasses:n}=Qo(t),i=Fn(t,"modelValue"),r=te(()=>t.trueValue!==void 0?t.trueValue:t.value!==void 0?t.value:!0),s=te(()=>t.falseValue!==void 0?t.falseValue:!1),a=te(()=>!!t.multiple||t.multiple==null&&Array.isArray(i.value)),o=te({get(){const f=e?e.modelValue.value:i.value;return a.value?qr(f).some(S=>t.valueComparator(S,r.value)):t.valueComparator(f,r.value)},set(f){if(t.readonly)return;const S=f?r.value:s.value;let _=S;a.value&&(_=f?[...qr(i.value),S]:qr(i.value).filter(p=>!t.valueComparator(p,r.value))),e?e.modelValue.value=_:i.value=_}}),{textColorClasses:l,textColorStyles:u}=Xs(te(()=>{if(!(t.error||t.disabled))return o.value?t.color:t.baseColor})),{backgroundColorClasses:c,backgroundColorStyles:d}=Il(te(()=>o.value&&!t.error&&!t.disabled?t.color:t.baseColor)),h=te(()=>o.value?t.trueIcon:t.falseIcon);return{group:e,densityClasses:n,trueValue:r,falseValue:s,model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:h}}const nP=vt()({name:"VSelectionControl",directives:{Ripple:kp},inheritAttrs:!1,props:E6(),emits:{"update:modelValue":t=>!0},setup(t,e){let{attrs:n,slots:i}=e;const{group:r,densityClasses:s,icon:a,model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:h}=xme(t),f=Os(),S=ut(!1),_=ut(!1),p=ve(),v=te(()=>t.id||`input-${f}`),m=te(()=>!t.disabled&&!t.readonly);r==null||r.onForceUpdate(()=>{p.value&&(p.value.checked=o.value)});function g(T){m.value&&(S.value=!0,iv(T.target,":focus-visible")!==!1&&(_.value=!0))}function b(){S.value=!1,_.value=!1}function y(T){T.stopPropagation()}function E(T){if(!m.value){p.value&&(p.value.checked=o.value);return}t.readonly&&r&&$t(()=>r.forceUpdate()),o.value=T.target.checked}return Ft(()=>{var I,A;const T=i.label?i.label({label:t.label,props:{for:v.value}}):t.label,[C,w]=YS(n),R=W("input",rt({ref:p,checked:o.value,disabled:!!t.disabled,id:v.value,onBlur:b,onFocus:g,onInput:E,"aria-disabled":!!t.disabled,"aria-label":t.label,type:t.type,value:h.value,name:t.name,"aria-checked":t.type==="checkbox"?o.value:void 0},w),null);return W("div",rt({class:["v-selection-control",{"v-selection-control--dirty":o.value,"v-selection-control--disabled":t.disabled,"v-selection-control--error":t.error,"v-selection-control--focused":S.value,"v-selection-control--focus-visible":_.value,"v-selection-control--inline":t.inline},s.value,t.class]},C,{style:t.style}),[W("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(I=i.default)==null?void 0:I.call(i,{backgroundColorClasses:c,backgroundColorStyles:d}),Ar(W("div",{class:["v-selection-control__input"]},[((A=i.input)==null?void 0:A.call(i,{model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:R,icon:a.value,props:{onFocus:g,onBlur:b,id:v.value}}))??W(He,null,[a.value&&W(Ot,{key:"icon",icon:a.value},null),R])]),[[Jl("ripple"),t.ripple&&[!t.disabled&&!t.readonly,null,["center","circle"]]]])]),T&&W(iq,{for:v.value,onClick:y},{default:()=>[T]})])}),{isFocused:S,input:p}}}),y6=Ue({indeterminate:Boolean,indeterminateIcon:{type:on,default:"$checkboxIndeterminate"},...E6({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),Wv=vt()({name:"VCheckboxBtn",props:y6(),emits:{"update:modelValue":t=>!0,"update:indeterminate":t=>!0},setup(t,e){let{slots:n}=e;const i=Fn(t,"indeterminate"),r=Fn(t,"modelValue");function s(l){i.value&&(i.value=!1)}const a=te(()=>i.value?t.indeterminateIcon:t.falseIcon),o=te(()=>i.value?t.indeterminateIcon:t.trueIcon);return Ft(()=>{const l=Ga(nP.filterProps(t),["modelValue"]);return W(nP,rt(l,{modelValue:r.value,"onUpdate:modelValue":[u=>r.value=u,s],class:["v-checkbox-btn",t.class],style:t.style,type:"checkbox",falseIcon:a.value,trueIcon:o.value,"aria-checked":i.value?"mixed":void 0}),n)}),{}}}),Dme=Ue({...eb(),...Ga(y6(),["inline"])},"VCheckbox"),kme=vt()({name:"VCheckbox",inheritAttrs:!1,props:Dme(),emits:{"update:modelValue":t=>!0,"update:focused":t=>!0},setup(t,e){let{attrs:n,slots:i}=e;const r=Fn(t,"modelValue"),{isFocused:s,focus:a,blur:o}=XS(t),l=Os(),u=te(()=>t.id||`checkbox-${l}`);return Ft(()=>{const[c,d]=YS(n),h=Rd.filterProps(t),f=Wv.filterProps(t);return W(Rd,rt({class:["v-checkbox",t.class]},c,h,{modelValue:r.value,"onUpdate:modelValue":S=>r.value=S,id:u.value,focused:s.value,style:t.style}),{...i,default:S=>{let{id:_,messagesId:p,isDisabled:v,isReadonly:m,isValid:g}=S;return W(Wv,rt(f,{id:_.value,"aria-describedby":p.value,disabled:v.value,readonly:m.value},d,{error:g.value===!1,modelValue:r.value,"onUpdate:modelValue":b=>r.value=b,onFocus:a,onBlur:o}),i)}})}),{}}});function Mme(t){let{selectedElement:e,containerElement:n,isRtl:i,isHorizontal:r}=t;const s=Qf(r,n),a=C6(r,i,n),o=Qf(r,e),l=T6(r,e),u=o*.4;return a>l?l-u:a+s<l+o?l-s+o+u:a}function Lme(t){let{selectedElement:e,containerElement:n,isHorizontal:i}=t;const r=Qf(i,n),s=T6(i,e),a=Qf(i,e);return s-r/2+a/2}function iP(t,e){const n=t?"scrollWidth":"scrollHeight";return(e==null?void 0:e[n])||0}function Pme(t,e){const n=t?"clientWidth":"clientHeight";return(e==null?void 0:e[n])||0}function C6(t,e,n){if(!n)return 0;const{scrollLeft:i,offsetWidth:r,scrollWidth:s}=n;return t?e?s-r+i:i:n.scrollTop}function Qf(t,e){const n=t?"offsetWidth":"offsetHeight";return(e==null?void 0:e[n])||0}function T6(t,e){const n=t?"offsetLeft":"offsetTop";return(e==null?void 0:e[n])||0}const Bme=Symbol.for("vuetify:v-slide-group"),w6=Ue({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:Bme},nextIcon:{type:on,default:"$next"},prevIcon:{type:on,default:"$prev"},showArrows:{type:[Boolean,String],validator:t=>typeof t=="boolean"||["always","desktop","mobile"].includes(t)},...jt(),...vse({mobile:null}),...Ri(),...LN({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),rP=vt()({name:"VSlideGroup",props:w6(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const{isRtl:i}=ec(),{displayClasses:r,mobile:s}=mN(t),a=PN(t,t.symbol),o=ut(!1),l=ut(0),u=ut(0),c=ut(0),d=te(()=>t.direction==="horizontal"),{resizeRef:h,contentRect:f}=Df(),{resizeRef:S,contentRect:_}=Df(),p=Ese(),v=te(()=>({container:h.el,duration:200,easing:"easeOutQuart"})),m=te(()=>a.selected.value.length?a.items.value.findIndex(N=>N.id===a.selected.value[0]):-1),g=te(()=>a.selected.value.length?a.items.value.findIndex(N=>N.id===a.selected.value[a.selected.value.length-1]):-1);if(dn){let N=-1;Ie(()=>[a.selected.value,f.value,_.value,d.value],()=>{cancelAnimationFrame(N),N=requestAnimationFrame(()=>{if(f.value&&_.value){const U=d.value?"width":"height";u.value=f.value[U],c.value=_.value[U],o.value=u.value+1<c.value}if(m.value>=0&&S.el){const U=S.el.children[g.value];y(U,t.centerActive)}})})}const b=ut(!1);function y(N,U){let F=0;U?F=Lme({containerElement:h.el,isHorizontal:d.value,selectedElement:N}):F=Mme({containerElement:h.el,isHorizontal:d.value,isRtl:i.value,selectedElement:N}),E(F)}function E(N){if(!dn||!h.el)return;const U=Qf(d.value,h.el),F=C6(d.value,i.value,h.el);if(!(iP(d.value,h.el)<=U||Math.abs(N-F)<16)){if(d.value&&i.value&&h.el){const{scrollWidth:H,offsetWidth:X}=h.el;N=H-X-N}d.value?p.horizontal(N,v.value):p(N,v.value)}}function T(N){const{scrollTop:U,scrollLeft:F}=N.target;l.value=d.value?F:U}function C(N){if(b.value=!0,!(!o.value||!S.el)){for(const U of N.composedPath())for(const F of S.el.children)if(F===U){y(F);return}}}function w(N){b.value=!1}let R=!1;function I(N){var U;!R&&!b.value&&!(N.relatedTarget&&((U=S.el)!=null&&U.contains(N.relatedTarget)))&&D(),R=!1}function A(){R=!0}function x(N){if(!S.el)return;function U(F){N.preventDefault(),D(F)}d.value?N.key==="ArrowRight"?U(i.value?"prev":"next"):N.key==="ArrowLeft"&&U(i.value?"next":"prev"):N.key==="ArrowDown"?U("next"):N.key==="ArrowUp"&&U("prev"),N.key==="Home"?U("first"):N.key==="End"&&U("last")}function O(N,U){if(!N)return;let F=N;do F=F==null?void 0:F[U==="next"?"nextElementSibling":"previousElementSibling"];while(F!=null&&F.hasAttribute("disabled"));return F}function D(N){if(!S.el)return;let U;if(!N)U=If(S.el)[0];else if(N==="next"){if(U=O(S.el.querySelector(":focus"),N),!U)return D("first")}else if(N==="prev"){if(U=O(S.el.querySelector(":focus"),N),!U)return D("last")}else N==="first"?(U=S.el.firstElementChild,U!=null&&U.hasAttribute("disabled")&&(U=O(U,"next"))):N==="last"&&(U=S.el.lastElementChild,U!=null&&U.hasAttribute("disabled")&&(U=O(U,"prev")));U&&U.focus({preventScroll:!0})}function L(N){const U=d.value&&i.value?-1:1,F=(N==="prev"?-U:U)*u.value;let k=l.value+F;if(d.value&&i.value&&h.el){const{scrollWidth:H,offsetWidth:X}=h.el;k+=H-X}E(k)}const q=te(()=>({next:a.next,prev:a.prev,select:a.select,isSelected:a.isSelected})),G=te(()=>{switch(t.showArrows){case"always":return!0;case"desktop":return!s.value;case!0:return o.value||Math.abs(l.value)>0;case"mobile":return s.value||o.value||Math.abs(l.value)>0;default:return!s.value&&(o.value||Math.abs(l.value)>0)}}),M=te(()=>Math.abs(l.value)>1),P=te(()=>{if(!h.value)return!1;const N=iP(d.value,h.el),U=Pme(d.value,h.el);return N-U-Math.abs(l.value)>1});return Ft(()=>W(t.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":G.value,"v-slide-group--is-overflowing":o.value},r.value,t.class],style:t.style,tabindex:b.value||a.selected.value.length?-1:0,onFocus:I},{default:()=>{var N,U,F;return[G.value&&W("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!M.value}],onMousedown:A,onClick:()=>M.value&&L("prev")},[((N=n.prev)==null?void 0:N.call(n,q.value))??W(Uk,null,{default:()=>[W(Ot,{icon:i.value?t.nextIcon:t.prevIcon},null)]})]),W("div",{key:"container",ref:h,class:"v-slide-group__container",onScroll:T},[W("div",{ref:S,class:"v-slide-group__content",onFocusin:C,onFocusout:w,onKeydown:x},[(U=n.default)==null?void 0:U.call(n,q.value)])]),G.value&&W("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!P.value}],onMousedown:A,onClick:()=>P.value&&L("next")},[((F=n.next)==null?void 0:F.call(n,q.value))??W(Uk,null,{default:()=>[W(Ot,{icon:i.value?t.prevIcon:t.nextIcon},null)]})])]}})),{selected:a.selected,scrollTo:L,scrollOffset:l,focus:D,hasPrev:M,hasNext:P}}}),R6=Symbol.for("vuetify:v-chip-group"),Fme=Ue({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Ks},...w6(),...jt(),...LN({selectedClass:"v-chip--selected"}),...Ri(),...$i(),...za({variant:"tonal"})},"VChipGroup");vt()({name:"VChipGroup",props:Fme(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const{themeClasses:i}=cr(t),{isSelected:r,select:s,next:a,prev:o,selected:l}=PN(t,R6);return Xd({VChip:{color:Ve(t,"color"),disabled:Ve(t,"disabled"),filter:Ve(t,"filter"),variant:Ve(t,"variant")}}),Ft(()=>{const u=rP.filterProps(t);return W(rP,rt(u,{class:["v-chip-group",{"v-chip-group--column":t.column},i.value,t.class],style:t.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:r,select:s,next:a,prev:o,selected:l.value})]}})}),{}}});const Ume=Ue({activeClass:String,appendAvatar:String,appendIcon:on,closable:Boolean,closeIcon:{type:on,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:on,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:on,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:Yr(),onClickOnce:Yr(),...yu(),...jt(),...ro(),...Tu(),...gq(),...no(),...rb(),...xp(),...Ri({tag:"span"}),...$i(),...za({variant:"tonal"})},"VChip"),No=vt()({name:"VChip",directives:{Ripple:kp},props:Ume(),emits:{"click:close":t=>!0,"update:modelValue":t=>!0,"group:selected":t=>!0,click:t=>!0},setup(t,e){let{attrs:n,emit:i,slots:r}=e;const{t:s}=Np(),{borderClasses:a}=Cu(t),{colorClasses:o,colorStyles:l,variantClasses:u}=nh(t),{densityClasses:c}=Qo(t),{elevationClasses:d}=wu(t),{roundedClasses:h}=io(t),{sizeClasses:f}=Dp(t),{themeClasses:S}=cr(t),_=Fn(t,"modelValue"),p=vq(t,R6,!1),v=ib(t,n),m=te(()=>t.link!==!1&&v.isLink.value),g=te(()=>!t.disabled&&t.link!==!1&&(!!p||t.link||v.isClickable.value)),b=te(()=>({"aria-label":s(t.closeLabel),onClick(T){T.preventDefault(),T.stopPropagation(),_.value=!1,i("click:close",T)}}));function y(T){var C;i("click",T),g.value&&((C=v.navigate)==null||C.call(v,T),p==null||p.toggle())}function E(T){(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),y(T))}return()=>{var D;const T=v.isLink.value?"a":t.tag,C=!!(t.appendIcon||t.appendAvatar),w=!!(C||r.append),R=!!(r.close||t.closable),I=!!(r.filter||t.filter)&&p,A=!!(t.prependIcon||t.prependAvatar),x=!!(A||r.prepend),O=!p||p.isSelected.value;return _.value&&Ar(W(T,rt({class:["v-chip",{"v-chip--disabled":t.disabled,"v-chip--label":t.label,"v-chip--link":g.value,"v-chip--filter":I,"v-chip--pill":t.pill,[`${t.activeClass}`]:t.activeClass&&((D=v.isActive)==null?void 0:D.value)},S.value,a.value,O?o.value:void 0,c.value,d.value,h.value,f.value,u.value,p==null?void 0:p.selectedClass.value,t.class],style:[O?l.value:void 0,t.style],disabled:t.disabled||void 0,draggable:t.draggable,tabindex:g.value?0:void 0,onClick:y,onKeydown:g.value&&!m.value&&E},v.linkProps),{default:()=>{var L;return[th(g.value,"v-chip"),I&&W(tq,{key:"filter"},{default:()=>[Ar(W("div",{class:"v-chip__filter"},[r.filter?W(_i,{key:"filter-defaults",disabled:!t.filterIcon,defaults:{VIcon:{icon:t.filterIcon}}},r.filter):W(Ot,{key:"filter-icon",icon:t.filterIcon},null)]),[[jd,p.isSelected.value]])]}),x&&W("div",{key:"prepend",class:"v-chip__prepend"},[r.prepend?W(_i,{key:"prepend-defaults",disabled:!A,defaults:{VAvatar:{image:t.prependAvatar,start:!0},VIcon:{icon:t.prependIcon,start:!0}}},r.prepend):W(He,null,[t.prependIcon&&W(Ot,{key:"prepend-icon",icon:t.prependIcon,start:!0},null),t.prependAvatar&&W(Ll,{key:"prepend-avatar",image:t.prependAvatar,start:!0},null)])]),W("div",{class:"v-chip__content","data-no-activator":""},[((L=r.default)==null?void 0:L.call(r,{isSelected:p==null?void 0:p.isSelected.value,selectedClass:p==null?void 0:p.selectedClass.value,select:p==null?void 0:p.select,toggle:p==null?void 0:p.toggle,value:p==null?void 0:p.value.value,disabled:t.disabled}))??t.text]),w&&W("div",{key:"append",class:"v-chip__append"},[r.append?W(_i,{key:"append-defaults",disabled:!C,defaults:{VAvatar:{end:!0,image:t.appendAvatar},VIcon:{end:!0,icon:t.appendIcon}}},r.append):W(He,null,[t.appendIcon&&W(Ot,{key:"append-icon",end:!0,icon:t.appendIcon},null),t.appendAvatar&&W(Ll,{key:"append-avatar",end:!0,image:t.appendAvatar},null)])]),R&&W("button",rt({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},b.value),[r.close?W(_i,{key:"close-defaults",defaults:{VIcon:{icon:t.closeIcon,size:"x-small"}}},r.close):W(Ot,{key:"close-icon",icon:t.closeIcon,size:"x-small"},null)])]}}),[[Jl("ripple"),g.value&&t.ripple,null]])}}}),$me=Ue({id:String,submenu:Boolean,...Ga(ob({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:TN}}),["absolute"])},"VMenu"),Kv=vt()({name:"VMenu",props:$me(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const i=Fn(t,"modelValue"),{scopeId:r}=sb(),{isRtl:s}=ec(),a=Os(),o=te(()=>t.id||`v-menu-${a}`),l=ve(),u=an(VA,null),c=ut(new Set);Kn(VA,{register(){c.value.add(a)},unregister(){c.value.delete(a)},closeParents(p){setTimeout(()=>{var v;!c.value.size&&!t.persistent&&(p==null||(v=l.value)!=null&&v.contentEl&&!Hte(p,l.value.contentEl))&&(i.value=!1,u==null||u.closeParents())},40)}}),Yi(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),LS(()=>i.value=!1);async function d(p){var g,b,y;const v=p.relatedTarget,m=p.target;await $t(),i.value&&v!==m&&((g=l.value)!=null&&g.contentEl)&&((b=l.value)!=null&&b.globalTop)&&![document,l.value.contentEl].includes(m)&&!l.value.contentEl.contains(m)&&((y=If(l.value.contentEl)[0])==null||y.focus())}Ie(i,p=>{p?(u==null||u.register(),dn&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),dn&&document.removeEventListener("focusin",d))},{immediate:!0});function h(p){u==null||u.closeParents(p)}function f(p){var v,m,g,b,y;if(!t.disabled)if(p.key==="Tab"||p.key==="Enter"&&!t.closeOnContentClick){if(p.key==="Enter"&&(p.target instanceof HTMLTextAreaElement||p.target instanceof HTMLInputElement&&p.target.closest("form")))return;p.key==="Enter"&&p.preventDefault(),tz(If((v=l.value)==null?void 0:v.contentEl,!1),p.shiftKey?"prev":"next",T=>T.tabIndex>=0)||(i.value=!1,(g=(m=l.value)==null?void 0:m.activatorEl)==null||g.focus())}else t.submenu&&p.key===(s.value?"ArrowRight":"ArrowLeft")&&(i.value=!1,(y=(b=l.value)==null?void 0:b.activatorEl)==null||y.focus())}function S(p){var m;if(t.disabled)return;const v=(m=l.value)==null?void 0:m.contentEl;v&&i.value?p.key==="ArrowDown"?(p.preventDefault(),p.stopImmediatePropagation(),ff(v,"next")):p.key==="ArrowUp"?(p.preventDefault(),p.stopImmediatePropagation(),ff(v,"prev")):t.submenu&&(p.key===(s.value?"ArrowRight":"ArrowLeft")?i.value=!1:p.key===(s.value?"ArrowLeft":"ArrowRight")&&(p.preventDefault(),ff(v,"first"))):(t.submenu?p.key===(s.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(p.key))&&(i.value=!0,p.preventDefault(),setTimeout(()=>setTimeout(()=>S(p))))}const _=te(()=>rt({"aria-haspopup":"menu","aria-expanded":String(i.value),"aria-controls":o.value,onKeydown:S},t.activatorProps));return Ft(()=>{const p=Pl.filterProps(t);return W(Pl,rt({ref:l,id:o.value,class:["v-menu",t.class],style:t.style},p,{modelValue:i.value,"onUpdate:modelValue":v=>i.value=v,absolute:!0,activatorProps:_.value,location:t.location??(t.submenu?"end":"bottom"),"onClick:outside":h,onKeydown:f},r),{activator:n.activator,default:function(){for(var v=arguments.length,m=new Array(v),g=0;g<v;g++)m[g]=arguments[g];return W(_i,{root:"VMenu"},{default:()=>{var b;return[(b=n.default)==null?void 0:b.call(n,...m)]}})}})}),tc({id:o,ΨopenChildren:c},l)}}),Gme=Ue({renderless:Boolean,...jt()},"VVirtualScrollItem"),Hme=vt()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Gme(),emits:{"update:height":t=>!0},setup(t,e){let{attrs:n,emit:i,slots:r}=e;const{resizeRef:s,contentRect:a}=Df(void 0,"border");Ie(()=>{var o;return(o=a.value)==null?void 0:o.height},o=>{o!=null&&i("update:height",o)}),Ft(()=>{var o,l;return t.renderless?W(He,null,[(o=r.default)==null?void 0:o.call(r,{itemRef:s})]):W("div",rt({ref:s,class:["v-virtual-scroll__item",t.class],style:t.style},n),[(l=r.default)==null?void 0:l.call(r)])})}}),Vme=-1,zme=1,ly=100,qme=Ue({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function Yme(t,e){const n=mN(),i=ut(0);Wr(()=>{i.value=parseFloat(t.itemHeight||0)});const r=ut(0),s=ut(Math.ceil((parseInt(t.height)||n.height.value)/(i.value||16))||1),a=ut(0),o=ut(0),l=ve(),u=ve();let c=0;const{resizeRef:d,contentRect:h}=Df();Wr(()=>{d.value=l.value});const f=te(()=>{var P;return l.value===document.documentElement?n.height.value:((P=h.value)==null?void 0:P.height)||parseInt(t.height)||0}),S=te(()=>!!(l.value&&u.value&&f.value&&i.value));let _=Array.from({length:e.value.length}),p=Array.from({length:e.value.length});const v=ut(0);let m=-1;function g(P){return _[P]||i.value}const b=Fte(()=>{const P=performance.now();p[0]=0;const N=e.value.length;for(let U=1;U<=N-1;U++)p[U]=(p[U-1]||0)+g(U-1);v.value=Math.max(v.value,performance.now()-P)},v),y=Ie(S,P=>{P&&(y(),c=u.value.offsetTop,b.immediate(),L(),~m&&$t(()=>{dn&&window.requestAnimationFrame(()=>{G(m),m=-1})}))});Zn(()=>{b.clear()});function E(P,N){const U=_[P],F=i.value;i.value=F?Math.min(i.value,N):N,(U!==N||F!==i.value)&&(_[P]=N,b())}function T(P){return P=Lo(P,0,e.value.length-1),p[P]||0}function C(P){return Wme(p,P)}let w=0,R=0,I=0;Ie(f,(P,N)=>{N&&(L(),P<N&&requestAnimationFrame(()=>{R=0,L()}))});let A=-1;function x(){if(!l.value||!u.value)return;const P=l.value.scrollTop,N=performance.now();N-I>500?(R=Math.sign(P-w),c=u.value.offsetTop):R=P-w,w=P,I=N,window.clearTimeout(A),A=window.setTimeout(O,500),L()}function O(){!l.value||!u.value||(R=0,I=0,window.clearTimeout(A),L())}let D=-1;function L(){cancelAnimationFrame(D),D=requestAnimationFrame(q)}function q(){if(!l.value||!f.value)return;const P=w-c,N=Math.sign(R),U=Math.max(0,P-ly),F=Lo(C(U),0,e.value.length),k=P+f.value+ly,H=Lo(C(k)+1,F+1,e.value.length);if((N!==Vme||F<r.value)&&(N!==zme||H>s.value)){const X=T(r.value)-T(F),K=T(H)-T(s.value);Math.max(X,K)>ly?(r.value=F,s.value=H):(F<=0&&(r.value=F),H>=e.value.length&&(s.value=H))}a.value=T(r.value),o.value=T(e.value.length)-T(s.value)}function G(P){const N=T(P);!l.value||P&&!N?m=P:l.value.scrollTop=N}const M=te(()=>e.value.slice(r.value,s.value).map((P,N)=>({raw:P,index:N+r.value,key:Q3(P)&&"value"in P?P.value:N+r.value})));return Ie(e,()=>{_=Array.from({length:e.value.length}),p=Array.from({length:e.value.length}),b.immediate(),L()},{deep:!0}),{calculateVisibleItems:L,containerRef:l,markerRef:u,computedItems:M,paddingTop:a,paddingBottom:o,scrollToIndex:G,handleScroll:x,handleScrollend:O,handleItemResize:E}}function Wme(t,e){let n=t.length-1,i=0,r=0,s=null,a=-1;if(t[n]<e)return n;for(;i<=n;)if(r=i+n>>1,s=t[r],s>e)n=r-1;else if(s<e)a=r,i=r+1;else return s===e?r:i;return a}const Kme=Ue({items:{type:Array,default:()=>[]},renderless:Boolean,...qme(),...jt(),...Ha()},"VVirtualScroll"),A6=vt()({name:"VVirtualScroll",props:Kme(),setup(t,e){let{slots:n}=e;const i=Li("VVirtualScroll"),{dimensionStyles:r}=Va(t),{calculateVisibleItems:s,containerRef:a,markerRef:o,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:h,paddingBottom:f,computedItems:S}=Yme(t,Ve(t,"items"));return iu(()=>t.renderless,()=>{function _(){var m,g;const v=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";a.value===document.documentElement?(document[v]("scroll",l,{passive:!0}),document[v]("scrollend",u)):((m=a.value)==null||m[v]("scroll",l,{passive:!0}),(g=a.value)==null||g[v]("scrollend",u))}Jn(()=>{a.value=hz(i.vnode.el,!0),_(!0)}),Zn(_)}),Ft(()=>{const _=S.value.map(p=>W(Hme,{key:p.key,renderless:t.renderless,"onUpdate:height":v=>c(p.index,v)},{default:v=>{var m;return(m=n.default)==null?void 0:m.call(n,{item:p.raw,index:p.index,...v})}}));return t.renderless?W(He,null,[W("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:Ht(h.value)}},null),_,W("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Ht(f.value)}},null)]):W("div",{ref:a,class:["v-virtual-scroll",t.class],onScrollPassive:l,onScrollend:u,style:[r.value,t.style]},[W("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:Ht(h.value),paddingBottom:Ht(f.value)}},[_])])}),{calculateVisibleItems:s,scrollToIndex:d}}});function O6(t,e){const n=ut(!1);let i;function r(o){cancelAnimationFrame(i),n.value=!0,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{n.value=!1})})}async function s(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(n.value){const l=Ie(n,()=>{l(),o()})}else o()})}async function a(o){var c,d;if(o.key==="Tab"&&((c=e.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(o.key))return;const l=(d=t.value)==null?void 0:d.$el;if(!l)return;(o.key==="Home"||o.key==="End")&&l.scrollTo({top:o.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await s();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const h=l.getBoundingClientRect().top;for(const f of u)if(f.getBoundingClientRect().top>=h){f.focus();break}}else{const h=l.getBoundingClientRect().bottom;for(const f of[...u].reverse())if(f.getBoundingClientRect().bottom<=h){f.focus();break}}}return{onScrollPassive:r,onKeydown:a}}const I6=Ue({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:on,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...iY({itemChildren:!1})},"Select"),jme=Ue({...I6(),...Ga(xN({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...eh({transition:{component:TN}})},"VSelect"),Qme=vt()({name:"VSelect",props:jme(),emits:{"update:focused":t=>!0,"update:modelValue":t=>!0,"update:menu":t=>!0},setup(t,e){let{slots:n}=e;const{t:i}=Np(),r=ve(),s=ve(),a=ve(),o=Fn(t,"menu"),l=te({get:()=>o.value,set:M=>{var P;o.value&&!M&&((P=s.value)!=null&&P.ΨopenChildren.size)||(o.value=M)}}),{items:u,transformIn:c,transformOut:d}=sY(t),h=Fn(t,"modelValue",[],M=>c(M===null?[null]:qr(M)),M=>{const P=d(M);return t.multiple?P:P[0]??null}),f=te(()=>typeof t.counterValue=="function"?t.counterValue(h.value):typeof t.counterValue=="number"?t.counterValue:h.value.length),S=IN(t),_=te(()=>h.value.map(M=>M.value)),p=ut(!1),v=te(()=>l.value?t.closeText:t.openText);let m="",g;const b=te(()=>t.hideSelected?u.value.filter(M=>!h.value.some(P=>(t.valueComparator||Ks)(P,M))):u.value),y=te(()=>t.hideNoData&&!b.value.length||S.isReadonly.value||S.isDisabled.value),E=te(()=>{var M;return{...t.menuProps,activatorProps:{...((M=t.menuProps)==null?void 0:M.activatorProps)||{},"aria-haspopup":"listbox"}}}),T=ve(),C=O6(T,r);function w(M){t.openOnClear&&(l.value=!0)}function R(){y.value||(l.value=!l.value)}function I(M){rv(M)&&A(M)}function A(M){var F,k;if(!M.key||S.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(M.key)&&M.preventDefault(),["Enter","ArrowDown"," "].includes(M.key)&&(l.value=!0),["Escape","Tab"].includes(M.key)&&(l.value=!1),M.key==="Home"?(F=T.value)==null||F.focus("first"):M.key==="End"&&((k=T.value)==null||k.focus("last"));const P=1e3;if(!rv(M))return;const N=performance.now();N-g>P&&(m=""),m+=M.key.toLowerCase(),g=N;const U=u.value.find(H=>H.title.toLowerCase().startsWith(m));if(U!==void 0){h.value=[U];const H=b.value.indexOf(U);dn&&window.requestAnimationFrame(()=>{var X;H>=0&&((X=a.value)==null||X.scrollToIndex(H))})}}function x(M){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!M.props.disabled)if(t.multiple){const N=h.value.findIndex(F=>(t.valueComparator||Ks)(F.value,M.value)),U=P??!~N;if(~N){const F=U?[...h.value,M]:[...h.value];F.splice(N,1),h.value=F}else U&&(h.value=[...h.value,M])}else{const N=P!==!1;h.value=N?[M]:[],$t(()=>{l.value=!1})}}function O(M){var P;(P=T.value)!=null&&P.$el.contains(M.relatedTarget)||(l.value=!1)}function D(){var M;t.eager&&((M=a.value)==null||M.calculateVisibleItems())}function L(){var M;p.value&&((M=r.value)==null||M.focus())}function q(M){p.value=!0}function G(M){if(M==null)h.value=[];else if(iv(r.value,":autofill")||iv(r.value,":-webkit-autofill")){const P=u.value.find(N=>N.title===M);P&&x(P)}else r.value&&(r.value.value="")}return Ie(l,()=>{if(!t.hideSelected&&l.value&&h.value.length){const M=b.value.findIndex(P=>h.value.some(N=>(t.valueComparator||Ks)(N.value,P.value)));dn&&window.requestAnimationFrame(()=>{var P;M>=0&&((P=a.value)==null||P.scrollToIndex(M))})}}),Ie(()=>t.items,(M,P)=>{l.value||p.value&&!P.length&&M.length&&(l.value=!0)}),Ft(()=>{const M=!!(t.chips||n.chip),P=!!(!t.hideNoData||b.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),N=h.value.length>0,U=Vo.filterProps(t),F=N||!p.value&&t.label&&!t.persistentPlaceholder?void 0:t.placeholder;return W(Vo,rt({ref:r},U,{modelValue:h.value.map(k=>k.props.value).join(", "),"onUpdate:modelValue":G,focused:p.value,"onUpdate:focused":k=>p.value=k,validationValue:h.externalValue,counterValue:f.value,dirty:N,class:["v-select",{"v-select--active-menu":l.value,"v-select--chips":!!t.chips,[`v-select--${t.multiple?"multiple":"single"}`]:!0,"v-select--selected":h.value.length,"v-select--selection-slot":!!n.selection},t.class],style:t.style,inputmode:"none",placeholder:F,"onClick:clear":w,"onMousedown:control":R,onBlur:O,onKeydown:A,"aria-label":i(v.value),title:i(v.value)}),{...n,default:()=>W(He,null,[W(Kv,rt({ref:s,modelValue:l.value,"onUpdate:modelValue":k=>l.value=k,activator:"parent",contentClass:"v-select__content",disabled:y.value,eager:t.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:t.transition,onAfterEnter:D,onAfterLeave:L},E.value),{default:()=>[P&&W(qN,rt({ref:T,selected:_.value,selectStrategy:t.multiple?"independent":"single-independent",onMousedown:k=>k.preventDefault(),onKeydown:I,onFocusin:q,tabindex:"-1","aria-live":"polite",color:t.itemColor??t.color},C,t.listProps),{default:()=>{var k,H,X;return[(k=n["prepend-item"])==null?void 0:k.call(n),!b.value.length&&!t.hideNoData&&(((H=n["no-data"])==null?void 0:H.call(n))??W(Bl,{key:"no-data",title:i(t.noDataText)},null)),W(A6,{ref:a,renderless:!0,items:b.value},{default:K=>{var J;let{item:z,index:re,itemRef:ne}=K;const Z=rt(z.props,{ref:ne,key:z.value,onClick:()=>x(z,null)});return((J=n.item)==null?void 0:J.call(n,{item:z,index:re,props:Z}))??W(Bl,rt(Z,{role:"option"}),{prepend:V=>{let{isSelected:$}=V;return W(He,null,[t.multiple&&!t.hideSelected?W(Wv,{key:z.value,modelValue:$,ripple:!1,tabindex:"-1"},null):void 0,z.props.prependAvatar&&W(Ll,{image:z.props.prependAvatar},null),z.props.prependIcon&&W(Ot,{icon:z.props.prependIcon},null)])}})}}),(X=n["append-item"])==null?void 0:X.call(n)]}})]}),h.value.map((k,H)=>{function X(ne){ne.stopPropagation(),ne.preventDefault(),x(k,!1)}const K={"onClick:close":X,onKeydown(ne){ne.key!=="Enter"&&ne.key!==" "||(ne.preventDefault(),ne.stopPropagation(),X(ne))},onMousedown(ne){ne.preventDefault(),ne.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},z=M?!!n.chip:!!n.selection,re=z?cN(M?n.chip({item:k,index:H,props:K}):n.selection({item:k,index:H})):void 0;if(!(z&&!re))return W("div",{key:k.value,class:"v-select__selection"},[M?n.chip?W(_i,{key:"chip-defaults",defaults:{VChip:{closable:t.closableChips,size:"small",text:k.title}}},{default:()=>[re]}):W(No,rt({key:"chip",closable:t.closableChips,size:"small",text:k.title,disabled:k.props.disabled},K),null):re??W("span",{class:"v-select__selection-text"},[k.title,t.multiple&&H<h.value.length-1&&W("span",{class:"v-select__selection-comma"},[Et(",")])])])})]),"append-inner":function(){var K;for(var k=arguments.length,H=new Array(k),X=0;X<k;X++)H[X]=arguments[X];return W(He,null,[(K=n["append-inner"])==null?void 0:K.call(n,...H),t.menuIcon?W(Ot,{class:"v-select__menu-icon",icon:t.menuIcon},null):void 0])}})}),tc({isFocused:p,menu:l,select:x},r)}}),Xme=(t,e,n)=>t==null||e==null?-1:t.toString().toLocaleLowerCase().indexOf(e.toString().toLocaleLowerCase()),Zme=Ue({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Jme(t,e,n){var o;const i=[],r=(n==null?void 0:n.default)??Xme,s=n!=null&&n.filterKeys?qr(n.filterKeys):!1,a=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(t!=null&&t.length))return i;e:for(let l=0;l<t.length;l++){const[u,c=u]=qr(t[l]),d={},h={};let f=-1;if((e||a>0)&&!(n!=null&&n.noFilter)){if(typeof u=="object"){const p=s||Object.keys(c);for(const v of p){const m=wo(c,v),g=(o=n==null?void 0:n.customKeyFilter)==null?void 0:o[v];if(f=g?g(m,e,u):r(m,e,u),f!==-1&&f!==!1)g?d[v]=f:h[v]=f;else if((n==null?void 0:n.filterMode)==="every")continue e}}else f=r(u,e,u),f!==-1&&f!==!1&&(h.title=f);const S=Object.keys(h).length,_=Object.keys(d).length;if(!S&&!_||(n==null?void 0:n.filterMode)==="union"&&_!==a&&!S||(n==null?void 0:n.filterMode)==="intersection"&&(_!==a||!S))continue}i.push({index:l,matches:{...h,...d}})}return i}function ege(t,e,n,i){const r=ut([]),s=ut(new Map),a=te(()=>ie(e));Wr(()=>{const l=typeof n=="function"?n():ie(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=Jme(a.value,u,{customKeyFilter:{...t.customKeyFilter,...ie(i==null?void 0:i.customKeyFilter)},default:t.customFilter,filterKeys:t.filterKeys,filterMode:t.filterMode,noFilter:t.noFilter}),d=ie(e),h=[],f=new Map;c.forEach(S=>{let{index:_,matches:p}=S;const v=d[_];h.push(v),f.set(v.value,p)}),r.value=h,s.value=f});function o(l){return s.value.get(l.value)}return{filteredItems:r,filteredMatches:s,getMatches:o}}function tge(t,e,n){if(e==null)return t;if(Array.isArray(e))throw new Error("Multiple matches is not implemented");return typeof e=="number"&&~e?W(He,null,[W("span",{class:"v-combobox__unmask"},[t.substr(0,e)]),W("span",{class:"v-combobox__mask"},[t.substr(e,n)]),W("span",{class:"v-combobox__unmask"},[t.substr(e+n)])]):t}const nge=Ue({autoSelectFirst:{type:[Boolean,String]},clearOnSelect:{type:Boolean,default:!0},delimiters:Array,...Zme({filterKeys:["title"]}),...I6({hideNoData:!0,returnObject:!0}),...Ga(xN({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...eh({transition:!1})},"VCombobox"),ige=vt()({name:"VCombobox",props:nge(),emits:{"update:focused":t=>!0,"update:modelValue":t=>!0,"update:search":t=>!0,"update:menu":t=>!0},setup(t,e){var J;let{emit:n,slots:i}=e;const{t:r}=Np(),s=ve(),a=ut(!1),o=ut(!0),l=ut(!1),u=ve(),c=ve(),d=Fn(t,"menu"),h=te({get:()=>d.value,set:V=>{var $;d.value&&!V&&(($=u.value)!=null&&$.ΨopenChildren.size)||(d.value=V)}}),f=ut(-1);let S=!1;const _=te(()=>{var V;return(V=s.value)==null?void 0:V.color}),p=te(()=>h.value?t.closeText:t.openText),{items:v,transformIn:m,transformOut:g}=sY(t),{textColorClasses:b,textColorStyles:y}=Xs(_),E=Fn(t,"modelValue",[],V=>m(qr(V)),V=>{const $=g(V);return t.multiple?$:$[0]??null}),T=IN(t),C=te(()=>!!(t.chips||i.chip)),w=te(()=>C.value||!!i.selection),R=ut(!t.multiple&&!w.value?((J=E.value[0])==null?void 0:J.title)??"":""),I=te({get:()=>R.value,set:V=>{var $;if(R.value=V??"",!t.multiple&&!w.value&&(E.value=[ml(t,V)]),V&&t.multiple&&(($=t.delimiters)!=null&&$.length)){const Y=V.split(new RegExp(`(?:${t.delimiters.join("|")})+`));Y.length>1&&(Y.forEach(Q=>{Q=Q.trim(),Q&&z(ml(t,Q))}),R.value="")}V||(f.value=-1),o.value=!V}}),A=te(()=>typeof t.counterValue=="function"?t.counterValue(E.value):typeof t.counterValue=="number"?t.counterValue:t.multiple?E.value.length:I.value.length);Ie(R,V=>{S?$t(()=>S=!1):a.value&&!h.value&&(h.value=!0),n("update:search",V)}),Ie(E,V=>{var $;!t.multiple&&!w.value&&(R.value=(($=V[0])==null?void 0:$.title)??"")});const{filteredItems:x,getMatches:O}=ege(t,v,()=>o.value?"":I.value),D=te(()=>t.hideSelected?x.value.filter(V=>!E.value.some($=>$.value===V.value)):x.value),L=te(()=>E.value.map(V=>V.value)),q=te(()=>{var $;return(t.autoSelectFirst===!0||t.autoSelectFirst==="exact"&&I.value===(($=D.value[0])==null?void 0:$.title))&&D.value.length>0&&!o.value&&!l.value}),G=te(()=>t.hideNoData&&!D.value.length||T.isReadonly.value||T.isDisabled.value),M=ve(),P=O6(M,s);function N(V){S=!0,t.openOnClear&&(h.value=!0)}function U(){G.value||(h.value=!0)}function F(V){G.value||(a.value&&(V.preventDefault(),V.stopPropagation()),h.value=!h.value)}function k(V){var $;V.key!==" "&&rv(V)&&(($=s.value)==null||$.focus())}function H(V){var Q;if(Bte(V)||T.isReadonly.value)return;const $=s.value.selectionStart,Y=E.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(V.key)&&V.preventDefault(),["Enter","ArrowDown"].includes(V.key)&&(h.value=!0),["Escape"].includes(V.key)&&(h.value=!1),["Enter","Escape","Tab"].includes(V.key)&&(q.value&&["Enter","Tab"].includes(V.key)&&!E.value.some(j=>{let{value:se}=j;return se===D.value[0].value})&&z(x.value[0]),o.value=!0),V.key==="ArrowDown"&&q.value&&((Q=M.value)==null||Q.focus("next")),V.key==="Enter"&&I.value&&(z(ml(t,I.value)),w.value&&(R.value="")),["Backspace","Delete"].includes(V.key)){if(!t.multiple&&w.value&&E.value.length>0&&!I.value)return z(E.value[0],!1);if(~f.value){V.preventDefault();const j=f.value;z(E.value[f.value],!1),f.value=j>=Y-1?Y-2:j}else V.key==="Backspace"&&!I.value&&(f.value=Y-1);return}if(t.multiple)if(V.key==="ArrowLeft"){if(f.value<0&&$>0)return;const j=f.value>-1?f.value-1:Y-1;E.value[j]?f.value=j:(f.value=-1,s.value.setSelectionRange(I.value.length,I.value.length))}else if(V.key==="ArrowRight"){if(f.value<0)return;const j=f.value+1;E.value[j]?f.value=j:(f.value=-1,s.value.setSelectionRange(0,0))}else~f.value&&rv(V)&&(f.value=-1)}function X(){var V;t.eager&&((V=c.value)==null||V.calculateVisibleItems())}function K(){var V;a.value&&(o.value=!0,(V=s.value)==null||V.focus())}function z(V){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(!V||V.props.disabled))if(t.multiple){const Y=E.value.findIndex(j=>(t.valueComparator||Ks)(j.value,V.value)),Q=$??!~Y;if(~Y){const j=Q?[...E.value,V]:[...E.value];j.splice(Y,1),E.value=j}else Q&&(E.value=[...E.value,V]);t.clearOnSelect&&(I.value="")}else{const Y=$!==!1;E.value=Y?[V]:[],R.value=Y&&!w.value?V.title:"",$t(()=>{h.value=!1,o.value=!0})}}function re(V){a.value=!0,setTimeout(()=>{l.value=!0})}function ne(V){l.value=!1}function Z(V){(V==null||V===""&&!t.multiple&&!w.value)&&(E.value=[])}return Ie(a,(V,$)=>{if(!(V||V===$)&&(f.value=-1,h.value=!1,I.value)){if(t.multiple){z(ml(t,I.value));return}if(!w.value)return;E.value.some(Y=>{let{title:Q}=Y;return Q===I.value})?R.value="":z(ml(t,I.value))}}),Ie(h,()=>{if(!t.hideSelected&&h.value&&E.value.length){const V=D.value.findIndex($=>E.value.some(Y=>(t.valueComparator||Ks)(Y.value,$.value)));dn&&window.requestAnimationFrame(()=>{var $;V>=0&&(($=c.value)==null||$.scrollToIndex(V))})}}),Ie(()=>t.items,(V,$)=>{h.value||a.value&&!$.length&&V.length&&(h.value=!0)}),Ft(()=>{const V=!!(!t.hideNoData||D.value.length||i["prepend-item"]||i["append-item"]||i["no-data"]),$=E.value.length>0,Y=Vo.filterProps(t);return W(Vo,rt({ref:s},Y,{modelValue:I.value,"onUpdate:modelValue":[Q=>I.value=Q,Z],focused:a.value,"onUpdate:focused":Q=>a.value=Q,validationValue:E.externalValue,counterValue:A.value,dirty:$,class:["v-combobox",{"v-combobox--active-menu":h.value,"v-combobox--chips":!!t.chips,"v-combobox--selection-slot":!!w.value,"v-combobox--selecting-index":f.value>-1,[`v-combobox--${t.multiple?"multiple":"single"}`]:!0},t.class],style:t.style,readonly:T.isReadonly.value,placeholder:$?void 0:t.placeholder,"onClick:clear":N,"onMousedown:control":U,onKeydown:H}),{...i,default:()=>W(He,null,[W(Kv,rt({ref:u,modelValue:h.value,"onUpdate:modelValue":Q=>h.value=Q,activator:"parent",contentClass:"v-combobox__content",disabled:G.value,eager:t.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:t.transition,onAfterEnter:X,onAfterLeave:K},t.menuProps),{default:()=>[V&&W(qN,rt({ref:M,selected:L.value,selectStrategy:t.multiple?"independent":"single-independent",onMousedown:Q=>Q.preventDefault(),onKeydown:k,onFocusin:re,onFocusout:ne,tabindex:"-1","aria-live":"polite",color:t.itemColor??t.color},P,t.listProps),{default:()=>{var Q,j,se;return[(Q=i["prepend-item"])==null?void 0:Q.call(i),!D.value.length&&!t.hideNoData&&(((j=i["no-data"])==null?void 0:j.call(i))??W(Bl,{key:"no-data",title:r(t.noDataText)},null)),W(A6,{ref:c,renderless:!0,items:D.value},{default:fe=>{var me;let{item:ae,index:ce,itemRef:ue}=fe;const pe=rt(ae.props,{ref:ue,key:ae.value,active:q.value&&ce===0?!0:void 0,onClick:()=>z(ae,null)});return((me=i.item)==null?void 0:me.call(i,{item:ae,index:ce,props:pe}))??W(Bl,rt(pe,{role:"option"}),{prepend:ye=>{let{isSelected:we}=ye;return W(He,null,[t.multiple&&!t.hideSelected?W(Wv,{key:ae.value,modelValue:we,ripple:!1,tabindex:"-1"},null):void 0,ae.props.prependAvatar&&W(Ll,{image:ae.props.prependAvatar},null),ae.props.prependIcon&&W(Ot,{icon:ae.props.prependIcon},null)])},title:()=>{var ye,we;return o.value?ae.title:tge(ae.title,(ye=O(ae))==null?void 0:ye.title,((we=I.value)==null?void 0:we.length)??0)}})}}),(se=i["append-item"])==null?void 0:se.call(i)]}})]}),E.value.map((Q,j)=>{function se(ue){ue.stopPropagation(),ue.preventDefault(),z(Q,!1)}const fe={"onClick:close":se,onKeydown(ue){ue.key!=="Enter"&&ue.key!==" "||(ue.preventDefault(),ue.stopPropagation(),se(ue))},onMousedown(ue){ue.preventDefault(),ue.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},ae=C.value?!!i.chip:!!i.selection,ce=ae?cN(C.value?i.chip({item:Q,index:j,props:fe}):i.selection({item:Q,index:j})):void 0;if(!(ae&&!ce))return W("div",{key:Q.value,class:["v-combobox__selection",j===f.value&&["v-combobox__selection--selected",b.value]],style:j===f.value?y.value:{}},[C.value?i.chip?W(_i,{key:"chip-defaults",defaults:{VChip:{closable:t.closableChips,size:"small",text:Q.title}}},{default:()=>[ce]}):W(No,rt({key:"chip",closable:t.closableChips,size:"small",text:Q.title,disabled:Q.props.disabled},fe),null):ce??W("span",{class:"v-combobox__selection-text"},[Q.title,t.multiple&&j<E.value.length-1&&W("span",{class:"v-combobox__selection-comma"},[Et(",")])])])})]),"append-inner":function(){var fe;for(var Q=arguments.length,j=new Array(Q),se=0;se<Q;se++)j[se]=arguments[se];return W(He,null,[(fe=i["append-inner"])==null?void 0:fe.call(i,...j),(!t.hideNoData||t.items.length)&&t.menuIcon?W(Ot,{class:"v-combobox__menu-icon",icon:t.menuIcon,onMousedown:F,onClick:$te,"aria-label":r(p.value),title:r(p.value),tabindex:"-1"},null):void 0])}})}),tc({isFocused:a,isPristine:o,menu:h,search:I,selectionIndex:f,filteredItems:x,select:z},s)}}),rge=Ue({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:t=>!isNaN(parseFloat(t))},maxRows:{type:[Number,String],validator:t=>!isNaN(parseFloat(t))},suffix:String,modelModifiers:Object,...eb(),...AN()},"VTextarea"),sge=vt()({name:"VTextarea",directives:{Intersect:NN},inheritAttrs:!1,props:rge(),emits:{"click:control":t=>!0,"mousedown:control":t=>!0,"update:focused":t=>!0,"update:modelValue":t=>!0},setup(t,e){let{attrs:n,emit:i,slots:r}=e;const s=Fn(t,"modelValue"),{isFocused:a,focus:o,blur:l}=XS(t),u=te(()=>typeof t.counterValue=="function"?t.counterValue(s.value):(s.value||"").toString().length),c=te(()=>{if(n.maxlength)return n.maxlength;if(!(!t.counter||typeof t.counter!="number"&&typeof t.counter!="string"))return t.counter});function d(I,A){var x,O;!t.autofocus||!I||(O=(x=A[0].target)==null?void 0:x.focus)==null||O.call(x)}const h=ve(),f=ve(),S=ut(""),_=ve(),p=te(()=>t.persistentPlaceholder||a.value||t.active);function v(){var I;_.value!==document.activeElement&&((I=_.value)==null||I.focus()),a.value||o()}function m(I){v(),i("click:control",I)}function g(I){i("mousedown:control",I)}function b(I){I.stopPropagation(),v(),$t(()=>{s.value="",lN(t["onClick:clear"],I)})}function y(I){var x;const A=I.target;if(s.value=A.value,(x=t.modelModifiers)!=null&&x.trim){const O=[A.selectionStart,A.selectionEnd];$t(()=>{A.selectionStart=O[0],A.selectionEnd=O[1]})}}const E=ve(),T=ve(+t.rows),C=te(()=>["plain","underlined"].includes(t.variant));Wr(()=>{t.autoGrow||(T.value=+t.rows)});function w(){t.autoGrow&&$t(()=>{if(!E.value||!f.value)return;const I=getComputedStyle(E.value),A=getComputedStyle(f.value.$el),x=parseFloat(I.getPropertyValue("--v-field-padding-top"))+parseFloat(I.getPropertyValue("--v-input-padding-top"))+parseFloat(I.getPropertyValue("--v-field-padding-bottom")),O=E.value.scrollHeight,D=parseFloat(I.lineHeight),L=Math.max(parseFloat(t.rows)*D+x,parseFloat(A.getPropertyValue("--v-input-control-height"))),q=parseFloat(t.maxRows)*D+x||1/0,G=Lo(O??0,L,q);T.value=Math.floor((G-x)/D),S.value=Ht(G)})}Jn(w),Ie(s,w),Ie(()=>t.rows,w),Ie(()=>t.maxRows,w),Ie(()=>t.density,w);let R;return Ie(E,I=>{I?(R=new ResizeObserver(w),R.observe(E.value)):R==null||R.disconnect()}),Yi(()=>{R==null||R.disconnect()}),Ft(()=>{const I=!!(r.counter||t.counter||t.counterValue),A=!!(I||r.details),[x,O]=YS(n),{modelValue:D,...L}=Rd.filterProps(t),q=cq(t);return W(Rd,rt({ref:h,modelValue:s.value,"onUpdate:modelValue":G=>s.value=G,class:["v-textarea v-text-field",{"v-textarea--prefixed":t.prefix,"v-textarea--suffixed":t.suffix,"v-text-field--prefixed":t.prefix,"v-text-field--suffixed":t.suffix,"v-textarea--auto-grow":t.autoGrow,"v-textarea--no-resize":t.noResize||t.autoGrow,"v-input--plain-underlined":C.value},t.class],style:t.style},x,L,{centerAffix:T.value===1&&!C.value,focused:a.value}),{...r,default:G=>{let{id:M,isDisabled:P,isDirty:N,isReadonly:U,isValid:F}=G;return W(ON,rt({ref:f,style:{"--v-textarea-control-height":S.value},onClick:m,onMousedown:g,"onClick:clear":b,"onClick:prependInner":t["onClick:prependInner"],"onClick:appendInner":t["onClick:appendInner"]},q,{id:M.value,active:p.value||N.value,centerAffix:T.value===1&&!C.value,dirty:N.value||t.dirty,disabled:P.value,focused:a.value,error:F.value===!1}),{...r,default:k=>{let{props:{class:H,...X}}=k;return W(He,null,[t.prefix&&W("span",{class:"v-text-field__prefix"},[t.prefix]),Ar(W("textarea",rt({ref:_,class:H,value:s.value,onInput:y,autofocus:t.autofocus,readonly:U.value,disabled:P.value,placeholder:t.placeholder,rows:t.rows,name:t.name,onFocus:v,onBlur:l},X,O),null),[[Jl("intersect"),{handler:d},null,{once:!0}]]),t.autoGrow&&Ar(W("textarea",{class:[H,"v-textarea__sizer"],id:`${X.id}-sizer`,"onUpdate:modelValue":K=>s.value=K,ref:E,readonly:!0,"aria-hidden":"true"},null),[[YZ,s.value]]),t.suffix&&W("span",{class:"v-text-field__suffix"},[t.suffix])])}})},details:A?G=>{var M;return W(He,null,[(M=r.details)==null?void 0:M.call(r,G),I&&W(He,null,[W("span",null,null),W(nq,{active:t.persistentCounter||a.value,value:u.value,max:c.value,disabled:t.disabled},r.counter)])])}:void 0})}),tc({},h,f,_)}}),N6=Ke({__name:"ComponentArgInput",props:Ap({name:{},arg:{},instance:{},isSecret:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=kl(t,"modelValue"),n=ve(!1),i=te(()=>t.isSecret?n.value?"text":"password":"text"),r=te(()=>{var o;return t.isSecret?n.value?e.value:"*".repeat(((o=e.value)==null?void 0:o.length)??0):e.value}),s=te(()=>"type"in t.arg.schema?t.arg.schema.type:"unknown"),a=te(()=>s.value==="array"&&(t.arg.schema.items.type==="string"||t.arg.schema.items.type==="number"));return(o,l)=>{const u=Ime;return ie(s)==="string"&&!o.arg.schema.multiline?(_e(),Ne(Vo,{key:0,modelValue:e.value,"onUpdate:modelValue":l[1]||(l[1]=c=>e.value=c),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),style:{"max-height":"40px"},variant:"outlined",density:"compact",type:ie(i),placeholder:o.arg.schema.default,hint:o.arg.schema.description,"hide-details":""},FD({_:2},[o.isSecret?{name:"append-inner",fn:be(()=>[W(Ot,{onClick:l[0]||(l[0]=c=>n.value=!ie(n))},{default:be(()=>[Et(Nn(ie(n)?"mdi-eye-off":"mdi-eye"),1)]),_:1})]),key:"0"}:void 0]),1032,["modelValue","label","type","placeholder","hint"])):ie(s)==="string"&&o.arg.schema.multiline?(_e(),Ne(sge,{key:1,"model-value":ie(r),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),variant:"outlined",density:"compact",placeholder:o.arg.schema.default,"hide-details":"","onUpdate:modelValue":l[3]||(l[3]=c=>e.value=c)},FD({_:2},[o.isSecret?{name:"append-inner",fn:be(()=>[W(Ot,{onClick:l[2]||(l[2]=c=>n.value=!ie(n))},{default:be(()=>[Et(Nn(ie(n)?"mdi-eye-off":"mdi-eye"),1)]),_:1})]),key:"0"}:void 0]),1032,["model-value","label","placeholder"])):ie(s)==="number"?(_e(),Ne(Vo,{key:2,modelValue:e.value,"onUpdate:modelValue":l[4]||(l[4]=c=>e.value=c),modelModifiers:{number:!0},label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),style:{"max-height":"40px"},variant:"outlined",density:"compact",type:"number",placeholder:o.arg.schema.default,"hide-details":""},null,8,["modelValue","label","placeholder"])):ie(s)==="boolean"?(_e(),Ne(kme,{key:3,modelValue:e.value,"onUpdate:modelValue":l[5]||(l[5]=c=>e.value=c),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),density:"compact","hide-details":""},null,8,["modelValue","label"])):ie(a)?(_e(),Ne(ige,{key:4,modelValue:e.value,"onUpdate:modelValue":l[6]||(l[6]=c=>e.value=c),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),placeholder:o.arg.schema.default,variant:"outlined",density:"compact",multiple:"",chips:"","hide-details":""},null,8,["modelValue","label","placeholder"])):"anyOf"in o.arg.schema?(_e(),Ne(Qme,{key:5,modelValue:e.value,"onUpdate:modelValue":l[7]||(l[7]=c=>e.value=c),items:o.arg.schema.anyOf.map(c=>c.const),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),placeholder:o.arg.schema.default,variant:"outlined",density:"compact","hide-details":""},null,8,["modelValue","items","label","placeholder"])):ie(s)==="object"||ie(s)==="array"?(_e(),Ne(u,{key:6,modelValue:e.value,"onUpdate:modelValue":l[8]||(l[8]=c=>e.value=c),name:o.name,arg:o.arg},null,8,["modelValue","name","arg"])):mt("",!0)}}});var sn;(function(t){t.assertEqual=r=>r;function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const s={};for(const a of r)s[a]=a;return s},t.getValidEnumValues=r=>{const s=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),a={};for(const o of s)a[o]=r[o];return t.objectValues(a)},t.objectValues=r=>t.objectKeys(r).map(function(s){return r[s]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const s=[];for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&s.push(a);return s},t.find=(r,s)=>{for(const a of r)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function i(r,s=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=i,t.jsonStringifyReplacer=(r,s)=>typeof s=="bigint"?s.toString():s})(sn||(sn={}));var HO;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(HO||(HO={}));const tt=sn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),va=t=>{switch(typeof t){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return isNaN(t)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(t)?tt.array:t===null?tt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?tt.promise:typeof Map<"u"&&t instanceof Map?tt.map:typeof Set<"u"&&t instanceof Set?tt.set:typeof Date<"u"&&t instanceof Date?tt.date:tt.object;default:return tt.unknown}},xe=sn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),oge=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class os extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(s){return s.message},i={_errors:[]},r=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)i._errors.push(n(a));else{let o=i,l=0;for(;l<a.path.length;){const u=a.path[l];l===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(a))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return r(this),i}static assert(e){if(!(e instanceof os))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,sn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const r of this.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):i.push(e(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}os.create=t=>new os(t);const Bd=(t,e)=>{let n;switch(t.code){case xe.invalid_type:t.received===tt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case xe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,sn.jsonStringifyReplacer)}`;break;case xe.unrecognized_keys:n=`Unrecognized key(s) in object: ${sn.joinValues(t.keys,", ")}`;break;case xe.invalid_union:n="Invalid input";break;case xe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${sn.joinValues(t.options)}`;break;case xe.invalid_enum_value:n=`Invalid enum value. Expected ${sn.joinValues(t.options)}, received '${t.received}'`;break;case xe.invalid_arguments:n="Invalid function arguments";break;case xe.invalid_return_type:n="Invalid function return type";break;case xe.invalid_date:n="Invalid date";break;case xe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:sn.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case xe.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case xe.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case xe.custom:n="Invalid input";break;case xe.invalid_intersection_types:n="Intersection results could not be merged";break;case xe.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case xe.not_finite:n="Number must be finite";break;default:n=e.defaultError,sn.assertNever(t)}return{message:n}};let x6=Bd;function age(t){x6=t}function jv(){return x6}const Qv=t=>{const{data:e,path:n,errorMaps:i,issueData:r}=t,s=[...n,...r.path||[]],a={...r,path:s};if(r.message!==void 0)return{...r,path:s,message:r.message};let o="";const l=i.filter(u=>!!u).slice().reverse();for(const u of l)o=u(a,{data:e,defaultError:o}).message;return{...r,path:s,message:o}},lge=[];function Ye(t,e){const n=jv(),i=Qv({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Bd?void 0:Bd].filter(r=>!!r)});t.common.issues.push(i)}class lr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const r of n){if(r.status==="aborted")return xt;r.status==="dirty"&&e.dirty(),i.push(r.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const r of n){const s=await r.key,a=await r.value;i.push({key:s,value:a})}return lr.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const r of n){const{key:s,value:a}=r;if(s.status==="aborted"||a.status==="aborted")return xt;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}}const xt=Object.freeze({status:"aborted"}),id=t=>({status:"dirty",value:t}),Ir=t=>({status:"valid",value:t}),VO=t=>t.status==="aborted",zO=t=>t.status==="dirty",uu=t=>t.status==="valid",Xf=t=>typeof Promise<"u"&&t instanceof Promise;function Xv(t,e,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function D6(t,e,n,i,r){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var ft;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ft||(ft={}));var Qh,Xh;class Wo{constructor(e,n,i,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const sP=(t,e)=>{if(uu(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new os(t.common.issues);return this._error=n,this._error}}};function Ut(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:r}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(a,o)=>{var l,u;const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:(l=c??i)!==null&&l!==void 0?l:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:o.defaultError}},description:r}}class Vt{get description(){return this._def.description}_getType(e){return va(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:va(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new lr,ctx:{common:e.parent.common,data:e.data,parsedType:va(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Xf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){var i;const r={common:{issues:[],async:(i=n==null?void 0:n.async)!==null&&i!==void 0?i:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:va(e)},s=this._parseSync({data:e,path:r.path,parent:r});return sP(r,s)}"~validate"(e){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:va(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:r});return uu(s)?{value:s.value}:{issues:r.common.issues}}catch(s){!((i=(n=s==null?void 0:s.message)===null||n===void 0?void 0:n.toLowerCase())===null||i===void 0)&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>uu(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:va(e)},r=this._parse({data:e,path:i.path,parent:i}),s=await(Xf(r)?r:Promise.resolve(r));return sP(i,s)}refine(e,n){const i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,s)=>{const a=e(r),o=()=>s.addIssue({code:xe.custom,...i(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((i,r)=>e(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(e){return new eo({schema:this,typeName:Nt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Fo.create(this,this._def)}nullable(){return Yl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return js.create(this)}promise(){return Ud.create(this,this._def)}or(e){return tp.create([this,e],this._def)}and(e){return np.create(this,e,this._def)}transform(e){return new eo({...Ut(this._def),schema:this,typeName:Nt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ap({...Ut(this._def),innerType:this,defaultValue:n,typeName:Nt.ZodDefault})}brand(){return new Ax({typeName:Nt.ZodBranded,type:this,...Ut(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new lp({...Ut(this._def),innerType:this,catchValue:n,typeName:Nt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Vp.create(this,e)}readonly(){return cp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cge=/^c[^\s-]{8,}$/i,uge=/^[0-9a-z]+$/,dge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hge=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fge=/^[a-z0-9_-]{21}$/i,pge=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_ge=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mge=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cy;const vge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Sge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,bge=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ege=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yge=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cge=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,k6="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Tge=new RegExp(`^${k6}$`);function M6(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function wge(t){return new RegExp(`^${M6(t)}$`)}function L6(t){let e=`${k6}T${M6(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Rge(t,e){return!!((e==="v4"||!e)&&vge.test(t)||(e==="v6"||!e)&&bge.test(t))}function Age(t,e){if(!pge.test(t))return!1;try{const[n]=t.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!(typeof r!="object"||r===null||!r.typ||!r.alg||e&&r.alg!==e)}catch{return!1}}function Oge(t,e){return!!((e==="v4"||!e)&&Sge.test(t)||(e==="v6"||!e)&&Ege.test(t))}class qs extends Vt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==tt.string){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_type,expected:tt.string,received:s.parsedType}),xt}const i=new lr;let r;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(r=this._getOrReturnCtx(e,r),a?Ye(r,{code:xe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&Ye(r,{code:xe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")mge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"email",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")cy||(cy=new RegExp(gge,"u")),cy.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"emoji",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")hge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"uuid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")fge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"nanoid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")cge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"cuid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")uge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"cuid2",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")dge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"ulid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),Ye(r,{validation:"url",code:xe.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"regex",code:xe.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?L6(s).test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?Tge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?wge(s).test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?_ge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"duration",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?Rge(e.data,s.version)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"ip",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="jwt"?Age(e.data,s.alg)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"jwt",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="cidr"?Oge(e.data,s.version)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"cidr",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?yge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"base64",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="base64url"?Cge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"base64url",code:xe.invalid_string,message:s.message}),i.dirty()):sn.assertNever(s);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(r=>e.test(r),{validation:n,code:xe.invalid_string,...ft.errToObj(i)})}_addCheck(e){return new qs({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ft.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ft.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ft.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ft.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ft.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ft.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ft.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ft.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ft.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ft.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ft.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ft.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ft.errToObj(e)})}datetime(e){var n,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...ft.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ft.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ft.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ft.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ft.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ft.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ft.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ft.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ft.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ft.errToObj(n)})}nonempty(e){return this.min(1,ft.errToObj(e))}trim(){return new qs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}qs.create=t=>{var e;return new qs({checks:[],typeName:Nt.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ut(t)})};function Ige(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,r=n>i?n:i,s=parseInt(t.toFixed(r).replace(".","")),a=parseInt(e.toFixed(r).replace(".",""));return s%a/Math.pow(10,r)}class Vl extends Vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==tt.number){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_type,expected:tt.number,received:s.parsedType}),xt}let i;const r=new lr;for(const s of this._def.checks)s.kind==="int"?sn.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):s.kind==="multipleOf"?Ige(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.not_finite,message:s.message}),r.dirty()):sn.assertNever(s);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ft.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ft.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ft.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ft.toString(n))}setLimit(e,n,i,r){return new Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:ft.toString(r)}]})}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ft.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ft.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ft.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ft.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ft.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ft.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&sn.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Vl.create=t=>new Vl({checks:[],typeName:Nt.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ut(t)});class zl extends Vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==tt.bigint)return this._getInvalidInput(e);let i;const r=new lr;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):sn.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Ye(n,{code:xe.invalid_type,expected:tt.bigint,received:n.parsedType}),xt}gte(e,n){return this.setLimit("min",e,!0,ft.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ft.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ft.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ft.toString(n))}setLimit(e,n,i,r){return new zl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:ft.toString(r)}]})}_addCheck(e){return new zl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ft.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ft.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}zl.create=t=>{var e;return new zl({checks:[],typeName:Nt.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ut(t)})};class Zf extends Vt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==tt.boolean){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.boolean,received:i.parsedType}),xt}return Ir(e.data)}}Zf.create=t=>new Zf({typeName:Nt.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ut(t)});class du extends Vt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==tt.date){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_type,expected:tt.date,received:s.parsedType}),xt}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_date}),xt}const i=new lr;let r;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):sn.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new du({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ft.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ft.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}du.create=t=>new du({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Nt.ZodDate,...Ut(t)});class Zv extends Vt{_parse(e){if(this._getType(e)!==tt.symbol){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.symbol,received:i.parsedType}),xt}return Ir(e.data)}}Zv.create=t=>new Zv({typeName:Nt.ZodSymbol,...Ut(t)});class Jf extends Vt{_parse(e){if(this._getType(e)!==tt.undefined){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.undefined,received:i.parsedType}),xt}return Ir(e.data)}}Jf.create=t=>new Jf({typeName:Nt.ZodUndefined,...Ut(t)});class ep extends Vt{_parse(e){if(this._getType(e)!==tt.null){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.null,received:i.parsedType}),xt}return Ir(e.data)}}ep.create=t=>new ep({typeName:Nt.ZodNull,...Ut(t)});class Fd extends Vt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ir(e.data)}}Fd.create=t=>new Fd({typeName:Nt.ZodAny,...Ut(t)});class Wc extends Vt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ir(e.data)}}Wc.create=t=>new Wc({typeName:Nt.ZodUnknown,...Ut(t)});class ka extends Vt{_parse(e){const n=this._getOrReturnCtx(e);return Ye(n,{code:xe.invalid_type,expected:tt.never,received:n.parsedType}),xt}}ka.create=t=>new ka({typeName:Nt.ZodNever,...Ut(t)});class Jv extends Vt{_parse(e){if(this._getType(e)!==tt.undefined){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.void,received:i.parsedType}),xt}return Ir(e.data)}}Jv.create=t=>new Jv({typeName:Nt.ZodVoid,...Ut(t)});class js extends Vt{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),r=this._def;if(n.parsedType!==tt.array)return Ye(n,{code:xe.invalid_type,expected:tt.array,received:n.parsedType}),xt;if(r.exactLength!==null){const a=n.data.length>r.exactLength.value,o=n.data.length<r.exactLength.value;(a||o)&&(Ye(n,{code:a?xe.too_big:xe.too_small,minimum:o?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Ye(n,{code:xe.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Ye(n,{code:xe.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>r.type._parseAsync(new Wo(n,a,n.path,o)))).then(a=>lr.mergeArray(i,a));const s=[...n.data].map((a,o)=>r.type._parseSync(new Wo(n,a,n.path,o)));return lr.mergeArray(i,s)}get element(){return this._def.type}min(e,n){return new js({...this._def,minLength:{value:e,message:ft.toString(n)}})}max(e,n){return new js({...this._def,maxLength:{value:e,message:ft.toString(n)}})}length(e,n){return new js({...this._def,exactLength:{value:e,message:ft.toString(n)}})}nonempty(e){return this.min(1,e)}}js.create=(t,e)=>new js({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Nt.ZodArray,...Ut(e)});function ju(t){if(t instanceof Xn){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=Fo.create(ju(i))}return new Xn({...t._def,shape:()=>e})}else return t instanceof js?new js({...t._def,type:ju(t.element)}):t instanceof Fo?Fo.create(ju(t.unwrap())):t instanceof Yl?Yl.create(ju(t.unwrap())):t instanceof Ko?Ko.create(t.items.map(e=>ju(e))):t}class Xn extends Vt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=sn.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==tt.object){const u=this._getOrReturnCtx(e);return Ye(u,{code:xe.invalid_type,expected:tt.object,received:u.parsedType}),xt}const{status:i,ctx:r}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof ka&&this._def.unknownKeys==="strip"))for(const u in r.data)a.includes(u)||o.push(u);const l=[];for(const u of a){const c=s[u],d=r.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Wo(r,d,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof ka){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:r.data[c]}});else if(u==="strict")o.length>0&&(Ye(r,{code:xe.unrecognized_keys,keys:o}),i.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const d=r.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Wo(r,d,r.path,c)),alwaysSet:c in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>lr.mergeObjectSync(i,u)):lr.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return ft.errToObj,new Xn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{var r,s,a,o;const l=(a=(s=(r=this._def).errorMap)===null||s===void 0?void 0:s.call(r,n,i).message)!==null&&a!==void 0?a:i.defaultError;return n.code==="unrecognized_keys"?{message:(o=ft.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new Xn({...this._def,unknownKeys:"strip"})}passthrough(){return new Xn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Xn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Xn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Nt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Xn({...this._def,catchall:e})}pick(e){const n={};return sn.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new Xn({...this._def,shape:()=>n})}omit(e){const n={};return sn.objectKeys(this.shape).forEach(i=>{e[i]||(n[i]=this.shape[i])}),new Xn({...this._def,shape:()=>n})}deepPartial(){return ju(this)}partial(e){const n={};return sn.objectKeys(this.shape).forEach(i=>{const r=this.shape[i];e&&!e[i]?n[i]=r:n[i]=r.optional()}),new Xn({...this._def,shape:()=>n})}required(e){const n={};return sn.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])n[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Fo;)s=s._def.innerType;n[i]=s}}),new Xn({...this._def,shape:()=>n})}keyof(){return P6(sn.objectKeys(this.shape))}}Xn.create=(t,e)=>new Xn({shape:()=>t,unknownKeys:"strip",catchall:ka.create(),typeName:Nt.ZodObject,...Ut(e)});Xn.strictCreate=(t,e)=>new Xn({shape:()=>t,unknownKeys:"strict",catchall:ka.create(),typeName:Nt.ZodObject,...Ut(e)});Xn.lazycreate=(t,e)=>new Xn({shape:t,unknownKeys:"strip",catchall:ka.create(),typeName:Nt.ZodObject,...Ut(e)});class tp extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function r(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new os(o.ctx.common.issues));return Ye(n,{code:xe.invalid_union,unionErrors:a}),xt}if(n.common.async)return Promise.all(i.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let s;const a=[];for(const l of i){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new os(l));return Ye(n,{code:xe.invalid_union,unionErrors:o}),xt}}get options(){return this._def.options}}tp.create=(t,e)=>new tp({options:t,typeName:Nt.ZodUnion,...Ut(e)});const pa=t=>t instanceof rp?pa(t.schema):t instanceof eo?pa(t.innerType()):t instanceof sp?[t.value]:t instanceof ql?t.options:t instanceof op?sn.objectValues(t.enum):t instanceof ap?pa(t._def.innerType):t instanceof Jf?[void 0]:t instanceof ep?[null]:t instanceof Fo?[void 0,...pa(t.unwrap())]:t instanceof Yl?[null,...pa(t.unwrap())]:t instanceof Ax||t instanceof cp?pa(t.unwrap()):t instanceof lp?pa(t._def.innerType):[];class Eb extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==tt.object)return Ye(n,{code:xe.invalid_type,expected:tt.object,received:n.parsedType}),xt;const i=this.discriminator,r=n.data[i],s=this.optionsMap.get(r);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Ye(n,{code:xe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),xt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const r=new Map;for(const s of n){const a=pa(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(r.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);r.set(o,s)}}return new Eb({typeName:Nt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:r,...Ut(i)})}}function qO(t,e){const n=va(t),i=va(e);if(t===e)return{valid:!0,data:t};if(n===tt.object&&i===tt.object){const r=sn.objectKeys(e),s=sn.objectKeys(t).filter(o=>r.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=qO(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===tt.array&&i===tt.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=qO(a,o);if(!l.valid)return{valid:!1};r.push(l.data)}return{valid:!0,data:r}}else return n===tt.date&&i===tt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class np extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=(s,a)=>{if(VO(s)||VO(a))return xt;const o=qO(s.value,a.value);return o.valid?((zO(s)||zO(a))&&n.dirty(),{status:n.value,value:o.data}):(Ye(i,{code:xe.invalid_intersection_types}),xt)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>r(s,a)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}np.create=(t,e,n)=>new np({left:t,right:e,typeName:Nt.ZodIntersection,...Ut(n)});class Ko extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.array)return Ye(i,{code:xe.invalid_type,expected:tt.array,received:i.parsedType}),xt;if(i.data.length<this._def.items.length)return Ye(i,{code:xe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xt;!this._def.rest&&i.data.length>this._def.items.length&&(Ye(i,{code:xe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...i.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Wo(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>lr.mergeArray(n,a)):lr.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Ko({...this._def,rest:e})}}Ko.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ko({items:t,typeName:Nt.ZodTuple,rest:null,...Ut(e)})};class ip extends Vt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.object)return Ye(i,{code:xe.invalid_type,expected:tt.object,received:i.parsedType}),xt;const r=[],s=this._def.keyType,a=this._def.valueType;for(const o in i.data)r.push({key:s._parse(new Wo(i,o,i.path,o)),value:a._parse(new Wo(i,i.data[o],i.path,o)),alwaysSet:o in i.data});return i.common.async?lr.mergeObjectAsync(n,r):lr.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof Vt?new ip({keyType:e,valueType:n,typeName:Nt.ZodRecord,...Ut(i)}):new ip({keyType:qs.create(),valueType:e,typeName:Nt.ZodRecord,...Ut(n)})}}class eS extends Vt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.map)return Ye(i,{code:xe.invalid_type,expected:tt.map,received:i.parsedType}),xt;const r=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],u)=>({key:r._parse(new Wo(i,o,i.path,[u,"key"])),value:s._parse(new Wo(i,l,i.path,[u,"value"]))}));if(i.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return xt;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return xt;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}}}}eS.create=(t,e,n)=>new eS({valueType:e,keyType:t,typeName:Nt.ZodMap,...Ut(n)});class hu extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.set)return Ye(i,{code:xe.invalid_type,expected:tt.set,received:i.parsedType}),xt;const r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(Ye(i,{code:xe.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(Ye(i,{code:xe.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return xt;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const o=[...i.data.values()].map((l,u)=>s._parse(new Wo(i,l,i.path,u)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new hu({...this._def,minSize:{value:e,message:ft.toString(n)}})}max(e,n){return new hu({...this._def,maxSize:{value:e,message:ft.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}hu.create=(t,e)=>new hu({valueType:t,minSize:null,maxSize:null,typeName:Nt.ZodSet,...Ut(e)});class gd extends Vt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==tt.function)return Ye(n,{code:xe.invalid_type,expected:tt.function,received:n.parsedType}),xt;function i(o,l){return Qv({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jv(),Bd].filter(u=>!!u),issueData:{code:xe.invalid_arguments,argumentsError:l}})}function r(o,l){return Qv({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jv(),Bd].filter(u=>!!u),issueData:{code:xe.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ud){const o=this;return Ir(async function(...l){const u=new os([]),c=await o._def.args.parseAsync(l,s).catch(f=>{throw u.addIssue(i(l,f)),u}),d=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(d,s).catch(f=>{throw u.addIssue(r(d,f)),u})})}else{const o=this;return Ir(function(...l){const u=o._def.args.safeParse(l,s);if(!u.success)throw new os([i(l,u.error)]);const c=Reflect.apply(a,this,u.data),d=o._def.returns.safeParse(c,s);if(!d.success)throw new os([r(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new gd({...this._def,args:Ko.create(e).rest(Wc.create())})}returns(e){return new gd({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new gd({args:e||Ko.create([]).rest(Wc.create()),returns:n||Wc.create(),typeName:Nt.ZodFunction,...Ut(i)})}}class rp extends Vt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}rp.create=(t,e)=>new rp({getter:t,typeName:Nt.ZodLazy,...Ut(e)});class sp extends Vt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Ye(n,{received:n.data,code:xe.invalid_literal,expected:this._def.value}),xt}return{status:"valid",value:e.data}}get value(){return this._def.value}}sp.create=(t,e)=>new sp({value:t,typeName:Nt.ZodLiteral,...Ut(e)});function P6(t,e){return new ql({values:t,typeName:Nt.ZodEnum,...Ut(e)})}class ql extends Vt{constructor(){super(...arguments),Qh.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return Ye(n,{expected:sn.joinValues(i),received:n.parsedType,code:xe.invalid_type}),xt}if(Xv(this,Qh)||D6(this,Qh,new Set(this._def.values)),!Xv(this,Qh).has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return Ye(n,{received:n.data,code:xe.invalid_enum_value,options:i}),xt}return Ir(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ql.create(e,{...this._def,...n})}exclude(e,n=this._def){return ql.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}Qh=new WeakMap;ql.create=P6;class op extends Vt{constructor(){super(...arguments),Xh.set(this,void 0)}_parse(e){const n=sn.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==tt.string&&i.parsedType!==tt.number){const r=sn.objectValues(n);return Ye(i,{expected:sn.joinValues(r),received:i.parsedType,code:xe.invalid_type}),xt}if(Xv(this,Xh)||D6(this,Xh,new Set(sn.getValidEnumValues(this._def.values))),!Xv(this,Xh).has(e.data)){const r=sn.objectValues(n);return Ye(i,{received:i.data,code:xe.invalid_enum_value,options:r}),xt}return Ir(e.data)}get enum(){return this._def.values}}Xh=new WeakMap;op.create=(t,e)=>new op({values:t,typeName:Nt.ZodNativeEnum,...Ut(e)});class Ud extends Vt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==tt.promise&&n.common.async===!1)return Ye(n,{code:xe.invalid_type,expected:tt.promise,received:n.parsedType}),xt;const i=n.parsedType===tt.promise?n.data:Promise.resolve(n.data);return Ir(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ud.create=(t,e)=>new Ud({type:t,typeName:Nt.ZodPromise,...Ut(e)});class eo extends Vt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:a=>{Ye(i,a),a.fatal?n.abort():n.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),r.type==="preprocess"){const a=r.transform(i.data,s);if(i.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return xt;const l=await this._def.schema._parseAsync({data:o,path:i.path,parent:i});return l.status==="aborted"?xt:l.status==="dirty"||n.value==="dirty"?id(l.value):l});{if(n.value==="aborted")return xt;const o=this._def.schema._parseSync({data:a,path:i.path,parent:i});return o.status==="aborted"?xt:o.status==="dirty"||n.value==="dirty"?id(o.value):o}}if(r.type==="refinement"){const a=o=>{const l=r.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){const o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?xt:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?xt:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(r.type==="transform")if(i.common.async===!1){const a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!uu(a))return a;const o=r.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>uu(a)?Promise.resolve(r.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);sn.assertNever(r)}}eo.create=(t,e,n)=>new eo({schema:t,typeName:Nt.ZodEffects,effect:e,...Ut(n)});eo.createWithPreprocess=(t,e,n)=>new eo({schema:e,effect:{type:"preprocess",transform:t},typeName:Nt.ZodEffects,...Ut(n)});class Fo extends Vt{_parse(e){return this._getType(e)===tt.undefined?Ir(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fo.create=(t,e)=>new Fo({innerType:t,typeName:Nt.ZodOptional,...Ut(e)});class Yl extends Vt{_parse(e){return this._getType(e)===tt.null?Ir(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Yl.create=(t,e)=>new Yl({innerType:t,typeName:Nt.ZodNullable,...Ut(e)});class ap extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===tt.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ap.create=(t,e)=>new ap({innerType:t,typeName:Nt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ut(e)});class lp extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Xf(r)?r.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new os(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new os(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}lp.create=(t,e)=>new lp({innerType:t,typeName:Nt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ut(e)});class tS extends Vt{_parse(e){if(this._getType(e)!==tt.nan){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.nan,received:i.parsedType}),xt}return{status:"valid",value:e.data}}}tS.create=t=>new tS({typeName:Nt.ZodNaN,...Ut(t)});const Nge=Symbol("zod_brand");class Ax extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Vp extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?xt:s.status==="dirty"?(n.dirty(),id(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{const r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?xt:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(e,n){return new Vp({in:e,out:n,typeName:Nt.ZodPipeline})}}class cp extends Vt{_parse(e){const n=this._def.innerType._parse(e),i=r=>(uu(r)&&(r.value=Object.freeze(r.value)),r);return Xf(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}}cp.create=(t,e)=>new cp({innerType:t,typeName:Nt.ZodReadonly,...Ut(e)});function oP(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function B6(t,e={},n){return t?Fd.create().superRefine((i,r)=>{var s,a;const o=t(i);if(o instanceof Promise)return o.then(l=>{var u,c;if(!l){const d=oP(e,i),h=(c=(u=d.fatal)!==null&&u!==void 0?u:n)!==null&&c!==void 0?c:!0;r.addIssue({code:"custom",...d,fatal:h})}});if(!o){const l=oP(e,i),u=(a=(s=l.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0;r.addIssue({code:"custom",...l,fatal:u})}}):Fd.create()}const xge={object:Xn.lazycreate};var Nt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Nt||(Nt={}));const Dge=(t,e={message:`Input not instance of ${t.name}`})=>B6(n=>n instanceof t,e),F6=qs.create,U6=Vl.create,kge=tS.create,Mge=zl.create,$6=Zf.create,Lge=du.create,Pge=Zv.create,Bge=Jf.create,Fge=ep.create,Uge=Fd.create,$ge=Wc.create,Gge=ka.create,Hge=Jv.create,Vge=js.create,zge=Xn.create,qge=Xn.strictCreate,Yge=tp.create,Wge=Eb.create,Kge=np.create,jge=Ko.create,Qge=ip.create,Xge=eS.create,Zge=hu.create,Jge=gd.create,eve=rp.create,tve=sp.create,nve=ql.create,ive=op.create,rve=Ud.create,aP=eo.create,sve=Fo.create,ove=Yl.create,ave=eo.createWithPreprocess,lve=Vp.create,cve=()=>F6().optional(),uve=()=>U6().optional(),dve=()=>$6().optional(),hve={string:t=>qs.create({...t,coerce:!0}),number:t=>Vl.create({...t,coerce:!0}),boolean:t=>Zf.create({...t,coerce:!0}),bigint:t=>zl.create({...t,coerce:!0}),date:t=>du.create({...t,coerce:!0})},fve=xt;var Re=Object.freeze({__proto__:null,defaultErrorMap:Bd,setErrorMap:age,getErrorMap:jv,makeIssue:Qv,EMPTY_PATH:lge,addIssueToContext:Ye,ParseStatus:lr,INVALID:xt,DIRTY:id,OK:Ir,isAborted:VO,isDirty:zO,isValid:uu,isAsync:Xf,get util(){return sn},get objectUtil(){return HO},ZodParsedType:tt,getParsedType:va,ZodType:Vt,datetimeRegex:L6,ZodString:qs,ZodNumber:Vl,ZodBigInt:zl,ZodBoolean:Zf,ZodDate:du,ZodSymbol:Zv,ZodUndefined:Jf,ZodNull:ep,ZodAny:Fd,ZodUnknown:Wc,ZodNever:ka,ZodVoid:Jv,ZodArray:js,ZodObject:Xn,ZodUnion:tp,ZodDiscriminatedUnion:Eb,ZodIntersection:np,ZodTuple:Ko,ZodRecord:ip,ZodMap:eS,ZodSet:hu,ZodFunction:gd,ZodLazy:rp,ZodLiteral:sp,ZodEnum:ql,ZodNativeEnum:op,ZodPromise:Ud,ZodEffects:eo,ZodTransformer:eo,ZodOptional:Fo,ZodNullable:Yl,ZodDefault:ap,ZodCatch:lp,ZodNaN:tS,BRAND:Nge,ZodBranded:Ax,ZodPipeline:Vp,ZodReadonly:cp,custom:B6,Schema:Vt,ZodSchema:Vt,late:xge,get ZodFirstPartyTypeKind(){return Nt},coerce:hve,any:Uge,array:Vge,bigint:Mge,boolean:$6,date:Lge,discriminatedUnion:Wge,effect:aP,enum:nve,function:Jge,instanceof:Dge,intersection:Kge,lazy:eve,literal:tve,map:Xge,nan:kge,nativeEnum:ive,never:Gge,null:Fge,nullable:ove,number:U6,object:zge,oboolean:dve,onumber:uve,optional:sve,ostring:cve,pipeline:lve,preprocess:ave,promise:rve,record:Qge,set:Zge,strictObject:qge,string:F6,symbol:Pge,transformer:aP,tuple:jge,undefined:Bge,union:Yge,unknown:$ge,void:Hge,NEVER:fve,ZodIssueCode:xe,quotelessJson:oge,ZodError:os});const Ox=Re.object({x:Re.number(),y:Re.number()}),yb=Re.object({instanceId:Re.string(),output:Re.string()}),nS=Re.object({hubId:Re.string()}),pve=Re.object({args:Re.record(Re.unknown()).optional(),inputs:Re.record(Re.array(yb)).optional(),hubInputs:Re.record(Re.array(nS)).optional(),injectionInputs:Re.array(nS).optional(),position:Ox.optional()}),lP=Re.object({id:Re.string(),type:Re.string(),name:Re.string(),...pve.shape,parentId:Re.string().optional(),outputs:Re.record(Re.array(yb)).optional()});Re.object({instance:lP,children:Re.array(lP)});Re.object({position:Ox.optional(),inputs:Re.array(yb).optional(),injectionInputs:Re.array(nS).optional()});Re.object({id:Re.string().nanoid(),position:Ox,inputs:Re.array(yb).optional(),injectionInputs:Re.array(nS).optional()});var G6={done:!1,hasNext:!1};function cP(t,...e){let n=t,i=e.map(s=>"lazy"in s?_ve(s):void 0),r=0;for(;r<e.length;){if(i[r]===void 0||!mve(n)){let l=e[r];n=l(n),r+=1;continue}let s=[];for(let l=r;l<e.length;l++){let u=i[l];if(u===void 0||(s.push(u),u.isSingle))break}let a=[];for(let l of n)if(H6(l,a,s))break;let{isSingle:o}=s.at(-1);n=o?a[0]:a,r+=s.length}return n}function H6(t,e,n){if(n.length===0)return e.push(t),!1;let i=t,r=G6,s=!1;for(let[a,o]of n.entries()){let{index:l,items:u}=o;if(u.push(i),r=o(i,l,u),o.index+=1,r.hasNext){if(r.hasMany??!1){for(let c of r.next)if(H6(c,e,n.slice(a+1)))return!0;return s}i=r.next}if(!r.hasNext)break;r.done&&(s=!0)}return r.hasNext&&e.push(i),s}function _ve(t){let{lazy:e,lazyArgs:n}=t,i=e(...n);return Object.assign(i,{isSingle:e.single??!1,index:0,items:[]})}function mve(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}function gve(t,e){let n=e.length-t.length;if(n===1){let[i,...r]=e;return cP(i,{lazy:t,lazyArgs:r})}if(n===0){let i={lazy:t,lazyArgs:e};return Object.assign(r=>cP(r,i),i)}throw new Error("Wrong number of arguments")}function vve(t,e,n){let i=r=>t(r,...e);return n===void 0?i:Object.assign(i,{lazy:n,lazyArgs:e})}function V6(t,e,n){let i=t.length-e.length;if(i===0)return t(...e);if(i===1)return vve(t,e,n);throw new Error("Wrong number of arguments")}function z6(...t){return gve(Sve,t)}function Sve(){let t=new Set;return e=>t.has(e)?G6:(t.add(e),{done:!1,hasNext:!0,next:e})}function uP(...t){return V6(bve,t)}function bve(t,e){let n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function Eve(...t){return V6(Object.fromEntries,t)}const yve=Re.enum(["not_created","updating","destroying","refreshing","created","error","pending","unknown"]),Cve=Re.object({name:Re.string(),value:Re.string().optional(),displayName:Re.string().optional(),sensitive:Re.boolean().optional(),url:Re.string().optional()}),Ix=Re.object({name:Re.string(),contentType:Re.string(),isBinary:Re.boolean().optional()});Re.object({...Ix.shape,content:Re.string()});const Tve=Re.union([Re.object({type:Re.literal("markdown"),content:Re.string()}),Re.object({type:Re.literal("qr"),content:Re.string(),showContent:Re.coerce.boolean(),language:Re.string().optional()}),Re.object({type:Re.literal("file"),fileMeta:Ix})]),q6=Re.object({name:Re.string(),title:Re.string()});Re.object({...q6.shape,content:Re.array(Tve)});const Y6=Re.object({name:Re.string(),title:Re.string(),description:Re.string().optional()}),wve=Re.object({content:Re.string().optional(),isBinary:Re.boolean().optional()});Re.object({...Y6.shape,image:Re.string(),command:Re.string().array(),cwd:Re.string().optional(),env:Re.record(Re.string()).optional(),files:Re.record(wve).optional()});const Rve=Re.union([Re.object({type:Re.literal("before-destroy")}),Re.object({type:Re.literal("schedule"),schedule:Re.string()})]),Ave=Re.object({name:Re.string(),title:Re.string(),description:Re.string().optional(),spec:Rve});Re.object({name:Re.string()});const Ove=Re.object({id:Re.string(),parentId:Re.string().nullable().default(null),status:yve,latestOperationId:Re.string().nullable().default(null),currentResourceCount:Re.number().nullable().default(null),totalResourceCount:Re.number().nullable().default(null),inputHash:Re.string().nullable().default(null),outputHash:Re.string().nullable().default(null),error:Re.string().nullable().default(null),statusFields:Re.array(Cve).default(()=>[]),files:Re.array(Ix).default(()=>[]),pages:Re.array(q6).default(()=>[]),terminals:Re.array(Y6).default(()=>[]),triggers:Re.array(Ave).default(()=>[])});Re.object({...Ove.shape,secrets:Re.record(Re.string()).nullable(),logLine:Re.string().nullable()}).partial();function W6(t,e="not_created",n={}){return{id:t,parentId:null,status:e,latestOperationId:null,currentResourceCount:null,totalResourceCount:null,inputHash:null,outputHash:null,error:null,statusFields:[],files:[],pages:[],terminals:[],triggers:[],...n}}function Ive(t,e){if(!e.id)throw new Error("The ID of the instance state is required.");let n=t.get(e.id);return n||(n=W6(e.id,"unknown"),t.set(e.id,n)),e.status!==void 0&&(n.status=e.status),e.latestOperationId!==void 0&&(n.latestOperationId=e.latestOperationId),e.currentResourceCount!==void 0&&(n.currentResourceCount=e.currentResourceCount),e.totalResourceCount!==void 0&&(n.totalResourceCount=e.totalResourceCount),e.inputHash!==void 0&&(n.inputHash=e.inputHash),e.outputHash!==void 0&&(n.outputHash=e.outputHash),e.error!==void 0&&(n.error=e.error),e.statusFields!==void 0&&(n.statusFields=e.statusFields),e.files!==void 0&&(n.files=e.files),e.pages!==void 0&&(n.pages=e.pages),e.terminals!==void 0&&(n.terminals=e.terminals),e.triggers!==void 0&&(n.triggers=e.triggers),n}const K6=Re.enum(["update","destroy","recreate","refresh","evaluate"]),Nve=Re.enum(["pending","evaluating","running","completed","failed","cancelled"]);Re.object({id:Re.string().uuid(),projectId:Re.string(),type:K6,status:Nve,instanceIds:Re.array(Re.string()),error:Re.string().nullable(),startedAt:Re.number(),completedAt:Re.number().nullable()});Re.object({projectId:Re.string(),type:K6,instanceIds:Re.array(Re.string())});class xve extends Error{constructor(e){super(`Circular dependency detected: ${e.join(" -> ")}`),this.name="CircularDependencyError"}}function Dve(){return{promiseCache:new Map}}function Nx(t){return(e,n,i)=>{i??(i=Dve());const r=(s,a)=>{n.trace({itemId:s},"resolving item");const o=i.promiseCache.get(s);if(o)return o;if(a.includes(s))throw new xve([...a,s]);const l=e.get(s);if(!l)return Promise.resolve(void 0);const c=(async()=>{var S;const d=z6(t.getNodeDependencies(l));(S=i.setDependencies)==null||S.call(i,s,d),n.trace({itemId:s,dependencies:d},"resolving item dependencies");const h=new Map,f=[...a,s];for(const _ of d){const p=await r(_,f);p!==void 0&&h.set(_,p)}return await t.process(l,h,n)})().then(d=>{var h;return i.promiseCache.get(s)===c&&((h=i.setOutput)==null||h.call(i,s,d)),d});return i.promiseCache.set(s,c),c};return s=>r(s,[])}}const kve=Nx({getNodeId(t){return t.kind==="hub"?`hub:${t.hub.id}`:`instance:${t.instance.id}`},getNodeDependencies(t){const e=[];if(t.kind==="hub"){for(const n of t.hub.inputs??[])e.push(`instance:${n.instanceId}`);for(const n of t.hub.injectionInputs??[])e.push(`hub:${n.hubId}`);return e}for(const n of Object.values(t.instance.hubInputs??{}))for(const i of n)e.push(`hub:${i.hubId}`);for(const n of t.instance.injectionInputs??[])e.push(`hub:${n.hubId}`);return e},process(t,e,n){var c;const i=d=>{const h=e.get(`hub:${d.hubId}`);if(!h)throw new Error("Hub not found");if(h.kind!=="hub")throw new Error("Expected hub node");return h},r=d=>{const h=e.get(`instance:${d.instanceId}`);if(!h)throw new Error("Instance not found");if(h.kind!=="instance")throw new Error("Expected instance node");return h};if(t.kind==="hub"){const d=new Map,h=f=>{d.set(`${f.input.instanceId}:${f.input.output}`,f)};for(const f of t.hub.inputs??[]){const{component:S}=r(f),_=S.outputs[f.output];if(!_){n.warn({msg:"output not found in the component",input:f,component:S});continue}h({input:f,type:_.type})}for(const f of t.hub.injectionInputs??[]){const{resolvedInputs:S}=i(f);for(const _ of S)h(_)}return{kind:"hub",resolvedInputs:Array.from(d.values())}}const s=new Map,a=(d,h)=>{let f=s.get(d);f||(f=new Map,s.set(d,f)),f.set(`${h.input.instanceId}:${h.input.output}`,h)};for(const[d,h]of Object.entries(t.instance.inputs??{}))for(const f of h){const S=t.component.inputs[d];if(!S){n.warn({msg:"input not found in the component",input:f,component:t.component});continue}a(d,{input:f,type:S.type})}const o=new Map,l=new Map;for(const d of t.instance.injectionInputs??[]){const{resolvedInputs:h}=i(d);for(const f of h)o.set(`${f.input.instanceId}:${f.input.output}`,f)}for(const[d,h]of Object.entries(t.component.inputs??{})){const f=new Map(o),S=((c=t.instance.hubInputs)==null?void 0:c[d])??[];for(const _ of S){const{resolvedInputs:p}=i(_);for(const v of p)f.set(`${v.input.instanceId}:${v.input.output}`,v)}for(const _ of f.values())if(_.type===h.type){a(d,_);const p=`${_.input.instanceId}:${_.input.output}`;o.has(p)&&l.set(p,_)}}const u=Eve(Array.from(s.entries()).map(([d,h])=>[d,Array.from(h.values())]));return{kind:"instance",component:t.component,resolvedInputs:u,resolvedInjectionInputs:Array.from(o.values()),matchedInjectionInputs:Array.from(l.values())}}});function Mve(t){if(t.kind!=="hub")throw new Error("Expected hub node");return t.resolvedInputs}function xx(t){if(t.kind!=="instance")throw new Error("Expected instance node");return t.resolvedInputs}function Lve(t){if(t.kind!=="instance")throw new Error("Expected instance node");return t.resolvedInjectionInputs}function j6(t){if(t.kind!=="instance")throw new Error("Expected instance node");return t.matchedInjectionInputs}const Pve=t=>{const e=new DataView(t);let n="";for(let i=0;i<e.byteLength;i+=4)n+=e.getUint32(i).toString(16).padStart(8,"0");return n},Bve=t=>async(e,{outputFormat:n="hex"}={})=>{typeof e=="string"&&(e=new globalThis.TextEncoder().encode(e));const i=await globalThis.crypto.subtle.digest(t,e);return n==="hex"?Pve(i):i},Fve=Bve("SHA-256"),Uve=Nx({getNodeId:t=>t.instance.id,getNodeDependencies({resolvedInputs:t}){const e=[];for(const n of Object.values(t??{}))for(const i of n)e.push(i.input.instanceId);return e},async process({instance:t,resolvedInputs:e,sourceHash:n,state:i},r){let s=JSON.stringify(t.args??{});n&&(s+=n),i!=null&&i.outputHash&&(s+=i.outputHash);const a=Object.entries(e).sort(([o],[l])=>o.localeCompare(l));for(const[o,l]of a){if(Object.keys(l).length===0)continue;s+=o;const u=l.map(c=>c.input.instanceId);u.sort();for(const c of u)s+=r.get(c)}return await Fve(s)}});function Dx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var j_={exports:{}},uy={},ca={},yc={},dy={},hy={},fy={},dP;function iS(){return dP||(dP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends e{constructor(m){if(super(),!t.IDENTIFIER.test(m))throw new Error("CodeGen: name must be a valid identifier");this.str=m}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends e{constructor(m){super(),this._items=typeof m=="string"?[m]:m}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const m=this._items[0];return m===""||m==='""'}get str(){var m;return(m=this._str)!==null&&m!==void 0?m:this._str=this._items.reduce((g,b)=>`${g}${b}`,"")}get names(){var m;return(m=this._names)!==null&&m!==void 0?m:this._names=this._items.reduce((g,b)=>(b instanceof n&&(g[b.str]=(g[b.str]||0)+1),g),{})}}t._Code=i,t.nil=new i("");function r(v,...m){const g=[v[0]];let b=0;for(;b<m.length;)o(g,m[b]),g.push(v[++b]);return new i(g)}t._=r;const s=new i("+");function a(v,...m){const g=[f(v[0])];let b=0;for(;b<m.length;)g.push(s),o(g,m[b]),g.push(s,f(v[++b]));return l(g),new i(g)}t.str=a;function o(v,m){m instanceof i?v.push(...m._items):m instanceof n?v.push(m):v.push(d(m))}t.addCodeArg=o;function l(v){let m=1;for(;m<v.length-1;){if(v[m]===s){const g=u(v[m-1],v[m+1]);if(g!==void 0){v.splice(m-1,3,g);continue}v[m++]="+"}m++}}function u(v,m){if(m==='""')return v;if(v==='""')return m;if(typeof v=="string")return m instanceof n||v[v.length-1]!=='"'?void 0:typeof m!="string"?`${v.slice(0,-1)}${m}"`:m[0]==='"'?v.slice(0,-1)+m.slice(1):void 0;if(typeof m=="string"&&m[0]==='"'&&!(v instanceof n))return`"${v}${m.slice(1)}`}function c(v,m){return m.emptyStr()?v:v.emptyStr()?m:a`${v}${m}`}t.strConcat=c;function d(v){return typeof v=="number"||typeof v=="boolean"||v===null?v:f(Array.isArray(v)?v.join(","):v)}function h(v){return new i(f(v))}t.stringify=h;function f(v){return JSON.stringify(v).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=f;function S(v){return typeof v=="string"&&t.IDENTIFIER.test(v)?new i(`.${v}`):r`[${v}]`}t.getProperty=S;function _(v){if(typeof v=="string"&&t.IDENTIFIER.test(v))return new i(`${v}`);throw new Error(`CodeGen: invalid export name: ${v}, use explicit $id name mapping`)}t.getEsmExportName=_;function p(v){return new i(v.toString())}t.regexpCode=p}(fy)),fy}var py={},hP;function fP(){return hP||(hP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=iS();class n extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var i;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(i||(t.UsedValueState=i={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class r{constructor({prefixes:u,parent:c}={}){this._names={},this._prefixes=u,this._parent=c}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){const c=this._names[u]||this._nameGroup(u);return`${u}${c.index++}`}_nameGroup(u){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}t.Scope=r;class s extends e.Name{constructor(u,c){super(c),this.prefix=u}setValue(u,{property:c,itemIndex:d}){this.value=u,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}t.ValueScopeName=s;const a=(0,e._)`\n`;class o extends r{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:e.nil}}get(){return this._scope}name(u){return new s(u,this._newName(u))}value(u,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(u),{prefix:f}=h,S=(d=c.key)!==null&&d!==void 0?d:c.ref;let _=this._values[f];if(_){const m=_.get(S);if(m)return m}else _=this._values[f]=new Map;_.set(S,h);const p=this._scope[f]||(this._scope[f]=[]),v=p.length;return p[v]=c.ref,h.setValue(c,{property:f,itemIndex:v}),h}getValue(u,c){const d=this._values[u];if(d)return d.get(c)}scopeRefs(u,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${u}${d.scopePath}`})}scopeCode(u=this._values,c,d){return this._reduceValues(u,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},c,d)}_reduceValues(u,c,d={},h){let f=e.nil;for(const S in u){const _=u[S];if(!_)continue;const p=d[S]=d[S]||new Map;_.forEach(v=>{if(p.has(v))return;p.set(v,i.Started);let m=c(v);if(m){const g=this.opts.es5?t.varKinds.var:t.varKinds.const;f=(0,e._)`${f}${g} ${v} = ${m};${this.opts._n}`}else if(m=h==null?void 0:h(v))f=(0,e._)`${f}${m}${this.opts._n}`;else throw new n(v);p.set(v,i.Completed)})}return f}}t.ValueScope=o}(py)),py}var pP;function Xt(){return pP||(pP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=iS(),n=fP();var i=iS();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=fP();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(k,H){return this}}class a extends s{constructor(k,H,X){super(),this.varKind=k,this.name=H,this.rhs=X}render({es5:k,_n:H}){const X=k?n.varKinds.var:this.varKind,K=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${K};`+H}optimizeNames(k,H){if(k[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,k,H)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(k,H,X){super(),this.lhs=k,this.rhs=H,this.sideEffects=X}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,H){if(!(this.lhs instanceof e.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=O(this.rhs,k,H),this}get names(){const k=this.lhs instanceof e.Name?{}:{...this.lhs.names};return x(k,this.rhs)}}class l extends o{constructor(k,H,X,K){super(k,X,K),this.op=H}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class u extends s{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class c extends s{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class d extends s{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class h extends s{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,H){return this.code=O(this.code,k,H),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class f extends s{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((H,X)=>H+X.render(k),"")}optimizeNodes(){const{nodes:k}=this;let H=k.length;for(;H--;){const X=k[H].optimizeNodes();Array.isArray(X)?k.splice(H,1,...X):X?k[H]=X:k.splice(H,1)}return k.length>0?this:void 0}optimizeNames(k,H){const{nodes:X}=this;let K=X.length;for(;K--;){const z=X[K];z.optimizeNames(k,H)||(D(k,z.names),X.splice(K,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((k,H)=>A(k,H.names),{})}}class S extends f{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class _ extends f{}class p extends S{}p.kind="else";class v extends S{constructor(k,H){super(H),this.condition=k}render(k){let H=`if(${this.condition})`+super.render(k);return this.else&&(H+="else "+this.else.render(k)),H}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let H=this.else;if(H){const X=H.optimizeNodes();H=this.else=Array.isArray(X)?new p(X):X}if(H)return k===!1?H instanceof v?H:H.nodes:this.nodes.length?this:new v(L(k),H instanceof v?[H]:H.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,H){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(k,H),!!(super.optimizeNames(k,H)||this.else))return this.condition=O(this.condition,k,H),this}get names(){const k=super.names;return x(k,this.condition),this.else&&A(k,this.else.names),k}}v.kind="if";class m extends S{}m.kind="for";class g extends m{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,H){if(super.optimizeNames(k,H))return this.iteration=O(this.iteration,k,H),this}get names(){return A(super.names,this.iteration.names)}}class b extends m{constructor(k,H,X,K){super(),this.varKind=k,this.name=H,this.from=X,this.to=K}render(k){const H=k.es5?n.varKinds.var:this.varKind,{name:X,from:K,to:z}=this;return`for(${H} ${X}=${K}; ${X}<${z}; ${X}++)`+super.render(k)}get names(){const k=x(super.names,this.from);return x(k,this.to)}}class y extends m{constructor(k,H,X,K){super(),this.loop=k,this.varKind=H,this.name=X,this.iterable=K}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,H){if(super.optimizeNames(k,H))return this.iterable=O(this.iterable,k,H),this}get names(){return A(super.names,this.iterable.names)}}class E extends S{constructor(k,H,X){super(),this.name=k,this.args=H,this.async=X}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}E.kind="func";class T extends f{render(k){return"return "+super.render(k)}}T.kind="return";class C extends S{render(k){let H="try"+super.render(k);return this.catch&&(H+=this.catch.render(k)),this.finally&&(H+=this.finally.render(k)),H}optimizeNodes(){var k,H;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(H=this.finally)===null||H===void 0||H.optimizeNodes(),this}optimizeNames(k,H){var X,K;return super.optimizeNames(k,H),(X=this.catch)===null||X===void 0||X.optimizeNames(k,H),(K=this.finally)===null||K===void 0||K.optimizeNames(k,H),this}get names(){const k=super.names;return this.catch&&A(k,this.catch.names),this.finally&&A(k,this.finally.names),k}}class w extends S{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}w.kind="catch";class R extends S{render(k){return"finally"+super.render(k)}}R.kind="finally";class I{constructor(k,H={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...H,_n:H.lines?`
|
|
51
|
+
`)===x)return;const O=!r.value.state.selection.ranges.every(D=>D.anchor<x.length&&D.head<x.length);r.value.dispatch({changes:{from:0,to:r.value.state.doc.length,insert:x},selection:O?{anchor:0,head:0}:r.value.state.selection,scrollIntoView:!0})},{immediate:!0}),Jn(async()=>{let x=i.value;n.value&&(n.value.childNodes[0]&&(i.value!==""&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),x=n.value.childNodes[0].innerText.trim()),r.value=new We({parent:n.value,state:Yt.create({doc:x,extensions:d.value}),dispatch:O=>{r.value.update([O]),!(O.changes.empty||!O.docChanged)&&(e.emit("update:modelValue",O.state.doc.toString()??""),e.emit("change",O.state))}}),await $t(),e.emit("ready",{view:r.value,state:r.value.state,container:n.value}))}),$a(()=>{r.value.destroy(),e.emit("destroy")});const h=()=>{!t.linter||!r.value||(t.forceLinting&&OL(r.value),c.value=Spe(r.value.state))},f=()=>{var x,O;(x=r.value)==null||x.dispatch({effects:Mt.reconfigure.of([])}),(O=r.value)==null||O.dispatch({effects:Mt.appendConfig.of(d.value)})},S=(x,O)=>r.value.state.sliceDoc(x,O),_=x=>r.value.state.doc.line(x+1).text,p=()=>r.value.state.doc.lines,v=()=>r.value.state.selection.main.head,m=()=>{let x;return(x=r.value.state.selection.ranges)!==null&&x!==void 0?x:[]},g=()=>{let x;return(x=r.value.state.sliceDoc(r.value.state.selection.main.from,r.value.state.selection.main.to))!==null&&x!==void 0?x:""},b=()=>{const x=r.value.state;return x?x.selection.ranges.map(O=>x.sliceDoc(O.from,O.to)):[]},y=()=>r.value.state.selection.ranges.some(x=>!x.empty),E=(x,O,D)=>r.value.dispatch({changes:{from:O,to:D,insert:x}}),T=x=>r.value.dispatch(r.value.state.replaceSelection(x)),C=x=>r.value.dispatch({selection:{anchor:x}}),w=(x,O)=>r.value.dispatch({selection:{anchor:x,head:O}}),R=(x,O)=>r.value.dispatch({selection:Oe.create(x,O)}),I=x=>r.value.dispatch({selection:Oe.create(a.value.ranges.map(O=>O.extend(x(O))))}),A={editor:n,view:r,cursor:o,selection:a,focus:s,length:u,json:l,diagnosticCount:c,dom:r.value.contentDOM,lint:h,forceReconfigure:f,getRange:S,getLine:_,lineCount:p,getCursor:v,listSelections:m,getSelection:g,getSelections:b,somethingSelected:y,replaceRange:E,replaceSelection:T,setCursor:C,setSelection:w,setSelections:R,extendSelectionsBy:I};return e.expose(A),A},render(){return VL(this.$props.tag,{ref:"editor",class:"vue-codemirror"},this.$slots.default?VL("aside",{style:"display: none;","aria-hidden":"true"},J_e(this.$slots.default)):void 0)}}),zL={};class zv{constructor(e,n,i,r,s,a,o,l,u,c=0,d){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=o,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new zv(e,[],n,i,i,0,[],0,r?new qL(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let o=s.dynamicPrecedence(r);if(o&&(this.score+=o),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(r,this.reducePos);return}let l=this.stack.length-(i-1)*3-(e&262144?6:0),u=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-u;c>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=c));let d=l?this.stack[l-1]:0,h=this.bufferBase+this.buffer.length-d;if(r<s.minRepeatTerm||e&131072){let f=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,u,f,h+4,!0)}if(e&262144)this.state=this.stack[l];else{let f=this.stack[l-3];this.state=s.getGoto(f,r,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(r,u)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,o=this.buffer.length;if(o==0&&a.parent&&(o=a.bufferBase-a.parent.bufferBase,a=a.parent),o>0&&a.buffer[o-4]==0&&a.buffer[o-1]>-1){if(n==i)return;if(a.buffer[o-2]>=n){a.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let o=!1;for(let l=a;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){o=!0;break}if(o)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;(r>this.pos||n<=a.maxNode)&&(this.pos=r,a.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new zv(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new tme(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;s<n.length;s+=2)(a=n[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&r.push(n[s],a);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let a=n[s+1];r.some((o,l)=>l&1&&o==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[r],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,u=this.stack.length-o*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return o<<19|65536|l}}else{let o=i(a,s+1);if(o!=null)return o}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new qL(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class qL{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class tme{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class qv{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new qv(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new qv(this.stack,this.pos,this.index)}}function K_(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let a=t.charCodeAt(i++),o=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class Sg{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const YL=new Sg;class nme{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=YL,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let a=this.ranges[--r];s-=i.from-a.to,i=a}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,o=this.range;for(;o.to<=i;)o=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>o.to&&(this.chunk2=this.chunk2.slice(0,o.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=YL,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class md{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;ime(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}md.prototype.contextual=md.prototype.fallback=md.prototype.extend=!1;md.prototype.fallback=md.prototype.extend=!1;function ime(t,e,n,i,r,s){let a=0,o=1<<i,{dialect:l}=n.p.parser;e:for(;(o&t[a])!=0;){let u=t[a+1];for(let f=a+3;f<u;f+=2)if((t[f+1]&o)>0){let S=t[f];if(l.allows(S)&&(e.token.value==-1||e.token.value==S||rme(S,e.token.value,r,s))){e.acceptToken(S);break}}let c=e.next,d=0,h=t[a+2];if(e.next<0&&h>d&&t[u+h*3-3]==65535){a=t[u+h*3-1];continue e}for(;d<h;){let f=d+h>>1,S=u+f+(f<<1),_=t[S],p=t[S+1]||65536;if(c<_)h=f;else if(c>=p)d=f+1;else{a=t[S+2],e.advance();continue e}}break}}function WL(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function rme(t,e,n,i){let r=WL(n,i,e);return r<0||WL(n,i,t)<r}const Jr=typeof process<"u"&&zL&&/\bparse\b/.test(zL.LOG);let oy=null;function KL(t,e,n){let i=t.cursor(Fi.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class sme{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?KL(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?KL(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],a=this.start[n]+i.positions[r];if(a>e)return this.nextStart=a,null;if(s instanceof Ei){if(a==e){if(a<this.safeFrom)return null;let o=a+s.length;if(o<=this.safeTo){let l=s.prop(Kt.lookAhead);if(!l||o+l<this.fragment.to)return s}}this.index[n]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}}class ome{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Sg)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<s.length;u++){if((1<<u&a)==0)continue;let c=s[u],d=this.tokens[u];if(!(i&&!c.fallback)&&((c.contextual||d.start!=e.pos||d.mask!=a||d.context!=o)&&(this.updateCachedToken(d,c,e),d.mask=a,d.context=o),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let h=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(i=d,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new Sg,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Sg,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let o=s.specializers[a](this.stream.read(e.start,e.end),i);if(o>=0&&i.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:a}=e.p,{data:o}=a;for(let l=0;l<2;l++)for(let u=a.stateSlot(s,l?2:1);;u+=3){if(o[u]==65535)if(o[u+1]==1)u=ga(o,u+2);else{r==0&&o[u+1]==2&&(r=this.putAction(ga(o,u+2),n,i,r));break}o[u]==n&&(r=this.putAction(ga(o,u+1),n,i,r))}return r}}class ame{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new nme(n,r),this.tokens=new ome(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[zv.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new sme(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>n)i.push(o);else{if(this.advanceStack(o,i,e))continue;{r||(r=[],s=[]),r.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!i.length){let a=r&&cme(r);if(a)return Jr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Jr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return Jr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((o,l)=>l.score-o.score);i.length>a;)i.pop();i.some(o=>o.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let o=i[a];for(let l=a+1;l<i.length;l++){let u=i[l];if(o.sameState(u)||o.buffer.length>500&&u.buffer.length>500)if((o.score-u.score||o.buffer.length-u.buffer.length)>0)i.splice(l--,1);else{i.splice(a--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,a=Jr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(r);d;){let h=this.parser.nodeSet.types[d.type.id]==d.type?s.getGoto(e.state,d.type.id):-1;if(h>-1&&d.length&&(!u||(d.prop(Kt.contextHash)||0)==c))return e.useNode(d,h),Jr&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(d.type.id)})`),!0;if(!(d instanceof Ei)||d.children.length==0||d.positions[0]>0)break;let f=d.children[0];if(f instanceof Ei&&d.positions[0]==0)d=f;else break}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),Jr&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],d=l[u++],h=l[u++],f=u==l.length||!i,S=f?e:e.split(),_=this.tokens.mainToken;if(S.apply(c,d,_?_.start:S.pos,h),Jr&&console.log(a+this.stackID(S)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(d)} @ ${r}${S==e?"":", split"})`),f)return!0;S.pos>r?n.push(S):i.push(S)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return jL(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let a=0;a<e.length;a++){let o=e[a],l=n[a<<1],u=n[(a<<1)+1],c=Jr?this.stackID(o)+" -> ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),Jr&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let d=o.split(),h=c;for(let f=0;d.forceReduce()&&f<10&&(Jr&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)Jr&&(h=this.stackID(d)+" -> ");for(let f of o.recoverByInsert(l))Jr&&console.log(c+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,i);this.stream.end>o.pos?(u==o.pos&&(u++,l=0),o.recoverByDelete(l,u),Jr&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),jL(o,i)):(!r||r.score<o.score)&&(r=o)}return r}stackToTree(e){return e.close(),Ei.build({buffer:qv.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(oy||(oy=new WeakMap)).get(e);return n||oy.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function jL(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class lme{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}class Yv extends GW{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let o=0;o<e.repeatNodeCount;o++)n.push("");let i=Object.keys(e.topRules).map(o=>e.topRules[o][1]),r=[];for(let o=0;o<n.length;o++)r.push([]);function s(o,l,u){r[o].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let o of e.nodeProps){let l=o[0];typeof l=="string"&&(l=Kt[l]);for(let u=1;u<o.length;){let c=o[u++];if(c>=0)s(c,l,o[u++]);else{let d=o[u+-c];for(let h=-c;h>0;h--)s(o[u++],l,d);u++}}}this.nodeSet=new lx(n.map((o,l)=>Kr.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:r[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=BW;let a=K_(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(QL),this.states=K_(e.states,Uint32Array),this.data=K_(e.stateData),this.goto=K_(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(o=>typeof o=="number"?new md(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new ame(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],o=a&1,l=r[s++];if(o&&i)return l;for(let u=s+(a>>1);s<u;s++)if(r[s]==e)return l;if(o)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),a;;s+=3){if((a=i[s])==65535)if(i[s+1]==1)a=i[s=ga(i,s+2)];else{if(i[s+1]==2)return ga(i,s+2);break}if(a==n||a==0)return ga(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ga(this.data,s+2);else break;r=n(ga(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ga(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Yv.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(o=>o.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=QL(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let a=this.dialects[n[s]],o;(o=this.data[a++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[o]=1;return new lme(e,i,r)}static deserialize(e){return new Yv(e)}}function ga(t,e){return t[e]|t[e+1]<<16}function cme(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function QL(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const ume=HW({String:Ce.string,Number:Ce.number,"True False":Ce.bool,PropertyName:Ce.propertyName,Null:Ce.null,", :":Ce.separator,"[ ]":Ce.squareBracket,"{ }":Ce.brace}),dme=Yv.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[ume],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),hme=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=fme(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function fme(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const pme=Nv.define({name:"json",parser:dme.configure({props:[YW.add({Object:fL({except:/^\s*\}/}),Array:fL({except:/^\s*\]/})}),KW.add({"Object Array":Lhe})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function _me(){return new Che(pme)}const mme="#e5c07b",XL="#e06c75",gme="#56b6c2",vme="#ffffff",bg="#abb2bf",GO="#7d8799",Sme="#61afef",bme="#98c379",ZL="#d19a66",Eme="#c678dd",yme="#21252b",JL="#2c313a",eP="#282c34",ay="#353a42",Cme="#3E4451",tP="#528bff",Tme=We.theme({"&":{color:bg,backgroundColor:eP},".cm-content":{caretColor:tP},".cm-cursor, .cm-dropCursor":{borderLeftColor:tP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Cme},".cm-panels":{backgroundColor:yme,color:bg},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:eP,color:GO,border:"none"},".cm-activeLineGutter":{backgroundColor:JL},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ay},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ay,borderBottomColor:ay},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:JL,color:bg}}},{dark:!0}),wme=$p.define([{tag:Ce.keyword,color:Eme},{tag:[Ce.name,Ce.deleted,Ce.character,Ce.propertyName,Ce.macroName],color:XL},{tag:[Ce.function(Ce.variableName),Ce.labelName],color:Sme},{tag:[Ce.color,Ce.constant(Ce.name),Ce.standard(Ce.name)],color:ZL},{tag:[Ce.definition(Ce.name),Ce.separator],color:bg},{tag:[Ce.typeName,Ce.className,Ce.number,Ce.changed,Ce.annotation,Ce.modifier,Ce.self,Ce.namespace],color:mme},{tag:[Ce.operator,Ce.operatorKeyword,Ce.url,Ce.escape,Ce.regexp,Ce.link,Ce.special(Ce.string)],color:gme},{tag:[Ce.meta,Ce.comment],color:GO},{tag:Ce.strong,fontWeight:"bold"},{tag:Ce.emphasis,fontStyle:"italic"},{tag:Ce.strikethrough,textDecoration:"line-through"},{tag:Ce.link,color:GO,textDecoration:"underline"},{tag:Ce.heading,fontWeight:"bold",color:XL},{tag:[Ce.atom,Ce.bool,Ce.special(Ce.variableName)],color:ZL},{tag:[Ce.processingInstruction,Ce.string,Ce.inserted],color:bme},{tag:Ce.invalid,color:vme}]),Rme=[Tme,px(wme)],Ame=["title"],Ome=Ke({__name:"JsonEditor",props:Ap({name:{},arg:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=kl(t,"modelValue"),n=t.arg.schema.default??(t.arg.schema.type==="object"?{}:[]),i=ve(!1),r=ve(null),s=ve(JSON.stringify(e.value||n,null,2)),a=_me(),o=hme(),l=()=>{i.value=!1,s.value=JSON.stringify(e.value,null,2),r.value=null},u=()=>{try{e.value=JSON.parse(s.value),i.value=!1,r.value=null}catch(c){r.value=c instanceof Error?c.message:String(c)}};return(c,d)=>(_e(),Ne($N,{modelValue:ie(i),"onUpdate:modelValue":d[1]||(d[1]=h=>Lt(i)?i.value=h:null),width:"800",height:"600"},{activator:be(({props:h})=>[W(_n,rt(h,{variant:"outlined"}),{default:be(()=>[Et(Nn(("getDisplayName"in c?c.getDisplayName:ie(Us))(c.name,c.arg.meta)),1)]),_:2},1040)]),default:be(()=>[W(Is,{title:("getDisplayName"in c?c.getDisplayName:ie(Us))(c.name,c.arg.meta),variant:"flat",color:"#282c34"},{default:be(()=>[W(ie(eme),{modelValue:ie(s),"onUpdate:modelValue":d[0]||(d[0]=h=>Lt(s)?s.value=h:null),class:"editor",lang:ie(a),linter:ie(o),basic:"",extensions:[ie(Rme)]},null,8,["modelValue","lang","linter","extensions"]),W(zo,null,{default:be(()=>[ie(r)?(_e(),Ge("div",{key:0,class:"text-error text-truncate",title:ie(r)},Nn(ie(r)),9,Ame)):mt("",!0),W(Na),W(_n,{onClick:l},{default:be(()=>d[2]||(d[2]=[Et("Cancel")])),_:1}),W(_n,{onClick:u},{default:be(()=>d[3]||(d[3]=[Et("Save")])),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Ime=jn(Ome,[["__scopeId","data-v-0cbc41d5"]]),S6=Symbol.for("vuetify:selection-control-group"),b6=Ue({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:on,trueIcon:on,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:Ks},...jt(),...ro(),...$i()},"SelectionControlGroup"),Nme=Ue({...b6({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");vt()({name:"VSelectionControlGroup",props:Nme(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const i=Fn(t,"modelValue"),r=Os(),s=te(()=>t.id||`v-selection-control-group-${r}`),a=te(()=>t.name||s.value),o=new Set;return Kn(S6,{modelValue:i,forceUpdate:()=>{o.forEach(l=>l())},onForceUpdate:l=>{o.add(l),Zn(()=>{o.delete(l)})}}),Xd({[t.defaultsTarget]:{color:Ve(t,"color"),disabled:Ve(t,"disabled"),density:Ve(t,"density"),error:Ve(t,"error"),inline:Ve(t,"inline"),modelValue:i,multiple:te(()=>!!t.multiple||t.multiple==null&&Array.isArray(i.value)),name:a,falseIcon:Ve(t,"falseIcon"),trueIcon:Ve(t,"trueIcon"),readonly:Ve(t,"readonly"),ripple:Ve(t,"ripple"),type:Ve(t,"type"),valueComparator:Ve(t,"valueComparator")}}),Ft(()=>{var l;return W("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":t.inline},t.class],style:t.style,role:t.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}});const E6=Ue({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...jt(),...b6()},"VSelectionControl");function xme(t){const e=an(S6,void 0),{densityClasses:n}=Qo(t),i=Fn(t,"modelValue"),r=te(()=>t.trueValue!==void 0?t.trueValue:t.value!==void 0?t.value:!0),s=te(()=>t.falseValue!==void 0?t.falseValue:!1),a=te(()=>!!t.multiple||t.multiple==null&&Array.isArray(i.value)),o=te({get(){const f=e?e.modelValue.value:i.value;return a.value?qr(f).some(S=>t.valueComparator(S,r.value)):t.valueComparator(f,r.value)},set(f){if(t.readonly)return;const S=f?r.value:s.value;let _=S;a.value&&(_=f?[...qr(i.value),S]:qr(i.value).filter(p=>!t.valueComparator(p,r.value))),e?e.modelValue.value=_:i.value=_}}),{textColorClasses:l,textColorStyles:u}=Xs(te(()=>{if(!(t.error||t.disabled))return o.value?t.color:t.baseColor})),{backgroundColorClasses:c,backgroundColorStyles:d}=Il(te(()=>o.value&&!t.error&&!t.disabled?t.color:t.baseColor)),h=te(()=>o.value?t.trueIcon:t.falseIcon);return{group:e,densityClasses:n,trueValue:r,falseValue:s,model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:h}}const nP=vt()({name:"VSelectionControl",directives:{Ripple:kp},inheritAttrs:!1,props:E6(),emits:{"update:modelValue":t=>!0},setup(t,e){let{attrs:n,slots:i}=e;const{group:r,densityClasses:s,icon:a,model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:h}=xme(t),f=Os(),S=ut(!1),_=ut(!1),p=ve(),v=te(()=>t.id||`input-${f}`),m=te(()=>!t.disabled&&!t.readonly);r==null||r.onForceUpdate(()=>{p.value&&(p.value.checked=o.value)});function g(T){m.value&&(S.value=!0,iv(T.target,":focus-visible")!==!1&&(_.value=!0))}function b(){S.value=!1,_.value=!1}function y(T){T.stopPropagation()}function E(T){if(!m.value){p.value&&(p.value.checked=o.value);return}t.readonly&&r&&$t(()=>r.forceUpdate()),o.value=T.target.checked}return Ft(()=>{var I,A;const T=i.label?i.label({label:t.label,props:{for:v.value}}):t.label,[C,w]=YS(n),R=W("input",rt({ref:p,checked:o.value,disabled:!!t.disabled,id:v.value,onBlur:b,onFocus:g,onInput:E,"aria-disabled":!!t.disabled,"aria-label":t.label,type:t.type,value:h.value,name:t.name,"aria-checked":t.type==="checkbox"?o.value:void 0},w),null);return W("div",rt({class:["v-selection-control",{"v-selection-control--dirty":o.value,"v-selection-control--disabled":t.disabled,"v-selection-control--error":t.error,"v-selection-control--focused":S.value,"v-selection-control--focus-visible":_.value,"v-selection-control--inline":t.inline},s.value,t.class]},C,{style:t.style}),[W("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(I=i.default)==null?void 0:I.call(i,{backgroundColorClasses:c,backgroundColorStyles:d}),Ar(W("div",{class:["v-selection-control__input"]},[((A=i.input)==null?void 0:A.call(i,{model:o,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:R,icon:a.value,props:{onFocus:g,onBlur:b,id:v.value}}))??W(He,null,[a.value&&W(Ot,{key:"icon",icon:a.value},null),R])]),[[Jl("ripple"),t.ripple&&[!t.disabled&&!t.readonly,null,["center","circle"]]]])]),T&&W(iq,{for:v.value,onClick:y},{default:()=>[T]})])}),{isFocused:S,input:p}}}),y6=Ue({indeterminate:Boolean,indeterminateIcon:{type:on,default:"$checkboxIndeterminate"},...E6({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),Wv=vt()({name:"VCheckboxBtn",props:y6(),emits:{"update:modelValue":t=>!0,"update:indeterminate":t=>!0},setup(t,e){let{slots:n}=e;const i=Fn(t,"indeterminate"),r=Fn(t,"modelValue");function s(l){i.value&&(i.value=!1)}const a=te(()=>i.value?t.indeterminateIcon:t.falseIcon),o=te(()=>i.value?t.indeterminateIcon:t.trueIcon);return Ft(()=>{const l=Ga(nP.filterProps(t),["modelValue"]);return W(nP,rt(l,{modelValue:r.value,"onUpdate:modelValue":[u=>r.value=u,s],class:["v-checkbox-btn",t.class],style:t.style,type:"checkbox",falseIcon:a.value,trueIcon:o.value,"aria-checked":i.value?"mixed":void 0}),n)}),{}}}),Dme=Ue({...eb(),...Ga(y6(),["inline"])},"VCheckbox"),kme=vt()({name:"VCheckbox",inheritAttrs:!1,props:Dme(),emits:{"update:modelValue":t=>!0,"update:focused":t=>!0},setup(t,e){let{attrs:n,slots:i}=e;const r=Fn(t,"modelValue"),{isFocused:s,focus:a,blur:o}=XS(t),l=Os(),u=te(()=>t.id||`checkbox-${l}`);return Ft(()=>{const[c,d]=YS(n),h=Rd.filterProps(t),f=Wv.filterProps(t);return W(Rd,rt({class:["v-checkbox",t.class]},c,h,{modelValue:r.value,"onUpdate:modelValue":S=>r.value=S,id:u.value,focused:s.value,style:t.style}),{...i,default:S=>{let{id:_,messagesId:p,isDisabled:v,isReadonly:m,isValid:g}=S;return W(Wv,rt(f,{id:_.value,"aria-describedby":p.value,disabled:v.value,readonly:m.value},d,{error:g.value===!1,modelValue:r.value,"onUpdate:modelValue":b=>r.value=b,onFocus:a,onBlur:o}),i)}})}),{}}});function Mme(t){let{selectedElement:e,containerElement:n,isRtl:i,isHorizontal:r}=t;const s=Qf(r,n),a=C6(r,i,n),o=Qf(r,e),l=T6(r,e),u=o*.4;return a>l?l-u:a+s<l+o?l-s+o+u:a}function Lme(t){let{selectedElement:e,containerElement:n,isHorizontal:i}=t;const r=Qf(i,n),s=T6(i,e),a=Qf(i,e);return s-r/2+a/2}function iP(t,e){const n=t?"scrollWidth":"scrollHeight";return(e==null?void 0:e[n])||0}function Pme(t,e){const n=t?"clientWidth":"clientHeight";return(e==null?void 0:e[n])||0}function C6(t,e,n){if(!n)return 0;const{scrollLeft:i,offsetWidth:r,scrollWidth:s}=n;return t?e?s-r+i:i:n.scrollTop}function Qf(t,e){const n=t?"offsetWidth":"offsetHeight";return(e==null?void 0:e[n])||0}function T6(t,e){const n=t?"offsetLeft":"offsetTop";return(e==null?void 0:e[n])||0}const Bme=Symbol.for("vuetify:v-slide-group"),w6=Ue({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:Bme},nextIcon:{type:on,default:"$next"},prevIcon:{type:on,default:"$prev"},showArrows:{type:[Boolean,String],validator:t=>typeof t=="boolean"||["always","desktop","mobile"].includes(t)},...jt(),...vse({mobile:null}),...Ri(),...LN({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),rP=vt()({name:"VSlideGroup",props:w6(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const{isRtl:i}=ec(),{displayClasses:r,mobile:s}=mN(t),a=PN(t,t.symbol),o=ut(!1),l=ut(0),u=ut(0),c=ut(0),d=te(()=>t.direction==="horizontal"),{resizeRef:h,contentRect:f}=Df(),{resizeRef:S,contentRect:_}=Df(),p=Ese(),v=te(()=>({container:h.el,duration:200,easing:"easeOutQuart"})),m=te(()=>a.selected.value.length?a.items.value.findIndex(N=>N.id===a.selected.value[0]):-1),g=te(()=>a.selected.value.length?a.items.value.findIndex(N=>N.id===a.selected.value[a.selected.value.length-1]):-1);if(dn){let N=-1;Ie(()=>[a.selected.value,f.value,_.value,d.value],()=>{cancelAnimationFrame(N),N=requestAnimationFrame(()=>{if(f.value&&_.value){const U=d.value?"width":"height";u.value=f.value[U],c.value=_.value[U],o.value=u.value+1<c.value}if(m.value>=0&&S.el){const U=S.el.children[g.value];y(U,t.centerActive)}})})}const b=ut(!1);function y(N,U){let F=0;U?F=Lme({containerElement:h.el,isHorizontal:d.value,selectedElement:N}):F=Mme({containerElement:h.el,isHorizontal:d.value,isRtl:i.value,selectedElement:N}),E(F)}function E(N){if(!dn||!h.el)return;const U=Qf(d.value,h.el),F=C6(d.value,i.value,h.el);if(!(iP(d.value,h.el)<=U||Math.abs(N-F)<16)){if(d.value&&i.value&&h.el){const{scrollWidth:H,offsetWidth:X}=h.el;N=H-X-N}d.value?p.horizontal(N,v.value):p(N,v.value)}}function T(N){const{scrollTop:U,scrollLeft:F}=N.target;l.value=d.value?F:U}function C(N){if(b.value=!0,!(!o.value||!S.el)){for(const U of N.composedPath())for(const F of S.el.children)if(F===U){y(F);return}}}function w(N){b.value=!1}let R=!1;function I(N){var U;!R&&!b.value&&!(N.relatedTarget&&((U=S.el)!=null&&U.contains(N.relatedTarget)))&&D(),R=!1}function A(){R=!0}function x(N){if(!S.el)return;function U(F){N.preventDefault(),D(F)}d.value?N.key==="ArrowRight"?U(i.value?"prev":"next"):N.key==="ArrowLeft"&&U(i.value?"next":"prev"):N.key==="ArrowDown"?U("next"):N.key==="ArrowUp"&&U("prev"),N.key==="Home"?U("first"):N.key==="End"&&U("last")}function O(N,U){if(!N)return;let F=N;do F=F==null?void 0:F[U==="next"?"nextElementSibling":"previousElementSibling"];while(F!=null&&F.hasAttribute("disabled"));return F}function D(N){if(!S.el)return;let U;if(!N)U=If(S.el)[0];else if(N==="next"){if(U=O(S.el.querySelector(":focus"),N),!U)return D("first")}else if(N==="prev"){if(U=O(S.el.querySelector(":focus"),N),!U)return D("last")}else N==="first"?(U=S.el.firstElementChild,U!=null&&U.hasAttribute("disabled")&&(U=O(U,"next"))):N==="last"&&(U=S.el.lastElementChild,U!=null&&U.hasAttribute("disabled")&&(U=O(U,"prev")));U&&U.focus({preventScroll:!0})}function L(N){const U=d.value&&i.value?-1:1,F=(N==="prev"?-U:U)*u.value;let k=l.value+F;if(d.value&&i.value&&h.el){const{scrollWidth:H,offsetWidth:X}=h.el;k+=H-X}E(k)}const q=te(()=>({next:a.next,prev:a.prev,select:a.select,isSelected:a.isSelected})),G=te(()=>{switch(t.showArrows){case"always":return!0;case"desktop":return!s.value;case!0:return o.value||Math.abs(l.value)>0;case"mobile":return s.value||o.value||Math.abs(l.value)>0;default:return!s.value&&(o.value||Math.abs(l.value)>0)}}),M=te(()=>Math.abs(l.value)>1),P=te(()=>{if(!h.value)return!1;const N=iP(d.value,h.el),U=Pme(d.value,h.el);return N-U-Math.abs(l.value)>1});return Ft(()=>W(t.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":G.value,"v-slide-group--is-overflowing":o.value},r.value,t.class],style:t.style,tabindex:b.value||a.selected.value.length?-1:0,onFocus:I},{default:()=>{var N,U,F;return[G.value&&W("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!M.value}],onMousedown:A,onClick:()=>M.value&&L("prev")},[((N=n.prev)==null?void 0:N.call(n,q.value))??W(Uk,null,{default:()=>[W(Ot,{icon:i.value?t.nextIcon:t.prevIcon},null)]})]),W("div",{key:"container",ref:h,class:"v-slide-group__container",onScroll:T},[W("div",{ref:S,class:"v-slide-group__content",onFocusin:C,onFocusout:w,onKeydown:x},[(U=n.default)==null?void 0:U.call(n,q.value)])]),G.value&&W("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!P.value}],onMousedown:A,onClick:()=>P.value&&L("next")},[((F=n.next)==null?void 0:F.call(n,q.value))??W(Uk,null,{default:()=>[W(Ot,{icon:i.value?t.prevIcon:t.nextIcon},null)]})])]}})),{selected:a.selected,scrollTo:L,scrollOffset:l,focus:D,hasPrev:M,hasNext:P}}}),R6=Symbol.for("vuetify:v-chip-group"),Fme=Ue({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Ks},...w6(),...jt(),...LN({selectedClass:"v-chip--selected"}),...Ri(),...$i(),...za({variant:"tonal"})},"VChipGroup");vt()({name:"VChipGroup",props:Fme(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const{themeClasses:i}=cr(t),{isSelected:r,select:s,next:a,prev:o,selected:l}=PN(t,R6);return Xd({VChip:{color:Ve(t,"color"),disabled:Ve(t,"disabled"),filter:Ve(t,"filter"),variant:Ve(t,"variant")}}),Ft(()=>{const u=rP.filterProps(t);return W(rP,rt(u,{class:["v-chip-group",{"v-chip-group--column":t.column},i.value,t.class],style:t.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:r,select:s,next:a,prev:o,selected:l.value})]}})}),{}}});const Ume=Ue({activeClass:String,appendAvatar:String,appendIcon:on,closable:Boolean,closeIcon:{type:on,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:on,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:on,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:Yr(),onClickOnce:Yr(),...yu(),...jt(),...ro(),...Tu(),...gq(),...no(),...rb(),...xp(),...Ri({tag:"span"}),...$i(),...za({variant:"tonal"})},"VChip"),No=vt()({name:"VChip",directives:{Ripple:kp},props:Ume(),emits:{"click:close":t=>!0,"update:modelValue":t=>!0,"group:selected":t=>!0,click:t=>!0},setup(t,e){let{attrs:n,emit:i,slots:r}=e;const{t:s}=Np(),{borderClasses:a}=Cu(t),{colorClasses:o,colorStyles:l,variantClasses:u}=nh(t),{densityClasses:c}=Qo(t),{elevationClasses:d}=wu(t),{roundedClasses:h}=io(t),{sizeClasses:f}=Dp(t),{themeClasses:S}=cr(t),_=Fn(t,"modelValue"),p=vq(t,R6,!1),v=ib(t,n),m=te(()=>t.link!==!1&&v.isLink.value),g=te(()=>!t.disabled&&t.link!==!1&&(!!p||t.link||v.isClickable.value)),b=te(()=>({"aria-label":s(t.closeLabel),onClick(T){T.preventDefault(),T.stopPropagation(),_.value=!1,i("click:close",T)}}));function y(T){var C;i("click",T),g.value&&((C=v.navigate)==null||C.call(v,T),p==null||p.toggle())}function E(T){(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),y(T))}return()=>{var D;const T=v.isLink.value?"a":t.tag,C=!!(t.appendIcon||t.appendAvatar),w=!!(C||r.append),R=!!(r.close||t.closable),I=!!(r.filter||t.filter)&&p,A=!!(t.prependIcon||t.prependAvatar),x=!!(A||r.prepend),O=!p||p.isSelected.value;return _.value&&Ar(W(T,rt({class:["v-chip",{"v-chip--disabled":t.disabled,"v-chip--label":t.label,"v-chip--link":g.value,"v-chip--filter":I,"v-chip--pill":t.pill,[`${t.activeClass}`]:t.activeClass&&((D=v.isActive)==null?void 0:D.value)},S.value,a.value,O?o.value:void 0,c.value,d.value,h.value,f.value,u.value,p==null?void 0:p.selectedClass.value,t.class],style:[O?l.value:void 0,t.style],disabled:t.disabled||void 0,draggable:t.draggable,tabindex:g.value?0:void 0,onClick:y,onKeydown:g.value&&!m.value&&E},v.linkProps),{default:()=>{var L;return[th(g.value,"v-chip"),I&&W(tq,{key:"filter"},{default:()=>[Ar(W("div",{class:"v-chip__filter"},[r.filter?W(_i,{key:"filter-defaults",disabled:!t.filterIcon,defaults:{VIcon:{icon:t.filterIcon}}},r.filter):W(Ot,{key:"filter-icon",icon:t.filterIcon},null)]),[[jd,p.isSelected.value]])]}),x&&W("div",{key:"prepend",class:"v-chip__prepend"},[r.prepend?W(_i,{key:"prepend-defaults",disabled:!A,defaults:{VAvatar:{image:t.prependAvatar,start:!0},VIcon:{icon:t.prependIcon,start:!0}}},r.prepend):W(He,null,[t.prependIcon&&W(Ot,{key:"prepend-icon",icon:t.prependIcon,start:!0},null),t.prependAvatar&&W(Ll,{key:"prepend-avatar",image:t.prependAvatar,start:!0},null)])]),W("div",{class:"v-chip__content","data-no-activator":""},[((L=r.default)==null?void 0:L.call(r,{isSelected:p==null?void 0:p.isSelected.value,selectedClass:p==null?void 0:p.selectedClass.value,select:p==null?void 0:p.select,toggle:p==null?void 0:p.toggle,value:p==null?void 0:p.value.value,disabled:t.disabled}))??t.text]),w&&W("div",{key:"append",class:"v-chip__append"},[r.append?W(_i,{key:"append-defaults",disabled:!C,defaults:{VAvatar:{end:!0,image:t.appendAvatar},VIcon:{end:!0,icon:t.appendIcon}}},r.append):W(He,null,[t.appendIcon&&W(Ot,{key:"append-icon",end:!0,icon:t.appendIcon},null),t.appendAvatar&&W(Ll,{key:"append-avatar",end:!0,image:t.appendAvatar},null)])]),R&&W("button",rt({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},b.value),[r.close?W(_i,{key:"close-defaults",defaults:{VIcon:{icon:t.closeIcon,size:"x-small"}}},r.close):W(Ot,{key:"close-icon",icon:t.closeIcon,size:"x-small"},null)])]}}),[[Jl("ripple"),g.value&&t.ripple,null]])}}}),$me=Ue({id:String,submenu:Boolean,...Ga(ob({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:TN}}),["absolute"])},"VMenu"),Kv=vt()({name:"VMenu",props:$me(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const i=Fn(t,"modelValue"),{scopeId:r}=sb(),{isRtl:s}=ec(),a=Os(),o=te(()=>t.id||`v-menu-${a}`),l=ve(),u=an(VA,null),c=ut(new Set);Kn(VA,{register(){c.value.add(a)},unregister(){c.value.delete(a)},closeParents(p){setTimeout(()=>{var v;!c.value.size&&!t.persistent&&(p==null||(v=l.value)!=null&&v.contentEl&&!Hte(p,l.value.contentEl))&&(i.value=!1,u==null||u.closeParents())},40)}}),Yi(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),LS(()=>i.value=!1);async function d(p){var g,b,y;const v=p.relatedTarget,m=p.target;await $t(),i.value&&v!==m&&((g=l.value)!=null&&g.contentEl)&&((b=l.value)!=null&&b.globalTop)&&![document,l.value.contentEl].includes(m)&&!l.value.contentEl.contains(m)&&((y=If(l.value.contentEl)[0])==null||y.focus())}Ie(i,p=>{p?(u==null||u.register(),dn&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),dn&&document.removeEventListener("focusin",d))},{immediate:!0});function h(p){u==null||u.closeParents(p)}function f(p){var v,m,g,b,y;if(!t.disabled)if(p.key==="Tab"||p.key==="Enter"&&!t.closeOnContentClick){if(p.key==="Enter"&&(p.target instanceof HTMLTextAreaElement||p.target instanceof HTMLInputElement&&p.target.closest("form")))return;p.key==="Enter"&&p.preventDefault(),tz(If((v=l.value)==null?void 0:v.contentEl,!1),p.shiftKey?"prev":"next",T=>T.tabIndex>=0)||(i.value=!1,(g=(m=l.value)==null?void 0:m.activatorEl)==null||g.focus())}else t.submenu&&p.key===(s.value?"ArrowRight":"ArrowLeft")&&(i.value=!1,(y=(b=l.value)==null?void 0:b.activatorEl)==null||y.focus())}function S(p){var m;if(t.disabled)return;const v=(m=l.value)==null?void 0:m.contentEl;v&&i.value?p.key==="ArrowDown"?(p.preventDefault(),p.stopImmediatePropagation(),ff(v,"next")):p.key==="ArrowUp"?(p.preventDefault(),p.stopImmediatePropagation(),ff(v,"prev")):t.submenu&&(p.key===(s.value?"ArrowRight":"ArrowLeft")?i.value=!1:p.key===(s.value?"ArrowLeft":"ArrowRight")&&(p.preventDefault(),ff(v,"first"))):(t.submenu?p.key===(s.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(p.key))&&(i.value=!0,p.preventDefault(),setTimeout(()=>setTimeout(()=>S(p))))}const _=te(()=>rt({"aria-haspopup":"menu","aria-expanded":String(i.value),"aria-controls":o.value,onKeydown:S},t.activatorProps));return Ft(()=>{const p=Pl.filterProps(t);return W(Pl,rt({ref:l,id:o.value,class:["v-menu",t.class],style:t.style},p,{modelValue:i.value,"onUpdate:modelValue":v=>i.value=v,absolute:!0,activatorProps:_.value,location:t.location??(t.submenu?"end":"bottom"),"onClick:outside":h,onKeydown:f},r),{activator:n.activator,default:function(){for(var v=arguments.length,m=new Array(v),g=0;g<v;g++)m[g]=arguments[g];return W(_i,{root:"VMenu"},{default:()=>{var b;return[(b=n.default)==null?void 0:b.call(n,...m)]}})}})}),tc({id:o,ΨopenChildren:c},l)}}),Gme=Ue({renderless:Boolean,...jt()},"VVirtualScrollItem"),Hme=vt()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Gme(),emits:{"update:height":t=>!0},setup(t,e){let{attrs:n,emit:i,slots:r}=e;const{resizeRef:s,contentRect:a}=Df(void 0,"border");Ie(()=>{var o;return(o=a.value)==null?void 0:o.height},o=>{o!=null&&i("update:height",o)}),Ft(()=>{var o,l;return t.renderless?W(He,null,[(o=r.default)==null?void 0:o.call(r,{itemRef:s})]):W("div",rt({ref:s,class:["v-virtual-scroll__item",t.class],style:t.style},n),[(l=r.default)==null?void 0:l.call(r)])})}}),Vme=-1,zme=1,ly=100,qme=Ue({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function Yme(t,e){const n=mN(),i=ut(0);Wr(()=>{i.value=parseFloat(t.itemHeight||0)});const r=ut(0),s=ut(Math.ceil((parseInt(t.height)||n.height.value)/(i.value||16))||1),a=ut(0),o=ut(0),l=ve(),u=ve();let c=0;const{resizeRef:d,contentRect:h}=Df();Wr(()=>{d.value=l.value});const f=te(()=>{var P;return l.value===document.documentElement?n.height.value:((P=h.value)==null?void 0:P.height)||parseInt(t.height)||0}),S=te(()=>!!(l.value&&u.value&&f.value&&i.value));let _=Array.from({length:e.value.length}),p=Array.from({length:e.value.length});const v=ut(0);let m=-1;function g(P){return _[P]||i.value}const b=Fte(()=>{const P=performance.now();p[0]=0;const N=e.value.length;for(let U=1;U<=N-1;U++)p[U]=(p[U-1]||0)+g(U-1);v.value=Math.max(v.value,performance.now()-P)},v),y=Ie(S,P=>{P&&(y(),c=u.value.offsetTop,b.immediate(),L(),~m&&$t(()=>{dn&&window.requestAnimationFrame(()=>{G(m),m=-1})}))});Zn(()=>{b.clear()});function E(P,N){const U=_[P],F=i.value;i.value=F?Math.min(i.value,N):N,(U!==N||F!==i.value)&&(_[P]=N,b())}function T(P){return P=Lo(P,0,e.value.length-1),p[P]||0}function C(P){return Wme(p,P)}let w=0,R=0,I=0;Ie(f,(P,N)=>{N&&(L(),P<N&&requestAnimationFrame(()=>{R=0,L()}))});let A=-1;function x(){if(!l.value||!u.value)return;const P=l.value.scrollTop,N=performance.now();N-I>500?(R=Math.sign(P-w),c=u.value.offsetTop):R=P-w,w=P,I=N,window.clearTimeout(A),A=window.setTimeout(O,500),L()}function O(){!l.value||!u.value||(R=0,I=0,window.clearTimeout(A),L())}let D=-1;function L(){cancelAnimationFrame(D),D=requestAnimationFrame(q)}function q(){if(!l.value||!f.value)return;const P=w-c,N=Math.sign(R),U=Math.max(0,P-ly),F=Lo(C(U),0,e.value.length),k=P+f.value+ly,H=Lo(C(k)+1,F+1,e.value.length);if((N!==Vme||F<r.value)&&(N!==zme||H>s.value)){const X=T(r.value)-T(F),K=T(H)-T(s.value);Math.max(X,K)>ly?(r.value=F,s.value=H):(F<=0&&(r.value=F),H>=e.value.length&&(s.value=H))}a.value=T(r.value),o.value=T(e.value.length)-T(s.value)}function G(P){const N=T(P);!l.value||P&&!N?m=P:l.value.scrollTop=N}const M=te(()=>e.value.slice(r.value,s.value).map((P,N)=>({raw:P,index:N+r.value,key:Q3(P)&&"value"in P?P.value:N+r.value})));return Ie(e,()=>{_=Array.from({length:e.value.length}),p=Array.from({length:e.value.length}),b.immediate(),L()},{deep:!0}),{calculateVisibleItems:L,containerRef:l,markerRef:u,computedItems:M,paddingTop:a,paddingBottom:o,scrollToIndex:G,handleScroll:x,handleScrollend:O,handleItemResize:E}}function Wme(t,e){let n=t.length-1,i=0,r=0,s=null,a=-1;if(t[n]<e)return n;for(;i<=n;)if(r=i+n>>1,s=t[r],s>e)n=r-1;else if(s<e)a=r,i=r+1;else return s===e?r:i;return a}const Kme=Ue({items:{type:Array,default:()=>[]},renderless:Boolean,...qme(),...jt(),...Ha()},"VVirtualScroll"),A6=vt()({name:"VVirtualScroll",props:Kme(),setup(t,e){let{slots:n}=e;const i=Li("VVirtualScroll"),{dimensionStyles:r}=Va(t),{calculateVisibleItems:s,containerRef:a,markerRef:o,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:h,paddingBottom:f,computedItems:S}=Yme(t,Ve(t,"items"));return iu(()=>t.renderless,()=>{function _(){var m,g;const v=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";a.value===document.documentElement?(document[v]("scroll",l,{passive:!0}),document[v]("scrollend",u)):((m=a.value)==null||m[v]("scroll",l,{passive:!0}),(g=a.value)==null||g[v]("scrollend",u))}Jn(()=>{a.value=hz(i.vnode.el,!0),_(!0)}),Zn(_)}),Ft(()=>{const _=S.value.map(p=>W(Hme,{key:p.key,renderless:t.renderless,"onUpdate:height":v=>c(p.index,v)},{default:v=>{var m;return(m=n.default)==null?void 0:m.call(n,{item:p.raw,index:p.index,...v})}}));return t.renderless?W(He,null,[W("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:Ht(h.value)}},null),_,W("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Ht(f.value)}},null)]):W("div",{ref:a,class:["v-virtual-scroll",t.class],onScrollPassive:l,onScrollend:u,style:[r.value,t.style]},[W("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:Ht(h.value),paddingBottom:Ht(f.value)}},[_])])}),{calculateVisibleItems:s,scrollToIndex:d}}});function O6(t,e){const n=ut(!1);let i;function r(o){cancelAnimationFrame(i),n.value=!0,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{n.value=!1})})}async function s(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(n.value){const l=Ie(n,()=>{l(),o()})}else o()})}async function a(o){var c,d;if(o.key==="Tab"&&((c=e.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(o.key))return;const l=(d=t.value)==null?void 0:d.$el;if(!l)return;(o.key==="Home"||o.key==="End")&&l.scrollTo({top:o.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await s();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const h=l.getBoundingClientRect().top;for(const f of u)if(f.getBoundingClientRect().top>=h){f.focus();break}}else{const h=l.getBoundingClientRect().bottom;for(const f of[...u].reverse())if(f.getBoundingClientRect().bottom<=h){f.focus();break}}}return{onScrollPassive:r,onKeydown:a}}const I6=Ue({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:on,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...iY({itemChildren:!1})},"Select"),jme=Ue({...I6(),...Ga(xN({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...eh({transition:{component:TN}})},"VSelect"),Qme=vt()({name:"VSelect",props:jme(),emits:{"update:focused":t=>!0,"update:modelValue":t=>!0,"update:menu":t=>!0},setup(t,e){let{slots:n}=e;const{t:i}=Np(),r=ve(),s=ve(),a=ve(),o=Fn(t,"menu"),l=te({get:()=>o.value,set:M=>{var P;o.value&&!M&&((P=s.value)!=null&&P.ΨopenChildren.size)||(o.value=M)}}),{items:u,transformIn:c,transformOut:d}=sY(t),h=Fn(t,"modelValue",[],M=>c(M===null?[null]:qr(M)),M=>{const P=d(M);return t.multiple?P:P[0]??null}),f=te(()=>typeof t.counterValue=="function"?t.counterValue(h.value):typeof t.counterValue=="number"?t.counterValue:h.value.length),S=IN(t),_=te(()=>h.value.map(M=>M.value)),p=ut(!1),v=te(()=>l.value?t.closeText:t.openText);let m="",g;const b=te(()=>t.hideSelected?u.value.filter(M=>!h.value.some(P=>(t.valueComparator||Ks)(P,M))):u.value),y=te(()=>t.hideNoData&&!b.value.length||S.isReadonly.value||S.isDisabled.value),E=te(()=>{var M;return{...t.menuProps,activatorProps:{...((M=t.menuProps)==null?void 0:M.activatorProps)||{},"aria-haspopup":"listbox"}}}),T=ve(),C=O6(T,r);function w(M){t.openOnClear&&(l.value=!0)}function R(){y.value||(l.value=!l.value)}function I(M){rv(M)&&A(M)}function A(M){var F,k;if(!M.key||S.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(M.key)&&M.preventDefault(),["Enter","ArrowDown"," "].includes(M.key)&&(l.value=!0),["Escape","Tab"].includes(M.key)&&(l.value=!1),M.key==="Home"?(F=T.value)==null||F.focus("first"):M.key==="End"&&((k=T.value)==null||k.focus("last"));const P=1e3;if(!rv(M))return;const N=performance.now();N-g>P&&(m=""),m+=M.key.toLowerCase(),g=N;const U=u.value.find(H=>H.title.toLowerCase().startsWith(m));if(U!==void 0){h.value=[U];const H=b.value.indexOf(U);dn&&window.requestAnimationFrame(()=>{var X;H>=0&&((X=a.value)==null||X.scrollToIndex(H))})}}function x(M){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!M.props.disabled)if(t.multiple){const N=h.value.findIndex(F=>(t.valueComparator||Ks)(F.value,M.value)),U=P??!~N;if(~N){const F=U?[...h.value,M]:[...h.value];F.splice(N,1),h.value=F}else U&&(h.value=[...h.value,M])}else{const N=P!==!1;h.value=N?[M]:[],$t(()=>{l.value=!1})}}function O(M){var P;(P=T.value)!=null&&P.$el.contains(M.relatedTarget)||(l.value=!1)}function D(){var M;t.eager&&((M=a.value)==null||M.calculateVisibleItems())}function L(){var M;p.value&&((M=r.value)==null||M.focus())}function q(M){p.value=!0}function G(M){if(M==null)h.value=[];else if(iv(r.value,":autofill")||iv(r.value,":-webkit-autofill")){const P=u.value.find(N=>N.title===M);P&&x(P)}else r.value&&(r.value.value="")}return Ie(l,()=>{if(!t.hideSelected&&l.value&&h.value.length){const M=b.value.findIndex(P=>h.value.some(N=>(t.valueComparator||Ks)(N.value,P.value)));dn&&window.requestAnimationFrame(()=>{var P;M>=0&&((P=a.value)==null||P.scrollToIndex(M))})}}),Ie(()=>t.items,(M,P)=>{l.value||p.value&&!P.length&&M.length&&(l.value=!0)}),Ft(()=>{const M=!!(t.chips||n.chip),P=!!(!t.hideNoData||b.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),N=h.value.length>0,U=Vo.filterProps(t),F=N||!p.value&&t.label&&!t.persistentPlaceholder?void 0:t.placeholder;return W(Vo,rt({ref:r},U,{modelValue:h.value.map(k=>k.props.value).join(", "),"onUpdate:modelValue":G,focused:p.value,"onUpdate:focused":k=>p.value=k,validationValue:h.externalValue,counterValue:f.value,dirty:N,class:["v-select",{"v-select--active-menu":l.value,"v-select--chips":!!t.chips,[`v-select--${t.multiple?"multiple":"single"}`]:!0,"v-select--selected":h.value.length,"v-select--selection-slot":!!n.selection},t.class],style:t.style,inputmode:"none",placeholder:F,"onClick:clear":w,"onMousedown:control":R,onBlur:O,onKeydown:A,"aria-label":i(v.value),title:i(v.value)}),{...n,default:()=>W(He,null,[W(Kv,rt({ref:s,modelValue:l.value,"onUpdate:modelValue":k=>l.value=k,activator:"parent",contentClass:"v-select__content",disabled:y.value,eager:t.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:t.transition,onAfterEnter:D,onAfterLeave:L},E.value),{default:()=>[P&&W(qN,rt({ref:T,selected:_.value,selectStrategy:t.multiple?"independent":"single-independent",onMousedown:k=>k.preventDefault(),onKeydown:I,onFocusin:q,tabindex:"-1","aria-live":"polite",color:t.itemColor??t.color},C,t.listProps),{default:()=>{var k,H,X;return[(k=n["prepend-item"])==null?void 0:k.call(n),!b.value.length&&!t.hideNoData&&(((H=n["no-data"])==null?void 0:H.call(n))??W(Bl,{key:"no-data",title:i(t.noDataText)},null)),W(A6,{ref:a,renderless:!0,items:b.value},{default:K=>{var J;let{item:z,index:re,itemRef:ne}=K;const Z=rt(z.props,{ref:ne,key:z.value,onClick:()=>x(z,null)});return((J=n.item)==null?void 0:J.call(n,{item:z,index:re,props:Z}))??W(Bl,rt(Z,{role:"option"}),{prepend:V=>{let{isSelected:$}=V;return W(He,null,[t.multiple&&!t.hideSelected?W(Wv,{key:z.value,modelValue:$,ripple:!1,tabindex:"-1"},null):void 0,z.props.prependAvatar&&W(Ll,{image:z.props.prependAvatar},null),z.props.prependIcon&&W(Ot,{icon:z.props.prependIcon},null)])}})}}),(X=n["append-item"])==null?void 0:X.call(n)]}})]}),h.value.map((k,H)=>{function X(ne){ne.stopPropagation(),ne.preventDefault(),x(k,!1)}const K={"onClick:close":X,onKeydown(ne){ne.key!=="Enter"&&ne.key!==" "||(ne.preventDefault(),ne.stopPropagation(),X(ne))},onMousedown(ne){ne.preventDefault(),ne.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},z=M?!!n.chip:!!n.selection,re=z?cN(M?n.chip({item:k,index:H,props:K}):n.selection({item:k,index:H})):void 0;if(!(z&&!re))return W("div",{key:k.value,class:"v-select__selection"},[M?n.chip?W(_i,{key:"chip-defaults",defaults:{VChip:{closable:t.closableChips,size:"small",text:k.title}}},{default:()=>[re]}):W(No,rt({key:"chip",closable:t.closableChips,size:"small",text:k.title,disabled:k.props.disabled},K),null):re??W("span",{class:"v-select__selection-text"},[k.title,t.multiple&&H<h.value.length-1&&W("span",{class:"v-select__selection-comma"},[Et(",")])])])})]),"append-inner":function(){var K;for(var k=arguments.length,H=new Array(k),X=0;X<k;X++)H[X]=arguments[X];return W(He,null,[(K=n["append-inner"])==null?void 0:K.call(n,...H),t.menuIcon?W(Ot,{class:"v-select__menu-icon",icon:t.menuIcon},null):void 0])}})}),tc({isFocused:p,menu:l,select:x},r)}}),Xme=(t,e,n)=>t==null||e==null?-1:t.toString().toLocaleLowerCase().indexOf(e.toString().toLocaleLowerCase()),Zme=Ue({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Jme(t,e,n){var o;const i=[],r=(n==null?void 0:n.default)??Xme,s=n!=null&&n.filterKeys?qr(n.filterKeys):!1,a=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(t!=null&&t.length))return i;e:for(let l=0;l<t.length;l++){const[u,c=u]=qr(t[l]),d={},h={};let f=-1;if((e||a>0)&&!(n!=null&&n.noFilter)){if(typeof u=="object"){const p=s||Object.keys(c);for(const v of p){const m=wo(c,v),g=(o=n==null?void 0:n.customKeyFilter)==null?void 0:o[v];if(f=g?g(m,e,u):r(m,e,u),f!==-1&&f!==!1)g?d[v]=f:h[v]=f;else if((n==null?void 0:n.filterMode)==="every")continue e}}else f=r(u,e,u),f!==-1&&f!==!1&&(h.title=f);const S=Object.keys(h).length,_=Object.keys(d).length;if(!S&&!_||(n==null?void 0:n.filterMode)==="union"&&_!==a&&!S||(n==null?void 0:n.filterMode)==="intersection"&&(_!==a||!S))continue}i.push({index:l,matches:{...h,...d}})}return i}function ege(t,e,n,i){const r=ut([]),s=ut(new Map),a=te(()=>ie(e));Wr(()=>{const l=typeof n=="function"?n():ie(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=Jme(a.value,u,{customKeyFilter:{...t.customKeyFilter,...ie(i==null?void 0:i.customKeyFilter)},default:t.customFilter,filterKeys:t.filterKeys,filterMode:t.filterMode,noFilter:t.noFilter}),d=ie(e),h=[],f=new Map;c.forEach(S=>{let{index:_,matches:p}=S;const v=d[_];h.push(v),f.set(v.value,p)}),r.value=h,s.value=f});function o(l){return s.value.get(l.value)}return{filteredItems:r,filteredMatches:s,getMatches:o}}function tge(t,e,n){if(e==null)return t;if(Array.isArray(e))throw new Error("Multiple matches is not implemented");return typeof e=="number"&&~e?W(He,null,[W("span",{class:"v-combobox__unmask"},[t.substr(0,e)]),W("span",{class:"v-combobox__mask"},[t.substr(e,n)]),W("span",{class:"v-combobox__unmask"},[t.substr(e+n)])]):t}const nge=Ue({autoSelectFirst:{type:[Boolean,String]},clearOnSelect:{type:Boolean,default:!0},delimiters:Array,...Zme({filterKeys:["title"]}),...I6({hideNoData:!0,returnObject:!0}),...Ga(xN({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...eh({transition:!1})},"VCombobox"),ige=vt()({name:"VCombobox",props:nge(),emits:{"update:focused":t=>!0,"update:modelValue":t=>!0,"update:search":t=>!0,"update:menu":t=>!0},setup(t,e){var J;let{emit:n,slots:i}=e;const{t:r}=Np(),s=ve(),a=ut(!1),o=ut(!0),l=ut(!1),u=ve(),c=ve(),d=Fn(t,"menu"),h=te({get:()=>d.value,set:V=>{var $;d.value&&!V&&(($=u.value)!=null&&$.ΨopenChildren.size)||(d.value=V)}}),f=ut(-1);let S=!1;const _=te(()=>{var V;return(V=s.value)==null?void 0:V.color}),p=te(()=>h.value?t.closeText:t.openText),{items:v,transformIn:m,transformOut:g}=sY(t),{textColorClasses:b,textColorStyles:y}=Xs(_),E=Fn(t,"modelValue",[],V=>m(qr(V)),V=>{const $=g(V);return t.multiple?$:$[0]??null}),T=IN(t),C=te(()=>!!(t.chips||i.chip)),w=te(()=>C.value||!!i.selection),R=ut(!t.multiple&&!w.value?((J=E.value[0])==null?void 0:J.title)??"":""),I=te({get:()=>R.value,set:V=>{var $;if(R.value=V??"",!t.multiple&&!w.value&&(E.value=[ml(t,V)]),V&&t.multiple&&(($=t.delimiters)!=null&&$.length)){const Y=V.split(new RegExp(`(?:${t.delimiters.join("|")})+`));Y.length>1&&(Y.forEach(Q=>{Q=Q.trim(),Q&&z(ml(t,Q))}),R.value="")}V||(f.value=-1),o.value=!V}}),A=te(()=>typeof t.counterValue=="function"?t.counterValue(E.value):typeof t.counterValue=="number"?t.counterValue:t.multiple?E.value.length:I.value.length);Ie(R,V=>{S?$t(()=>S=!1):a.value&&!h.value&&(h.value=!0),n("update:search",V)}),Ie(E,V=>{var $;!t.multiple&&!w.value&&(R.value=(($=V[0])==null?void 0:$.title)??"")});const{filteredItems:x,getMatches:O}=ege(t,v,()=>o.value?"":I.value),D=te(()=>t.hideSelected?x.value.filter(V=>!E.value.some($=>$.value===V.value)):x.value),L=te(()=>E.value.map(V=>V.value)),q=te(()=>{var $;return(t.autoSelectFirst===!0||t.autoSelectFirst==="exact"&&I.value===(($=D.value[0])==null?void 0:$.title))&&D.value.length>0&&!o.value&&!l.value}),G=te(()=>t.hideNoData&&!D.value.length||T.isReadonly.value||T.isDisabled.value),M=ve(),P=O6(M,s);function N(V){S=!0,t.openOnClear&&(h.value=!0)}function U(){G.value||(h.value=!0)}function F(V){G.value||(a.value&&(V.preventDefault(),V.stopPropagation()),h.value=!h.value)}function k(V){var $;V.key!==" "&&rv(V)&&(($=s.value)==null||$.focus())}function H(V){var Q;if(Bte(V)||T.isReadonly.value)return;const $=s.value.selectionStart,Y=E.value.length;if(["Enter","ArrowDown","ArrowUp"].includes(V.key)&&V.preventDefault(),["Enter","ArrowDown"].includes(V.key)&&(h.value=!0),["Escape"].includes(V.key)&&(h.value=!1),["Enter","Escape","Tab"].includes(V.key)&&(q.value&&["Enter","Tab"].includes(V.key)&&!E.value.some(j=>{let{value:se}=j;return se===D.value[0].value})&&z(x.value[0]),o.value=!0),V.key==="ArrowDown"&&q.value&&((Q=M.value)==null||Q.focus("next")),V.key==="Enter"&&I.value&&(z(ml(t,I.value)),w.value&&(R.value="")),["Backspace","Delete"].includes(V.key)){if(!t.multiple&&w.value&&E.value.length>0&&!I.value)return z(E.value[0],!1);if(~f.value){V.preventDefault();const j=f.value;z(E.value[f.value],!1),f.value=j>=Y-1?Y-2:j}else V.key==="Backspace"&&!I.value&&(f.value=Y-1);return}if(t.multiple)if(V.key==="ArrowLeft"){if(f.value<0&&$>0)return;const j=f.value>-1?f.value-1:Y-1;E.value[j]?f.value=j:(f.value=-1,s.value.setSelectionRange(I.value.length,I.value.length))}else if(V.key==="ArrowRight"){if(f.value<0)return;const j=f.value+1;E.value[j]?f.value=j:(f.value=-1,s.value.setSelectionRange(0,0))}else~f.value&&rv(V)&&(f.value=-1)}function X(){var V;t.eager&&((V=c.value)==null||V.calculateVisibleItems())}function K(){var V;a.value&&(o.value=!0,(V=s.value)==null||V.focus())}function z(V){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(!V||V.props.disabled))if(t.multiple){const Y=E.value.findIndex(j=>(t.valueComparator||Ks)(j.value,V.value)),Q=$??!~Y;if(~Y){const j=Q?[...E.value,V]:[...E.value];j.splice(Y,1),E.value=j}else Q&&(E.value=[...E.value,V]);t.clearOnSelect&&(I.value="")}else{const Y=$!==!1;E.value=Y?[V]:[],R.value=Y&&!w.value?V.title:"",$t(()=>{h.value=!1,o.value=!0})}}function re(V){a.value=!0,setTimeout(()=>{l.value=!0})}function ne(V){l.value=!1}function Z(V){(V==null||V===""&&!t.multiple&&!w.value)&&(E.value=[])}return Ie(a,(V,$)=>{if(!(V||V===$)&&(f.value=-1,h.value=!1,I.value)){if(t.multiple){z(ml(t,I.value));return}if(!w.value)return;E.value.some(Y=>{let{title:Q}=Y;return Q===I.value})?R.value="":z(ml(t,I.value))}}),Ie(h,()=>{if(!t.hideSelected&&h.value&&E.value.length){const V=D.value.findIndex($=>E.value.some(Y=>(t.valueComparator||Ks)(Y.value,$.value)));dn&&window.requestAnimationFrame(()=>{var $;V>=0&&(($=c.value)==null||$.scrollToIndex(V))})}}),Ie(()=>t.items,(V,$)=>{h.value||a.value&&!$.length&&V.length&&(h.value=!0)}),Ft(()=>{const V=!!(!t.hideNoData||D.value.length||i["prepend-item"]||i["append-item"]||i["no-data"]),$=E.value.length>0,Y=Vo.filterProps(t);return W(Vo,rt({ref:s},Y,{modelValue:I.value,"onUpdate:modelValue":[Q=>I.value=Q,Z],focused:a.value,"onUpdate:focused":Q=>a.value=Q,validationValue:E.externalValue,counterValue:A.value,dirty:$,class:["v-combobox",{"v-combobox--active-menu":h.value,"v-combobox--chips":!!t.chips,"v-combobox--selection-slot":!!w.value,"v-combobox--selecting-index":f.value>-1,[`v-combobox--${t.multiple?"multiple":"single"}`]:!0},t.class],style:t.style,readonly:T.isReadonly.value,placeholder:$?void 0:t.placeholder,"onClick:clear":N,"onMousedown:control":U,onKeydown:H}),{...i,default:()=>W(He,null,[W(Kv,rt({ref:u,modelValue:h.value,"onUpdate:modelValue":Q=>h.value=Q,activator:"parent",contentClass:"v-combobox__content",disabled:G.value,eager:t.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:t.transition,onAfterEnter:X,onAfterLeave:K},t.menuProps),{default:()=>[V&&W(qN,rt({ref:M,selected:L.value,selectStrategy:t.multiple?"independent":"single-independent",onMousedown:Q=>Q.preventDefault(),onKeydown:k,onFocusin:re,onFocusout:ne,tabindex:"-1","aria-live":"polite",color:t.itemColor??t.color},P,t.listProps),{default:()=>{var Q,j,se;return[(Q=i["prepend-item"])==null?void 0:Q.call(i),!D.value.length&&!t.hideNoData&&(((j=i["no-data"])==null?void 0:j.call(i))??W(Bl,{key:"no-data",title:r(t.noDataText)},null)),W(A6,{ref:c,renderless:!0,items:D.value},{default:fe=>{var me;let{item:ae,index:ce,itemRef:ue}=fe;const pe=rt(ae.props,{ref:ue,key:ae.value,active:q.value&&ce===0?!0:void 0,onClick:()=>z(ae,null)});return((me=i.item)==null?void 0:me.call(i,{item:ae,index:ce,props:pe}))??W(Bl,rt(pe,{role:"option"}),{prepend:ye=>{let{isSelected:we}=ye;return W(He,null,[t.multiple&&!t.hideSelected?W(Wv,{key:ae.value,modelValue:we,ripple:!1,tabindex:"-1"},null):void 0,ae.props.prependAvatar&&W(Ll,{image:ae.props.prependAvatar},null),ae.props.prependIcon&&W(Ot,{icon:ae.props.prependIcon},null)])},title:()=>{var ye,we;return o.value?ae.title:tge(ae.title,(ye=O(ae))==null?void 0:ye.title,((we=I.value)==null?void 0:we.length)??0)}})}}),(se=i["append-item"])==null?void 0:se.call(i)]}})]}),E.value.map((Q,j)=>{function se(ue){ue.stopPropagation(),ue.preventDefault(),z(Q,!1)}const fe={"onClick:close":se,onKeydown(ue){ue.key!=="Enter"&&ue.key!==" "||(ue.preventDefault(),ue.stopPropagation(),se(ue))},onMousedown(ue){ue.preventDefault(),ue.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},ae=C.value?!!i.chip:!!i.selection,ce=ae?cN(C.value?i.chip({item:Q,index:j,props:fe}):i.selection({item:Q,index:j})):void 0;if(!(ae&&!ce))return W("div",{key:Q.value,class:["v-combobox__selection",j===f.value&&["v-combobox__selection--selected",b.value]],style:j===f.value?y.value:{}},[C.value?i.chip?W(_i,{key:"chip-defaults",defaults:{VChip:{closable:t.closableChips,size:"small",text:Q.title}}},{default:()=>[ce]}):W(No,rt({key:"chip",closable:t.closableChips,size:"small",text:Q.title,disabled:Q.props.disabled},fe),null):ce??W("span",{class:"v-combobox__selection-text"},[Q.title,t.multiple&&j<E.value.length-1&&W("span",{class:"v-combobox__selection-comma"},[Et(",")])])])})]),"append-inner":function(){var fe;for(var Q=arguments.length,j=new Array(Q),se=0;se<Q;se++)j[se]=arguments[se];return W(He,null,[(fe=i["append-inner"])==null?void 0:fe.call(i,...j),(!t.hideNoData||t.items.length)&&t.menuIcon?W(Ot,{class:"v-combobox__menu-icon",icon:t.menuIcon,onMousedown:F,onClick:$te,"aria-label":r(p.value),title:r(p.value),tabindex:"-1"},null):void 0])}})}),tc({isFocused:a,isPristine:o,menu:h,search:I,selectionIndex:f,filteredItems:x,select:z},s)}}),rge=Ue({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:t=>!isNaN(parseFloat(t))},maxRows:{type:[Number,String],validator:t=>!isNaN(parseFloat(t))},suffix:String,modelModifiers:Object,...eb(),...AN()},"VTextarea"),sge=vt()({name:"VTextarea",directives:{Intersect:NN},inheritAttrs:!1,props:rge(),emits:{"click:control":t=>!0,"mousedown:control":t=>!0,"update:focused":t=>!0,"update:modelValue":t=>!0},setup(t,e){let{attrs:n,emit:i,slots:r}=e;const s=Fn(t,"modelValue"),{isFocused:a,focus:o,blur:l}=XS(t),u=te(()=>typeof t.counterValue=="function"?t.counterValue(s.value):(s.value||"").toString().length),c=te(()=>{if(n.maxlength)return n.maxlength;if(!(!t.counter||typeof t.counter!="number"&&typeof t.counter!="string"))return t.counter});function d(I,A){var x,O;!t.autofocus||!I||(O=(x=A[0].target)==null?void 0:x.focus)==null||O.call(x)}const h=ve(),f=ve(),S=ut(""),_=ve(),p=te(()=>t.persistentPlaceholder||a.value||t.active);function v(){var I;_.value!==document.activeElement&&((I=_.value)==null||I.focus()),a.value||o()}function m(I){v(),i("click:control",I)}function g(I){i("mousedown:control",I)}function b(I){I.stopPropagation(),v(),$t(()=>{s.value="",lN(t["onClick:clear"],I)})}function y(I){var x;const A=I.target;if(s.value=A.value,(x=t.modelModifiers)!=null&&x.trim){const O=[A.selectionStart,A.selectionEnd];$t(()=>{A.selectionStart=O[0],A.selectionEnd=O[1]})}}const E=ve(),T=ve(+t.rows),C=te(()=>["plain","underlined"].includes(t.variant));Wr(()=>{t.autoGrow||(T.value=+t.rows)});function w(){t.autoGrow&&$t(()=>{if(!E.value||!f.value)return;const I=getComputedStyle(E.value),A=getComputedStyle(f.value.$el),x=parseFloat(I.getPropertyValue("--v-field-padding-top"))+parseFloat(I.getPropertyValue("--v-input-padding-top"))+parseFloat(I.getPropertyValue("--v-field-padding-bottom")),O=E.value.scrollHeight,D=parseFloat(I.lineHeight),L=Math.max(parseFloat(t.rows)*D+x,parseFloat(A.getPropertyValue("--v-input-control-height"))),q=parseFloat(t.maxRows)*D+x||1/0,G=Lo(O??0,L,q);T.value=Math.floor((G-x)/D),S.value=Ht(G)})}Jn(w),Ie(s,w),Ie(()=>t.rows,w),Ie(()=>t.maxRows,w),Ie(()=>t.density,w);let R;return Ie(E,I=>{I?(R=new ResizeObserver(w),R.observe(E.value)):R==null||R.disconnect()}),Yi(()=>{R==null||R.disconnect()}),Ft(()=>{const I=!!(r.counter||t.counter||t.counterValue),A=!!(I||r.details),[x,O]=YS(n),{modelValue:D,...L}=Rd.filterProps(t),q=cq(t);return W(Rd,rt({ref:h,modelValue:s.value,"onUpdate:modelValue":G=>s.value=G,class:["v-textarea v-text-field",{"v-textarea--prefixed":t.prefix,"v-textarea--suffixed":t.suffix,"v-text-field--prefixed":t.prefix,"v-text-field--suffixed":t.suffix,"v-textarea--auto-grow":t.autoGrow,"v-textarea--no-resize":t.noResize||t.autoGrow,"v-input--plain-underlined":C.value},t.class],style:t.style},x,L,{centerAffix:T.value===1&&!C.value,focused:a.value}),{...r,default:G=>{let{id:M,isDisabled:P,isDirty:N,isReadonly:U,isValid:F}=G;return W(ON,rt({ref:f,style:{"--v-textarea-control-height":S.value},onClick:m,onMousedown:g,"onClick:clear":b,"onClick:prependInner":t["onClick:prependInner"],"onClick:appendInner":t["onClick:appendInner"]},q,{id:M.value,active:p.value||N.value,centerAffix:T.value===1&&!C.value,dirty:N.value||t.dirty,disabled:P.value,focused:a.value,error:F.value===!1}),{...r,default:k=>{let{props:{class:H,...X}}=k;return W(He,null,[t.prefix&&W("span",{class:"v-text-field__prefix"},[t.prefix]),Ar(W("textarea",rt({ref:_,class:H,value:s.value,onInput:y,autofocus:t.autofocus,readonly:U.value,disabled:P.value,placeholder:t.placeholder,rows:t.rows,name:t.name,onFocus:v,onBlur:l},X,O),null),[[Jl("intersect"),{handler:d},null,{once:!0}]]),t.autoGrow&&Ar(W("textarea",{class:[H,"v-textarea__sizer"],id:`${X.id}-sizer`,"onUpdate:modelValue":K=>s.value=K,ref:E,readonly:!0,"aria-hidden":"true"},null),[[YZ,s.value]]),t.suffix&&W("span",{class:"v-text-field__suffix"},[t.suffix])])}})},details:A?G=>{var M;return W(He,null,[(M=r.details)==null?void 0:M.call(r,G),I&&W(He,null,[W("span",null,null),W(nq,{active:t.persistentCounter||a.value,value:u.value,max:c.value,disabled:t.disabled},r.counter)])])}:void 0})}),tc({},h,f,_)}}),N6=Ke({__name:"ComponentArgInput",props:Ap({name:{},arg:{},instance:{},isSecret:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=kl(t,"modelValue"),n=ve(!1),i=te(()=>t.isSecret?n.value?"text":"password":"text"),r=te(()=>{var o;return t.isSecret?n.value?e.value:"*".repeat(((o=e.value)==null?void 0:o.length)??0):e.value}),s=te(()=>"type"in t.arg.schema?t.arg.schema.type:"unknown"),a=te(()=>s.value==="array"&&(t.arg.schema.items.type==="string"||t.arg.schema.items.type==="number"));return(o,l)=>{const u=Ime;return ie(s)==="string"&&!o.arg.schema.multiline?(_e(),Ne(Vo,{key:0,modelValue:e.value,"onUpdate:modelValue":l[1]||(l[1]=c=>e.value=c),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),style:{"max-height":"40px"},variant:"outlined",density:"compact",type:ie(i),placeholder:o.arg.schema.default,hint:o.arg.schema.description,"hide-details":""},FD({_:2},[o.isSecret?{name:"append-inner",fn:be(()=>[W(Ot,{onClick:l[0]||(l[0]=c=>n.value=!ie(n))},{default:be(()=>[Et(Nn(ie(n)?"mdi-eye-off":"mdi-eye"),1)]),_:1})]),key:"0"}:void 0]),1032,["modelValue","label","type","placeholder","hint"])):ie(s)==="string"&&o.arg.schema.multiline?(_e(),Ne(sge,{key:1,"model-value":ie(r),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),variant:"outlined",density:"compact",placeholder:o.arg.schema.default,"hide-details":"","onUpdate:modelValue":l[3]||(l[3]=c=>e.value=c)},FD({_:2},[o.isSecret?{name:"append-inner",fn:be(()=>[W(Ot,{onClick:l[2]||(l[2]=c=>n.value=!ie(n))},{default:be(()=>[Et(Nn(ie(n)?"mdi-eye-off":"mdi-eye"),1)]),_:1})]),key:"0"}:void 0]),1032,["model-value","label","placeholder"])):ie(s)==="number"?(_e(),Ne(Vo,{key:2,modelValue:e.value,"onUpdate:modelValue":l[4]||(l[4]=c=>e.value=c),modelModifiers:{number:!0},label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),style:{"max-height":"40px"},variant:"outlined",density:"compact",type:"number",placeholder:o.arg.schema.default,"hide-details":""},null,8,["modelValue","label","placeholder"])):ie(s)==="boolean"?(_e(),Ne(kme,{key:3,modelValue:e.value,"onUpdate:modelValue":l[5]||(l[5]=c=>e.value=c),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),density:"compact","hide-details":""},null,8,["modelValue","label"])):ie(a)?(_e(),Ne(ige,{key:4,modelValue:e.value,"onUpdate:modelValue":l[6]||(l[6]=c=>e.value=c),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),placeholder:o.arg.schema.default,variant:"outlined",density:"compact",multiple:"",chips:"","hide-details":""},null,8,["modelValue","label","placeholder"])):"anyOf"in o.arg.schema?(_e(),Ne(Qme,{key:5,modelValue:e.value,"onUpdate:modelValue":l[7]||(l[7]=c=>e.value=c),items:o.arg.schema.anyOf.map(c=>c.const),label:("getDisplayName"in o?o.getDisplayName:ie(Us))(o.name,o.arg.meta),placeholder:o.arg.schema.default,variant:"outlined",density:"compact","hide-details":""},null,8,["modelValue","items","label","placeholder"])):ie(s)==="object"||ie(s)==="array"?(_e(),Ne(u,{key:6,modelValue:e.value,"onUpdate:modelValue":l[8]||(l[8]=c=>e.value=c),name:o.name,arg:o.arg},null,8,["modelValue","name","arg"])):mt("",!0)}}});var sn;(function(t){t.assertEqual=r=>r;function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{const s={};for(const a of r)s[a]=a;return s},t.getValidEnumValues=r=>{const s=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),a={};for(const o of s)a[o]=r[o];return t.objectValues(a)},t.objectValues=r=>t.objectKeys(r).map(function(s){return r[s]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const s=[];for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&s.push(a);return s},t.find=(r,s)=>{for(const a of r)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function i(r,s=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=i,t.jsonStringifyReplacer=(r,s)=>typeof s=="bigint"?s.toString():s})(sn||(sn={}));var HO;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(HO||(HO={}));const tt=sn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),va=t=>{switch(typeof t){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return isNaN(t)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(t)?tt.array:t===null?tt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?tt.promise:typeof Map<"u"&&t instanceof Map?tt.map:typeof Set<"u"&&t instanceof Set?tt.set:typeof Date<"u"&&t instanceof Date?tt.date:tt.object;default:return tt.unknown}},xe=sn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),oge=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class os extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(s){return s.message},i={_errors:[]},r=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)i._errors.push(n(a));else{let o=i,l=0;for(;l<a.path.length;){const u=a.path[l];l===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(a))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return r(this),i}static assert(e){if(!(e instanceof os))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,sn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const r of this.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):i.push(e(r));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}os.create=t=>new os(t);const Bd=(t,e)=>{let n;switch(t.code){case xe.invalid_type:t.received===tt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case xe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,sn.jsonStringifyReplacer)}`;break;case xe.unrecognized_keys:n=`Unrecognized key(s) in object: ${sn.joinValues(t.keys,", ")}`;break;case xe.invalid_union:n="Invalid input";break;case xe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${sn.joinValues(t.options)}`;break;case xe.invalid_enum_value:n=`Invalid enum value. Expected ${sn.joinValues(t.options)}, received '${t.received}'`;break;case xe.invalid_arguments:n="Invalid function arguments";break;case xe.invalid_return_type:n="Invalid function return type";break;case xe.invalid_date:n="Invalid date";break;case xe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:sn.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case xe.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case xe.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case xe.custom:n="Invalid input";break;case xe.invalid_intersection_types:n="Intersection results could not be merged";break;case xe.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case xe.not_finite:n="Number must be finite";break;default:n=e.defaultError,sn.assertNever(t)}return{message:n}};let x6=Bd;function age(t){x6=t}function jv(){return x6}const Qv=t=>{const{data:e,path:n,errorMaps:i,issueData:r}=t,s=[...n,...r.path||[]],a={...r,path:s};if(r.message!==void 0)return{...r,path:s,message:r.message};let o="";const l=i.filter(u=>!!u).slice().reverse();for(const u of l)o=u(a,{data:e,defaultError:o}).message;return{...r,path:s,message:o}},lge=[];function Ye(t,e){const n=jv(),i=Qv({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Bd?void 0:Bd].filter(r=>!!r)});t.common.issues.push(i)}class lr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const r of n){if(r.status==="aborted")return xt;r.status==="dirty"&&e.dirty(),i.push(r.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const r of n){const s=await r.key,a=await r.value;i.push({key:s,value:a})}return lr.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const r of n){const{key:s,value:a}=r;if(s.status==="aborted"||a.status==="aborted")return xt;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}}const xt=Object.freeze({status:"aborted"}),id=t=>({status:"dirty",value:t}),Ir=t=>({status:"valid",value:t}),VO=t=>t.status==="aborted",zO=t=>t.status==="dirty",uu=t=>t.status==="valid",Xf=t=>typeof Promise<"u"&&t instanceof Promise;function Xv(t,e,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function D6(t,e,n,i,r){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var ft;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ft||(ft={}));var Qh,Xh;class Wo{constructor(e,n,i,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const sP=(t,e)=>{if(uu(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new os(t.common.issues);return this._error=n,this._error}}};function Ut(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:r}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(a,o)=>{var l,u;const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:(l=c??i)!==null&&l!==void 0?l:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:o.defaultError}},description:r}}class Vt{get description(){return this._def.description}_getType(e){return va(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:va(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new lr,ctx:{common:e.parent.common,data:e.data,parsedType:va(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Xf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){var i;const r={common:{issues:[],async:(i=n==null?void 0:n.async)!==null&&i!==void 0?i:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:va(e)},s=this._parseSync({data:e,path:r.path,parent:r});return sP(r,s)}"~validate"(e){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:va(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:r});return uu(s)?{value:s.value}:{issues:r.common.issues}}catch(s){!((i=(n=s==null?void 0:s.message)===null||n===void 0?void 0:n.toLowerCase())===null||i===void 0)&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>uu(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:va(e)},r=this._parse({data:e,path:i.path,parent:i}),s=await(Xf(r)?r:Promise.resolve(r));return sP(i,s)}refine(e,n){const i=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,s)=>{const a=e(r),o=()=>s.addIssue({code:xe.custom,...i(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((i,r)=>e(i)?!0:(r.addIssue(typeof n=="function"?n(i,r):n),!1))}_refinement(e){return new eo({schema:this,typeName:Nt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Fo.create(this,this._def)}nullable(){return Yl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return js.create(this)}promise(){return Ud.create(this,this._def)}or(e){return tp.create([this,e],this._def)}and(e){return np.create(this,e,this._def)}transform(e){return new eo({...Ut(this._def),schema:this,typeName:Nt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ap({...Ut(this._def),innerType:this,defaultValue:n,typeName:Nt.ZodDefault})}brand(){return new Ax({typeName:Nt.ZodBranded,type:this,...Ut(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new lp({...Ut(this._def),innerType:this,catchValue:n,typeName:Nt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Vp.create(this,e)}readonly(){return cp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cge=/^c[^\s-]{8,}$/i,uge=/^[0-9a-z]+$/,dge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hge=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fge=/^[a-z0-9_-]{21}$/i,pge=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_ge=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mge=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cy;const vge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Sge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,bge=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ege=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yge=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cge=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,k6="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Tge=new RegExp(`^${k6}$`);function M6(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function wge(t){return new RegExp(`^${M6(t)}$`)}function L6(t){let e=`${k6}T${M6(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Rge(t,e){return!!((e==="v4"||!e)&&vge.test(t)||(e==="v6"||!e)&&bge.test(t))}function Age(t,e){if(!pge.test(t))return!1;try{const[n]=t.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!(typeof r!="object"||r===null||!r.typ||!r.alg||e&&r.alg!==e)}catch{return!1}}function Oge(t,e){return!!((e==="v4"||!e)&&Sge.test(t)||(e==="v6"||!e)&&Ege.test(t))}class qs extends Vt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==tt.string){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_type,expected:tt.string,received:s.parsedType}),xt}const i=new lr;let r;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(r=this._getOrReturnCtx(e,r),a?Ye(r,{code:xe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&Ye(r,{code:xe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")mge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"email",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")cy||(cy=new RegExp(gge,"u")),cy.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"emoji",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")hge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"uuid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")fge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"nanoid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")cge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"cuid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")uge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"cuid2",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")dge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"ulid",code:xe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),Ye(r,{validation:"url",code:xe.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"regex",code:xe.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?L6(s).test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?Tge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?wge(s).test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?_ge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"duration",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?Rge(e.data,s.version)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"ip",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="jwt"?Age(e.data,s.alg)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"jwt",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="cidr"?Oge(e.data,s.version)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"cidr",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?yge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"base64",code:xe.invalid_string,message:s.message}),i.dirty()):s.kind==="base64url"?Cge.test(e.data)||(r=this._getOrReturnCtx(e,r),Ye(r,{validation:"base64url",code:xe.invalid_string,message:s.message}),i.dirty()):sn.assertNever(s);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(r=>e.test(r),{validation:n,code:xe.invalid_string,...ft.errToObj(i)})}_addCheck(e){return new qs({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ft.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ft.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ft.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ft.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ft.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ft.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ft.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ft.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ft.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ft.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ft.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ft.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ft.errToObj(e)})}datetime(e){var n,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...ft.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ft.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ft.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ft.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ft.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ft.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ft.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ft.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ft.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ft.errToObj(n)})}nonempty(e){return this.min(1,ft.errToObj(e))}trim(){return new qs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}qs.create=t=>{var e;return new qs({checks:[],typeName:Nt.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ut(t)})};function Ige(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,r=n>i?n:i,s=parseInt(t.toFixed(r).replace(".","")),a=parseInt(e.toFixed(r).replace(".",""));return s%a/Math.pow(10,r)}class Vl extends Vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==tt.number){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_type,expected:tt.number,received:s.parsedType}),xt}let i;const r=new lr;for(const s of this._def.checks)s.kind==="int"?sn.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):s.kind==="multipleOf"?Ige(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.not_finite,message:s.message}),r.dirty()):sn.assertNever(s);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ft.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ft.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ft.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ft.toString(n))}setLimit(e,n,i,r){return new Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:ft.toString(r)}]})}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ft.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ft.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ft.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ft.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ft.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ft.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&sn.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Vl.create=t=>new Vl({checks:[],typeName:Nt.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ut(t)});class zl extends Vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==tt.bigint)return this._getInvalidInput(e);let i;const r=new lr;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Ye(i,{code:xe.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):sn.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Ye(n,{code:xe.invalid_type,expected:tt.bigint,received:n.parsedType}),xt}gte(e,n){return this.setLimit("min",e,!0,ft.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ft.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ft.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ft.toString(n))}setLimit(e,n,i,r){return new zl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:ft.toString(r)}]})}_addCheck(e){return new zl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ft.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ft.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}zl.create=t=>{var e;return new zl({checks:[],typeName:Nt.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ut(t)})};class Zf extends Vt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==tt.boolean){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.boolean,received:i.parsedType}),xt}return Ir(e.data)}}Zf.create=t=>new Zf({typeName:Nt.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ut(t)});class du extends Vt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==tt.date){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_type,expected:tt.date,received:s.parsedType}),xt}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Ye(s,{code:xe.invalid_date}),xt}const i=new lr;let r;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(r=this._getOrReturnCtx(e,r),Ye(r,{code:xe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):sn.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new du({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ft.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ft.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}du.create=t=>new du({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Nt.ZodDate,...Ut(t)});class Zv extends Vt{_parse(e){if(this._getType(e)!==tt.symbol){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.symbol,received:i.parsedType}),xt}return Ir(e.data)}}Zv.create=t=>new Zv({typeName:Nt.ZodSymbol,...Ut(t)});class Jf extends Vt{_parse(e){if(this._getType(e)!==tt.undefined){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.undefined,received:i.parsedType}),xt}return Ir(e.data)}}Jf.create=t=>new Jf({typeName:Nt.ZodUndefined,...Ut(t)});class ep extends Vt{_parse(e){if(this._getType(e)!==tt.null){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.null,received:i.parsedType}),xt}return Ir(e.data)}}ep.create=t=>new ep({typeName:Nt.ZodNull,...Ut(t)});class Fd extends Vt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ir(e.data)}}Fd.create=t=>new Fd({typeName:Nt.ZodAny,...Ut(t)});class Wc extends Vt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ir(e.data)}}Wc.create=t=>new Wc({typeName:Nt.ZodUnknown,...Ut(t)});class ka extends Vt{_parse(e){const n=this._getOrReturnCtx(e);return Ye(n,{code:xe.invalid_type,expected:tt.never,received:n.parsedType}),xt}}ka.create=t=>new ka({typeName:Nt.ZodNever,...Ut(t)});class Jv extends Vt{_parse(e){if(this._getType(e)!==tt.undefined){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.void,received:i.parsedType}),xt}return Ir(e.data)}}Jv.create=t=>new Jv({typeName:Nt.ZodVoid,...Ut(t)});class js extends Vt{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),r=this._def;if(n.parsedType!==tt.array)return Ye(n,{code:xe.invalid_type,expected:tt.array,received:n.parsedType}),xt;if(r.exactLength!==null){const a=n.data.length>r.exactLength.value,o=n.data.length<r.exactLength.value;(a||o)&&(Ye(n,{code:a?xe.too_big:xe.too_small,minimum:o?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),i.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Ye(n,{code:xe.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),i.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Ye(n,{code:xe.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>r.type._parseAsync(new Wo(n,a,n.path,o)))).then(a=>lr.mergeArray(i,a));const s=[...n.data].map((a,o)=>r.type._parseSync(new Wo(n,a,n.path,o)));return lr.mergeArray(i,s)}get element(){return this._def.type}min(e,n){return new js({...this._def,minLength:{value:e,message:ft.toString(n)}})}max(e,n){return new js({...this._def,maxLength:{value:e,message:ft.toString(n)}})}length(e,n){return new js({...this._def,exactLength:{value:e,message:ft.toString(n)}})}nonempty(e){return this.min(1,e)}}js.create=(t,e)=>new js({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Nt.ZodArray,...Ut(e)});function ju(t){if(t instanceof Xn){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=Fo.create(ju(i))}return new Xn({...t._def,shape:()=>e})}else return t instanceof js?new js({...t._def,type:ju(t.element)}):t instanceof Fo?Fo.create(ju(t.unwrap())):t instanceof Yl?Yl.create(ju(t.unwrap())):t instanceof Ko?Ko.create(t.items.map(e=>ju(e))):t}class Xn extends Vt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=sn.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==tt.object){const u=this._getOrReturnCtx(e);return Ye(u,{code:xe.invalid_type,expected:tt.object,received:u.parsedType}),xt}const{status:i,ctx:r}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof ka&&this._def.unknownKeys==="strip"))for(const u in r.data)a.includes(u)||o.push(u);const l=[];for(const u of a){const c=s[u],d=r.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Wo(r,d,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof ka){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:r.data[c]}});else if(u==="strict")o.length>0&&(Ye(r,{code:xe.unrecognized_keys,keys:o}),i.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const d=r.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Wo(r,d,r.path,c)),alwaysSet:c in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>lr.mergeObjectSync(i,u)):lr.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return ft.errToObj,new Xn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{var r,s,a,o;const l=(a=(s=(r=this._def).errorMap)===null||s===void 0?void 0:s.call(r,n,i).message)!==null&&a!==void 0?a:i.defaultError;return n.code==="unrecognized_keys"?{message:(o=ft.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new Xn({...this._def,unknownKeys:"strip"})}passthrough(){return new Xn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Xn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Xn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Nt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Xn({...this._def,catchall:e})}pick(e){const n={};return sn.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new Xn({...this._def,shape:()=>n})}omit(e){const n={};return sn.objectKeys(this.shape).forEach(i=>{e[i]||(n[i]=this.shape[i])}),new Xn({...this._def,shape:()=>n})}deepPartial(){return ju(this)}partial(e){const n={};return sn.objectKeys(this.shape).forEach(i=>{const r=this.shape[i];e&&!e[i]?n[i]=r:n[i]=r.optional()}),new Xn({...this._def,shape:()=>n})}required(e){const n={};return sn.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])n[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Fo;)s=s._def.innerType;n[i]=s}}),new Xn({...this._def,shape:()=>n})}keyof(){return P6(sn.objectKeys(this.shape))}}Xn.create=(t,e)=>new Xn({shape:()=>t,unknownKeys:"strip",catchall:ka.create(),typeName:Nt.ZodObject,...Ut(e)});Xn.strictCreate=(t,e)=>new Xn({shape:()=>t,unknownKeys:"strict",catchall:ka.create(),typeName:Nt.ZodObject,...Ut(e)});Xn.lazycreate=(t,e)=>new Xn({shape:t,unknownKeys:"strip",catchall:ka.create(),typeName:Nt.ZodObject,...Ut(e)});class tp extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function r(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new os(o.ctx.common.issues));return Ye(n,{code:xe.invalid_union,unionErrors:a}),xt}if(n.common.async)return Promise.all(i.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let s;const a=[];for(const l of i){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new os(l));return Ye(n,{code:xe.invalid_union,unionErrors:o}),xt}}get options(){return this._def.options}}tp.create=(t,e)=>new tp({options:t,typeName:Nt.ZodUnion,...Ut(e)});const pa=t=>t instanceof rp?pa(t.schema):t instanceof eo?pa(t.innerType()):t instanceof sp?[t.value]:t instanceof ql?t.options:t instanceof op?sn.objectValues(t.enum):t instanceof ap?pa(t._def.innerType):t instanceof Jf?[void 0]:t instanceof ep?[null]:t instanceof Fo?[void 0,...pa(t.unwrap())]:t instanceof Yl?[null,...pa(t.unwrap())]:t instanceof Ax||t instanceof cp?pa(t.unwrap()):t instanceof lp?pa(t._def.innerType):[];class Eb extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==tt.object)return Ye(n,{code:xe.invalid_type,expected:tt.object,received:n.parsedType}),xt;const i=this.discriminator,r=n.data[i],s=this.optionsMap.get(r);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Ye(n,{code:xe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),xt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const r=new Map;for(const s of n){const a=pa(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(r.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);r.set(o,s)}}return new Eb({typeName:Nt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:r,...Ut(i)})}}function qO(t,e){const n=va(t),i=va(e);if(t===e)return{valid:!0,data:t};if(n===tt.object&&i===tt.object){const r=sn.objectKeys(e),s=sn.objectKeys(t).filter(o=>r.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=qO(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===tt.array&&i===tt.array){if(t.length!==e.length)return{valid:!1};const r=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=qO(a,o);if(!l.valid)return{valid:!1};r.push(l.data)}return{valid:!0,data:r}}else return n===tt.date&&i===tt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class np extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=(s,a)=>{if(VO(s)||VO(a))return xt;const o=qO(s.value,a.value);return o.valid?((zO(s)||zO(a))&&n.dirty(),{status:n.value,value:o.data}):(Ye(i,{code:xe.invalid_intersection_types}),xt)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>r(s,a)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}np.create=(t,e,n)=>new np({left:t,right:e,typeName:Nt.ZodIntersection,...Ut(n)});class Ko extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.array)return Ye(i,{code:xe.invalid_type,expected:tt.array,received:i.parsedType}),xt;if(i.data.length<this._def.items.length)return Ye(i,{code:xe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xt;!this._def.rest&&i.data.length>this._def.items.length&&(Ye(i,{code:xe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...i.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Wo(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>lr.mergeArray(n,a)):lr.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Ko({...this._def,rest:e})}}Ko.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ko({items:t,typeName:Nt.ZodTuple,rest:null,...Ut(e)})};class ip extends Vt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.object)return Ye(i,{code:xe.invalid_type,expected:tt.object,received:i.parsedType}),xt;const r=[],s=this._def.keyType,a=this._def.valueType;for(const o in i.data)r.push({key:s._parse(new Wo(i,o,i.path,o)),value:a._parse(new Wo(i,i.data[o],i.path,o)),alwaysSet:o in i.data});return i.common.async?lr.mergeObjectAsync(n,r):lr.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof Vt?new ip({keyType:e,valueType:n,typeName:Nt.ZodRecord,...Ut(i)}):new ip({keyType:qs.create(),valueType:e,typeName:Nt.ZodRecord,...Ut(n)})}}class eS extends Vt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.map)return Ye(i,{code:xe.invalid_type,expected:tt.map,received:i.parsedType}),xt;const r=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],u)=>({key:r._parse(new Wo(i,o,i.path,[u,"key"])),value:s._parse(new Wo(i,l,i.path,[u,"value"]))}));if(i.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return xt;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return xt;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}}}}eS.create=(t,e,n)=>new eS({valueType:e,keyType:t,typeName:Nt.ZodMap,...Ut(n)});class hu extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==tt.set)return Ye(i,{code:xe.invalid_type,expected:tt.set,received:i.parsedType}),xt;const r=this._def;r.minSize!==null&&i.data.size<r.minSize.value&&(Ye(i,{code:xe.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&i.data.size>r.maxSize.value&&(Ye(i,{code:xe.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return xt;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const o=[...i.data.values()].map((l,u)=>s._parse(new Wo(i,l,i.path,u)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new hu({...this._def,minSize:{value:e,message:ft.toString(n)}})}max(e,n){return new hu({...this._def,maxSize:{value:e,message:ft.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}hu.create=(t,e)=>new hu({valueType:t,minSize:null,maxSize:null,typeName:Nt.ZodSet,...Ut(e)});class gd extends Vt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==tt.function)return Ye(n,{code:xe.invalid_type,expected:tt.function,received:n.parsedType}),xt;function i(o,l){return Qv({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jv(),Bd].filter(u=>!!u),issueData:{code:xe.invalid_arguments,argumentsError:l}})}function r(o,l){return Qv({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jv(),Bd].filter(u=>!!u),issueData:{code:xe.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Ud){const o=this;return Ir(async function(...l){const u=new os([]),c=await o._def.args.parseAsync(l,s).catch(f=>{throw u.addIssue(i(l,f)),u}),d=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(d,s).catch(f=>{throw u.addIssue(r(d,f)),u})})}else{const o=this;return Ir(function(...l){const u=o._def.args.safeParse(l,s);if(!u.success)throw new os([i(l,u.error)]);const c=Reflect.apply(a,this,u.data),d=o._def.returns.safeParse(c,s);if(!d.success)throw new os([r(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new gd({...this._def,args:Ko.create(e).rest(Wc.create())})}returns(e){return new gd({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new gd({args:e||Ko.create([]).rest(Wc.create()),returns:n||Wc.create(),typeName:Nt.ZodFunction,...Ut(i)})}}class rp extends Vt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}rp.create=(t,e)=>new rp({getter:t,typeName:Nt.ZodLazy,...Ut(e)});class sp extends Vt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Ye(n,{received:n.data,code:xe.invalid_literal,expected:this._def.value}),xt}return{status:"valid",value:e.data}}get value(){return this._def.value}}sp.create=(t,e)=>new sp({value:t,typeName:Nt.ZodLiteral,...Ut(e)});function P6(t,e){return new ql({values:t,typeName:Nt.ZodEnum,...Ut(e)})}class ql extends Vt{constructor(){super(...arguments),Qh.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return Ye(n,{expected:sn.joinValues(i),received:n.parsedType,code:xe.invalid_type}),xt}if(Xv(this,Qh)||D6(this,Qh,new Set(this._def.values)),!Xv(this,Qh).has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return Ye(n,{received:n.data,code:xe.invalid_enum_value,options:i}),xt}return Ir(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ql.create(e,{...this._def,...n})}exclude(e,n=this._def){return ql.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}Qh=new WeakMap;ql.create=P6;class op extends Vt{constructor(){super(...arguments),Xh.set(this,void 0)}_parse(e){const n=sn.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==tt.string&&i.parsedType!==tt.number){const r=sn.objectValues(n);return Ye(i,{expected:sn.joinValues(r),received:i.parsedType,code:xe.invalid_type}),xt}if(Xv(this,Xh)||D6(this,Xh,new Set(sn.getValidEnumValues(this._def.values))),!Xv(this,Xh).has(e.data)){const r=sn.objectValues(n);return Ye(i,{received:i.data,code:xe.invalid_enum_value,options:r}),xt}return Ir(e.data)}get enum(){return this._def.values}}Xh=new WeakMap;op.create=(t,e)=>new op({values:t,typeName:Nt.ZodNativeEnum,...Ut(e)});class Ud extends Vt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==tt.promise&&n.common.async===!1)return Ye(n,{code:xe.invalid_type,expected:tt.promise,received:n.parsedType}),xt;const i=n.parsedType===tt.promise?n.data:Promise.resolve(n.data);return Ir(i.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ud.create=(t,e)=>new Ud({type:t,typeName:Nt.ZodPromise,...Ut(e)});class eo extends Vt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:a=>{Ye(i,a),a.fatal?n.abort():n.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),r.type==="preprocess"){const a=r.transform(i.data,s);if(i.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return xt;const l=await this._def.schema._parseAsync({data:o,path:i.path,parent:i});return l.status==="aborted"?xt:l.status==="dirty"||n.value==="dirty"?id(l.value):l});{if(n.value==="aborted")return xt;const o=this._def.schema._parseSync({data:a,path:i.path,parent:i});return o.status==="aborted"?xt:o.status==="dirty"||n.value==="dirty"?id(o.value):o}}if(r.type==="refinement"){const a=o=>{const l=r.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){const o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?xt:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?xt:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(r.type==="transform")if(i.common.async===!1){const a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!uu(a))return a;const o=r.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>uu(a)?Promise.resolve(r.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);sn.assertNever(r)}}eo.create=(t,e,n)=>new eo({schema:t,typeName:Nt.ZodEffects,effect:e,...Ut(n)});eo.createWithPreprocess=(t,e,n)=>new eo({schema:e,effect:{type:"preprocess",transform:t},typeName:Nt.ZodEffects,...Ut(n)});class Fo extends Vt{_parse(e){return this._getType(e)===tt.undefined?Ir(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fo.create=(t,e)=>new Fo({innerType:t,typeName:Nt.ZodOptional,...Ut(e)});class Yl extends Vt{_parse(e){return this._getType(e)===tt.null?Ir(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Yl.create=(t,e)=>new Yl({innerType:t,typeName:Nt.ZodNullable,...Ut(e)});class ap extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===tt.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ap.create=(t,e)=>new ap({innerType:t,typeName:Nt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ut(e)});class lp extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Xf(r)?r.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new os(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new os(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}lp.create=(t,e)=>new lp({innerType:t,typeName:Nt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ut(e)});class tS extends Vt{_parse(e){if(this._getType(e)!==tt.nan){const i=this._getOrReturnCtx(e);return Ye(i,{code:xe.invalid_type,expected:tt.nan,received:i.parsedType}),xt}return{status:"valid",value:e.data}}}tS.create=t=>new tS({typeName:Nt.ZodNaN,...Ut(t)});const Nge=Symbol("zod_brand");class Ax extends Vt{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Vp extends Vt{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?xt:s.status==="dirty"?(n.dirty(),id(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{const r=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?xt:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:i.path,parent:i})}}static create(e,n){return new Vp({in:e,out:n,typeName:Nt.ZodPipeline})}}class cp extends Vt{_parse(e){const n=this._def.innerType._parse(e),i=r=>(uu(r)&&(r.value=Object.freeze(r.value)),r);return Xf(n)?n.then(r=>i(r)):i(n)}unwrap(){return this._def.innerType}}cp.create=(t,e)=>new cp({innerType:t,typeName:Nt.ZodReadonly,...Ut(e)});function oP(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function B6(t,e={},n){return t?Fd.create().superRefine((i,r)=>{var s,a;const o=t(i);if(o instanceof Promise)return o.then(l=>{var u,c;if(!l){const d=oP(e,i),h=(c=(u=d.fatal)!==null&&u!==void 0?u:n)!==null&&c!==void 0?c:!0;r.addIssue({code:"custom",...d,fatal:h})}});if(!o){const l=oP(e,i),u=(a=(s=l.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0;r.addIssue({code:"custom",...l,fatal:u})}}):Fd.create()}const xge={object:Xn.lazycreate};var Nt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Nt||(Nt={}));const Dge=(t,e={message:`Input not instance of ${t.name}`})=>B6(n=>n instanceof t,e),F6=qs.create,U6=Vl.create,kge=tS.create,Mge=zl.create,$6=Zf.create,Lge=du.create,Pge=Zv.create,Bge=Jf.create,Fge=ep.create,Uge=Fd.create,$ge=Wc.create,Gge=ka.create,Hge=Jv.create,Vge=js.create,zge=Xn.create,qge=Xn.strictCreate,Yge=tp.create,Wge=Eb.create,Kge=np.create,jge=Ko.create,Qge=ip.create,Xge=eS.create,Zge=hu.create,Jge=gd.create,eve=rp.create,tve=sp.create,nve=ql.create,ive=op.create,rve=Ud.create,aP=eo.create,sve=Fo.create,ove=Yl.create,ave=eo.createWithPreprocess,lve=Vp.create,cve=()=>F6().optional(),uve=()=>U6().optional(),dve=()=>$6().optional(),hve={string:t=>qs.create({...t,coerce:!0}),number:t=>Vl.create({...t,coerce:!0}),boolean:t=>Zf.create({...t,coerce:!0}),bigint:t=>zl.create({...t,coerce:!0}),date:t=>du.create({...t,coerce:!0})},fve=xt;var Re=Object.freeze({__proto__:null,defaultErrorMap:Bd,setErrorMap:age,getErrorMap:jv,makeIssue:Qv,EMPTY_PATH:lge,addIssueToContext:Ye,ParseStatus:lr,INVALID:xt,DIRTY:id,OK:Ir,isAborted:VO,isDirty:zO,isValid:uu,isAsync:Xf,get util(){return sn},get objectUtil(){return HO},ZodParsedType:tt,getParsedType:va,ZodType:Vt,datetimeRegex:L6,ZodString:qs,ZodNumber:Vl,ZodBigInt:zl,ZodBoolean:Zf,ZodDate:du,ZodSymbol:Zv,ZodUndefined:Jf,ZodNull:ep,ZodAny:Fd,ZodUnknown:Wc,ZodNever:ka,ZodVoid:Jv,ZodArray:js,ZodObject:Xn,ZodUnion:tp,ZodDiscriminatedUnion:Eb,ZodIntersection:np,ZodTuple:Ko,ZodRecord:ip,ZodMap:eS,ZodSet:hu,ZodFunction:gd,ZodLazy:rp,ZodLiteral:sp,ZodEnum:ql,ZodNativeEnum:op,ZodPromise:Ud,ZodEffects:eo,ZodTransformer:eo,ZodOptional:Fo,ZodNullable:Yl,ZodDefault:ap,ZodCatch:lp,ZodNaN:tS,BRAND:Nge,ZodBranded:Ax,ZodPipeline:Vp,ZodReadonly:cp,custom:B6,Schema:Vt,ZodSchema:Vt,late:xge,get ZodFirstPartyTypeKind(){return Nt},coerce:hve,any:Uge,array:Vge,bigint:Mge,boolean:$6,date:Lge,discriminatedUnion:Wge,effect:aP,enum:nve,function:Jge,instanceof:Dge,intersection:Kge,lazy:eve,literal:tve,map:Xge,nan:kge,nativeEnum:ive,never:Gge,null:Fge,nullable:ove,number:U6,object:zge,oboolean:dve,onumber:uve,optional:sve,ostring:cve,pipeline:lve,preprocess:ave,promise:rve,record:Qge,set:Zge,strictObject:qge,string:F6,symbol:Pge,transformer:aP,tuple:jge,undefined:Bge,union:Yge,unknown:$ge,void:Hge,NEVER:fve,ZodIssueCode:xe,quotelessJson:oge,ZodError:os});const Ox=Re.object({x:Re.number(),y:Re.number()}),yb=Re.object({instanceId:Re.string(),output:Re.string()}),nS=Re.object({hubId:Re.string()}),pve=Re.object({args:Re.record(Re.unknown()).optional(),inputs:Re.record(Re.array(yb)).optional(),hubInputs:Re.record(Re.array(nS)).optional(),injectionInputs:Re.array(nS).optional(),position:Ox.optional()}),lP=Re.object({id:Re.string(),type:Re.string(),name:Re.string(),...pve.shape,parentId:Re.string().optional(),outputs:Re.record(Re.array(yb)).optional()});Re.object({instance:lP,children:Re.array(lP)});Re.object({position:Ox.optional(),inputs:Re.array(yb).optional(),injectionInputs:Re.array(nS).optional()});Re.object({id:Re.string().nanoid(),position:Ox,inputs:Re.array(yb).optional(),injectionInputs:Re.array(nS).optional()});var G6={done:!1,hasNext:!1};function cP(t,...e){let n=t,i=e.map(s=>"lazy"in s?_ve(s):void 0),r=0;for(;r<e.length;){if(i[r]===void 0||!mve(n)){let l=e[r];n=l(n),r+=1;continue}let s=[];for(let l=r;l<e.length;l++){let u=i[l];if(u===void 0||(s.push(u),u.isSingle))break}let a=[];for(let l of n)if(H6(l,a,s))break;let{isSingle:o}=s.at(-1);n=o?a[0]:a,r+=s.length}return n}function H6(t,e,n){if(n.length===0)return e.push(t),!1;let i=t,r=G6,s=!1;for(let[a,o]of n.entries()){let{index:l,items:u}=o;if(u.push(i),r=o(i,l,u),o.index+=1,r.hasNext){if(r.hasMany??!1){for(let c of r.next)if(H6(c,e,n.slice(a+1)))return!0;return s}i=r.next}if(!r.hasNext)break;r.done&&(s=!0)}return r.hasNext&&e.push(i),s}function _ve(t){let{lazy:e,lazyArgs:n}=t,i=e(...n);return Object.assign(i,{isSingle:e.single??!1,index:0,items:[]})}function mve(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}function gve(t,e){let n=e.length-t.length;if(n===1){let[i,...r]=e;return cP(i,{lazy:t,lazyArgs:r})}if(n===0){let i={lazy:t,lazyArgs:e};return Object.assign(r=>cP(r,i),i)}throw new Error("Wrong number of arguments")}function vve(t,e,n){let i=r=>t(r,...e);return n===void 0?i:Object.assign(i,{lazy:n,lazyArgs:e})}function V6(t,e,n){let i=t.length-e.length;if(i===0)return t(...e);if(i===1)return vve(t,e,n);throw new Error("Wrong number of arguments")}function z6(...t){return gve(Sve,t)}function Sve(){let t=new Set;return e=>t.has(e)?G6:(t.add(e),{done:!1,hasNext:!0,next:e})}function uP(...t){return V6(bve,t)}function bve(t,e){let n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function Eve(...t){return V6(Object.fromEntries,t)}const yve=Re.enum(["not_created","updating","destroying","refreshing","created","error","pending","unknown"]),Cve=Re.object({name:Re.string(),value:Re.string().optional(),displayName:Re.string().optional(),sensitive:Re.boolean().optional(),url:Re.string().optional()}),Ix=Re.object({name:Re.string(),contentType:Re.string(),isBinary:Re.boolean().optional()});Re.object({...Ix.shape,content:Re.string()});const Tve=Re.union([Re.object({type:Re.literal("markdown"),content:Re.string()}),Re.object({type:Re.literal("qr"),content:Re.string(),showContent:Re.coerce.boolean(),language:Re.string().optional()}),Re.object({type:Re.literal("file"),fileMeta:Ix})]),q6=Re.object({name:Re.string(),title:Re.string()});Re.object({...q6.shape,content:Re.array(Tve)});const Y6=Re.object({name:Re.string(),title:Re.string(),description:Re.string().optional()}),wve=Re.object({content:Re.string().optional(),isBinary:Re.boolean().optional(),mode:Re.number().optional()});Re.object({...Y6.shape,image:Re.string(),command:Re.string().array(),cwd:Re.string().optional(),env:Re.record(Re.string()).optional(),files:Re.record(wve).optional()});const Rve=Re.union([Re.object({type:Re.literal("before-destroy")}),Re.object({type:Re.literal("schedule"),schedule:Re.string()})]),Ave=Re.object({name:Re.string(),title:Re.string(),description:Re.string().optional(),spec:Rve});Re.object({name:Re.string()});const Ove=Re.object({id:Re.string(),parentId:Re.string().nullable().default(null),status:yve,latestOperationId:Re.string().nullable().default(null),currentResourceCount:Re.number().nullable().default(null),totalResourceCount:Re.number().nullable().default(null),inputHash:Re.string().nullable().default(null),outputHash:Re.string().nullable().default(null),error:Re.string().nullable().default(null),statusFields:Re.array(Cve).default(()=>[]),files:Re.array(Ix).default(()=>[]),pages:Re.array(q6).default(()=>[]),terminals:Re.array(Y6).default(()=>[]),triggers:Re.array(Ave).default(()=>[])});Re.object({...Ove.shape,secrets:Re.record(Re.string()).nullable(),logLine:Re.string().nullable()}).partial();function W6(t,e="not_created",n={}){return{id:t,parentId:null,status:e,latestOperationId:null,currentResourceCount:null,totalResourceCount:null,inputHash:null,outputHash:null,error:null,statusFields:[],files:[],pages:[],terminals:[],triggers:[],...n}}function Ive(t,e){if(!e.id)throw new Error("The ID of the instance state is required.");let n=t.get(e.id);return n||(n=W6(e.id,"unknown"),t.set(e.id,n)),e.status!==void 0&&(n.status=e.status),e.latestOperationId!==void 0&&(n.latestOperationId=e.latestOperationId),e.currentResourceCount!==void 0&&(n.currentResourceCount=e.currentResourceCount),e.totalResourceCount!==void 0&&(n.totalResourceCount=e.totalResourceCount),e.inputHash!==void 0&&(n.inputHash=e.inputHash),e.outputHash!==void 0&&(n.outputHash=e.outputHash),e.error!==void 0&&(n.error=e.error),e.statusFields!==void 0&&(n.statusFields=e.statusFields),e.files!==void 0&&(n.files=e.files),e.pages!==void 0&&(n.pages=e.pages),e.terminals!==void 0&&(n.terminals=e.terminals),e.triggers!==void 0&&(n.triggers=e.triggers),n}const K6=Re.enum(["update","destroy","recreate","refresh","evaluate"]),Nve=Re.enum(["pending","evaluating","running","completed","failed","cancelled"]);Re.object({id:Re.string().uuid(),projectId:Re.string(),type:K6,status:Nve,instanceIds:Re.array(Re.string()),error:Re.string().nullable(),startedAt:Re.number(),completedAt:Re.number().nullable()});Re.object({projectId:Re.string(),type:K6,instanceIds:Re.array(Re.string())});class xve extends Error{constructor(e){super(`Circular dependency detected: ${e.join(" -> ")}`),this.name="CircularDependencyError"}}function Dve(){return{promiseCache:new Map}}function Nx(t){return(e,n,i)=>{i??(i=Dve());const r=(s,a)=>{n.trace({itemId:s},"resolving item");const o=i.promiseCache.get(s);if(o)return o;if(a.includes(s))throw new xve([...a,s]);const l=e.get(s);if(!l)return Promise.resolve(void 0);const c=(async()=>{var S;const d=z6(t.getNodeDependencies(l));(S=i.setDependencies)==null||S.call(i,s,d),n.trace({itemId:s,dependencies:d},"resolving item dependencies");const h=new Map,f=[...a,s];for(const _ of d){const p=await r(_,f);p!==void 0&&h.set(_,p)}return await t.process(l,h,n)})().then(d=>{var h;return i.promiseCache.get(s)===c&&((h=i.setOutput)==null||h.call(i,s,d)),d});return i.promiseCache.set(s,c),c};return s=>r(s,[])}}const kve=Nx({getNodeId(t){return t.kind==="hub"?`hub:${t.hub.id}`:`instance:${t.instance.id}`},getNodeDependencies(t){const e=[];if(t.kind==="hub"){for(const n of t.hub.inputs??[])e.push(`instance:${n.instanceId}`);for(const n of t.hub.injectionInputs??[])e.push(`hub:${n.hubId}`);return e}for(const n of Object.values(t.instance.hubInputs??{}))for(const i of n)e.push(`hub:${i.hubId}`);for(const n of t.instance.injectionInputs??[])e.push(`hub:${n.hubId}`);return e},process(t,e,n){var c;const i=d=>{const h=e.get(`hub:${d.hubId}`);if(!h)throw new Error("Hub not found");if(h.kind!=="hub")throw new Error("Expected hub node");return h},r=d=>{const h=e.get(`instance:${d.instanceId}`);if(!h)throw new Error("Instance not found");if(h.kind!=="instance")throw new Error("Expected instance node");return h};if(t.kind==="hub"){const d=new Map,h=f=>{d.set(`${f.input.instanceId}:${f.input.output}`,f)};for(const f of t.hub.inputs??[]){const{component:S}=r(f),_=S.outputs[f.output];if(!_){n.warn({msg:"output not found in the component",input:f,component:S});continue}h({input:f,type:_.type})}for(const f of t.hub.injectionInputs??[]){const{resolvedInputs:S}=i(f);for(const _ of S)h(_)}return{kind:"hub",resolvedInputs:Array.from(d.values())}}const s=new Map,a=(d,h)=>{let f=s.get(d);f||(f=new Map,s.set(d,f)),f.set(`${h.input.instanceId}:${h.input.output}`,h)};for(const[d,h]of Object.entries(t.instance.inputs??{}))for(const f of h){const S=t.component.inputs[d];if(!S){n.warn({msg:"input not found in the component",input:f,component:t.component});continue}a(d,{input:f,type:S.type})}const o=new Map,l=new Map;for(const d of t.instance.injectionInputs??[]){const{resolvedInputs:h}=i(d);for(const f of h)o.set(`${f.input.instanceId}:${f.input.output}`,f)}for(const[d,h]of Object.entries(t.component.inputs??{})){const f=new Map(o),S=((c=t.instance.hubInputs)==null?void 0:c[d])??[];for(const _ of S){const{resolvedInputs:p}=i(_);for(const v of p)f.set(`${v.input.instanceId}:${v.input.output}`,v)}for(const _ of f.values())if(_.type===h.type){a(d,_);const p=`${_.input.instanceId}:${_.input.output}`;o.has(p)&&l.set(p,_)}}const u=Eve(Array.from(s.entries()).map(([d,h])=>[d,Array.from(h.values())]));return{kind:"instance",component:t.component,resolvedInputs:u,resolvedInjectionInputs:Array.from(o.values()),matchedInjectionInputs:Array.from(l.values())}}});function Mve(t){if(t.kind!=="hub")throw new Error("Expected hub node");return t.resolvedInputs}function xx(t){if(t.kind!=="instance")throw new Error("Expected instance node");return t.resolvedInputs}function Lve(t){if(t.kind!=="instance")throw new Error("Expected instance node");return t.resolvedInjectionInputs}function j6(t){if(t.kind!=="instance")throw new Error("Expected instance node");return t.matchedInjectionInputs}const Pve=t=>{const e=new DataView(t);let n="";for(let i=0;i<e.byteLength;i+=4)n+=e.getUint32(i).toString(16).padStart(8,"0");return n},Bve=t=>async(e,{outputFormat:n="hex"}={})=>{typeof e=="string"&&(e=new globalThis.TextEncoder().encode(e));const i=await globalThis.crypto.subtle.digest(t,e);return n==="hex"?Pve(i):i},Fve=Bve("SHA-256"),Uve=Nx({getNodeId:t=>t.instance.id,getNodeDependencies({resolvedInputs:t}){const e=[];for(const n of Object.values(t??{}))for(const i of n)e.push(i.input.instanceId);return e},async process({instance:t,resolvedInputs:e,sourceHash:n,state:i},r){let s=JSON.stringify(t.args??{});n&&(s+=n),i!=null&&i.outputHash&&(s+=i.outputHash);const a=Object.entries(e).sort(([o],[l])=>o.localeCompare(l));for(const[o,l]of a){if(Object.keys(l).length===0)continue;s+=o;const u=l.map(c=>c.input.instanceId);u.sort();for(const c of u)s+=r.get(c)}return await Fve(s)}});function Dx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var j_={exports:{}},uy={},ca={},yc={},dy={},hy={},fy={},dP;function iS(){return dP||(dP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends e{constructor(m){if(super(),!t.IDENTIFIER.test(m))throw new Error("CodeGen: name must be a valid identifier");this.str=m}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends e{constructor(m){super(),this._items=typeof m=="string"?[m]:m}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const m=this._items[0];return m===""||m==='""'}get str(){var m;return(m=this._str)!==null&&m!==void 0?m:this._str=this._items.reduce((g,b)=>`${g}${b}`,"")}get names(){var m;return(m=this._names)!==null&&m!==void 0?m:this._names=this._items.reduce((g,b)=>(b instanceof n&&(g[b.str]=(g[b.str]||0)+1),g),{})}}t._Code=i,t.nil=new i("");function r(v,...m){const g=[v[0]];let b=0;for(;b<m.length;)o(g,m[b]),g.push(v[++b]);return new i(g)}t._=r;const s=new i("+");function a(v,...m){const g=[f(v[0])];let b=0;for(;b<m.length;)g.push(s),o(g,m[b]),g.push(s,f(v[++b]));return l(g),new i(g)}t.str=a;function o(v,m){m instanceof i?v.push(...m._items):m instanceof n?v.push(m):v.push(d(m))}t.addCodeArg=o;function l(v){let m=1;for(;m<v.length-1;){if(v[m]===s){const g=u(v[m-1],v[m+1]);if(g!==void 0){v.splice(m-1,3,g);continue}v[m++]="+"}m++}}function u(v,m){if(m==='""')return v;if(v==='""')return m;if(typeof v=="string")return m instanceof n||v[v.length-1]!=='"'?void 0:typeof m!="string"?`${v.slice(0,-1)}${m}"`:m[0]==='"'?v.slice(0,-1)+m.slice(1):void 0;if(typeof m=="string"&&m[0]==='"'&&!(v instanceof n))return`"${v}${m.slice(1)}`}function c(v,m){return m.emptyStr()?v:v.emptyStr()?m:a`${v}${m}`}t.strConcat=c;function d(v){return typeof v=="number"||typeof v=="boolean"||v===null?v:f(Array.isArray(v)?v.join(","):v)}function h(v){return new i(f(v))}t.stringify=h;function f(v){return JSON.stringify(v).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=f;function S(v){return typeof v=="string"&&t.IDENTIFIER.test(v)?new i(`.${v}`):r`[${v}]`}t.getProperty=S;function _(v){if(typeof v=="string"&&t.IDENTIFIER.test(v))return new i(`${v}`);throw new Error(`CodeGen: invalid export name: ${v}, use explicit $id name mapping`)}t.getEsmExportName=_;function p(v){return new i(v.toString())}t.regexpCode=p}(fy)),fy}var py={},hP;function fP(){return hP||(hP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=iS();class n extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var i;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(i||(t.UsedValueState=i={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class r{constructor({prefixes:u,parent:c}={}){this._names={},this._prefixes=u,this._parent=c}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){const c=this._names[u]||this._nameGroup(u);return`${u}${c.index++}`}_nameGroup(u){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}t.Scope=r;class s extends e.Name{constructor(u,c){super(c),this.prefix=u}setValue(u,{property:c,itemIndex:d}){this.value=u,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}t.ValueScopeName=s;const a=(0,e._)`\n`;class o extends r{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:e.nil}}get(){return this._scope}name(u){return new s(u,this._newName(u))}value(u,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(u),{prefix:f}=h,S=(d=c.key)!==null&&d!==void 0?d:c.ref;let _=this._values[f];if(_){const m=_.get(S);if(m)return m}else _=this._values[f]=new Map;_.set(S,h);const p=this._scope[f]||(this._scope[f]=[]),v=p.length;return p[v]=c.ref,h.setValue(c,{property:f,itemIndex:v}),h}getValue(u,c){const d=this._values[u];if(d)return d.get(c)}scopeRefs(u,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${u}${d.scopePath}`})}scopeCode(u=this._values,c,d){return this._reduceValues(u,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},c,d)}_reduceValues(u,c,d={},h){let f=e.nil;for(const S in u){const _=u[S];if(!_)continue;const p=d[S]=d[S]||new Map;_.forEach(v=>{if(p.has(v))return;p.set(v,i.Started);let m=c(v);if(m){const g=this.opts.es5?t.varKinds.var:t.varKinds.const;f=(0,e._)`${f}${g} ${v} = ${m};${this.opts._n}`}else if(m=h==null?void 0:h(v))f=(0,e._)`${f}${m}${this.opts._n}`;else throw new n(v);p.set(v,i.Completed)})}return f}}t.ValueScope=o}(py)),py}var pP;function Xt(){return pP||(pP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=iS(),n=fP();var i=iS();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=fP();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(k,H){return this}}class a extends s{constructor(k,H,X){super(),this.varKind=k,this.name=H,this.rhs=X}render({es5:k,_n:H}){const X=k?n.varKinds.var:this.varKind,K=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${K};`+H}optimizeNames(k,H){if(k[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,k,H)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(k,H,X){super(),this.lhs=k,this.rhs=H,this.sideEffects=X}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,H){if(!(this.lhs instanceof e.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=O(this.rhs,k,H),this}get names(){const k=this.lhs instanceof e.Name?{}:{...this.lhs.names};return x(k,this.rhs)}}class l extends o{constructor(k,H,X,K){super(k,X,K),this.op=H}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class u extends s{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class c extends s{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class d extends s{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class h extends s{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,H){return this.code=O(this.code,k,H),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class f extends s{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((H,X)=>H+X.render(k),"")}optimizeNodes(){const{nodes:k}=this;let H=k.length;for(;H--;){const X=k[H].optimizeNodes();Array.isArray(X)?k.splice(H,1,...X):X?k[H]=X:k.splice(H,1)}return k.length>0?this:void 0}optimizeNames(k,H){const{nodes:X}=this;let K=X.length;for(;K--;){const z=X[K];z.optimizeNames(k,H)||(D(k,z.names),X.splice(K,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((k,H)=>A(k,H.names),{})}}class S extends f{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class _ extends f{}class p extends S{}p.kind="else";class v extends S{constructor(k,H){super(H),this.condition=k}render(k){let H=`if(${this.condition})`+super.render(k);return this.else&&(H+="else "+this.else.render(k)),H}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let H=this.else;if(H){const X=H.optimizeNodes();H=this.else=Array.isArray(X)?new p(X):X}if(H)return k===!1?H instanceof v?H:H.nodes:this.nodes.length?this:new v(L(k),H instanceof v?[H]:H.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,H){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(k,H),!!(super.optimizeNames(k,H)||this.else))return this.condition=O(this.condition,k,H),this}get names(){const k=super.names;return x(k,this.condition),this.else&&A(k,this.else.names),k}}v.kind="if";class m extends S{}m.kind="for";class g extends m{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,H){if(super.optimizeNames(k,H))return this.iteration=O(this.iteration,k,H),this}get names(){return A(super.names,this.iteration.names)}}class b extends m{constructor(k,H,X,K){super(),this.varKind=k,this.name=H,this.from=X,this.to=K}render(k){const H=k.es5?n.varKinds.var:this.varKind,{name:X,from:K,to:z}=this;return`for(${H} ${X}=${K}; ${X}<${z}; ${X}++)`+super.render(k)}get names(){const k=x(super.names,this.from);return x(k,this.to)}}class y extends m{constructor(k,H,X,K){super(),this.loop=k,this.varKind=H,this.name=X,this.iterable=K}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,H){if(super.optimizeNames(k,H))return this.iterable=O(this.iterable,k,H),this}get names(){return A(super.names,this.iterable.names)}}class E extends S{constructor(k,H,X){super(),this.name=k,this.args=H,this.async=X}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}E.kind="func";class T extends f{render(k){return"return "+super.render(k)}}T.kind="return";class C extends S{render(k){let H="try"+super.render(k);return this.catch&&(H+=this.catch.render(k)),this.finally&&(H+=this.finally.render(k)),H}optimizeNodes(){var k,H;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(H=this.finally)===null||H===void 0||H.optimizeNodes(),this}optimizeNames(k,H){var X,K;return super.optimizeNames(k,H),(X=this.catch)===null||X===void 0||X.optimizeNames(k,H),(K=this.finally)===null||K===void 0||K.optimizeNames(k,H),this}get names(){const k=super.names;return this.catch&&A(k,this.catch.names),this.finally&&A(k,this.finally.names),k}}class w extends S{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}w.kind="catch";class R extends S{render(k){return"finally"+super.render(k)}}R.kind="finally";class I{constructor(k,H={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...H,_n:H.lines?`
|
|
52
52
|
`:""},this._extScope=k,this._scope=new n.Scope({parent:k}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,H){const X=this._extScope.value(k,H);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(k,H){return this._extScope.getValue(k,H)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,H,X,K){const z=this._scope.toName(H);return X!==void 0&&K&&(this._constants[z.str]=X),this._leafNode(new a(k,z,X)),z}const(k,H,X){return this._def(n.varKinds.const,k,H,X)}let(k,H,X){return this._def(n.varKinds.let,k,H,X)}var(k,H,X){return this._def(n.varKinds.var,k,H,X)}assign(k,H,X){return this._leafNode(new o(k,H,X))}add(k,H){return this._leafNode(new l(k,t.operators.ADD,H))}code(k){return typeof k=="function"?k():k!==e.nil&&this._leafNode(new h(k)),this}object(...k){const H=["{"];for(const[X,K]of k)H.length>1&&H.push(","),H.push(X),(X!==K||this.opts.es5)&&(H.push(":"),(0,e.addCodeArg)(H,K));return H.push("}"),new e._Code(H)}if(k,H,X){if(this._blockNode(new v(k)),H&&X)this.code(H).else().code(X).endIf();else if(H)this.code(H).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new v(k))}else(){return this._elseNode(new p)}endIf(){return this._endBlockNode(v,p)}_for(k,H){return this._blockNode(k),H&&this.code(H).endFor(),this}for(k,H){return this._for(new g(k),H)}forRange(k,H,X,K,z=this.opts.es5?n.varKinds.var:n.varKinds.let){const re=this._scope.toName(k);return this._for(new b(z,re,H,X),()=>K(re))}forOf(k,H,X,K=n.varKinds.const){const z=this._scope.toName(k);if(this.opts.es5){const re=H instanceof e.Name?H:this.var("_arr",H);return this.forRange("_i",0,(0,e._)`${re}.length`,ne=>{this.var(z,(0,e._)`${re}[${ne}]`),X(z)})}return this._for(new y("of",K,z,H),()=>X(z))}forIn(k,H,X,K=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,e._)`Object.keys(${H})`,X);const z=this._scope.toName(k);return this._for(new y("in",K,z,H),()=>X(z))}endFor(){return this._endBlockNode(m)}label(k){return this._leafNode(new u(k))}break(k){return this._leafNode(new c(k))}return(k){const H=new T;if(this._blockNode(H),this.code(k),H.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(k,H,X){if(!H&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const K=new C;if(this._blockNode(K),this.code(k),H){const z=this.name("e");this._currNode=K.catch=new w(z),H(z)}return X&&(this._currNode=K.finally=new R,this.code(X)),this._endBlockNode(w,R)}throw(k){return this._leafNode(new d(k))}block(k,H){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(H),this}endBlock(k){const H=this._blockStarts.pop();if(H===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-H;if(X<0||k!==void 0&&X!==k)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${k} expected`);return this._nodes.length=H,this}func(k,H=e.nil,X,K){return this._blockNode(new E(k,H,X)),K&&this.code(K).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,H){const X=this._currNode;if(X instanceof k||H&&X instanceof H)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${H?`${k.kind}/${H.kind}`:k.kind}"`)}_elseNode(k){const H=this._currNode;if(!(H instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=H.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const H=this._nodes;H[H.length-1]=k}}t.CodeGen=I;function A(F,k){for(const H in k)F[H]=(F[H]||0)+(k[H]||0);return F}function x(F,k){return k instanceof e._CodeOrName?A(F,k.names):F}function O(F,k,H){if(F instanceof e.Name)return X(F);if(!K(F))return F;return new e._Code(F._items.reduce((z,re)=>(re instanceof e.Name&&(re=X(re)),re instanceof e._Code?z.push(...re._items):z.push(re),z),[]));function X(z){const re=H[z.str];return re===void 0||k[z.str]!==1?z:(delete k[z.str],re)}function K(z){return z instanceof e._Code&&z._items.some(re=>re instanceof e.Name&&k[re.str]===1&&H[re.str]!==void 0)}}function D(F,k){for(const H in k)F[H]=(F[H]||0)-(k[H]||0)}function L(F){return typeof F=="boolean"||typeof F=="number"||F===null?!F:(0,e._)`!${U(F)}`}t.not=L;const q=N(t.operators.AND);function G(...F){return F.reduce(q)}t.and=G;const M=N(t.operators.OR);function P(...F){return F.reduce(M)}t.or=P;function N(F){return(k,H)=>k===e.nil?H:H===e.nil?k:(0,e._)`${U(k)} ${F} ${U(H)}`}function U(F){return F instanceof e.Name?F:(0,e._)`(${F})`}}(hy)),hy}var qt={},_P;function hn(){if(_P)return qt;_P=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.checkStrictMode=qt.getErrorPath=qt.Type=qt.useFunc=qt.setEvaluated=qt.evaluatedPropsToName=qt.mergeEvaluated=qt.eachItem=qt.unescapeJsonPointer=qt.escapeJsonPointer=qt.escapeFragment=qt.unescapeFragment=qt.schemaRefOrVal=qt.schemaHasRulesButRef=qt.schemaHasRules=qt.checkUnknownRules=qt.alwaysValidSchema=qt.toHash=void 0;const t=Xt(),e=iS();function n(y){const E={};for(const T of y)E[T]=!0;return E}qt.toHash=n;function i(y,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(r(y,E),!s(E,y.self.RULES.all))}qt.alwaysValidSchema=i;function r(y,E=y.schema){const{opts:T,self:C}=y;if(!T.strictSchema||typeof E=="boolean")return;const w=C.RULES.keywords;for(const R in E)w[R]||b(y,`unknown keyword: "${R}"`)}qt.checkUnknownRules=r;function s(y,E){if(typeof y=="boolean")return!y;for(const T in y)if(E[T])return!0;return!1}qt.schemaHasRules=s;function a(y,E){if(typeof y=="boolean")return!y;for(const T in y)if(T!=="$ref"&&E.all[T])return!0;return!1}qt.schemaHasRulesButRef=a;function o({topSchemaRef:y,schemaPath:E},T,C,w){if(!w){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,t._)`${T}`}return(0,t._)`${y}${E}${(0,t.getProperty)(C)}`}qt.schemaRefOrVal=o;function l(y){return d(decodeURIComponent(y))}qt.unescapeFragment=l;function u(y){return encodeURIComponent(c(y))}qt.escapeFragment=u;function c(y){return typeof y=="number"?`${y}`:y.replace(/~/g,"~0").replace(/\//g,"~1")}qt.escapeJsonPointer=c;function d(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")}qt.unescapeJsonPointer=d;function h(y,E){if(Array.isArray(y))for(const T of y)E(T);else E(y)}qt.eachItem=h;function f({mergeNames:y,mergeToName:E,mergeValues:T,resultToName:C}){return(w,R,I,A)=>{const x=I===void 0?R:I instanceof t.Name?(R instanceof t.Name?y(w,R,I):E(w,R,I),I):R instanceof t.Name?(E(w,I,R),R):T(R,I);return A===t.Name&&!(x instanceof t.Name)?C(w,x):x}}qt.mergeEvaluated={props:f({mergeNames:(y,E,T)=>y.if((0,t._)`${T} !== true && ${E} !== undefined`,()=>{y.if((0,t._)`${E} === true`,()=>y.assign(T,!0),()=>y.assign(T,(0,t._)`${T} || {}`).code((0,t._)`Object.assign(${T}, ${E})`))}),mergeToName:(y,E,T)=>y.if((0,t._)`${T} !== true`,()=>{E===!0?y.assign(T,!0):(y.assign(T,(0,t._)`${T} || {}`),_(y,T,E))}),mergeValues:(y,E)=>y===!0?!0:{...y,...E},resultToName:S}),items:f({mergeNames:(y,E,T)=>y.if((0,t._)`${T} !== true && ${E} !== undefined`,()=>y.assign(T,(0,t._)`${E} === true ? true : ${T} > ${E} ? ${T} : ${E}`)),mergeToName:(y,E,T)=>y.if((0,t._)`${T} !== true`,()=>y.assign(T,E===!0?!0:(0,t._)`${T} > ${E} ? ${T} : ${E}`)),mergeValues:(y,E)=>y===!0?!0:Math.max(y,E),resultToName:(y,E)=>y.var("items",E)})};function S(y,E){if(E===!0)return y.var("props",!0);const T=y.var("props",(0,t._)`{}`);return E!==void 0&&_(y,T,E),T}qt.evaluatedPropsToName=S;function _(y,E,T){Object.keys(T).forEach(C=>y.assign((0,t._)`${E}${(0,t.getProperty)(C)}`,!0))}qt.setEvaluated=_;const p={};function v(y,E){return y.scopeValue("func",{ref:E,code:p[E.code]||(p[E.code]=new e._Code(E.code))})}qt.useFunc=v;var m;(function(y){y[y.Num=0]="Num",y[y.Str=1]="Str"})(m||(qt.Type=m={}));function g(y,E,T){if(y instanceof t.Name){const C=E===m.Num;return T?C?(0,t._)`"[" + ${y} + "]"`:(0,t._)`"['" + ${y} + "']"`:C?(0,t._)`"/" + ${y}`:(0,t._)`"/" + ${y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,t.getProperty)(y).toString():"/"+c(y)}qt.getErrorPath=g;function b(y,E,T=y.opts.strictSchema){if(T){if(E=`strict mode: ${E}`,T===!0)throw new Error(E);y.self.logger.warn(E)}}return qt.checkStrictMode=b,qt}var Q_={},mP;function ic(){if(mP)return Q_;mP=1,Object.defineProperty(Q_,"__esModule",{value:!0});const t=Xt(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return Q_.default=e,Q_}var gP;function Cb(){return gP||(gP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=Xt(),n=hn(),i=ic();t.keywordError={message:({keyword:p})=>(0,e.str)`must pass "${p}" keyword validation`},t.keyword$DataError={message:({keyword:p,schemaType:v})=>v?(0,e.str)`"${p}" keyword must be ${v} ($data)`:(0,e.str)`"${p}" keyword is invalid ($data)`};function r(p,v=t.keywordError,m,g){const{it:b}=p,{gen:y,compositeRule:E,allErrors:T}=b,C=d(p,v,m);g??(E||T)?l(y,C):u(b,(0,e._)`[${C}]`)}t.reportError=r;function s(p,v=t.keywordError,m){const{it:g}=p,{gen:b,compositeRule:y,allErrors:E}=g,T=d(p,v,m);l(b,T),y||E||u(g,i.default.vErrors)}t.reportExtraError=s;function a(p,v){p.assign(i.default.errors,v),p.if((0,e._)`${i.default.vErrors} !== null`,()=>p.if(v,()=>p.assign((0,e._)`${i.default.vErrors}.length`,v),()=>p.assign(i.default.vErrors,null)))}t.resetErrorsCount=a;function o({gen:p,keyword:v,schemaValue:m,data:g,errsCount:b,it:y}){if(b===void 0)throw new Error("ajv implementation error");const E=p.name("err");p.forRange("i",b,i.default.errors,T=>{p.const(E,(0,e._)`${i.default.vErrors}[${T}]`),p.if((0,e._)`${E}.instancePath === undefined`,()=>p.assign((0,e._)`${E}.instancePath`,(0,e.strConcat)(i.default.instancePath,y.errorPath))),p.assign((0,e._)`${E}.schemaPath`,(0,e.str)`${y.errSchemaPath}/${v}`),y.opts.verbose&&(p.assign((0,e._)`${E}.schema`,m),p.assign((0,e._)`${E}.data`,g))})}t.extendErrors=o;function l(p,v){const m=p.const("err",v);p.if((0,e._)`${i.default.vErrors} === null`,()=>p.assign(i.default.vErrors,(0,e._)`[${m}]`),(0,e._)`${i.default.vErrors}.push(${m})`),p.code((0,e._)`${i.default.errors}++`)}function u(p,v){const{gen:m,validateName:g,schemaEnv:b}=p;b.$async?m.throw((0,e._)`new ${p.ValidationError}(${v})`):(m.assign((0,e._)`${g}.errors`,v),m.return(!1))}const c={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(p,v,m){const{createErrors:g}=p.it;return g===!1?(0,e._)`{}`:h(p,v,m)}function h(p,v,m={}){const{gen:g,it:b}=p,y=[f(b,m),S(p,m)];return _(p,v,y),g.object(...y)}function f({errorPath:p},{instancePath:v}){const m=v?(0,e.str)`${p}${(0,n.getErrorPath)(v,n.Type.Str)}`:p;return[i.default.instancePath,(0,e.strConcat)(i.default.instancePath,m)]}function S({keyword:p,it:{errSchemaPath:v}},{schemaPath:m,parentSchema:g}){let b=g?v:(0,e.str)`${v}/${p}`;return m&&(b=(0,e.str)`${b}${(0,n.getErrorPath)(m,n.Type.Str)}`),[c.schemaPath,b]}function _(p,{params:v,message:m},g){const{keyword:b,data:y,schemaValue:E,it:T}=p,{opts:C,propertyName:w,topSchemaRef:R,schemaPath:I}=T;g.push([c.keyword,b],[c.params,typeof v=="function"?v(p):v||(0,e._)`{}`]),C.messages&&g.push([c.message,typeof m=="function"?m(p):m]),C.verbose&&g.push([c.schema,E],[c.parentSchema,(0,e._)`${R}${I}`],[i.default.data,y]),w&&g.push([c.propertyName,w])}}(dy)),dy}var vP;function $ve(){if(vP)return yc;vP=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.boolOrEmptySchema=yc.topBoolOrEmptySchema=void 0;const t=Cb(),e=Xt(),n=ic(),i={message:"boolean schema is false"};function r(o){const{gen:l,schema:u,validateName:c}=o;u===!1?a(o,!1):typeof u=="object"&&u.$async===!0?l.return(n.default.data):(l.assign((0,e._)`${c}.errors`,null),l.return(!0))}yc.topBoolOrEmptySchema=r;function s(o,l){const{gen:u,schema:c}=o;c===!1?(u.var(l,!1),a(o)):u.var(l,!0)}yc.boolOrEmptySchema=s;function a(o,l){const{gen:u,data:c}=o,d={gen:u,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,t.reportError)(d,i,void 0,l)}return yc}var Gi={},Cc={},SP;function Q6(){if(SP)return Cc;SP=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.getRules=Cc.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function n(r){return typeof r=="string"&&e.has(r)}Cc.isJSONType=n;function i(){const r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}return Cc.getRules=i,Cc}var ua={},bP;function X6(){if(bP)return ua;bP=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.shouldUseRule=ua.shouldUseGroup=ua.schemaHasRulesForType=void 0;function t({schema:i,self:r},s){const a=r.RULES.types[s];return a&&a!==!0&&e(i,a)}ua.schemaHasRulesForType=t;function e(i,r){return r.rules.some(s=>n(i,s))}ua.shouldUseGroup=e;function n(i,r){var s;return i[r.keyword]!==void 0||((s=r.definition.implements)===null||s===void 0?void 0:s.some(a=>i[a]!==void 0))}return ua.shouldUseRule=n,ua}var EP;function rS(){if(EP)return Gi;EP=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.reportTypeError=Gi.checkDataTypes=Gi.checkDataType=Gi.coerceAndCheckDataType=Gi.getJSONTypes=Gi.getSchemaTypes=Gi.DataType=void 0;const t=Q6(),e=X6(),n=Cb(),i=Xt(),r=hn();var s;(function(m){m[m.Correct=0]="Correct",m[m.Wrong=1]="Wrong"})(s||(Gi.DataType=s={}));function a(m){const g=o(m.type);if(g.includes("null")){if(m.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!g.length&&m.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');m.nullable===!0&&g.push("null")}return g}Gi.getSchemaTypes=a;function o(m){const g=Array.isArray(m)?m:m?[m]:[];if(g.every(t.isJSONType))return g;throw new Error("type must be JSONType or JSONType[]: "+g.join(","))}Gi.getJSONTypes=o;function l(m,g){const{gen:b,data:y,opts:E}=m,T=c(g,E.coerceTypes),C=g.length>0&&!(T.length===0&&g.length===1&&(0,e.schemaHasRulesForType)(m,g[0]));if(C){const w=S(g,y,E.strictNumbers,s.Wrong);b.if(w,()=>{T.length?d(m,g,T):p(m)})}return C}Gi.coerceAndCheckDataType=l;const u=new Set(["string","number","integer","boolean","null"]);function c(m,g){return g?m.filter(b=>u.has(b)||g==="array"&&b==="array"):[]}function d(m,g,b){const{gen:y,data:E,opts:T}=m,C=y.let("dataType",(0,i._)`typeof ${E}`),w=y.let("coerced",(0,i._)`undefined`);T.coerceTypes==="array"&&y.if((0,i._)`${C} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>y.assign(E,(0,i._)`${E}[0]`).assign(C,(0,i._)`typeof ${E}`).if(S(g,E,T.strictNumbers),()=>y.assign(w,E))),y.if((0,i._)`${w} !== undefined`);for(const I of b)(u.has(I)||I==="array"&&T.coerceTypes==="array")&&R(I);y.else(),p(m),y.endIf(),y.if((0,i._)`${w} !== undefined`,()=>{y.assign(E,w),h(m,w)});function R(I){switch(I){case"string":y.elseIf((0,i._)`${C} == "number" || ${C} == "boolean"`).assign(w,(0,i._)`"" + ${E}`).elseIf((0,i._)`${E} === null`).assign(w,(0,i._)`""`);return;case"number":y.elseIf((0,i._)`${C} == "boolean" || ${E} === null
|
|
53
53
|
|| (${C} == "string" && ${E} && ${E} == +${E})`).assign(w,(0,i._)`+${E}`);return;case"integer":y.elseIf((0,i._)`${C} === "boolean" || ${E} === null
|
|
54
54
|
|| (${C} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(w,(0,i._)`+${E}`);return;case"boolean":y.elseIf((0,i._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(w,!1).elseIf((0,i._)`${E} === "true" || ${E} === 1`).assign(w,!0);return;case"null":y.elseIf((0,i._)`${E} === "" || ${E} === 0 || ${E} === false`),y.assign(w,null);return;case"array":y.elseIf((0,i._)`${C} === "string" || ${C} === "number"
|
|
@@ -241,4 +241,4 @@ void main() {
|
|
|
241
241
|
}`)),this.register((0,c.toDisposable)(()=>A.deleteProgram(this._program))),this._projectionLocation=(0,u.throwIfFalsy)(A.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=A.createVertexArray(),A.bindVertexArray(this._vertexArrayObject);const x=new Float32Array([0,0,1,0,0,1,1,1]),O=A.createBuffer();this.register((0,c.toDisposable)(()=>A.deleteBuffer(O))),A.bindBuffer(A.ARRAY_BUFFER,O),A.bufferData(A.ARRAY_BUFFER,x,A.STATIC_DRAW),A.enableVertexAttribArray(3),A.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),L=A.createBuffer();this.register((0,c.toDisposable)(()=>A.deleteBuffer(L))),A.bindBuffer(A.ELEMENT_ARRAY_BUFFER,L),A.bufferData(A.ELEMENT_ARRAY_BUFFER,D,A.STATIC_DRAW),this._attributesBuffer=(0,u.throwIfFalsy)(A.createBuffer()),this.register((0,c.toDisposable)(()=>A.deleteBuffer(this._attributesBuffer))),A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.enableVertexAttribArray(0),A.vertexAttribPointer(0,2,A.FLOAT,!1,f,0),A.vertexAttribDivisor(0,1),A.enableVertexAttribArray(1),A.vertexAttribPointer(1,2,A.FLOAT,!1,f,2*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(1,1),A.enableVertexAttribArray(2),A.vertexAttribPointer(2,4,A.FLOAT,!1,f,4*Float32Array.BYTES_PER_ELEMENT),A.vertexAttribDivisor(2,1),this._updateCachedColors(I.colors),this.register(this._themeService.onChangeColors(q=>{this._updateCachedColors(q),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(C){const w=this._gl;w.useProgram(this._program),w.bindVertexArray(this._vertexArrayObject),w.uniformMatrix4fv(this._projectionLocation,!1,h.PROJECTION_MATRIX),w.bindBuffer(w.ARRAY_BUFFER,this._attributesBuffer),w.bufferData(w.ARRAY_BUFFER,C.attributes,w.DYNAMIC_DRAW),w.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,w.UNSIGNED_BYTE,0,C.count)}handleResize(){this._updateViewportRectangle()}setDimensions(C){this._dimensions=C}_updateCachedColors(C){this._bgFloat=this._colorToFloat32Array(C.background),this._cursorFloat=this._colorToFloat32Array(C.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(C){const w=this._terminal,R=this._vertices;let I,A,x,O,D,L,q,G,M,P,N,U=1;for(I=0;I<w.rows;I++){for(x=-1,O=0,D=0,L=!1,A=0;A<w.cols;A++)q=(I*w.cols+A)*d.RENDER_MODEL_INDICIES_PER_CELL,G=C.cells[q+d.RENDER_MODEL_BG_OFFSET],M=C.cells[q+d.RENDER_MODEL_FG_OFFSET],P=!!(67108864&M),(G!==O||M!==D&&(L||P))&&((O!==0||L&&D!==0)&&(N=8*U++,this._updateRectangle(R,N,D,O,x,A,I)),x=A,O=G,D=M,L=P);(O!==0||L&&D!==0)&&(N=8*U++,this._updateRectangle(R,N,D,O,x,w.cols,I))}R.count=U}updateCursor(C){const w=this._verticesCursor,R=C.cursor;if(!R||R.style==="block")return void(w.count=0);let I,A=0;R.style!=="bar"&&R.style!=="outline"||(I=8*A++,this._addRectangleFloat(w.attributes,I,R.x*this._dimensions.device.cell.width,R.y*this._dimensions.device.cell.height,R.style==="bar"?R.dpr*R.cursorWidth:R.dpr,this._dimensions.device.cell.height,this._cursorFloat)),R.style!=="underline"&&R.style!=="outline"||(I=8*A++,this._addRectangleFloat(w.attributes,I,R.x*this._dimensions.device.cell.width,(R.y+1)*this._dimensions.device.cell.height-R.dpr,R.width*this._dimensions.device.cell.width,R.dpr,this._cursorFloat)),R.style==="outline"&&(I=8*A++,this._addRectangleFloat(w.attributes,I,R.x*this._dimensions.device.cell.width,R.y*this._dimensions.device.cell.height,R.width*this._dimensions.device.cell.width,R.dpr,this._cursorFloat),I=8*A++,this._addRectangleFloat(w.attributes,I,(R.x+R.width)*this._dimensions.device.cell.width-R.dpr,R.y*this._dimensions.device.cell.height,R.dpr,this._dimensions.device.cell.height,this._cursorFloat)),w.count=A}_updateRectangle(C,w,R,I,A,x,O){if(67108864&R)switch(50331648&R){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&R].rgba;break;case 50331648:_=(16777215&R)<<8;break;default:_=this._themeService.colors.foreground.rgba}else switch(50331648&I){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&I].rgba;break;case 50331648:_=(16777215&I)<<8;break;default:_=this._themeService.colors.background.rgba}C.attributes.length<w+4&&(C.attributes=(0,h.expandFloat32Array)(C.attributes,this._terminal.rows*this._terminal.cols*8)),p=A*this._dimensions.device.cell.width,v=O*this._dimensions.device.cell.height,m=(_>>24&255)/255,g=(_>>16&255)/255,b=(_>>8&255)/255,y=1,this._addRectangle(C.attributes,w,p,v,(x-A)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,m,g,b,y)}_addRectangle(C,w,R,I,A,x,O,D,L,q){C[w]=R/this._dimensions.device.canvas.width,C[w+1]=I/this._dimensions.device.canvas.height,C[w+2]=A/this._dimensions.device.canvas.width,C[w+3]=x/this._dimensions.device.canvas.height,C[w+4]=O,C[w+5]=D,C[w+6]=L,C[w+7]=q}_addRectangleFloat(C,w,R,I,A,x,O){C[w]=R/this._dimensions.device.canvas.width,C[w+1]=I/this._dimensions.device.canvas.height,C[w+2]=A/this._dimensions.device.canvas.width,C[w+3]=x/this._dimensions.device.canvas.height,C[w+4]=O[0],C[w+5]=O[1],C[w+6]=O[2],C[w+7]=O[3]}_colorToFloat32Array(C){return new Float32Array([(C.rgba>>24&255)/255,(C.rgba>>16&255)/255,(C.rgba>>8&255)/255,(255&C.rgba)/255])}}o.RectangleRenderer=E},310:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderModel=o.COMBINED_CHAR_BIT_MASK=o.RENDER_MODEL_EXT_OFFSET=o.RENDER_MODEL_FG_OFFSET=o.RENDER_MODEL_BG_OFFSET=o.RENDER_MODEL_INDICIES_PER_CELL=void 0;const u=l(296);o.RENDER_MODEL_INDICIES_PER_CELL=4,o.RENDER_MODEL_BG_OFFSET=1,o.RENDER_MODEL_FG_OFFSET=2,o.RENDER_MODEL_EXT_OFFSET=3,o.COMBINED_CHAR_BIT_MASK=2147483648,o.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,u.createSelectionRenderModel)()}resize(c,d){const h=c*d*o.RENDER_MODEL_INDICIES_PER_CELL;h!==this.cells.length&&(this.cells=new Uint32Array(h),this.lineLengths=new Uint32Array(d))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.JoinedCellData=o.WebglRenderer=void 0;const u=l(820),c=l(274),d=l(627),h=l(457),f=l(56),S=l(374),_=l(345),p=l(859),v=l(147),m=l(782),g=l(855),b=l(965),y=l(742),E=l(310),T=l(733);class C extends p.Disposable{constructor(A,x,O,D,L,q,G,M,P){super(),this._terminal=A,this._characterJoinerService=x,this._charSizeService=O,this._coreBrowserService=D,this._coreService=L,this._decorationService=q,this._optionsService=G,this._themeService=M,this._cursorBlinkStateManager=new p.MutableDisposable,this._charAtlasDisposable=this.register(new p.MutableDisposable),this._observerDisposable=this.register(new p.MutableDisposable),this._model=new E.RenderModel,this._workCell=new m.CellData,this._workCell2=new m.CellData,this._rectangleRenderer=this.register(new p.MutableDisposable),this._glyphRenderer=this.register(new p.MutableDisposable),this._onChangeTextureAtlas=this.register(new _.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new _.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new _.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new c.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new T.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,G,this._themeService)],this.dimensions=(0,S.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(G.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const N={antialias:!1,depth:!1,preserveDrawingBuffer:P};if(this._gl=this._canvas.getContext("webgl2",N),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,u.addDisposableDomListener)(this._canvas,"webglcontextlost",U=>{console.log("webglcontextlost event received"),U.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(U)},3e3)})),this.register((0,u.addDisposableDomListener)(this._canvas,"webglcontextrestored",U=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,d.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,f.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(U,F)=>this._setCanvasDevicePixelDimensions(U,F)),this.register(this._coreBrowserService.onWindowChange(U=>{this._observerDisposable.value=(0,f.observeDevicePixelDimensions)(this._canvas,U,(F,k)=>this._setCanvasDevicePixelDimensions(F,k))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,p.toDisposable)(()=>{var U;for(const F of this._renderLayers)F.dispose();(U=this._canvas.parentElement)==null||U.removeChild(this._canvas),(0,d.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var A;return(A=this._charAtlas)==null?void 0:A.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(A,x){var O,D,L,q;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const G of this._renderLayers)G.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(O=this._rectangleRenderer.value)==null||O.setDimensions(this.dimensions),(D=this._rectangleRenderer.value)==null||D.handleResize(),(L=this._glyphRenderer.value)==null||L.setDimensions(this.dimensions),(q=this._glyphRenderer.value)==null||q.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var A;for(const x of this._renderLayers)x.handleBlur(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.pause(),this._requestRedrawViewport()}handleFocus(){var A;for(const x of this._renderLayers)x.handleFocus(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.resume(),this._requestRedrawViewport()}handleSelectionChanged(A,x,O){for(const D of this._renderLayers)D.handleSelectionChanged(this._terminal,A,x,O);this._model.selection.update(this._core,A,x,O),this._requestRedrawViewport()}handleCursorMove(){var A;for(const x of this._renderLayers)x.handleCursorMove(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new y.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new b.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var x;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const A=(0,d.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==A&&(this._onChangeTextureAtlas.fire(A.pages[0].canvas),this._charAtlasDisposable.value=(0,p.getDisposeArrayDisposable)([(0,_.forwardEvent)(A.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,_.forwardEvent)(A.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=A,this._charAtlas.warmUp(),(x=this._glyphRenderer.value)==null||x.setAtlas(this._charAtlas)}_clearModel(A){var x;this._model.clear(),A&&((x=this._glyphRenderer.value)==null||x.clear())}clearTextureAtlas(){var A;(A=this._charAtlas)==null||A.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var A;this._clearModel(!0);for(const x of this._renderLayers)x.reset(this._terminal);(A=this._cursorBlinkStateManager.value)==null||A.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(A){return-1}deregisterCharacterJoiner(A){return!1}renderRows(A,x){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const O of this._renderLayers)O.handleGridChanged(this._terminal,A,x);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(A,x),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new h.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(A,x){const O=this._core;let D,L,q,G,M,P,N,U,F,k,H,X,K,z,re=this._workCell;A=R(A,O.rows-1,0),x=R(x,O.rows-1,0);const ne=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Z=ne-O.buffer.ydisp,J=Math.min(this._terminal.buffer.active.cursorX,O.cols-1);let V=-1;const $=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Y=!1;for(L=A;L<=x;L++)for(q=L+O.buffer.ydisp,G=O.buffer.lines.get(q),this._model.lineLengths[L]=0,M=this._characterJoinerService.getJoinedCharacters(q),K=0;K<O.cols;K++)if(D=this._cellColorResolver.result.bg,G.loadCell(K,re),K===0&&(D=this._cellColorResolver.result.bg),P=!1,N=K,M.length>0&&K===M[0][0]&&(P=!0,U=M.shift(),re=new w(re,G.translateToString(!0,U[0],U[1]),U[1]-U[0]),N=U[1]-1),F=re.getChars(),k=re.getCode(),X=(L*O.cols+K)*E.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(re,K,q,this.dimensions.device.cell.width),$&&q===ne&&(K===J&&(this._model.cursor={x:J,y:Z,width:re.getWidth(),style:this._coreBrowserService.isFocused?O.options.cursorStyle||"block":O.options.cursorInactiveStyle,cursorWidth:O.options.cursorWidth,dpr:this._devicePixelRatio},V=J+re.getWidth()-1),K>=J&&K<=V&&(this._coreBrowserService.isFocused&&(O.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&O.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),k!==g.NULL_CELL_CODE&&(this._model.lineLengths[L]=K+1),(this._model.cells[X]!==k||this._model.cells[X+E.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[X+E.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[X+E.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Y=!0,F.length>1&&(k|=E.COMBINED_CHAR_BIT_MASK),this._model.cells[X]=k,this._model.cells[X+E.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[X+E.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[X+E.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,H=re.getWidth(),this._glyphRenderer.value.updateCell(K,L,k,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,F,H,D),P))for(re=this._workCell,K++;K<N;K++)z=(L*O.cols+K)*E.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(K,L,g.NULL_CELL_CODE,0,0,0,g.NULL_CELL_CHAR,0,0),this._model.cells[z]=g.NULL_CELL_CODE,this._model.cells[z+E.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[z+E.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[z+E.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Y&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(A,x){this._canvas.width===A&&this._canvas.height===x||(this._canvas.width=A,this._canvas.height=x,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const A=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:A,end:A})}}o.WebglRenderer=C;class w extends v.AttributeData{constructor(A,x,O){super(),this.content=0,this.combinedData="",this.fg=A.fg,this.bg=A.bg,this.combinedData=x,this._width=O}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(A){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function R(I,A,x=0){return Math.max(Math.min(I,A),x)}o.JoinedCellData=w},381:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GLTexture=o.expandFloat32Array=o.createShader=o.createProgram=o.PROJECTION_MATRIX=void 0;const u=l(374);function c(d,h,f){const S=(0,u.throwIfFalsy)(d.createShader(h));if(d.shaderSource(S,f),d.compileShader(S),d.getShaderParameter(S,d.COMPILE_STATUS))return S;console.error(d.getShaderInfoLog(S)),d.deleteShader(S)}o.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),o.createProgram=function(d,h,f){const S=(0,u.throwIfFalsy)(d.createProgram());if(d.attachShader(S,(0,u.throwIfFalsy)(c(d,d.VERTEX_SHADER,h))),d.attachShader(S,(0,u.throwIfFalsy)(c(d,d.FRAGMENT_SHADER,f))),d.linkProgram(S),d.getProgramParameter(S,d.LINK_STATUS))return S;console.error(d.getProgramInfoLog(S)),d.deleteProgram(S)},o.createShader=c,o.expandFloat32Array=function(d,h){const f=Math.min(2*d.length,h),S=new Float32Array(f);for(let _=0;_<d.length;_++)S[_]=d[_];return S},o.GLTexture=class{constructor(d){this.texture=d,this.version=-1}}},592:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;const u=l(627),c=l(237),d=l(374),h=l(859);class f extends h.Disposable{constructor(_,p,v,m,g,b,y,E){super(),this._container=p,this._alpha=g,this._coreBrowserService=b,this._optionsService=y,this._themeService=E,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${v}-layer`),this._canvas.style.zIndex=m.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(T=>{this._refreshCharAtlas(_,T),this.reset(_)})),this.register((0,h.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,d.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(_){}handleFocus(_){}handleCursorMove(_){}handleGridChanged(_,p,v){}handleSelectionChanged(_,p,v,m=!1){}_setTransparency(_,p){if(p===this._alpha)return;const v=this._canvas;this._alpha=p,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,v),this._refreshCharAtlas(_,this._themeService.colors),this.handleGridChanged(_,0,_.rows-1)}_refreshCharAtlas(_,p){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,u.acquireTextureAtlas)(_,this._optionsService.rawOptions,p,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(_,p){this._deviceCellWidth=p.device.cell.width,this._deviceCellHeight=p.device.cell.height,this._deviceCharWidth=p.device.char.width,this._deviceCharHeight=p.device.char.height,this._deviceCharLeft=p.device.char.left,this._deviceCharTop=p.device.char.top,this._canvas.width=p.device.canvas.width,this._canvas.height=p.device.canvas.height,this._canvas.style.width=`${p.css.canvas.width}px`,this._canvas.style.height=`${p.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(_,this._themeService.colors)}_fillBottomLineAtCells(_,p,v=1){this._ctx.fillRect(_*this._deviceCellWidth,(p+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,v*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(_,p,v,m){this._alpha?this._ctx.clearRect(_*this._deviceCellWidth,p*this._deviceCellHeight,v*this._deviceCellWidth,m*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(_*this._deviceCellWidth,p*this._deviceCellHeight,v*this._deviceCellWidth,m*this._deviceCellHeight))}_fillCharTrueColor(_,p,v,m){this._ctx.font=this._getFont(_,!1,!1),this._ctx.textBaseline=c.TEXT_BASELINE,this._clipCell(v,m,p.getWidth()),this._ctx.fillText(p.getChars(),v*this._deviceCellWidth+this._deviceCharLeft,m*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(_,p,v){this._ctx.beginPath(),this._ctx.rect(_*this._deviceCellWidth,p*this._deviceCellHeight,v*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(_,p,v){return`${v?"italic":""} ${p?_.options.fontWeightBold:_.options.fontWeight} ${_.options.fontSize*this._coreBrowserService.dpr}px ${_.options.fontFamily}`}}o.BaseRenderLayer=f},733:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;const u=l(197),c=l(237),d=l(592);class h extends d.BaseRenderLayer{constructor(S,_,p,v,m,g,b){super(p,S,"link",_,!0,m,g,b),this.register(v.onShowLinkUnderline(y=>this._handleShowLinkUnderline(y))),this.register(v.onHideLinkUnderline(y=>this._handleHideLinkUnderline(y)))}resize(S,_){super.resize(S,_),this._state=void 0}reset(S){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const S=this._state.y2-this._state.y1-1;S>0&&this._clearCells(0,this._state.y1+1,this._state.cols,S),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(S){if(S.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:S.fg!==void 0&&(0,u.is256Color)(S.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[S.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,S.y1===S.y2)this._fillBottomLineAtCells(S.x1,S.y1,S.x2-S.x1);else{this._fillBottomLineAtCells(S.x1,S.y1,S.cols-S.x1);for(let _=S.y1+1;_<S.y2;_++)this._fillBottomLineAtCells(0,_,S.cols);this._fillBottomLineAtCells(0,S.y2,S.x2)}this._state=S}_handleHideLinkUnderline(S){this._clearCurrentLink()}}o.LinkRenderLayer=h},820:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,u,c,d){l.addEventListener(u,c,d);let h=!1;return{dispose:()=>{h||(h=!0,l.removeEventListener(u,c,d))}}}},274:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellColorResolver=void 0;const u=l(855),c=l(160),d=l(374);let h,f=0,S=0,_=!1,p=!1,v=!1,m=0;o.CellColorResolver=class{constructor(g,b,y,E,T,C){this._terminal=g,this._optionService=b,this._selectionRenderModel=y,this._decorationService=E,this._coreBrowserService=T,this._themeService=C,this.result={fg:0,bg:0,ext:0}}resolve(g,b,y,E){if(this.result.bg=g.bg,this.result.fg=g.fg,this.result.ext=268435456&g.bg?g.extended.ext:0,S=0,f=0,p=!1,_=!1,v=!1,h=this._themeService.colors,m=0,g.getCode()!==u.NULL_CELL_CODE&&g.extended.underlineStyle===4){const T=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));m=b*E%(2*Math.round(T))}if(this._decorationService.forEachDecorationAtCell(b,y,"bottom",T=>{T.backgroundColorRGB&&(S=T.backgroundColorRGB.rgba>>8&16777215,p=!0),T.foregroundColorRGB&&(f=T.foregroundColorRGB.rgba>>8&16777215,_=!0)}),v=this._selectionRenderModel.isCellSelected(this._terminal,b,y),v){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:S=(16777215&this.result.fg)<<8|255;break;default:S=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:S=(16777215&this.result.bg)<<8|255}S=c.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?h.selectionBackgroundOpaque:h.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else S=(this._coreBrowserService.isFocused?h.selectionBackgroundOpaque:h.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(p=!0,h.selectionForeground&&(f=h.selectionForeground.rgba>>8&16777215,_=!0),(0,d.treatGlyphAsBackgroundColor)(g.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)f=(this._coreBrowserService.isFocused?h.selectionBackgroundOpaque:h.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:f=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:f=(16777215&this.result.fg)<<8|255;break;default:f=this._themeService.colors.foreground.rgba}f=c.rgba.blend(f,4294967040&(this._coreBrowserService.isFocused?h.selectionBackgroundOpaque:h.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(b,y,"top",T=>{T.backgroundColorRGB&&(S=T.backgroundColorRGB.rgba>>8&16777215,p=!0),T.foregroundColorRGB&&(f=T.foregroundColorRGB.rgba>>8&16777215,_=!0)}),p&&(S=v?-16777216&g.bg&-134217729|S|50331648:-16777216&g.bg|S|50331648),_&&(f=-16777216&g.fg&-67108865|f|50331648),67108864&this.result.fg&&(p&&!_&&(f=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&h.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,_=!0),!p&&_&&(S=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&h.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,p=!0)),h=void 0,this.result.bg=p?S:this.result.bg,this.result.fg=_?f:this.result.fg,this.result.ext&=536870911,this.result.ext|=m<<29&3758096384}}},627:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireTextureAtlas=void 0;const u=l(509),c=l(197),d=[];o.acquireTextureAtlas=function(h,f,S,_,p,v,m,g){const b=(0,c.generateConfig)(_,p,v,m,f,S,g);for(let T=0;T<d.length;T++){const C=d[T],w=C.ownedBy.indexOf(h);if(w>=0){if((0,c.configEquals)(C.config,b))return C.atlas;C.ownedBy.length===1?(C.atlas.dispose(),d.splice(T,1)):C.ownedBy.splice(w,1);break}}for(let T=0;T<d.length;T++){const C=d[T];if((0,c.configEquals)(C.config,b))return C.ownedBy.push(h),C.atlas}const y=h._core,E={atlas:new u.TextureAtlas(document,b,y.unicodeService),config:b,ownedBy:[h]};return d.push(E),E.atlas},o.removeTerminalFromCache=function(h){for(let f=0;f<d.length;f++){const S=d[f].ownedBy.indexOf(h);if(S!==-1){d[f].ownedBy.length===1?(d[f].atlas.dispose(),d.splice(f,1)):d[f].ownedBy.splice(S,1);break}}}},197:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;const u=l(160);o.generateConfig=function(c,d,h,f,S,_,p){const v={foreground:_.foreground,background:_.background,cursor:u.NULL_COLOR,cursorAccent:u.NULL_COLOR,selectionForeground:u.NULL_COLOR,selectionBackgroundTransparent:u.NULL_COLOR,selectionBackgroundOpaque:u.NULL_COLOR,selectionInactiveBackgroundTransparent:u.NULL_COLOR,selectionInactiveBackgroundOpaque:u.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:S.customGlyphs,devicePixelRatio:p,letterSpacing:S.letterSpacing,lineHeight:S.lineHeight,deviceCellWidth:c,deviceCellHeight:d,deviceCharWidth:h,deviceCharHeight:f,fontFamily:S.fontFamily,fontSize:S.fontSize,fontWeight:S.fontWeight,fontWeightBold:S.fontWeightBold,allowTransparency:S.allowTransparency,drawBoldTextInBrightColors:S.drawBoldTextInBrightColors,minimumContrastRatio:S.minimumContrastRatio,colors:v}},o.configEquals=function(c,d){for(let h=0;h<c.colors.ansi.length;h++)if(c.colors.ansi[h].rgba!==d.colors.ansi[h].rgba)return!1;return c.devicePixelRatio===d.devicePixelRatio&&c.customGlyphs===d.customGlyphs&&c.lineHeight===d.lineHeight&&c.letterSpacing===d.letterSpacing&&c.fontFamily===d.fontFamily&&c.fontSize===d.fontSize&&c.fontWeight===d.fontWeight&&c.fontWeightBold===d.fontWeightBold&&c.allowTransparency===d.allowTransparency&&c.deviceCharWidth===d.deviceCharWidth&&c.deviceCharHeight===d.deviceCharHeight&&c.drawBoldTextInBrightColors===d.drawBoldTextInBrightColors&&c.minimumContrastRatio===d.minimumContrastRatio&&c.colors.foreground.rgba===d.colors.foreground.rgba&&c.colors.background.rgba===d.colors.background.rgba},o.is256Color=function(c){return(50331648&c)==16777216||(50331648&c)==33554432}},237:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=l(399);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},457:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CursorBlinkStateManager=void 0,o.CursorBlinkStateManager=class{constructor(l,u){this._renderCallback=l,this._coreBrowserService=u,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(l=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const u=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,u>0)return void this._restartInterval(u)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const u=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(u)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},l)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tryDrawCustomChar=o.powerlineDefinitions=o.boxDrawingDefinitions=o.blockElementDefinitions=void 0;const u=l(374);o.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const c={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};o.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(_,p)=>`M0,${.5-p} L1,${.5-p} M0,${.5+p} L1,${.5+p}`},"║":{1:(_,p)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╒":{1:(_,p)=>`M.5,1 L.5,${.5-p} L1,${.5-p} M.5,${.5+p} L1,${.5+p}`},"╓":{1:(_,p)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"╔":{1:(_,p)=>`M1,${.5-p} L${.5-_},${.5-p} L${.5-_},1 M1,${.5+p} L${.5+_},${.5+p} L${.5+_},1`},"╕":{1:(_,p)=>`M0,${.5-p} L.5,${.5-p} L.5,1 M0,${.5+p} L.5,${.5+p}`},"╖":{1:(_,p)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"╗":{1:(_,p)=>`M0,${.5+p} L${.5-_},${.5+p} L${.5-_},1 M0,${.5-p} L${.5+_},${.5-p} L${.5+_},1`},"╘":{1:(_,p)=>`M.5,0 L.5,${.5+p} L1,${.5+p} M.5,${.5-p} L1,${.5-p}`},"╙":{1:(_,p)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╚":{1:(_,p)=>`M1,${.5-p} L${.5+_},${.5-p} L${.5+_},0 M1,${.5+p} L${.5-_},${.5+p} L${.5-_},0`},"╛":{1:(_,p)=>`M0,${.5+p} L.5,${.5+p} L.5,0 M0,${.5-p} L.5,${.5-p}`},"╜":{1:(_,p)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"╝":{1:(_,p)=>`M0,${.5-p} L${.5-_},${.5-p} L${.5-_},0 M0,${.5+p} L${.5+_},${.5+p} L${.5+_},0`},"╞":{1:(_,p)=>`M.5,0 L.5,1 M.5,${.5-p} L1,${.5-p} M.5,${.5+p} L1,${.5+p}`},"╟":{1:(_,p)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"╠":{1:(_,p)=>`M${.5-_},0 L${.5-_},1 M1,${.5+p} L${.5+_},${.5+p} L${.5+_},1 M1,${.5-p} L${.5+_},${.5-p} L${.5+_},0`},"╡":{1:(_,p)=>`M.5,0 L.5,1 M0,${.5-p} L.5,${.5-p} M0,${.5+p} L.5,${.5+p}`},"╢":{1:(_,p)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╣":{1:(_,p)=>`M${.5+_},0 L${.5+_},1 M0,${.5+p} L${.5-_},${.5+p} L${.5-_},1 M0,${.5-p} L${.5-_},${.5-p} L${.5-_},0`},"╤":{1:(_,p)=>`M0,${.5-p} L1,${.5-p} M0,${.5+p} L1,${.5+p} M.5,${.5+p} L.5,1`},"╥":{1:(_,p)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"╦":{1:(_,p)=>`M0,${.5-p} L1,${.5-p} M0,${.5+p} L${.5-_},${.5+p} L${.5-_},1 M1,${.5+p} L${.5+_},${.5+p} L${.5+_},1`},"╧":{1:(_,p)=>`M.5,0 L.5,${.5-p} M0,${.5-p} L1,${.5-p} M0,${.5+p} L1,${.5+p}`},"╨":{1:(_,p)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╩":{1:(_,p)=>`M0,${.5+p} L1,${.5+p} M0,${.5-p} L${.5-_},${.5-p} L${.5-_},0 M1,${.5-p} L${.5+_},${.5-p} L${.5+_},0`},"╪":{1:(_,p)=>`M.5,0 L.5,1 M0,${.5-p} L1,${.5-p} M0,${.5+p} L1,${.5+p}`},"╫":{1:(_,p)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╬":{1:(_,p)=>`M0,${.5+p} L${.5-_},${.5+p} L${.5-_},1 M1,${.5+p} L${.5+_},${.5+p} L${.5+_},1 M0,${.5-p} L${.5-_},${.5-p} L${.5-_},0 M1,${.5-p} L${.5+_},${.5-p} L${.5+_},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(_,p)=>`M.5,1 L.5,${.5+p/.15*.5} C.5,${.5+p/.15*.5},.5,.5,1,.5`},"╮":{1:(_,p)=>`M.5,1 L.5,${.5+p/.15*.5} C.5,${.5+p/.15*.5},.5,.5,0,.5`},"╯":{1:(_,p)=>`M.5,0 L.5,${.5-p/.15*.5} C.5,${.5-p/.15*.5},.5,.5,0,.5`},"╰":{1:(_,p)=>`M.5,0 L.5,${.5-p/.15*.5} C.5,${.5-p/.15*.5},.5,.5,1,.5`}},o.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},o.powerlineDefinitions[""]=o.powerlineDefinitions[""],o.powerlineDefinitions[""]=o.powerlineDefinitions[""],o.tryDrawCustomChar=function(_,p,v,m,g,b,y,E){const T=o.blockElementDefinitions[p];if(T)return function(I,A,x,O,D,L){for(let q=0;q<A.length;q++){const G=A[q],M=D/8,P=L/8;I.fillRect(x+G.x*M,O+G.y*P,G.w*M,G.h*P)}}(_,T,v,m,g,b),!0;const C=c[p];if(C)return function(I,A,x,O,D,L){let q=d.get(A);q||(q=new Map,d.set(A,q));const G=I.fillStyle;if(typeof G!="string")throw new Error(`Unexpected fillStyle type "${G}"`);let M=q.get(G);if(!M){const P=A[0].length,N=A.length,U=I.canvas.ownerDocument.createElement("canvas");U.width=P,U.height=N;const F=(0,u.throwIfFalsy)(U.getContext("2d")),k=new ImageData(P,N);let H,X,K,z;if(G.startsWith("#"))H=parseInt(G.slice(1,3),16),X=parseInt(G.slice(3,5),16),K=parseInt(G.slice(5,7),16),z=G.length>7&&parseInt(G.slice(7,9),16)||1;else{if(!G.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${G}" when drawing pattern glyph`);[H,X,K,z]=G.substring(5,G.length-1).split(",").map(re=>parseFloat(re))}for(let re=0;re<N;re++)for(let ne=0;ne<P;ne++)k.data[4*(re*P+ne)]=H,k.data[4*(re*P+ne)+1]=X,k.data[4*(re*P+ne)+2]=K,k.data[4*(re*P+ne)+3]=A[re][ne]*(255*z);F.putImageData(k,0,0),M=(0,u.throwIfFalsy)(I.createPattern(U,null)),q.set(G,M)}I.fillStyle=M,I.fillRect(x,O,D,L)}(_,C,v,m,g,b),!0;const w=o.boxDrawingDefinitions[p];if(w)return function(I,A,x,O,D,L,q){I.strokeStyle=I.fillStyle;for(const[G,M]of Object.entries(A)){let P;I.beginPath(),I.lineWidth=q*Number.parseInt(G),P=typeof M=="function"?M(.15,.15/L*D):M;for(const N of P.split(" ")){const U=N[0],F=f[U];if(!F){console.error(`Could not find drawing instructions for "${U}"`);continue}const k=N.substring(1).split(",");k[0]&&k[1]&&F(I,S(k,D,L,x,O,!0,q))}I.stroke(),I.closePath()}}(_,w,v,m,g,b,E),!0;const R=o.powerlineDefinitions[p];return!!R&&(function(I,A,x,O,D,L,q,G){const M=new Path2D;M.rect(x,O,D,L),I.clip(M),I.beginPath();const P=q/12;I.lineWidth=G*P;for(const N of A.d.split(" ")){const U=N[0],F=f[U];if(!F){console.error(`Could not find drawing instructions for "${U}"`);continue}const k=N.substring(1).split(",");k[0]&&k[1]&&F(I,S(k,D,L,x,O,!1,G,(A.leftPadding??0)*(P/2),(A.rightPadding??0)*(P/2)))}A.type===1?(I.strokeStyle=I.fillStyle,I.stroke()):I.fill(),I.closePath()}(_,R,v,m,g,b,y,E),!0)};const d=new Map;function h(_,p,v=0){return Math.max(Math.min(_,p),v)}const f={C:(_,p)=>_.bezierCurveTo(p[0],p[1],p[2],p[3],p[4],p[5]),L:(_,p)=>_.lineTo(p[0],p[1]),M:(_,p)=>_.moveTo(p[0],p[1])};function S(_,p,v,m,g,b,y,E=0,T=0){const C=_.map(w=>parseFloat(w)||parseInt(w));if(C.length<2)throw new Error("Too few arguments for instruction");for(let w=0;w<C.length;w+=2)C[w]*=p-E*y-T*y,b&&C[w]!==0&&(C[w]=h(Math.round(C[w]+.5)-.5,p,0)),C[w]+=m+E*y;for(let w=1;w<C.length;w+=2)C[w]*=v,b&&C[w]!==0&&(C[w]=h(Math.round(C[w]+.5)-.5,v,0)),C[w]+=g;return C}},56:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.observeDevicePixelDimensions=void 0;const u=l(859);o.observeDevicePixelDimensions=function(c,d,h){let f=new d.ResizeObserver(S=>{const _=S.find(m=>m.target===c);if(!_)return;if(!("devicePixelContentBoxSize"in _))return f==null||f.disconnect(),void(f=void 0);const p=_.devicePixelContentBoxSize[0].inlineSize,v=_.devicePixelContentBoxSize[0].blockSize;p>0&&v>0&&h(p,v)});try{f.observe(c,{box:["device-pixel-content-box"]})}catch{f.disconnect(),f=void 0}return(0,u.toDisposable)(()=>f==null?void 0:f.disconnect())}},374:(a,o)=>{function l(c){return 57508<=c&&c<=57558}function u(c){return c>=128512&&c<=128591||c>=127744&&c<=128511||c>=128640&&c<=128767||c>=9728&&c<=9983||c>=9984&&c<=10175||c>=65024&&c<=65039||c>=129280&&c<=129535||c>=127462&&c<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(c){if(!c)throw new Error("value must not be falsy");return c},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(c){return 57520<=c&&c<=57527},o.isEmoji=u,o.allowRescaling=function(c,d,h,f){return d===1&&h>Math.ceil(1.5*f)&&c!==void 0&&c>255&&!u(c)&&!l(c)&&!function(S){return 57344<=S&&S<=63743}(c)},o.treatGlyphAsBackgroundColor=function(c){return l(c)||function(d){return 9472<=d&&d<=9631}(c)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(c,d,h=0){return(c-(2*Math.round(d)-h))%(2*Math.round(d))}},296:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(c,d,h,f=!1){if(this.selectionStart=d,this.selectionEnd=h,!d||!h||d[0]===h[0]&&d[1]===h[1])return void this.clear();const S=c.buffers.active.ydisp,_=d[1]-S,p=h[1]-S,v=Math.max(_,0),m=Math.min(p,c.rows-1);v>=c.rows||m<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=f,this.viewportStartRow=_,this.viewportEndRow=p,this.viewportCappedStartRow=v,this.viewportCappedEndRow=m,this.startCol=d[0],this.endCol=h[0])}isCellSelected(c,d,h){return!!this.hasSelection&&(h-=c.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&h>=this.viewportCappedStartRow&&d<this.endCol&&h<=this.viewportCappedEndRow:d<this.startCol&&h>=this.viewportCappedStartRow&&d>=this.endCol&&h<=this.viewportCappedEndRow:h>this.viewportStartRow&&h<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&h===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&h===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&h===this.viewportStartRow&&d>=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},509:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TextureAtlas=void 0;const u=l(237),c=l(860),d=l(374),h=l(160),f=l(345),S=l(485),_=l(385),p=l(147),v=l(855),m={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let g;class b{get pages(){return this._pages}constructor(w,R,I){this._document=w,this._config=R,this._unicodeService=I,this._didWarmUp=!1,this._cacheMap=new S.FourKeyMap,this._cacheMapCombined=new S.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new p.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new f.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new f.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=T(w,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,d.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const w of this.pages)w.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const w=new _.IdleTaskQueue;for(let R=33;R<126;R++)w.enqueue(()=>{if(!this._cacheMap.get(R,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT)){const I=this._drawToCache(R,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT);this._cacheMap.set(R,v.DEFAULT_COLOR,v.DEFAULT_COLOR,v.DEFAULT_EXT,I)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const w of this._pages)w.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(b.maxAtlasPages&&this._pages.length>=Math.max(4,b.maxAtlasPages)){const R=this._pages.filter(q=>2*q.canvas.width<=(b.maxTextureSize||4096)).sort((q,G)=>G.canvas.width!==q.canvas.width?G.canvas.width-q.canvas.width:G.percentageUsed-q.percentageUsed);let I=-1,A=0;for(let q=0;q<R.length;q++)if(R[q].canvas.width!==A)I=q,A=R[q].canvas.width;else if(q-I==3)break;const x=R.slice(I,I+4),O=x.map(q=>q.glyphs[0].texturePage).sort((q,G)=>q>G?1:-1),D=this.pages.length-x.length,L=this._mergePages(x,D);L.version++;for(let q=O.length-1;q>=0;q--)this._deletePage(O[q]);this.pages.push(L),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(L.canvas)}const w=new y(this._document,this._textureSize);return this._pages.push(w),this._activePages.push(w),this._onAddTextureAtlasCanvas.fire(w.canvas),w}_mergePages(w,R){const I=2*w[0].canvas.width,A=new y(this._document,I,w);for(const[x,O]of w.entries()){const D=x*O.canvas.width%I,L=Math.floor(x/2)*O.canvas.height;A.ctx.drawImage(O.canvas,D,L);for(const G of O.glyphs)G.texturePage=R,G.sizeClipSpace.x=G.size.x/I,G.sizeClipSpace.y=G.size.y/I,G.texturePosition.x+=D,G.texturePosition.y+=L,G.texturePositionClipSpace.x=G.texturePosition.x/I,G.texturePositionClipSpace.y=G.texturePosition.y/I;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const q=this._activePages.indexOf(O);q!==-1&&this._activePages.splice(q,1)}return A}_deletePage(w){this._pages.splice(w,1);for(let R=w;R<this._pages.length;R++){const I=this._pages[R];for(const A of I.glyphs)A.texturePage--;I.version++}}getRasterizedGlyphCombinedChar(w,R,I,A,x){return this._getFromCacheMap(this._cacheMapCombined,w,R,I,A,x)}getRasterizedGlyph(w,R,I,A,x){return this._getFromCacheMap(this._cacheMap,w,R,I,A,x)}_getFromCacheMap(w,R,I,A,x,O=!1){return g=w.get(R,I,A,x),g||(g=this._drawToCache(R,I,A,x,O),w.set(R,I,A,x,g)),g}_getColorFromAnsiIndex(w){if(w>=this._config.colors.ansi.length)throw new Error("No color found for idx "+w);return this._config.colors.ansi[w]}_getBackgroundColor(w,R,I,A){if(this._config.allowTransparency)return h.NULL_COLOR;let x;switch(w){case 16777216:case 33554432:x=this._getColorFromAnsiIndex(R);break;case 50331648:const O=p.AttributeData.toColorRGB(R);x=h.channels.toColor(O[0],O[1],O[2]);break;default:x=I?h.color.opaque(this._config.colors.foreground):this._config.colors.background}return x}_getForegroundColor(w,R,I,A,x,O,D,L,q,G){const M=this._getMinimumContrastColor(w,R,I,A,x,O,D,q,L,G);if(M)return M;let P;switch(x){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&q&&O<8&&(O+=8),P=this._getColorFromAnsiIndex(O);break;case 50331648:const N=p.AttributeData.toColorRGB(O);P=h.channels.toColor(N[0],N[1],N[2]);break;default:P=D?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(P=h.color.opaque(P)),L&&(P=h.color.multiplyOpacity(P,u.DIM_OPACITY)),P}_resolveBackgroundRgba(w,R,I){switch(w){case 16777216:case 33554432:return this._getColorFromAnsiIndex(R).rgba;case 50331648:return R<<8;default:return I?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(w,R,I,A){switch(w){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&A&&R<8&&(R+=8),this._getColorFromAnsiIndex(R).rgba;case 50331648:return R<<8;default:return I?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(w,R,I,A,x,O,D,L,q,G){if(this._config.minimumContrastRatio===1||G)return;const M=this._getContrastCache(q),P=M.getColor(w,A);if(P!==void 0)return P||void 0;const N=this._resolveBackgroundRgba(R,I,D),U=this._resolveForegroundRgba(x,O,D,L),F=h.rgba.ensureContrastRatio(N,U,this._config.minimumContrastRatio/(q?2:1));if(!F)return void M.setColor(w,A,null);const k=h.channels.toColor(F>>24&255,F>>16&255,F>>8&255);return M.setColor(w,A,k),k}_getContrastCache(w){return w?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(w,R,I,A,x=!1){const O=typeof w=="number"?String.fromCharCode(w):w,D=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<D&&(this._tmpCanvas.width=D);const L=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<L&&(this._tmpCanvas.height=L),this._tmpCtx.save(),this._workAttributeData.fg=I,this._workAttributeData.bg=R,this._workAttributeData.extended.ext=A,this._workAttributeData.isInvisible())return m;const q=!!this._workAttributeData.isBold(),G=!!this._workAttributeData.isInverse(),M=!!this._workAttributeData.isDim(),P=!!this._workAttributeData.isItalic(),N=!!this._workAttributeData.isUnderline(),U=!!this._workAttributeData.isStrikethrough(),F=!!this._workAttributeData.isOverline();let k=this._workAttributeData.getFgColor(),H=this._workAttributeData.getFgColorMode(),X=this._workAttributeData.getBgColor(),K=this._workAttributeData.getBgColorMode();if(G){const pe=k;k=X,X=pe;const me=H;H=K,K=me}const z=this._getBackgroundColor(K,X,G,M);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const re=q?this._config.fontWeightBold:this._config.fontWeight,ne=P?"italic":"";this._tmpCtx.font=`${ne} ${re} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=u.TEXT_BASELINE;const Z=O.length===1&&(0,d.isPowerlineGlyph)(O.charCodeAt(0)),J=O.length===1&&(0,d.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),V=this._getForegroundColor(R,K,X,I,H,k,G,M,q,(0,d.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=V.css;const $=J?0:4;let Y=!1;this._config.customGlyphs!==!1&&(Y=(0,c.tryDrawCustomChar)(this._tmpCtx,O,$,$,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Q,j=!Z;if(Q=typeof w=="number"?this._unicodeService.wcwidth(w):this._unicodeService.getStringCellWidth(w),N){this._tmpCtx.save();const pe=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),me=pe%2==1?.5:0;if(this._tmpCtx.lineWidth=pe,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())j=!1,this._tmpCtx.strokeStyle=`rgb(${p.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{j=!1;let St=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&St<8&&(St+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(St).css}this._tmpCtx.beginPath();const ye=$,we=Math.ceil($+this._config.deviceCharHeight)-me-(x?2*pe:0),je=we+pe,lt=we+2*pe;let ct=this._workAttributeData.getUnderlineVariantOffset();for(let St=0;St<Q;St++){this._tmpCtx.save();const _t=ye+St*this._config.deviceCellWidth,nt=ye+(St+1)*this._config.deviceCellWidth,tn=_t+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(_t,we),this._tmpCtx.lineTo(nt,we),this._tmpCtx.moveTo(_t,lt),this._tmpCtx.lineTo(nt,lt);break;case 3:const fn=pe<=1?lt:Math.ceil($+this._config.deviceCharHeight-pe/2)-me,Qn=pe<=1?we:Math.ceil($+this._config.deviceCharHeight+pe/2)-me,An=new Path2D;An.rect(_t,we,this._config.deviceCellWidth,lt-we),this._tmpCtx.clip(An),this._tmpCtx.moveTo(_t-this._config.deviceCellWidth/2,je),this._tmpCtx.bezierCurveTo(_t-this._config.deviceCellWidth/2,Qn,_t,Qn,_t,je),this._tmpCtx.bezierCurveTo(_t,fn,tn,fn,tn,je),this._tmpCtx.bezierCurveTo(tn,Qn,nt,Qn,nt,je),this._tmpCtx.bezierCurveTo(nt,fn,nt+this._config.deviceCellWidth/2,fn,nt+this._config.deviceCellWidth/2,je);break;case 4:const Dn=ct===0?0:ct>=pe?2*pe-ct:pe-ct;ct>=pe||Dn===0?(this._tmpCtx.setLineDash([Math.round(pe),Math.round(pe)]),this._tmpCtx.moveTo(_t+Dn,we),this._tmpCtx.lineTo(nt,we)):(this._tmpCtx.setLineDash([Math.round(pe),Math.round(pe)]),this._tmpCtx.moveTo(_t,we),this._tmpCtx.lineTo(_t+Dn,we),this._tmpCtx.moveTo(_t+Dn+pe,we),this._tmpCtx.lineTo(nt,we)),ct=(0,d.computeNextVariantOffset)(nt-_t,pe,ct);break;case 5:const le=.6,ge=.3,Te=nt-_t,Be=Math.floor(le*Te),Me=Math.floor(ge*Te),at=Te-Be-Me;this._tmpCtx.setLineDash([Be,Me,at]),this._tmpCtx.moveTo(_t,we),this._tmpCtx.lineTo(nt,we);break;default:this._tmpCtx.moveTo(_t,we),this._tmpCtx.lineTo(nt,we)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Y&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const St=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in St&&St.actualBoundingBoxDescent>0){this._tmpCtx.save();const _t=new Path2D;_t.rect(ye,we-Math.ceil(pe/2),this._config.deviceCellWidth*Q,lt-we+Math.ceil(pe/2)),this._tmpCtx.clip(_t),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,$,$+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(F){const pe=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),me=pe%2==1?.5:0;this._tmpCtx.lineWidth=pe,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo($,$+me),this._tmpCtx.lineTo($+this._config.deviceCharWidth*Q,$+me),this._tmpCtx.stroke()}if(Y||this._tmpCtx.fillText(O,$,$+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let pe=E(this._tmpCtx.getImageData($,$,this._config.deviceCellWidth,this._config.deviceCellHeight),z,V,j);if(pe)for(let me=1;me<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,$,$+this._config.deviceCharHeight-me),pe=E(this._tmpCtx.getImageData($,$,this._config.deviceCellWidth,this._config.deviceCellHeight),z,V,j),pe);me++);}if(U){const pe=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),me=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=pe,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo($,$+Math.floor(this._config.deviceCharHeight/2)-me),this._tmpCtx.lineTo($+this._config.deviceCharWidth*Q,$+Math.floor(this._config.deviceCharHeight/2)-me),this._tmpCtx.stroke()}this._tmpCtx.restore();const se=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let fe;if(fe=this._config.allowTransparency?function(pe){for(let me=0;me<pe.data.length;me+=4)if(pe.data[me+3]>0)return!1;return!0}(se):E(se,z,V,j),fe)return m;const ae=this._findGlyphBoundingBox(se,this._workBoundingBox,D,J,Y,$);let ce,ue;for(;;){if(this._activePages.length===0){const pe=this._createNewPage();ce=pe,ue=pe.currentRow,ue.height=ae.size.y;break}ce=this._activePages[this._activePages.length-1],ue=ce.currentRow;for(const pe of this._activePages)ae.size.y<=pe.currentRow.height&&(ce=pe,ue=pe.currentRow);for(let pe=this._activePages.length-1;pe>=0;pe--)for(const me of this._activePages[pe].fixedRows)me.height<=ue.height&&ae.size.y<=me.height&&(ce=this._activePages[pe],ue=me);if(ue.y+ae.size.y>=ce.canvas.height||ue.height>ae.size.y+2){let pe=!1;if(ce.currentRow.y+ce.currentRow.height+ae.size.y>=ce.canvas.height){let me;for(const ye of this._activePages)if(ye.currentRow.y+ye.currentRow.height+ae.size.y<ye.canvas.height){me=ye;break}if(me)ce=me;else if(b.maxAtlasPages&&this._pages.length>=b.maxAtlasPages&&ue.y+ae.size.y<=ce.canvas.height&&ue.height>=ae.size.y&&ue.x+ae.size.x<=ce.canvas.width)pe=!0;else{const ye=this._createNewPage();ce=ye,ue=ye.currentRow,ue.height=ae.size.y,pe=!0}}pe||(ce.currentRow.height>0&&ce.fixedRows.push(ce.currentRow),ue={x:0,y:ce.currentRow.y+ce.currentRow.height,height:ae.size.y},ce.fixedRows.push(ue),ce.currentRow={x:0,y:ue.y+ue.height,height:0})}if(ue.x+ae.size.x<=ce.canvas.width)break;ue===ce.currentRow?(ue.x=0,ue.y+=ue.height,ue.height=0):ce.fixedRows.splice(ce.fixedRows.indexOf(ue),1)}return ae.texturePage=this._pages.indexOf(ce),ae.texturePosition.x=ue.x,ae.texturePosition.y=ue.y,ae.texturePositionClipSpace.x=ue.x/ce.canvas.width,ae.texturePositionClipSpace.y=ue.y/ce.canvas.height,ae.sizeClipSpace.x/=ce.canvas.width,ae.sizeClipSpace.y/=ce.canvas.height,ue.height=Math.max(ue.height,ae.size.y),ue.x+=ae.size.x,ce.ctx.putImageData(se,ae.texturePosition.x-this._workBoundingBox.left,ae.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,ae.size.x,ae.size.y),ce.addGlyph(ae),ce.version++,ae}_findGlyphBoundingBox(w,R,I,A,x,O){R.top=0;const D=A?this._config.deviceCellHeight:this._tmpCanvas.height,L=A?this._config.deviceCellWidth:I;let q=!1;for(let G=0;G<D;G++){for(let M=0;M<L;M++){const P=G*this._tmpCanvas.width*4+4*M+3;if(w.data[P]!==0){R.top=G,q=!0;break}}if(q)break}R.left=0,q=!1;for(let G=0;G<O+L;G++){for(let M=0;M<D;M++){const P=M*this._tmpCanvas.width*4+4*G+3;if(w.data[P]!==0){R.left=G,q=!0;break}}if(q)break}R.right=L,q=!1;for(let G=O+L-1;G>=O;G--){for(let M=0;M<D;M++){const P=M*this._tmpCanvas.width*4+4*G+3;if(w.data[P]!==0){R.right=G,q=!0;break}}if(q)break}R.bottom=D,q=!1;for(let G=D-1;G>=0;G--){for(let M=0;M<L;M++){const P=G*this._tmpCanvas.width*4+4*M+3;if(w.data[P]!==0){R.bottom=G,q=!0;break}}if(q)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:R.right-R.left+1,y:R.bottom-R.top+1},sizeClipSpace:{x:R.right-R.left+1,y:R.bottom-R.top+1},offset:{x:-R.left+O+(A||x?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-R.top+O+(A||x?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}o.TextureAtlas=b;class y{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(w){this._glyphs.push(w),this._usedPixels+=w.size.x*w.size.y}constructor(w,R,I){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],I)for(const A of I)this._glyphs.push(...A.glyphs),this._usedPixels+=A._usedPixels;this.canvas=T(w,R,R),this.ctx=(0,d.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function E(C,w,R,I){const A=w.rgba>>>24,x=w.rgba>>>16&255,O=w.rgba>>>8&255,D=R.rgba>>>24,L=R.rgba>>>16&255,q=R.rgba>>>8&255,G=Math.floor((Math.abs(A-D)+Math.abs(x-L)+Math.abs(O-q))/12);let M=!0;for(let P=0;P<C.data.length;P+=4)C.data[P]===A&&C.data[P+1]===x&&C.data[P+2]===O||I&&Math.abs(C.data[P]-A)+Math.abs(C.data[P+1]-x)+Math.abs(C.data[P+2]-O)<G?C.data[P+3]=0:M=!1;return M}function T(C,w,R){const I=C.createElement("canvas");return I.width=w,I.height=R,I}},160:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,u=0,c=0,d=0;var h,f,S,_,p;function v(g){const b=g.toString(16);return b.length<2?"0"+b:b}function m(g,b){return g<b?(b+.05)/(g+.05):(g+.05)/(b+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(g){g.toCss=function(b,y,E,T){return T!==void 0?`#${v(b)}${v(y)}${v(E)}${v(T)}`:`#${v(b)}${v(y)}${v(E)}`},g.toRgba=function(b,y,E,T=255){return(b<<24|y<<16|E<<8|T)>>>0},g.toColor=function(b,y,E,T){return{css:g.toCss(b,y,E,T),rgba:g.toRgba(b,y,E,T)}}}(h||(o.channels=h={})),function(g){function b(y,E){return d=Math.round(255*E),[l,u,c]=p.toChannels(y.rgba),{css:h.toCss(l,u,c,d),rgba:h.toRgba(l,u,c,d)}}g.blend=function(y,E){if(d=(255&E.rgba)/255,d===1)return{css:E.css,rgba:E.rgba};const T=E.rgba>>24&255,C=E.rgba>>16&255,w=E.rgba>>8&255,R=y.rgba>>24&255,I=y.rgba>>16&255,A=y.rgba>>8&255;return l=R+Math.round((T-R)*d),u=I+Math.round((C-I)*d),c=A+Math.round((w-A)*d),{css:h.toCss(l,u,c),rgba:h.toRgba(l,u,c)}},g.isOpaque=function(y){return(255&y.rgba)==255},g.ensureContrastRatio=function(y,E,T){const C=p.ensureContrastRatio(y.rgba,E.rgba,T);if(C)return h.toColor(C>>24&255,C>>16&255,C>>8&255)},g.opaque=function(y){const E=(255|y.rgba)>>>0;return[l,u,c]=p.toChannels(E),{css:h.toCss(l,u,c),rgba:E}},g.opacity=b,g.multiplyOpacity=function(y,E){return d=255&y.rgba,b(y,d*E/255)},g.toColorRGB=function(y){return[y.rgba>>24&255,y.rgba>>16&255,y.rgba>>8&255]}}(f||(o.color=f={})),function(g){let b,y;try{const E=document.createElement("canvas");E.width=1,E.height=1;const T=E.getContext("2d",{willReadFrequently:!0});T&&(b=T,b.globalCompositeOperation="copy",y=b.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),c=parseInt(E.slice(3,4).repeat(2),16),h.toColor(l,u,c);case 5:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),c=parseInt(E.slice(3,4).repeat(2),16),d=parseInt(E.slice(4,5).repeat(2),16),h.toColor(l,u,c,d);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const T=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return l=parseInt(T[1]),u=parseInt(T[2]),c=parseInt(T[3]),d=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),h.toColor(l,u,c,d);if(!b||!y)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=y,b.fillStyle=E,typeof b.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(b.fillRect(0,0,1,1),[l,u,c,d]=b.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(l,u,c,d),css:E}}}(S||(o.css=S={})),function(g){function b(y,E,T){const C=y/255,w=E/255,R=T/255;return .2126*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.7152*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}g.relativeLuminance=function(y){return b(y>>16&255,y>>8&255,255&y)},g.relativeLuminance2=b}(_||(o.rgb=_={})),function(g){function b(E,T,C){const w=E>>24&255,R=E>>16&255,I=E>>8&255;let A=T>>24&255,x=T>>16&255,O=T>>8&255,D=m(_.relativeLuminance2(A,x,O),_.relativeLuminance2(w,R,I));for(;D<C&&(A>0||x>0||O>0);)A-=Math.max(0,Math.ceil(.1*A)),x-=Math.max(0,Math.ceil(.1*x)),O-=Math.max(0,Math.ceil(.1*O)),D=m(_.relativeLuminance2(A,x,O),_.relativeLuminance2(w,R,I));return(A<<24|x<<16|O<<8|255)>>>0}function y(E,T,C){const w=E>>24&255,R=E>>16&255,I=E>>8&255;let A=T>>24&255,x=T>>16&255,O=T>>8&255,D=m(_.relativeLuminance2(A,x,O),_.relativeLuminance2(w,R,I));for(;D<C&&(A<255||x<255||O<255);)A=Math.min(255,A+Math.ceil(.1*(255-A))),x=Math.min(255,x+Math.ceil(.1*(255-x))),O=Math.min(255,O+Math.ceil(.1*(255-O))),D=m(_.relativeLuminance2(A,x,O),_.relativeLuminance2(w,R,I));return(A<<24|x<<16|O<<8|255)>>>0}g.blend=function(E,T){if(d=(255&T)/255,d===1)return T;const C=T>>24&255,w=T>>16&255,R=T>>8&255,I=E>>24&255,A=E>>16&255,x=E>>8&255;return l=I+Math.round((C-I)*d),u=A+Math.round((w-A)*d),c=x+Math.round((R-x)*d),h.toRgba(l,u,c)},g.ensureContrastRatio=function(E,T,C){const w=_.relativeLuminance(E>>8),R=_.relativeLuminance(T>>8);if(m(w,R)<C){if(R<w){const x=b(E,T,C),O=m(w,_.relativeLuminance(x>>8));if(O<C){const D=y(E,T,C);return O>m(w,_.relativeLuminance(D>>8))?x:D}return x}const I=y(E,T,C),A=m(w,_.relativeLuminance(I>>8));if(A<C){const x=b(E,T,C);return A>m(w,_.relativeLuminance(x>>8))?I:x}return I}},g.reduceLuminance=b,g.increaseLuminance=y,g.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}}(p||(o.rgba=p={})),o.toPaddedHex=v,o.contrastRatio=m},345:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let u=0;u<this._listeners.length;u++)if(this._listeners[u]===l)return void this._listeners.splice(u,1)}}})),this._event}fire(l,u){const c=[];for(let d=0;d<this._listeners.length;d++)c.push(this._listeners[d]);for(let d=0;d<c.length;d++)c[d].call(void 0,l,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(l,u){return l(c=>u.fire(c))},o.runAndSubscribe=function(l,u){return u(void 0),l(c=>u(c))}},859:(a,o)=>{function l(u){for(const c of u)c.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const c=this._disposables.indexOf(u);c!==-1&&this._disposables.splice(c,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var c;this._isDisposed||u===this._value||((c=this._value)==null||c.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=l,o.getDisposeArrayDisposable=function(u){return{dispose:()=>l(u)}}},485:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(c,d,h){this._data[c]||(this._data[c]={}),this._data[c][d]=h}get(c,d){return this._data[c]?this._data[c][d]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(u,c,d,h,f){this._data.get(u,c)||this._data.set(u,c,new l),this._data.get(u,c).set(d,h,f)}get(u,c,d,h){var f;return(f=this._data.get(u,c))==null?void 0:f.get(d,h)}clear(){this._data.clear()}}},399:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const c=l.match(/Version\/(\d+)/);return c===null||c.length<2?0:parseInt(c[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},385:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=l(399);class c{constructor(){this._tasks=[],this._i=0}enqueue(f){this._tasks.push(f),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(f){this._idleCallback=void 0;let S=0,_=0,p=f.timeRemaining(),v=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),_=Math.max(S,_),v=f.timeRemaining(),1.5*_>v)return p-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(p-S))}ms`),void this._start();p=v}this.clear()}}class d extends c{_requestCallback(f){return setTimeout(()=>f(this._createDeadline(16)))}_cancelCallback(f){clearTimeout(f)}_createDeadline(f){const S=Date.now()+f;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}o.PriorityTaskQueue=d,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends c{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:d,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},147:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new l;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,h=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=h}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},782:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=l(133),c=l(855),d=l(147);class h extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const _=new h;return _.setFromCharData(S),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[c.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(S[c.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(S[c.CHAR_DATA_CHAR_INDEX].length===2){const p=S[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){const v=S[c.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(p-55296)+v-56320+65536|S[c.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=S[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[c.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=S[c.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[c.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=h},855:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},133:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,u=0,c=l.length){let d="";for(let h=u;h<c;++h){let f=l[h];f>65535?(f-=65536,d+=String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):d+=String.fromCharCode(f)}return d},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,u){const c=l.length;if(!c)return 0;let d=0,h=0;if(this._interim){const f=l.charCodeAt(h++);56320<=f&&f<=57343?u[d++]=1024*(this._interim-55296)+f-56320+65536:(u[d++]=this._interim,u[d++]=f),this._interim=0}for(let f=h;f<c;++f){const S=l.charCodeAt(f);if(55296<=S&&S<=56319){if(++f>=c)return this._interim=S,d;const _=l.charCodeAt(f);56320<=_&&_<=57343?u[d++]=1024*(S-55296)+_-56320+65536:(u[d++]=S,u[d++]=_)}else S!==65279&&(u[d++]=S)}return d}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,u){const c=l.length;if(!c)return 0;let d,h,f,S,_=0,p=0,v=0;if(this.interim[0]){let b=!1,y=this.interim[0];y&=(224&y)==192?31:(240&y)==224?15:7;let E,T=0;for(;(E=63&this.interim[++T])&&T<4;)y<<=6,y|=E;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,w=C-T;for(;v<w;){if(v>=c)return 0;if(E=l[v++],(192&E)!=128){v--,b=!0;break}this.interim[T++]=E,y<<=6,y|=63&E}b||(C===2?y<128?v--:u[_++]=y:C===3?y<2048||y>=55296&&y<=57343||y===65279||(u[_++]=y):y<65536||y>1114111||(u[_++]=y)),this.interim.fill(0)}const m=c-4;let g=v;for(;g<c;){for(;!(!(g<m)||128&(d=l[g])||128&(h=l[g+1])||128&(f=l[g+2])||128&(S=l[g+3]));)u[_++]=d,u[_++]=h,u[_++]=f,u[_++]=S,g+=4;if(d=l[g++],d<128)u[_++]=d;else if((224&d)==192){if(g>=c)return this.interim[0]=d,_;if(h=l[g++],(192&h)!=128){g--;continue}if(p=(31&d)<<6|63&h,p<128){g--;continue}u[_++]=p}else if((240&d)==224){if(g>=c)return this.interim[0]=d,_;if(h=l[g++],(192&h)!=128){g--;continue}if(g>=c)return this.interim[0]=d,this.interim[1]=h,_;if(f=l[g++],(192&f)!=128){g--;continue}if(p=(15&d)<<12|(63&h)<<6|63&f,p<2048||p>=55296&&p<=57343||p===65279)continue;u[_++]=p}else if((248&d)==240){if(g>=c)return this.interim[0]=d,_;if(h=l[g++],(192&h)!=128){g--;continue}if(g>=c)return this.interim[0]=d,this.interim[1]=h,_;if(f=l[g++],(192&f)!=128){g--;continue}if(g>=c)return this.interim[0]=d,this.interim[1]=h,this.interim[2]=f,_;if(S=l[g++],(192&S)!=128){g--;continue}if(p=(7&d)<<18|(63&h)<<12|(63&f)<<6|63&S,p<65536||p>1114111)continue;u[_++]=p}}return _}}},776:function(a,o,l){var u=this&&this.__decorate||function(p,v,m,g){var b,y=arguments.length,E=y<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,m):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,v,m,g);else for(var T=p.length-1;T>=0;T--)(b=p[T])&&(E=(y<3?b(E):y>3?b(v,m,E):b(v,m))||E);return y>3&&E&&Object.defineProperty(v,m,E),E},c=this&&this.__param||function(p,v){return function(m,g){v(m,g,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const d=l(859),h=l(97),f={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF};let S,_=o.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(p){super(),this._optionsService=p,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),S=this}_updateLogLevel(){this._logLevel=f[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(p){for(let v=0;v<p.length;v++)typeof p[v]=="function"&&(p[v]=p[v]())}_log(p,v,m){this._evalLazyOptionalParams(m),p.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,...m)}trace(p,...v){var m;this._logLevel<=h.LogLevelEnum.TRACE&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.trace.bind(this._optionsService.options.logger))??console.log,p,v)}debug(p,...v){var m;this._logLevel<=h.LogLevelEnum.DEBUG&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.debug.bind(this._optionsService.options.logger))??console.log,p,v)}info(p,...v){var m;this._logLevel<=h.LogLevelEnum.INFO&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.info.bind(this._optionsService.options.logger))??console.info,p,v)}warn(p,...v){var m;this._logLevel<=h.LogLevelEnum.WARN&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.warn.bind(this._optionsService.options.logger))??console.warn,p,v)}error(p,...v){var m;this._logLevel<=h.LogLevelEnum.ERROR&&this._log(((m=this._optionsService.options.logger)==null?void 0:m.error.bind(this._optionsService.options.logger))??console.error,p,v)}};o.LogService=_=u([c(0,h.IOptionsService)],_),o.setTraceLogger=function(p){S=p},o.traceCall=function(p,v,m){if(typeof m.value!="function")throw new Error("not supported");const g=m.value;m.value=function(...b){if(S.logLevel!==h.LogLevelEnum.TRACE)return g.apply(this,b);S.trace(`GlyphRenderer#${g.name}(${b.map(E=>JSON.stringify(E)).join(", ")})`);const y=g.apply(this,b);return S.trace(`GlyphRenderer#${g.name} return`,y),y}}},726:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(c){return c[u]||[]},o.createDecorator=function(c){if(o.serviceRegistry.has(c))return o.serviceRegistry.get(c);const d=function(h,f,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,p,v){p[l]===p?p[u].push({id:_,index:v}):(p[u]=[{id:_,index:v}],p[l]=p)})(d,h,S)};return d.toString=()=>c,o.serviceRegistry.set(c,d),d}},97:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=l(726);var c;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(c||(o.LogLevelEnum=c={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")}},i={};function r(a){var o=i[a];if(o!==void 0)return o.exports;var l=i[a]={exports:{}};return n[a].call(l.exports,l,l.exports,r),l.exports}var s={};return(()=>{var a=s;Object.defineProperty(a,"__esModule",{value:!0}),a.WebglAddon=void 0;const o=r(345),l=r(859),u=r(399),c=r(666),d=r(776);class h extends l.Disposable{constructor(S){if(u.isSafari&&(0,u.getSafariVersion)()<16){const _={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",_))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=S,this._onChangeTextureAtlas=this.register(new o.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new o.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new o.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(S){const _=S._core;if(!S.element)return void this.register(_.onWillOpen(()=>this.activate(S)));this._terminal=S;const p=_.coreService,v=_.optionsService,m=_,g=m._renderService,b=m._characterJoinerService,y=m._charSizeService,E=m._coreBrowserService,T=m._decorationService,C=m._logService,w=m._themeService;(0,d.setTraceLogger)(C),this._renderer=this.register(new c.WebglRenderer(S,b,y,E,p,T,v,w,this._preserveDrawingBuffer)),this.register((0,o.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,o.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,o.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,o.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),g.setRenderer(this._renderer),this.register((0,l.toDisposable)(()=>{const R=this._terminal._core._renderService;R.setRenderer(this._terminal._core._createRenderer()),R.handleResize(S.cols,S.rows)}))}get textureAtlas(){var S;return(S=this._renderer)==null?void 0:S.textureAtlas}clearTextureAtlas(){var S;(S=this._renderer)==null||S.clearTextureAtlas()}}a.WebglAddon=h})(),s})())}(HR)),HR.exports}var xPe=NPe();const DPe={ref:"terminal",class:"terminal-container"},kPe=Ke({__name:"FullScreenTerminal",emits:["load"],setup(t,{emit:e}){const n=MS("terminal"),i=e;return Jn(()=>{const r=new APe.Terminal({fontFamily:"monospace"}),s=new IPe.FitAddon,a=new xPe.WebglAddon;r.loadAddon(s),r.loadAddon(a),r.open(n.value),s.fit();const o=new ResizeObserver(()=>{s.fit()});o.observe(n.value),i("load",r),$a(()=>{o.disconnect(),r.dispose()})}),(r,s)=>(_e(),Ge("div",DPe,null,512))}}),j9=jn(kPe,[["__scopeId","data-v-938fdbc7"]]);var VR={exports:{}},wV;function MPe(){return wV||(wV=1,function(t,e){(function(n,i){t.exports=i()})(self,()=>(()=>{var n={};return(()=>{var i=n;function r(s,a,o){return s.addEventListener(a,o),{dispose:()=>{o&&s.removeEventListener(a,o)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.AttachAddon=void 0,i.AttachAddon=class{constructor(s,a){this._disposables=[],this._socket=s,this._socket.binaryType="arraybuffer",this._bidirectional=!(a&&a.bidirectional===!1)}activate(s){this._disposables.push(r(this._socket,"message",a=>{const o=a.data;s.write(typeof o=="string"?o:new Uint8Array(o))})),this._bidirectional&&(this._disposables.push(s.onData(a=>this._sendData(a))),this._disposables.push(s.onBinary(a=>this._sendBinary(a)))),this._disposables.push(r(this._socket,"close",()=>this.dispose())),this._disposables.push(r(this._socket,"error",()=>this.dispose()))}dispose(){for(const s of this._disposables)s.dispose()}_sendData(s){this._checkOpenSocket()&&this._socket.send(s)}_sendBinary(s){if(!this._checkOpenSocket())return;const a=new Uint8Array(s.length);for(let o=0;o<s.length;++o)a[o]=255&s.charCodeAt(o);this._socket.send(a)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),n})())}(VR)),VR.exports}var LPe=MPe();const PPe=Wa({name:"terminal",getStoreId:(t,e,n)=>`projects/${t}/instances/${e}/terminals/${n}`,create:({storeId:t,id:[e,n,i]})=>As(t,()=>({connectTerminal:s=>{const a=new WebSocket(`ws://localhost:3000/projects/${e}/instances/${n}/terminalSessions/${i}`),o=new LPe.AttachAddon(a);s.loadAddon(o)}}))}),BPe=Ke({__name:"InstanceTerminal",props:{projectId:{},instanceId:{},sessionId:{}},setup(t){const e=PPe(t.projectId,t.instanceId,t.sessionId),n=i=>{e.connectTerminal(i)};return(i,r)=>{const s=j9;return _e(),Ne(s,{onLoad:n})}}}),FPe=Ke({__name:"TerminalPanel",props:{params:{}},setup(t){return(e,n)=>{const i=BPe;return _e(),Ne(i,{"project-id":e.params.params.projectId,"instance-id":e.params.params.instanceId,"session-id":e.params.params.sessionId},null,8,["project-id","instance-id","session-id"])}}}),UPe=Wa({name:"logs",getStoreId:(t,e)=>`operations/${t}/instances/${e}/logs`,create:({storeId:t,id:[e,n],onDeactivated:i})=>As(t,()=>{const{$client:r}=wn(),s=ve([]);return{lines:s,loadLogsToTerminal:async o=>{const l=c=>{for(const d of c.split(`
|
|
242
242
|
`))o.writeln(d)};s.value=await r.logs.getInstanceLogs.query({operationId:e,instanceId:n});for(const c of s.value)l(c);const{unsubscribe:u}=r.logs.watchInstanceLogs.subscribe({operationId:e,instanceId:n},{onData(c){s.value.push(c),l(c)}});i(u)}}})}),$Pe=Ke({__name:"LogsTerminal",props:{operationId:{},instanceId:{}},setup(t){const e=UPe(t.operationId,t.instanceId),n=i=>{e.loadLogsToTerminal(i)};return(i,r)=>{const s=j9;return _e(),Ne(s,{onLoad:n})}}}),GPe=Ke({__name:"LogsPanel",props:{params:{}},setup(t){return(e,n)=>{const i=$Pe;return _e(),Ne(i,{"operation-id":e.params.params.operationId,"instance-id":e.params.params.instanceId},null,8,["operation-id","instance-id"])}}});function HPe(t){return t.status!=="completed"&&t.status!=="failed"&&t.status!=="cancelled"}const VPe={class:"d-flex w-100"},zPe={class:"d-flex"},qPe={class:"d-flex ml-auto"},YPe=Ke({__name:"OperationCard",props:{operation:{}},setup(t){const e=te(()=>{switch(t.operation.status){case"completed":return"mdi-check";case"failed":case"cancelled":return"mdi-close";default:return""}}),n=te(()=>{switch(t.operation.status){case"pending":case"evaluating":return"primary";case"running":return"info";case"completed":return"success";case"failed":case"cancelled":return"error";default:return""}}),i=te(()=>{switch(t.operation.type){case"update":return"success";case"destroy":return"error";case"recreate":return"warning";case"refresh":case"evaluate":return"info";default:return""}});return(r,s)=>(_e(),Ne(Is,{subtitle:r.operation.status,width:360,class:"operation-card",color:"#2d2d2d",variant:"flat",style:{"border-radius":"4px"}},{title:be(()=>[Gt("div",VPe,[Gt("div",zPe,Nn(r.operation.id.slice(0,8)),1),Gt("div",qPe,[W(No,{color:ie(i)},{default:be(()=>[Et(Nn(r.operation.type),1)]),_:1},8,["color"])])])]),prepend:be(()=>[("isOperationRunning"in r?r.isOperationRunning:ie(HPe))(r.operation)?(_e(),Ne(Eq,{key:0,class:"mr-1",color:ie(n),indeterminate:"",size:"24"},null,8,["color"])):(_e(),Ne(Ot,{key:1,color:ie(n)},{default:be(()=>[Et(Nn(ie(e)),1)]),_:1},8,["color"]))]),_:1},8,["subtitle"]))}}),WPe=jn(YPe,[["__scopeId","data-v-9a058856"]]),KPe={key:0,class:"d-flex flex-column pl-4 pr-4 gr-4 pt-4 align-center sidebar-container"},jPe={key:0,class:"d-flex text-disabled text-subtitle-1",style:{"line-height":"1"}},QPe={key:1,class:"d-flex text-disabled text-subtitle-1",style:{"line-height":"1"}},XPe={class:"d-flex flex-column gr-4 operation-list-container"},ZPe={key:1,class:"mt-4 text-center text-uppercase"},JPe=Ke({__name:"OperationList",props:{projectId:{}},setup(t){const{stateStore:e,operationsStore:n,secretsStore:i}=y0e(t.projectId),r=async()=>{await n.launchOperation({projectId:t.projectId,type:"update",instanceIds:e.instancesToAutoUpdate.map(s=>s.id)})};return(s,a)=>{const o=WPe;return ie(i).isLocked?(_e(),Ge("div",ZPe,"The project is locked")):(_e(),Ge("div",KPe,[W(_n,{"prepend-icon":"mdi-auto-fix",color:"primary",size:"large",width:"360px",disabled:ie(e).instancesToAutoUpdate.length===0,title:"Ебанёт?",onClick:r},{default:be(()=>[Gt("div",null,[a[0]||(a[0]=Gt("div",{class:"d-flex",style:{"line-height":"1"}},"auto update",-1)),ie(e).instancesToAutoUpdate.length>0?(_e(),Ge("div",jPe,Nn(ie(e).instancesToAutoUpdate.length)+" component(s) ",1)):(_e(),Ge("div",QPe," nothing to update "))])]),_:1},8,["disabled"]),Gt("div",XPe,[(_e(!0),Ge(He,null,Or(ie(n).operations,l=>(_e(),Ne(o,{key:l.id,operation:l},null,8,["operation"]))),128))])]))}}}),eBe=jn(JPe,[["__scopeId","data-v-cb81d945"]]),tBe={key:1,class:"mt-4 text-center text-uppercase"},nBe=Ke({__name:"OperationListPanel",setup(t){const e=nb();return(n,i)=>{const r=eBe;return ie(e).focusedProjectId?(_e(),Ne(r,{key:ie(e).focusedProjectId,"project-id":ie(e).focusedProjectId},null,8,["project-id"])):(_e(),Ge("div",tBe,"No active project"))}}}),iBe={class:"dv-default-tab"},rBe={class:"dv-default-tab-content"},sBe=Ke({__name:"CustomTab",props:{params:{}},setup(t){return(e,n)=>(_e(),Ge("div",iBe,[e.params.params.icon?(_e(),Ne(Ot,{key:0},{default:be(()=>[Et(Nn(e.params.params.icon),1)]),_:1})):mt("",!0),Gt("div",rBe,Nn(e.params.params.title),1),e.params.params.closable?(_e(),Ge("div",{key:1,class:"dv-default-tab-action",onClick:n[0]||(n[0]=i=>e.params.api.close())},n[1]||(n[1]=[Gt("svg",{height:"11",width:"11",viewBox:"0 0 28 28","aria-hidden":"false",focusable:"false",class:"dv-svg"},[Gt("path",{d:"M2.1 27.3L0 25.2L11.55 13.65L0 2.1L2.1 0L13.65 11.55L25.2 0L27.3 2.1L15.75 13.65L27.3 25.2L25.2 27.3L13.65 15.75L2.1 27.3Z"})],-1)]))):mt("",!0)]))}}),oBe=Ke({__name:"LayoutResetButton",props:{params:{}},setup(t){const e=Eu(),n=ve(!1);return $t(()=>{n.value=t.params.group.model.panels.some(i=>i.id==="project-list")}),(i,r)=>ie(n)?(_e(),Ne(_n,{key:0,variant:"text",size:"small",class:"toolbar-button ma-1",onClick:r[0]||(r[0]=s=>ie(e).resetLayout())},{default:be(()=>[W(Ot,null,{default:be(()=>r[1]||(r[1]=[Et("mdi-window-restore")])),_:1}),W(TK,{activator:"parent",location:"bottom"},{default:be(()=>r[2]||(r[2]=[Et("Reset Layout")])),_:1})]),_:1})):mt("",!0)}}),aBe=jn(oBe,[["__scopeId","data-v-6df1353d"]]),lBe=Ke({components:{ProjectListPanel:oce,ProjectPanel:xLe,ComponentList:wPe,TerminalPanel:FPe,LogsPanel:GPe,OperationListPanel:nBe,CompositeInstancePanel:bPe,CustomTab:sBe,LayoutResetButton:aBe},__name:"app",async setup(t){let e,n;const i=Au();[e,n]=YI(()=>i.loadLibrary()),await e,n();const r=Eu(),s=ve(!1),a=o=>{r.init(o.api),r.loadLayout().finally(()=>{s.value=!0})};return(o,l)=>(_e(),Ge("div",{style:wi({display:ie(s)?"block":"none"})},[W(ie(Foe),{class:"dockview-container dockview-theme-dark","right-header-actions-component":"LayoutResetButton",onReady:a})],4))}}),cBe=jn(lBe,[["__scopeId","data-v-8811e678"]]),uBe={__name:"nuxt-error-page",props:{error:Object},setup(t){const n=t.error;n.stack&&n.stack.split(`
|
|
243
243
|
`).splice(1).map(d=>({text:d.replace("webpack:/","").replace(".vue",".js").trim(),internal:d.includes("node_modules")&&!d.includes(".cache")||d.includes("internal")||d.includes("new Promise")})).map(d=>`<span class="stack${d.internal?" internal":""}">${d.text}</span>`).join(`
|
|
244
|
-
`);const i=Number(n.statusCode||500),r=i===404,s=n.statusMessage??(r?"Page Not Found":"Internal Server Error"),a=n.message||n.toString(),o=void 0,c=r?PD(()=>I1(()=>import("./
|
|
244
|
+
`);const i=Number(n.statusCode||500),r=i===404,s=n.statusMessage??(r?"Page Not Found":"Internal Server Error"),a=n.message||n.toString(),o=void 0,c=r?PD(()=>I1(()=>import("./B3Ns2-bM.js"),__vite__mapDeps([0,1,2]),import.meta.url)):PD(()=>I1(()=>import("./TC7QuZux.js"),__vite__mapDeps([3,1,4]),import.meta.url));return(d,h)=>(_e(),Ne(ie(c),Lg(zg({statusCode:ie(i),statusMessage:ie(s),description:ie(a),stack:ie(o)})),null,16))}},dBe={key:0},RV={__name:"nuxt-root",setup(t){const e=()=>null,n=wn(),i=n.deferHydration();if(n.isHydrating){const l=n.hooks.hookOnce("app:error",i);nu().beforeEach(l)}const r=!1;Kn(x3,D3()),n.hooks.callHookWith(l=>l.map(u=>u()),"vue:setup");const s=tN(),a=!1;y5((l,u,c)=>{if(n.hooks.callHook("vue:error",l,u,c).catch(d=>console.error("[nuxt] Error in `vue:error` hook",d)),wee(l)&&(l.fatal||l.unhandled))return n.runWithContext(()=>Cee(l)),!1});const o=!1;return(l,u)=>(_e(),Ne(jI,{onResolve:ie(i)},{default:be(()=>[ie(a)?(_e(),Ge("div",dBe)):ie(s)?(_e(),Ne(ie(uBe),{key:1,error:ie(s)},null,8,["error"])):ie(o)?(_e(),Ne(ie(e),{key:2,context:ie(o)},null,8,["context"])):ie(r)?(_e(),Ne(BS(ie(r)),{key:3})):(_e(),Ne(ie(cBe),{key:4}))]),_:1},8,["onResolve"]))}};let AV;{let t;AV=async function(){var a,o;if(t)return t;const i=!!(((a=window.__NUXT__)==null?void 0:a.serverRendered)??((o=document.getElementById("__NUXT_DATA__"))==null?void 0:o.dataset.ssr)==="true")?XZ(RV):QZ(RV),r=oee({vueApp:i});async function s(l){await r.callHook("app:error",l),r.payload.error=r.payload.error||zS(l)}i.config.errorHandler=s,r.hook("app:suspense:resolve",()=>{i.config.errorHandler===s&&(i.config.errorHandler=void 0)});try{await cee(r,Ase)}catch(l){s(l)}try{await r.hooks.callHook("app:created",i),await r.hooks.callHook("app:beforeMount",i),i.mount(iee),await r.hooks.callHook("app:mounted",i),await $t()}catch(l){s(l)}return i},t=AV().catch(e=>{throw console.error("Error while mounting app:",e),e})}export{be as A,Et as B,pBe as C,Wr as D,SA as E,Ie as F,LS as G,TX as H,ai as I,jn as _,wn as a,pN as b,Q1 as c,Ke as d,Yi as e,_Be as f,C5 as g,Bt as h,yee as i,te as j,Qd as k,VS as l,Td as m,Eee as n,Jn as o,_3 as p,JI as q,ve as r,fBe as s,Ge as t,nu as u,_e as v,cA as w,Gt as x,Nn as y,W as z};
|