function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./SharedMoreDropdown-DffPheGC.js","./SharedMoreDropdown-BWKlox8E.css","./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./WdsDropdownMenu-inLHd048.js","./WdsDropdownMenu-BBEUy1kG.css","./BlueprintToolbar-CgXor0rS.js","./useBlueprintRun-CJ80fekX.js","./BlueprintToolbar-DwToUjfc.css","./ComponentRenderer-FbxROz85.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-C3SDWCQG.css","./BuilderApp-BuxvU36r.js","./marked.esm-273vDTCT.js","./BuilderApp-CLtPJVof.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
var Xp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var er=(e,t,n)=>(Xp(e,t,"read from private field"),n?n.call(e):t.get(e)),Kc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Wc=(e,t,n,r)=>(Xp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();const D1="modulepreload",B1=function(e,t){return new URL(e,t).href},Qp={},en=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=Promise.all(n.map(l=>{if(l=B1(l,r),l in Qp)return;Qp[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!r)for(let m=o.length-1;m>=0;m--){const _=o[m];if(_.href===l&&(!c||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":D1,c||(h.as="script",h.crossOrigin=""),h.href=l,i&&h.setAttribute("nonce",i),document.head.appendChild(h),c)return new Promise((m,_)=>{h.addEventListener("load",m),h.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))})}))}return a.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Bl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const It={},Do=[],ur=()=>{},F1=()=>!1,ii=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),id=e=>e.startsWith("onUpdate:"),Ut=Object.assign,ld=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},j1=Object.prototype.hasOwnProperty,Ot=(e,t)=>j1.call(e,t),et=Array.isArray,Bo=e=>ns(e)==="[object Map]",vo=e=>ns(e)==="[object Set]",Zp=e=>ns(e)==="[object Date]",V1=e=>ns(e)==="[object RegExp]",lt=e=>typeof e=="function",Gt=e=>typeof e=="string",kr=e=>typeof e=="symbol",jt=e=>e!==null&&typeof e=="object",cd=e=>(jt(e)||lt(e))&&lt(e.then)&&lt(e.catch),lv=Object.prototype.toString,ns=e=>lv.call(e),U1=e=>ns(e).slice(8,-1),Fl=e=>ns(e)==="[object Object]",ud=e=>Gt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Fo=Bl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),jl=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H1=/-(\w)/g,Tn=jl(e=>e.replace(H1,(t,n)=>n?n.toUpperCase():"")),z1=/\B([A-Z])/g,Jn=jl(e=>e.replace(z1,"-$1").toLowerCase()),li=jl(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=jl(e=>e?`on${li(e)}`:""),Un=(e,t)=>!Object.is(e,t),jo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},cv=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pl=e=>{const t=parseFloat(e);return isNaN(t)?e:t},hl=e=>{const t=Gt(e)?Number(e):NaN;return isNaN(t)?e:t};let eh;const Vl=()=>eh||(eh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),K1="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",W1=Bl(K1);function bt(e){if(et(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],a=Gt(r)?Y1(r):bt(r);if(a)for(const o in a)t[o]=a[o]}return t}else if(Gt(e)||jt(e))return e}const q1=/;(?![^(]*\))/g,G1=/:([^]+)/,J1=/\/\*[^]*?\*\//g;function Y1(e){const t={};return e.replace(J1,"").split(q1).forEach(n=>{if(n){const r=n.split(G1);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ut(e){let t="";if(Gt(e))t=e;else if(et(e))for(let n=0;n<e.length;n++){const r=ut(e[n]);r&&(t+=r+" ")}else if(jt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function X1(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Gt(t)&&(e.class=ut(t)),n&&(e.style=bt(n)),e}const Q1="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Z1=Bl(Q1);function uv(e){return!!e||e===""}function eA(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Ba(e[r],t[r]);return n}function Ba(e,t){if(e===t)return!0;let n=Zp(e),r=Zp(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=kr(e),r=kr(t),n||r)return e===t;if(n=et(e),r=et(t),n||r)return n&&r?eA(e,t):!1;if(n=jt(e),r=jt(t),n||r){if(!n||!r)return!1;const a=Object.keys(e).length,o=Object.keys(t).length;if(a!==o)return!1;for(const s in e){const i=e.hasOwnProperty(s),l=t.hasOwnProperty(s);if(i&&!l||!i&&l||!Ba(e[s],t[s]))return!1}}return String(e)===String(t)}function Ul(e,t){return e.findIndex(n=>Ba(n,t))}const dv=e=>!!(e&&e.__v_isRef===!0),Te=e=>Gt(e)?e:e==null?"":et(e)||jt(e)&&(e.toString===lv||!lt(e.toString))?dv(e)?Te(e.value):JSON.stringify(e,fv,2):String(e),fv=(e,t)=>dv(t)?fv(e,t.value):Bo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,a],o)=>(n[qc(r,o)+" =>"]=a,n),{})}:vo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>qc(n))}:kr(t)?qc(t):jt(t)&&!et(t)&&!Fl(t)?String(t):t,qc=(e,t="")=>{var n;return kr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let jn;class dd{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=jn,!t&&jn&&(this.index=(jn.scopes||(jn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=jn;try{return jn=this,t()}finally{jn=n}}}on(){jn=this}off(){jn=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function tA(e){return new dd(e)}function fd(){return jn}function pv(e,t=!1){jn&&jn.cleanups.push(e)}let qt;const Gc=new WeakSet;class Js{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,jn&&jn.active&&jn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Gc.has(this)&&(Gc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||mv(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,th(this),vv(this);const t=qt,n=Ir;qt=this,Ir=!0;try{return this.fn()}finally{gv(this),qt=t,Ir=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)md(t);this.deps=this.depsTail=void 0,th(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Gc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Au(this)&&this.run()}get dirty(){return Au(this)}}let hv=0,Ls,Ds;function mv(e,t=!1){if(e.flags|=8,t){e.next=Ds,Ds=e;return}e.next=Ls,Ls=e}function pd(){hv++}function hd(){if(--hv>0)return;if(Ds){let t=Ds;for(Ds=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ls;){let t=Ls;for(Ls=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function vv(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gv(e){let t,n=e.depsTail,r=n;for(;r;){const a=r.prevDep;r.version===-1?(r===n&&(n=a),md(r),nA(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=a}e.deps=t,e.depsTail=n}function Au(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yv(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yv(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ys))return;e.globalVersion=Ys;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Au(e)){e.flags&=-3;return}const n=qt,r=Ir;qt=e,Ir=!0;try{vv(e);const a=e.fn(e._value);(t.version===0||Un(a,e._value))&&(e._value=a,t.version++)}catch(a){throw t.version++,a}finally{qt=n,Ir=r,gv(e),e.flags&=-3}}function md(e,t=!1){const{dep:n,prevSub:r,nextSub:a}=e;if(r&&(r.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)md(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function nA(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function rA(e,t){e.effect instanceof Js&&(e=e.effect.fn);const n=new Js(e);t&&Ut(n,t);try{n.run()}catch(a){throw n.stop(),a}const r=n.run.bind(n);return r.effect=n,r}function aA(e){e.effect.stop()}let Ir=!0;const _v=[];function za(){_v.push(Ir),Ir=!1}function Ka(){const e=_v.pop();Ir=e===void 0?!0:e}function th(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=qt;qt=void 0;try{t()}finally{qt=n}}}let Ys=0;class oA{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Hl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!qt||!Ir||qt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==qt)n=this.activeLink=new oA(qt,this),qt.deps?(n.prevDep=qt.depsTail,qt.depsTail.nextDep=n,qt.depsTail=n):qt.deps=qt.depsTail=n,bv(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=qt.depsTail,n.nextDep=void 0,qt.depsTail.nextDep=n,qt.depsTail=n,qt.deps===n&&(qt.deps=r)}return n}trigger(t){this.version++,Ys++,this.notify(t)}notify(t){pd();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{hd()}}}function bv(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)bv(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ml=new WeakMap,io=Symbol(""),Cu=Symbol(""),Xs=Symbol("");function On(e,t,n){if(Ir&&qt){let r=ml.get(e);r||ml.set(e,r=new Map);let a=r.get(n);a||(r.set(n,a=new Hl),a.map=r,a.key=n),a.track()}}function ra(e,t,n,r,a,o){const s=ml.get(e);if(!s){Ys++;return}const i=l=>{l&&l.trigger()};if(pd(),t==="clear")s.forEach(i);else{const l=et(e),c=l&&ud(n);if(l&&n==="length"){const u=Number(r);s.forEach((d,h)=>{(h==="length"||h===Xs||!kr(h)&&h>=u)&&i(d)})}else switch((n!==void 0||s.has(void 0))&&i(s.get(n)),c&&i(s.get(Xs)),t){case"add":l?c&&i(s.get("length")):(i(s.get(io)),Bo(e)&&i(s.get(Cu)));break;case"delete":l||(i(s.get(io)),Bo(e)&&i(s.get(Cu)));break;case"set":Bo(e)&&i(s.get(io));break}}hd()}function sA(e,t){const n=ml.get(e);return n&&n.get(t)}function To(e){const t=gt(e);return t===e?t:(On(t,"iterate",Xs),nr(e)?t:t.map(Nn))}function zl(e){return On(e=gt(e),"iterate",Xs),e}const iA={__proto__:null,[Symbol.iterator](){return Jc(this,Symbol.iterator,Nn)},concat(...e){return To(this).concat(...e.map(t=>et(t)?To(t):t))},entries(){return Jc(this,"entries",e=>(e[1]=Nn(e[1]),e))},every(e,t){return ea(this,"every",e,t,void 0,arguments)},filter(e,t){return ea(this,"filter",e,t,n=>n.map(Nn),arguments)},find(e,t){return ea(this,"find",e,t,Nn,arguments)},findIndex(e,t){return ea(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ea(this,"findLast",e,t,Nn,arguments)},findLastIndex(e,t){return ea(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ea(this,"forEach",e,t,void 0,arguments)},includes(...e){return Yc(this,"includes",e)},indexOf(...e){return Yc(this,"indexOf",e)},join(e){return To(this).join(e)},lastIndexOf(...e){return Yc(this,"lastIndexOf",e)},map(e,t){return ea(this,"map",e,t,void 0,arguments)},pop(){return _s(this,"pop")},push(...e){return _s(this,"push",e)},reduce(e,...t){return nh(this,"reduce",e,t)},reduceRight(e,...t){return nh(this,"reduceRight",e,t)},shift(){return _s(this,"shift")},some(e,t){return ea(this,"some",e,t,void 0,arguments)},splice(...e){return _s(this,"splice",e)},toReversed(){return To(this).toReversed()},toSorted(e){return To(this).toSorted(e)},toSpliced(...e){return To(this).toSpliced(...e)},unshift(...e){return _s(this,"unshift",e)},values(){return Jc(this,"values",Nn)}};function Jc(e,t,n){const r=zl(e),a=r[t]();return r!==e&&!nr(e)&&(a._next=a.next,a.next=()=>{const o=a._next();return o.value&&(o.value=n(o.value)),o}),a}const lA=Array.prototype;function ea(e,t,n,r,a,o){const s=zl(e),i=s!==e&&!nr(e),l=s[t];if(l!==lA[t]){const d=l.apply(e,o);return i?Nn(d):d}let c=n;s!==e&&(i?c=function(d,h){return n.call(this,Nn(d),h,e)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,e)}));const u=l.call(s,c,r);return i&&a?a(u):u}function nh(e,t,n,r){const a=zl(e);let o=n;return a!==e&&(nr(e)?n.length>3&&(o=function(s,i,l){return n.call(this,s,i,l,e)}):o=function(s,i,l){return n.call(this,s,Nn(i),l,e)}),a[t](o,...r)}function Yc(e,t,n){const r=gt(e);On(r,"iterate",Xs);const a=r[t](...n);return(a===-1||a===!1)&&Gl(n[0])?(n[0]=gt(n[0]),r[t](...n)):a}function _s(e,t,n=[]){za(),pd();const r=gt(e)[t].apply(e,n);return hd(),Ka(),r}const cA=Bl("__proto__,__v_isRef,__isVue"),wv=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kr));function uA(e){kr(e)||(e=String(e));const t=gt(this);return On(t,"has",e),t.hasOwnProperty(e)}class Av{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const a=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(a?o?kv:Ev:o?Iv:Sv).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=et(t);if(!a){let l;if(s&&(l=iA[n]))return l;if(n==="hasOwnProperty")return uA}const i=Reflect.get(t,n,sn(t)?t:r);return(kr(n)?wv.has(n):cA(n))||(a||On(t,"get",n),o)?i:sn(i)?s&&ud(n)?i:i.value:jt(i)?a?In(i):Wl(i):i}}class Cv extends Av{constructor(t=!1){super(!1,t)}set(t,n,r,a){let o=t[n];if(!this._isShallow){const l=Fa(o);if(!nr(r)&&!Fa(r)&&(o=gt(o),r=gt(r)),!et(t)&&sn(o)&&!sn(r))return l?!1:(o.value=r,!0)}const s=et(t)&&ud(n)?Number(n)<t.length:Ot(t,n),i=Reflect.set(t,n,r,sn(t)?t:a);return t===gt(a)&&(s?Un(r,o)&&ra(t,"set",n,r):ra(t,"add",n,r)),i}deleteProperty(t,n){const r=Ot(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&r&&ra(t,"delete",n,void 0),a}has(t,n){const r=Reflect.has(t,n);return(!kr(n)||!wv.has(n))&&On(t,"has",n),r}ownKeys(t){return On(t,"iterate",et(t)?"length":io),Reflect.ownKeys(t)}}class $v extends Av{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const dA=new Cv,fA=new $v,pA=new Cv(!0),hA=new $v(!0),$u=e=>e,Mi=e=>Reflect.getPrototypeOf(e);function mA(e,t,n){return function(...r){const a=this.__v_raw,o=gt(a),s=Bo(o),i=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=a[e](...r),u=n?$u:t?Su:Nn;return!t&&On(o,"iterate",l?Cu:io),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:i?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Oi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vA(e,t){const n={get(a){const o=this.__v_raw,s=gt(o),i=gt(a);e||(Un(a,i)&&On(s,"get",a),On(s,"get",i));const{has:l}=Mi(s),c=t?$u:e?Su:Nn;if(l.call(s,a))return c(o.get(a));if(l.call(s,i))return c(o.get(i));o!==s&&o.get(a)},get size(){const a=this.__v_raw;return!e&&On(gt(a),"iterate",io),Reflect.get(a,"size",a)},has(a){const o=this.__v_raw,s=gt(o),i=gt(a);return e||(Un(a,i)&&On(s,"has",a),On(s,"has",i)),a===i?o.has(a):o.has(a)||o.has(i)},forEach(a,o){const s=this,i=s.__v_raw,l=gt(i),c=t?$u:e?Su:Nn;return!e&&On(l,"iterate",io),i.forEach((u,d)=>a.call(o,c(u),c(d),s))}};return Ut(n,e?{add:Oi("add"),set:Oi("set"),delete:Oi("delete"),clear:Oi("clear")}:{add(a){!t&&!nr(a)&&!Fa(a)&&(a=gt(a));const o=gt(this);return Mi(o).has.call(o,a)||(o.add(a),ra(o,"add",a,a)),this},set(a,o){!t&&!nr(o)&&!Fa(o)&&(o=gt(o));const s=gt(this),{has:i,get:l}=Mi(s);let c=i.call(s,a);c||(a=gt(a),c=i.call(s,a));const u=l.call(s,a);return s.set(a,o),c?Un(o,u)&&ra(s,"set",a,o):ra(s,"add",a,o),this},delete(a){const o=gt(this),{has:s,get:i}=Mi(o);let l=s.call(o,a);l||(a=gt(a),l=s.call(o,a)),i&&i.call(o,a);const c=o.delete(a);return l&&ra(o,"delete",a,void 0),c},clear(){const a=gt(this),o=a.size!==0,s=a.clear();return o&&ra(a,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=mA(a,e,t)}),n}function Kl(e,t){const n=vA(e,t);return(r,a,o)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?r:Reflect.get(Ot(n,a)&&a in r?n:r,a,o)}const gA={get:Kl(!1,!1)},yA={get:Kl(!1,!0)},_A={get:Kl(!0,!1)},bA={get:Kl(!0,!0)},Sv=new WeakMap,Iv=new WeakMap,Ev=new WeakMap,kv=new WeakMap;function wA(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function AA(e){return e.__v_skip||!Object.isExtensible(e)?0:wA(U1(e))}function Wl(e){return Fa(e)?e:ql(e,!1,dA,gA,Sv)}function Tv(e){return ql(e,!1,pA,yA,Iv)}function In(e){return ql(e,!0,fA,_A,Ev)}function to(e){return ql(e,!0,hA,bA,kv)}function ql(e,t,n,r,a){if(!jt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=a.get(e);if(o)return o;const s=AA(e);if(s===0)return e;const i=new Proxy(e,s===2?r:n);return a.set(e,i),i}function Oa(e){return Fa(e)?Oa(e.__v_raw):!!(e&&e.__v_isReactive)}function Fa(e){return!!(e&&e.__v_isReadonly)}function nr(e){return!!(e&&e.__v_isShallow)}function Gl(e){return e?!!e.__v_raw:!1}function gt(e){const t=e&&e.__v_raw;return t?gt(t):e}function xv(e){return!Ot(e,"__v_skip")&&Object.isExtensible(e)&&cv(e,"__v_skip",!0),e}const Nn=e=>jt(e)?Wl(e):e,Su=e=>jt(e)?In(e):e;function sn(e){return e?e.__v_isRef===!0:!1}function $e(e){return Pv(e,!1)}function En(e){return Pv(e,!0)}function Pv(e,t){return sn(e)?e:new CA(e,t)}class CA{constructor(t,n){this.dep=new Hl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:gt(t),this._value=n?t:Nn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||nr(t)||Fa(t);t=r?t:gt(t),Un(t,n)&&(this._rawValue=t,this._value=r?t:Nn(t),this.dep.trigger())}}function $A(e){e.dep&&e.dep.trigger()}function P(e){return sn(e)?e.value:e}function SA(e){return lt(e)?e():P(e)}const IA={get:(e,t,n)=>t==="__v_raw"?e:P(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const a=e[t];return sn(a)&&!sn(n)?(a.value=n,!0):Reflect.set(e,t,n,r)}};function vd(e){return Oa(e)?e:new Proxy(e,IA)}class EA{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Hl,{get:r,set:a}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=a}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Mv(e){return new EA(e)}function gd(e){const t=et(e)?new Array(e.length):{};for(const n in e)t[n]=Ov(e,n);return t}class kA{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return sA(gt(this._object),this._key)}}class TA{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function la(e,t,n){return sn(e)?e:lt(e)?new TA(e):jt(e)&&arguments.length>1?Ov(e,t,n):$e(e)}function Ov(e,t,n){const r=e[t];return sn(r)?r:new kA(e,t,n)}class xA{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Hl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ys-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&qt!==this)return mv(this,!0),!0}get value(){const t=this.dep.track();return yv(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function PA(e,t,n=!1){let r,a;return lt(e)?r=e:(r=e.get,a=e.set),new xA(r,a,n)}const MA={GET:"get",HAS:"has",ITERATE:"iterate"},OA={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Ni={},vl=new WeakMap;let ka;function NA(){return ka}function Nv(e,t=!1,n=ka){if(n){let r=vl.get(n);r||vl.set(n,r=[]),r.push(e)}}function RA(e,t,n=It){const{immediate:r,deep:a,once:o,scheduler:s,augmentJob:i,call:l}=n,c=p=>a?p:nr(p)||a===!1||a===0?aa(p,1):aa(p);let u,d,h,m,_=!1,g=!1;if(sn(e)?(d=()=>e.value,_=nr(e)):Oa(e)?(d=()=>c(e),_=!0):et(e)?(g=!0,_=e.some(p=>Oa(p)||nr(p)),d=()=>e.map(p=>{if(sn(p))return p.value;if(Oa(p))return c(p);if(lt(p))return l?l(p,2):p()})):lt(e)?t?d=l?()=>l(e,2):e:d=()=>{if(h){za();try{h()}finally{Ka()}}const p=ka;ka=u;try{return l?l(e,3,[m]):e(m)}finally{ka=p}}:d=ur,t&&a){const p=d,b=a===!0?1/0:a;d=()=>aa(p(),b)}const w=fd(),A=()=>{u.stop(),w&&w.active&&ld(w.effects,u)};if(o&&t){const p=t;t=(...b)=>{p(...b),A()}}let C=g?new Array(e.length).fill(Ni):Ni;const y=p=>{if(!(!(u.flags&1)||!u.dirty&&!p))if(t){const b=u.run();if(a||_||(g?b.some((S,R)=>Un(S,C[R])):Un(b,C))){h&&h();const S=ka;ka=u;try{const R=[b,C===Ni?void 0:g&&C[0]===Ni?[]:C,m];l?l(t,3,R):t(...R),C=b}finally{ka=S}}}else u.run()};return i&&i(y),u=new Js(d),u.scheduler=s?()=>s(y,!1):y,m=p=>Nv(p,!1,u),h=u.onStop=()=>{const p=vl.get(u);if(p){if(l)l(p,4);else for(const b of p)b();vl.delete(u)}},t?r?y(!0):C=u.run():s?s(y.bind(null,!0),!0):u.run(),A.pause=u.pause.bind(u),A.resume=u.resume.bind(u),A.stop=A,A}function aa(e,t=1/0,n){if(t<=0||!jt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,sn(e))aa(e.value,t,n);else if(et(e))for(let r=0;r<e.length;r++)aa(e[r],t,n);else if(vo(e)||Bo(e))e.forEach(r=>{aa(r,t,n)});else if(Fl(e)){for(const r in e)aa(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&aa(e[r],t,n)}return e}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Rv=[];function LA(e){Rv.push(e)}function DA(){Rv.pop()}function BA(e,t){}const FA={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},jA={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function rs(e,t,n,r){try{return r?e(...r):e()}catch(a){go(a,t,n)}}function fr(e,t,n,r){if(lt(e)){const a=rs(e,t,n,r);return a&&cd(a)&&a.catch(o=>{go(o,t,n)}),a}if(et(e)){const a=[];for(let o=0;o<e.length;o++)a.push(fr(e[o],t,n,r));return a}}function go(e,t,n,r=!0){const a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||It;if(t){let i=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}i=i.parent}if(o){za(),rs(o,null,10,[e,l,c]),Ka();return}}VA(e,n,a,r,s)}function VA(e,t,n,r=!0,a=!1){if(a)throw e;console.error(e)}const Hn=[];let Lr=-1;const Vo=[];let Ta=null,Oo=0;const Lv=Promise.resolve();let gl=null;function ar(e){const t=gl||Lv;return e?t.then(this?e.bind(this):e):t}function UA(e){let t=Lr+1,n=Hn.length;for(;t<n;){const r=t+n>>>1,a=Hn[r],o=Zs(a);o<e||o===e&&a.flags&2?t=r+1:n=r}return t}function yd(e){if(!(e.flags&1)){const t=Zs(e),n=Hn[Hn.length-1];!n||!(e.flags&2)&&t>=Zs(n)?Hn.push(e):Hn.splice(UA(t),0,e),e.flags|=1,Dv()}}function Dv(){gl||(gl=Lv.then(Bv))}function Qs(e){et(e)?Vo.push(...e):Ta&&e.id===-1?Ta.splice(Oo+1,0,e):e.flags&1||(Vo.push(e),e.flags|=1),Dv()}function rh(e,t,n=Lr+1){for(;n<Hn.length;n++){const r=Hn[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Hn.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function yl(e){if(Vo.length){const t=[...new Set(Vo)].sort((n,r)=>Zs(n)-Zs(r));if(Vo.length=0,Ta){Ta.push(...t);return}for(Ta=t,Oo=0;Oo<Ta.length;Oo++){const n=Ta[Oo];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ta=null,Oo=0}}const Zs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Bv(e){try{for(Lr=0;Lr<Hn.length;Lr++){const t=Hn[Lr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),rs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Lr<Hn.length;Lr++){const t=Hn[Lr];t&&(t.flags&=-2)}Lr=-1,Hn.length=0,yl(),gl=null,(Hn.length||Vo.length)&&Bv()}}let No,Ri=[];function Fv(e,t){var n,r;No=e,No?(No.enabled=!0,Ri.forEach(({event:a,args:o})=>No.emit(a,...o)),Ri=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Fv(o,t)}),setTimeout(()=>{No||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ri=[])},3e3)):Ri=[]}let mn=null,Jl=null;function ei(e){const t=mn;return mn=e,Jl=e&&e.type.__scopeId||null,t}function HA(e){Jl=e}function zA(){Jl=null}const KA=e=>Ze;function Ze(e,t=mn,n){if(!t||e._n)return e;const r=(...a)=>{r._d&&Ou(-1);const o=ei(t);let s;try{s=e(...a)}finally{ei(o),r._d&&Ou(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Dn(e,t){if(mn===null)return e;const n=di(mn),r=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[o,s,i,l=It]=t[a];o&&(lt(o)&&(o={mounted:o,updated:o}),o.deep&&aa(s),r.push({dir:o,instance:n,value:s,oldValue:void 0,arg:i,modifiers:l}))}return e}function Dr(e,t,n,r){const a=e.dirs,o=t&&t.dirs;for(let s=0;s<a.length;s++){const i=a[s];o&&(i.oldValue=o[s].value);let l=i.dir[r];l&&(za(),fr(l,n,8,[e.el,i,e,t]),Ka())}}const jv=Symbol("_vte"),Vv=e=>e.__isTeleport,Bs=e=>e&&(e.disabled||e.disabled===""),ah=e=>e&&(e.defer||e.defer===""),oh=e=>typeof SVGElement<"u"&&e instanceof SVGElement,sh=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Iu=(e,t)=>{const n=e&&e.to;return Gt(n)?t?t(n):null:n},Uv={name:"Teleport",__isTeleport:!0,process(e,t,n,r,a,o,s,i,l,c){const{mc:u,pc:d,pbc:h,o:{insert:m,querySelector:_,createText:g,createComment:w}}=c,A=Bs(t.props);let{shapeFlag:C,children:y,dynamicChildren:p}=t;if(e==null){const b=t.el=g(""),S=t.anchor=g("");m(b,n,r),m(S,n,r);const R=(G,Z)=>{C&16&&(a&&a.isCE&&(a.ce._teleportTarget=G),u(y,G,Z,a,o,s,i,l))},K=()=>{const G=t.target=Iu(t.props,_),Z=zv(G,t,g,m);G&&(s!=="svg"&&oh(G)?s="svg":s!=="mathml"&&sh(G)&&(s="mathml"),A||(R(G,Z),nl(t,!1)))};A&&(R(n,S),nl(t,!0)),ah(t.props)?fn(()=>{K(),t.el.__isMounted=!0},o):K()}else{if(ah(t.props)&&!e.el.__isMounted){fn(()=>{Uv.process(e,t,n,r,a,o,s,i,l,c),delete e.el.__isMounted},o);return}t.el=e.el,t.targetStart=e.targetStart;const b=t.anchor=e.anchor,S=t.target=e.target,R=t.targetAnchor=e.targetAnchor,K=Bs(e.props),G=K?n:S,Z=K?b:R;if(s==="svg"||oh(S)?s="svg":(s==="mathml"||sh(S))&&(s="mathml"),p?(h(e.dynamicChildren,p,G,a,o,s,i),kd(e,t,!0)):l||d(e,t,G,Z,a,o,s,i,!1),A)K?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Li(t,n,b,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ie=t.target=Iu(t.props,_);Ie&&Li(t,Ie,null,c,0)}else K&&Li(t,S,R,c,1);nl(t,A)}},remove(e,t,n,{um:r,o:{remove:a}},o){const{shapeFlag:s,children:i,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=e;if(d&&(a(c),a(u)),o&&a(l),s&16){const m=o||!Bs(h);for(let _=0;_<i.length;_++){const g=i[_];r(g,t,n,m,!!g.dynamicChildren)}}},move:Li,hydrate:WA};function Li(e,t,n,{o:{insert:r},m:a},o=2){o===0&&r(e.targetAnchor,t,n);const{el:s,anchor:i,shapeFlag:l,children:c,props:u}=e,d=o===2;if(d&&r(s,t,n),(!d||Bs(u))&&l&16)for(let h=0;h<c.length;h++)a(c[h],t,n,2);d&&r(i,t,n)}function WA(e,t,n,r,a,o,{o:{nextSibling:s,parentNode:i,querySelector:l,insert:c,createText:u}},d){const h=t.target=Iu(t.props,l);if(h){const m=Bs(t.props),_=h._lpa||h.firstChild;if(t.shapeFlag&16)if(m)t.anchor=d(s(e),t,i(e),n,r,a,o),t.targetStart=_,t.targetAnchor=_&&s(_);else{t.anchor=s(e);let g=_;for(;g;){if(g&&g.nodeType===8){if(g.data==="teleport start anchor")t.targetStart=g;else if(g.data==="teleport anchor"){t.targetAnchor=g,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}}g=s(g)}t.targetAnchor||zv(h,t,u,c),d(_&&s(_),t,h,n,r,a,o)}nl(t,m)}return t.anchor&&s(t.anchor)}const Hv=Uv;function nl(e,t){const n=e.ctx;if(n&&n.ut){let r,a;for(t?(r=e.el,a=e.anchor):(r=e.targetStart,a=e.targetAnchor);r&&r!==a;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function zv(e,t,n,r){const a=t.targetStart=n(""),o=t.targetAnchor=n("");return a[jv]=o,e&&(r(a,e),r(o,e)),o}const xa=Symbol("_leaveCb"),Di=Symbol("_enterCb");function _d(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ln(()=>{e.isMounted=!0}),ha(()=>{e.isUnmounting=!0}),e}const sr=[Function,Array],bd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sr,onEnter:sr,onAfterEnter:sr,onEnterCancelled:sr,onBeforeLeave:sr,onLeave:sr,onAfterLeave:sr,onLeaveCancelled:sr,onBeforeAppear:sr,onAppear:sr,onAfterAppear:sr,onAppearCancelled:sr},Kv=e=>{const t=e.subTree;return t.component?Kv(t.component):t},qA={name:"BaseTransition",props:bd,setup(e,{slots:t}){const n=pr(),r=_d();return()=>{const a=t.default&&Yl(t.default(),!0);if(!a||!a.length)return;const o=Wv(a),s=gt(e),{mode:i}=s;if(r.isLeaving)return Xc(o);const l=ih(o);if(!l)return Xc(o);let c=Go(l,s,r,n,d=>c=d);l.type!==on&&ca(l,c);let u=n.subTree&&ih(n.subTree);if(u&&u.type!==on&&!$r(l,u)&&Kv(n).type!==on){let d=Go(u,s,r,n);if(ca(u,d),i==="out-in"&&l.type!==on)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},Xc(o);i==="in-out"&&l.type!==on?d.delayLeave=(h,m,_)=>{const g=Gv(r,u);g[String(u.key)]=u,h[xa]=()=>{m(),h[xa]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{_(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Wv(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==on){t=n;break}}return t}const qv=qA;function Gv(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Go(e,t,n,r,a){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:m,onAfterLeave:_,onLeaveCancelled:g,onBeforeAppear:w,onAppear:A,onAfterAppear:C,onAppearCancelled:y}=t,p=String(e.key),b=Gv(n,e),S=(G,Z)=>{G&&fr(G,r,9,Z)},R=(G,Z)=>{const Ie=Z[1];S(G,Z),et(G)?G.every(de=>de.length<=1)&&Ie():G.length<=1&&Ie()},K={mode:s,persisted:i,beforeEnter(G){let Z=l;if(!n.isMounted)if(o)Z=w||l;else return;G[xa]&&G[xa](!0);const Ie=b[p];Ie&&$r(e,Ie)&&Ie.el[xa]&&Ie.el[xa](),S(Z,[G])},enter(G){let Z=c,Ie=u,de=d;if(!n.isMounted)if(o)Z=A||c,Ie=C||u,de=y||d;else return;let Ae=!1;const we=G[Di]=Ge=>{Ae||(Ae=!0,Ge?S(de,[G]):S(Ie,[G]),K.delayedLeave&&K.delayedLeave(),G[Di]=void 0)};Z?R(Z,[G,we]):we()},leave(G,Z){const Ie=String(e.key);if(G[Di]&&G[Di](!0),n.isUnmounting)return Z();S(h,[G]);let de=!1;const Ae=G[xa]=we=>{de||(de=!0,Z(),we?S(g,[G]):S(_,[G]),G[xa]=void 0,b[Ie]===e&&delete b[Ie])};b[Ie]=e,m?R(m,[G,Ae]):Ae()},clone(G){const Z=Go(G,t,n,r,a);return a&&a(Z),Z}};return K}function Xc(e){if(ci(e))return e=Kr(e),e.children=null,e}function ih(e){if(!ci(e))return Vv(e.type)&&e.children?Wv(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&lt(n.default))return n.default()}}function ca(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ca(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Yl(e,t=!1,n){let r=[],a=0;for(let o=0;o<e.length;o++){let s=e[o];const i=n==null?s.key:String(n)+String(s.key!=null?s.key:o);s.type===Ye?(s.patchFlag&128&&a++,r=r.concat(Yl(s.children,t,i))):(t||s.type!==on)&&r.push(i!=null?Kr(s,{key:i}):s)}if(a>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Ce(e,t){return lt(e)?Ut({name:e.name},t,{setup:e}):e}function GA(){const e=pr();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function wd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function it(e){const t=pr(),n=En(null);if(t){const a=t.refs===It?t.refs={}:t.refs;Object.defineProperty(a,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function ti(e,t,n,r,a=!1){if(et(e)){e.forEach((_,g)=>ti(_,t&&(et(t)?t[g]:t),n,r,a));return}if(Na(r)&&!a){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&ti(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?di(r.component):r.el,s=a?null:o,{i,r:l}=e,c=t&&t.r,u=i.refs===It?i.refs={}:i.refs,d=i.setupState,h=gt(d),m=d===It?()=>!1:_=>Ot(h,_);if(c!=null&&c!==l&&(Gt(c)?(u[c]=null,m(c)&&(d[c]=null)):sn(c)&&(c.value=null)),lt(l))rs(l,i,12,[s,u]);else{const _=Gt(l),g=sn(l);if(_||g){const w=()=>{if(e.f){const A=_?m(l)?d[l]:u[l]:l.value;a?et(A)&&ld(A,o):et(A)?A.includes(o)||A.push(o):_?(u[l]=[o],m(l)&&(d[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else _?(u[l]=s,m(l)&&(d[l]=s)):g&&(l.value=s,e.k&&(u[e.k]=s))};s?(w.id=-1,fn(w,n)):w()}}}let lh=!1;const xo=()=>{lh||(console.error("Hydration completed but contains mismatches."),lh=!0)},JA=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",YA=e=>e.namespaceURI.includes("MathML"),Bi=e=>{if(e.nodeType===1){if(JA(e))return"svg";if(YA(e))return"mathml"}},Lo=e=>e.nodeType===8;function XA(e){const{mt:t,p:n,o:{patchProp:r,createText:a,nextSibling:o,parentNode:s,remove:i,insert:l,createComment:c}}=e,u=(y,p)=>{if(!p.hasChildNodes()){n(null,y,p),yl(),p._vnode=y;return}d(p.firstChild,y,null,null,null),yl(),p._vnode=y},d=(y,p,b,S,R,K=!1)=>{K=K||!!p.dynamicChildren;const G=Lo(y)&&y.data==="[",Z=()=>g(y,p,b,S,R,G),{type:Ie,ref:de,shapeFlag:Ae,patchFlag:we}=p;let Ge=y.nodeType;p.el=y,we===-2&&(K=!1,p.dynamicChildren=null);let xe=null;switch(Ie){case Ra:Ge!==3?p.children===""?(l(p.el=a(""),s(y),y),xe=y):xe=Z():(y.data!==p.children&&(xo(),y.data=p.children),xe=o(y));break;case on:C(y)?(xe=o(y),A(p.el=y.content.firstChild,y,b)):Ge!==8||G?xe=Z():xe=o(y);break;case co:if(G&&(y=o(y),Ge=y.nodeType),Ge===1||Ge===3){xe=y;const ye=!p.children.length;for(let _e=0;_e<p.staticCount;_e++)ye&&(p.children+=xe.nodeType===1?xe.outerHTML:xe.data),_e===p.staticCount-1&&(p.anchor=xe),xe=o(xe);return G?o(xe):xe}else Z();break;case Ye:G?xe=_(y,p,b,S,R,K):xe=Z();break;default:if(Ae&1)(Ge!==1||p.type.toLowerCase()!==y.tagName.toLowerCase())&&!C(y)?xe=Z():xe=h(y,p,b,S,R,K);else if(Ae&6){p.slotScopeIds=R;const ye=s(y);if(G?xe=w(y):Lo(y)&&y.data==="teleport start"?xe=w(y,y.data,"teleport end"):xe=o(y),t(p,ye,null,b,S,Bi(ye),K),Na(p)&&!p.type.__asyncResolved){let _e;G?(_e=Fe(Ye),_e.anchor=xe?xe.previousSibling:ye.lastChild):_e=y.nodeType===3?tn(""):Fe("div"),_e.el=y,p.component.subTree=_e}}else Ae&64?Ge!==8?xe=Z():xe=p.type.hydrate(y,p,b,S,R,K,e,m):Ae&128&&(xe=p.type.hydrate(y,p,b,S,Bi(s(y)),R,K,e,d))}return de!=null&&ti(de,null,S,p),xe},h=(y,p,b,S,R,K)=>{K=K||!!p.dynamicChildren;const{type:G,props:Z,patchFlag:Ie,shapeFlag:de,dirs:Ae,transition:we}=p,Ge=G==="input"||G==="option";if(Ge||Ie!==-1){Ae&&Dr(p,null,b,"created");let xe=!1;if(C(y)){xe=bg(null,we)&&b&&b.vnode.props&&b.vnode.props.appear;const _e=y.content.firstChild;xe&&we.beforeEnter(_e),A(_e,y,b),p.el=y=_e}if(de&16&&!(Z&&(Z.innerHTML||Z.textContent))){let _e=m(y.firstChild,p,y,b,S,R,K);for(;_e;){Fi(y,1)||xo();const He=_e;_e=_e.nextSibling,i(He)}}else if(de&8){let _e=p.children;_e[0]===`
`&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(_e=_e.slice(1)),y.textContent!==_e&&(Fi(y,0)||xo(),y.textContent=p.children)}if(Z){if(Ge||!K||Ie&48){const _e=y.tagName.includes("-");for(const He in Z)(Ge&&(He.endsWith("value")||He==="indeterminate")||ii(He)&&!Fo(He)||He[0]==="."||_e)&&r(y,He,null,Z[He],void 0,b)}else if(Z.onClick)r(y,"onClick",null,Z.onClick,void 0,b);else if(Ie&4&&Oa(Z.style))for(const _e in Z.style)Z.style[_e]}let ye;(ye=Z&&Z.onVnodeBeforeMount)&&Wn(ye,b,p),Ae&&Dr(p,null,b,"beforeMount"),((ye=Z&&Z.onVnodeMounted)||Ae||xe)&&Tg(()=>{ye&&Wn(ye,b,p),xe&&we.enter(y),Ae&&Dr(p,null,b,"mounted")},S)}return y.nextSibling},m=(y,p,b,S,R,K,G)=>{G=G||!!p.dynamicChildren;const Z=p.children,Ie=Z.length;for(let de=0;de<Ie;de++){const Ae=G?Z[de]:Z[de]=Gn(Z[de]),we=Ae.type===Ra;y?(we&&!G&&de+1<Ie&&Gn(Z[de+1]).type===Ra&&(l(a(y.data.slice(Ae.children.length)),b,o(y)),y.data=Ae.children),y=d(y,Ae,S,R,K,G)):we&&!Ae.children?l(Ae.el=a(""),b):(Fi(b,1)||xo(),n(null,Ae,b,null,S,R,Bi(b),K))}return y},_=(y,p,b,S,R,K)=>{const{slotScopeIds:G}=p;G&&(R=R?R.concat(G):G);const Z=s(y),Ie=m(o(y),p,Z,b,S,R,K);return Ie&&Lo(Ie)&&Ie.data==="]"?o(p.anchor=Ie):(xo(),l(p.anchor=c("]"),Z,Ie),Ie)},g=(y,p,b,S,R,K)=>{if(Fi(y.parentElement,1)||xo(),p.el=null,K){const Ie=w(y);for(;;){const de=o(y);if(de&&de!==Ie)i(de);else break}}const G=o(y),Z=s(y);return i(y),n(null,p,Z,G,b,S,Bi(Z),R),b&&(b.vnode.el=p.el,ec(b,p.el)),G},w=(y,p="[",b="]")=>{let S=0;for(;y;)if(y=o(y),y&&Lo(y)&&(y.data===p&&S++,y.data===b)){if(S===0)return o(y);S--}return y},A=(y,p,b)=>{const S=p.parentNode;S&&S.replaceChild(y,p);let R=b;for(;R;)R.vnode.el===p&&(R.vnode.el=R.subTree.el=y),R=R.parent},C=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[u,d]}const ch="data-allow-mismatch",QA={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Fi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ch);)e=e.parentElement;const n=e&&e.getAttribute(ch);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:n.split(",").includes(QA[t])}}const ZA=Vl().requestIdleCallback||(e=>setTimeout(e,1)),eC=Vl().cancelIdleCallback||(e=>clearTimeout(e)),tC=(e=1e4)=>t=>{const n=ZA(t,{timeout:e});return()=>eC(n)};function nC(e){const{top:t,left:n,bottom:r,right:a}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:s}=window;return(t>0&&t<o||r>0&&r<o)&&(n>0&&n<s||a>0&&a<s)}const rC=e=>(t,n)=>{const r=new IntersectionObserver(a=>{for(const o of a)if(o.isIntersecting){r.disconnect(),t();break}},e);return n(a=>{if(a instanceof Element){if(nC(a))return t(),r.disconnect(),!1;r.observe(a)}}),()=>r.disconnect()},aC=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},oC=(e=[])=>(t,n)=>{Gt(e)&&(e=[e]);let r=!1;const a=s=>{r||(r=!0,o(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},o=()=>{n(s=>{for(const i of e)s.removeEventListener(i,a)})};return n(s=>{for(const i of e)s.addEventListener(i,a,{once:!0})}),o};function sC(e,t){if(Lo(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Lo(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const Na=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function uo(e){lt(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:a=200,hydrate:o,timeout:s,suspensible:i=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,m()),m=()=>{let _;return c||(_=c=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),l)return new Promise((w,A)=>{l(g,()=>w(h()),()=>A(g),d+1)});throw g}).then(g=>_!==c&&c?c:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),u=g,g)))};return Ce({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(_,g,w){const A=o?()=>{const C=o(w,y=>sC(_,y));C&&(g.bum||(g.bum=[])).push(C)}:w;u?A():m().then(()=>!g.isUnmounted&&A())},get __asyncResolved(){return u},setup(){const _=hn;if(wd(_),u)return()=>Qc(u,_);const g=y=>{c=null,go(y,_,13,!r)};if(i&&_.suspense||Jo)return m().then(y=>()=>Qc(y,_)).catch(y=>(g(y),()=>r?Fe(r,{error:y}):null));const w=$e(!1),A=$e(),C=$e(!!a);return a&&setTimeout(()=>{C.value=!1},a),s!=null&&setTimeout(()=>{if(!w.value&&!A.value){const y=new Error(`Async component timed out after ${s}ms.`);g(y),A.value=y}},s),m().then(()=>{w.value=!0,_.parent&&ci(_.parent.vnode)&&_.parent.update()}).catch(y=>{g(y),A.value=y}),()=>{if(w.value&&u)return Qc(u,_);if(A.value&&r)return Fe(r,{error:A.value});if(n&&!C.value)return Fe(n)}}})}function Qc(e,t){const{ref:n,props:r,children:a,ce:o}=t.vnode,s=Fe(e,r,a);return s.ref=n,s.ce=o,delete t.vnode.ce,s}const ci=e=>e.type.__isKeepAlive,iC={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=pr(),r=n.ctx;if(!r.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const a=new Map,o=new Set;let s=null;const i=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=r,h=d("div");r.activate=(C,y,p,b,S)=>{const R=C.component;c(C,y,p,0,i),l(R.vnode,C,y,p,R,i,b,C.slotScopeIds,S),fn(()=>{R.isDeactivated=!1,R.a&&jo(R.a);const K=C.props&&C.props.onVnodeMounted;K&&Wn(K,R.parent,C)},i)},r.deactivate=C=>{const y=C.component;bl(y.m),bl(y.a),c(C,h,null,1,i),fn(()=>{y.da&&jo(y.da);const p=C.props&&C.props.onVnodeUnmounted;p&&Wn(p,y.parent,C),y.isDeactivated=!0},i)};function m(C){Zc(C),u(C,n,i,!0)}function _(C){a.forEach((y,p)=>{const b=Bu(y.type);b&&!C(b)&&g(p)})}function g(C){const y=a.get(C);y&&(!s||!$r(y,s))?m(y):s&&Zc(s),a.delete(C),o.delete(C)}We(()=>[e.include,e.exclude],([C,y])=>{C&&_(p=>xs(C,p)),y&&_(p=>!xs(y,p))},{flush:"post",deep:!0});let w=null;const A=()=>{w!=null&&(wl(n.subTree.type)?fn(()=>{a.set(w,ji(n.subTree))},n.subTree.suspense):a.set(w,ji(n.subTree)))};return ln(A),Ql(A),ha(()=>{a.forEach(C=>{const{subTree:y,suspense:p}=n,b=ji(y);if(C.type===b.type&&C.key===b.key){Zc(b);const S=b.component.da;S&&fn(S,p);return}m(C)})}),()=>{if(w=null,!t.default)return s=null;const C=t.default(),y=C[0];if(C.length>1)return s=null,C;if(!ua(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return s=null,y;let p=ji(y);if(p.type===on)return s=null,p;const b=p.type,S=Bu(Na(p)?p.type.__asyncResolved||{}:b),{include:R,exclude:K,max:G}=e;if(R&&(!S||!xs(R,S))||K&&S&&xs(K,S))return p.shapeFlag&=-257,s=p,y;const Z=p.key==null?b:p.key,Ie=a.get(Z);return p.el&&(p=Kr(p),y.shapeFlag&128&&(y.ssContent=p)),w=Z,Ie?(p.el=Ie.el,p.component=Ie.component,p.transition&&ca(p,p.transition),p.shapeFlag|=512,o.delete(Z),o.add(Z)):(o.add(Z),G&&o.size>parseInt(G,10)&&g(o.values().next().value)),p.shapeFlag|=256,s=p,wl(y.type)?y:p}}},lC=iC;function xs(e,t){return et(e)?e.some(n=>xs(n,t)):Gt(e)?e.split(",").includes(t):V1(e)?(e.lastIndex=0,e.test(t)):!1}function Jv(e,t){Xv(e,"a",t)}function Yv(e,t){Xv(e,"da",t)}function Xv(e,t,n=hn){const r=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Xl(t,r,n),n){let a=n.parent;for(;a&&a.parent;)ci(a.parent.vnode)&&cC(r,t,n,a),a=a.parent}}function cC(e,t,n,r){const a=Xl(t,e,r,!0);Or(()=>{ld(r[t],a)},n)}function Zc(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ji(e){return e.shapeFlag&128?e.ssContent:e}function Xl(e,t,n=hn,r=!1){if(n){const a=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{za();const i=po(n),l=fr(t,n,e,s);return i(),Ka(),l});return r?a.unshift(o):a.push(o),o}}const pa=e=>(t,n=hn)=>{(!Jo||e==="sp")&&Xl(e,(...r)=>t(...r),n)},as=pa("bm"),ln=pa("m"),Ad=pa("bu"),Ql=pa("u"),ha=pa("bum"),Or=pa("um"),Qv=pa("sp"),Zv=pa("rtg"),eg=pa("rtc");function tg(e,t=hn){Xl("ec",e,t)}const Cd="components",uC="directives";function dC(e,t){return $d(Cd,e,!0,t)||e}const ng=Symbol.for("v-ndc");function os(e){return Gt(e)?$d(Cd,e,!1)||e:e||ng}function rg(e){return $d(uC,e)}function $d(e,t,n=!0,r=!1){const a=mn||hn;if(a){const o=a.type;if(e===Cd){const i=Bu(o,!1);if(i&&(i===t||i===Tn(t)||i===li(Tn(t))))return o}const s=uh(a[e]||o[e],t)||uh(a.appContext[e],t);return!s&&r?o:s}}function uh(e,t){return e&&(e[t]||e[Tn(t)]||e[li(Tn(t))])}function Pt(e,t,n,r){let a;const o=n&&n[r],s=et(e);if(s||Gt(e)){const i=s&&Oa(e);let l=!1;i&&(l=!nr(e),e=zl(e)),a=new Array(e.length);for(let c=0,u=e.length;c<u;c++)a[c]=t(l?Nn(e[c]):e[c],c,void 0,o&&o[c])}else if(typeof e=="number"){a=new Array(e);for(let i=0;i<e;i++)a[i]=t(i+1,i,void 0,o&&o[i])}else if(jt(e))if(e[Symbol.iterator])a=Array.from(e,(i,l)=>t(i,l,void 0,o&&o[l]));else{const i=Object.keys(e);a=new Array(i.length);for(let l=0,c=i.length;l<c;l++){const u=i[l];a[l]=t(e[u],u,l,o&&o[l])}}else a=[];return n&&(n[r]=a),a}function fC(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(et(r))for(let a=0;a<r.length;a++)e[r[a].name]=r[a].fn;else r&&(e[r.name]=r.key?(...a)=>{const o=r.fn(...a);return o&&(o.key=r.key),o}:r.fn)}return e}function Ht(e,t,n={},r,a){if(mn.ce||mn.parent&&Na(mn.parent)&&mn.parent.ce)return t!=="default"&&(n.name=t),E(),De(Ye,null,[Fe("slot",n,r&&r())],64);let o=e[t];o&&o._c&&(o._d=!1),E();const s=o&&Sd(o(n)),i=n.key||s&&s.key,l=De(Ye,{key:(i&&!kr(i)?i:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&e._===1?64:-2);return!a&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Sd(e){return e.some(t=>ua(t)?!(t.type===on||t.type===Ye&&!Sd(t.children)):!0)?e:null}function pC(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Rs(r)]=e[r];return n}const Eu=e=>e?Rg(e)?di(e):Eu(e.parent):null,Fs=Ut(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Eu(e.parent),$root:e=>Eu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Id(e),$forceUpdate:e=>e.f||(e.f=()=>{yd(e.update)}),$nextTick:e=>e.n||(e.n=ar.bind(e.proxy)),$watch:e=>zC.bind(e)}),eu=(e,t)=>e!==It&&!e.__isScriptSetup&&Ot(e,t),ku={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:a,props:o,accessCache:s,type:i,appContext:l}=e;let c;if(t[0]!=="$"){const m=s[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else{if(eu(r,t))return s[t]=1,r[t];if(a!==It&&Ot(a,t))return s[t]=2,a[t];if((c=e.propsOptions[0])&&Ot(c,t))return s[t]=3,o[t];if(n!==It&&Ot(n,t))return s[t]=4,n[t];Tu&&(s[t]=0)}}const u=Fs[t];let d,h;if(u)return t==="$attrs"&&On(e.attrs,"get",""),u(e);if((d=i.__cssModules)&&(d=d[t]))return d;if(n!==It&&Ot(n,t))return s[t]=4,n[t];if(h=l.config.globalProperties,Ot(h,t))return h[t]},set({_:e},t,n){const{data:r,setupState:a,ctx:o}=e;return eu(a,t)?(a[t]=n,!0):r!==It&&Ot(r,t)?(r[t]=n,!0):Ot(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,propsOptions:o}},s){let i;return!!n[s]||e!==It&&Ot(e,s)||eu(t,s)||(i=o[0])&&Ot(i,s)||Ot(r,s)||Ot(Fs,s)||Ot(a.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ot(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},hC=Ut({},ku,{get(e,t){if(t!==Symbol.unscopables)return ku.get(e,t,e)},has(e,t){return t[0]!=="_"&&!W1(t)}});function mC(){return null}function vC(){return null}function gC(e){}function yC(e){}function _C(){return null}function bC(){}function wC(e,t){return null}function AC(){return ag().slots}function CC(){return ag().attrs}function ag(){const e=pr();return e.setupContext||(e.setupContext=Bg(e))}function ni(e){return et(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function $C(e,t){const n=ni(e);for(const r in t){if(r.startsWith("__skip"))continue;let a=n[r];a?et(a)||lt(a)?a=n[r]={type:a,default:t[r]}:a.default=t[r]:a===null&&(a=n[r]={default:t[r]}),a&&t[`__skip_${r}`]&&(a.skipFactory=!0)}return n}function zr(e,t){return!e||!t?e||t:et(e)&&et(t)?e.concat(t):Ut({},ni(e),ni(t))}function SC(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function IC(e){const t=pr();let n=e();return Ru(),cd(n)&&(n=n.catch(r=>{throw po(t),r})),[n,()=>po(t)]}let Tu=!0;function EC(e){const t=Id(e),n=e.proxy,r=e.ctx;Tu=!1,t.beforeCreate&&dh(t.beforeCreate,e,"bc");const{data:a,computed:o,methods:s,watch:i,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:m,updated:_,activated:g,deactivated:w,beforeDestroy:A,beforeUnmount:C,destroyed:y,unmounted:p,render:b,renderTracked:S,renderTriggered:R,errorCaptured:K,serverPrefetch:G,expose:Z,inheritAttrs:Ie,components:de,directives:Ae,filters:we}=t;if(c&&kC(c,r,null),s)for(const ye in s){const _e=s[ye];lt(_e)&&(r[ye]=_e.bind(n))}if(a){const ye=a.call(n,n);jt(ye)&&(e.data=Wl(ye))}if(Tu=!0,o)for(const ye in o){const _e=o[ye],He=lt(_e)?_e.bind(n,n):lt(_e.get)?_e.get.bind(n,n):ur,me=!lt(_e)&&lt(_e.set)?_e.set.bind(n):ur,V=j({get:He,set:me});Object.defineProperty(r,ye,{enumerable:!0,configurable:!0,get:()=>V.value,set:ue=>V.value=ue})}if(i)for(const ye in i)og(i[ye],r,n,ye);if(l){const ye=lt(l)?l.call(n):l;Reflect.ownKeys(ye).forEach(_e=>{ig(_e,ye[_e])})}u&&dh(u,e,"c");function xe(ye,_e){et(_e)?_e.forEach(He=>ye(He.bind(n))):_e&&ye(_e.bind(n))}if(xe(as,d),xe(ln,h),xe(Ad,m),xe(Ql,_),xe(Jv,g),xe(Yv,w),xe(tg,K),xe(eg,S),xe(Zv,R),xe(ha,C),xe(Or,p),xe(Qv,G),et(Z))if(Z.length){const ye=e.exposed||(e.exposed={});Z.forEach(_e=>{Object.defineProperty(ye,_e,{get:()=>n[_e],set:He=>n[_e]=He})})}else e.exposed||(e.exposed={});b&&e.render===ur&&(e.render=b),Ie!=null&&(e.inheritAttrs=Ie),de&&(e.components=de),Ae&&(e.directives=Ae),G&&wd(e)}function kC(e,t,n=ur){et(e)&&(e=xu(e));for(const r in e){const a=e[r];let o;jt(a)?"default"in a?o=te(a.from||r,a.default,!0):o=te(a.from||r):o=te(a),sn(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[r]=o}}function dh(e,t,n){fr(et(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function og(e,t,n,r){let a=r.includes(".")?Sg(n,r):()=>n[r];if(Gt(e)){const o=t[e];lt(o)&&We(a,o)}else if(lt(e))We(a,e.bind(n));else if(jt(e))if(et(e))e.forEach(o=>og(o,t,n,r));else{const o=lt(e.handler)?e.handler.bind(n):t[e.handler];lt(o)&&We(a,o,e)}}function Id(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:a,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,i=o.get(t);let l;return i?l=i:!a.length&&!n&&!r?l=t:(l={},a.length&&a.forEach(c=>_l(l,c,s,!0)),_l(l,t,s)),jt(t)&&o.set(t,l),l}function _l(e,t,n,r=!1){const{mixins:a,extends:o}=t;o&&_l(e,o,n,!0),a&&a.forEach(s=>_l(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const i=TC[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const TC={data:fh,props:ph,emits:ph,methods:Ps,computed:Ps,beforeCreate:Fn,created:Fn,beforeMount:Fn,mounted:Fn,beforeUpdate:Fn,updated:Fn,beforeDestroy:Fn,beforeUnmount:Fn,destroyed:Fn,unmounted:Fn,activated:Fn,deactivated:Fn,errorCaptured:Fn,serverPrefetch:Fn,components:Ps,directives:Ps,watch:PC,provide:fh,inject:xC};function fh(e,t){return t?e?function(){return Ut(lt(e)?e.call(this,this):e,lt(t)?t.call(this,this):t)}:t:e}function xC(e,t){return Ps(xu(e),xu(t))}function xu(e){if(et(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fn(e,t){return e?[...new Set([].concat(e,t))]:t}function Ps(e,t){return e?Ut(Object.create(null),e,t):t}function ph(e,t){return e?et(e)&&et(t)?[...new Set([...e,...t])]:Ut(Object.create(null),ni(e),ni(t??{})):t}function PC(e,t){if(!e)return t;if(!t)return e;const n=Ut(Object.create(null),e);for(const r in t)n[r]=Fn(e[r],t[r]);return n}function sg(){return{app:null,config:{isNativeTag:F1,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let MC=0;function OC(e,t){return function(r,a=null){lt(r)||(r=Ut({},r)),a!=null&&!jt(a)&&(a=null);const o=sg(),s=new WeakSet,i=[];let l=!1;const c=o.app={_uid:MC++,_component:r,_props:a,_container:null,_context:o,_instance:null,version:jg,get config(){return o.config},set config(u){},use(u,...d){return s.has(u)||(u&&lt(u.install)?(s.add(u),u.install(c,...d)):lt(u)&&(s.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!l){const m=c._ceVNode||Fe(r,a);return m.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),d&&t?t(m,u):e(m,u,h),l=!0,c._container=u,u.__vue_app__=c,di(m.component)}},onUnmount(u){i.push(u)},unmount(){l&&(fr(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=lo;lo=c;try{return u()}finally{lo=d}}};return c}}let lo=null;function ig(e,t){if(hn){let n=hn.provides;const r=hn.parent&&hn.parent.provides;r===n&&(n=hn.provides=Object.create(r)),n[e]=t}}function te(e,t,n=!1){const r=hn||mn;if(r||lo){const a=lo?lo._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&lt(t)?t.call(r&&r.proxy):t}}function NC(){return!!(hn||mn||lo)}const lg={},cg=()=>Object.create(lg),ug=e=>Object.getPrototypeOf(e)===lg;function RC(e,t,n,r=!1){const a={},o=cg();e.propsDefaults=Object.create(null),dg(e,t,a,o);for(const s in e.propsOptions[0])s in a||(a[s]=void 0);n?e.props=r?a:Tv(a):e.type.props?e.props=a:e.props=o,e.attrs=o}function LC(e,t,n,r){const{props:a,attrs:o,vnode:{patchFlag:s}}=e,i=gt(a),[l]=e.propsOptions;let c=!1;if((r||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Zl(e.emitsOptions,h))continue;const m=t[h];if(l)if(Ot(o,h))m!==o[h]&&(o[h]=m,c=!0);else{const _=Tn(h);a[_]=Pu(l,i,_,m,e,!1)}else m!==o[h]&&(o[h]=m,c=!0)}}}else{dg(e,t,a,o)&&(c=!0);let u;for(const d in i)(!t||!Ot(t,d)&&((u=Jn(d))===d||!Ot(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(a[d]=Pu(l,i,d,void 0,e,!0)):delete a[d]);if(o!==i)for(const d in o)(!t||!Ot(t,d))&&(delete o[d],c=!0)}c&&ra(e.attrs,"set","")}function dg(e,t,n,r){const[a,o]=e.propsOptions;let s=!1,i;if(t)for(let l in t){if(Fo(l))continue;const c=t[l];let u;a&&Ot(a,u=Tn(l))?!o||!o.includes(u)?n[u]=c:(i||(i={}))[u]=c:Zl(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,s=!0)}if(o){const l=gt(n),c=i||It;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Pu(a,l,d,c[d],e,!Ot(c,d))}}return s}function Pu(e,t,n,r,a,o){const s=e[n];if(s!=null){const i=Ot(s,"default");if(i&&r===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&lt(l)){const{propsDefaults:c}=a;if(n in c)r=c[n];else{const u=po(a);r=c[n]=l.call(null,t),u()}}else r=l;a.ce&&a.ce._setProp(n,r)}s[0]&&(o&&!i?r=!1:s[1]&&(r===""||r===Jn(n))&&(r=!0))}return r}const DC=new WeakMap;function fg(e,t,n=!1){const r=n?DC:t.propsCache,a=r.get(e);if(a)return a;const o=e.props,s={},i=[];let l=!1;if(!lt(e)){const u=d=>{l=!0;const[h,m]=fg(d,t,!0);Ut(s,h),m&&i.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return jt(e)&&r.set(e,Do),Do;if(et(o))for(let u=0;u<o.length;u++){const d=Tn(o[u]);hh(d)&&(s[d]=It)}else if(o)for(const u in o){const d=Tn(u);if(hh(d)){const h=o[u],m=s[d]=et(h)||lt(h)?{type:h}:Ut({},h),_=m.type;let g=!1,w=!0;if(et(_))for(let A=0;A<_.length;++A){const C=_[A],y=lt(C)&&C.name;if(y==="Boolean"){g=!0;break}else y==="String"&&(w=!1)}else g=lt(_)&&_.name==="Boolean";m[0]=g,m[1]=w,(g||Ot(m,"default"))&&i.push(d)}}const c=[s,i];return jt(e)&&r.set(e,c),c}function hh(e){return e[0]!=="$"&&!Fo(e)}const pg=e=>e[0]==="_"||e==="$stable",Ed=e=>et(e)?e.map(Gn):[Gn(e)],BC=(e,t,n)=>{if(t._n)return t;const r=Ze((...a)=>Ed(t(...a)),n);return r._c=!1,r},hg=(e,t,n)=>{const r=e._ctx;for(const a in e){if(pg(a))continue;const o=e[a];if(lt(o))t[a]=BC(a,o,r);else if(o!=null){const s=Ed(o);t[a]=()=>s}}},mg=(e,t)=>{const n=Ed(t);e.slots.default=()=>n},vg=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},FC=(e,t,n)=>{const r=e.slots=cg();if(e.vnode.shapeFlag&32){const a=t._;a?(vg(r,t,n),n&&cv(r,"_",a,!0)):hg(t,r)}else t&&mg(e,t)},jC=(e,t,n)=>{const{vnode:r,slots:a}=e;let o=!0,s=It;if(r.shapeFlag&32){const i=t._;i?n&&i===1?o=!1:vg(a,t,n):(o=!t.$stable,hg(t,a)),s=t}else t&&(mg(e,t),s={default:1});if(o)for(const i in a)!pg(i)&&s[i]==null&&delete a[i]},fn=Tg;function gg(e){return _g(e)}function yg(e){return _g(e,XA)}function _g(e,t){const n=Vl();n.__VUE__=!0;const{insert:r,remove:a,patchProp:o,createElement:s,createText:i,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:m=ur,insertStaticContent:_}=e,g=(k,x,q,pe=null,B=null,z=null,ae=void 0,F=null,U=!!x.dynamicChildren)=>{if(k===x)return;k&&!$r(k,x)&&(pe=Be(k),ue(k,B,z,!0),k=null),x.patchFlag===-2&&(U=!1,x.dynamicChildren=null);const{type:Y,ref:fe,shapeFlag:ve}=x;switch(Y){case Ra:w(k,x,q,pe);break;case on:A(k,x,q,pe);break;case co:k==null&&C(x,q,pe,ae);break;case Ye:de(k,x,q,pe,B,z,ae,F,U);break;default:ve&1?b(k,x,q,pe,B,z,ae,F,U):ve&6?Ae(k,x,q,pe,B,z,ae,F,U):(ve&64||ve&128)&&Y.process(k,x,q,pe,B,z,ae,F,U,Q)}fe!=null&&B&&ti(fe,k&&k.ref,z,x||k,!x)},w=(k,x,q,pe)=>{if(k==null)r(x.el=i(x.children),q,pe);else{const B=x.el=k.el;x.children!==k.children&&c(B,x.children)}},A=(k,x,q,pe)=>{k==null?r(x.el=l(x.children||""),q,pe):x.el=k.el},C=(k,x,q,pe)=>{[k.el,k.anchor]=_(k.children,x,q,pe,k.el,k.anchor)},y=({el:k,anchor:x},q,pe)=>{let B;for(;k&&k!==x;)B=h(k),r(k,q,pe),k=B;r(x,q,pe)},p=({el:k,anchor:x})=>{let q;for(;k&&k!==x;)q=h(k),a(k),k=q;a(x)},b=(k,x,q,pe,B,z,ae,F,U)=>{x.type==="svg"?ae="svg":x.type==="math"&&(ae="mathml"),k==null?S(x,q,pe,B,z,ae,F,U):G(k,x,B,z,ae,F,U)},S=(k,x,q,pe,B,z,ae,F)=>{let U,Y;const{props:fe,shapeFlag:ve,transition:Pe,dirs:Le}=k;if(U=k.el=s(k.type,z,fe&&fe.is,fe),ve&8?u(U,k.children):ve&16&&K(k.children,U,null,pe,B,tu(k,z),ae,F),Le&&Dr(k,null,pe,"created"),R(U,k,k.scopeId,ae,pe),fe){for(const pt in fe)pt!=="value"&&!Fo(pt)&&o(U,pt,null,fe[pt],z,pe);"value"in fe&&o(U,"value",null,fe.value,z),(Y=fe.onVnodeBeforeMount)&&Wn(Y,pe,k)}Le&&Dr(k,null,pe,"beforeMount");const rt=bg(B,Pe);rt&&Pe.beforeEnter(U),r(U,x,q),((Y=fe&&fe.onVnodeMounted)||rt||Le)&&fn(()=>{Y&&Wn(Y,pe,k),rt&&Pe.enter(U),Le&&Dr(k,null,pe,"mounted")},B)},R=(k,x,q,pe,B)=>{if(q&&m(k,q),pe)for(let z=0;z<pe.length;z++)m(k,pe[z]);if(B){let z=B.subTree;if(x===z||wl(z.type)&&(z.ssContent===x||z.ssFallback===x)){const ae=B.vnode;R(k,ae,ae.scopeId,ae.slotScopeIds,B.parent)}}},K=(k,x,q,pe,B,z,ae,F,U=0)=>{for(let Y=U;Y<k.length;Y++){const fe=k[Y]=F?Pa(k[Y]):Gn(k[Y]);g(null,fe,x,q,pe,B,z,ae,F)}},G=(k,x,q,pe,B,z,ae)=>{const F=x.el=k.el;let{patchFlag:U,dynamicChildren:Y,dirs:fe}=x;U|=k.patchFlag&16;const ve=k.props||It,Pe=x.props||It;let Le;if(q&&Qa(q,!1),(Le=Pe.onVnodeBeforeUpdate)&&Wn(Le,q,x,k),fe&&Dr(x,k,q,"beforeUpdate"),q&&Qa(q,!0),(ve.innerHTML&&Pe.innerHTML==null||ve.textContent&&Pe.textContent==null)&&u(F,""),Y?Z(k.dynamicChildren,Y,F,q,pe,tu(x,B),z):ae||_e(k,x,F,null,q,pe,tu(x,B),z,!1),U>0){if(U&16)Ie(F,ve,Pe,q,B);else if(U&2&&ve.class!==Pe.class&&o(F,"class",null,Pe.class,B),U&4&&o(F,"style",ve.style,Pe.style,B),U&8){const rt=x.dynamicProps;for(let pt=0;pt<rt.length;pt++){const dt=rt[pt],zt=ve[dt],Nt=Pe[dt];(Nt!==zt||dt==="value")&&o(F,dt,zt,Nt,B,q)}}U&1&&k.children!==x.children&&u(F,x.children)}else!ae&&Y==null&&Ie(F,ve,Pe,q,B);((Le=Pe.onVnodeUpdated)||fe)&&fn(()=>{Le&&Wn(Le,q,x,k),fe&&Dr(x,k,q,"updated")},pe)},Z=(k,x,q,pe,B,z,ae)=>{for(let F=0;F<x.length;F++){const U=k[F],Y=x[F],fe=U.el&&(U.type===Ye||!$r(U,Y)||U.shapeFlag&70)?d(U.el):q;g(U,Y,fe,null,pe,B,z,ae,!0)}},Ie=(k,x,q,pe,B)=>{if(x!==q){if(x!==It)for(const z in x)!Fo(z)&&!(z in q)&&o(k,z,x[z],null,B,pe);for(const z in q){if(Fo(z))continue;const ae=q[z],F=x[z];ae!==F&&z!=="value"&&o(k,z,F,ae,B,pe)}"value"in q&&o(k,"value",x.value,q.value,B)}},de=(k,x,q,pe,B,z,ae,F,U)=>{const Y=x.el=k?k.el:i(""),fe=x.anchor=k?k.anchor:i("");let{patchFlag:ve,dynamicChildren:Pe,slotScopeIds:Le}=x;Le&&(F=F?F.concat(Le):Le),k==null?(r(Y,q,pe),r(fe,q,pe),K(x.children||[],q,fe,B,z,ae,F,U)):ve>0&&ve&64&&Pe&&k.dynamicChildren?(Z(k.dynamicChildren,Pe,q,B,z,ae,F),(x.key!=null||B&&x===B.subTree)&&kd(k,x,!0)):_e(k,x,q,fe,B,z,ae,F,U)},Ae=(k,x,q,pe,B,z,ae,F,U)=>{x.slotScopeIds=F,k==null?x.shapeFlag&512?B.ctx.activate(x,q,pe,ae,U):we(x,q,pe,B,z,ae,U):Ge(k,x,U)},we=(k,x,q,pe,B,z,ae)=>{const F=k.component=Ng(k,pe,B);if(ci(k)&&(F.ctx.renderer=Q),Lg(F,!1,ae),F.asyncDep){if(B&&B.registerDep(F,xe,ae),!k.el){const U=F.subTree=Fe(on);A(null,U,x,q)}}else xe(F,k,x,q,B,z,ae)},Ge=(k,x,q)=>{const pe=x.component=k.component;if(JC(k,x,q))if(pe.asyncDep&&!pe.asyncResolved){ye(pe,x,q);return}else pe.next=x,pe.update();else x.el=k.el,pe.vnode=x},xe=(k,x,q,pe,B,z,ae)=>{const F=()=>{if(k.isMounted){let{next:ve,bu:Pe,u:Le,parent:rt,vnode:pt}=k;{const Zt=wg(k);if(Zt){ve&&(ve.el=pt.el,ye(k,ve,ae)),Zt.asyncDep.then(()=>{k.isUnmounted||F()});return}}let dt=ve,zt;Qa(k,!1),ve?(ve.el=pt.el,ye(k,ve,ae)):ve=pt,Pe&&jo(Pe),(zt=ve.props&&ve.props.onVnodeBeforeUpdate)&&Wn(zt,rt,ve,pt),Qa(k,!0);const Nt=rl(k),nn=k.subTree;k.subTree=Nt,g(nn,Nt,d(nn.el),Be(nn),k,B,z),ve.el=Nt.el,dt===null&&ec(k,Nt.el),Le&&fn(Le,B),(zt=ve.props&&ve.props.onVnodeUpdated)&&fn(()=>Wn(zt,rt,ve,pt),B)}else{let ve;const{el:Pe,props:Le}=x,{bm:rt,m:pt,parent:dt,root:zt,type:Nt}=k,nn=Na(x);if(Qa(k,!1),rt&&jo(rt),!nn&&(ve=Le&&Le.onVnodeBeforeMount)&&Wn(ve,dt,x),Qa(k,!0),Pe&&le){const Zt=()=>{k.subTree=rl(k),le(Pe,k.subTree,k,B,null)};nn&&Nt.__asyncHydrate?Nt.__asyncHydrate(Pe,k,Zt):Zt()}else{zt.ce&&zt.ce._injectChildStyle(Nt);const Zt=k.subTree=rl(k);g(null,Zt,q,pe,k,B,z),x.el=Zt.el}if(pt&&fn(pt,B),!nn&&(ve=Le&&Le.onVnodeMounted)){const Zt=x;fn(()=>Wn(ve,dt,Zt),B)}(x.shapeFlag&256||dt&&Na(dt.vnode)&&dt.vnode.shapeFlag&256)&&k.a&&fn(k.a,B),k.isMounted=!0,x=q=pe=null}};k.scope.on();const U=k.effect=new Js(F);k.scope.off();const Y=k.update=U.run.bind(U),fe=k.job=U.runIfDirty.bind(U);fe.i=k,fe.id=k.uid,U.scheduler=()=>yd(fe),Qa(k,!0),Y()},ye=(k,x,q)=>{x.component=k;const pe=k.vnode.props;k.vnode=x,k.next=null,LC(k,x.props,pe,q),jC(k,x.children,q),za(),rh(k),Ka()},_e=(k,x,q,pe,B,z,ae,F,U=!1)=>{const Y=k&&k.children,fe=k?k.shapeFlag:0,ve=x.children,{patchFlag:Pe,shapeFlag:Le}=x;if(Pe>0){if(Pe&128){me(Y,ve,q,pe,B,z,ae,F,U);return}else if(Pe&256){He(Y,ve,q,pe,B,z,ae,F,U);return}}Le&8?(fe&16&&ie(Y,B,z),ve!==Y&&u(q,ve)):fe&16?Le&16?me(Y,ve,q,pe,B,z,ae,F,U):ie(Y,B,z,!0):(fe&8&&u(q,""),Le&16&&K(ve,q,pe,B,z,ae,F,U))},He=(k,x,q,pe,B,z,ae,F,U)=>{k=k||Do,x=x||Do;const Y=k.length,fe=x.length,ve=Math.min(Y,fe);let Pe;for(Pe=0;Pe<ve;Pe++){const Le=x[Pe]=U?Pa(x[Pe]):Gn(x[Pe]);g(k[Pe],Le,q,null,B,z,ae,F,U)}Y>fe?ie(k,B,z,!0,!1,ve):K(x,q,pe,B,z,ae,F,U,ve)},me=(k,x,q,pe,B,z,ae,F,U)=>{let Y=0;const fe=x.length;let ve=k.length-1,Pe=fe-1;for(;Y<=ve&&Y<=Pe;){const Le=k[Y],rt=x[Y]=U?Pa(x[Y]):Gn(x[Y]);if($r(Le,rt))g(Le,rt,q,null,B,z,ae,F,U);else break;Y++}for(;Y<=ve&&Y<=Pe;){const Le=k[ve],rt=x[Pe]=U?Pa(x[Pe]):Gn(x[Pe]);if($r(Le,rt))g(Le,rt,q,null,B,z,ae,F,U);else break;ve--,Pe--}if(Y>ve){if(Y<=Pe){const Le=Pe+1,rt=Le<fe?x[Le].el:pe;for(;Y<=Pe;)g(null,x[Y]=U?Pa(x[Y]):Gn(x[Y]),q,rt,B,z,ae,F,U),Y++}}else if(Y>Pe)for(;Y<=ve;)ue(k[Y],B,z,!0),Y++;else{const Le=Y,rt=Y,pt=new Map;for(Y=rt;Y<=Pe;Y++){const be=x[Y]=U?Pa(x[Y]):Gn(x[Y]);be.key!=null&&pt.set(be.key,Y)}let dt,zt=0;const Nt=Pe-rt+1;let nn=!1,Zt=0;const ce=new Array(Nt);for(Y=0;Y<Nt;Y++)ce[Y]=0;for(Y=Le;Y<=ve;Y++){const be=k[Y];if(zt>=Nt){ue(be,B,z,!0);continue}let Ee;if(be.key!=null)Ee=pt.get(be.key);else for(dt=rt;dt<=Pe;dt++)if(ce[dt-rt]===0&&$r(be,x[dt])){Ee=dt;break}Ee===void 0?ue(be,B,z,!0):(ce[Ee-rt]=Y+1,Ee>=Zt?Zt=Ee:nn=!0,g(be,x[Ee],q,null,B,z,ae,F,U),zt++)}const Me=nn?VC(ce):Do;for(dt=Me.length-1,Y=Nt-1;Y>=0;Y--){const be=rt+Y,Ee=x[be],Ve=be+1<fe?x[be+1].el:pe;ce[Y]===0?g(null,Ee,q,Ve,B,z,ae,F,U):nn&&(dt<0||Y!==Me[dt]?V(Ee,q,Ve,2):dt--)}}},V=(k,x,q,pe,B=null)=>{const{el:z,type:ae,transition:F,children:U,shapeFlag:Y}=k;if(Y&6){V(k.component.subTree,x,q,pe);return}if(Y&128){k.suspense.move(x,q,pe);return}if(Y&64){ae.move(k,x,q,Q);return}if(ae===Ye){r(z,x,q);for(let ve=0;ve<U.length;ve++)V(U[ve],x,q,pe);r(k.anchor,x,q);return}if(ae===co){y(k,x,q);return}if(pe!==2&&Y&1&&F)if(pe===0)F.beforeEnter(z),r(z,x,q),fn(()=>F.enter(z),B);else{const{leave:ve,delayLeave:Pe,afterLeave:Le}=F,rt=()=>r(z,x,q),pt=()=>{ve(z,()=>{rt(),Le&&Le()})};Pe?Pe(z,rt,pt):pt()}else r(z,x,q)},ue=(k,x,q,pe=!1,B=!1)=>{const{type:z,props:ae,ref:F,children:U,dynamicChildren:Y,shapeFlag:fe,patchFlag:ve,dirs:Pe,cacheIndex:Le}=k;if(ve===-2&&(B=!1),F!=null&&ti(F,null,q,k,!0),Le!=null&&(x.renderCache[Le]=void 0),fe&256){x.ctx.deactivate(k);return}const rt=fe&1&&Pe,pt=!Na(k);let dt;if(pt&&(dt=ae&&ae.onVnodeBeforeUnmount)&&Wn(dt,x,k),fe&6)O(k.component,q,pe);else{if(fe&128){k.suspense.unmount(q,pe);return}rt&&Dr(k,null,x,"beforeUnmount"),fe&64?k.type.remove(k,x,q,Q,pe):Y&&!Y.hasOnce&&(z!==Ye||ve>0&&ve&64)?ie(Y,x,q,!1,!0):(z===Ye&&ve&384||!B&&fe&16)&&ie(U,x,q),pe&&J(k)}(pt&&(dt=ae&&ae.onVnodeUnmounted)||rt)&&fn(()=>{dt&&Wn(dt,x,k),rt&&Dr(k,null,x,"unmounted")},q)},J=k=>{const{type:x,el:q,anchor:pe,transition:B}=k;if(x===Ye){I(q,pe);return}if(x===co){p(k);return}const z=()=>{a(q),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(k.shapeFlag&1&&B&&!B.persisted){const{leave:ae,delayLeave:F}=B,U=()=>ae(q,z);F?F(k.el,z,U):U()}else z()},I=(k,x)=>{let q;for(;k!==x;)q=h(k),a(k),k=q;a(x)},O=(k,x,q)=>{const{bum:pe,scope:B,job:z,subTree:ae,um:F,m:U,a:Y}=k;bl(U),bl(Y),pe&&jo(pe),B.stop(),z&&(z.flags|=8,ue(ae,k,x,q)),F&&fn(F,x),fn(()=>{k.isUnmounted=!0},x),x&&x.pendingBranch&&!x.isUnmounted&&k.asyncDep&&!k.asyncResolved&&k.suspenseId===x.pendingId&&(x.deps--,x.deps===0&&x.resolve())},ie=(k,x,q,pe=!1,B=!1,z=0)=>{for(let ae=z;ae<k.length;ae++)ue(k[ae],x,q,pe,B)},Be=k=>{if(k.shapeFlag&6)return Be(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const x=h(k.anchor||k.el),q=x&&x[jv];return q?h(q):x};let je=!1;const ne=(k,x,q)=>{k==null?x._vnode&&ue(x._vnode,null,null,!0):g(x._vnode||null,k,x,null,null,null,q),x._vnode=k,je||(je=!0,rh(),yl(),je=!1)},Q={p:g,um:ue,m:V,r:J,mt:we,mc:K,pc:_e,pbc:Z,n:Be,o:e};let se,le;return t&&([se,le]=t(Q)),{render:ne,hydrate:se,createApp:OC(ne,se)}}function tu({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Qa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function bg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function kd(e,t,n=!1){const r=e.children,a=t.children;if(et(r)&&et(a))for(let o=0;o<r.length;o++){const s=r[o];let i=a[o];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=a[o]=Pa(a[o]),i.el=s.el),!n&&i.patchFlag!==-2&&kd(s,i)),i.type===Ra&&(i.el=s.el)}}function VC(e){const t=e.slice(),n=[0];let r,a,o,s,i;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(a=n[n.length-1],e[a]<c){t[r]=a,n.push(r);continue}for(o=0,s=n.length-1;o<s;)i=o+s>>1,e[n[i]]<c?o=i+1:s=i;c<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}function wg(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wg(t)}function bl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Ag=Symbol.for("v-scx"),Cg=()=>te(Ag);function UC(e,t){return ui(e,null,t)}function HC(e,t){return ui(e,null,{flush:"post"})}function $g(e,t){return ui(e,null,{flush:"sync"})}function We(e,t,n){return ui(e,t,n)}function ui(e,t,n=It){const{immediate:r,deep:a,flush:o,once:s}=n,i=Ut({},n),l=t&&r||!t&&o!=="post";let c;if(Jo){if(o==="sync"){const m=Cg();c=m.__watcherHandles||(m.__watcherHandles=[])}else if(!l){const m=()=>{};return m.stop=ur,m.resume=ur,m.pause=ur,m}}const u=hn;i.call=(m,_,g)=>fr(m,u,_,g);let d=!1;o==="post"?i.scheduler=m=>{fn(m,u&&u.suspense)}:o!=="sync"&&(d=!0,i.scheduler=(m,_)=>{_?m():yd(m)}),i.augmentJob=m=>{t&&(m.flags|=4),d&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const h=RA(e,t,i);return Jo&&(c?c.push(h):l&&h()),h}function zC(e,t,n){const r=this.proxy,a=Gt(e)?e.includes(".")?Sg(r,e):()=>r[e]:e.bind(r,r);let o;lt(t)?o=t:(o=t.handler,n=t);const s=po(this),i=ui(a,o.bind(r),n);return s(),i}function Sg(e,t){const n=t.split(".");return()=>{let r=e;for(let a=0;a<n.length&&r;a++)r=r[n[a]];return r}}function qr(e,t,n=It){const r=pr(),a=Tn(t),o=Jn(t),s=Ig(e,a),i=Mv((l,c)=>{let u,d=It,h;return $g(()=>{const m=e[a];Un(u,m)&&(u=m,c())}),{get(){return l(),n.get?n.get(u):u},set(m){const _=n.set?n.set(m):m;if(!Un(_,u)&&!(d!==It&&Un(m,d)))return;const g=r.vnode.props;g&&(t in g||a in g||o in g)&&(`onUpdate:${t}`in g||`onUpdate:${a}`in g||`onUpdate:${o}`in g)||(u=m,c()),r.emit(`update:${t}`,_),Un(m,_)&&Un(m,d)&&!Un(_,h)&&c(),d=m,h=_}}});return i[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||It:i,done:!1}:{done:!0}}}},i}const Ig=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Tn(t)}Modifiers`]||e[`${Jn(t)}Modifiers`];function KC(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||It;let a=n;const o=t.startsWith("update:"),s=o&&Ig(r,t.slice(7));s&&(s.trim&&(a=n.map(u=>Gt(u)?u.trim():u)),s.number&&(a=n.map(pl)));let i,l=r[i=Rs(t)]||r[i=Rs(Tn(t))];!l&&o&&(l=r[i=Rs(Jn(t))]),l&&fr(l,e,6,a);const c=r[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,fr(c,e,6,a)}}function Eg(e,t,n=!1){const r=t.emitsCache,a=r.get(e);if(a!==void 0)return a;const o=e.emits;let s={},i=!1;if(!lt(e)){const l=c=>{const u=Eg(c,t,!0);u&&(i=!0,Ut(s,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!i?(jt(e)&&r.set(e,null),null):(et(o)?o.forEach(l=>s[l]=null):Ut(s,o),jt(e)&&r.set(e,s),s)}function Zl(e,t){return!e||!ii(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ot(e,t[0].toLowerCase()+t.slice(1))||Ot(e,Jn(t))||Ot(e,t))}function rl(e){const{type:t,vnode:n,proxy:r,withProxy:a,propsOptions:[o],slots:s,attrs:i,emit:l,render:c,renderCache:u,props:d,data:h,setupState:m,ctx:_,inheritAttrs:g}=e,w=ei(e);let A,C;try{if(n.shapeFlag&4){const p=a||r,b=p;A=Gn(c.call(b,p,u,d,m,h,_)),C=i}else{const p=t;A=Gn(p.length>1?p(d,{attrs:i,slots:s,emit:l}):p(d,null)),C=t.props?i:qC(i)}}catch(p){js.length=0,go(p,e,1),A=Fe(on)}let y=A;if(C&&g!==!1){const p=Object.keys(C),{shapeFlag:b}=y;p.length&&b&7&&(o&&p.some(id)&&(C=GC(C,o)),y=Kr(y,C,!1,!0))}return n.dirs&&(y=Kr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&ca(y,n.transition),A=y,ei(w),A}function WC(e,t=!0){let n;for(let r=0;r<e.length;r++){const a=e[r];if(ua(a)){if(a.type!==on||a.children==="v-if"){if(n)return;n=a}}else return}return n}const qC=e=>{let t;for(const n in e)(n==="class"||n==="style"||ii(n))&&((t||(t={}))[n]=e[n]);return t},GC=(e,t)=>{const n={};for(const r in e)(!id(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function JC(e,t,n){const{props:r,children:a,component:o}=e,{props:s,children:i,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?mh(r,s,c):!!s;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(s[h]!==r[h]&&!Zl(c,h))return!0}}}else return(a||i)&&(!i||!i.$stable)?!0:r===s?!1:r?s?mh(r,s,c):!0:!!s;return!1}function mh(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let a=0;a<r.length;a++){const o=r[a];if(t[o]!==e[o]&&!Zl(n,o))return!0}return!1}function ec({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const wl=e=>e.__isSuspense;let Mu=0;const YC={name:"Suspense",__isSuspense:!0,process(e,t,n,r,a,o,s,i,l,c){if(e==null)QC(t,n,r,a,o,s,i,l,c);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}ZC(e,t,n,r,a,s,i,l,c)}},hydrate:e$,normalize:t$},XC=YC;function ri(e,t){const n=e.props&&e.props[t];lt(n)&&n()}function QC(e,t,n,r,a,o,s,i,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=e.suspense=kg(e,a,r,t,d,n,o,s,i,l);c(null,h.pendingBranch=e.ssContent,d,null,r,h,o,s),h.deps>0?(ri(e,"onPending"),ri(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,o,s),Uo(h,e.ssFallback)):h.resolve(!1,!0)}function ZC(e,t,n,r,a,o,s,i,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const h=t.ssContent,m=t.ssFallback,{activeBranch:_,pendingBranch:g,isInFallback:w,isHydrating:A}=d;if(g)d.pendingBranch=h,$r(h,g)?(l(g,h,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0?d.resolve():w&&(A||(l(_,m,n,r,a,null,o,s,i),Uo(d,m)))):(d.pendingId=Mu++,A?(d.isHydrating=!1,d.activeBranch=g):c(g,a,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),w?(l(null,h,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0?d.resolve():(l(_,m,n,r,a,null,o,s,i),Uo(d,m))):_&&$r(h,_)?(l(_,h,n,r,a,d,o,s,i),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0&&d.resolve()));else if(_&&$r(h,_))l(_,h,n,r,a,d,o,s,i),Uo(d,h);else if(ri(t,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=Mu++,l(null,h,d.hiddenContainer,null,a,d,o,s,i),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:y}=d;C>0?setTimeout(()=>{d.pendingId===y&&d.fallback(m)},C):C===0&&d.fallback(m)}}function kg(e,t,n,r,a,o,s,i,l,c,u=!1){const{p:d,m:h,um:m,n:_,o:{parentNode:g,remove:w}}=c;let A;const C=n$(e);C&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const y=e.props?hl(e.props.timeout):void 0,p=o,b={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:a,deps:0,pendingId:Mu++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,R=!1){const{vnode:K,activeBranch:G,pendingBranch:Z,pendingId:Ie,effects:de,parentComponent:Ae,container:we}=b;let Ge=!1;b.isHydrating?b.isHydrating=!1:S||(Ge=G&&Z.transition&&Z.transition.mode==="out-in",Ge&&(G.transition.afterLeave=()=>{Ie===b.pendingId&&(h(Z,we,o===p?_(G):o,0),Qs(de))}),G&&(g(G.el)===we&&(o=_(G)),m(G,Ae,b,!0)),Ge||h(Z,we,o,0)),Uo(b,Z),b.pendingBranch=null,b.isInFallback=!1;let xe=b.parent,ye=!1;for(;xe;){if(xe.pendingBranch){xe.effects.push(...de),ye=!0;break}xe=xe.parent}!ye&&!Ge&&Qs(de),b.effects=[],C&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!R&&t.resolve()),ri(K,"onResolve")},fallback(S){if(!b.pendingBranch)return;const{vnode:R,activeBranch:K,parentComponent:G,container:Z,namespace:Ie}=b;ri(R,"onFallback");const de=_(K),Ae=()=>{b.isInFallback&&(d(null,S,Z,de,G,null,Ie,i,l),Uo(b,S))},we=S.transition&&S.transition.mode==="out-in";we&&(K.transition.afterLeave=Ae),b.isInFallback=!0,m(K,G,null,!0),we||Ae()},move(S,R,K){b.activeBranch&&h(b.activeBranch,S,R,K),b.container=S},next(){return b.activeBranch&&_(b.activeBranch)},registerDep(S,R,K){const G=!!b.pendingBranch;G&&b.deps++;const Z=S.vnode.el;S.asyncDep.catch(Ie=>{go(Ie,S,0)}).then(Ie=>{if(S.isUnmounted||b.isUnmounted||b.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:de}=S;Lu(S,Ie,!1),Z&&(de.el=Z);const Ae=!Z&&S.subTree.el;R(S,de,g(Z||S.subTree.el),Z?null:_(S.subTree),b,s,K),Ae&&w(Ae),ec(S,de.el),G&&--b.deps===0&&b.resolve()})},unmount(S,R){b.isUnmounted=!0,b.activeBranch&&m(b.activeBranch,n,S,R),b.pendingBranch&&m(b.pendingBranch,n,S,R)}};return b}function e$(e,t,n,r,a,o,s,i,l){const c=t.suspense=kg(t,r,n,e.parentNode,document.createElement("div"),null,a,o,s,i,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,o,s);return c.deps===0&&c.resolve(!1,!0),u}function t$(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=vh(r?n.default:n),e.ssFallback=r?vh(n.fallback):Fe(on)}function vh(e){let t;if(lt(e)){const n=fo&&e._c;n&&(e._d=!1,E()),e=e(),n&&(e._d=!0,t=Ln,xg())}return et(e)&&(e=WC(e)),e=Gn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Tg(e,t){t&&t.pendingBranch?et(e)?t.effects.push(...e):t.effects.push(e):Qs(e)}function Uo(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;n.el=a,r&&r.subTree===n&&(r.vnode.el=a,ec(r,a))}function n$(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ye=Symbol.for("v-fgt"),Ra=Symbol.for("v-txt"),on=Symbol.for("v-cmt"),co=Symbol.for("v-stc"),js=[];let Ln=null;function E(e=!1){js.push(Ln=e?null:[])}function xg(){js.pop(),Ln=js[js.length-1]||null}let fo=1;function Ou(e,t=!1){fo+=e,e<0&&Ln&&t&&(Ln.hasOnce=!0)}function Pg(e){return e.dynamicChildren=fo>0?Ln||Do:null,xg(),fo>0&&Ln&&Ln.push(e),e}function M(e,t,n,r,a,o){return Pg(L(e,t,n,r,a,o,!0))}function De(e,t,n,r,a){return Pg(Fe(e,t,n,r,a,!0))}function ua(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}function r$(e){}const Mg=({key:e})=>e??null,al=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Gt(e)||sn(e)||lt(e)?{i:mn,r:e,k:t,f:!!n}:e:null);function L(e,t=null,n=null,r=0,a=null,o=e===Ye?0:1,s=!1,i=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mg(t),ref:t&&al(t),scopeId:Jl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:mn};return i?(Td(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Gt(n)?8:16),fo>0&&!s&&Ln&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Ln.push(l),l}const Fe=a$;function a$(e,t=null,n=null,r=0,a=null,o=!1){if((!e||e===ng)&&(e=on),ua(e)){const i=Kr(e,t,!0);return n&&Td(i,n),fo>0&&!o&&Ln&&(i.shapeFlag&6?Ln[Ln.indexOf(e)]=i:Ln.push(i)),i.patchFlag=-2,i}if(f$(e)&&(e=e.__vccOpts),t){t=Og(t);let{class:i,style:l}=t;i&&!Gt(i)&&(t.class=ut(i)),jt(l)&&(Gl(l)&&!et(l)&&(l=Ut({},l)),t.style=bt(l))}const s=Gt(e)?1:wl(e)?128:Vv(e)?64:jt(e)?4:lt(e)?2:0;return L(e,t,n,r,a,s,o,!0)}function Og(e){return e?Gl(e)||ug(e)?Ut({},e):e:null}function Kr(e,t,n=!1,r=!1){const{props:a,ref:o,patchFlag:s,children:i,transition:l}=e,c=t?Ho(a||{},t):a,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Mg(c),ref:t&&t.ref?n&&o?et(o)?o.concat(al(t)):[o,al(t)]:al(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ye?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kr(e.ssContent),ssFallback:e.ssFallback&&Kr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ca(u,l.clone(u)),u}function tn(e=" ",t=0){return Fe(Ra,null,e,t)}function o$(e,t){const n=Fe(co,null,e);return n.staticCount=t,n}function ge(e="",t=!1){return t?(E(),De(on,null,e)):Fe(on,null,e)}function Gn(e){return e==null||typeof e=="boolean"?Fe(on):et(e)?Fe(Ye,null,e.slice()):ua(e)?Pa(e):Fe(Ra,null,String(e))}function Pa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kr(e)}function Td(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(et(t))n=16;else if(typeof t=="object")if(r&65){const a=t.default;a&&(a._c&&(a._d=!1),Td(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!ug(t)?t._ctx=mn:a===3&&mn&&(mn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else lt(t)?(t={default:t,_ctx:mn},n=32):(t=String(t),r&64?(n=16,t=[tn(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ho(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const a in r)if(a==="class")t.class!==r.class&&(t.class=ut([t.class,r.class]));else if(a==="style")t.style=bt([t.style,r.style]);else if(ii(a)){const o=t[a],s=r[a];s&&o!==s&&!(et(o)&&o.includes(s))&&(t[a]=o?[].concat(o,s):s)}else a!==""&&(t[a]=r[a])}return t}function Wn(e,t,n,r=null){fr(e,t,7,[n,r])}const s$=sg();let i$=0;function Ng(e,t,n){const r=e.type,a=(t?t.appContext:e.appContext)||s$,o={uid:i$++,vnode:e,type:r,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new dd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:fg(r,a),emitsOptions:Eg(r,a),emit:null,emitted:null,propsDefaults:It,inheritAttrs:r.inheritAttrs,ctx:It,data:It,props:It,attrs:It,slots:It,refs:It,setupState:It,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=KC.bind(null,o),e.ce&&e.ce(o),o}let hn=null;const pr=()=>hn||mn;let Al,Nu;{const e=Vl(),t=(n,r)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(r),o=>{a.length>1?a.forEach(s=>s(o)):a[0](o)}};Al=t("__VUE_INSTANCE_SETTERS__",n=>hn=n),Nu=t("__VUE_SSR_SETTERS__",n=>Jo=n)}const po=e=>{const t=hn;return Al(e),e.scope.on(),()=>{e.scope.off(),Al(t)}},Ru=()=>{hn&&hn.scope.off(),Al(null)};function Rg(e){return e.vnode.shapeFlag&4}let Jo=!1;function Lg(e,t=!1,n=!1){t&&Nu(t);const{props:r,children:a}=e.vnode,o=Rg(e);RC(e,r,o,t),FC(e,a,n);const s=o?l$(e,t):void 0;return t&&Nu(!1),s}function l$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ku);const{setup:r}=n;if(r){za();const a=e.setupContext=r.length>1?Bg(e):null,o=po(e),s=rs(r,e,0,[e.props,a]),i=cd(s);if(Ka(),o(),(i||e.sp)&&!Na(e)&&wd(e),i){if(s.then(Ru,Ru),t)return s.then(l=>{Lu(e,l,t)}).catch(l=>{go(l,e,0)});e.asyncDep=s}else Lu(e,s,t)}else Dg(e,t)}function Lu(e,t,n){lt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:jt(t)&&(e.setupState=vd(t)),Dg(e,n)}let Cl,Du;function c$(e){Cl=e,Du=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,hC))}}const u$=()=>!Cl;function Dg(e,t,n){const r=e.type;if(!e.render){if(!t&&Cl&&!r.render){const a=r.template||Id(e).template;if(a){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:i,compilerOptions:l}=r,c=Ut(Ut({isCustomElement:o,delimiters:i},s),l);r.render=Cl(a,c)}}e.render=r.render||ur,Du&&Du(e)}{const a=po(e);za();try{EC(e)}finally{Ka(),a()}}}const d$={get(e,t){return On(e,"get",""),e[t]}};function Bg(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,d$),slots:e.slots,emit:e.emit,expose:t}}function di(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vd(xv(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fs)return Fs[n](e)},has(t,n){return n in t||n in Fs}})):e.proxy}function Bu(e,t=!0){return lt(e)?e.displayName||e.name:e.name||t&&e.__name}function f$(e){return lt(e)&&"__vccOpts"in e}const j=(e,t)=>PA(e,t,Jo);function ja(e,t,n){const r=arguments.length;return r===2?jt(t)&&!et(t)?ua(t)?Fe(e,null,[t]):Fe(e,t):Fe(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ua(n)&&(n=[n]),Fe(e,t,n))}function p$(){}function h$(e,t,n,r){const a=n[r];if(a&&Fg(a,e))return a;const o=t();return o.memo=e.slice(),o.cacheIndex=r,n[r]=o}function Fg(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Un(n[r],t[r]))return!1;return fo>0&&Ln&&Ln.push(e),!0}const jg="3.5.13",m$=ur,v$=jA,g$=No,y$=Fv,_$={createComponentInstance:Ng,setupComponent:Lg,renderComponentRoot:rl,setCurrentRenderingInstance:ei,isVNode:ua,normalizeVNode:Gn,getComponentPublicInstance:di,ensureValidVNode:Sd,pushWarningContext:LA,popWarningContext:DA},b$=_$,w$=null,A$=null,C$=null;/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Fu;const gh=typeof window<"u"&&window.trustedTypes;if(gh)try{Fu=gh.createPolicy("vue",{createHTML:e=>e})}catch{}const Vg=Fu?e=>Fu.createHTML(e):e=>e,$$="http://www.w3.org/2000/svg",S$="http://www.w3.org/1998/Math/MathML",na=typeof document<"u"?document:null,yh=na&&na.createElement("template"),I$={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const a=t==="svg"?na.createElementNS($$,e):t==="mathml"?na.createElementNS(S$,e):n?na.createElement(e,{is:n}):na.createElement(e);return e==="select"&&r&&r.multiple!=null&&a.setAttribute("multiple",r.multiple),a},createText:e=>na.createTextNode(e),createComment:e=>na.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>na.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,a,o){const s=n?n.previousSibling:t.lastChild;if(a&&(a===o||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===o||!(a=a.nextSibling)););else{yh.innerHTML=Vg(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const i=yh.content;if(r==="svg"||r==="mathml"){const l=i.firstChild;for(;l.firstChild;)i.appendChild(l.firstChild);i.removeChild(l)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},$a="transition",bs="animation",Yo=Symbol("_vtc"),Ug={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Hg=Ut({},bd,Ug),E$=e=>(e.displayName="Transition",e.props=Hg,e),xd=E$((e,{slots:t})=>ja(qv,zg(e),t)),Za=(e,t=[])=>{et(e)?e.forEach(n=>n(...t)):e&&e(...t)},_h=e=>e?et(e)?e.some(t=>t.length>1):e.length>1:!1;function zg(e){const t={};for(const de in e)de in Ug||(t[de]=e[de]);if(e.css===!1)return t;const{name:n="v",type:r,duration:a,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=s,appearToClass:u=i,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,_=k$(a),g=_&&_[0],w=_&&_[1],{onBeforeEnter:A,onEnter:C,onEnterCancelled:y,onLeave:p,onLeaveCancelled:b,onBeforeAppear:S=A,onAppear:R=C,onAppearCancelled:K=y}=t,G=(de,Ae,we,Ge)=>{de._enterCancelled=Ge,Ea(de,Ae?u:i),Ea(de,Ae?c:s),we&&we()},Z=(de,Ae)=>{de._isLeaving=!1,Ea(de,d),Ea(de,m),Ea(de,h),Ae&&Ae()},Ie=de=>(Ae,we)=>{const Ge=de?R:C,xe=()=>G(Ae,de,we);Za(Ge,[Ae,xe]),bh(()=>{Ea(Ae,de?l:o),Rr(Ae,de?u:i),_h(Ge)||wh(Ae,r,g,xe)})};return Ut(t,{onBeforeEnter(de){Za(A,[de]),Rr(de,o),Rr(de,s)},onBeforeAppear(de){Za(S,[de]),Rr(de,l),Rr(de,c)},onEnter:Ie(!1),onAppear:Ie(!0),onLeave(de,Ae){de._isLeaving=!0;const we=()=>Z(de,Ae);Rr(de,d),de._enterCancelled?(Rr(de,h),ju()):(ju(),Rr(de,h)),bh(()=>{de._isLeaving&&(Ea(de,d),Rr(de,m),_h(p)||wh(de,r,w,we))}),Za(p,[de,we])},onEnterCancelled(de){G(de,!1,void 0,!0),Za(y,[de])},onAppearCancelled(de){G(de,!0,void 0,!0),Za(K,[de])},onLeaveCancelled(de){Z(de),Za(b,[de])}})}function k$(e){if(e==null)return null;if(jt(e))return[nu(e.enter),nu(e.leave)];{const t=nu(e);return[t,t]}}function nu(e){return hl(e)}function Rr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Yo]||(e[Yo]=new Set)).add(t)}function Ea(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Yo];n&&(n.delete(t),n.size||(e[Yo]=void 0))}function bh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let T$=0;function wh(e,t,n,r){const a=e._endId=++T$,o=()=>{a===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:s,timeout:i,propCount:l}=Kg(e,t);if(!s)return r();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,h),o()},h=m=>{m.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},i+1),e.addEventListener(c,h)}function Kg(e,t){const n=window.getComputedStyle(e),r=_=>(n[_]||"").split(", "),a=r(`${$a}Delay`),o=r(`${$a}Duration`),s=Ah(a,o),i=r(`${bs}Delay`),l=r(`${bs}Duration`),c=Ah(i,l);let u=null,d=0,h=0;t===$a?s>0&&(u=$a,d=s,h=o.length):t===bs?c>0&&(u=bs,d=c,h=l.length):(d=Math.max(s,c),u=d>0?s>c?$a:bs:null,h=u?u===$a?o.length:l.length:0);const m=u===$a&&/\b(transform|all)(,|$)/.test(r(`${$a}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:m}}function Ah(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Ch(n)+Ch(e[r])))}function Ch(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ju(){return document.body.offsetHeight}function x$(e,t,n){const r=e[Yo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $l=Symbol("_vod"),Wg=Symbol("_vsh"),Tr={beforeMount(e,{value:t},{transition:n}){e[$l]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ws(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ws(e,!0),r.enter(e)):r.leave(e,()=>{ws(e,!1)}):ws(e,t))},beforeUnmount(e,{value:t}){ws(e,t)}};function ws(e,t){e.style.display=t?e[$l]:"none",e[Wg]=!t}function P$(){Tr.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const qg=Symbol("");function fi(e){const t=pr();if(!t)return;const n=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Sl(o,a))},r=()=>{const a=e(t.proxy);t.ce?Sl(t.ce,a):Vu(t.subTree,a),n(a)};Ad(()=>{Qs(r)}),ln(()=>{We(r,ur,{flush:"post"});const a=new MutationObserver(r);a.observe(t.subTree.el.parentNode,{childList:!0}),Or(()=>a.disconnect())})}function Vu(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Vu(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Sl(e.el,t);else if(e.type===Ye)e.children.forEach(n=>Vu(n,t));else if(e.type===co){let{el:n,anchor:r}=e;for(;n&&(Sl(n,t),n!==r);)n=n.nextSibling}}function Sl(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const a in t)n.setProperty(`--${a}`,t[a]),r+=`--${a}: ${t[a]};`;n[qg]=r}}const M$=/(^|;)\s*display\s*:/;function O$(e,t,n){const r=e.style,a=Gt(n);let o=!1;if(n&&!a){if(t)if(Gt(t))for(const s of t.split(";")){const i=s.slice(0,s.indexOf(":")).trim();n[i]==null&&ol(r,i,"")}else for(const s in t)n[s]==null&&ol(r,s,"");for(const s in n)s==="display"&&(o=!0),ol(r,s,n[s])}else if(a){if(t!==n){const s=r[qg];s&&(n+=";"+s),r.cssText=n,o=M$.test(n)}}else t&&e.removeAttribute("style");$l in e&&(e[$l]=o?r.display:"",e[Wg]&&(r.display="none"))}const $h=/\s*!important$/;function ol(e,t,n){if(et(n))n.forEach(r=>ol(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=N$(e,t);$h.test(n)?e.setProperty(Jn(r),n.replace($h,""),"important"):e[r]=n}}const Sh=["Webkit","Moz","ms"],ru={};function N$(e,t){const n=ru[t];if(n)return n;let r=Tn(t);if(r!=="filter"&&r in e)return ru[t]=r;r=li(r);for(let a=0;a<Sh.length;a++){const o=Sh[a]+r;if(o in e)return ru[t]=o}return t}const Ih="http://www.w3.org/1999/xlink";function Eh(e,t,n,r,a,o=Z1(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ih,t.slice(6,t.length)):e.setAttributeNS(Ih,t,n):n==null||o&&!uv(n)?e.removeAttribute(t):e.setAttribute(t,o?"":kr(n)?String(n):n)}function kh(e,t,n,r,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Vg(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(i!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=uv(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(a||t)}function oa(e,t,n,r){e.addEventListener(t,n,r)}function R$(e,t,n,r){e.removeEventListener(t,n,r)}const Th=Symbol("_vei");function L$(e,t,n,r,a=null){const o=e[Th]||(e[Th]={}),s=o[t];if(r&&s)s.value=r;else{const[i,l]=D$(t);if(r){const c=o[t]=j$(r,a);oa(e,i,c,l)}else s&&(R$(e,i,s,l),o[t]=void 0)}}const xh=/(?:Once|Passive|Capture)$/;function D$(e){let t;if(xh.test(e)){t={};let r;for(;r=e.match(xh);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jn(e.slice(2)),t]}let au=0;const B$=Promise.resolve(),F$=()=>au||(B$.then(()=>au=0),au=Date.now());function j$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;fr(V$(r,n.value),t,5,[r])};return n.value=e,n.attached=F$(),n}function V$(e,t){if(et(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>a=>!a._stopped&&r&&r(a))}else return t}const Ph=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,U$=(e,t,n,r,a,o)=>{const s=a==="svg";t==="class"?x$(e,r,s):t==="style"?O$(e,n,r):ii(t)?id(t)||L$(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):H$(e,t,r,s))?(kh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Eh(e,t,r,s,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Gt(r))?kh(e,Tn(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Eh(e,t,r,s))};function H$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ph(t)&&lt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Ph(t)&&Gt(n)?!1:t in e}const Mh={};/*! #__NO_SIDE_EFFECTS__ */function Gg(e,t,n){const r=Ce(e,t);Fl(r)&&Ut(r,t);class a extends tc{constructor(s){super(r,s,n)}}return a.def=r,a}/*! #__NO_SIDE_EFFECTS__ */const z$=(e,t)=>Gg(e,t,ay),K$=typeof HTMLElement<"u"?HTMLElement:class{};class tc extends K${constructor(t,n={},r=kl){super(),this._def=t,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==kl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof tc){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,ar(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const a of r)this._setAttr(a.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,a=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:s}=r;let i;if(o&&!et(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=hl(this._props[l])),(i||(i=Object.create(null)))[Tn(l)]=!0)}this._numberProps=i,a&&this._resolveProps(r),this.shadowRoot&&this._applyStyles(s),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>t(this._def=r,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)Ot(this,r)||Object.defineProperty(this,r,{get:()=>P(n[r])})}_resolveProps(t){const{props:n}=t,r=et(n)?n:Object.keys(n||{});for(const a of Object.keys(this))a[0]!=="_"&&r.includes(a)&&this._setProp(a,this[a]);for(const a of r.map(Tn))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(o){this._setProp(a,o,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let r=n?this.getAttribute(t):Mh;const a=Tn(t);n&&this._numberProps&&this._numberProps[a]&&(r=hl(r)),this._setProp(a,r,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,a=!1){if(n!==this._props[t]&&(n===Mh?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),a&&this._instance&&this._update(),r)){const o=this._ob;o&&o.disconnect(),n===!0?this.setAttribute(Jn(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Jn(t),n+""):n||this.removeAttribute(Jn(t)),o&&o.observe(this,{attributes:!0})}}_update(){ry(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Fe(this._def,Ut(t,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const a=(o,s)=>{this.dispatchEvent(new CustomEvent(o,Fl(s[0])?Ut({detail:s},s[0]):{detail:s}))};r.emit=(o,...s)=>{a(o,s),Jn(o)!==o&&a(Jn(o),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let a=t.length-1;a>=0;a--){const o=document.createElement("style");r&&o.setAttribute("nonce",r),o.textContent=t[a],this.shadowRoot.prepend(o)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(t[r]||(t[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let r=0;r<t.length;r++){const a=t[r],o=a.getAttribute("name")||"default",s=this._slots[o],i=a.parentNode;if(s)for(const l of s){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}i.insertBefore(l,a)}else for(;a.firstChild;)i.insertBefore(a.firstChild,a);i.removeChild(a)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function Jg(e){const t=pr(),n=t&&t.ce;return n||null}function W$(){const e=Jg();return e&&e.shadowRoot}function q$(e="$style"){{const t=pr();if(!t)return It;const n=t.type.__cssModules;if(!n)return It;const r=n[e];return r||It}}const Yg=new WeakMap,Xg=new WeakMap,Il=Symbol("_moveCb"),Oh=Symbol("_enterCb"),G$=e=>(delete e.props.mode,e),J$=G$({name:"TransitionGroup",props:Ut({},Hg,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=pr(),r=_d();let a,o;return Ql(()=>{if(!a.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!eS(a[0].el,n.vnode.el,s))return;a.forEach(X$),a.forEach(Q$);const i=a.filter(Z$);ju(),i.forEach(l=>{const c=l.el,u=c.style;Rr(c,s),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Il]=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c[Il]=null,Ea(c,s))};c.addEventListener("transitionend",d)})}),()=>{const s=gt(e),i=zg(s);let l=s.tag||Ye;if(a=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(a.push(u),ca(u,Go(u,i,r,n)),Yg.set(u,u.el.getBoundingClientRect()))}o=t.default?Yl(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&ca(u,Go(u,i,r,n))}return Fe(l,null,o)}}}),Y$=J$;function X$(e){const t=e.el;t[Il]&&t[Il](),t[Oh]&&t[Oh]()}function Q$(e){Xg.set(e,e.el.getBoundingClientRect())}function Z$(e){const t=Yg.get(e),n=Xg.get(e),r=t.left-n.left,a=t.top-n.top;if(r||a){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${a}px)`,o.transitionDuration="0s",e}}function eS(e,t,n){const r=e.cloneNode(),a=e[Yo];a&&a.forEach(i=>{i.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=Kg(r);return o.removeChild(r),s}const Va=e=>{const t=e.props["onUpdate:modelValue"]||!1;return et(t)?n=>jo(t,n):t};function tS(e){e.target.composing=!0}function Nh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dr=Symbol("_assign"),Xo={created(e,{modifiers:{lazy:t,trim:n,number:r}},a){e[dr]=Va(a);const o=r||a.props&&a.props.type==="number";oa(e,t?"change":"input",s=>{if(s.target.composing)return;let i=e.value;n&&(i=i.trim()),o&&(i=pl(i)),e[dr](i)}),n&&oa(e,"change",()=>{e.value=e.value.trim()}),t||(oa(e,"compositionstart",tS),oa(e,"compositionend",Nh),oa(e,"change",Nh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:a,number:o}},s){if(e[dr]=Va(s),e.composing)return;const i=(o||e.type==="number")&&!/^0\d/.test(e.value)?pl(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||a&&e.value.trim()===l)||(e.value=l))}},Pd={deep:!0,created(e,t,n){e[dr]=Va(n),oa(e,"change",()=>{const r=e._modelValue,a=Qo(e),o=e.checked,s=e[dr];if(et(r)){const i=Ul(r,a),l=i!==-1;if(o&&!l)s(r.concat(a));else if(!o&&l){const c=[...r];c.splice(i,1),s(c)}}else if(vo(r)){const i=new Set(r);o?i.add(a):i.delete(a),s(i)}else s(Qg(e,o))})},mounted:Rh,beforeUpdate(e,t,n){e[dr]=Va(n),Rh(e,t,n)}};function Rh(e,{value:t,oldValue:n},r){e._modelValue=t;let a;if(et(t))a=Ul(t,r.props.value)>-1;else if(vo(t))a=t.has(r.props.value);else{if(t===n)return;a=Ba(t,Qg(e,!0))}e.checked!==a&&(e.checked=a)}const Md={created(e,{value:t},n){e.checked=Ba(t,n.props.value),e[dr]=Va(n),oa(e,"change",()=>{e[dr](Qo(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[dr]=Va(r),t!==n&&(e.checked=Ba(t,r.props.value))}},Od={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const a=vo(t);oa(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?pl(Qo(s)):Qo(s));e[dr](e.multiple?a?new Set(o):o:o[0]),e._assigning=!0,ar(()=>{e._assigning=!1})}),e[dr]=Va(r)},mounted(e,{value:t}){Lh(e,t)},beforeUpdate(e,t,n){e[dr]=Va(n)},updated(e,{value:t}){e._assigning||Lh(e,t)}};function Lh(e,t){const n=e.multiple,r=et(t);if(!(n&&!r&&!vo(t))){for(let a=0,o=e.options.length;a<o;a++){const s=e.options[a],i=Qo(s);if(n)if(r){const l=typeof i;l==="string"||l==="number"?s.selected=t.some(c=>String(c)===String(i)):s.selected=Ul(t,i)>-1}else s.selected=t.has(i);else if(Ba(Qo(s),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qo(e){return"_value"in e?e._value:e.value}function Qg(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const El={created(e,t,n){Vi(e,t,n,null,"created")},mounted(e,t,n){Vi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Vi(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Vi(e,t,n,r,"updated")}};function Zg(e,t){switch(e){case"SELECT":return Od;case"TEXTAREA":return Xo;default:switch(t){case"checkbox":return Pd;case"radio":return Md;default:return Xo}}}function Vi(e,t,n,r,a){const s=Zg(e.tagName,n.props&&n.props.type)[a];s&&s(e,t,n,r)}function nS(){Xo.getSSRProps=({value:e})=>({value:e}),Md.getSSRProps=({value:e},t)=>{if(t.props&&Ba(t.props.value,e))return{checked:!0}},Pd.getSSRProps=({value:e},t)=>{if(et(e)){if(t.props&&Ul(e,t.props.value)>-1)return{checked:!0}}else if(vo(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},El.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Zg(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const rS=["ctrl","shift","alt","meta"],aS={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>rS.some(n=>e[`${n}Key`]&&!t.includes(n))},lr=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(a,...o)=>{for(let s=0;s<t.length;s++){const i=aS[t[s]];if(i&&i(a,t))return}return e(a,...o)})},oS={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},da=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=a=>{if(!("key"in a))return;const o=Jn(a.key);if(t.some(s=>s===o||oS[s]===o))return e(a)})},ey=Ut({patchProp:U$},I$);let Vs,Dh=!1;function ty(){return Vs||(Vs=gg(ey))}function ny(){return Vs=Dh?Vs:yg(ey),Dh=!0,Vs}const ry=(...e)=>{ty().render(...e)},sS=(...e)=>{ny().hydrate(...e)},kl=(...e)=>{const t=ty().createApp(...e),{mount:n}=t;return t.mount=r=>{const a=sy(r);if(!a)return;const o=t._component;!lt(o)&&!o.render&&!o.template&&(o.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const s=n(a,!1,oy(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),s},t},ay=(...e)=>{const t=ny().createApp(...e),{mount:n}=t;return t.mount=r=>{const a=sy(r);if(a)return n(a,!0,oy(a))},t};function oy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sy(e){return Gt(e)?document.querySelector(e):e}let Bh=!1;const iS=()=>{Bh||(Bh=!0,nS(),P$())};/**
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const lS=()=>{},cS=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:qv,BaseTransitionPropsValidators:bd,Comment:on,DeprecationTypes:C$,EffectScope:dd,ErrorCodes:FA,ErrorTypeStrings:v$,Fragment:Ye,KeepAlive:lC,ReactiveEffect:Js,Static:co,Suspense:XC,Teleport:Hv,Text:Ra,TrackOpTypes:MA,Transition:xd,TransitionGroup:Y$,TriggerOpTypes:OA,VueElement:tc,assertNumber:BA,callWithAsyncErrorHandling:fr,callWithErrorHandling:rs,camelize:Tn,capitalize:li,cloneVNode:Kr,compatUtils:A$,compile:lS,computed:j,createApp:kl,createBlock:De,createCommentVNode:ge,createElementBlock:M,createElementVNode:L,createHydrationRenderer:yg,createPropsRestProxy:SC,createRenderer:gg,createSSRApp:ay,createSlots:fC,createStaticVNode:o$,createTextVNode:tn,createVNode:Fe,customRef:Mv,defineAsyncComponent:uo,defineComponent:Ce,defineCustomElement:Gg,defineEmits:vC,defineExpose:gC,defineModel:bC,defineOptions:yC,defineProps:mC,defineSSRCustomElement:z$,defineSlots:_C,devtools:g$,effect:rA,effectScope:tA,getCurrentInstance:pr,getCurrentScope:fd,getCurrentWatcher:NA,getTransitionRawChildren:Yl,guardReactiveProps:Og,h:ja,handleError:go,hasInjectionContext:NC,hydrate:sS,hydrateOnIdle:tC,hydrateOnInteraction:oC,hydrateOnMediaQuery:aC,hydrateOnVisible:rC,initCustomFormatter:p$,initDirectivesForSSR:iS,inject:te,isMemoSame:Fg,isProxy:Gl,isReactive:Oa,isReadonly:Fa,isRef:sn,isRuntimeOnly:u$,isShallow:nr,isVNode:ua,markRaw:xv,mergeDefaults:$C,mergeModels:zr,mergeProps:Ho,nextTick:ar,normalizeClass:ut,normalizeProps:X1,normalizeStyle:bt,onActivated:Jv,onBeforeMount:as,onBeforeUnmount:ha,onBeforeUpdate:Ad,onDeactivated:Yv,onErrorCaptured:tg,onMounted:ln,onRenderTracked:eg,onRenderTriggered:Zv,onScopeDispose:pv,onServerPrefetch:Qv,onUnmounted:Or,onUpdated:Ql,onWatcherCleanup:Nv,openBlock:E,popScopeId:zA,provide:ig,proxyRefs:vd,pushScopeId:HA,queuePostFlushCb:Qs,reactive:Wl,readonly:In,ref:$e,registerRuntimeCompiler:c$,render:ry,renderList:Pt,renderSlot:Ht,resolveComponent:dC,resolveDirective:rg,resolveDynamicComponent:os,resolveFilter:w$,resolveTransitionHooks:Go,setBlockTracking:Ou,setDevtoolsHook:y$,setTransitionHooks:ca,shallowReactive:Tv,shallowReadonly:to,shallowRef:En,ssrContextKey:Ag,ssrUtils:b$,stop:aA,toDisplayString:Te,toHandlerKey:Rs,toHandlers:pC,toRaw:gt,toRef:la,toRefs:gd,toValue:SA,transformVNodeArgs:r$,triggerRef:$A,unref:P,useAttrs:CC,useCssModule:q$,useCssVars:fi,useHost:Jg,useId:GA,useModel:qr,useSSRContext:Cg,useShadowRoot:W$,useSlots:AC,useTemplateRef:it,useTransitionState:_d,vModelCheckbox:Pd,vModelDynamic:El,vModelRadio:Md,vModelSelect:Od,vModelText:Xo,vShow:Tr,version:jg,warn:m$,watch:We,watchEffect:UC,watchPostEffect:HC,watchSyncEffect:$g,withAsyncContext:IC,withCtx:Ze,withDefaults:wC,withDirectives:Dn,withKeys:da,withMemo:h$,withModifiers:lr,withScopeId:KA},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:iy,setPrototypeOf:Fh,isFrozen:uS,getPrototypeOf:dS,getOwnPropertyDescriptor:fS}=Object;let{freeze:zn,seal:xr,create:ly}=Object,{apply:Uu,construct:Hu}=typeof Reflect<"u"&&Reflect;zn||(zn=function(t){return t});xr||(xr=function(t){return t});Uu||(Uu=function(t,n,r){return t.apply(n,r)});Hu||(Hu=function(t,n){return new t(...n)});const Ui=or(Array.prototype.forEach),jh=or(Array.prototype.pop),As=or(Array.prototype.push),sl=or(String.prototype.toLowerCase),ou=or(String.prototype.toString),pS=or(String.prototype.match),Cs=or(String.prototype.replace),hS=or(String.prototype.indexOf),mS=or(String.prototype.trim),Ar=or(Object.prototype.hasOwnProperty),tr=or(RegExp.prototype.test),$s=vS(TypeError);function or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return Uu(e,t,r)}}function vS(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hu(e,n)}}function Ct(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sl;Fh&&Fh(e,null);let r=t.length;for(;r--;){let a=t[r];if(typeof a=="string"){const o=n(a);o!==a&&(uS(t)||(t[r]=o),a=o)}e[a]=!0}return e}function gS(e){for(let t=0;t<e.length;t++)Ar(e,t)||(e[t]=null);return e}function no(e){const t=ly(null);for(const[n,r]of iy(e))Ar(e,n)&&(Array.isArray(r)?t[n]=gS(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=no(r):t[n]=r);return t}function Hi(e,t){for(;e!==null;){const r=fS(e,t);if(r){if(r.get)return or(r.get);if(typeof r.value=="function")return or(r.value)}e=dS(e)}function n(){return null}return n}const Vh=zn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),su=zn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),iu=zn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yS=zn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lu=zn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_S=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uh=zn(["#text"]),Hh=zn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),cu=zn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),zh=zn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zi=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bS=xr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wS=xr(/<%[\w\W]*|[\w\W]*%>/gm),AS=xr(/\${[\w\W]*}/gm),CS=xr(/^data-[\-\w.\u00B7-\uFFFF]/),$S=xr(/^aria-[\-\w]+$/),cy=xr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),SS=xr(/^(?:\w+script|data):/i),IS=xr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),uy=xr(/^html$/i);var Kh=Object.freeze({__proto__:null,MUSTACHE_EXPR:bS,ERB_EXPR:wS,TMPLIT_EXPR:AS,DATA_ATTR:CS,ARIA_ATTR:$S,IS_ALLOWED_URI:cy,IS_SCRIPT_OR_DATA:SS,ATTR_WHITESPACE:IS,DOCTYPE_NAME:uy});const ES=function(){return typeof window>"u"?null:window},kS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function dy(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ES();const t=tt=>dy(tt);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,a=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:i,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:m}=e,_=l.prototype,g=Hi(_,"cloneNode"),w=Hi(_,"nextSibling"),A=Hi(_,"childNodes"),C=Hi(_,"parentNode");if(typeof s=="function"){const tt=n.createElement("template");tt.content&&tt.content.ownerDocument&&(n=tt.content.ownerDocument)}let y,p="";const{implementation:b,createNodeIterator:S,createDocumentFragment:R,getElementsByTagName:K}=n,{importNode:G}=r;let Z={};t.isSupported=typeof iy=="function"&&typeof C=="function"&&b&&b.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ie,ERB_EXPR:de,TMPLIT_EXPR:Ae,DATA_ATTR:we,ARIA_ATTR:Ge,IS_SCRIPT_OR_DATA:xe,ATTR_WHITESPACE:ye}=Kh;let{IS_ALLOWED_URI:_e}=Kh,He=null;const me=Ct({},[...Vh,...su,...iu,...lu,...Uh]);let V=null;const ue=Ct({},[...Hh,...cu,...zh,...zi]);let J=Object.seal(ly(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),I=null,O=null,ie=!0,Be=!0,je=!1,ne=!0,Q=!1,se=!1,le=!1,k=!1,x=!1,q=!1,pe=!1,B=!0,z=!1;const ae="user-content-";let F=!0,U=!1,Y={},fe=null;const ve=Ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Pe=null;const Le=Ct({},["audio","video","img","source","image","track"]);let rt=null;const pt=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",zt="http://www.w3.org/2000/svg",Nt="http://www.w3.org/1999/xhtml";let nn=Nt,Zt=!1,ce=null;const Me=Ct({},[dt,zt,Nt],ou);let be=null;const Ee=["application/xhtml+xml","text/html"],Ve="text/html";let ze=null,ot=null;const Tt=n.createElement("form"),ht=function(X){return X instanceof RegExp||X instanceof Function},Dt=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ot&&ot===X)){if((!X||typeof X!="object")&&(X={}),X=no(X),be=Ee.indexOf(X.PARSER_MEDIA_TYPE)===-1?Ve:X.PARSER_MEDIA_TYPE,ze=be==="application/xhtml+xml"?ou:sl,He=Ar(X,"ALLOWED_TAGS")?Ct({},X.ALLOWED_TAGS,ze):me,V=Ar(X,"ALLOWED_ATTR")?Ct({},X.ALLOWED_ATTR,ze):ue,ce=Ar(X,"ALLOWED_NAMESPACES")?Ct({},X.ALLOWED_NAMESPACES,ou):Me,rt=Ar(X,"ADD_URI_SAFE_ATTR")?Ct(no(pt),X.ADD_URI_SAFE_ATTR,ze):pt,Pe=Ar(X,"ADD_DATA_URI_TAGS")?Ct(no(Le),X.ADD_DATA_URI_TAGS,ze):Le,fe=Ar(X,"FORBID_CONTENTS")?Ct({},X.FORBID_CONTENTS,ze):ve,I=Ar(X,"FORBID_TAGS")?Ct({},X.FORBID_TAGS,ze):{},O=Ar(X,"FORBID_ATTR")?Ct({},X.FORBID_ATTR,ze):{},Y=Ar(X,"USE_PROFILES")?X.USE_PROFILES:!1,ie=X.ALLOW_ARIA_ATTR!==!1,Be=X.ALLOW_DATA_ATTR!==!1,je=X.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=X.SAFE_FOR_TEMPLATES||!1,se=X.WHOLE_DOCUMENT||!1,x=X.RETURN_DOM||!1,q=X.RETURN_DOM_FRAGMENT||!1,pe=X.RETURN_TRUSTED_TYPE||!1,k=X.FORCE_BODY||!1,B=X.SANITIZE_DOM!==!1,z=X.SANITIZE_NAMED_PROPS||!1,F=X.KEEP_CONTENT!==!1,U=X.IN_PLACE||!1,_e=X.ALLOWED_URI_REGEXP||cy,nn=X.NAMESPACE||Nt,J=X.CUSTOM_ELEMENT_HANDLING||{},X.CUSTOM_ELEMENT_HANDLING&&ht(X.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(J.tagNameCheck=X.CUSTOM_ELEMENT_HANDLING.tagNameCheck),X.CUSTOM_ELEMENT_HANDLING&&ht(X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(J.attributeNameCheck=X.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(J.allowCustomizedBuiltInElements=X.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(Be=!1),q&&(x=!0),Y&&(He=Ct({},Uh),V=[],Y.html===!0&&(Ct(He,Vh),Ct(V,Hh)),Y.svg===!0&&(Ct(He,su),Ct(V,cu),Ct(V,zi)),Y.svgFilters===!0&&(Ct(He,iu),Ct(V,cu),Ct(V,zi)),Y.mathMl===!0&&(Ct(He,lu),Ct(V,zh),Ct(V,zi))),X.ADD_TAGS&&(He===me&&(He=no(He)),Ct(He,X.ADD_TAGS,ze)),X.ADD_ATTR&&(V===ue&&(V=no(V)),Ct(V,X.ADD_ATTR,ze)),X.ADD_URI_SAFE_ATTR&&Ct(rt,X.ADD_URI_SAFE_ATTR,ze),X.FORBID_CONTENTS&&(fe===ve&&(fe=no(fe)),Ct(fe,X.FORBID_CONTENTS,ze)),F&&(He["#text"]=!0),se&&Ct(He,["html","head","body"]),He.table&&(Ct(He,["tbody"]),delete I.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw $s('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $s('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=X.TRUSTED_TYPES_POLICY,p=y.createHTML("")}else y===void 0&&(y=kS(m,a)),y!==null&&typeof p=="string"&&(p=y.createHTML(""));zn&&zn(X),ot=X}},Jt=Ct({},["mi","mo","mn","ms","mtext"]),Kt=Ct({},["foreignobject","desc","title","annotation-xml"]),Yt=Ct({},["title","style","font","a","script"]),gn=Ct({},[...su,...iu,...yS]),ga=Ct({},[...lu,..._S]),hs=function(X){let Re=C(X);(!Re||!Re.tagName)&&(Re={namespaceURI:nn,tagName:"template"});const Qe=sl(X.tagName),Ft=sl(Re.tagName);return ce[X.namespaceURI]?X.namespaceURI===zt?Re.namespaceURI===Nt?Qe==="svg":Re.namespaceURI===dt?Qe==="svg"&&(Ft==="annotation-xml"||Jt[Ft]):!!gn[Qe]:X.namespaceURI===dt?Re.namespaceURI===Nt?Qe==="math":Re.namespaceURI===zt?Qe==="math"&&Kt[Ft]:!!ga[Qe]:X.namespaceURI===Nt?Re.namespaceURI===zt&&!Kt[Ft]||Re.namespaceURI===dt&&!Jt[Ft]?!1:!ga[Qe]&&(Yt[Qe]||!gn[Qe]):!!(be==="application/xhtml+xml"&&ce[X.namespaceURI]):!1},mr=function(X){As(t.removed,{element:X});try{X.parentNode.removeChild(X)}catch{X.remove()}},ya=function(X,Re){try{As(t.removed,{attribute:Re.getAttributeNode(X),from:Re})}catch{As(t.removed,{attribute:null,from:Re})}if(Re.removeAttribute(X),X==="is"&&!V[X])if(x||q)try{mr(Re)}catch{}else try{Re.setAttribute(X,"")}catch{}},_a=function(X){let Re=null,Qe=null;if(k)X="<remove></remove>"+X;else{const yn=pS(X,/^[\r\n\t ]+/);Qe=yn&&yn[0]}be==="application/xhtml+xml"&&nn===Nt&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const Ft=y?y.createHTML(X):X;if(nn===Nt)try{Re=new h().parseFromString(Ft,be)}catch{}if(!Re||!Re.documentElement){Re=b.createDocument(nn,"template",null);try{Re.documentElement.innerHTML=Zt?p:Ft}catch{}}const un=Re.body||Re.documentElement;return X&&Qe&&un.insertBefore(n.createTextNode(Qe),un.childNodes[0]||null),nn===Nt?K.call(Re,se?"html":"body")[0]:se?Re.documentElement:un},Xr=function(X){return S.call(X.ownerDocument||X,X,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},vc=function(X){return X instanceof d&&(typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||!(X.attributes instanceof u)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function")},_i=function(X){return typeof i=="function"&&X instanceof i},vr=function(X,Re,Qe){Z[X]&&Ui(Z[X],Ft=>{Ft.call(t,Re,Qe,ot)})},qa=function(X){let Re=null;if(vr("beforeSanitizeElements",X,null),vc(X))return mr(X),!0;const Qe=ze(X.nodeName);if(vr("uponSanitizeElement",X,{tagName:Qe,allowedTags:He}),X.hasChildNodes()&&!_i(X.firstElementChild)&&tr(/<[/\w]/g,X.innerHTML)&&tr(/<[/\w]/g,X.textContent))return mr(X),!0;if(!He[Qe]||I[Qe]){if(!I[Qe]&&ms(Qe)&&(J.tagNameCheck instanceof RegExp&&tr(J.tagNameCheck,Qe)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Qe)))return!1;if(F&&!fe[Qe]){const Ft=C(X)||X.parentNode,un=A(X)||X.childNodes;if(un&&Ft){const yn=un.length;for(let xn=yn-1;xn>=0;--xn)Ft.insertBefore(g(un[xn],!0),w(X))}}return mr(X),!0}return X instanceof l&&!hs(X)||(Qe==="noscript"||Qe==="noembed"||Qe==="noframes")&&tr(/<\/no(script|embed|frames)/i,X.innerHTML)?(mr(X),!0):(Q&&X.nodeType===3&&(Re=X.textContent,Ui([Ie,de,Ae],Ft=>{Re=Cs(Re,Ft," ")}),X.textContent!==Re&&(As(t.removed,{element:X.cloneNode()}),X.textContent=Re)),vr("afterSanitizeElements",X,null),!1)},bi=function(X,Re,Qe){if(B&&(Re==="id"||Re==="name")&&(Qe in n||Qe in Tt))return!1;if(!(Be&&!O[Re]&&tr(we,Re))){if(!(ie&&tr(Ge,Re))){if(!V[Re]||O[Re]){if(!(ms(X)&&(J.tagNameCheck instanceof RegExp&&tr(J.tagNameCheck,X)||J.tagNameCheck instanceof Function&&J.tagNameCheck(X))&&(J.attributeNameCheck instanceof RegExp&&tr(J.attributeNameCheck,Re)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(Re))||Re==="is"&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&tr(J.tagNameCheck,Qe)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Qe))))return!1}else if(!rt[Re]){if(!tr(_e,Cs(Qe,ye,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&X!=="script"&&hS(Qe,"data:")===0&&Pe[X])){if(!(je&&!tr(xe,Cs(Qe,ye,"")))){if(Qe)return!1}}}}}}return!0},ms=function(X){return X!=="annotation-xml"&&X.indexOf("-")>0},wi=function(X){vr("beforeSanitizeAttributes",X,null);const{attributes:Re}=X;if(!Re)return;const Qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V};let Ft=Re.length;for(;Ft--;){const un=Re[Ft],{name:yn,namespaceURI:xn,value:Nr}=un,Ga=ze(yn);let Pn=yn==="value"?Nr:mS(Nr);if(Qe.attrName=Ga,Qe.attrValue=Pn,Qe.keepAttr=!0,Qe.forceKeepAttr=void 0,vr("uponSanitizeAttribute",X,Qe),Pn=Qe.attrValue,Qe.forceKeepAttr||(ya(yn,X),!Qe.keepAttr))continue;if(!ne&&tr(/\/>/i,Pn)){ya(yn,X);continue}Q&&Ui([Ie,de,Ae],Ci=>{Pn=Cs(Pn,Ci," ")});const Ai=ze(X.nodeName);if(bi(Ai,Ga,Pn)){if(z&&(Ga==="id"||Ga==="name")&&(ya(yn,X),Pn=ae+Pn),y&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!xn)switch(m.getAttributeType(Ai,Ga)){case"TrustedHTML":{Pn=y.createHTML(Pn);break}case"TrustedScriptURL":{Pn=y.createScriptURL(Pn);break}}try{xn?X.setAttributeNS(xn,yn,Pn):X.setAttribute(yn,Pn),jh(t.removed)}catch{}}}vr("afterSanitizeAttributes",X,null)},gc=function tt(X){let Re=null;const Qe=Xr(X);for(vr("beforeSanitizeShadowDOM",X,null);Re=Qe.nextNode();)vr("uponSanitizeShadowNode",Re,null),!qa(Re)&&(Re.content instanceof o&&tt(Re.content),wi(Re));vr("afterSanitizeShadowDOM",X,null)};return t.sanitize=function(tt){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re=null,Qe=null,Ft=null,un=null;if(Zt=!tt,Zt&&(tt="<!-->"),typeof tt!="string"&&!_i(tt))if(typeof tt.toString=="function"){if(tt=tt.toString(),typeof tt!="string")throw $s("dirty is not a string, aborting")}else throw $s("toString is not a function");if(!t.isSupported)return tt;if(le||Dt(X),t.removed=[],typeof tt=="string"&&(U=!1),U){if(tt.nodeName){const Nr=ze(tt.nodeName);if(!He[Nr]||I[Nr])throw $s("root node is forbidden and cannot be sanitized in-place")}}else if(tt instanceof i)Re=_a("<!---->"),Qe=Re.ownerDocument.importNode(tt,!0),Qe.nodeType===1&&Qe.nodeName==="BODY"||Qe.nodeName==="HTML"?Re=Qe:Re.appendChild(Qe);else{if(!x&&!Q&&!se&&tt.indexOf("<")===-1)return y&&pe?y.createHTML(tt):tt;if(Re=_a(tt),!Re)return x?null:pe?p:""}Re&&k&&mr(Re.firstChild);const yn=Xr(U?tt:Re);for(;Ft=yn.nextNode();)qa(Ft)||(Ft.content instanceof o&&gc(Ft.content),wi(Ft));if(U)return tt;if(x){if(q)for(un=R.call(Re.ownerDocument);Re.firstChild;)un.appendChild(Re.firstChild);else un=Re;return(V.shadowroot||V.shadowrootmode)&&(un=G.call(r,un,!0)),un}let xn=se?Re.outerHTML:Re.innerHTML;return se&&He["!doctype"]&&Re.ownerDocument&&Re.ownerDocument.doctype&&Re.ownerDocument.doctype.name&&tr(uy,Re.ownerDocument.doctype.name)&&(xn="<!DOCTYPE "+Re.ownerDocument.doctype.name+`>
`+xn),Q&&Ui([Ie,de,Ae],Nr=>{xn=Cs(xn,Nr," ")}),y&&pe?y.createHTML(xn):xn},t.setConfig=function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dt(tt),le=!0},t.clearConfig=function(){ot=null,le=!1},t.isValidAttribute=function(tt,X,Re){ot||Dt({});const Qe=ze(tt),Ft=ze(X);return bi(Qe,Ft,Re)},t.addHook=function(tt,X){typeof X=="function"&&(Z[tt]=Z[tt]||[],As(Z[tt],X))},t.removeHook=function(tt){if(Z[tt])return jh(Z[tt])},t.removeHooks=function(tt){Z[tt]&&(Z[tt]=[])},t.removeAllHooks=function(){Z={}},t}var TS=dy();function xS(e,t){const n=e.hooks??{};let r;for(r in n){const a=n[r];a!==void 0&&t.addHook(r,a)}}function fy(){return TS()}function PS(e={},t=fy){const n=t();xS(e,n);const r=function(a,o){const s=o.value;if(o.oldValue===s)return;const i=`${s}`,l=o.arg,c=e.namedConfigurations,u=e.default??{};if(c&&l!==void 0){a.innerHTML=n.sanitize(i,c[l]??u);return}a.innerHTML=n.sanitize(i,u)};return{mounted:r,updated:r}}const MS={install(e,t={},n=fy){e.directive("dompurify-html",PS(t,n))}};function OS(e,t){return j({get(){const n=localStorage.getItem(e);if(n)try{const r=JSON.parse(n);if((t==null?void 0:t(r))===!1){localStorage.removeItem(e);return}return r}catch{localStorage.removeItem(e);return}},set(n){n===void 0?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(n))}})}function wn(){return{log:console.log,warn:console.warn,info:console.info,error:console.error}}const NS=1500,RS=1e3,LS=100,DS=wn();var BS=(e=>(e[e.None=0]="None",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e))(BS||{});function FS(){const e=OS("generateBuilderManager__mode"),t={mode:e.value??"ui",selection:[],mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]},n=$e(t);let r=null,a=0;const o=[],s=ye=>{l.value=ye},i=()=>n.value.mode,l=j({get:()=>n.value.mode,set(ye){n.value.mode=ye,e.value=ye}}),c=j(()=>l.value=="blueprints"?"blueprints_root":"root"),u=(ye,_e,He)=>{if(ye===null){n.value.selection=[];return}n.value.selection.length!==0&&(n.value.selection=[]),d(ye,_e,He)},d=(ye,_e,He)=>{let me=_e;if(typeof me>"u"){const V=document.querySelector(`.ComponentRenderer [data-writer-id="${ye}"]`);me=V==null?void 0:V.dataset.writerInstancePath}n.value.selection.push({componentId:ye,instancePath:me,source:He})},h=(ye,_e,He,me)=>{if(!ye.shiftKey&&!ye.ctrlKey&&!ye.metaKey)return u(_e,He,me);m(_e)?_(_e):d(_e,He,me)},m=ye=>n.value.selection.some(_e=>_e.componentId===ye),_=ye=>{const _e=n.value.selection.filter(He=>He.componentId!==ye);_e.length!==n.value.selection.length&&(n.value.selection=_e)},g=j(()=>n.value.selection.length===0?0:n.value.selection.length===1?1:2),w=j(()=>g.value===1),A=j(()=>n.value.selection[0]),C=j(()=>{var ye;return(ye=n.value.selection[0])==null?void 0:ye.componentId}),y=(ye,_e,He=!1)=>{if(r!==null)return;a<0&&(o.splice(a),a=0);const me=o[o.length-1],V=Date.now()-(me==null?void 0:me.timestamp);if(me!=null&&me.enableDebounce&&(me==null?void 0:me.id)==ye&&V<RS){r=o.pop();return}r={id:ye,desc:_e,timestamp:null,enableDebounce:He,mutations:{}}},p=ye=>{r.mutations[ye.id]||(r.mutations[ye.id]={jsonPre:ye?JSON.stringify(ye):void 0})},b=ye=>{r.mutations[ye.id]||(r.mutations[ye.id]={}),r.mutations[ye.id].jsonPost=ye?JSON.stringify(ye):void 0},S=ye=>{if(r.id!==ye){DS.warn("Mutation transaction mismatch.",ye,r.id);return}r.timestamp=Date.now(),o.push(r),r=null,G()},R=()=>{const ye=o.length-1+a,_e=o[ye];return _e&&a--,G(),_e},K=()=>{const ye=o.length+a,_e=o[ye];return _e&&a++,G(),_e},G=()=>{const ye=o.length-1+a,_e=o[ye],He=o.length+a,me=o[He];n.value.mutationTransactionsSnapshot={undo:_e,redo:me}},Z=()=>n.value.mutationTransactionsSnapshot;async function Ie(ye){const _e=JSON.stringify(ye);let He=5981;for(let V=0;V<_e.length;V++)He=(He<<5)+He+_e.charCodeAt(V);return He.toString(16).padStart(2,"0")}const de=async ye=>{const{type:_e,title:He,message:me,code:V,blueprintExecution:ue,id:J}=ye,I=await Ie(ye);if(J){const O=n.value.logEntries.findIndex(ie=>ie.id===J);O!==-1&&n.value.logEntries.splice(O,1)}else{const O=n.value.logEntries.find(ie=>ie.fingerprint===I);if(O){O.repeated++,O.timestampReceived=new Date,n.value.logEntries.sort((ie,Be)=>ie.timestampReceived<Be.timestampReceived?1:-1);return}}n.value.logEntries.unshift({id:J,type:_e,title:He,message:me,code:V,blueprintExecution:ue,timestampReceived:new Date,fingerprint:I,repeated:0}),n.value.logEntries.splice(LS)},Ae=()=>n.value.logEntries.length,we=()=>{n.value.logEntries=[]},Ge=()=>n.value.logEntries;return{setMode:s,getMode:i,mode:l,activeRootId:c,openPanels:$e(new Set),isSettingsBarCollapsed:$e(!1),isComponentIdSelected:m,selectionStatus:g,isSingleSelectionActive:w,firstSelectedId:C,firstSelectedItem:A,removeSelectedComponentId:_,setSelection:u,appendSelection:d,handleSelectionFromEvent:h,selection:j(()=>n.value.selection),mutationTransactions:In(o),openMutationTransaction:y,registerPreMutation:p,registerPostMutation:b,closeMutationTransaction:S,consumeUndoTransaction:R,consumeRedoTransaction:K,getMutationTransactionsSnapshot:Z,handleLogEntry:de,getLogEntryCount:Ae,clearLogEntries:we,getLogEntries:Ge}}const re={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};var W=(e=>(e.Text="Text",e.Boolean="Boolean",e.KeyValue="Key-Value",e.Color="Color",e.Shadow="Shadow",e.Number="Number",e.Object="Object",e.IdKey="Identifying Key",e.Width="Width",e.HAlign="Align (H)",e.VAlign="Align (V)",e.Padding="Padding",e.Tools="Tools",e.ComponentPicker="Component",e.Code="Code",e.BlueprintKey="Blueprint Key",e.Handler="Handler",e.WriterGraphId="Graph Id",e.WriterAppId="App Id",e.ComponentId="Component Id",e.ComponentEventType="Component Event Type",e))(W||{}),qe=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(qe||{}),nc=(e=>(e.Text="Text",e.Textarea="Textarea",e))(nc||{});const jS={class:"WdsNumberInput__right"},VS=Ce({inheritAttrs:!1,__name:"WdsNumberInput",props:zr({step:{type:Number,default:1},class:{type:String,default:void 0}},{modelValue:{type:Number,required:!1,default:void 0},modelModifiers:{}}),emits:zr({focusout:e=>typeof e=="number"},["update:modelValue"]),setup(e,{expose:t}){const n=qr(e,"modelValue"),r=e;t({focus:s});const a=$e();function o(i){n.value=(n.value??0)+i,s()}function s(){var i;(i=a.value)==null||i.focus()}return(i,l)=>(E(),M("div",{class:ut(["WdsNumberInput colorTransformer",r.class])},[Dn(L("input",Ho({ref_key:"input",ref:a,"onUpdate:modelValue":l[0]||(l[0]=c=>n.value=c),class:"WdsNumberInput__input"},i.$attrs,{type:"number",onFocusout:l[1]||(l[1]=c=>i.$emit("focusout",n.value))}),null,16),[[Xo,n.value]]),L("div",jS,[L("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[2]||(l[2]=lr(c=>o(e.step),["prevent"])),onPointerdown:l[3]||(l[3]=lr(()=>{},["prevent"]))},l[6]||(l[6]=[L("span",{class:"WdsNumberInput__right__arrow__up"},null,-1)]),32),L("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[4]||(l[4]=lr(c=>o(-e.step),["prevent"])),onPointerdown:l[5]||(l[5]=lr(()=>{},["prevent"]))},l[7]||(l[7]=[L("span",{class:"WdsNumberInput__right__arrow__down"},null,-1)]),32)])],2))}}),ke=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},US=ke(VS,[["__scopeId","data-v-e225ba84"]]),HS={key:1,class:"CoreDataframeCellNumber--text"},zS=Ce({__name:"CoreDataframeCellNumber",props:{value:{validator:e=>typeof e=="number"||typeof e=="bigint",required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="number"},setup(e,{emit:t}){const n=e,r=t;function a(o){o!==n.value&&r("change",o)}return(o,s)=>e.editable?(E(),De(US,{key:0,class:"CoreDataframeCellNumber--input","model-value":Number(e.value),onFocusout:s[0]||(s[0]=i=>a(i))},null,8,["model-value"])):(E(),M("div",HS,Te(e.value),1))}}),KS=ke(zS,[["__scopeId","data-v-76f0032c"]]),WS={class:"markdown"},qS=Ce({__name:"BaseMarkdownRaw",props:{rawMarkdown:{type:String,required:!0}},setup(e){return(t,n)=>{const r=rg("dompurify-html");return Dn((E(),M("div",WS,null,512)),[[r,e.rawMarkdown]])}}}),py=ke(qS,[["__scopeId","data-v-2220bc7a"]]),hy=Ce({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=$e(!1),r=e;return as(async()=>{t=await en(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(a,o)=>n.value?(E(),De(py,{key:0,"raw-markdown":String(P(t).parse(r.rawText)).trim(),class:"BaseMarkdown"},null,8,["raw-markdown"])):ge("",!0)}}),GS=["aria-invalid"],JS=Ce({__name:"WdsTextareaInput",props:zr({invalid:{type:Boolean,required:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=qr(e,"modelValue");t({focus:i,getSelection:s,value:n,setSelectionEnd:o,setSelectionStart:a});const r=it("input");function a(l){r.value&&(r.value.selectionStart=l)}function o(l){r.value&&(r.value.selectionEnd=l)}function s(){var l,c;return{selectionStart:(l=r.value)==null?void 0:l.selectionStart,selectionEnd:(c=r.value)==null?void 0:c.selectionEnd}}function i(){var l;(l=r.value)==null||l.focus()}return(l,c)=>Dn((E(),M("textarea",{ref_key:"input",ref:r,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),"aria-invalid":e.invalid},null,8,GS)),[[Xo,n.value]])}}),Nd=ke(JS,[["__scopeId","data-v-4c9293dd"]]),YS={key:2,class:"CoreDataframeCellText--text"},XS=Ce({__name:"CoreDataframeCellText",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,a=it("textarea");function o(){a.value.value!==n.value&&r("change",a.value.value)}return(s,i)=>e.editable?(E(),De(Nd,{key:0,ref_key:"textarea",ref:a,class:"CoreDataframeCellText--textarea",rows:"1","model-value":String(e.value),onFocusout:o},null,8,["model-value"])):e.useMarkdown?(E(),De(hy,{key:1,"raw-text":String(e.value)},null,8,["raw-text"])):(E(),M("div",YS,[L("p",{class:ut({"CoreDataframeCellText__content--noWrap":!e.wrapText})},Te(e.value),3)]))}}),QS=ke(XS,[["__scopeId","data-v-992ae253"]]),ZS=["checked","readonly","tabindex"],eI=Ce({__name:"CoreDataframeCellBoolean",props:{value:{type:Boolean,required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t;function a(o){if(!n.editable){o.preventDefault(),o.stopPropagation();return}r("change",o.target.checked)}return(o,s)=>(E(),M("div",{class:ut(["CoreDataframeCellBoolean",{"CoreDataframeCellBoolean--disabled":!e.editable}])},[L("input",{type:"checkbox",checked:e.value,readonly:!e.editable,tabindex:e.editable?0:-1,onChange:a},null,40,ZS)],2))}}),tI=ke(eI,[["__scopeId","data-v-2d30bc74"]]);function my(e,t){return typeof t=="bigint"?t.toString()+"n":t}const nI={class:"CoreDataframeCellUnknown"},rI=Ce({__name:"CoreDataframeCellUnknown",props:{value:{validator:()=>!0,required:!0},wrapText:{type:Boolean,required:!1}},setup(e){const t=e,n=j(()=>JSON.stringify(t.value,my));return(r,a)=>(E(),M("div",nI,[L("p",{class:ut({"CoreDataframeCellUnknown__content--noWrap":!e.wrapText})},Te(n.value),3)]))}}),aI=ke(rI,[["__scopeId","data-v-06d2511b"]]),oI=Ce({__name:"CoreDataframeCell",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>e!==void 0},setup(e){const t=e,n=j(()=>{switch(typeof t.value){case"number":case"bigint":return KS;case"boolean":return tI;case"string":return QS;default:return aI}});return(r,a)=>(E(),De(os(n.value),{value:e.value,"use-markdown":e.useMarkdown,editable:e.editable,"wrap-text":e.wrapText,onChange:a[0]||(a[0]=o=>r.$emit("change",o))},null,40,["value","use-markdown","editable","wrap-text"]))}}),cr="__internal_arquero_id",sI="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",vy=/^__index_level_[0-9]+__$/;function gy(e){const t=$e(!1),n=new AbortController;function r(){t.value=!0}function a(o){const s=o.currentTarget;document.hasFocus()?s.contains(o.relatedTarget)||(t.value=!1):window.addEventListener("focus",function i(){window.removeEventListener("focus",i),s.isConnected&&!s.contains(document.activeElement)&&(t.value=!1)},{signal:n.signal})}return We(e,(o,s)=>{s&&(s.removeEventListener("focusin",r),s.removeEventListener("focusout",a)),e&&(e.value.addEventListener("focusin",r,{signal:n.signal}),e.value.addEventListener("focusout",a,{signal:n.signal}))}),ha(()=>{n.abort()}),In(t)}const iI=["top","right","bottom","left"],Wh=["start","end"],qh=iI.reduce((e,t)=>e.concat(t,t+"-"+Wh[0],t+"-"+Wh[1]),[]),zu=Math.min,zo=Math.max,Tl=Math.round,Hr=e=>({x:e,y:e}),lI={left:"right",right:"left",bottom:"top",top:"bottom"},cI={start:"end",end:"start"};function Gh(e,t,n){return zo(e,zu(t,n))}function rc(e,t){return typeof e=="function"?e(t):e}function ss(e){return e.split("-")[0]}function La(e){return e.split("-")[1]}function yy(e){return e==="x"?"y":"x"}function _y(e){return e==="y"?"height":"width"}function ac(e){return["top","bottom"].includes(ss(e))?"y":"x"}function by(e){return yy(ac(e))}function uI(e,t,n){n===void 0&&(n=!1);const r=La(e),a=by(e),o=_y(a);let s=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Jh(s)),[s,Jh(s)]}function dI(e){return e.replace(/start|end/g,t=>cI[t])}function Jh(e){return e.replace(/left|right|bottom|top/g,t=>lI[t])}function fI(e){return{top:0,right:0,bottom:0,left:0,...e}}function pI(e){return typeof e!="number"?fI(e):{top:e,right:e,bottom:e,left:e}}function xl(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Yh(e,t,n){let{reference:r,floating:a}=e;const o=ac(t),s=by(t),i=_y(s),l=ss(t),c=o==="y",u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,h=r[i]/2-a[i]/2;let m;switch(l){case"top":m={x:u,y:r.y-a.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-a.width,y:d};break;default:m={x:r.x,y:r.y}}switch(La(t)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}const hI=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:s}=n,i=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Yh(c,r,l),h=r,m={},_=0;for(let g=0;g<i.length;g++){const{name:w,fn:A}=i[g],{x:C,y,data:p,reset:b}=await A({x:u,y:d,initialPlacement:r,placement:h,strategy:a,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=C??u,d=y??d,m={...m,[w]:{...m[w],...p}},b&&_<=50&&(_++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(c=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),{x:u,y:d}=Yh(c,h,l)),g=-1)}return{x:u,y:d,placement:h,strategy:a,middlewareData:m}};async function wy(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=rc(t,e),_=pI(m),w=i[h?d==="floating"?"reference":"floating":d],A=xl(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:l})),C=d==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),p=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},b=xl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:C,offsetParent:y,strategy:l}):C);return{top:(A.top-b.top+_.top)/p.y,bottom:(b.bottom-A.bottom+_.bottom)/p.y,left:(A.left-b.left+_.left)/p.x,right:(b.right-A.right+_.right)/p.x}}function mI(e,t,n){return(e?[...n.filter(a=>La(a)===e),...n.filter(a=>La(a)!==e)]:n.filter(a=>ss(a)===a)).filter(a=>e?La(a)===e||(t?dI(a)!==a:!1):!0)}const vI=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,a;const{rects:o,middlewareData:s,placement:i,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:h=qh,autoAlignment:m=!0,..._}=rc(e,t),g=d!==void 0||h===qh?mI(d||null,m,h):h,w=await wy(t,_),A=((n=s.autoPlacement)==null?void 0:n.index)||0,C=g[A];if(C==null)return{};const y=uI(C,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(i!==C)return{reset:{placement:g[0]}};const p=[w[ss(C)],w[y[0]],w[y[1]]],b=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:C,overflows:p}],S=g[A+1];if(S)return{data:{index:A+1,overflows:b},reset:{placement:S}};const R=b.map(Z=>{const Ie=La(Z.placement);return[Z.placement,Ie&&u?Z.overflows.slice(0,2).reduce((de,Ae)=>de+Ae,0):Z.overflows[0],Z.overflows]}).sort((Z,Ie)=>Z[1]-Ie[1]),G=((a=R.filter(Z=>Z[2].slice(0,La(Z[0])?2:3).every(Ie=>Ie<=0))[0])==null?void 0:a[0])||R[0][0];return G!==i?{data:{index:A+1,overflows:b},reset:{placement:G}}:{}}}};async function gI(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=ss(n),i=La(n),l=ac(n)==="y",c=["left","top"].includes(s)?-1:1,u=o&&l?-1:1,d=rc(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:_}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof _=="number"&&(m=i==="end"?_*-1:_),l?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const yI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:s,middlewareData:i}=t,l=await gI(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:s}}}}},_I=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:i={fn:w=>{let{x:A,y:C}=w;return{x:A,y:C}}},...l}=rc(e,t),c={x:n,y:r},u=await wy(t,l),d=ac(ss(a)),h=yy(d);let m=c[h],_=c[d];if(o){const w=h==="y"?"top":"left",A=h==="y"?"bottom":"right",C=m+u[w],y=m-u[A];m=Gh(C,m,y)}if(s){const w=d==="y"?"top":"left",A=d==="y"?"bottom":"right",C=_+u[w],y=_-u[A];_=Gh(C,_,y)}const g=i.fn({...t,[h]:m,[d]:_});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:o,[d]:s}}}}}};function oc(){return typeof window<"u"}function yo(e){return Rd(e)?(e.nodeName||"").toLowerCase():"#document"}function rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ma(e){var t;return(t=(Rd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rd(e){return oc()?e instanceof Node||e instanceof rr(e).Node:!1}function Pr(e){return oc()?e instanceof Element||e instanceof rr(e).Element:!1}function Wr(e){return oc()?e instanceof HTMLElement||e instanceof rr(e).HTMLElement:!1}function Xh(e){return!oc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rr(e).ShadowRoot}function pi(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function bI(e){return["table","td","th"].includes(yo(e))}function sc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ld(e){const t=Dd(),n=Pr(e)?Mr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function wI(e){let t=Ua(e);for(;Wr(t)&&!Zo(t);){if(Ld(t))return t;if(sc(t))return null;t=Ua(t)}return null}function Dd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zo(e){return["html","body","#document"].includes(yo(e))}function Mr(e){return rr(e).getComputedStyle(e)}function ic(e){return Pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ua(e){if(yo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xh(e)&&e.host||ma(e);return Xh(t)?t.host:t}function Ay(e){const t=Ua(e);return Zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wr(t)&&pi(t)?t:Ay(t)}function Ku(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=Ay(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),s=rr(a);if(o){const i=Wu(s);return t.concat(s,s.visualViewport||[],pi(a)?a:[],i&&n?Ku(i):[])}return t.concat(a,Ku(a,[],n))}function Wu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cy(e){const t=Mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Wr(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:r,i=Tl(n)!==o||Tl(r)!==s;return i&&(n=o,r=s),{width:n,height:r,$:i}}function $y(e){return Pr(e)?e:e.contextElement}function Ko(e){const t=$y(e);if(!Wr(t))return Hr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=Cy(t);let s=(o?Tl(n.width):n.width)/r,i=(o?Tl(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const AI=Hr(0);function Sy(e){const t=rr(e);return!Dd()||!t.visualViewport?AI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==rr(e)?!1:t}function ai(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=$y(e);let s=Hr(1);t&&(r?Pr(r)&&(s=Ko(r)):s=Ko(e));const i=CI(o,n,r)?Sy(o):Hr(0);let l=(a.left+i.x)/s.x,c=(a.top+i.y)/s.y,u=a.width/s.x,d=a.height/s.y;if(o){const h=rr(o),m=r&&Pr(r)?rr(r):r;let _=h,g=Wu(_);for(;g&&r&&m!==_;){const w=Ko(g),A=g.getBoundingClientRect(),C=Mr(g),y=A.left+(g.clientLeft+parseFloat(C.paddingLeft))*w.x,p=A.top+(g.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,d*=w.y,l+=y,c+=p,_=rr(g),g=Wu(_)}}return xl({width:u,height:d,x:l,y:c})}function Bd(e,t){const n=ic(e).scrollLeft;return t?t.left+n:ai(ma(e)).left+n}function Iy(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:Bd(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function $I(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",s=ma(r),i=t?sc(t.floating):!1;if(r===s||i&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Hr(1);const u=Hr(0),d=Wr(r);if((d||!d&&!o)&&((yo(r)!=="body"||pi(s))&&(l=ic(r)),Wr(r))){const m=ai(r);c=Ko(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=s&&!d&&!o?Iy(s,l,!0):Hr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function SI(e){return Array.from(e.getClientRects())}function II(e){const t=ma(e),n=ic(e),r=e.ownerDocument.body,a=zo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=zo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Bd(e);const i=-n.scrollTop;return Mr(r).direction==="rtl"&&(s+=zo(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:s,y:i}}function EI(e,t){const n=rr(e),r=ma(e),a=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,i=0,l=0;if(a){o=a.width,s=a.height;const c=Dd();(!c||c&&t==="fixed")&&(i=a.offsetLeft,l=a.offsetTop)}return{width:o,height:s,x:i,y:l}}function kI(e,t){const n=ai(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Wr(e)?Ko(e):Hr(1),s=e.clientWidth*o.x,i=e.clientHeight*o.y,l=a*o.x,c=r*o.y;return{width:s,height:i,x:l,y:c}}function Qh(e,t,n){let r;if(t==="viewport")r=EI(e,n);else if(t==="document")r=II(ma(e));else if(Pr(t))r=kI(t,n);else{const a=Sy(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return xl(r)}function Ey(e,t){const n=Ua(e);return n===t||!Pr(n)||Zo(n)?!1:Mr(n).position==="fixed"||Ey(n,t)}function TI(e,t){const n=t.get(e);if(n)return n;let r=Ku(e,[],!1).filter(i=>Pr(i)&&yo(i)!=="body"),a=null;const o=Mr(e).position==="fixed";let s=o?Ua(e):e;for(;Pr(s)&&!Zo(s);){const i=Mr(s),l=Ld(s);!l&&i.position==="fixed"&&(a=null),(o?!l&&!a:!l&&i.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||pi(s)&&!l&&Ey(e,s))?r=r.filter(u=>u!==s):a=i,s=Ua(s)}return t.set(e,r),r}function xI(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const s=[...n==="clippingAncestors"?sc(t)?[]:TI(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((c,u)=>{const d=Qh(t,u,a);return c.top=zo(d.top,c.top),c.right=zu(d.right,c.right),c.bottom=zu(d.bottom,c.bottom),c.left=zo(d.left,c.left),c},Qh(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PI(e){const{width:t,height:n}=Cy(e);return{width:t,height:n}}function MI(e,t,n){const r=Wr(t),a=ma(t),o=n==="fixed",s=ai(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const l=Hr(0);if(r||!r&&!o)if((yo(t)!=="body"||pi(a))&&(i=ic(t)),r){const h=ai(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else a&&(l.x=Bd(a));const c=a&&!r&&!o?Iy(a,i):Hr(0),u=s.left+i.scrollLeft-l.x-c.x,d=s.top+i.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function uu(e){return Mr(e).position==="static"}function Zh(e,t){if(!Wr(e)||Mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ma(e)===n&&(n=n.ownerDocument.body),n}function ky(e,t){const n=rr(e);if(sc(e))return n;if(!Wr(e)){let a=Ua(e);for(;a&&!Zo(a);){if(Pr(a)&&!uu(a))return a;a=Ua(a)}return n}let r=Zh(e,t);for(;r&&bI(r)&&uu(r);)r=Zh(r,t);return r&&Zo(r)&&uu(r)&&!Ld(r)?n:r||wI(e)||n}const OI=async function(e){const t=this.getOffsetParent||ky,n=this.getDimensions,r=await n(e.floating);return{reference:MI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NI(e){return Mr(e).direction==="rtl"}const RI={convertOffsetParentRelativeRectToViewportRelativeRect:$I,getDocumentElement:ma,getClippingRect:xI,getOffsetParent:ky,getElementRects:OI,getClientRects:SI,getDimensions:PI,getScale:Ko,isElement:Pr,isRTL:NI},LI=yI,DI=vI,BI=_I,FI=(e,t,n)=>{const r=new Map,a={platform:RI,...n},o={...a.platform,_c:r};return hI(e,t,{...a,platform:o})};function jI(e){return e!=null&&typeof e=="object"&&"$el"in e}function em(e){if(jI(e)){const t=e.$el;return Rd(t)&&yo(t)==="#comment"?null:t}return e}function Ss(e){return typeof e=="function"?e():P(e)}function Ty(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tm(e,t){const n=Ty(e);return Math.round(t*n)/n}function VI(e,t,n){n===void 0&&(n={});const r=n.whileElementsMounted,a=j(()=>{var R;return(R=Ss(n.open))!=null?R:!0}),o=j(()=>Ss(n.middleware)),s=j(()=>{var R;return(R=Ss(n.placement))!=null?R:"bottom"}),i=j(()=>{var R;return(R=Ss(n.strategy))!=null?R:"absolute"}),l=j(()=>{var R;return(R=Ss(n.transform))!=null?R:!0}),c=j(()=>em(e.value)),u=j(()=>em(t.value)),d=$e(0),h=$e(0),m=$e(i.value),_=$e(s.value),g=En({}),w=$e(!1),A=j(()=>{const R={position:m.value,left:"0",top:"0"};if(!u.value)return R;const K=tm(u.value,d.value),G=tm(u.value,h.value);return l.value?{...R,transform:"translate("+K+"px, "+G+"px)",...Ty(u.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:K+"px",top:G+"px"}});let C;function y(){if(c.value==null||u.value==null)return;const R=a.value;FI(c.value,u.value,{middleware:o.value,placement:s.value,strategy:i.value}).then(K=>{d.value=K.x,h.value=K.y,m.value=K.strategy,_.value=K.placement,g.value=K.middlewareData,w.value=R!==!1})}function p(){typeof C=="function"&&(C(),C=void 0)}function b(){if(p(),r===void 0){y();return}if(c.value!=null&&u.value!=null){C=r(c.value,u.value,y);return}}function S(){a.value||(w.value=!1)}return We([o,s,i,a],y,{flush:"sync"}),We([c,u],b,{flush:"sync"}),We(a,S,{flush:"sync"}),fd()&&pv(p),{x:to(d),y:to(h),strategy:to(m),placement:to(_),middlewareData:to(g),isPositioned:to(w),floatingStyles:A,update:y}}const UI={key:0,class:"CoreDataframeRow__cell CoreDataframeRow__cell--index"},HI=Ce({__name:"CoreDataframeRow",props:{showIndex:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1},indexText:{type:[Number,String],required:!0},columns:{type:Array,required:!0},row:{type:Object,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},actions:{type:Object,required:!0},displayShadowOnSticky:{type:Boolean}},emits:{change:(e,t,n)=>typeof e=="string"&&typeof t=="number"&&n!==void 0,action:(e,t)=>typeof t=="number"&&typeof e=="string"},setup(e){const t=uo(()=>en(()=>import("./SharedMoreDropdown-DffPheGC.js"),__vite__mapDeps([0,1]),import.meta.url)),n=[LI(16),BI()],r=e,a=$e(),o=gy(a),s=$e(!1),i=j(()=>Object.keys(r.actions||{}).length>0),l=j(()=>Object.entries(r.actions||{}).map(([c,u])=>({value:c,label:u})));return(c,u)=>(E(),M("div",{ref_key:"root",ref:a,class:"CoreDataframeRow",tabindex:"0",onMouseover:u[1]||(u[1]=d=>s.value=!0),onMouseleave:u[2]||(u[2]=d=>s.value=!1),onFocusin:u[3]||(u[3]=d=>s.value=!0)},[u[4]||(u[4]=L("div",{class:"CoreDataframeRow__spacer"},null,-1)),e.showIndex?(E(),M("div",UI,Te(e.indexText),1)):ge("",!0),(E(!0),M(Ye,null,Pt(e.columns,d=>(E(),M("div",{key:`${e.row[P(cr)]}_${d}`,class:"CoreDataframeRow__cell"},[Fe(oI,{value:e.row[d],"use-markdown":e.useMarkdown,editable:e.editable&&(s.value||P(o)),"wrap-text":e.wrapText,class:"CoreDataframeRow__cell__content",onChange:h=>c.$emit("change",d,e.row[P(cr)],h)},null,8,["value","use-markdown","editable","wrap-text","onChange"])]))),128)),i.value?(E(),M("div",{key:1,class:ut(["CoreDataframeRow__options",{"CoreDataframeRow__options--shadow":e.displayShadowOnSticky}])},[Fe(P(t),{options:l.value,"hide-icons":"","dropdown-placement":"left","floating-middleware":n,onSelect:u[0]||(u[0]=d=>c.$emit("action",d,e.row[P(cr)]))},null,8,["options"])],2)):ge("",!0)],544))}}),zI=ke(HI,[["__scopeId","data-v-8f242726"]]);var KI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function K4(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var qu={exports:{}},Py={},Er={},es={},hi={},wt={},oi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(C){if(super(),!e.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(C){super(),this._items=typeof C=="string"?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return C===""||C==='""'}get str(){var C;return(C=this._str)!==null&&C!==void 0?C:this._str=this._items.reduce((y,p)=>`${y}${p}`,"")}get names(){var C;return(C=this._names)!==null&&C!==void 0?C:this._names=this._items.reduce((y,p)=>(p instanceof n&&(y[p.str]=(y[p.str]||0)+1),y),{})}}e._Code=r,e.nil=new r("");function a(A,...C){const y=[A[0]];let p=0;for(;p<C.length;)i(y,C[p]),y.push(A[++p]);return new r(y)}e._=a;const o=new r("+");function s(A,...C){const y=[m(A[0])];let p=0;for(;p<C.length;)y.push(o),i(y,C[p]),y.push(o,m(A[++p]));return l(y),new r(y)}e.str=s;function i(A,C){C instanceof r?A.push(...C._items):C instanceof n?A.push(C):A.push(d(C))}e.addCodeArg=i;function l(A){let C=1;for(;C<A.length-1;){if(A[C]===o){const y=c(A[C-1],A[C+1]);if(y!==void 0){A.splice(C-1,3,y);continue}A[C++]="+"}C++}}function c(A,C){if(C==='""')return A;if(A==='""')return C;if(typeof A=="string")return C instanceof n||A[A.length-1]!=='"'?void 0:typeof C!="string"?`${A.slice(0,-1)}${C}"`:C[0]==='"'?A.slice(0,-1)+C.slice(1):void 0;if(typeof C=="string"&&C[0]==='"'&&!(A instanceof n))return`"${A}${C.slice(1)}`}function u(A,C){return C.emptyStr()?A:A.emptyStr()?C:s`${A}${C}`}e.strConcat=u;function d(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:m(Array.isArray(A)?A.join(","):A)}function h(A){return new r(m(A))}e.stringify=h;function m(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=m;function _(A){return typeof A=="string"&&e.IDENTIFIER.test(A)?new r(`.${A}`):a`[${A}]`}e.getProperty=_;function g(A){if(typeof A=="string"&&e.IDENTIFIER.test(A))return new r(`${A}`);throw new Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}e.getEsmExportName=g;function w(A){return new r(A.toString())}e.regexpCode=w})(oi);var Gu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=oi;class n extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var r;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=a;class o extends t.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class i extends a{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil}}get(){return this._scope}name(c){return new o(c,this._newName(c))}value(c,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(c),{prefix:m}=h,_=(d=u.key)!==null&&d!==void 0?d:u.ref;let g=this._values[m];if(g){const C=g.get(_);if(C)return C}else g=this._values[m]=new Map;g.set(_,h);const w=this._scope[m]||(this._scope[m]=[]),A=w.length;return w[A]=u.ref,h.setValue(u,{property:m,itemIndex:A}),h}getValue(c,u){const d=this._values[c];if(d)return d.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${c}${d.scopePath}`})}scopeCode(c=this._values,u,d){return this._reduceValues(c,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,d)}_reduceValues(c,u,d={},h){let m=t.nil;for(const _ in c){const g=c[_];if(!g)continue;const w=d[_]=d[_]||new Map;g.forEach(A=>{if(w.has(A))return;w.set(A,r.Started);let C=u(A);if(C){const y=this.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,t._)`${m}${y} ${A} = ${C};${this.opts._n}`}else if(C=h==null?void 0:h(A))m=(0,t._)`${m}${C}${this.opts._n}`;else throw new n(A);w.set(A,r.Completed)})}return m}}e.ValueScope=i})(Gu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=oi,n=Gu;var r=oi;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=Gu;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(I,O){return this}}class s extends o{constructor(I,O,ie){super(),this.varKind=I,this.name=O,this.rhs=ie}render({es5:I,_n:O}){const ie=I?n.varKinds.var:this.varKind,Be=this.rhs===void 0?"":` = ${this.rhs}`;return`${ie} ${this.name}${Be};`+O}optimizeNames(I,O){if(I[this.name.str])return this.rhs&&(this.rhs=we(this.rhs,I,O)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(I,O,ie){super(),this.lhs=I,this.rhs=O,this.sideEffects=ie}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,O){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=we(this.rhs,I,O),this}get names(){const I=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Ae(I,this.rhs)}}class l extends i{constructor(I,O,ie,Be){super(I,ie,Be),this.op=O}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}}class c extends o{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}}class u extends o{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}}class d extends o{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}}class h extends o{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,O){return this.code=we(this.code,I,O),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends o{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((O,ie)=>O+ie.render(I),"")}optimizeNodes(){const{nodes:I}=this;let O=I.length;for(;O--;){const ie=I[O].optimizeNodes();Array.isArray(ie)?I.splice(O,1,...ie):ie?I[O]=ie:I.splice(O,1)}return I.length>0?this:void 0}optimizeNames(I,O){const{nodes:ie}=this;let Be=ie.length;for(;Be--;){const je=ie[Be];je.optimizeNames(I,O)||(Ge(I,je.names),ie.splice(Be,1))}return ie.length>0?this:void 0}get names(){return this.nodes.reduce((I,O)=>de(I,O.names),{})}}class _ extends m{render(I){return"{"+I._n+super.render(I)+"}"+I._n}}class g extends m{}class w extends _{}w.kind="else";class A extends _{constructor(I,O){super(O),this.condition=I}render(I){let O=`if(${this.condition})`+super.render(I);return this.else&&(O+="else "+this.else.render(I)),O}optimizeNodes(){super.optimizeNodes();const I=this.condition;if(I===!0)return this.nodes;let O=this.else;if(O){const ie=O.optimizeNodes();O=this.else=Array.isArray(ie)?new w(ie):ie}if(O)return I===!1?O instanceof A?O:O.nodes:this.nodes.length?this:new A(xe(I),O instanceof A?[O]:O.nodes);if(!(I===!1||!this.nodes.length))return this}optimizeNames(I,O){var ie;if(this.else=(ie=this.else)===null||ie===void 0?void 0:ie.optimizeNames(I,O),!!(super.optimizeNames(I,O)||this.else))return this.condition=we(this.condition,I,O),this}get names(){const I=super.names;return Ae(I,this.condition),this.else&&de(I,this.else.names),I}}A.kind="if";class C extends _{}C.kind="for";class y extends C{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,O){if(super.optimizeNames(I,O))return this.iteration=we(this.iteration,I,O),this}get names(){return de(super.names,this.iteration.names)}}class p extends C{constructor(I,O,ie,Be){super(),this.varKind=I,this.name=O,this.from=ie,this.to=Be}render(I){const O=I.es5?n.varKinds.var:this.varKind,{name:ie,from:Be,to:je}=this;return`for(${O} ${ie}=${Be}; ${ie}<${je}; ${ie}++)`+super.render(I)}get names(){const I=Ae(super.names,this.from);return Ae(I,this.to)}}class b extends C{constructor(I,O,ie,Be){super(),this.loop=I,this.varKind=O,this.name=ie,this.iterable=Be}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,O){if(super.optimizeNames(I,O))return this.iterable=we(this.iterable,I,O),this}get names(){return de(super.names,this.iterable.names)}}class S extends _{constructor(I,O,ie){super(),this.name=I,this.args=O,this.async=ie}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}}S.kind="func";class R extends m{render(I){return"return "+super.render(I)}}R.kind="return";class K extends _{render(I){let O="try"+super.render(I);return this.catch&&(O+=this.catch.render(I)),this.finally&&(O+=this.finally.render(I)),O}optimizeNodes(){var I,O;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(O=this.finally)===null||O===void 0||O.optimizeNodes(),this}optimizeNames(I,O){var ie,Be;return super.optimizeNames(I,O),(ie=this.catch)===null||ie===void 0||ie.optimizeNames(I,O),(Be=this.finally)===null||Be===void 0||Be.optimizeNames(I,O),this}get names(){const I=super.names;return this.catch&&de(I,this.catch.names),this.finally&&de(I,this.finally.names),I}}class G extends _{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}}G.kind="catch";class Z extends _{render(I){return"finally"+super.render(I)}}Z.kind="finally";class Ie{constructor(I,O={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...O,_n:O.lines?`
`:""},this._extScope=I,this._scope=new n.Scope({parent:I}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,O){const ie=this._extScope.value(I,O);return(this._values[ie.prefix]||(this._values[ie.prefix]=new Set)).add(ie),ie}getScopeValue(I,O){return this._extScope.getValue(I,O)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,O,ie,Be){const je=this._scope.toName(O);return ie!==void 0&&Be&&(this._constants[je.str]=ie),this._leafNode(new s(I,je,ie)),je}const(I,O,ie){return this._def(n.varKinds.const,I,O,ie)}let(I,O,ie){return this._def(n.varKinds.let,I,O,ie)}var(I,O,ie){return this._def(n.varKinds.var,I,O,ie)}assign(I,O,ie){return this._leafNode(new i(I,O,ie))}add(I,O){return this._leafNode(new l(I,e.operators.ADD,O))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new h(I)),this}object(...I){const O=["{"];for(const[ie,Be]of I)O.length>1&&O.push(","),O.push(ie),(ie!==Be||this.opts.es5)&&(O.push(":"),(0,t.addCodeArg)(O,Be));return O.push("}"),new t._Code(O)}if(I,O,ie){if(this._blockNode(new A(I)),O&&ie)this.code(O).else().code(ie).endIf();else if(O)this.code(O).endIf();else if(ie)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new A(I))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(A,w)}_for(I,O){return this._blockNode(I),O&&this.code(O).endFor(),this}for(I,O){return this._for(new y(I),O)}forRange(I,O,ie,Be,je=this.opts.es5?n.varKinds.var:n.varKinds.let){const ne=this._scope.toName(I);return this._for(new p(je,ne,O,ie),()=>Be(ne))}forOf(I,O,ie,Be=n.varKinds.const){const je=this._scope.toName(I);if(this.opts.es5){const ne=O instanceof t.Name?O:this.var("_arr",O);return this.forRange("_i",0,(0,t._)`${ne}.length`,Q=>{this.var(je,(0,t._)`${ne}[${Q}]`),ie(je)})}return this._for(new b("of",Be,je,O),()=>ie(je))}forIn(I,O,ie,Be=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${O})`,ie);const je=this._scope.toName(I);return this._for(new b("in",Be,je,O),()=>ie(je))}endFor(){return this._endBlockNode(C)}label(I){return this._leafNode(new c(I))}break(I){return this._leafNode(new u(I))}return(I){const O=new R;if(this._blockNode(O),this.code(I),O.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(I,O,ie){if(!O&&!ie)throw new Error('CodeGen: "try" without "catch" and "finally"');const Be=new K;if(this._blockNode(Be),this.code(I),O){const je=this.name("e");this._currNode=Be.catch=new G(je),O(je)}return ie&&(this._currNode=Be.finally=new Z,this.code(ie)),this._endBlockNode(G,Z)}throw(I){return this._leafNode(new d(I))}block(I,O){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(O),this}endBlock(I){const O=this._blockStarts.pop();if(O===void 0)throw new Error("CodeGen: not in self-balancing block");const ie=this._nodes.length-O;if(ie<0||I!==void 0&&ie!==I)throw new Error(`CodeGen: wrong number of nodes: ${ie} vs ${I} expected`);return this._nodes.length=O,this}func(I,O=t.nil,ie,Be){return this._blockNode(new S(I,O,ie)),Be&&this.code(Be).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,O){const ie=this._currNode;if(ie instanceof I||O&&ie instanceof O)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${O?`${I.kind}/${O.kind}`:I.kind}"`)}_elseNode(I){const O=this._currNode;if(!(O instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=O.else=I,this}get _root(){return this._nodes[0]}get _currNode(){const I=this._nodes;return I[I.length-1]}set _currNode(I){const O=this._nodes;O[O.length-1]=I}}e.CodeGen=Ie;function de(J,I){for(const O in I)J[O]=(J[O]||0)+(I[O]||0);return J}function Ae(J,I){return I instanceof t._CodeOrName?de(J,I.names):J}function we(J,I,O){if(J instanceof t.Name)return ie(J);if(!Be(J))return J;return new t._Code(J._items.reduce((je,ne)=>(ne instanceof t.Name&&(ne=ie(ne)),ne instanceof t._Code?je.push(...ne._items):je.push(ne),je),[]));function ie(je){const ne=O[je.str];return ne===void 0||I[je.str]!==1?je:(delete I[je.str],ne)}function Be(je){return je instanceof t._Code&&je._items.some(ne=>ne instanceof t.Name&&I[ne.str]===1&&O[ne.str]!==void 0)}}function Ge(J,I){for(const O in I)J[O]=(J[O]||0)-(I[O]||0)}function xe(J){return typeof J=="boolean"||typeof J=="number"||J===null?!J:(0,t._)`!${ue(J)}`}e.not=xe;const ye=V(e.operators.AND);function _e(...J){return J.reduce(ye)}e.and=_e;const He=V(e.operators.OR);function me(...J){return J.reduce(He)}e.or=me;function V(J){return(I,O)=>I===t.nil?O:O===t.nil?I:(0,t._)`${ue(I)} ${J} ${ue(O)}`}function ue(J){return J instanceof t.Name?J:(0,t._)`(${J})`}})(wt);var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.checkStrictMode=Ke.getErrorPath=Ke.Type=Ke.useFunc=Ke.setEvaluated=Ke.evaluatedPropsToName=Ke.mergeEvaluated=Ke.eachItem=Ke.unescapeJsonPointer=Ke.escapeJsonPointer=Ke.escapeFragment=Ke.unescapeFragment=Ke.schemaRefOrVal=Ke.schemaHasRulesButRef=Ke.schemaHasRules=Ke.checkUnknownRules=Ke.alwaysValidSchema=Ke.toHash=void 0;const Vt=wt,WI=oi;function qI(e){const t={};for(const n of e)t[n]=!0;return t}Ke.toHash=qI;function GI(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(My(e,t),!Oy(t,e.self.RULES.all))}Ke.alwaysValidSchema=GI;function My(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema||typeof t=="boolean")return;const a=r.RULES.keywords;for(const o in t)a[o]||Ly(e,`unknown keyword: "${o}"`)}Ke.checkUnknownRules=My;function Oy(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(t[n])return!0;return!1}Ke.schemaHasRules=Oy;function JI(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Ke.schemaHasRulesButRef=JI;function YI({topSchemaRef:e,schemaPath:t},n,r,a){if(!a){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Vt._)`${n}`}return(0,Vt._)`${e}${t}${(0,Vt.getProperty)(r)}`}Ke.schemaRefOrVal=YI;function XI(e){return Ny(decodeURIComponent(e))}Ke.unescapeFragment=XI;function QI(e){return encodeURIComponent(Fd(e))}Ke.escapeFragment=QI;function Fd(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ke.escapeJsonPointer=Fd;function Ny(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ke.unescapeJsonPointer=Ny;function ZI(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)}Ke.eachItem=ZI;function nm({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(a,o,s,i)=>{const l=s===void 0?o:s instanceof Vt.Name?(o instanceof Vt.Name?e(a,o,s):t(a,o,s),s):o instanceof Vt.Name?(t(a,s,o),o):n(o,s);return i===Vt.Name&&!(l instanceof Vt.Name)?r(a,l):l}}Ke.mergeEvaluated={props:nm({mergeNames:(e,t,n)=>e.if((0,Vt._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Vt._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Vt._)`${n} || {}`).code((0,Vt._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Vt._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Vt._)`${n} || {}`),jd(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Ry}),items:nm({mergeNames:(e,t,n)=>e.if((0,Vt._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Vt._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Vt._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Vt._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Ry(e,t){if(t===!0)return e.var("props",!0);const n=e.var("props",(0,Vt._)`{}`);return t!==void 0&&jd(e,n,t),n}Ke.evaluatedPropsToName=Ry;function jd(e,t,n){Object.keys(n).forEach(r=>e.assign((0,Vt._)`${t}${(0,Vt.getProperty)(r)}`,!0))}Ke.setEvaluated=jd;const rm={};function eE(e,t){return e.scopeValue("func",{ref:t,code:rm[t.code]||(rm[t.code]=new WI._Code(t.code))})}Ke.useFunc=eE;var Ju;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ju||(Ke.Type=Ju={}));function tE(e,t,n){if(e instanceof Vt.Name){const r=t===Ju.Num;return n?r?(0,Vt._)`"[" + ${e} + "]"`:(0,Vt._)`"['" + ${e} + "']"`:r?(0,Vt._)`"/" + ${e}`:(0,Vt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Vt.getProperty)(e).toString():"/"+Fd(e)}Ke.getErrorPath=tE;function Ly(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}Ke.checkStrictMode=Ly;var Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});const Mn=wt,nE={data:new Mn.Name("data"),valCxt:new Mn.Name("valCxt"),instancePath:new Mn.Name("instancePath"),parentData:new Mn.Name("parentData"),parentDataProperty:new Mn.Name("parentDataProperty"),rootData:new Mn.Name("rootData"),dynamicAnchors:new Mn.Name("dynamicAnchors"),vErrors:new Mn.Name("vErrors"),errors:new Mn.Name("errors"),this:new Mn.Name("this"),self:new Mn.Name("self"),scope:new Mn.Name("scope"),json:new Mn.Name("json"),jsonPos:new Mn.Name("jsonPos"),jsonLen:new Mn.Name("jsonLen"),jsonPart:new Mn.Name("jsonPart")};Gr.default=nE;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=wt,n=Ke,r=Gr;e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:A})=>A?(0,t.str)`"${w}" keyword must be ${A} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function a(w,A=e.keywordError,C,y){const{it:p}=w,{gen:b,compositeRule:S,allErrors:R}=p,K=d(w,A,C);y??(S||R)?l(b,K):c(p,(0,t._)`[${K}]`)}e.reportError=a;function o(w,A=e.keywordError,C){const{it:y}=w,{gen:p,compositeRule:b,allErrors:S}=y,R=d(w,A,C);l(p,R),b||S||c(y,r.default.vErrors)}e.reportExtraError=o;function s(w,A){w.assign(r.default.errors,A),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(A,()=>w.assign((0,t._)`${r.default.vErrors}.length`,A),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=s;function i({gen:w,keyword:A,schemaValue:C,data:y,errsCount:p,it:b}){if(p===void 0)throw new Error("ajv implementation error");const S=w.name("err");w.forRange("i",p,r.default.errors,R=>{w.const(S,(0,t._)`${r.default.vErrors}[${R}]`),w.if((0,t._)`${S}.instancePath === undefined`,()=>w.assign((0,t._)`${S}.instancePath`,(0,t.strConcat)(r.default.instancePath,b.errorPath))),w.assign((0,t._)`${S}.schemaPath`,(0,t.str)`${b.errSchemaPath}/${A}`),b.opts.verbose&&(w.assign((0,t._)`${S}.schema`,C),w.assign((0,t._)`${S}.data`,y))})}e.extendErrors=i;function l(w,A){const C=w.const("err",A);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${C}]`),(0,t._)`${r.default.vErrors}.push(${C})`),w.code((0,t._)`${r.default.errors}++`)}function c(w,A){const{gen:C,validateName:y,schemaEnv:p}=w;p.$async?C.throw((0,t._)`new ${w.ValidationError}(${A})`):(C.assign((0,t._)`${y}.errors`,A),C.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(w,A,C){const{createErrors:y}=w.it;return y===!1?(0,t._)`{}`:h(w,A,C)}function h(w,A,C={}){const{gen:y,it:p}=w,b=[m(p,C),_(w,C)];return g(w,A,b),y.object(...b)}function m({errorPath:w},{instancePath:A}){const C=A?(0,t.str)`${w}${(0,n.getErrorPath)(A,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,C)]}function _({keyword:w,it:{errSchemaPath:A}},{schemaPath:C,parentSchema:y}){let p=y?A:(0,t.str)`${A}/${w}`;return C&&(p=(0,t.str)`${p}${(0,n.getErrorPath)(C,n.Type.Str)}`),[u.schemaPath,p]}function g(w,{params:A,message:C},y){const{keyword:p,data:b,schemaValue:S,it:R}=w,{opts:K,propertyName:G,topSchemaRef:Z,schemaPath:Ie}=R;y.push([u.keyword,p],[u.params,typeof A=="function"?A(w):A||(0,t._)`{}`]),K.messages&&y.push([u.message,typeof C=="function"?C(w):C]),K.verbose&&y.push([u.schema,S],[u.parentSchema,(0,t._)`${Z}${Ie}`],[r.default.data,b]),G&&y.push([u.propertyName,G])}})(hi);Object.defineProperty(es,"__esModule",{value:!0});es.boolOrEmptySchema=es.topBoolOrEmptySchema=void 0;const rE=hi,aE=wt,oE=Gr,sE={message:"boolean schema is false"};function iE(e){const{gen:t,schema:n,validateName:r}=e;n===!1?Dy(e,!1):typeof n=="object"&&n.$async===!0?t.return(oE.default.data):(t.assign((0,aE._)`${r}.errors`,null),t.return(!0))}es.topBoolOrEmptySchema=iE;function lE(e,t){const{gen:n,schema:r}=e;r===!1?(n.var(t,!1),Dy(e)):n.var(t,!0)}es.boolOrEmptySchema=lE;function Dy(e,t){const{gen:n,data:r}=e,a={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,rE.reportError)(a,sE,void 0,t)}var pn={},ho={};Object.defineProperty(ho,"__esModule",{value:!0});ho.getRules=ho.isJSONType=void 0;const cE=["string","number","integer","boolean","null","object","array"],uE=new Set(cE);function dE(e){return typeof e=="string"&&uE.has(e)}ho.isJSONType=dE;function fE(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ho.getRules=fE;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});sa.shouldUseRule=sa.shouldUseGroup=sa.schemaHasRulesForType=void 0;function pE({schema:e,self:t},n){const r=t.RULES.types[n];return r&&r!==!0&&By(e,r)}sa.schemaHasRulesForType=pE;function By(e,t){return t.rules.some(n=>Fy(e,n))}sa.shouldUseGroup=By;function Fy(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(r=>e[r]!==void 0))}sa.shouldUseRule=Fy;Object.defineProperty(pn,"__esModule",{value:!0});pn.reportTypeError=pn.checkDataTypes=pn.checkDataType=pn.coerceAndCheckDataType=pn.getJSONTypes=pn.getSchemaTypes=pn.DataType=void 0;const hE=ho,mE=sa,vE=hi,ft=wt,jy=Ke;var Wo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Wo||(pn.DataType=Wo={}));function gE(e){const t=Vy(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}pn.getSchemaTypes=gE;function Vy(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(hE.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}pn.getJSONTypes=Vy;function yE(e,t){const{gen:n,data:r,opts:a}=e,o=_E(t,a.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,mE.schemaHasRulesForType)(e,t[0]));if(s){const i=Vd(t,r,a.strictNumbers,Wo.Wrong);n.if(i,()=>{o.length?bE(e,t,o):Ud(e)})}return s}pn.coerceAndCheckDataType=yE;const Uy=new Set(["string","number","integer","boolean","null"]);function _E(e,t){return t?e.filter(n=>Uy.has(n)||t==="array"&&n==="array"):[]}function bE(e,t,n){const{gen:r,data:a,opts:o}=e,s=r.let("dataType",(0,ft._)`typeof ${a}`),i=r.let("coerced",(0,ft._)`undefined`);o.coerceTypes==="array"&&r.if((0,ft._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,ft._)`${a}[0]`).assign(s,(0,ft._)`typeof ${a}`).if(Vd(t,a,o.strictNumbers),()=>r.assign(i,a))),r.if((0,ft._)`${i} !== undefined`);for(const c of n)(Uy.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);r.else(),Ud(e),r.endIf(),r.if((0,ft._)`${i} !== undefined`,()=>{r.assign(a,i),wE(e,i)});function l(c){switch(c){case"string":r.elseIf((0,ft._)`${s} == "number" || ${s} == "boolean"`).assign(i,(0,ft._)`"" + ${a}`).elseIf((0,ft._)`${a} === null`).assign(i,(0,ft._)`""`);return;case"number":r.elseIf((0,ft._)`${s} == "boolean" || ${a} === null
              || (${s} == "string" && ${a} && ${a} == +${a})`).assign(i,(0,ft._)`+${a}`);return;case"integer":r.elseIf((0,ft._)`${s} === "boolean" || ${a} === null
              || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(i,(0,ft._)`+${a}`);return;case"boolean":r.elseIf((0,ft._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(i,!1).elseIf((0,ft._)`${a} === "true" || ${a} === 1`).assign(i,!0);return;case"null":r.elseIf((0,ft._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(i,null);return;case"array":r.elseIf((0,ft._)`${s} === "string" || ${s} === "number"
              || ${s} === "boolean" || ${a} === null`).assign(i,(0,ft._)`[${a}]`)}}}function wE({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,ft._)`${t} !== undefined`,()=>e.assign((0,ft._)`${t}[${n}]`,r))}function Yu(e,t,n,r=Wo.Correct){const a=r===Wo.Correct?ft.operators.EQ:ft.operators.NEQ;let o;switch(e){case"null":return(0,ft._)`${t} ${a} null`;case"array":o=(0,ft._)`Array.isArray(${t})`;break;case"object":o=(0,ft._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s((0,ft._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return(0,ft._)`typeof ${t} ${a} ${e}`}return r===Wo.Correct?o:(0,ft.not)(o);function s(i=ft.nil){return(0,ft.and)((0,ft._)`typeof ${t} == "number"`,i,n?(0,ft._)`isFinite(${t})`:ft.nil)}}pn.checkDataType=Yu;function Vd(e,t,n,r){if(e.length===1)return Yu(e[0],t,n,r);let a;const o=(0,jy.toHash)(e);if(o.array&&o.object){const s=(0,ft._)`typeof ${t} != "object"`;a=o.null?s:(0,ft._)`!${t} || ${s}`,delete o.null,delete o.array,delete o.object}else a=ft.nil;o.number&&delete o.integer;for(const s in o)a=(0,ft.and)(a,Yu(s,t,n,r));return a}pn.checkDataTypes=Vd;const AE={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ft._)`{type: ${e}}`:(0,ft._)`{type: ${t}}`};function Ud(e){const t=CE(e);(0,vE.reportError)(t,AE)}pn.reportTypeError=Ud;function CE(e){const{gen:t,data:n,schema:r}=e,a=(0,jy.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:a,schemaValue:a,parentSchema:r,params:{},it:e}}var lc={};Object.defineProperty(lc,"__esModule",{value:!0});lc.assignDefaults=void 0;const Po=wt,$E=Ke;function SE(e,t){const{properties:n,items:r}=e.schema;if(t==="object"&&n)for(const a in n)am(e,a,n[a].default);else t==="array"&&Array.isArray(r)&&r.forEach((a,o)=>am(e,o,a.default))}lc.assignDefaults=SE;function am(e,t,n){const{gen:r,compositeRule:a,data:o,opts:s}=e;if(n===void 0)return;const i=(0,Po._)`${o}${(0,Po.getProperty)(t)}`;if(a){(0,$E.checkStrictMode)(e,`default is ignored for: ${i}`);return}let l=(0,Po._)`${i} === undefined`;s.useDefaults==="empty"&&(l=(0,Po._)`${l} || ${i} === null || ${i} === ""`),r.if(l,(0,Po._)`${i} = ${(0,Po.stringify)(n)}`)}var Vr={},_t={};Object.defineProperty(_t,"__esModule",{value:!0});_t.validateUnion=_t.validateArray=_t.usePattern=_t.callValidateCode=_t.schemaProperties=_t.allSchemaProperties=_t.noPropertyInData=_t.propertyInData=_t.isOwnProperty=_t.hasPropFunc=_t.reportMissingProp=_t.checkMissingProp=_t.checkReportMissingProp=void 0;const Xt=wt,Hd=Ke,Sa=Gr,IE=Ke;function EE(e,t){const{gen:n,data:r,it:a}=e;n.if(Kd(n,r,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Xt._)`${t}`},!0),e.error()})}_t.checkReportMissingProp=EE;function kE({gen:e,data:t,it:{opts:n}},r,a){return(0,Xt.or)(...r.map(o=>(0,Xt.and)(Kd(e,t,o,n.ownProperties),(0,Xt._)`${a} = ${o}`)))}_t.checkMissingProp=kE;function TE(e,t){e.setParams({missingProperty:t},!0),e.error()}_t.reportMissingProp=TE;function Hy(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Xt._)`Object.prototype.hasOwnProperty`})}_t.hasPropFunc=Hy;function zd(e,t,n){return(0,Xt._)`${Hy(e)}.call(${t}, ${n})`}_t.isOwnProperty=zd;function xE(e,t,n,r){const a=(0,Xt._)`${t}${(0,Xt.getProperty)(n)} !== undefined`;return r?(0,Xt._)`${a} && ${zd(e,t,n)}`:a}_t.propertyInData=xE;function Kd(e,t,n,r){const a=(0,Xt._)`${t}${(0,Xt.getProperty)(n)} === undefined`;return r?(0,Xt.or)(a,(0,Xt.not)(zd(e,t,n))):a}_t.noPropertyInData=Kd;function zy(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}_t.allSchemaProperties=zy;function PE(e,t){return zy(t).filter(n=>!(0,Hd.alwaysValidSchema)(e,t[n]))}_t.schemaProperties=PE;function ME({schemaCode:e,data:t,it:{gen:n,topSchemaRef:r,schemaPath:a,errorPath:o},it:s},i,l,c){const u=c?(0,Xt._)`${e}, ${t}, ${r}${a}`:t,d=[[Sa.default.instancePath,(0,Xt.strConcat)(Sa.default.instancePath,o)],[Sa.default.parentData,s.parentData],[Sa.default.parentDataProperty,s.parentDataProperty],[Sa.default.rootData,Sa.default.rootData]];s.opts.dynamicRef&&d.push([Sa.default.dynamicAnchors,Sa.default.dynamicAnchors]);const h=(0,Xt._)`${u}, ${n.object(...d)}`;return l!==Xt.nil?(0,Xt._)`${i}.call(${l}, ${h})`:(0,Xt._)`${i}(${h})`}_t.callValidateCode=ME;const OE=(0,Xt._)`new RegExp`;function NE({gen:e,it:{opts:t}},n){const r=t.unicodeRegExp?"u":"",{regExp:a}=t.code,o=a(n,r);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Xt._)`${a.code==="new RegExp"?OE:(0,IE.useFunc)(e,a)}(${n}, ${r})`})}_t.usePattern=NE;function RE(e){const{gen:t,data:n,keyword:r,it:a}=e,o=t.name("valid");if(a.allErrors){const i=t.let("valid",!0);return s(()=>t.assign(i,!1)),i}return t.var(o,!0),s(()=>t.break()),o;function s(i){const l=t.const("len",(0,Xt._)`${n}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:r,dataProp:c,dataPropType:Hd.Type.Num},o),t.if((0,Xt.not)(o),i)})}}_t.validateArray=RE;function LE(e){const{gen:t,schema:n,keyword:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Hd.alwaysValidSchema)(a,l))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block(()=>n.forEach((l,c)=>{const u=e.subschema({keyword:r,schemaProp:c,compositeRule:!0},i);t.assign(s,(0,Xt._)`${s} || ${i}`),e.mergeValidEvaluated(u,i)||t.if((0,Xt.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}_t.validateUnion=LE;Object.defineProperty(Vr,"__esModule",{value:!0});Vr.validateKeywordUsage=Vr.validSchemaType=Vr.funcKeywordCode=Vr.macroKeywordCode=void 0;const Vn=wt,ro=Gr,DE=_t,BE=hi;function FE(e,t){const{gen:n,keyword:r,schema:a,parentSchema:o,it:s}=e,i=t.macro.call(s.self,a,o,s),l=Ky(n,r,i);s.opts.validateSchema!==!1&&s.self.validateSchema(i,!0);const c=n.name("valid");e.subschema({schema:i,schemaPath:Vn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Vr.macroKeywordCode=FE;function jE(e,t){var n;const{gen:r,keyword:a,schema:o,parentSchema:s,$data:i,it:l}=e;UE(l,t);const c=!i&&t.compile?t.compile.call(l.self,o,s,l):t.validate,u=Ky(r,a,c),d=r.let("valid");e.block$data(d,h),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function h(){if(t.errors===!1)g(),t.modifying&&om(e),w(()=>e.error());else{const A=t.async?m():_();t.modifying&&om(e),w(()=>VE(e,A))}}function m(){const A=r.let("ruleErrs",null);return r.try(()=>g((0,Vn._)`await `),C=>r.assign(d,!1).if((0,Vn._)`${C} instanceof ${l.ValidationError}`,()=>r.assign(A,(0,Vn._)`${C}.errors`),()=>r.throw(C))),A}function _(){const A=(0,Vn._)`${u}.errors`;return r.assign(A,null),g(Vn.nil),A}function g(A=t.async?(0,Vn._)`await `:Vn.nil){const C=l.opts.passContext?ro.default.this:ro.default.self,y=!("compile"in t&&!i||t.schema===!1);r.assign(d,(0,Vn._)`${A}${(0,DE.callValidateCode)(e,u,C,y)}`,t.modifying)}function w(A){var C;r.if((0,Vn.not)((C=t.valid)!==null&&C!==void 0?C:d),A)}}Vr.funcKeywordCode=jE;function om(e){const{gen:t,data:n,it:r}=e;t.if(r.parentData,()=>t.assign(n,(0,Vn._)`${r.parentData}[${r.parentDataProperty}]`))}function VE(e,t){const{gen:n}=e;n.if((0,Vn._)`Array.isArray(${t})`,()=>{n.assign(ro.default.vErrors,(0,Vn._)`${ro.default.vErrors} === null ? ${t} : ${ro.default.vErrors}.concat(${t})`).assign(ro.default.errors,(0,Vn._)`${ro.default.vErrors}.length`),(0,BE.extendErrors)(e)},()=>e.error())}function UE({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Ky(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,Vn.stringify)(n)})}function HE(e,t,n=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(e):r==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==r||n&&typeof e>"u")}Vr.validSchemaType=HE;function zE({schema:e,opts:t,self:n,errSchemaPath:r},a,o){if(Array.isArray(a.keyword)?!a.keyword.includes(o):a.keyword!==o)throw new Error("ajv implementation error");const s=a.dependencies;if(s!=null&&s.some(i=>!Object.prototype.hasOwnProperty.call(e,i)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[o])){const l=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}Vr.validateKeywordUsage=zE;var Da={};Object.defineProperty(Da,"__esModule",{value:!0});Da.extendSubschemaMode=Da.extendSubschemaData=Da.getSubschema=void 0;const jr=wt,Wy=Ke;function KE(e,{keyword:t,schemaProp:n,schema:r,schemaPath:a,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const i=e.schema[t];return n===void 0?{schema:i,schemaPath:(0,jr._)`${e.schemaPath}${(0,jr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:(0,jr._)`${e.schemaPath}${(0,jr.getProperty)(t)}${(0,jr.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Wy.escapeFragment)(n)}`}}if(r!==void 0){if(a===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:a,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Da.getSubschema=KE;function WE(e,t,{dataProp:n,dataPropType:r,data:a,dataTypes:o,propertyName:s}){if(a!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(n!==void 0){const{errorPath:c,dataPathArr:u,opts:d}=t,h=i.let("data",(0,jr._)`${t.data}${(0,jr.getProperty)(n)}`,!0);l(h),e.errorPath=(0,jr.str)`${c}${(0,Wy.getErrorPath)(n,r,d.jsPropertySyntax)}`,e.parentDataProperty=(0,jr._)`${n}`,e.dataPathArr=[...u,e.parentDataProperty]}if(a!==void 0){const c=a instanceof jr.Name?a:i.let("data",a,!0);l(c),s!==void 0&&(e.propertyName=s)}o&&(e.dataTypes=o);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Da.extendSubschemaData=WE;function qE(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:a,allErrors:o}){r!==void 0&&(e.compositeRule=r),a!==void 0&&(e.createErrors=a),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}Da.extendSubschemaMode=qE;var kn={},qy=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,a,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;a--!==0;){var s=o[a];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},Gy={exports:{}},Ma=Gy.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var r=typeof n=="function"?n:n.pre||function(){},a=n.post||function(){};il(t,r,a,e,"",e)};Ma.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ma.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ma.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ma.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function il(e,t,n,r,a,o,s,i,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,a,o,s,i,l,c);for(var u in r){var d=r[u];if(Array.isArray(d)){if(u in Ma.arrayKeywords)for(var h=0;h<d.length;h++)il(e,t,n,d[h],a+"/"+u+"/"+h,o,a,u,r,h)}else if(u in Ma.propsKeywords){if(d&&typeof d=="object")for(var m in d)il(e,t,n,d[m],a+"/"+u+"/"+GE(m),o,a,u,r,m)}else(u in Ma.keywords||e.allKeys&&!(u in Ma.skipKeywords))&&il(e,t,n,d,a+"/"+u,o,a,u,r)}n(r,a,o,s,i,l,c)}}function GE(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var JE=Gy.exports;Object.defineProperty(kn,"__esModule",{value:!0});kn.getSchemaRefs=kn.resolveUrl=kn.normalizeId=kn._getFullPath=kn.getFullPath=kn.inlineRef=void 0;const YE=Ke,XE=qy,QE=JE,ZE=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function ek(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Xu(e):t?Jy(e)<=t:!1}kn.inlineRef=ek;const tk=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xu(e){for(const t in e){if(tk.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(Xu)||typeof n=="object"&&Xu(n))return!0}return!1}function Jy(e){let t=0;for(const n in e){if(n==="$ref")return 1/0;if(t++,!ZE.has(n)&&(typeof e[n]=="object"&&(0,YE.eachItem)(e[n],r=>t+=Jy(r)),t===1/0))return 1/0}return t}function Yy(e,t="",n){n!==!1&&(t=qo(t));const r=e.parse(t);return Xy(e,r)}kn.getFullPath=Yy;function Xy(e,t){return e.serialize(t).split("#")[0]+"#"}kn._getFullPath=Xy;const nk=/#\/?$/;function qo(e){return e?e.replace(nk,""):""}kn.normalizeId=qo;function rk(e,t,n){return n=qo(n),e.resolve(t,n)}kn.resolveUrl=rk;const ak=/^[a-z_][-a-z0-9._]*$/i;function ok(e,t){if(typeof e=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,a=qo(e[n]||t),o={"":a},s=Yy(r,a,!1),i={},l=new Set;return QE(e,{allKeys:!0},(d,h,m,_)=>{if(_===void 0)return;const g=s+h;let w=o[_];typeof d[n]=="string"&&(w=A.call(this,d[n])),C.call(this,d.$anchor),C.call(this,d.$dynamicAnchor),o[h]=w;function A(y){const p=this.opts.uriResolver.resolve;if(y=qo(w?p(w,y):y),l.has(y))throw u(y);l.add(y);let b=this.refs[y];return typeof b=="string"&&(b=this.refs[b]),typeof b=="object"?c(d,b.schema,y):y!==qo(g)&&(y[0]==="#"?(c(d,i[y],y),i[y]=d):this.refs[y]=g),y}function C(y){if(typeof y=="string"){if(!ak.test(y))throw new Error(`invalid anchor "${y}"`);A.call(this,`#${y}`)}}}),i;function c(d,h,m){if(h!==void 0&&!XE(d,h))throw u(m)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}kn.getSchemaRefs=ok;Object.defineProperty(Er,"__esModule",{value:!0});Er.getData=Er.KeywordCxt=Er.validateFunctionCode=void 0;const Qy=es,sm=pn,Wd=sa,Pl=pn,sk=lc,Us=Vr,du=Da,nt=wt,ct=Gr,ik=kn,ia=Ke,Is=hi;function lk(e){if(t_(e)&&(n_(e),e_(e))){dk(e);return}Zy(e,()=>(0,Qy.topBoolOrEmptySchema)(e))}Er.validateFunctionCode=lk;function Zy({gen:e,validateName:t,schema:n,schemaEnv:r,opts:a},o){a.code.es5?e.func(t,(0,nt._)`${ct.default.data}, ${ct.default.valCxt}`,r.$async,()=>{e.code((0,nt._)`"use strict"; ${im(n,a)}`),uk(e,a),e.code(o)}):e.func(t,(0,nt._)`${ct.default.data}, ${ck(a)}`,r.$async,()=>e.code(im(n,a)).code(o))}function ck(e){return(0,nt._)`{${ct.default.instancePath}="", ${ct.default.parentData}, ${ct.default.parentDataProperty}, ${ct.default.rootData}=${ct.default.data}${e.dynamicRef?(0,nt._)`, ${ct.default.dynamicAnchors}={}`:nt.nil}}={}`}function uk(e,t){e.if(ct.default.valCxt,()=>{e.var(ct.default.instancePath,(0,nt._)`${ct.default.valCxt}.${ct.default.instancePath}`),e.var(ct.default.parentData,(0,nt._)`${ct.default.valCxt}.${ct.default.parentData}`),e.var(ct.default.parentDataProperty,(0,nt._)`${ct.default.valCxt}.${ct.default.parentDataProperty}`),e.var(ct.default.rootData,(0,nt._)`${ct.default.valCxt}.${ct.default.rootData}`),t.dynamicRef&&e.var(ct.default.dynamicAnchors,(0,nt._)`${ct.default.valCxt}.${ct.default.dynamicAnchors}`)},()=>{e.var(ct.default.instancePath,(0,nt._)`""`),e.var(ct.default.parentData,(0,nt._)`undefined`),e.var(ct.default.parentDataProperty,(0,nt._)`undefined`),e.var(ct.default.rootData,ct.default.data),t.dynamicRef&&e.var(ct.default.dynamicAnchors,(0,nt._)`{}`)})}function dk(e){const{schema:t,opts:n,gen:r}=e;Zy(e,()=>{n.$comment&&t.$comment&&a_(e),vk(e),r.let(ct.default.vErrors,null),r.let(ct.default.errors,0),n.unevaluated&&fk(e),r_(e),_k(e)})}function fk(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,nt._)`${n}.evaluated`),t.if((0,nt._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,nt._)`${e.evaluated}.props`,(0,nt._)`undefined`)),t.if((0,nt._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,nt._)`${e.evaluated}.items`,(0,nt._)`undefined`))}function im(e,t){const n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,nt._)`/*# sourceURL=${n} */`:nt.nil}function pk(e,t){if(t_(e)&&(n_(e),e_(e))){hk(e,t);return}(0,Qy.boolOrEmptySchema)(e,t)}function e_({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function t_(e){return typeof e.schema!="boolean"}function hk(e,t){const{schema:n,gen:r,opts:a}=e;a.$comment&&n.$comment&&a_(e),gk(e),yk(e);const o=r.const("_errs",ct.default.errors);r_(e,o),r.var(t,(0,nt._)`${o} === ${ct.default.errors}`)}function n_(e){(0,ia.checkUnknownRules)(e),mk(e)}function r_(e,t){if(e.opts.jtd)return lm(e,[],!1,t);const n=(0,sm.getSchemaTypes)(e.schema),r=(0,sm.coerceAndCheckDataType)(e,n);lm(e,n,!r,t)}function mk(e){const{schema:t,errSchemaPath:n,opts:r,self:a}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,ia.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function vk(e){const{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,ia.checkStrictMode)(e,"default is ignored in the schema root")}function gk(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,ik.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function yk(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function a_({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:a}){const o=n.$comment;if(a.$comment===!0)e.code((0,nt._)`${ct.default.self}.logger.log(${o})`);else if(typeof a.$comment=="function"){const s=(0,nt.str)`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,nt._)`${ct.default.self}.opts.$comment(${o}, ${s}, ${i}.schema)`)}}function _k(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:a,opts:o}=e;n.$async?t.if((0,nt._)`${ct.default.errors} === 0`,()=>t.return(ct.default.data),()=>t.throw((0,nt._)`new ${a}(${ct.default.vErrors})`)):(t.assign((0,nt._)`${r}.errors`,ct.default.vErrors),o.unevaluated&&bk(e),t.return((0,nt._)`${ct.default.errors} === 0`))}function bk({gen:e,evaluated:t,props:n,items:r}){n instanceof nt.Name&&e.assign((0,nt._)`${t}.props`,n),r instanceof nt.Name&&e.assign((0,nt._)`${t}.items`,r)}function lm(e,t,n,r){const{gen:a,schema:o,data:s,allErrors:i,opts:l,self:c}=e,{RULES:u}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,ia.schemaHasRulesButRef)(o,u))){a.block(()=>i_(e,"$ref",u.all.$ref.definition));return}l.jtd||wk(e,t),a.block(()=>{for(const h of u.rules)d(h);d(u.post)});function d(h){(0,Wd.shouldUseGroup)(o,h)&&(h.type?(a.if((0,Pl.checkDataType)(h.type,s,l.strictNumbers)),cm(e,h),t.length===1&&t[0]===h.type&&n&&(a.else(),(0,Pl.reportTypeError)(e)),a.endIf()):cm(e,h),i||a.if((0,nt._)`${ct.default.errors} === ${r||0}`))}}function cm(e,t){const{gen:n,schema:r,opts:{useDefaults:a}}=e;a&&(0,sk.assignDefaults)(e,t.type),n.block(()=>{for(const o of t.rules)(0,Wd.shouldUseRule)(r,o)&&i_(e,o.keyword,o.definition,t.type)})}function wk(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Ak(e,t),e.opts.allowUnionTypes||Ck(e,t),$k(e,e.dataTypes))}function Ak(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{o_(e.dataTypes,n)||qd(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),Ik(e,t)}}function Ck(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&qd(e,"use allowUnionTypes to allow union type keyword")}function $k(e,t){const n=e.self.RULES.all;for(const r in n){const a=n[r];if(typeof a=="object"&&(0,Wd.shouldUseRule)(e.schema,a)){const{type:o}=a.definition;o.length&&!o.some(s=>Sk(t,s))&&qd(e,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function Sk(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function o_(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Ik(e,t){const n=[];for(const r of e.dataTypes)o_(t,r)?n.push(r):t.includes("integer")&&r==="number"&&n.push("integer");e.dataTypes=n}function qd(e,t){const n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,ia.checkStrictMode)(e,t,e.opts.strictTypes)}class s_{constructor(t,n,r){if((0,Us.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ia.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",l_(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Us.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ct.default.errors))}result(t,n,r){this.failResult((0,nt.not)(t),n,r)}failResult(t,n,r){this.gen.if(t),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,nt.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:n}=this;this.fail((0,nt._)`${n} !== undefined && (${(0,nt.or)(this.invalid$data(),t)})`)}error(t,n,r){if(n){this.setParams(n),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,n){(t?Is.reportExtraError:Is.reportError)(this,this.def.error,n)}$dataError(){(0,Is.reportError)(this,this.def.$dataError||Is.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Is.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,r=nt.nil){this.gen.block(()=>{this.check$data(t,r),n()})}check$data(t=nt.nil,n=nt.nil){if(!this.$data)return;const{gen:r,schemaCode:a,schemaType:o,def:s}=this;r.if((0,nt.or)((0,nt._)`${a} === undefined`,n)),t!==nt.nil&&r.assign(t,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==nt.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:n,schemaType:r,def:a,it:o}=this;return(0,nt.or)(s(),i());function s(){if(r.length){if(!(n instanceof nt.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,nt._)`${(0,Pl.checkDataTypes)(l,n,o.opts.strictNumbers,Pl.DataType.Wrong)}`}return nt.nil}function i(){if(a.validateSchema){const l=t.scopeValue("validate$data",{ref:a.validateSchema});return(0,nt._)`!${l}(${n})`}return nt.nil}}subschema(t,n){const r=(0,du.getSubschema)(this.it,t);(0,du.extendSubschemaData)(r,this.it,t),(0,du.extendSubschemaMode)(r,t);const a={...this.it,...r,items:void 0,props:void 0};return pk(a,n),a}mergeEvaluated(t,n){const{it:r,gen:a}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=ia.mergeEvaluated.props(a,t.props,r.props,n)),r.items!==!0&&t.items!==void 0&&(r.items=ia.mergeEvaluated.items(a,t.items,r.items,n)))}mergeValidEvaluated(t,n){const{it:r,gen:a}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return a.if(n,()=>this.mergeEvaluated(t,nt.Name)),!0}}Er.KeywordCxt=s_;function i_(e,t,n,r){const a=new s_(e,n,t);"code"in n?n.code(a,r):a.$data&&n.validate?(0,Us.funcKeywordCode)(a,n):"macro"in n?(0,Us.macroKeywordCode)(a,n):(n.compile||n.validate)&&(0,Us.funcKeywordCode)(a,n)}const Ek=/^\/(?:[^~]|~0|~1)*$/,kk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function l_(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let a,o;if(e==="")return ct.default.rootData;if(e[0]==="/"){if(!Ek.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,o=ct.default.rootData}else{const c=kk.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const u=+c[1];if(a=c[2],a==="#"){if(u>=t)throw new Error(l("property/index",u));return r[t-u]}if(u>t)throw new Error(l("data",u));if(o=n[t-u],!a)return o}let s=o;const i=a.split("/");for(const c of i)c&&(o=(0,nt._)`${o}${(0,nt.getProperty)((0,ia.unescapeJsonPointer)(c))}`,s=(0,nt._)`${s} && ${o}`);return s;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${t}`}}Er.getData=l_;var mi={};Object.defineProperty(mi,"__esModule",{value:!0});class Tk extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}mi.default=Tk;var is={};Object.defineProperty(is,"__esModule",{value:!0});const fu=kn;class xk extends Error{constructor(t,n,r,a){super(a||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,fu.resolveUrl)(t,n,r),this.missingSchema=(0,fu.normalizeId)((0,fu.getFullPath)(t,this.missingRef))}}is.default=xk;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.resolveSchema=Yn.getCompilingSchema=Yn.resolveRef=Yn.compileSchema=Yn.SchemaEnv=void 0;const br=wt,Pk=mi,eo=Gr,Sr=kn,um=Ke,Mk=Er;class cc{constructor(t){var n;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,Sr.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Yn.SchemaEnv=cc;function Gd(e){const t=c_.call(this,e);if(t)return t;const n=(0,Sr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:r,lines:a}=this.opts.code,{ownProperties:o}=this.opts,s=new br.CodeGen(this.scope,{es5:r,lines:a,ownProperties:o});let i;e.$async&&(i=s.scopeValue("Error",{ref:Pk.default,code:(0,br._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");e.validateName=l;const c={gen:s,allErrors:this.opts.allErrors,data:eo.default.data,parentData:eo.default.parentData,parentDataProperty:eo.default.parentDataProperty,dataNames:[eo.default.data],dataPathArr:[br.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,br.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:i,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:br.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,br._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,Mk.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);const d=s.toString();u=`${s.scopeRefs(eo.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const m=new Function(`${eo.default.self}`,`${eo.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){const{props:_,items:g}=c;m.evaluated={props:_ instanceof br.Name?void 0:_,items:g instanceof br.Name?void 0:g,dynamicProps:_ instanceof br.Name,dynamicItems:g instanceof br.Name},m.source&&(m.source.evaluated=(0,br.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(e)}}Yn.compileSchema=Gd;function Ok(e,t,n){var r;n=(0,Sr.resolveUrl)(this.opts.uriResolver,t,n);const a=e.refs[n];if(a)return a;let o=Lk.call(this,e,n);if(o===void 0){const s=(r=e.localRefs)===null||r===void 0?void 0:r[n],{schemaId:i}=this.opts;s&&(o=new cc({schema:s,schemaId:i,root:e,baseId:t}))}if(o!==void 0)return e.refs[n]=Nk.call(this,o)}Yn.resolveRef=Ok;function Nk(e){return(0,Sr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Gd.call(this,e)}function c_(e){for(const t of this._compilations)if(Rk(t,e))return t}Yn.getCompilingSchema=c_;function Rk(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Lk(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||uc.call(this,e,t)}function uc(e,t){const n=this.opts.uriResolver.parse(t),r=(0,Sr._getFullPath)(this.opts.uriResolver,n);let a=(0,Sr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return pu.call(this,n,e);const o=(0,Sr.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){const i=uc.call(this,e,s);return typeof(i==null?void 0:i.schema)!="object"?void 0:pu.call(this,n,i)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Gd.call(this,s),o===(0,Sr.normalizeId)(t)){const{schema:i}=s,{schemaId:l}=this.opts,c=i[l];return c&&(a=(0,Sr.resolveUrl)(this.opts.uriResolver,a,c)),new cc({schema:i,schemaId:l,root:e,baseId:a})}return pu.call(this,n,s)}}Yn.resolveSchema=uc;const Dk=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function pu(e,{baseId:t,schema:n,root:r}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const i of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,um.unescapeFragment)(i)];if(l===void 0)return;n=l;const c=typeof n=="object"&&n[this.opts.schemaId];!Dk.has(i)&&c&&(t=(0,Sr.resolveUrl)(this.opts.uriResolver,t,c))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,um.schemaHasRulesButRef)(n,this.RULES)){const i=(0,Sr.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=uc.call(this,r,i)}const{schemaId:s}=this.opts;if(o=o||new cc({schema:n,schemaId:s,root:r,baseId:t}),o.schema!==o.root.schema)return o}const Bk="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Fk="Meta-schema for $data reference (JSON AnySchema extension proposal)",jk="object",Vk=["$data"],Uk={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Hk=!1,zk={$id:Bk,description:Fk,type:jk,required:Vk,properties:Uk,additionalProperties:Hk};var Jd={},dc={exports:{}};const Kk={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var Wk={HEX:Kk};const{HEX:qk}=Wk;function u_(e){if(f_(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?: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])$/u)||[],[n]=t;return n?{host:Jk(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Qu(e,t=!1){let n="",r=!0;for(const a of e){if(qk[a]===void 0)return;a!=="0"&&r===!0&&(r=!1),r||(n+=a)}return t&&n.length===0&&(n="0"),n}function Gk(e){let t=0;const n={error:!1,address:"",zone:""},r=[],a=[];let o=!1,s=!1,i=!1;function l(){if(a.length){if(o===!1){const c=Qu(a);if(c!==void 0)r.push(c);else return n.error=!0,!1}a.length=0}return!0}for(let c=0;c<e.length;c++){const u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(s===!0&&(i=!0),!l())break;if(t++,r.push(":"),t>7){n.error=!0;break}c-1>=0&&e[c-1]===":"&&(s=!0);continue}else if(u==="%"){if(!l())break;o=!0}else{a.push(u);continue}}return a.length&&(o?n.zone=a.join(""):i?r.push(a.join("")):r.push(Qu(a))),n.address=r.join(""),n}function d_(e,t={}){if(f_(e,":")<2)return{host:e,isIPV6:!1};const n=Gk(e);if(n.error)return{host:e,isIPV6:!1};{let r=n.address,a=n.address;return n.zone&&(r+="%"+n.zone,a+="%25"+n.zone),{host:r,escapedHost:a,isIPV6:!0}}}function Jk(e,t){let n="",r=!0;const a=e.length;for(let o=0;o<a;o++){const s=e[o];s==="0"&&r?(o+1<=a&&e[o+1]===t||o+1===a)&&(n+=s,r=!1):(s===t?r=!0:r=!1,n+=s)}return n}function f_(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}const dm=/^\.\.?\//u,fm=/^\/\.(?:\/|$)/u,pm=/^\/\.\.(?:\/|$)/u,Yk=/^\/?(?:.|\n)*?(?=\/|$)/u;function Xk(e){const t=[];for(;e.length;)if(e.match(dm))e=e.replace(dm,"");else if(e.match(fm))e=e.replace(fm,"/");else if(e.match(pm))e=e.replace(pm,"/"),t.pop();else if(e==="."||e==="..")e="";else{const n=e.match(Yk);if(n){const r=n[0];e=e.slice(r.length),t.push(r)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function Qk(e,t){const n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function Zk(e,t){const n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push("@")),e.host!==void 0){let r=unescape(e.host);const a=u_(r);if(a.isIPV4)r=a.host;else{const o=d_(a.host,{isIPV4:!1});o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}n.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var eT={recomposeAuthority:Zk,normalizeComponentEncoding:Qk,removeDotSegments:Xk,normalizeIPv4:u_,normalizeIPv6:d_,stringArrayToHexStripped:Qu};const tT=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,nT=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function p_(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function h_(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function m_(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function rT(e){return e.secure=p_(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function aT(e){if((e.port===(p_(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function oT(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(nT);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const a=`${r}:${t.nid||e.nid}`,o=Yd[a];e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function sT(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),a=`${n}:${t.nid||r}`,o=Yd[a];o&&(e=o.serialize(e,t));const s=e,i=e.nss;return s.path=`${r||t.nid}:${i}`,t.skipEscape=!0,s}function iT(e,t){const n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!tT.test(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function lT(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const v_={scheme:"http",domainHost:!0,parse:h_,serialize:m_},cT={scheme:"https",domainHost:v_.domainHost,parse:h_,serialize:m_},ll={scheme:"ws",domainHost:!0,parse:rT,serialize:aT},uT={scheme:"wss",domainHost:ll.domainHost,parse:ll.parse,serialize:ll.serialize},dT={scheme:"urn",parse:oT,serialize:sT,skipNormalize:!0},fT={scheme:"urn:uuid",parse:iT,serialize:lT,skipNormalize:!0},Yd={http:v_,https:cT,ws:ll,wss:uT,urn:dT,"urn:uuid":fT};var pT=Yd;const{normalizeIPv6:hT,normalizeIPv4:mT,removeDotSegments:Ms,recomposeAuthority:vT,normalizeComponentEncoding:Ki}=eT,Xd=pT;function gT(e,t){return typeof e=="string"?e=Ur(fa(e,t),t):typeof e=="object"&&(e=fa(Ur(e,t),t)),e}function yT(e,t,n){const r=Object.assign({scheme:"null"},n),a=g_(fa(e,r),fa(t,r),r,!0);return Ur(a,{...r,skipEscape:!0})}function g_(e,t,n,r){const a={};return r||(e=fa(Ur(e,n),n),t=fa(Ur(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=Ms(t.path||""),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=Ms(t.path||""),a.query=t.query):(t.path?(t.path.charAt(0)==="/"?a.path=Ms(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path="/"+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path,a.path=Ms(a.path)),a.query=t.query):(a.path=e.path,t.query!==void 0?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function _T(e,t,n){return typeof e=="string"?(e=unescape(e),e=Ur(Ki(fa(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Ur(Ki(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Ur(Ki(fa(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Ur(Ki(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Ur(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),a=[],o=Xd[(r.scheme||n.scheme||"").toLowerCase()];o&&o.serialize&&o.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&a.push(n.scheme,":");const s=vT(n,r);if(s!==void 0&&(r.reference!=="suffix"&&a.push("//"),a.push(s),n.path&&n.path.charAt(0)!=="/"&&a.push("/")),n.path!==void 0){let i=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(i=Ms(i)),s===void 0&&(i=i.replace(/^\/\//u,"/%2F")),a.push(i)}return n.query!==void 0&&a.push("?",n.query),n.fragment!==void 0&&a.push("#",n.fragment),a.join("")}const bT=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function wT(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||bT[t])return!0;return!1}const AT=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function fa(e,t){const n=Object.assign({},t),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=e.indexOf("%")!==-1;let o=!1;n.reference==="suffix"&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const s=e.match(AT);if(s){if(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]),r.host){const l=mT(r.host);if(l.isIPV4===!1){const c=hT(l.host,{isIPV4:!1});r.host=c.host.toLowerCase(),o=c.isIPV6}else r.host=l.host,o=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&!r.path&&r.query===void 0?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const i=Xd[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!i||!i.unicodeSupport)&&r.host&&(n.domainHost||i&&i.domainHost)&&o===!1&&wT(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!i||i&&!i.skipNormalize)&&(a&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),a&&r.host!==void 0&&(r.host=unescape(r.host)),r.path!==void 0&&r.path.length&&(r.path=escape(unescape(r.path))),r.fragment!==void 0&&r.fragment.length&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),i&&i.parse&&i.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const Qd={SCHEMES:Xd,normalize:gT,resolve:yT,resolveComponents:g_,equal:_T,serialize:Ur,parse:fa};dc.exports=Qd;dc.exports.default=Qd;dc.exports.fastUri=Qd;var CT=dc.exports;Object.defineProperty(Jd,"__esModule",{value:!0});const y_=CT;y_.code='require("ajv/dist/runtime/uri").default';Jd.default=y_;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Er;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=wt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=mi,a=is,o=ho,s=Yn,i=wt,l=kn,c=pn,u=Ke,d=zk,h=Jd,m=(me,V)=>new RegExp(me,V);m.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function y(me){var V,ue,J,I,O,ie,Be,je,ne,Q,se,le,k,x,q,pe,B,z,ae,F,U,Y,fe,ve,Pe;const Le=me.strict,rt=(V=me.code)===null||V===void 0?void 0:V.optimize,pt=rt===!0||rt===void 0?1:rt||0,dt=(J=(ue=me.code)===null||ue===void 0?void 0:ue.regExp)!==null&&J!==void 0?J:m,zt=(I=me.uriResolver)!==null&&I!==void 0?I:h.default;return{strictSchema:(ie=(O=me.strictSchema)!==null&&O!==void 0?O:Le)!==null&&ie!==void 0?ie:!0,strictNumbers:(je=(Be=me.strictNumbers)!==null&&Be!==void 0?Be:Le)!==null&&je!==void 0?je:!0,strictTypes:(Q=(ne=me.strictTypes)!==null&&ne!==void 0?ne:Le)!==null&&Q!==void 0?Q:"log",strictTuples:(le=(se=me.strictTuples)!==null&&se!==void 0?se:Le)!==null&&le!==void 0?le:"log",strictRequired:(x=(k=me.strictRequired)!==null&&k!==void 0?k:Le)!==null&&x!==void 0?x:!1,code:me.code?{...me.code,optimize:pt,regExp:dt}:{optimize:pt,regExp:dt},loopRequired:(q=me.loopRequired)!==null&&q!==void 0?q:C,loopEnum:(pe=me.loopEnum)!==null&&pe!==void 0?pe:C,meta:(B=me.meta)!==null&&B!==void 0?B:!0,messages:(z=me.messages)!==null&&z!==void 0?z:!0,inlineRefs:(ae=me.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(F=me.schemaId)!==null&&F!==void 0?F:"$id",addUsedSchema:(U=me.addUsedSchema)!==null&&U!==void 0?U:!0,validateSchema:(Y=me.validateSchema)!==null&&Y!==void 0?Y:!0,validateFormats:(fe=me.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(ve=me.unicodeRegExp)!==null&&ve!==void 0?ve:!0,int32range:(Pe=me.int32range)!==null&&Pe!==void 0?Pe:!0,uriResolver:zt}}class p{constructor(V={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,V=this.opts={...V,...y(V)};const{es5:ue,lines:J}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:g,es5:ue,lines:J}),this.logger=de(V.logger);const I=V.validateFormats;V.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,w,V,"NOT SUPPORTED"),b.call(this,A,V,"DEPRECATED","warn"),this._metaOpts=Z.call(this),V.formats&&K.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),V.keywords&&G.call(this,V.keywords),typeof V.meta=="object"&&this.addMetaSchema(V.meta),R.call(this),V.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:V,meta:ue,schemaId:J}=this.opts;let I=d;J==="id"&&(I={...d},I.id=I.$id,delete I.$id),ue&&V&&this.addMetaSchema(I,I[J],!1)}defaultMeta(){const{meta:V,schemaId:ue}=this.opts;return this.opts.defaultMeta=typeof V=="object"?V[ue]||V:void 0}validate(V,ue){let J;if(typeof V=="string"){if(J=this.getSchema(V),!J)throw new Error(`no schema with key or ref "${V}"`)}else J=this.compile(V);const I=J(ue);return"$async"in J||(this.errors=J.errors),I}compile(V,ue){const J=this._addSchema(V,ue);return J.validate||this._compileSchemaEnv(J)}compileAsync(V,ue){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:J}=this.opts;return I.call(this,V,ue);async function I(Q,se){await O.call(this,Q.$schema);const le=this._addSchema(Q,se);return le.validate||ie.call(this,le)}async function O(Q){Q&&!this.getSchema(Q)&&await I.call(this,{$ref:Q},!0)}async function ie(Q){try{return this._compileSchemaEnv(Q)}catch(se){if(!(se instanceof a.default))throw se;return Be.call(this,se),await je.call(this,se.missingSchema),ie.call(this,Q)}}function Be({missingSchema:Q,missingRef:se}){if(this.refs[Q])throw new Error(`AnySchema ${Q} is loaded but ${se} cannot be resolved`)}async function je(Q){const se=await ne.call(this,Q);this.refs[Q]||await O.call(this,se.$schema),this.refs[Q]||this.addSchema(se,Q,ue)}async function ne(Q){const se=this._loading[Q];if(se)return se;try{return await(this._loading[Q]=J(Q))}finally{delete this._loading[Q]}}}addSchema(V,ue,J,I=this.opts.validateSchema){if(Array.isArray(V)){for(const ie of V)this.addSchema(ie,void 0,J,I);return this}let O;if(typeof V=="object"){const{schemaId:ie}=this.opts;if(O=V[ie],O!==void 0&&typeof O!="string")throw new Error(`schema ${ie} must be string`)}return ue=(0,l.normalizeId)(ue||O),this._checkUnique(ue),this.schemas[ue]=this._addSchema(V,J,ue,I,!0),this}addMetaSchema(V,ue,J=this.opts.validateSchema){return this.addSchema(V,ue,!0,J),this}validateSchema(V,ue){if(typeof V=="boolean")return!0;let J;if(J=V.$schema,J!==void 0&&typeof J!="string")throw new Error("$schema must be a string");if(J=J||this.opts.defaultMeta||this.defaultMeta(),!J)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const I=this.validate(J,V);if(!I&&ue){const O="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(O);else throw new Error(O)}return I}getSchema(V){let ue;for(;typeof(ue=S.call(this,V))=="string";)V=ue;if(ue===void 0){const{schemaId:J}=this.opts,I=new s.SchemaEnv({schema:{},schemaId:J});if(ue=s.resolveSchema.call(this,I,V),!ue)return;this.refs[V]=ue}return ue.validate||this._compileSchemaEnv(ue)}removeSchema(V){if(V instanceof RegExp)return this._removeAllSchemas(this.schemas,V),this._removeAllSchemas(this.refs,V),this;switch(typeof V){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ue=S.call(this,V);return typeof ue=="object"&&this._cache.delete(ue.schema),delete this.schemas[V],delete this.refs[V],this}case"object":{const ue=V;this._cache.delete(ue);let J=V[this.opts.schemaId];return J&&(J=(0,l.normalizeId)(J),delete this.schemas[J],delete this.refs[J]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(V){for(const ue of V)this.addKeyword(ue);return this}addKeyword(V,ue){let J;if(typeof V=="string")J=V,typeof ue=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ue.keyword=J);else if(typeof V=="object"&&ue===void 0){if(ue=V,J=ue.keyword,Array.isArray(J)&&!J.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(we.call(this,J,ue),!ue)return(0,u.eachItem)(J,O=>Ge.call(this,O)),this;ye.call(this,ue);const I={...ue,type:(0,c.getJSONTypes)(ue.type),schemaType:(0,c.getJSONTypes)(ue.schemaType)};return(0,u.eachItem)(J,I.type.length===0?O=>Ge.call(this,O,I):O=>I.type.forEach(ie=>Ge.call(this,O,I,ie))),this}getKeyword(V){const ue=this.RULES.all[V];return typeof ue=="object"?ue.definition:!!ue}removeKeyword(V){const{RULES:ue}=this;delete ue.keywords[V],delete ue.all[V];for(const J of ue.rules){const I=J.rules.findIndex(O=>O.keyword===V);I>=0&&J.rules.splice(I,1)}return this}addFormat(V,ue){return typeof ue=="string"&&(ue=new RegExp(ue)),this.formats[V]=ue,this}errorsText(V=this.errors,{separator:ue=", ",dataVar:J="data"}={}){return!V||V.length===0?"No errors":V.map(I=>`${J}${I.instancePath} ${I.message}`).reduce((I,O)=>I+ue+O)}$dataMetaSchema(V,ue){const J=this.RULES.all;V=JSON.parse(JSON.stringify(V));for(const I of ue){const O=I.split("/").slice(1);let ie=V;for(const Be of O)ie=ie[Be];for(const Be in J){const je=J[Be];if(typeof je!="object")continue;const{$data:ne}=je.definition,Q=ie[Be];ne&&Q&&(ie[Be]=He(Q))}}return V}_removeAllSchemas(V,ue){for(const J in V){const I=V[J];(!ue||ue.test(J))&&(typeof I=="string"?delete V[J]:I&&!I.meta&&(this._cache.delete(I.schema),delete V[J]))}}_addSchema(V,ue,J,I=this.opts.validateSchema,O=this.opts.addUsedSchema){let ie;const{schemaId:Be}=this.opts;if(typeof V=="object")ie=V[Be];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof V!="boolean")throw new Error("schema must be object or boolean")}let je=this._cache.get(V);if(je!==void 0)return je;J=(0,l.normalizeId)(ie||J);const ne=l.getSchemaRefs.call(this,V,J);return je=new s.SchemaEnv({schema:V,schemaId:Be,meta:ue,baseId:J,localRefs:ne}),this._cache.set(je.schema,je),O&&!J.startsWith("#")&&(J&&this._checkUnique(J),this.refs[J]=je),I&&this.validateSchema(V,!0),je}_checkUnique(V){if(this.schemas[V]||this.refs[V])throw new Error(`schema with key or id "${V}" already exists`)}_compileSchemaEnv(V){if(V.meta?this._compileMetaSchema(V):s.compileSchema.call(this,V),!V.validate)throw new Error("ajv implementation error");return V.validate}_compileMetaSchema(V){const ue=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,V)}finally{this.opts=ue}}}p.ValidationError=r.default,p.MissingRefError=a.default,e.default=p;function b(me,V,ue,J="error"){for(const I in me){const O=I;O in V&&this.logger[J](`${ue}: option ${I}. ${me[O]}`)}}function S(me){return me=(0,l.normalizeId)(me),this.schemas[me]||this.refs[me]}function R(){const me=this.opts.schemas;if(me)if(Array.isArray(me))this.addSchema(me);else for(const V in me)this.addSchema(me[V],V)}function K(){for(const me in this.opts.formats){const V=this.opts.formats[me];V&&this.addFormat(me,V)}}function G(me){if(Array.isArray(me)){this.addVocabulary(me);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const V in me){const ue=me[V];ue.keyword||(ue.keyword=V),this.addKeyword(ue)}}function Z(){const me={...this.opts};for(const V of _)delete me[V];return me}const Ie={log(){},warn(){},error(){}};function de(me){if(me===!1)return Ie;if(me===void 0)return console;if(me.log&&me.warn&&me.error)return me;throw new Error("logger must implement log, warn and error methods")}const Ae=/^[a-z_$][a-z0-9_$:-]*$/i;function we(me,V){const{RULES:ue}=this;if((0,u.eachItem)(me,J=>{if(ue.keywords[J])throw new Error(`Keyword ${J} is already defined`);if(!Ae.test(J))throw new Error(`Keyword ${J} has invalid name`)}),!!V&&V.$data&&!("code"in V||"validate"in V))throw new Error('$data keyword must have "code" or "validate" function')}function Ge(me,V,ue){var J;const I=V==null?void 0:V.post;if(ue&&I)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:O}=this;let ie=I?O.post:O.rules.find(({type:je})=>je===ue);if(ie||(ie={type:ue,rules:[]},O.rules.push(ie)),O.keywords[me]=!0,!V)return;const Be={keyword:me,definition:{...V,type:(0,c.getJSONTypes)(V.type),schemaType:(0,c.getJSONTypes)(V.schemaType)}};V.before?xe.call(this,ie,Be,V.before):ie.rules.push(Be),O.all[me]=Be,(J=V.implements)===null||J===void 0||J.forEach(je=>this.addKeyword(je))}function xe(me,V,ue){const J=me.rules.findIndex(I=>I.keyword===ue);J>=0?me.rules.splice(J,0,V):(me.rules.push(V),this.logger.warn(`rule ${ue} is not defined`))}function ye(me){let{metaSchema:V}=me;V!==void 0&&(me.$data&&this.opts.$data&&(V=He(V)),me.validateSchema=this.compile(V,!0))}const _e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function He(me){return{anyOf:[me,_e]}}})(Py);var Zd={},ef={},tf={};Object.defineProperty(tf,"__esModule",{value:!0});const $T={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};tf.default=$T;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.callRef=mo.getValidate=void 0;const ST=is,hm=_t,qn=wt,Mo=Gr,mm=Yn,Wi=Ke,IT={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:r}=e,{baseId:a,schemaEnv:o,validateName:s,opts:i,self:l}=r,{root:c}=o;if((n==="#"||n==="#/")&&a===c.baseId)return d();const u=mm.resolveRef.call(l,c,a,n);if(u===void 0)throw new ST.default(r.opts.uriResolver,a,n);if(u instanceof mm.SchemaEnv)return h(u);return m(u);function d(){if(o===c)return cl(e,s,o,o.$async);const _=t.scopeValue("root",{ref:c});return cl(e,(0,qn._)`${_}.validate`,c,c.$async)}function h(_){const g=__(e,_);cl(e,g,_,_.$async)}function m(_){const g=t.scopeValue("schema",i.code.source===!0?{ref:_,code:(0,qn.stringify)(_)}:{ref:_}),w=t.name("valid"),A=e.subschema({schema:_,dataTypes:[],schemaPath:qn.nil,topSchemaRef:g,errSchemaPath:n},w);e.mergeEvaluated(A),e.ok(w)}}};function __(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,qn._)`${n.scopeValue("wrapper",{ref:t})}.validate`}mo.getValidate=__;function cl(e,t,n,r){const{gen:a,it:o}=e,{allErrors:s,schemaEnv:i,opts:l}=o,c=l.passContext?Mo.default.this:qn.nil;r?u():d();function u(){if(!i.$async)throw new Error("async schema referenced by sync schema");const _=a.let("valid");a.try(()=>{a.code((0,qn._)`await ${(0,hm.callValidateCode)(e,t,c)}`),m(t),s||a.assign(_,!0)},g=>{a.if((0,qn._)`!(${g} instanceof ${o.ValidationError})`,()=>a.throw(g)),h(g),s||a.assign(_,!1)}),e.ok(_)}function d(){e.result((0,hm.callValidateCode)(e,t,c),()=>m(t),()=>h(t))}function h(_){const g=(0,qn._)`${_}.errors`;a.assign(Mo.default.vErrors,(0,qn._)`${Mo.default.vErrors} === null ? ${g} : ${Mo.default.vErrors}.concat(${g})`),a.assign(Mo.default.errors,(0,qn._)`${Mo.default.vErrors}.length`)}function m(_){var g;if(!o.opts.unevaluated)return;const w=(g=n==null?void 0:n.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=Wi.mergeEvaluated.props(a,w.props,o.props));else{const A=a.var("props",(0,qn._)`${_}.evaluated.props`);o.props=Wi.mergeEvaluated.props(a,A,o.props,qn.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=Wi.mergeEvaluated.items(a,w.items,o.items));else{const A=a.var("items",(0,qn._)`${_}.evaluated.items`);o.items=Wi.mergeEvaluated.items(a,A,o.items,qn.Name)}}}mo.callRef=cl;mo.default=IT;Object.defineProperty(ef,"__esModule",{value:!0});const ET=tf,kT=mo,TT=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ET.default,kT.default];ef.default=TT;var nf={},rf={};Object.defineProperty(rf,"__esModule",{value:!0});const Ml=wt,Ia=Ml.operators,Ol={maximum:{okStr:"<=",ok:Ia.LTE,fail:Ia.GT},minimum:{okStr:">=",ok:Ia.GTE,fail:Ia.LT},exclusiveMaximum:{okStr:"<",ok:Ia.LT,fail:Ia.GTE},exclusiveMinimum:{okStr:">",ok:Ia.GT,fail:Ia.LTE}},xT={message:({keyword:e,schemaCode:t})=>(0,Ml.str)`must be ${Ol[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Ml._)`{comparison: ${Ol[e].okStr}, limit: ${t}}`},PT={keyword:Object.keys(Ol),type:"number",schemaType:"number",$data:!0,error:xT,code(e){const{keyword:t,data:n,schemaCode:r}=e;e.fail$data((0,Ml._)`${n} ${Ol[t].fail} ${r} || isNaN(${n})`)}};rf.default=PT;var af={};Object.defineProperty(af,"__esModule",{value:!0});const Hs=wt,MT={message:({schemaCode:e})=>(0,Hs.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Hs._)`{multipleOf: ${e}}`},OT={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:MT,code(e){const{gen:t,data:n,schemaCode:r,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),i=o?(0,Hs._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Hs._)`${s} !== parseInt(${s})`;e.fail$data((0,Hs._)`(${r} === 0 || (${s} = ${n}/${r}, ${i}))`)}};af.default=OT;var of={},sf={};Object.defineProperty(sf,"__esModule",{value:!0});function b_(e){const t=e.length;let n=0,r=0,a;for(;r<t;)n++,a=e.charCodeAt(r++),a>=55296&&a<=56319&&r<t&&(a=e.charCodeAt(r),(a&64512)===56320&&r++);return n}sf.default=b_;b_.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(of,"__esModule",{value:!0});const ao=wt,NT=Ke,RT=sf,LT={message({keyword:e,schemaCode:t}){const n=e==="maxLength"?"more":"fewer";return(0,ao.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,ao._)`{limit: ${e}}`},DT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:LT,code(e){const{keyword:t,data:n,schemaCode:r,it:a}=e,o=t==="maxLength"?ao.operators.GT:ao.operators.LT,s=a.opts.unicode===!1?(0,ao._)`${n}.length`:(0,ao._)`${(0,NT.useFunc)(e.gen,RT.default)}(${n})`;e.fail$data((0,ao._)`${s} ${o} ${r}`)}};of.default=DT;var lf={};Object.defineProperty(lf,"__esModule",{value:!0});const BT=_t,Nl=wt,FT={message:({schemaCode:e})=>(0,Nl.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Nl._)`{pattern: ${e}}`},jT={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:FT,code(e){const{data:t,$data:n,schema:r,schemaCode:a,it:o}=e,s=o.opts.unicodeRegExp?"u":"",i=n?(0,Nl._)`(new RegExp(${a}, ${s}))`:(0,BT.usePattern)(e,r);e.fail$data((0,Nl._)`!${i}.test(${t})`)}};lf.default=jT;var cf={};Object.defineProperty(cf,"__esModule",{value:!0});const zs=wt,VT={message({keyword:e,schemaCode:t}){const n=e==="maxProperties"?"more":"fewer";return(0,zs.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,zs._)`{limit: ${e}}`},UT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VT,code(e){const{keyword:t,data:n,schemaCode:r}=e,a=t==="maxProperties"?zs.operators.GT:zs.operators.LT;e.fail$data((0,zs._)`Object.keys(${n}).length ${a} ${r}`)}};cf.default=UT;var uf={};Object.defineProperty(uf,"__esModule",{value:!0});const Es=_t,Ks=wt,HT=Ke,zT={message:({params:{missingProperty:e}})=>(0,Ks.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ks._)`{missingProperty: ${e}}`},KT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:zT,code(e){const{gen:t,schema:n,schemaCode:r,data:a,$data:o,it:s}=e,{opts:i}=s;if(!o&&n.length===0)return;const l=n.length>=i.loopRequired;if(s.allErrors?c():u(),i.strictRequired){const m=e.parentSchema.properties,{definedProperties:_}=e.it;for(const g of n)if((m==null?void 0:m[g])===void 0&&!_.has(g)){const w=s.schemaEnv.baseId+s.errSchemaPath,A=`required property "${g}" is not defined at "${w}" (strictRequired)`;(0,HT.checkStrictMode)(s,A,s.opts.strictRequired)}}function c(){if(l||o)e.block$data(Ks.nil,d);else for(const m of n)(0,Es.checkReportMissingProp)(e,m)}function u(){const m=t.let("missing");if(l||o){const _=t.let("valid",!0);e.block$data(_,()=>h(m,_)),e.ok(_)}else t.if((0,Es.checkMissingProp)(e,n,m)),(0,Es.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",r,m=>{e.setParams({missingProperty:m}),t.if((0,Es.noPropertyInData)(t,a,m,i.ownProperties),()=>e.error())})}function h(m,_){e.setParams({missingProperty:m}),t.forOf(m,r,()=>{t.assign(_,(0,Es.propertyInData)(t,a,m,i.ownProperties)),t.if((0,Ks.not)(_),()=>{e.error(),t.break()})},Ks.nil)}}};uf.default=KT;var df={};Object.defineProperty(df,"__esModule",{value:!0});const Ws=wt,WT={message({keyword:e,schemaCode:t}){const n=e==="maxItems"?"more":"fewer";return(0,Ws.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Ws._)`{limit: ${e}}`},qT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:WT,code(e){const{keyword:t,data:n,schemaCode:r}=e,a=t==="maxItems"?Ws.operators.GT:Ws.operators.LT;e.fail$data((0,Ws._)`${n}.length ${a} ${r}`)}};df.default=qT;var ff={},vi={};Object.defineProperty(vi,"__esModule",{value:!0});const w_=qy;w_.code='require("ajv/dist/runtime/equal").default';vi.default=w_;Object.defineProperty(ff,"__esModule",{value:!0});const hu=pn,Sn=wt,GT=Ke,JT=vi,YT={message:({params:{i:e,j:t}})=>(0,Sn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Sn._)`{i: ${e}, j: ${t}}`},XT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:YT,code(e){const{gen:t,data:n,$data:r,schema:a,parentSchema:o,schemaCode:s,it:i}=e;if(!r&&!a)return;const l=t.let("valid"),c=o.items?(0,hu.getSchemaTypes)(o.items):[];e.block$data(l,u,(0,Sn._)`${s} === false`),e.ok(l);function u(){const _=t.let("i",(0,Sn._)`${n}.length`),g=t.let("j");e.setParams({i:_,j:g}),t.assign(l,!0),t.if((0,Sn._)`${_} > 1`,()=>(d()?h:m)(_,g))}function d(){return c.length>0&&!c.some(_=>_==="object"||_==="array")}function h(_,g){const w=t.name("item"),A=(0,hu.checkDataTypes)(c,w,i.opts.strictNumbers,hu.DataType.Wrong),C=t.const("indices",(0,Sn._)`{}`);t.for((0,Sn._)`;${_}--;`,()=>{t.let(w,(0,Sn._)`${n}[${_}]`),t.if(A,(0,Sn._)`continue`),c.length>1&&t.if((0,Sn._)`typeof ${w} == "string"`,(0,Sn._)`${w} += "_"`),t.if((0,Sn._)`typeof ${C}[${w}] == "number"`,()=>{t.assign(g,(0,Sn._)`${C}[${w}]`),e.error(),t.assign(l,!1).break()}).code((0,Sn._)`${C}[${w}] = ${_}`)})}function m(_,g){const w=(0,GT.useFunc)(t,JT.default),A=t.name("outer");t.label(A).for((0,Sn._)`;${_}--;`,()=>t.for((0,Sn._)`${g} = ${_}; ${g}--;`,()=>t.if((0,Sn._)`${w}(${n}[${_}], ${n}[${g}])`,()=>{e.error(),t.assign(l,!1).break(A)})))}}};ff.default=XT;var pf={};Object.defineProperty(pf,"__esModule",{value:!0});const Zu=wt,QT=Ke,ZT=vi,ex={message:"must be equal to constant",params:({schemaCode:e})=>(0,Zu._)`{allowedValue: ${e}}`},tx={keyword:"const",$data:!0,error:ex,code(e){const{gen:t,data:n,$data:r,schemaCode:a,schema:o}=e;r||o&&typeof o=="object"?e.fail$data((0,Zu._)`!${(0,QT.useFunc)(t,ZT.default)}(${n}, ${a})`):e.fail((0,Zu._)`${o} !== ${n}`)}};pf.default=tx;var hf={};Object.defineProperty(hf,"__esModule",{value:!0});const Os=wt,nx=Ke,rx=vi,ax={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Os._)`{allowedValues: ${e}}`},ox={keyword:"enum",schemaType:"array",$data:!0,error:ax,code(e){const{gen:t,data:n,$data:r,schema:a,schemaCode:o,it:s}=e;if(!r&&a.length===0)throw new Error("enum must have non-empty array");const i=a.length>=s.opts.loopEnum;let l;const c=()=>l??(l=(0,nx.useFunc)(t,rx.default));let u;if(i||r)u=t.let("valid"),e.block$data(u,d);else{if(!Array.isArray(a))throw new Error("ajv implementation error");const m=t.const("vSchema",o);u=(0,Os.or)(...a.map((_,g)=>h(m,g)))}e.pass(u);function d(){t.assign(u,!1),t.forOf("v",o,m=>t.if((0,Os._)`${c()}(${n}, ${m})`,()=>t.assign(u,!0).break()))}function h(m,_){const g=a[_];return typeof g=="object"&&g!==null?(0,Os._)`${c()}(${n}, ${m}[${_}])`:(0,Os._)`${n} === ${g}`}}};hf.default=ox;Object.defineProperty(nf,"__esModule",{value:!0});const sx=rf,ix=af,lx=of,cx=lf,ux=cf,dx=uf,fx=df,px=ff,hx=pf,mx=hf,vx=[sx.default,ix.default,lx.default,cx.default,ux.default,dx.default,fx.default,px.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},hx.default,mx.default];nf.default=vx;var mf={},ls={};Object.defineProperty(ls,"__esModule",{value:!0});ls.validateAdditionalItems=void 0;const oo=wt,ed=Ke,gx={message:({params:{len:e}})=>(0,oo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,oo._)`{limit: ${e}}`},yx={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:gx,code(e){const{parentSchema:t,it:n}=e,{items:r}=t;if(!Array.isArray(r)){(0,ed.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}A_(e,r)}};function A_(e,t){const{gen:n,schema:r,data:a,keyword:o,it:s}=e;s.items=!0;const i=n.const("len",(0,oo._)`${a}.length`);if(r===!1)e.setParams({len:t.length}),e.pass((0,oo._)`${i} <= ${t.length}`);else if(typeof r=="object"&&!(0,ed.alwaysValidSchema)(s,r)){const c=n.var("valid",(0,oo._)`${i} <= ${t.length}`);n.if((0,oo.not)(c),()=>l(c)),e.ok(c)}function l(c){n.forRange("i",t.length,i,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:ed.Type.Num},c),s.allErrors||n.if((0,oo.not)(c),()=>n.break())})}}ls.validateAdditionalItems=A_;ls.default=yx;var vf={},cs={};Object.defineProperty(cs,"__esModule",{value:!0});cs.validateTuple=void 0;const vm=wt,ul=Ke,_x=_t,bx={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return C_(e,"additionalItems",t);n.items=!0,!(0,ul.alwaysValidSchema)(n,t)&&e.ok((0,_x.validateArray)(e))}};function C_(e,t,n=e.schema){const{gen:r,parentSchema:a,data:o,keyword:s,it:i}=e;u(a),i.opts.unevaluated&&n.length&&i.items!==!0&&(i.items=ul.mergeEvaluated.items(r,n.length,i.items));const l=r.name("valid"),c=r.const("len",(0,vm._)`${o}.length`);n.forEach((d,h)=>{(0,ul.alwaysValidSchema)(i,d)||(r.if((0,vm._)`${c} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},l)),e.ok(l))});function u(d){const{opts:h,errSchemaPath:m}=i,_=n.length,g=_===d.minItems&&(_===d.maxItems||d[t]===!1);if(h.strictTuples&&!g){const w=`"${s}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,ul.checkStrictMode)(i,w,h.strictTuples)}}}cs.validateTuple=C_;cs.default=bx;Object.defineProperty(vf,"__esModule",{value:!0});const wx=cs,Ax={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,wx.validateTuple)(e,"items")};vf.default=Ax;var gf={};Object.defineProperty(gf,"__esModule",{value:!0});const gm=wt,Cx=Ke,$x=_t,Sx=ls,Ix={message:({params:{len:e}})=>(0,gm.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,gm._)`{limit: ${e}}`},Ex={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Ix,code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,!(0,Cx.alwaysValidSchema)(r,t)&&(a?(0,Sx.validateAdditionalItems)(e,a):e.ok((0,$x.validateArray)(e)))}};gf.default=Ex;var yf={};Object.defineProperty(yf,"__esModule",{value:!0});const ir=wt,qi=Ke,kx={message:({params:{min:e,max:t}})=>t===void 0?(0,ir.str)`must contain at least ${e} valid item(s)`:(0,ir.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,ir._)`{minContains: ${e}}`:(0,ir._)`{minContains: ${e}, maxContains: ${t}}`},Tx={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:kx,code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;let s,i;const{minContains:l,maxContains:c}=r;o.opts.next?(s=l===void 0?1:l,i=c):s=1;const u=t.const("len",(0,ir._)`${a}.length`);if(e.setParams({min:s,max:i}),i===void 0&&s===0){(0,qi.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(i!==void 0&&s>i){(0,qi.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,qi.alwaysValidSchema)(o,n)){let g=(0,ir._)`${u} >= ${s}`;i!==void 0&&(g=(0,ir._)`${g} && ${u} <= ${i}`),e.pass(g);return}o.items=!0;const d=t.name("valid");i===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),i!==void 0&&t.if((0,ir._)`${a}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){const g=t.name("_valid"),w=t.let("count",0);m(g,()=>t.if(g,()=>_(w)))}function m(g,w){t.forRange("i",0,u,A=>{e.subschema({keyword:"contains",dataProp:A,dataPropType:qi.Type.Num,compositeRule:!0},g),w()})}function _(g){t.code((0,ir._)`${g}++`),i===void 0?t.if((0,ir._)`${g} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,ir._)`${g} > ${i}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,ir._)`${g} >= ${s}`,()=>t.assign(d,!0)))}}};yf.default=Tx;var $_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=wt,n=Ke,r=_t;e.error={message:({params:{property:l,depsCount:c,deps:u}})=>{const d=c===1?"property":"properties";return(0,t.str)`must have ${d} ${u} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:u,missingProperty:d}})=>(0,t._)`{property: ${l},
    missingProperty: ${d},
    depsCount: ${c},
    deps: ${u}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,u]=o(l);s(l,c),i(l,u)}};function o({schema:l}){const c={},u={};for(const d in l){if(d==="__proto__")continue;const h=Array.isArray(l[d])?c:u;h[d]=l[d]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:d,it:h}=l;if(Object.keys(c).length===0)return;const m=u.let("missing");for(const _ in c){const g=c[_];if(g.length===0)continue;const w=(0,r.propertyInData)(u,d,_,h.opts.ownProperties);l.setParams({property:_,depsCount:g.length,deps:g.join(", ")}),h.allErrors?u.if(w,()=>{for(const A of g)(0,r.checkReportMissingProp)(l,A)}):(u.if((0,t._)`${w} && (${(0,r.checkMissingProp)(l,g,m)})`),(0,r.reportMissingProp)(l,m),u.else())}}e.validatePropertyDeps=s;function i(l,c=l.schema){const{gen:u,data:d,keyword:h,it:m}=l,_=u.name("valid");for(const g in c)(0,n.alwaysValidSchema)(m,c[g])||(u.if((0,r.propertyInData)(u,d,g,m.opts.ownProperties),()=>{const w=l.subschema({keyword:h,schemaProp:g},_);l.mergeValidEvaluated(w,_)},()=>u.var(_,!0)),l.ok(_))}e.validateSchemaDeps=i,e.default=a})($_);var _f={};Object.defineProperty(_f,"__esModule",{value:!0});const S_=wt,xx=Ke,Px={message:"property name must be valid",params:({params:e})=>(0,S_._)`{propertyName: ${e.propertyName}}`},Mx={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Px,code(e){const{gen:t,schema:n,data:r,it:a}=e;if((0,xx.alwaysValidSchema)(a,n))return;const o=t.name("valid");t.forIn("key",r,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,S_.not)(o),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(o)}};_f.default=Mx;var fc={};Object.defineProperty(fc,"__esModule",{value:!0});const Gi=_t,wr=wt,Ox=Gr,Ji=Ke,Nx={message:"must NOT have additional properties",params:({params:e})=>(0,wr._)`{additionalProperty: ${e.additionalProperty}}`},Rx={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Nx,code(e){const{gen:t,schema:n,parentSchema:r,data:a,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,Ji.alwaysValidSchema)(s,n))return;const c=(0,Gi.allSchemaProperties)(r.properties),u=(0,Gi.allSchemaProperties)(r.patternProperties);d(),e.ok((0,wr._)`${o} === ${Ox.default.errors}`);function d(){t.forIn("key",a,w=>{!c.length&&!u.length?_(w):t.if(h(w),()=>_(w))})}function h(w){let A;if(c.length>8){const C=(0,Ji.schemaRefOrVal)(s,r.properties,"properties");A=(0,Gi.isOwnProperty)(t,C,w)}else c.length?A=(0,wr.or)(...c.map(C=>(0,wr._)`${w} === ${C}`)):A=wr.nil;return u.length&&(A=(0,wr.or)(A,...u.map(C=>(0,wr._)`${(0,Gi.usePattern)(e,C)}.test(${w})`))),(0,wr.not)(A)}function m(w){t.code((0,wr._)`delete ${a}[${w}]`)}function _(w){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){m(w);return}if(n===!1){e.setParams({additionalProperty:w}),e.error(),i||t.break();return}if(typeof n=="object"&&!(0,Ji.alwaysValidSchema)(s,n)){const A=t.name("valid");l.removeAdditional==="failing"?(g(w,A,!1),t.if((0,wr.not)(A),()=>{e.reset(),m(w)})):(g(w,A),i||t.if((0,wr.not)(A),()=>t.break()))}}function g(w,A,C){const y={keyword:"additionalProperties",dataProp:w,dataPropType:Ji.Type.Str};C===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(y,A)}}};fc.default=Rx;var bf={};Object.defineProperty(bf,"__esModule",{value:!0});const Lx=Er,ym=_t,mu=Ke,_m=fc,Dx={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&_m.default.code(new Lx.KeywordCxt(o,_m.default,"additionalProperties"));const s=(0,ym.allSchemaProperties)(n);for(const d of s)o.definedProperties.add(d);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=mu.mergeEvaluated.props(t,(0,mu.toHash)(s),o.props));const i=s.filter(d=>!(0,mu.alwaysValidSchema)(o,n[d]));if(i.length===0)return;const l=t.name("valid");for(const d of i)c(d)?u(d):(t.if((0,ym.propertyInData)(t,a,d,o.opts.ownProperties)),u(d),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&n[d].default!==void 0}function u(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};bf.default=Dx;var wf={};Object.defineProperty(wf,"__esModule",{value:!0});const bm=_t,Yi=wt,wm=Ke,Am=Ke,Bx={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:a,it:o}=e,{opts:s}=o,i=(0,bm.allSchemaProperties)(n),l=i.filter(g=>(0,wm.alwaysValidSchema)(o,n[g]));if(i.length===0||l.length===i.length&&(!o.opts.unevaluated||o.props===!0))return;const c=s.strictSchema&&!s.allowMatchingProperties&&a.properties,u=t.name("valid");o.props!==!0&&!(o.props instanceof Yi.Name)&&(o.props=(0,Am.evaluatedPropsToName)(t,o.props));const{props:d}=o;h();function h(){for(const g of i)c&&m(g),o.allErrors?_(g):(t.var(u,!0),_(g),t.if(u))}function m(g){for(const w in c)new RegExp(g).test(w)&&(0,wm.checkStrictMode)(o,`property ${w} matches pattern ${g} (use allowMatchingProperties)`)}function _(g){t.forIn("key",r,w=>{t.if((0,Yi._)`${(0,bm.usePattern)(e,g)}.test(${w})`,()=>{const A=l.includes(g);A||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:w,dataPropType:Am.Type.Str},u),o.opts.unevaluated&&d!==!0?t.assign((0,Yi._)`${d}[${w}]`,!0):!A&&!o.allErrors&&t.if((0,Yi.not)(u),()=>t.break())})})}}};wf.default=Bx;var Af={};Object.defineProperty(Af,"__esModule",{value:!0});const Fx=Ke,jx={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,Fx.alwaysValidSchema)(r,n)){e.fail();return}const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Af.default=jx;var Cf={};Object.defineProperty(Cf,"__esModule",{value:!0});const Vx=_t,Ux={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Vx.validateUnion,error:{message:"must match a schema in anyOf"}};Cf.default=Ux;var $f={};Object.defineProperty($f,"__esModule",{value:!0});const dl=wt,Hx=Ke,zx={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,dl._)`{passingSchemas: ${e.passing}}`},Kx={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:zx,code(e){const{gen:t,schema:n,parentSchema:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&r.discriminator)return;const o=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block(c),e.result(s,()=>e.reset(),()=>e.error(!0));function c(){o.forEach((u,d)=>{let h;(0,Hx.alwaysValidSchema)(a,u)?t.var(l,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,dl._)`${l} && ${s}`).assign(s,!1).assign(i,(0,dl._)`[${i}, ${d}]`).else(),t.if(l,()=>{t.assign(s,!0),t.assign(i,d),h&&e.mergeEvaluated(h,dl.Name)})})}}};$f.default=Kx;var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});const Wx=Ke,qx={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach((o,s)=>{if((0,Wx.alwaysValidSchema)(r,o))return;const i=e.subschema({keyword:"allOf",schemaProp:s},a);e.ok(a),e.mergeEvaluated(i)})}};Sf.default=qx;var If={};Object.defineProperty(If,"__esModule",{value:!0});const Rl=wt,I_=Ke,Gx={message:({params:e})=>(0,Rl.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Rl._)`{failingKeyword: ${e.ifClause}}`},Jx={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Gx,code(e){const{gen:t,parentSchema:n,it:r}=e;n.then===void 0&&n.else===void 0&&(0,I_.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const a=Cm(r,"then"),o=Cm(r,"else");if(!a&&!o)return;const s=t.let("valid",!0),i=t.name("_valid");if(l(),e.reset(),a&&o){const u=t.let("ifClause");e.setParams({ifClause:u}),t.if(i,c("then",u),c("else",u))}else a?t.if(i,c("then")):t.if((0,Rl.not)(i),c("else"));e.pass(s,()=>e.error(!0));function l(){const u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(u)}function c(u,d){return()=>{const h=e.subschema({keyword:u},i);t.assign(s,i),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Rl._)`${u}`):e.setParams({ifClause:u})}}}};function Cm(e,t){const n=e.schema[t];return n!==void 0&&!(0,I_.alwaysValidSchema)(e,n)}If.default=Jx;var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});const Yx=Ke,Xx={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,Yx.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Ef.default=Xx;Object.defineProperty(mf,"__esModule",{value:!0});const Qx=ls,Zx=vf,e2=cs,t2=gf,n2=yf,r2=$_,a2=_f,o2=fc,s2=bf,i2=wf,l2=Af,c2=Cf,u2=$f,d2=Sf,f2=If,p2=Ef;function h2(e=!1){const t=[l2.default,c2.default,u2.default,d2.default,f2.default,p2.default,a2.default,o2.default,r2.default,s2.default,i2.default];return e?t.push(Zx.default,t2.default):t.push(Qx.default,e2.default),t.push(n2.default),t}mf.default=h2;var kf={},Tf={};Object.defineProperty(Tf,"__esModule",{value:!0});const rn=wt,m2={message:({schemaCode:e})=>(0,rn.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,rn._)`{format: ${e}}`},v2={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:m2,code(e,t){const{gen:n,data:r,$data:a,schema:o,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=i;if(!l.validateFormats)return;a?h():m();function h(){const _=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),g=n.const("fDef",(0,rn._)`${_}[${s}]`),w=n.let("fType"),A=n.let("format");n.if((0,rn._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(w,(0,rn._)`${g}.type || "string"`).assign(A,(0,rn._)`${g}.validate`),()=>n.assign(w,(0,rn._)`"string"`).assign(A,g)),e.fail$data((0,rn.or)(C(),y()));function C(){return l.strictSchema===!1?rn.nil:(0,rn._)`${s} && !${A}`}function y(){const p=u.$async?(0,rn._)`(${g}.async ? await ${A}(${r}) : ${A}(${r}))`:(0,rn._)`${A}(${r})`,b=(0,rn._)`(typeof ${A} == "function" ? ${p} : ${A}.test(${r}))`;return(0,rn._)`${A} && ${A} !== true && ${w} === ${t} && !${b}`}}function m(){const _=d.formats[o];if(!_){C();return}if(_===!0)return;const[g,w,A]=y(_);g===t&&e.pass(p());function C(){if(l.strictSchema===!1){d.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function y(b){const S=b instanceof RegExp?(0,rn.regexpCode)(b):l.code.formats?(0,rn._)`${l.code.formats}${(0,rn.getProperty)(o)}`:void 0,R=n.scopeValue("formats",{key:o,ref:b,code:S});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,rn._)`${R}.validate`]:["string",b,R]}function p(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!u.$async)throw new Error("async format in sync schema");return(0,rn._)`await ${A}(${r})`}return typeof w=="function"?(0,rn._)`${A}(${r})`:(0,rn._)`${A}.test(${r})`}}}};Tf.default=v2;Object.defineProperty(kf,"__esModule",{value:!0});const g2=Tf,y2=[g2.default];kf.default=y2;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.contentVocabulary=ts.metadataVocabulary=void 0;ts.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ts.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Zd,"__esModule",{value:!0});const _2=ef,b2=nf,w2=mf,A2=kf,$m=ts,C2=[_2.default,b2.default,(0,w2.default)(),A2.default,$m.metadataVocabulary,$m.contentVocabulary];Zd.default=C2;var xf={},pc={};Object.defineProperty(pc,"__esModule",{value:!0});pc.DiscrError=void 0;var Sm;(function(e){e.Tag="tag",e.Mapping="mapping"})(Sm||(pc.DiscrError=Sm={}));Object.defineProperty(xf,"__esModule",{value:!0});const Ro=wt,td=pc,Im=Yn,$2=is,S2=Ke,I2={message:({params:{discrError:e,tagName:t}})=>e===td.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,Ro._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},E2={keyword:"discriminator",type:"object",schemaType:"object",error:I2,code(e){const{gen:t,data:n,schema:r,parentSchema:a,it:o}=e,{oneOf:s}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",(0,Ro._)`${n}${(0,Ro.getProperty)(i)}`);t.if((0,Ro._)`typeof ${c} == "string"`,()=>u(),()=>e.error(!1,{discrError:td.DiscrError.Tag,tag:c,tagName:i})),e.ok(l);function u(){const m=h();t.if(!1);for(const _ in m)t.elseIf((0,Ro._)`${c} === ${_}`),t.assign(l,d(m[_]));t.else(),e.error(!1,{discrError:td.DiscrError.Mapping,tag:c,tagName:i}),t.endIf()}function d(m){const _=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:m},_);return e.mergeEvaluated(g,Ro.Name),_}function h(){var m;const _={},g=A(a);let w=!0;for(let p=0;p<s.length;p++){let b=s[p];if(b!=null&&b.$ref&&!(0,S2.schemaHasRulesButRef)(b,o.self.RULES)){const R=b.$ref;if(b=Im.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,R),b instanceof Im.SchemaEnv&&(b=b.schema),b===void 0)throw new $2.default(o.opts.uriResolver,o.baseId,R)}const S=(m=b==null?void 0:b.properties)===null||m===void 0?void 0:m[i];if(typeof S!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);w=w&&(g||A(b)),C(S,p)}if(!w)throw new Error(`discriminator: "${i}" must be required`);return _;function A({required:p}){return Array.isArray(p)&&p.includes(i)}function C(p,b){if(p.const)y(p.const,b);else if(p.enum)for(const S of p.enum)y(S,b);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function y(p,b){if(typeof p!="string"||p in _)throw new Error(`discriminator: "${i}" values must be unique strings`);_[p]=b}}}};xf.default=E2;const k2="http://json-schema.org/draft-07/schema#",T2="http://json-schema.org/draft-07/schema#",x2="Core schema meta-schema",P2={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},M2=["object","boolean"],O2={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},N2={$schema:k2,$id:T2,title:x2,definitions:P2,type:M2,properties:O2,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=Py,r=Zd,a=xf,o=N2,s=["/properties"],i="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(_,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=Er;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=wt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=mi;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=is;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(qu,qu.exports);var R2=qu.exports;const L2=xy(R2);var D2=(e=>(e.WriterBlueprintKey="writer#blueprintKey",e.CssClassnames="cssClassnames",e.CssSize="cssSize",e.Uri="uri",e.Uuid="uuid",e))(D2||{});function Qn(e){return`https://dev.writer.com/framework/${encodeURIComponent(e)}.json`}function W4(e){return{$id:Qn(e.join(",")),type:"string",enum:e}}function qs(e,t){return{$id:Qn(`between-${e}-${t}`),type:"number",minimum:e,maximum:t}}const B2={$id:Qn("cssClassname"),type:"string",format:"cssClassnames"},E_={$id:Qn("cssSize"),type:"string",format:"cssSize"},k_={$id:Qn("arrayOfString"),type:"array",items:{type:"string"}},Pf=qs(-90,90),Mf=qs(-180,180),F2={$id:Qn("gpsMarker"),type:"object",properties:{name:{type:"string"},lat:Pf,lng:Mf},required:["lat","lng","name"],additionalProperties:!1},T_={$id:Qn("gpsMarkers"),type:"array",items:F2},Ha={$id:Qn("objectRecordNotNested"),type:"object",patternProperties:{"^.*$":{type:["string","number","boolean"]}},additionalProperties:!0},j2={$id:Qn("anotatedText"),type:"array",items:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},V2={$id:Qn("repeaterObject"),oneOf:[{type:"object",patternProperties:{"^.*$":{type:"object"}},additionalProperties:!0},{type:"array",items:{type:"object"}}]},U2={$id:Qn("chatBotMessage"),type:"object",properties:{role:{type:"string"},content:{type:"string"},tools:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},required:["role"],additionalProperties:!0},H2={$id:Qn("chatBotMessages"),type:"array",items:U2},Xn={$id:Qn("positiveNumber"),type:"number",minimum:0},x_={$id:Qn("uri"),type:"string",format:"uri"},fl=new L2({strict:!0,allowUnionTypes:!0});function q4(e){return(e==null?void 0:e.$id)===void 0?fl.compile(e):fl.getSchema(e.$id)||fl.compile(e)}const z2={uri:{format:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,errorMessage:"must be a valid URL"},uuid:{format:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,errorMessage:"must be a valid UUID"},cssClassnames:{format:/(^\s*[a-zA-Z_][-\w]*(\s+[a-zA-Z_][-\w]*)*\s*$)|(^$)/,errorMessage:"must be a valid list of CSS classes separated by spaces"},cssSize:{format:/(^([+-]?\d*\.?\d+)(px|em|%|vh|vw|rem|pt|pc|in|cm|mm|ex|ch|vmin|vmax|fr)$)|(^$)/,errorMessage:"must be a valid CSS size"},"writer#blueprintKey":{format:{type:"string",validate:e=>{const t=te(re.core);return t?t.getComponents().filter(r=>r.type==="blueprints_blueprint").map(r=>r.content.key).includes(e):!0}},errorMessage:"must correspond to an existing blueprint key"}};Object.entries(z2).map(([e,t])=>fl.addFormat(e,t.format));const vn={name:"Accent",type:W.Color,category:qe.Style,applyStyleVariable:!0},Qt={name:"Primary text",type:W.Color,category:qe.Style,applyStyleVariable:!0},hr={name:"Secondary text",type:W.Color,category:qe.Style,applyStyleVariable:!0},P_={name:"Emptiness",desc:"Page background color",type:W.Color,category:qe.Style,applyStyleVariable:!0},va={name:"Container background",type:W.Color,category:qe.Style,applyStyleVariable:!0},us={name:"Container shadow",type:W.Shadow,category:qe.Style,applyStyleVariable:!0},cn={name:"Separator",type:W.Color,category:qe.Style,applyStyleVariable:!0},Jr={name:"Button",type:W.Color,category:qe.Style,applyStyleVariable:!0},Yr={name:"Button text",type:W.Color,category:qe.Style,applyStyleVariable:!0},Wa={name:"Button shadow",type:W.Shadow,category:qe.Style,applyStyleVariable:!0},at={name:"Custom CSS classes",type:W.Text,category:qe.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets.",validator:B2},K2={name:"Content width",type:W.Width,default:"100%",category:qe.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc.",validator:E_},ds={name:"Content alignment (H)",type:W.HAlign,default:"unset",category:qe.Style},Of={name:"Content alignment (V)",type:W.VAlign,default:"unset",category:qe.Style},fs={name:"Padding",type:W.Padding,default:"0",category:qe.Style},xt=Object.freeze({type:W.Boolean,options:{yes:"Yes",no:"No"},validator:{type:"boolean"}}),M_={...xt,name:"Collapsible",default:"no",category:qe.Style},Nf={...xt,name:"Start collapsed",category:qe.Style,default:"no",desc:"Only applied when the component is collapsible."},W2=["aria-invalid"],q2={key:0,class:"material-symbols-outlined"},G2={key:1,class:"WdsTextInput__rightText"},J2=["aria-invalid"],Y2=Ce({inheritAttrs:!1,__name:"WdsTextInput",props:zr({leftIcon:{type:String,required:!1,default:void 0},invalid:{type:Boolean,required:!1},variant:{type:String,default:void 0},enableClearButton:{type:Boolean,required:!1},rightText:{type:String,required:!1,default:""}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=qr(e,"modelValue"),r=e;t({focus:c,getSelection:l,value:n,setSelectionEnd:i,setSelectionStart:s});const a=it("input"),o=j(()=>[r.leftIcon?"auto":void 0,"1fr",r.rightText?"auto":void 0,r.enableClearButton?"auto":void 0].filter(Boolean).join(" "));function s(u){a.value&&(a.value.selectionStart=u)}function i(u){a.value&&(a.value.selectionEnd=u)}function l(){var u,d;return{selectionStart:(u=a.value)==null?void 0:u.selectionStart,selectionEnd:(d=a.value)==null?void 0:d.selectionEnd}}function c(){var u;(u=a.value)==null||u.focus()}return(u,d)=>e.leftIcon||e.enableClearButton?(E(),M("div",Ho({key:0,class:["WdsTextInput WdsTextInput--leftIcon colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]},u.$attrs,{"aria-invalid":e.invalid,style:{gridTemplateColumns:o.value},onClick:c}),[e.leftIcon?(E(),M("i",q2,Te(e.leftIcon),1)):ge("",!0),Dn(L("input",Ho({ref_key:"input",ref:a,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h)},u.$attrs),null,16),[[El,n.value]]),e.rightText?(E(),M("p",G2,Te(e.rightText),1)):ge("",!0),e.enableClearButton&&n.value?(E(),M("button",{key:2,class:"WdsTextInput__clearBtn",type:"button",onClick:d[1]||(d[1]=h=>n.value="")},d[3]||(d[3]=[L("i",{class:"material-symbols-outlined"},"close",-1)]))):ge("",!0)],16,W2)):Dn((E(),M("input",Ho({key:1},u.$attrs,{ref_key:"input",ref:a,"onUpdate:modelValue":d[2]||(d[2]=h=>n.value=h),"aria-invalid":e.invalid,class:["WdsTextInput colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]}),null,16,J2)),[[El,n.value]])}}),O_=ke(Y2,[["__scopeId","data-v-9092817d"]]),X2={};function Q2(e,t){return E(),M("button",null,[Ht(e.$slots,"default",{},void 0,!0)])}const Cr=ke(X2,[["render",Q2],["__scopeId","data-v-75345289"]]);function Z2(e){const t=En([]),n=$e(!1),r=wn();async function a(){if(!n.value){for(n.value=!0;t.value.length;){const[s,...i]=t.value;try{await e(s)}catch(l){r.error("Error during handling job",s,l)}finally{t.value=i}}n.value=!1}}function o(s){if(t.value=[...t.value,s],!n.value)return a()}return{push:o,isBusy:In(n)}}function Rf(e,t,n){function r(i){return i.type==="blueprints_uieventtrigger"&&i.content.refComponentId===P(t)&&i.content.refEventType===P(n)}const a=j(()=>[...new Set(o.value.map(l=>l.parentId))].map(l=>e.getComponentById(l)).filter(Boolean)),o=j(()=>e.getComponents("blueprints_root").flatMap(i=>e.getComponents(i.id).filter(r))),s=j(()=>o.value.length>0);return{blueprints:a,triggers:o,isLinked:s}}function eP(e,t,n,r){const a=t.at(-1).componentId,o=j(()=>e.getComponentById(a)),{push:s,isBusy:i}=Z2(l);async function l(_){switch(_.eventType){case"wf-dataframe-add":await c(..._.payload);break;case"wf-dataframe-update":await d(..._.payload);break;case"wf-dataframe-action":await u(..._.payload);break}}async function c(){const _="wf-dataframe-add",g=r.value.numRows(),w=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),A=w.escape(b=>b[cr]===g),C=r.value.filter(A).object();if(!C)throw Error("Could not find record");const y=rP(C),p=w.from([y]);if(r.value=r.value.concat(p).derive({[cr]:()=>w.op.row_number()}),!!h(_))return new Promise(b=>{const S=new CustomEvent(_,{detail:{payload:{record:y,record_index:g},callback:b}});m(S)})}async function u(_,g){const w="wf-dataframe-action";if(!r.value)throw Error("Table is not ready");if(!h(w))return;const A=g-1;return new Promise(C=>{const y=new CustomEvent(w,{detail:{payload:{action:_,record_index:A},callback:C}});m(y)})}async function d(_,g,w){if(!r.value)throw Error("Table is not ready");if(g===void 0)throw Error("Must specify the index to update a row");const A="wf-dataframe-update",C=g-1,y=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),p=y.escape(Z=>Z[cr]===g),b=r.value.filter(p).object();if(!b)throw Error("Could not find record");const S=b[_],R=tP(S,w),K=y.escape(Z=>Z[cr]===g?R:Z[_]);if(r.value=r.value.derive({[_]:K}),!h(A))return;const G=nP(r.value.filter(p).object());return new Promise(Z=>{const Ie=new CustomEvent(A,{detail:{payload:{record:G,record_index:C},callback:Z}});m(Ie)})}function h(_){var C,y;const g=(C=o.value.handlers)==null?void 0:C[_],w=((y=o.value.binding)==null?void 0:y.eventType)==_,A=Rf(e,a,_).isLinked.value;return!!(g||w||A)}function m(_){n.value instanceof HTMLElement?n.value.dispatchEvent(_):n.value.$el.dispatchEvent(_)}return{isBusy:i,handleUpdateCell:(..._)=>s({eventType:"wf-dataframe-update",payload:_}),handleAddRow:(..._)=>s({eventType:"wf-dataframe-add",payload:_}),handleActionRow:(..._)=>s({eventType:"wf-dataframe-action",payload:_})}}function tP(e,t){switch(typeof e){case"number":return Number(t);case"string":return String(t);case"boolean":return!!t;case"bigint":return BigInt(String(t));default:throw Error(`Could not update a field of type ${typeof e}`)}}function N_(e){return e===cr||vy.test(e)}function nP(e){return Object.entries(e).filter(([t])=>!N_(t)).reduce((t,[n,r])=>(t[n]=r,t),{})}function rP(e){return Object.entries(e).filter(([t])=>!N_(t)).reduce((t,[n,r])=>(t[n]=aP(r),t),{})}function aP(e){switch(typeof e){case"number":return 0;case"string":return"";case"boolean":return!1;case"bigint":return BigInt(0);case"object":return{};default:throw Error(`Could not get default value a field of type ${typeof e}`)}}const oP=["disabled"],sP={key:0,class:"WdsButton__loader"},iP=Ce({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"},customSize:{type:String,required:!1,default:void 0},loading:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},setup(e){const t=uo(()=>en(()=>import("./WdsLoaderDots-ES3W-XHQ.js"),[],import.meta.url)),n=e,r=j(()=>{if(n.customSize)return{width:n.customSize,height:n.customSize}}),a=j(()=>["WdsButton",`WdsButton--${n.variant}`,n.customSize?void 0:`WdsButton--${n.size}`]);return(o,s)=>(E(),M("button",{class:ut(["WdsButton colorTransformer",a.value]),role:"button",style:bt(r.value),disabled:e.disabled||e.loading},[e.loading?(E(),M("div",sP,[Fe(P(t),{color:"white",size:24})])):ge("",!0),Ht(o.$slots,"default",{},void 0,!0)],14,oP))}}),Rn=ke(iP,[["__scopeId","data-v-3b815c67"]]);var St=(e=>(e.White="#ffffff",e.Black="#000000",e.Blue1="#f3f5ff",e.Blue2="#e4e9ff",e.Blue3="#bfcbff",e.Blue4="#6985ff",e.Blue5="#5551ff",e.Blue6="#4a46da",e.Gray0="#fbfbfd",e.Gray1="#f5f5f9",e.Gray2="#e4e7ed",e.Gray3="#d2d4d7",e.Gray4="#828282",e.Gray5="#4f4f4f",e.Gray6="#333333",e.Purple1="#f6effd",e.Purple2="#ede2ff",e.Purple3="#d4b2f7",e.Purple4="#a95ef8",e.Purple5="#721cc9",e.Orange1="#fff4f1",e.Orange2="#ffcfc2",e.Orange4="#ff8866",e.Orange5="#ff643c",e.Green1="#f2fffb",e.Green2="#d4fff2",e.Green3="#a9f9e1",e.Green5="#3bdcab",e.Green6="#078660",e))(St||{}),R_=(e=>(e.Box="0px 2px 0px 0px #f3f3f3",e.Menu="0px 1px 8px 0px #bfcbff40",e.Large="0px 3px 40px 0px #acb9dc66",e))(R_||{});const G4=Object.freeze(Object.fromEntries([...Object.entries(St).map(([e,t])=>[`--wdsColor${e}`,t]),...Object.entries(R_).map(([e,t])=>[`--wdsShadow${e}`,t])])),lP=["aria-busy"],cP={key:0},uP={class:"CoreDataframe__table__row CoreDataframe__table__row--head"},dP={key:0,"data-writer-grid-col":"0",class:"CoreDataframe__table__th CoreDataframe__table__th--index"},fP=["data-writer-grid-col"],pP=["onClick"],hP={key:0,class:"CoreDataframe__table__th__icon material-symbols-outlined"},mP={key:1,class:"CoreDataframe__table__th CoreDataframe__table__th--stickyRight"},vP={key:0,class:"CoreDataframe__newRow"},gP="A component to display Pandas DataFrames.",yP=`
# Subscribe this event handler to the \`wf-dataframe-update\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_change(state, payload):
    state['mydf'].record_update(payload) # should contain an EditableDataFrame instance`,_P=`
# Subscribe this event handler to the \`wf-dataframe-add\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_add(state, payload):
	payload['record']['sales'] = 0 # default value inside the dataframe
	state['mydf'].record_add(payload) # should contain an EditableDataFrame instance`,bP=`
# Subscribe this event handler to the \`wf-dataframe-action\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_action(state, payload):
	# state['mydf'] should contains an EditableDataFrame instance
	record_index = payload['record_index']
	if payload['action'] == 'remove':
		state['mydf'].record_remove(payload) # should contain an EditableDataFrame instance
	if payload['action'] == 'open':
		state['record'] = state['mydf'].record(record_index) # dict representation of record`,wP={writer:{name:"DataFrame",description:gP,category:"Content",events:{"wf-dataframe-add":{desc:"Capture adding a row.",stub:_P.trim(),eventPayloadExample:{record:{col_a:"0n",col_b:"0n"},record_index:2}},"wf-dataframe-update":{desc:"Capture a cell change.",stub:yP.trim(),eventPayloadExample:{record:{col_a:"1n",col_b:"2n"},record_index:0}},"wf-dataframe-action":{desc:"Remove or open a row.",stub:bP.trim(),eventPayloadExample:{action:"open",record_index:0}}},fields:{dataframe:{name:"Data",desc:"Must be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.",type:W.Text,default:sI},showIndex:{...xt,name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",default:"yes"},enableSearch:{...xt,name:"Enable search",default:"no"},enableRecordAdd:{...xt,name:"Enable adding a record",default:"no"},enableRecordUpdate:{...xt,name:"Enable updating a record",default:"no"},enableDownload:{...xt,name:"Enable download",desc:"Allows the user to download the data as CSV.",default:"no"},actions:{name:"Actions",desc:"Define rows actions",type:W.KeyValue,default:JSON.stringify({remove:"Remove",open:"Open"}),validator:Ha},useMarkdown:{...xt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},displayRowCount:{name:"Display row count",desc:"Specifies how many rows to show simultaneously.",type:W.Number,category:qe.Style,default:"10",validator:Xn},wrapText:{...xt,name:"Wrap text",category:qe.Style,desc:"Not wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.",default:"no"},primaryTextColor:Qt,secondaryTextColor:hr,accentColor:vn,separatorColor:cn,dataframeBackgroundColor:{name:"Background",type:W.Color,category:qe.Style,default:St.White,applyStyleVariable:!0},fontStyle:{name:"Font style",type:W.Text,category:qe.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:at}}},AP=Ce({...wP,__name:"CoreDataframe",setup(e){const o=te(re.evaluatedFields),s=it("rootEl"),i=it("toolsEl"),l=it("gridContainerEl");let c=null;const u=En(null),d=En([]),h=j(()=>o.showIndex.value=="yes"),m=j(()=>o.actions.value),_=En(null),g=$e(0),w=$e([]);let A=null;const C=te(re.core),y=te(re.instancePath),{handleUpdateCell:p,handleAddRow:b,handleActionRow:S,isBusy:R}=eP(C,y,s,u);async function K(){await b(),l.value.scrollTo({behavior:"smooth",top:48*we.value})}const G=j(()=>x.value||R.value),Z=j(()=>{var F;return u.value?(F=u.value)==null?void 0:F.columnNames():[]}),Ie=j(()=>Z.value.filter(F=>d.value.includes(F))),de=j(()=>Z.value.filter(U=>{if(U===cr)return!1;const Y=d.value.includes(U),fe=vy.test(U);return!(Y&&fe)})),Ae=j(()=>(h.value?1:0)+de.value.length),we=j(()=>{var F;return((F=u.value)==null?void 0:F.numRows())??0}),Ge=j(()=>we.value>1e3),xe=j(()=>Math.min(o.displayRowCount.value,we.value)),ye=j(()=>Object.keys(o.actions.value||{}).length>0),_e=j(()=>!!o.useMarkdown.value),He=j(()=>!!o.enableRecordUpdate.value),me=j(()=>!!o.enableRecordAdd.value),V=j(()=>!!o.wrapText.value),ue=j(()=>{let F;return V.value?F=we.value-1:F=we.value-xe.value,Math.min(Math.ceil(g.value*F),F)}),J=j(()=>{if(!u.value)return null;const F=Ge.value?ue.value:0,U=Ge.value?xe.value:1e3,Y=u.value.objects({offset:F,limit:U}),fe=u.value.indices().slice(F,ue.value+xe.value);return{data:Y,indices:fe}}),I=j(()=>{let F="16px ";return w.value.length==0?(h.value&&(F+="75px "),F+=`repeat(${de.value.length}, minmax(min-content, 1fr)) `):F+=w.value.map(U=>`${Math.max(U,80)}px `).join(" "),ye.value&&(F+="40px "),F}),O=j(()=>{const F=o.fontStyle.value,U=`${(1+o.displayRowCount.value)*48}px`;return{position:Ge.value?"sticky":"unset","min-height":"48px","max-height":U,"font-family":F=="monospace"?"monospace":void 0,"grid-template-rows":`48px repeat(${xe.value}, min-content)`,"grid-template-columns":I.value}}),ie=j(()=>({top:`${48*we.value}px`})),Be=$e(!1);function je(){if(!(l.value.scrollWidth>l.value.clientWidth)){Be.value=!1;return}const U=l.value.scrollLeft+l.value.clientWidth>=l.value.scrollWidth;Be.value=!U}We(w,je);function ne(){const F=l.value.scrollTop;g.value=F/(l.value.scrollHeight-l.value.clientHeight),je()}function Q(){l.value.scrollTop=0}async function se(){var Y;w.value=[],await ar();const F=(Y=l.value)==null?void 0:Y.querySelectorAll("[data-writer-grid-col]"),U=[];F==null||F.forEach(fe=>{const ve=fe,Pe=ve.dataset.writerGridCol,{width:Le}=ve.getBoundingClientRect(),rt=Math.min(Le,300);U[Pe]=rt}),w.value=U}function le(F,U){var Pe,Le;if(F.target.classList.contains("widthAdjuster"))return;if(((Pe=_.value)==null?void 0:Pe.columnName)!==U){_.value={columnName:U,descending:!1};return}if((Le=_.value)==null?void 0:Le.descending){_.value=null;return}_.value={columnName:U,descending:!_.value.descending}}function k(F){const U=F.schema.metadata.get("pandas");return U?JSON.parse(U).index_columns:[]}const x=$e(!1);async function q(){x.value=!0;const F=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),{tableFromIPC:U}=await en(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([4,3]),import.meta.url),Y=o.dataframe.value;try{const Pe=await(await(await fetch(Y)).blob()).arrayBuffer(),Le=U(Pe);d.value=k(Le),c=F.fromArrow(Le),u.value=c.derive({[cr]:()=>F.op.row_number()})}catch(fe){wn().error("Couldn't load dataframe from Arrow URL.",fe)}finally{x.value=!1}}async function pe(){const F=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url),U=u.value.select(F.not(cr)).toCSV(),Y=document.createElement("a"),fe=new Blob([U],{type:"text/csv"}),ve=URL.createObjectURL(fe);Y.href=ve,Y.download="data.csv",Y.click(),URL.revokeObjectURL(ve)}async function B(){const F=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url);if(_.value===null){u.value=u.value.unorder();return}let U;_.value.descending?U=F.desc(_.value.columnName):U=_.value.columnName,u.value=u.value.orderby(U)}async function z(F){const U=F.target.value;if(!U)u.value=c;else{const Y=new RegExp(U,"i"),ve="(d, $) => "+c.columnNames().map(Le=>`aq.op.match(d.${Le}, $.pattern) !== null`).join(" || "),Pe=await en(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([2,3]),import.meta.url);u.value=c.params({pattern:Y,filterS:ve}).filter(ve).derive({[cr]:()=>Pe.op.row_number()})}await ar(),Q()}async function ae(F){if(F.buttons!==1){A=null;return}const U=F.target;if(!s.value.contains(U))return;if(A===null&&U.classList.contains("widthAdjuster")){const Le=U.closest(".CoreDataframe__table__th");A=parseInt(Le.dataset.writerGridCol)}else if(A===null)return;const Y=l.value.querySelector(`[data-writer-grid-col="${A}"]`),{left:fe}=Y.getBoundingClientRect(),Pe=F.clientX-fe;w.value[A]=Pe}return We(o.dataframe,()=>{q()}),We(_,async()=>{await B()}),We(Ae,()=>{se()}),We(V,()=>{se()}),ln(async()=>{await q(),document.addEventListener("mousemove",ae),i.value&&new ResizeObserver(se).observe(i.value,{box:"border-box"})}),Or(()=>{document.removeEventListener("mousemove",ae)}),(F,U)=>{var Y;return E(),M("div",{ref_key:"rootEl",ref:s,class:"CoreDataframe","aria-busy":G.value},[L("div",{ref_key:"toolsEl",ref:i,class:"tools"},[P(o).enableSearch.value==="yes"?(E(),M("div",cP,[Fe(O_,{class:"search",placeholder:"Search","left-icon":"search",onChange:z})])):ge("",!0),P(o).enableDownload.value?(E(),De(Cr,{key:1,title:"Download",class:"download",onClick:pe},{default:Ze(()=>U[0]||(U[0]=[L("i",{class:"material-symbols-outlined"},"download",-1)])),_:1})):ge("",!0)],512),L("div",{ref_key:"gridContainerEl",ref:l,class:"CoreDataframe__tableWrapper",onScroll:ne},[L("div",{class:ut(["CoreDataframe__table",{scrolled:ue.value>0,wrapText:V.value}]),style:bt(O.value)},[L("div",uP,[U[3]||(U[3]=L("div",{class:"CoreDataframe__table__th CoreDataframeRow__spacer"},null,-1)),h.value?(E(),M("div",dP,U[1]||(U[1]=[L("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1)]))):ge("",!0),(E(!0),M(Ye,null,Pt(de.value,(fe,ve)=>{var Pe,Le;return E(),M("div",{key:fe,"data-writer-grid-col":ve+(h.value?1:0),class:"CoreDataframe__table__th"},[L("button",{type:"button",class:"CoreDataframe__table__th__name",onClick:rt=>le(rt,fe)},Te(fe),9,pP),((Pe=_.value)==null?void 0:Pe.columnName)==fe?(E(),M("span",hP,Te((Le=_.value)!=null&&Le.descending?"arrow_drop_up":"arrow_drop_down"),1)):ge("",!0),U[2]||(U[2]=L("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1))],8,fP)}),128)),ye.value?(E(),M("div",mP)):ge("",!0)]),(E(!0),M(Ye,null,Pt((Y=J.value)==null?void 0:Y.data,(fe,ve)=>(E(),De(zI,{key:ve,class:"CoreDataframe__table__row",row:fe,actions:m.value,"use-markdown":_e.value,editable:He.value&&!G.value,columns:de.value,"show-index":h.value,"index-text":J.value.indices[ve]??Ie.value.map(Pe=>fe[Pe]).join(", "),"display-shadow-on-sticky":Be.value,"wrap-text":V.value,onAction:P(S),onChange:P(p)},null,8,["row","actions","use-markdown","editable","columns","show-index","index-text","display-shadow-on-sticky","wrap-text","onAction","onChange"]))),128))],6),Ge.value?(E(),M("div",{key:0,class:"endpoint",style:bt(ie.value)},null,4)):ge("",!0)],544),me.value?(E(),M("div",vP,[Fe(Rn,{"aria-label":"Create a new row at the end",size:"small",variant:"tertiary",onClick:K},{default:Ze(()=>U[4]||(U[4]=[L("i",{class:"material-symbols-outlined"},"add",-1),tn(" Add a row ")])),_:1})])):ge("",!0)],8,lP)}}}),CP=ke(AP,[["__scopeId","data-v-36eaff25"]]),$P={key:0},SP={key:1},IP={key:2},EP={key:3},kP="A text component used to display headings or titles in different sizes and styles.",TP={writer:{name:"Heading",description:kP,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:W.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:W.Text,category:qe.Style},alignment:{name:"Alignment",default:"left",type:W.Text,category:qe.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:Qt,cssClasses:at},previewField:"text"}},xP=Ce({...TP,__name:"CoreHeading",setup(e){const t=te(re.evaluatedFields);return(n,r)=>(E(),M("div",{class:"CoreHeading",style:bt({"text-align":P(t).alignment.value})},[P(t).headingType.value=="h1"?(E(),M("h1",$P,Te(P(t).text.value),1)):P(t).headingType.value=="h3"?(E(),M("h3",SP,Te(P(t).text.value),1)):P(t).headingType.value=="h4"?(E(),M("h4",IP,Te(P(t).text.value),1)):(E(),M("h2",EP,Te(P(t).text.value),1))],4))}}),PP=ke(xP,[["__scopeId","data-v-a24181bd"]]),MP={class:"icon"},OP={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:W.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:qe.Style,default:"arrow_forward"},size:{name:"Icon size",type:W.Number,desc:"Icon size in px",category:qe.Style,default:"14",validator:Xn},color:{name:"Icon color",type:W.Color,category:qe.Style},cssClasses:at},previewField:"icon"}},L_=Ce({...OP,__name:"CoreIcon",setup(e){const t=te(re.evaluatedFields);return(n,r)=>(E(),M("div",MP,[P(t).icon.value?(E(),M("span",{key:0,class:"material-symbols-outlined",style:bt({fontSize:`${P(t).size.value}px`,color:P(t).color.value})},Te(P(t).icon.value),5)):ge("",!0)]))}}),Em=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Icon.")};typeof Em=="function"&&Em(L_);const NP=ke(L_,[["__scopeId","data-v-983dfef2"]]);function gi(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function RP(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const LP=["src","alt"],DP={key:0,class:"captionContainer"},BP="A component to display images.",FP=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,jP={writer:{name:"Image",description:BP,category:"Content",fields:{src:{name:"Source",default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQoAAAEKCAYAAADqyxvJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAemSURBVHgB7d3baltHGIZhJd5DW3pS2vu/tkKgEFragiXLjuvVkpOS5PMa6Z8ZWc8DPXPBJNGrpX82evfrh4/PG4BveL8BCIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiC43HN3PP/24ubyoafCnT8+bD7/9vur/+f67u80PL/9V+fjHX5vtdv/qn794+bP55eXPaJbfh8wTRYGHh7p/pO/fv/v3hbZG5e+zuLm+WvXzT0+fNo8v/1XZ7582HJdQFKj+h3p7c73q5/ePTy9PInUvzOuVoVhUxWsJ0FNhhM6VUBS43z1sKl1fXaz6+eXjyv6xMBSXF5t3L086a+weHjcVqp+ezpVQFFje0Srfwdc+USz2jzUvzM+WWKyxK3pB74SihFAU2e7mmlNst7VPObe36+JVFdOqJ5VzJxRFqucUaweIy5yi0tXl+gW0Y8fUfKKOUBTZla80rHth/jenqIvFVcOc4tgx3e89TVQRiiLVKw03DSsNu+Jl29Fzim3xEPmcCUWhh8LPy8uMYu07+EPx5/frho9Dx4yp/RN1hKJQ9WDtbuXqx26yjVeLY8Wr+qPVuROKQtVLklcN+ykqd0RerfzosThWTC2L1hKKQsuLoHJOcdewn6Lyc/wyp1g7ZD3WC9yyaC2hKFa5I7JlTlH9Of5y5TLpseYUdmTWEopi1Rud1r6DV68MrP19FofG1HyinlAUq55TrB0gVs8pWgaah8ZUJOoJRbFzOrm5WOYUa4eah8b0fmv/RDWhKHZOJzc/672f4vHRILOaUHRwLic3P2vbXt4eCise9YSigxlPbs42p2iNl0j0IRQdzHhy861c12ejVR9C0cHyaF35zrc86s+2n6Llur4W9k/0IRSdzDanmPG6vpaY+ujRh1B0MtvJzerr+lrmFGtjKhL9CEUnb/nk5pcsM4r1c4p1v8/esmg3QtFJjxum1qp+R14br7Ux3dpo1Y1QdFR9w9Sok5tfU31d34Ot290IRUdv9eTm11Tup1gi8fwSFvoQio6qT27e3bZ838dcx+BfO6ewLNqXUHQ04w1T1Z/zq67rs9GqL6Ho7K2d3EyqruuzNNqXUHQ228nN6uv6Wo7Bp49o5hP9CUVns600LGY7Bp+Gvo++6Kc7oejsLZ3cfK1jL9ve+6Kf7oRigLdycvO1bhq2l38rpr7opz+hGGDGk5uVc4pjHoP3RcRjCMUAM57crJxTtByD/9rQ1/6JMYRigOqTm7c3LRuvTuO6PvsnxhCKQba7ueYUM17X96WY2j8xhlAMUj2nuGm4CbtSy5zi/zE1nxhHKAY59ZOba10dYT/F3v6JYYRikFM+udli+Th06Jxia//EMEIxUPUNU1UnN1sd+sVA9k+MIxQDVQ/mqk5utjrkuj5fRDyWUAx0qic3Wx1yXZ9l0bGEYqDqk5t3DfspKucAh1zXZ1l0LKEYbLYbpma9rs+OzLGEYrDZlkmrVxZajsEvcwrzibGEYrDZTm5WzylaBpp//n2/YSyhGKx6P8V100rDbNf1eZoYTSgGqz652XLD1GzX9TGeUEzgVE5uHsvaY/CMJxQTmPHkZuWcouUYPGMJxQRmPLk523V9jOVvawLLnKJyLtByw9Rs1/UxllBMYrY5xWzX9TGWUExitpOb1df13Vj5OClCMYmZT25WWGYU5hSnw9/UJHrcMLVW9X4KTxWnQygmUn3D1LG/setQLec+GEMoJjLryc0qnihOh1BMpPrk5t1ty/d9zHUMnjGEYiIz3jBVvWv0zn6KkyAUk5nv5OZc1/UxhlBMZraTm9XX9TlJehqEYjIzrjTMdgye/oRiMtUnN2f7YqCFZdL5CcWEZju5Odt1ffT37tcPH583AN/giQKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKI/gE7SXVdY25ypwAAAABJRU5ErkJggg==",desc:"A valid URL. Alternatively, you can provide a state reference to a Matplotlib figure or a packed file.",type:W.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:W.Text},maxWidth:{name:"Max width (px)",type:W.Number,default:"-1",category:qe.Style},maxHeight:{name:"Max height (px)",type:W.Number,default:"-1",category:qe.Style},secondaryTextColor:hr,cssClasses:at},events:{"wf-click":{desc:"Capture single clicks.",stub:FP.trim()}},previewField:"caption"}},D_=Ce({...jP,__name:"CoreImage",setup(e){const t=it("rootEl"),n=te(re.core),r=te(re.evaluatedFields),a=te(re.componentId),o=j(()=>{var u;return{cursor:typeof((u=n.getComponentById(a).handlers)==null?void 0:u["wf-click"])<"u"?"pointer":"unset"}}),s=j(()=>{const l=r.maxWidth.value,c=r.maxHeight.value;return{"max-width":l!==-1?`${l}px`:void 0,"max-height":c!==-1?`${c}px`:void 0}});function i(l){const c=gi(l);t.value.dispatchEvent(c)}return(l,c)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:bt(o.value),onClick:i},[L("img",{src:P(r).src.value,alt:P(r).caption.value,draggable:"false",style:bt(s.value)},null,12,LP),P(r).caption.value||P(r).caption.value===0?(E(),M("div",DP,Te(P(r).caption.value),1)):ge("",!0)],4))}}),km=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve images directly. For example, \`static/my_image.png\`.

Alternatively, pass a Matplotlib figure via state.

\`state["my_fig"] = fig\` and then setting the _Image_ source to \`@{fig}\`

You can also use packed files or bytes:

\`state["img_b"] = wf.pack_bytes(img_bytes, "image/png")\`

\`state["img_f"] = wf.pack_file(img_file, "image/png")\``)};typeof km=="function"&&km(D_);const VP=ke(D_,[["__scopeId","data-v-88b01ba2"]]),UP={},HP={class:"LoadingSymbol"};function zP(e,t){return E(),M("div",HP,t[0]||(t[0]=[L("div",null,null,-1)]))}const B_=ke(UP,[["render",zP],["__scopeId","data-v-5a38f374"]]),KP={class:"BaseEmptiness"},WP={class:"content"},qP={class:"title"},GP={key:0,class:"message"},JP=Ce({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=te(re.core),r=j(()=>n.getComponentById(t.componentId)),a=j(()=>n.getComponentDefinition(r.value.type));return(o,s)=>(E(),M("div",KP,[L("div",WP,[L("div",qP,[L("h3",null,"Empty "+Te(a.value.name),1)]),e.message?(E(),M("div",GP,Te(e.message),1)):ge("",!0)])]))}}),Lf=ke(JP,[["__scopeId","data-v-8c972dbe"]]),YP={key:0,class:"message"},XP="A component that displays a message in various styles, including success, error, warning, and informational.",QP={writer:{name:"Message",description:XP,category:"Content",fields:{message:{name:"Message",type:W.Text,desc:"Prefix with '+' for a success message, with '-' for error, '!' for warning, '%' for loading. No prefix for info. Leave empty to hide."},successColor:{name:"Success",default:St.Green3,type:W.Color,category:qe.Style},errorColor:{name:"Error",default:St.Orange2,type:W.Color,category:qe.Style},warningColor:{name:"Warning",default:"#FFE999",type:W.Color,category:qe.Style},infoColor:{name:"Info",default:St.Blue2,type:W.Color,category:qe.Style},loadingColor:{name:"Loading",default:St.Blue2,type:W.Color,category:qe.Style},primaryTextColor:Qt,cssClasses:at},previewField:"name"}},F_=Ce({...QP,__name:"CoreMessage",setup(e){const t=te(re.componentId),n=te(re.evaluatedFields),r=te(re.isBeingEdited),a=j(()=>{const i=n.message.value;if(!i)return"neutral";const l=i.charAt(0);return l=="+"?"success":l=="-"?"error":l=="!"?"warning":l=="%"?"loading":"info"}),o=j(()=>{const i=n.message.value;if(!i)return;const l=i.charAt(0);return l=="+"||l=="-"||l=="!"||l=="%"?i.substring(1).trim():i}),s=j(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[a.value]}));return(i,l)=>o.value||P(r)?(E(),M("div",{key:0,class:ut(["CoreMessage",a.value]),style:bt(s.value)},[o.value?(E(),M("p",YP,[a.value=="loading"?(E(),De(B_,{key:0,class:"loadingSymbol"})):ge("",!0),L("span",null,Te(o.value),1)])):(E(),De(Lf,{key:1,"component-id":P(t)},null,8,["component-id"]))],6)):ge("",!0)}}),Tm=e=>{e.writer&&(e.writer.docs=`When working with operations that can succeed or fail, _Message_ can be useful. You can reserve a state element to be used for the outcome of the operation; empty messages aren't shown, so you can initialise it empty.
Then, assign a message when the operation is completed.

\`\`\`python
state["msg"] = ""

if is_ok:
  state["msg"] = "+It worked!"
else:
  state["msg"] = "-It failed"
\`\`\``)};typeof Tm=="function"&&Tm(F_);const ZP=ke(F_,[["__scopeId","data-v-5eb22d34"]]),eM={key:0,class:"name"},tM={key:1,class:"description"},nM={class:"value"},rM={key:2,class:"note"},aM="A component that prominently displays a metric value and associated information.",oM={writer:{name:"Metric",description:aM,category:"Content",fields:{name:{name:"Name",init:"Metric",type:W.Text},metricValue:{name:"Value",default:"0",type:W.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:W.Text},note:{name:"Note",init:"+Pass",type:W.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:Qt,secondaryTextColor:hr,positiveColor:{name:"Positive",default:St.Green3,type:W.Color,category:qe.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:W.Color,category:qe.Style},negativeColor:{name:"Negative",default:St.Orange2,type:W.Color,category:qe.Style},cssClasses:at},previewField:"name"}},sM=Ce({...oM,__name:"CoreMetric",setup(e){const t=te(re.evaluatedFields),n=j(()=>{const o=t.note.value;if(!o)return"neutral";const s=o.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),r=j(()=>{const o=t.note.value;if(!o)return;const s=o.charAt(0);return s=="+"||s=="-"?o.substring(1):o}),a=j(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(o,s)=>(E(),M("div",{class:"CoreMetric",style:bt(a.value)},[P(t).name.value?(E(),M("div",eM,Te(P(t).name.value),1)):ge("",!0),P(t).description.value?(E(),M("div",tM,Te(P(t).description.value),1)):ge("",!0),L("h2",nM,Te(P(t).metricValue.value),1),r.value?(E(),M("div",rM,Te(r.value),1)):ge("",!0)],4))}}),iM=ke(sM,[["__scopeId","data-v-bc5826e1"]]),lM="A component that displays Plotly graphs.",cM={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},uM={writer:{name:"Plotly Graph",description:lM,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(cM,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:W.Object},cssClasses:at},events:{"plotly-click":{desc:"Sends a list with the clicked points.",eventPayloadExample:{curveNumber:0,pointNumber:2,x:"c",y:29,label:"c",xaxis:{anchor:"y"},yaxis:{anchor:"x"}}},"plotly-selected":{desc:"Sends a list with the selected points."},"plotly-deselect":{desc:"Triggered when points are deselected."}}}},j_=Ce({...uM,__name:"CorePlotlyGraph",setup(e){const t=it("rootEl"),n=it("chartTargetEl"),r=te(re.evaluatedFields),a=j(()=>r.spec.value),o={paper_bgcolor:St.White,plot_bgcolor:St.Gray1,colorway:[St.Blue4,St.Blue4,St.Orange4,St.Green5],font:{family:"Poppins, sans-serif",size:12,color:St.Black},hoverlabel:{color:St.White,bgcolor:St.Black}},s=async()=>{var m,_,g;if(!a.value||!n.value)return;const d=await en(()=>import("./plotly.min-DRf-5WrJ.js").then(w=>w.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const h={...a.value,layout:{...o,...(m=a.value)==null?void 0:m.layout}};d.newPlot(n.value,h),l(),(g=(_=a.value)==null?void 0:_.layout)!=null&&g.autosize&&i()};function i(){const d=t.value.parentElement;d!=null&&d.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function l(){n.value.on("plotly_click",u("plotly-click")),n.value.on("plotly_selected",u("plotly-selected")),n.value.on("plotly_deselect",u("plotly-deselect"))}function c(d){var h,m;return{curveNumber:d.curveNumber,pointNumber:d.pointNumber,pointNumbers:d.pointNumbers,x:d.x,y:d.y,z:d.z,label:d.label,lat:d.lat,lon:d.lon,xaxis:{anchor:(h=d.xaxis)==null?void 0:h.anchor},yaxis:{anchor:(m=d.yaxis)==null?void 0:m.anchor}}}function u(d){return h=>{var _;const m=new CustomEvent(d,{detail:{payload:(_=h==null?void 0:h.points)==null?void 0:_.map(g=>c(g))}});t.value.dispatchEvent(m)}}return We(a,d=>{d&&s()}),ln(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(d,h)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[L("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),h[0]||(h[0]=L("div",{class:"mask"},null,-1))],512))}}),xm=e=>{e.writer&&(e.writer.docs=`You can listen to events triggered by Plotly.js and add interactivity to your charts.
For example, implement cross-filtering.`)};typeof xm=="function"&&xm(j_);const dM=ke(j_,[["__scopeId","data-v-3de9c6e5"]]),fM=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,pM="A component to display plain text or formatted text using Markdown syntax.",hM={writer:{name:"Text",description:pM,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:W.Text,control:nc.Textarea},useMarkdown:{...xt,name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no"},alignment:{name:"Alignment",default:"left",type:W.Text,options:{left:"Left",center:"Center",right:"Right"},category:qe.Style},primaryTextColor:Qt,cssClasses:at},events:{"wf-click":{desc:"Capture single clicks.",stub:fM.trim()}},previewField:"text"}},mM=Ce({...hM,__name:"CoreText",setup(e){const t=it("rootEl"),n=te(re.evaluatedFields),r=te(re.componentId),a=te(re.core),o=te(re.isBeingEdited),s=j(()=>!n.text.value),i=j(()=>!s.value||o.value),l=j(()=>{var m;return{cursor:typeof((m=a.getComponentById(r).handlers)==null?void 0:m["wf-click"])<"u"?"pointer":"unset"}}),c=j(()=>({"text-align":n.alignment.value}));function u(d){const h=gi(d);t.value.dispatchEvent(h)}return(d,h)=>i.value?(E(),M("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:bt(l.value),onClick:u},[s.value?(E(),De(Lf,{key:0,"component-id":P(r)},null,8,["component-id"])):(E(),M(Ye,{key:1},[P(n).useMarkdown.value?(E(),De(hy,{key:0,"raw-text":P(n).text.value,style:bt(c.value)},null,8,["raw-text","style"])):(E(),M("p",{key:1,class:"plainText",style:bt(c.value)},Te(P(n).text.value),5))],64))],4)):ge("",!0)}}),vM=ke(mM,[["__scopeId","data-v-d4e9274e"]]),V_="A component that displays Vega-Lite/Altair charts.",gM={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:V_,data:{values:[{a:"A",b:100},{a:"B",b:200},{a:"C",b:150},{a:"D",b:300}]},mark:"bar",encoding:{x:{field:"a",type:"nominal"},y:{field:"b",type:"quantitative"}}},yM={writer:{name:"Vega Lite Chart",description:V_,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(gM,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:W.Object},cssClasses:at}}},U_=Ce({...yM,__name:"CoreVegaLiteChart",setup(e){const t=it("rootEl"),n=it("chartTargetEl"),r=te(re.evaluatedFields),a=async()=>{if(!r.spec.value||!n.value)return;const{default:o}=await en(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await o(n.value,r.spec.value)};return We(()=>r.spec.value,o=>{o&&a()}),ln(()=>{a(),new ResizeObserver(a).observe(t.value,{box:"border-box"})}),(o,s)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[L("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),Pm=e=>{e.writer&&(e.writer.docs=`Generate a chart using Altair and pass it via state; it'll be converted to Vega-Lite specification.

\`state["my_chart"] = chart\`

Afterwards, you can reference the chart in the specification using the syntax \`@{my_chart}\`.

Alternatively, you can work with Vega-Lite directly.`)};typeof Pm=="function"&&Pm(U_);const _M=ke(U_,[["__scopeId","data-v-c7c1318d"]]),bM={class:"CoreVideoPlayer"},wM=["src","controls","autoplay","loop","muted"],AM="A video player component that can play various video formats.",CM={writer:{name:"Video Player",description:AM,category:"Content",fields:{src:{name:"Source",desc:"The URL of the video file. Alternatively, you can pass a file via state.",default:"",type:W.Text,validator:x_},controls:{...xt,name:"Controls",desc:"Display video player controls.",default:"yes"},autoplay:{...xt,name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no"},loop:{...xt,name:"Loop",desc:"Loop the video when it reaches the end.",default:"no"},muted:{...xt,name:"Muted",desc:"Mute the video by default.",default:"no"},cssClasses:at}}},H_=Ce({...CM,__name:"CoreVideoPlayer",setup(e){const t=te(re.evaluatedFields);return(n,r)=>(E(),M("div",bM,[L("video",{src:P(t).src.value,controls:P(t).controls.value,autoplay:P(t).autoplay.value,loop:P(t).loop.value,muted:P(t).muted.value},null,8,wM),r[0]||(r[0]=L("div",{class:"mask"},null,-1))]))}}),Mm=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve videos directly. For example, \`static/my_video.mp4\`.

Alternatively, you can pack bytes or files in state:

\`state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")\`

\`state["vid_f"] = wf.pack_file(vid_file, "video/mp4")\`

Afterwards, you can reference the video using the syntax \`@{vid_f}\`.`)};typeof Mm=="function"&&Mm(H_);const $M=ke(H_,[["__scopeId","data-v-80b03e78"]]),SM={class:"CoreLink"},IM=["href","target","rel"],EM={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:W.Text,default:"https://writer.com",desc:"Specify a URL or choose a page. Keep in mind that you can only link to pages for which a key has been specified.",options:e=>Object.fromEntries(e.getComponents("root",{sortedByPosition:!0}).map(t=>t.content.key).filter(t=>!!t).map(t=>[`#${t}`,`Page with key: ${t}`]))},target:{name:"Target",type:W.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:W.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:W.Text,desc:"The text to display in the link."},primaryTextColor:Qt,cssClasses:at}}},kM=Ce({...EM,__name:"CoreLink",setup(e){const t=te(re.evaluatedFields),n=j(()=>t.text.value||t.url.value);return(r,a)=>(E(),M("div",SM,[L("a",{href:P(t).url.value,target:P(t).target.value,rel:P(t).rel.value},Te(n.value),9,IM)]))}}),TM=ke(kM,[["__scopeId","data-v-f7f2507b"]]),xM={},PM={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function MM(e,t){return E(),M("svg",PM,t[0]||(t[0]=[L("path",{d:"M14.0712 4.50295C14.2882 4.72002 14.2882 5.07197 14.0712 5.28905L10.5337 8.8265C10.3166 9.04357 9.96468 9.04357 9.7476 8.8265C9.53052 8.60942 9.53052 8.25747 9.7476 8.0404L12.892 4.896L9.7476 1.7516C9.53052 1.53452 9.53052 1.18257 9.7476 0.965495C9.96467 0.74842 10.3166 0.74842 10.5337 0.965495L14.0712 4.50295ZM13.6781 5.45185L3.67268 5.45185L3.67268 4.34014L13.6781 4.34014L13.6781 5.45185ZM2.00511 7.11942L2.00511 8.23114L0.893394 8.23114L0.893394 7.11942L2.00511 7.11942ZM3.67268 9.89871L5.52553 9.89871L5.52553 11.0104L3.67268 11.0104L3.67268 9.89871ZM2.00511 8.23114C2.00511 9.15211 2.7517 9.89871 3.67268 9.89871L3.67268 11.0104C2.13772 11.0104 0.893394 9.76609 0.893394 8.23114L2.00511 8.23114ZM3.67268 5.45185C2.7517 5.45185 2.00511 6.19845 2.00511 7.11942L0.893394 7.11942C0.893394 5.58447 2.13772 4.34014 3.67268 4.34014L3.67268 5.45185Z",fill:"currentColor"},null,-1)]))}const OM=ke(xM,[["render",MM]]),NM={class:"CoreChatbotAvatar"},RM=Ce({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(E(),M("div",NM,Te(e.initials),1))}}),LM=ke(RM,[["__scopeId","data-v-ce5bb453"]]),DM=["aria-busy"],BM={key:1,class:"CoreChatbotMessage__content__text"},FM={key:2,class:"CoreChatbotMessage__content__actions"},jM=["onClick"],VM={key:0,class:"subheading"},UM={class:"name"},HM={key:1,class:"desc"},zM=Ce({__name:"CoreChatbotMessage",props:{initials:{type:String,required:!0},useMarkdown:{type:Boolean,required:!1},message:{type:Object,required:!1,default:void 0},assistantRoleColor:{type:String,required:!1,default:""},isLoading:{type:Boolean,required:!1}},emits:{actionClick:e=>typeof e=="object"&&e!==null},setup(e){const t=uo(()=>en(()=>import("./BaseMarkdown-C-1JnKTi.js"),[],import.meta.url)),n=uo(()=>en(()=>import("./WdsLoaderDots-ES3W-XHQ.js"),[],import.meta.url)),r=e,a=j(()=>{var c;return((c=r.message)==null?void 0:c.actions)??[]}),o=j(()=>r.isLoading&&!i.value),s=j(()=>{var c;return r.isLoading?"assistant":((c=r.message)==null?void 0:c.role)??""}),i=j(()=>{var c;return((c=r.message)==null?void 0:c.content.trim())??""}),l=j(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return r.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(c,u)=>(E(),M("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[Fe(LM,{initials:e.initials},null,8,["initials"]),L("div",{class:"CoreChatbotMessage__content",style:bt({background:l.value})},[o.value?(E(),De(P(n),{key:0})):(E(),M("div",BM,[e.useMarkdown?(E(),De(P(t),{key:0,"raw-text":i.value},null,8,["raw-text"])):(E(),M(Ye,{key:1},[tn(Te(i.value),1)],64))])),a.value.length?(E(),M("div",FM,[(E(!0),M(Ye,null,Pt(a.value,(d,h)=>(E(),M("button",{key:h,class:"action",onClick:m=>c.$emit("actionClick",d)},[d.subheading?(E(),M("div",VM,Te(d.subheading),1)):ge("",!0),L("h3",UM,Te(d.name),1),d.desc?(E(),M("div",HM,Te(d.desc),1)):ge("",!0)],8,jM))),128))])):ge("",!0)],4)],8,DM))}}),Om=ke(zM,[["__scopeId","data-v-502b71b2"]]),KM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],WM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],GM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Nm=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Rm(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?GM:qM:t.binary?WM:KM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const a=e<0,o=a?"-":t.signed?"+":"";a&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Nm(e,t.locale,s);return o+u+r+n[0]}const i=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**i,s||(e=e.toPrecision(3));const l=Nm(Number(e),t.locale,s),c=n[i];return o+l+r+c}const JM={class:"filesArea"},YM={key:1,class:"list"},XM=["title"],QM={class:"size"},ZM={class:"filesButtons"},eO={key:1,class:"sizeExceededMessage"},tO={class:"inputArea"},nO={class:"inputButtons"},vu=200*1024*1024,rO="A chatbot component to build human-to-AI interactions.",aO=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,oO=`
def handle_message_simple(payload, state):

	# payload contains a dict in the form { "role": "user", "message": "hello"}

	state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "Hello human" if payload == "Hello" else "I don't understand"
    }]

    # Handle streaming by appending to the last message

    import time
    for i in range(10):
        conv = state["conversation"]
        conv[-1]["content"] += f" {i}"
        state["conversation"] = conv
        time.sleep(0.5)
`.trim(),sO=`
def handle_action_simple(payload, state):

    # payload contains the "data" property of the action

    if payload == "change_title":
        state["app_background_color"] = "red"

# Make an action available when adding a message

def handle_message_with_action(payload, state):
    state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "I don't know, but check this out.",
        "actions": [{
            "subheading": "Resource",
            "name": "Surprise",
            "desc": "Click to be surprised",
            "data": "change_title"
        }]
    }]
`.trim(),iO=`
def handle_file_upload(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
        name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)
`.trim(),lO={writer:{name:"Chatbot",description:rO,category:"Content",fields:{conversation:{name:"Conversation",init:aO,desc:"An array with messages or a writer.ai.Conversation object.",type:W.Object,validator:H2},assistantInitials:{name:"Assistant initials",default:"AI",type:W.Text},userInitials:{name:"User initials",default:"YOU",type:W.Text},useMarkdown:{...xt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},enableFileUpload:{name:"Enable file upload",default:"no",type:W.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:W.Text},assistantRoleColor:{name:"Assistant role",type:W.Color,category:qe.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:St.Gray1,type:W.Color,category:qe.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:St.Gray6,type:W.Color,category:qe.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:St.White,type:W.Color,category:qe.Style,applyStyleVariable:!0},accentColor:vn,containerBackgroundColor:va,primaryTextColor:Qt,secondaryTextColor:hr,separatorColor:cn,buttonColor:{...Jr,default:St.Black},buttonTextColor:{...Yr,default:St.White},cssClasses:at},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:oO,eventPayloadExample:{role:"user",content:"I'm building a Chatbot"}},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:sO},"wf-file-change":{desc:"Triggered when files are uploaded",stub:iO}}}},z_=Ce({...lO,__name:"CoreChatbot",setup(e){const t=it("rootEl"),n=it("messageAreaEl"),r=it("messagesEl"),a=$e(void 0),o=te(re.evaluatedFields),s=En([]),i=$e(!1);let l;const c=j(()=>{var p;return((p=o.conversation)==null?void 0:p.value)??[]}),u=$e(""),d=j(()=>{let p=0;return Array.from(s.value).forEach(b=>{p+=b.size}),p>=vu}),h=j(()=>a.value===void 0?!1:a.value>=c.value.length);function m(){if(a.value)return;a.value=c.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:u.value},callback:()=>{a.value=void 0}}});t.value.dispatchEvent(p),u.value=""}function _(p){const{data:b}=p,S=new CustomEvent("wf-chatbot-action-click",{detail:{payload:b}});t.value.dispatchEvent(S)}function g(){const p=document.createElement("input");p.type="file",o.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let b;o.enableFileUpload.value=="multiple"?b=[...s.value]:b=[],Array.from(p.files).forEach(S=>{b.push(S)}),s.value=b}),p.dispatchEvent(new MouseEvent("click"))}function w(p){const b=s.value.toSpliced(p,1);s.value=b}function A(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const C=async p=>{const b=new FileReader;return b.readAsDataURL(p),new Promise((S,R)=>{b.onload=()=>S(b.result),b.onerror=()=>R(b.error)})};async function y(){if(s.value.length==0||i.value)return;i.value=!0;const b=await(async()=>{let R=0;const K=Promise.all(Array.from(s.value).map(async G=>(R+=G.size,{name:G.name,type:G.type,data:await C(G)})));if(R>vu){alert("Size limit exceeded.");return}return K})();if(!b){i.value=!1;return}const S=new CustomEvent("wf-file-change",{detail:{payload:b,callback:()=>{i.value=!1,s.value=[]}}});t.value.dispatchEvent(S)}return ln(()=>{l=new ResizeObserver(()=>{A()}),l.observe(r.value)}),ha(()=>{l.unobserve(r.value)}),(p,b)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[L("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[L("div",{ref_key:"messagesEl",ref:r,class:"messages"},[(E(!0),M(Ye,null,Pt(c.value,(S,R)=>(E(),De(Om,{key:R,message:S,"use-markdown":P(o).useMarkdown.value,"assistant-role-color":P(o).assistantRoleColor.value,initials:S.role==="assistant"?P(o).assistantInitials.value:P(o).userInitials.value,onActionClick:b[0]||(b[0]=K=>_(K))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),h.value?(E(),De(Om,{key:0,"is-loading":"",initials:P(o).assistantInitials.value},null,8,["initials"])):ge("",!0)],512)],512),s.value.length>0?(E(),M(Ye,{key:0},[L("div",JM,[i.value?(E(),M(Ye,{key:0},[tn(" Uploading... ")],64)):ge("",!0),i.value?ge("",!0):(E(),M("div",YM,[(E(!0),M(Ye,null,Pt(s.value,(S,R)=>(E(),M("div",{key:R,class:"file"},[L("div",null,[L("div",{class:"name",title:S.name},Te(S.name),9,XM),L("div",QM,Te(P(Rm)(S.size)),1)]),Fe(Cr,{onClick:K=>w(R)},{default:Ze(()=>b[2]||(b[2]=[L("i",{class:"material-symbols-outlined"}," delete ",-1)])),_:2},1032,["onClick"])]))),128))]))]),L("div",ZM,[!d.value&&!i.value?(E(),De(Cr,{key:0,title:"Upload",onClick:y},{default:Ze(()=>b[3]||(b[3]=[L("i",{class:"material-symbols-outlined"},"upload",-1)])),_:1})):ge("",!0),d.value?(E(),M("div",eO,[b[4]||(b[4]=L("i",{class:"material-symbols-outlined"},"warning",-1)),tn(" Size limit of "+Te(P(Rm)(vu))+" exceeded. ",1)])):ge("",!0)])],64)):ge("",!0),L("div",tO,[Fe(Nd,{modelValue:u.value,"onUpdate:modelValue":b[1]||(b[1]=S=>u.value=S),placeholder:P(o).placeholder.value,onKeydown:da(lr(m,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),L("div",nO,[Fe(Cr,{class:"send action",title:"Send message",onClick:m},{default:Ze(()=>[Fe(OM)]),_:1}),P(o).enableFileUpload.value!="no"?(E(),De(Cr,{key:0,class:"action",title:"Attach files",onClick:g},{default:Ze(()=>b[5]||(b[5]=[L("i",{class:"material-symbols-outlined"},"attach_file",-1)])),_:1})):ge("",!0)])],512))}}),Lm=e=>{e.writer&&(e.writer.docs="Connect it to an LLM by handling the `wf-chatbot-message` event, which is triggered every time the user sends a message.\n\nYou can add `actions` to messages, which are buttons that trigger the `wf-chatbot-action-click`.\n\nSee the stubs for more details.")};typeof Lm=="function"&&Lm(z_);const cO=ke(z_,[["__scopeId","data-v-fcbc1aa1"]]);var K_={exports:{}};/**
 * chroma.js - JavaScript library for color conversions
 *
 * Copyright (c) 2011-2019, Gregor Aisch
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name Gregor Aisch may not be used to endorse or promote products
 * derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * -------------------------------------------------------
 *
 * chroma.js includes colors from colorbrewer2.org, which are released under
 * the following license:
 *
 * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
 * and The Pennsylvania State University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * ------------------------------------------------------
 *
 * Named colors are taken from X11 Color Names.
 * http://www.w3.org/TR/css3-color/#svg-color
 *
 * @preserve
 */(function(e,t){(function(n,r){e.exports=r()})(KI,function(){for(var n=function(f,v,$){return v===void 0&&(v=0),$===void 0&&($=1),f<v?v:f>$?$:f},r=n,a=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var v=0;v<=3;v++)v<3?((f[v]<0||f[v]>255)&&(f._clipped=!0),f[v]=r(f[v],0,255)):v===3&&(f[v]=r(f[v],0,1));return f},o={},s=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<i.length;s+=1){var l=i[s];o["[object "+l+"]"]=l.toLowerCase()}var c=function(f){return o[Object.prototype.toString.call(f)]||"object"},u=c,d=function(f,v){return v===void 0&&(v=null),f.length>=3?Array.prototype.slice.call(f):u(f[0])=="object"&&v?v.split("").filter(function($){return f[0][$]!==void 0}).map(function($){return f[0][$]}):f[0]},h=c,m=function(f){if(f.length<2)return null;var v=f.length-1;return h(f[v])=="string"?f[v].toLowerCase():null},_=Math.PI,g={clip_rgb:a,limit:n,type:c,unpack:d,last:m,PI:_,TWOPI:_*2,PITHIRD:_/3,DEG2RAD:_/180,RAD2DEG:180/_},w={format:{},autodetect:[]},A=g.last,C=g.clip_rgb,y=g.type,p=w,b=function(){for(var v=[],$=arguments.length;$--;)v[$]=arguments[$];var T=this;if(y(v[0])==="object"&&v[0].constructor&&v[0].constructor===this.constructor)return v[0];var D=A(v),H=!1;if(!D){H=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(Se,Ue){return Ue.p-Se.p}),p.sorted=!0);for(var N=0,ee=p.autodetect;N<ee.length;N+=1){var oe=ee[N];if(D=oe.test.apply(oe,v),D)break}}if(p.format[D]){var he=p.format[D].apply(null,H?v:v.slice(0,-1));T._rgb=C(he)}else throw new Error("unknown format: "+v);T._rgb.length===3&&T._rgb.push(1)};b.prototype.toString=function(){return y(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var S=b,R=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(R.Color,[null].concat(f)))};R.Color=S,R.version="2.4.2";var K=R,G=g.unpack,Z=Math.max,Ie=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=G(f,"rgb"),T=$[0],D=$[1],H=$[2];T=T/255,D=D/255,H=H/255;var N=1-Z(T,Z(D,H)),ee=N<1?1/(1-N):0,oe=(1-T-N)*ee,he=(1-D-N)*ee,Se=(1-H-N)*ee;return[oe,he,Se,N]},de=Ie,Ae=g.unpack,we=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=Ae(f,"cmyk");var $=f[0],T=f[1],D=f[2],H=f[3],N=f.length>4?f[4]:1;return H===1?[0,0,0,N]:[$>=1?0:255*(1-$)*(1-H),T>=1?0:255*(1-T)*(1-H),D>=1?0:255*(1-D)*(1-H),N]},Ge=we,xe=K,ye=S,_e=w,He=g.unpack,me=g.type,V=de;ye.prototype.cmyk=function(){return V(this._rgb)},xe.cmyk=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(ye,[null].concat(f,["cmyk"])))},_e.format.cmyk=Ge,_e.autodetect.push({p:2,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=He(f,"cmyk"),me(f)==="array"&&f.length===4)return"cmyk"}});var ue=g.unpack,J=g.last,I=function(f){return Math.round(f*100)/100},O=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=ue(f,"hsla"),T=J(f)||"lsa";return $[0]=I($[0]||0),$[1]=I($[1]*100)+"%",$[2]=I($[2]*100)+"%",T==="hsla"||$.length>3&&$[3]<1?($[3]=$.length>3?$[3]:1,T="hsla"):$.length=3,T+"("+$.join(",")+")"},ie=O,Be=g.unpack,je=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=Be(f,"rgba");var $=f[0],T=f[1],D=f[2];$/=255,T/=255,D/=255;var H=Math.min($,T,D),N=Math.max($,T,D),ee=(N+H)/2,oe,he;return N===H?(oe=0,he=Number.NaN):oe=ee<.5?(N-H)/(N+H):(N-H)/(2-N-H),$==N?he=(T-D)/(N-H):T==N?he=2+(D-$)/(N-H):D==N&&(he=4+($-T)/(N-H)),he*=60,he<0&&(he+=360),f.length>3&&f[3]!==void 0?[he,oe,ee,f[3]]:[he,oe,ee]},ne=je,Q=g.unpack,se=g.last,le=ie,k=ne,x=Math.round,q=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=Q(f,"rgba"),T=se(f)||"rgb";return T.substr(0,3)=="hsl"?le(k($),T):($[0]=x($[0]),$[1]=x($[1]),$[2]=x($[2]),(T==="rgba"||$.length>3&&$[3]<1)&&($[3]=$.length>3?$[3]:1,T="rgba"),T+"("+$.slice(0,T==="rgb"?3:4).join(",")+")")},pe=q,B=g.unpack,z=Math.round,ae=function(){for(var f,v=[],$=arguments.length;$--;)v[$]=arguments[$];v=B(v,"hsl");var T=v[0],D=v[1],H=v[2],N,ee,oe;if(D===0)N=ee=oe=H*255;else{var he=[0,0,0],Se=[0,0,0],Ue=H<.5?H*(1+D):H+D-H*D,Oe=2*H-Ue,Xe=T/360;he[0]=Xe+1/3,he[1]=Xe,he[2]=Xe-1/3;for(var Je=0;Je<3;Je++)he[Je]<0&&(he[Je]+=1),he[Je]>1&&(he[Je]-=1),6*he[Je]<1?Se[Je]=Oe+(Ue-Oe)*6*he[Je]:2*he[Je]<1?Se[Je]=Ue:3*he[Je]<2?Se[Je]=Oe+(Ue-Oe)*(2/3-he[Je])*6:Se[Je]=Oe;f=[z(Se[0]*255),z(Se[1]*255),z(Se[2]*255)],N=f[0],ee=f[1],oe=f[2]}return v.length>3?[N,ee,oe,v[3]]:[N,ee,oe,1]},F=ae,U=F,Y=w,fe=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ve=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Pe=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Le=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,rt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,pt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,dt=Math.round,zt=function(f){f=f.toLowerCase().trim();var v;if(Y.format.named)try{return Y.format.named(f)}catch{}if(v=f.match(fe)){for(var $=v.slice(1,4),T=0;T<3;T++)$[T]=+$[T];return $[3]=1,$}if(v=f.match(ve)){for(var D=v.slice(1,5),H=0;H<4;H++)D[H]=+D[H];return D}if(v=f.match(Pe)){for(var N=v.slice(1,4),ee=0;ee<3;ee++)N[ee]=dt(N[ee]*2.55);return N[3]=1,N}if(v=f.match(Le)){for(var oe=v.slice(1,5),he=0;he<3;he++)oe[he]=dt(oe[he]*2.55);return oe[3]=+oe[3],oe}if(v=f.match(rt)){var Se=v.slice(1,4);Se[1]*=.01,Se[2]*=.01;var Ue=U(Se);return Ue[3]=1,Ue}if(v=f.match(pt)){var Oe=v.slice(1,4);Oe[1]*=.01,Oe[2]*=.01;var Xe=U(Oe);return Xe[3]=+v[4],Xe}};zt.test=function(f){return fe.test(f)||ve.test(f)||Pe.test(f)||Le.test(f)||rt.test(f)||pt.test(f)};var Nt=zt,nn=K,Zt=S,ce=w,Me=g.type,be=pe,Ee=Nt;Zt.prototype.css=function(f){return be(this._rgb,f)},nn.css=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Zt,[null].concat(f,["css"])))},ce.format.css=Ee,ce.autodetect.push({p:5,test:function(f){for(var v=[],$=arguments.length-1;$-- >0;)v[$]=arguments[$+1];if(!v.length&&Me(f)==="string"&&Ee.test(f))return"css"}});var Ve=S,ze=K,ot=w,Tt=g.unpack;ot.format.gl=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=Tt(f,"rgba");return $[0]*=255,$[1]*=255,$[2]*=255,$},ze.gl=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Ve,[null].concat(f,["gl"])))},Ve.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var ht=g.unpack,Dt=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=ht(f,"rgb"),T=$[0],D=$[1],H=$[2],N=Math.min(T,D,H),ee=Math.max(T,D,H),oe=ee-N,he=oe*100/255,Se=N/(255-oe)*100,Ue;return oe===0?Ue=Number.NaN:(T===ee&&(Ue=(D-H)/oe),D===ee&&(Ue=2+(H-T)/oe),H===ee&&(Ue=4+(T-D)/oe),Ue*=60,Ue<0&&(Ue+=360)),[Ue,he,Se]},Jt=Dt,Kt=g.unpack,Yt=Math.floor,gn=function(){for(var f,v,$,T,D,H,N=[],ee=arguments.length;ee--;)N[ee]=arguments[ee];N=Kt(N,"hcg");var oe=N[0],he=N[1],Se=N[2],Ue,Oe,Xe;Se=Se*255;var Je=he*255;if(he===0)Ue=Oe=Xe=Se;else{oe===360&&(oe=0),oe>360&&(oe-=360),oe<0&&(oe+=360),oe/=60;var mt=Yt(oe),At=oe-mt,Et=Se*(1-he),Mt=Et+Je*(1-At),Cn=Et+Je*At,bn=Et+Je;switch(mt){case 0:f=[bn,Cn,Et],Ue=f[0],Oe=f[1],Xe=f[2];break;case 1:v=[Mt,bn,Et],Ue=v[0],Oe=v[1],Xe=v[2];break;case 2:$=[Et,bn,Cn],Ue=$[0],Oe=$[1],Xe=$[2];break;case 3:T=[Et,Mt,bn],Ue=T[0],Oe=T[1],Xe=T[2];break;case 4:D=[Cn,Et,bn],Ue=D[0],Oe=D[1],Xe=D[2];break;case 5:H=[bn,Et,Mt],Ue=H[0],Oe=H[1],Xe=H[2];break}}return[Ue,Oe,Xe,N.length>3?N[3]:1]},ga=gn,hs=g.unpack,mr=g.type,ya=K,_a=S,Xr=w,vc=Jt;_a.prototype.hcg=function(){return vc(this._rgb)},ya.hcg=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(_a,[null].concat(f,["hcg"])))},Xr.format.hcg=ga,Xr.autodetect.push({p:1,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=hs(f,"hcg"),mr(f)==="array"&&f.length===3)return"hcg"}});var _i=g.unpack,vr=g.last,qa=Math.round,bi=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=_i(f,"rgba"),T=$[0],D=$[1],H=$[2],N=$[3],ee=vr(f)||"auto";N===void 0&&(N=1),ee==="auto"&&(ee=N<1?"rgba":"rgb"),T=qa(T),D=qa(D),H=qa(H);var oe=T<<16|D<<8|H,he="000000"+oe.toString(16);he=he.substr(he.length-6);var Se="0"+qa(N*255).toString(16);switch(Se=Se.substr(Se.length-2),ee.toLowerCase()){case"rgba":return"#"+he+Se;case"argb":return"#"+Se+he;default:return"#"+he}},ms=bi,wi=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,gc=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,tt=function(f){if(f.match(wi)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var v=parseInt(f,16),$=v>>16,T=v>>8&255,D=v&255;return[$,T,D,1]}if(f.match(gc)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var H=parseInt(f,16),N=H>>24&255,ee=H>>16&255,oe=H>>8&255,he=Math.round((H&255)/255*100)/100;return[N,ee,oe,he]}throw new Error("unknown hex color: "+f)},X=tt,Re=K,Qe=S,Ft=g.type,un=w,yn=ms;Qe.prototype.hex=function(f){return yn(this._rgb,f)},Re.hex=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Qe,[null].concat(f,["hex"])))},un.format.hex=X,un.autodetect.push({p:4,test:function(f){for(var v=[],$=arguments.length-1;$-- >0;)v[$]=arguments[$+1];if(!v.length&&Ft(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var xn=g.unpack,Nr=g.TWOPI,Ga=Math.min,Pn=Math.sqrt,Ai=Math.acos,Ci=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=xn(f,"rgb"),T=$[0],D=$[1],H=$[2];T/=255,D/=255,H/=255;var N,ee=Ga(T,D,H),oe=(T+D+H)/3,he=oe>0?1-ee/oe:0;return he===0?N=NaN:(N=(T-D+(T-H))/2,N/=Pn((T-D)*(T-D)+(T-H)*(D-H)),N=Ai(N),H>D&&(N=Nr-N),N/=Nr),[N*360,he,oe]},mb=Ci,vb=g.unpack,yc=g.limit,_o=g.TWOPI,_c=g.PITHIRD,bo=Math.cos,gb=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=vb(f,"hsi");var $=f[0],T=f[1],D=f[2],H,N,ee;return isNaN($)&&($=0),isNaN(T)&&(T=0),$>360&&($-=360),$<0&&($+=360),$/=360,$<1/3?(ee=(1-T)/3,H=(1+T*bo(_o*$)/bo(_c-_o*$))/3,N=1-(ee+H)):$<2/3?($-=1/3,H=(1-T)/3,N=(1+T*bo(_o*$)/bo(_c-_o*$))/3,ee=1-(H+N)):($-=2/3,N=(1-T)/3,ee=(1+T*bo(_o*$)/bo(_c-_o*$))/3,H=1-(N+ee)),H=yc(D*H*3),N=yc(D*N*3),ee=yc(D*ee*3),[H*255,N*255,ee*255,f.length>3?f[3]:1]},yb=gb,_b=g.unpack,bb=g.type,wb=K,Wf=S,qf=w,Ab=mb;Wf.prototype.hsi=function(){return Ab(this._rgb)},wb.hsi=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Wf,[null].concat(f,["hsi"])))},qf.format.hsi=yb,qf.autodetect.push({p:2,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=_b(f,"hsi"),bb(f)==="array"&&f.length===3)return"hsi"}});var Cb=g.unpack,$b=g.type,Sb=K,Gf=S,Jf=w,Ib=ne;Gf.prototype.hsl=function(){return Ib(this._rgb)},Sb.hsl=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Gf,[null].concat(f,["hsl"])))},Jf.format.hsl=F,Jf.autodetect.push({p:2,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=Cb(f,"hsl"),$b(f)==="array"&&f.length===3)return"hsl"}});var Eb=g.unpack,kb=Math.min,Tb=Math.max,xb=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=Eb(f,"rgb");var $=f[0],T=f[1],D=f[2],H=kb($,T,D),N=Tb($,T,D),ee=N-H,oe,he,Se;return Se=N/255,N===0?(oe=Number.NaN,he=0):(he=ee/N,$===N&&(oe=(T-D)/ee),T===N&&(oe=2+(D-$)/ee),D===N&&(oe=4+($-T)/ee),oe*=60,oe<0&&(oe+=360)),[oe,he,Se]},Pb=xb,Mb=g.unpack,Ob=Math.floor,Nb=function(){for(var f,v,$,T,D,H,N=[],ee=arguments.length;ee--;)N[ee]=arguments[ee];N=Mb(N,"hsv");var oe=N[0],he=N[1],Se=N[2],Ue,Oe,Xe;if(Se*=255,he===0)Ue=Oe=Xe=Se;else{oe===360&&(oe=0),oe>360&&(oe-=360),oe<0&&(oe+=360),oe/=60;var Je=Ob(oe),mt=oe-Je,At=Se*(1-he),Et=Se*(1-he*mt),Mt=Se*(1-he*(1-mt));switch(Je){case 0:f=[Se,Mt,At],Ue=f[0],Oe=f[1],Xe=f[2];break;case 1:v=[Et,Se,At],Ue=v[0],Oe=v[1],Xe=v[2];break;case 2:$=[At,Se,Mt],Ue=$[0],Oe=$[1],Xe=$[2];break;case 3:T=[At,Et,Se],Ue=T[0],Oe=T[1],Xe=T[2];break;case 4:D=[Mt,At,Se],Ue=D[0],Oe=D[1],Xe=D[2];break;case 5:H=[Se,At,Et],Ue=H[0],Oe=H[1],Xe=H[2];break}}return[Ue,Oe,Xe,N.length>3?N[3]:1]},Rb=Nb,Lb=g.unpack,Db=g.type,Bb=K,Yf=S,Xf=w,Fb=Pb;Yf.prototype.hsv=function(){return Fb(this._rgb)},Bb.hsv=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Yf,[null].concat(f,["hsv"])))},Xf.format.hsv=Rb,Xf.autodetect.push({p:2,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=Lb(f,"hsv"),Db(f)==="array"&&f.length===3)return"hsv"}});var $i={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},wo=$i,jb=g.unpack,Qf=Math.pow,Vb=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=jb(f,"rgb"),T=$[0],D=$[1],H=$[2],N=Ub(T,D,H),ee=N[0],oe=N[1],he=N[2],Se=116*oe-16;return[Se<0?0:Se,500*(ee-oe),200*(oe-he)]},bc=function(f){return(f/=255)<=.04045?f/12.92:Qf((f+.055)/1.055,2.4)},wc=function(f){return f>wo.t3?Qf(f,1/3):f/wo.t2+wo.t0},Ub=function(f,v,$){f=bc(f),v=bc(v),$=bc($);var T=wc((.4124564*f+.3575761*v+.1804375*$)/wo.Xn),D=wc((.2126729*f+.7151522*v+.072175*$)/wo.Yn),H=wc((.0193339*f+.119192*v+.9503041*$)/wo.Zn);return[T,D,H]},Zf=Vb,Ao=$i,Hb=g.unpack,zb=Math.pow,Kb=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=Hb(f,"lab");var $=f[0],T=f[1],D=f[2],H,N,ee,oe,he,Se;return N=($+16)/116,H=isNaN(T)?N:N+T/500,ee=isNaN(D)?N:N-D/200,N=Ao.Yn*Cc(N),H=Ao.Xn*Cc(H),ee=Ao.Zn*Cc(ee),oe=Ac(3.2404542*H-1.5371385*N-.4985314*ee),he=Ac(-.969266*H+1.8760108*N+.041556*ee),Se=Ac(.0556434*H-.2040259*N+1.0572252*ee),[oe,he,Se,f.length>3?f[3]:1]},Ac=function(f){return 255*(f<=.00304?12.92*f:1.055*zb(f,1/2.4)-.055)},Cc=function(f){return f>Ao.t1?f*f*f:Ao.t2*(f-Ao.t0)},ep=Kb,Wb=g.unpack,qb=g.type,Gb=K,tp=S,np=w,Jb=Zf;tp.prototype.lab=function(){return Jb(this._rgb)},Gb.lab=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(tp,[null].concat(f,["lab"])))},np.format.lab=ep,np.autodetect.push({p:2,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=Wb(f,"lab"),qb(f)==="array"&&f.length===3)return"lab"}});var Yb=g.unpack,Xb=g.RAD2DEG,Qb=Math.sqrt,Zb=Math.atan2,e0=Math.round,t0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=Yb(f,"lab"),T=$[0],D=$[1],H=$[2],N=Qb(D*D+H*H),ee=(Zb(H,D)*Xb+360)%360;return e0(N*1e4)===0&&(ee=Number.NaN),[T,N,ee]},rp=t0,n0=g.unpack,r0=Zf,a0=rp,o0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=n0(f,"rgb"),T=$[0],D=$[1],H=$[2],N=r0(T,D,H),ee=N[0],oe=N[1],he=N[2];return a0(ee,oe,he)},s0=o0,i0=g.unpack,l0=g.DEG2RAD,c0=Math.sin,u0=Math.cos,d0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=i0(f,"lch"),T=$[0],D=$[1],H=$[2];return isNaN(H)&&(H=0),H=H*l0,[T,u0(H)*D,c0(H)*D]},ap=d0,f0=g.unpack,p0=ap,h0=ep,m0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=f0(f,"lch");var $=f[0],T=f[1],D=f[2],H=p0($,T,D),N=H[0],ee=H[1],oe=H[2],he=h0(N,ee,oe),Se=he[0],Ue=he[1],Oe=he[2];return[Se,Ue,Oe,f.length>3?f[3]:1]},op=m0,v0=g.unpack,g0=op,y0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=v0(f,"hcl").reverse();return g0.apply(void 0,$)},_0=y0,b0=g.unpack,w0=g.type,sp=K,Si=S,$c=w,ip=s0;Si.prototype.lch=function(){return ip(this._rgb)},Si.prototype.hcl=function(){return ip(this._rgb).reverse()},sp.lch=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Si,[null].concat(f,["lch"])))},sp.hcl=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Si,[null].concat(f,["hcl"])))},$c.format.lch=op,$c.format.hcl=_0,["lch","hcl"].forEach(function(f){return $c.autodetect.push({p:2,test:function(){for(var v=[],$=arguments.length;$--;)v[$]=arguments[$];if(v=b0(v,f),w0(v)==="array"&&v.length===3)return f}})});var A0={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},lp=A0,C0=S,cp=w,$0=g.type,vs=lp,S0=X,I0=ms;C0.prototype.name=function(){for(var f=I0(this._rgb,"rgb"),v=0,$=Object.keys(vs);v<$.length;v+=1){var T=$[v];if(vs[T]===f)return T.toLowerCase()}return f},cp.format.named=function(f){if(f=f.toLowerCase(),vs[f])return S0(vs[f]);throw new Error("unknown color name: "+f)},cp.autodetect.push({p:5,test:function(f){for(var v=[],$=arguments.length-1;$-- >0;)v[$]=arguments[$+1];if(!v.length&&$0(f)==="string"&&vs[f.toLowerCase()])return"named"}});var E0=g.unpack,k0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=E0(f,"rgb"),T=$[0],D=$[1],H=$[2];return(T<<16)+(D<<8)+H},T0=k0,x0=g.type,P0=function(f){if(x0(f)=="number"&&f>=0&&f<=16777215){var v=f>>16,$=f>>8&255,T=f&255;return[v,$,T,1]}throw new Error("unknown num color: "+f)},M0=P0,O0=K,up=S,dp=w,N0=g.type,R0=T0;up.prototype.num=function(){return R0(this._rgb)},O0.num=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(up,[null].concat(f,["num"])))},dp.format.num=M0,dp.autodetect.push({p:5,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f.length===1&&N0(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var L0=K,Sc=S,fp=w,pp=g.unpack,hp=g.type,mp=Math.round;Sc.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(mp)},Sc.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(v,$){return $<3?f===!1?v:mp(v):v})},L0.rgb=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Sc,[null].concat(f,["rgb"])))},fp.format.rgb=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=pp(f,"rgba");return $[3]===void 0&&($[3]=1),$},fp.autodetect.push({p:3,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=pp(f,"rgba"),hp(f)==="array"&&(f.length===3||f.length===4&&hp(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var Ii=Math.log,D0=function(f){var v=f/100,$,T,D;return v<66?($=255,T=v<6?0:-155.25485562709179-.44596950469579133*(T=v-2)+104.49216199393888*Ii(T),D=v<20?0:-254.76935184120902+.8274096064007395*(D=v-10)+115.67994401066147*Ii(D)):($=351.97690566805693+.114206453784165*($=v-55)-40.25366309332127*Ii($),T=325.4494125711974+.07943456536662342*(T=v-50)-28.0852963507957*Ii(T),D=255),[$,T,D,1]},vp=D0,B0=vp,F0=g.unpack,j0=Math.round,V0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];for(var $=F0(f,"rgb"),T=$[0],D=$[2],H=1e3,N=4e4,ee=.4,oe;N-H>ee;){oe=(N+H)*.5;var he=B0(oe);he[2]/he[0]>=D/T?N=oe:H=oe}return j0(oe)},U0=V0,Ic=K,Ei=S,Ec=w,H0=U0;Ei.prototype.temp=Ei.prototype.kelvin=Ei.prototype.temperature=function(){return H0(this._rgb)},Ic.temp=Ic.kelvin=Ic.temperature=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(Ei,[null].concat(f,["temp"])))},Ec.format.temp=Ec.format.kelvin=Ec.format.temperature=vp;var z0=g.unpack,kc=Math.cbrt,K0=Math.pow,W0=Math.sign,q0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=z0(f,"rgb"),T=$[0],D=$[1],H=$[2],N=[Tc(T/255),Tc(D/255),Tc(H/255)],ee=N[0],oe=N[1],he=N[2],Se=kc(.4122214708*ee+.5363325363*oe+.0514459929*he),Ue=kc(.2119034982*ee+.6806995451*oe+.1073969566*he),Oe=kc(.0883024619*ee+.2817188376*oe+.6299787005*he);return[.2104542553*Se+.793617785*Ue-.0040720468*Oe,1.9779984951*Se-2.428592205*Ue+.4505937099*Oe,.0259040371*Se+.7827717662*Ue-.808675766*Oe]},gp=q0;function Tc(f){var v=Math.abs(f);return v<.04045?f/12.92:(W0(f)||1)*K0((v+.055)/1.055,2.4)}var G0=g.unpack,ki=Math.pow,J0=Math.sign,Y0=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=G0(f,"lab");var $=f[0],T=f[1],D=f[2],H=ki($+.3963377774*T+.2158037573*D,3),N=ki($-.1055613458*T-.0638541728*D,3),ee=ki($-.0894841775*T-1.291485548*D,3);return[255*xc(4.0767416621*H-3.3077115913*N+.2309699292*ee),255*xc(-1.2684380046*H+2.6097574011*N-.3413193965*ee),255*xc(-.0041960863*H-.7034186147*N+1.707614701*ee),f.length>3?f[3]:1]},yp=Y0;function xc(f){var v=Math.abs(f);return v>.0031308?(J0(f)||1)*(1.055*ki(v,1/2.4)-.055):f*12.92}var X0=g.unpack,Q0=g.type,Z0=K,_p=S,bp=w,ew=gp;_p.prototype.oklab=function(){return ew(this._rgb)},Z0.oklab=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(_p,[null].concat(f,["oklab"])))},bp.format.oklab=yp,bp.autodetect.push({p:3,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=X0(f,"oklab"),Q0(f)==="array"&&f.length===3)return"oklab"}});var tw=g.unpack,nw=gp,rw=rp,aw=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];var $=tw(f,"rgb"),T=$[0],D=$[1],H=$[2],N=nw(T,D,H),ee=N[0],oe=N[1],he=N[2];return rw(ee,oe,he)},ow=aw,sw=g.unpack,iw=ap,lw=yp,cw=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];f=sw(f,"lch");var $=f[0],T=f[1],D=f[2],H=iw($,T,D),N=H[0],ee=H[1],oe=H[2],he=lw(N,ee,oe),Se=he[0],Ue=he[1],Oe=he[2];return[Se,Ue,Oe,f.length>3?f[3]:1]},uw=cw,dw=g.unpack,fw=g.type,pw=K,wp=S,Ap=w,hw=ow;wp.prototype.oklch=function(){return hw(this._rgb)},pw.oklch=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];return new(Function.prototype.bind.apply(wp,[null].concat(f,["oklch"])))},Ap.format.oklch=uw,Ap.autodetect.push({p:3,test:function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];if(f=dw(f,"oklch"),fw(f)==="array"&&f.length===3)return"oklch"}});var Cp=S,mw=g.type;Cp.prototype.alpha=function(f,v){return v===void 0&&(v=!1),f!==void 0&&mw(f)==="number"?v?(this._rgb[3]=f,this):new Cp([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]};var vw=S;vw.prototype.clipped=function(){return this._rgb._clipped||!1};var Ja=S,gw=$i;Ja.prototype.darken=function(f){f===void 0&&(f=1);var v=this,$=v.lab();return $[0]-=gw.Kn*f,new Ja($,"lab").alpha(v.alpha(),!0)},Ja.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},Ja.prototype.darker=Ja.prototype.darken,Ja.prototype.brighter=Ja.prototype.brighten;var yw=S;yw.prototype.get=function(f){var v=f.split("."),$=v[0],T=v[1],D=this[$]();if(T){var H=$.indexOf(T)-($.substr(0,2)==="ok"?2:0);if(H>-1)return D[H];throw new Error("unknown channel "+T+" in mode "+$)}else return D};var Co=S,_w=g.type,bw=Math.pow,ww=1e-7,Aw=20;Co.prototype.luminance=function(f){if(f!==void 0&&_w(f)==="number"){if(f===0)return new Co([0,0,0,this._rgb[3]],"rgb");if(f===1)return new Co([255,255,255,this._rgb[3]],"rgb");var v=this.luminance(),$="rgb",T=Aw,D=function(N,ee){var oe=N.interpolate(ee,.5,$),he=oe.luminance();return Math.abs(f-he)<ww||!T--?oe:he>f?D(N,oe):D(oe,ee)},H=(v>f?D(new Co([0,0,0]),this):D(this,new Co([255,255,255]))).rgb();return new Co(H.concat([this._rgb[3]]))}return Cw.apply(void 0,this._rgb.slice(0,3))};var Cw=function(f,v,$){return f=Pc(f),v=Pc(v),$=Pc($),.2126*f+.7152*v+.0722*$},Pc=function(f){return f/=255,f<=.03928?f/12.92:bw((f+.055)/1.055,2.4)},Zn={},$p=S,Sp=g.type,Ti=Zn,Ip=function(f,v,$){$===void 0&&($=.5);for(var T=[],D=arguments.length-3;D-- >0;)T[D]=arguments[D+3];var H=T[0]||"lrgb";if(!Ti[H]&&!T.length&&(H=Object.keys(Ti)[0]),!Ti[H])throw new Error("interpolation mode "+H+" is not defined");return Sp(f)!=="object"&&(f=new $p(f)),Sp(v)!=="object"&&(v=new $p(v)),Ti[H](f,v,$).alpha(f.alpha()+$*(v.alpha()-f.alpha()))},Ep=S,$w=Ip;Ep.prototype.mix=Ep.prototype.interpolate=function(f,v){v===void 0&&(v=.5);for(var $=[],T=arguments.length-2;T-- >0;)$[T]=arguments[T+2];return $w.apply(void 0,[this,f,v].concat($))};var kp=S;kp.prototype.premultiply=function(f){f===void 0&&(f=!1);var v=this._rgb,$=v[3];return f?(this._rgb=[v[0]*$,v[1]*$,v[2]*$,$],this):new kp([v[0]*$,v[1]*$,v[2]*$,$],"rgb")};var Mc=S,Sw=$i;Mc.prototype.saturate=function(f){f===void 0&&(f=1);var v=this,$=v.lch();return $[1]+=Sw.Kn*f,$[1]<0&&($[1]=0),new Mc($,"lch").alpha(v.alpha(),!0)},Mc.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var Tp=S,xp=g.type;Tp.prototype.set=function(f,v,$){$===void 0&&($=!1);var T=f.split("."),D=T[0],H=T[1],N=this[D]();if(H){var ee=D.indexOf(H)-(D.substr(0,2)==="ok"?2:0);if(ee>-1){if(xp(v)=="string")switch(v.charAt(0)){case"+":N[ee]+=+v;break;case"-":N[ee]+=+v;break;case"*":N[ee]*=+v.substr(1);break;case"/":N[ee]/=+v.substr(1);break;default:N[ee]=+v}else if(xp(v)==="number")N[ee]=v;else throw new Error("unsupported value for Color.set");var oe=new Tp(N,D);return $?(this._rgb=oe._rgb,this):oe}throw new Error("unknown channel "+H+" in mode "+D)}else return N};var Iw=S,Ew=function(f,v,$){var T=f._rgb,D=v._rgb;return new Iw(T[0]+$*(D[0]-T[0]),T[1]+$*(D[1]-T[1]),T[2]+$*(D[2]-T[2]),"rgb")};Zn.rgb=Ew;var kw=S,Oc=Math.sqrt,$o=Math.pow,Tw=function(f,v,$){var T=f._rgb,D=T[0],H=T[1],N=T[2],ee=v._rgb,oe=ee[0],he=ee[1],Se=ee[2];return new kw(Oc($o(D,2)*(1-$)+$o(oe,2)*$),Oc($o(H,2)*(1-$)+$o(he,2)*$),Oc($o(N,2)*(1-$)+$o(Se,2)*$),"rgb")};Zn.lrgb=Tw;var xw=S,Pw=function(f,v,$){var T=f.lab(),D=v.lab();return new xw(T[0]+$*(D[0]-T[0]),T[1]+$*(D[1]-T[1]),T[2]+$*(D[2]-T[2]),"lab")};Zn.lab=Pw;var Pp=S,So=function(f,v,$,T){var D,H,N,ee;T==="hsl"?(N=f.hsl(),ee=v.hsl()):T==="hsv"?(N=f.hsv(),ee=v.hsv()):T==="hcg"?(N=f.hcg(),ee=v.hcg()):T==="hsi"?(N=f.hsi(),ee=v.hsi()):T==="lch"||T==="hcl"?(T="hcl",N=f.hcl(),ee=v.hcl()):T==="oklch"&&(N=f.oklch().reverse(),ee=v.oklch().reverse());var oe,he,Se,Ue,Oe,Xe;(T.substr(0,1)==="h"||T==="oklch")&&(D=N,oe=D[0],Se=D[1],Oe=D[2],H=ee,he=H[0],Ue=H[1],Xe=H[2]);var Je,mt,At,Et;return!isNaN(oe)&&!isNaN(he)?(he>oe&&he-oe>180?Et=he-(oe+360):he<oe&&oe-he>180?Et=he+360-oe:Et=he-oe,mt=oe+$*Et):isNaN(oe)?isNaN(he)?mt=Number.NaN:(mt=he,(Oe==1||Oe==0)&&T!="hsv"&&(Je=Ue)):(mt=oe,(Xe==1||Xe==0)&&T!="hsv"&&(Je=Se)),Je===void 0&&(Je=Se+$*(Ue-Se)),At=Oe+$*(Xe-Oe),T==="oklch"?new Pp([At,Je,mt],T):new Pp([mt,Je,At],T)},Mw=So,Mp=function(f,v,$){return Mw(f,v,$,"lch")};Zn.lch=Mp,Zn.hcl=Mp;var Ow=S,Nw=function(f,v,$){var T=f.num(),D=v.num();return new Ow(T+$*(D-T),"num")};Zn.num=Nw;var Rw=So,Lw=function(f,v,$){return Rw(f,v,$,"hcg")};Zn.hcg=Lw;var Dw=So,Bw=function(f,v,$){return Dw(f,v,$,"hsi")};Zn.hsi=Bw;var Fw=So,jw=function(f,v,$){return Fw(f,v,$,"hsl")};Zn.hsl=jw;var Vw=So,Uw=function(f,v,$){return Vw(f,v,$,"hsv")};Zn.hsv=Uw;var Hw=S,zw=function(f,v,$){var T=f.oklab(),D=v.oklab();return new Hw(T[0]+$*(D[0]-T[0]),T[1]+$*(D[1]-T[1]),T[2]+$*(D[2]-T[2]),"oklab")};Zn.oklab=zw;var Kw=So,Ww=function(f,v,$){return Kw(f,v,$,"oklch")};Zn.oklch=Ww;var Nc=S,qw=g.clip_rgb,Rc=Math.pow,Lc=Math.sqrt,Dc=Math.PI,Op=Math.cos,Np=Math.sin,Gw=Math.atan2,Jw=function(f,v,$){v===void 0&&(v="lrgb"),$===void 0&&($=null);var T=f.length;$||($=Array.from(new Array(T)).map(function(){return 1}));var D=T/$.reduce(function(mt,At){return mt+At});if($.forEach(function(mt,At){$[At]*=D}),f=f.map(function(mt){return new Nc(mt)}),v==="lrgb")return Yw(f,$);for(var H=f.shift(),N=H.get(v),ee=[],oe=0,he=0,Se=0;Se<N.length;Se++)if(N[Se]=(N[Se]||0)*$[0],ee.push(isNaN(N[Se])?0:$[0]),v.charAt(Se)==="h"&&!isNaN(N[Se])){var Ue=N[Se]/180*Dc;oe+=Op(Ue)*$[0],he+=Np(Ue)*$[0]}var Oe=H.alpha()*$[0];f.forEach(function(mt,At){var Et=mt.get(v);Oe+=mt.alpha()*$[At+1];for(var Mt=0;Mt<N.length;Mt++)if(!isNaN(Et[Mt]))if(ee[Mt]+=$[At+1],v.charAt(Mt)==="h"){var Cn=Et[Mt]/180*Dc;oe+=Op(Cn)*$[At+1],he+=Np(Cn)*$[At+1]}else N[Mt]+=Et[Mt]*$[At+1]});for(var Xe=0;Xe<N.length;Xe++)if(v.charAt(Xe)==="h"){for(var Je=Gw(he/ee[Xe],oe/ee[Xe])/Dc*180;Je<0;)Je+=360;for(;Je>=360;)Je-=360;N[Xe]=Je}else N[Xe]=N[Xe]/ee[Xe];return Oe/=T,new Nc(N,v).alpha(Oe>.99999?1:Oe,!0)},Yw=function(f,v){for(var $=f.length,T=[0,0,0,0],D=0;D<f.length;D++){var H=f[D],N=v[D]/$,ee=H._rgb;T[0]+=Rc(ee[0],2)*N,T[1]+=Rc(ee[1],2)*N,T[2]+=Rc(ee[2],2)*N,T[3]+=ee[3]*N}return T[0]=Lc(T[0]),T[1]=Lc(T[1]),T[2]=Lc(T[2]),T[3]>.9999999&&(T[3]=1),new Nc(qw(T))},gr=K,Io=g.type,Xw=Math.pow,Bc=function(f){var v="rgb",$=gr("#ccc"),T=0,D=[0,1],H=[],N=[0,0],ee=!1,oe=[],he=!1,Se=0,Ue=1,Oe=!1,Xe={},Je=!0,mt=1,At=function(Ne){if(Ne=Ne||["#fff","#000"],Ne&&Io(Ne)==="string"&&gr.brewer&&gr.brewer[Ne.toLowerCase()]&&(Ne=gr.brewer[Ne.toLowerCase()]),Io(Ne)==="array"){Ne.length===1&&(Ne=[Ne[0],Ne[0]]),Ne=Ne.slice(0);for(var st=0;st<Ne.length;st++)Ne[st]=gr(Ne[st]);H.length=0;for(var yt=0;yt<Ne.length;yt++)H.push(yt/(Ne.length-1))}return Kn(),oe=Ne},Et=function(Ne){if(ee!=null){for(var st=ee.length-1,yt=0;yt<st&&Ne>=ee[yt];)yt++;return yt-1}return 0},Mt=function(Ne){return Ne},Cn=function(Ne){return Ne},bn=function(Ne,st){var yt,vt;if(st==null&&(st=!1),isNaN(Ne)||Ne===null)return $;if(st)vt=Ne;else if(ee&&ee.length>2){var $n=Et(Ne);vt=$n/(ee.length-2)}else Ue!==Se?vt=(Ne-Se)/(Ue-Se):vt=1;vt=Cn(vt),st||(vt=Mt(vt)),mt!==1&&(vt=Xw(vt,mt)),vt=N[0]+vt*(1-N[0]-N[1]),vt=Math.min(1,Math.max(0,vt));var Wt=Math.floor(vt*1e4);if(Je&&Xe[Wt])yt=Xe[Wt];else{if(Io(oe)==="array")for(var kt=0;kt<H.length;kt++){var Rt=H[kt];if(vt<=Rt){yt=oe[kt];break}if(vt>=Rt&&kt===H.length-1){yt=oe[kt];break}if(vt>Rt&&vt<H[kt+1]){vt=(vt-Rt)/(H[kt+1]-Rt),yt=gr.interpolate(oe[kt],oe[kt+1],vt,v);break}}else Io(oe)==="function"&&(yt=oe(vt));Je&&(Xe[Wt]=yt)}return yt},Kn=function(){return Xe={}};At(f);var $t=function(Ne){var st=gr(bn(Ne));return he&&st[he]?st[he]():st};return $t.classes=function(Ne){if(Ne!=null){if(Io(Ne)==="array")ee=Ne,D=[Ne[0],Ne[Ne.length-1]];else{var st=gr.analyze(D);Ne===0?ee=[st.min,st.max]:ee=gr.limits(st,"e",Ne)}return $t}return ee},$t.domain=function(Ne){if(!arguments.length)return D;Se=Ne[0],Ue=Ne[Ne.length-1],H=[];var st=oe.length;if(Ne.length===st&&Se!==Ue)for(var yt=0,vt=Array.from(Ne);yt<vt.length;yt+=1){var $n=vt[yt];H.push(($n-Se)/(Ue-Se))}else{for(var Wt=0;Wt<st;Wt++)H.push(Wt/(st-1));if(Ne.length>2){var kt=Ne.map(function(Lt,Bt){return Bt/(Ne.length-1)}),Rt=Ne.map(function(Lt){return(Lt-Se)/(Ue-Se)});Rt.every(function(Lt,Bt){return kt[Bt]===Lt})||(Cn=function(Lt){if(Lt<=0||Lt>=1)return Lt;for(var Bt=0;Lt>=Rt[Bt+1];)Bt++;var _r=(Lt-Rt[Bt])/(Rt[Bt+1]-Rt[Bt]),Aa=kt[Bt]+_r*(kt[Bt+1]-kt[Bt]);return Aa})}}return D=[Se,Ue],$t},$t.mode=function(Ne){return arguments.length?(v=Ne,Kn(),$t):v},$t.range=function(Ne,st){return At(Ne),$t},$t.out=function(Ne){return he=Ne,$t},$t.spread=function(Ne){return arguments.length?(T=Ne,$t):T},$t.correctLightness=function(Ne){return Ne==null&&(Ne=!0),Oe=Ne,Kn(),Oe?Mt=function(st){for(var yt=bn(0,!0).lab()[0],vt=bn(1,!0).lab()[0],$n=yt>vt,Wt=bn(st,!0).lab()[0],kt=yt+(vt-yt)*st,Rt=Wt-kt,Lt=0,Bt=1,_r=20;Math.abs(Rt)>.01&&_r-- >0;)(function(){return $n&&(Rt*=-1),Rt<0?(Lt=st,st+=(Bt-st)*.5):(Bt=st,st+=(Lt-st)*.5),Wt=bn(st,!0).lab()[0],Rt=Wt-kt})();return st}:Mt=function(st){return st},$t},$t.padding=function(Ne){return Ne!=null?(Io(Ne)==="number"&&(Ne=[Ne,Ne]),N=Ne,$t):N},$t.colors=function(Ne,st){arguments.length<2&&(st="hex");var yt=[];if(arguments.length===0)yt=oe.slice(0);else if(Ne===1)yt=[$t(.5)];else if(Ne>1){var vt=D[0],$n=D[1]-vt;yt=Qw(0,Ne,!1).map(function(Bt){return $t(vt+Bt/(Ne-1)*$n)})}else{f=[];var Wt=[];if(ee&&ee.length>2)for(var kt=1,Rt=ee.length,Lt=1<=Rt;Lt?kt<Rt:kt>Rt;Lt?kt++:kt--)Wt.push((ee[kt-1]+ee[kt])*.5);else Wt=D;yt=Wt.map(function(Bt){return $t(Bt)})}return gr[st]&&(yt=yt.map(function(Bt){return Bt[st]()})),yt},$t.cache=function(Ne){return Ne!=null?(Je=Ne,$t):Je},$t.gamma=function(Ne){return Ne!=null?(mt=Ne,$t):mt},$t.nodata=function(Ne){return Ne!=null?($=gr(Ne),$t):$},$t};function Qw(f,v,$){for(var T=[],D=f<v,H=$?D?v+1:v-1:v,N=f;D?N<H:N>H;D?N++:N--)T.push(N);return T}var gs=S,Zw=Bc,e1=function(f){for(var v=[1,1],$=1;$<f;$++){for(var T=[1],D=1;D<=v.length;D++)T[D]=(v[D]||0)+v[D-1];v=T}return v},t1=function(f){var v,$,T,D,H,N,ee;if(f=f.map(function(Oe){return new gs(Oe)}),f.length===2)v=f.map(function(Oe){return Oe.lab()}),H=v[0],N=v[1],D=function(Oe){var Xe=[0,1,2].map(function(Je){return H[Je]+Oe*(N[Je]-H[Je])});return new gs(Xe,"lab")};else if(f.length===3)$=f.map(function(Oe){return Oe.lab()}),H=$[0],N=$[1],ee=$[2],D=function(Oe){var Xe=[0,1,2].map(function(Je){return(1-Oe)*(1-Oe)*H[Je]+2*(1-Oe)*Oe*N[Je]+Oe*Oe*ee[Je]});return new gs(Xe,"lab")};else if(f.length===4){var oe;T=f.map(function(Oe){return Oe.lab()}),H=T[0],N=T[1],ee=T[2],oe=T[3],D=function(Oe){var Xe=[0,1,2].map(function(Je){return(1-Oe)*(1-Oe)*(1-Oe)*H[Je]+3*(1-Oe)*(1-Oe)*Oe*N[Je]+3*(1-Oe)*Oe*Oe*ee[Je]+Oe*Oe*Oe*oe[Je]});return new gs(Xe,"lab")}}else if(f.length>=5){var he,Se,Ue;he=f.map(function(Oe){return Oe.lab()}),Ue=f.length-1,Se=e1(Ue),D=function(Oe){var Xe=1-Oe,Je=[0,1,2].map(function(mt){return he.reduce(function(At,Et,Mt){return At+Se[Mt]*Math.pow(Xe,Ue-Mt)*Math.pow(Oe,Mt)*Et[mt]},0)});return new gs(Je,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return D},n1=function(f){var v=t1(f);return v.scale=function(){return Zw(v)},v},Fc=K,yr=function(f,v,$){if(!yr[$])throw new Error("unknown blend mode "+$);return yr[$](f,v)},ba=function(f){return function(v,$){var T=Fc($).rgb(),D=Fc(v).rgb();return Fc.rgb(f(T,D))}},wa=function(f){return function(v,$){var T=[];return T[0]=f(v[0],$[0]),T[1]=f(v[1],$[1]),T[2]=f(v[2],$[2]),T}},r1=function(f){return f},a1=function(f,v){return f*v/255},o1=function(f,v){return f>v?v:f},s1=function(f,v){return f>v?f:v},i1=function(f,v){return 255*(1-(1-f/255)*(1-v/255))},l1=function(f,v){return v<128?2*f*v/255:255*(1-2*(1-f/255)*(1-v/255))},c1=function(f,v){return 255*(1-(1-v/255)/(f/255))},u1=function(f,v){return f===255?255:(f=255*(v/255)/(1-f/255),f>255?255:f)};yr.normal=ba(wa(r1)),yr.multiply=ba(wa(a1)),yr.screen=ba(wa(i1)),yr.overlay=ba(wa(l1)),yr.darken=ba(wa(o1)),yr.lighten=ba(wa(s1)),yr.dodge=ba(wa(u1)),yr.burn=ba(wa(c1));for(var d1=yr,jc=g.type,f1=g.clip_rgb,p1=g.TWOPI,h1=Math.pow,m1=Math.sin,v1=Math.cos,Rp=K,g1=function(f,v,$,T,D){f===void 0&&(f=300),v===void 0&&(v=-1.5),$===void 0&&($=1),T===void 0&&(T=1),D===void 0&&(D=[0,1]);var H=0,N;jc(D)==="array"?N=D[1]-D[0]:(N=0,D=[D,D]);var ee=function(oe){var he=p1*((f+120)/360+v*oe),Se=h1(D[0]+N*oe,T),Ue=H!==0?$[0]+oe*H:$,Oe=Ue*Se*(1-Se)/2,Xe=v1(he),Je=m1(he),mt=Se+Oe*(-.14861*Xe+1.78277*Je),At=Se+Oe*(-.29227*Xe-.90649*Je),Et=Se+Oe*(1.97294*Xe);return Rp(f1([mt*255,At*255,Et*255,1]))};return ee.start=function(oe){return oe==null?f:(f=oe,ee)},ee.rotations=function(oe){return oe==null?v:(v=oe,ee)},ee.gamma=function(oe){return oe==null?T:(T=oe,ee)},ee.hue=function(oe){return oe==null?$:($=oe,jc($)==="array"?(H=$[1]-$[0],H===0&&($=$[1])):H=0,ee)},ee.lightness=function(oe){return oe==null?D:(jc(oe)==="array"?(D=oe,N=oe[1]-oe[0]):(D=[oe,oe],N=0),ee)},ee.scale=function(){return Rp.scale(ee)},ee.hue($),ee},y1=S,_1="0123456789abcdef",b1=Math.floor,w1=Math.random,A1=function(){for(var f="#",v=0;v<6;v++)f+=_1.charAt(b1(w1()*16));return new y1(f,"hex")},Vc=c,Lp=Math.log,C1=Math.pow,$1=Math.floor,S1=Math.abs,Dp=function(f,v){v===void 0&&(v=null);var $={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Vc(f)==="object"&&(f=Object.values(f)),f.forEach(function(T){v&&Vc(T)==="object"&&(T=T[v]),T!=null&&!isNaN(T)&&($.values.push(T),$.sum+=T,T<$.min&&($.min=T),T>$.max&&($.max=T),$.count+=1)}),$.domain=[$.min,$.max],$.limits=function(T,D){return Bp($,T,D)},$},Bp=function(f,v,$){v===void 0&&(v="equal"),$===void 0&&($=7),Vc(f)=="array"&&(f=Dp(f));var T=f.min,D=f.max,H=f.values.sort(function(Hc,zc){return Hc-zc});if($===1)return[T,D];var N=[];if(v.substr(0,1)==="c"&&(N.push(T),N.push(D)),v.substr(0,1)==="e"){N.push(T);for(var ee=1;ee<$;ee++)N.push(T+ee/$*(D-T));N.push(D)}else if(v.substr(0,1)==="l"){if(T<=0)throw new Error("Logarithmic scales are only possible for values > 0");var oe=Math.LOG10E*Lp(T),he=Math.LOG10E*Lp(D);N.push(T);for(var Se=1;Se<$;Se++)N.push(C1(10,oe+Se/$*(he-oe)));N.push(D)}else if(v.substr(0,1)==="q"){N.push(T);for(var Ue=1;Ue<$;Ue++){var Oe=(H.length-1)*Ue/$,Xe=$1(Oe);if(Xe===Oe)N.push(H[Xe]);else{var Je=Oe-Xe;N.push(H[Xe]*(1-Je)+H[Xe+1]*Je)}}N.push(D)}else if(v.substr(0,1)==="k"){var mt,At=H.length,Et=new Array(At),Mt=new Array($),Cn=!0,bn=0,Kn=null;Kn=[],Kn.push(T);for(var $t=1;$t<$;$t++)Kn.push(T+$t/$*(D-T));for(Kn.push(D);Cn;){for(var Ne=0;Ne<$;Ne++)Mt[Ne]=0;for(var st=0;st<At;st++)for(var yt=H[st],vt=Number.MAX_VALUE,$n=void 0,Wt=0;Wt<$;Wt++){var kt=S1(Kn[Wt]-yt);kt<vt&&(vt=kt,$n=Wt),Mt[$n]++,Et[st]=$n}for(var Rt=new Array($),Lt=0;Lt<$;Lt++)Rt[Lt]=null;for(var Bt=0;Bt<At;Bt++)mt=Et[Bt],Rt[mt]===null?Rt[mt]=H[Bt]:Rt[mt]+=H[Bt];for(var _r=0;_r<$;_r++)Rt[_r]*=1/Mt[_r];Cn=!1;for(var Aa=0;Aa<$;Aa++)if(Rt[Aa]!==Kn[Aa]){Cn=!0;break}Kn=Rt,bn++,bn>200&&(Cn=!1)}for(var Ca={},Eo=0;Eo<$;Eo++)Ca[Eo]=[];for(var ko=0;ko<At;ko++)mt=Et[ko],Ca[mt].push(H[ko]);for(var Zr=[],Ya=0;Ya<$;Ya++)Zr.push(Ca[Ya][0]),Zr.push(Ca[Ya][Ca[Ya].length-1]);Zr=Zr.sort(function(Hc,zc){return Hc-zc}),N.push(Zr[0]);for(var ys=1;ys<Zr.length;ys+=2){var Xa=Zr[ys];!isNaN(Xa)&&N.indexOf(Xa)===-1&&N.push(Xa)}}return N},Fp={analyze:Dp,limits:Bp},jp=S,I1=function(f,v){f=new jp(f),v=new jp(v);var $=f.luminance(),T=v.luminance();return $>T?($+.05)/(T+.05):(T+.05)/($+.05)},Vp=S,Qr=Math.sqrt,an=Math.pow,E1=Math.min,k1=Math.max,Up=Math.atan2,Hp=Math.abs,xi=Math.cos,zp=Math.sin,T1=Math.exp,Kp=Math.PI,x1=function(f,v,$,T,D){$===void 0&&($=1),T===void 0&&(T=1),D===void 0&&(D=1);var H=function(Xa){return 360*Xa/(2*Kp)},N=function(Xa){return 2*Kp*Xa/360};f=new Vp(f),v=new Vp(v);var ee=Array.from(f.lab()),oe=ee[0],he=ee[1],Se=ee[2],Ue=Array.from(v.lab()),Oe=Ue[0],Xe=Ue[1],Je=Ue[2],mt=(oe+Oe)/2,At=Qr(an(he,2)+an(Se,2)),Et=Qr(an(Xe,2)+an(Je,2)),Mt=(At+Et)/2,Cn=.5*(1-Qr(an(Mt,7)/(an(Mt,7)+an(25,7)))),bn=he*(1+Cn),Kn=Xe*(1+Cn),$t=Qr(an(bn,2)+an(Se,2)),Ne=Qr(an(Kn,2)+an(Je,2)),st=($t+Ne)/2,yt=H(Up(Se,bn)),vt=H(Up(Je,Kn)),$n=yt>=0?yt:yt+360,Wt=vt>=0?vt:vt+360,kt=Hp($n-Wt)>180?($n+Wt+360)/2:($n+Wt)/2,Rt=1-.17*xi(N(kt-30))+.24*xi(N(2*kt))+.32*xi(N(3*kt+6))-.2*xi(N(4*kt-63)),Lt=Wt-$n;Lt=Hp(Lt)<=180?Lt:Wt<=$n?Lt+360:Lt-360,Lt=2*Qr($t*Ne)*zp(N(Lt)/2);var Bt=Oe-oe,_r=Ne-$t,Aa=1+.015*an(mt-50,2)/Qr(20+an(mt-50,2)),Ca=1+.045*st,Eo=1+.015*st*Rt,ko=30*T1(-an((kt-275)/25,2)),Zr=2*Qr(an(st,7)/(an(st,7)+an(25,7))),Ya=-Zr*zp(2*N(ko)),ys=Qr(an(Bt/($*Aa),2)+an(_r/(T*Ca),2)+an(Lt/(D*Eo),2)+Ya*(_r/(T*Ca))*(Lt/(D*Eo)));return k1(0,E1(100,ys))},Wp=S,P1=function(f,v,$){$===void 0&&($="lab"),f=new Wp(f),v=new Wp(v);var T=f.get($),D=v.get($),H=0;for(var N in T){var ee=(T[N]||0)-(D[N]||0);H+=ee*ee}return Math.sqrt(H)},M1=S,O1=function(){for(var f=[],v=arguments.length;v--;)f[v]=arguments[v];try{return new(Function.prototype.bind.apply(M1,[null].concat(f))),!0}catch{return!1}},qp=K,Gp=Bc,N1={cool:function(){return Gp([qp.hsl(180,1,.9),qp.hsl(250,.7,.4)])},hot:function(){return Gp(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Pi={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Uc=0,Jp=Object.keys(Pi);Uc<Jp.length;Uc+=1){var Yp=Jp[Uc];Pi[Yp.toLowerCase()]=Pi[Yp]}var R1=Pi,_n=K;_n.average=Jw,_n.bezier=n1,_n.blend=d1,_n.cubehelix=g1,_n.mix=_n.interpolate=Ip,_n.random=A1,_n.scale=Bc,_n.analyze=Fp.analyze,_n.contrast=I1,_n.deltaE=x1,_n.distance=P1,_n.limits=Fp.limits,_n.valid=O1,_n.scales=N1,_n.colors=lp,_n.brewer=R1;var L1=_n;return L1})})(K_);var uO=K_.exports;const W_=xy(uO),dO=["onClick"],fO=["data-writer-tooltip"],pO={key:1,class:"CoreTags__tag CoreTags__tag--empty"},hO=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,mO="A component to display coloured tag pills.",vO={writer:{name:"Tags",description:mO,category:"Content",fields:{tags:{name:"Tags",desc:"Key-value object with tags. Must be a JSON string or a state reference to a dictionary.",type:W.KeyValue,default:"{}"},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:W.Color,default:St.Blue5,category:qe.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:W.Number,default:"1",category:qe.Style},rotateHue:{...xt,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:qe.Style},primaryTextColor:Qt,cssClasses:at},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:hO.trim(),eventPayloadExample:"tagKey"}},previewField:"text"}},gO=Ce({...vO,__name:"CoreTags",setup(e){fi(h=>({"3d4231f0":l.value?"pointer":"auto"}));const t=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}],n=it("rootEl"),r=te(re.evaluatedFields),a=te(re.componentId),o=te(re.core),s=te(re.isBeingEdited),{isLinked:i}=Rf(o,a,"wf-tag-click"),l=j(()=>{var m;return i.value?!0:typeof((m=o.getComponentById(a).handlers)==null?void 0:m["wf-tag-click"])<"u"});function c(h){if(!r.rotateHue.value)return r.referenceColor.value;const m=W_(r.referenceColor.value),_=t[u(h)];return m.set("hsl.h",`${Math.sign(_.h)==-1?"-":"+"}${Math.abs(_.h)}`).set("hsl.s",`${Math.sign(_.s)==-1?"-":"+"}${Math.abs(_.s/100)}`).set("hsl.l",`${Math.sign(_.l)==-1?"-":"+"}${Math.abs(_.l/100)}`).css()}function u(h){let m=r.seed.value*52673&4294967295;for(let g=0;g<h.length;g++)m=(g+1)*h.charCodeAt(g)^m&4294967295;return Math.abs(m)%t.length}function d(h){const m=new CustomEvent("wf-tag-click",{detail:{payload:h}});n.value.dispatchEvent(m)}return(h,m)=>P(s)||Object.entries(P(r).tags.value??[]).length>0?(E(),M("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(P(r).tags.value??[]).length>0?(E(!0),M(Ye,{key:0},Pt(P(r).tags.value,(_,g)=>(E(),M("p",{key:g,class:"CoreTags__tag",style:bt({background:c(g)}),onClick:w=>d(g)},[L("span",{"data-writer-tooltip":_,"data-writer-tooltip-strategy":"overflow"},Te(_),9,fO)],12,dO))),128)):(E(),M("p",pO,m[0]||(m[0]=[L("span",null,"Empty Tags",-1)])))],512)):ge("",!0)}}),yO=ke(gO,[["__scopeId","data-v-b37299ed"]]),_O={key:0,class:"material-symbols-outlined"},bO={class:"info"},wO={key:1,class:"caption"},AO={class:"container","data-writer-container":""},CO=`
def handle_avatar_click():
	print("The avatar was clicked")`,$O="A component to display user avatars.",SO={writer:{name:"Avatar",description:$O,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:W.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:W.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:W.Text},size:{name:"Size",type:W.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:qe.Style},orientation:{name:"Orientation",type:W.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:qe.Style},primaryTextColor:Qt,secondaryTextColor:hr,separatorColor:cn,cssClasses:at},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:CO.trim()}},previewField:"text"}},IO=Ce({...SO,__name:"CoreAvatar",setup(e){fi(l=>({84668864:o.value?"pointer":"auto"}));const t=it("rootEl"),n=te(re.evaluatedFields),r=te(re.componentId),a=te(re.core),o=j(()=>{var c;return typeof((c=a.getComponentById(r).handlers)==null?void 0:c["wf-click"])<"u"}),s=j(()=>({backgroundImage:n.imageSrc.value?`url(${n.imageSrc.value})`:"none",cursor:o.value?"pointer":"auto"}));function i(l){const c=gi(l);t.value.dispatchEvent(c)}return(l,c)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:ut(["CoreAvatar",[P(n).size.value,P(n).orientation.value]])},[L("div",{class:"image",style:bt(s.value),onClick:i},[P(n).imageSrc.value?ge("",!0):(E(),M("i",_O," account_circle "))],4),L("div",bO,[P(n).name.value?(E(),M("div",{key:0,class:"name",onClick:i},Te(P(n).name.value),1)):ge("",!0),P(n).caption.value?(E(),M("div",wO,Te(P(n).caption.value),1)):ge("",!0),L("div",AO,[Ht(l.$slots,"default",{},void 0,!0)])])],2))}}),EO=ke(IO,[["__scopeId","data-v-f433e0c3"]]),kO={key:0,class:"material-symbols-outlined"},Dm=Ce({__name:"SharedButtonCopyClipboard",props:{label:{type:String,required:!0},content:{type:String,required:!0}},setup(e){const t=e;We(la(t,"content"),()=>r.value=!1);const n=$e(!1),r=$e(!1);let a;async function o(){a&&(clearTimeout(a),a=void 0),n.value=!0;try{await navigator.clipboard.writeText(t.content),r.value=!0,a=setTimeout(()=>{r.value=!1,a=void 0},3e3)}catch(s){wn().error(s)}finally{n.value=!1}}return ha(()=>{a&&clearTimeout(a)}),(s,i)=>(E(),De(Rn,{size:"small",variant:"tertiary",loading:n.value,onClick:o},{default:Ze(()=>[r.value?(E(),M("span",kO," check_circle ")):ge("",!0),tn(" "+Te(r.value?"Copied to clipboard":e.label),1)]),_:1},8,["loading"]))}}),TO={class:"SharedControlBar"},xO=Ce({__name:"SharedControlBar",props:{copyRawContent:{type:String,required:!1,default:void 0},copyStructuredContent:{type:String,required:!1,default:void 0}},setup(e){const t=e;return(n,r)=>(E(),M("div",TO,[t.copyStructuredContent?(E(),De(Dm,{key:0,label:"Copy JSON",content:t.copyStructuredContent},null,8,["content"])):ge("",!0),t.copyRawContent?(E(),De(Dm,{key:1,label:"Copy",content:t.copyRawContent},null,8,["content"])):ge("",!0)]))}}),q_=ke(xO,[["__scopeId","data-v-1464e278"]]),PO={key:0,class:"CoreAnnotatedText"},MO={key:0,class:"CoreAnnotatedText__annotation__subject"},OO={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:W.Object,desc:"Value array with text/annotations. Must be a JSON string or a state reference to an array.",init:`["This ",["is", "Verb"]," some ",["annotated", "Adjective"], ["text", "Noun"]," for those of ",["you", "Pronoun"]," who ",["like", "Verb"]," this sort of ",["thing", "Noun"],". ","And here's a ",["word", "", "#faf"]," with a fancy background but no label."]`,validator:j2},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:W.Color,default:St.Blue5,category:qe.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:W.Number,default:"1",category:qe.Style},rotateHue:{...xt,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:qe.Style},useMarkdown:{...xt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},copyButtons:{...xt,name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",default:"no",category:qe.Style},buttonColor:Jr,buttonTextColor:Yr,primaryTextColor:Qt,cssClasses:at},previewField:"data"}},NO=Ce({...OO,__name:"CoreAnnotatedText",setup(e){const t=te(re.evaluatedFields),n=j(()=>t.text.value??[]),r=te(re.isBeingEdited),a=te(re.componentId),o=j(()=>!t.text.value),s=j(()=>!o.value||r.value),i=j(()=>!!t.useMarkdown.value),l=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}];let c=[...l],u={},d=t.seed.value;function h(){const p=$e("");We([i,n],async()=>{if(!i.value)return p.value="";p.value=await S()},{immediate:!0});function b(R){const[K,G]=R,Z=G?`<span class="CoreAnnotatedText__annotation__subject">${G}</span>`:"";return`<span class="CoreAnnotatedText__annotation" style="background: ${w(R)}">${K}${Z}</span>`}async function S(){const R=n.value.reduce((G,Z)=>typeof Z=="string"?`${G} ${Z}`:Array.isArray(Z)?`${G} ${b(Z)}`:G,"");return await(await en(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url)).parse(R)}return In(p)}const m=h();function _(p,b){return p.set("hsl.h",`${Math.sign(b.h)==-1?"-":"+"}${Math.abs(b.h)}`).set("hsl.s",`${Math.sign(b.s)==-1?"-":"+"}${Math.abs(b.s/100)}`).set("hsl.l",`${Math.sign(b.l)==-1?"-":"+"}${Math.abs(b.l/100)}`).css()}function g(p,b=l.length){let S=t.seed.value*52673&4294967295;for(let K=0;K<p.length;K++)S=(K+1)*p.charCodeAt(K)^S&4294967295;return Math.abs(S)%b}function w(p){return p[2]||A(p[1])}function A(p){if(!t.rotateHue.value)return t.referenceColor.value;const b=W_(t.referenceColor.value);if(d!==t.seed.value&&(c=[...l],u={},d=t.seed.value),u[p])return _(b,u[p]);c.length===0&&(c=[...l]);const S=g(p,c.length),R=c[S];return u[p]=R,c.splice(S,1),_(b,R)}const C=j(()=>n.value.reduce((p,b)=>typeof b=="string"?p+b:p+b[0],"")),y=j(()=>{try{return JSON.stringify(n.value)}catch{return n.value.join("")}});return(p,b)=>s.value?(E(),M("div",PO,[i.value?(E(),De(py,{key:0,"raw-markdown":P(m),class:"CoreAnnotatedText__markdown"},null,8,["raw-markdown"])):(E(),M(Ye,{key:1},[o.value?(E(),De(Lf,{key:0,"component-id":P(a)},null,8,["component-id"])):ge("",!0),(E(!0),M(Ye,null,Pt(n.value,(S,R)=>(E(),M("span",{key:String(S)+R},[typeof S=="string"?(E(),M(Ye,{key:0},[tn(Te(S),1)],64)):ge("",!0),Array.isArray(S)?(E(),M("span",{key:1,class:"CoreAnnotatedText__annotation",style:bt({backgroundColor:w(S)})},[tn(Te(S[0])+" ",1),S[1]?(E(),M("span",MO,Te(S[1]),1)):ge("",!0)],4)):ge("",!0)]))),128))],64)),P(t).copyButtons.value?(E(),De(q_,{key:2,"copy-raw-content":C.value,"copy-structured-content":y.value},null,8,["copy-raw-content","copy-structured-content"])):ge("",!0)])):ge("",!0)}}),RO=ke(NO,[["__scopeId","data-v-a82b769f"]]);function hc(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Df(e){return hc(e)?!1:Array.isArray(e)}function G_(e){return!Df(e)&&typeof e=="object"&&e!==null}function J_(e){return hc(e)?1:Object.keys(e).length}function Y_(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const LO=["open","disabled"],DO={class:"SharedCollapsible__summary"},BO={key:0,class:"SharedCollapsible__summary__icon material-symbols-outlined"},FO={class:"content"},jO=Ce({__name:"SharedCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},icons:{type:Object,required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t,a=$e(n.open);We(la(n,"open"),i=>a.value=i);const o=j(()=>{if(n.icons!==void 0)return a.value?n.icons.open:n.icons.close});function s(i){const l=i.newState==="open";a.value=l,r("toggle",l)}return(i,l)=>(E(),M("details",{class:ut(["SharedCollapsible",{"SharedCollapsible--customMarker":e.icons}]),open:a.value,disabled:e.disabled,onToggle:s},[L("summary",DO,[e.icons?(E(),M("span",BO,Te(o.value),1)):ge("",!0),Ht(i.$slots,"title",{},void 0,!0)]),L("div",FO,[Ht(i.$slots,"content",{},void 0,!0)])],42,LO))}}),VO=ke(jO,[["__scopeId","data-v-ef5bb8f8"]]),UO=Ce({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=o=>`Object{${o}}`,r=o=>`Array[${o}]`,a=j(()=>{const o=J_(t.data);return o===0?n(0):Df(t.data)?r(o):G_(t.data)?n(o):n(0)});return(o,s)=>(E(),M("span",null,Te(a.value),1))}}),X_=ke(UO,[["__scopeId","data-v-2641ae29"]]),HO={class:"SharedJsonViewerCollapsible__title"},zO={key:0},KO={class:"SharedJsonViewerCollapsible__content"},WO=Ce({__name:"SharedJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[String,Number,Boolean,Object,Array,null],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(E(),De(VO,{open:e.open,disabled:e.disabled,icons:{open:"keyboard_arrow_right",close:"keyboard_arrow_down"},onToggle:n[0]||(n[0]=r=>t.$emit("toggle",r))},{title:Ze(()=>[L("div",HO,[e.title?(E(),M("span",zO,Te(e.title),1)):ge("",!0),e.data?(E(),De(X_,{key:1,data:e.data},null,8,["data"])):ge("",!0)])]),content:Ze(()=>[L("div",KO,[Ht(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),Q_=ke(WO,[["__scopeId","data-v-746fb4ae"]]),qO={class:"SharedJsonViewerValue"},GO=Ce({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=j(()=>JSON.stringify(t.data));return(r,a)=>(E(),M("span",qO,Te(n.value),1))}}),Z_=ke(GO,[["__scopeId","data-v-496a5553"]]),JO={class:"SharedJsonViewerObject"},YO={key:0,class:"SharedJsonViewerObject__value"},XO=Ce({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:Y_},setup(e,{emit:t}){const n=e,r=la(n,"initialDepth"),a=t,o=$e([]),s=j(()=>n.path.length+1);We(r,()=>{if(r.value===0){o.value=[];return}if(!(r.value===-1||r.value>s.value))return;const u=new Set([...o.value,...Object.keys(n.data)]);o.value=Array.from(u)},{immediate:!0});function i(c,u){u?o.value=[...o.value,c]:o.value=o.value.filter(d=>d!==c),a("toggle",{open:u,path:[...n.path,c]})}function l(c){return o.value.includes(String(c))}return(c,u)=>(E(),M("div",JO,[(E(!0),M(Ye,null,Pt(Object.entries(e.data),([d,h],m)=>(E(),M(Ye,{key:m},[P(hc)(h)||P(J_)(h)===0?(E(),M("div",YO,[L("span",null,Te(d),1),u[1]||(u[1]=tn(": ")),Fe(Z_,{data:h},null,8,["data"])])):(E(),De(Q_,{key:1,open:l(d),title:d,data:h,onToggle:_=>i(d,_)},{default:Ze(()=>[l(d)?(E(),De(eb,{key:0,data:h,path:[...e.path,d],"initial-depth":r.value,onToggle:u[0]||(u[0]=_=>c.$emit("toggle",_))},null,8,["data","path","initial-depth"])):ge("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),Bm=ke(XO,[["__scopeId","data-v-eb3b38f1"]]),eb=Ce({__name:"SharedJsonViewer",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0},path:{type:Array,default:()=>[]},hideRoot:{type:Boolean,required:!1},initialDepth:{type:Number,default:0},enableCopyToJson:{type:Boolean,required:!1}},emits:{toggle:Y_},setup(e){const t=e,n=j(()=>t.path.length===0&&!t.hideRoot),r=j(()=>t.initialDepth===-1||t.initialDepth>0),a=j(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(o,s)=>(E(),M(Ye,null,[P(G_)(e.data)||P(Df)(e.data)?(E(),M(Ye,{key:0},[n.value?(E(),De(Q_,{key:0,open:r.value,data:e.data,onToggle:s[1]||(s[1]=i=>o.$emit("toggle",{path:[],open:i}))},{default:Ze(()=>[Fe(Bm,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[0]||(s[0]=i=>o.$emit("toggle",i))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(E(),De(Bm,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[2]||(s[2]=i=>o.$emit("toggle",i))},null,8,["data","path","initial-depth"]))],64)):P(hc)(e.data)?(E(),De(Z_,{key:1,data:e.data},null,8,["data"])):(E(),De(X_,{key:2,data:{}})),e.enableCopyToJson?(E(),De(q_,{key:3,"copy-structured-content":a.value},null,8,["copy-structured-content"])):ge("",!0)],64))}}),QO={class:"CoreJsonViewer"},ZO="A component to explore JSON data as a hierarchy.",eN={name:"JSON Viewer",description:"A JSON tree viewer where you can expand the keys.",sample:{description:"This sample is opened by default",bool:!0,null:null,list:[1,"two",{key:3}]},sampleClosed:{description:"This sample is not opened by default"},createdAt:new Date},tN={name:"JSON Viewer",description:ZO,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(eN),type:W.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:W.Number,init:"0",validator:Xn},hideRoot:{...xt,name:"Hide root",desc:"Don't show the type of the root node when it's an Object or an Array.",default:"no",category:qe.Style},copy:{...xt,name:"Copy",desc:"If active, adds a control bar with copy JSON button.",default:"no",category:qe.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:W.Width,category:qe.Style,applyStyleVariable:!0,validator:E_},secondaryTextColor:hr,separatorColor:cn,cssClasses:at},previewField:"data"},nN={writer:tN},rN=Ce({...nN,__name:"CoreJsonViewer",setup(e){const t=te(re.evaluatedFields),n=j(()=>t.data.value),r=j(()=>Number(t.initialDepth.value)||0);return(a,o)=>(E(),M("div",QO,[Fe(eb,{data:n.value??{},"initial-depth":r.value,"enable-copy-to-json":P(t).copy.value,"hide-root":P(t).hideRoot.value},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function aN(e,t={minimumFractionDigits:0,maximumFractionDigits:1}){const n=new Intl.NumberFormat(void 0,{style:"percent",...t});return j(()=>n.format(e.value))}const oN=["aria-valuetext","aria-valuemin","aria-valuemax","aria-valuenow","aria-busy","tabindex"],sN={key:0,class:"CoreProgressBar__title"},iN={key:0,class:"CoreProgressBar__title__label"},lN={key:1,class:"CoreProgressBar__title__progress"},cN={class:"CoreProgressBar__bar"},uN=`
def handle_progress_bar_click():
	print("The progress bar was clicked")`,dN="A component to display a progression.",fN={name:"Progress Bar",description:dN,category:"Content",allowedChildrenTypes:["*"],fields:{label:{name:"Label",type:W.Text,default:""},value:{name:"Value",type:W.Number},min:{name:"Minimum value",type:W.Number,default:"0"},max:{name:"Maximum value",type:W.Number,default:"1"},displayPercentage:{...xt,name:"Display percentage",default:"no",category:qe.Style},accentColor:vn,primaryTextColor:Qt,separatorColor:cn,cssClasses:at},events:{"wf-click":{desc:"Triggered when the progress bar is clicked.",stub:uN.trim()}}},pN={writer:fN},hN=Ce({...pN,__name:"CoreProgressBar",setup(e){const t=it("rootEl"),n=te(re.evaluatedFields),r=te(re.componentId),a=te(re.core),o=j(()=>{var g;return String((g=n.label)==null?void 0:g.value)}),s=j(()=>Number(n.value.value)),i=j(()=>Number(n.min.value)),l=j(()=>Number(n.max.value)),c=j(()=>!!n.displayPercentage.value),u=j(()=>{if(!(s.value===void 0||Number.isNaN(s.value)))return(s.value-i.value)/(l.value-i.value)}),d=aN(u),h=j(()=>({width:u.value===void 0?void 0:`${u.value*100}%`})),m=j(()=>{var w;return typeof((w=a.getComponentById(r).handlers)==null?void 0:w["wf-click"])<"u"});function _(g){if(!m.value)return;const w=gi(g);t.value.dispatchEvent(w)}return(g,w)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:ut(["CoreProgressBar",{"CoreProgressBar--clickable":m.value}]),role:"progressbar","aria-valuetext":u.value===void 0?null:P(d),"aria-valuemin":i.value,"aria-valuemax":l.value,"aria-valuenow":u.value===void 0?null:s.value,"aria-busy":u.value<1||u.value===void 0,tabindex:m.value?"0":null,onKeydown:da(_,["enter"]),onClick:_},[o.value||c.value?(E(),M("div",sN,[o.value?(E(),M("label",iN,Te(o.value),1)):ge("",!0),c.value&&u.value!==void 0?(E(),M("span",lN,Te(P(d)),1)):ge("",!0)])):ge("",!0),L("div",cN,[L("div",{class:ut(["CoreProgressBar__bar__value",{"CoreProgressBar__bar__value--indeterminate":u.value===void 0}]),style:bt(h.value)},null,6)])],42,oN))}}),mN=ke(hN,[["__scopeId","data-v-873bd788"]]);function mc(e){const t=/[\\]?@{([^}]*)}/g;function n(c,u){var g;let d=[],h="",m=0,_=0;for(;_<c.length;){const w=c.charAt(_);w=="\\"?_+1<c.length&&(h+=c.charAt(_+1),_++):w=="."?m==0?(d.push(h),h=""):h+=w:w=="["?(m==0?(d.push(h),h=""):h+=w,m++):w=="]"?(m--,m==0?h=(g=r(h,u))==null?void 0:g.toString():h+=w):h+=w,_++}return h&&d.push(h),d}function r(c,u){let h=u?a(u):void 0,m=e.userState.value;const _=n(c,u);for(let g=0;g<_.length;g++)h=h==null?void 0:h[_[g]],m=m==null?void 0:m[_[g]];return h??m}function a(c){var d,h;const u={};for(let m=0;m<c.length-1;m++){const _=c[m],{componentId:g}=_,{type:w}=e.getComponentById(g);if(w!=="repeater"||m+1>=c.length)continue;const A=c.slice(0,m+1),C=c.slice(0,m+2),{instanceNumber:y}=C.at(-1),p=i(A,"repeaterObject");if(!p)continue;const b=Object.entries(p),S=i(A,"keyVariable"),R=i(A,"valueVariable");u[S]=(d=b[y])==null?void 0:d[0],u[R]=(h=b[y])==null?void 0:h[1]}return u}function o(c,u){return c==null?"":c.replace(t,(h,m)=>{if(h.charAt(0)=="\\")return h.substring(1);const _=m.trim();if(!_)return"";const g=r(_,u);return typeof g>"u"?"":typeof g=="object"?JSON.stringify(g):g.toString()})}function s(c){const{componentId:u}=c.at(-1),d=e.getComponentById(u);if(!d)return;const h={},{fields:m}=e.getComponentDefinition(d.type);if(m)return Object.keys(m).forEach(_=>{h[_]=j(()=>i(c,_))}),h}function i(c,u){var y;const{componentId:d}=c.at(-1),h=e.getComponentById(d);if(!h)return;const{fields:m}=e.getComponentDefinition(h.type),_=(y=h.content)==null?void 0:y[u],g=m[u].default,w=o(_,c),A=m[u].type,C=typeof w>"u"||w===null||w==="";if(A==W.Object||A==W.KeyValue||A==W.Tools){if(!w)return JSON.parse(g??null);if(typeof w!="string")return w;let p;try{p=JSON.parse(w)}catch{return JSON.parse(g??null)}return p}else if(A==W.Number){const p=g===null?null:parseFloat(g);if(C)return p??null;const b=parseFloat(w);return typeof b>"u"||Number.isNaN(b)?p??null:b}else if(A==W.Boolean){const p=C?g:w;return p==="yes"||p==="true"}else return A==W.IdKey?_:C?g??"":w}function l(c,u){const d=e.getComponentById(c);if(!d)return;if(typeof d.visible>"u"||d.visible.expression===!0)return!0;if(d.visible.expression===!1)return!1;const h=r(d.visible.binding,u);return d.visible.reversed===!0?!h:!!h}return{getEvaluatedFields:s,isComponentVisible:l,evaluateExpression:r}}function An(e,t,n,r=""){const a=$e(),o=$e(!1),s=$e(null),i=t.at(-1).componentId,l=j(()=>e.getComponentById(i)),{evaluateExpression:c}=mc(e);function u(){var m;const h=e.getComponentById(i);if((m=h==null?void 0:h.binding)!=null&&m.stateRef)return c(h.binding.stateRef,t)}function d(h,m,_){var p,b;a.value=h;const g=(p=l.value.handlers)==null?void 0:p[m],w=((b=l.value.binding)==null?void 0:b.eventType)==m,A=Rf(e,i,m).isLinked.value;if(!g&&!w&&!A)return;if(o.value){s.value={eventValue:h,emitEventType:m};return}o.value=!0;const C=()=>{o.value=!1,s.value&&(d(s.value.eventValue,s.value.emitEventType),s.value=null),_==null||_()},y=new CustomEvent(m,{detail:{payload:h,callback:C}});n.value instanceof HTMLElement?n.value.dispatchEvent(y):n.value.$el.dispatchEvent(y)}return We(()=>u(),h=>{o.value||(a.value=h)},{immediate:!0}),We(a,h=>{typeof h>"u"&&(a.value=r)},{immediate:!0}),{formValue:a,handleInput:d}}const vN={key:0},gN=Ce({__name:"BaseInputWrapper",props:{label:{type:String,required:!1,default:void 0},isHorizontal:{type:Boolean,required:!1}},setup(e){return(t,n)=>(E(),M("div",{ref:"rootEl",class:ut(["BaseInputWrapper",{horizontal:e.isHorizontal}])},[e.label?(E(),M("label",vN,Te(e.label),1)):ge("",!0),Ht(t.$slots,"default",{},void 0,!0)],2))}}),Bn=ke(gN,[["__scopeId","data-v-1cbc4730"]]),yN=["checked","value"],_N=["for"],Fm={a:"Option A",b:"Option B"},bN="A user input component that allows users to choose multiple values from a list of options using checkboxes.",wN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected options.
	# The payload will be a list, as multiple options are allowed.

	state["selected"] = payload`,AN={writer:{name:"Checkbox Input",description:bN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:W.KeyValue,default:JSON.stringify(Fm,null,2),validator:Ha},orientation:{name:"Orientation",type:W.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:qe.Style,desc:"Specify how to lay out the options."},primaryTextColor:Qt,accentColor:vn,cssClasses:at},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:wN.trim(),bindable:!0,eventPayloadExample:Object.keys(Fm)}}}},CN=Ce({...AN,__name:"CoreCheckboxInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),o=te(re.flattenedInstancePath),{formValue:s,handleInput:i}=An(r,a,n);function l(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(d=>d.checked?d.value:void 0).filter(d=>typeof d<"u"):void 0}return(c,u)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreCheckboxInput"},{default:Ze(()=>[L("div",{class:ut(["options",{horizontal:P(t).orientation.value=="horizontal"}])},[(E(!0),M(Ye,null,Pt(P(t).options.value,(d,h)=>(E(),M("div",{key:h,class:"option"},[L("input",{type:"checkbox",checked:Array.isArray(P(s))?P(s).includes(h):!1,value:h,onInput:u[0]||(u[0]=m=>P(i)(l(),"wf-options-change"))},null,40,yN),L("label",{for:`${P(o)}-option-${h}`},Te(d),9,_N)]))),128))],2)]),_:1},8,["label"]))}}),$N=ke(CN,[["__scopeId","data-v-c48ee644"]]),SN=["value","list"],IN=["id"],EN=Ce({__name:"BaseInputColor",props:{value:{type:String,required:!1,default:void 0},customColors:{type:Array,default:()=>[]}},emits:{"update:value":e=>typeof e=="string",change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,a=it("pickerEl"),o=te(re.flattenedInstancePath),s=j(()=>{var c;return(c=n.customColors)!=null&&c.length?`${o}_datalist`:null});function i(c){r("update:value",c.target.value)}function l(c){r("change",c.target.value)}return(c,u)=>(E(),M(Ye,null,[L("input",{ref_key:"pickerEl",ref:a,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:i,onChange:l},null,40,SN),s.value?(E(),M("datalist",{key:0,id:s.value},[(E(!0),M(Ye,null,Pt(e.customColors,d=>(E(),M("option",{key:d},Te(d),1))),128))],8,IN)):ge("",!0)],64))}}),kN=ke(EN,[["__scopeId","data-v-ba449f16"]]),TN="A user input component that allows users to select a color using a color picker interface.",jm=`
def onchange_handler(state, payload):

	# Set the state variable "new_color" to the new value, provided as string.

	state["new_color"] = payload`,xN={name:"Color Input",description:TN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:W.Object,init:JSON.stringify([St.Blue5,St.Green5,St.Orange5,St.Gray6,St.Blue4]),validator:k_},cssClasses:at},events:{"wf-change":{desc:"Capture changes as they happen.",stub:jm,bindable:!0,eventPayloadExample:St.Blue5},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:jm,eventPayloadExample:St.Blue5}}},PN={writer:xN},MN=Ce({...PN,__name:"CoreColorInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),o=j(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:i}=An(r,a,n);return(l,c)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreColorInput"},{default:Ze(()=>[Fe(kN,{value:P(s),"custom-colors":o.value,"onUpdate:value":c[0]||(c[0]=u=>P(i)(u,"wf-change")),onChange:c[1]||(c[1]=u=>P(i)(u,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),ON=ke(MN,[["__scopeId","data-v-f4b5e938"]]),NN=["value"],RN="A user input component that allows users to select a date using a date picker interface.",LN=`
def onchange_handler(state, payload):

	# Set the state variable "new_date" to the new value, provided as a YYYY-MM-DD string.

	state["new_date"] = payload`,DN={writer:{name:"Date Input",description:RN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},cssClasses:at},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:LN,bindable:!0,eventPayloadExample:new Date().toISOString().split("T")[0]}}}},BN=Ce({...DN,__name:"CoreDateInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreDateInput"},{default:Ze(()=>[L("input",{type:"date",value:P(o),onChange:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-date-change"))},null,40,NN)]),_:1},8,["label"]))}}),FN=ke(BN,[["__scopeId","data-v-d6140e2d"]]),jN=Ce({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=qr(e,"modelValue");return(n,r)=>Dn((E(),M("select",{"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),class:"WdsDropdownInput colorTransformer"},[Ht(n.$slots,"default",{},void 0,!0)],512)),[[Od,t.value]])}}),tb=ke(jN,[["__scopeId","data-v-a262dc28"]]),VN=["value"],UN="A user input component that allows users to select a single value from a list of options using a dropdown menu.",Vm={a:"Option A",b:"Option B"},HN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,zN={writer:{name:"Dropdown Input",description:UN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:W.KeyValue,default:JSON.stringify(Vm,null,2),validator:Ha},cssClasses:at},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:HN.trim(),bindable:!0,eventPayloadExample:Object.keys(Vm)[0]}}}},KN=Ce({...zN,__name:"CoreDropdownInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreDropdownInput"},{default:Ze(()=>[Fe(tb,{modelValue:P(o),"onUpdate:modelValue":l[0]||(l[0]=c=>sn(o)?o.value=c:null),onInput:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-option-change"))},{default:Ze(()=>[(E(!0),M(Ye,null,Pt(P(t).options.value,(c,u)=>(E(),M("option",{key:u,value:u},Te(c),9,VN))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),WN=ke(KN,[["__scopeId","data-v-8e1a01b0"]]),qN={class:"main"},GN={key:0,class:"file-input"},JN=["multiple","accept"],YN={key:0,class:"file-input__files"},XN=["onClick"],QN={key:1},ZN={key:1,class:"status"},eR={key:1},tR={key:2},Um=200*1024*1024,nR="A user input component that allows users to upload files.",rR=`
def onchange_handler(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
		name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)`.trim(),aR={writer:{name:"File Input",description:nR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},allowFileTypes:{name:"Allowed file types",type:W.Text,init:[".pdf",".txt",".doc","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].join(", "),desc:"Provides hints for browsers to select the correct file types. You can specify extensions and MIME types separated by comma, or leave empty to accept any file."},allowMultipleFiles:{...xt,name:"Allow multiple files",default:"no"},cssClasses:at},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:rR,bindable:!0,eventPayloadExample:[{name:"hello.txt",type:"text/plain",data:"data:text/plain;base64,SGVsbG8gd29ybGQK"}]}}}},oR=Ce({...aR,__name:"CoreFileInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=it("fileEl"),a=$e(null),o=te(re.core),s=te(re.instancePath),i=$e(null),{formValue:l,handleInput:c}=An(o,s,n),u=j(()=>Array.isArray(l.value)?l.value:[]),d=j(()=>{var y;return((y=t.allowFileTypes)==null?void 0:y.value)??""}),h=j(()=>t.allowMultipleFiles.value||void 0),m=async y=>{const p=new FileReader;return p.readAsDataURL(y),new Promise((b,S)=>{p.onload=()=>b(p.result),p.onerror=()=>S(p.error)})},_=async y=>{const p=y.target;if(!p.files||p.files.length==0)return;const b=async()=>{let R=0;a.value=null;const K=Promise.all(Array.from(p.files).map(async G=>(R+=G.size,{name:G.name,type:G.type,data:await m(G)})));return R>Um?(a.value=`Files are too big. Total size limit is ${Math.floor(Um/Math.pow(1024,2))}mb.`,[]):K};i.value=Array.from(p.files).map(R=>R.name),l.value=b();const S=()=>{i.value=null};c(b(),"wf-file-change",S)};We(l,y=>{typeof y>"u"&&r.value&&(r.value.value="")});function g(y){const p=document.createElement("a");p.href=String(y.data),p.download=y.name,p.click(),p.remove()}const w=j(()=>h.value?"files":"file"),A=j(()=>`Browse ${w.value}`),C=j(()=>`No ${w.value} selected`);return(y,p)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:i.value?"":P(t).label.value,class:"CoreFileInput"},{default:Ze(()=>[L("div",qN,[i.value?ge("",!0):(E(),M("div",GN,[Dn(L("input",{ref_key:"fileEl",ref:r,type:"file",multiple:h.value,accept:d.value,onChange:p[0]||(p[0]=b=>_(b))},null,40,JN),[[Tr,!1]]),L("div",null,[Fe(Rn,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=b=>P(r).click())},{default:Ze(()=>[tn(Te(A.value),1)]),_:1})]),u.value?(E(),M("ul",YN,[(E(!0),M(Ye,null,Pt(u.value,(b,S)=>(E(),M("li",{key:S},[L("a",{href:"#",onClick:R=>g(b)},Te(b.name),9,XN)]))),128))])):(E(),M("p",QN,Te(C.value),1))])),a.value||i.value?(E(),M("div",ZN,[i.value?(E(),De(B_,{key:0,class:"loadingSymbol"})):ge("",!0),i.value?(E(),M("span",eR,"Processing "+Te(i.value.join(", "))+"...",1)):ge("",!0),a.value?(E(),M("span",tR,Te(a.value),1)):ge("",!0)])):ge("",!0)])]),_:1},8,["label"]))}}),sR=ke(oR,[["__scopeId","data-v-bed4324c"]]),iR={class:"WdsTag__text"},lR=Ce({__name:"WdsTag",props:{text:{type:String,required:!0},closable:{type:Boolean,required:!1},size:{type:String,default:"normal"},variant:{type:String,default:"normal"}},emits:{close:()=>!0},setup(e){const t=e,n=j(()=>[`WdsTag--size-${t.size}`,`WdsTag--variant-${t.variant}`]);return(r,a)=>(E(),M("div",{class:ut(["WdsTag",n.value])},[L("span",iR,Te(e.text),1),e.closable?(E(),M("button",{key:0,role:"button",class:"WdsTag__close",onClick:a[0]||(a[0]=lr(o=>r.$emit("close"),["stop"]))},a[1]||(a[1]=[L("i",{class:"material-symbols-outlined"},"close",-1)]))):ge("",!0)],2))}}),cR=ke(lR,[["__scopeId","data-v-74f62b16"]]),gu=new Map;function uR(){function e(n){const r=gu.get(n);if(r!==void 0)return r;const a=fetch(n,{method:"HEAD"}).then(o=>{if(o.ok)return o.headers.get("Content-Type")||void 0}).catch(()=>{});return gu.set(n,a),a}function t(){gu.clear()}return{fetchAssetContentType:e,clearCache:t}}const dR=["src"],nb=Ce({__name:"SharedImgWithFallback",props:{urls:{type:Array,required:!0}},setup(e){const t=e,n=$e(""),{fetchAssetContentType:r}=uR();return We(la(t,"urls"),async a=>{n.value="";for(const o of a){const s=await r(o);if(!(!s||s==="text/html"))return n.value=o}},{immediate:!0}),(a,o)=>(E(),M("img",{src:n.value},null,8,dR))}}),fR={};function pR(e,t){return E(),De(xd,{name:"slide-fade"},{default:Ze(()=>[Ht(e.$slots,"default",{},void 0,!0)]),_:3})}const hR=ke(fR,[["render",pR],["__scopeId","data-v-75fe1e40"]]),mR={key:1,class:"material-symbols-outlined"},vR={key:1,class:"WdsSelect__trigger__multiSelectLabel"},gR={key:0,class:"WdsSelect__trigger__multiSelectLabel__placeholder"},yR=["data-writer-tooltip"],_R={class:"WdsSelect__trigger__arrow"},bR={class:"material-symbols-outlined"},wR=Ce({__name:"WdsSelect",props:zr({options:{type:Array,default:()=>[]},placeholder:{type:String,required:!1,default:void 0},defaultIcon:{type:String,required:!1,default:void 0},hideIcons:{type:Boolean,required:!1},enableSearch:{type:Boolean,required:!1},enableMultiSelection:{type:Boolean,required:!1},loading:{type:Boolean,required:!1}},{modelValue:{type:[String,Array],required:!0,default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=uo(()=>en(()=>import("./WdsDropdownMenu-inLHd048.js"),__vite__mapDeps([5,6]),import.meta.url)),n=e,r=qr(e,"modelValue"),a=$e(!1),o=it("trigger"),s=it("dropdown"),i=j(()=>n.enableSearch?[]:[DI({allowedPlacements:["bottom","top"]})]),{floatingStyles:l,update:c}=VI(o,s,{placement:"bottom",middleware:i}),u=j(()=>a.value?"keyboard_arrow_up":"expand_more"),d=j(()=>r.value?(Array.isArray(r.value)?r.value:[r.value]).filter(Boolean):[]),h=j(()=>d.value.map(y=>n.options.find(p=>p.value===y)??{value:y,label:y})),m=j(()=>r.value&&!n.options.some(y=>y.value===r.value)),_=j(()=>m.value?String(r.value):h.value.map(y=>y.label).sort().join(" / ")),g=j(()=>{var y;return m.value?"help_center":n.hideIcons?"":((y=h.value.at(0))==null?void 0:y.icon)??n.defaultIcon??"help_center"}),w=gy(o);We(w,()=>{w.value||ar().then(()=>a.value=!1)},{immediate:!0});function A(y){n.enableMultiSelection||(a.value=!1),r.value=y}function C(y){Array.isArray(r.value)&&(r.value=r.value.filter(p=>p!==y))}return(y,p)=>(E(),M("div",{ref_key:"trigger",ref:o,class:"WdsSelect"},[L("div",{class:"WdsSelect__trigger",role:"button",tabindex:"0",onClick:p[0]||(p[0]=b=>a.value=!a.value),onKeydown:p[1]||(p[1]=da(b=>a.value=!a.value,["enter"]))},[(m.value||!e.hideIcons)&&!e.enableMultiSelection?(E(),M(Ye,{key:0},[Array.isArray(g.value)?(E(),De(nb,{key:0,urls:g.value},null,8,["urls"])):(E(),M("i",mR,Te(g.value),1))],64)):ge("",!0),e.enableMultiSelection?(E(),M("div",vR,[(E(!0),M(Ye,null,Pt(h.value,b=>(E(),De(cR,{key:b.value,text:b.label,closable:"",onClose:S=>C(b.value)},null,8,["text","onClose"]))),128)),h.value.length===0&&e.placeholder?(E(),M("p",gR,Te(e.placeholder),1)):ge("",!0)])):(E(),M("div",{key:2,class:"WdsSelect__trigger__label","data-writer-tooltip-strategy":"overflow","data-writer-tooltip":_.value},Te(_.value??e.placeholder),9,yR)),L("div",_R,[L("i",bR,Te(u.value),1)])],32),Fe(hR,null,{default:Ze(()=>[a.value?(E(),De(P(t),{key:0,ref_key:"dropdown",ref:s,"enable-search":e.enableSearch,"enable-multi-selection":e.enableMultiSelection,"hide-icons":e.hideIcons,loading:e.loading,options:e.options,selected:r.value,style:bt(P(l)),onSelect:A,onSearch:P(c)},null,8,["enable-search","enable-multi-selection","hide-icons","loading","options","selected","style","onSearch"])):ge("",!0)]),_:1})],512))}}),Bf=ke(wR,[["__scopeId","data-v-18ccf33a"]]),J4=Object.freeze(Object.defineProperty({__proto__:null,default:Bf},Symbol.toStringTag,{value:"Module"})),AR="A user input component that allows users to select multiple values from a searchable list of options.",Hm={a:"Option A",b:"Option B"},CR=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,$R={writer:{name:"Multiselect Input",description:AR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:W.KeyValue,default:JSON.stringify(Hm,null,2),validator:Ha},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:W.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:W.Number,default:"0",validator:Xn},accentColor:{...vn,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:W.Color,default:St.White,desc:"The colour of the text in the chips.",category:qe.Style,applyStyleVariable:!0},primaryTextColor:Qt,containerBackgroundColor:va,separatorColor:cn,cssClasses:at},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:CR.trim(),bindable:!0,eventPayloadExample:Object.keys(Hm)}}}},SR=Ce({...$R,__name:"CoreMultiselectInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n),i=j(()=>t.maximumCount.value?c.value.length>=t.maximumCount.value:!1),l=j(()=>Object.entries(t.options.value).map(([u,d])=>({value:u,label:String(d),disabled:i.value&&!c.value.includes(u)}))),c=j({get(){return o.value??[]},set(u){s(u,"wf-options-change")}});return(u,d)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreMultiselectInput"},{default:Ze(()=>[Fe(Bf,{modelValue:c.value,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value=h),options:l.value,placeholder:P(t).placeholder.value,"enable-multi-selection":"","hide-icons":""},null,8,["modelValue","options","placeholder"])]),_:1},8,["label"]))}}),IR=ke(SR,[["__scopeId","data-v-73d09d59"]]),ER=["value","placeholder","min","max","step"],kR="A user input component that allows users to enter numeric values.",zm=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,TR={writer:{name:"Number Input",description:kR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},placeholder:{name:"Placeholder",type:W.Text},minValue:{name:"Minimum value",type:W.Number,default:null},maxValue:{name:"Max value",type:W.Number,default:null},valueStep:{name:"Step",type:W.Number,default:"1"},cssClasses:at},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:zm,bindable:!0,eventPayloadExample:42},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:zm,eventPayloadExample:42}}}},xR=Ce({...TR,__name:"CoreNumberInput",setup(e){const t=te(re.evaluatedFields),n=it("rootInstance"),r=it("inputEl"),a=te(re.core),o=te(re.instancePath),{formValue:s,handleInput:i}=An(a,o,n);function l(){if(r.value.value=="")return null;let d=parseFloat(r.value.value);return isNaN(d)||(t.minValue.value!==null&&d<t.minValue.value&&(d=t.minValue.value,r.value.value=d),t.maxValue.value!==null&&d>t.maxValue.value&&(d=t.maxValue.value,r.value.value=d)),d}function c(){const d=l();isNaN(d)||i(d,"wf-number-change")}function u(){const d=l();isNaN(d)||i(d,"wf-number-change-finish")}return(d,h)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreNumberInput"},{default:Ze(()=>[L("input",{ref_key:"inputEl",ref:r,type:"number",value:P(s),placeholder:P(t).placeholder.value,min:P(t).minValue.value!==null?P(t).minValue.value:void 0,max:P(t).maxValue.value!==null?P(t).maxValue.value:void 0,step:P(t).valueStep.value!==null?P(t).valueStep.value:void 0,onInput:c,onChange:u},null,40,ER)]),_:1},8,["label"]))}}),PR=ke(xR,[["__scopeId","data-v-f4e3ddb8"]]),MR=["id","checked","value","name","onInput"],OR=["for"],NR="A user input component that allows users to choose a single value from a list of options using radio buttons.",Km={a:"Option A",b:"Option B"},RR=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected radio option

	state["selected"] = payload`,LR={writer:{name:"Radio Input",description:NR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:W.KeyValue,default:JSON.stringify(Km,null,2),validator:Ha},orientation:{name:"Orientation",type:W.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:qe.Style,desc:"Specify how to lay out the options."},primaryTextColor:Qt,accentColor:vn,cssClasses:at},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:RR.trim(),bindable:!0,eventPayloadExample:Object.keys(Km)[0]}}}},DR=Ce({...LR,__name:"CoreRadioInput",setup(e){const t=te(re.evaluatedFields),n=te(re.flattenedInstancePath),r=$e(null),a=te(re.core),o=te(re.instancePath),{formValue:s,handleInput:i}=An(a,o,r);return(l,c)=>(E(),De(Bn,{ref_key:"rootInstance",ref:r,label:P(t).label.value,class:"CoreRadioInput"},{default:Ze(()=>[L("div",{class:ut(["options",{horizontal:P(t).orientation.value=="horizontal"}])},[(E(!0),M(Ye,null,Pt(P(t).options.value,(u,d)=>(E(),M("div",{key:d,class:"option"},[L("input",{id:`${P(n)}-option-${d}`,type:"radio",checked:P(s)===d,value:d,name:`${P(n)}-options`,onInput:h=>P(i)(d,"wf-option-change")},null,40,MR),L("label",{for:`${P(n)}-option-${d}`},Te(u),9,OR)]))),128))],2)]),_:1},8,["label"]))}}),BR=ke(DR,[["__scopeId","data-v-4a0eac98"]]),FR="A user input component that allows users to select a single value from a searchable list of options.",jR={a:"Option A",b:"Option B"},VR=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,UR={writer:{name:"Select Input",description:FR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:W.KeyValue,default:JSON.stringify(jR,null,2),validator:Ha},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:W.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:W.Number,default:"0",validator:Xn},accentColor:vn,primaryTextColor:Qt,containerBackgroundColor:va,separatorColor:cn,cssClasses:at},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:VR.trim(),bindable:!0}}}},HR=Ce({...UR,__name:"CoreSelectInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n),i=j(()=>Object.entries(t.options.value).map(([c,u])=>({value:c,label:String(u)}))),l=j({get(){return o.value},set(c){s(c,"wf-option-change")}});return(c,u)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSelectInput"},{default:Ze(()=>[Fe(Bf,{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=d=>l.value=d),options:i.value,placeholder:P(t).placeholder.value,"hide-icons":""},null,8,["modelValue","options","placeholder"])]),_:1},8,["label"]))}}),zR=ke(HR,[["__scopeId","data-v-61ccec03"]]);function Ll(e,t){const n=j(()=>{var r;return((r=String(t.value).split(".")[1])==null?void 0:r.length)??0});return j(()=>Number(e.value).toFixed(n.value))}const KR={class:"BaseInputRange__popover__content"},WR=Ce({__name:"BaseInputSliderThumb",props:zr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},sliderBoundingRect:{type:Object,default:void 0},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e,{expose:t}){const n=e;t({handleMouseDown:m,getOffsetLeft:_});const r=qr(e,"value"),a=it("thumb"),o=Ll(r,la(n,"step")),s=j(()=>typeof r.value!="number"?50:(r.value-n.min)/(n.max-n.min)*100),i=$e(n.popoverDisplayMode==="always");let l=null;We(la(n.popoverDisplayMode),()=>{n.popoverDisplayMode==="always"&&(i.value=!0)});function c(){n.popoverDisplayMode!=="always"&&(i.value=!0,l&&(clearTimeout(l),l=null),l=setTimeout(()=>{i.value=!1,l=null},1e3))}const u=j(()=>`${s.value}%`),d=j(()=>`${s.value}%`);function h(g){if(c(),n.min!==void 0&&g<n.min||n.max!==void 0&&g>n.max)return;const w=g-n.min,A=Math.round(w/n.step),C=n.min+A*n.step;r.value!==C&&(r.value=C)}function m(g){document.addEventListener("mousemove",A),document.addEventListener("mouseup",C);const w=n.sliderBoundingRect;A(g);function A(y){const p=(y.x-w.left)/(w.right-w.left);if(p>1||p<0)return;const b=(n.max-n.min)*p+n.min;h(b)}function C(){document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",A)}}function _(){return a.value.offsetLeft}return(g,w)=>(E(),M(Ye,null,[Fe(xd,null,{default:Ze(()=>[Dn(L("div",{class:"BaseInputRange__popover",style:bt({left:d.value})},[L("span",KR,Te(P(o)),1)],4),[[Tr,i.value]])]),_:1}),L("button",{ref_key:"thumb",ref:a,type:"button",class:"BaseInputRange__thumb",style:bt({left:u.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[w[0]||(w[0]=da(A=>h(+r.value-e.step),["left"])),w[1]||(w[1]=da(A=>h(+r.value+e.step),["right"]))],onMousedown:m},null,36)],64))}}),rb=ke(WR,[["__scopeId","data-v-f2261a8d"]]),qR=["aria-valuemin","aria-valuemax"],GR=Ce({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(E(),M("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:ut(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[Ht(t.$slots,"default",{},void 0,!0)],10,qR))}}),ab=ke(GR,[["__scopeId","data-v-4583336d"]]);function ob(e,t=500){const n=$e(),r=setInterval(()=>{var a;n.value=(a=e.value)==null?void 0:a.getBoundingClientRect()},t);return Or(()=>{clearInterval(r)}),j(()=>n.value)}const JR=9,YR=Ce({__name:"BaseInputSlider",props:zr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=qr(e,"value"),r=it("slider"),a=it("thumb"),o=Ll(n,la(t,"step")),s=j(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),i=ob(r);return We(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),We(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(l,c)=>(E(),De(ab,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${P(o)} (${Math.round(s.value)}%)`},{default:Ze(()=>[L("div",{ref_key:"slider",ref:r,class:"BaseInputRange__slider",onMousedown:c[0]||(c[0]=(...u)=>P(a).handleMouseDown&&P(a).handleMouseDown(...u))},[L("div",{class:"BaseInputRange__slider__progress",style:bt({width:`calc(${s.value}% + ${JR}px)`})},null,4)],544),Fe(rb,{ref_key:"thumb",ref:a,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":P(i),"onUpdate:value":c[1]||(c[1]=u=>n.value=u)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect"])]),_:1},8,["min","max","popover-display-mode","aria-valuenow","aria-valuetext"]))}}),XR="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",QR=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,ZR={writer:{name:"Slider Input",description:XR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},minValue:{name:"Minimum value",type:W.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:W.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:W.Number,default:"1",init:"1",validator:Xn},accentColor:vn,popoverColor:{name:"Popover color",type:W.Color,category:qe.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:W.Color,category:qe.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:at},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:QR,bindable:!0}}}},eL=Ce({...ZR,__name:"CoreSliderInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n,50);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSliderInput"},{default:Ze(()=>[Fe(YR,{"popover-display-mode":"always",value:P(o),min:P(t).minValue.value,max:P(t).maxValue.value,step:P(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>P(s)(c,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),tL=ke(eL,[["__scopeId","data-v-c2e33d68"]]),nL=9,rL=Ce({__name:"BaseInputSliderRange",props:zr({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Array,default:()=>[20,60]},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=qr(e,"value");function r(w,A){const C=[...n.value];C[w]=A,n.value=C.sort((y,p)=>y-p)}const a=it("slider"),o=it("thumbs");function s(w){const A=o.value[0],C=o.value[1],y=Math.abs(w.x-A.getOffsetLeft()),p=Math.abs(w.x-C.getOffsetLeft());y>p?C.handleMouseDown(w):A.handleMouseDown(w)}const i=j(()=>Math.min(...n.value)),l=j(()=>Math.max(...n.value)),c=la(t,"step"),u=Ll(i,c),d=Ll(l,c),h=j(()=>`from ${u} to ${d}`),m=j(()=>typeof i.value!="number"?50:(i.value-t.min)/(t.max-t.min)*100),_=j(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100-m.value),g=ob(a);return We(()=>t.min,()=>{n.value.some(w=>w<t.min)&&(n.value=n.value.map(w=>w<t.min?t.min:w))},{immediate:!0}),We(()=>t.max,()=>{n.value.some(w=>w>t.max)&&(n.value=n.value.map(w=>w>t.max?t.max:w))},{immediate:!0}),(w,A)=>(E(),De(ab,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":h.value},{default:Ze(()=>[L("div",{ref_key:"slider",ref:a,class:"BaseInputRange__slider",onMousedown:s},[L("div",{class:"BaseInputRange__slider__progress",style:bt({width:`calc(${_.value}% + ${nL}px)`,marginLeft:`${m.value}%`})},null,4)],544),(E(),M(Ye,null,Pt([0,1],C=>Fe(rb,{key:C,ref_for:!0,ref_key:"thumbs",ref:o,value:e.value[C],min:e.min,max:e.max,step:c.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":P(g),"onUpdate:value":y=>r(C?1:0,y)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect","onUpdate:value"])),64))]),_:1},8,["min","max","popover-display-mode","aria-valuetext"]))}}),aL="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",oL=`
def onchange_handler(state, payload):

	# Set the state variables "from" & "to" to the new range
	state["from"] = payload[0]
	state["to"] = payload[1]`,sL={writer:{name:"Slider Range Input",description:aL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},minValue:{name:"Minimum value",type:W.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:W.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:W.Number,default:"1",init:"1",validator:Xn},accentColor:vn,popoverColor:{name:"Popover color",type:W.Color,category:qe.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:W.Color,category:qe.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:at},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:oL,bindable:!0}}}},iL=Ce({...sL,__name:"CoreSliderRangeInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n,[20,50]);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSliderInput"},{default:Ze(()=>[Fe(rL,{"popover-display-mode":"always",value:P(o),min:P(t).minValue.value,max:P(t).maxValue.value,step:P(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>P(s)(c,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),lL=ke(iL,[["__scopeId","data-v-6297ca8b"]]),cL=["type","value","placeholder"],uL="A user input component that allows users to enter single-line text values.",Wm=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,dL={writer:{name:"Text Input",description:uL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},placeholder:{name:"Placeholder",type:W.Text},passwordMode:{...xt,name:"Password mode",default:"no",category:qe.Style},accentColor:vn,cssClasses:at},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Wm,bindable:!0,eventPayloadExample:"The content of the input"},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Wm,eventPayloadExample:"The content of the input"}}}},fL=Ce({...dL,__name:"CoreTextInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTextInput"},{default:Ze(()=>[L("input",{type:P(t).passwordMode.value?"password":"text",value:P(o),placeholder:P(t).placeholder.value,"aria-autocomplete":"none",onInput:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-change-finish"))},null,40,cL)]),_:1},8,["label"]))}}),pL=ke(fL,[["__scopeId","data-v-72b1ab62"]]),hL=["value","placeholder","rows"],mL="A user input component that allows users to enter multi-line text values.",qm=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,vL={writer:{name:"Textarea Input",description:mL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},placeholder:{name:"Placeholder",type:W.Text,control:nc.Textarea},rows:{name:"Rows",type:W.Number,init:"5",default:"5",validator:Xn},cssClasses:at},events:{"wf-change":{desc:"Capture changes as they happen.",stub:qm,bindable:!0,eventPayloadExample:"The content of the textarea"},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:qm,eventPayloadExample:"The content of the textarea"}}}},gL=Ce({...vL,__name:"CoreTextareaInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTextareaInput"},{default:Ze(()=>[L("textarea",{value:P(o),placeholder:P(t).placeholder.value,rows:P(t).rows.value,onInput:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-change-finish"))},null,40,hL)]),_:1},8,["label"]))}}),yL=ke(gL,[["__scopeId","data-v-712b09e1"]]),_L=["value"],bL="A user input component that allows users to select a time.",wL=`
def onchange_handler(state, payload):

	# Set the state variable "new_time" to the new value, provided as a hh:mm string (in 24-hour format that includes leading zeros).

	state["new_time"] = payload`,AL={writer:{name:"Time Input",description:bL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},cssClasses:at},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:wL,bindable:!0,eventPayloadExample:"9:30"}}}},CL=Ce({...AL,__name:"CoreTimeInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n);return(i,l)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTimeInput"},{default:Ze(()=>[L("input",{type:"time",value:P(o),onChange:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-time-change"))},null,40,_L)]),_:1},8,["label"]))}}),$L=ke(CL,[["__scopeId","data-v-a0be88c1"]]),SL={key:0,class:"filler light"},IL={key:1,class:"face"},EL={viewBox:"0 0 100 100"},kL=["d"],TL="A user input component that allows users to provide a rating.",xL=`
def onchange_handler(state, payload):

	# Set the state variable "rating" to the new value

	state["rating"] = payload`,PL={writer:{name:"Rating Input",description:TL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},feedback:{name:"Feedback",default:"stars",type:W.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:W.Number,default:"1",desc:"Valid values are 0 and 1.",validator:qs(0,1)},maxValue:{name:"Max value",type:W.Number,default:"5",desc:"Valid values are between 2 and 11.",validator:qs(2,11)},valueStep:{name:"Step",type:W.Number,default:"1",desc:"Valid values are between 0.25 and 1.",validator:qs(.25,1)},accentColor:vn,primaryTextColor:Qt,cssClasses:at},events:{"wf-number-change":{stub:xL,bindable:!0}}}},ML=Ce({...PL,__name:"CoreRatingInput",setup(e){const t=te(re.evaluatedFields),n=it("rootInstance"),r=it("unitsEl"),a=te(re.core),o=te(re.instancePath),s=$e(null),{formValue:i,handleInput:l}=An(a,o,n);function c(p){const b=p.offsetX,S=r.value.querySelectorAll(".unit");let R=0;return S.forEach(K=>{const G=K;b>G.offsetLeft+G.offsetWidth?R++:b>G.offsetLeft&&(R+=(b-G.offsetLeft)/G.offsetWidth)}),R}function u(p){let b=Math.ceil(p/C.value)*C.value;return b=Math.max(Math.min(b,A.value),w.value),b}function d(p){const b=c(p);return u(b)}function h(p){const b=d(p);s.value=b}function m(){s.value=null}function _(p){const b=Math.max(Math.min(p,A.value),w.value),S=45,R=95,K=(b-w.value)/(A.value-w.value),G=K*-10,Z=70+G,Ie=S+K*(R-S)+G;return`M30,${Z} Q50,${Ie} 70,${Z}`}function g(p){const b=d(p);l(b,"wf-number-change")}const w=j(()=>Math.max(Math.min(t.minValue.value,1),0)),A=j(()=>Math.max(Math.min(t.maxValue.value,11),2)),C=j(()=>Math.max(Math.min(t.valueStep.value,1),.25)),y=j(()=>{if(s.value!==null)return s.value;const p=parseFloat(i.value);return isNaN(p)?null:p});return(p,b)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:P(t).label.value},{default:Ze(()=>[L("div",{ref_key:"unitsEl",ref:r,class:ut(["units",{valueSet:y.value!==null}]),onClick:g,onMousemove:h,onMouseout:m},[(E(!0),M(Ye,null,Pt([...Array(A.value).keys()],S=>(E(),M("div",{key:S,class:ut(["unit",P(t).feedback.value])},[L("div",{class:"filler",style:bt({width:`${y.value>S?Math.min(y.value-S,1)*100:0}%`})},null,4),y.value!==null?(E(),M("div",SL)):ge("",!0),P(t).feedback.value=="faces"?(E(),M("div",IL,[(E(),M("svg",EL,[b[0]||(b[0]=L("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),b[1]||(b[1]=L("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),L("path",{class:"mouth",d:_(y.value??S+1)},null,8,kL)]))])):ge("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),OL=ke(ML,[["__scopeId","data-v-640d42e2"]]),NL=["aria-checked","onKeydown"],RL="A user input component with a simple on/off status.",LL=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,DL={writer:{name:"Switch Input",description:RL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:W.Text},accentColor:vn,primaryTextColor:Qt,separatorColor:cn,cssClasses:at},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:LL.trim(),bindable:!0}}}},BL=Ce({...DL,__name:"CoreSwitchInput",setup(e){const t=te(re.evaluatedFields),n=$e(null),r=te(re.core),a=te(re.instancePath),{formValue:o,handleInput:s}=An(r,a,n);function i(){s(!o.value,"wf-toggle")}return(l,c)=>(E(),De(Bn,{ref_key:"rootInstance",ref:n,label:P(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:Ze(()=>[L("div",{class:ut(["switch",{on:!!P(o)}]),tabindex:"0",role:"switch","aria-checked":!!P(o),onClick:i,onKeydown:da(lr(i,["prevent"]),["enter","space"])},c[0]||(c[0]=[L("div",{class:"toggle"},null,-1)]),42,NL)]),_:1},8,["label"]))}}),FL=ke(BL,[["__scopeId","data-v-ab3f108e"]]),jL=Ce({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=j(()=>{const r={padding:t.contentPadding};return t.isHorizontal?{...r,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...r,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(r,a)=>(E(),M("div",{class:ut(["BaseContainer",{horizontal:t.isHorizontal}]),style:bt(n.value),"data-writer-container":""},[Ht(r.$slots,"default",{},void 0,!0)],6))}}),yi=ke(jL,[["__scopeId","data-v-4caa740e"]]),VL={class:"BaseCollapseIcon__icon material-symbols-outlined"},UL=Ce({__name:"BaseCollapseButton",props:zr({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=qr(e,"modelValue"),r=j(()=>{switch(t.direction){case"left-right":return"chevron_left";case"top-bottom":return"keyboard_arrow_up";case"right-left":return"chevron_right";case"bottom-top":return"keyboard_arrow_down";default:return"keyboard_arrow_up"}});return(a,o)=>(E(),De(Rn,{class:ut(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),variant:"tertiary",size:"icon",onClick:o[0]||(o[0]=s=>n.value=!n.value)},{default:Ze(()=>[L("i",VL,Te(r.value),1)]),_:1},8,["class"]))}}),Ff=ke(UL,[["__scopeId","data-v-e3ca49f7"]]),HL={key:0,class:"header"},zL={key:0,class:"titleContainer"},KL={key:0},WL={key:1,class:"collapsedTitle"},qL={class:"transformed"},GL={class:"content"},JL="A layout component that organizes its child components in columns. Must be inside a Column Container component.",YL={writer:{name:"Column",description:JL,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:W.Text},width:{name:"Width (factor)",default:"1",init:"1",type:W.Number,desc:"Relative size when compared to other columns in the same container. A column of width 2 will be double the width of one with width 1.",category:qe.Style,validator:Xn},isSticky:{...xt,name:"Sticky",default:"no",category:qe.Style},isCollapsible:M_,startCollapsed:{...Nf,desc:"Only applied when the column is collapsible."},separatorColor:cn,contentPadding:fs,contentHAlign:ds,contentVAlign:Of,cssClasses:at}}},XL=Ce({...YL,__name:"CoreColumn",setup(e){const t=te(re.instancePath),n=te(re.instanceData),r=te(re.core),a=te(re.componentId),o=te(re.evaluatedFields),s=j(()=>!!o.isCollapsible.value),i=$e(o.isCollapsible.value&&o.startCollapsed.value),l=j(()=>{let m;return i.value?m="0 0 32px":m=`${o.width.value} 0 0`,{flex:m}}),c=j(()=>{var m,_;return h.value>=((_=(m=d.value)==null?void 0:m.value)==null?void 0:_.minimumNonCollapsiblePosition)}),u=j(()=>c.value?"right-left":"left-right"),d=j(()=>{var m;for(let _=-1;_>-1*t.length;_--){const g=t.at(_);if(((m=r.getComponentById(g.componentId))==null?void 0:m.type)!=="columns")continue;return n.at(_)}return null}),h=j(()=>{var m;return(m=r.getComponentById(a))==null?void 0:m.position});return We([()=>o.isCollapsible.value,h],()=>{const m=d.value;m&&(m.value={minimumNonCollapsiblePosition:void 0})}),We(d,m=>{!m||!m.value||s.value||typeof m.value.minimumNonCollapsiblePosition<"u"&&h.value>=m.value.minimumNonCollapsiblePosition||(m.value.minimumNonCollapsiblePosition=h.value)},{immediate:!0,deep:!0}),(m,_)=>(E(),M("div",{class:ut(["CoreColumn",{sticky:P(o).isSticky.value,collapsible:s.value,collapsibleToRight:c.value,collapsed:i.value}]),style:bt(l.value)},[P(o).title.value||s.value?(E(),M("div",HL,[i.value?ge("",!0):(E(),M("div",zL,[P(o).title.value?(E(),M("h3",KL,Te(P(o).title.value),1)):ge("",!0)])),s.value?(E(),De(Ff,{key:1,modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=g=>i.value=g),class:"collapser",direction:u.value},null,8,["modelValue","direction"])):ge("",!0)])):ge("",!0),i.value&&P(o).title.value?(E(),M("div",WL,[L("div",qL,[L("div",GL,Te(P(o).title.value),1)])])):ge("",!0),Fe(yi,{class:"container","aria-expanded":s.value?i.value:null,"content-h-align":P(o).contentHAlign.value,"content-v-align":P(o).contentVAlign.value,"content-padding":P(o).contentPadding.value},{default:Ze(()=>[Ht(m.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),QL=ke(XL,[["__scopeId","data-v-9ec0335d"]]),ZL={class:"CoreColumns horizontal","data-writer-container":""},eD={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:at}}},tD=Ce({...eD,__name:"CoreColumns",setup(e){const t=te(re.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,r)=>(E(),M("div",ZL,[Ht(n.$slots,"default",{},void 0,!0)]))}}),nD=ke(tD,[["__scopeId","data-v-616070ed"]]),rD={class:"CoreHeader"},aD={class:"container horizontal","data-writer-container":""},oD="A container component that typically contains the main navigation elements.",sD={writer:{name:"Header",description:oD,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:W.Text},primaryTextColor:Qt,cssClasses:at},previewField:"text"}},iD=Ce({...sD,__name:"CoreHeader",setup(e){const t=te(re.evaluatedFields);return(n,r)=>(E(),M("div",rD,[L("h1",null,Te(P(t).text.value),1),L("div",aD,[Ht(n.$slots,"default",{},void 0,!0)])]))}}),lD=ke(iD,[["__scopeId","data-v-0dba4bfb"]]),cD="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",uD={writer:{name:"Horizontal Stack",description:cD,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...fs,default:"0"},contentHAlign:ds,contentVAlign:Of,cssClasses:at}}},dD=Ce({...uD,__name:"CoreHorizontalStack",setup(e){const t=te(re.evaluatedFields);return(n,r)=>(E(),De(yi,{class:"CoreHorizontalStack","content-h-align":P(t).contentHAlign.value,"content-v-align":P(t).contentVAlign.value,"content-padding":P(t).contentPadding.value,"is-horizontal":!0},{default:Ze(()=>[Ht(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),fD=ke(dD,[["__scopeId","data-v-a5e8d853"]]),pD="A container component that divides the layout into sections, with an optional title.",hD={writer:{name:"Section",description:pD,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:W.Text},isCollapsible:M_,startCollapsed:Nf,accentColor:vn,primaryTextColor:Qt,secondaryTextColor:hr,containerBackgroundColor:va,containerShadow:us,separatorColor:cn,buttonColor:Jr,buttonTextColor:Yr,buttonShadow:Wa,contentPadding:{...fs,default:"16px"},contentHAlign:ds,cssClasses:at},previewField:"title"}},mD=Ce({...hD,__name:"CoreSection",setup(e){const t=te(re.evaluatedFields),n=j(()=>t.isCollapsible.value),r=$e(n.value&&t.startCollapsed.value);return(a,o)=>(E(),M("section",{class:ut(["CoreSection",{"CoreSection--collapsible":n.value}])},[P(t).title.value||n.value?(E(),M("div",{key:0,class:ut(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&r.value}])},[L("h3",null,Te(P(t).title.value),1),n.value?(E(),De(Ff,{key:0,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),direction:"top-bottom"},null,8,["modelValue"])):ge("",!0)],2)):ge("",!0),r.value?ge("",!0):(E(),De(yi,{key:1,"content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value,"aria-expanded":n.value?r.value:null},{default:Ze(()=>[Ht(a.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),vD=ke(mD,[["__scopeId","data-v-8bef68a0"]]),gD="A visual component to create a separation between adjacent elements.",sb={writer:{name:"Separator",description:gD,category:"Layout",fields:{separatorColor:cn,cssClasses:at}}},Gm=e=>{e.writer&&(e.writer.docs=`_Separator_ components are used to separate layout elements. They can be used in most containers, including _Column Container_ to separate columns.

If the container flows horizontally (like a _Horizontal Stack_ or a _Column Container_) the _Separator_ will be a vertical line. Otherwise, it'll be a horizontal line.`)},yD={class:"CoreSeparator separator"};function _D(e,t,n,r,a,o){return E(),M("div",yD,t[0]||(t[0]=[L("div",{class:"line"},null,-1)]))}typeof Gm=="function"&&Gm(sb);const bD=ke(sb,[["render",_D],["__scopeId","data-v-5abd9423"]]),wD={class:"collapserContainer"},AD={class:"container","data-writer-container":""},CD="A container component that organizes its children in a sidebar. Its parent must be a Page component.",$D={writer:{name:"Sidebar",description:CD,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...Nf,desc:void 0},sidebarBackgroundColor:{name:"Background",type:W.Color,category:qe.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:vn,primaryTextColor:Qt,secondaryTextColor:hr,containerBackgroundColor:va,containerShadow:us,separatorColor:cn,buttonColor:Jr,buttonTextColor:Yr,buttonShadow:Wa,cssClasses:at}}},SD=Ce({...$D,__name:"CoreSidebar",setup(e){const t=te(re.evaluatedFields),n=$e(t.startCollapsed.value),r=te(re.core),a=te(re.builderManager),o=te(re.componentId),s=j(()=>a==null?void 0:a.firstSelectedId.value),i=$e(0),l=j(()=>({"max-height":`calc(100vh - ${i.value}px)`}));We(s,u=>{u&&c(u)&&(n.value=!1)});const c=u=>{const d=r.getComponentById(u);return!d||d.type=="root"?!1:d.parentId==o?!0:c(d.parentId)};return ln(()=>{const u=document.querySelector(".ComponentRenderer");i.value=document.body.clientHeight-(u==null?void 0:u.parentElement.clientHeight)}),(u,d)=>(E(),M("div",{class:ut(["CoreSidebar",{collapsed:n.value}]),style:bt(l.value)},[L("div",wD,[Fe(Ff,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h),direction:"left-right"},null,8,["modelValue"])]),L("div",AD,[Ht(u.$slots,"default",{},void 0,!0)])],6))}}),ID=ke(SD,[["__scopeId","data-v-99b92063"]]),ED={class:"CoreTab"},kD=0,Jm=1,TD="A container component that displays its child components as a tab inside a Tab Container.",xD={writer:{name:"Tab",description:TD,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:W.Text},contentPadding:{...fs,default:"16px"},contentHAlign:ds,cssClasses:at},previewField:"name"}},PD=Ce({...xD,__name:"CoreTab",setup(e){const t=te(re.evaluatedFields),n=te(re.instancePath),r=te(re.instanceData),a=te(re.core),o=te(re.builderManager),s=te(re.componentId),{isComponentVisible:i}=mc(a),l=j(()=>o==null?void 0:o.firstSelectedId.value),c=()=>{for(let p=-2;p>-1*n.length;p--){const b=n.at(p),{type:S}=a.getComponentById(b.componentId);if(S==="tabs")return p+1}},u=j(()=>{const p=c();return n.at(p)}),d=j(()=>u==null?void 0:u.value.instanceNumber),h=j(()=>d.value===kD),m=j(()=>d.value===Jm),_=j(()=>i(s)?h.value||m.value&&y.value:!1),g=()=>{for(let p=-1;p>-1*n.length;p--){const b=n.at(p),{type:S}=a.getComponentById(b.componentId);if(S==="tabs")return r.at(p)}},w=()=>{const p=c(),b=n.slice(0,p),S=p+1<0?n.slice(p+1):[];return[...b,{componentId:n.at(p).componentId,instanceNumber:Jm},...S]},A=()=>{const p=g();p.value={activeTab:w()}},C=p=>{const b=a.getComponentById(p);return!b||b.type=="root"?!1:b.parentId==s?!0:C(b.parentId)};We(l,p=>{p&&C(p)&&A()});const y=j(()=>{var R;let p;h.value?p=w():p=n;const S=(R=g().value)==null?void 0:R.activeTab;return JSON.stringify(S)==JSON.stringify(p)});return as(()=>{var S;if(h.value)return;const p=g();(S=p.value)!=null&&S.activeTab||i(s,n)&&(p.value={activeTab:n})}),(p,b)=>Dn((E(),M("div",ED,[h.value?(E(),M("button",{key:0,class:ut(["bit",{active:y.value}]),tabindex:"0",onClick:A},Te(P(t).name.value),3)):ge("",!0),m.value?Dn((E(),De(yi,{key:1,class:"container","content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value},{default:Ze(()=>[Ht(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[Tr,y.value]]):ge("",!0)],512)),[[Tr,_.value]])}}),MD=ke(PD,[["__scopeId","data-v-63c66105"]]),OD={class:"CoreTabs"},ND={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},RD={class:"container"},LD="A container component for organising and displaying Tab components in a tabbed interface.",DD={writer:{name:"Tab Container",description:LD,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:vn,primaryTextColor:Qt,secondaryTextColor:hr,containerBackgroundColor:va,containerShadow:us,separatorColor:cn,buttonColor:Jr,buttonTextColor:Yr,buttonShadow:Wa,cssClasses:at}}},BD=Ce({...DD,__name:"CoreTabs",setup(e){const t=te(re.instanceData);return t.at(-1).value={activeTab:void 0},(n,r)=>(E(),M("div",OD,[L("nav",ND,[Ht(n.$slots,"default",{instanceNumber:0},void 0,!0)]),L("div",RD,[Ht(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),FD=ke(BD,[["__scopeId","data-v-46e04ad4"]]),jD={class:"CoreStep"},VD=["disabled"],UD={class:"indicator"},HD={key:0,class:"material-symbols-outlined"},zD={class:"label"},Xi=0,yu=1,KD="A container component that displays its child components as a step inside a Step Container.",WD={writer:{name:"Step",description:KD,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:W.Text},contentPadding:{...fs,default:"16px"},isCompleted:{...xt,name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no"},contentHAlign:ds,cssClasses:at},previewField:"name"}},qD=Ce({...WD,__name:"CoreStep",setup(e){const t=te(re.evaluatedFields),n=te(re.instancePath),r=te(re.instanceData),a=te(re.isBeingEdited),o=te(re.core),s=te(re.builderManager),i=te(re.componentId),{isComponentVisible:l}=mc(o),c=j(()=>s==null?void 0:s.firstSelectedId.value),u=h();function d(){for(let p=-1;p>-1*n.length;p--){const b=n.at(p),S=o.getComponentById(b.componentId);if(!S)return;if(S.type==="steps")return p}}function h(){const p=d();if(!(typeof p>"u"))return r.at(p)}function m(){const p=d()+1,b=n.slice(0,p),S=p+1<0?n.slice(p+1):[];return[...b,{componentId:n.at(p).componentId,instanceNumber:yu},...S]}function _(){u.value={...u.value,activeStep:m()}}function g(){const p=u.value.steps.findIndex(R=>JSON.stringify(R.instancePath)==JSON.stringify(n));if(p==-1||p+1>u.value.steps.length)return;let S=u.value.steps.slice(p+1).find(R=>!R.isCompleted);S||(S=u.value.steps.at(-1)),u.value={...u.value,activeStep:S.instancePath}}function w(p){const b=o.getComponentById(p);return!b||b.type=="root"?!1:b.parentId==i?!0:w(b.parentId)}function A(){if(!t.isCompleted.value){_();return}g()}const C=j(()=>{const p=d()+1;return n.at(p)});We(c,p=>{p&&w(p)&&_()});const y=j(()=>{var S;let p;(C==null?void 0:C.value.instanceNumber)==Xi?p=m():p=n;const b=(S=u.value)==null?void 0:S.activeStep;return JSON.stringify(b)==JSON.stringify(p)});return We([y,t.isCompleted],()=>{a.value||y.value&&t.isCompleted.value&&g()}),We(t.isCompleted,(p,b)=>{b&&(p||A())}),as(()=>{var b;(C==null?void 0:C.value.instanceNumber)==Xi||(typeof u.value.steps.find(S=>S.instancePath==n)>"u"&&u.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(b=u.value)==null?void 0:b.activeStep)||l(i,n)&&A()}),ha(()=>{const p=u.value.steps.findIndex(b=>JSON.stringify(b.instancePath)==JSON.stringify(n));u.value.steps.splice(p,1)}),(p,b)=>{var S,R,K,G;return Dn((E(),M("div",jD,[((S=C.value)==null?void 0:S.instanceNumber)==Xi?(E(),M("button",{key:0,class:ut(["bit",{active:y.value,completed:P(t).isCompleted.value}]),disabled:!P(a),stepindex:"0",onClick:_},[L("div",UD,[b[0]||(b[0]=L("div",{class:"linker left"},null,-1)),L("div",{class:ut(["status",{completed:P(t).isCompleted.value}])},[P(t).isCompleted.value?(E(),M("i",HD," done ")):ge("",!0)],2),b[1]||(b[1]=L("div",{class:"linker right"},null,-1))]),L("div",zD,Te(P(t).name.value),1)],10,VD)):ge("",!0),((R=C.value)==null?void 0:R.instanceNumber)==yu?Dn((E(),De(yi,{key:1,class:"container","content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value},{default:Ze(()=>[Ht(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[Tr,y.value]]):ge("",!0)],512)),[[Tr,((K=C.value)==null?void 0:K.instanceNumber)==Xi||((G=C.value)==null?void 0:G.instanceNumber)==yu&&y.value]])}}}),GD=ke(qD,[["__scopeId","data-v-ee7ef213"]]),JD={class:"CoreSteps"},YD={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},XD={class:"container"},QD="A container component for displaying Step components, allowing you to implement a stepped blueprint.",ZD={writer:{name:"Step Container",description:QD,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:vn,primaryTextColor:Qt,secondaryTextColor:hr,containerBackgroundColor:va,containerShadow:us,separatorColor:cn,buttonColor:Jr,buttonTextColor:Yr,buttonShadow:Wa,cssClasses:at}}},e5=Ce({...ZD,__name:"CoreSteps",setup(e){const t=te(re.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(r,a)=>(E(),M("div",JD,[L("nav",YD,[Ht(r.$slots,"default",{instanceNumber:0},void 0,!0)]),L("div",XD,[Ht(r.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),t5=ke(e5,[["__scopeId","data-v-3eb221bc"]]),n5={key:0,class:"material-symbols-outlined"},r5={class:"CoreButton__text"},a5=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,o5="A standalone button component that can be linked to a click event handler.",s5={writer:{name:"Button",description:o5,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:a5.trim()}},fields:{text:{name:"Text",init:"Button Text",type:W.Text},isDisabled:{...xt,name:"Disabled",default:"no",desc:"Disables all event handlers."},buttonColor:Jr,buttonTextColor:Yr,icon:{name:"Icon",type:W.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:qe.Style},buttonShadow:Wa,separatorColor:cn,cssClasses:at},previewField:"text"}},ib=Ce({...s5,__name:"CoreButton",setup(e){const t=$e(null),n=te(re.evaluatedFields),r=te(re.isDisabled),a=te(re.isBeingEdited);We(n.isDisabled,s=>{r.value=s},{immediate:!0});function o(s){if(!t.value)return;const i=gi(s);t.value.$el.dispatchEvent(i)}return(s,i)=>(E(),De(Rn,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":P(r),disabled:!P(a)&&P(r),onClick:o},{default:Ze(()=>[P(n).icon.value?(E(),M("i",n5,Te(P(n).icon.value),1)):ge("",!0),L("span",r5,Te(P(n).text.value),1)]),_:1},8,["aria-disabled","disabled"]))}}),Ym=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Button_.")};typeof Ym=="function"&&Ym(ib);const i5=ke(ib,[["__scopeId","data-v-57cc9b75"]]),l5={padding:"16px","min-height":"64px","min-width":"64px","border-radius":"8px",background:"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)"},c5="A generic component that creates customisable HTML elements, which can serve as containers for other components.",lb={writer:{name:"HTML Element",description:c5,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:W.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:"{}",init:JSON.stringify(l5,null,2),type:W.Object,desc:"Define the CSS styles to apply to the HTML element using a JSON object or a state reference to a dictionary.",validator:Ha},attrs:{name:"Attributes",default:"{}",type:W.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference.",validator:Ha},htmlInside:{name:"HTML inside",default:null,type:W.Text,control:nc.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:at}},setup(e,{slots:t}){const n=te(re.evaluatedFields),r=/^[a-zA-Z][a-zA-Z0-9-_:.]*$/,a=j(()=>{if(typeof n.attrs.value!="object"||n.attrs.value===null)return{};const o=Object.entries(n.attrs.value).filter(([s])=>r.test(s));return Object.fromEntries(o)});return()=>{let o;return n.htmlInside.value&&(o=ja("div",{innerHTML:n.htmlInside.value})),ja(n.element.value,{...a.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),o])}}},Xm=e=>{e.writer&&(e.writer.docs=`You can configure the element type, styles, and attributes to fit your design requirements. You can link them to state for advanced use cases, such as custom animations.

All valid HTML tags are supported, including tags such as \`iframe\`, allowing you to embed external sites.

Take into account the potential risks of adding custom HTML to your app, including XSS. Be specially careful when injecting user-generated data.`)};typeof Xm=="function"&&Xm(lb);const u5={class:"pagination-left"},d5={class:"pagination-pagesize"},f5=["value","selected"],p5={class:"pagination-description"},h5={class:"bold"},m5={class:"bold"},v5={class:"bold"},g5={class:"pagination-right"},y5={class:"pagination-picker"},_5={key:0,class:"paginationpicker-block paginationpicker-neutral"},b5=["onClick"],w5={key:2,class:"paginationpicker-block paginationpicker-currentpage"},A5={class:"pagination-jump"},C5=["value"],$5=`
def handle_page_change(state, payload):
    page = payload
    state["page"] = page

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,S5=`
def handle_page_size_change(state, payload):
    state['pageSize'] = payload

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,I5={writer:{name:"Pagination",category:"Other",description:"A component that can help you paginate records, for example from a Repeater or a DataFrame.",fields:{page:{name:"Page",init:"1",default:"1",type:W.Number,desc:"The current page number.",validator:Xn},pageSize:{name:"Page Size",default:"10",type:W.Number,desc:"The number of items per page.",validator:Xn},totalItems:{name:"Total Items",default:"10",type:W.Number,desc:"The total number of items",validator:Xn},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:W.Text,desc:"A comma-separated list of page size options. If it's empty, the user can't change the page size. Set your default page size as the first option."},pageSizeShowAll:{...xt,name:"Show All Option",default:"no",desc:"Show an option to show all records."},jumpTo:{...xt,name:"Jump To",default:"no",desc:"Show an option to jump to a specific page."}},events:{"wf-change-page":{desc:"Fires when the user pick a page",stub:$5.trim(),eventPayloadExample:2},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:S5.trim(),eventPayloadExample:10}}}},E5=Ce({...I5,__name:"CorePagination",setup(e){const t=te(re.evaluatedFields),n=te(re.core),r=it("rootEl"),a=te(re.instancePath),{handleInput:o}=An(n,a,r),{handleInput:s}=An(n,a,r),i=j(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value),l=j(()=>t.jumpTo.value),c=j(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),u=j(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),d=j(()=>t.totalItems.value),h=j(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),m=j(()=>{let p=[];const b=t.pageSizeOptions.value.split(",");for(const S in b){const R=parseInt(b[S],10);p.push({value:R,label:`${R} items`})}return t.pageSizeShowAll.value&&p.push({value:d.value,label:"All items"}),p}),_=j(()=>{const p=[],b=parseInt(t.page.value);if(h.value<=7)for(let S=0;S<h.value;S++)p.push(S+1);else b==1||b==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):b==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(h.value-1),p.push(h.value)):b==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(h.value)):b==h.value||b==h.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):b==h.value-2?(p.push(1),p.push(2),p.push("..."),p.push(h.value-3),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):(p.push(1),p.push("..."),p.push(b-1),p.push(b),p.push(b+1),p.push("..."),p.push(h.value));return p}),g=j(()=>parseInt(t.page.value)-1<1),w=j(()=>parseInt(t.page.value)+1>h.value),A=p=>{if(p.target.value==="")return;let b=parseInt(p.target.value);b>h.value&&(b=h.value),o(b,"wf-change-page")},C=p=>{o(p,"wf-change-page")},y=p=>{let b=parseInt(p.target.value);s(b,"wf-change-page-size")};return(p,b)=>(E(),M("div",{ref_key:"rootEl",ref:r,class:"CorePagination"},[L("div",u5,[Dn(L("div",d5,[L("select",{class:"pagesize-select",onChange:y},[(E(!0),M(Ye,null,Pt(m.value,(S,R)=>(E(),M("option",{key:R,value:S.value,selected:S.value==P(t).pageSize.value},Te(S.label),9,f5))),128))],32)],512),[[Tr,i.value]]),L("div",p5,[b[2]||(b[2]=tn(" Showing ")),L("span",h5,Te(c.value),1),b[3]||(b[3]=tn(" to ")),L("span",m5,Te(u.value),1),b[4]||(b[4]=tn(" of ")),L("span",v5,Te(d.value),1),b[5]||(b[5]=tn(" results "))])]),L("div",g5,[L("div",y5,[L("div",{class:ut(["paginationpicker-block",{"paginationpicker-disabled":g.value}]),onClick:b[0]||(b[0]=S=>C(P(t).page.value-1))},b[6]||(b[6]=[L("i",{class:"material-symbols-outlined"}," navigate_before ",-1)]),2),(E(!0),M(Ye,null,Pt(_.value,(S,R)=>(E(),M(Ye,{key:R},[S=="..."?(E(),M("div",_5,Te(S),1)):ge("",!0),S!="..."&&S!=P(t).page.value?(E(),M("div",{key:1,class:"paginationpicker-block",onClick:K=>C(S)},Te(S),9,b5)):ge("",!0),S==P(t).page.value?(E(),M("div",w5,Te(S),1)):ge("",!0)],64))),128)),L("div",{class:ut(["paginationpicker-block",{"paginationpicker-disabled":w.value}]),onClick:b[1]||(b[1]=S=>C(P(t).page.value+1))},b[7]||(b[7]=[L("i",{class:"material-symbols-outlined"}," navigate_next ",-1)]),2)]),Dn(L("div",A5,[b[8]||(b[8]=L("label",null,"Jump to",-1)),L("input",{type:"text",value:P(t).page.value,onInput:A},null,40,C5)],512),[[Tr,l.value]])])],512))}}),k5=ke(E5,[["__scopeId","data-v-2c0a56bd"]]),T5="A container component that repeats its child components based on a dictionary.",x5={a:{desc:"Option A"},b:{desc:"Option B"}},P5={writer:{name:"Repeater",description:T5,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(x5,null,2),type:W.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object.",validator:V2},keyVariable:{name:"Key variable name",default:"itemId",init:"itemId",type:W.Text,desc:"Set the name of the variable that will store the key of the current repeater object entry."},valueVariable:{name:"Value variable name",default:"item",init:"item",type:W.Text,desc:"Set the name of the variable that will store the value of the current repeater object entry."}}},setup(e,{slots:t}){const n=te(re.core),r=te(re.componentId),a=te(re.evaluatedFields),o=te(re.isBeingEdited),s=te(re.renderProxiedComponent),i=j(()=>n.getComponents(r,{sortedByPosition:!0})),l=()=>typeof a.repeaterObject.value!="object"?[]:Object.values(a.repeaterObject.value).map((u,d)=>i.value.map(h=>s(h.id,d)));return()=>{let c={};return i.value.length!=0&&a.repeaterObject.value!=null&&Object.keys(a.repeaterObject.value).length!=0?c=l():o.value===!0?c=t.default({}):c={},ja("div",{class:"CoreRepeater","data-writer-container":""},c)}}},M5=ke(P5,[["__scopeId","data-v-0b783e59"]]),O5="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",N5=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),R5={writer:{name:"Timer",description:O5,category:"Other",fields:{intervalMs:{name:"Interval (ms)",desc:"How much time to wait between ticks. A tick is considered finished when its event is handled.",default:"200",type:W.Number,validator:Xn},isActive:{...xt,name:"Active",default:"yes",desc:"Whether the timer should trigger tick events."},accentColor:vn,cssClasses:at},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:N5.trim()}}}},L5=Ce({...R5,__name:"CoreTimer",setup(e){const r=te(re.evaluatedFields),a=te(re.core),o=it("rootEl"),s=j(()=>r.intervalMs.value),i=j(()=>r.isActive.value),l=$e(!1),c=te(re.componentId),u=j(()=>{var w,A;return!!((A=(w=a.getComponentById(c))==null?void 0:w.handlers)!=null&&A["wf-tick"])}),d=j(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));We([i,s],()=>{g()}),We(u,async w=>{w&&(await ar(),g())});let h=0,m=null;function _(){clearTimeout(m)}function g(){if(_(),!i.value||s.value<0||!o.value)return;Date.now()-h>=500&&(o.value.classList.remove("tick"),o.value.offsetWidth,h=Date.now(),o.value.classList.add("tick"));const w=({ok:C})=>{l.value=!C,m=setTimeout(()=>{g()},s.value)},A=new CustomEvent("wf-tick",{detail:{callback:w}});o.value.dispatchEvent(A)}return ln(()=>{g()}),(w,A)=>(E(),M("div",{ref_key:"rootEl",ref:o,class:ut(["CoreTimer",{failing:l.value}]),style:bt(d.value)},null,6))}}),D5=ke(L5,[["__scopeId","data-v-8e3b3227"]]),B5={class:"main"},F5={class:"actions"},j5=["value"],V5="A user input component that allows users to capture images using their webcam.",U5=`
def webcam_handler(payload):

	# This handler will save the captured images based on timestamp

	import time
	timestamp = time.time()

	# The payload is a file-like object which contains the captured image
	# in PNG format

	image_file = payload
	with open(f"capture-{timestamp}.png", "wb") as file_handle:
		file_handle.write(image_file)`.trim(),H5={writer:{name:"Webcam Capture",description:V5,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:W.Number,validator:Xn},buttonColor:Jr,buttonTextColor:Yr,buttonShadow:Wa,separatorColor:cn,cssClasses:at},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:U5.trim(),eventPayloadExample:"data:image/png;base64,azerty"}}}},z5=Ce({...H5,__name:"CoreWebcamCapture",setup(e){const t=$e(!1),n=it("rootEl"),r=document.createElement("canvas"),a=it("videoEl"),o=te(re.evaluatedFields),s=$e(null),i=$e(null),l=wn();ln(async()=>{var w,A;s.value=await c(),i.value=(A=(w=s.value)==null?void 0:w[0])==null?void 0:A.deviceId}),ha(()=>{g()});const c=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(C=>C.kind=="videoinput"),u=j(()=>o.refreshRate.value);We(u,(w,A)=>{w>0&&A<=0&&m()}),We(i,async()=>{t.value&&(g(),await _())});const d=async()=>{if(t.value=!t.value,!t.value){g();return}await _(),m()},h=()=>(r.getContext("2d").drawImage(a.value,0,0),r.toDataURL("image/png")),m=()=>{const w=new CustomEvent("wf-webcam",{detail:{payload:h(),callback:()=>{u.value<=0||!t.value||setTimeout(()=>{m()},u.value)}}});n.value.dispatchEvent(w)},_=async()=>(a.value.style.display="",new Promise((w,A)=>{navigator.mediaDevices.getUserMedia||(l.error("This browser doesn't support webcam connection."),A());const C={video:!0};s.value.length>1&&(C.video={deviceId:i.value}),navigator.mediaDevices.getUserMedia(C).then(y=>{a.value.srcObject=y;const p=y.getVideoTracks()[0].getSettings().width,b=y.getVideoTracks()[0].getSettings().height;r.setAttribute("width",p.toString()),r.setAttribute("height",b.toString()),w()}).catch(y=>{l.error("An error occurred when trying to use the webcam.",y),A()})})),g=()=>{const w=a.value.srcObject;w&&w.getTracks().map(C=>C.stop()),a.value.srcObject=null,a.value.style.display="none"};return(w,A)=>{var C;return E(),M("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[Dn(L("div",B5,[L("video",{ref_key:"videoEl",ref:a,autoplay:"true"},null,512)],512),[[Tr,t.value]]),L("div",F5,[u.value==0?(E(),De(Rn,{key:0,onClick:m},{default:Ze(()=>A[1]||(A[1]=[tn(" Capture image ")])),_:1})):ge("",!0),Fe(Rn,{onClick:d},{default:Ze(()=>[tn(Te(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),((C=s.value)==null?void 0:C.length)>1?(E(),De(tb,{key:1,modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=y=>i.value=y)},{default:Ze(()=>[(E(!0),M(Ye,null,Pt(s.value,(y,p)=>(E(),M("option",{key:y.deviceId,value:y.deviceId},Te(y.label||`Webcam ${p+1}`),9,j5))),128))]),_:1},8,["modelValue"])):ge("",!0)])],512)}}}),K5=ke(z5,[["__scopeId","data-v-bf784564"]]),W5={writer:{name:"Reuse Component",slot:"*",description:"Those components are used to reuse other components. Reused components share the same state and are updated together.",category:"Other",allowedChildrenTypes:[],fields:{proxyId:{name:"Component id",type:W.Text,desc:"The id of the component to reuse."}}}},q5=Ce({...W5,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=te(re.evaluatedFields),a=te(re.instancePath).at(-2).componentId,o=te(re.core),s=te(re.renderProxiedComponent),i=te(re.isBeingEdited),l=te(re.componentId),c=$e(ja("div","")),u=$e(!0),d=j(()=>{var g;return(g=o.getComponentById(n.proxyId.value))==null?void 0:g.type}),h=j(()=>d.value?o.getComponentDefinition(d.value):null);function m(g,w){u.value=t.contextSlot==="default",c.value=ja("div",{class:["CoreReuse",w],style:{color:"var(--primaryTextColor)"}},i.value?g:"")}function _(){if(!n.proxyId.value)return m("No component selected to reuse","empty");if(l===n.proxyId.value||!h.value)return m("The id specified for reuse doesn't match any component.","invalid-value");if(!o.getContainableTypes(a).includes(d.value))return m("The component cannot be reused here.","invalid-context");u.value=t.contextSlot===(h.value.slot??"default");const g=s(n.proxyId.value,0,{class:["CoreReuse"]});c.value=g}return We([n.proxyId,h],_,{immediate:!0}),(g,w)=>u.value?(E(),De(os(c.value),{key:0})):ge("",!0)}}),G5={key:0,class:"controls"},J5={key:2},Y5=["page"],X5="A component to embed PDF documents.",Q5={writer:{name:"PDF",description:X5,category:"Embed",fields:{source:{name:"PDF source",type:W.Text,desc:"A valid URL. Alternatively, you can provide a state reference to a packed PDF file."},highlights:{name:"Highlights",default:JSON.stringify([]),desc:"A list of highlights to be applied to the PDF as a JSON array of strings.",type:W.Object,validator:k_},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:W.Number},page:{name:"Page",type:W.Number,desc:"The page to be displayed."},controls:{...xt,name:"Controls",desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:va,separatorColor:cn,primaryTextColor:Qt,cssClasses:at}}},Z5=Ce({...Q5,__name:"CorePDF",setup(e){const t=te(re.evaluatedFields);let n,r,a;const o=j(()=>t.highlights.value?t.highlights.value.map(Ae=>Ae.replaceAll("|","\\|")).join("|"):""),s=$e({completeWords:!1,ignoreCase:!0}),i=$e(1),l=$e(1),c=$e([]),u=$e(0),d=it("rootEl"),h=it("viewerEl"),m=$e(!1),_=$e(0),g=$e([]);ln(async()=>{const Ae=await en(()=>import("./index-CuAB2mHu.js"),[],import.meta.url);a=Ae.VuePDF;const we=Ae.usePDF;({pdf:n,pages:r}=we(t.source)),w()});const w=()=>{m.value=!0,_.value=0,g.value=[],c.value=[]},A=Ae=>{g.value=[...g.value,Ae].sort((we,Ge)=>we.page-Ge.page)},C=Ae=>{_.value++},y=()=>{c.value=g.value.reduce((Ae,we)=>[...Ae,...we.matches.map((Ge,xe)=>({page:we.page,str:Ge.str,index:xe}))],[]).sort((Ae,we)=>Ae.page===we.page?Ae.index-we.index:Ae.page-we.page)},p=()=>{y(),u.value&&R(u.value),t.selectedMatch.value&&(u.value=t.selectedMatch.value)},b=Ae=>{const we=Ae.target.getBoundingClientRect(),Ge=[...Ae.target.children].filter(xe=>xe.className.includes("page")).find(xe=>{const ye=xe.getBoundingClientRect(),_e=ye.y-we.y;return _e<we.height/2&&_e+ye.height>we.height/2});Ge&&(l.value=Number(Ge.getAttribute("page")))},S=(Ae,we)=>{let Ge=0,xe=Ae;for(;xe&&xe!==we;)Ge+=xe.offsetTop,xe=xe.offsetParent;return Ge},R=Ae=>{if(Ae<1||Ae>c.value.length)return;const we=c.value[Ae-1];if(!we)return;const xe=d.value.querySelectorAll(`div[page='${we.page}'] span.highlight`)[we.index];h.value.scrollTop=S(xe,h.value)},K=Ae=>{if(Ae<1||Ae>r.value)return;const we=d.value.querySelector("div[page='"+Ae+"']");h.value.scrollTop=S(we,h.value)},G=()=>{u.value<c.value.length?u.value=u.value+1:u.value=1},Z=()=>{u.value>1?u.value=u.value-1:u.value=c.value.length},Ie=()=>{i.value=i.value<2?i.value+.1:i.value},de=()=>{i.value=i.value>.25?i.value-.1:i.value};return We(_,()=>{_.value===r.value&&t.page.value&&K(t.page.value)}),We([g,_],()=>{(!o.value||g.value.length===r.value)&&_.value===r.value&&(p(),m.value=!1)}),We(i,()=>{w()}),We(t.source,()=>{w()}),We(t.highlights,()=>{g.value=[],c.value=[]}),We(u,()=>{R(u.value)}),We(t.selectedMatch,()=>{u.value=t.selectedMatch.value}),We(t.page,()=>{K(t.page.value)}),(Ae,we)=>(E(),M("div",{ref_key:"rootEl",ref:d,class:"CorePDF"},[P(t).controls.value?(E(),M("div",G5,[Fe(Cr,{onClick:we[0]||(we[0]=()=>K(l.value-1))},{default:Ze(()=>we[3]||(we[3]=[L("i",{class:"material-symbols-outlined"},"arrow_upward",-1)])),_:1}),Fe(Cr,{onClick:we[1]||(we[1]=()=>K(l.value+1))},{default:Ze(()=>we[4]||(we[4]=[L("i",{class:"material-symbols-outlined"},"arrow_downward",-1)])),_:1}),(E(),M("span",{key:l.value},Te(l.value)+" / "+Te(P(r)),1)),Fe(Cr,{disabled:m.value,onClick:Ie},{default:Ze(()=>we[5]||(we[5]=[L("i",{class:"material-symbols-outlined"},"zoom_in",-1)])),_:1},8,["disabled"]),Fe(Cr,{disabled:m.value,onClick:de},{default:Ze(()=>we[6]||(we[6]=[L("i",{class:"material-symbols-outlined"},"zoom_out",-1)])),_:1},8,["disabled"]),L("span",null,Te(Math.round(i.value*100))+"%",1),we[9]||(we[9]=L("span",{class:"separator"},null,-1)),c.value.length?(E(),De(Cr,{key:0,onClick:Z},{default:Ze(()=>we[7]||(we[7]=[L("i",{class:"material-symbols-outlined"},"navigate_before",-1)])),_:1})):ge("",!0),c.value.length?(E(),De(Cr,{key:1,onClick:G},{default:Ze(()=>we[8]||(we[8]=[L("i",{class:"material-symbols-outlined"},"navigate_next",-1)])),_:1})):ge("",!0),c.value.length?(E(),M("span",J5,"Matches "+Te(u.value)+" / "+Te(c.value.length),1)):ge("",!0)])):ge("",!0),L("div",{ref_key:"viewerEl",ref:h,class:"viewer",onScroll:b},[(E(!0),M(Ye,null,Pt(P(r),Ge=>(E(),M("div",{key:Ge,page:Ge,class:"page"},[Fe(P(a),{scale:i.value,pdf:P(n),page:Ge,"text-layer":"","highlight-text":o.value,"highlight-options":s.value,onHighlight:we[2]||(we[2]=xe=>A(xe)),onLoaded:C},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,Y5))),128))],544),we[10]||(we[10]=L("div",{class:"mask"},null,-1))],512))}}),e3=ke(Z5,[["__scopeId","data-v-aeb4c8ed"]]),t3={key:0,class:"noURLProvided"},n3=["src"],r3="A component to embed an external resource in an iframe.",a3=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,o3={writer:{name:"IFrame",description:r3,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:W.Text,validator:x_},separatorColor:cn,cssClasses:at},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:a3.trim()}}}},s3=Ce({...o3,__name:"CoreIFrame",setup(e){const t=it("rootEl"),n=te(re.evaluatedFields);function r(){const a=new CustomEvent("wf-load");t.value.dispatchEvent(a)}return(a,o)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[P(n).src.value?(E(),M("iframe",{key:1,src:P(n).src.value,draggable:"false",onLoad:r},null,40,n3)):(E(),M("div",t3,o[0]||(o[0]=[L("h2",null,"No URL provided.",-1)]))),o[1]||(o[1]=L("div",{class:"mask"},null,-1))],512))}}),i3=ke(s3,[["__scopeId","data-v-a3a63f75"]]),l3={key:0,class:"noAPIKeyProvided"},c3="A component to embed a Google Map. It can be used to display a map with markers.",u3=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],d3={writer:{name:"Google Maps",description:c3,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:W.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:W.Text},mapType:{name:"Map type",type:W.Text,default:"roadmap",options:{roadmap:"Roadmap",satellite:"Satellite",hybrid:"Hybrid",terrain:"Terrain"},desc:"One of 'roadmap', 'satellite', 'hybrid' or 'terrain'."},zoom:{name:"Zoom",default:"8",type:W.Number},lat:{name:"Latitude",default:"37.79322359164316",type:W.Number,validator:Pf},lng:{name:"Longitude",default:"-122.39999318828129",type:W.Number,validator:Mf},markers:{name:"Markers",default:JSON.stringify(u3),desc:"Markers data",type:W.Object,validator:T_},cssClasses:at},events:{"gmap-marker-click":{desc:"Capture single clicks on markers.",eventPayloadExample:[{lat:1,lng:1,name:"Marker"}]},"gmap-click":{desc:"Capture single click on map.",eventPayloadExample:{lat:1,lng:1}}}}},f3=Ce({...d3,__name:"CoreGoogleMaps",setup(e){const t=it("rootEl"),n=it("mapEl"),r=te(re.evaluatedFields);let a=null,o=[];const s=j(()=>({lat:r.lat.value,lng:r.lng.value})),i=j(()=>["roadmap","satellite","hybrid","terrain"].includes(r.mapType.value)?r.mapType.value:"roadmap"),l=async()=>{u();const{Loader:d}=await en(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new d({apiKey:r.apiKey.value,version:"weekly"}).load(),a=new google.maps.Map(n.value,{center:s.value,mapTypeId:i.value,zoom:8,mapId:r.mapId.value}),a.addListener("click",m=>{const _=new CustomEvent("gmap-click",{detail:{payload:m.latLng.toJSON()}});t.value.dispatchEvent(_)}),c()},c=async()=>{if(!r.mapId.value||!r.markers.value)return;const{AdvancedMarkerElement:d}=await google.maps.importLibrary("marker");u(),r.markers.value.forEach(m=>{const _=new d({position:{lat:m.lat,lng:m.lng},map:a,title:m.name});o.push(_),_.addListener("click",()=>{const g=new CustomEvent("gmap-marker-click",{detail:{payload:m}});t.value.dispatchEvent(g)})})},u=()=>{o.forEach(d=>d.setMap(null)),o=[]};return ln(async()=>{r.apiKey.value&&await l()}),We(s,async d=>{a&&a.setCenter(d)}),We(r.zoom,async d=>{a&&a.setZoom(d)}),We(i,async d=>{a&&a.setMapTypeId(d)}),We(r.markers,c),We(r.apiKey,l),We(r.mapId,l),(d,h)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[P(r).apiKey.value?(E(),M("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(E(),M("div",l3,h[0]||(h[0]=[L("h2",null,"Google Maps cannot be initialised.",-1),L("h3",null,"An API key hasn't been provided.",-1)]))),h[1]||(h[1]=L("div",{class:"mask"},null,-1))],512))}}),p3=ke(f3,[["__scopeId","data-v-249b3ca8"]]),h3={class:"sidebarContainer"},m3=`
def handle_keydown(state, payload):
	# The payload is a dictionary containing the key code and modifier keys.
	# For example,
	# {
	#	"key": "ArrowDown",
	#	"ctrl_key": False,
	#	"shift_key": False,
	#	"meta_key": False
	# }

	key_activated = payload.get("key")
	delta = 0
	if key_activated == "ArrowLeft":
		delta += -10
	elif key_activated == "ArrowRight":
		delta += 10

	shift_key = payload.get("shift_key")
	if shift_key:
		delta *= 2 # Shift makes it go faster

	state["position"] += delta
`,v3=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,g3="A container component representing a single page within the application.",y3={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:m3},"wf-page-open":{desc:"Emitted when the page is opened.",stub:v3}},description:g3,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:W.IdKey},pageMode:{name:"Page mode",default:"compact",type:W.Text,options:{compact:"Compact",wide:"Wide"},category:qe.Style},accentColor:vn,primaryTextColor:Qt,secondaryTextColor:hr,emptinessColor:P_,containerBackgroundColor:va,containerShadow:us,separatorColor:cn,buttonColor:Jr,buttonTextColor:Yr,buttonShadow:Wa,cssClasses:at},previewField:"key"}},_3=Ce({...y3,__name:"CorePage",setup(e){const t=it("rootEl"),n=te(re.evaluatedFields);function r(o){const s=RP(o),i=o.target;t.value.contains(i)&&t.value.dispatchEvent(s)}function a(){const o=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:o}});t.value.dispatchEvent(s)}return ln(async()=>{document.addEventListener("keydown",r),a()}),Or(()=>{document.removeEventListener("keydown",r)}),(o,s)=>(E(),M("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[L("div",h3,[Ht(o.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),L("div",{class:ut(["main",{compact:P(n).pageMode.value=="compact",wide:P(n).pageMode.value=="wide"}]),"data-writer-container":""},[Ht(o.$slots,"default",{},void 0,!0)],2)],512))}}),b3=ke(_3,[["__scopeId","data-v-52076071"]]),w3=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function jf(e=document.location.hash){var o;const n=(o=e.substring(1).match(w3))==null?void 0:o.groups,r=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:r,routeVars:new Map};const a=new URLSearchParams(n.routeVars);return{pageKey:r,routeVars:new Map(a.entries())}}function A3(){const e=jf(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function C3(e){const{pageKey:t,routeVars:n}=e;let r="";if(t&&(r+=`${encodeURIComponent(t)}`),n.size>0){const a=new URLSearchParams([...n.entries()]);r+=`/${a.toString()}`}return r}function cb(e){document.location.hash=C3(e)}function $3(e){const t=jf();t.pageKey=e,cb(t)}function Y4(e){const t=jf(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),cb(t)}const S3=`
def handle_hashchange(state, payload):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#main/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#	  "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")

	if not route_vars:
		return

	if route_vars.get("animal") == "duck":
		state["message"] = "You've navigated to the Duck zone."
	else:
		state["message"] = "You're not in the Duck zone.`.trim(),I3=`
def handle_app_open(state):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#   "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")
`.trim(),E3="The root component of the application, which serves as the starting point of the component hierarchy.",k3={writer:{name:"Root",category:"Root",description:E3,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:W.Text,desc:"The app name will be shown in the browser's title bar."},cssClasses:at,buttonColor:Jr,buttonShadow:Wa,accentColor:vn,contentPadding:fs,primaryTextColor:Qt,buttonTextColor:Yr,emptinessColor:P_,containerShadow:us,secondaryTextColor:hr,separatorColor:cn,contentVAlign:Of,contentHAlign:ds,contentWidth:K2},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:I3},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:S3}}}},T3=Ce({...k3,__name:"CoreRoot",setup(e){const t=te(re.core),n=te(re.builderManager),r=te(re.getChildrenVNodes),a=it("rootEl"),{isComponentVisible:o}=mc(t),s=j(()=>{const l=t.activePageId.value;if(!!t.getComponentById(l)&&t.isChildOf("root",l))return l;const u=t.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(u.length==0)return null;const d=u.filter(h=>o(h.id));return d.length==0?null:d[0].id});function i(){var u;const l=A3(),c=new CustomEvent("wf-hashchange",{detail:{payload:l}});(u=a.value)==null||u.dispatchEvent(c),l.pageKey&&t.setActivePageFromKey(l.pageKey)}return We(s,l=>{var d;const u=(d=t.getComponentById(l).content)==null?void 0:d.key;n&&!n.isComponentIdSelected(l)&&n.setSelection(null),ar().then(()=>{var h,m;window.scrollTo(0,0),(m=(h=document.querySelector(".ComponentRenderer"))==null?void 0:h.parentElement)==null||m.scrollTo(0,0)}),$3(u)}),as(()=>{window.addEventListener("hashchange",()=>{i()}),i()}),(l,c)=>(E(),M("div",{ref_key:"rootEl",ref:a,class:"CoreRoot","data-writer-container":""},[(E(!0),M(Ye,null,Pt(P(r)(),u=>(E(),M(Ye,{key:u.key},[u.key===`${s.value}:0`?(E(),De(os(u),{key:0})):ge("",!0)],64))),128))],512))}}),x3=ke(T3,[["__scopeId","data-v-89d3e95c"]]),P3={key:0,class:"noAccessTokenProvided"},M3=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],O3={writer:{name:"Mapbox",description:"A component to embed a Mapbox map. It can be used to display a map with markers.",docs:"For this component you need Mapbox access token: https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",category:"Embed",fields:{accessToken:{name:"Access Token",default:"",desc:"Access token from Mapbox",type:W.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:W.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:W.Number},lat:{name:"Latitude",default:"37.79322359164316",type:W.Number,validator:Pf},lng:{name:"Longitude",default:"-122.39999318828129",type:W.Number,validator:Mf},markers:{name:"Markers",init:JSON.stringify(M3,null,2),desc:"",type:W.Object,validator:T_},controls:{...xt,name:"Controls visible",default:"yes",desc:"Show map controls"},cssClasses:at},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers.",eventPayloadExample:[{lat:1,lng:1,name:"Marker"}]},"mapbox-click":{desc:"Capture single click on map.",eventPayloadExample:{lat:1,lng:1}}}}},N3=Ce({...O3,__name:"CoreMapbox",setup(e){const t=te(re.evaluatedFields),n=it("rootEl"),r=it("mapEl"),a=j(()=>[t.lng.value,t.lat.value]),o=$e(null);let s=[],i=null;const l=async()=>{if(!r.value||!t.accessToken.value)return;const u=await en(()=>import("./mapbox-gl-Dy-8hWlY.js").then(d=>d.m),[],import.meta.url);try{u.accessToken=t.accessToken.value,u.default&&(u.default.accessToken=t.accessToken.value),o.value=new u.Map({container:r.value,style:t.mapStyle.value,center:a.value,zoom:t.zoom.value}),o.value.on("click",d=>{const h=new CustomEvent("mapbox-click",{detail:{payload:{lat:d.lngLat.lat,lng:d.lngLat.lng}}});n.value.dispatchEvent(h)}),i=new u.NavigationControl,t.controls.value&&o.value.addControl(i),t.markers.value&&o.value.on("load",c)}catch(d){wn().error(d)}},c=async()=>{var d,h;if(!o.value)return;const u=await en(()=>import("./mapbox-gl-Dy-8hWlY.js").then(m=>m.m),[],import.meta.url);s.forEach(m=>m.remove()),s=[],(h=(d=t.markers)==null?void 0:d.value)==null||h.forEach(m=>{const _=new u.Marker().setLngLat([m.lng,m.lat]).addTo(o.value).setPopup(new u.Popup().setText(m.name));s.push(_),_.getElement().addEventListener("click",g=>{const w=new CustomEvent("mapbox-marker-click",{detail:{payload:m}});n.value.dispatchEvent(w),g.stopPropagation()})})};return We(t.controls,()=>{o.value&&(t.controls?o.value.addControl(i):o.value.removeControl(i))}),We(t.markers,async()=>{o.value&&await c()}),We(t.mapStyle,()=>{o.value&&o.value.setStyle(t.mapStyle.value)}),We(a,()=>{var u,d;o.value&&((u=a.value)!=null&&u.lat)&&((d=a.value)!=null&&d.lng)&&o.value.setCenter(a.value)}),We(t.zoom,()=>{o.value&&t.zoom.value&&o.value.setZoom(t.zoom.value)}),We([r,t.accessToken],()=>{l()}),(u,d)=>(E(),M("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[P(t).accessToken.value?(E(),M("div",{key:1,ref_key:"mapEl",ref:r,class:"map"},null,512)):(E(),M("div",P3,d[0]||(d[0]=[L("h2",null,"MapBox cannot be initialised.",-1),L("h3",null,"An access token hasn't been provided.",-1)]))),d[1]||(d[1]=L("div",{class:"mask"},null,-1))],512))}}),R3=ke(N3,[["__scopeId","data-v-946d8c56"]]);function L3(e,t){const{type:n}=e[t],o=zf().map(i=>({type:i,definition:si(i)})).filter(i=>i.definition.allowedParentTypes&&!i.definition.allowedParentTypes.includes(n));return new Set(o.map(i=>i.type))}function D3(e,t){const{type:n,parentId:r}=e[t],a=zf().filter(l=>l!=="root"&&l!=="blueprints_root"),{allowedChildrenTypes:o,toolkit:s}=si(n);if(!o)return new Set([]);let i=new Set(o);if(o.includes("*")&&(i=new Set([...i,...a])),i.delete("inherit")){if(!r)return i;const l=Vf(e,r);i=new Set([...i,...l])}return s&&(i=new Set(Array.from(i).filter(l=>si(l).toolkit==s))),i}function Vf(e,t){const n=Array.from(D3(e,t)),r=Array.from(L3(e,t));return n.filter(o=>!r.includes(o))}function B3(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="writer/clipboard"&&"components"in e&&Array.isArray(e.components)}function F3(){const e=wn();async function t(){try{const r=await navigator.clipboard.readText(),a=JSON.parse(r);return B3(a)?a.components:void 0}catch{return}}function n(r){const a={type:"writer/clipboard",components:r};try{navigator.clipboard.writeText(JSON.stringify(a))}catch(o){e.warn("Failed to write components in the clipboard",o)}}return{get:t,set:n}}function Uf(e,t,n){const r=F3();function a(){let Q="";const se=new Uint16Array(16);return window.crypto.getRandomValues(se),se.forEach(le=>{Q+=(le%36).toString(36)}),Q}function o(ne){const Q=e.getComponentById(ne);if(!Q)return;const se=Q.position;if(se==0)return;const le=e.getComponentById(Q.parentId);if(!le)return;const k=e.getComponents(le.id,{includeBMC:!0,includeCMC:!1}).filter(q=>q.position==se-1)[0],x=`move-up-${ne}`;t.openMutationTransaction(x,"Move up"),t.registerPreMutation(k),k.position++,t.registerPostMutation(k),t.registerPreMutation(Q),Q.position--,t.registerPostMutation(Q),t.closeMutationTransaction(x),e.sendComponentUpdate()}function s(ne){const Q=e.getComponentById(ne);if(!Q)return;const se=e.getComponentById(Q.parentId);if(!se)return;const le=Q.position;if(le==-2)return;const k=e.getComponents(se.id,{includeBMC:!0,includeCMC:!1}).filter(pe=>pe.position!==-2);if(le>=k.length-1)return;const x=k.filter(pe=>pe.position==le+1)[0],q=`move-down-${ne}`;t.openMutationTransaction(q,"Move down"),t.registerPreMutation(x),x.position--,t.registerPostMutation(x),t.registerPreMutation(Q),Q.position++,t.registerPostMutation(Q),t.closeMutationTransaction(q),e.sendComponentUpdate()}function i(ne,Q,se){const le=e.getComponentById(ne);if(!le)return;const k=e.getComponentById(le.parentId);if(!k||ne==Q||k.id==Q&&se===null)return;const x=`move-${ne}`;t.openMutationTransaction(x,"Move"),t.registerPreMutation(le),u(ne,-1),le.position=se??Ge(Q,le.type),le.parentId=Q,u(ne,1),t.registerPostMutation(le),t.closeMutationTransaction(x),e.sendComponentUpdate()}function l(ne,Q,se,le){const k=a(),x=e.getComponentDefinition(ne),{fields:q}=x,pe={};return Object.entries(q??{}).map(([z,ae])=>{var F;pe[z]=((F=le==null?void 0:le.content)==null?void 0:F[z])??ae.init}),{...le??{},id:k,type:ne,parentId:Q,content:pe,handlers:{},position:se??Ge(Q,ne)}}function c(ne,Q,se,le,k){const x=l(ne,Q,se,le);x.id=(le==null?void 0:le.id)??x.id;const q=`create-${x.id}`;return t.openMutationTransaction(q,"Create"),e.addComponent(x),u(x.id,1),k==null||k(x.id),t.registerPostMutation(x),t.closeMutationTransaction(q),e.sendComponentUpdate(),n==null||n.track(ne.startsWith("blueprints_")?"blueprints_block_added":"ui_block_added",{componentId:x.id}),x.id}function u(ne,Q){const se=e.getComponentById(ne);if(e.getComponentDefinition(se.type).positionless)return;e.getComponents(se.parentId,{includeBMC:!0,includeCMC:!1}).filter(q=>q.id!==ne).filter(q=>q.position>=se.position).map(q=>{t.registerPreMutation(q),q.position+=Q,t.registerPostMutation(q)})}function d(ne){const Q=e.getComponentById(ne),se=[],le=k=>{const x=e.getComponents(k.id);se.push(k),x.map(q=>le(q))};return le(Q),se}function h(ne){return e.getComponents().filter(Q=>{var se;return(se=Q.outs)==null?void 0:se.find(le=>le.toNodeId==ne)})}function m(...ne){const Q=ne.map(le=>e.getComponentById(le)).filter(Boolean);if(Q.length===0)return;const se=`delete-${Q.map(le=>le.id).join(",")}`;t.openMutationTransaction(se,"Delete");for(const le of Q){le.parentId&&u(le.id,-1);const k=h(le.id);for(const q of k)t.registerPreMutation(q),q.outs=[...q.outs.filter(pe=>pe.toNodeId!==le.id)];n==null||n.track(le.type.startsWith("blueprints_")?"blueprints_block_deleted":"ui_block_deleted",{componentId:le.id});const x=d(le.id);for(const q of x)t.registerPreMutation(q),e.deleteComponent(q.id),t.removeSelectedComponentId(q.id)}t.closeMutationTransaction(se),e.sendComponentUpdate()}function _(ne){return m(ne)}function g(ne){return ne=="root"}function w(ne){const Q=e.getComponentById(ne);return!g(ne)&&!(Q!=null&&Q.isCodeManaged)}function A(ne){const Q=e.getComponentById(ne);return!(Q!=null&&Q.isCodeManaged)&&e.getContainableTypes(ne).length>0}function C(ne){return!g(ne)}function y(ne){const Q=e.getComponentById(ne);return!g(ne)&&!(Q!=null&&Q.isCodeManaged)}function p(ne){const Q=e.getComponentById(ne);return!g(ne)&&!(Q!=null&&Q.isCodeManaged)}function b(ne){return!g(ne)}function S(ne,Q){const se=e.getComponentById(ne);if(!se)return;const le=se.parentId;if(!le)return;let k;Q&&(k=Q.split(",").slice(0,-1).join(",")),t.setSelection(le,k)}function R(ne){if(ne.length==0)return!1;const Q={};return[...e.getComponents(),...ne].forEach(le=>{Q[le.id]=le}),ne.map(le=>Vf(Q,le.parentId).includes(le.type)).every(le=>le)}function K(ne){const Q=e.getComponentById(ne);return!(!Q||Q.isCodeManaged)}function G(ne){const Q=pe=>e.getComponents(pe,{includeBMC:!0,includeCMC:!1}).filter(ae=>{var U;return!((U=e.getComponentDefinition(ae.type))==null?void 0:U.positionless)}).length,se=e.getComponentById(ne);if(!se||se.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(se.type).positionless)return{up:!1,down:!1};const k=se.parentId?Q(se.parentId):0,x=k>0&&se.position>0,q=k>0&&se.position<k-1;return{up:x,down:q}}function Z(ne){if(!e.getComponentById(ne))return;const se=d(ne);r.set(se),t.setSelection(null),_(ne),e.sendComponentUpdate()}function Ie(ne){const Q=JSON.parse(JSON.stringify(ne));return Q.forEach(se=>{delete se.isCodeManaged;const le=a();Q.filter(k=>k.id!==se.id).map(k=>{var x;k.parentId==se.id&&(k.parentId=le),(x=k.outs)==null||x.forEach(q=>{q.toNodeId==se.id&&(q.toNodeId=le)})}),se.id=le,typeof se.x<"u"&&typeof se.y<"u"&&(se.x+=36,se.y+=36)}),Q}function de(ne){if(!e.getComponentById(ne))return;const se=d(ne),le=Ie(se);r.set(le)}async function Ae(ne){if(!e.getComponentById(ne))return;const se=await r.get();if(!se)throw Error("The clipboard doesn't contain Writer data");if(!se.length)throw Error("The clipboard doesn't contain components");const le=se[0];return typeof le.outs<"u"&&le.parentId!==ne&&(le.outs=[]),we(ne,se)}function we(ne,Q){r.set(Ie(Q));const se=Q[0];if(se.parentId=ne,se.position=Ge(ne,se.type),!R(Q))throw Error("Could not paste the components here");const le=`paste-copy-${ne}`;t.openMutationTransaction(le,"Paste from copy"),Q.map(k=>{e.addComponent(k),t.registerPostMutation(k)}),t.closeMutationTransaction(le),e.sendComponentUpdate()}function Ge(ne,Q){if(e.getComponentDefinition(Q).positionless)return-2;const le=e.getComponents(ne,{includeBMC:!0,includeCMC:!1}).filter(k=>k.position!==-2);return le.length>0?Math.max(Math.max(...le.map(x=>x.position))+1,0):0}function xe(){var Q,se;const ne=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!ne.undo,isRedoAvailable:!!ne.redo,undoDesc:(Q=ne.undo)==null?void 0:Q.desc,redoDesc:(se=ne.redo)==null?void 0:se.desc}}function ye(){const ne=t.consumeUndoTransaction();ne&&(Object.entries(ne.mutations).forEach(([Q,se])=>{if(se.jsonPre&&se.jsonPost){e.addComponent(JSON.parse(se.jsonPre));return}if(!se.jsonPre&&se.jsonPost){e.deleteComponent(Q);return}if(se.jsonPre&&!se.jsonPost){e.addComponent(JSON.parse(se.jsonPre));return}}),e.sendComponentUpdate())}function _e(){const ne=t.consumeRedoTransaction();ne&&(Object.entries(ne.mutations).forEach(([Q,se])=>{if(se.jsonPre&&se.jsonPost){e.addComponent(JSON.parse(se.jsonPost));return}if(!se.jsonPre&&se.jsonPost){e.addComponent(JSON.parse(se.jsonPost));return}if(se.jsonPre&&!se.jsonPost){e.deleteComponent(Q);return}}),e.sendComponentUpdate())}function He(ne,Q,se){const le=e.getComponentById(ne);if(!le)return;const k=`edit-${ne}-content-${Q}`;t.openMutationTransaction(k,"Edit property",!0),t.registerPreMutation(le),le.content[Q]=se,t.registerPostMutation(le),t.closeMutationTransaction(k),e.sendComponentUpdate()}function me(ne,Q){const se=e.getComponentById(ne);if(!se)return;const le=`add-${ne}-out-${Q.outId}-${Q.toNodeId}`;t.openMutationTransaction(le,"Add out",!0),t.registerPreMutation(se),se.outs=[...se.outs??[],Q],t.registerPostMutation(se),t.closeMutationTransaction(le),e.sendComponentUpdate(),n==null||n.track("ui_blueprint_connected",{componentIds:[ne,Q.toNodeId],outId:Q.outId})}function V(ne,Q){const se=e.getComponentById(ne);if(!se)return;const le=`edit-${ne}-out-${Q.outId}-${Q.toNodeId}`;t.openMutationTransaction(le,"Edit out",!0),t.registerPreMutation(se),se.outs=se.outs.filter(k=>!(Q.outId===k.outId&&Q.toNodeId===k.toNodeId)),t.registerPostMutation(se),t.closeMutationTransaction(le),e.sendComponentUpdate()}function ue(ne,Q,se){const le=e.getComponentById(ne);if(!le)return;const k=`change-${ne}-coordinates`;t.openMutationTransaction(k,"Change coordinates",!1),t.registerPreMutation(le),le.x=Math.floor(Q),le.y=Math.floor(se),t.registerPostMutation(le),t.closeMutationTransaction(k),e.sendComponentUpdate()}function J(ne){const Q=Object.entries(ne);if(Q.length==0)return;const se=`change-multiple-coordinates-${Object.keys(ne).join(",")}`;t.openMutationTransaction(se,"Change coordinates",!1),Q.forEach(([le,{x:k,y:x}])=>{const q=e.getComponentById(le);q&&(t.registerPreMutation(q),q.x=Math.floor(k),q.y=Math.floor(x),t.registerPostMutation(q))}),t.closeMutationTransaction(se),e.sendComponentUpdate()}function I(ne,Q,se="",le=!1){const k=e.getComponentById(ne);if(!k)return;const x=`change-visibility-${ne}`;t.openMutationTransaction(x,"Change visibility",!0),t.registerPreMutation(k),k.visible==null&&(k.visible={expression:!0,binding:"",reversed:!1}),typeof Q=="boolean"?k.visible.expression=Q:Q=="custom"&&(k.visible={expression:"custom",binding:se,reversed:le}),t.registerPostMutation(k),t.closeMutationTransaction(x),e.sendComponentUpdate()}function O(ne,Q,se){const le=e.getComponentById(ne);if(!le)return;let k;if(se)k=se;else{const q=e.getComponentDefinition(le.type),B=Object.entries(q.events).filter(([z,ae])=>ae.bindable).map(([z,ae])=>z);k=B==null?void 0:B[0]}if(!k)return;const x=`change-binding-${ne}`;t.openMutationTransaction(x,"Change binding",!0),t.registerPreMutation(le),Q?le.binding={eventType:k,stateRef:Q}:delete le.binding,t.registerPostMutation(le),t.closeMutationTransaction(x),e.sendComponentUpdate()}function ie(ne,Q,se){const le=e.getComponentById(ne);if(!le)return;const k=`set-handler-${ne}`;t.openMutationTransaction(k,"Set event handler",!0),t.registerPreMutation(le),se?(le.handlers||(le.handlers={}),le.handlers[Q]=se):(delete le.handlers[Q],Object.keys(le.handlers).length==0&&delete le.handlers),t.registerPostMutation(le),t.closeMutationTransaction(k),e.sendComponentUpdate()}function Be(ne){const Q=e.getComponentById(ne);return!Q||Q.type=="root"?null:Q.type=="page"||Q.type=="blueprints_blueprint"?ne:Be(Q.parentId)}async function je(ne){var le;const Q=e.getComponentById(ne);(le=e.getComponentDefinition(Q.type))!=null&&le.name&&e.setActivePageId(Be(ne))}return{generateNewComponentId:a,moveComponent:i,moveComponentUp:o,moveComponentDown:s,cutComponent:Z,copyComponent:de,pasteComponent:Ae,createAndInsertComponent:c,removeComponentSubtree:_,removeComponentsSubtree:m,isPasteAllowed:K,undo:ye,redo:_e,setContentValue:He,addOut:me,removeOut:V,changeCoordinates:ue,changeCoordinatesMultiple:J,setVisibleValue:I,setBinding:O,getUndoRedoSnapshot:xe,setHandlerValue:ie,isAddAllowed:A,isCopyAllowed:C,isCutAllowed:y,isDeleteAllowed:p,isGoToParentAllowed:b,isDraggingAllowed:w,getEnabledMoves:G,goToParent:S,goToComponentParentPage:je}}const j3=30,V3=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,ks=$e(null),ta=$e(null),Qi=$e(!1);let _u=null,Zi=null;function U3(e){function t(w){var y;const A=w.dataTransfer.types[0],C=(y=A==null?void 0:A.match(V3))==null?void 0:y.groups;if(C)return{draggedType:C.componentType,draggedId:C.componentId}}function n(w){const y=(w.closest("[data-writer-cage]")??w).closest("[data-writer-id]");if(y)return y.dataset.writerId}function r(w){const A=t(w);if(!A)return;const{draggedType:C,draggedId:y}=A,p=n(w.target);if(!o(p,y,C))return;const S={draggedType:C,draggedId:y,parentId:ks.value,position:Zi};return g(w),S}function a(w,A,C){const y=e.getComponentById(w);if(!y)return!1;const p=e.getContainableTypes(w);return!(y!=null&&y.isCodeManaged)&&!e.isChildOf(A,w)&&p.includes(C)}function o(w,A,C){const y=e.getComponentById(w);if(y)return a(w,A,C)?w:y.parentId?o(y.parentId,A,C):null}function s(w){if(Qi.value){l(w);return}i(w)}function i(w){const A=t(w);if(!A)return;const{draggedType:C,draggedId:y}=A,p=w.target,b=n(p),S=o(b,y,C);if(!S||S==y)return;const K=p.closest(`[data-writer-id="${S}"]`).dataset.writerInstancePath;if(w.preventDefault(),ta.value!==K)_u=Date.now();else if(Date.now()-_u>=NS){Qi.value=!0,h(ta.value);return}ks.value=S,ta.value=K}function l(w){const A=t(w);if(!A)return;w.preventDefault();const C=document.querySelector(`[data-writer-instance-path="${ta.value}"]`);if(d(w.clientX,w.clientY,C)>j3){g(w);return}const y=c(ta.value);if(y.length==0)return;const p=u(w.clientX,w.clientY,y);if(!p)return;const{el:b}=p,{draggedId:S}=A,R=parseInt(b.dataset.writerPosition),K=e.getComponentById(S);if(y.map(G=>{G.classList.contains("highlighted")&&G.classList.remove("highlighted")}),!b.classList.contains("highlighted")){if(b.classList.add("highlighted"),K&&K.parentId==ks.value&&R>K.position){Zi=R-1;return}Zi=R}}function c(w){const A=_(w);return Array.from(A.querySelectorAll("[data-writer-position]"))}function u(w,A,C){const y=C.map(p=>({el:p,distance:d(w,A,p)})).sort((p,b)=>p.distance>b.distance?1:-1);return y==null?void 0:y[0]}function d(w,A,C){const{top:y,left:p,right:b,bottom:S}=C.getBoundingClientRect(),R=Math.max(p-w,0,w-b),K=Math.max(y-A,0,A-S);return Math.sqrt(R*R+K*K)}function h(w){_(w).classList.add("crackedContainer")}function m(w){_(w).classList.remove("crackedContainer")}function _(w){const A=document.querySelector(`[data-writer-instance-path="${w}"]`);if(A.hasAttribute("data-writer-container"))return A;const C=A.querySelectorAll("[data-writer-container]");for(let y=0;y<C.length;y++){const p=C[y];if(p.closest("[data-writer-instance-path]")==A)return p}}function g(w){w.preventDefault(),ta.value&&(m(ta.value),ta.value=null),ks.value=null,_u=null,Zi=null,Qi.value=!1}return{candidateId:ks,candidateInstancePath:ta,isParentSuitable:a,isCandidacyConfirmed:Qi,getComponentInfoFromDrag:t,dropComponent:r,assignInsertionCandidacy:s,removeInsertionCandidacy:g}}function bu(e,t){return Math.ceil(e/t)*t}function Qm(e,t){return Math.round(e/t)*t}function ub(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function Zm({x:e,y:t},n){return{x:Qm(e,n),y:Qm(t,n)}}function nd({x:e,y:t},{x:n,y:r}){return{x:e+n,y:t+r}}function ev(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function el(e,t,n){return e>=t&&e<=n}function tv(e,t,n,r){return el(e,n,r)||el(t,n,r)||el(n,e,t)||el(r,e,t)}function H3(e,t){const n=tv(e.x,e.x+e.width,t.x,t.x+t.width),r=tv(e.y,e.y+e.height,t.y,t.y+t.height);return n&&r}function nv(e,t,n){const r=[{x:-n,y:-n},{x:-n,y:0},{x:-n,y:n},{x:0,y:-n},{x:0,y:n},{x:n,y:-n},{x:n,y:0},{x:n,y:n}],a=new Set,o=[],s=[];function i({x:m,y:_}){return{width:e.width,height:e.height,x:m,y:_}}function l(m){if(m.x<0||m.y<0)return!1;const _=i(m);return!t.some(g=>H3(_,g))}function c(m){const _=`${m.x},${m.y}`;a.has(_)||(o.push(m),a.add(_))}for(c({x:e.x,y:e.y});o.length;){const m=o.shift();if(m===void 0)return;if(l(m)&&s.push(m),s.length===0)for(const _ of r)c(nd(m,_))}const u=ev(e),d=m=>ub(u,ev(i(m))),h=s.sort((m,_)=>d(m)-d(_)).shift();return h?i(h):void 0}const z3=["d"],K3=["d"],W3=["cx","cy"],q3=["x1","y1","x2","y2","stroke"],G3=["x1","y1","x2","y2","stroke"],Ts=30,J3=Ce({__name:"BlueprintArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,r=e,a=j(()=>{const i=r.arrow.x2-r.arrow.x1,l=r.arrow.y2-r.arrow.y1;return[{x:r.arrow.x1,y:r.arrow.y1},{x:r.arrow.x1+Ts,y:r.arrow.y1},{x:r.arrow.x1+Ts,y:r.arrow.y1+l*.25},{x:r.arrow.x1+i*.5,y:r.arrow.y1+l*.5},{x:r.arrow.x2-Ts,y:r.arrow.y1+l*.75},{x:r.arrow.x2-Ts,y:r.arrow.y2},{x:r.arrow.x2,y:r.arrow.y2}]}),o=j(()=>{const i=r.arrow.x2-r.arrow.x1,l=a.value;let c;return i>Ts?(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[3].x} ${l[0].y}, ${l[3].x} ${l[6].y}, ${l[6].x} ${l[6].y}`):(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[1].x} ${l[1].y}, ${l[2].x} ${l[2].y}, ${l[3].x} ${l[3].y}`,c+=`C ${l[4].x} ${l[4].y}, ${l[5].x} ${l[5].y}, ${l[6].x} ${l[6].y}`),c});function s(){n("delete")}return(i,l)=>(E(),M("g",{class:ut(["BlueprintArrow",{engaged:i.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[L("path",{d:o.value,style:bt({stroke:i.arrow.color})},null,12,z3),L("path",{d:o.value,style:bt({stroke:i.arrow.color,strokeWidth:12,opacity:i.isSelected?"0.2":"0"})},null,12,K3),i.isSelected?(E(),M("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:da(s,["enter"])},[L("circle",{cx:a.value[3].x,cy:a.value[3].y,r:"12"},null,8,W3),L("line",{class:"cross",x1:a.value[3].x-4,y1:a.value[3].y-4,x2:a.value[3].x+4,y2:a.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,q3),L("line",{class:"cross",x1:a.value[3].x+4,y1:a.value[3].y-4,x2:a.value[3].x-4,y2:a.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,G3)],32)):ge("",!0)],2))}}),rv=ke(J3,[["__scopeId","data-v-343694d1"]]),Y3=Ce({__name:"BlueprintMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){fi(C=>({"5436111d":`${l.value.width}px`,"2f2ee374":`${l.value.height}px`,"791851f1":c.value.isDisplayed?"":"none"}));const n=te(re.builderManager),r=it("rootEl"),a=t,o=new ResizeObserver(m),s=new MutationObserver(m),i=$e(.2),l=$e({width:166,height:100}),c=$e({width:260,height:1,top:0,left:0,isDisplayed:!1}),u=$e({width:1,height:1,top:0,left:0}),d=e,h=$e([]);function m(){if(!d.nodeContainerEl)return;const C=Array.from(d.nodeContainerEl.querySelectorAll("[data-writer-id]")),y=d.nodeContainerEl.getBoundingClientRect();let p=0,b=0;h.value=C.map(S=>{const R=S.getBoundingClientRect();return p=Math.max(p,R.right+d.renderOffset.x*d.zoomLevel-y.left),b=Math.max(b,R.bottom+d.renderOffset.y*d.zoomLevel-y.top),{id:S.dataset.writerId,width:R.width,height:R.height,top:R.top+d.renderOffset.y*d.zoomLevel-y.top,left:R.left+d.renderOffset.x*d.zoomLevel-y.left}}),l.value={width:260,height:y.height/y.width*y.width/7},i.value=Math.min(l.value.width/(y.width+300),l.value.height/(y.height+300),l.value.width/(p+300),l.value.height/(b+300),l.value.width/(d.renderOffset.x*d.zoomLevel+y.width),l.value.height/(d.renderOffset.y*d.zoomLevel+y.height)),u.value={top:d.renderOffset.y*d.zoomLevel,left:d.renderOffset.x*d.zoomLevel,width:y.width,height:y.height},c.value={...u.value,isDisplayed:c.value.isDisplayed}}function _(C){const y=d.nodeContainerEl.getBoundingClientRect(),p=r.value.getBoundingClientRect();c.value={...c.value,top:Math.min(Math.max(0,(C.pageY-p.top)*(1/i.value)-y.height/2),p.height*(1/i.value)-y.height),left:Math.min(Math.max(0,(C.pageX-p.left)*(1/i.value)-y.width/2),p.width*(1/i.value)-y.width)}}function g(){c.value.isDisplayed=!0}function w(){c.value.isDisplayed=!1}function A(C){C.stopPropagation(),n.setSelection(null),a("changeRenderOffset",{x:c.value.left*(1/d.zoomLevel),y:c.value.top*(1/d.zoomLevel)})}return ln(async()=>{o.observe(d.nodeContainerEl),s.observe(d.nodeContainerEl,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style"]}),await ar(),m()}),Or(()=>{o.disconnect(),s.disconnect()}),(C,y)=>(E(),M("div",{ref_key:"rootEl",ref:r,class:"BlueprintMiniMap",onMouseenter:g,onMouseleave:w,onMousemove:_,onClick:A},[L("div",{class:"selectedArea",style:bt({top:`${u.value.top*i.value}px`,left:`${u.value.left*i.value}px`,width:`${u.value.width*i.value}px`,height:`${u.value.height*i.value}px`})},null,4),L("div",{class:"selector",style:bt({top:`${c.value.top*i.value}px`,left:`${c.value.left*i.value}px`,width:`${c.value.width*i.value}px`,height:`${c.value.height*i.value}px`})},null,4),(E(!0),M(Ye,null,Pt(h.value,p=>(E(),M("div",{key:p.id,class:ut(["node",{selected:P(n).isComponentIdSelected(p.id)}]),style:bt({top:`${p.top*i.value}px`,left:`${p.left*i.value}px`,width:`${p.width*i.value}px`,height:`${p.height*i.value}px`})},null,6))),128))],544))}}),X3=ke(Y3,[["__scopeId","data-v-05861f5c"]]);function Q3(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function av(){return db()?"⌘ ":"Ctrl+"}function rd(e){return db()?e.metaKey:e.ctrlKey}function db(){return Q3().toLowerCase().indexOf("mac")!=-1}const Z3={class:"bar"},eB={class:"autoArranger"},tB={class:"zoomer"},nB={class:"miniMapCollapser"},ov=.01,tl=.2,rB=Ce({__name:"BlueprintNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom","autoArrange"],setup(e,{emit:t}){const n=e,{zoomLevel:r}=gd(n),a=it("rootEl"),o=t,s=$e(!0),i=$e(l(r.value));function l(C){return`${Math.floor(C*100)}%`}function c(){s.value=!s.value}function u(){o("autoArrange")}function d(C){o("changeRenderOffset",C)}function h(){const C=r.value+tl;o("changeZoomLevel",C)}function m(){const C=r.value-tl;o("changeZoomLevel",C)}function _(C){const y=C.key;let p=r.value;if(y=="ArrowUp")p+=ov;else if(y=="ArrowDown")p-=ov;else return;o("changeZoomLevel",p)}function g(C){var b;const y=(b=C.target)==null?void 0:b.value;let p=parseInt(y)/100;isNaN(p)&&(p=1),i.value=l(p),o("changeZoomLevel",p)}function w(){o("resetZoom")}We(r,C=>{i.value=l(C)});function A(C){if(rd(C)===!1)return;let y=r.value;if(C.key=="+"||C.key=="=")C.preventDefault(),y+=tl;else if(C.key=="-")C.preventDefault(),y-=tl;else return;o("changeZoomLevel",y)}return ln(()=>{document.addEventListener("keydown",A)}),Or(()=>{document.removeEventListener("keydown",A)}),(C,y)=>(E(),M("div",{ref_key:"rootEl",ref:a,"data-writer-unselectable":"true",class:"BlueprintNavigator",onKeydown:A},[C.nodeContainerEl&&s.value?(E(),De(X3,{key:0,"node-container-el":C.nodeContainerEl,"render-offset":C.renderOffset,"zoom-level":P(r),class:"miniMap",onChangeRenderOffset:d},null,8,["node-container-el","render-offset","zoom-level"])):ge("",!0),L("div",Z3,[L("div",eB,[Fe(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Auto arrange blocks","data-writer-tooltip-placement":"left",onClick:u},{default:Ze(()=>y[1]||(y[1]=[L("i",{class:"material-symbols-outlined"},"apps",-1)])),_:1})]),L("div",tB,[Fe(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":P(r)>P(so).minLevel?`Zoom out (${P(av)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:m},{default:Ze(()=>y[2]||(y[2]=[L("i",{class:"material-symbols-outlined"},"remove",-1)])),_:1},8,["data-writer-tooltip"]),Fe(O_,{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=p=>i.value=p),class:"zoomLevelInput",onKeydown:_,onChange:g},null,8,["modelValue"]),Fe(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":P(r)<P(so).maxLevel?`Zoom in (${P(av)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:h},{default:Ze(()=>y[3]||(y[3]=[L("i",{class:"material-symbols-outlined"},"add",-1)])),_:1},8,["data-writer-tooltip"]),Fe(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:w},{default:Ze(()=>y[4]||(y[4]=[L("i",{class:"material-symbols-outlined"},"undo",-1)])),_:1})]),L("div",nB,[Fe(Rn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:c},{default:Ze(()=>y[5]||(y[5]=[L("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)])),_:1},8,["data-writer-tooltip"])])])],544))}}),aB=ke(rB,[["__scopeId","data-v-ac568870"]]),oB={class:"WdsModal__main"},sB={key:1,class:"WdsModal__main__title"},iB={key:0},lB={class:"WdsModal__main__content"},cB={key:2,class:"WdsModal__main__footer"},uB={key:0,class:"WdsModal__main__footer__hint"},dB={key:1,class:"WdsModal__main__footer__actions"},fB=Ce({__name:"WdsModal",props:{title:{type:String,required:!1,default:null},size:{type:String,required:!1,default:"normal"},description:{type:String,required:!1,default:null},actions:{type:Array,required:!1,default:()=>[]},allowOverflow:{type:Boolean,required:!1},displayCloseButton:{type:Boolean,required:!1},hint:{type:String,required:!1,default:void 0}},emits:{close:()=>!0},setup(e){const t=e,{title:n,actions:r}=gd(t);return(a,o)=>{var s,i;return E(),De(Hv,{to:"#modal"},[L("div",{class:ut(["WdsModal colorTransformer",{"WdsModal--overflow":e.allowOverflow,"WdsModal--wide":e.size=="wide"}]),tabindex:"-1"},[L("div",oB,[e.displayCloseButton?(E(),De(Rn,{key:0,variant:"neutral",size:"smallIcon",class:"WdsModal__main__closeBtn",onClick:o[0]||(o[0]=l=>a.$emit("close"))},{default:Ze(()=>o[1]||(o[1]=[L("i",{class:"material-symbols-outlined"},"close",-1)])),_:1})):ge("",!0),P(n)||e.description?(E(),M("div",sB,[L("h2",null,Te(P(n)),1),e.description?(E(),M("summary",iB,Te(e.description),1)):ge("",!0)])):ge("",!0),L("div",lB,[Ht(a.$slots,"default",{},void 0,!0)]),((s=P(r))==null?void 0:s.length)>0||e.hint?(E(),M("div",cB,[e.hint?(E(),M("p",uB,Te(e.hint),1)):ge("",!0),((i=P(r))==null?void 0:i.length)>0?(E(),M("div",dB,[(E(!0),M(Ye,null,Pt(P(r),(l,c)=>(E(),De(Rn,{key:c,variant:c==P(r).length-1?"primary":"tertiary",disabled:l.disabled,onClick:l.fn},{default:Ze(()=>[tn(Te(l.desc),1)]),_:2},1032,["variant","disabled","onClick"]))),128))])):ge("",!0)])):ge("",!0)])],2)])}}}),pB=ke(fB,[["__scopeId","data-v-d12badab"]]),hB="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M34.0187%2028.9434L37.2255%2015.7128H32.7659L30.812%2015.7128L34.0187%2028.9434Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.4266%2015.7128H20.967L25.4266%2034.1126L27.4085%2034.1126H31.8681L27.4085%2015.7128H25.4266L25.4266%2015.7128Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5635%2015.7129H13.1038L13.1039%2015.7132H11.1219L15.5816%2034.113H20.0413L20.0412%2034.1126H22.0231L17.5635%2015.7129Z'%20fill='white'/%3e%3c/svg%3e",mB=["width","height"],vB=["fill"],gB=["fill"],yB=["fill"],_B=Ce({__name:"WdsLoaderDots",props:{color:{type:String,required:!1,default:St.Blue5},size:{type:Number,required:!1,default:16}},setup(e){return(t,n)=>(E(),M("svg",{width:e.size,height:e.size,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[L("circle",{cx:"4",cy:"8",fill:e.color},n[0]||(n[0]=[L("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",repeatCount:"indefinite"},null,-1)]),8,vB),L("circle",{cx:"8",cy:"8",fill:e.color},n[1]||(n[1]=[L("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",begin:"0.4s",repeatCount:"indefinite"},null,-1)]),8,gB),L("circle",{cx:"12",cy:"8",fill:e.color},n[2]||(n[2]=[L("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",begin:"0.8s",repeatCount:"indefinite"},null,-1)]),8,yB)],8,mB))}}),bB={},wB={width:"592",height:"592",viewBox:"0 0 592 592",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function AB(e,t){return E(),M("svg",wB,t[0]||(t[0]=[L("g",null,[L("g",{"clip-path":"url(#paint0_angular_167_137448_clip_path)"},[L("g",{transform:"matrix(0.208791 0.208791 -0.208791 0.208791 296.078 296.082)"},[L("foreignObject",{x:"-1003.39",y:"-1003.39",width:"2006.77",height:"2006.77"},[L("div",{xmlns:"http://www.w3.org/1999/xhtml",style:{background:`conic-gradient(
									from 90deg,
									rgba(240, 207, 255, 1) 0deg,
									rgba(191, 203, 255, 1) 360deg
								)`,height:"100%",width:"100%",opacity:"1"}})])])]),L("ellipse",{cx:"296.078",cy:"296.082",rx:"295.275",ry:"295.275",transform:"rotate(-45 296.078 296.082)"})],-1),L("defs",null,[L("clipPath",{id:"paint0_angular_167_137448_clip_path"},[L("ellipse",{cx:"296.078",cy:"296.082",rx:"295.275",ry:"295.275",transform:"rotate(-45 296.078 296.082)"})])],-1)]))}const wu=ke(bB,[["render",AB]]),CB={class:"BlueprintsLifeLoading"},$B={class:"logoContainer"},SB={class:"rotating-text"},IB={class:"background"},EB=4e3,kB=Ce({__name:"BlueprintsGenerationLoader",setup(e){const t=["Analyzing requirements","Shopping for blocks","Connecting the dots","Wiring the circuits","Flipping the switches"],n=$e(0),r=setInterval(()=>{n.value=(n.value+1)%t.length},EB);return Or(()=>clearInterval(r)),(a,o)=>(E(),M("div",CB,[L("div",$B,[o[0]||(o[0]=L("img",{src:hB,alt:"Writer Framework logo"},null,-1)),Fe(_B,{class:"dot-loader",color:"black"}),L("p",SB,[(E(),M(Ye,null,Pt(t,(s,i)=>L("span",{key:i,class:ut({active:n.value===i})},Te(s),3)),64))])]),L("div",IB,[Fe(wu,{class:"rotating-circle left"}),Fe(wu,{class:"rotating-circle center"}),Fe(wu,{class:"rotating-circle right"})])]))}}),TB=ke(kB,[["__scopeId","data-v-6298b85a"]]);var Br,Fr;class xB{constructor(t){Kc(this,Br,void 0);Kc(this,Fr,void 0);Wc(this,Br,t==null?void 0:t.signal),Wc(this,Fr,(t==null?void 0:t.baseUrl)??window.location.origin)}async fetchApplicationDeployment(t,n){const r=new URL(`/api/template/organization/${t}/application/${n}/deployment`,er(this,Fr)),a=await fetch(r,{signal:er(this,Br),credentials:"include"});if(!a.ok)throw Error(await a.text());return a.json()}async publishApplication(t,n,r){const a=new URL(`/api/template/organization/${t}/application/${n}/publish`,er(this,Fr)),o=await fetch(a,{method:"PUT",body:JSON.stringify(r),signal:er(this,Br),credentials:"include"});if(!o.ok)throw Error(await o.text());return await o.json()}async fetchUserProfile(){const t=new URL("/api/user/v2/profile",er(this,Fr)),n=await fetch(t,{signal:er(this,Br),credentials:"include"});if(!n.ok)throw Error(await n.text());return n.json()}async analyticsIdentify(){const t=new URL("/api/analytics/identify",er(this,Fr)),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Client":"Framework"},body:JSON.stringify({traits:{}}),signal:er(this,Br),credentials:"include"});if(!n.ok)throw Error(await n.text())}async analyticsTrack(t,n){const r=new URL("/api/analytics/track",er(this,Fr)),a=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-Client":"Framework"},body:JSON.stringify({eventName:t,properties:n}),signal:er(this,Br),credentials:"include"});if(!a.ok)throw Error(await a.text())}async analyticsPage(t,n,r){const a=new URL("/api/analytics/page",er(this,Fr)),o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json","X-Client":"Framework"},body:JSON.stringify({name:t,organizationId:n,properties:r}),signal:er(this,Br),credentials:"include"});if(!o.ok)throw Error(await o.text())}}Br=new WeakMap,Fr=new WeakMap;var PB={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function MB(e={}){const t=PB.VITE_WRITER_BASE_URL??window.location.origin;return{writerApi:new xB({...e,baseUrl:t}),apiBaseUrl:t}}let sv=!1;const iv="[AgentEditor]";function fb(e){const t=new AbortController,n=j(()=>{var u;return!!((u=e.writerApplication.value)!=null&&u.id)}),r=j(()=>{var u;return Number((u=e.writerApplication.value)==null?void 0:u.organizationId)||void 0}),{writerApi:a}=MB({signal:t.signal}),o=wn();ln(async()=>{if(!(!n.value||sv)){sv=!0;try{await a.analyticsIdentify()}catch(u){o.error("Failed to identify the current user for analytics",u)}}});function s(u){var h,m;const d=structuredClone(u);return typeof d.componentId=="string"&&(d.component=i(d.componentId),delete d.componentId),Array.isArray(d.componentIds)&&(d.components=d.componentIds.map(i),delete d.componentIds),{writerApplicationId:(h=e.writerApplication.value)==null?void 0:h.id,writerOrganizationId:(m=e.writerApplication.value)==null?void 0:m.organizationId,...d}}function i(u){const d=e.getComponentById(u);if(!d)return{};const h=e.getComponentDefinition(d.type);return h?{name:h.name,category:h.category}:{}}function l(u,d={}){if(!(e.mode.value!=="edit"||!n.value))return a.analyticsTrack(`${iv} ${u}`,s(d))}function c(u,d={}){if(!(e.mode.value!=="edit"||!n.value||!r.value))return a.analyticsPage(`${iv} ${u}`,r.value,s(d))}return{track:l,page:c}}function ad(e,t=window.location.toString()){return new URL(`.${e}`,t).toString()}const OB={class:"BlueprintsAutogen"},NB={class:"main"},RB={class:"buttons"},LB=Ce({__name:"BlueprintsAutogen",emits:["blockGeneration"],setup(e,{emit:t}){const n=te(re.core),r=te(re.builderManager),{generateNewComponentId:a}=Uf(n,r),o=fb(n),s=$e(!1),i=$e(""),l=t;function c(){l("blockGeneration",null)}ln(()=>{o.track("blueprints_auto_gen_opened")});function u(h){const m={};return h.forEach(_=>{const g=a();m[_.id]=g,_.id=g}),h.forEach(_=>{var g;(g=_.outs)==null||g.forEach(w=>{w.toNodeId=m[w.toNodeId]})}),h.forEach(_=>{Object.entries(m).forEach(([g,w])=>{const A=new RegExp(`(@{\\s*results\\.)aig${g}\\b`,"g");Object.entries(_.content).forEach(([C,y])=>{const p=y.replace(A,(b,S)=>b.replace(S,w));_.content[C]=p})})}),h}async function d(){var w;const h=i.value;s.value=!0,o.track("blueprints_auto_gen_started",{prompt:i.value});const m=await fetch(ad("/api/autogen"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:h})});if(s.value=!1,!m.ok)throw new Error(`Error: ${m.status} - ${m.statusText}`);const _=await m.json(),g=u((w=_.blueprint)==null?void 0:w.components);l("blockGeneration",{components:g}),o.track("blueprints_auto_gen_completed")}return(h,m)=>(E(),M("div",OB,[s.value?(E(),De(TB,{key:1})):(E(),M(Ye,{key:0},[L("div",NB,[Fe(Nd,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=_=>i.value=_),rows:"8",placeholder:"Describe the blocks you'd like to generate..."},null,8,["modelValue"])]),L("div",RB,[Fe(Rn,{onClick:d},{default:Ze(()=>m[1]||(m[1]=[L("i",{class:"material-symbols-outlined"},"bolt",-1),tn(" Generate ")])),_:1}),Fe(Rn,{variant:"tertiary",onClick:c},{default:Ze(()=>m[2]||(m[2]=[tn(" Cancel ")])),_:1})])],64))]))}}),DB=ke(LB,[["__scopeId","data-v-2589a114"]]),BB=["data-writer-unselectable"],FB=["x","y"],jB=["cx","cy","fill"],VB={key:0,width:"100%",height:"100%",fill:"url(#grid)",fil:""},{log:UB}=wn(),dn=24,HB="A container component representing a single blueprint within the application.",zB={writer:{name:"Blueprint",toolkit:"blueprints",category:"Root",description:HB,allowedChildrenTypes:["*"],allowedParentTypes:["blueprints_root"],fields:{key:{name:"Blueprint key",desc:"Unique identifier. It's needed to enable navigation to this Blueprint.",type:W.IdKey}}}},so={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},KB=Ce({...zB,__name:"BlueprintsBlueprint",setup(e){fi(ce=>({"32177dd0":h.value}));const t=uo({loader:()=>en(()=>import("./BlueprintToolbar-CgXor0rS.js"),__vite__mapDeps([7,8,9]),import.meta.url)}),n=te(re.core),r=te(re.builderManager),a=te(re.renderProxiedComponent),o=te(re.componentId),s=it("rootEl"),i=it("nodeContainerEl"),l=En([]),c=En({x:0,y:0}),u=En(null),d=$e(!1),h=$e(so.initialLevel),m=new MutationObserver(Ae),_=En({}),g=dn*4,w=dn*6,A=j(()=>n.getComponents(o,{sortedByPosition:!0})),C=fb(n),{createAndInsertComponent:y,addOut:p,removeOut:b,changeCoordinatesMultiple:S}=Uf(n,r,C),{getComponentInfoFromDrag:R}=U3(n),K=En(null),G=En(null),Z=En(null),Ie=de();function de(){const ce="blueprint__hideGrid",Me=$e(localStorage.getItem(ce)===null);return We(Me,be=>be?localStorage.removeItem(ce):localStorage.setItem(ce,"1")),Me}function Ae(){l.value=A.value.reduce((ce,Me)=>{var be;if(!((be=Me.outs)!=null&&be.length))return ce;for(const Ee of Me.outs){const Ve=ne(Me.id,Ee.outId,void 0,Ee.toNodeId);Ve&&ce.push(Ve)}return ce},[])}const we=j(()=>{var ce,Me;return K.value===null&&!((ce=G.value)!=null&&ce.isPerfected)&&!((Me=Z.value)!=null&&Me.isPerfected)?null:!0});function Ge(){u.value=null}function xe(){const ce=new Map;function Me(Ee,Ve){var Tt;if(ce.values().find(ht=>ht.has(Ee)))return;ce.has(Ve)||ce.set(Ve,new Set),ce.get(Ve).add(Ee),(Tt=Ee.outs)==null||Tt.forEach(ht=>{const Dt=n.getComponentById(ht.toNodeId);Me(Dt,Ve+1)})}const be=new Map;return A.value.forEach(Ee=>{var Ve;(Ve=Ee.outs)==null||Ve.forEach(ze=>{be.has(ze.toNodeId)||be.set(ze.toNodeId,new Set),be.get(ze.toNodeId).add(Ee.id)})}),A.value.filter(Ee=>!be.has(Ee.id)).forEach(Ee=>{Me(Ee,0)}),ce}function ye(ce){const Me=`[data-writer-id="${ce}"]`,be=i.value.querySelector(Me);if(be)return be.getBoundingClientRect()}function _e(ce){var Ve;const Me=ye(ce);if(!Me)return;const be=(Ve=s.value)==null?void 0:Ve.getBoundingClientRect();if(!be)return;const Ee=ze=>{const ot=bu(ze,dn);return ot===ze?ot+1:ot-1};return{x:c.value.x+(Me.x-be.x)*I.value,y:c.value.y+(Me.y-be.y)*I.value,width:Ee(Me.width*I.value),height:Ee(Me.height*I.value)}}function He(ce){const Me=new Map,be=new Map;return ce.forEach((Ee,Ve)=>{let ze=0,ot=0;Ee.forEach(Tt=>{const ht=ye(Tt.id);ht&&(be.set(Tt.id,{height:ht.height*I.value}),ze+=ht.height*I.value+g,ot=Math.max(ot,ht.width*I.value))}),Me.set(Ve,{height:ze-g,width:ot})}),{columnDimensions:Me,nodeDimensions:be}}function me(){V("currentY")}function V(ce){const Me={currentY:(ht,Dt)=>ht.y>Dt.y?1:-1,socketPosition:(ht,Dt)=>{const[Jt,Kt]=[ht,Dt].map(mr=>A.value.map(ya=>{var _a;return(_a=ya.outs)==null?void 0:_a.filter(Xr=>Xr.toNodeId===mr.id).map(Xr=>({fromNodeId:ya.id,fromOutId:Xr.outId}))}).filter(Boolean).flat());if(!Jt||Jt.length===0||!Kt||Kt.length===0)return 0;const Yt=document.querySelector(`[data-writer-id="${Jt[0].fromNodeId}"] [data-writer-socket-id="${Jt[0].fromOutId}"]`),gn=document.querySelector(`[data-writer-id="${Kt[0].fromNodeId}"] [data-writer-socket-id="${Kt[0].fromOutId}"]`);if(!Yt||!gn)return 0;const ga=Yt.getBoundingClientRect(),hs=gn.getBoundingClientRect();return ga.y>hs.y?-1:1}},be=xe(),{columnDimensions:Ee,nodeDimensions:Ve}=He(be),ze=Math.max(...Array.from(Ee.values()).map(ht=>ht.height)),ot={};let Tt=w/2;for(let ht=0;ht<be.size;ht++){const Dt=Array.from(be.get(ht)).sort(Me[ce]),{width:Jt,height:Kt}=Ee.get(ht);let Yt=bu((ze-Kt)/2+g,dn);Dt.forEach(gn=>{const ga=Zm({x:Tt,y:Yt},dn);ot[gn.id]=ga,Yt+=Ve.get(gn.id).height+g}),Tt+=bu(Jt+w,dn)}S(ot)}function ue(ce,Me){le();const Ee=document.querySelector(`[data-writer-id="${Me}"]`).getBoundingClientRect(),Ve=(ce.pageX-Ee.x)*I.value,ze=(ce.pageY-Ee.y)*I.value;G.value={nodeId:Me,offset:{x:Ve,y:ze},isPerfected:!1}}function J(ce,Me){K.value={fromNodeId:ce,fromOutId:Me}}const I=j(()=>1/h.value);function O(ce){const Me=s.value.getBoundingClientRect(),be=c.value.x+(ce.pageX-Me.x)*(1/h.value),Ee=c.value.y+(ce.pageY-Me.y)*(1/h.value);return{x:be,y:Ee}}function ie(ce){ce.preventDefault(),ce.stopPropagation();const Me=R(ce);if(!Me)return;const{draggedType:be,draggedId:Ee}=Me;if(Ee)return;const{x:Ve,y:ze}=O(ce);Ve<0||ze<0||F(be,{x:Ve,y:ze})}function Be(ce,Me){if(u.value==Me){u.value=null;return}ce.stopPropagation(),u.value=Me,r.setSelection(null)}async function je(ce){if(!ce.toNodeId)return;const Me={outId:ce.fromOutId,toNodeId:ce.toNodeId};b(ce.fromNodeId,Me)}function ne(ce,Me,be,Ee){var Kt;let Ve,ze,ot,Tt;const ht=(Kt=s.value)==null?void 0:Kt.getBoundingClientRect();if(!ht)return;ot=((be==null?void 0:be.x)-ht.x)*I.value,Tt=((be==null?void 0:be.y)-ht.y)*I.value;const Dt=document.querySelector(`[data-writer-id="${ce}"] [data-writer-socket-id="${Me}"]`);if(!Dt)return;const Jt=Dt.getBoundingClientRect();if(Ve=(Jt.x-ht.x+Jt.width/2)*I.value,ze=(Jt.y-ht.y+Jt.height/2)*I.value,!!Dt){if(typeof Ee<"u"){const gn=document.querySelector(`[data-writer-id="${Ee}"]`).getBoundingClientRect();ot=(gn.x-ht.x)*I.value,Tt=(gn.y-ht.y+gn.height/2)*I.value}return{x1:Ve,y1:ze,x2:ot,y2:Tt,color:getComputedStyle(Dt).backgroundColor,fromNodeId:ce,fromOutId:Me,toNodeId:Ee}}}function Q(ce){const be=ce.target.closest(".BlueprintsBlueprint [data-writer-id]");return be==null?void 0:be.dataset.writerId}function se(ce){let Me,be;be=Q(ce),typeof be>"u"&&(Me={x:ce.pageX,y:ce.pageY});const{fromNodeId:Ee,fromOutId:Ve}=K.value;be!=Ee&&(K.value={...K.value,liveArrow:ne(Ee,Ve,Me,be)})}function le(){Z.value=null,K.value=null,G.value=null}function k(ce){const Me=Object.entries(ce).filter(([be,Ee])=>{const Ve=n.getComponentById(be);return(Ve==null?void 0:Ve.x)!==Ee.x||(Ve==null?void 0:Ve.y)!==Ee.y}).reduce((be,[Ee,Ve])=>{const ze=Zm(Ve,dn),ot=_e(Ee),Tt={...ot,...ze},ht=A.value.filter(Kt=>Kt.id!==Ee).map(Kt=>_e(Kt.id)).filter(Boolean),{x:Dt,y:Jt}=nv(Tt,ht,dn);return(ot.x!==Dt||ot.y!==Jt)&&(be[Ee]={x:Dt,y:Jt}),be},{});Object.keys(Me).length!==0&&S(Me)}function x(){k(_.value),_.value={}}function q(ce){const{nodeId:Me,offset:be}=G.value,{x:Ee,y:Ve}=O(ce),ze=Math.floor(Ee-be.x),ot=Math.floor(Ve-be.y),Tt=n.getComponentById(Me);ub({x:Tt.x,y:Tt.y},{x:ze,y:ot})>10&&(G.value={...G.value,isPerfected:!0});const Dt={x:ze-Tt.x,y:ot-Tt.y};if(!r.selection.value.some(Yt=>Yt.componentId===Me)){_.value={..._.value,[Me]:{x:ze,y:ot}};return}const Kt=r.selection.value.map(Yt=>n.getComponentById(Yt.componentId)).filter(Yt=>Yt.id!==Me&&Yt.x!==void 0&&Yt.y!==void 0).reduce((Yt,gn)=>(Yt[gn.id]=nd({x:gn.x,y:gn.y},Dt),Yt),{});_.value={..._.value,...Kt,[Me]:{x:ze,y:ot}}}function pe(ce){const Me=s.value.getBoundingClientRect(),be=ce.pageX-Me.x,Ee=ce.pageY-Me.y,{x:Ve,y:ze}=Z.value.offset;Z.value={isPerfected:!0,offset:{x:be,y:Ee}},Le(c.value.x+(Ve-be)*1*I.value,c.value.y+(ze-Ee)*1*I.value)}function B(ce){if(ce.buttons==1){if(K.value){se(ce);return}if(G.value){q(ce);return}if(Z.value){pe(ce);return}}}function z(ce){if(le(),ce.buttons!=1)return;const Me=s.value.getBoundingClientRect(),be=ce.pageX-Me.x,Ee=ce.pageY-Me.y;Z.value={offset:{x:be,y:Ee},isPerfected:!1}}async function ae(ce){if(G.value&&x(),K.value===null)return;const Me=Q(ce);if(!Me){K.value=null;return}const{fromNodeId:be,fromOutId:Ee}=K.value;if(be==Me){K.value=null;return}p(K.value.fromNodeId,{toNodeId:Me,outId:Ee})}function F(ce,Me){const be=A.value.map(ze=>_e(ze.id)).filter(Boolean),{x:Ee,y:Ve}=nv({...Me,width:240,height:180},be,dn);y(ce,o,void 0,{x:Ee,y:Ve})}function U(ce){var ot;const Me=ye(ce),be=(ot=s.value)==null?void 0:ot.getBoundingClientRect();if(!Me||!be)return;const{width:Ee,height:Ve}=Me,ze=n.getComponentById(ce);ze&&Le(ze.x-be.width/2+Ee/2,ze.y-be.height/2+Ve/2)}function Y(ce){Le(ce.x,ce.y)}function fe(ce){const Me=A.value.map(Ve=>({id:Ve.id,type:Ve.type,content:Ve.content,outs:Ve.outs})),be=JSON.stringify(Me),Ee=`
	<example>
		<description>
			${ce}
		</description>
		<blueprint>
			${be}
		</blueprint>
	</example>`.trim();UB(Ee)}function ve(ce){h.value=Math.max(Math.min(so.maxLevel,ce),so.minLevel)}function Pe(ce){ve(ce)}function Le(ce,Me){c.value={x:Math.max(0,ce),y:Math.max(0,Me)}}function rt(ce){Le(c.value.x+ce.deltaX*I.value,c.value.y+ce.deltaY*I.value)}function pt(ce){const Me=.006666666666666667,be=s.value.getBoundingClientRect(),Ee=h.value;h.value=Math.min(Math.max(h.value-ce.deltaY*Me,so.minLevel),so.maxLevel);const Ve={w:be.width*(1/Ee)*I.value*(h.value-Ee),h:be.height*(1/Ee)*I.value*(h.value-Ee)},ze={x:(ce.pageX-be.x)/be.width,y:(ce.pageY-be.y)/be.height};Le(c.value.x+Ve.w*ze.x,c.value.y+Ve.h*ze.y)}async function dt(ce){if(ce.preventDefault(),!ce.ctrlKey&&!rd(ce)){rt(ce);return}pt(ce)}async function zt(){const{width:Me,height:be,x:Ee,y:Ve}=s.value.getBoundingClientRect(),ze=i.value.querySelectorAll("[data-writer-id]"),{maxX:ot,maxY:Tt}=Array.from(ze).reduce((Dt,Jt)=>{const Kt=Jt.getBoundingClientRect();return{maxY:Math.max(Dt.maxY,(Kt.bottom-Ve)*I.value+c.value.y),maxX:Math.max(Dt.maxX,(Kt.right-Ee)*I.value+c.value.x)}},{maxY:0,maxX:0}),ht=Math.min((Me-48)/ot,(be-48)/Tt);ve(ht),Le(0,0)}async function Nt(ce){if(d.value=!1,!ce)return;const{components:Me}=ce;Me.forEach(be=>{y(be.type,o,void 0,be)}),await ar(),V("socketPosition")}We(r.firstSelectedItem,ce=>{ce&&(u.value=null,n.isChildOf(o,ce.componentId)&&ce.source!=="click"&&U(ce.componentId))});function nn(ce){if(rd(ce)&&(ce.code==="Backquote"||ce.code==="Backslash")){Ie.value=!Ie.value;return}if(!r.selection.value.length)return;const be=ce.target;if(be.tagName==="INPUT"||be.tagName==="TEXTAREA")return;function Ee(){switch(ce.key){case"ArrowDown":return{x:0,y:dn};case"ArrowUp":return{x:0,y:-dn};case"ArrowLeft":return{x:-dn,y:0};case"ArrowRight":return{x:dn,y:0}}}const Ve=Ee();if(Ve===void 0)return;ce.preventDefault();const ze=r.selection.value.map(ot=>n.getComponentById(ot.componentId)).filter(ot=>(ot==null?void 0:ot.x)!==void 0&&(ot==null?void 0:ot.y)!==void 0).reduce((ot,Tt)=>(ot[Tt.id]=nd({x:Tt.x,y:Tt.y},Ve),ot),{});k(ze)}const Zt=new AbortController;return ln(async()=>{var ce;await zt(),await ar(),Ae(),(ce=s.value)==null||ce.addEventListener("wheel",dt,{signal:Zt.signal}),document.addEventListener("keydown",nn,{signal:Zt.signal}),m.observe(i.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0}),window.createAutogenExample=fe}),Or(()=>{Zt.abort(),m.disconnect()}),(ce,Me)=>{var be;return E(),M("div",{ref_key:"rootEl",ref:s,class:"BlueprintsBlueprint","data-writer-unselectable":we.value,onClick:Ge,onDragover:Me[1]||(Me[1]=lr(()=>{},["prevent","stop"])),onDrop:ie,onMousemove:B,onMousedown:z,onMouseup:ae},[L("div",{ref_key:"nodeContainerEl",ref:i,class:"nodeContainer"},[(E(),M("svg",null,[L("defs",null,[L("pattern",{id:"grid",width:dn,height:dn,patternUnits:"userSpaceOnUse",x:-c.value.x-dn/2,y:-c.value.y-dn/2},[L("circle",{cx:dn/2,cy:dn/2,r:"1",fill:P(St).Gray3},null,8,jB)],8,FB)]),P(Ie)?(E(),M("rect",VB)):ge("",!0),(E(!0),M(Ye,null,Pt(l.value,(Ee,Ve)=>(E(),De(rv,{key:Ve,arrow:Ee,"is-selected":u.value==Ve,"is-engaged":u.value==Ve||P(r).isComponentIdSelected(Ee.fromNodeId)||P(r).isComponentIdSelected(Ee.toNodeId),onClick:ze=>Be(ze,Ve),onDelete:ze=>je(Ee)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(be=K.value)!=null&&be.liveArrow?(E(),De(rv,{key:"liveArrow",arrow:K.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):ge("",!0)])),(E(!0),M(Ye,null,Pt(A.value,Ee=>{var Ve,ze,ot,Tt,ht,Dt,Jt,Kt;return E(),De(os(P(a)(Ee.id,0)),{key:Ee.id,style:bt({top:`${(((ze=(Ve=_.value)==null?void 0:Ve[Ee.id])==null?void 0:ze.y)??Ee.y)-c.value.y}px`,left:`${(((Tt=(ot=_.value)==null?void 0:ot[Ee.id])==null?void 0:Tt.x)??Ee.x)-c.value.x}px`,"border-color":((Dt=(ht=K.value)==null?void 0:ht.liveArrow)==null?void 0:Dt.toNodeId)==Ee.id?(Kt=(Jt=K.value)==null?void 0:Jt.liveArrow)==null?void 0:Kt.color:void 0}),onMousedown:lr(Yt=>ue(Yt,Ee.id),["stop"]),onOutMousedown:Yt=>J(Ee.id,Yt)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),Fe(P(t),{class:"blueprintsToolbar",onAutogenClick:Me[0]||(Me[0]=Ee=>d.value=!0)}),d.value?(E(),De(pB,{key:0},{default:Ze(()=>[Fe(DB,{onBlockGeneration:Nt})]),_:1})):ge("",!0),P(i)?(E(),De(aB,{key:1,"node-container-el":P(i),"render-offset":c.value,"zoom-level":h.value,class:"navigator",onAutoArrange:me,onChangeRenderOffset:Y,onChangeZoomLevel:Pe,onResetZoom:zt},null,8,["node-container-el","render-offset","zoom-level"])):ge("",!0)],40,BB)}}}),WB=ke(KB,[["__scopeId","data-v-fbe8f0b4"]]),qB={class:"alias"},GB=["contenteditable"],JB=Ce({__name:"BlueprintsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=te(re.core),r=te(re.builderManager),{setContentValue:a}=Uf(n,r),o=j(()=>{var h;return(h=n.getComponentById(t.componentId))==null?void 0:h.content.alias}),s=j(()=>!!o.value),i=it("aliasEditorEl"),l=$e(!1);async function c(){if(l.value)return;l.value=!0,await ar();const h=i.value;h.focus();const m=document.createRange(),_=window.getSelection();m.setStart(h,h.childNodes.length),m.collapse(!0),_.removeAllRanges(),_.addRange(m)}function u(){const h=i.value.textContent;i.value.blur(),l.value=!1,a(t.componentId,"alias",h)}function d(h){l.value&&h.stopPropagation()}return(h,m)=>(E(),M("div",{class:ut(["BlueprintsNodeNamer",{beingEdited:l.value,hasEyebrow:s.value||l.value}]),"data-writer-unselectable":"true"},[L("div",{class:"blockName",onClick:c},Te(h.blockName),1),L("div",qB,[s.value||l.value?(E(),M("div",{key:0,ref_key:"aliasEditorEl",ref:i,class:"aliasEditor",contenteditable:l.value,"data-writer-unselectable":"true",onClick:c,onMousemove:d,onBlur:u,onKeydown:da(u,["enter"])},Te(o.value),41,GB)):ge("",!0)])],2))}}),YB=ke(JB,[["__scopeId","data-v-2b0e7f1e"]]),XB={key:0,class:"side"},QB={class:"extraBorder"},ZB={key:0,class:"runner"},e4={class:"main"},t4={class:"title"},n4={key:0,class:"deprecationNotice"},r4={key:0},a4=["data-writer-socket-id","onMousedownCapture"],o4={key:1},s4={class:"outputs"},i4=["data-writer-socket-id","onMousedownCapture"],l4={writer:{name:"Node",description:"A Blueprints node.",toolkit:"blueprints",category:"Other",fields:{alias:{name:"Alias",type:W.Text}},allowedParentTypes:["blueprints_blueprint"],previewField:"alias"}},c4=Ce({...l4,__name:"BlueprintsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,r=te(re.core),a=te(re.builderManager),o=te(re.componentId),s=te(re.evaluatedFields),i=j(()=>r.getComponentById(o)),l=j(()=>{var b;return r==null?void 0:r.getComponentDefinition((b=i.value)==null?void 0:b.type)}),c=j(()=>{var b;return((b=l==null?void 0:l.value)==null?void 0:b.category)=="Triggers"}),u=j(()=>{var b;return((b=l==null?void 0:l.value)==null?void 0:b.category)=="Writer"}),d=j(()=>{var b;return(b=l==null?void 0:l.value)==null?void 0:b.deprecated}),h=j(()=>{var b;return m.value==null?null:m.value=="in_progress"?"running":((b={...g.value}[m.value])==null?void 0:b.style)??"success"}),m=j(()=>{const b=a.getLogEntries();for(let S=0;S<b.length;S++){const K=b[S].blueprintExecution;if(K)for(let G=0;G<K.summary.length;G++){const Z=K.summary[G];if(Z.componentId===i.value.id)return Z.outcome}}return null}),_=j(()=>a.isComponentIdSelected(o)),g=j(()=>{const b={};return Object.entries(l.value.outs??{}).forEach(([S,R])=>{R.style!="dynamic"&&(b[S]=R)}),b}),w=j(()=>{var S;const b=new Set([...Object.keys(g.value),...Object.values(C.value).flatMap(Object.keys)]);return(((S=i.value)==null?void 0:S.outs)??[]).reduce((R,{outId:K})=>{if(!b.has(K))return R[K]={name:K,style:"dynamic",description:""},R},{})});function A(b){const R=l.value.fields[b].type==W.Tools,K=Object.keys(s[b].value??{});return R?K.filter(Z=>{var Ie;return((Ie=s[b].value[Z])==null?void 0:Ie.type)=="function"}):K}const C=j(()=>{const b={};return Object.entries(l.value.outs??{}).forEach(([S,R])=>{if(R.style!=="dynamic")return;if(!R.field){b.default??(b.default={}),b.default[S]={...R};return}b[R.field]={},A(R.field).forEach(G=>{b[R.field][`${S}_${G}`]={name:G,description:"Dynamically created",style:"dynamic"}})}),b});function y(b,S){b.stopPropagation(),n("outMousedown",S)}const p=j(()=>{if(["success","error"].includes(h.value)){const S=`/status/${h.value}.svg`;return[ad(S)]}const b=[`/components/${i.value.type}.svg`,`/components/blueprints_category_${l.value.category}.svg`];return r.featureFlags.value.includes("custom_block_icons")&&b.unshift(`/static/components/${i.value.id}.svg`),b.map(S=>ad(S))});return We(_,()=>{n("engaged")}),(b,S)=>(E(),M("div",{class:ut(["BlueprintsNode",{"BlueprintsNode--trigger":c.value,"BlueprintsNode--intelligent":u.value,"BlueprintsNode--deprecated":d.value,"BlueprintsNode--running":h.value=="running","BlueprintsNode--success":h.value=="success","BlueprintsNode--error":h.value=="error"}])},[u.value&&h.value===null?(E(),M("div",XB)):ge("",!0),L("div",QB,[h.value=="running"?(E(),M("div",ZB)):ge("",!0)]),L("div",e4,[L("div",t4,[Fe(nb,{urls:p.value},null,8,["urls"]),Fe(YB,{"component-id":P(o),class:"nodeNamer","block-name":l.value.name},null,8,["component-id","block-name"]),d.value?(E(),M("div",n4," Deprecated ")):ge("",!0)]),(E(!0),M(Ye,null,Pt(C.value,(R,K)=>{var G;return E(),M("div",{key:K,class:"outputs"},[(G=l.value.fields)!=null&&G[K]?(E(),M("h4",r4,Te(l.value.fields[K].name),1)):ge("",!0),(E(!0),M(Ye,null,Pt(R,(Z,Ie)=>(E(),M("div",{key:Ie,class:"output"},[tn(Te(Z.name)+" ",1),L("div",{class:ut(["ball",Z.style]),"data-writer-socket-id":Ie,"data-writer-unselectable":!0,onClickCapture:S[0]||(S[0]=lr(()=>{},["stop"])),onMousedownCapture:de=>y(de,Ie)},null,42,a4)]))),128)),Object.keys(R).length==0?(E(),M("div",o4,"None configured.")):ge("",!0)])}),128)),L("div",s4,[(E(!0),M(Ye,null,Pt({...g.value,...w.value},(R,K)=>(E(),M("div",{key:K,class:"output"},[K!=="trigger"?(E(),M(Ye,{key:0},[tn(Te(R.name),1)],64)):ge("",!0),L("div",{class:ut(["ball",R.style]),"data-writer-socket-id":K,"data-writer-unselectable":!0,onClickCapture:S[1]||(S[1]=lr(()=>{},["stop"])),onMousedownCapture:G=>y(G,K)},null,42,i4)]))),128))])])],2))}}),u4=ke(c4,[["__scopeId","data-v-0cb452ec"]]),d4="The root component of the application, which serves as the starting point of the component hierarchy.",f4={writer:{name:"Blueprints Root",toolkit:"blueprints",category:"Root",description:d4,allowedChildrenTypes:["blueprints_blueprint"],fields:{}}},p4=Ce({...f4,__name:"BlueprintsRoot",setup(e){const t=te(re.core),n=te(re.getChildrenVNodes),r=it("rootEl"),a=j(()=>{const o=t.activePageId.value;if(!!t.getComponentById(o)&&t.isChildOf("blueprints_root",o))return o;const i=t.getComponents("blueprints_root",{includeBMC:!0,includeCMC:!1,sortedByPosition:!0});return i.length==0?null:i[0].id});return(o,s)=>(E(),M("div",{ref_key:"rootEl",ref:r,class:"BlueprintsRoot","data-writer-container":""},[(E(!0),M(Ye,null,Pt(P(n)(),i=>(E(),M(Ye,{key:i.key},[i.key===`${a.value}:0`?(E(),De(os(i),{key:0})):ge("",!0)],64))),128))],512))}}),h4=ke(p4,[["__scopeId","data-v-01d7b606"]]),Hf={root:x3,page:b3,sidebar:ID,button:i5,text:vM,section:vD,header:lD,heading:PP,dataframe:CP,html:lb,pagination:k5,repeater:M5,column:QL,columns:nD,tab:MD,tabs:FD,link:TM,horizontalstack:fD,separator:bD,image:VP,pdf:e3,iframe:i3,googlemaps:p3,mapbox:R3,icon:NP,timer:D5,textinput:pL,textareainput:yL,numberinput:PR,sliderinput:tL,rangeinput:lL,colorinput:ON,dateinput:FN,timeinput:$L,radioinput:BR,checkboxinput:$N,dropdowninput:WN,selectinput:zR,multiselectinput:IR,fileinput:sR,webcamcapture:K5,vegalitechart:_M,plotlygraph:dM,metric:iM,message:ZP,videoplayer:$M,chatbot:cO,step:GD,steps:t5,ratinginput:OL,tags:yO,switchinput:FL,reuse:q5,avatar:EO,annotatedtext:RO,jsonviewer:rN,blueprints_root:h4,blueprints_blueprint:WB,progressbar:mN},Gs={};function m4(e){const t=`Component type "${e}" not supported. If it's a custom component, please ensure it's been loaded.`;return{writer:{name:"Fallback Component",allowedChildrenTypes:["*"],description:t,category:"Fallback"},setup(n,{slots:r}){return()=>ja("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,r.default({})])}}}function v4(e){var a,o;const t={blueprints_node:u4},n=Gs[e];if(!n)return;const r=n.baseType;return{...t[r],writer:{...t[r].writer,...Gs[e].writer,fields:{...(a=t[r].writer)==null?void 0:a.fields,...(o=Gs[e].writer)==null?void 0:o.fields}}}}function g4(e){return v4(e)??Hf[e]??m4(e)}function si(e){var t;return(t=g4(e))==null?void 0:t.writer}function zf(){return[...Object.keys(Hf),...Object.keys(Gs)]}function y4(e,t){Hf[e]=t}function _4(e,t){Gs[e]=t}function b4(e){let t=!1;return A4(e),Object.entries(e).forEach(([,n])=>{t=S4(n,e)||t,t=w4(n)||t}),t}function w4(e){const t=wn(),n=si(e.type);if(!n||n.category=="Fallback")return t.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let r=!1;return r=k4(e),r=E4(e)||r,C4(e,n),$4(e,n),r}function od(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,r])=>r.parentId===e).forEach(([r])=>od(r,t,n))}function A4(e){const t=wn(),n=Object.fromEntries(Object.entries(e).map(([r])=>[r,!1]));od("root",e,n),od("blueprints_root",e,n),Object.entries(n).forEach(([r,a])=>{a||t.warn(`Component ${r} (${e[r].type}). Orphan component.`)})}function C4(e,t){const n=wn(),r=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(a=>{r.includes(a)||n.warn(`Component ${e.id} (${e.type}). Field key "${a}" is defined in the component but not in the template.`)})}function $4(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const r=e.binding.eventType;if(n.includes(r)&&t.events[r].bindable)return;wn().warn(`Component ${e.id} (${e.type}). The component is bound to event "${e.binding.eventType}" but the template doesn't define that event or it's not bindable.`)}function S4(e,t){const n=wn();let r=!1;e.id=="root"&&e.position!==0&&n.error("Root must be at position 0."),e.position==-1&&n.error(`Component ${e.id} (${e.type}). Invalid position.`);const a=Object.values(t).filter(i=>i.parentId===e.id&&i.position!==-2&&!i.isCodeManaged);let o=0;return a.forEach(i=>{o+=i.position}),(a.length-1)*a.length/2!==o&&(n.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),I4(a),r=!0),r}function I4(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function E4(e){var n,r,a;let t=!1;if(Object.keys(e.handlers??{}).forEach(o=>{if(!o.startsWith("ss-"))return;const s=`wf-${o.substring(3)}`;e.handlers[s]=e.handlers[o],t=!0,delete e.handlers[o]}),(r=(n=e.binding)==null?void 0:n.eventType)!=null&&r.startsWith("ss-")){const s=`wf-${((a=e.binding)==null?void 0:a.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function k4(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const r={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=r[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.alignment]||e.content.alignment,delete e.content.alignment,n=!0}}else e.type=="section"&&"snapMode"in e.content&&(delete e.content.snapMode,n=!0);return n}function T4(e){let t="";const n=[];let r=!1;for(let o=0;o<e.length;o++){const s=e[o];if(s==="."&&!r){n.push(t),t="";continue}t+=s,s==="\\"?r=!0:r=!1}return n.push(t),n.map(o=>o.replaceAll("\\.","."))}const x4="WriterCustomComponentTemplates";async function P4(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await M4(t):n.endsWith(".css")&&N4(t)}))}async function M4(e){var n;const t=wn();t.log(`Importing custom component templates at "${e}"...`),await en(()=>import(pb()+e),[],import.meta.url),(n=Object.entries(window[x4]))==null||n.forEach(([r,a])=>{O4(r)?(y4(`custom_${r}`,a),t.log(`Registering template for "${r}".`)):t.warn(`custom component '${r}' is ignored. A custom component should be declared using only alphanumeric lowercase and _.`)})}function O4(e){return/^[a-z0-9_]+$/.test(e)}function N4(e){const t=document.createElement("link");t.rel="stylesheet",t.href=pb()+e,document.head.appendChild(t)}function pb(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function R4(e){return typeof e!="object"||e===null?!1:e.type==="file"&&typeof e.content=="string"}function X4(e){return typeof e!="object"||e===null?!1:e.type==="binary"}function ps(e){return typeof e!="object"||e===null?!1:e.type==="directory"&&typeof e.children=="object"}function*L4(e,t=[]){if(!ps(e)){yield t;return}for(const[n,r]of Object.entries(e.children))yield*L4(r,[...t,n])}function*D4(e,t=[]){if(yield t,!!ps(e))for(const[n,r]of Object.entries(e.children))yield*D4(r,[...t,n])}function Kf(e,t){if(e.length===0)return t;if(!ps(t))return;const[n,...r]=e,a=t.children[n];return r.length===0?a:Kf(r,a)}function sd(e,t,n={type:"file",content:"",complete:!0}){var o;const r=structuredClone(t);let a=r;for(let s=0;s<e.length;s++){if(!ps(a))return r;const i=e.at(s);if(s===e.length-1)return a.children[i]=n,r;(o=a.children)[i]??(o[i]={type:"directory",children:{}}),a=a.children[i]}return r}function B4(e,t,n){const r=Kf(e,n);if(ps(r)||r===void 0)return n;const a=hb(e,n);return sd(t,a,structuredClone(r))}function hb(e,t){var a;const n=structuredClone(t);let r=n;for(let o=0;o<e.length;o++){if(!ps(r))return n;const s=e.at(o);if(!(s in r.children))return n;if(o===e.length-1)return delete r.children[s],n;(a=r.children)[s]??(a[s]={type:"directory",children:{}}),r=r.children[s]}return n}const F4=1e3,j4=6e4;function V4(){let e=null;const t=$e(null),n=$e(null),r=$e(),a=En([]),o=$e(null),s=En({type:"directory",children:{}}),i=$e({}),l=$e([]),c=$e({});let u;const d=$e("idle");let h=0;const m=$e(new Map);let _=[],g=[];const w=$e(null);async function A(){await C(),p(),n.value=="edit"}async function C(){const B=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),z=await B.json();if(B.status>400)throw"Connection rejected.";z.extensionPaths&&await P4(z.extensionPaths),n.value=z.mode,i.value=z.components,c.value=z.userState,G(z.mail),e=z.sessionId,t.value=new Date().getTime(),a.value=z.featureFlags,r.value=z.writerApplication,y(z.abstractTemplates),l.value=z.userFunctions,o.value=z.runCode,s.value=z.sourceFiles,await K(),!(n.value!="edit"||!b4(z.components))&&await je()}function y(B){Object.entries(B??{}).forEach(([z,ae])=>{_4(z,ae)})}function p(){setTimeout(()=>{O("keepAlive",{},p)},j4)}function b(B){B&&Object.entries(B).forEach(([z,ae])=>{const F=z.charAt(0),U=T4(z.substring(1)),Y=U.length-1;let fe=c.value;const ve=F==="-";for(let Pe=0;Pe<Y;Pe++){const Le=fe==null?void 0:fe[U[Pe]];typeof Le=="object"&&Le!==null?fe=Le:ve||(fe[U[Pe]]={},fe=fe[U[Pe]])}ve?delete fe[U.at(-1)]:fe[U.at(-1)]=ae})}function S(B){B&&(i.value=B)}function R(){m.value.forEach(({callback:B})=>{B==null||B({ok:!1})}),m.value.clear()}async function K(){if(u)return;const B=wn(),z=new URL("./api/stream",window.location.href);return z.protocol=z.protocol.replace("https","wss"),z.protocol=z.protocol.replace("http","ws"),u=new WebSocket(z.href),u.onopen=()=>{R(),d.value="connected",B.log("WebSocket connected. Initialising stream..."),O("streamInit",{sessionId:e})},u.onmessage=ae=>{var Y,fe,ve,Pe;const F=JSON.parse(ae.data);if(F.messageType=="announcement"&&F.payload.type=="codeUpdate"){u.close(),C();return}if(F.messageType=="announcement"&&F.payload.type=="componentUpdate"){const Le={};Object.entries(i.value).forEach(([rt,pt])=>{pt.isCodeManaged&&(Le[rt]=pt)}),i.value={...Le,...F.payload.payload};return}if(F.messageType=="announcement"&&F.payload.type=="mail"){G(F.payload.payload);return}(F.messageType=="eventResponse"||F.messageType=="stateEnquiryResponse")&&(b((Y=F.payload)==null?void 0:Y.mutations),G((fe=F.payload)==null?void 0:fe.mail),S((ve=F.payload)==null?void 0:ve.components));const U=m.value.get(F.trackingId);(Pe=U==null?void 0:U.callback)==null||Pe.call(U,{ok:!0,payload:F.payload}),m.value.delete(F.trackingId)},u.onclose=async ae=>{if(u=null,d.value="offline",ae.code==1008){B.error("Invalid session. Reinitialising..."),await C();return}B.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await K()}catch{B.error("Couldn't reconnect.")}},F4)},new Promise((ae,F)=>{u.addEventListener("open",()=>ae(),{once:!0}),u.addEventListener("close",()=>F(),{once:!0})})}function G(B=[]){_.push(...B),_=_.filter(z=>{const ae=g.filter(F=>F.mailType==z.type);if(ae.length==0)return z;ae.forEach(F=>F.fn(z.payload))})}function Z(B,z){g.push({mailType:B,fn:z}),G()}function Ie(B,z){g=g.filter(ae=>!(ae.mailType===B&&ae.fn===z))}function de(B){var ae;let z=null;if(B instanceof CustomEvent)z=((ae=B.detail)==null?void 0:ae.payload)??null;else{const F={};for(const U in B){const Y=B[U];typeof Y!="function"&&(Y instanceof Object||(F[U]=Y))}z=F}return z}async function Ae(B,z,ae){var ve,Pe;const F=ae?de(B):null;let U,Y;B instanceof CustomEvent&&(U=(ve=B.detail)==null?void 0:ve.callback,Y=(Pe=B.detail)==null?void 0:Pe.handler),O("event",async()=>({type:B.type,instancePath:z,handler:Y,payload:await F}),U,!0)}async function we(B){return new Promise((z,ae)=>{O("hashRequest",{message:B},U=>{var Y;if(!U.ok)return ae("Couldn't connect to the server.");z((Y=U.payload)==null?void 0:Y.message)})})}function Ge(B,z){const ae=structuredClone(gt(s.value)),F=Kf(z,ae);R4(F)&&(F.content=B,F.complete=!0,s.value=ae)}async function xe(B){return new Promise((z,ae)=>{O("createSourceFile",{path:B},U=>{var Y;if(!U.ok)return ae("Couldn't connect to the server.");if((Y=U.payload)!=null&&Y.error)return ae("Couldn't create the file.");s.value=sd(B,gt(s.value)),z()})})}async function ye(B,z){return new Promise((ae,F)=>{O("uploadSourceFile",{path:B,content:z},Y=>{var fe,ve;if(!Y.ok)return F("Couldn't connect to the server.");if((fe=Y.payload)!=null&&fe.error)return F("Couldn't upload the file.");s.value=((ve=Y.payload)==null?void 0:ve.sourceFiles)??sd(B,gt(s.value)),ae()})})}async function _e(B,z){return new Promise((ae,F)=>{O("renameSourceFile",{from:B,to:z},Y=>{var fe;if(!Y.ok)return F("Couldn't connect to the server.");if((fe=Y.payload)!=null&&fe.error)return F("Couldn't rename the file.");s.value=B4(B,z,gt(s.value)),ae()})})}async function He(B){return new Promise((z,ae)=>{O("deleteSourceFile",{path:B},U=>{var Y;if(!U.ok)return ae("Couldn't connect to the server.");if((Y=U.payload)!=null&&Y.error)return ae("Couldn't delete the file.");s.value=hb(B,gt(s.value)),z()})})}async function me(B,z=["main.py"]){return new Promise((ae,F)=>{O("codeSaveRequest",{code:B,path:z},Y=>{if(!Y.ok)return F("Couldn't connect to the server.");Ge(B,z),ae()}),z.join("/")==="main.py"&&(d.value="suspended")})}function V(B){return new Promise((z,ae)=>{O("loadSourceFile",{path:B},U=>{if(!U.ok)return ae("Couldn't connect to the server.");Ge(U.payload.content,B),z()})})}async function ue(B){return new Promise((z,ae)=>{O("listResources",{resource_type:B},U=>{var Y;if(!U.ok)return ae("Couldn't connect to the server.");z(((Y=U.payload)==null?void 0:Y.data)??[])})})}async function J(B){O("stateEnquiry",{},B,!0)}function I(B){const F=(U=0)=>{const Y=m.value.get(B);Y!==void 0&&(U==0&&Y.type=="stateEnquiry"||J(()=>setTimeout(()=>F(U+1),150)))};setTimeout(()=>F(0),150)}async function O(B,z,ae,F=!1){if(d.value=="offline"||d.value=="suspended"){ae==null||ae({ok:!1});return}const U=wn(),Y=h++;try{(ae||F)&&m.value.set(Y,{type:B,callback:ae}),F&&I(Y);let fe;typeof z=="function"?fe=await z():fe=z;const ve={type:B,trackingId:Y,payload:fe};if(u.readyState!==u.OPEN)throw"Connection lost.";u.send(JSON.stringify(ve,my))}catch(fe){U.error("sendFrontendMessage error",fe),ae==null||ae({ok:!1})}}function ie(B){delete i.value[B]}function Be(B){i.value[B.id]=B}async function je(){const B={};Object.entries(i.value).forEach(([ae,F])=>{F.isCodeManaged||(B[ae]=F)});const z={components:B};return new Promise((ae,F)=>{O("componentUpdate",z,Y=>{if(!Y.ok)return F("Couldn't connect to the server.");ae()})})}function ne(B){return i.value[B]}function Q(B,z){let ae=i.value[z];do{if(ae.parentId==B)return!0;ae=i.value[ae.parentId]}while(ae);return!1}function se(B,{includeBMC:z=!0,includeCMC:ae=!0,sortedByPosition:F=!1}={}){let U=Object.values(i.value);return typeof B<"u"&&(U=U.filter(Y=>Y.parentId==B)),U=U.filter(Y=>{const fe=Y.isCodeManaged;return z&&!fe||ae&&fe}),F&&(U=U.sort((Y,fe)=>Y.isCodeManaged&&!fe.isCodeManaged?1:!Y.isCodeManaged&&fe.isCodeManaged?-1:Y.position>fe.position?1:-1)),U}function*le(B,z={}){for(const ae of se(B,z))yield ae,yield*le(ae.id,z)}function k(B){const ae=se("root").filter(F=>F.content.key==B);ae.length!=0&&x(ae[0].id)}function x(B){w.value=B}function q(B){return Vf(i.value,B)}return{webSocket:u,syncHealth:d,frontendMessageMap:In(m),mode:In(n),userFunctions:In(l),addMailSubscription:Z,removeMailSubscription:Ie,init:A,forwardEvent:Ae,hashMessage:we,runCode:In(o),sourceFiles:In(s),sendCodeSaveRequest:me,sendCreateSourceFileRequest:xe,sendRenameSourceFileRequest:_e,sendDeleteSourceFileRequest:He,sendFileUploadRequest:ye,requestSourceFileLoading:V,sendListResourcesRequest:ue,sendComponentUpdate:je,addComponent:Be,deleteComponent:ie,getComponentById:ne,getComponents:se,getComponentsNested:le,setActivePageId:x,activePageId:In(w),setActivePageFromKey:k,getComponentDefinition:si,getSupportedComponentTypes:zf,getContainableTypes:q,sessionTimestamp:In(t),userState:In(c),isChildOf:Q,featureFlags:In(a),writerApplication:In(r)}}function U4(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const Ns=V4();globalThis.vue=cS;globalThis.injectionKeys=re;globalThis.core=Ns;const Dl=wn();async function H4(){await Ns.init();const e=Ns.mode.value,t=e=="edit"?FS():void 0;t&&(Ns.addMailSubscription("logEntry",t.handleLogEntry),globalThis.wfbm=t),Dl.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await en(()=>import("./ComponentRenderer-FbxROz85.js"),__vite__mapDeps([10,11,12]),import.meta.url),{default:r}=e==="edit"&&await en(()=>import("./BuilderApp-BuxvU36r.js").then(o=>o.b),__vite__mapDeps([13,14,15]),import.meta.url),a=kl(n||r);a.use(MS),a.provide(re.core,Ns),a.provide(re.builderManager,t),U4(a),a.mount("#app")}Dl.log("Initialising core...");H4().then(async()=>{Dl.log("Core initialised.")}).catch(e=>{Dl.error("Core initialisation failed.",e),document.write(e)});export{gt as $,Pt as A,Lf as B,ut as C,G4 as D,as as E,qe as F,Ht as G,bt as H,ar as I,$3 as J,Y4 as K,A3 as L,en as M,P as N,eb as O,En as P,In as Q,MB as R,Or as S,wn as T,hB as U,pB as V,Rn as W,ge as X,Uf as Y,B_ as Z,ke as _,re as a,L4 as a0,Kf as a1,X4 as a2,R4 as a3,ps as a4,sd as a5,D4 as a6,hb as a7,av as a8,Hv as a9,zr as aA,GA as aB,qr as aC,Xo as aD,nb as aE,Nd as aF,gd as aG,ha as aH,nc as aI,tb as aJ,os as aK,W as aL,W4 as aM,q4 as aN,D2 as aO,z2 as aP,zf as aQ,si as aR,ad as aS,NS as aT,Rf as aU,OS as aV,J4 as aW,rd as aa,lr as ab,da as ac,hR as ad,uo as ae,St as af,fC as ag,O_ as ah,sn as ai,rg as aj,Y$ as ak,fi as al,U3 as am,db as an,BS as ao,xy as ap,K4 as aq,Ho as ar,KI as as,VI as at,LI as au,DI as av,la as aw,gy as ax,_B as ay,hy as az,De as b,j as c,Ce as d,M as e,L as f,u4 as g,g4 as h,te as i,ja as j,mc as k,it as l,Wl as m,ln as n,E as o,ig as p,Dn as q,$e as r,Fe as s,Te as t,fb as u,Tr as v,We as w,Ze as x,tn as y,Ye as z};
