@milaboratories/uikit 2.2.45 → 2.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/pl-uikit.js +7729 -5295
- package/dist/pl-uikit.umd.cjs +12 -8
- package/dist/src/components/PlChartHistogram/PlChartHistogram.vue.d.ts +6 -0
- package/dist/src/components/PlChartHistogram/createGridlines.d.ts +3 -0
- package/dist/src/components/PlChartHistogram/createLabels.d.ts +3 -0
- package/dist/src/components/PlChartHistogram/createSvgContainer.d.ts +3 -0
- package/dist/src/components/PlChartHistogram/drawBins.d.ts +2 -0
- package/dist/src/components/PlChartHistogram/drawThreshold.d.ts +2 -0
- package/dist/src/components/PlChartHistogram/histogram.d.ts +4 -0
- package/dist/src/components/PlChartHistogram/index.d.ts +1 -0
- package/dist/src/components/PlChartHistogram/logspace.d.ts +1 -0
- package/dist/src/components/PlChartHistogram/normalizeBins.d.ts +2 -0
- package/dist/src/components/PlChartHistogram/scales.spec.d.ts +1 -0
- package/dist/src/components/PlChartHistogram/types.d.ts +58 -0
- package/dist/src/components/PlDialogModal/PlDialogModal.vue.d.ts +10 -0
- package/dist/src/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +1 -0
- package/dist/src/composition/useComponentProp.d.ts +33 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/src/colors/__tests__/colors.spec.ts +0 -2
- package/src/components/PlChartHistogram/PlChartHistogram.vue +90 -0
- package/src/components/PlChartHistogram/createGridlines.ts +42 -0
- package/src/components/PlChartHistogram/createLabels.ts +32 -0
- package/src/components/PlChartHistogram/createSvgContainer.ts +23 -0
- package/src/components/PlChartHistogram/drawBins.ts +55 -0
- package/src/components/PlChartHistogram/drawThreshold.ts +19 -0
- package/src/components/PlChartHistogram/histogram.ts +136 -0
- package/src/components/PlChartHistogram/index.ts +1 -0
- package/src/components/PlChartHistogram/logspace.ts +13 -0
- package/src/components/PlChartHistogram/normalizeBins.ts +19 -0
- package/src/components/PlChartHistogram/scales.spec.ts +10 -0
- package/src/components/PlChartHistogram/types.ts +66 -0
- package/src/components/PlDialogModal/PlDialogModal.vue +41 -2
- package/src/components/PlDropdownMulti/PlDropdownMulti.vue +1 -2
- package/src/components/PlDropdownMultiRef/PlDropdownMultiRef.vue +1 -0
- package/src/components/PlDropdownMultiRef/__tests__/PlDropdownMultiRef.spec.ts +1 -3
- package/src/components/PlProgressCell/PlProgressCell.vue +0 -2
- package/src/composition/useComponentProp.ts +36 -0
- package/src/helpers/index.ts +1 -1
- package/src/index.ts +2 -0
- package/src/types.ts +3 -1
package/dist/pl-uikit.umd.cjs
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
(function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w["pl-uikit"]={},w.Vue))})(this,function(w,e){"use strict";var Sp=Object.defineProperty;var Dp=(w,e,me)=>e in w?Sp(w,e,{enumerable:!0,configurable:!0,writable:!0,value:me}):w[e]=me;var En=(w,e,me)=>Dp(w,typeof e!="symbol"?e+"":e,me);function me(n,t){if(n==null)throw Error(t??"Empty (null | undefined) value");return n}function xn(n,t,o){const s=Math.min(t,o),r=Math.max(t,o);return n>=s&&n<=r}function $n(n){return new Promise(t=>setTimeout(t,n))}function Nn(n){return n()}function ht(n,t,o){return t>n?t:n>o?o:n}function co(n,t){return t(n)}function ge(n,t){if(n!=null)return t(n)}function Tn(n){if(n&&n.ok)return n.value}async function Sn(n){return Object.fromEntries(await Promise.all(Object.entries(n).map(async([t,o])=>[t,await o])))}const po=n=>n;function Fp(n){return n}function Dn(n,t){return n=Math.ceil(n),t=Math.floor(t),Math.floor(Math.random()*(t-n))+n}function Fn(n,t=[]){for(n=n?String(n):"";t.includes(n.charAt(0));)n=n.substring(1);return n}function Mn(n){let t="";for(let o=0;o<n;o++)t+=String.fromCharCode(Dn(65,91));return t}function mo(){return Mn(42)}const Ue=Array.isArray;function gt(n){return n!==null&&typeof n=="object"}function Fe(n){if(typeof n!="object"||n===null)return!1;const t=Object.getPrototypeOf(n);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}function An(n,t){return Object.keys(n).map(o=>t(n[o],o))}function uo(n){return Object.values(n).reduce((t,o)=>o!==void 0?t+1:t,0)}function yt(n,t){if(!(gt(n)&>(t)))return n===t;if(Ue(n)&&Ue(t))return n.length!==t.length?!1:[...n.keys()].every(o=>yt(n[o],t[o]));if(Fe(n)&&Fe(t))return uo(n)!==uo(t)?!1:Object.keys(n).every(o=>yt(n[o],t[o]));throw Error(`Cannot compare a ${String(n)} and b ${String(t)}`)}const kt=yt;function We(n){if(Array.isArray(n)){const t=[];for(let o=0;o<n.length;o++)t[o]=We(n[o]);return t}else if(Fe(n)){const t={};return Object.keys(n).forEach(o=>{t[o]=We(n[o])}),t}else return n}function zn(n){return Array.isArray(n)?Object.assign([],n):gt(n)?Object.assign({},n):n}function Pn(n,t){const o={};for(const s in t)t[s]!==n[s]&&(o[s]=n[s]);return o}function On(n){return Object.entries(n).forEach(([t,o])=>{o instanceof Function&&(n[t]=o.bind(n))}),n}function Rn(n,t,o){return n[t]=o,n}function In(n,t){return n[t]}function Ln(n,t){n={...n};const o=n[t];return delete n[t],[o,n]}function jn(n,...t){return Object.assign({},...t.map(o=>({[o]:n[o]})))}function vn(n,...t){return t.map(o=>n[o])}function Hn(n,...t){const o=Object.assign({},n);return t.forEach(s=>delete o[s]),o}function fo(n,t){return new Set([...Object.keys(n),...Object.keys(t)]).forEach(o=>{const s=n[o],r=t[o];Fe(s)&&Fe(r)||Ue(s)&&Ue(r)&&s.length===r.length?fo(s,r):n[o]=r}),n}const Dt=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:On,deepClone:We,deepEqual:kt,deepPatch:fo,getProp:In,isArray:Ue,isJsonEqual:yt,isNonPrimitive:gt,isPlainObject:Fe,map:An,omit:Hn,pick:jn,pickValues:vn,setProp:Rn,shallowClone:zn,shallowDiff:Pn,shiftProp:Ln},Symbol.toStringTag,{value:"Module"}));function Zn(n,t){const o=n.findIndex(t);if(o<0)return[];const s=(()=>{for(let r=o;r<n.length;r++)if(!t(n[r],r))return r;return n.length})();return n.slice(o,s)}function Un(n,t,o){let s;return function(...r){const l=o&&!s;l&&n.apply(this,r),s&&clearTimeout(s),s=setTimeout(()=>{s=void 0,l||n.apply(this,r)},t)}}const Wn=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],qn=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Kn=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Yn=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ho=(n,t)=>{let o=String(n);return typeof t=="string"||Array.isArray(t)?o=n.toLocaleString(t):t===!0&&(o=n.toLocaleString(void 0)),o};function Ft(n,t){if(n=typeof n=="bigint"?Number(n):n,!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);Object.assign(t,{bits:!1,binary:!1});const o=t.bits?t.binary?Yn:Kn:t.binary?qn:Wn;if(t.signed&&n===0)return` 0 ${o[0]}`;const s=n<0,r=s?"-":t.signed?"+":"";if(s&&(n=-n),n<1){const c=ho(n,t.locale);return r+c+" "+o[0]}const l=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),o.length-1);n/=(t.binary?1024:1e3)**l,n=Number(n.toPrecision(3));const i=ho(Number(n),t.locale),a=o[l];return r+i+" "+a}const Gn={class:"context-menu"},Xn=["onClick"],Jn=e.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(n,{emit:t}){const o=t,s=r=>{r.cb(),o("close")};return(r,l)=>(e.openBlock(),e.createElementBlock("div",Gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(i,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,onClick:e.withModifiers(c=>s(i),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(i.text),1)],8,Xn))),128))]))}}),Y=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},Qn=Y(Jn,[["__scopeId","data-v-12530966"]]);function Mt(n,t){n.preventDefault();const o=()=>{e.render(null,document.body)},s=e.h(Qn,{options:t,onClose:()=>{o()}});e.render(s,document.body);const r=s.el;return r.style.top=n.clientY+"px",r.style.left=n.clientX+"px",document.addEventListener("click",l=>{r.contains(l.target)||o()}),o}const go=Symbol(),_t=()=>e.inject(go),er=["value"],tr={key:1},or=e.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.reactive({edit:!1}),l=e.computed(()=>s.valueType),i=d=>{var y;const p=(y=d.target)==null?void 0:y.value,m=e.unref(l),k=Nn(()=>m==="integer"?parseInt(p,10):m==="float"?Number(p):p);o("update:modelValue",k),r.edit=!1},a=e.ref(),c=d=>{!d.metaKey&&s.editable&&(r.edit=!0,requestAnimationFrame(()=>{var p,m;(m=(p=a.value)==null?void 0:p.querySelector("input"))==null||m.focus()}))};return(d,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"baseRef",ref:a,class:e.normalizeClass(["base-cell",{"base-cell__edit":r.edit}]),onClick:c},[r.edit?(e.openBlock(),e.createElementBlock("input",{key:0,value:d.modelValue,onFocusout:p[0]||(p[0]=m=>r.edit=!1),onChange:i},null,40,er)):(e.openBlock(),e.createElementBlock("div",tr,e.toDisplayString(d.modelValue),1))],2))}}),nr=["^data-row-index"],rr={key:0,class:"control-cell"},sr=e.defineComponent({__name:"TdCell",props:{cell:{}},setup(n){const t=n,o=_t(),s=e.computed(()=>t.cell.column.valueType),r=d=>{ge(o.settings.value.onUpdatedRow,p=>{const m=t.cell.row,k={...m.dataRow,[t.cell.id]:d};p({...m,dataRow:k})})},l=d=>{d.metaKey&&o.selectRow(t.cell.row.primaryKey)},i=(d,p)=>{if(d.type==="contextmenu")d.preventDefault();else return;const m=o.settings??{},k=[],{onSelectedRows:y,onSelectedColumns:g}=m.value,V=o.data.selectedRows.has(p.primaryKey);y&&y.length&&(V?k.push({text:"Deselect row",cb(){o.data.selectedRows.delete(t.cell.row.primaryKey)}}):k.push({text:"Select row",cb(){o.selectRow(t.cell.row.primaryKey)}})),g&&g.length&&(k.push({text:"Select column",cb(){o.selectColumn(t.cell.column.id)}}),k.push({text:"Unselect column",cb(){o.unselectColumn(t.cell.column.id)}})),k.length&&Mt(d,k)},a=e.ref(),c=e.computed(()=>t.cell.column.component?t.cell.column.component():void 0);return(d,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"cellRef",ref:a,class:e.normalizeClass(["td-cell",{[d.cell.class]:!0}]),"^data-row-index":d.cell.row.index,onClick:l,onContextmenu:p[0]||(p[0]=m=>i(m,d.cell.row))},[d.cell.control?(e.openBlock(),e.createElementBlock("div",rr,e.toDisplayString(d.cell.row.index),1)):c.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:1,"model-value":d.cell.value,"onUpdate:modelValue":r},null,8,["model-value"])):(e.openBlock(),e.createBlock(or,{key:2,"model-value":d.cell.value,"value-type":s.value,editable:d.cell.column.editable,"onUpdate:modelValue":r},null,8,["model-value","value-type","editable"]))],42,nr))}}),lr={},ar={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ir(n,t){return e.openBlock(),e.createElementBlock("svg",ar,t[0]||(t[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),e.createTextVNode(),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const cr=Y(lr,[["render",ir]]),dr={class:"tr-head"},pr=e.defineComponent({__name:"TrHead",setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",dr,[e.renderSlot(t.$slots,"default")]))}});function mr(n,t){const o=t.indexOf(n)+1;return t[o>=t.length?0:o]}function ur(n,t){const o=n.findIndex(t);if(o<0)return[];const s=(()=>{for(let r=o;r<n.length;r++)if(!t(n[r],r))return r;return n.length})();return n.slice(o,s)}const fr=["^data-col-id"],hr=e.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(n,{emit:t}){const o=t;function s(l){l.preventDefault();const i=[];i.length&&Mt(l,i)}function r(l){var a;const i=((a=l.sort)==null?void 0:a.direction)??"DESC";o("change:sort",{colId:l.id,direction:mr(i,["DESC","ASC"])})}return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:s},[l.col.valueType?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.col.valueType)},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.col.label)+" ",1),l.col.sort?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["sort",l.col.sort.direction]),onClick:i[0]||(i[0]=e.withModifiers(()=>r(l.col),["stop"]))},null,2)):e.createCommentVNode("",!0)],42,fr))}}),gr=e.defineComponent({__name:"TrBody",props:{row:{}},setup(n){const t=e.ref(),o=()=>{e.nextTick().then(()=>{ge(t.value,s=>s.scrollLeft=0)})};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"trRef",ref:t,class:e.normalizeClass(["tr-body",{selected:s.row.selected}]),scroll:"no",style:e.normalizeStyle(s.row.style),onScroll:o},[e.renderSlot(s.$slots,"default")],38))}}),yr=e.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(n){const t=_t(),o=n,s=e.computed(()=>t.data.selectedColumns.has(o.column.id));return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["column-caret",{selected:s.value,frozen:r.column.frozen}])},null,2))}});function W(n,t,o,s){e.onMounted(()=>{var r;return(r=e.unref(n))==null?void 0:r.addEventListener(t,o,s)}),e.onUnmounted(()=>{var r;return(r=e.unref(n))==null?void 0:r.removeEventListener(t,o,s)})}function kr(n){e.onMounted(()=>window.addEventListener("mouseup",n)),e.onUnmounted(()=>window.removeEventListener("mouseup",n))}function _r(n){let t=!1;return function(...s){t?console.log("handle pressure"):(requestAnimationFrame(()=>{n(...s),t=!1}),t=!0)}}function br(n,t){let o;function s(l){o={...l}}kr(()=>{o=void 0,t()});const r=_r(n);return W(window,"mousemove",l=>{o&&r({x:o.x,width:o.width,diff:l.x-o.x})}),{start:s}}const Me=1,wr=10,Vr=30,yo=60;function ko(){const n=e.reactive({x:0,y:0});function t(o){n.x=o.pageX,n.y=o.pageY}return e.onMounted(()=>window.addEventListener("mousemove",t)),e.onUnmounted(()=>window.removeEventListener("mousemove",t)),n}function _o(n,t={}){const{delayEnter:o=0,delayLeave:s=0}=t,r=e.ref(!1);let l;const i=a=>{const c=a?o:s;l&&(clearTimeout(l),l=void 0),c?l=setTimeout(()=>r.value=a,c):r.value=a};return window&&(W(n,"mouseenter",()=>i(!0)),W(n,"mouseleave",()=>i(!1))),r}function Br(n){var o;const t=ge((o=e.unref(n))==null?void 0:o.querySelectorAll(".th-cell"),s=>[...s])??[];return t.map(s=>{const{width:r,x:l}=s.getBoundingClientRect(),i=s.getAttribute("data-col-id");return po({colId:i,width:r,x:l,right:l+r})}).slice(0,t.length-1)}function Cr(n,t){const o=ko(),s=_o(t,{}),{data:r}=n,l=br(a=>{ge(r.resizeTh,c=>{const d=r.columns.find(p=>p.id===c.colId);d&&(d.width=ht(a.width+a.diff,Vr,1e4),n.adjustWidth())})},()=>{r.resize=!1,r.resizeTh=void 0,document.body.style.cursor=""}),i=a=>{r.resizeTh&&(r.resize=!0,l.start({x:a.x,width:r.resizeTh.width}))};return e.watchEffect(()=>{if(!s.value){document.body.style.cursor="";return}if(r.resize)return;const a=Br(t).find(c=>Math.abs(o.x-c.right)<wr);a?(document.body.style.cursor="col-resize",r.resizeTh=a):(r.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:i}}const Er={key:0,class:"command-menu"},xr={key:0},$r=["onClick"],Nr=e.defineComponent({__name:"RowsCommandMenu",setup(n){const t=_t(),o=e.computed(()=>t.getSelectedRows()),s=e.computed(()=>o.value.length>0),r=e.computed(()=>{var i;return((i=t.settings)==null?void 0:i.value.onSelectedRows)??[]}),l=e.computed(()=>r.value.map(i=>({label:i.label,cb:()=>{i.cb(o.value),t.data.selectedRows.clear(),t.data.rows=[]}})));return(i,a)=>s.value?(e.openBlock(),e.createElementBlock("div",Er,[o.value.length?(e.openBlock(),e.createElementBlock("span",xr,e.toDisplayString(o.value.length)+" rows selected",1)):e.createCommentVNode("",!0),a[0]||(a[0]=e.createTextVNode()),a[1]||(a[1]=e.createElementVNode("hr",null,null,-1)),a[2]||(a[2]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:"command",onClick:e.withModifiers(c.cb,["stop"])},e.toDisplayString(c.label),9,$r))),128))])):e.createCommentVNode("",!0)}}),Tr={key:0,class:"command-menu"},Sr={key:0},Dr=["onClick"],Fr=e.defineComponent({__name:"ColumnsCommandMenu",setup(n){const t=_t(),o=e.computed(()=>t.getSelectedColumns()),s=e.computed(()=>o.value.length>0),r=e.computed(()=>{var i;return((i=t.settings)==null?void 0:i.value.onSelectedColumns)??[]}),l=e.computed(()=>r.value.map(i=>({label:i.label,cb:()=>{i.cb(o.value),t.data.selectedColumns.clear()}})));return(i,a)=>s.value?(e.openBlock(),e.createElementBlock("div",Tr,[o.value.length?(e.openBlock(),e.createElementBlock("span",Sr,"selected columns "+e.toDisplayString(o.value.length),1)):e.createCommentVNode("",!0),a[0]||(a[0]=e.createTextVNode()),a[1]||(a[1]=e.createElementVNode("hr",null,null,-1)),a[2]||(a[2]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:"command",onClick:e.withModifiers(c.cb,["stop"])},e.toDisplayString(c.label),9,Dr))),128))])):e.createCommentVNode("",!0)}});function ye(n,t){const o={el:void 0,x:0,y:0},s=r=>({x:r.x,y:r.y,dx:r.x-o.x,dy:r.y-o.y});W(document,"mousedown",r=>{r.target===e.unref(n)&&(r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault(),o.el=e.unref(n),o.x=r.x,o.y=r.y)}),W(document,"mouseup",r=>{o.el&&(o.el=void 0,t({...s(r),stop:!0},o))}),W(document,"mousemove",r=>{o.el&&t(s(r),o)})}const Mr=e.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(),l=e.computed(()=>s.windowSize-12),i=e.computed(()=>s.windowSize<s.dataSize),a=e.computed(()=>Math.ceil(s.offset*(l.value/s.dataSize))),c=e.computed(()=>Math.ceil(l.value*l.value/s.dataSize)),d=e.computed(()=>({top:`${a.value}px`,height:`${c.value}px`}));return ye(r,(p,m)=>{const k=(a.value+p.dy)*s.dataSize/l.value;o("change:offset",k),m.x=p.x,m.y=p.y}),(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"t-scroll",style:e.normalizeStyle({height:`${p.windowSize}px`})},[e.createElementVNode("div",null,[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"handleRef",ref:r,class:"t-scroll__handle",style:e.normalizeStyle(d.value)},null,4)):e.createCommentVNode("",!0)])],4))}});function Ar(n){return e.computed(()=>{const{data:t,settings:o}=n,{bodyWidth:s,scrollLeft:r}=t,l=[...t.columns],i=mo();o.value.controlColumn&&l.unshift({id:i,label:"#",width:60,frozen:!0});let a=0;const c=l.map(m=>{const k={...m,offset:a};return a+=m.width+Me,k}),d=c.filter(m=>m.frozen);return Zn(c,m=>m.frozen?!1:r<m.offset+m.width&&m.offset<s+r).concat(d).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-t.scrollLeft}px`,width:`${m.width}px`},control:m.id===i}))})}function zr(n,t){const o=e.computed(()=>t.value.reduce((s,r)=>(s[r.id]=r.justify?"justify-"+r.justify:"",s),{}));return e.computed(()=>n.rows.map(s=>{const r=o.value,{primaryKey:l,offset:i,dataRow:a,height:c}=s,d=t.value.map(p=>({id:p.id,column:p,row:s,value:a[p.id],class:r[p.id],editable:p.editable,width:p.width,style:p.style,control:p.control}));return po({style:{top:`${i-n.scrollTop}px`,height:`${s.height}px`},primaryKey:l,offset:i,height:c,cells:d,selected:n.selectedRows.has(l)})}))}const Pr=async(n,t)=>{const{scrollTop:o,bodyHeight:s}=n;return await $n(0),Sn({rows:t.getRows(o,s),dataWindow:n})};function Or(n){const t=e.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:n.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});e.watch(()=>n.settings,m=>{t.columns=We(m.columns),t.currentWindow=void 0,m.dataSource.getHeight().then(k=>{t.dataHeight=k,p.updateBodyHeight()}).catch(k=>t.error=k)},{immediate:!0});const o=e.computed(()=>n.settings),s=e.computed(()=>t.columns.reduce((m,k)=>m+k.width+Me,0)),r=e.computed(()=>co(p.data.dataHeight-p.data.bodyHeight,m=>m>0?m:0)),l=e.computed(()=>co(s.value-p.data.bodyWidth,m=>m>0?m:0)),i=e.computed(()=>({bodyHeight:t.bodyHeight,scrollTop:t.scrollTop,current:t.currentWindow})),a=Ar({data:t,settings:o}),c=zr(t,a),p={data:t,settings:o,tableColumns:a,tableRows:c,adjustWidth:()=>{const m=t.columns.reduce((y,g)=>y+g.width+Me,0),k=t.bodyWidth+t.scrollLeft;if(m<k){const y=t.columns[t.columns.length-1];y.width=y.width+(k-m)}},updateOffsets(m){this.updateScrollTop(t.scrollTop+m.deltaY),this.updateScrollLeft(t.scrollLeft+m.deltaX)},getSelectedRows(){return t.rows.filter(m=>t.selectedRows.has(m.primaryKey))},getSelectedColumns(){return t.columns.filter(m=>t.selectedColumns.has(m.id))},selectRow(m){t.selectedRows.add(m)},unselectRow(m){t.selectedRows.delete(m)},selectColumn(m){t.selectedColumns.add(m)},unselectColumn(m){t.selectedColumns.delete(m)},updateScrollTop(m){t.scrollTop=ht(m,0,r.value)},updateScrollLeft(m){t.scrollLeft=ht(m,0,l.value)},updateBodyHeight(){const{height:m}=n.settings,{dataHeight:k}=t,y=m>k?k:m;t.bodyHeight=y},updateDimensions(m){this.updateBodyHeight(),p.data.bodyWidth=m.width,p.adjustWidth(),t.rows=[],t.currentWindow=void 0}};return e.watch(i,(m,k)=>{const y=m.current;(!y||m.scrollTop<y.scrollTop||m.scrollTop+m.bodyHeight>y.bodyHeight+y.scrollTop)&&(t.currentWindow={scrollTop:m.scrollTop-yo,bodyHeight:m.bodyHeight+yo*2},Pr(We(t.currentWindow),o.value.dataSource).then(({rows:V,dataWindow:E})=>{kt(t.currentWindow,E)&&(t.rows=V)}))},{deep:!0,immediate:!0}),e.provide(go,p),p}const Rr={class:"command-menu__container"},Ir={key:0,class:"table-body__no-data"},Lr={class:"carets"},At=e.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(n,{emit:t}){const o=t,s=n,r=Or(s),l=e.computed(()=>r.data.rows.length===0),i=e.computed(()=>({height:l.value?"212px":r.data.bodyHeight+"px"}));e.watch(r.data,V=>o("update:data",V),{deep:!0}),e.watch(s,()=>p);const a=e.ref(),c=e.ref(),d=e.ref(),p=()=>{ge(d.value,V=>{r.updateDimensions(V.getBoundingClientRect())})},m=r.tableColumns,k=r.tableRows,{mouseDown:y}=Cr(r,a);e.onMounted(()=>{e.nextTick(p)}),e.watchPostEffect(()=>{e.unref(s.settings),e.nextTick(p)}),W(window,"resize",()=>e.nextTick(p));const g=V=>{V.preventDefault(),r.updateOffsets(V)};return(V,E)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableRef",ref:a,class:"data-table",onMousedown:E[2]||(E[2]=(...b)=>e.unref(y)&&e.unref(y)(...b))},[e.createElementVNode("div",Rr,[e.createVNode(Nr),E[3]||(E[3]=e.createTextVNode()),e.createVNode(Fr)]),E[7]||(E[7]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"headRef",ref:c,class:"table-head"},[e.createVNode(pr,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(b,F)=>(e.openBlock(),e.createBlock(hr,{key:F,col:b,style:e.normalizeStyle(b.style),"onChange:sort":E[0]||(E[0]=C=>V.$emit("change:sort",C))},null,8,["col","style"]))),128))]),_:1})],512),E[8]||(E[8]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"bodyRef",ref:d,class:"table-body",style:e.normalizeStyle(i.value),onWheel:g},[l.value?(e.openBlock(),e.createElementBlock("div",Ir,[e.createElementVNode("div",null,[e.createVNode(cr),E[4]||(E[4]=e.createTextVNode()),E[5]||(E[5]=e.createElementVNode("div",null,"No Data To Show",-1))])])):e.createCommentVNode("",!0),E[6]||(E[6]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(b,F)=>(e.openBlock(),e.createBlock(gr,{key:F,row:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.cells,C=>(e.openBlock(),e.createBlock(sr,{key:C.column.id+":"+F,cell:C,style:e.normalizeStyle(C.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),E[9]||(E[9]=e.createTextVNode()),e.createElementVNode("div",Lr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(b,F)=>(e.openBlock(),e.createBlock(yr,{key:F,column:b,style:e.normalizeStyle(b.style),"onChange:sort":E[1]||(E[1]=C=>V.$emit("change:sort",C))},null,8,["column","style"]))),128))]),E[10]||(E[10]=e.createTextVNode()),e.createVNode(Mr,{offset:e.unref(r).data.scrollTop,"window-size":e.unref(r).data.bodyHeight,"data-size":e.unref(r).data.dataHeight,"onChange:offset":e.unref(r).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),bo=new WeakMap;class jr{constructor(t,o,s){En(this,"dataHeight");this.datum=t,this.resolveHeight=o,this.resolvePrimaryKey=s;const r=t.reduce((i,a,c)=>(i.indices.set(c,i.total),i.total+=this.resolveHeight(a,c)+Me,i),{total:0,indices:new Map});this.dataHeight=r.total;const l=t.map((i,a)=>({dataRow:i,index:a,primaryKey:this.resolvePrimaryKey(i,a),offset:me(r.indices.get(a)),height:this.resolveHeight(i,a)}));bo.set(this,l)}get rows(){return bo.get(this)}async getHeight(){return this.dataHeight}async getRows(t,o){return ur(this.rows,s=>{const r=s.offset;return t<r+s.height&&r<o+t})}}class vr{constructor(t,o,s){this.api=t,this.rowHeight=o,this.resolvePrimaryKey=s}get height(){return this.rowHeight+Me}async getHeight(){return await this.api.count()*this.height}async getRows(t,o){const s=ht(Math.floor(t/this.height),0,Number.POSITIVE_INFINITY),r=Math.ceil(o+40/this.height);return(await this.api.query({offset:s,limit:r})).map((i,a)=>({dataRow:i,index:s+a,primaryKey:this.resolvePrimaryKey(i,s+a),offset:(s+a)*(this.rowHeight+Me),height:this.rowHeight}))}}function Hr(n){return Object.freeze(n)}function Zr(n){return e.h(At,{settings:Object.freeze(n)})}function zt(n,t){const o=new jr(n,t.resolveRowHeight,t.resolvePrimaryKey);return{...t,dataSource:o}}function Ur(n,t){return e.computed(()=>{const o=e.unref(n);return zt(o,e.unref(t))})}function Wr(n,t){const o=e.computed(()=>{const r=e.unref(n);return zt(r,e.unref(t))}),s=e.reactive({settings:o});return e.computed(()=>e.h(At,s))}const qr=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:vr,Component:At,factory:Zr,rawDataSettings:zt,settings:Hr,useRawData:Ur,useRawDataComponent:Wr},Symbol.toStringTag,{value:"Module"}));function*Kr(n,t){for(const o of n)yield t(o)}function Yr(n){const t=[];for(const o of n)t.push(o);return t}function wo(n){return n()}function Pt(n,t){if(n==null)throw Error(t);return n}function Ot(n){let t=!1;return function(...s){t||(requestAnimationFrame(()=>{n(...s),t=!1}),t=!0)}}function Vo(n){return new Promise(t=>setTimeout(t,n))}function Bo(n,t){const o=setTimeout(n,t);return()=>{clearTimeout(o)}}function Co(n,t){return n=Math.ceil(n),t=Math.floor(t),Math.floor(Math.random()*(t-n))+n}function Gr(n){let t="";for(let o=0;o<n;o++)t+=String.fromCharCode(Co(65,91));return t}function Eo(n){return function(t){return 1-n(1-t)}}function Xr(n){return function(t){return t<.5?n(2*t)/2:(2-n(2*(1-t)))/2}}function xo(n){const{duration:t,draw:o,timing:s}=n,r=performance.now();let l=!1;return requestAnimationFrame(function i(a){let c=(a-r)/t;(c>1||l)&&(c=1);const d=s(c);o(d),c<1&&requestAnimationFrame(i)}),function(){l=!0}}function Jr(n){const{getFraction:t,draw:o,timing:s}=n,r=performance.now();let l=!1;return requestAnimationFrame(function i(a){let c=t(a-r);if(l)return;c>1&&(c=1);const d=s(c);o(d),c<1&&requestAnimationFrame(i)}),function(){l=!0}}function $o(n,t){let o=-1;return(...s)=>{o!==-1&&(clearTimeout(o),o=-1),o=window.setTimeout(()=>n(...s),t)}}function No(n,t,o=!0){let s=0,r;return function(...l){r=()=>{n.apply(this,l),s=new Date().getTime()+t,r=null,o&&setTimeout(()=>{r==null||r()},t)},new Date().getTime()>s&&r()}}function Qr(n){return n.map(t=>({text:String(t),value:t}))}function ke(n){return n.map(t=>({label:"label"in t?t.label:t.text,value:t.value,description:t.description}))}const Rt=new Map;function es(n){return Rt.has(n)||Rt.set(n,e.ref(localStorage.getItem(n))),Pt(Rt.get(n),"...")}function ts(n,t){t==null?localStorage.removeItem(n):localStorage.setItem(n,t)}function To(n){const t=es(n);return e.watch(t,o=>ts(n,o)),t}const It=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{Yr(Kr(It.values(),t=>t(n.matches?"dark":"light")))});const os=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",So=e.ref(os),Lt=To("theme");function Do(n){const t=e.computed(()=>Lt.value?Lt.value:So.value),o=r=>{So.value=r,n==null||n(r)};function s(){Lt.value=t.value==="light"?"dark":(t.value==="dark","light")}return e.watch(t,r=>{n==null||n(e.unref(r))}),e.onMounted(()=>{It.add(o)}),e.onUnmounted(()=>{It.delete(o)}),[t,s]}const ns=e.defineComponent({__name:"ThemeSwitcher",setup(n){const[t,o]=Do();return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-theme-switcher",e.unref(t)]),onClick:r[0]||(r[0]=(...l)=>e.unref(o)&&e.unref(o)(...l))},r[1]||(r[1]=[e.createElementVNode("div",null,null,-1)]),2))}}),rs={key:0,class:"pl-block-page__title"},ss={class:"pl-block-page__title__default"},ls={class:"pl-block-page__title__append"},as={key:1},is={class:"pl-block-page__body"},cs={name:"PlBlockPage"},ds=e.defineComponent({...cs,props:{noBodyGutters:{type:Boolean}},setup(n){const t=e.useSlots(),o=r=>{r.removeAttribute("title"),r.clientWidth<r.scrollWidth&&r.setAttribute("title",r.innerText)},s={mounted:o,updated:o};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:r.noBodyGutters}])},[e.unref(t).title?(e.openBlock(),e.createElementBlock("div",rs,[e.createElementVNode("div",ss,[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.renderSlot(r.$slots,"title")])),[[s]]),l[0]||(l[0]=e.createTextVNode()),e.renderSlot(r.$slots,"after-title")]),l[1]||(l[1]=e.createTextVNode()),e.createElementVNode("div",ls,[e.renderSlot(r.$slots,"append")])])):(e.openBlock(),e.createElementBlock("div",as)),l[2]||(l[2]=e.createTextVNode()),e.createElementVNode("div",is,[e.renderSlot(r.$slots,"default")])],2))}}),ps={name:"PlContainer"},ms=e.defineComponent({...ps,props:{width:{}},setup(n){const t=n,o=e.computed(()=>({width:t.width}));return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"pl-container pl-layout-component",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}}),us={name:"PlRow"},fs=e.defineComponent({...us,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-layout-component pl-row",{wrap:t.wrap,"align-center":t.alignCenter}])},[e.renderSlot(t.$slots,"default")],2))}}),hs={class:"pl-layout-component",style:{"flex-grow":"1"}},gs={name:"PlSpacer"},ys=e.defineComponent({...gs,setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",hs))}}),ks={name:"PlGrid"},_s=e.defineComponent({...ks,props:{columns:{}},setup(n){const t=n,o=e.computed(()=>({gridTemplateColumns:`repeat(${t.columns}, minmax(0, 1fr))`}));return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"pl-layout-component pl-grid",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}}),bs={key:0,class:"pl-alert__icon"},ws={class:"pl-alert__main"},Vs={key:0},Bs={class:"pl-alert__main__text"},Cs={name:"PlAlert"},Es=e.defineComponent({...Cs,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(n){const t={success:"success",warn:"warning",info:"edit",error:"error"};return(o,s)=>o.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pl-alert",[{monospace:o.monospace,whiteSpacePre:o.whiteSpacePre},o.type?`pl-alert__${o.type}`:""]]),style:e.normalizeStyle({maxHeight:o.maxHeight})},[o.icon&&o.type?(e.openBlock(),e.createElementBlock("div",bs,[e.createElementVNode("div",{class:e.normalizeClass(`icon-24 icon-${t[o.type]}`)},null,2)])):e.createCommentVNode("",!0),s[2]||(s[2]=e.createTextVNode()),e.createElementVNode("div",ws,[o.label?(e.openBlock(),e.createElementBlock("label",Vs,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createTextVNode()),e.createElementVNode("div",Bs,[e.renderSlot(o.$slots,"default")])]),s[3]||(s[3]=e.createTextVNode()),o.closeable?(e.openBlock(),e.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:s[0]||(s[0]=r=>o.$emit("update:modelValue",!1))})):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}}),xs=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V["pl-uikit"]={},V.Vue))})(this,function(V,e){"use strict";var A0=Object.defineProperty;var v0=(V,e,we)=>e in V?A0(V,e,{enumerable:!0,configurable:!0,writable:!0,value:we}):V[e]=we;var yl=(V,e,we)=>v0(V,typeof e!="symbol"?e+"":e,we);function we(n,t){if(n==null)throw Error(t??"Empty (null | undefined) value");return n}function _l(n,t,o){const s=Math.min(t,o),r=Math.max(t,o);return n>=s&&n<=r}function kl(n){return new Promise(t=>setTimeout(t,n))}function wl(n){return n()}function Zt(n,t,o){return t>n?t:n>o?o:n}function Wo(n,t){return t(n)}function $e(n,t){if(n!=null)return t(n)}function bl(n){if(n&&n.ok)return n.value}async function xl(n){return Object.fromEntries(await Promise.all(Object.entries(n).map(async([t,o])=>[t,await o])))}const Ko=n=>n;function D0(n){return n}function Vl(n,t){return n=Math.ceil(n),t=Math.floor(t),Math.floor(Math.random()*(t-n))+n}function Bl(n,t=[]){for(n=n?String(n):"";t.includes(n.charAt(0));)n=n.substring(1);return n}function Cl(n){let t="";for(let o=0;o<n;o++)t+=String.fromCharCode(Vl(65,91));return t}function Yo(){return Cl(42)}const dt=Array.isArray;function Ut(n){return n!==null&&typeof n=="object"}function Ue(n){if(typeof n!="object"||n===null)return!1;const t=Object.getPrototypeOf(n);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}function $l(n,t){return Object.keys(n).map(o=>t(n[o],o))}function Xo(n){return Object.values(n).reduce((t,o)=>o!==void 0?t+1:t,0)}function qt(n,t){if(!(Ut(n)&&Ut(t)))return n===t;if(dt(n)&&dt(t))return n.length!==t.length?!1:[...n.keys()].every(o=>qt(n[o],t[o]));if(Ue(n)&&Ue(t))return Xo(n)!==Xo(t)?!1:Object.keys(n).every(o=>qt(n[o],t[o]));throw Error(`Cannot compare a ${String(n)} and b ${String(t)}`)}const Wt=qt;function ut(n){if(Array.isArray(n)){const t=[];for(let o=0;o<n.length;o++)t[o]=ut(n[o]);return t}else if(Ue(n)){const t={};return Object.keys(n).forEach(o=>{t[o]=ut(n[o])}),t}else return n}function El(n){return Array.isArray(n)?Object.assign([],n):Ut(n)?Object.assign({},n):n}function Nl(n,t){const o={};for(const s in t)t[s]!==n[s]&&(o[s]=n[s]);return o}function Sl(n){return Object.entries(n).forEach(([t,o])=>{o instanceof Function&&(n[t]=o.bind(n))}),n}function Tl(n,t,o){return n[t]=o,n}function Ml(n,t){return n[t]}function Al(n,t){n={...n};const o=n[t];return delete n[t],[o,n]}function vl(n,...t){return Object.assign({},...t.map(o=>({[o]:n[o]})))}function Dl(n,...t){return t.map(o=>n[o])}function Fl(n,...t){const o=Object.assign({},n);return t.forEach(s=>delete o[s]),o}function Go(n,t){return new Set([...Object.keys(n),...Object.keys(t)]).forEach(o=>{const s=n[o],r=t[o];Ue(s)&&Ue(r)||dt(s)&&dt(r)&&s.length===r.length?Go(s,r):n[o]=r}),n}const Mn=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:Sl,deepClone:ut,deepEqual:Wt,deepPatch:Go,getProp:Ml,isArray:dt,isJsonEqual:qt,isNonPrimitive:Ut,isPlainObject:Ue,map:$l,omit:Fl,pick:vl,pickValues:Dl,setProp:Tl,shallowClone:El,shallowDiff:Nl,shiftProp:Al},Symbol.toStringTag,{value:"Module"}));function zl(n,t){const o=n.findIndex(t);if(o<0)return[];const s=(()=>{for(let r=o;r<n.length;r++)if(!t(n[r],r))return r;return n.length})();return n.slice(o,s)}function Pl(n,t,o){let s;return function(...r){const l=o&&!s;l&&n.apply(this,r),s&&clearTimeout(s),s=setTimeout(()=>{s=void 0,l||n.apply(this,r)},t)}}const Rl=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Ol=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Il=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ll=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Jo=(n,t)=>{let o=String(n);return typeof t=="string"||Array.isArray(t)?o=n.toLocaleString(t):t===!0&&(o=n.toLocaleString(void 0)),o};function An(n,t){if(n=typeof n=="bigint"?Number(n):n,!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);Object.assign(t,{bits:!1,binary:!1});const o=t.bits?t.binary?Ll:Il:t.binary?Ol:Rl;if(t.signed&&n===0)return` 0 ${o[0]}`;const s=n<0,r=s?"-":t.signed?"+":"";if(s&&(n=-n),n<1){const c=Jo(n,t.locale);return r+c+" "+o[0]}const l=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),o.length-1);n/=(t.binary?1024:1e3)**l,n=Number(n.toPrecision(3));const i=Jo(Number(n),t.locale),a=o[l];return r+i+" "+a}const Hl={class:"context-menu"},jl=["onClick"],Zl=e.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(n,{emit:t}){const o=t,s=r=>{r.cb(),o("close")};return(r,l)=>(e.openBlock(),e.createElementBlock("div",Hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(i,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,onClick:e.withModifiers(c=>s(i),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(i.text),1)],8,jl))),128))]))}}),K=(n,t)=>{const o=n.__vccOpts||n;for(const[s,r]of t)o[s]=r;return o},Ul=K(Zl,[["__scopeId","data-v-12530966"]]);function vn(n,t){n.preventDefault();const o=()=>{e.render(null,document.body)},s=e.h(Ul,{options:t,onClose:()=>{o()}});e.render(s,document.body);const r=s.el;return r.style.top=n.clientY+"px",r.style.left=n.clientX+"px",document.addEventListener("click",l=>{r.contains(l.target)||o()}),o}const Qo=Symbol(),Kt=()=>e.inject(Qo),ql=["value"],Wl={key:1},Kl=e.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.reactive({edit:!1}),l=e.computed(()=>s.valueType),i=d=>{var m;const u=(m=d.target)==null?void 0:m.value,f=e.unref(l),p=wl(()=>f==="integer"?parseInt(u,10):f==="float"?Number(u):u);o("update:modelValue",p),r.edit=!1},a=e.ref(),c=d=>{!d.metaKey&&s.editable&&(r.edit=!0,requestAnimationFrame(()=>{var u,f;(f=(u=a.value)==null?void 0:u.querySelector("input"))==null||f.focus()}))};return(d,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"baseRef",ref:a,class:e.normalizeClass(["base-cell",{"base-cell__edit":r.edit}]),onClick:c},[r.edit?(e.openBlock(),e.createElementBlock("input",{key:0,value:d.modelValue,onFocusout:u[0]||(u[0]=f=>r.edit=!1),onChange:i},null,40,ql)):(e.openBlock(),e.createElementBlock("div",Wl,e.toDisplayString(d.modelValue),1))],2))}}),Yl=["^data-row-index"],Xl={key:0,class:"control-cell"},Gl=e.defineComponent({__name:"TdCell",props:{cell:{}},setup(n){const t=n,o=Kt(),s=e.computed(()=>t.cell.column.valueType),r=d=>{$e(o.settings.value.onUpdatedRow,u=>{const f=t.cell.row,p={...f.dataRow,[t.cell.id]:d};u({...f,dataRow:p})})},l=d=>{d.metaKey&&o.selectRow(t.cell.row.primaryKey)},i=(d,u)=>{if(d.type==="contextmenu")d.preventDefault();else return;const f=o.settings??{},p=[],{onSelectedRows:m,onSelectedColumns:g}=f.value,k=o.data.selectedRows.has(u.primaryKey);m&&m.length&&(k?p.push({text:"Deselect row",cb(){o.data.selectedRows.delete(t.cell.row.primaryKey)}}):p.push({text:"Select row",cb(){o.selectRow(t.cell.row.primaryKey)}})),g&&g.length&&(p.push({text:"Select column",cb(){o.selectColumn(t.cell.column.id)}}),p.push({text:"Unselect column",cb(){o.unselectColumn(t.cell.column.id)}})),p.length&&vn(d,p)},a=e.ref(),c=e.computed(()=>t.cell.column.component?t.cell.column.component():void 0);return(d,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"cellRef",ref:a,class:e.normalizeClass(["td-cell",{[d.cell.class]:!0}]),"^data-row-index":d.cell.row.index,onClick:l,onContextmenu:u[0]||(u[0]=f=>i(f,d.cell.row))},[d.cell.control?(e.openBlock(),e.createElementBlock("div",Xl,e.toDisplayString(d.cell.row.index),1)):c.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:1,"model-value":d.cell.value,"onUpdate:modelValue":r},null,8,["model-value"])):(e.openBlock(),e.createBlock(Kl,{key:2,"model-value":d.cell.value,"value-type":s.value,editable:d.cell.column.editable,"onUpdate:modelValue":r},null,8,["model-value","value-type","editable"]))],42,Yl))}}),Jl={},Ql={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ei(n,t){return e.openBlock(),e.createElementBlock("svg",Ql,t[0]||(t[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),e.createTextVNode(),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const ti=K(Jl,[["render",ei]]),ni={class:"tr-head"},oi=e.defineComponent({__name:"TrHead",setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",ni,[e.renderSlot(t.$slots,"default")]))}});function ri(n,t){const o=t.indexOf(n)+1;return t[o>=t.length?0:o]}function si(n,t){const o=n.findIndex(t);if(o<0)return[];const s=(()=>{for(let r=o;r<n.length;r++)if(!t(n[r],r))return r;return n.length})();return n.slice(o,s)}const li=["^data-col-id"],ii=e.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(n,{emit:t}){const o=t;function s(l){l.preventDefault();const i=[];i.length&&vn(l,i)}function r(l){var a;const i=((a=l.sort)==null?void 0:a.direction)??"DESC";o("change:sort",{colId:l.id,direction:ri(i,["DESC","ASC"])})}return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:s},[l.col.valueType?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.col.valueType)},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.col.label)+" ",1),l.col.sort?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["sort",l.col.sort.direction]),onClick:i[0]||(i[0]=e.withModifiers(()=>r(l.col),["stop"]))},null,2)):e.createCommentVNode("",!0)],42,li))}}),ai=e.defineComponent({__name:"TrBody",props:{row:{}},setup(n){const t=e.ref(),o=()=>{e.nextTick().then(()=>{$e(t.value,s=>s.scrollLeft=0)})};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"trRef",ref:t,class:e.normalizeClass(["tr-body",{selected:s.row.selected}]),scroll:"no",style:e.normalizeStyle(s.row.style),onScroll:o},[e.renderSlot(s.$slots,"default")],38))}}),ci=e.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(n){const t=Kt(),o=n,s=e.computed(()=>t.data.selectedColumns.has(o.column.id));return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["column-caret",{selected:s.value,frozen:r.column.frozen}])},null,2))}});function q(n,t,o,s){e.onMounted(()=>{var r;return(r=e.unref(n))==null?void 0:r.addEventListener(t,o,s)}),e.onUnmounted(()=>{var r;return(r=e.unref(n))==null?void 0:r.removeEventListener(t,o,s)})}function di(n){e.onMounted(()=>window.addEventListener("mouseup",n)),e.onUnmounted(()=>window.removeEventListener("mouseup",n))}function ui(n){let t=!1;return function(...s){t||(requestAnimationFrame(()=>{n(...s),t=!1}),t=!0)}}function fi(n,t){let o;function s(l){o={...l}}di(()=>{o=void 0,t()});const r=ui(n);return q(window,"mousemove",l=>{o&&r({x:o.x,width:o.width,diff:l.x-o.x})}),{start:s}}const qe=1,pi=10,mi=30,er=60;function tr(){const n=e.reactive({x:0,y:0});function t(o){n.x=o.pageX,n.y=o.pageY}return e.onMounted(()=>window.addEventListener("mousemove",t)),e.onUnmounted(()=>window.removeEventListener("mousemove",t)),n}function nr(n,t={}){const{delayEnter:o=0,delayLeave:s=0}=t,r=e.ref(!1);let l;const i=a=>{const c=a?o:s;l&&(clearTimeout(l),l=void 0),c?l=setTimeout(()=>r.value=a,c):r.value=a};return window&&(q(n,"mouseenter",()=>i(!0)),q(n,"mouseleave",()=>i(!1))),r}function hi(n){var o;const t=$e((o=e.unref(n))==null?void 0:o.querySelectorAll(".th-cell"),s=>[...s])??[];return t.map(s=>{const{width:r,x:l}=s.getBoundingClientRect(),i=s.getAttribute("data-col-id");return Ko({colId:i,width:r,x:l,right:l+r})}).slice(0,t.length-1)}function gi(n,t){const o=tr(),s=nr(t,{}),{data:r}=n,l=fi(a=>{$e(r.resizeTh,c=>{const d=r.columns.find(u=>u.id===c.colId);d&&(d.width=Zt(a.width+a.diff,mi,1e4),n.adjustWidth())})},()=>{r.resize=!1,r.resizeTh=void 0,document.body.style.cursor=""}),i=a=>{r.resizeTh&&(r.resize=!0,l.start({x:a.x,width:r.resizeTh.width}))};return e.watchEffect(()=>{if(!s.value){document.body.style.cursor="";return}if(r.resize)return;const a=hi(t).find(c=>Math.abs(o.x-c.right)<pi);a?(document.body.style.cursor="col-resize",r.resizeTh=a):(r.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:i}}const yi={key:0,class:"command-menu"},_i={key:0},ki=["onClick"],wi=e.defineComponent({__name:"RowsCommandMenu",setup(n){const t=Kt(),o=e.computed(()=>t.getSelectedRows()),s=e.computed(()=>o.value.length>0),r=e.computed(()=>{var i;return((i=t.settings)==null?void 0:i.value.onSelectedRows)??[]}),l=e.computed(()=>r.value.map(i=>({label:i.label,cb:()=>{i.cb(o.value),t.data.selectedRows.clear(),t.data.rows=[]}})));return(i,a)=>s.value?(e.openBlock(),e.createElementBlock("div",yi,[o.value.length?(e.openBlock(),e.createElementBlock("span",_i,e.toDisplayString(o.value.length)+" rows selected",1)):e.createCommentVNode("",!0),a[0]||(a[0]=e.createTextVNode()),a[1]||(a[1]=e.createElementVNode("hr",null,null,-1)),a[2]||(a[2]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:"command",onClick:e.withModifiers(c.cb,["stop"])},e.toDisplayString(c.label),9,ki))),128))])):e.createCommentVNode("",!0)}}),bi={key:0,class:"command-menu"},xi={key:0},Vi=["onClick"],Bi=e.defineComponent({__name:"ColumnsCommandMenu",setup(n){const t=Kt(),o=e.computed(()=>t.getSelectedColumns()),s=e.computed(()=>o.value.length>0),r=e.computed(()=>{var i;return((i=t.settings)==null?void 0:i.value.onSelectedColumns)??[]}),l=e.computed(()=>r.value.map(i=>({label:i.label,cb:()=>{i.cb(o.value),t.data.selectedColumns.clear()}})));return(i,a)=>s.value?(e.openBlock(),e.createElementBlock("div",bi,[o.value.length?(e.openBlock(),e.createElementBlock("span",xi,"selected columns "+e.toDisplayString(o.value.length),1)):e.createCommentVNode("",!0),a[0]||(a[0]=e.createTextVNode()),a[1]||(a[1]=e.createElementVNode("hr",null,null,-1)),a[2]||(a[2]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(c,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:"command",onClick:e.withModifiers(c.cb,["stop"])},e.toDisplayString(c.label),9,Vi))),128))])):e.createCommentVNode("",!0)}});function Ee(n,t){const o={el:void 0,x:0,y:0},s=r=>({x:r.x,y:r.y,dx:r.x-o.x,dy:r.y-o.y});q(document,"mousedown",r=>{r.target===e.unref(n)&&(r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault(),o.el=e.unref(n),o.x=r.x,o.y=r.y)}),q(document,"mouseup",r=>{o.el&&(o.el=void 0,t({...s(r),stop:!0},o))}),q(document,"mousemove",r=>{o.el&&t(s(r),o)})}const Ci=e.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(),l=e.computed(()=>s.windowSize-12),i=e.computed(()=>s.windowSize<s.dataSize),a=e.computed(()=>Math.ceil(s.offset*(l.value/s.dataSize))),c=e.computed(()=>Math.ceil(l.value*l.value/s.dataSize)),d=e.computed(()=>({top:`${a.value}px`,height:`${c.value}px`}));return Ee(r,(u,f)=>{const p=(a.value+u.dy)*s.dataSize/l.value;o("change:offset",p),f.x=u.x,f.y=u.y}),(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"t-scroll",style:e.normalizeStyle({height:`${u.windowSize}px`})},[e.createElementVNode("div",null,[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"handleRef",ref:r,class:"t-scroll__handle",style:e.normalizeStyle(d.value)},null,4)):e.createCommentVNode("",!0)])],4))}});function $i(n){return e.computed(()=>{const{data:t,settings:o}=n,{bodyWidth:s,scrollLeft:r}=t,l=[...t.columns],i=Yo();o.value.controlColumn&&l.unshift({id:i,label:"#",width:60,frozen:!0});let a=0;const c=l.map(f=>{const p={...f,offset:a};return a+=f.width+qe,p}),d=c.filter(f=>f.frozen);return zl(c,f=>f.frozen?!1:r<f.offset+f.width&&f.offset<s+r).concat(d).map(f=>({...f,style:{left:f.frozen?`${f.offset}px`:`${f.offset-t.scrollLeft}px`,width:`${f.width}px`},control:f.id===i}))})}function Ei(n,t){const o=e.computed(()=>t.value.reduce((s,r)=>(s[r.id]=r.justify?"justify-"+r.justify:"",s),{}));return e.computed(()=>n.rows.map(s=>{const r=o.value,{primaryKey:l,offset:i,dataRow:a,height:c}=s,d=t.value.map(u=>({id:u.id,column:u,row:s,value:a[u.id],class:r[u.id],editable:u.editable,width:u.width,style:u.style,control:u.control}));return Ko({style:{top:`${i-n.scrollTop}px`,height:`${s.height}px`},primaryKey:l,offset:i,height:c,cells:d,selected:n.selectedRows.has(l)})}))}const Ni=async(n,t)=>{const{scrollTop:o,bodyHeight:s}=n;return await kl(0),xl({rows:t.getRows(o,s),dataWindow:n})};function Si(n){const t=e.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:n.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});e.watch(()=>n.settings,f=>{t.columns=ut(f.columns),t.currentWindow=void 0,f.dataSource.getHeight().then(p=>{t.dataHeight=p,u.updateBodyHeight()}).catch(p=>t.error=p)},{immediate:!0});const o=e.computed(()=>n.settings),s=e.computed(()=>t.columns.reduce((f,p)=>f+p.width+qe,0)),r=e.computed(()=>Wo(u.data.dataHeight-u.data.bodyHeight,f=>f>0?f:0)),l=e.computed(()=>Wo(s.value-u.data.bodyWidth,f=>f>0?f:0)),i=e.computed(()=>({bodyHeight:t.bodyHeight,scrollTop:t.scrollTop,current:t.currentWindow})),a=$i({data:t,settings:o}),c=Ei(t,a),u={data:t,settings:o,tableColumns:a,tableRows:c,adjustWidth:()=>{const f=t.columns.reduce((m,g)=>m+g.width+qe,0),p=t.bodyWidth+t.scrollLeft;if(f<p){const m=t.columns[t.columns.length-1];m.width=m.width+(p-f)}},updateOffsets(f){this.updateScrollTop(t.scrollTop+f.deltaY),this.updateScrollLeft(t.scrollLeft+f.deltaX)},getSelectedRows(){return t.rows.filter(f=>t.selectedRows.has(f.primaryKey))},getSelectedColumns(){return t.columns.filter(f=>t.selectedColumns.has(f.id))},selectRow(f){t.selectedRows.add(f)},unselectRow(f){t.selectedRows.delete(f)},selectColumn(f){t.selectedColumns.add(f)},unselectColumn(f){t.selectedColumns.delete(f)},updateScrollTop(f){t.scrollTop=Zt(f,0,r.value)},updateScrollLeft(f){t.scrollLeft=Zt(f,0,l.value)},updateBodyHeight(){const{height:f}=n.settings,{dataHeight:p}=t,m=f>p?p:f;t.bodyHeight=m},updateDimensions(f){this.updateBodyHeight(),u.data.bodyWidth=f.width,u.adjustWidth(),t.rows=[],t.currentWindow=void 0}};return e.watch(i,(f,p)=>{const m=f.current;(!m||f.scrollTop<m.scrollTop||f.scrollTop+f.bodyHeight>m.bodyHeight+m.scrollTop)&&(t.currentWindow={scrollTop:f.scrollTop-er,bodyHeight:f.bodyHeight+er*2},Ni(ut(t.currentWindow),o.value.dataSource).then(({rows:k,dataWindow:x})=>{Wt(t.currentWindow,x)&&(t.rows=k)}))},{deep:!0,immediate:!0}),e.provide(Qo,u),u}const Ti={class:"command-menu__container"},Mi={key:0,class:"table-body__no-data"},Ai={class:"carets"},Dn=e.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(n,{emit:t}){const o=t,s=n,r=Si(s),l=e.computed(()=>r.data.rows.length===0),i=e.computed(()=>({height:l.value?"212px":r.data.bodyHeight+"px"}));e.watch(r.data,k=>o("update:data",k),{deep:!0}),e.watch(s,()=>u);const a=e.ref(),c=e.ref(),d=e.ref(),u=()=>{$e(d.value,k=>{r.updateDimensions(k.getBoundingClientRect())})},f=r.tableColumns,p=r.tableRows,{mouseDown:m}=gi(r,a);e.onMounted(()=>{e.nextTick(u)}),e.watchPostEffect(()=>{e.unref(s.settings),e.nextTick(u)}),q(window,"resize",()=>e.nextTick(u));const g=k=>{k.preventDefault(),r.updateOffsets(k)};return(k,x)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableRef",ref:a,class:"data-table",onMousedown:x[2]||(x[2]=(...w)=>e.unref(m)&&e.unref(m)(...w))},[e.createElementVNode("div",Ti,[e.createVNode(wi),x[3]||(x[3]=e.createTextVNode()),e.createVNode(Bi)]),x[7]||(x[7]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"headRef",ref:c,class:"table-head"},[e.createVNode(oi,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(w,T)=>(e.openBlock(),e.createBlock(ii,{key:T,col:w,style:e.normalizeStyle(w.style),"onChange:sort":x[0]||(x[0]=B=>k.$emit("change:sort",B))},null,8,["col","style"]))),128))]),_:1})],512),x[8]||(x[8]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"bodyRef",ref:d,class:"table-body",style:e.normalizeStyle(i.value),onWheel:g},[l.value?(e.openBlock(),e.createElementBlock("div",Mi,[e.createElementVNode("div",null,[e.createVNode(ti),x[4]||(x[4]=e.createTextVNode()),x[5]||(x[5]=e.createElementVNode("div",null,"No Data To Show",-1))])])):e.createCommentVNode("",!0),x[6]||(x[6]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(w,T)=>(e.openBlock(),e.createBlock(ai,{key:T,row:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.cells,B=>(e.openBlock(),e.createBlock(Gl,{key:B.column.id+":"+T,cell:B,style:e.normalizeStyle(B.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),x[9]||(x[9]=e.createTextVNode()),e.createElementVNode("div",Ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(w,T)=>(e.openBlock(),e.createBlock(ci,{key:T,column:w,style:e.normalizeStyle(w.style),"onChange:sort":x[1]||(x[1]=B=>k.$emit("change:sort",B))},null,8,["column","style"]))),128))]),x[10]||(x[10]=e.createTextVNode()),e.createVNode(Ci,{offset:e.unref(r).data.scrollTop,"window-size":e.unref(r).data.bodyHeight,"data-size":e.unref(r).data.dataHeight,"onChange:offset":e.unref(r).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),or=new WeakMap;class vi{constructor(t,o,s){yl(this,"dataHeight");this.datum=t,this.resolveHeight=o,this.resolvePrimaryKey=s;const r=t.reduce((i,a,c)=>(i.indices.set(c,i.total),i.total+=this.resolveHeight(a,c)+qe,i),{total:0,indices:new Map});this.dataHeight=r.total;const l=t.map((i,a)=>({dataRow:i,index:a,primaryKey:this.resolvePrimaryKey(i,a),offset:we(r.indices.get(a)),height:this.resolveHeight(i,a)}));or.set(this,l)}get rows(){return or.get(this)}async getHeight(){return this.dataHeight}async getRows(t,o){return si(this.rows,s=>{const r=s.offset;return t<r+s.height&&r<o+t})}}class Di{constructor(t,o,s){this.api=t,this.rowHeight=o,this.resolvePrimaryKey=s}get height(){return this.rowHeight+qe}async getHeight(){return await this.api.count()*this.height}async getRows(t,o){const s=Zt(Math.floor(t/this.height),0,Number.POSITIVE_INFINITY),r=Math.ceil(o+40/this.height);return(await this.api.query({offset:s,limit:r})).map((i,a)=>({dataRow:i,index:s+a,primaryKey:this.resolvePrimaryKey(i,s+a),offset:(s+a)*(this.rowHeight+qe),height:this.rowHeight}))}}function Fi(n){return Object.freeze(n)}function zi(n){return e.h(Dn,{settings:Object.freeze(n)})}function Fn(n,t){const o=new vi(n,t.resolveRowHeight,t.resolvePrimaryKey);return{...t,dataSource:o}}function Pi(n,t){return e.computed(()=>{const o=e.unref(n);return Fn(o,e.unref(t))})}function Ri(n,t){const o=e.computed(()=>{const r=e.unref(n);return Fn(r,e.unref(t))}),s=e.reactive({settings:o});return e.computed(()=>e.h(Dn,s))}const Oi=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:Di,Component:Dn,factory:zi,rawDataSettings:Fn,settings:Fi,useRawData:Pi,useRawDataComponent:Ri},Symbol.toStringTag,{value:"Module"}));function*Ii(n,t){for(const o of n)yield t(o)}function Li(n){const t=[];for(const o of n)t.push(o);return t}function rr(n){return n()}function zn(n,t){if(n==null)throw Error(t);return n}function Pn(n){let t=!1;return function(...s){t||(requestAnimationFrame(()=>{n(...s),t=!1}),t=!0)}}function sr(n){return new Promise(t=>setTimeout(t,n))}function lr(n,t){const o=setTimeout(n,t);return()=>{clearTimeout(o)}}function ir(n,t){return n=Math.ceil(n),t=Math.floor(t),Math.floor(Math.random()*(t-n))+n}function Hi(n){let t="";for(let o=0;o<n;o++)t+=String.fromCharCode(ir(65,91));return t}function ar(n){return function(t){return 1-n(1-t)}}function ji(n){return function(t){return t<.5?n(2*t)/2:(2-n(2*(1-t)))/2}}function cr(n){const{duration:t,draw:o,timing:s}=n,r=performance.now();let l=!1;return requestAnimationFrame(function i(a){let c=(a-r)/t;(c>1||l)&&(c=1);const d=s(c);o(d),c<1&&requestAnimationFrame(i)}),function(){l=!0}}function Zi(n){const{getFraction:t,draw:o,timing:s}=n,r=performance.now();let l=!1;return requestAnimationFrame(function i(a){let c=t(a-r);if(l)return;c>1&&(c=1);const d=s(c);o(d),c<1&&requestAnimationFrame(i)}),function(){l=!0}}function dr(n,t){let o=-1;return(...s)=>{o!==-1&&(clearTimeout(o),o=-1),o=window.setTimeout(()=>n(...s),t)}}function ur(n,t,o=!0){let s=0,r;return function(...l){r=()=>{n.apply(this,l),s=new Date().getTime()+t,r=null,o&&setTimeout(()=>{r==null||r()},t)},new Date().getTime()>s&&r()}}function Ui(n){return n.map(t=>({text:String(t),value:t}))}function Ne(n){return n.map(t=>({label:"label"in t?t.label:t.text,value:t.value,description:t.description}))}const Rn=new Map;function qi(n){return Rn.has(n)||Rn.set(n,e.ref(localStorage.getItem(n))),zn(Rn.get(n),"...")}function Wi(n,t){t==null?localStorage.removeItem(n):localStorage.setItem(n,t)}function fr(n){const t=qi(n);return e.watch(t,o=>Wi(n,o)),t}const On=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{Li(Ii(On.values(),t=>t(n.matches?"dark":"light")))});const Ki=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",pr=e.ref(Ki),In=fr("theme");function mr(n){const t=e.computed(()=>In.value?In.value:pr.value),o=r=>{pr.value=r,n==null||n(r)};function s(){In.value=t.value==="light"?"dark":(t.value==="dark","light")}return e.watch(t,r=>{n==null||n(e.unref(r))}),e.onMounted(()=>{On.add(o)}),e.onUnmounted(()=>{On.delete(o)}),[t,s]}const Yi=e.defineComponent({__name:"ThemeSwitcher",setup(n){const[t,o]=mr();return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-theme-switcher",e.unref(t)]),onClick:r[0]||(r[0]=(...l)=>e.unref(o)&&e.unref(o)(...l))},r[1]||(r[1]=[e.createElementVNode("div",null,null,-1)]),2))}}),Xi={key:0,class:"pl-block-page__title"},Gi={class:"pl-block-page__title__default"},Ji={class:"pl-block-page__title__append"},Qi={key:1},ea={class:"pl-block-page__body"},ta={name:"PlBlockPage"},na=e.defineComponent({...ta,props:{noBodyGutters:{type:Boolean}},setup(n){const t=e.useSlots(),o=r=>{r.removeAttribute("title"),r.clientWidth<r.scrollWidth&&r.setAttribute("title",r.innerText)},s={mounted:o,updated:o};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:r.noBodyGutters}])},[e.unref(t).title?(e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("div",Gi,[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.renderSlot(r.$slots,"title")])),[[s]]),l[0]||(l[0]=e.createTextVNode()),e.renderSlot(r.$slots,"after-title")]),l[1]||(l[1]=e.createTextVNode()),e.createElementVNode("div",Ji,[e.renderSlot(r.$slots,"append")])])):(e.openBlock(),e.createElementBlock("div",Qi)),l[2]||(l[2]=e.createTextVNode()),e.createElementVNode("div",ea,[e.renderSlot(r.$slots,"default")])],2))}}),oa={name:"PlContainer"},ra=e.defineComponent({...oa,props:{width:{}},setup(n){const t=n,o=e.computed(()=>({width:t.width}));return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"pl-container pl-layout-component",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}}),sa={name:"PlRow"},la=e.defineComponent({...sa,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-layout-component pl-row",{wrap:t.wrap,"align-center":t.alignCenter}])},[e.renderSlot(t.$slots,"default")],2))}}),ia={class:"pl-layout-component",style:{"flex-grow":"1"}},aa={name:"PlSpacer"},ca=e.defineComponent({...aa,setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",ia))}}),da={name:"PlGrid"},ua=e.defineComponent({...da,props:{columns:{}},setup(n){const t=n,o=e.computed(()=>({gridTemplateColumns:`repeat(${t.columns}, minmax(0, 1fr))`}));return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"pl-layout-component pl-grid",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}}),fa={key:0,class:"pl-alert__icon"},pa={class:"pl-alert__main"},ma={key:0},ha={class:"pl-alert__main__text"},ga={name:"PlAlert"},ya=e.defineComponent({...ga,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(n){const t={success:"success",warn:"warning",info:"edit",error:"error"};return(o,s)=>o.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pl-alert",[{monospace:o.monospace,whiteSpacePre:o.whiteSpacePre},o.type?`pl-alert__${o.type}`:""]]),style:e.normalizeStyle({maxHeight:o.maxHeight})},[o.icon&&o.type?(e.openBlock(),e.createElementBlock("div",fa,[e.createElementVNode("div",{class:e.normalizeClass(`icon-24 icon-${t[o.type]}`)},null,2)])):e.createCommentVNode("",!0),s[2]||(s[2]=e.createTextVNode()),e.createElementVNode("div",pa,[o.label?(e.openBlock(),e.createElementBlock("label",ma,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createTextVNode()),e.createElementVNode("div",ha,[e.renderSlot(o.$slots,"default")])]),s[3]||(s[3]=e.createTextVNode()),o.closeable?(e.openBlock(),e.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:s[0]||(s[0]=r=>o.$emit("update:modelValue",!1))})):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}}),_a=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#110529"/>
|
|
3
3
|
</svg>
|
|
4
|
-
|
|
4
|
+
`,ka=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
5
|
<rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
|
|
6
6
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="white"/>
|
|
7
7
|
</svg>
|
|
8
|
-
`,Ns=["innerHTML"],Ts={class:"dropdown-list-item__title-container"},Ss={class:"dropdown-list-item__title text-s"},Ds={key:0,class:"dropdown-list-item__description text-description"},Fs={key:1,class:"dropdown-list-item__icon flex-self-start"},Ae=e.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>{const l=[];return t.size==="small"&&l.push("dropdown-list-item__small"),t.isSelected&&l.push("dropdown-list-item__selected"),t.isHovered&&l.push("hovered-item"),l.join(" ")}),s=e.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return t.isSelected&&l.push("checked"),l.join(" ")}),r=e.computed(()=>t.isSelected?$s:xs);return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.value,"dropdown-list-item"])},[t.useCheckbox?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value),innerHTML:r.value},null,10,Ns)):e.createCommentVNode("",!0),i[1]||(i[1]=e.createTextVNode()),e.createElementVNode("div",Ts,[e.createElementVNode("div",Ss,e.toDisplayString(l.option.label),1),i[0]||(i[0]=e.createTextVNode()),l.option.description?(e.openBlock(),e.createElementBlock("div",Ds,e.toDisplayString(l.option.description),1)):e.createCommentVNode("",!0)]),i[2]||(i[2]=e.createTextVNode()),!t.useCheckbox&&t.isSelected?(e.openBlock(),e.createElementBlock("div",Fs)):e.createCommentVNode("",!0)],2))}});function qe(n,t){const s=Ot(()=>{if(n.value){const{scrollTop:r,scrollLeft:l,scrollHeight:i,scrollWidth:a,clientHeight:c,clientWidth:d}=document.documentElement,p=n.value.getBoundingClientRect();t({scrollTop:r,scrollLeft:l,scrollHeight:i,scrollWidth:a,clientHeight:c,clientWidth:d,offsetY:r+p.y,offsetX:l+p.x,top:p.top,right:p.right,bottom:p.bottom,left:p.left,width:p.width,height:p.height,x:p.x,y:p.y})}});e.onMounted(s),W(window,"scroll",s,{capture:!0,passive:!0}),W(window,"resize",s,{passive:!0}),W(window,"adjust",s,!0)}const ze=Y(e.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>t.size==="large"?"--mask-size: 24px":""),s=e.computed(()=>`mask-16 mask-${t.name}`);return(r,l)=>(e.openBlock(),e.createElementBlock("i",{style:e.normalizeStyle(o.value),class:e.normalizeClass([s.value,r.$style.icon])},null,6))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),Ms=["onKeyup"],As=e.defineComponent({__name:"PlBtnSplit",props:e.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["click"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const s=n,r=o,l=e.useModel(n,"modelValue"),i=e.ref(),a=e.ref(),c=e.ref(),d=e.ref(),p=e.reactive({open:!1,optionsHeight:0,activeIndex:-1});t({data:p});const m=e.reactive({top:"0px",left:"0px",width:"0px"});e.watch(a,u=>{if(u){const f=u.getBoundingClientRect();p.optionsHeight=f.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const k=e.computed(()=>p.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),y=e.computed(()=>(s.options??[]).findIndex(u=>kt(u.value,l.value))),g=e.computed(()=>ke(s.options??[]).map((u,f)=>({...u,index:f,isSelected:f===y.value,isActive:f===p.activeIndex}))),V=e.computed(()=>s.loading||s.options===void 0),E=e.computed(()=>{var u;return((u=g.value.find(f=>kt(f.value,l.value)))==null?void 0:u.label)??(s.options===void 0?"...":"")});qe(i,u=>{const T=u.top+u.height+3;T+p.optionsHeight>u.clientHeight?m.top=u.top-p.optionsHeight-3+"px":m.top=T+"px",m.left=u.left+"px",m.width=u.width+"px"});const b=u=>{var f;l.value=u,p.open=!1,(f=i==null?void 0:i.value)==null||f.focus()};function F(){r("click")}const C=u=>{var h,_;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(u.code))u.preventDefault();else return;if(u.target===d.value&&u.code==="Enter"){F();return}const{open:f,activeIndex:T}=p;if(!f&&u.target===c.value){u.code==="Enter"&&(p.open=!0);return}u.code==="Escape"&&(p.open=!1,(h=i.value)==null||h.focus());const x=e.unref(g),{length:D}=x;if(!D)return;u.code==="Enter"&&b((_=x.find(S=>S.index===T))==null?void 0:_.value);const B=x.findIndex(S=>S.index===T)??-1,A=u.code==="ArrowDown"?1:u.code==="ArrowUp"?-1:0,$=Math.abs(B+A+D)%D;p.activeIndex=g.value[$].index??-1},z=u=>{var T,x;const f=u.relatedTarget;!((T=i.value)!=null&&T.contains(f))&&!((x=a.value)!=null&&x.contains(f))&&(p.open=!1)};return(u,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:i,class:e.normalizeClass([{disabled:u.disabled||V.value,loading:V.value},"pl-btn-split d-flex"]),onFocusout:z,onKeydown:C},[e.createElementVNode("div",{ref_key:"buttonAction",ref:d,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:F,onKeyup:e.withKeys(e.withModifiers(F,["stop"]),["enter"])},e.toDisplayString(E.value),41,Ms),f[1]||(f[1]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"menuActivator",ref:c,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:f[0]||(f[0]=T=>p.open=!p.open)},[V.value?(e.openBlock(),e.createBlock(ze,{key:0,name:"loading"})):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([k.value,"pl-btn-split__icon"])},null,2))],512),f[2]||(f[2]=e.createTextVNode()),p.open?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createElementVNode("div",{ref_key:"list",ref:a,class:"pl-dropdown__options",style:e.normalizeStyle(m),tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(T,x)=>(e.openBlock(),e.createBlock(Ae,{key:x,option:T,"is-selected":T.isSelected,"is-hovered":T.isActive,size:"medium",onClick:e.withModifiers(D=>b(T.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):e.createCommentVNode("",!0)],34))}});function Fo(n){function t(o){const s=o.currentTarget,r=document.createElement("span"),l=Math.max(s.clientWidth,s.clientHeight),i=l/2;r.style.width=r.style.height=`${l}px`,r.style.left=`${o.clientX-s.offsetLeft-i}px`,r.style.top=`${o.clientY-s.offsetTop-i}px`,r.classList.add("ripple");const a=s.getElementsByClassName("ripple")[0];a&&a.remove(),s.appendChild(r)}e.onMounted(()=>{var o;(o=n.value)==null||o.addEventListener("click",t)})}const zs={key:0},Ps={inheritAttrs:!1},bt=e.defineComponent({...Ps,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n,o=e.ref(),s=e.computed(()=>t.small||t.size==="small"),r=e.computed(()=>t.large||t.size==="large");return Fo(o),(l,i)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"btn",ref:o,tabindex:"0",class:{loading:l.loading,small:s.value,large:r.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",zs,[e.renderSlot(l.$slots,"default")])),i[0]||(i[0]=e.createTextVNode()),l.loading?(e.openBlock(),e.createBlock(e.unref(ze),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(e.openBlock(),e.createBlock(e.unref(ze),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):e.createCommentVNode("",!0)],16))}}),Os={name:"PlBtnPrimary"},Mo=e.defineComponent({...Os,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(bt,e.mergeProps({class:"pl-btn-primary"},t),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),Rs={name:"PlBtnAccent"},Is=e.defineComponent({...Rs,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(bt,e.mergeProps({class:"pl-btn-accent"},t),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),Ls={name:"PlBtnDanger"},js=e.defineComponent({...Ls,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(bt,e.mergeProps({class:"pl-btn-danger"},t),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),vs={name:"PlBtnSecondary"},Ao=e.defineComponent({...vs,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(bt,e.mergeProps(t,{class:"pl-btn-secondary"}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),te=Y(e.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>`mask-24 mask-${t.name}`);return(s,r)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass([o.value,s.$style.icon])},null,2))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),Hs={key:0},Zs={name:"PlBtnGhost"},jt=e.defineComponent({...Zs,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.size==="small"),s=e.computed(()=>t.size==="large"),r=e.ref(),l=e.useSlots();return Fo(r),(i,a)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"btnRef",ref:r,tabindex:"0",class:["pl-btn-ghost",{loading:i.loading,small:o.value,large:s.value,round:i.round,reverse:i.reverse,justifyCenter:i.justifyCenter,[i.$attrs.class+""]:!0}]},{...i.$attrs,disabled:!!i.$attrs.disabled||i.loading}),[e.unref(l).default&&!i.round?(e.openBlock(),e.createElementBlock("span",Hs,[e.renderSlot(i.$slots,"default")])):e.createCommentVNode("",!0),a[0]||(a[0]=e.createTextVNode()),i.loading?(e.openBlock(),e.createBlock(e.unref(te),{key:1,name:"loading",size:i.size},null,8,["size"])):i.icon?(e.openBlock(),e.createBlock(e.unref(te),{key:2,name:i.icon,size:i.size},null,8,["name","size"])):e.createCommentVNode("",!0),a[1]||(a[1]=e.createTextVNode()),e.renderSlot(i.$slots,"append")],16))}}),Us=e.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(n){const t=n,o=e.ref(!1);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-btn-link",{disabled:s.disabled,loading:s.loading,hover:o.value}]),onMouseover:r[0]||(r[0]=l=>o.value=!0),onMouseleave:r[1]||(r[1]=l=>o.value=!1)},[e.createVNode(Ao,e.mergeProps({round:"",hover:o.value},t),null,16,["hover"]),r[2]||(r[2]=e.createTextVNode()),e.renderSlot(s.$slots,"default")],34))}});function Ws(n,t){const o=e.ref();return qe(n,s=>{o.value=s}),e.computed(()=>{const s=e.unref(o),r=e.unref(t),l=r.position??"top",i=r.gap??8;if(!s)return"";const a=s.offsetY+Math.floor(s.height/2),c=s.offsetX+Math.floor(s.width/2);return l==="top-left"?`left: ${s.offsetX}px; top: ${s.offsetY-i}px;`:l==="top"?`left: ${c}px; top: ${s.offsetY-i}px;`:l==="right"?`left: ${s.offsetX+s.width+i}px; top: ${a}px;`:l==="left"?`right: ${s.scrollWidth-s.x+i}px; top: ${a}px;`:l==="southwest"?`left: ${s.offsetX+s.width}px; top: ${s.offsetY+s.height+i}px;`:""})}function Ke(n,t){return t(n)}function G(n,t){if(n!=null)return t(n)}function qs(n){return Array.isArray(n)?n:[n]}function Ks(n,t,...o){o.forEach(s=>{n[s]=t[s]})}function wt(n,t){W(document,"click",o=>{if(!document.contains(o.target))return;qs(n).map(r=>r.value).filter(r=>!!r).some(r=>r==null?void 0:r.contains(o.target))||t()})}const Ys={},Gs={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xs(n,t){return e.openBlock(),e.createElementBlock("svg",Gs,t[0]||(t[0]=[e.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const Js=Y(Ys,[["render",Xs]]),vt=new Map,Qs={name:"PlTooltip"},X=e.defineComponent({...Qs,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(n,{emit:t}){const o=t,s=Symbol(),r=n,l=e.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});vt.set(s,()=>d()),e.watch(()=>l.open,E=>{requestAnimationFrame(()=>{l.tooltipOpen=E})});let i=()=>{};const a=No(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),c=()=>{l.open=!0;for(const[E,b]of vt.entries())E!==s&&b()},d=()=>{l.open=!1,o("tooltip:close")},p=async()=>{r.hide||(a(),l.over=!0,i(),await Vo(100),l.over&&c())},m=()=>{l.over=!1,i=Bo(()=>{l.over||d()},r.closeDelay)};e.watch(()=>r.hide,E=>{E&&d()});const k=e.ref(),y=e.ref(),g=Ws(k,e.toRef(r));wt([k,y],()=>d());const V=e.computed(()=>({"--pl-tooltip-max-width":r.maxWidth}));return e.onUnmounted(()=>{vt.delete(s)}),(E,b)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.element),e.mergeProps(E.$attrs,{ref_key:"rootRef",ref:k,onClick:p,onMouseover:p,onMouseleave:m}),{default:e.withCtx(()=>[e.renderSlot(E.$slots,"default"),b[1]||(b[1]=e.createTextVNode()),E.$slots.tooltip&&l.open?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"tooltip-transition"},{default:e.withCtx(()=>[l.tooltipOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:e.normalizeStyle(e.unref(g))},[e.createElementVNode("div",{ref_key:"tooltip",ref:y,class:e.normalizeClass(["pl-tooltip",E.position]),style:e.normalizeStyle(V.value),onMouseover:p,onMouseleave:m},[e.createElementVNode("div",null,[e.renderSlot(E.$slots,"tooltip")]),b[0]||(b[0]=e.createTextVNode()),e.createVNode(Js)],38)],4)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)]),_:3},16))}}),el={},tl={class:"inner-border"};function ol(n,t,o,s,r,l){return e.openBlock(),e.createElementBlock("div",tl,[e.renderSlot(n.$slots,"default")])}const nl=Y(el,[["render",ol]]),rl={key:0},sl=["tabindex","onKeydown","onClick"],ll={key:1,class:"pl-btn-group__helper"},al={key:2,class:"pl-btn-group__error"},il={name:"PlBtnGroup"},zo=e.defineComponent({...il,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=a=>s("update:modelValue",a),l=n,i=e.computed(()=>l.options.map(a=>({label:"label"in a?a.label:a.text,value:a.value})));return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-btn-group",{disabled:a.disabled,compact:a.compact}])},[a.label?(e.openBlock(),e.createElementBlock("label",rl,[e.createElementVNode("span",null,e.toDisplayString(a.label),1),c[0]||(c[0]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c[1]||(c[1]=e.createTextVNode()),e.createVNode(nl,{class:"pl-btn-group__container"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass(["pl-btn-group__option text-s",{active:a.modelValue===d.value}]),tabindex:a.modelValue===d.value||a.disabled?void 0:0,onKeydown:e.withKeys(m=>r(d.value),["enter"]),onClick:m=>r(d.value)},e.toDisplayString(d.label),43,sl))),128))]),_:1}),c[2]||(c[2]=e.createTextVNode()),a.helper?(e.openBlock(),e.createElementBlock("div",ll,e.toDisplayString(a.helper),1)):a.error?(e.openBlock(),e.createElementBlock("div",al,e.toDisplayString(a.error),1)):e.createCommentVNode("",!0)],2))}});function cl(n,t){const o=e.ref(),s=e.ref(),{parse:r,update:l}=t,i=()=>{o.value=void 0,s.value=void 0},a=e.computed({get(){return o.value!==void 0?o.value:n.value},set(c){i();try{const d=r?r(c):c;(l?l(d):!0)?n.value=d:o.value=d}catch(d){o.value=c,s.value=d instanceof Error?d.message:String(d)}}});return e.reactive({value:a,error:s,reset:i})}const Ht={component:"_component_1prpy_1",container:"_container_1prpy_15",error:"_error_1prpy_69"},dl={key:0},pl=["placeholder"],ml=e.defineComponent({__name:"PlEditableTitle",props:e.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=n,s=cl(t,{update(){return!1},parse:a=>{if(typeof a!="string")throw Error("value should be a string");if(o.maxLength&&a.length>o.maxLength)throw Error(`Max title length is ${o.maxLength} characters`);if(o.minLength&&a.length<o.minLength)throw Error(`Min title length is ${o.minLength} characters`);return a.trim()}}),r=e.computed(()=>({maxWidth:o.maxWidth??"80%"})),l=()=>{t.value=s.value&&!s.error?s.value:t.value,s.reset()},i=e.ref();return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-editable-title",e.unref(Ht).component]),style:e.normalizeStyle(r.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(Ht).container),onClick:c[3]||(c[3]=()=>{var d;return(d=i.value)==null?void 0:d.focus()})},[a.prefix?(e.openBlock(),e.createElementBlock("span",dl,e.toDisplayString(a.prefix.trim())+" ",1)):e.createCommentVNode("",!0),c[4]||(c[4]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":c[0]||(c[0]=d=>e.unref(s).value=d),placeholder:a.placeholder,onFocusout:l,onKeydown:[c[1]||(c[1]=e.withKeys((...d)=>e.unref(s).reset&&e.unref(s).reset(...d),["escape"])),c[2]||(c[2]=e.withKeys(d=>{var p;return(p=d.target)==null?void 0:p.blur()},["enter"]))]},null,40,pl),[[e.vModelText,e.unref(s).value]])],2),c[5]||(c[5]=e.createTextVNode()),e.unref(s).error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(Ht).error)},e.toDisplayString(e.unref(s).error),3)):e.createCommentVNode("",!0)],6))}}),ul={inheritAttrs:!1},fl={class:"double-contour"};function hl(n,t,o,s,r,l){return e.openBlock(),e.createElementBlock("div",fl,[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(n.$attrs)),[e.renderSlot(n.$slots,"default")],16)])}const _e=Y(ul,[["render",hl]]);function Po(n){e.onMounted(n),e.onUpdated(n)}const Zt=new WeakMap,Ut=new ResizeObserver(n=>{for(const t of n)G(Zt.get(t.target),o=>o(t))});function Oo(n,t){Zt.set(n,t),Ut.unobserve(n),Ut.observe(n)}function Ro(n){Ut.unobserve(n),Zt.delete(n)}const gl=8,Io=4;function ue(n,t="label"){const o=new Set;Po(()=>{G(n==null?void 0:n.value,s=>{const r=s.querySelector(t);r&&(o.add(r),Oo(r,()=>{const l=wo(()=>r.getBoundingClientRect().width+Ke(gl,i=>Number.isNaN(i)?Io:i+Io));s.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&s.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),e.onBeforeUnmount(()=>{Array.from(o.values()).map(s=>Ro(s))})}function yl(n,t){const o=[];return t&&t.length>0&&t.forEach(s=>{const r=s(n);typeof r=="string"&&o.push(r)}),{isValid:o.length===0,errors:o}}function Lo(n,t){return e.computed(()=>yl(n.value,t))}const $e=Y(e.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>t.size==="large"?"--icon-size: 24px":""),s=e.computed(()=>`icon-16 icon-${t.name}`);return(r,l)=>(e.openBlock(),e.createElementBlock("i",{style:e.normalizeStyle(o.value),class:e.normalizeClass([s.value,r.$style.icon])},null,6))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),kl={class:"pl-text-field__envelope"},_l={key:0,ref:"label"},bl={key:0,class:"required-icon"},wl={key:1,class:"pl-text-field__prefix"},Vl=["disabled","placeholder","type"],Bl={key:0,class:"pl-text-field__error"},Cl={key:1,class:"pl-text-field__helper"},El={name:"PlTextField"},xl=e.defineComponent({...El,props:e.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useSlots(),o=e.useModel(n,"modelValue"),s=n,r=e.ref(void 0),l=e.ref(),i=e.ref(!1),a=e.reactive({cached:void 0}),c=e.computed({get(){return a.cached?a.cached.value:o.value===void 0||o.value===null?"":String(o.value)},set(u){if(a.cached=void 0,s.parse)try{o.value=s.parse(u)}catch(f){a.cached={error:f instanceof Error?f.message:String(f),value:u}}else o.value=u}}),d=e.computed(()=>s.type&&s.type==="password"?i.value?"text":s.type:"text"),p=e.computed(()=>i.value?"view-show":"view-hide"),m=()=>{s.clearable&&(a.cached=void 0,o.value=s.clearable===!0?"":s.clearable())},k=Lo(c,s.rules||[]),y=e.computed(()=>s.clearable?s.clearable===!0?o.value==="":o.value===s.clearable():o.value===""),g=e.computed(()=>!y.value),V=e.computed(()=>{const u=[];return s.error&&u.push(s.error),a.cached&&u.push(a.cached.error),k.value.isValid||u.push(...k.value.errors),u}),E=e.computed(()=>V.value.length>0),b=e.computed(()=>s.clearable&&g.value&&s.type!=="password"&&!s.disabled),F=()=>i.value=!i.value,C=()=>{a.cached=void 0},z=()=>{var u;return(u=l.value)==null?void 0:u.focus()};return ue(r),(u,f)=>(e.openBlock(),e.createElementBlock("div",kl,[e.createElementVNode("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["pl-text-field",{error:E.value,disabled:u.disabled,dashed:u.dashed,nonEmpty:g.value}])},[u.label?(e.openBlock(),e.createElementBlock("label",_l,[u.required?(e.openBlock(),e.createElementBlock("i",bl)):e.createCommentVNode("",!0),f[1]||(f[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(u.label),1),f[2]||(f[2]=e.createTextVNode()),e.unref(t).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(u.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),f[5]||(f[5]=e.createTextVNode()),u.prefix?(e.openBlock(),e.createElementBlock("div",wl,e.toDisplayString(u.prefix),1)):e.createCommentVNode("",!0),f[6]||(f[6]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":f[0]||(f[0]=T=>c.value=T),disabled:u.disabled,placeholder:u.placeholder||"...",type:d.value,spellcheck:"false",onFocusout:C},null,40,Vl),[[e.vModelDynamic,c.value]]),f[7]||(f[7]=e.createTextVNode()),e.createElementVNode("div",{class:"pl-text-field__append",onClick:z},[b.value?(e.openBlock(),e.createBlock(e.unref($e),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:e.withModifiers(m,["stop"])})):e.createCommentVNode("",!0),f[3]||(f[3]=e.createTextVNode()),u.type==="password"?(e.openBlock(),e.createBlock(e.unref(te),{key:1,name:p.value,style:{cursor:"pointer"},onClick:e.withModifiers(F,["stop"])},null,8,["name"])):e.createCommentVNode("",!0),f[4]||(f[4]=e.createTextVNode()),e.renderSlot(u.$slots,"append")]),f[8]||(f[8]=e.createTextVNode()),e.createVNode(_e,{class:"pl-text-field__contour"})],2),f[9]||(f[9]=e.createTextVNode()),E.value?(e.openBlock(),e.createElementBlock("div",Bl,e.toDisplayString(V.value.join(" ")),1)):u.helper?(e.openBlock(),e.createElementBlock("div",Cl,e.toDisplayString(u.helper),1)):e.createCommentVNode("",!0)]))}}),Wt=Y(e.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>`icon-24 icon-${t.name}`);return(s,r)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass([o.value,s.$style.icon])},null,2))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),$l=["disabled","placeholder"],jo=Y(e.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(void 0),l=e.ref(),i=e.computed({get(){return s.modelValue??""},set(d){o("update:modelValue",d)}}),a=e.computed(()=>!!s.modelValue),c=()=>o("update:modelValue","");return(d,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:r,class:e.normalizeClass(["pl-search-field",[d.$style.component]])},[e.createVNode(e.unref(Wt),{name:"search"}),p[1]||(p[1]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":p[0]||(p[0]=m=>i.value=m),disabled:d.disabled,type:"text",placeholder:d.placeholder||"Find...",spellcheck:"false"},null,8,$l),[[e.vModelText,i.value]]),p[2]||(p[2]=e.createTextVNode()),d.clearable&&a.value?(e.openBlock(),e.createBlock(e.unref($e),{key:0,class:e.normalizeClass(d.$style.clear),name:"delete-clear",onClick:e.withModifiers(c,["stop"])},null,8,["class"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{component:"_component_pz0lo_1",clear:"_clear_pz0lo_35"}}]]),Nl={class:"ui-text-area__envelope"},Tl={key:0,ref:"label"},Sl={key:0,class:"required-icon"},Dl=["readonly","rows","disabled","placeholder"],Fl={class:"ui-text-area__append"},Ml={key:0,class:"ui-text-area__error"},Al={key:1,class:"ui-text-area__helper"},zl={name:"PlTextArea"},Pl=e.defineComponent({...zl,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.ref(),i=e.ref(),a=e.computed({get(){return r.modelValue??""},set(y){s("update:modelValue",y)}}),c=e.computed(()=>!!r.modelValue),d=Lo(a,r.rules||[]);ue(l);const p=e.computed(()=>{const y=[];return r.error&&y.push(r.error),y.push(...d.value.errors),y}),m=e.computed(()=>p.value.length>0),k=()=>{if(!r.autogrow)return;const y=i.value;y&&(y.style.height="auto",y.style.height=`${y.scrollHeight}px`)};return e.onMounted(()=>{k()}),(y,g)=>(e.openBlock(),e.createElementBlock("div",Nl,[e.createElementVNode("div",{ref_key:"root",ref:l,class:e.normalizeClass(["ui-text-area",{error:m.value,disabled:y.disabled,dashed:y.dashed,nonEmpty:c.value}])},[y.label?(e.openBlock(),e.createElementBlock("label",Tl,[y.required?(e.openBlock(),e.createElementBlock("i",Sl)):e.createCommentVNode("",!0),g[1]||(g[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(y.label),1),g[2]||(g[2]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(y.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),g[3]||(g[3]=e.createTextVNode()),e.withDirectives(e.createElementVNode("textarea",{ref_key:"input",ref:i,"onUpdate:modelValue":g[0]||(g[0]=V=>a.value=V),readonly:y.readonly,rows:y.rows,disabled:y.disabled,placeholder:y.placeholder??"...",spellcheck:"false",onInput:k},null,40,Dl),[[e.vModelText,a.value]]),g[4]||(g[4]=e.createTextVNode()),e.createElementVNode("div",Fl,[e.renderSlot(y.$slots,"append")]),g[5]||(g[5]=e.createTextVNode()),e.createVNode(_e,{class:"ui-text-area__contour"})],2),g[6]||(g[6]=e.createTextVNode()),m.value?(e.openBlock(),e.createElementBlock("div",Ml,e.toDisplayString(p.value.join(" ")),1)):y.helper?(e.openBlock(),e.createElementBlock("div",Al,e.toDisplayString(y.helper),1)):e.createCommentVNode("",!0)]))}});function vo(n){return n!==null&&typeof n=="object"}function oe(n,t){return vo(n)&&vo(t)?Object.keys(n).length!==Object.keys(t).length?!1:Object.keys(n).every(o=>oe(n[o],t[o])):n===t}function qt(n,t){return n.some(o=>oe(o,t))}const Kt=e.defineComponent({__name:"LongText",setup(n){e.useCssVars(p=>({"6bc9e89c":i.value}));const t=e.ref(!1),o=e.ref(),s=e.ref(!1),r=e.computed(()=>s.value&&t.value?"ui-lt-animate":""),l=$o(p=>s.value=p,500),i=e.computed(()=>{var p;return o.value?`${((p=o.value)==null?void 0:p.innerHTML.length)*.4}s`:"5s"});function a(){const p=Pt(o.value,"span cannot be empty");t.value=p.clientWidth<p.scrollWidth}function c(){a(),l(!0)}function d(){l(!1)}return(p,m)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(p.$attrs,{class:"ui-lt-container"}),[e.createElementVNode("span",{onMouseover:c,onMouseleave:d},[e.createElementVNode("span",{ref_key:"span",ref:o,class:e.normalizeClass(r.value)},[e.renderSlot(p.$slots,"default")],2)],32)],16))}});function Ho(n,t){const o=n.scrollTop,s=n.getBoundingClientRect().height,r=t.offsetTop,l=t.getBoundingClientRect().height;return r+l<s+o&&r>o}function Zo(n,t){const o=n.scrollTop,s=n.getBoundingClientRect().height,r=t.offsetTop,l=t.getBoundingClientRect().height;return r+l<s+o?"ceil":r>o?"floor":"visible"}function Vt(n,t,o={}){const s=n.scrollTop,r=n.getBoundingClientRect().height,l=t.getBoundingClientRect().height,i=t.offsetTop,a=Zo(n,t);if(a==="visible")return;const c=d=>{const p=a==="floor"?i-(r-l):i;n.scrollTop=s+d*(p-s)};Ho(n,t)||xo({duration:o.duration||100,timing:Eo(d=>d),draw:c})}function Yt(n,t,o,s){return n.addEventListener(t,o,s),function(){n.removeEventListener(t,o)}}function Ol(n,t){const o=t.getBoundingClientRect();return n.x<o.x||n.x>o.x+o.width||n.y<o.y||n.y>o.y+o.height}const Gt=e.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(n,{expose:t}){const o=n,s=e.reactive({optionsHeight:0}),r=e.reactive({top:"0px",left:"0px",width:"0px"}),l=e.toRef(o,"root"),i=e.ref();return t({scrollIntoActive:()=>{const c=i.value;c&&ge(c.querySelector(".hovered-item"),d=>{Vt(c,d)})},listRef:i}),e.watch(i,c=>{c&&requestAnimationFrame(()=>{const d=c.getBoundingClientRect();s.optionsHeight=d.height,window.dispatchEvent(new CustomEvent("adjust"))})}),qe(l,c=>{const d=document.body.getBoundingClientRect(),p=c.top-d.top,m=c.left-d.left,k=o.gap??0,y=p+c.height+k;y+s.optionsHeight>c.clientHeight?r.top=p-s.optionsHeight-k+"px":r.top=y+"px",r.left=m+"px",r.width=c.width+"px"}),(c,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",e.mergeProps({ref_key:"listRef",ref:i},c.$attrs,{style:r,tabindex:"-1"}),[e.renderSlot(c.$slots,"default",{ref:"list"})],16)]))}}),Rl={class:"pl-dropdown__envelope"},Il=["tabindex"],Ll={class:"pl-dropdown__container"},jl={class:"pl-dropdown__field"},vl=["disabled","placeholder"],Hl={class:"pl-dropdown__controls"},Zl={key:0},Ul={key:0,class:"required-icon"},Wl={key:0,class:"nothing-found"},ql={key:0,class:"pl-dropdown__error"},Kl={key:1,class:"pl-dropdown__helper"},Yl={key:2,class:"pl-dropdown__helper"},Gl={name:"PlDropdown"},Xt=e.defineComponent({...Gl,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.useSlots(),l=e.ref(),i=e.ref(),a=e.useTemplateRef("overlay"),c=e.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),d=()=>Ke(C.value.findIndex($=>oe($.value,s.modelValue)),$=>$<0?0:$),p=()=>c.activeIndex=d(),m=e.computed(()=>s.options===void 0),k=e.computed(()=>m.value?!0:s.disabled),y=e.computed(()=>(s.options??[]).findIndex($=>oe($.value,s.modelValue))),g=e.computed(()=>{if(!m.value){if(s.error)return s.error;if(s.modelValue!==void 0&&y.value===-1)return"The selected value is not one of the options"}}),V=e.computed(()=>ke(s.options??[]).map(($,h)=>({...$,index:h,isSelected:h===y.value,isActive:h===c.activeIndex}))),E=e.computed(()=>{const h=e.unref(V).find(_=>oe(_.value,s.modelValue));return(h==null?void 0:h.label)||s.modelValue}),b=e.computed(()=>!c.open&&s.modelValue?"":s.modelValue?String(E.value):s.placeholder),F=e.computed(()=>s.modelValue!==void 0&&s.modelValue!==null),C=e.computed(()=>{const $=V.value;return c.search?$.filter(h=>{const _=c.search.toLowerCase();return h.label.toLowerCase().includes(_)||h.description&&h.description.toLowerCase().includes(_)?!0:typeof h.value=="string"?h.value.toLowerCase().includes(_):h.value===c.search}):$}),z=e.computed(()=>k.value?void 0:"0"),u=$=>{var h;o("update:modelValue",$),c.search="",c.open=!1,(h=l==null?void 0:l.value)==null||h.focus()},f=()=>o("update:modelValue",void 0),T=()=>{var $;return($=i.value)==null?void 0:$.focus()},x=()=>c.open=!c.open,D=()=>c.open=!0,B=$=>{var _,S,M;const h=$.relatedTarget;!((_=l.value)!=null&&_.contains(h))&&!((M=(S=a.value)==null?void 0:S.listRef)!=null&&M.contains(h))&&(c.search="",c.open=!1)},A=$=>{var He,ft;if(["ArrowDown","ArrowUp","Enter","Escape"].includes($.code))$.preventDefault();else return;const{open:h,activeIndex:_}=c;if(!h){$.code==="Enter"&&(c.open=!0);return}$.code==="Escape"&&(c.open=!1,(He=l.value)==null||He.focus());const S=e.unref(C),{length:M}=S;if(!M)return;$.code==="Enter"&&u((ft=S.find(Ze=>Ze.index===_))==null?void 0:ft.value);const H=S.findIndex(Ze=>Ze.index===_)??-1,Z=$.code==="ArrowDown"?1:$.code==="ArrowUp"?-1:0,De=Math.abs(H+Z+M)%M;c.activeIndex=C.value[De].index??-1};return ue(l),e.watch(()=>s.modelValue,p,{immediate:!0}),e.watch(()=>c.open,$=>{var h;return $?(h=i.value)==null?void 0:h.focus():""}),e.watchPostEffect(()=>{var $;c.search,c.activeIndex>=0&&c.open&&(($=a.value)==null||$.scrollIntoActive())}),($,h)=>(e.openBlock(),e.createElementBlock("div",Rl,[e.createElementVNode("div",{ref_key:"rootRef",ref:l,tabindex:z.value,class:e.normalizeClass(["pl-dropdown",{open:c.open,error:$.error,disabled:k.value}]),onKeydown:A,onFocusout:B},[e.createElementVNode("div",Ll,[e.createElementVNode("div",jl,[e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:i,"onUpdate:modelValue":h[0]||(h[0]=_=>c.search=_),type:"text",tabindex:"-1",disabled:k.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:D},null,40,vl),[[e.vModelText,c.search]]),h[4]||(h[4]=e.createTextVNode()),c.open?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"input-value",onClick:T},[e.createVNode(Kt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.value),1)]),_:1})])),h[5]||(h[5]=e.createTextVNode()),e.createElementVNode("div",Hl,[m.value?(e.openBlock(),e.createBlock(e.unref(te),{key:0,name:"loading"})):e.createCommentVNode("",!0),h[1]||(h[1]=e.createTextVNode()),$.clearable&&F.value?(e.openBlock(),e.createBlock(e.unref($e),{key:1,name:"delete-clear",onClick:e.withModifiers(f,["stop"])})):e.createCommentVNode("",!0),h[2]||(h[2]=e.createTextVNode()),e.renderSlot($.$slots,"append"),h[3]||(h[3]=e.createTextVNode()),$.arrowIconLarge?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["arrow-icon",[`icon-24 ${$.arrowIconLarge}`]]),onClick:e.withModifiers(x,["stop"])},null,2)):$.arrowIcon?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["arrow-icon",[`icon-16 ${$.arrowIcon}`]]),onClick:e.withModifiers(x,["stop"])},null,2)):(e.openBlock(),e.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:e.withModifiers(x,["stop"])}))])]),h[9]||(h[9]=e.createTextVNode()),$.label?(e.openBlock(),e.createElementBlock("label",Zl,[$.required?(e.openBlock(),e.createElementBlock("i",Ul)):e.createCommentVNode("",!0),h[6]||(h[6]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString($.label),1),h[7]||(h[7]=e.createTextVNode()),e.unref(r).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot($.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h[10]||(h[10]=e.createTextVNode()),c.open?(e.openBlock(),e.createBlock(e.unref(Gt),{key:1,ref_key:"overlay",ref:a,root:l.value,class:"pl-dropdown__options",tabindex:"-1",gap:3},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(_,S)=>(e.openBlock(),e.createBlock(Ae,{key:S,option:_,"is-selected":_.isSelected,"is-hovered":_.isActive,size:$.optionSize,onClick:e.withModifiers(M=>u(_.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),h[8]||(h[8]=e.createTextVNode()),C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Wl,"Nothing found"))]),_:1},8,["root"])):e.createCommentVNode("",!0),h[11]||(h[11]=e.createTextVNode()),e.createVNode(_e,{class:"pl-dropdown__contour"})])],42,Il),h[12]||(h[12]=e.createTextVNode()),g.value?(e.openBlock(),e.createElementBlock("div",ql,e.toDisplayString(g.value),1)):m.value&&$.loadingOptionsHelper?(e.openBlock(),e.createElementBlock("div",Kl,e.toDisplayString($.loadingOptionsHelper),1)):$.helper?(e.openBlock(),e.createElementBlock("div",Yl,e.toDisplayString($.helper),1)):e.createCommentVNode("",!0)]))}}),Xl={name:"PlDropdownRef"},Jl=e.defineComponent({...Xl,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(n){const t=n,o=e.computed(()=>{var r;return(r=t.options)==null?void 0:r.map(l=>({label:l.label,value:l.ref}))}),s=e.computed(()=>t.disabled?"icon-link-disabled":"icon-link");return(r,l)=>(e.openBlock(),e.createBlock(e.unref(Xt),e.mergeProps(t,{options:o.value,"loading-options-helper":r.loadingOptionsHelper,"arrow-icon-large":s.value,"onUpdate:modelValue":l[0]||(l[0]=i=>r.$emit("update:modelValue",i))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function Ql(n,t){return e.computed(()=>{const o=ke(n.value);return t.value?o.filter(s=>s.label.toLowerCase().includes(t.value.toLowerCase())):o})}const ea={class:"resizable-input"},ta=["placeholder","value","disabled"],oa=e.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,s=t,r=e.computed(()=>{var a;return o.placeholder?o.placeholder:(a=o.modelValue)==null?void 0:a.replace('"',"")}),l=e.computed(()=>{const a={};return o.width&&(a.width=o.width),o.maxWidth&&(a.maxWidth=o.maxWidth),a});function i(a){s("update:modelValue",a.target.value)}return(a,c)=>(e.openBlock(),e.createElementBlock("div",ea,[e.createElementVNode("span",{style:e.normalizeStyle(l.value),class:"resizable-input__size-span"},e.toDisplayString(r.value),5),c[0]||(c[0]=e.createTextVNode()),e.createElementVNode("input",e.mergeProps(a.$attrs,{placeholder:a.placeholder,value:o.modelValue,disabled:o.disabled,style:l.value,onInput:i}),null,16,ta)]))}}),na={class:"dropdown-tab-item__title text-caps13"},ra=e.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.option.label),s=e.computed(()=>{const r=[];return t.isSelected&&r.push("dropdown-tab-item__selected"),t.isHovered&&r.push("hovered-item"),r.join(" ")});return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.value,"dropdown-tab-item"])},[e.createElementVNode("div",na,e.toDisplayString(o.value),1)],2))}}),sa={class:"pl-line-dropdown__prefix"},la={class:"pl-line-dropdown__icon-wrapper"},aa={class:"pl-line-dropdown__icon"},ia={key:0,class:"pl-line-dropdown__no-item"},ca={key:0,class:"pl-line-dropdown__no-item"},da=e.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=e.ref(),i=e.ref(),a=e.computed(()=>{const B=[];return r.isOpen&&B.push("open"),s.disabled&&B.push("disabled"),B.join(" ")}),c=e.ref(""),d=Ql(e.toRef(s,"options"),c),p=e.computed(()=>!!(s.clearable&&r.isOpen&&s.modelValue&&m.value)),m=e.computed(()=>{if(s.modelValue){const B=g();if(B!==-1)return ke(s.options)[B].label}return""}),k=e.ref(m.value);e.watch(m,B=>{k.value=B});const y=e.computed(()=>r.isOpen&&c.value&&c.value.length>=m.value.length-1?c.value:m.value||"...");wt(l,()=>{s.mode==="list"&&(r.isOpen=!1)}),e.watch(()=>k.value,B=>{m.value!==B?c.value=B:c.value=""}),e.watch(()=>r.isOpen,B=>{var A;B&&l.value&&((A=l.value.querySelector("input"))==null||A.focus(),e.nextTick(()=>T()))}),e.watch(()=>s.modelValue,()=>V(),{immediate:!0});function g(){return s.options.findIndex(B=>oe(B.value,s.modelValue))}function V(){r.activeOption=Ke(d.value.findIndex(B=>oe(B.value,s.modelValue)),B=>B<0?0:B)}function E(){c.value=""}function b(){s.disabled?r.isOpen=!1:e.nextTick(()=>{r.isOpen=!r.isOpen})}function F(){s.mode==="list"&&(r.isOpen=!1)}function C(B){B&&(o("update:modelValue",B.value),F(),E())}function z(B){return oe(B.value,s.modelValue)}const u=B=>{var $,h;const A=B.relatedTarget;!(($=l.value)!=null&&$.contains(A))&&!((h=i.value)!=null&&h.contains(A))&&(c.value="",r.isOpen=!1)};function f(B){const{activeOption:A}=r;if(!r.isOpen&&B.code==="Enter"){r.isOpen=!0;return}const{length:$}=d.value;if(!$)return;["ArrowDown","ArrowUp","Enter"].includes(B.code)&&B.preventDefault(),B.code==="Enter"&&C(d.value[A]);const h=B.code==="ArrowDown"?1:B.code==="ArrowUp"?-1:0;r.activeOption=Math.abs(A+h+$)%$,requestAnimationFrame(T)}function T(){const B=i.value;B&&G(B.querySelector(".hovered-item"),A=>{s.mode==="list"?Vt(B,A):A.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function x(){o("update:modelValue",void 0)}const D=e.reactive({top:"0px",left:"0px"});return e.watch(i,B=>{if(B){const A=B.getBoundingClientRect();r.optionsHeight=A.height,window.dispatchEvent(new CustomEvent("adjust"))}}),qe(l,B=>{const $=B.top+B.height+2;$+r.optionsHeight>B.clientHeight?D.top=B.top-r.optionsHeight-2+"px":D.top=$+"px",D.left=B.left+"px"}),(B,A)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:e.normalizeClass([a.value,"pl-line-dropdown uc-pointer"]),onKeydown:f,onFocusout:u,onClick:b},[e.createElementVNode("div",sa,e.toDisplayString(s==null?void 0:s.prefix),1),A[6]||(A[6]=e.createTextVNode()),e.createVNode(oa,{modelValue:k.value,"onUpdate:modelValue":A[0]||(A[0]=$=>k.value=$),placeholder:y.value,disabled:s.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),A[7]||(A[7]=e.createTextVNode()),e.createElementVNode("div",la,[e.withDirectives(e.createElementVNode("div",aa,null,512),[[e.vShow,!p.value]]),A[1]||(A[1]=e.createTextVNode()),e.withDirectives(e.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:x},null,512),[[e.vShow,p.value]])]),A[8]||(A[8]=e.createTextVNode()),r.isOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[s.mode==="list"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"list",ref:i,style:e.normalizeStyle(D),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:u},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),($,h)=>e.renderSlot(B.$slots,"item",{key:h,item:$,textItem:"text",isSelected:z($),isHovered:r.activeOption==h,onClick:e.withModifiers(_=>C($),["stop"])},()=>[e.createVNode(Ae,{option:$,"text-item":"text","is-selected":z($),"is-hovered":r.activeOption==h,size:"medium",onClick:e.withModifiers(_=>C($),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),A[3]||(A[3]=e.createTextVNode()),e.unref(d).length===0?(e.openBlock(),e.createElementBlock("div",ia,A[2]||(A[2]=[e.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):e.createCommentVNode("",!0)],36)):s.mode==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"list",ref:i,style:e.normalizeStyle(D),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:u},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),($,h)=>e.renderSlot(B.$slots,"item",{key:h,item:$,isSelected:z($),isHovered:r.activeOption==h,onClick:e.withModifiers(_=>C($),["stop"])},()=>[e.createVNode(ra,{option:$,"is-selected":z($),"is-hovered":r.activeOption==h,onClick:e.withModifiers(_=>C($),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),A[5]||(A[5]=e.createTextVNode()),e.unref(d).length===0?(e.openBlock(),e.createElementBlock("div",ca,A[4]||(A[4]=[e.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],34))}}),pa={class:"ui-dropdown__envelope"},ma=["tabindex"],ua={class:"ui-dropdown__container"},fa={class:"ui-dropdown__field"},ha=["disabled","placeholder"],ga={class:"ui-dropdown__controls"},ya={key:0},ka={key:0,class:"required-icon"},_a={key:0,class:"nothing-found"},ba={key:0,class:"ui-dropdown__error"},wa={key:1,class:"ui-dropdown__helper"},Va={key:2,class:"ui-dropdown__helper"},Ba={name:"PlDropdown"},Ca=e.defineComponent({...Ba,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.useSlots(),l=e.ref(),i=e.ref(),a=e.ref(),c=e.reactive({search:"",activeIndex:-1,open:!1}),d=()=>Ke(C.value.findIndex(h=>oe(h.value,s.modelValue)),h=>h<0?0:h),p=()=>c.activeIndex=d(),m=e.computed(()=>s.options===void 0),k=e.computed(()=>m.value?!0:s.disabled),y=e.computed(()=>(s.options??[]).findIndex(h=>oe(h.value,s.modelValue))),g=e.computed(()=>{if(!m.value){if(s.error)return s.error;if(s.modelValue!==void 0&&y.value===-1)return"The selected value is not one of the options"}}),V=e.computed(()=>ke(s.options??[]).map((h,_)=>({...h,index:_,isSelected:_===y.value,isActive:_===c.activeIndex}))),E=e.computed(()=>{const _=e.unref(V).find(S=>oe(S.value,s.modelValue));return(_==null?void 0:_.label)||s.modelValue}),b=e.computed(()=>!c.open&&s.modelValue?"":s.modelValue?String(E.value):s.placeholder),F=e.computed(()=>s.modelValue!==void 0&&s.modelValue!==null),C=e.computed(()=>{const h=V.value;return c.search?h.filter(_=>{const S=c.search.toLowerCase();return _.label.toLowerCase().includes(S)||_.description&&_.description.toLowerCase().includes(S)?!0:typeof _.value=="string"?_.value.toLowerCase().includes(S):_.value===c.search}):h}),z=e.computed(()=>k.value?void 0:"0"),u=h=>{var _;o("update:modelValue",h),c.search="",c.open=!1,(_=l==null?void 0:l.value)==null||_.focus()},f=()=>o("update:modelValue",void 0),T=()=>{var h;return(h=a.value)==null?void 0:h.focus()},x=()=>c.open=!c.open,D=()=>c.open=!0,B=h=>{var _;(_=l==null?void 0:l.value)!=null&&_.contains(h.relatedTarget)||(c.search="",c.open=!1)},A=()=>{const h=i.value;h&&G(h.querySelector(".hovered-item"),_=>{Vt(h,_)})},$=h=>{var ft,Ze;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(h.code))h.preventDefault();else return;const{open:_,activeIndex:S}=c;if(!_){h.code==="Enter"&&(c.open=!0);return}h.code==="Escape"&&(c.open=!1,(ft=l.value)==null||ft.focus());const M=e.unref(C),{length:H}=M;if(!H)return;h.code==="Enter"&&u((Ze=M.find(io=>io.index===S))==null?void 0:Ze.value);const Z=M.findIndex(io=>io.index===S)??-1,De=h.code==="ArrowDown"?1:h.code==="ArrowUp"?-1:0,He=Math.abs(Z+De+H)%H;c.activeIndex=C.value[He].index??-1};return ue(l),e.watch(()=>s.modelValue,p,{immediate:!0}),e.watch(()=>c.open,h=>{var _;return h?(_=a.value)==null?void 0:_.focus():""}),e.watchPostEffect(()=>{c.search,c.activeIndex>=0&&c.open&&A()}),(h,_)=>(e.openBlock(),e.createElementBlock("div",pa,[e.createElementVNode("div",{ref_key:"root",ref:l,tabindex:z.value,class:e.normalizeClass(["ui-dropdown",{open:c.open,error:h.error,disabled:k.value}]),onKeydown:$,onFocusout:B},[e.createElementVNode("div",ua,[e.createElementVNode("div",fa,[e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:a,"onUpdate:modelValue":_[0]||(_[0]=S=>c.search=S),type:"text",tabindex:"-1",disabled:k.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:D},null,40,ha),[[e.vModelText,c.search]]),_[4]||(_[4]=e.createTextVNode()),c.open?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:T},[e.createVNode(Kt,{class:"input-value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.value),1)]),_:1})])),_[5]||(_[5]=e.createTextVNode()),e.createElementVNode("div",ga,[m.value?(e.openBlock(),e.createBlock(e.unref(te),{key:0,name:"loading"})):e.createCommentVNode("",!0),_[1]||(_[1]=e.createTextVNode()),h.clearable&&F.value?(e.openBlock(),e.createBlock(e.unref($e),{key:1,name:"delete-clear",onClick:e.withModifiers(f,["stop"])})):e.createCommentVNode("",!0),_[2]||(_[2]=e.createTextVNode()),e.renderSlot(h.$slots,"append"),_[3]||(_[3]=e.createTextVNode()),h.arrowIconLarge?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["arrow-icon",[`icon-24 ${h.arrowIconLarge}`]]),onClick:e.withModifiers(x,["stop"])},null,2)):h.arrowIcon?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["arrow-icon",[`icon-16 ${h.arrowIcon}`]]),onClick:e.withModifiers(x,["stop"])},null,2)):(e.openBlock(),e.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:e.withModifiers(x,["stop"])}))])]),_[9]||(_[9]=e.createTextVNode()),h.label?(e.openBlock(),e.createElementBlock("label",ya,[h.required?(e.openBlock(),e.createElementBlock("i",ka)):e.createCommentVNode("",!0),_[6]||(_[6]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(h.label),1),_[7]||(_[7]=e.createTextVNode()),e.unref(r).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(h.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_[10]||(_[10]=e.createTextVNode()),c.open?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"list",ref:i,class:"ui-dropdown__options"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(S,M)=>(e.openBlock(),e.createBlock(Ae,{key:M,option:S,"is-selected":S.isSelected,"is-hovered":S.isActive,size:h.optionSize,onClick:e.withModifiers(H=>u(S.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),_[8]||(_[8]=e.createTextVNode()),C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",_a,"Nothing found"))],512)):e.createCommentVNode("",!0),_[11]||(_[11]=e.createTextVNode()),e.createVNode(_e,{class:"ui-dropdown__contour"})])],42,ma),_[12]||(_[12]=e.createTextVNode()),g.value?(e.openBlock(),e.createElementBlock("div",ba,e.toDisplayString(g.value),1)):m.value&&h.loadingOptionsHelper?(e.openBlock(),e.createElementBlock("div",wa,e.toDisplayString(h.loadingOptionsHelper),1)):h.helper?(e.openBlock(),e.createElementBlock("div",Va,e.toDisplayString(h.helper),1)):e.createCommentVNode("",!0)]))}}),Ea={key:0,class:"ui-progress-bar"},xa={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},$a={class:"ui-progress-bar__message flex-grow-1"},Na={class:"ui-progress-bar__percent"},Ta=e.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(n){const t=n,o=e.computed(()=>t.progress===100?t.completeMessage:"");return(s,r)=>s.loading?(e.openBlock(),e.createElementBlock("div",Ea,[e.createElementVNode("div",{class:"ui-progress-bar__indicator",style:e.normalizeStyle({width:s.progress+"%"})},null,4),r[1]||(r[1]=e.createTextVNode()),e.createElementVNode("div",xa,[e.createElementVNode("div",$a,e.toDisplayString(o.value),1),r[0]||(r[0]=e.createTextVNode()),e.createElementVNode("div",Na,e.toDisplayString(s.progress+"%"),1)])])):e.createCommentVNode("",!0)}}),Sa={class:"mi-number-field__main-wrapper d-flex"},Da={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},Fa={key:0,class:"text-description"},Ma=["disabled","placeholder"],Aa={class:"mi-number-field__icons d-flex-column"},za={key:0,class:"mi-number-field__hint text-description"},Pa=e.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,s=t,r=e.ref(),l=e.useSlots(),i=e.ref();ue(r);const a=e.ref(!0),c=e.computed({get(){return a.value&&o.modelValue!==void 0?new Number(o.modelValue).toString():""},set(b){var F;b=b.replace(/,/g,""),k(b)?(s("update:modelValue",+b),b.toString()!==((F=o.modelValue)==null?void 0:F.toString())&&+b===o.modelValue&&b[b.length-1]!=="."&&(a.value=!1,e.nextTick(()=>{a.value=!0}))):(b.trim()===""&&s("update:modelValue",void 0),a.value=!1,e.nextTick(()=>{a.value=!0}))}}),d=e.computed(()=>{let b=[];return o.errorMessage&&b.push(o.errorMessage),k(o.modelValue)?(o.minValue!==void 0&&o.modelValue!==void 0&&o.modelValue<o.minValue&&b.push(`Model value must be higher than ${o.minValue}`),o.maxValue!==void 0&&o.modelValue!==void 0&&o.modelValue>o.maxValue&&b.push(`Model value must be less than ${o.maxValue}`)):b.push("Model value is not a number."),b=[...b],b.join(" ")}),p=e.computed(()=>!!(o.maxValue&&o.modelValue!==void 0&&(o.modelValue||0)+o.step>o.maxValue)),m=e.computed(()=>!!(o.minValue&&o.modelValue!==void 0&&(o.modelValue||0)-o.step<o.minValue));function k(b){return b!==void 0?(b=b==null?void 0:b.toString(),!isNaN(+b)&&!isNaN(parseFloat(b))):!1}function y(){if(!p.value){let b=0;o.modelValue===void 0?b=o.minValue?o.minValue:0:b=+(o.modelValue||0)+o.step,c.value=b.toString()}}function g(){if(!m.value){let b=0;o.modelValue===void 0?b=0:b=+(o.modelValue||0)-o.step,c.value=o.minValue?Math.max(o.minValue,b).toString():b.toString()}}function V(b){["ArrowDown","ArrowUp"].includes(b.code)&&b.preventDefault(),b.code==="ArrowUp"?y():b.code==="ArrowDown"&&g()}const E=b=>{b.detail>1&&b.preventDefault()};return(b,F)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:r,class:e.normalizeClass([{error:!!d.value.trim(),disabled:b.disabled},"mi-number-field d-flex-column"]),onMousedown:E,onKeydown:F[1]||(F[1]=C=>V(C))},[e.createElementVNode("div",Sa,[e.createVNode(_e,{class:"mi-number-field__contour"}),F[6]||(F[6]=e.createTextVNode()),e.createElementVNode("div",Da,[b.label?(e.openBlock(),e.createElementBlock("label",Fa,[e.createTextVNode(e.toDisplayString(b.label)+" ",1),e.unref(l).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(b.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),F[2]||(F[2]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:i,"onUpdate:modelValue":F[0]||(F[0]=C=>c.value=C),disabled:b.disabled,placeholder:b.placeholder,class:"text-s flex-grow"},null,8,Ma),[[e.vModelText,c.value]])]),F[7]||(F[7]=e.createTextVNode()),e.createElementVNode("div",Aa,[e.createElementVNode("div",{class:e.normalizeClass([{disabled:p.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:y},F[3]||(F[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),F[5]||(F[5]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass([{disabled:m.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:g},F[4]||(F[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),F[8]||(F[8]=e.createTextVNode()),d.value.trim()?(e.openBlock(),e.createElementBlock("div",za,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)],34))}}),Oa={class:"pl-chip__text"},Jt=e.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(n){const t=e.ref(),o=e.ref(!1);return e.onMounted(()=>{var s;t.value&&(o.value=((s=t.value)==null?void 0:s.clientWidth)>=256)}),(s,r)=>(e.openBlock(),e.createBlock(e.unref(X),{position:"top",class:"pl-chip-tooltip",delay:500},e.createSlots({default:e.withCtx(()=>[r[4]||(r[4]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"chip",ref:t,class:e.normalizeClass(["pl-chip",{small:s.small}])},[e.createElementVNode("div",Oa,[e.renderSlot(s.$slots,"default")]),r[3]||(r[3]=e.createTextVNode()),s.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:r[0]||(r[0]=e.withKeys(l=>s.$emit("close"),["enter"])),onClick:r[1]||(r[1]=e.withModifiers(l=>s.$emit("close"),["stop"]))},r[2]||(r[2]=[e.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):e.createCommentVNode("",!0)],2)]),_:2},[o.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),key:"0"}:void 0]),1024))}}),Ra={class:"pl-dropdown-multi__envelope"},Ia=["tabindex"],La={class:"pl-dropdown-multi__container"},ja={class:"pl-dropdown-multi__field"},va=["disabled","placeholder"],Ha={class:"pl-dropdown-multi__append"},Za={key:0},Ua={key:0,class:"required-icon"},Wa={class:"pl-dropdown-multi__open-chips-container"},qa={key:0,class:"nothing-found"},Ka={key:0,class:"pl-dropdown-multi__error"},Ya={key:1,class:"pl-dropdown-multi__helper"},Ga={name:"PlDropdownMulti"},Uo=e.defineComponent({...Ga,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=x=>o("update:modelValue",x),r=e.useSlots(),l=n,i=e.ref(),a=e.ref(),c=e.useTemplateRef("overlay"),d=e.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),p=e.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),m=e.computed(()=>d.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),k=e.computed(()=>ke(l.options??[]).filter(x=>qt(p.value,x.value))),y=e.computed(()=>{const x=e.unref(p),D=ke(l.options??[]);return(d.search?D.filter(B=>{const A=d.search.toLowerCase();return B.label.toLowerCase().includes(A)?!0:typeof B.value=="string"?B.value.toLowerCase().includes(A):B.value===d.search}):[...D]).map(B=>({...B,selected:qt(x,B.value)}))}),g=e.computed(()=>l.options===void 0),V=e.computed(()=>g.value?!0:l.disabled),E=e.computed(()=>V.value?void 0:"0"),b=()=>{d.activeOption=Ke(y.value.findIndex(x=>oe(x.value,l.modelValue)),x=>x<0?0:x)},F=x=>{var B;const D=e.unref(p);s(qt(D,x)?D.filter(A=>!oe(A,x)):[...D,x]),d.search="",(B=i==null?void 0:i.value)==null||B.focus()},C=x=>s(e.unref(p).filter(D=>!oe(D,x))),z=()=>{var x;return(x=a.value)==null?void 0:x.focus()},u=()=>d.open=!d.open,f=x=>{var B,A,$,h;const D=x.relatedTarget;console.log(">>>> overlay.value?.$el",(B=c.value)==null?void 0:B.$el),!((A=i.value)!=null&&A.contains(D))&&!((h=($=c.value)==null?void 0:$.listRef)!=null&&h.contains(D))&&(d.search="",d.open=!1)},T=x=>{var _;const{open:D,activeOption:B}=d;if(!D){x.code==="Enter"&&(d.open=!0);return}x.code==="Escape"&&(d.open=!1,(_=i.value)==null||_.focus());const A=e.unref(y),{length:$}=A;if(!$)return;["ArrowDown","ArrowUp","Enter"].includes(x.code)&&x.preventDefault(),x.code==="Enter"&&F(A[B].value);const h=x.code==="ArrowDown"?1:x.code==="ArrowUp"?-1:0;d.activeOption=Math.abs(B+h+$)%$,requestAnimationFrame(()=>{var S;return(S=c.value)==null?void 0:S.scrollIntoActive()})};return ue(i),e.watch(()=>l.modelValue,()=>b(),{immediate:!0}),e.watchPostEffect(()=>{var x;d.search,d.open&&((x=c.value)==null||x.scrollIntoActive())}),(x,D)=>(e.openBlock(),e.createElementBlock("div",Ra,[e.createElementVNode("div",{ref_key:"rootRef",ref:i,tabindex:E.value,class:e.normalizeClass(["pl-dropdown-multi",{open:d.open,error:x.error,disabled:V.value}]),onKeydown:T,onFocusout:f},[e.createElementVNode("div",La,[e.createElementVNode("div",ja,[e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:a,"onUpdate:modelValue":D[0]||(D[0]=B=>d.search=B),type:"text",tabindex:"-1",disabled:V.value,placeholder:m.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:D[1]||(D[1]=B=>d.open=!0)},null,40,va),[[e.vModelText,d.search]]),D[3]||(D[3]=e.createTextVNode()),d.open?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"chips-container",onClick:z},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(B,A)=>(e.openBlock(),e.createBlock(e.unref(Jt),{key:A,closeable:"",small:"",onClick:D[2]||(D[2]=e.withModifiers($=>d.open=!0,["stop"])),onClose:$=>C(B.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label||B.value),1)]),_:2},1032,["onClose"]))),128))])),D[4]||(D[4]=e.createTextVNode()),g.value?(e.openBlock(),e.createBlock(e.unref(te),{key:1,name:"loading"})):e.createCommentVNode("",!0),D[5]||(D[5]=e.createTextVNode()),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,class:"arrow",onClick:e.withModifiers(u,["stop"])})),D[6]||(D[6]=e.createTextVNode()),e.createElementVNode("div",Ha,[e.renderSlot(x.$slots,"append")])]),D[11]||(D[11]=e.createTextVNode()),x.label?(e.openBlock(),e.createElementBlock("label",Za,[x.required?(e.openBlock(),e.createElementBlock("i",Ua)):e.createCommentVNode("",!0),D[7]||(D[7]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(x.label),1),D[8]||(D[8]=e.createTextVNode()),e.unref(r).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(x.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),D[12]||(D[12]=e.createTextVNode()),d.open?(e.openBlock(),e.createBlock(Gt,{key:1,ref_key:"overlay",ref:c,root:i.value,class:"pl-dropdown-multi__options",gap:5,tabindex:"-1",onFocusout:f},{default:e.withCtx(()=>[e.createElementVNode("div",Wa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(B,A)=>(e.openBlock(),e.createBlock(e.unref(Jt),{key:A,closeable:"",small:"",onClose:$=>C(B.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label||B.value),1)]),_:2},1032,["onClose"]))),128))]),D[9]||(D[9]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(B,A)=>(e.openBlock(),e.createBlock(Ae,{key:A,option:B,"text-item":"text","is-selected":B.selected,"is-hovered":d.activeOption==A,size:"medium","use-checkbox":"",onClick:e.withModifiers($=>F(B.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),D[10]||(D[10]=e.createTextVNode()),y.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qa,"Nothing found"))]),_:1},8,["root"])):e.createCommentVNode("",!0),D[13]||(D[13]=e.createTextVNode()),e.createVNode(_e,{class:"pl-dropdown-multi__contour"})])],42,Ia),D[14]||(D[14]=e.createTextVNode()),x.error?(e.openBlock(),e.createElementBlock("div",Ka,e.toDisplayString(x.error),1)):x.helper?(e.openBlock(),e.createElementBlock("div",Ya,e.toDisplayString(x.helper),1)):e.createCommentVNode("",!0)]))}}),Xa=e.defineComponent({__name:"PlDropdownMultiRef",props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n){const t=n,o=e.computed(()=>{var s;return(s=t.options)==null?void 0:s.map(r=>({label:r.label,value:r.ref}))});return(s,r)=>(e.openBlock(),e.createBlock(Uo,e.mergeProps(t,{options:o.value,"onUpdate:modelValue":r[0]||(r[0]=l=>s.$emit("update:modelValue",l))}),null,16,["options"]))}}),Qt=e.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n){const t=n,o=e.computed(()=>t.modelValue);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{tabindex:"0",class:e.normalizeClass(["pl-checkbox-base",{checked:o.value,disabled:s.disabled}]),onClick:r[0]||(r[0]=l=>s.$emit("update:modelValue",!s.modelValue)),onKeydown:r[1]||(r[1]=e.withKeys(l=>s.$emit("update:modelValue",!s.modelValue),["enter"]))},null,34))}}),Ja={name:"PlCheckbox"},Qa=e.defineComponent({...Ja,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n){const t=n,o=e.useSlots();return(s,r)=>e.unref(o).default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pl-checkbox",{disabled:s.disabled}])},[e.createVNode(Qt,e.mergeProps(t,{"onUpdate:modelValue":r[0]||(r[0]=l=>s.$emit("update:modelValue",l))}),null,16),r[3]||(r[3]=e.createTextVNode()),e.createElementVNode("label",{onClick:r[1]||(r[1]=l=>s.$emit("update:modelValue",!s.$props.modelValue))},[e.renderSlot(s.$slots,"default")])],2)):(e.openBlock(),e.createBlock(Qt,e.mergeProps({key:1},t,{"onUpdate:modelValue":r[2]||(r[2]=l=>s.$emit("update:modelValue",l))}),null,16))}}),ei={key:0},ti=["onClick"],oi={name:"PlCheckboxGroup"},ni=e.defineComponent({...oi,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=i=>s.modelValue.includes(i),l=i=>{const a=s.modelValue??[];o("update:modelValue",r(i)?a.filter(c=>c!==i):[...a,i])};return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-checkbox-group",{disabled:i.disabled}])},[i.label?(e.openBlock(),e.createElementBlock("label",ei,e.toDisplayString(i.label),1)):e.createCommentVNode("",!0),a[1]||(a[1]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options.map(c=>({label:"label"in c?c.label:c.text,value:c.value})),(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d},[e.createVNode(Qt,{disabled:i.disabled,label:c.label,"model-value":r(c.value),"onUpdate:modelValue":()=>l(c.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),a[0]||(a[0]=e.createTextVNode()),e.createElementVNode("label",{onClick:e.withModifiers(()=>l(c.value),["stop"])},e.toDisplayString(c.label),9,ti)]))),128))],2))}}),ri={component:"_component_tupwt_1"},si={};function li(n,t){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.$style.component)},t[0]||(t[0]=[e.createElementVNode("div",null,null,-1)]),2)}const Wo=Y(si,[["render",li],["__cssModules",{$style:ri}]]),ai={key:1,class:"pl-dialog-modal__title"},ii={inheritAttrs:!1},qo=e.defineComponent({...ii,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.ref(),i=e.useAttrs();function a(c){l.value&&r.closeOnOutsideClick&&document.contains(c.target)&&!l.value.contains(c.target)&&s("update:modelValue",!1)}return W(document.body,"keyup",c=>{r.modelValue&&c.code==="Escape"&&s("update:modelValue",!1)}),(c,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog"},{default:e.withCtx(()=>[c.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:a},[e.createElementVNode("div",e.mergeProps(e.unref(i),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":e.unref(o).title,"has-content":e.unref(o).default}],style:{width:c.width,height:c.height,minHeight:c.minHeight,maxHeight:c.maxHeight}}),[c.closable?(e.openBlock(),e.createBlock(Wo,{key:0,class:"close-modal-btn",onClick:d[0]||(d[0]=e.withModifiers(p=>s("update:modelValue",!1),["stop"]))})):e.createCommentVNode("",!0),d[1]||(d[1]=e.createTextVNode()),e.unref(o).title?(e.openBlock(),e.createElementBlock("div",ai,[e.renderSlot(c.$slots,"title")])):e.createCommentVNode("",!0),d[2]||(d[2]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":c.noContentGutters,"no-top-content-gutter":c.noTopContentGutter}])},[e.renderSlot(c.$slots,"default")],2),d[3]||(d[3]=e.createTextVNode()),e.unref(o).actions?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":c.actionsHasTopBorder}])},[e.renderSlot(c.$slots,"actions")],2)):e.createCommentVNode("",!0)],16)])):e.createCommentVNode("",!0)]),_:3})]))}}),ci=e.defineComponent({__name:"TransitionSlidePanel",setup(n){function t(){window.dispatchEvent(new CustomEvent("adjust"))}function o(){window.dispatchEvent(new CustomEvent("adjust"))}return(s,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-panel",onAfterEnter:t,onAfterLeave:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}))}}),di={key:0,class:"pl-slide-modal__title"},pi={class:"pl-slide-modal__content"},mi={key:1,class:"pl-slide-modal__actions"},ui={name:"PlSlideModal",inheritAttrs:!1},fi=e.defineComponent({...ui,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.ref(),i=e.useAttrs();return wt(l,()=>{r.modelValue&&r.closeOnOutsideClick&&s("update:modelValue",!1)}),W(document,"keydown",a=>{a.key==="Escape"&&s("update:modelValue",!1)}),(a,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(ci,null,{default:e.withCtx(()=>[a.modelValue?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:a.width}},e.unref(i),{class:["pl-slide-modal",{"has-title":e.unref(o).title,"has-actions":e.unref(o).actions}],onKeyup:c[1]||(c[1]=e.withKeys(d=>s("update:modelValue",!1),["esc"]))}),[e.createElementVNode("div",{class:"close-dialog-btn",onClick:c[0]||(c[0]=d=>s("update:modelValue",!1))}),c[3]||(c[3]=e.createTextVNode()),e.unref(o).title?(e.openBlock(),e.createElementBlock("div",di,[e.renderSlot(a.$slots,"title")])):e.createCommentVNode("",!0),c[4]||(c[4]=e.createTextVNode()),e.createElementVNode("div",pi,[e.renderSlot(a.$slots,"default")]),c[5]||(c[5]=e.createTextVNode()),e.unref(o).actions?(e.openBlock(),e.createElementBlock("div",mi,[e.renderSlot(a.$slots,"actions")])):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)]),_:3}),c[6]||(c[6]=e.createTextVNode()),a.modelValue&&a.shadow?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:c[2]||(c[2]=e.withKeys(d=>s("update:modelValue",!1),["esc"]))},null,32)):e.createCommentVNode("",!0)]))}}),hi={key:0,class:"label"},gi={name:"PlToggleSwitch"},yi=e.defineComponent({...gi,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{tabindex:"0",class:e.normalizeClass(["ui-toggle-switch",{active:t.modelValue}]),onClick:o[0]||(o[0]=s=>t.$emit("update:modelValue",!t.modelValue)),onKeydown:o[1]||(o[1]=e.withKeys(s=>t.$emit("update:modelValue",!t.modelValue),["enter"]))},[o[2]||(o[2]=e.createElementVNode("div",{class:"ui-toggle-switch__body"},[e.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),o[3]||(o[3]=e.createTextVNode()),t.label?(e.openBlock(),e.createElementBlock("span",hi,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0)],34))}});function Ko(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function ki(n){return typeof n=="function"?n():e.unref(n)}const _i=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function bi(n,t,o={}){const{immediate:s=!0}=o,r=e.ref(!1);let l=null;function i(){l&&(clearTimeout(l),l=null)}function a(){r.value=!1,i()}function c(...d){i(),r.value=!0,l=setTimeout(()=>{r.value=!1,l=null,n(...d)},ki(t))}return s&&(r.value=!0,_i&&c()),Ko(a),{isPending:e.readonly(r),start:c,stop:a}}function wi(n,t,o){return e.watch(n,(r,l,i)=>{r&&t(r,l,i)},{...o,once:!1})}function Vi(n,t,o){const{start:s}=bi(l,t,{immediate:!1}),r=e.ref(!1);async function l(){r.value&&(await n(),s())}function i(){r.value||(r.value=!0,l())}function a(){r.value=!1}return o!=null&&o.immediate&&i(),Ko(a),{isActive:r,pause:a,resume:i}}const Bi="[==PROGRESS==]";function Ci(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ei(n){const t=e.ref(),o=e.reactive({errorCount:0});async function s(){var c;let i=t.value;if(i===void 0)return;const a=n.mockPlatforma??window.platforma;if(!a){console.warn("Platforma API is not available");return}for(;;){const d=await a.logDriver.readText(i.logHandle,100,i.lastOffset);if(i.error=void 0,o.errorCount=0,d.shouldUpdateHandle||i.logHandle!==((c=t.value)==null?void 0:c.logHandle))return;const p=n.progressPrefix??Bi,m=new TextDecoder().decode(d.data).replace(new RegExp(`${Ci(p)}`,"g"),"");if(i=Object.assign(i,{lines:i.lines+m,lastOffset:d.newOffset,finished:!d.live}),d.newOffset>=d.size)break}}const l=Vi(()=>s().catch(i=>{t.value&&(o.errorCount++,o.errorCount>(n.maxRetries??3)?t.value.error=i:console.warn("skip error:",i,"retry..."))}),1500,{immediate:!1});return wi(()=>{var i;return(i=t==null?void 0:t.value)==null?void 0:i.finished},()=>l.pause()),e.watch(()=>n.logHandle,i=>{var a;i===void 0?(t.value=void 0,l.pause()):i!==((a=t.value)==null?void 0:a.logHandle)&&(t.value={logHandle:i,lastOffset:0,lines:"",finished:!1,error:void 0},o.errorCount=0,l.resume())},{immediate:!0}),t}const xi={key:0},$i={class:"pl-log-view__copy"},Ni={key:1,class:"pl-log-view__error"},Ti={name:"PlLogView"},Si=e.defineComponent({...Ti,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(n){const t=g=>{if(g&&g.ok===!1)return g.errors.join(`
|
|
9
|
-
`)},o=n,s=Ei(o),r=e.ref(!0),l=e.ref(),i=e.ref(),a=e.computed(()=>{var g;return((g=s.value)==null?void 0:g.error)??o.error??t(o.output)}),c=e.computed(()=>{var g;return((g=s.value)==null?void 0:g.lines)??o.value??Tn(o.output)}),d=e.ref(!1);ue(i);const p=e.computed(()=>d.value?"clipboard-copied":"clipboard"),m=()=>{d.value=!0,setTimeout(()=>{d.value=!1},1200),c.value&&typeof c.value=="string"&&navigator.clipboard.writeText(c.value)},k=()=>{ge(l.value,g=>{r.value&&g.scrollTo(g.scrollLeft,g.scrollHeight)})};e.watch(c,()=>{requestAnimationFrame(()=>{k()})},{immediate:!0});const y=g=>{const V=g.target;r.value=V.scrollTop+20>=V.scrollHeight-V.offsetHeight};return(g,V)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:i,class:e.normalizeClass(["pl-log-view",{"has-error":a.value}])},[g.label?(e.openBlock(),e.createElementBlock("label",xi,e.toDisplayString(g.label),1)):e.createCommentVNode("",!0),V[1]||(V[1]=e.createTextVNode()),e.createVNode(_e,{class:"pl-log-view__contour"}),V[2]||(V[2]=e.createTextVNode()),e.createElementVNode("div",$i,[e.createVNode(e.unref(X),{"close-delay":800,position:"top"},{tooltip:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value?"copied":"copy"),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(te),{title:"Copy content",name:p.value,onClick:m},null,8,["name"]),V[0]||(V[0]=e.createTextVNode())]),_:1})]),V[3]||(V[3]=e.createTextVNode()),a.value?(e.openBlock(),e.createElementBlock("div",Ni,e.toDisplayString(a.value),1)):(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:y},e.toDisplayString(c.value),545))],2))}}),Pe={component:"_component_1ukal_1",tab:"_tab_1ukal_14",disabled:"_disabled_1ukal_27",active:"_active_1ukal_56",topLine:"_topLine_1ukal_69"},Di=e.defineComponent({__name:"Tab",props:{option:{}},setup(n){const t=e.ref(),o=e.reactive({isOverflown:!1});return e.onMounted(()=>{const s=e.unref(t);if(!s)return;const r=s.$el.querySelector("span");r&&requestAnimationFrame(()=>{r.offsetWidth<r.scrollWidth&&(o.isOverflown=!0)})}),(s,r)=>(e.openBlock(),e.createBlock(e.unref(X),{ref_key:"rootRef",ref:t,element:"div",position:"top",hide:!o.isOverflown,"close-delay":300,"data-is-overflown":o.isOverflown?"true":"false"},{tooltip:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.option.label),1)]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default"),r[0]||(r[0]=e.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),Fi={name:"PlTabs"},Mi=e.defineComponent({...Fi,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=r=>o("update:modelValue",r);return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(Pe).component,{[e.unref(Pe).disabled]:r.disabled,[e.unref(Pe).topLine]:r.topLine}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(i,a)=>(e.openBlock(),e.createBlock(Di,{key:a,tabindex:r.modelValue===i.value||r.disabled||i.disabled?void 0:0,option:i,class:e.normalizeClass([{[e.unref(Pe).active]:r.modelValue===i.value,[e.unref(Pe).disabled]:i.disabled},e.unref(Pe).tab]),style:e.normalizeStyle({"--pl-tabs-item-max-width":i.maxWidth??r.maxTabWidth}),onKeydown:e.withKeys(c=>s(i.value),["enter"]),onClick:c=>s(i.value)},{default:e.withCtx(()=>[e.renderSlot(r.$slots,i.value,{option:i},()=>[e.createElementVNode("span",null,e.toDisplayString(i.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),Yo=Y(e.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-section-separator",{[t.$style.compact]:t.compact}])},[e.createElementVNode("div",{class:e.normalizeClass(t.$style.content)},[e.renderSlot(t.$slots,"default")],2)],2))}}),[["__cssModules",{$style:{compact:"_compact_rhd5u_16",content:"_content_rhd5u_20"}}]]),Ai=e.defineComponent({__name:"PlAccordion",props:e.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=n;return e.provide("pl-accordion-model",t),e.provide("pl-accordion-props",e.toRef(o)),(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(s.$slots,"header"),r[0]||(r[0]=e.createTextVNode()),e.renderSlot(s.$slots,"default")],64))}}),zi=e.defineComponent({__name:"ExpandTransition",setup(n){const t=s=>{s.style.setProperty("--component-height",s.scrollHeight+"px"),s.classList.add("expand-collapse-fix")},o=s=>{s.style.removeProperty("--component-height"),s.classList.remove("expand-collapse-fix")};return(s,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"expand-collapse",onEnter:t,onLeave:t,onAfterEnter:o,onAfterLeave:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}))}}),Pi=Y(e.defineComponent({__name:"PlAccordionSection",props:e.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.inject("pl-accordion-model"),o=e.inject("pl-accordion-props"),s=e.useModel(n,"modelValue"),r=mo(),l=e.computed(()=>!o||o.value.multiple),i=e.computed({get(){return l.value?s.value:t?t.value===r:s.value},set(a){l.value?s.value=a:t&&(t.value=t.value===r?"":r)}});return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Yo),{class:e.normalizeClass(a.$style.separator),compact:a.compact,onClick:c[0]||(c[0]=d=>i.value=!i.value)},{default:e.withCtx(()=>[e.createVNode(e.unref(ze),{name:"chevron-right",class:e.normalizeClass([{[a.$style.down]:i.value},a.$style.chevron])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(a.label),1)]),_:1},8,["class","compact"]),c[1]||(c[1]=e.createTextVNode()),e.createVNode(zi,null,{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.$style.content)},[e.renderSlot(a.$slots,"default")],2)):e.createCommentVNode("",!0)]),_:3})],64))}}),[["__cssModules",{$style:{content:"_content_jmjfk_2",separator:"_separator_jmjfk_14",chevron:"_chevron_jmjfk_19",down:"_down_jmjfk_23"}}]]),Oi=e.defineComponent({__name:"PlStatusTag",props:{type:{}},setup(n){const t=e.reactive({typeToText:{OK:"OK",WARN:"WARN",ALERT:"ALERT",HOLD:"HOLD"}});return(o,s)=>o.type?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},o.$attrs,{class:[{[o.type.toLocaleLowerCase()]:!0},"pl-status-tag text-caps11 d-flex align-center"]}),[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.typeToText[o.type]),1)])],16)):e.createCommentVNode("",!0)}}),Ri={class:"pl-loader-circular"},Ii={class:"pl-loader-circular__svg",viewBox:"25 25 50 50"},Li=["stroke"],ji=e.defineComponent({__name:"PlLoaderCircular",props:{size:{default:"16"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",Ri,[e.createElementVNode("div",{style:e.normalizeStyle({height:`${t.size}px`,width:`${t.size}px`,"--main-color":`${+t.size<48?"var(--ic-01)":"var(--ic-02)"}`}),class:"pl-circle-loader__wrapper"},[(e.openBlock(),e.createElementBlock("svg",Ii,[e.createElementVNode("circle",{class:"pl-loader-circular__svg-circle",cx:"50",cy:"50",r:"20",fill:"none",stroke:`${+t.size<48?"var(--ic-01)":"var(--ic-02)"}`,"stroke-width":"2"},null,8,Li)]))],4)]))}}),vi={key:0,class:"progress-cell__infinity-loader"},Hi={class:"progress-cell__body"},Zi={class:"progress-cell__stage text-s"},Ui={class:"progress-cell__percentage text-s d-flex align-center justify-end"},Wi=e.defineComponent({__name:"PlProgressCell",props:{stage:{default:"not_started"},step:{default:""},progressString:{default:""},progress:{default:void 0},error:{default:""}},setup(n){const t=n,o=e.computed(()=>t.stage!=="not_started"),s=e.computed(()=>t.stage==="done"?100:Math.min(100,t.progress||0)),r=e.computed(()=>t.progress===void 0&&t.stage!=="done"&&t.stage!=="not_started"&&!t.error);return console.log(t),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"progress-cell":!0,"progress-cell__white-bg":o.value,error:l.error,"not-started":t.stage==="not_started"})},[r.value?(e.openBlock(),e.createElementBlock("div",vi,i[0]||(i[0]=[e.createElementVNode("div",{class:"progress-cell__infinity-gradient"},null,-1)]))):e.createCommentVNode("",!0),i[3]||(i[3]=e.createTextVNode()),!r.value&&!l.error?(e.openBlock(),e.createElementBlock("div",{key:1,class:"progress-cell__indicator",style:e.normalizeStyle({width:s.value+"%"})},null,4)):e.createCommentVNode("",!0),i[4]||(i[4]=e.createTextVNode()),e.createElementVNode("div",Hi,[e.createElementVNode("div",Zi,e.toDisplayString(l.error?l.error:l.step),1),i[2]||(i[2]=e.createTextVNode()),e.createElementVNode("div",Ui,[l.error?(e.openBlock(),e.createBlock(te,{key:0,name:"error"})):e.createCommentVNode("",!0),i[1]||(i[1]=e.createTextVNode()),l.error?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.progressString),1)],64))])])],2))}}),K={component:"_component_1ietr_1",local:"_local_1ietr_1",supported:"_supported_1ietr_26",remote:"_remote_1ietr_32",search:"_search_1ietr_40","ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:"_selected_1ietr_72",breadcrumbs:"_breadcrumbs_1ietr_86","ls-error":"_ls-error_1ietr_108",cat:"_cat_1ietr_116",message:"_message_1ietr_122","ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:"_isFile_1ietr_197",isDir:"_isDir_1ietr_201",canBeSelected:"_canBeSelected_1ietr_207","ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:"_spin_1ietr_1"},qi=Y(e.defineComponent({__name:"Shortcuts",setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(X),{class:"info",position:"southwest","max-width":"420px"},{tooltip:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.$style.title)},"Shortcuts",2),o[2]||(o[2]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass([t.$style.row,t.$style.head])},o[0]||(o[0]=[e.createElementVNode("div",null,null,-1),e.createTextVNode(),e.createElementVNode("div",null,"MacOS",-1),e.createTextVNode(),e.createElementVNode("div",null,"Windows/Linux",-1)]),2),o[3]||(o[3]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass([t.$style.row,t.$style.body])},o[1]||(o[1]=[e.createElementVNode("div",null,"Single File",-1),e.createTextVNode(),e.createElementVNode("div",null,"Click the file",-1),e.createTextVNode(),e.createElementVNode("div",null,"Click the file",-1),e.createTextVNode(),e.createElementVNode("div",null,"Adjacent multiple files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Shift, click first and last files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Shift, click first and last files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Non-adjacent multiple files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Command (⌘), click each file",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Ctrl, click each file",-1),e.createTextVNode(),e.createElementVNode("div",null,"All files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Press Command (⌘) + A",-1),e.createTextVNode(),e.createElementVNode("div",null,"Press Ctrl + A",-1)]),2)]),_:1}))}}),[["__cssModules",{$style:{title:"_title_14dct_2",row:"_row_14dct_10",head:"_head_14dct_30",body:"_body_14dct_58"}}]]),Go=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function Ki(n){return e.computed(()=>{let t=n.items;if(n.showHiddenItems||(t=t.filter(o=>!o.name.startsWith("."))),n.search){const o=n.search.toLocaleLowerCase();t=t.filter(s=>s.name.toLocaleLowerCase().includes(o))}return t})}const Xo={mounted:n=>{if(n.clientWidth<n.scrollWidth){const t=n.innerText;n.innerText=t.substring(0,57)+"..."+t.substring(t.length-10)}}};function Jo(n){return n?n.map(t=>"."+Fn(t,["."])):void 0}function Yi(n){const t=n.split("/");t[0]!==""&&t.unshift("");const o=[];for(let s=0;s<t.length;s++)o.push({index:s,name:s===0?"Root":t[s],path:t.slice(0,s+1).filter(r=>r!=="").join("/")});return o}const Gi=["title","onClick"],Xi={key:0,class:"ls-loader"},Ji=["onClick"],Qi=["title"],ec=["onClick"],tc=["title"],oc=e.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(n,{expose:t}){const o=u=>u.ctrlKey||u.metaKey,s=n,r=e.reactive(Go()),l=()=>{r.search="",r.error="",r.lastSelected=void 0},i=e.computed(()=>Jo(s.extensions)),a=Ki(r),c=e.computed(()=>{var u;return{modelValue:s.modelValue,dirPath:r.dirPath,storageHandle:(u=r.storageEntry)==null?void 0:u.handle}}),d=(u,f)=>{window.platforma&&r.currentLoadingPath!==f&&(r.currentLoadingPath=f,window.platforma.lsDriver.listFiles(u,f).then(T=>{f===r.dirPath&&(r.items=me(T).entries.map(x=>({path:x.fullPath,name:x.name,isDir:x.type==="dir",canBeSelected:x.type==="file"&&(!i.value||i.value.some(D=>x.fullPath.endsWith(D))),handle:x.type==="file"?x.handle:void 0,selected:!1})).sort((x,D)=>x.isDir&&!D.isDir?-1:!x.isDir&&D.isDir?1:x.name.localeCompare(D.name)).map((x,D)=>({id:D,...x})),r.lastSelected=void 0)}).catch(T=>r.error=String(T)).finally(()=>{r.currentLoadingPath=void 0}))},p=()=>{l();const{storageHandle:u,dirPath:f,modelValue:T}=c.value;u&&T&&d(u,f)},m=e.computed(()=>Yi(r.dirPath)),k=e.computed(()=>r.items.filter(u=>u.canBeSelected&&u.selected&&!u.isDir)),y=e.computed(()=>{var u;return k.value.length>0&&((u=r.storageEntry)==null?void 0:u.handle)}),g=()=>{var u;return{storageHandle:me((u=r.storageEntry)==null?void 0:u.handle),files:k.value.map(f=>f.handle)}},V=u=>{r.dirPath=u},E=(u,f)=>{const{shiftKey:T}=u,x=o(u),{lastSelected:D}=r;if(u.preventDefault(),f.canBeSelected){if(s.multi||r.items.forEach(B=>B.selected=!1),f.selected=!f.selected,!s.multi)return;!x&&!T&&r.items.forEach(B=>{B.id!==f.id&&(B.selected=!1)}),T&&D!==void 0&&r.items.forEach(B=>{xn(B.id,D,f.id)&&(B.selected=!0)}),f.selected&&(r.lastSelected=f.id)}},b=u=>{u&&!s.multi||r.items.filter(f=>f.canBeSelected).forEach(f=>{f.selected=u})},F=()=>b(!0),C=()=>b(!1),z=()=>{if(l(),C(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(u=>{u=u.filter(f=>f.name!=="local"&&!f.name.startsWith("local_disk_")),r.storageOptions=u.map(f=>({text:f.name,value:f})),s.autoSelectStorage&&ge(u[0],f=>{r.storageEntry=f})}).catch(u=>r.error=String(u))};return e.watch(e.toRef(r,"storageEntry"),u=>{l(),r.dirPath=(u==null?void 0:u.initialFullPath)??""},{immediate:!0}),e.watch([()=>r.dirPath,()=>r.storageEntry],()=>{p()}),e.watch(()=>s.modelValue,u=>{u?z():Object.assign(r,Go())},{immediate:!0}),W(document,"keydown",u=>{if(!s.modelValue||u.target!==document.body)return;const f=o(u);f&&u.code==="KeyA"&&(u.preventDefault(),F()),f&&u.shiftKey&&u.code==="Period"&&(u.preventDefault(),r.showHiddenItems=!r.showHiddenItems),u.code==="Enter"&&s.submit()}),t({isReady:y,getFilesToImport:g}),e.onMounted(z),(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(K).remote),onClick:e.withModifiers(C,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).search)},[e.createElementVNode("div",null,[e.createVNode(e.unref(Xt),{modelValue:r.storageEntry,"onUpdate:modelValue":f[0]||(f[0]=T=>r.storageEntry=T),label:"Select storage",options:r.storageOptions},null,8,["modelValue","options"])]),f[2]||(f[2]=e.createTextVNode()),e.createElementVNode("div",null,[e.createVNode(e.unref(jo),{modelValue:r.search,"onUpdate:modelValue":f[1]||(f[1]=T=>r.search=T),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),f[12]||(f[12]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(K)["ls-container"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(K)["ls-head"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).breadcrumbs)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(T,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:x},[e.createElementVNode("div",{title:T.path,onClick:D=>V(T.path)},e.toDisplayString(T.name),9,Gi),f[3]||(f[3]=e.createTextVNode()),T.index!==m.value.length-1?(e.openBlock(),e.createBlock(e.unref($e),{key:0,name:"chevron-right"})):e.createCommentVNode("",!0)],64))),128))],2),f[5]||(f[5]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).selected)},[e.createElementVNode("span",null,"Selected: "+e.toDisplayString(k.value.length),1),f[4]||(f[4]=e.createTextVNode()),e.createVNode(qi)],2)],2),f[11]||(f[11]=e.createTextVNode()),r.currentLoadingPath!==void 0?(e.openBlock(),e.createElementBlock("div",Xi,f[6]||(f[6]=[e.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):r.storageEntry?r.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(K)["ls-error"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).cat)},null,2),f[8]||(f[8]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).message)},e.toDisplayString(r.error),3)],2)):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(K)["ls-body"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),T=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:T.id},[T.isDir?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(K).isDir),onClick:x=>V(T.path)},[e.createVNode(e.unref($e),{name:"chevron-right"}),f[9]||(f[9]=e.createTextVNode()),e.withDirectives((e.openBlock(),e.createElementBlock("span",{title:T.name},[e.createTextVNode(e.toDisplayString(T.name),1)],8,Qi)),[[e.unref(Xo)]])],10,Ji)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({[e.unref(K).canBeSelected]:T.canBeSelected,[e.unref(K).selected]:T.selected}),onClick:e.withModifiers(x=>E(x,T),["stop"])},[e.createVNode(e.unref(ze),{name:"box",class:e.normalizeClass(e.unref(K).isFile)},null,8,["class"]),f[10]||(f[10]=e.createTextVNode()),e.withDirectives((e.openBlock(),e.createElementBlock("span",{title:T.name},[e.createTextVNode(e.toDisplayString(T.name),1)],8,tc)),[[e.unref(Xo)]])],10,ec))],64))),128))],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(K)["ls-empty"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).cat)},null,2),f[7]||(f[7]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(K).message)},"Select storage to preview",2)],2))],2)],2))}}),nc={key:1,class:"alert-error"},rc=e.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(n){const t=n,o=e.reactive({error:void 0}),s=e.computed(()=>t.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),r=async i=>{var p,m,k;const a=(m=(p=window.platforma)==null?void 0:p.lsDriver)==null?void 0:m.fileToImportHandle;if(!a)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const c=Jo(t.extensions),d=await Promise.all([...((k=i.dataTransfer)==null?void 0:k.files)??[]].filter(y=>!!y).filter(y=>c?c.some(g=>y.name.endsWith(g)):!0).map(y=>a(y)));d.length&&t.importFiles({files:d})},l=async()=>{var a,c;const i=t.extensions?[{name:"All Files",extensions:t.extensions}]:[];t.multi?(a=window.platforma)==null||a.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:i}).then(({files:d})=>{d&&t.importFiles({files:d})}).catch(d=>o.error=d):(c=window.platforma)==null||c.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:i}).then(({file:d})=>{d&&t.importFiles({files:[d]})}).catch(d=>o.error=d)};return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(K).local),onDrop:r,onDragover:a[0]||(a[0]=e.withModifiers(()=>{},["prevent"])),onClick:l},[e.createVNode(e.unref(Wt),{name:"cloud-upload"}),a[1]||(a[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(s.value),1),a[2]||(a[2]=e.createTextVNode()),i.extensions?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(K).supported)},"Supported formats: "+e.toDisplayString(i.extensions.join(", ")),3)):e.createCommentVNode("",!0),a[3]||(a[3]=e.createTextVNode()),o.error?(e.openBlock(),e.createElementBlock("span",nc,e.toDisplayString(o.error),1)):e.createCommentVNode("",!0)],34))}}),sc={style:{margin:"0 24px"}},Qo=e.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(n,{emit:t}){const o=t,s=n,r=e.ref("local"),l=e.computed(()=>s.multi?"Select Files to Import":"Select File to Import"),i=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],a=()=>o("update:modelValue",!1),c=e.useTemplateRef("remote"),d=()=>{var m,k;(m=c.value)!=null&&m.isReady&&(o("import:files",me((k=c.value)==null?void 0:k.getFilesToImport())),a())},p=m=>{o("import:files",m),a()};return(m,k)=>(e.openBlock(),e.createBlock(e.unref(qo),{"no-content-gutters":!0,"close-on-outside-click":m.closeOnOutsideClick,class:e.normalizeClass(["pl-dialog-modal",e.unref(K).component]),"model-value":m.modelValue,width:"688px",height:"720px","onUpdate:modelValue":a},e.createSlots({title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title??l.value),1)]),default:e.withCtx(()=>[k[4]||(k[4]=e.createTextVNode()),e.createElementVNode("div",sc,[e.createVNode(e.unref(zo),{modelValue:r.value,"onUpdate:modelValue":k[0]||(k[0]=y=>r.value=y),options:i},null,8,["modelValue"])]),k[5]||(k[5]=e.createTextVNode()),r.value==="remote"?(e.openBlock(),e.createBlock(oc,e.mergeProps({key:0,ref:"remote"},m.$props,{submit:d}),null,16)):e.createCommentVNode("",!0),k[6]||(k[6]=e.createTextVNode()),r.value==="local"?(e.openBlock(),e.createBlock(rc,e.mergeProps({key:1,"import-files":p},m.$props),null,16)):e.createCommentVNode("",!0),k[7]||(k[7]=e.createTextVNode())]),_:2},[r.value==="remote"?{name:"actions",fn:e.withCtx(()=>{var y;return[e.createVNode(e.unref(Mo),{style:{"min-width":"160px"},disabled:!((y=e.unref(c))!=null&&y.isReady),onClick:e.withModifiers(d,["stop"])},{default:e.withCtx(()=>k[1]||(k[1]=[e.createTextVNode("Import")])),_:1},8,["disabled"]),k[3]||(k[3]=e.createTextVNode()),e.createVNode(e.unref(jt),{"justify-center":!1,onClick:e.withModifiers(a,["stop"])},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var U;(function(n){n.assertEqual=r=>r;function t(r){}n.assertIs=t;function o(r){throw new Error}n.assertNever=o,n.arrayToEnum=r=>{const l={};for(const i of r)l[i]=i;return l},n.getValidEnumValues=r=>{const l=n.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),i={};for(const a of l)i[a]=r[a];return n.objectValues(i)},n.objectValues=r=>n.objectKeys(r).map(function(l){return r[l]}),n.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const l=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&l.push(i);return l},n.find=(r,l)=>{for(const i of r)if(l(i))return i},n.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function s(r,l=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(l)}n.joinValues=s,n.jsonStringifyReplacer=(r,l)=>typeof l=="bigint"?l.toString():l})(U||(U={}));var eo;(function(n){n.mergeShapes=(t,o)=>({...t,...o})})(eo||(eo={}));const O=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),be=n=>{switch(typeof n){case"undefined":return O.undefined;case"string":return O.string;case"number":return isNaN(n)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(n)?O.array:n===null?O.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?O.promise:typeof Map<"u"&&n instanceof Map?O.map:typeof Set<"u"&&n instanceof Set?O.set:typeof Date<"u"&&n instanceof Date?O.date:O.object;default:return O.unknown}},N=U.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),lc=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class re extends Error{constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const o=t||function(l){return l.message},s={_errors:[]},r=l=>{for(const i of l.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(o(i));else{let a=s,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(o(i))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return r(this),s}static assert(t){if(!(t instanceof re))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=o=>o.message){const o={},s=[];for(const r of this.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):s.push(t(r));return{formErrors:s,fieldErrors:o}}get formErrors(){return this.flatten()}}re.create=n=>new re(n);const Oe=(n,t)=>{let o;switch(n.code){case N.invalid_type:n.received===O.undefined?o="Required":o=`Expected ${n.expected}, received ${n.received}`;break;case N.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(n.expected,U.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:o=`Unrecognized key(s) in object: ${U.joinValues(n.keys,", ")}`;break;case N.invalid_union:o="Invalid input";break;case N.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${U.joinValues(n.options)}`;break;case N.invalid_enum_value:o=`Invalid enum value. Expected ${U.joinValues(n.options)}, received '${n.received}'`;break;case N.invalid_arguments:o="Invalid function arguments";break;case N.invalid_return_type:o="Invalid function return type";break;case N.invalid_date:o="Invalid date";break;case N.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(o=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?o=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?o=`Invalid input: must end with "${n.validation.endsWith}"`:U.assertNever(n.validation):n.validation!=="regex"?o=`Invalid ${n.validation}`:o="Invalid";break;case N.too_small:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:o="Invalid input";break;case N.too_big:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?o=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:o="Invalid input";break;case N.custom:o="Invalid input";break;case N.invalid_intersection_types:o="Intersection results could not be merged";break;case N.not_multiple_of:o=`Number must be a multiple of ${n.multipleOf}`;break;case N.not_finite:o="Number must be finite";break;default:o=t.defaultError,U.assertNever(n)}return{message:o}};let en=Oe;function ac(n){en=n}function Bt(){return en}const Ct=n=>{const{data:t,path:o,errorMaps:s,issueData:r}=n,l=[...o,...r.path||[]],i={...r,path:l};if(r.message!==void 0)return{...r,path:l,message:r.message};let a="";const c=s.filter(d=>!!d).slice().reverse();for(const d of c)a=d(i,{data:t,defaultError:a}).message;return{...r,path:l,message:a}},ic=[];function P(n,t){const o=Bt(),s=Ct({issueData:t,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o,o===Oe?void 0:Oe].filter(r=>!!r)});n.common.issues.push(s)}class J{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,o){const s=[];for(const r of o){if(r.status==="aborted")return L;r.status==="dirty"&&t.dirty(),s.push(r.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,o){const s=[];for(const r of o){const l=await r.key,i=await r.value;s.push({key:l,value:i})}return J.mergeObjectSync(t,s)}static mergeObjectSync(t,o){const s={};for(const r of o){const{key:l,value:i}=r;if(l.status==="aborted"||i.status==="aborted")return L;l.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(s[l.value]=i.value)}return{status:t.value,value:s}}}const L=Object.freeze({status:"aborted"}),Re=n=>({status:"dirty",value:n}),ee=n=>({status:"valid",value:n}),to=n=>n.status==="aborted",oo=n=>n.status==="dirty",Ye=n=>n.status==="valid",Ge=n=>typeof Promise<"u"&&n instanceof Promise;function Et(n,t,o,s){if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(n)}function tn(n,t,o,s,r){if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(n,o),o}typeof SuppressedError=="function"&&SuppressedError;var R;(function(n){n.errToObj=t=>typeof t=="string"?{message:t}:t||{},n.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(R||(R={}));var Xe,Je;class ce{constructor(t,o,s,r){this._cachedPath=[],this.parent=t,this.data=o,this._path=s,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const on=(n,t)=>{if(Ye(t))return{success:!0,data:t.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new re(n.common.issues);return this._error=o,this._error}}};function j(n){if(!n)return{};const{errorMap:t,invalid_type_error:o,required_error:s,description:r}=n;if(t&&(o||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(i,a)=>{var c,d;const{message:p}=n;return i.code==="invalid_enum_value"?{message:p??a.defaultError}:typeof a.data>"u"?{message:(c=p??s)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(d=p??o)!==null&&d!==void 0?d:a.defaultError}},description:r}}class v{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return be(t.data)}_getOrReturnCtx(t,o){return o||{common:t.parent.common,data:t.data,parsedType:be(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new J,ctx:{common:t.parent.common,data:t.data,parsedType:be(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const o=this._parse(t);if(Ge(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(t){const o=this._parse(t);return Promise.resolve(o)}parse(t,o){const s=this.safeParse(t,o);if(s.success)return s.data;throw s.error}safeParse(t,o){var s;const r={common:{issues:[],async:(s=o==null?void 0:o.async)!==null&&s!==void 0?s:!1,contextualErrorMap:o==null?void 0:o.errorMap},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:be(t)},l=this._parseSync({data:t,path:r.path,parent:r});return on(r,l)}async parseAsync(t,o){const s=await this.safeParseAsync(t,o);if(s.success)return s.data;throw s.error}async safeParseAsync(t,o){const s={common:{issues:[],contextualErrorMap:o==null?void 0:o.errorMap,async:!0},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:be(t)},r=this._parse({data:t,path:s.path,parent:s}),l=await(Ge(r)?r:Promise.resolve(r));return on(s,l)}refine(t,o){const s=r=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(r):o;return this._refinement((r,l)=>{const i=t(r),a=()=>l.addIssue({code:N.custom,...s(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,o){return this._refinement((s,r)=>t(s)?!0:(r.addIssue(typeof o=="function"?o(s,r):o),!1))}_refinement(t){return new ae({schema:this,typeName:I.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return pe.create(this,this._def)}nullable(){return Ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return le.create(this,this._def)}promise(){return ve.create(this,this._def)}or(t){return ot.create([this,t],this._def)}and(t){return nt.create(this,t,this._def)}transform(t){return new ae({...j(this._def),schema:this,typeName:I.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const o=typeof t=="function"?t:()=>t;return new it({...j(this._def),innerType:this,defaultValue:o,typeName:I.ZodDefault})}brand(){return new so({typeName:I.ZodBranded,type:this,...j(this._def)})}catch(t){const o=typeof t=="function"?t:()=>t;return new ct({...j(this._def),innerType:this,catchValue:o,typeName:I.ZodCatch})}describe(t){const o=this.constructor;return new o({...this._def,description:t})}pipe(t){return dt.create(this,t)}readonly(){return pt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cc=/^c[^\s-]{8,}$/i,dc=/^[0-9a-z]+$/,pc=/^[0-9A-HJKMNP-TV-Z]{26}$/,mc=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uc=/^[a-z0-9_-]{21}$/i,fc=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hc=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gc="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let no;const yc=/^(?:(?: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])$/,kc=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,_c=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nn="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",bc=new RegExp(`^${nn}$`);function rn(n){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?t=`${t}\\.\\d{${n.precision}}`:n.precision==null&&(t=`${t}(\\.\\d+)?`),t}function wc(n){return new RegExp(`^${rn(n)}$`)}function sn(n){let t=`${nn}T${rn(n)}`;const o=[];return o.push(n.local?"Z?":"Z"),n.offset&&o.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${o.join("|")})`,new RegExp(`^${t}$`)}function Vc(n,t){return!!((t==="v4"||!t)&&yc.test(n)||(t==="v6"||!t)&&kc.test(n))}class se extends v{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==O.string){const l=this._getOrReturnCtx(t);return P(l,{code:N.invalid_type,expected:O.string,received:l.parsedType}),L}const s=new J;let r;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(r=this._getOrReturnCtx(t,r),P(r,{code:N.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="max")t.data.length>l.value&&(r=this._getOrReturnCtx(t,r),P(r,{code:N.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="length"){const i=t.data.length>l.value,a=t.data.length<l.value;(i||a)&&(r=this._getOrReturnCtx(t,r),i?P(r,{code:N.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):a&&P(r,{code:N.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),s.dirty())}else if(l.kind==="email")hc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"email",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="emoji")no||(no=new RegExp(gc,"u")),no.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"emoji",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="uuid")mc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"uuid",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="nanoid")uc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"nanoid",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid")cc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"cuid",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid2")dc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"cuid2",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="ulid")pc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"ulid",code:N.invalid_string,message:l.message}),s.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),P(r,{validation:"url",code:N.invalid_string,message:l.message}),s.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"regex",code:N.invalid_string,message:l.message}),s.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(r=this._getOrReturnCtx(t,r),P(r,{code:N.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),s.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(r=this._getOrReturnCtx(t,r),P(r,{code:N.invalid_string,validation:{startsWith:l.value},message:l.message}),s.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(r=this._getOrReturnCtx(t,r),P(r,{code:N.invalid_string,validation:{endsWith:l.value},message:l.message}),s.dirty()):l.kind==="datetime"?sn(l).test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{code:N.invalid_string,validation:"datetime",message:l.message}),s.dirty()):l.kind==="date"?bc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{code:N.invalid_string,validation:"date",message:l.message}),s.dirty()):l.kind==="time"?wc(l).test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{code:N.invalid_string,validation:"time",message:l.message}),s.dirty()):l.kind==="duration"?fc.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"duration",code:N.invalid_string,message:l.message}),s.dirty()):l.kind==="ip"?Vc(t.data,l.version)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"ip",code:N.invalid_string,message:l.message}),s.dirty()):l.kind==="base64"?_c.test(t.data)||(r=this._getOrReturnCtx(t,r),P(r,{validation:"base64",code:N.invalid_string,message:l.message}),s.dirty()):U.assertNever(l);return{status:s.value,value:t.data}}_regex(t,o,s){return this.refinement(r=>t.test(r),{validation:o,code:N.invalid_string,...R.errToObj(s)})}_addCheck(t){return new se({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...R.errToObj(t)})}url(t){return this._addCheck({kind:"url",...R.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...R.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...R.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...R.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...R.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...R.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...R.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...R.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...R.errToObj(t)})}datetime(t){var o,s;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(o=t==null?void 0:t.offset)!==null&&o!==void 0?o:!1,local:(s=t==null?void 0:t.local)!==null&&s!==void 0?s:!1,...R.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...R.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...R.errToObj(t)})}regex(t,o){return this._addCheck({kind:"regex",regex:t,...R.errToObj(o)})}includes(t,o){return this._addCheck({kind:"includes",value:t,position:o==null?void 0:o.position,...R.errToObj(o==null?void 0:o.message)})}startsWith(t,o){return this._addCheck({kind:"startsWith",value:t,...R.errToObj(o)})}endsWith(t,o){return this._addCheck({kind:"endsWith",value:t,...R.errToObj(o)})}min(t,o){return this._addCheck({kind:"min",value:t,...R.errToObj(o)})}max(t,o){return this._addCheck({kind:"max",value:t,...R.errToObj(o)})}length(t,o){return this._addCheck({kind:"length",value:t,...R.errToObj(o)})}nonempty(t){return this.min(1,R.errToObj(t))}trim(){return new se({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new se({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new se({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxLength(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}}se.create=n=>{var t;return new se({checks:[],typeName:I.ZodString,coerce:(t=n==null?void 0:n.coerce)!==null&&t!==void 0?t:!1,...j(n)})};function Bc(n,t){const o=(n.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=o>s?o:s,l=parseInt(n.toFixed(r).replace(".","")),i=parseInt(t.toFixed(r).replace(".",""));return l%i/Math.pow(10,r)}class we extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==O.number){const l=this._getOrReturnCtx(t);return P(l,{code:N.invalid_type,expected:O.number,received:l.parsedType}),L}let s;const r=new J;for(const l of this._def.checks)l.kind==="int"?U.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),P(s,{code:N.invalid_type,expected:"integer",received:"float",message:l.message}),r.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(s=this._getOrReturnCtx(t,s),P(s,{code:N.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),r.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(s=this._getOrReturnCtx(t,s),P(s,{code:N.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),r.dirty()):l.kind==="multipleOf"?Bc(t.data,l.value)!==0&&(s=this._getOrReturnCtx(t,s),P(s,{code:N.not_multiple_of,multipleOf:l.value,message:l.message}),r.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),P(s,{code:N.not_finite,message:l.message}),r.dirty()):U.assertNever(l);return{status:r.value,value:t.data}}gte(t,o){return this.setLimit("min",t,!0,R.toString(o))}gt(t,o){return this.setLimit("min",t,!1,R.toString(o))}lte(t,o){return this.setLimit("max",t,!0,R.toString(o))}lt(t,o){return this.setLimit("max",t,!1,R.toString(o))}setLimit(t,o,s,r){return new we({...this._def,checks:[...this._def.checks,{kind:t,value:o,inclusive:s,message:R.toString(r)}]})}_addCheck(t){return new we({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:R.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(t)})}multipleOf(t,o){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(o)})}finite(t){return this._addCheck({kind:"finite",message:R.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(t)})}get minValue(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxValue(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&U.isInteger(t.value))}get isFinite(){let t=null,o=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(o===null||s.value>o)&&(o=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(o)&&Number.isFinite(t)}}we.create=n=>new we({checks:[],typeName:I.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...j(n)});class Ve extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==O.bigint){const l=this._getOrReturnCtx(t);return P(l,{code:N.invalid_type,expected:O.bigint,received:l.parsedType}),L}let s;const r=new J;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(s=this._getOrReturnCtx(t,s),P(s,{code:N.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),r.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(s=this._getOrReturnCtx(t,s),P(s,{code:N.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),r.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),P(s,{code:N.not_multiple_of,multipleOf:l.value,message:l.message}),r.dirty()):U.assertNever(l);return{status:r.value,value:t.data}}gte(t,o){return this.setLimit("min",t,!0,R.toString(o))}gt(t,o){return this.setLimit("min",t,!1,R.toString(o))}lte(t,o){return this.setLimit("max",t,!0,R.toString(o))}lt(t,o){return this.setLimit("max",t,!1,R.toString(o))}setLimit(t,o,s,r){return new Ve({...this._def,checks:[...this._def.checks,{kind:t,value:o,inclusive:s,message:R.toString(r)}]})}_addCheck(t){return new Ve({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(t)})}multipleOf(t,o){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(o)})}get minValue(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxValue(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}}Ve.create=n=>{var t;return new Ve({checks:[],typeName:I.ZodBigInt,coerce:(t=n==null?void 0:n.coerce)!==null&&t!==void 0?t:!1,...j(n)})};class Qe extends v{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==O.boolean){const s=this._getOrReturnCtx(t);return P(s,{code:N.invalid_type,expected:O.boolean,received:s.parsedType}),L}return ee(t.data)}}Qe.create=n=>new Qe({typeName:I.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...j(n)});class Ne extends v{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==O.date){const l=this._getOrReturnCtx(t);return P(l,{code:N.invalid_type,expected:O.date,received:l.parsedType}),L}if(isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return P(l,{code:N.invalid_date}),L}const s=new J;let r;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(r=this._getOrReturnCtx(t,r),P(r,{code:N.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(r=this._getOrReturnCtx(t,r),P(r,{code:N.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):U.assertNever(l);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ne({...this._def,checks:[...this._def.checks,t]})}min(t,o){return this._addCheck({kind:"min",value:t.getTime(),message:R.toString(o)})}max(t,o){return this._addCheck({kind:"max",value:t.getTime(),message:R.toString(o)})}get minDate(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t!=null?new Date(t):null}}Ne.create=n=>new Ne({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:I.ZodDate,...j(n)});class xt extends v{_parse(t){if(this._getType(t)!==O.symbol){const s=this._getOrReturnCtx(t);return P(s,{code:N.invalid_type,expected:O.symbol,received:s.parsedType}),L}return ee(t.data)}}xt.create=n=>new xt({typeName:I.ZodSymbol,...j(n)});class et extends v{_parse(t){if(this._getType(t)!==O.undefined){const s=this._getOrReturnCtx(t);return P(s,{code:N.invalid_type,expected:O.undefined,received:s.parsedType}),L}return ee(t.data)}}et.create=n=>new et({typeName:I.ZodUndefined,...j(n)});class tt extends v{_parse(t){if(this._getType(t)!==O.null){const s=this._getOrReturnCtx(t);return P(s,{code:N.invalid_type,expected:O.null,received:s.parsedType}),L}return ee(t.data)}}tt.create=n=>new tt({typeName:I.ZodNull,...j(n)});class Ie extends v{constructor(){super(...arguments),this._any=!0}_parse(t){return ee(t.data)}}Ie.create=n=>new Ie({typeName:I.ZodAny,...j(n)});class Te extends v{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ee(t.data)}}Te.create=n=>new Te({typeName:I.ZodUnknown,...j(n)});class fe extends v{_parse(t){const o=this._getOrReturnCtx(t);return P(o,{code:N.invalid_type,expected:O.never,received:o.parsedType}),L}}fe.create=n=>new fe({typeName:I.ZodNever,...j(n)});class $t extends v{_parse(t){if(this._getType(t)!==O.undefined){const s=this._getOrReturnCtx(t);return P(s,{code:N.invalid_type,expected:O.void,received:s.parsedType}),L}return ee(t.data)}}$t.create=n=>new $t({typeName:I.ZodVoid,...j(n)});class le extends v{_parse(t){const{ctx:o,status:s}=this._processInputParams(t),r=this._def;if(o.parsedType!==O.array)return P(o,{code:N.invalid_type,expected:O.array,received:o.parsedType}),L;if(r.exactLength!==null){const i=o.data.length>r.exactLength.value,a=o.data.length<r.exactLength.value;(i||a)&&(P(o,{code:i?N.too_big:N.too_small,minimum:a?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),s.dirty())}if(r.minLength!==null&&o.data.length<r.minLength.value&&(P(o,{code:N.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),s.dirty()),r.maxLength!==null&&o.data.length>r.maxLength.value&&(P(o,{code:N.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),o.common.async)return Promise.all([...o.data].map((i,a)=>r.type._parseAsync(new ce(o,i,o.path,a)))).then(i=>J.mergeArray(s,i));const l=[...o.data].map((i,a)=>r.type._parseSync(new ce(o,i,o.path,a)));return J.mergeArray(s,l)}get element(){return this._def.type}min(t,o){return new le({...this._def,minLength:{value:t,message:R.toString(o)}})}max(t,o){return new le({...this._def,maxLength:{value:t,message:R.toString(o)}})}length(t,o){return new le({...this._def,exactLength:{value:t,message:R.toString(o)}})}nonempty(t){return this.min(1,t)}}le.create=(n,t)=>new le({type:n,minLength:null,maxLength:null,exactLength:null,typeName:I.ZodArray,...j(t)});function Le(n){if(n instanceof q){const t={};for(const o in n.shape){const s=n.shape[o];t[o]=pe.create(Le(s))}return new q({...n._def,shape:()=>t})}else return n instanceof le?new le({...n._def,type:Le(n.element)}):n instanceof pe?pe.create(Le(n.unwrap())):n instanceof Ce?Ce.create(Le(n.unwrap())):n instanceof de?de.create(n.items.map(t=>Le(t))):n}class q extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),o=U.objectKeys(t);return this._cached={shape:t,keys:o}}_parse(t){if(this._getType(t)!==O.object){const d=this._getOrReturnCtx(t);return P(d,{code:N.invalid_type,expected:O.object,received:d.parsedType}),L}const{status:s,ctx:r}=this._processInputParams(t),{shape:l,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof fe&&this._def.unknownKeys==="strip"))for(const d in r.data)i.includes(d)||a.push(d);const c=[];for(const d of i){const p=l[d],m=r.data[d];c.push({key:{status:"valid",value:d},value:p._parse(new ce(r,m,r.path,d)),alwaysSet:d in r.data})}if(this._def.catchall instanceof fe){const d=this._def.unknownKeys;if(d==="passthrough")for(const p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:r.data[p]}});else if(d==="strict")a.length>0&&(P(r,{code:N.unrecognized_keys,keys:a}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const p of a){const m=r.data[p];c.push({key:{status:"valid",value:p},value:d._parse(new ce(r,m,r.path,p)),alwaysSet:p in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const d=[];for(const p of c){const m=await p.key,k=await p.value;d.push({key:m,value:k,alwaysSet:p.alwaysSet})}return d}).then(d=>J.mergeObjectSync(s,d)):J.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(t){return R.errToObj,new q({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(o,s)=>{var r,l,i,a;const c=(i=(l=(r=this._def).errorMap)===null||l===void 0?void 0:l.call(r,o,s).message)!==null&&i!==void 0?i:s.defaultError;return o.code==="unrecognized_keys"?{message:(a=R.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new q({...this._def,unknownKeys:"strip"})}passthrough(){return new q({...this._def,unknownKeys:"passthrough"})}extend(t){return new q({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new q({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:I.ZodObject})}setKey(t,o){return this.augment({[t]:o})}catchall(t){return new q({...this._def,catchall:t})}pick(t){const o={};return U.objectKeys(t).forEach(s=>{t[s]&&this.shape[s]&&(o[s]=this.shape[s])}),new q({...this._def,shape:()=>o})}omit(t){const o={};return U.objectKeys(this.shape).forEach(s=>{t[s]||(o[s]=this.shape[s])}),new q({...this._def,shape:()=>o})}deepPartial(){return Le(this)}partial(t){const o={};return U.objectKeys(this.shape).forEach(s=>{const r=this.shape[s];t&&!t[s]?o[s]=r:o[s]=r.optional()}),new q({...this._def,shape:()=>o})}required(t){const o={};return U.objectKeys(this.shape).forEach(s=>{if(t&&!t[s])o[s]=this.shape[s];else{let l=this.shape[s];for(;l instanceof pe;)l=l._def.innerType;o[s]=l}}),new q({...this._def,shape:()=>o})}keyof(){return ln(U.objectKeys(this.shape))}}q.create=(n,t)=>new q({shape:()=>n,unknownKeys:"strip",catchall:fe.create(),typeName:I.ZodObject,...j(t)}),q.strictCreate=(n,t)=>new q({shape:()=>n,unknownKeys:"strict",catchall:fe.create(),typeName:I.ZodObject,...j(t)}),q.lazycreate=(n,t)=>new q({shape:n,unknownKeys:"strip",catchall:fe.create(),typeName:I.ZodObject,...j(t)});class ot extends v{_parse(t){const{ctx:o}=this._processInputParams(t),s=this._def.options;function r(l){for(const a of l)if(a.result.status==="valid")return a.result;for(const a of l)if(a.result.status==="dirty")return o.common.issues.push(...a.ctx.common.issues),a.result;const i=l.map(a=>new re(a.ctx.common.issues));return P(o,{code:N.invalid_union,unionErrors:i}),L}if(o.common.async)return Promise.all(s.map(async l=>{const i={...o,common:{...o.common,issues:[]},parent:null};return{result:await l._parseAsync({data:o.data,path:o.path,parent:i}),ctx:i}})).then(r);{let l;const i=[];for(const c of s){const d={...o,common:{...o.common,issues:[]},parent:null},p=c._parseSync({data:o.data,path:o.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!l&&(l={result:p,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(l)return o.common.issues.push(...l.ctx.common.issues),l.result;const a=i.map(c=>new re(c));return P(o,{code:N.invalid_union,unionErrors:a}),L}}get options(){return this._def.options}}ot.create=(n,t)=>new ot({options:n,typeName:I.ZodUnion,...j(t)});const he=n=>n instanceof st?he(n.schema):n instanceof ae?he(n.innerType()):n instanceof lt?[n.value]:n instanceof Be?n.options:n instanceof at?U.objectValues(n.enum):n instanceof it?he(n._def.innerType):n instanceof et?[void 0]:n instanceof tt?[null]:n instanceof pe?[void 0,...he(n.unwrap())]:n instanceof Ce?[null,...he(n.unwrap())]:n instanceof so||n instanceof pt?he(n.unwrap()):n instanceof ct?he(n._def.innerType):[];class Nt extends v{_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==O.object)return P(o,{code:N.invalid_type,expected:O.object,received:o.parsedType}),L;const s=this.discriminator,r=o.data[s],l=this.optionsMap.get(r);return l?o.common.async?l._parseAsync({data:o.data,path:o.path,parent:o}):l._parseSync({data:o.data,path:o.path,parent:o}):(P(o,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),L)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,o,s){const r=new Map;for(const l of o){const i=he(l.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(r.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);r.set(a,l)}}return new Nt({typeName:I.ZodDiscriminatedUnion,discriminator:t,options:o,optionsMap:r,...j(s)})}}function ro(n,t){const o=be(n),s=be(t);if(n===t)return{valid:!0,data:n};if(o===O.object&&s===O.object){const r=U.objectKeys(t),l=U.objectKeys(n).filter(a=>r.indexOf(a)!==-1),i={...n,...t};for(const a of l){const c=ro(n[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(o===O.array&&s===O.array){if(n.length!==t.length)return{valid:!1};const r=[];for(let l=0;l<n.length;l++){const i=n[l],a=t[l],c=ro(i,a);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return o===O.date&&s===O.date&&+n==+t?{valid:!0,data:n}:{valid:!1}}class nt extends v{_parse(t){const{status:o,ctx:s}=this._processInputParams(t),r=(l,i)=>{if(to(l)||to(i))return L;const a=ro(l.value,i.value);return a.valid?((oo(l)||oo(i))&&o.dirty(),{status:o.value,value:a.data}):(P(s,{code:N.invalid_intersection_types}),L)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([l,i])=>r(l,i)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}nt.create=(n,t,o)=>new nt({left:n,right:t,typeName:I.ZodIntersection,...j(o)});class de extends v{_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==O.array)return P(s,{code:N.invalid_type,expected:O.array,received:s.parsedType}),L;if(s.data.length<this._def.items.length)return P(s,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),L;!this._def.rest&&s.data.length>this._def.items.length&&(P(s,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const l=[...s.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new ce(s,i,s.path,a)):null}).filter(i=>!!i);return s.common.async?Promise.all(l).then(i=>J.mergeArray(o,i)):J.mergeArray(o,l)}get items(){return this._def.items}rest(t){return new de({...this._def,rest:t})}}de.create=(n,t)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new de({items:n,typeName:I.ZodTuple,rest:null,...j(t)})};class rt extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==O.object)return P(s,{code:N.invalid_type,expected:O.object,received:s.parsedType}),L;const r=[],l=this._def.keyType,i=this._def.valueType;for(const a in s.data)r.push({key:l._parse(new ce(s,a,s.path,a)),value:i._parse(new ce(s,s.data[a],s.path,a)),alwaysSet:a in s.data});return s.common.async?J.mergeObjectAsync(o,r):J.mergeObjectSync(o,r)}get element(){return this._def.valueType}static create(t,o,s){return o instanceof v?new rt({keyType:t,valueType:o,typeName:I.ZodRecord,...j(s)}):new rt({keyType:se.create(),valueType:t,typeName:I.ZodRecord,...j(o)})}}class Tt extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==O.map)return P(s,{code:N.invalid_type,expected:O.map,received:s.parsedType}),L;const r=this._def.keyType,l=this._def.valueType,i=[...s.data.entries()].map(([a,c],d)=>({key:r._parse(new ce(s,a,s.path,[d,"key"])),value:l._parse(new ce(s,c,s.path,[d,"value"]))}));if(s.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,p=await c.value;if(d.status==="aborted"||p.status==="aborted")return L;(d.status==="dirty"||p.status==="dirty")&&o.dirty(),a.set(d.value,p.value)}return{status:o.value,value:a}})}else{const a=new Map;for(const c of i){const d=c.key,p=c.value;if(d.status==="aborted"||p.status==="aborted")return L;(d.status==="dirty"||p.status==="dirty")&&o.dirty(),a.set(d.value,p.value)}return{status:o.value,value:a}}}}Tt.create=(n,t,o)=>new Tt({valueType:t,keyType:n,typeName:I.ZodMap,...j(o)});class Se extends v{_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==O.set)return P(s,{code:N.invalid_type,expected:O.set,received:s.parsedType}),L;const r=this._def;r.minSize!==null&&s.data.size<r.minSize.value&&(P(s,{code:N.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),o.dirty()),r.maxSize!==null&&s.data.size>r.maxSize.value&&(P(s,{code:N.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),o.dirty());const l=this._def.valueType;function i(c){const d=new Set;for(const p of c){if(p.status==="aborted")return L;p.status==="dirty"&&o.dirty(),d.add(p.value)}return{status:o.value,value:d}}const a=[...s.data.values()].map((c,d)=>l._parse(new ce(s,c,s.path,d)));return s.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,o){return new Se({...this._def,minSize:{value:t,message:R.toString(o)}})}max(t,o){return new Se({...this._def,maxSize:{value:t,message:R.toString(o)}})}size(t,o){return this.min(t,o).max(t,o)}nonempty(t){return this.min(1,t)}}Se.create=(n,t)=>new Se({valueType:n,minSize:null,maxSize:null,typeName:I.ZodSet,...j(t)});class je extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==O.function)return P(o,{code:N.invalid_type,expected:O.function,received:o.parsedType}),L;function s(a,c){return Ct({data:a,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,Bt(),Oe].filter(d=>!!d),issueData:{code:N.invalid_arguments,argumentsError:c}})}function r(a,c){return Ct({data:a,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,Bt(),Oe].filter(d=>!!d),issueData:{code:N.invalid_return_type,returnTypeError:c}})}const l={errorMap:o.common.contextualErrorMap},i=o.data;if(this._def.returns instanceof ve){const a=this;return ee(async function(...c){const d=new re([]),p=await a._def.args.parseAsync(c,l).catch(y=>{throw d.addIssue(s(c,y)),d}),m=await Reflect.apply(i,this,p);return await a._def.returns._def.type.parseAsync(m,l).catch(y=>{throw d.addIssue(r(m,y)),d})})}else{const a=this;return ee(function(...c){const d=a._def.args.safeParse(c,l);if(!d.success)throw new re([s(c,d.error)]);const p=Reflect.apply(i,this,d.data),m=a._def.returns.safeParse(p,l);if(!m.success)throw new re([r(p,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new je({...this._def,args:de.create(t).rest(Te.create())})}returns(t){return new je({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,o,s){return new je({args:t||de.create([]).rest(Te.create()),returns:o||Te.create(),typeName:I.ZodFunction,...j(s)})}}class st extends v{get schema(){return this._def.getter()}_parse(t){const{ctx:o}=this._processInputParams(t);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}st.create=(n,t)=>new st({getter:n,typeName:I.ZodLazy,...j(t)});class lt extends v{_parse(t){if(t.data!==this._def.value){const o=this._getOrReturnCtx(t);return P(o,{received:o.data,code:N.invalid_literal,expected:this._def.value}),L}return{status:"valid",value:t.data}}get value(){return this._def.value}}lt.create=(n,t)=>new lt({value:n,typeName:I.ZodLiteral,...j(t)});function ln(n,t){return new Be({values:n,typeName:I.ZodEnum,...j(t)})}class Be extends v{constructor(){super(...arguments),Xe.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const o=this._getOrReturnCtx(t),s=this._def.values;return P(o,{expected:U.joinValues(s),received:o.parsedType,code:N.invalid_type}),L}if(Et(this,Xe)||tn(this,Xe,new Set(this._def.values)),!Et(this,Xe).has(t.data)){const o=this._getOrReturnCtx(t),s=this._def.values;return P(o,{received:o.data,code:N.invalid_enum_value,options:s}),L}return ee(t.data)}get options(){return this._def.values}get enum(){const t={};for(const o of this._def.values)t[o]=o;return t}get Values(){const t={};for(const o of this._def.values)t[o]=o;return t}get Enum(){const t={};for(const o of this._def.values)t[o]=o;return t}extract(t,o=this._def){return Be.create(t,{...this._def,...o})}exclude(t,o=this._def){return Be.create(this.options.filter(s=>!t.includes(s)),{...this._def,...o})}}Xe=new WeakMap,Be.create=ln;class at extends v{constructor(){super(...arguments),Je.set(this,void 0)}_parse(t){const o=U.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==O.string&&s.parsedType!==O.number){const r=U.objectValues(o);return P(s,{expected:U.joinValues(r),received:s.parsedType,code:N.invalid_type}),L}if(Et(this,Je)||tn(this,Je,new Set(U.getValidEnumValues(this._def.values))),!Et(this,Je).has(t.data)){const r=U.objectValues(o);return P(s,{received:s.data,code:N.invalid_enum_value,options:r}),L}return ee(t.data)}get enum(){return this._def.values}}Je=new WeakMap,at.create=(n,t)=>new at({values:n,typeName:I.ZodNativeEnum,...j(t)});class ve extends v{unwrap(){return this._def.type}_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==O.promise&&o.common.async===!1)return P(o,{code:N.invalid_type,expected:O.promise,received:o.parsedType}),L;const s=o.parsedType===O.promise?o.data:Promise.resolve(o.data);return ee(s.then(r=>this._def.type.parseAsync(r,{path:o.path,errorMap:o.common.contextualErrorMap})))}}ve.create=(n,t)=>new ve({type:n,typeName:I.ZodPromise,...j(t)});class ae extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===I.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:o,ctx:s}=this._processInputParams(t),r=this._def.effect||null,l={addIssue:i=>{P(s,i),i.fatal?o.abort():o.dirty()},get path(){return s.path}};if(l.addIssue=l.addIssue.bind(l),r.type==="preprocess"){const i=r.transform(s.data,l);if(s.common.async)return Promise.resolve(i).then(async a=>{if(o.value==="aborted")return L;const c=await this._def.schema._parseAsync({data:a,path:s.path,parent:s});return c.status==="aborted"?L:c.status==="dirty"||o.value==="dirty"?Re(c.value):c});{if(o.value==="aborted")return L;const a=this._def.schema._parseSync({data:i,path:s.path,parent:s});return a.status==="aborted"?L:a.status==="dirty"||o.value==="dirty"?Re(a.value):a}}if(r.type==="refinement"){const i=a=>{const c=r.refinement(a,l);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(s.common.async===!1){const a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?L:(a.status==="dirty"&&o.dirty(),i(a.value),{status:o.value,value:a.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(a=>a.status==="aborted"?L:(a.status==="dirty"&&o.dirty(),i(a.value).then(()=>({status:o.value,value:a.value}))))}if(r.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Ye(i))return i;const a=r.transform(i.value,l);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:a}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>Ye(i)?Promise.resolve(r.transform(i.value,l)).then(a=>({status:o.value,value:a})):i);U.assertNever(r)}}ae.create=(n,t,o)=>new ae({schema:n,typeName:I.ZodEffects,effect:t,...j(o)}),ae.createWithPreprocess=(n,t,o)=>new ae({schema:t,effect:{type:"preprocess",transform:n},typeName:I.ZodEffects,...j(o)});class pe extends v{_parse(t){return this._getType(t)===O.undefined?ee(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pe.create=(n,t)=>new pe({innerType:n,typeName:I.ZodOptional,...j(t)});class Ce extends v{_parse(t){return this._getType(t)===O.null?ee(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ce.create=(n,t)=>new Ce({innerType:n,typeName:I.ZodNullable,...j(t)});class it extends v{_parse(t){const{ctx:o}=this._processInputParams(t);let s=o.data;return o.parsedType===O.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}it.create=(n,t)=>new it({innerType:n,typeName:I.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...j(t)});class ct extends v{_parse(t){const{ctx:o}=this._processInputParams(t),s={...o,common:{...o.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Ge(r)?r.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new re(s.common.issues)},input:s.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new re(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ct.create=(n,t)=>new ct({innerType:n,typeName:I.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...j(t)});class St extends v{_parse(t){if(this._getType(t)!==O.nan){const s=this._getOrReturnCtx(t);return P(s,{code:N.invalid_type,expected:O.nan,received:s.parsedType}),L}return{status:"valid",value:t.data}}}St.create=n=>new St({typeName:I.ZodNaN,...j(n)});const Cc=Symbol("zod_brand");class so extends v{_parse(t){const{ctx:o}=this._processInputParams(t),s=o.data;return this._def.type._parse({data:s,path:o.path,parent:o})}unwrap(){return this._def.type}}class dt extends v{_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?L:l.status==="dirty"?(o.dirty(),Re(l.value)):this._def.out._parseAsync({data:l.value,path:s.path,parent:s})})();{const r=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return r.status==="aborted"?L:r.status==="dirty"?(o.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:s.path,parent:s})}}static create(t,o){return new dt({in:t,out:o,typeName:I.ZodPipeline})}}class pt extends v{_parse(t){const o=this._def.innerType._parse(t),s=r=>(Ye(r)&&(r.value=Object.freeze(r.value)),r);return Ge(o)?o.then(r=>s(r)):s(o)}unwrap(){return this._def.innerType}}pt.create=(n,t)=>new pt({innerType:n,typeName:I.ZodReadonly,...j(t)});function an(n,t={},o){return n?Ie.create().superRefine((s,r)=>{var l,i;if(!n(s)){const a=typeof t=="function"?t(s):typeof t=="string"?{message:t}:t,c=(i=(l=a.fatal)!==null&&l!==void 0?l:o)!==null&&i!==void 0?i:!0,d=typeof a=="string"?{message:a}:a;r.addIssue({code:"custom",...d,fatal:c})}}):Ie.create()}const Ec={object:q.lazycreate};var I;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(I||(I={}));const xc=(n,t={message:`Input not instance of ${n.name}`})=>an(o=>o instanceof n,t),cn=se.create,dn=we.create,$c=St.create,Nc=Ve.create,pn=Qe.create,Tc=Ne.create,Sc=xt.create,Dc=et.create,Fc=tt.create,Mc=Ie.create,Ac=Te.create,zc=fe.create,Pc=$t.create,Oc=le.create,Rc=q.create,Ic=q.strictCreate,Lc=ot.create,jc=Nt.create,vc=nt.create,Hc=de.create,Zc=rt.create,Uc=Tt.create,Wc=Se.create,qc=je.create,Kc=st.create,Yc=lt.create,Gc=Be.create,Xc=at.create,Jc=ve.create,mn=ae.create,Qc=pe.create,ed=Ce.create,td=ae.createWithPreprocess,od=dt.create;var ie=Object.freeze({__proto__:null,defaultErrorMap:Oe,setErrorMap:ac,getErrorMap:Bt,makeIssue:Ct,EMPTY_PATH:ic,addIssueToContext:P,ParseStatus:J,INVALID:L,DIRTY:Re,OK:ee,isAborted:to,isDirty:oo,isValid:Ye,isAsync:Ge,get util(){return U},get objectUtil(){return eo},ZodParsedType:O,getParsedType:be,ZodType:v,datetimeRegex:sn,ZodString:se,ZodNumber:we,ZodBigInt:Ve,ZodBoolean:Qe,ZodDate:Ne,ZodSymbol:xt,ZodUndefined:et,ZodNull:tt,ZodAny:Ie,ZodUnknown:Te,ZodNever:fe,ZodVoid:$t,ZodArray:le,ZodObject:q,ZodUnion:ot,ZodDiscriminatedUnion:Nt,ZodIntersection:nt,ZodTuple:de,ZodRecord:rt,ZodMap:Tt,ZodSet:Se,ZodFunction:je,ZodLazy:st,ZodLiteral:lt,ZodEnum:Be,ZodNativeEnum:at,ZodPromise:ve,ZodEffects:ae,ZodTransformer:ae,ZodOptional:pe,ZodNullable:Ce,ZodDefault:it,ZodCatch:ct,ZodNaN:St,BRAND:Cc,ZodBranded:so,ZodPipeline:dt,ZodReadonly:pt,custom:an,Schema:v,ZodSchema:v,late:Ec,get ZodFirstPartyTypeKind(){return I},coerce:{string:n=>se.create({...n,coerce:!0}),number:n=>we.create({...n,coerce:!0}),boolean:n=>Qe.create({...n,coerce:!0}),bigint:n=>Ve.create({...n,coerce:!0}),date:n=>Ne.create({...n,coerce:!0})},any:Mc,array:Oc,bigint:Nc,boolean:pn,date:Tc,discriminatedUnion:jc,effect:mn,enum:Gc,function:qc,instanceof:xc,intersection:vc,lazy:Kc,literal:Yc,map:Uc,nan:$c,nativeEnum:Xc,never:zc,null:Fc,nullable:ed,number:dn,object:Rc,oboolean:()=>pn().optional(),onumber:()=>dn().optional(),optional:Qc,ostring:()=>cn().optional(),pipeline:od,preprocess:td,promise:Jc,record:Zc,set:Wc,strictObject:Ic,string:cn,symbol:Sc,transformer:mn,tuple:Hc,undefined:Dc,union:Lc,unknown:Ac,void:Pc,NEVER:L,ZodIssueCode:N,quotelessJson:lc,ZodError:re});function nd(n){throw new Error("Unexpected object: "+n)}const un="upload://upload/",fn="index://index/";function rd(n){return n.startsWith(un)}function sd(n){return n.startsWith(fn)}function hn(n){if(sd(n)){const t=n.slice(fn.length);return JSON.parse(decodeURIComponent(t)).path}else if(rd(n)){const t=n.slice(un.length);return JSON.parse(decodeURIComponent(t)).localPath}nd(n)}function ld(n){return n.replace(/^.*[\\/]/,"")}function ad(n){return ld(hn(n))}ie.object({__isRef:ie.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:ie.string().describe("Upstream block id"),name:ie.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly(),ie.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");const id=ie.object({type:ie.string(),importance:ie.number().optional(),id:ie.string().optional(),label:ie.string()});ie.array(id);const cd={key:0,ref:"label"},dd={key:0,class:"required-icon"},pd=["data-placeholder"],md={key:5,class:"pl-file-input__stats"},ud={key:0,class:"pl-file-input__error"},fd={key:1,class:"pl-file-input__helper"},hd=e.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.reactive({fileDialogOpen:!1,error:""}),s=e.useSlots(),r=t,l=n,i=(C,z)=>{if(C)try{return z(C)}catch(u){return o.error=u instanceof Error?u.message:String(u),C}},a=e.computed(()=>i(l.modelValue,ad)),c=e.computed(()=>i(l.modelValue,hn)),d=e.computed(()=>l.progress&&!l.progress.done),p=e.computed(()=>l.progress&&l.progress.done),m=e.computed(()=>o.error??l.error),k=e.computed(()=>!!m.value),y=e.computed(()=>{const{status:C,done:z}=l.progress??{};return!C||!C.bytesTotal?"":C.bytesProcessed&&!z?Ft(C.bytesProcessed,{})+" / "+Ft(C.bytesTotal,{}):Ft(C.bytesTotal,{})}),g=e.computed(()=>{var z;const{progress:C}=l;return C?{width:C.done?"100%":Math.round((((z=C.status)==null?void 0:z.progress)??0)*100)+"%"}:{}}),V=()=>{o.fileDialogOpen=!0},E=C=>{C.files.length&&r("update:modelValue",C.files[0])},b=()=>r("update:modelValue",void 0);e.watch(()=>l.modelValue,()=>{o.error=""},{immediate:!0});const F=e.ref();return l.cellStyle||ue(F),(C,z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([{"pl-file-input__cell-style":!!C.cellStyle,"has-file":!!a.value},"pl-file-input__envelope"])},[e.createElementVNode("div",{ref_key:"rootRef",ref:F,class:e.normalizeClass(["pl-file-input",{dashed:C.dashed,error:k.value}]),tabindex:"0",onKeyup:e.withKeys(V,["enter"]),onClick:e.withModifiers(V,["stop"])},[e.createElementVNode("div",{class:"pl-file-input__progress",style:e.normalizeStyle(g.value)},null,4),z[3]||(z[3]=e.createTextVNode()),!C.cellStyle&&C.label?(e.openBlock(),e.createElementBlock("label",cd,[C.required?(e.openBlock(),e.createElementBlock("i",dd)):e.createCommentVNode("",!0),z[1]||(z[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(C.label),1),z[2]||(z[2]=e.createTextVNode()),e.unref(s).tooltip||c.value?(e.openBlock(),e.createBlock(e.unref(X),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.unref(s).tooltip?e.renderSlot(C.$slots,"tooltip",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.value),1)],64))]),_:3})):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),z[4]||(z[4]=e.createTextVNode()),k.value?(e.openBlock(),e.createBlock(e.unref(te),{key:1,name:"restart"})):d.value?(e.openBlock(),e.createBlock(e.unref(te),{key:2,name:"cloud-upload"})):p.value?(e.openBlock(),e.createBlock(e.unref(te),{key:3,name:"success"})):(e.openBlock(),e.createBlock(e.unref(te),{key:4,name:"paper-clip"})),z[5]||(z[5]=e.createTextVNode()),e.createElementVNode("div",{"data-placeholder":C.placeholder??"Choose file",class:"pl-file-input__filename"},e.toDisplayString(a.value),9,pd),z[6]||(z[6]=e.createTextVNode()),y.value?(e.openBlock(),e.createElementBlock("div",md,e.toDisplayString(y.value),1)):e.createCommentVNode("",!0),z[7]||(z[7]=e.createTextVNode()),C.modelValue?(e.openBlock(),e.createBlock(e.unref(te),{key:6,name:"close",onClick:e.withModifiers(b,["stop"])})):e.createCommentVNode("",!0),z[8]||(z[8]=e.createTextVNode()),e.createVNode(_e,{class:"pl-file-input__contour"})],34),z[9]||(z[9]=e.createTextVNode()),k.value?(e.openBlock(),e.createElementBlock("div",ud,e.toDisplayString(m.value),1)):C.helper?(e.openBlock(),e.createElementBlock("div",fd,e.toDisplayString(C.helper),1)):e.createCommentVNode("",!0)],2),z[10]||(z[10]=e.createTextVNode()),e.createVNode(e.unref(Qo),{modelValue:o.fileDialogOpen,"onUpdate:modelValue":z[0]||(z[0]=u=>o.fileDialogOpen=u),extensions:C.extensions,title:C.fileDialogTitle,"close-on-outside-click":C.fileDialogCloseOnOutsideClick,"onImport:files":E},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),gd={class:"pl-notification-alert__wrapper d-flex text-s"},yd={class:"pl-notification-alert__content flex-grow-1"},kd={key:0,class:"pl-notification-alert__close"},_d={key:0,class:"pl-notification-alert__actions d-flex"},bd=e.defineComponent({__name:"PlNotificationAlert",props:e.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,o=e.useModel(n,"modelValue");function s(){t.closable&&(o.value=!1)}return(r,l)=>o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([r.type,"pl-notification-alert d-flex flex-column gap-16"]),style:e.normalizeStyle({width:`${r.width}`})},[e.createElementVNode("div",gd,[e.createElementVNode("div",yd,[e.renderSlot(r.$slots,"default")]),l[0]||(l[0]=e.createTextVNode()),r.closable?(e.openBlock(),e.createElementBlock("div",kd,[e.createVNode(e.unref(jt),{icon:"close",onClick:s})])):e.createCommentVNode("",!0)]),l[1]||(l[1]=e.createTextVNode()),r.$slots.actions?(e.openBlock(),e.createElementBlock("div",_d,[e.renderSlot(r.$slots,"actions")])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}}),wd=["data-content"],Vd=[".title"],Bd=Y(e.defineComponent({__name:"StackedRow",props:{value:{},height:{}},setup(n){const t=n,o=e.computed(()=>({height:t.height??"100%",minHeight:"82px"})),s=e.computed(()=>{const l=t.value||[],i=l.reduce((a,c)=>a+c.value,0);return l.map(a=>{const c=a.value/i*100,d=a.label;return{color:a.color.toString(),description:a.description,fraction:c,label:d}})}),r=[-40,-50,-50,-50,-80];return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.$style.component]),style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{class:e.normalizeClass(l.$style.track)},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,25,50,75,100],(a,c)=>e.createElementVNode("div",{key:c,style:e.normalizeStyle({left:`${a}%`,"--transform":`translateX(${r[c]}%)`}),"data-content":`${a}%`},null,12,wd)),64))],2),i[1]||(i[1]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(l.$style.container)},[s.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.$style.notReady)},"Not ready",2)),i[0]||(i[0]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,".title":a.description??a.label,style:e.normalizeStyle({width:`${a.fraction}%`,backgroundColor:a.color})},null,44,Vd))),128))],2)],6))}}),[["__cssModules",{$style:{component:"_component_5hdjy_1",container:"_container_5hdjy_11",track:"_track_5hdjy_25",notReady:"_notReady_5hdjy_47"}}]]),Cd=Y(e.defineComponent({__name:"Legends",props:{maxInColumn:{},legends:{}},setup(n){function t(r,l){const i=[];let a=[];for(let c=0;c<r.length;c++)a.length<l?a.push(r[c]):(i.push(a),a=[r[c]]);return i.push(a),i}const o=n,s=e.computed(()=>t(o.legends,o.maxInColumn??5));return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.$style.component)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(i,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(r.$style.legend)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:e.normalizeClass(r.$style.item)},[e.createElementVNode("div",{class:e.normalizeClass(r.$style.chip),style:e.normalizeStyle({backgroundColor:c.color.toString()})},null,6),e.createTextVNode(" "+e.toDisplayString(c.text),1)],2))),128))],2))),128))],2))}}),[["__cssModules",{$style:{component:"_component_blzj7_2",legend:"_legend_blzj7_9",chip:"_chip_blzj7_19",group:"_group_blzj7_26",item:"_item_blzj7_32"}}]]),Ed=Y(e.defineComponent({__name:"PlChartStackedBar",props:{settings:{}},setup(n){const t=n,o=e.computed(()=>t.settings.showLegends??!0),s=e.computed(()=>t.settings.data??[]),r=e.computed(()=>s.value.map(l=>({color:l.color,text:l.label})));return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.$style.component)},[l.settings.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.$style.title)},e.toDisplayString(l.settings.title),3)):e.createCommentVNode("",!0),i[0]||(i[0]=e.createTextVNode()),e.createVNode(Bd,{value:s.value},null,8,["value"]),i[1]||(i[1]=e.createTextVNode()),o.value&&r.value.length?(e.openBlock(),e.createBlock(Cd,{key:1,legends:r.value,"max-in-column":l.settings.maxLegendsInColumn},null,8,["legends","max-in-column"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{component:"_component_1j1iz_1",title:"_title_1j1iz_7"}}]]),xd=[".title"],$d=Y(e.defineComponent({__name:"StackedRowCompact",props:{value:{},height:{}},setup(n){const t=n,o=e.computed(()=>({height:t.height??"100%",minHeight:"24px"})),s=e.computed(()=>{const r=t.value||[],l=r.reduce((i,a)=>i+a.value,0);return r.map(i=>{const a=i.value/l*100,c=i.label;return{color:i.color.toString(),description:i.description,fraction:a,label:c}})});return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.$style.component]),style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{class:e.normalizeClass(r.$style.container)},[s.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.$style.notReady)},"Not ready",2)),l[0]||(l[0]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(i,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,".title":i.description??i.label,style:e.normalizeStyle({width:`${i.fraction}%`,backgroundColor:i.color})},null,44,xd))),128))],2)],6))}}),[["__cssModules",{$style:{component:"_component_1utnb_1",notReady:"_notReady_1utnb_8",container:"_container_1utnb_16"}}]]),Nd=Y(e.defineComponent({__name:"PlChartStackedBarCompact",props:{settings:{}},setup(n){const t=n,o=e.computed(()=>t.settings.data??[]);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.$style.component)},[e.createVNode($d,{value:o.value},null,8,["value"])],2))}}),[["__cssModules",{$style:{component:"_component_1gn0t_1"}}]]),gn=["#FFF680","#E8F66C","#C4F16B","#9AEB71","#70E084","#43D18A","#2DBD96","#28A8A0","#2793A3","#337B9E","#3B6399","#424C8F","#4A3584","#481B70","#4A005C"],yn=["#FFF680","#FFE871","#FDCD6F","#FEAD66","#FA935F","#F57258","#EB555E","#D64470","#B83778","#982D82","#7E2584","#611B84","#49187A","#38116B","#2B125C"],kn={viridis:gn,magma:yn,density:["#DFFADC","#C9F5D3","#B3F2CF","#9AEBCD","#80DCCC","#6DC8D2","#61B7DB","#5C97DB","#5A7CD6","#6060C7","#674BB3","#693799","#6A277B","#671D60","#611347"],salinity:["#FAFAB4","#ECFBA1","#D6F598","#BEEB91","#A2E082","#82D67C","#67C77E","#4FB281","#429E8C","#36898F","#2B668F","#254B85","#213475","#1E1E6B","#1C0F5C"],sunset:["#FFEA80","#FFD971","#FFC171","#FFA76C","#FB8B6F","#EB7179","#D75F7F","#C2518D","#A64392","#8038A4","#6135A4","#4735A3","#283A8F","#013C70","#003752"],rainbow:["#FFF780","#E7FA6F","#C1FA6A","#9BF56C","#79F080","#66E698","#56D7AC","#50C7C7","#56B4D7","#6898EB","#7481FA","#8769FA","#9450EB","#9634D6","#942AAE"],spectrum:["#43317B","#3B57A3","#3390B3","#5DC2B1","#95DBA5","#B9EBA0","#DBF5A6","#F5F5B7","#FEEA9D","#FFD285","#FA9B78","#E55C72","#C23665","#8F1150","#5C1243"],teal_red:["#122B5C","#1A496B","#1D7C8F","#21A3A3","#5FC7AB","#99E0B1","#CEF0CE","#F0F0F0","#FAE6D2","#FAC5AA","#FA9282","#E55C72","#C23665","#8F1150","#5C1243"],blue_red:["#0E0E8F","#1D23B8","#3748E5","#647DFA","#96A7FA","#C3CCFA","#E1E5FA","#F0F0F0","#F9DBDB","#F9BDBD","#F59393","#E55C72","#C23665","#8F1150","#5C1243"],lime_rose:["#2E5C00","#49850D","#3748E5","#8FC758","#ABDB7B","#C5EBA0","#DCF5C4","#F0F0F0","#FADCF5","#F5C4ED","#F0A3E3","#E573D2","#CC49B6","#991884","#701260"],viridis_magma:["#4A005C","#4A2F7F","#3F5895","#3181A0","#28A8A0","#3ECD8D","#86E67B","#CEF36C","#FFF680","#FED470","#FDA163","#F36C5A","#D64470","#A03080","#702084","#451777","#2B125C"]},_n={green_light:"#99E099",green_bright:"#198020",green_dark:"#42B842",violet_light:"#C1ADFF",violet_bright:"#845CFF",violet_dark:"#5F31CC",orange_light:"#FFCB8F",orange_bright:"#FF9429",orange_dark:"#C26A27",teal_light:"#90E0E0",teal_bright:"#27C2C2",teal_dark:"#068A94",rose_light:"#FAAAFA",rose_bright:"#E553E5",rose_dark:"#A324B2",lime_light:"#CBEB67",lime_bright:"#95C700",lime_dark:"#659406",blue_light:"#99CCFF",blue_bright:"#2D93FA",blue_dark:"#105BCC",red_light:"#FFADBA",red_bright:"#F05670",red_dark:"#AD3757",grey_light:"#D3D7E0",grey_bright:"#929BAD",grey_dark:"#5E5E70"};function ne(n,t,o,s=1){return new class{constructor(r,l,i,a=1){this.r=r,this.g=l,this.b=i,this.a=a}get hex(){const r=n.toString(16).padStart(2,"0"),l=t.toString(16).padStart(2,"0"),i=o.toString(16).padStart(2,"0"),a=Math.round(s*255).toString(16).padStart(2,"0");return`#${r}${l}${i}${a}`}get rgba(){return`rgb(${n}, ${t}, ${o}, ${s})`}toString(){return this.hex}toJSON(){return this.hex}}(n,t,o,s)}ne.fromHex=n=>{n=n.replace("#","");let t,o,s,r=1;if(n.length===6)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16);else if(n.length===8)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16),r=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return ne(t,o,s,r)},ne.fromString=n=>{if(n.startsWith("#"))return ne.fromHex(n);throw Error("TODO: implement rgb(a), hsl")},ne.categorical=n=>ne.fromHex(_n[n]),ne.fromHex=n=>{n=n.replace("#","");let t,o,s,r=1;if(n.length===6)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16);else if(n.length===8)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16),r=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return ne(t,o,s,r)},ne.fromString=n=>{if(n.startsWith("#"))return ne.fromHex(n);throw Error("TODO: implement rgb(a), hsl")};function lo(n,t,o){return n+o*(t-n)}function bn(n,t,o){const s=Math.round(lo(n.r,t.r,o)),r=Math.round(lo(n.g,t.g,o)),l=Math.round(lo(n.b,t.b,o));return ne(s,r,l)}function wn(n){return typeof n=="string"?kn[n].map(t=>ne.fromString(t)):n.map(t=>typeof t=="string"?ne.fromString(t):t)}function Td(n){return new class{constructor(t){this.colors=t}fromInterval(t){if(t<0)throw new Error("t must be greater than or equal to 0");if(t>1)throw new Error("t must be less than or equal to 1");const o=this.colors,s=o.length-1,r=Math.floor(t*s),l=t*s%1,i=o[r],a=o[Math.min(r+1,s)];return bn(i,a,l)}getNthOf(t,o){if(t<=0)throw new Error("n must be greater than 0");if(t>o)throw Error("n must be lower or equal than count of segments");return this.fromInterval((t-1)/(o-1))}split(t){if(t<=0)throw new Error("n must be greater than 0");const o=[];for(let s=0;s<t;s++){const r=s/(t-1);o.push(this.fromInterval(r))}return o}}(wn(n))}const Sd=e.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(n){const t=n;return e.provide(t.contextKey,e.computed(()=>t.context)),(o,s)=>e.renderSlot(o.$slots,"default")}});function Q(n,t,o){return t>n?t:n>o?o:n}const ao=n=>e.computed(()=>{const t=[100],{min:o,max:s,step:r}=n.value;let l=o;for(;l<s;){l+=r;const a=(1-(Q(l,o,s)-o)/(s-o))*100;t.push(a)}return t}),Dd={class:"ui-slider__wrapper"},Fd={class:"ui-slider__label-section"},Md={key:0,class:"text-s"},Ad={key:1,class:"ui-slider__value-static text-s"},zd={class:"ui-slider__base"},Pd={class:"ui-slider__container"},Od={class:"ui-slider__container ui-slider__container-thumb"},Rd={class:"ui-slider__input-wrapper d-flex"},Id=["value"],Ld={key:0,class:"ui-slider__error"},jd=e.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.reactive({deltaValue:0}),i=e.computed(()=>r.max-r.min),a=e.computed(()=>Q((r.modelValue??0)+l.deltaValue,r.min,r.max)),c=e.ref(r.modelValue),d=e.computed(()=>{const u=r.modelValue;return Number.isFinite(u)?u<r.min?`Min value: ${r.min}`:u>r.max?`Max value: ${r.max}`:r.error:"Not a number"}),p=e.computed(()=>r),m=ao(p),k=e.computed(()=>(a.value-r.min)/i.value),y=e.computed(()=>({right:Math.ceil((1-k.value)*100)+"%"})),g=e.computed(()=>({right:`calc(${Math.ceil((1-k.value)*100)}%) `})),V=e.ref(),E=e.ref();e.watch(()=>r.modelValue,u=>{c.value=u});function b(u){const f=Q(u,r.min,r.max);return Math.round((f+Number.EPSILON)*(1/r.step))/(1/r.step)}ye(E,u=>{var f;G((f=e.unref(V))==null?void 0:f.getBoundingClientRect(),T=>{const{dx:x}=u;l.deltaValue=x/T.width*i.value,c.value=b(Q((r.modelValue??0)+l.deltaValue,r.min,r.max)),u.stop&&(s("update:modelValue",b(a.value)),l.deltaValue=0)})});function F(u){s("update:modelValue",b(u))}function C(u){F(+u.target.value)}function z(u){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(u.code)&&u.preventDefault();const f=u.code==="ArrowUp"||u.code==="ArrowRight"?r.step*1:u.code==="ArrowDown"||u.code==="ArrowLeft"?r.step*-1:0;F(r.modelValue+f)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[e.createElementVNode("div",{class:e.normalizeClass([`ui-slider__mode-${r.mode}`,"ui-slider"])},[e.createElementVNode("div",Dd,[e.createElementVNode("div",Fd,[u.label?(e.openBlock(),e.createElementBlock("label",Md,[e.createElementVNode("span",null,e.toDisplayString(u.label),1),f[1]||(f[1]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(u.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f[2]||(f[2]=e.createTextVNode()),r.mode==="text"?(e.openBlock(),e.createElementBlock("div",Ad,e.toDisplayString(c.value)+e.toDisplayString(u.measure),1)):e.createCommentVNode("",!0)]),f[6]||(f[6]=e.createTextVNode()),e.createElementVNode("div",zd,[e.createElementVNode("div",Pd,[e.createElementVNode("div",{ref_key:"barRef",ref:V,class:"ui-slider__bar"},[e.createElementVNode("div",{class:"ui-slider__progress",style:e.normalizeStyle(y.value)},null,4)],512)]),f[5]||(f[5]=e.createTextVNode()),e.createElementVNode("div",Od,[r.breakpoints?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(m),(T,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,style:e.normalizeStyle({right:`${T}%`}),class:"ui-slider__thumb-step"},null,4))),128)):e.createCommentVNode("",!0),f[4]||(f[4]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef",ref:E,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:e.normalizeStyle(g.value),onKeydown:z},f[3]||(f[3]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),f[7]||(f[7]=e.createTextVNode()),e.createElementVNode("div",Rd,[r.mode==="input"?(e.openBlock(),e.createElementBlock("input",{key:0,value:c.value,class:"ui-slider__value text-s",onChange:f[0]||(f[0]=T=>C(T))},null,40,Id)):e.createCommentVNode("",!0)])],2),f[8]||(f[8]=e.createTextVNode()),d.value?(e.openBlock(),e.createElementBlock("div",Ld,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)],2))}});function vd(n,t=null,o=null){function s(a){const{scrollTop:c,scrollHeight:d,clientHeight:p}=a;if(!(d>p)||!t)return null;const k=d-c-p,y=c>t?t:0,g=k>t?p-t-y:p;return`linear-gradient(
|
|
8
|
+
`,wa=["innerHTML"],ba={class:"dropdown-list-item__title-container"},xa={class:"dropdown-list-item__title text-s"},Va={key:0,class:"dropdown-list-item__description text-description"},Ba={key:1,class:"dropdown-list-item__icon flex-self-start"},We=e.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>{const l=[];return t.size==="small"&&l.push("dropdown-list-item__small"),t.isSelected&&l.push("dropdown-list-item__selected"),t.isHovered&&l.push("hovered-item"),l.join(" ")}),s=e.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return t.isSelected&&l.push("checked"),l.join(" ")}),r=e.computed(()=>t.isSelected?ka:_a);return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.value,"dropdown-list-item"])},[t.useCheckbox?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value),innerHTML:r.value},null,10,wa)):e.createCommentVNode("",!0),i[1]||(i[1]=e.createTextVNode()),e.createElementVNode("div",ba,[e.createElementVNode("div",xa,e.toDisplayString(l.option.label),1),i[0]||(i[0]=e.createTextVNode()),l.option.description?(e.openBlock(),e.createElementBlock("div",Va,e.toDisplayString(l.option.description),1)):e.createCommentVNode("",!0)]),i[2]||(i[2]=e.createTextVNode()),!t.useCheckbox&&t.isSelected?(e.openBlock(),e.createElementBlock("div",Ba)):e.createCommentVNode("",!0)],2))}});function ft(n,t){const s=Pn(()=>{if(n.value){const{scrollTop:r,scrollLeft:l,scrollHeight:i,scrollWidth:a,clientHeight:c,clientWidth:d}=document.documentElement,u=n.value.getBoundingClientRect();t({scrollTop:r,scrollLeft:l,scrollHeight:i,scrollWidth:a,clientHeight:c,clientWidth:d,offsetY:r+u.y,offsetX:l+u.x,top:u.top,right:u.right,bottom:u.bottom,left:u.left,width:u.width,height:u.height,x:u.x,y:u.y})}});e.onMounted(s),q(window,"scroll",s,{capture:!0,passive:!0}),q(window,"resize",s,{passive:!0}),q(window,"adjust",s,!0)}const Ke=K(e.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>t.size==="large"?"--mask-size: 24px":""),s=e.computed(()=>`mask-16 mask-${t.name}`);return(r,l)=>(e.openBlock(),e.createElementBlock("i",{style:e.normalizeStyle(o.value),class:e.normalizeClass([s.value,r.$style.icon])},null,6))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),Ca=["onKeyup"],$a=e.defineComponent({__name:"PlBtnSplit",props:e.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["click"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const s=n,r=o,l=e.useModel(n,"modelValue"),i=e.ref(),a=e.ref(),c=e.ref(),d=e.ref(),u=e.reactive({open:!1,optionsHeight:0,activeIndex:-1});t({data:u});const f=e.reactive({top:"0px",left:"0px",width:"0px"});e.watch(a,h=>{if(h){const y=h.getBoundingClientRect();u.optionsHeight=y.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const p=e.computed(()=>u.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),m=e.computed(()=>(s.options??[]).findIndex(h=>Wt(h.value,l.value))),g=e.computed(()=>Ne(s.options??[]).map((h,y)=>({...h,index:y,isSelected:y===m.value,isActive:y===u.activeIndex}))),k=e.computed(()=>s.loading||s.options===void 0),x=e.computed(()=>{var h;return((h=g.value.find(y=>Wt(y.value,l.value)))==null?void 0:h.label)??(s.options===void 0?"...":"")});ft(i,h=>{const S=h.top+h.height+3;S+u.optionsHeight>h.clientHeight?f.top=h.top-u.optionsHeight-3+"px":f.top=S+"px",f.left=h.left+"px",f.width=h.width+"px"});const w=h=>{var y;l.value=h,u.open=!1,(y=i==null?void 0:i.value)==null||y.focus()};function T(){r("click")}const B=h=>{var _,b;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(h.code))h.preventDefault();else return;if(h.target===d.value&&h.code==="Enter"){T();return}const{open:y,activeIndex:S}=u;if(!y&&h.target===c.value){h.code==="Enter"&&(u.open=!0);return}h.code==="Escape"&&(u.open=!1,(_=i.value)==null||_.focus());const N=e.unref(g),{length:v}=N;if(!v)return;h.code==="Enter"&&w((b=N.find(D=>D.index===S))==null?void 0:b.value);const C=N.findIndex(D=>D.index===S)??-1,$=h.code==="ArrowDown"?1:h.code==="ArrowUp"?-1:0,E=Math.abs(C+$+v)%v;u.activeIndex=g.value[E].index??-1},A=h=>{var S,N;const y=h.relatedTarget;!((S=i.value)!=null&&S.contains(y))&&!((N=a.value)!=null&&N.contains(y))&&(u.open=!1)};return(h,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:i,class:e.normalizeClass([{disabled:h.disabled||k.value,loading:k.value},"pl-btn-split d-flex"]),onFocusout:A,onKeydown:B},[e.createElementVNode("div",{ref_key:"buttonAction",ref:d,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:T,onKeyup:e.withKeys(e.withModifiers(T,["stop"]),["enter"])},e.toDisplayString(x.value),41,Ca),y[1]||(y[1]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"menuActivator",ref:c,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:y[0]||(y[0]=S=>u.open=!u.open)},[k.value?(e.openBlock(),e.createBlock(Ke,{key:0,name:"loading"})):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([p.value,"pl-btn-split__icon"])},null,2))],512),y[2]||(y[2]=e.createTextVNode()),u.open?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createElementVNode("div",{ref_key:"list",ref:a,class:"pl-dropdown__options",style:e.normalizeStyle(f),tabindex:"-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,N)=>(e.openBlock(),e.createBlock(We,{key:N,option:S,"is-selected":S.isSelected,"is-hovered":S.isActive,size:"medium",onClick:e.withModifiers(v=>w(S.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):e.createCommentVNode("",!0)],34))}});function hr(n){function t(o){const s=o.currentTarget,r=document.createElement("span"),l=Math.max(s.clientWidth,s.clientHeight),i=l/2;r.style.width=r.style.height=`${l}px`,r.style.left=`${o.clientX-s.offsetLeft-i}px`,r.style.top=`${o.clientY-s.offsetTop-i}px`,r.classList.add("ripple");const a=s.getElementsByClassName("ripple")[0];a&&a.remove(),s.appendChild(r)}e.onMounted(()=>{var o;(o=n.value)==null||o.addEventListener("click",t)})}const Ea={key:0},Na={inheritAttrs:!1},Yt=e.defineComponent({...Na,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n,o=e.ref(),s=e.computed(()=>t.small||t.size==="small"),r=e.computed(()=>t.large||t.size==="large");return hr(o),(l,i)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"btn",ref:o,tabindex:"0",class:{loading:l.loading,small:s.value,large:r.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ea,[e.renderSlot(l.$slots,"default")])),i[0]||(i[0]=e.createTextVNode()),l.loading?(e.openBlock(),e.createBlock(e.unref(Ke),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(e.openBlock(),e.createBlock(e.unref(Ke),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):e.createCommentVNode("",!0)],16))}}),Sa={name:"PlBtnPrimary"},gr=e.defineComponent({...Sa,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(Yt,e.mergeProps({class:"pl-btn-primary"},t),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),Ta={name:"PlBtnAccent"},Ma=e.defineComponent({...Ta,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(Yt,e.mergeProps({class:"pl-btn-accent"},t),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),Aa={name:"PlBtnDanger"},va=e.defineComponent({...Aa,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(Yt,e.mergeProps({class:"pl-btn-danger"},t),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),Da={name:"PlBtnSecondary"},yr=e.defineComponent({...Da,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const t=n;return(o,s)=>(e.openBlock(),e.createBlock(Yt,e.mergeProps(t,{class:"pl-btn-secondary"}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16))}}),oe=K(e.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>`mask-24 mask-${t.name}`);return(s,r)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass([o.value,s.$style.icon])},null,2))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),Fa={key:0},za={name:"PlBtnGhost"},Ln=e.defineComponent({...za,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.size==="small"),s=e.computed(()=>t.size==="large"),r=e.ref(),l=e.useSlots();return hr(r),(i,a)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"btnRef",ref:r,tabindex:"0",class:["pl-btn-ghost",{loading:i.loading,small:o.value,large:s.value,round:i.round,reverse:i.reverse,justifyCenter:i.justifyCenter,[i.$attrs.class+""]:!0}]},{...i.$attrs,disabled:!!i.$attrs.disabled||i.loading}),[e.unref(l).default&&!i.round?(e.openBlock(),e.createElementBlock("span",Fa,[e.renderSlot(i.$slots,"default")])):e.createCommentVNode("",!0),a[0]||(a[0]=e.createTextVNode()),i.loading?(e.openBlock(),e.createBlock(e.unref(oe),{key:1,name:"loading",size:i.size},null,8,["size"])):i.icon?(e.openBlock(),e.createBlock(e.unref(oe),{key:2,name:i.icon,size:i.size},null,8,["name","size"])):e.createCommentVNode("",!0),a[1]||(a[1]=e.createTextVNode()),e.renderSlot(i.$slots,"append")],16))}}),Pa=e.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(n){const t=n,o=e.ref(!1);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-btn-link",{disabled:s.disabled,loading:s.loading,hover:o.value}]),onMouseover:r[0]||(r[0]=l=>o.value=!0),onMouseleave:r[1]||(r[1]=l=>o.value=!1)},[e.createVNode(yr,e.mergeProps({round:"",hover:o.value},t),null,16,["hover"]),r[2]||(r[2]=e.createTextVNode()),e.renderSlot(s.$slots,"default")],34))}});function Ra(n,t){const o=e.ref();return ft(n,s=>{o.value=s}),e.computed(()=>{const s=e.unref(o),r=e.unref(t),l=r.position??"top",i=r.gap??8;if(!s)return"";const a=s.offsetY+Math.floor(s.height/2),c=s.offsetX+Math.floor(s.width/2);return l==="top-left"?`left: ${s.offsetX}px; top: ${s.offsetY-i}px;`:l==="top"?`left: ${c}px; top: ${s.offsetY-i}px;`:l==="right"?`left: ${s.offsetX+s.width+i}px; top: ${a}px;`:l==="left"?`right: ${s.scrollWidth-s.x+i}px; top: ${a}px;`:l==="southwest"?`left: ${s.offsetX+s.width}px; top: ${s.offsetY+s.height+i}px;`:""})}function pt(n,t){return t(n)}function X(n,t){if(n!=null)return t(n)}function Oa(n){return Array.isArray(n)?n:[n]}function Ia(n,t,...o){o.forEach(s=>{n[s]=t[s]})}function Xt(n,t){q(document,"click",o=>{if(!document.contains(o.target))return;Oa(n).map(r=>r.value).filter(r=>!!r).some(r=>r==null?void 0:r.contains(o.target))||t()})}const La={},Ha={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ja(n,t){return e.openBlock(),e.createElementBlock("svg",Ha,t[0]||(t[0]=[e.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const Za=K(La,[["render",ja]]),Hn=new Map,Ua={name:"PlTooltip"},J=e.defineComponent({...Ua,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(n,{emit:t}){const o=t,s=Symbol(),r=n,l=e.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});Hn.set(s,()=>d()),e.watch(()=>l.open,x=>{requestAnimationFrame(()=>{l.tooltipOpen=x})});let i=()=>{};const a=ur(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),c=()=>{l.open=!0;for(const[x,w]of Hn.entries())x!==s&&w()},d=()=>{l.open=!1,o("tooltip:close")},u=async()=>{r.hide||(a(),l.over=!0,i(),await sr(100),l.over&&c())},f=()=>{l.over=!1,i=lr(()=>{l.over||d()},r.closeDelay)};e.watch(()=>r.hide,x=>{x&&d()});const p=e.ref(),m=e.ref(),g=Ra(p,e.toRef(r));Xt([p,m],()=>d());const k=e.computed(()=>({"--pl-tooltip-max-width":r.maxWidth}));return e.onUnmounted(()=>{Hn.delete(s)}),(x,w)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.element),e.mergeProps(x.$attrs,{ref_key:"rootRef",ref:p,onClick:u,onMouseover:u,onMouseleave:f}),{default:e.withCtx(()=>[e.renderSlot(x.$slots,"default"),w[1]||(w[1]=e.createTextVNode()),x.$slots.tooltip&&l.open?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"tooltip-transition"},{default:e.withCtx(()=>[l.tooltipOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:e.normalizeStyle(e.unref(g))},[e.createElementVNode("div",{ref_key:"tooltip",ref:m,class:e.normalizeClass(["pl-tooltip",x.position]),style:e.normalizeStyle(k.value),onMouseover:u,onMouseleave:f},[e.createElementVNode("div",null,[e.renderSlot(x.$slots,"tooltip")]),w[0]||(w[0]=e.createTextVNode()),e.createVNode(Za)],38)],4)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)]),_:3},16))}}),qa={},Wa={class:"inner-border"};function Ka(n,t,o,s,r,l){return e.openBlock(),e.createElementBlock("div",Wa,[e.renderSlot(n.$slots,"default")])}const Ya=K(qa,[["render",Ka]]),Xa={key:0},Ga=["tabindex","onKeydown","onClick"],Ja={key:1,class:"pl-btn-group__helper"},Qa={key:2,class:"pl-btn-group__error"},ec={name:"PlBtnGroup"},_r=e.defineComponent({...ec,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=a=>s("update:modelValue",a),l=n,i=e.computed(()=>l.options.map(a=>({label:"label"in a?a.label:a.text,value:a.value})));return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-btn-group",{disabled:a.disabled,compact:a.compact}])},[a.label?(e.openBlock(),e.createElementBlock("label",Xa,[e.createElementVNode("span",null,e.toDisplayString(a.label),1),c[0]||(c[0]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c[1]||(c[1]=e.createTextVNode()),e.createVNode(Ya,{class:"pl-btn-group__container"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:e.normalizeClass(["pl-btn-group__option text-s",{active:a.modelValue===d.value}]),tabindex:a.modelValue===d.value||a.disabled?void 0:0,onKeydown:e.withKeys(f=>r(d.value),["enter"]),onClick:f=>r(d.value)},e.toDisplayString(d.label),43,Ga))),128))]),_:1}),c[2]||(c[2]=e.createTextVNode()),a.helper?(e.openBlock(),e.createElementBlock("div",Ja,e.toDisplayString(a.helper),1)):a.error?(e.openBlock(),e.createElementBlock("div",Qa,e.toDisplayString(a.error),1)):e.createCommentVNode("",!0)],2))}});function tc(n,t){const o=e.ref(),s=e.ref(),{parse:r,update:l}=t,i=()=>{o.value=void 0,s.value=void 0},a=e.computed({get(){return o.value!==void 0?o.value:n.value},set(c){i();try{const d=r?r(c):c;(l?l(d):!0)?n.value=d:o.value=d}catch(d){o.value=c,s.value=d instanceof Error?d.message:String(d)}}});return e.reactive({value:a,error:s,reset:i})}const jn={component:"_component_1prpy_1",container:"_container_1prpy_15",error:"_error_1prpy_69"},nc={key:0},oc=["placeholder"],rc=e.defineComponent({__name:"PlEditableTitle",props:e.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=n,s=tc(t,{update(){return!1},parse:a=>{if(typeof a!="string")throw Error("value should be a string");if(o.maxLength&&a.length>o.maxLength)throw Error(`Max title length is ${o.maxLength} characters`);if(o.minLength&&a.length<o.minLength)throw Error(`Min title length is ${o.minLength} characters`);return a.trim()}}),r=e.computed(()=>({maxWidth:o.maxWidth??"80%"})),l=()=>{t.value=s.value&&!s.error?s.value:t.value,s.reset()},i=e.ref();return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-editable-title",e.unref(jn).component]),style:e.normalizeStyle(r.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(jn).container),onClick:c[3]||(c[3]=()=>{var d;return(d=i.value)==null?void 0:d.focus()})},[a.prefix?(e.openBlock(),e.createElementBlock("span",nc,e.toDisplayString(a.prefix.trim())+" ",1)):e.createCommentVNode("",!0),c[4]||(c[4]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":c[0]||(c[0]=d=>e.unref(s).value=d),placeholder:a.placeholder,onFocusout:l,onKeydown:[c[1]||(c[1]=e.withKeys((...d)=>e.unref(s).reset&&e.unref(s).reset(...d),["escape"])),c[2]||(c[2]=e.withKeys(d=>{var u;return(u=d.target)==null?void 0:u.blur()},["enter"]))]},null,40,oc),[[e.vModelText,e.unref(s).value]])],2),c[5]||(c[5]=e.createTextVNode()),e.unref(s).error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(jn).error)},e.toDisplayString(e.unref(s).error),3)):e.createCommentVNode("",!0)],6))}}),sc={inheritAttrs:!1},lc={class:"double-contour"};function ic(n,t,o,s,r,l){return e.openBlock(),e.createElementBlock("div",lc,[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(n.$attrs)),[e.renderSlot(n.$slots,"default")],16)])}const Se=K(sc,[["render",ic]]);function kr(n){e.onMounted(n),e.onUpdated(n)}const Zn=new WeakMap,Un=new ResizeObserver(n=>{for(const t of n)X(Zn.get(t.target),o=>o(t))});function wr(n,t){Zn.set(n,t),Un.unobserve(n),Un.observe(n)}function br(n){Un.unobserve(n),Zn.delete(n)}const ac=8,xr=4;function be(n,t="label"){const o=new Set;kr(()=>{X(n==null?void 0:n.value,s=>{const r=s.querySelector(t);r&&(o.add(r),wr(r,()=>{const l=rr(()=>r.getBoundingClientRect().width+pt(ac,i=>Number.isNaN(i)?xr:i+xr));s.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&s.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),e.onBeforeUnmount(()=>{Array.from(o.values()).map(s=>br(s))})}function cc(n,t){const o=[];return t&&t.length>0&&t.forEach(s=>{const r=s(n);typeof r=="string"&&o.push(r)}),{isValid:o.length===0,errors:o}}function Vr(n,t){return e.computed(()=>cc(n.value,t))}const Pe=K(e.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>t.size==="large"?"--icon-size: 24px":""),s=e.computed(()=>`icon-16 icon-${t.name}`);return(r,l)=>(e.openBlock(),e.createElementBlock("i",{style:e.normalizeStyle(o.value),class:e.normalizeClass([s.value,r.$style.icon])},null,6))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),dc={class:"pl-text-field__envelope"},uc={key:0,ref:"label"},fc={key:0,class:"required-icon"},pc={key:1,class:"pl-text-field__prefix"},mc=["disabled","placeholder","type"],hc={key:0,class:"pl-text-field__error"},gc={key:1,class:"pl-text-field__helper"},yc={name:"PlTextField"},_c=e.defineComponent({...yc,props:e.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useSlots(),o=e.useModel(n,"modelValue"),s=n,r=e.ref(void 0),l=e.ref(),i=e.ref(!1),a=e.reactive({cached:void 0}),c=e.computed({get(){return a.cached?a.cached.value:o.value===void 0||o.value===null?"":String(o.value)},set(h){if(a.cached=void 0,s.parse)try{o.value=s.parse(h)}catch(y){a.cached={error:y instanceof Error?y.message:String(y),value:h}}else o.value=h}}),d=e.computed(()=>s.type&&s.type==="password"?i.value?"text":s.type:"text"),u=e.computed(()=>i.value?"view-show":"view-hide"),f=()=>{s.clearable&&(a.cached=void 0,o.value=s.clearable===!0?"":s.clearable())},p=Vr(c,s.rules||[]),m=e.computed(()=>s.clearable?s.clearable===!0?o.value==="":o.value===s.clearable():o.value===""),g=e.computed(()=>!m.value),k=e.computed(()=>{const h=[];return s.error&&h.push(s.error),a.cached&&h.push(a.cached.error),p.value.isValid||h.push(...p.value.errors),h}),x=e.computed(()=>k.value.length>0),w=e.computed(()=>s.clearable&&g.value&&s.type!=="password"&&!s.disabled),T=()=>i.value=!i.value,B=()=>{a.cached=void 0},A=()=>{var h;return(h=l.value)==null?void 0:h.focus()};return be(r),(h,y)=>(e.openBlock(),e.createElementBlock("div",dc,[e.createElementVNode("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["pl-text-field",{error:x.value,disabled:h.disabled,dashed:h.dashed,nonEmpty:g.value}])},[h.label?(e.openBlock(),e.createElementBlock("label",uc,[h.required?(e.openBlock(),e.createElementBlock("i",fc)):e.createCommentVNode("",!0),y[1]||(y[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(h.label),1),y[2]||(y[2]=e.createTextVNode()),e.unref(t).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(h.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),y[5]||(y[5]=e.createTextVNode()),h.prefix?(e.openBlock(),e.createElementBlock("div",pc,e.toDisplayString(h.prefix),1)):e.createCommentVNode("",!0),y[6]||(y[6]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":y[0]||(y[0]=S=>c.value=S),disabled:h.disabled,placeholder:h.placeholder||"...",type:d.value,spellcheck:"false",onFocusout:B},null,40,mc),[[e.vModelDynamic,c.value]]),y[7]||(y[7]=e.createTextVNode()),e.createElementVNode("div",{class:"pl-text-field__append",onClick:A},[w.value?(e.openBlock(),e.createBlock(e.unref(Pe),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:e.withModifiers(f,["stop"])})):e.createCommentVNode("",!0),y[3]||(y[3]=e.createTextVNode()),h.type==="password"?(e.openBlock(),e.createBlock(e.unref(oe),{key:1,name:u.value,style:{cursor:"pointer"},onClick:e.withModifiers(T,["stop"])},null,8,["name"])):e.createCommentVNode("",!0),y[4]||(y[4]=e.createTextVNode()),e.renderSlot(h.$slots,"append")]),y[8]||(y[8]=e.createTextVNode()),e.createVNode(Se,{class:"pl-text-field__contour"})],2),y[9]||(y[9]=e.createTextVNode()),x.value?(e.openBlock(),e.createElementBlock("div",hc,e.toDisplayString(k.value.join(" ")),1)):h.helper?(e.openBlock(),e.createElementBlock("div",gc,e.toDisplayString(h.helper),1)):e.createCommentVNode("",!0)]))}}),qn=K(e.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(n){const t=n,o=e.computed(()=>`icon-24 icon-${t.name}`);return(s,r)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass([o.value,s.$style.icon])},null,2))}}),[["__cssModules",{$style:{icon:"_icon_1ugxm_2"}}]]),kc=["disabled","placeholder"],Br=K(e.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(void 0),l=e.ref(),i=e.computed({get(){return s.modelValue??""},set(d){o("update:modelValue",d)}}),a=e.computed(()=>!!s.modelValue),c=()=>o("update:modelValue","");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:r,class:e.normalizeClass(["pl-search-field",[d.$style.component]])},[e.createVNode(e.unref(qn),{name:"search"}),u[1]||(u[1]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":u[0]||(u[0]=f=>i.value=f),disabled:d.disabled,type:"text",placeholder:d.placeholder||"Find...",spellcheck:"false"},null,8,kc),[[e.vModelText,i.value]]),u[2]||(u[2]=e.createTextVNode()),d.clearable&&a.value?(e.openBlock(),e.createBlock(e.unref(Pe),{key:0,class:e.normalizeClass(d.$style.clear),name:"delete-clear",onClick:e.withModifiers(c,["stop"])},null,8,["class"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{component:"_component_pz0lo_1",clear:"_clear_pz0lo_35"}}]]),wc={class:"ui-text-area__envelope"},bc={key:0,ref:"label"},xc={key:0,class:"required-icon"},Vc=["readonly","rows","disabled","placeholder"],Bc={class:"ui-text-area__append"},Cc={key:0,class:"ui-text-area__error"},$c={key:1,class:"ui-text-area__helper"},Ec={name:"PlTextArea"},Nc=e.defineComponent({...Ec,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.ref(),i=e.ref(),a=e.computed({get(){return r.modelValue??""},set(m){s("update:modelValue",m)}}),c=e.computed(()=>!!r.modelValue),d=Vr(a,r.rules||[]);be(l);const u=e.computed(()=>{const m=[];return r.error&&m.push(r.error),m.push(...d.value.errors),m}),f=e.computed(()=>u.value.length>0),p=()=>{if(!r.autogrow)return;const m=i.value;m&&(m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return e.onMounted(()=>{p()}),(m,g)=>(e.openBlock(),e.createElementBlock("div",wc,[e.createElementVNode("div",{ref_key:"root",ref:l,class:e.normalizeClass(["ui-text-area",{error:f.value,disabled:m.disabled,dashed:m.dashed,nonEmpty:c.value}])},[m.label?(e.openBlock(),e.createElementBlock("label",bc,[m.required?(e.openBlock(),e.createElementBlock("i",xc)):e.createCommentVNode("",!0),g[1]||(g[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(m.label),1),g[2]||(g[2]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(m.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),g[3]||(g[3]=e.createTextVNode()),e.withDirectives(e.createElementVNode("textarea",{ref_key:"input",ref:i,"onUpdate:modelValue":g[0]||(g[0]=k=>a.value=k),readonly:m.readonly,rows:m.rows,disabled:m.disabled,placeholder:m.placeholder??"...",spellcheck:"false",onInput:p},null,40,Vc),[[e.vModelText,a.value]]),g[4]||(g[4]=e.createTextVNode()),e.createElementVNode("div",Bc,[e.renderSlot(m.$slots,"append")]),g[5]||(g[5]=e.createTextVNode()),e.createVNode(Se,{class:"ui-text-area__contour"})],2),g[6]||(g[6]=e.createTextVNode()),f.value?(e.openBlock(),e.createElementBlock("div",Cc,e.toDisplayString(u.value.join(" ")),1)):m.helper?(e.openBlock(),e.createElementBlock("div",$c,e.toDisplayString(m.helper),1)):e.createCommentVNode("",!0)]))}});function Cr(n){return n!==null&&typeof n=="object"}function re(n,t){return Cr(n)&&Cr(t)?Object.keys(n).length!==Object.keys(t).length?!1:Object.keys(n).every(o=>re(n[o],t[o])):n===t}function Wn(n,t){return n.some(o=>re(o,t))}const Kn=e.defineComponent({__name:"LongText",setup(n){e.useCssVars(u=>({"6bc9e89c":i.value}));const t=e.ref(!1),o=e.ref(),s=e.ref(!1),r=e.computed(()=>s.value&&t.value?"ui-lt-animate":""),l=dr(u=>s.value=u,500),i=e.computed(()=>{var u;return o.value?`${((u=o.value)==null?void 0:u.innerHTML.length)*.4}s`:"5s"});function a(){const u=zn(o.value,"span cannot be empty");t.value=u.clientWidth<u.scrollWidth}function c(){a(),l(!0)}function d(){l(!1)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(u.$attrs,{class:"ui-lt-container"}),[e.createElementVNode("span",{onMouseover:c,onMouseleave:d},[e.createElementVNode("span",{ref_key:"span",ref:o,class:e.normalizeClass(r.value)},[e.renderSlot(u.$slots,"default")],2)],32)],16))}});function $r(n,t){const o=n.scrollTop,s=n.getBoundingClientRect().height,r=t.offsetTop,l=t.getBoundingClientRect().height;return r+l<s+o&&r>o}function Er(n,t){const o=n.scrollTop,s=n.getBoundingClientRect().height,r=t.offsetTop,l=t.getBoundingClientRect().height;return r+l<s+o?"ceil":r>o?"floor":"visible"}function Gt(n,t,o={}){const s=n.scrollTop,r=n.getBoundingClientRect().height,l=t.getBoundingClientRect().height,i=t.offsetTop,a=Er(n,t);if(a==="visible")return;const c=d=>{const u=a==="floor"?i-(r-l):i;n.scrollTop=s+d*(u-s)};$r(n,t)||cr({duration:o.duration||100,timing:ar(d=>d),draw:c})}function Yn(n,t,o,s){return n.addEventListener(t,o,s),function(){n.removeEventListener(t,o)}}function Sc(n,t){const o=t.getBoundingClientRect();return n.x<o.x||n.x>o.x+o.width||n.y<o.y||n.y>o.y+o.height}const Xn=e.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(n,{expose:t}){const o=n,s=e.reactive({optionsHeight:0}),r=e.reactive({top:"0px",left:"0px",width:"0px"}),l=e.toRef(o,"root"),i=e.ref();return t({scrollIntoActive:()=>{const c=i.value;c&&$e(c.querySelector(".hovered-item"),d=>{Gt(c,d)})},listRef:i}),e.watch(i,c=>{c&&requestAnimationFrame(()=>{const d=c.getBoundingClientRect();s.optionsHeight=d.height,window.dispatchEvent(new CustomEvent("adjust"))})}),ft(l,c=>{const d=document.body.getBoundingClientRect(),u=c.top-d.top,f=c.left-d.left,p=o.gap??0,m=u+c.height+p;m+s.optionsHeight>c.clientHeight?r.top=u-s.optionsHeight-p+"px":r.top=m+"px",r.left=f+"px",r.width=c.width+"px"}),(c,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",e.mergeProps({ref_key:"listRef",ref:i},c.$attrs,{style:r,tabindex:"-1"}),[e.renderSlot(c.$slots,"default",{ref:"list"})],16)]))}}),Tc={class:"pl-dropdown__envelope"},Mc=["tabindex"],Ac={class:"pl-dropdown__container"},vc={class:"pl-dropdown__field"},Dc=["disabled","placeholder"],Fc={class:"pl-dropdown__controls"},zc={key:0},Pc={key:0,class:"required-icon"},Rc={key:0,class:"nothing-found"},Oc={key:0,class:"pl-dropdown__error"},Ic={key:1,class:"pl-dropdown__helper"},Lc={key:2,class:"pl-dropdown__helper"},Hc={name:"PlDropdown"},Gn=e.defineComponent({...Hc,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.useSlots(),l=e.ref(),i=e.ref(),a=e.useTemplateRef("overlay"),c=e.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),d=()=>pt(B.value.findIndex(E=>re(E.value,s.modelValue)),E=>E<0?0:E),u=()=>c.activeIndex=d(),f=e.computed(()=>s.options===void 0),p=e.computed(()=>f.value?!0:s.disabled),m=e.computed(()=>(s.options??[]).findIndex(E=>re(E.value,s.modelValue))),g=e.computed(()=>{if(!f.value){if(s.error)return s.error;if(s.modelValue!==void 0&&m.value===-1)return"The selected value is not one of the options"}}),k=e.computed(()=>Ne(s.options??[]).map((E,_)=>({...E,index:_,isSelected:_===m.value,isActive:_===c.activeIndex}))),x=e.computed(()=>{const _=e.unref(k).find(b=>re(b.value,s.modelValue));return(_==null?void 0:_.label)||s.modelValue}),w=e.computed(()=>!c.open&&s.modelValue?"":s.modelValue?String(x.value):s.placeholder),T=e.computed(()=>s.modelValue!==void 0&&s.modelValue!==null),B=e.computed(()=>{const E=k.value;return c.search?E.filter(_=>{const b=c.search.toLowerCase();return _.label.toLowerCase().includes(b)||_.description&&_.description.toLowerCase().includes(b)?!0:typeof _.value=="string"?_.value.toLowerCase().includes(b):_.value===c.search}):E}),A=e.computed(()=>p.value?void 0:"0"),h=E=>{var _;o("update:modelValue",E),c.search="",c.open=!1,(_=l==null?void 0:l.value)==null||_.focus()},y=()=>o("update:modelValue",void 0),S=()=>{var E;return(E=i.value)==null?void 0:E.focus()},N=()=>c.open=!c.open,v=()=>c.open=!0,C=E=>{var b,D,F;const _=E.relatedTarget;!((b=l.value)!=null&&b.contains(_))&&!((F=(D=a.value)==null?void 0:D.listRef)!=null&&F.contains(_))&&(c.search="",c.open=!1)},$=E=>{var at,jt;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(E.code))E.preventDefault();else return;const{open:_,activeIndex:b}=c;if(!_){E.code==="Enter"&&(c.open=!0);return}E.code==="Escape"&&(c.open=!1,(at=l.value)==null||at.focus());const D=e.unref(B),{length:F}=D;if(!F)return;E.code==="Enter"&&h((jt=D.find(ct=>ct.index===b))==null?void 0:jt.value);const H=D.findIndex(ct=>ct.index===b)??-1,Z=E.code==="ArrowDown"?1:E.code==="ArrowUp"?-1:0,G=Math.abs(H+Z+F)%F;c.activeIndex=B.value[G].index??-1};return be(l),e.watch(()=>s.modelValue,u,{immediate:!0}),e.watch(()=>c.open,E=>{var _;return E?(_=i.value)==null?void 0:_.focus():""}),e.watchPostEffect(()=>{var E;c.search,c.activeIndex>=0&&c.open&&((E=a.value)==null||E.scrollIntoActive())}),(E,_)=>(e.openBlock(),e.createElementBlock("div",Tc,[e.createElementVNode("div",{ref_key:"rootRef",ref:l,tabindex:A.value,class:e.normalizeClass(["pl-dropdown",{open:c.open,error:E.error,disabled:p.value}]),onKeydown:$,onFocusout:C},[e.createElementVNode("div",Ac,[e.createElementVNode("div",vc,[e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:i,"onUpdate:modelValue":_[0]||(_[0]=b=>c.search=b),type:"text",tabindex:"-1",disabled:p.value,placeholder:w.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:v},null,40,Dc),[[e.vModelText,c.search]]),_[4]||(_[4]=e.createTextVNode()),c.open?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"input-value",onClick:S},[e.createVNode(Kn,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1})])),_[5]||(_[5]=e.createTextVNode()),e.createElementVNode("div",Fc,[f.value?(e.openBlock(),e.createBlock(e.unref(oe),{key:0,name:"loading"})):e.createCommentVNode("",!0),_[1]||(_[1]=e.createTextVNode()),E.clearable&&T.value?(e.openBlock(),e.createBlock(e.unref(Pe),{key:1,name:"delete-clear",onClick:e.withModifiers(y,["stop"])})):e.createCommentVNode("",!0),_[2]||(_[2]=e.createTextVNode()),e.renderSlot(E.$slots,"append"),_[3]||(_[3]=e.createTextVNode()),E.arrowIconLarge?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["arrow-icon",[`icon-24 ${E.arrowIconLarge}`]]),onClick:e.withModifiers(N,["stop"])},null,2)):E.arrowIcon?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["arrow-icon",[`icon-16 ${E.arrowIcon}`]]),onClick:e.withModifiers(N,["stop"])},null,2)):(e.openBlock(),e.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:e.withModifiers(N,["stop"])}))])]),_[9]||(_[9]=e.createTextVNode()),E.label?(e.openBlock(),e.createElementBlock("label",zc,[E.required?(e.openBlock(),e.createElementBlock("i",Pc)):e.createCommentVNode("",!0),_[6]||(_[6]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(E.label),1),_[7]||(_[7]=e.createTextVNode()),e.unref(r).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(E.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_[10]||(_[10]=e.createTextVNode()),c.open?(e.openBlock(),e.createBlock(e.unref(Xn),{key:1,ref_key:"overlay",ref:a,root:l.value,class:"pl-dropdown__options",tabindex:"-1",gap:3},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(b,D)=>(e.openBlock(),e.createBlock(We,{key:D,option:b,"is-selected":b.isSelected,"is-hovered":b.isActive,size:E.optionSize,onClick:e.withModifiers(F=>h(b.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),_[8]||(_[8]=e.createTextVNode()),B.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Rc,"Nothing found"))]),_:1},8,["root"])):e.createCommentVNode("",!0),_[11]||(_[11]=e.createTextVNode()),e.createVNode(Se,{class:"pl-dropdown__contour"})])],42,Mc),_[12]||(_[12]=e.createTextVNode()),g.value?(e.openBlock(),e.createElementBlock("div",Oc,e.toDisplayString(g.value),1)):f.value&&E.loadingOptionsHelper?(e.openBlock(),e.createElementBlock("div",Ic,e.toDisplayString(E.loadingOptionsHelper),1)):E.helper?(e.openBlock(),e.createElementBlock("div",Lc,e.toDisplayString(E.helper),1)):e.createCommentVNode("",!0)]))}}),jc={name:"PlDropdownRef"},Zc=e.defineComponent({...jc,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(n){const t=n,o=e.computed(()=>{var r;return(r=t.options)==null?void 0:r.map(l=>({label:l.label,value:l.ref}))}),s=e.computed(()=>t.disabled?"icon-link-disabled":"icon-link");return(r,l)=>(e.openBlock(),e.createBlock(e.unref(Gn),e.mergeProps(t,{options:o.value,"loading-options-helper":r.loadingOptionsHelper,"arrow-icon-large":s.value,"onUpdate:modelValue":l[0]||(l[0]=i=>r.$emit("update:modelValue",i))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function Uc(n,t){return e.computed(()=>{const o=Ne(n.value);return t.value?o.filter(s=>s.label.toLowerCase().includes(t.value.toLowerCase())):o})}const qc={class:"resizable-input"},Wc=["placeholder","value","disabled"],Kc=e.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,s=t,r=e.computed(()=>{var a;return o.placeholder?o.placeholder:(a=o.modelValue)==null?void 0:a.replace('"',"")}),l=e.computed(()=>{const a={};return o.width&&(a.width=o.width),o.maxWidth&&(a.maxWidth=o.maxWidth),a});function i(a){s("update:modelValue",a.target.value)}return(a,c)=>(e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("span",{style:e.normalizeStyle(l.value),class:"resizable-input__size-span"},e.toDisplayString(r.value),5),c[0]||(c[0]=e.createTextVNode()),e.createElementVNode("input",e.mergeProps(a.$attrs,{placeholder:a.placeholder,value:o.modelValue,disabled:o.disabled,style:l.value,onInput:i}),null,16,Wc)]))}}),Yc={class:"dropdown-tab-item__title text-caps13"},Xc=e.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.option.label),s=e.computed(()=>{const r=[];return t.isSelected&&r.push("dropdown-tab-item__selected"),t.isHovered&&r.push("hovered-item"),r.join(" ")});return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([s.value,"dropdown-tab-item"])},[e.createElementVNode("div",Yc,e.toDisplayString(o.value),1)],2))}}),Gc={class:"pl-line-dropdown__prefix"},Jc={class:"pl-line-dropdown__icon-wrapper"},Qc={class:"pl-line-dropdown__icon"},ed={key:0,class:"pl-line-dropdown__no-item"},td={key:0,class:"pl-line-dropdown__no-item"},nd=e.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=e.ref(),i=e.ref(),a=e.computed(()=>{const C=[];return r.isOpen&&C.push("open"),s.disabled&&C.push("disabled"),C.join(" ")}),c=e.ref(""),d=Uc(e.toRef(s,"options"),c),u=e.computed(()=>!!(s.clearable&&r.isOpen&&s.modelValue&&f.value)),f=e.computed(()=>{if(s.modelValue){const C=g();if(C!==-1)return Ne(s.options)[C].label}return""}),p=e.ref(f.value);e.watch(f,C=>{p.value=C});const m=e.computed(()=>r.isOpen&&c.value&&c.value.length>=f.value.length-1?c.value:f.value||"...");Xt(l,()=>{s.mode==="list"&&(r.isOpen=!1)}),e.watch(()=>p.value,C=>{f.value!==C?c.value=C:c.value=""}),e.watch(()=>r.isOpen,C=>{var $;C&&l.value&&(($=l.value.querySelector("input"))==null||$.focus(),e.nextTick(()=>S()))}),e.watch(()=>s.modelValue,()=>k(),{immediate:!0});function g(){return s.options.findIndex(C=>re(C.value,s.modelValue))}function k(){r.activeOption=pt(d.value.findIndex(C=>re(C.value,s.modelValue)),C=>C<0?0:C)}function x(){c.value=""}function w(){s.disabled?r.isOpen=!1:e.nextTick(()=>{r.isOpen=!r.isOpen})}function T(){s.mode==="list"&&(r.isOpen=!1)}function B(C){C&&(o("update:modelValue",C.value),T(),x())}function A(C){return re(C.value,s.modelValue)}const h=C=>{var E,_;const $=C.relatedTarget;!((E=l.value)!=null&&E.contains($))&&!((_=i.value)!=null&&_.contains($))&&(c.value="",r.isOpen=!1)};function y(C){const{activeOption:$}=r;if(!r.isOpen&&C.code==="Enter"){r.isOpen=!0;return}const{length:E}=d.value;if(!E)return;["ArrowDown","ArrowUp","Enter"].includes(C.code)&&C.preventDefault(),C.code==="Enter"&&B(d.value[$]);const _=C.code==="ArrowDown"?1:C.code==="ArrowUp"?-1:0;r.activeOption=Math.abs($+_+E)%E,requestAnimationFrame(S)}function S(){const C=i.value;C&&X(C.querySelector(".hovered-item"),$=>{s.mode==="list"?Gt(C,$):$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function N(){o("update:modelValue",void 0)}const v=e.reactive({top:"0px",left:"0px"});return e.watch(i,C=>{if(C){const $=C.getBoundingClientRect();r.optionsHeight=$.height,window.dispatchEvent(new CustomEvent("adjust"))}}),ft(l,C=>{const E=C.top+C.height+2;E+r.optionsHeight>C.clientHeight?v.top=C.top-r.optionsHeight-2+"px":v.top=E+"px",v.left=C.left+"px"}),(C,$)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:e.normalizeClass([a.value,"pl-line-dropdown uc-pointer"]),onKeydown:y,onFocusout:h,onClick:w},[e.createElementVNode("div",Gc,e.toDisplayString(s==null?void 0:s.prefix),1),$[6]||($[6]=e.createTextVNode()),e.createVNode(Kc,{modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=E=>p.value=E),placeholder:m.value,disabled:s.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),$[7]||($[7]=e.createTextVNode()),e.createElementVNode("div",Jc,[e.withDirectives(e.createElementVNode("div",Qc,null,512),[[e.vShow,!u.value]]),$[1]||($[1]=e.createTextVNode()),e.withDirectives(e.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:N},null,512),[[e.vShow,u.value]])]),$[8]||($[8]=e.createTextVNode()),r.isOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[s.mode==="list"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"list",ref:i,style:e.normalizeStyle(v),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:h},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(E,_)=>e.renderSlot(C.$slots,"item",{key:_,item:E,textItem:"text",isSelected:A(E),isHovered:r.activeOption==_,onClick:e.withModifiers(b=>B(E),["stop"])},()=>[e.createVNode(We,{option:E,"text-item":"text","is-selected":A(E),"is-hovered":r.activeOption==_,size:"medium",onClick:e.withModifiers(b=>B(E),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),$[3]||($[3]=e.createTextVNode()),e.unref(d).length===0?(e.openBlock(),e.createElementBlock("div",ed,$[2]||($[2]=[e.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):e.createCommentVNode("",!0)],36)):s.mode==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"list",ref:i,style:e.normalizeStyle(v),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:h},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(E,_)=>e.renderSlot(C.$slots,"item",{key:_,item:E,isSelected:A(E),isHovered:r.activeOption==_,onClick:e.withModifiers(b=>B(E),["stop"])},()=>[e.createVNode(Xc,{option:E,"is-selected":A(E),"is-hovered":r.activeOption==_,onClick:e.withModifiers(b=>B(E),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),$[5]||($[5]=e.createTextVNode()),e.unref(d).length===0?(e.openBlock(),e.createElementBlock("div",td,$[4]||($[4]=[e.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):e.createCommentVNode("",!0)],36)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],34))}}),od={class:"ui-dropdown__envelope"},rd=["tabindex"],sd={class:"ui-dropdown__container"},ld={class:"ui-dropdown__field"},id=["disabled","placeholder"],ad={class:"ui-dropdown__controls"},cd={key:0},dd={key:0,class:"required-icon"},ud={key:0,class:"nothing-found"},fd={key:0,class:"ui-dropdown__error"},pd={key:1,class:"ui-dropdown__helper"},md={key:2,class:"ui-dropdown__helper"},hd={name:"PlDropdown"},gd=e.defineComponent({...hd,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=e.useSlots(),l=e.ref(),i=e.ref(),a=e.ref(),c=e.reactive({search:"",activeIndex:-1,open:!1}),d=()=>pt(B.value.findIndex(_=>re(_.value,s.modelValue)),_=>_<0?0:_),u=()=>c.activeIndex=d(),f=e.computed(()=>s.options===void 0),p=e.computed(()=>f.value?!0:s.disabled),m=e.computed(()=>(s.options??[]).findIndex(_=>re(_.value,s.modelValue))),g=e.computed(()=>{if(!f.value){if(s.error)return s.error;if(s.modelValue!==void 0&&m.value===-1)return"The selected value is not one of the options"}}),k=e.computed(()=>Ne(s.options??[]).map((_,b)=>({..._,index:b,isSelected:b===m.value,isActive:b===c.activeIndex}))),x=e.computed(()=>{const b=e.unref(k).find(D=>re(D.value,s.modelValue));return(b==null?void 0:b.label)||s.modelValue}),w=e.computed(()=>!c.open&&s.modelValue?"":s.modelValue?String(x.value):s.placeholder),T=e.computed(()=>s.modelValue!==void 0&&s.modelValue!==null),B=e.computed(()=>{const _=k.value;return c.search?_.filter(b=>{const D=c.search.toLowerCase();return b.label.toLowerCase().includes(D)||b.description&&b.description.toLowerCase().includes(D)?!0:typeof b.value=="string"?b.value.toLowerCase().includes(D):b.value===c.search}):_}),A=e.computed(()=>p.value?void 0:"0"),h=_=>{var b;o("update:modelValue",_),c.search="",c.open=!1,(b=l==null?void 0:l.value)==null||b.focus()},y=()=>o("update:modelValue",void 0),S=()=>{var _;return(_=a.value)==null?void 0:_.focus()},N=()=>c.open=!c.open,v=()=>c.open=!0,C=_=>{var b;(b=l==null?void 0:l.value)!=null&&b.contains(_.relatedTarget)||(c.search="",c.open=!1)},$=()=>{const _=i.value;_&&X(_.querySelector(".hovered-item"),b=>{Gt(_,b)})},E=_=>{var jt,ct;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(_.code))_.preventDefault();else return;const{open:b,activeIndex:D}=c;if(!b){_.code==="Enter"&&(c.open=!0);return}_.code==="Escape"&&(c.open=!1,(jt=l.value)==null||jt.focus());const F=e.unref(B),{length:H}=F;if(!H)return;_.code==="Enter"&&h((ct=F.find(qo=>qo.index===D))==null?void 0:ct.value);const Z=F.findIndex(qo=>qo.index===D)??-1,G=_.code==="ArrowDown"?1:_.code==="ArrowUp"?-1:0,at=Math.abs(Z+G+H)%H;c.activeIndex=B.value[at].index??-1};return be(l),e.watch(()=>s.modelValue,u,{immediate:!0}),e.watch(()=>c.open,_=>{var b;return _?(b=a.value)==null?void 0:b.focus():""}),e.watchPostEffect(()=>{c.search,c.activeIndex>=0&&c.open&&$()}),(_,b)=>(e.openBlock(),e.createElementBlock("div",od,[e.createElementVNode("div",{ref_key:"root",ref:l,tabindex:A.value,class:e.normalizeClass(["ui-dropdown",{open:c.open,error:_.error,disabled:p.value}]),onKeydown:E,onFocusout:C},[e.createElementVNode("div",sd,[e.createElementVNode("div",ld,[e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:a,"onUpdate:modelValue":b[0]||(b[0]=D=>c.search=D),type:"text",tabindex:"-1",disabled:p.value,placeholder:w.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:v},null,40,id),[[e.vModelText,c.search]]),b[4]||(b[4]=e.createTextVNode()),c.open?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:S},[e.createVNode(Kn,{class:"input-value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1})])),b[5]||(b[5]=e.createTextVNode()),e.createElementVNode("div",ad,[f.value?(e.openBlock(),e.createBlock(e.unref(oe),{key:0,name:"loading"})):e.createCommentVNode("",!0),b[1]||(b[1]=e.createTextVNode()),_.clearable&&T.value?(e.openBlock(),e.createBlock(e.unref(Pe),{key:1,name:"delete-clear",onClick:e.withModifiers(y,["stop"])})):e.createCommentVNode("",!0),b[2]||(b[2]=e.createTextVNode()),e.renderSlot(_.$slots,"append"),b[3]||(b[3]=e.createTextVNode()),_.arrowIconLarge?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["arrow-icon",[`icon-24 ${_.arrowIconLarge}`]]),onClick:e.withModifiers(N,["stop"])},null,2)):_.arrowIcon?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["arrow-icon",[`icon-16 ${_.arrowIcon}`]]),onClick:e.withModifiers(N,["stop"])},null,2)):(e.openBlock(),e.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:e.withModifiers(N,["stop"])}))])]),b[9]||(b[9]=e.createTextVNode()),_.label?(e.openBlock(),e.createElementBlock("label",cd,[_.required?(e.openBlock(),e.createElementBlock("i",dd)):e.createCommentVNode("",!0),b[6]||(b[6]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(_.label),1),b[7]||(b[7]=e.createTextVNode()),e.unref(r).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(_.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),b[10]||(b[10]=e.createTextVNode()),c.open?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"list",ref:i,class:"ui-dropdown__options"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(D,F)=>(e.openBlock(),e.createBlock(We,{key:F,option:D,"is-selected":D.isSelected,"is-hovered":D.isActive,size:_.optionSize,onClick:e.withModifiers(H=>h(D.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),b[8]||(b[8]=e.createTextVNode()),B.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ud,"Nothing found"))],512)):e.createCommentVNode("",!0),b[11]||(b[11]=e.createTextVNode()),e.createVNode(Se,{class:"ui-dropdown__contour"})])],42,rd),b[12]||(b[12]=e.createTextVNode()),g.value?(e.openBlock(),e.createElementBlock("div",fd,e.toDisplayString(g.value),1)):f.value&&_.loadingOptionsHelper?(e.openBlock(),e.createElementBlock("div",pd,e.toDisplayString(_.loadingOptionsHelper),1)):_.helper?(e.openBlock(),e.createElementBlock("div",md,e.toDisplayString(_.helper),1)):e.createCommentVNode("",!0)]))}}),yd={key:0,class:"ui-progress-bar"},_d={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},kd={class:"ui-progress-bar__message flex-grow-1"},wd={class:"ui-progress-bar__percent"},bd=e.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(n){const t=n,o=e.computed(()=>t.progress===100?t.completeMessage:"");return(s,r)=>s.loading?(e.openBlock(),e.createElementBlock("div",yd,[e.createElementVNode("div",{class:"ui-progress-bar__indicator",style:e.normalizeStyle({width:s.progress+"%"})},null,4),r[1]||(r[1]=e.createTextVNode()),e.createElementVNode("div",_d,[e.createElementVNode("div",kd,e.toDisplayString(o.value),1),r[0]||(r[0]=e.createTextVNode()),e.createElementVNode("div",wd,e.toDisplayString(s.progress+"%"),1)])])):e.createCommentVNode("",!0)}}),xd={class:"mi-number-field__main-wrapper d-flex"},Vd={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},Bd={key:0,class:"text-description"},Cd=["disabled","placeholder"],$d={class:"mi-number-field__icons d-flex-column"},Ed={key:0,class:"mi-number-field__hint text-description"},Nd=e.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,s=t,r=e.ref(),l=e.useSlots(),i=e.ref();be(r);const a=e.ref(!0),c=e.computed({get(){return a.value&&o.modelValue!==void 0?new Number(o.modelValue).toString():""},set(w){var T;w=w.replace(/,/g,""),p(w)?(s("update:modelValue",+w),w.toString()!==((T=o.modelValue)==null?void 0:T.toString())&&+w===o.modelValue&&w[w.length-1]!=="."&&(a.value=!1,e.nextTick(()=>{a.value=!0}))):(w.trim()===""&&s("update:modelValue",void 0),a.value=!1,e.nextTick(()=>{a.value=!0}))}}),d=e.computed(()=>{let w=[];return o.errorMessage&&w.push(o.errorMessage),p(o.modelValue)?(o.minValue!==void 0&&o.modelValue!==void 0&&o.modelValue<o.minValue&&w.push(`Model value must be higher than ${o.minValue}`),o.maxValue!==void 0&&o.modelValue!==void 0&&o.modelValue>o.maxValue&&w.push(`Model value must be less than ${o.maxValue}`)):w.push("Model value is not a number."),w=[...w],w.join(" ")}),u=e.computed(()=>!!(o.maxValue&&o.modelValue!==void 0&&(o.modelValue||0)+o.step>o.maxValue)),f=e.computed(()=>!!(o.minValue&&o.modelValue!==void 0&&(o.modelValue||0)-o.step<o.minValue));function p(w){return w!==void 0?(w=w==null?void 0:w.toString(),!isNaN(+w)&&!isNaN(parseFloat(w))):!1}function m(){if(!u.value){let w=0;o.modelValue===void 0?w=o.minValue?o.minValue:0:w=+(o.modelValue||0)+o.step,c.value=w.toString()}}function g(){if(!f.value){let w=0;o.modelValue===void 0?w=0:w=+(o.modelValue||0)-o.step,c.value=o.minValue?Math.max(o.minValue,w).toString():w.toString()}}function k(w){["ArrowDown","ArrowUp"].includes(w.code)&&w.preventDefault(),w.code==="ArrowUp"?m():w.code==="ArrowDown"&&g()}const x=w=>{w.detail>1&&w.preventDefault()};return(w,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:r,class:e.normalizeClass([{error:!!d.value.trim(),disabled:w.disabled},"mi-number-field d-flex-column"]),onMousedown:x,onKeydown:T[1]||(T[1]=B=>k(B))},[e.createElementVNode("div",xd,[e.createVNode(Se,{class:"mi-number-field__contour"}),T[6]||(T[6]=e.createTextVNode()),e.createElementVNode("div",Vd,[w.label?(e.openBlock(),e.createElementBlock("label",Bd,[e.createTextVNode(e.toDisplayString(w.label)+" ",1),e.unref(l).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(w.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),T[2]||(T[2]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:i,"onUpdate:modelValue":T[0]||(T[0]=B=>c.value=B),disabled:w.disabled,placeholder:w.placeholder,class:"text-s flex-grow"},null,8,Cd),[[e.vModelText,c.value]])]),T[7]||(T[7]=e.createTextVNode()),e.createElementVNode("div",$d,[e.createElementVNode("div",{class:e.normalizeClass([{disabled:u.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:m},T[3]||(T[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),T[5]||(T[5]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass([{disabled:f.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:g},T[4]||(T[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),T[8]||(T[8]=e.createTextVNode()),d.value.trim()?(e.openBlock(),e.createElementBlock("div",Ed,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)],34))}}),Sd={class:"pl-chip__text"},Jn=e.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(n){const t=e.ref(),o=e.ref(!1);return e.onMounted(()=>{var s;t.value&&(o.value=((s=t.value)==null?void 0:s.clientWidth)>=256)}),(s,r)=>(e.openBlock(),e.createBlock(e.unref(J),{position:"top",class:"pl-chip-tooltip",delay:500},e.createSlots({default:e.withCtx(()=>[r[4]||(r[4]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"chip",ref:t,class:e.normalizeClass(["pl-chip",{small:s.small}])},[e.createElementVNode("div",Sd,[e.renderSlot(s.$slots,"default")]),r[3]||(r[3]=e.createTextVNode()),s.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:r[0]||(r[0]=e.withKeys(l=>s.$emit("close"),["enter"])),onClick:r[1]||(r[1]=e.withModifiers(l=>s.$emit("close"),["stop"]))},r[2]||(r[2]=[e.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):e.createCommentVNode("",!0)],2)]),_:2},[o.value?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),key:"0"}:void 0]),1024))}}),Td={class:"pl-dropdown-multi__envelope"},Md=["tabindex"],Ad={class:"pl-dropdown-multi__container"},vd={class:"pl-dropdown-multi__field"},Dd=["disabled","placeholder"],Fd={class:"pl-dropdown-multi__append"},zd={key:0},Pd={key:0,class:"required-icon"},Rd={class:"pl-dropdown-multi__open-chips-container"},Od={key:0,class:"nothing-found"},Id={key:0,class:"pl-dropdown-multi__error"},Ld={key:1,class:"pl-dropdown-multi__helper"},Hd={name:"PlDropdownMulti"},Nr=e.defineComponent({...Hd,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{default:void 0},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=N=>o("update:modelValue",N),r=e.useSlots(),l=n,i=e.ref(),a=e.ref(),c=e.useTemplateRef("overlay"),d=e.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),u=e.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),f=e.computed(()=>d.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),p=e.computed(()=>Ne(l.options??[]).filter(N=>Wn(u.value,N.value))),m=e.computed(()=>{const N=e.unref(u),v=Ne(l.options??[]);return(d.search?v.filter(C=>{const $=d.search.toLowerCase();return C.label.toLowerCase().includes($)?!0:typeof C.value=="string"?C.value.toLowerCase().includes($):C.value===d.search}):[...v]).map(C=>({...C,selected:Wn(N,C.value)}))}),g=e.computed(()=>l.options===void 0),k=e.computed(()=>g.value?!0:l.disabled),x=e.computed(()=>k.value?void 0:"0"),w=()=>{d.activeOption=pt(m.value.findIndex(N=>re(N.value,l.modelValue)),N=>N<0?0:N)},T=N=>{var C;const v=e.unref(u);s(Wn(v,N)?v.filter($=>!re($,N)):[...v,N]),d.search="",(C=i==null?void 0:i.value)==null||C.focus()},B=N=>s(e.unref(u).filter(v=>!re(v,N))),A=()=>{var N;return(N=a.value)==null?void 0:N.focus()},h=()=>d.open=!d.open,y=N=>{var C,$,E;const v=N.relatedTarget;!((C=i.value)!=null&&C.contains(v))&&!((E=($=c.value)==null?void 0:$.listRef)!=null&&E.contains(v))&&(d.search="",d.open=!1)},S=N=>{var b;const{open:v,activeOption:C}=d;if(!v){N.code==="Enter"&&(d.open=!0);return}N.code==="Escape"&&(d.open=!1,(b=i.value)==null||b.focus());const $=e.unref(m),{length:E}=$;if(!E)return;["ArrowDown","ArrowUp","Enter"].includes(N.code)&&N.preventDefault(),N.code==="Enter"&&T($[C].value);const _=N.code==="ArrowDown"?1:N.code==="ArrowUp"?-1:0;d.activeOption=Math.abs(C+_+E)%E,requestAnimationFrame(()=>{var D;return(D=c.value)==null?void 0:D.scrollIntoActive()})};return be(i),e.watch(()=>l.modelValue,()=>w(),{immediate:!0}),e.watchPostEffect(()=>{var N;d.search,d.open&&((N=c.value)==null||N.scrollIntoActive())}),(N,v)=>(e.openBlock(),e.createElementBlock("div",Td,[e.createElementVNode("div",{ref_key:"rootRef",ref:i,tabindex:x.value,class:e.normalizeClass(["pl-dropdown-multi",{open:d.open,error:N.error,disabled:k.value}]),onKeydown:S,onFocusout:y},[e.createElementVNode("div",Ad,[e.createElementVNode("div",vd,[e.withDirectives(e.createElementVNode("input",{ref_key:"input",ref:a,"onUpdate:modelValue":v[0]||(v[0]=C=>d.search=C),type:"text",tabindex:"-1",disabled:k.value,placeholder:f.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:v[1]||(v[1]=C=>d.open=!0)},null,40,Dd),[[e.vModelText,d.search]]),v[3]||(v[3]=e.createTextVNode()),d.open?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"chips-container",onClick:A},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(C,$)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:$,closeable:"",small:"",onClick:v[2]||(v[2]=e.withModifiers(E=>d.open=!0,["stop"])),onClose:E=>B(C.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label||C.value),1)]),_:2},1032,["onClose"]))),128))])),v[4]||(v[4]=e.createTextVNode()),g.value?(e.openBlock(),e.createBlock(e.unref(oe),{key:1,name:"loading"})):e.createCommentVNode("",!0),v[5]||(v[5]=e.createTextVNode()),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,class:"arrow",onClick:e.withModifiers(h,["stop"])})),v[6]||(v[6]=e.createTextVNode()),e.createElementVNode("div",Fd,[e.renderSlot(N.$slots,"append")])]),v[11]||(v[11]=e.createTextVNode()),N.label?(e.openBlock(),e.createElementBlock("label",zd,[N.required?(e.openBlock(),e.createElementBlock("i",Pd)):e.createCommentVNode("",!0),v[7]||(v[7]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(N.label),1),v[8]||(v[8]=e.createTextVNode()),e.unref(r).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(N.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),v[12]||(v[12]=e.createTextVNode()),d.open?(e.openBlock(),e.createBlock(Xn,{key:1,ref_key:"overlay",ref:c,root:i.value,class:"pl-dropdown-multi__options",gap:5,tabindex:"-1",onFocusout:y},{default:e.withCtx(()=>[e.createElementVNode("div",Rd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(C,$)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:$,closeable:"",small:"",onClose:E=>B(C.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label||C.value),1)]),_:2},1032,["onClose"]))),128))]),v[9]||(v[9]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(C,$)=>(e.openBlock(),e.createBlock(We,{key:$,option:C,"text-item":"text","is-selected":C.selected,"is-hovered":d.activeOption==$,size:"medium","use-checkbox":"",onClick:e.withModifiers(E=>T(C.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),v[10]||(v[10]=e.createTextVNode()),m.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Od,"Nothing found"))]),_:1},8,["root"])):e.createCommentVNode("",!0),v[13]||(v[13]=e.createTextVNode()),e.createVNode(Se,{class:"pl-dropdown-multi__contour"})])],42,Md),v[14]||(v[14]=e.createTextVNode()),N.error?(e.openBlock(),e.createElementBlock("div",Id,e.toDisplayString(N.error),1)):N.helper?(e.openBlock(),e.createElementBlock("div",Ld,e.toDisplayString(N.helper),1)):e.createCommentVNode("",!0)]))}}),jd=e.defineComponent({__name:"PlDropdownMultiRef",props:{modelValue:{default:()=>[]},label:{default:void 0},options:{default:void 0},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n){const t=n,o=e.computed(()=>{var s;return(s=t.options)==null?void 0:s.map(r=>({label:r.label,value:r.ref}))});return(s,r)=>(e.openBlock(),e.createBlock(Nr,e.mergeProps(t,{options:o.value,"onUpdate:modelValue":r[0]||(r[0]=l=>s.$emit("update:modelValue",l))}),null,16,["options"]))}}),Qn=e.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n){const t=n,o=e.computed(()=>t.modelValue);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{tabindex:"0",class:e.normalizeClass(["pl-checkbox-base",{checked:o.value,disabled:s.disabled}]),onClick:r[0]||(r[0]=l=>s.$emit("update:modelValue",!s.modelValue)),onKeydown:r[1]||(r[1]=e.withKeys(l=>s.$emit("update:modelValue",!s.modelValue),["enter"]))},null,34))}}),Zd={name:"PlCheckbox"},Ud=e.defineComponent({...Zd,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n){const t=n,o=e.useSlots();return(s,r)=>e.unref(o).default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pl-checkbox",{disabled:s.disabled}])},[e.createVNode(Qn,e.mergeProps(t,{"onUpdate:modelValue":r[0]||(r[0]=l=>s.$emit("update:modelValue",l))}),null,16),r[3]||(r[3]=e.createTextVNode()),e.createElementVNode("label",{onClick:r[1]||(r[1]=l=>s.$emit("update:modelValue",!s.$props.modelValue))},[e.renderSlot(s.$slots,"default")])],2)):(e.openBlock(),e.createBlock(Qn,e.mergeProps({key:1},t,{"onUpdate:modelValue":r[2]||(r[2]=l=>s.$emit("update:modelValue",l))}),null,16))}}),qd={key:0},Wd=["onClick"],Kd={name:"PlCheckboxGroup"},Yd=e.defineComponent({...Kd,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=n,r=i=>s.modelValue.includes(i),l=i=>{const a=s.modelValue??[];o("update:modelValue",r(i)?a.filter(c=>c!==i):[...a,i])};return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-checkbox-group",{disabled:i.disabled}])},[i.label?(e.openBlock(),e.createElementBlock("label",qd,e.toDisplayString(i.label),1)):e.createCommentVNode("",!0),a[1]||(a[1]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options.map(c=>({label:"label"in c?c.label:c.text,value:c.value})),(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d},[e.createVNode(Qn,{disabled:i.disabled,label:c.label,"model-value":r(c.value),"onUpdate:modelValue":()=>l(c.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),a[0]||(a[0]=e.createTextVNode()),e.createElementVNode("label",{onClick:e.withModifiers(()=>l(c.value),["stop"])},e.toDisplayString(c.label),9,Wd)]))),128))],2))}}),Xd={component:"_component_tupwt_1"},Gd={};function Jd(n,t){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.$style.component)},t[0]||(t[0]=[e.createElementVNode("div",null,null,-1)]),2)}const Sr=K(Gd,[["render",Jd],["__cssModules",{$style:Xd}]]),Qd={key:1,class:"pl-dialog-modal__title"},eu={inheritAttrs:!1},Tr=e.defineComponent({...eu,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean},size:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.ref(),i=e.computed(()=>{const{width:d,height:u,minHeight:f,maxHeight:p,size:m}=r;return m==="small"?{width:"448px",height:"440px",minHeight:"auto",maxHeight:"auto"}:m==="medium"?{width:"720px",height:"720px",minHeight:"auto",maxHeight:"auto"}:m==="large"?{width:"1080px",height:"880px",minHeight:"auto",maxHeight:"auto"}:{width:d,height:u,minHeight:f,maxHeight:p}}),a=e.useAttrs();function c(d){l.value&&r.closeOnOutsideClick&&document.contains(d.target)&&!l.value.contains(d.target)&&s("update:modelValue",!1)}return q(document.body,"keyup",d=>{r.modelValue&&d.code==="Escape"&&s("update:modelValue",!1)}),(d,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog"},{default:e.withCtx(()=>[d.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:c},[e.createElementVNode("div",e.mergeProps(e.unref(a),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":e.unref(o).title,"has-content":e.unref(o).default}],style:i.value}),[d.closable?(e.openBlock(),e.createBlock(Sr,{key:0,class:"close-modal-btn",onClick:u[0]||(u[0]=e.withModifiers(f=>s("update:modelValue",!1),["stop"]))})):e.createCommentVNode("",!0),u[1]||(u[1]=e.createTextVNode()),e.unref(o).title?(e.openBlock(),e.createElementBlock("div",Qd,[e.renderSlot(d.$slots,"title")])):e.createCommentVNode("",!0),u[2]||(u[2]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":d.noContentGutters,"no-top-content-gutter":d.noTopContentGutter}])},[e.renderSlot(d.$slots,"default")],2),u[3]||(u[3]=e.createTextVNode()),e.unref(o).actions?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":d.actionsHasTopBorder}])},[e.renderSlot(d.$slots,"actions")],2)):e.createCommentVNode("",!0)],16)])):e.createCommentVNode("",!0)]),_:3})]))}}),tu=e.defineComponent({__name:"TransitionSlidePanel",setup(n){function t(){window.dispatchEvent(new CustomEvent("adjust"))}function o(){window.dispatchEvent(new CustomEvent("adjust"))}return(s,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-panel",onAfterEnter:t,onAfterLeave:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}))}}),nu={key:0,class:"pl-slide-modal__title"},ou={class:"pl-slide-modal__content"},ru={key:1,class:"pl-slide-modal__actions"},su={name:"PlSlideModal",inheritAttrs:!1},lu=e.defineComponent({...su,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.ref(),i=e.useAttrs();return Xt(l,()=>{r.modelValue&&r.closeOnOutsideClick&&s("update:modelValue",!1)}),q(document,"keydown",a=>{a.key==="Escape"&&s("update:modelValue",!1)}),(a,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(tu,null,{default:e.withCtx(()=>[a.modelValue?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:a.width}},e.unref(i),{class:["pl-slide-modal",{"has-title":e.unref(o).title,"has-actions":e.unref(o).actions}],onKeyup:c[1]||(c[1]=e.withKeys(d=>s("update:modelValue",!1),["esc"]))}),[e.createElementVNode("div",{class:"close-dialog-btn",onClick:c[0]||(c[0]=d=>s("update:modelValue",!1))}),c[3]||(c[3]=e.createTextVNode()),e.unref(o).title?(e.openBlock(),e.createElementBlock("div",nu,[e.renderSlot(a.$slots,"title")])):e.createCommentVNode("",!0),c[4]||(c[4]=e.createTextVNode()),e.createElementVNode("div",ou,[e.renderSlot(a.$slots,"default")]),c[5]||(c[5]=e.createTextVNode()),e.unref(o).actions?(e.openBlock(),e.createElementBlock("div",ru,[e.renderSlot(a.$slots,"actions")])):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)]),_:3}),c[6]||(c[6]=e.createTextVNode()),a.modelValue&&a.shadow?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:c[2]||(c[2]=e.withKeys(d=>s("update:modelValue",!1),["esc"]))},null,32)):e.createCommentVNode("",!0)]))}}),iu={key:0,class:"label"},au={name:"PlToggleSwitch"},cu=e.defineComponent({...au,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{tabindex:"0",class:e.normalizeClass(["ui-toggle-switch",{active:t.modelValue}]),onClick:o[0]||(o[0]=s=>t.$emit("update:modelValue",!t.modelValue)),onKeydown:o[1]||(o[1]=e.withKeys(s=>t.$emit("update:modelValue",!t.modelValue),["enter"]))},[o[2]||(o[2]=e.createElementVNode("div",{class:"ui-toggle-switch__body"},[e.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),o[3]||(o[3]=e.createTextVNode()),t.label?(e.openBlock(),e.createElementBlock("span",iu,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0)],34))}});function Mr(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function du(n){return typeof n=="function"?n():e.unref(n)}const uu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function fu(n,t,o={}){const{immediate:s=!0}=o,r=e.ref(!1);let l=null;function i(){l&&(clearTimeout(l),l=null)}function a(){r.value=!1,i()}function c(...d){i(),r.value=!0,l=setTimeout(()=>{r.value=!1,l=null,n(...d)},du(t))}return s&&(r.value=!0,uu&&c()),Mr(a),{isPending:e.readonly(r),start:c,stop:a}}function pu(n,t,o){return e.watch(n,(r,l,i)=>{r&&t(r,l,i)},{...o,once:!1})}function mu(n,t,o){const{start:s}=fu(l,t,{immediate:!1}),r=e.ref(!1);async function l(){r.value&&(await n(),s())}function i(){r.value||(r.value=!0,l())}function a(){r.value=!1}return o!=null&&o.immediate&&i(),Mr(a),{isActive:r,pause:a,resume:i}}const hu="[==PROGRESS==]";function gu(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yu(n){const t=e.ref(),o=e.reactive({errorCount:0});async function s(){var c;let i=t.value;if(i===void 0)return;const a=n.mockPlatforma??window.platforma;if(!a){console.warn("Platforma API is not available");return}for(;;){const d=await a.logDriver.readText(i.logHandle,100,i.lastOffset);if(i.error=void 0,o.errorCount=0,d.shouldUpdateHandle||i.logHandle!==((c=t.value)==null?void 0:c.logHandle))return;const u=n.progressPrefix??hu,f=new TextDecoder().decode(d.data).replace(new RegExp(`${gu(u)}`,"g"),"");if(i=Object.assign(i,{lines:i.lines+f,lastOffset:d.newOffset,finished:!d.live}),d.newOffset>=d.size)break}}const l=mu(()=>s().catch(i=>{t.value&&(o.errorCount++,o.errorCount>(n.maxRetries??3)?t.value.error=i:console.warn("skip error:",i,"retry..."))}),1500,{immediate:!1});return pu(()=>{var i;return(i=t==null?void 0:t.value)==null?void 0:i.finished},()=>l.pause()),e.watch(()=>n.logHandle,i=>{var a;i===void 0?(t.value=void 0,l.pause()):i!==((a=t.value)==null?void 0:a.logHandle)&&(t.value={logHandle:i,lastOffset:0,lines:"",finished:!1,error:void 0},o.errorCount=0,l.resume())},{immediate:!0}),t}const _u={key:0},ku={class:"pl-log-view__copy"},wu={key:1,class:"pl-log-view__error"},bu={name:"PlLogView"},xu=e.defineComponent({...bu,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(n){const t=g=>{if(g&&g.ok===!1)return g.errors.join(`
|
|
9
|
+
`)},o=n,s=yu(o),r=e.ref(!0),l=e.ref(),i=e.ref(),a=e.computed(()=>{var g;return((g=s.value)==null?void 0:g.error)??o.error??t(o.output)}),c=e.computed(()=>{var g;return((g=s.value)==null?void 0:g.lines)??o.value??bl(o.output)}),d=e.ref(!1);be(i);const u=e.computed(()=>d.value?"clipboard-copied":"clipboard"),f=()=>{d.value=!0,setTimeout(()=>{d.value=!1},1200),c.value&&typeof c.value=="string"&&navigator.clipboard.writeText(c.value)},p=()=>{$e(l.value,g=>{r.value&&g.scrollTo(g.scrollLeft,g.scrollHeight)})};e.watch(c,()=>{requestAnimationFrame(()=>{p()})},{immediate:!0});const m=g=>{const k=g.target;r.value=k.scrollTop+20>=k.scrollHeight-k.offsetHeight};return(g,k)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:i,class:e.normalizeClass(["pl-log-view",{"has-error":a.value}])},[g.label?(e.openBlock(),e.createElementBlock("label",_u,e.toDisplayString(g.label),1)):e.createCommentVNode("",!0),k[1]||(k[1]=e.createTextVNode()),e.createVNode(Se,{class:"pl-log-view__contour"}),k[2]||(k[2]=e.createTextVNode()),e.createElementVNode("div",ku,[e.createVNode(e.unref(J),{"close-delay":800,position:"top"},{tooltip:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value?"copied":"copy"),1)]),default:e.withCtx(()=>[e.createVNode(e.unref(oe),{title:"Copy content",name:u.value,onClick:f},null,8,["name"]),k[0]||(k[0]=e.createTextVNode())]),_:1})]),k[3]||(k[3]=e.createTextVNode()),a.value?(e.openBlock(),e.createElementBlock("div",wu,e.toDisplayString(a.value),1)):(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:m},e.toDisplayString(c.value),545))],2))}}),Ye={component:"_component_1ukal_1",tab:"_tab_1ukal_14",disabled:"_disabled_1ukal_27",active:"_active_1ukal_56",topLine:"_topLine_1ukal_69"},Vu=e.defineComponent({__name:"Tab",props:{option:{}},setup(n){const t=e.ref(),o=e.reactive({isOverflown:!1});return e.onMounted(()=>{const s=e.unref(t);if(!s)return;const r=s.$el.querySelector("span");r&&requestAnimationFrame(()=>{r.offsetWidth<r.scrollWidth&&(o.isOverflown=!0)})}),(s,r)=>(e.openBlock(),e.createBlock(e.unref(J),{ref_key:"rootRef",ref:t,element:"div",position:"top",hide:!o.isOverflown,"close-delay":300,"data-is-overflown":o.isOverflown?"true":"false"},{tooltip:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.option.label),1)]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default"),r[0]||(r[0]=e.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),Bu={name:"PlTabs"},Cu=e.defineComponent({...Bu,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=t,s=r=>o("update:modelValue",r);return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(Ye).component,{[e.unref(Ye).disabled]:r.disabled,[e.unref(Ye).topLine]:r.topLine}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(i,a)=>(e.openBlock(),e.createBlock(Vu,{key:a,tabindex:r.modelValue===i.value||r.disabled||i.disabled?void 0:0,option:i,class:e.normalizeClass([{[e.unref(Ye).active]:r.modelValue===i.value,[e.unref(Ye).disabled]:i.disabled},e.unref(Ye).tab]),style:e.normalizeStyle({"--pl-tabs-item-max-width":i.maxWidth??r.maxTabWidth}),onKeydown:e.withKeys(c=>s(i.value),["enter"]),onClick:c=>s(i.value)},{default:e.withCtx(()=>[e.renderSlot(r.$slots,i.value,{option:i},()=>[e.createElementVNode("span",null,e.toDisplayString(i.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),Ar=K(e.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pl-section-separator",{[t.$style.compact]:t.compact}])},[e.createElementVNode("div",{class:e.normalizeClass(t.$style.content)},[e.renderSlot(t.$slots,"default")],2)],2))}}),[["__cssModules",{$style:{compact:"_compact_rhd5u_16",content:"_content_rhd5u_20"}}]]),$u=e.defineComponent({__name:"PlAccordion",props:e.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=n;return e.provide("pl-accordion-model",t),e.provide("pl-accordion-props",e.toRef(o)),(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(s.$slots,"header"),r[0]||(r[0]=e.createTextVNode()),e.renderSlot(s.$slots,"default")],64))}}),Eu=e.defineComponent({__name:"ExpandTransition",setup(n){const t=s=>{s.style.setProperty("--component-height",s.scrollHeight+"px"),s.classList.add("expand-collapse-fix")},o=s=>{s.style.removeProperty("--component-height"),s.classList.remove("expand-collapse-fix")};return(s,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"expand-collapse",onEnter:t,onLeave:t,onAfterEnter:o,onAfterLeave:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3}))}}),Nu=K(e.defineComponent({__name:"PlAccordionSection",props:e.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=e.inject("pl-accordion-model"),o=e.inject("pl-accordion-props"),s=e.useModel(n,"modelValue"),r=Yo(),l=e.computed(()=>!o||o.value.multiple),i=e.computed({get(){return l.value?s.value:t?t.value===r:s.value},set(a){l.value?s.value=a:t&&(t.value=t.value===r?"":r)}});return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(Ar),{class:e.normalizeClass(a.$style.separator),compact:a.compact,onClick:c[0]||(c[0]=d=>i.value=!i.value)},{default:e.withCtx(()=>[e.createVNode(e.unref(Ke),{name:"chevron-right",class:e.normalizeClass([{[a.$style.down]:i.value},a.$style.chevron])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(a.label),1)]),_:1},8,["class","compact"]),c[1]||(c[1]=e.createTextVNode()),e.createVNode(Eu,null,{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.$style.content)},[e.renderSlot(a.$slots,"default")],2)):e.createCommentVNode("",!0)]),_:3})],64))}}),[["__cssModules",{$style:{content:"_content_jmjfk_2",separator:"_separator_jmjfk_14",chevron:"_chevron_jmjfk_19",down:"_down_jmjfk_23"}}]]),Su=e.defineComponent({__name:"PlStatusTag",props:{type:{}},setup(n){const t=e.reactive({typeToText:{OK:"OK",WARN:"WARN",ALERT:"ALERT",HOLD:"HOLD"}});return(o,s)=>o.type?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},o.$attrs,{class:[{[o.type.toLocaleLowerCase()]:!0},"pl-status-tag text-caps11 d-flex align-center"]}),[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.typeToText[o.type]),1)])],16)):e.createCommentVNode("",!0)}}),Tu={class:"pl-loader-circular"},Mu={class:"pl-loader-circular__svg",viewBox:"25 25 50 50"},Au=["stroke"],vu=e.defineComponent({__name:"PlLoaderCircular",props:{size:{default:"16"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",Tu,[e.createElementVNode("div",{style:e.normalizeStyle({height:`${t.size}px`,width:`${t.size}px`,"--main-color":`${+t.size<48?"var(--ic-01)":"var(--ic-02)"}`}),class:"pl-circle-loader__wrapper"},[(e.openBlock(),e.createElementBlock("svg",Mu,[e.createElementVNode("circle",{class:"pl-loader-circular__svg-circle",cx:"50",cy:"50",r:"20",fill:"none",stroke:`${+t.size<48?"var(--ic-01)":"var(--ic-02)"}`,"stroke-width":"2"},null,8,Au)]))],4)]))}}),Du={key:0,class:"progress-cell__infinity-loader"},Fu={class:"progress-cell__body"},zu={class:"progress-cell__stage text-s"},Pu={class:"progress-cell__percentage text-s d-flex align-center justify-end"},Ru=e.defineComponent({__name:"PlProgressCell",props:{stage:{default:"not_started"},step:{default:""},progressString:{default:""},progress:{default:void 0},error:{default:""}},setup(n){const t=n,o=e.computed(()=>t.stage!=="not_started"),s=e.computed(()=>t.stage==="done"?100:Math.min(100,t.progress||0)),r=e.computed(()=>t.progress===void 0&&t.stage!=="done"&&t.stage!=="not_started"&&!t.error);return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"progress-cell":!0,"progress-cell__white-bg":o.value,error:l.error,"not-started":t.stage==="not_started"})},[r.value?(e.openBlock(),e.createElementBlock("div",Du,i[0]||(i[0]=[e.createElementVNode("div",{class:"progress-cell__infinity-gradient"},null,-1)]))):e.createCommentVNode("",!0),i[3]||(i[3]=e.createTextVNode()),!r.value&&!l.error?(e.openBlock(),e.createElementBlock("div",{key:1,class:"progress-cell__indicator",style:e.normalizeStyle({width:s.value+"%"})},null,4)):e.createCommentVNode("",!0),i[4]||(i[4]=e.createTextVNode()),e.createElementVNode("div",Fu,[e.createElementVNode("div",zu,e.toDisplayString(l.error?l.error:l.step),1),i[2]||(i[2]=e.createTextVNode()),e.createElementVNode("div",Pu,[l.error?(e.openBlock(),e.createBlock(oe,{key:0,name:"error"})):e.createCommentVNode("",!0),i[1]||(i[1]=e.createTextVNode()),l.error?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.progressString),1)],64))])])],2))}}),Y={component:"_component_1ietr_1",local:"_local_1ietr_1",supported:"_supported_1ietr_26",remote:"_remote_1ietr_32",search:"_search_1ietr_40","ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:"_selected_1ietr_72",breadcrumbs:"_breadcrumbs_1ietr_86","ls-error":"_ls-error_1ietr_108",cat:"_cat_1ietr_116",message:"_message_1ietr_122","ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:"_isFile_1ietr_197",isDir:"_isDir_1ietr_201",canBeSelected:"_canBeSelected_1ietr_207","ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:"_spin_1ietr_1"},Ou=K(e.defineComponent({__name:"Shortcuts",setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(J),{class:"info",position:"southwest","max-width":"420px"},{tooltip:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.$style.title)},"Shortcuts",2),o[2]||(o[2]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass([t.$style.row,t.$style.head])},o[0]||(o[0]=[e.createElementVNode("div",null,null,-1),e.createTextVNode(),e.createElementVNode("div",null,"MacOS",-1),e.createTextVNode(),e.createElementVNode("div",null,"Windows/Linux",-1)]),2),o[3]||(o[3]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass([t.$style.row,t.$style.body])},o[1]||(o[1]=[e.createElementVNode("div",null,"Single File",-1),e.createTextVNode(),e.createElementVNode("div",null,"Click the file",-1),e.createTextVNode(),e.createElementVNode("div",null,"Click the file",-1),e.createTextVNode(),e.createElementVNode("div",null,"Adjacent multiple files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Shift, click first and last files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Shift, click first and last files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Non-adjacent multiple files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Command (⌘), click each file",-1),e.createTextVNode(),e.createElementVNode("div",null,"Hold Ctrl, click each file",-1),e.createTextVNode(),e.createElementVNode("div",null,"All files",-1),e.createTextVNode(),e.createElementVNode("div",null,"Press Command (⌘) + A",-1),e.createTextVNode(),e.createElementVNode("div",null,"Press Ctrl + A",-1)]),2)]),_:1}))}}),[["__cssModules",{$style:{title:"_title_14dct_2",row:"_row_14dct_10",head:"_head_14dct_30",body:"_body_14dct_58"}}]]),vr=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function Iu(n){return e.computed(()=>{let t=n.items;if(n.showHiddenItems||(t=t.filter(o=>!o.name.startsWith("."))),n.search){const o=n.search.toLocaleLowerCase();t=t.filter(s=>s.name.toLocaleLowerCase().includes(o))}return t})}const Dr={mounted:n=>{if(n.clientWidth<n.scrollWidth){const t=n.innerText;n.innerText=t.substring(0,57)+"..."+t.substring(t.length-10)}}};function Fr(n){return n?n.map(t=>"."+Bl(t,["."])):void 0}function Lu(n){const t=n.split("/");t[0]!==""&&t.unshift("");const o=[];for(let s=0;s<t.length;s++)o.push({index:s,name:s===0?"Root":t[s],path:t.slice(0,s+1).filter(r=>r!=="").join("/")});return o}const Hu=["title","onClick"],ju={key:0,class:"ls-loader"},Zu=["onClick"],Uu=["title"],qu=["onClick"],Wu=["title"],Ku=e.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(n,{expose:t}){const o=h=>h.ctrlKey||h.metaKey,s=n,r=e.reactive(vr()),l=()=>{r.search="",r.error="",r.lastSelected=void 0},i=e.computed(()=>Fr(s.extensions)),a=Iu(r),c=e.computed(()=>{var h;return{modelValue:s.modelValue,dirPath:r.dirPath,storageHandle:(h=r.storageEntry)==null?void 0:h.handle}}),d=(h,y)=>{window.platforma&&r.currentLoadingPath!==y&&(r.currentLoadingPath=y,window.platforma.lsDriver.listFiles(h,y).then(S=>{y===r.dirPath&&(r.items=we(S).entries.map(N=>({path:N.fullPath,name:N.name,isDir:N.type==="dir",canBeSelected:N.type==="file"&&(!i.value||i.value.some(v=>N.fullPath.endsWith(v))),handle:N.type==="file"?N.handle:void 0,selected:!1})).sort((N,v)=>N.isDir&&!v.isDir?-1:!N.isDir&&v.isDir?1:N.name.localeCompare(v.name)).map((N,v)=>({id:v,...N})),r.lastSelected=void 0)}).catch(S=>r.error=String(S)).finally(()=>{r.currentLoadingPath=void 0}))},u=()=>{l();const{storageHandle:h,dirPath:y,modelValue:S}=c.value;h&&S&&d(h,y)},f=e.computed(()=>Lu(r.dirPath)),p=e.computed(()=>r.items.filter(h=>h.canBeSelected&&h.selected&&!h.isDir)),m=e.computed(()=>{var h;return p.value.length>0&&((h=r.storageEntry)==null?void 0:h.handle)}),g=()=>{var h;return{storageHandle:we((h=r.storageEntry)==null?void 0:h.handle),files:p.value.map(y=>y.handle)}},k=h=>{r.dirPath=h},x=(h,y)=>{const{shiftKey:S}=h,N=o(h),{lastSelected:v}=r;if(h.preventDefault(),y.canBeSelected){if(s.multi||r.items.forEach(C=>C.selected=!1),y.selected=!y.selected,!s.multi)return;!N&&!S&&r.items.forEach(C=>{C.id!==y.id&&(C.selected=!1)}),S&&v!==void 0&&r.items.forEach(C=>{_l(C.id,v,y.id)&&(C.selected=!0)}),y.selected&&(r.lastSelected=y.id)}},w=h=>{h&&!s.multi||r.items.filter(y=>y.canBeSelected).forEach(y=>{y.selected=h})},T=()=>w(!0),B=()=>w(!1),A=()=>{if(l(),B(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(h=>{h=h.filter(y=>y.name!=="local"&&!y.name.startsWith("local_disk_")),r.storageOptions=h.map(y=>({text:y.name,value:y})),s.autoSelectStorage&&$e(h[0],y=>{r.storageEntry=y})}).catch(h=>r.error=String(h))};return e.watch(e.toRef(r,"storageEntry"),h=>{l(),r.dirPath=(h==null?void 0:h.initialFullPath)??""},{immediate:!0}),e.watch([()=>r.dirPath,()=>r.storageEntry],()=>{u()}),e.watch(()=>s.modelValue,h=>{h?A():Object.assign(r,vr())},{immediate:!0}),q(document,"keydown",h=>{if(!s.modelValue||h.target!==document.body)return;const y=o(h);y&&h.code==="KeyA"&&(h.preventDefault(),T()),y&&h.shiftKey&&h.code==="Period"&&(h.preventDefault(),r.showHiddenItems=!r.showHiddenItems),h.code==="Enter"&&s.submit()}),t({isReady:m,getFilesToImport:g}),e.onMounted(A),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Y).remote),onClick:e.withModifiers(B,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).search)},[e.createElementVNode("div",null,[e.createVNode(e.unref(Gn),{modelValue:r.storageEntry,"onUpdate:modelValue":y[0]||(y[0]=S=>r.storageEntry=S),label:"Select storage",options:r.storageOptions},null,8,["modelValue","options"])]),y[2]||(y[2]=e.createTextVNode()),e.createElementVNode("div",null,[e.createVNode(e.unref(Br),{modelValue:r.search,"onUpdate:modelValue":y[1]||(y[1]=S=>r.search=S),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),y[12]||(y[12]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y)["ls-container"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y)["ls-head"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).breadcrumbs)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(S,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:N},[e.createElementVNode("div",{title:S.path,onClick:v=>k(S.path)},e.toDisplayString(S.name),9,Hu),y[3]||(y[3]=e.createTextVNode()),S.index!==f.value.length-1?(e.openBlock(),e.createBlock(e.unref(Pe),{key:0,name:"chevron-right"})):e.createCommentVNode("",!0)],64))),128))],2),y[5]||(y[5]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).selected)},[e.createElementVNode("span",null,"Selected: "+e.toDisplayString(p.value.length),1),y[4]||(y[4]=e.createTextVNode()),e.createVNode(Ou)],2)],2),y[11]||(y[11]=e.createTextVNode()),r.currentLoadingPath!==void 0?(e.openBlock(),e.createElementBlock("div",ju,y[6]||(y[6]=[e.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):r.storageEntry?r.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(Y)["ls-error"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).cat)},null,2),y[8]||(y[8]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).message)},e.toDisplayString(r.error),3)],2)):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(Y)["ls-body"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),S=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:S.id},[S.isDir?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(Y).isDir),onClick:N=>k(S.path)},[e.createVNode(e.unref(Pe),{name:"chevron-right"}),y[9]||(y[9]=e.createTextVNode()),e.withDirectives((e.openBlock(),e.createElementBlock("span",{title:S.name},[e.createTextVNode(e.toDisplayString(S.name),1)],8,Uu)),[[e.unref(Dr)]])],10,Zu)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({[e.unref(Y).canBeSelected]:S.canBeSelected,[e.unref(Y).selected]:S.selected}),onClick:e.withModifiers(N=>x(N,S),["stop"])},[e.createVNode(e.unref(Ke),{name:"box",class:e.normalizeClass(e.unref(Y).isFile)},null,8,["class"]),y[10]||(y[10]=e.createTextVNode()),e.withDirectives((e.openBlock(),e.createElementBlock("span",{title:S.name},[e.createTextVNode(e.toDisplayString(S.name),1)],8,Wu)),[[e.unref(Dr)]])],10,qu))],64))),128))],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(Y)["ls-empty"])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).cat)},null,2),y[7]||(y[7]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(e.unref(Y).message)},"Select storage to preview",2)],2))],2)],2))}}),Yu={key:1,class:"alert-error"},Xu=e.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(n){const t=n,o=e.reactive({error:void 0}),s=e.computed(()=>t.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),r=async i=>{var u,f,p;const a=(f=(u=window.platforma)==null?void 0:u.lsDriver)==null?void 0:f.fileToImportHandle;if(!a)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const c=Fr(t.extensions),d=await Promise.all([...((p=i.dataTransfer)==null?void 0:p.files)??[]].filter(m=>!!m).filter(m=>c?c.some(g=>m.name.endsWith(g)):!0).map(m=>a(m)));d.length&&t.importFiles({files:d})},l=async()=>{var a,c;const i=t.extensions?[{name:"All Files",extensions:t.extensions}]:[];t.multi?(a=window.platforma)==null||a.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:i}).then(({files:d})=>{d&&t.importFiles({files:d})}).catch(d=>o.error=d):(c=window.platforma)==null||c.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:i}).then(({file:d})=>{d&&t.importFiles({files:[d]})}).catch(d=>o.error=d)};return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Y).local),onDrop:r,onDragover:a[0]||(a[0]=e.withModifiers(()=>{},["prevent"])),onClick:l},[e.createVNode(e.unref(qn),{name:"cloud-upload"}),a[1]||(a[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(s.value),1),a[2]||(a[2]=e.createTextVNode()),i.extensions?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(Y).supported)},"Supported formats: "+e.toDisplayString(i.extensions.join(", ")),3)):e.createCommentVNode("",!0),a[3]||(a[3]=e.createTextVNode()),o.error?(e.openBlock(),e.createElementBlock("span",Yu,e.toDisplayString(o.error),1)):e.createCommentVNode("",!0)],34))}}),Gu={style:{margin:"0 24px"}},zr=e.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(n,{emit:t}){const o=t,s=n,r=e.ref("local"),l=e.computed(()=>s.multi?"Select Files to Import":"Select File to Import"),i=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],a=()=>o("update:modelValue",!1),c=e.useTemplateRef("remote"),d=()=>{var f,p;(f=c.value)!=null&&f.isReady&&(o("import:files",we((p=c.value)==null?void 0:p.getFilesToImport())),a())},u=f=>{o("import:files",f),a()};return(f,p)=>(e.openBlock(),e.createBlock(e.unref(Tr),{"no-content-gutters":!0,"close-on-outside-click":f.closeOnOutsideClick,class:e.normalizeClass(["pl-dialog-modal",e.unref(Y).component]),"model-value":f.modelValue,width:"688px",height:"720px","onUpdate:modelValue":a},e.createSlots({title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.title??l.value),1)]),default:e.withCtx(()=>[p[4]||(p[4]=e.createTextVNode()),e.createElementVNode("div",Gu,[e.createVNode(e.unref(_r),{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=m=>r.value=m),options:i},null,8,["modelValue"])]),p[5]||(p[5]=e.createTextVNode()),r.value==="remote"?(e.openBlock(),e.createBlock(Ku,e.mergeProps({key:0,ref:"remote"},f.$props,{submit:d}),null,16)):e.createCommentVNode("",!0),p[6]||(p[6]=e.createTextVNode()),r.value==="local"?(e.openBlock(),e.createBlock(Xu,e.mergeProps({key:1,"import-files":u},f.$props),null,16)):e.createCommentVNode("",!0),p[7]||(p[7]=e.createTextVNode())]),_:2},[r.value==="remote"?{name:"actions",fn:e.withCtx(()=>{var m;return[e.createVNode(e.unref(gr),{style:{"min-width":"160px"},disabled:!((m=e.unref(c))!=null&&m.isReady),onClick:e.withModifiers(d,["stop"])},{default:e.withCtx(()=>p[1]||(p[1]=[e.createTextVNode("Import")])),_:1},8,["disabled"]),p[3]||(p[3]=e.createTextVNode()),e.createVNode(e.unref(Ln),{"justify-center":!1,onClick:e.withModifiers(a,["stop"])},{default:e.withCtx(()=>p[2]||(p[2]=[e.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var U;(function(n){n.assertEqual=r=>r;function t(r){}n.assertIs=t;function o(r){throw new Error}n.assertNever=o,n.arrayToEnum=r=>{const l={};for(const i of r)l[i]=i;return l},n.getValidEnumValues=r=>{const l=n.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),i={};for(const a of l)i[a]=r[a];return n.objectValues(i)},n.objectValues=r=>n.objectKeys(r).map(function(l){return r[l]}),n.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const l=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&l.push(i);return l},n.find=(r,l)=>{for(const i of r)if(l(i))return i},n.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function s(r,l=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(l)}n.joinValues=s,n.jsonStringifyReplacer=(r,l)=>typeof l=="bigint"?l.toString():l})(U||(U={}));var eo;(function(n){n.mergeShapes=(t,o)=>({...t,...o})})(eo||(eo={}));const P=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Te=n=>{switch(typeof n){case"undefined":return P.undefined;case"string":return P.string;case"number":return isNaN(n)?P.nan:P.number;case"boolean":return P.boolean;case"function":return P.function;case"bigint":return P.bigint;case"symbol":return P.symbol;case"object":return Array.isArray(n)?P.array:n===null?P.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?P.promise:typeof Map<"u"&&n instanceof Map?P.map:typeof Set<"u"&&n instanceof Set?P.set:typeof Date<"u"&&n instanceof Date?P.date:P.object;default:return P.unknown}},M=U.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ju=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class ie extends Error{constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const o=t||function(l){return l.message},s={_errors:[]},r=l=>{for(const i of l.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(o(i));else{let a=s,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(o(i))):a[d]=a[d]||{_errors:[]},a=a[d],c++}}};return r(this),s}static assert(t){if(!(t instanceof ie))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=o=>o.message){const o={},s=[];for(const r of this.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):s.push(t(r));return{formErrors:s,fieldErrors:o}}get formErrors(){return this.flatten()}}ie.create=n=>new ie(n);const Xe=(n,t)=>{let o;switch(n.code){case M.invalid_type:n.received===P.undefined?o="Required":o=`Expected ${n.expected}, received ${n.received}`;break;case M.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(n.expected,U.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:o=`Unrecognized key(s) in object: ${U.joinValues(n.keys,", ")}`;break;case M.invalid_union:o="Invalid input";break;case M.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${U.joinValues(n.options)}`;break;case M.invalid_enum_value:o=`Invalid enum value. Expected ${U.joinValues(n.options)}, received '${n.received}'`;break;case M.invalid_arguments:o="Invalid function arguments";break;case M.invalid_return_type:o="Invalid function return type";break;case M.invalid_date:o="Invalid date";break;case M.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(o=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?o=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?o=`Invalid input: must end with "${n.validation.endsWith}"`:U.assertNever(n.validation):n.validation!=="regex"?o=`Invalid ${n.validation}`:o="Invalid";break;case M.too_small:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:o="Invalid input";break;case M.too_big:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?o=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:o="Invalid input";break;case M.custom:o="Invalid input";break;case M.invalid_intersection_types:o="Intersection results could not be merged";break;case M.not_multiple_of:o=`Number must be a multiple of ${n.multipleOf}`;break;case M.not_finite:o="Number must be finite";break;default:o=t.defaultError,U.assertNever(n)}return{message:o}};let Pr=Xe;function Qu(n){Pr=n}function Jt(){return Pr}const Qt=n=>{const{data:t,path:o,errorMaps:s,issueData:r}=n,l=[...o,...r.path||[]],i={...r,path:l};if(r.message!==void 0)return{...r,path:l,message:r.message};let a="";const c=s.filter(d=>!!d).slice().reverse();for(const d of c)a=d(i,{data:t,defaultError:a}).message;return{...r,path:l,message:a}},ef=[];function z(n,t){const o=Jt(),s=Qt({issueData:t,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o,o===Xe?void 0:Xe].filter(r=>!!r)});n.common.issues.push(s)}class Q{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,o){const s=[];for(const r of o){if(r.status==="aborted")return I;r.status==="dirty"&&t.dirty(),s.push(r.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,o){const s=[];for(const r of o){const l=await r.key,i=await r.value;s.push({key:l,value:i})}return Q.mergeObjectSync(t,s)}static mergeObjectSync(t,o){const s={};for(const r of o){const{key:l,value:i}=r;if(l.status==="aborted"||i.status==="aborted")return I;l.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(s[l.value]=i.value)}return{status:t.value,value:s}}}const I=Object.freeze({status:"aborted"}),Ge=n=>({status:"dirty",value:n}),te=n=>({status:"valid",value:n}),to=n=>n.status==="aborted",no=n=>n.status==="dirty",mt=n=>n.status==="valid",ht=n=>typeof Promise<"u"&&n instanceof Promise;function en(n,t,o,s){if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(n)}function Rr(n,t,o,s,r){if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(n,o),o}typeof SuppressedError=="function"&&SuppressedError;var R;(function(n){n.errToObj=t=>typeof t=="string"?{message:t}:t||{},n.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(R||(R={}));var gt,yt;class he{constructor(t,o,s,r){this._cachedPath=[],this.parent=t,this.data=o,this._path=s,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Or=(n,t)=>{if(mt(t))return{success:!0,data:t.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new ie(n.common.issues);return this._error=o,this._error}}};function L(n){if(!n)return{};const{errorMap:t,invalid_type_error:o,required_error:s,description:r}=n;if(t&&(o||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(i,a)=>{var c,d;const{message:u}=n;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(c=u??s)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(d=u??o)!==null&&d!==void 0?d:a.defaultError}},description:r}}class j{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Te(t.data)}_getOrReturnCtx(t,o){return o||{common:t.parent.common,data:t.data,parsedType:Te(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Q,ctx:{common:t.parent.common,data:t.data,parsedType:Te(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const o=this._parse(t);if(ht(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(t){const o=this._parse(t);return Promise.resolve(o)}parse(t,o){const s=this.safeParse(t,o);if(s.success)return s.data;throw s.error}safeParse(t,o){var s;const r={common:{issues:[],async:(s=o==null?void 0:o.async)!==null&&s!==void 0?s:!1,contextualErrorMap:o==null?void 0:o.errorMap},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Te(t)},l=this._parseSync({data:t,path:r.path,parent:r});return Or(r,l)}async parseAsync(t,o){const s=await this.safeParseAsync(t,o);if(s.success)return s.data;throw s.error}async safeParseAsync(t,o){const s={common:{issues:[],contextualErrorMap:o==null?void 0:o.errorMap,async:!0},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Te(t)},r=this._parse({data:t,path:s.path,parent:s}),l=await(ht(r)?r:Promise.resolve(r));return Or(s,l)}refine(t,o){const s=r=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(r):o;return this._refinement((r,l)=>{const i=t(r),a=()=>l.addIssue({code:M.custom,...s(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,o){return this._refinement((s,r)=>t(s)?!0:(r.addIssue(typeof o=="function"?o(s,r):o),!1))}_refinement(t){return new de({schema:this,typeName:O.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ye.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ce.create(this,this._def)}promise(){return tt.create(this,this._def)}or(t){return bt.create([this,t],this._def)}and(t){return xt.create(this,t,this._def)}transform(t){return new de({...L(this._def),schema:this,typeName:O.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const o=typeof t=="function"?t:()=>t;return new Et({...L(this._def),innerType:this,defaultValue:o,typeName:O.ZodDefault})}brand(){return new so({typeName:O.ZodBranded,type:this,...L(this._def)})}catch(t){const o=typeof t=="function"?t:()=>t;return new Nt({...L(this._def),innerType:this,catchValue:o,typeName:O.ZodCatch})}describe(t){const o=this.constructor;return new o({...this._def,description:t})}pipe(t){return St.create(this,t)}readonly(){return Tt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tf=/^c[^\s-]{8,}$/i,nf=/^[0-9a-z]+$/,of=/^[0-9A-HJKMNP-TV-Z]{26}$/,rf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,sf=/^[a-z0-9_-]{21}$/i,lf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,af=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let oo;const df=/^(?:(?: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])$/,uf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ff=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ir="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",pf=new RegExp(`^${Ir}$`);function Lr(n){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?t=`${t}\\.\\d{${n.precision}}`:n.precision==null&&(t=`${t}(\\.\\d+)?`),t}function mf(n){return new RegExp(`^${Lr(n)}$`)}function Hr(n){let t=`${Ir}T${Lr(n)}`;const o=[];return o.push(n.local?"Z?":"Z"),n.offset&&o.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${o.join("|")})`,new RegExp(`^${t}$`)}function hf(n,t){return!!((t==="v4"||!t)&&df.test(n)||(t==="v6"||!t)&&uf.test(n))}class ae extends j{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==P.string){const l=this._getOrReturnCtx(t);return z(l,{code:M.invalid_type,expected:P.string,received:l.parsedType}),I}const s=new Q;let r;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(r=this._getOrReturnCtx(t,r),z(r,{code:M.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="max")t.data.length>l.value&&(r=this._getOrReturnCtx(t,r),z(r,{code:M.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="length"){const i=t.data.length>l.value,a=t.data.length<l.value;(i||a)&&(r=this._getOrReturnCtx(t,r),i?z(r,{code:M.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):a&&z(r,{code:M.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),s.dirty())}else if(l.kind==="email")af.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"email",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="emoji")oo||(oo=new RegExp(cf,"u")),oo.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"emoji",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="uuid")rf.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"uuid",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="nanoid")sf.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"nanoid",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid")tf.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"cuid",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid2")nf.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"cuid2",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="ulid")of.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"ulid",code:M.invalid_string,message:l.message}),s.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),z(r,{validation:"url",code:M.invalid_string,message:l.message}),s.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"regex",code:M.invalid_string,message:l.message}),s.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(r=this._getOrReturnCtx(t,r),z(r,{code:M.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),s.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(r=this._getOrReturnCtx(t,r),z(r,{code:M.invalid_string,validation:{startsWith:l.value},message:l.message}),s.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(r=this._getOrReturnCtx(t,r),z(r,{code:M.invalid_string,validation:{endsWith:l.value},message:l.message}),s.dirty()):l.kind==="datetime"?Hr(l).test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{code:M.invalid_string,validation:"datetime",message:l.message}),s.dirty()):l.kind==="date"?pf.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{code:M.invalid_string,validation:"date",message:l.message}),s.dirty()):l.kind==="time"?mf(l).test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{code:M.invalid_string,validation:"time",message:l.message}),s.dirty()):l.kind==="duration"?lf.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"duration",code:M.invalid_string,message:l.message}),s.dirty()):l.kind==="ip"?hf(t.data,l.version)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"ip",code:M.invalid_string,message:l.message}),s.dirty()):l.kind==="base64"?ff.test(t.data)||(r=this._getOrReturnCtx(t,r),z(r,{validation:"base64",code:M.invalid_string,message:l.message}),s.dirty()):U.assertNever(l);return{status:s.value,value:t.data}}_regex(t,o,s){return this.refinement(r=>t.test(r),{validation:o,code:M.invalid_string,...R.errToObj(s)})}_addCheck(t){return new ae({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...R.errToObj(t)})}url(t){return this._addCheck({kind:"url",...R.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...R.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...R.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...R.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...R.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...R.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...R.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...R.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...R.errToObj(t)})}datetime(t){var o,s;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(o=t==null?void 0:t.offset)!==null&&o!==void 0?o:!1,local:(s=t==null?void 0:t.local)!==null&&s!==void 0?s:!1,...R.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...R.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...R.errToObj(t)})}regex(t,o){return this._addCheck({kind:"regex",regex:t,...R.errToObj(o)})}includes(t,o){return this._addCheck({kind:"includes",value:t,position:o==null?void 0:o.position,...R.errToObj(o==null?void 0:o.message)})}startsWith(t,o){return this._addCheck({kind:"startsWith",value:t,...R.errToObj(o)})}endsWith(t,o){return this._addCheck({kind:"endsWith",value:t,...R.errToObj(o)})}min(t,o){return this._addCheck({kind:"min",value:t,...R.errToObj(o)})}max(t,o){return this._addCheck({kind:"max",value:t,...R.errToObj(o)})}length(t,o){return this._addCheck({kind:"length",value:t,...R.errToObj(o)})}nonempty(t){return this.min(1,R.errToObj(t))}trim(){return new ae({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ae({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ae({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxLength(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}}ae.create=n=>{var t;return new ae({checks:[],typeName:O.ZodString,coerce:(t=n==null?void 0:n.coerce)!==null&&t!==void 0?t:!1,...L(n)})};function gf(n,t){const o=(n.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=o>s?o:s,l=parseInt(n.toFixed(r).replace(".","")),i=parseInt(t.toFixed(r).replace(".",""));return l%i/Math.pow(10,r)}class Me extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==P.number){const l=this._getOrReturnCtx(t);return z(l,{code:M.invalid_type,expected:P.number,received:l.parsedType}),I}let s;const r=new Q;for(const l of this._def.checks)l.kind==="int"?U.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),z(s,{code:M.invalid_type,expected:"integer",received:"float",message:l.message}),r.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(s=this._getOrReturnCtx(t,s),z(s,{code:M.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),r.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(s=this._getOrReturnCtx(t,s),z(s,{code:M.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),r.dirty()):l.kind==="multipleOf"?gf(t.data,l.value)!==0&&(s=this._getOrReturnCtx(t,s),z(s,{code:M.not_multiple_of,multipleOf:l.value,message:l.message}),r.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),z(s,{code:M.not_finite,message:l.message}),r.dirty()):U.assertNever(l);return{status:r.value,value:t.data}}gte(t,o){return this.setLimit("min",t,!0,R.toString(o))}gt(t,o){return this.setLimit("min",t,!1,R.toString(o))}lte(t,o){return this.setLimit("max",t,!0,R.toString(o))}lt(t,o){return this.setLimit("max",t,!1,R.toString(o))}setLimit(t,o,s,r){return new Me({...this._def,checks:[...this._def.checks,{kind:t,value:o,inclusive:s,message:R.toString(r)}]})}_addCheck(t){return new Me({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:R.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(t)})}multipleOf(t,o){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(o)})}finite(t){return this._addCheck({kind:"finite",message:R.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(t)})}get minValue(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxValue(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&U.isInteger(t.value))}get isFinite(){let t=null,o=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(o===null||s.value>o)&&(o=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(o)&&Number.isFinite(t)}}Me.create=n=>new Me({checks:[],typeName:O.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...L(n)});class Ae extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==P.bigint){const l=this._getOrReturnCtx(t);return z(l,{code:M.invalid_type,expected:P.bigint,received:l.parsedType}),I}let s;const r=new Q;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(s=this._getOrReturnCtx(t,s),z(s,{code:M.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),r.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(s=this._getOrReturnCtx(t,s),z(s,{code:M.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),r.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),z(s,{code:M.not_multiple_of,multipleOf:l.value,message:l.message}),r.dirty()):U.assertNever(l);return{status:r.value,value:t.data}}gte(t,o){return this.setLimit("min",t,!0,R.toString(o))}gt(t,o){return this.setLimit("min",t,!1,R.toString(o))}lte(t,o){return this.setLimit("max",t,!0,R.toString(o))}lt(t,o){return this.setLimit("max",t,!1,R.toString(o))}setLimit(t,o,s,r){return new Ae({...this._def,checks:[...this._def.checks,{kind:t,value:o,inclusive:s,message:R.toString(r)}]})}_addCheck(t){return new Ae({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(t)})}multipleOf(t,o){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(o)})}get minValue(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxValue(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}}Ae.create=n=>{var t;return new Ae({checks:[],typeName:O.ZodBigInt,coerce:(t=n==null?void 0:n.coerce)!==null&&t!==void 0?t:!1,...L(n)})};class _t extends j{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==P.boolean){const s=this._getOrReturnCtx(t);return z(s,{code:M.invalid_type,expected:P.boolean,received:s.parsedType}),I}return te(t.data)}}_t.create=n=>new _t({typeName:O.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...L(n)});class Re extends j{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==P.date){const l=this._getOrReturnCtx(t);return z(l,{code:M.invalid_type,expected:P.date,received:l.parsedType}),I}if(isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return z(l,{code:M.invalid_date}),I}const s=new Q;let r;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(r=this._getOrReturnCtx(t,r),z(r,{code:M.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(r=this._getOrReturnCtx(t,r),z(r,{code:M.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):U.assertNever(l);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Re({...this._def,checks:[...this._def.checks,t]})}min(t,o){return this._addCheck({kind:"min",value:t.getTime(),message:R.toString(o)})}max(t,o){return this._addCheck({kind:"max",value:t.getTime(),message:R.toString(o)})}get minDate(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t!=null?new Date(t):null}}Re.create=n=>new Re({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:O.ZodDate,...L(n)});class tn extends j{_parse(t){if(this._getType(t)!==P.symbol){const s=this._getOrReturnCtx(t);return z(s,{code:M.invalid_type,expected:P.symbol,received:s.parsedType}),I}return te(t.data)}}tn.create=n=>new tn({typeName:O.ZodSymbol,...L(n)});class kt extends j{_parse(t){if(this._getType(t)!==P.undefined){const s=this._getOrReturnCtx(t);return z(s,{code:M.invalid_type,expected:P.undefined,received:s.parsedType}),I}return te(t.data)}}kt.create=n=>new kt({typeName:O.ZodUndefined,...L(n)});class wt extends j{_parse(t){if(this._getType(t)!==P.null){const s=this._getOrReturnCtx(t);return z(s,{code:M.invalid_type,expected:P.null,received:s.parsedType}),I}return te(t.data)}}wt.create=n=>new wt({typeName:O.ZodNull,...L(n)});class Je extends j{constructor(){super(...arguments),this._any=!0}_parse(t){return te(t.data)}}Je.create=n=>new Je({typeName:O.ZodAny,...L(n)});class Oe extends j{constructor(){super(...arguments),this._unknown=!0}_parse(t){return te(t.data)}}Oe.create=n=>new Oe({typeName:O.ZodUnknown,...L(n)});class xe extends j{_parse(t){const o=this._getOrReturnCtx(t);return z(o,{code:M.invalid_type,expected:P.never,received:o.parsedType}),I}}xe.create=n=>new xe({typeName:O.ZodNever,...L(n)});class nn extends j{_parse(t){if(this._getType(t)!==P.undefined){const s=this._getOrReturnCtx(t);return z(s,{code:M.invalid_type,expected:P.void,received:s.parsedType}),I}return te(t.data)}}nn.create=n=>new nn({typeName:O.ZodVoid,...L(n)});class ce extends j{_parse(t){const{ctx:o,status:s}=this._processInputParams(t),r=this._def;if(o.parsedType!==P.array)return z(o,{code:M.invalid_type,expected:P.array,received:o.parsedType}),I;if(r.exactLength!==null){const i=o.data.length>r.exactLength.value,a=o.data.length<r.exactLength.value;(i||a)&&(z(o,{code:i?M.too_big:M.too_small,minimum:a?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),s.dirty())}if(r.minLength!==null&&o.data.length<r.minLength.value&&(z(o,{code:M.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),s.dirty()),r.maxLength!==null&&o.data.length>r.maxLength.value&&(z(o,{code:M.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),o.common.async)return Promise.all([...o.data].map((i,a)=>r.type._parseAsync(new he(o,i,o.path,a)))).then(i=>Q.mergeArray(s,i));const l=[...o.data].map((i,a)=>r.type._parseSync(new he(o,i,o.path,a)));return Q.mergeArray(s,l)}get element(){return this._def.type}min(t,o){return new ce({...this._def,minLength:{value:t,message:R.toString(o)}})}max(t,o){return new ce({...this._def,maxLength:{value:t,message:R.toString(o)}})}length(t,o){return new ce({...this._def,exactLength:{value:t,message:R.toString(o)}})}nonempty(t){return this.min(1,t)}}ce.create=(n,t)=>new ce({type:n,minLength:null,maxLength:null,exactLength:null,typeName:O.ZodArray,...L(t)});function Qe(n){if(n instanceof W){const t={};for(const o in n.shape){const s=n.shape[o];t[o]=ye.create(Qe(s))}return new W({...n._def,shape:()=>t})}else return n instanceof ce?new ce({...n._def,type:Qe(n.element)}):n instanceof ye?ye.create(Qe(n.unwrap())):n instanceof De?De.create(Qe(n.unwrap())):n instanceof ge?ge.create(n.items.map(t=>Qe(t))):n}class W extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),o=U.objectKeys(t);return this._cached={shape:t,keys:o}}_parse(t){if(this._getType(t)!==P.object){const d=this._getOrReturnCtx(t);return z(d,{code:M.invalid_type,expected:P.object,received:d.parsedType}),I}const{status:s,ctx:r}=this._processInputParams(t),{shape:l,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof xe&&this._def.unknownKeys==="strip"))for(const d in r.data)i.includes(d)||a.push(d);const c=[];for(const d of i){const u=l[d],f=r.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new he(r,f,r.path,d)),alwaysSet:d in r.data})}if(this._def.catchall instanceof xe){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:r.data[u]}});else if(d==="strict")a.length>0&&(z(r,{code:M.unrecognized_keys,keys:a}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of a){const f=r.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new he(r,f,r.path,u)),alwaysSet:u in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const f=await u.key,p=await u.value;d.push({key:f,value:p,alwaysSet:u.alwaysSet})}return d}).then(d=>Q.mergeObjectSync(s,d)):Q.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(t){return R.errToObj,new W({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(o,s)=>{var r,l,i,a;const c=(i=(l=(r=this._def).errorMap)===null||l===void 0?void 0:l.call(r,o,s).message)!==null&&i!==void 0?i:s.defaultError;return o.code==="unrecognized_keys"?{message:(a=R.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(t){return new W({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new W({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:O.ZodObject})}setKey(t,o){return this.augment({[t]:o})}catchall(t){return new W({...this._def,catchall:t})}pick(t){const o={};return U.objectKeys(t).forEach(s=>{t[s]&&this.shape[s]&&(o[s]=this.shape[s])}),new W({...this._def,shape:()=>o})}omit(t){const o={};return U.objectKeys(this.shape).forEach(s=>{t[s]||(o[s]=this.shape[s])}),new W({...this._def,shape:()=>o})}deepPartial(){return Qe(this)}partial(t){const o={};return U.objectKeys(this.shape).forEach(s=>{const r=this.shape[s];t&&!t[s]?o[s]=r:o[s]=r.optional()}),new W({...this._def,shape:()=>o})}required(t){const o={};return U.objectKeys(this.shape).forEach(s=>{if(t&&!t[s])o[s]=this.shape[s];else{let l=this.shape[s];for(;l instanceof ye;)l=l._def.innerType;o[s]=l}}),new W({...this._def,shape:()=>o})}keyof(){return jr(U.objectKeys(this.shape))}}W.create=(n,t)=>new W({shape:()=>n,unknownKeys:"strip",catchall:xe.create(),typeName:O.ZodObject,...L(t)}),W.strictCreate=(n,t)=>new W({shape:()=>n,unknownKeys:"strict",catchall:xe.create(),typeName:O.ZodObject,...L(t)}),W.lazycreate=(n,t)=>new W({shape:n,unknownKeys:"strip",catchall:xe.create(),typeName:O.ZodObject,...L(t)});class bt extends j{_parse(t){const{ctx:o}=this._processInputParams(t),s=this._def.options;function r(l){for(const a of l)if(a.result.status==="valid")return a.result;for(const a of l)if(a.result.status==="dirty")return o.common.issues.push(...a.ctx.common.issues),a.result;const i=l.map(a=>new ie(a.ctx.common.issues));return z(o,{code:M.invalid_union,unionErrors:i}),I}if(o.common.async)return Promise.all(s.map(async l=>{const i={...o,common:{...o.common,issues:[]},parent:null};return{result:await l._parseAsync({data:o.data,path:o.path,parent:i}),ctx:i}})).then(r);{let l;const i=[];for(const c of s){const d={...o,common:{...o.common,issues:[]},parent:null},u=c._parseSync({data:o.data,path:o.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!l&&(l={result:u,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(l)return o.common.issues.push(...l.ctx.common.issues),l.result;const a=i.map(c=>new ie(c));return z(o,{code:M.invalid_union,unionErrors:a}),I}}get options(){return this._def.options}}bt.create=(n,t)=>new bt({options:n,typeName:O.ZodUnion,...L(t)});const Ve=n=>n instanceof Bt?Ve(n.schema):n instanceof de?Ve(n.innerType()):n instanceof Ct?[n.value]:n instanceof ve?n.options:n instanceof $t?U.objectValues(n.enum):n instanceof Et?Ve(n._def.innerType):n instanceof kt?[void 0]:n instanceof wt?[null]:n instanceof ye?[void 0,...Ve(n.unwrap())]:n instanceof De?[null,...Ve(n.unwrap())]:n instanceof so||n instanceof Tt?Ve(n.unwrap()):n instanceof Nt?Ve(n._def.innerType):[];class on extends j{_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==P.object)return z(o,{code:M.invalid_type,expected:P.object,received:o.parsedType}),I;const s=this.discriminator,r=o.data[s],l=this.optionsMap.get(r);return l?o.common.async?l._parseAsync({data:o.data,path:o.path,parent:o}):l._parseSync({data:o.data,path:o.path,parent:o}):(z(o,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),I)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,o,s){const r=new Map;for(const l of o){const i=Ve(l.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(r.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);r.set(a,l)}}return new on({typeName:O.ZodDiscriminatedUnion,discriminator:t,options:o,optionsMap:r,...L(s)})}}function ro(n,t){const o=Te(n),s=Te(t);if(n===t)return{valid:!0,data:n};if(o===P.object&&s===P.object){const r=U.objectKeys(t),l=U.objectKeys(n).filter(a=>r.indexOf(a)!==-1),i={...n,...t};for(const a of l){const c=ro(n[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(o===P.array&&s===P.array){if(n.length!==t.length)return{valid:!1};const r=[];for(let l=0;l<n.length;l++){const i=n[l],a=t[l],c=ro(i,a);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return o===P.date&&s===P.date&&+n==+t?{valid:!0,data:n}:{valid:!1}}class xt extends j{_parse(t){const{status:o,ctx:s}=this._processInputParams(t),r=(l,i)=>{if(to(l)||to(i))return I;const a=ro(l.value,i.value);return a.valid?((no(l)||no(i))&&o.dirty(),{status:o.value,value:a.data}):(z(s,{code:M.invalid_intersection_types}),I)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([l,i])=>r(l,i)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}xt.create=(n,t,o)=>new xt({left:n,right:t,typeName:O.ZodIntersection,...L(o)});class ge extends j{_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==P.array)return z(s,{code:M.invalid_type,expected:P.array,received:s.parsedType}),I;if(s.data.length<this._def.items.length)return z(s,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),I;!this._def.rest&&s.data.length>this._def.items.length&&(z(s,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const l=[...s.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new he(s,i,s.path,a)):null}).filter(i=>!!i);return s.common.async?Promise.all(l).then(i=>Q.mergeArray(o,i)):Q.mergeArray(o,l)}get items(){return this._def.items}rest(t){return new ge({...this._def,rest:t})}}ge.create=(n,t)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ge({items:n,typeName:O.ZodTuple,rest:null,...L(t)})};class Vt extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==P.object)return z(s,{code:M.invalid_type,expected:P.object,received:s.parsedType}),I;const r=[],l=this._def.keyType,i=this._def.valueType;for(const a in s.data)r.push({key:l._parse(new he(s,a,s.path,a)),value:i._parse(new he(s,s.data[a],s.path,a)),alwaysSet:a in s.data});return s.common.async?Q.mergeObjectAsync(o,r):Q.mergeObjectSync(o,r)}get element(){return this._def.valueType}static create(t,o,s){return o instanceof j?new Vt({keyType:t,valueType:o,typeName:O.ZodRecord,...L(s)}):new Vt({keyType:ae.create(),valueType:t,typeName:O.ZodRecord,...L(o)})}}class rn extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==P.map)return z(s,{code:M.invalid_type,expected:P.map,received:s.parsedType}),I;const r=this._def.keyType,l=this._def.valueType,i=[...s.data.entries()].map(([a,c],d)=>({key:r._parse(new he(s,a,s.path,[d,"key"])),value:l._parse(new he(s,c,s.path,[d,"value"]))}));if(s.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return I;(d.status==="dirty"||u.status==="dirty")&&o.dirty(),a.set(d.value,u.value)}return{status:o.value,value:a}})}else{const a=new Map;for(const c of i){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return I;(d.status==="dirty"||u.status==="dirty")&&o.dirty(),a.set(d.value,u.value)}return{status:o.value,value:a}}}}rn.create=(n,t,o)=>new rn({valueType:t,keyType:n,typeName:O.ZodMap,...L(o)});class Ie extends j{_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.parsedType!==P.set)return z(s,{code:M.invalid_type,expected:P.set,received:s.parsedType}),I;const r=this._def;r.minSize!==null&&s.data.size<r.minSize.value&&(z(s,{code:M.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),o.dirty()),r.maxSize!==null&&s.data.size>r.maxSize.value&&(z(s,{code:M.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),o.dirty());const l=this._def.valueType;function i(c){const d=new Set;for(const u of c){if(u.status==="aborted")return I;u.status==="dirty"&&o.dirty(),d.add(u.value)}return{status:o.value,value:d}}const a=[...s.data.values()].map((c,d)=>l._parse(new he(s,c,s.path,d)));return s.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,o){return new Ie({...this._def,minSize:{value:t,message:R.toString(o)}})}max(t,o){return new Ie({...this._def,maxSize:{value:t,message:R.toString(o)}})}size(t,o){return this.min(t,o).max(t,o)}nonempty(t){return this.min(1,t)}}Ie.create=(n,t)=>new Ie({valueType:n,minSize:null,maxSize:null,typeName:O.ZodSet,...L(t)});class et extends j{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==P.function)return z(o,{code:M.invalid_type,expected:P.function,received:o.parsedType}),I;function s(a,c){return Qt({data:a,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,Jt(),Xe].filter(d=>!!d),issueData:{code:M.invalid_arguments,argumentsError:c}})}function r(a,c){return Qt({data:a,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,Jt(),Xe].filter(d=>!!d),issueData:{code:M.invalid_return_type,returnTypeError:c}})}const l={errorMap:o.common.contextualErrorMap},i=o.data;if(this._def.returns instanceof tt){const a=this;return te(async function(...c){const d=new ie([]),u=await a._def.args.parseAsync(c,l).catch(m=>{throw d.addIssue(s(c,m)),d}),f=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(f,l).catch(m=>{throw d.addIssue(r(f,m)),d})})}else{const a=this;return te(function(...c){const d=a._def.args.safeParse(c,l);if(!d.success)throw new ie([s(c,d.error)]);const u=Reflect.apply(i,this,d.data),f=a._def.returns.safeParse(u,l);if(!f.success)throw new ie([r(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new et({...this._def,args:ge.create(t).rest(Oe.create())})}returns(t){return new et({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,o,s){return new et({args:t||ge.create([]).rest(Oe.create()),returns:o||Oe.create(),typeName:O.ZodFunction,...L(s)})}}class Bt extends j{get schema(){return this._def.getter()}_parse(t){const{ctx:o}=this._processInputParams(t);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}Bt.create=(n,t)=>new Bt({getter:n,typeName:O.ZodLazy,...L(t)});class Ct extends j{_parse(t){if(t.data!==this._def.value){const o=this._getOrReturnCtx(t);return z(o,{received:o.data,code:M.invalid_literal,expected:this._def.value}),I}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ct.create=(n,t)=>new Ct({value:n,typeName:O.ZodLiteral,...L(t)});function jr(n,t){return new ve({values:n,typeName:O.ZodEnum,...L(t)})}class ve extends j{constructor(){super(...arguments),gt.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const o=this._getOrReturnCtx(t),s=this._def.values;return z(o,{expected:U.joinValues(s),received:o.parsedType,code:M.invalid_type}),I}if(en(this,gt)||Rr(this,gt,new Set(this._def.values)),!en(this,gt).has(t.data)){const o=this._getOrReturnCtx(t),s=this._def.values;return z(o,{received:o.data,code:M.invalid_enum_value,options:s}),I}return te(t.data)}get options(){return this._def.values}get enum(){const t={};for(const o of this._def.values)t[o]=o;return t}get Values(){const t={};for(const o of this._def.values)t[o]=o;return t}get Enum(){const t={};for(const o of this._def.values)t[o]=o;return t}extract(t,o=this._def){return ve.create(t,{...this._def,...o})}exclude(t,o=this._def){return ve.create(this.options.filter(s=>!t.includes(s)),{...this._def,...o})}}gt=new WeakMap,ve.create=jr;class $t extends j{constructor(){super(...arguments),yt.set(this,void 0)}_parse(t){const o=U.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==P.string&&s.parsedType!==P.number){const r=U.objectValues(o);return z(s,{expected:U.joinValues(r),received:s.parsedType,code:M.invalid_type}),I}if(en(this,yt)||Rr(this,yt,new Set(U.getValidEnumValues(this._def.values))),!en(this,yt).has(t.data)){const r=U.objectValues(o);return z(s,{received:s.data,code:M.invalid_enum_value,options:r}),I}return te(t.data)}get enum(){return this._def.values}}yt=new WeakMap,$t.create=(n,t)=>new $t({values:n,typeName:O.ZodNativeEnum,...L(t)});class tt extends j{unwrap(){return this._def.type}_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==P.promise&&o.common.async===!1)return z(o,{code:M.invalid_type,expected:P.promise,received:o.parsedType}),I;const s=o.parsedType===P.promise?o.data:Promise.resolve(o.data);return te(s.then(r=>this._def.type.parseAsync(r,{path:o.path,errorMap:o.common.contextualErrorMap})))}}tt.create=(n,t)=>new tt({type:n,typeName:O.ZodPromise,...L(t)});class de extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===O.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:o,ctx:s}=this._processInputParams(t),r=this._def.effect||null,l={addIssue:i=>{z(s,i),i.fatal?o.abort():o.dirty()},get path(){return s.path}};if(l.addIssue=l.addIssue.bind(l),r.type==="preprocess"){const i=r.transform(s.data,l);if(s.common.async)return Promise.resolve(i).then(async a=>{if(o.value==="aborted")return I;const c=await this._def.schema._parseAsync({data:a,path:s.path,parent:s});return c.status==="aborted"?I:c.status==="dirty"||o.value==="dirty"?Ge(c.value):c});{if(o.value==="aborted")return I;const a=this._def.schema._parseSync({data:i,path:s.path,parent:s});return a.status==="aborted"?I:a.status==="dirty"||o.value==="dirty"?Ge(a.value):a}}if(r.type==="refinement"){const i=a=>{const c=r.refinement(a,l);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(s.common.async===!1){const a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?I:(a.status==="dirty"&&o.dirty(),i(a.value),{status:o.value,value:a.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(a=>a.status==="aborted"?I:(a.status==="dirty"&&o.dirty(),i(a.value).then(()=>({status:o.value,value:a.value}))))}if(r.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!mt(i))return i;const a=r.transform(i.value,l);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:a}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>mt(i)?Promise.resolve(r.transform(i.value,l)).then(a=>({status:o.value,value:a})):i);U.assertNever(r)}}de.create=(n,t,o)=>new de({schema:n,typeName:O.ZodEffects,effect:t,...L(o)}),de.createWithPreprocess=(n,t,o)=>new de({schema:t,effect:{type:"preprocess",transform:n},typeName:O.ZodEffects,...L(o)});class ye extends j{_parse(t){return this._getType(t)===P.undefined?te(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ye.create=(n,t)=>new ye({innerType:n,typeName:O.ZodOptional,...L(t)});class De extends j{_parse(t){return this._getType(t)===P.null?te(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}De.create=(n,t)=>new De({innerType:n,typeName:O.ZodNullable,...L(t)});class Et extends j{_parse(t){const{ctx:o}=this._processInputParams(t);let s=o.data;return o.parsedType===P.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Et.create=(n,t)=>new Et({innerType:n,typeName:O.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...L(t)});class Nt extends j{_parse(t){const{ctx:o}=this._processInputParams(t),s={...o,common:{...o.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return ht(r)?r.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new ie(s.common.issues)},input:s.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new ie(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Nt.create=(n,t)=>new Nt({innerType:n,typeName:O.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...L(t)});class sn extends j{_parse(t){if(this._getType(t)!==P.nan){const s=this._getOrReturnCtx(t);return z(s,{code:M.invalid_type,expected:P.nan,received:s.parsedType}),I}return{status:"valid",value:t.data}}}sn.create=n=>new sn({typeName:O.ZodNaN,...L(n)});const yf=Symbol("zod_brand");class so extends j{_parse(t){const{ctx:o}=this._processInputParams(t),s=o.data;return this._def.type._parse({data:s,path:o.path,parent:o})}unwrap(){return this._def.type}}class St extends j{_parse(t){const{status:o,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?I:l.status==="dirty"?(o.dirty(),Ge(l.value)):this._def.out._parseAsync({data:l.value,path:s.path,parent:s})})();{const r=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return r.status==="aborted"?I:r.status==="dirty"?(o.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:s.path,parent:s})}}static create(t,o){return new St({in:t,out:o,typeName:O.ZodPipeline})}}class Tt extends j{_parse(t){const o=this._def.innerType._parse(t),s=r=>(mt(r)&&(r.value=Object.freeze(r.value)),r);return ht(o)?o.then(r=>s(r)):s(o)}unwrap(){return this._def.innerType}}Tt.create=(n,t)=>new Tt({innerType:n,typeName:O.ZodReadonly,...L(t)});function Zr(n,t={},o){return n?Je.create().superRefine((s,r)=>{var l,i;if(!n(s)){const a=typeof t=="function"?t(s):typeof t=="string"?{message:t}:t,c=(i=(l=a.fatal)!==null&&l!==void 0?l:o)!==null&&i!==void 0?i:!0,d=typeof a=="string"?{message:a}:a;r.addIssue({code:"custom",...d,fatal:c})}}):Je.create()}const _f={object:W.lazycreate};var O;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(O||(O={}));const kf=(n,t={message:`Input not instance of ${n.name}`})=>Zr(o=>o instanceof n,t),Ur=ae.create,qr=Me.create,wf=sn.create,bf=Ae.create,Wr=_t.create,xf=Re.create,Vf=tn.create,Bf=kt.create,Cf=wt.create,$f=Je.create,Ef=Oe.create,Nf=xe.create,Sf=nn.create,Tf=ce.create,Mf=W.create,Af=W.strictCreate,vf=bt.create,Df=on.create,Ff=xt.create,zf=ge.create,Pf=Vt.create,Rf=rn.create,Of=Ie.create,If=et.create,Lf=Bt.create,Hf=Ct.create,jf=ve.create,Zf=$t.create,Uf=tt.create,Kr=de.create,qf=ye.create,Wf=De.create,Kf=de.createWithPreprocess,Yf=St.create;var ue=Object.freeze({__proto__:null,defaultErrorMap:Xe,setErrorMap:Qu,getErrorMap:Jt,makeIssue:Qt,EMPTY_PATH:ef,addIssueToContext:z,ParseStatus:Q,INVALID:I,DIRTY:Ge,OK:te,isAborted:to,isDirty:no,isValid:mt,isAsync:ht,get util(){return U},get objectUtil(){return eo},ZodParsedType:P,getParsedType:Te,ZodType:j,datetimeRegex:Hr,ZodString:ae,ZodNumber:Me,ZodBigInt:Ae,ZodBoolean:_t,ZodDate:Re,ZodSymbol:tn,ZodUndefined:kt,ZodNull:wt,ZodAny:Je,ZodUnknown:Oe,ZodNever:xe,ZodVoid:nn,ZodArray:ce,ZodObject:W,ZodUnion:bt,ZodDiscriminatedUnion:on,ZodIntersection:xt,ZodTuple:ge,ZodRecord:Vt,ZodMap:rn,ZodSet:Ie,ZodFunction:et,ZodLazy:Bt,ZodLiteral:Ct,ZodEnum:ve,ZodNativeEnum:$t,ZodPromise:tt,ZodEffects:de,ZodTransformer:de,ZodOptional:ye,ZodNullable:De,ZodDefault:Et,ZodCatch:Nt,ZodNaN:sn,BRAND:yf,ZodBranded:so,ZodPipeline:St,ZodReadonly:Tt,custom:Zr,Schema:j,ZodSchema:j,late:_f,get ZodFirstPartyTypeKind(){return O},coerce:{string:n=>ae.create({...n,coerce:!0}),number:n=>Me.create({...n,coerce:!0}),boolean:n=>_t.create({...n,coerce:!0}),bigint:n=>Ae.create({...n,coerce:!0}),date:n=>Re.create({...n,coerce:!0})},any:$f,array:Tf,bigint:bf,boolean:Wr,date:xf,discriminatedUnion:Df,effect:Kr,enum:jf,function:If,instanceof:kf,intersection:Ff,lazy:Lf,literal:Hf,map:Rf,nan:wf,nativeEnum:Zf,never:Nf,null:Cf,nullable:Wf,number:qr,object:Mf,oboolean:()=>Wr().optional(),onumber:()=>qr().optional(),optional:qf,ostring:()=>Ur().optional(),pipeline:Yf,preprocess:Kf,promise:Uf,record:Pf,set:Of,strictObject:Af,string:Ur,symbol:Vf,transformer:Kr,tuple:zf,undefined:Bf,union:vf,unknown:Ef,void:Sf,NEVER:I,ZodIssueCode:M,quotelessJson:Ju,ZodError:ie});function Xf(n){throw new Error("Unexpected object: "+n)}const Yr="upload://upload/",Xr="index://index/";function Gf(n){return n.startsWith(Yr)}function Jf(n){return n.startsWith(Xr)}function Gr(n){if(Jf(n)){const t=n.slice(Xr.length);return JSON.parse(decodeURIComponent(t)).path}else if(Gf(n)){const t=n.slice(Yr.length);return JSON.parse(decodeURIComponent(t)).localPath}Xf(n)}function Qf(n){return n.replace(/^.*[\\/]/,"")}function ep(n){return Qf(Gr(n))}ue.object({__isRef:ue.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:ue.string().describe("Upstream block id"),name:ue.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly(),ue.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");const tp=ue.object({type:ue.string(),importance:ue.number().optional(),id:ue.string().optional(),label:ue.string()});ue.array(tp);const np={key:0,ref:"label"},op={key:0,class:"required-icon"},rp=["data-placeholder"],sp={key:5,class:"pl-file-input__stats"},lp={key:0,class:"pl-file-input__error"},ip={key:1,class:"pl-file-input__helper"},ap=e.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.reactive({fileDialogOpen:!1,error:""}),s=e.useSlots(),r=t,l=n,i=(B,A)=>{if(B)try{return A(B)}catch(h){return o.error=h instanceof Error?h.message:String(h),B}},a=e.computed(()=>i(l.modelValue,ep)),c=e.computed(()=>i(l.modelValue,Gr)),d=e.computed(()=>l.progress&&!l.progress.done),u=e.computed(()=>l.progress&&l.progress.done),f=e.computed(()=>o.error??l.error),p=e.computed(()=>!!f.value),m=e.computed(()=>{const{status:B,done:A}=l.progress??{};return!B||!B.bytesTotal?"":B.bytesProcessed&&!A?An(B.bytesProcessed,{})+" / "+An(B.bytesTotal,{}):An(B.bytesTotal,{})}),g=e.computed(()=>{var A;const{progress:B}=l;return B?{width:B.done?"100%":Math.round((((A=B.status)==null?void 0:A.progress)??0)*100)+"%"}:{}}),k=()=>{o.fileDialogOpen=!0},x=B=>{B.files.length&&r("update:modelValue",B.files[0])},w=()=>r("update:modelValue",void 0);e.watch(()=>l.modelValue,()=>{o.error=""},{immediate:!0});const T=e.ref();return l.cellStyle||be(T),(B,A)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([{"pl-file-input__cell-style":!!B.cellStyle,"has-file":!!a.value},"pl-file-input__envelope"])},[e.createElementVNode("div",{ref_key:"rootRef",ref:T,class:e.normalizeClass(["pl-file-input",{dashed:B.dashed,error:p.value}]),tabindex:"0",onKeyup:e.withKeys(k,["enter"]),onClick:e.withModifiers(k,["stop"])},[e.createElementVNode("div",{class:"pl-file-input__progress",style:e.normalizeStyle(g.value)},null,4),A[3]||(A[3]=e.createTextVNode()),!B.cellStyle&&B.label?(e.openBlock(),e.createElementBlock("label",np,[B.required?(e.openBlock(),e.createElementBlock("i",op)):e.createCommentVNode("",!0),A[1]||(A[1]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(B.label),1),A[2]||(A[2]=e.createTextVNode()),e.unref(s).tooltip||c.value?(e.openBlock(),e.createBlock(e.unref(J),{key:1,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.unref(s).tooltip?e.renderSlot(B.$slots,"tooltip",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.value),1)],64))]),_:3})):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),A[4]||(A[4]=e.createTextVNode()),p.value?(e.openBlock(),e.createBlock(e.unref(oe),{key:1,name:"restart"})):d.value?(e.openBlock(),e.createBlock(e.unref(oe),{key:2,name:"cloud-upload"})):u.value?(e.openBlock(),e.createBlock(e.unref(oe),{key:3,name:"success"})):(e.openBlock(),e.createBlock(e.unref(oe),{key:4,name:"paper-clip"})),A[5]||(A[5]=e.createTextVNode()),e.createElementVNode("div",{"data-placeholder":B.placeholder??"Choose file",class:"pl-file-input__filename"},e.toDisplayString(a.value),9,rp),A[6]||(A[6]=e.createTextVNode()),m.value?(e.openBlock(),e.createElementBlock("div",sp,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0),A[7]||(A[7]=e.createTextVNode()),B.modelValue?(e.openBlock(),e.createBlock(e.unref(oe),{key:6,name:"close",onClick:e.withModifiers(w,["stop"])})):e.createCommentVNode("",!0),A[8]||(A[8]=e.createTextVNode()),e.createVNode(Se,{class:"pl-file-input__contour"})],34),A[9]||(A[9]=e.createTextVNode()),p.value?(e.openBlock(),e.createElementBlock("div",lp,e.toDisplayString(f.value),1)):B.helper?(e.openBlock(),e.createElementBlock("div",ip,e.toDisplayString(B.helper),1)):e.createCommentVNode("",!0)],2),A[10]||(A[10]=e.createTextVNode()),e.createVNode(e.unref(zr),{modelValue:o.fileDialogOpen,"onUpdate:modelValue":A[0]||(A[0]=h=>o.fileDialogOpen=h),extensions:B.extensions,title:B.fileDialogTitle,"close-on-outside-click":B.fileDialogCloseOnOutsideClick,"onImport:files":x},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),cp={class:"pl-notification-alert__wrapper d-flex text-s"},dp={class:"pl-notification-alert__content flex-grow-1"},up={key:0,class:"pl-notification-alert__close"},fp={key:0,class:"pl-notification-alert__actions d-flex"},pp=e.defineComponent({__name:"PlNotificationAlert",props:e.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,o=e.useModel(n,"modelValue");function s(){t.closable&&(o.value=!1)}return(r,l)=>o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([r.type,"pl-notification-alert d-flex flex-column gap-16"]),style:e.normalizeStyle({width:`${r.width}`})},[e.createElementVNode("div",cp,[e.createElementVNode("div",dp,[e.renderSlot(r.$slots,"default")]),l[0]||(l[0]=e.createTextVNode()),r.closable?(e.openBlock(),e.createElementBlock("div",up,[e.createVNode(e.unref(Ln),{icon:"close",onClick:s})])):e.createCommentVNode("",!0)]),l[1]||(l[1]=e.createTextVNode()),r.$slots.actions?(e.openBlock(),e.createElementBlock("div",fp,[e.renderSlot(r.$slots,"actions")])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}}),mp=["data-content"],hp=[".title"],gp=K(e.defineComponent({__name:"StackedRow",props:{value:{},height:{}},setup(n){const t=n,o=e.computed(()=>({height:t.height??"100%",minHeight:"82px"})),s=e.computed(()=>{const l=t.value||[],i=l.reduce((a,c)=>a+c.value,0);return l.map(a=>{const c=a.value/i*100,d=a.label;return{color:a.color.toString(),description:a.description,fraction:c,label:d}})}),r=[-40,-50,-50,-50,-80];return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.$style.component]),style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{class:e.normalizeClass(l.$style.track)},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,25,50,75,100],(a,c)=>e.createElementVNode("div",{key:c,style:e.normalizeStyle({left:`${a}%`,"--transform":`translateX(${r[c]}%)`}),"data-content":`${a}%`},null,12,mp)),64))],2),i[1]||(i[1]=e.createTextVNode()),e.createElementVNode("div",{class:e.normalizeClass(l.$style.container)},[s.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.$style.notReady)},"Not ready",2)),i[0]||(i[0]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,".title":a.description??a.label,style:e.normalizeStyle({width:`${a.fraction}%`,backgroundColor:a.color})},null,44,hp))),128))],2)],6))}}),[["__cssModules",{$style:{component:"_component_5hdjy_1",container:"_container_5hdjy_11",track:"_track_5hdjy_25",notReady:"_notReady_5hdjy_47"}}]]),yp=K(e.defineComponent({__name:"Legends",props:{maxInColumn:{},legends:{}},setup(n){function t(r,l){const i=[];let a=[];for(let c=0;c<r.length;c++)a.length<l?a.push(r[c]):(i.push(a),a=[r[c]]);return i.push(a),i}const o=n,s=e.computed(()=>t(o.legends,o.maxInColumn??5));return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.$style.component)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(i,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(r.$style.legend)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:e.normalizeClass(r.$style.item)},[e.createElementVNode("div",{class:e.normalizeClass(r.$style.chip),style:e.normalizeStyle({backgroundColor:c.color.toString()})},null,6),e.createTextVNode(" "+e.toDisplayString(c.text),1)],2))),128))],2))),128))],2))}}),[["__cssModules",{$style:{component:"_component_blzj7_2",legend:"_legend_blzj7_9",chip:"_chip_blzj7_19",group:"_group_blzj7_26",item:"_item_blzj7_32"}}]]),_p=K(e.defineComponent({__name:"PlChartStackedBar",props:{settings:{}},setup(n){const t=n,o=e.computed(()=>t.settings.showLegends??!0),s=e.computed(()=>t.settings.data??[]),r=e.computed(()=>s.value.map(l=>({color:l.color,text:l.label})));return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.$style.component)},[l.settings.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.$style.title)},e.toDisplayString(l.settings.title),3)):e.createCommentVNode("",!0),i[0]||(i[0]=e.createTextVNode()),e.createVNode(gp,{value:s.value},null,8,["value"]),i[1]||(i[1]=e.createTextVNode()),o.value&&r.value.length?(e.openBlock(),e.createBlock(yp,{key:1,legends:r.value,"max-in-column":l.settings.maxLegendsInColumn},null,8,["legends","max-in-column"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{component:"_component_1j1iz_1",title:"_title_1j1iz_7"}}]]),kp=[".title"],wp=K(e.defineComponent({__name:"StackedRowCompact",props:{value:{},height:{}},setup(n){const t=n,o=e.computed(()=>({height:t.height??"100%",minHeight:"24px"})),s=e.computed(()=>{const r=t.value||[],l=r.reduce((i,a)=>i+a.value,0);return r.map(i=>{const a=i.value/l*100,c=i.label;return{color:i.color.toString(),description:i.description,fraction:a,label:c}})});return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.$style.component]),style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{class:e.normalizeClass(r.$style.container)},[s.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.$style.notReady)},"Not ready",2)),l[0]||(l[0]=e.createTextVNode()),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(i,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,".title":i.description??i.label,style:e.normalizeStyle({width:`${i.fraction}%`,backgroundColor:i.color})},null,44,kp))),128))],2)],6))}}),[["__cssModules",{$style:{component:"_component_1utnb_1",notReady:"_notReady_1utnb_8",container:"_container_1utnb_16"}}]]),bp=K(e.defineComponent({__name:"PlChartStackedBarCompact",props:{settings:{}},setup(n){const t=n,o=e.computed(()=>t.settings.data??[]);return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.$style.component)},[e.createVNode(wp,{value:o.value},null,8,["value"])],2))}}),[["__cssModules",{$style:{component:"_component_1gn0t_1"}}]]);function ln(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function xp(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function Jr(n){let t,o,s;n.length!==2?(t=ln,o=(a,c)=>ln(n(a),c),s=(a,c)=>n(a)-c):(t=n===ln||n===xp?n:Vp,o=n,s=n);function r(a,c,d=0,u=a.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;o(a[f],c)<0?d=f+1:u=f}while(d<u)}return d}function l(a,c,d=0,u=a.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;o(a[f],c)<=0?d=f+1:u=f}while(d<u)}return d}function i(a,c,d=0,u=a.length){const f=r(a,c,d,u-1);return f>d&&s(a[f-1],c)>-s(a[f],c)?f-1:f}return{left:r,center:i,right:l}}function Vp(){return 0}function Bp(n){return n===null?NaN:+n}const Qr=Jr(ln).right;Jr(Bp).center;function Cp(n,t){let o=0;for(let s of n)s!=null&&(s=+s)>=s&&++o;return o}function lo(n,t){let o,s;if(t===void 0)for(const r of n)r!=null&&(o===void 0?r>=r&&(o=s=r):(o>r&&(o=r),s<r&&(s=r)));else{let r=-1;for(let l of n)(l=t(l,++r,n))!=null&&(o===void 0?l>=l&&(o=s=l):(o>l&&(o=l),s<l&&(s=l)))}return[o,s]}function $p(n){return n}var Ep=Array.prototype,Np=Ep.slice;function io(n){return()=>n}const Sp=Math.sqrt(50),Tp=Math.sqrt(10),Mp=Math.sqrt(2);function an(n,t,o){const s=(t-n)/Math.max(0,o),r=Math.floor(Math.log10(s)),l=s/Math.pow(10,r),i=l>=Sp?10:l>=Tp?5:l>=Mp?2:1;let a,c,d;return r<0?(d=Math.pow(10,-r)/i,a=Math.round(n*d),c=Math.round(t*d),a/d<n&&++a,c/d>t&&--c,d=-d):(d=Math.pow(10,r)*i,a=Math.round(n/d),c=Math.round(t/d),a*d<n&&++a,c*d>t&&--c),c<a&&.5<=o&&o<2?an(n,t,o*2):[a,c,d]}function es(n,t,o){if(t=+t,n=+n,o=+o,!(o>0))return[];if(n===t)return[n];const s=t<n,[r,l,i]=s?an(t,n,o):an(n,t,o);if(!(l>=r))return[];const a=l-r+1,c=new Array(a);if(s)if(i<0)for(let d=0;d<a;++d)c[d]=(l-d)/-i;else for(let d=0;d<a;++d)c[d]=(l-d)*i;else if(i<0)for(let d=0;d<a;++d)c[d]=(r+d)/-i;else for(let d=0;d<a;++d)c[d]=(r+d)*i;return c}function nt(n,t,o){return t=+t,n=+n,o=+o,an(n,t,o)[2]}function Ap(n,t,o){t=+t,n=+n,o=+o;const s=t<n,r=s?nt(t,n,o):nt(n,t,o);return(s?-1:1)*(r<0?1/-r:r)}function vp(n,t,o){let s;for(;;){const r=nt(n,t,o);if(r===s||r===0||!isFinite(r))return[n,t];r>0?(n=Math.floor(n/r)*r,t=Math.ceil(t/r)*r):r<0&&(n=Math.ceil(n*r)/r,t=Math.floor(t*r)/r),s=r}}function Dp(n){return Math.max(1,Math.ceil(Math.log(Cp(n))/Math.LN2)+1)}function ts(){var n=$p,t=lo,o=Dp;function s(r){Array.isArray(r)||(r=Array.from(r));var l,i=r.length,a,c,d=new Array(i);for(l=0;l<i;++l)d[l]=n(r[l],l,r);var u=t(d),f=u[0],p=u[1],m=o(d,f,p);if(!Array.isArray(m)){const B=p,A=+m;if(t===lo&&([f,p]=vp(f,p,A)),m=es(f,p,A),m[0]<=f&&(c=nt(f,p,A)),m[m.length-1]>=p)if(B>=p&&t===lo){const h=nt(f,p,A);isFinite(h)&&(h>0?p=(Math.floor(p/h)+1)*h:h<0&&(p=(Math.ceil(p*-h)+1)/-h))}else m.pop()}for(var g=m.length,k=0,x=g;m[k]<=f;)++k;for(;m[x-1]>p;)--x;(k||x<g)&&(m=m.slice(k,x),g=x-k);var w=new Array(g+1),T;for(l=0;l<=g;++l)T=w[l]=[],T.x0=l>0?m[l-1]:f,T.x1=l<g?m[l]:p;if(isFinite(c)){if(c>0)for(l=0;l<i;++l)(a=d[l])!=null&&f<=a&&a<=p&&w[Math.min(g,Math.floor((a-f)/c))].push(r[l]);else if(c<0){for(l=0;l<i;++l)if((a=d[l])!=null&&f<=a&&a<=p){const B=Math.floor((f-a)*c);w[Math.min(g,B+(m[B]<=a))].push(r[l])}}}else for(l=0;l<i;++l)(a=d[l])!=null&&f<=a&&a<=p&&w[Qr(m,a,0,g)].push(r[l]);return w}return s.value=function(r){return arguments.length?(n=typeof r=="function"?r:io(r),s):n},s.domain=function(r){return arguments.length?(t=typeof r=="function"?r:io([r[0],r[1]]),s):t},s.thresholds=function(r){return arguments.length?(o=typeof r=="function"?r:io(Array.isArray(r)?Np.call(r):r),s):o},s}function cn(n,t){let o;if(t===void 0)for(const s of n)s!=null&&(o<s||o===void 0&&s>=s)&&(o=s);else{let s=-1;for(let r of n)(r=t(r,++s,n))!=null&&(o<r||o===void 0&&r>=r)&&(o=r)}return o}function ao(n,t){let o;if(t===void 0)for(const s of n)s!=null&&(o>s||o===void 0&&s>=s)&&(o=s);else{let s=-1;for(let r of n)(r=t(r,++s,n))!=null&&(o>r||o===void 0&&r>=r)&&(o=r)}return o}function Fp(n){return n}var co=1,uo=2,fo=3,Mt=4,ns=1e-6;function zp(n){return"translate("+n+",0)"}function Pp(n){return"translate(0,"+n+")"}function Rp(n){return t=>+n(t)}function Op(n,t){return t=Math.max(0,n.bandwidth()-t*2)/2,n.round()&&(t=Math.round(t)),o=>+n(o)+t}function Ip(){return!this.__axis}function os(n,t){var o=[],s=null,r=null,l=6,i=6,a=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=n===co||n===Mt?-1:1,u=n===Mt||n===uo?"x":"y",f=n===co||n===fo?zp:Pp;function p(m){var g=s??(t.ticks?t.ticks.apply(t,o):t.domain()),k=r??(t.tickFormat?t.tickFormat.apply(t,o):Fp),x=Math.max(l,0)+a,w=t.range(),T=+w[0]+c,B=+w[w.length-1]+c,A=(t.bandwidth?Op:Rp)(t.copy(),c),h=m.selection?m.selection():m,y=h.selectAll(".domain").data([null]),S=h.selectAll(".tick").data(g,t).order(),N=S.exit(),v=S.enter().append("g").attr("class","tick"),C=S.select("line"),$=S.select("text");y=y.merge(y.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(v),C=C.merge(v.append("line").attr("stroke","currentColor").attr(u+"2",d*l)),$=$.merge(v.append("text").attr("fill","currentColor").attr(u,d*x).attr("dy",n===co?"0em":n===fo?"0.71em":"0.32em")),m!==h&&(y=y.transition(m),S=S.transition(m),C=C.transition(m),$=$.transition(m),N=N.transition(m).attr("opacity",ns).attr("transform",function(E){return isFinite(E=A(E))?f(E+c):this.getAttribute("transform")}),v.attr("opacity",ns).attr("transform",function(E){var _=this.parentNode.__axis;return f((_&&isFinite(_=_(E))?_:A(E))+c)})),N.remove(),y.attr("d",n===Mt||n===uo?i?"M"+d*i+","+T+"H"+c+"V"+B+"H"+d*i:"M"+c+","+T+"V"+B:i?"M"+T+","+d*i+"V"+c+"H"+B+"V"+d*i:"M"+T+","+c+"H"+B),S.attr("opacity",1).attr("transform",function(E){return f(A(E)+c)}),C.attr(u+"2",d*l),$.attr(u,d*x).text(k),h.filter(Ip).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",n===uo?"start":n===Mt?"end":"middle"),h.each(function(){this.__axis=A})}return p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return o=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(o=m==null?[]:Array.from(m),p):o.slice()},p.tickValues=function(m){return arguments.length?(s=m==null?null:Array.from(m),p):s&&s.slice()},p.tickFormat=function(m){return arguments.length?(r=m,p):r},p.tickSize=function(m){return arguments.length?(l=i=+m,p):l},p.tickSizeInner=function(m){return arguments.length?(l=+m,p):l},p.tickSizeOuter=function(m){return arguments.length?(i=+m,p):i},p.tickPadding=function(m){return arguments.length?(a=+m,p):a},p.offset=function(m){return arguments.length?(c=+m,p):c},p}function dn(n){return os(fo,n)}function un(n){return os(Mt,n)}var Lp={value:()=>{}};function rs(){for(var n=0,t=arguments.length,o={},s;n<t;++n){if(!(s=arguments[n]+"")||s in o||/[\s.]/.test(s))throw new Error("illegal type: "+s);o[s]=[]}return new fn(o)}function fn(n){this._=n}function Hp(n,t){return n.trim().split(/^|\s+/).map(function(o){var s="",r=o.indexOf(".");if(r>=0&&(s=o.slice(r+1),o=o.slice(0,r)),o&&!t.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:s}})}fn.prototype=rs.prototype={constructor:fn,on:function(n,t){var o=this._,s=Hp(n+"",o),r,l=-1,i=s.length;if(arguments.length<2){for(;++l<i;)if((r=(n=s[l]).type)&&(r=jp(o[r],n.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<i;)if(r=(n=s[l]).type)o[r]=ss(o[r],n.name,t);else if(t==null)for(r in o)o[r]=ss(o[r],n.name,null);return this},copy:function(){var n={},t=this._;for(var o in t)n[o]=t[o].slice();return new fn(n)},call:function(n,t){if((r=arguments.length-2)>0)for(var o=new Array(r),s=0,r,l;s<r;++s)o[s]=arguments[s+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(l=this._[n],s=0,r=l.length;s<r;++s)l[s].value.apply(t,o)},apply:function(n,t,o){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var s=this._[n],r=0,l=s.length;r<l;++r)s[r].value.apply(t,o)}};function jp(n,t){for(var o=0,s=n.length,r;o<s;++o)if((r=n[o]).name===t)return r.value}function ss(n,t,o){for(var s=0,r=n.length;s<r;++s)if(n[s].name===t){n[s]=Lp,n=n.slice(0,s).concat(n.slice(s+1));break}return o!=null&&n.push({name:t,value:o}),n}var po="http://www.w3.org/1999/xhtml";const ls={svg:"http://www.w3.org/2000/svg",xhtml:po,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pn(n){var t=n+="",o=t.indexOf(":");return o>=0&&(t=n.slice(0,o))!=="xmlns"&&(n=n.slice(o+1)),ls.hasOwnProperty(t)?{space:ls[t],local:n}:n}function Zp(n){return function(){var t=this.ownerDocument,o=this.namespaceURI;return o===po&&t.documentElement.namespaceURI===po?t.createElement(n):t.createElementNS(o,n)}}function Up(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function is(n){var t=pn(n);return(t.local?Up:Zp)(t)}function qp(){}function mo(n){return n==null?qp:function(){return this.querySelector(n)}}function Wp(n){typeof n!="function"&&(n=mo(n));for(var t=this._groups,o=t.length,s=new Array(o),r=0;r<o;++r)for(var l=t[r],i=l.length,a=s[r]=new Array(i),c,d,u=0;u<i;++u)(c=l[u])&&(d=n.call(c,c.__data__,u,l))&&("__data__"in c&&(d.__data__=c.__data__),a[u]=d);return new ne(s,this._parents)}function as(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function Kp(){return[]}function cs(n){return n==null?Kp:function(){return this.querySelectorAll(n)}}function Yp(n){return function(){return as(n.apply(this,arguments))}}function Xp(n){typeof n=="function"?n=Yp(n):n=cs(n);for(var t=this._groups,o=t.length,s=[],r=[],l=0;l<o;++l)for(var i=t[l],a=i.length,c,d=0;d<a;++d)(c=i[d])&&(s.push(n.call(c,c.__data__,d,i)),r.push(c));return new ne(s,r)}function ds(n){return function(){return this.matches(n)}}function us(n){return function(t){return t.matches(n)}}var Gp=Array.prototype.find;function Jp(n){return function(){return Gp.call(this.children,n)}}function Qp(){return this.firstElementChild}function em(n){return this.select(n==null?Qp:Jp(typeof n=="function"?n:us(n)))}var tm=Array.prototype.filter;function nm(){return Array.from(this.children)}function om(n){return function(){return tm.call(this.children,n)}}function rm(n){return this.selectAll(n==null?nm:om(typeof n=="function"?n:us(n)))}function sm(n){typeof n!="function"&&(n=ds(n));for(var t=this._groups,o=t.length,s=new Array(o),r=0;r<o;++r)for(var l=t[r],i=l.length,a=s[r]=[],c,d=0;d<i;++d)(c=l[d])&&n.call(c,c.__data__,d,l)&&a.push(c);return new ne(s,this._parents)}function fs(n){return new Array(n.length)}function lm(){return new ne(this._enter||this._groups.map(fs),this._parents)}function mn(n,t){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=t}mn.prototype={constructor:mn,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,t){return this._parent.insertBefore(n,t)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function im(n){return function(){return n}}function am(n,t,o,s,r,l){for(var i=0,a,c=t.length,d=l.length;i<d;++i)(a=t[i])?(a.__data__=l[i],s[i]=a):o[i]=new mn(n,l[i]);for(;i<c;++i)(a=t[i])&&(r[i]=a)}function cm(n,t,o,s,r,l,i){var a,c,d=new Map,u=t.length,f=l.length,p=new Array(u),m;for(a=0;a<u;++a)(c=t[a])&&(p[a]=m=i.call(c,c.__data__,a,t)+"",d.has(m)?r[a]=c:d.set(m,c));for(a=0;a<f;++a)m=i.call(n,l[a],a,l)+"",(c=d.get(m))?(s[a]=c,c.__data__=l[a],d.delete(m)):o[a]=new mn(n,l[a]);for(a=0;a<u;++a)(c=t[a])&&d.get(p[a])===c&&(r[a]=c)}function dm(n){return n.__data__}function um(n,t){if(!arguments.length)return Array.from(this,dm);var o=t?cm:am,s=this._parents,r=this._groups;typeof n!="function"&&(n=im(n));for(var l=r.length,i=new Array(l),a=new Array(l),c=new Array(l),d=0;d<l;++d){var u=s[d],f=r[d],p=f.length,m=fm(n.call(u,u&&u.__data__,d,s)),g=m.length,k=a[d]=new Array(g),x=i[d]=new Array(g),w=c[d]=new Array(p);o(u,f,k,x,w,m,t);for(var T=0,B=0,A,h;T<g;++T)if(A=k[T]){for(T>=B&&(B=T+1);!(h=x[B])&&++B<g;);A._next=h||null}}return i=new ne(i,s),i._enter=a,i._exit=c,i}function fm(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function pm(){return new ne(this._exit||this._groups.map(fs),this._parents)}function mm(n,t,o){var s=this.enter(),r=this,l=this.exit();return typeof n=="function"?(s=n(s),s&&(s=s.selection())):s=s.append(n+""),t!=null&&(r=t(r),r&&(r=r.selection())),o==null?l.remove():o(l),s&&r?s.merge(r).order():r}function hm(n){for(var t=n.selection?n.selection():n,o=this._groups,s=t._groups,r=o.length,l=s.length,i=Math.min(r,l),a=new Array(r),c=0;c<i;++c)for(var d=o[c],u=s[c],f=d.length,p=a[c]=new Array(f),m,g=0;g<f;++g)(m=d[g]||u[g])&&(p[g]=m);for(;c<r;++c)a[c]=o[c];return new ne(a,this._parents)}function gm(){for(var n=this._groups,t=-1,o=n.length;++t<o;)for(var s=n[t],r=s.length-1,l=s[r],i;--r>=0;)(i=s[r])&&(l&&i.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(i,l),l=i);return this}function ym(n){n||(n=_m);function t(f,p){return f&&p?n(f.__data__,p.__data__):!f-!p}for(var o=this._groups,s=o.length,r=new Array(s),l=0;l<s;++l){for(var i=o[l],a=i.length,c=r[l]=new Array(a),d,u=0;u<a;++u)(d=i[u])&&(c[u]=d);c.sort(t)}return new ne(r,this._parents).order()}function _m(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function km(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function wm(){return Array.from(this)}function bm(){for(var n=this._groups,t=0,o=n.length;t<o;++t)for(var s=n[t],r=0,l=s.length;r<l;++r){var i=s[r];if(i)return i}return null}function xm(){let n=0;for(const t of this)++n;return n}function Vm(){return!this.node()}function Bm(n){for(var t=this._groups,o=0,s=t.length;o<s;++o)for(var r=t[o],l=0,i=r.length,a;l<i;++l)(a=r[l])&&n.call(a,a.__data__,l,r);return this}function Cm(n){return function(){this.removeAttribute(n)}}function $m(n){return function(){this.removeAttributeNS(n.space,n.local)}}function Em(n,t){return function(){this.setAttribute(n,t)}}function Nm(n,t){return function(){this.setAttributeNS(n.space,n.local,t)}}function Sm(n,t){return function(){var o=t.apply(this,arguments);o==null?this.removeAttribute(n):this.setAttribute(n,o)}}function Tm(n,t){return function(){var o=t.apply(this,arguments);o==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,o)}}function Mm(n,t){var o=pn(n);if(arguments.length<2){var s=this.node();return o.local?s.getAttributeNS(o.space,o.local):s.getAttribute(o)}return this.each((t==null?o.local?$m:Cm:typeof t=="function"?o.local?Tm:Sm:o.local?Nm:Em)(o,t))}function ps(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function Am(n){return function(){this.style.removeProperty(n)}}function vm(n,t,o){return function(){this.style.setProperty(n,t,o)}}function Dm(n,t,o){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(n):this.style.setProperty(n,s,o)}}function Fm(n,t,o){return arguments.length>1?this.each((t==null?Am:typeof t=="function"?Dm:vm)(n,t,o??"")):ot(this.node(),n)}function ot(n,t){return n.style.getPropertyValue(t)||ps(n).getComputedStyle(n,null).getPropertyValue(t)}function zm(n){return function(){delete this[n]}}function Pm(n,t){return function(){this[n]=t}}function Rm(n,t){return function(){var o=t.apply(this,arguments);o==null?delete this[n]:this[n]=o}}function Om(n,t){return arguments.length>1?this.each((t==null?zm:typeof t=="function"?Rm:Pm)(n,t)):this.node()[n]}function ms(n){return n.trim().split(/^|\s+/)}function ho(n){return n.classList||new hs(n)}function hs(n){this._node=n,this._names=ms(n.getAttribute("class")||"")}hs.prototype={add:function(n){var t=this._names.indexOf(n);t<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var t=this._names.indexOf(n);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function gs(n,t){for(var o=ho(n),s=-1,r=t.length;++s<r;)o.add(t[s])}function ys(n,t){for(var o=ho(n),s=-1,r=t.length;++s<r;)o.remove(t[s])}function Im(n){return function(){gs(this,n)}}function Lm(n){return function(){ys(this,n)}}function Hm(n,t){return function(){(t.apply(this,arguments)?gs:ys)(this,n)}}function jm(n,t){var o=ms(n+"");if(arguments.length<2){for(var s=ho(this.node()),r=-1,l=o.length;++r<l;)if(!s.contains(o[r]))return!1;return!0}return this.each((typeof t=="function"?Hm:t?Im:Lm)(o,t))}function Zm(){this.textContent=""}function Um(n){return function(){this.textContent=n}}function qm(n){return function(){var t=n.apply(this,arguments);this.textContent=t??""}}function Wm(n){return arguments.length?this.each(n==null?Zm:(typeof n=="function"?qm:Um)(n)):this.node().textContent}function Km(){this.innerHTML=""}function Ym(n){return function(){this.innerHTML=n}}function Xm(n){return function(){var t=n.apply(this,arguments);this.innerHTML=t??""}}function Gm(n){return arguments.length?this.each(n==null?Km:(typeof n=="function"?Xm:Ym)(n)):this.node().innerHTML}function Jm(){this.nextSibling&&this.parentNode.appendChild(this)}function Qm(){return this.each(Jm)}function eh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function th(){return this.each(eh)}function nh(n){var t=typeof n=="function"?n:is(n);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function oh(){return null}function rh(n,t){var o=typeof n=="function"?n:is(n),s=t==null?oh:typeof t=="function"?t:mo(t);return this.select(function(){return this.insertBefore(o.apply(this,arguments),s.apply(this,arguments)||null)})}function sh(){var n=this.parentNode;n&&n.removeChild(this)}function lh(){return this.each(sh)}function ih(){var n=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}function ah(){var n=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}function ch(n){return this.select(n?ah:ih)}function dh(n){return arguments.length?this.property("__data__",n):this.node().__data__}function uh(n){return function(t){n.call(this,t,this.__data__)}}function fh(n){return n.trim().split(/^|\s+/).map(function(t){var o="",s=t.indexOf(".");return s>=0&&(o=t.slice(s+1),t=t.slice(0,s)),{type:t,name:o}})}function ph(n){return function(){var t=this.__on;if(t){for(var o=0,s=-1,r=t.length,l;o<r;++o)l=t[o],(!n.type||l.type===n.type)&&l.name===n.name?this.removeEventListener(l.type,l.listener,l.options):t[++s]=l;++s?t.length=s:delete this.__on}}}function mh(n,t,o){return function(){var s=this.__on,r,l=uh(t);if(s){for(var i=0,a=s.length;i<a;++i)if((r=s[i]).type===n.type&&r.name===n.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=l,r.options=o),r.value=t;return}}this.addEventListener(n.type,l,o),r={type:n.type,name:n.name,value:t,listener:l,options:o},s?s.push(r):this.__on=[r]}}function hh(n,t,o){var s=fh(n+""),r,l=s.length,i;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,d=a.length,u;c<d;++c)for(r=0,u=a[c];r<l;++r)if((i=s[r]).type===u.type&&i.name===u.name)return u.value}return}for(a=t?mh:ph,r=0;r<l;++r)this.each(a(s[r],t,o));return this}function _s(n,t,o){var s=ps(n),r=s.CustomEvent;typeof r=="function"?r=new r(t,o):(r=s.document.createEvent("Event"),o?(r.initEvent(t,o.bubbles,o.cancelable),r.detail=o.detail):r.initEvent(t,!1,!1)),n.dispatchEvent(r)}function gh(n,t){return function(){return _s(this,n,t)}}function yh(n,t){return function(){return _s(this,n,t.apply(this,arguments))}}function _h(n,t){return this.each((typeof t=="function"?yh:gh)(n,t))}function*kh(){for(var n=this._groups,t=0,o=n.length;t<o;++t)for(var s=n[t],r=0,l=s.length,i;r<l;++r)(i=s[r])&&(yield i)}var go=[null];function ne(n,t){this._groups=n,this._parents=t}function At(){return new ne([[document.documentElement]],go)}function wh(){return this}ne.prototype=At.prototype={constructor:ne,select:Wp,selectAll:Xp,selectChild:em,selectChildren:rm,filter:sm,data:um,enter:lm,exit:pm,join:mm,merge:hm,selection:wh,order:gm,sort:ym,call:km,nodes:wm,node:bm,size:xm,empty:Vm,each:Bm,attr:Mm,style:Fm,property:Om,classed:jm,text:Wm,html:Gm,raise:Qm,lower:th,append:nh,insert:rh,remove:lh,clone:ch,datum:dh,on:hh,dispatch:_h,[Symbol.iterator]:kh};function ks(n){return typeof n=="string"?new ne([[document.querySelector(n)]],[document.documentElement]):new ne([[n]],go)}function bh(n){return typeof n=="string"?new ne([document.querySelectorAll(n)],[document.documentElement]):new ne([as(n)],go)}function yo(n,t,o){n.prototype=t.prototype=o,o.constructor=n}function ws(n,t){var o=Object.create(n.prototype);for(var s in t)o[s]=t[s];return o}function vt(){}var Dt=.7,hn=1/Dt,rt="\\s*([+-]?\\d+)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xh=/^#([0-9a-f]{3,8})$/,Vh=new RegExp(`^rgb\\(${rt},${rt},${rt}\\)$`),Bh=new RegExp(`^rgb\\(${_e},${_e},${_e}\\)$`),Ch=new RegExp(`^rgba\\(${rt},${rt},${rt},${Ft}\\)$`),$h=new RegExp(`^rgba\\(${_e},${_e},${_e},${Ft}\\)$`),Eh=new RegExp(`^hsl\\(${Ft},${_e},${_e}\\)$`),Nh=new RegExp(`^hsla\\(${Ft},${_e},${_e},${Ft}\\)$`),bs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};yo(vt,Le,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:xs,formatHex:xs,formatHex8:Sh,formatHsl:Th,formatRgb:Vs,toString:Vs});function xs(){return this.rgb().formatHex()}function Sh(){return this.rgb().formatHex8()}function Th(){return Ns(this).formatHsl()}function Vs(){return this.rgb().formatRgb()}function Le(n){var t,o;return n=(n+"").trim().toLowerCase(),(t=xh.exec(n))?(o=t[1].length,t=parseInt(t[1],16),o===6?Bs(t):o===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):o===8?gn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):o===4?gn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Vh.exec(n))?new se(t[1],t[2],t[3],1):(t=Bh.exec(n))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ch.exec(n))?gn(t[1],t[2],t[3],t[4]):(t=$h.exec(n))?gn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Eh.exec(n))?Es(t[1],t[2]/100,t[3]/100,1):(t=Nh.exec(n))?Es(t[1],t[2]/100,t[3]/100,t[4]):bs.hasOwnProperty(n)?Bs(bs[n]):n==="transparent"?new se(NaN,NaN,NaN,0):null}function Bs(n){return new se(n>>16&255,n>>8&255,n&255,1)}function gn(n,t,o,s){return s<=0&&(n=t=o=NaN),new se(n,t,o,s)}function Mh(n){return n instanceof vt||(n=Le(n)),n?(n=n.rgb(),new se(n.r,n.g,n.b,n.opacity)):new se}function _o(n,t,o,s){return arguments.length===1?Mh(n):new se(n,t,o,s??1)}function se(n,t,o,s){this.r=+n,this.g=+t,this.b=+o,this.opacity=+s}yo(se,_o,ws(vt,{brighter(n){return n=n==null?hn:Math.pow(hn,n),new se(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Dt:Math.pow(Dt,n),new se(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new se(He(this.r),He(this.g),He(this.b),yn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Cs,formatHex:Cs,formatHex8:Ah,formatRgb:$s,toString:$s}));function Cs(){return`#${je(this.r)}${je(this.g)}${je(this.b)}`}function Ah(){return`#${je(this.r)}${je(this.g)}${je(this.b)}${je((isNaN(this.opacity)?1:this.opacity)*255)}`}function $s(){const n=yn(this.opacity);return`${n===1?"rgb(":"rgba("}${He(this.r)}, ${He(this.g)}, ${He(this.b)}${n===1?")":`, ${n})`}`}function yn(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function He(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function je(n){return n=He(n),(n<16?"0":"")+n.toString(16)}function Es(n,t,o,s){return s<=0?n=t=o=NaN:o<=0||o>=1?n=t=NaN:t<=0&&(n=NaN),new fe(n,t,o,s)}function Ns(n){if(n instanceof fe)return new fe(n.h,n.s,n.l,n.opacity);if(n instanceof vt||(n=Le(n)),!n)return new fe;if(n instanceof fe)return n;n=n.rgb();var t=n.r/255,o=n.g/255,s=n.b/255,r=Math.min(t,o,s),l=Math.max(t,o,s),i=NaN,a=l-r,c=(l+r)/2;return a?(t===l?i=(o-s)/a+(o<s)*6:o===l?i=(s-t)/a+2:i=(t-o)/a+4,a/=c<.5?l+r:2-l-r,i*=60):a=c>0&&c<1?0:i,new fe(i,a,c,n.opacity)}function vh(n,t,o,s){return arguments.length===1?Ns(n):new fe(n,t,o,s??1)}function fe(n,t,o,s){this.h=+n,this.s=+t,this.l=+o,this.opacity=+s}yo(fe,vh,ws(vt,{brighter(n){return n=n==null?hn:Math.pow(hn,n),new fe(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Dt:Math.pow(Dt,n),new fe(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,t=isNaN(n)||isNaN(this.s)?0:this.s,o=this.l,s=o+(o<.5?o:1-o)*t,r=2*o-s;return new se(ko(n>=240?n-240:n+120,r,s),ko(n,r,s),ko(n<120?n+240:n-120,r,s),this.opacity)},clamp(){return new fe(Ss(this.h),_n(this.s),_n(this.l),yn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=yn(this.opacity);return`${n===1?"hsl(":"hsla("}${Ss(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Ss(n){return n=(n||0)%360,n<0?n+360:n}function _n(n){return Math.max(0,Math.min(1,n||0))}function ko(n,t,o){return(n<60?t+(o-t)*n/60:n<180?o:n<240?t+(o-t)*(240-n)/60:t)*255}const wo=n=>()=>n;function Dh(n,t){return function(o){return n+o*t}}function Fh(n,t,o){return n=Math.pow(n,o),t=Math.pow(t,o)-n,o=1/o,function(s){return Math.pow(n+s*t,o)}}function zh(n){return(n=+n)==1?Ts:function(t,o){return o-t?Fh(t,o,n):wo(isNaN(t)?o:t)}}function Ts(n,t){var o=t-n;return o?Dh(n,o):wo(isNaN(n)?t:n)}const kn=function n(t){var o=zh(t);function s(r,l){var i=o((r=_o(r)).r,(l=_o(l)).r),a=o(r.g,l.g),c=o(r.b,l.b),d=Ts(r.opacity,l.opacity);return function(u){return r.r=i(u),r.g=a(u),r.b=c(u),r.opacity=d(u),r+""}}return s.gamma=n,s}(1);function Ph(n,t){t||(t=[]);var o=n?Math.min(t.length,n.length):0,s=t.slice(),r;return function(l){for(r=0;r<o;++r)s[r]=n[r]*(1-l)+t[r]*l;return s}}function Rh(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Oh(n,t){var o=t?t.length:0,s=n?Math.min(o,n.length):0,r=new Array(s),l=new Array(o),i;for(i=0;i<s;++i)r[i]=Vo(n[i],t[i]);for(;i<o;++i)l[i]=t[i];return function(a){for(i=0;i<s;++i)l[i]=r[i](a);return l}}function Ih(n,t){var o=new Date;return n=+n,t=+t,function(s){return o.setTime(n*(1-s)+t*s),o}}function pe(n,t){return n=+n,t=+t,function(o){return n*(1-o)+t*o}}function Lh(n,t){var o={},s={},r;(n===null||typeof n!="object")&&(n={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in n?o[r]=Vo(n[r],t[r]):s[r]=t[r];return function(l){for(r in o)s[r]=o[r](l);return s}}var bo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xo=new RegExp(bo.source,"g");function Hh(n){return function(){return n}}function jh(n){return function(t){return n(t)+""}}function Ms(n,t){var o=bo.lastIndex=xo.lastIndex=0,s,r,l,i=-1,a=[],c=[];for(n=n+"",t=t+"";(s=bo.exec(n))&&(r=xo.exec(t));)(l=r.index)>o&&(l=t.slice(o,l),a[i]?a[i]+=l:a[++i]=l),(s=s[0])===(r=r[0])?a[i]?a[i]+=r:a[++i]=r:(a[++i]=null,c.push({i,x:pe(s,r)})),o=xo.lastIndex;return o<t.length&&(l=t.slice(o),a[i]?a[i]+=l:a[++i]=l),a.length<2?c[0]?jh(c[0].x):Hh(t):(t=c.length,function(d){for(var u=0,f;u<t;++u)a[(f=c[u]).i]=f.x(d);return a.join("")})}function Vo(n,t){var o=typeof t,s;return t==null||o==="boolean"?wo(t):(o==="number"?pe:o==="string"?(s=Le(t))?(t=s,kn):Ms:t instanceof Le?kn:t instanceof Date?Ih:Rh(t)?Ph:Array.isArray(t)?Oh:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Lh:pe)(n,t)}function Zh(n,t){return n=+n,t=+t,function(o){return Math.round(n*(1-o)+t*o)}}var As=180/Math.PI,Bo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vs(n,t,o,s,r,l){var i,a,c;return(i=Math.sqrt(n*n+t*t))&&(n/=i,t/=i),(c=n*o+t*s)&&(o-=n*c,s-=t*c),(a=Math.sqrt(o*o+s*s))&&(o/=a,s/=a,c/=a),n*s<t*o&&(n=-n,t=-t,c=-c,i=-i),{translateX:r,translateY:l,rotate:Math.atan2(t,n)*As,skewX:Math.atan(c)*As,scaleX:i,scaleY:a}}var wn;function Uh(n){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return t.isIdentity?Bo:vs(t.a,t.b,t.c,t.d,t.e,t.f)}function qh(n){return n==null||(wn||(wn=document.createElementNS("http://www.w3.org/2000/svg","g")),wn.setAttribute("transform",n),!(n=wn.transform.baseVal.consolidate()))?Bo:(n=n.matrix,vs(n.a,n.b,n.c,n.d,n.e,n.f))}function Ds(n,t,o,s){function r(d){return d.length?d.pop()+" ":""}function l(d,u,f,p,m,g){if(d!==f||u!==p){var k=m.push("translate(",null,t,null,o);g.push({i:k-4,x:pe(d,f)},{i:k-2,x:pe(u,p)})}else(f||p)&&m.push("translate("+f+t+p+o)}function i(d,u,f,p){d!==u?(d-u>180?u+=360:u-d>180&&(d+=360),p.push({i:f.push(r(f)+"rotate(",null,s)-2,x:pe(d,u)})):u&&f.push(r(f)+"rotate("+u+s)}function a(d,u,f,p){d!==u?p.push({i:f.push(r(f)+"skewX(",null,s)-2,x:pe(d,u)}):u&&f.push(r(f)+"skewX("+u+s)}function c(d,u,f,p,m,g){if(d!==f||u!==p){var k=m.push(r(m)+"scale(",null,",",null,")");g.push({i:k-4,x:pe(d,f)},{i:k-2,x:pe(u,p)})}else(f!==1||p!==1)&&m.push(r(m)+"scale("+f+","+p+")")}return function(d,u){var f=[],p=[];return d=n(d),u=n(u),l(d.translateX,d.translateY,u.translateX,u.translateY,f,p),i(d.rotate,u.rotate,f,p),a(d.skewX,u.skewX,f,p),c(d.scaleX,d.scaleY,u.scaleX,u.scaleY,f,p),d=u=null,function(m){for(var g=-1,k=p.length,x;++g<k;)f[(x=p[g]).i]=x.x(m);return f.join("")}}}var Wh=Ds(Uh,"px, ","px)","deg)"),Kh=Ds(qh,", ",")",")"),st=0,zt=0,Pt=0,Fs=1e3,bn,Rt,xn=0,Ze=0,Vn=0,Ot=typeof performance=="object"&&performance.now?performance:Date,zs=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function Co(){return Ze||(zs(Yh),Ze=Ot.now()+Vn)}function Yh(){Ze=0}function Bn(){this._call=this._time=this._next=null}Bn.prototype=Ps.prototype={constructor:Bn,restart:function(n,t,o){if(typeof n!="function")throw new TypeError("callback is not a function");o=(o==null?Co():+o)+(t==null?0:+t),!this._next&&Rt!==this&&(Rt?Rt._next=this:bn=this,Rt=this),this._call=n,this._time=o,$o()},stop:function(){this._call&&(this._call=null,this._time=1/0,$o())}};function Ps(n,t,o){var s=new Bn;return s.restart(n,t,o),s}function Xh(){Co(),++st;for(var n=bn,t;n;)(t=Ze-n._time)>=0&&n._call.call(void 0,t),n=n._next;--st}function Rs(){Ze=(xn=Ot.now())+Vn,st=zt=0;try{Xh()}finally{st=0,Jh(),Ze=0}}function Gh(){var n=Ot.now(),t=n-xn;t>Fs&&(Vn-=t,xn=n)}function Jh(){for(var n,t=bn,o,s=1/0;t;)t._call?(s>t._time&&(s=t._time),n=t,t=t._next):(o=t._next,t._next=null,t=n?n._next=o:bn=o);Rt=n,$o(s)}function $o(n){if(!st){zt&&(zt=clearTimeout(zt));var t=n-Ze;t>24?(n<1/0&&(zt=setTimeout(Rs,n-Ot.now()-Vn)),Pt&&(Pt=clearInterval(Pt))):(Pt||(xn=Ot.now(),Pt=setInterval(Gh,Fs)),st=1,zs(Rs))}}function Os(n,t,o){var s=new Bn;return t=t==null?0:+t,s.restart(r=>{s.stop(),n(r+t)},t,o),s}var Qh=rs("start","end","cancel","interrupt"),eg=[],Is=0,Ls=1,Eo=2,Cn=3,Hs=4,No=5,$n=6;function En(n,t,o,s,r,l){var i=n.__transition;if(!i)n.__transition={};else if(o in i)return;tg(n,o,{name:t,index:s,group:r,on:Qh,tween:eg,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Is})}function So(n,t){var o=me(n,t);if(o.state>Is)throw new Error("too late; already scheduled");return o}function ke(n,t){var o=me(n,t);if(o.state>Cn)throw new Error("too late; already running");return o}function me(n,t){var o=n.__transition;if(!o||!(o=o[t]))throw new Error("transition not found");return o}function tg(n,t,o){var s=n.__transition,r;s[t]=o,o.timer=Ps(l,0,o.time);function l(d){o.state=Ls,o.timer.restart(i,o.delay,o.time),o.delay<=d&&i(d-o.delay)}function i(d){var u,f,p,m;if(o.state!==Ls)return c();for(u in s)if(m=s[u],m.name===o.name){if(m.state===Cn)return Os(i);m.state===Hs?(m.state=$n,m.timer.stop(),m.on.call("interrupt",n,n.__data__,m.index,m.group),delete s[u]):+u<t&&(m.state=$n,m.timer.stop(),m.on.call("cancel",n,n.__data__,m.index,m.group),delete s[u])}if(Os(function(){o.state===Cn&&(o.state=Hs,o.timer.restart(a,o.delay,o.time),a(d))}),o.state=Eo,o.on.call("start",n,n.__data__,o.index,o.group),o.state===Eo){for(o.state=Cn,r=new Array(p=o.tween.length),u=0,f=-1;u<p;++u)(m=o.tween[u].value.call(n,n.__data__,o.index,o.group))&&(r[++f]=m);r.length=f+1}}function a(d){for(var u=d<o.duration?o.ease.call(null,d/o.duration):(o.timer.restart(c),o.state=No,1),f=-1,p=r.length;++f<p;)r[f].call(n,u);o.state===No&&(o.on.call("end",n,n.__data__,o.index,o.group),c())}function c(){o.state=$n,o.timer.stop(),delete s[t];for(var d in s)return;delete n.__transition}}function ng(n,t){var o=n.__transition,s,r,l=!0,i;if(o){t=t==null?null:t+"";for(i in o){if((s=o[i]).name!==t){l=!1;continue}r=s.state>Eo&&s.state<No,s.state=$n,s.timer.stop(),s.on.call(r?"interrupt":"cancel",n,n.__data__,s.index,s.group),delete o[i]}l&&delete n.__transition}}function og(n){return this.each(function(){ng(this,n)})}function rg(n,t){var o,s;return function(){var r=ke(this,n),l=r.tween;if(l!==o){s=o=l;for(var i=0,a=s.length;i<a;++i)if(s[i].name===t){s=s.slice(),s.splice(i,1);break}}r.tween=s}}function sg(n,t,o){var s,r;if(typeof o!="function")throw new Error;return function(){var l=ke(this,n),i=l.tween;if(i!==s){r=(s=i).slice();for(var a={name:t,value:o},c=0,d=r.length;c<d;++c)if(r[c].name===t){r[c]=a;break}c===d&&r.push(a)}l.tween=r}}function lg(n,t){var o=this._id;if(n+="",arguments.length<2){for(var s=me(this.node(),o).tween,r=0,l=s.length,i;r<l;++r)if((i=s[r]).name===n)return i.value;return null}return this.each((t==null?rg:sg)(o,n,t))}function To(n,t,o){var s=n._id;return n.each(function(){var r=ke(this,s);(r.value||(r.value={}))[t]=o.apply(this,arguments)}),function(r){return me(r,s).value[t]}}function js(n,t){var o;return(typeof t=="number"?pe:t instanceof Le?kn:(o=Le(t))?(t=o,kn):Ms)(n,t)}function ig(n){return function(){this.removeAttribute(n)}}function ag(n){return function(){this.removeAttributeNS(n.space,n.local)}}function cg(n,t,o){var s,r=o+"",l;return function(){var i=this.getAttribute(n);return i===r?null:i===s?l:l=t(s=i,o)}}function dg(n,t,o){var s,r=o+"",l;return function(){var i=this.getAttributeNS(n.space,n.local);return i===r?null:i===s?l:l=t(s=i,o)}}function ug(n,t,o){var s,r,l;return function(){var i,a=o(this),c;return a==null?void this.removeAttribute(n):(i=this.getAttribute(n),c=a+"",i===c?null:i===s&&c===r?l:(r=c,l=t(s=i,a)))}}function fg(n,t,o){var s,r,l;return function(){var i,a=o(this),c;return a==null?void this.removeAttributeNS(n.space,n.local):(i=this.getAttributeNS(n.space,n.local),c=a+"",i===c?null:i===s&&c===r?l:(r=c,l=t(s=i,a)))}}function pg(n,t){var o=pn(n),s=o==="transform"?Kh:js;return this.attrTween(n,typeof t=="function"?(o.local?fg:ug)(o,s,To(this,"attr."+n,t)):t==null?(o.local?ag:ig)(o):(o.local?dg:cg)(o,s,t))}function mg(n,t){return function(o){this.setAttribute(n,t.call(this,o))}}function hg(n,t){return function(o){this.setAttributeNS(n.space,n.local,t.call(this,o))}}function gg(n,t){var o,s;function r(){var l=t.apply(this,arguments);return l!==s&&(o=(s=l)&&hg(n,l)),o}return r._value=t,r}function yg(n,t){var o,s;function r(){var l=t.apply(this,arguments);return l!==s&&(o=(s=l)&&mg(n,l)),o}return r._value=t,r}function _g(n,t){var o="attr."+n;if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;var s=pn(n);return this.tween(o,(s.local?gg:yg)(s,t))}function kg(n,t){return function(){So(this,n).delay=+t.apply(this,arguments)}}function wg(n,t){return t=+t,function(){So(this,n).delay=t}}function bg(n){var t=this._id;return arguments.length?this.each((typeof n=="function"?kg:wg)(t,n)):me(this.node(),t).delay}function xg(n,t){return function(){ke(this,n).duration=+t.apply(this,arguments)}}function Vg(n,t){return t=+t,function(){ke(this,n).duration=t}}function Bg(n){var t=this._id;return arguments.length?this.each((typeof n=="function"?xg:Vg)(t,n)):me(this.node(),t).duration}function Cg(n,t){if(typeof t!="function")throw new Error;return function(){ke(this,n).ease=t}}function $g(n){var t=this._id;return arguments.length?this.each(Cg(t,n)):me(this.node(),t).ease}function Eg(n,t){return function(){var o=t.apply(this,arguments);if(typeof o!="function")throw new Error;ke(this,n).ease=o}}function Ng(n){if(typeof n!="function")throw new Error;return this.each(Eg(this._id,n))}function Sg(n){typeof n!="function"&&(n=ds(n));for(var t=this._groups,o=t.length,s=new Array(o),r=0;r<o;++r)for(var l=t[r],i=l.length,a=s[r]=[],c,d=0;d<i;++d)(c=l[d])&&n.call(c,c.__data__,d,l)&&a.push(c);return new Be(s,this._parents,this._name,this._id)}function Tg(n){if(n._id!==this._id)throw new Error;for(var t=this._groups,o=n._groups,s=t.length,r=o.length,l=Math.min(s,r),i=new Array(s),a=0;a<l;++a)for(var c=t[a],d=o[a],u=c.length,f=i[a]=new Array(u),p,m=0;m<u;++m)(p=c[m]||d[m])&&(f[m]=p);for(;a<s;++a)i[a]=t[a];return new Be(i,this._parents,this._name,this._id)}function Mg(n){return(n+"").trim().split(/^|\s+/).every(function(t){var o=t.indexOf(".");return o>=0&&(t=t.slice(0,o)),!t||t==="start"})}function Ag(n,t,o){var s,r,l=Mg(t)?So:ke;return function(){var i=l(this,n),a=i.on;a!==s&&(r=(s=a).copy()).on(t,o),i.on=r}}function vg(n,t){var o=this._id;return arguments.length<2?me(this.node(),o).on.on(n):this.each(Ag(o,n,t))}function Dg(n){return function(){var t=this.parentNode;for(var o in this.__transition)if(+o!==n)return;t&&t.removeChild(this)}}function Fg(){return this.on("end.remove",Dg(this._id))}function zg(n){var t=this._name,o=this._id;typeof n!="function"&&(n=mo(n));for(var s=this._groups,r=s.length,l=new Array(r),i=0;i<r;++i)for(var a=s[i],c=a.length,d=l[i]=new Array(c),u,f,p=0;p<c;++p)(u=a[p])&&(f=n.call(u,u.__data__,p,a))&&("__data__"in u&&(f.__data__=u.__data__),d[p]=f,En(d[p],t,o,p,d,me(u,o)));return new Be(l,this._parents,t,o)}function Pg(n){var t=this._name,o=this._id;typeof n!="function"&&(n=cs(n));for(var s=this._groups,r=s.length,l=[],i=[],a=0;a<r;++a)for(var c=s[a],d=c.length,u,f=0;f<d;++f)if(u=c[f]){for(var p=n.call(u,u.__data__,f,c),m,g=me(u,o),k=0,x=p.length;k<x;++k)(m=p[k])&&En(m,t,o,k,p,g);l.push(p),i.push(u)}return new Be(l,i,t,o)}var Rg=At.prototype.constructor;function Og(){return new Rg(this._groups,this._parents)}function Ig(n,t){var o,s,r;return function(){var l=ot(this,n),i=(this.style.removeProperty(n),ot(this,n));return l===i?null:l===o&&i===s?r:r=t(o=l,s=i)}}function Zs(n){return function(){this.style.removeProperty(n)}}function Lg(n,t,o){var s,r=o+"",l;return function(){var i=ot(this,n);return i===r?null:i===s?l:l=t(s=i,o)}}function Hg(n,t,o){var s,r,l;return function(){var i=ot(this,n),a=o(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(n),ot(this,n))),i===c?null:i===s&&c===r?l:(r=c,l=t(s=i,a))}}function jg(n,t){var o,s,r,l="style."+t,i="end."+l,a;return function(){var c=ke(this,n),d=c.on,u=c.value[l]==null?a||(a=Zs(t)):void 0;(d!==o||r!==u)&&(s=(o=d).copy()).on(i,r=u),c.on=s}}function Zg(n,t,o){var s=(n+="")=="transform"?Wh:js;return t==null?this.styleTween(n,Ig(n,s)).on("end.style."+n,Zs(n)):typeof t=="function"?this.styleTween(n,Hg(n,s,To(this,"style."+n,t))).each(jg(this._id,n)):this.styleTween(n,Lg(n,s,t),o).on("end.style."+n,null)}function Ug(n,t,o){return function(s){this.style.setProperty(n,t.call(this,s),o)}}function qg(n,t,o){var s,r;function l(){var i=t.apply(this,arguments);return i!==r&&(s=(r=i)&&Ug(n,i,o)),s}return l._value=t,l}function Wg(n,t,o){var s="style."+(n+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(t==null)return this.tween(s,null);if(typeof t!="function")throw new Error;return this.tween(s,qg(n,t,o??""))}function Kg(n){return function(){this.textContent=n}}function Yg(n){return function(){var t=n(this);this.textContent=t??""}}function Xg(n){return this.tween("text",typeof n=="function"?Yg(To(this,"text",n)):Kg(n==null?"":n+""))}function Gg(n){return function(t){this.textContent=n.call(this,t)}}function Jg(n){var t,o;function s(){var r=n.apply(this,arguments);return r!==o&&(t=(o=r)&&Gg(r)),t}return s._value=n,s}function Qg(n){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(n==null)return this.tween(t,null);if(typeof n!="function")throw new Error;return this.tween(t,Jg(n))}function ey(){for(var n=this._name,t=this._id,o=Us(),s=this._groups,r=s.length,l=0;l<r;++l)for(var i=s[l],a=i.length,c,d=0;d<a;++d)if(c=i[d]){var u=me(c,t);En(c,n,o,d,i,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Be(s,this._parents,n,o)}function ty(){var n,t,o=this,s=o._id,r=o.size();return new Promise(function(l,i){var a={value:i},c={value:function(){--r===0&&l()}};o.each(function(){var d=ke(this,s),u=d.on;u!==n&&(t=(n=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),d.on=t}),r===0&&l()})}var ny=0;function Be(n,t,o,s){this._groups=n,this._parents=t,this._name=o,this._id=s}function Us(){return++ny}var Ce=At.prototype;Be.prototype={constructor:Be,select:zg,selectAll:Pg,selectChild:Ce.selectChild,selectChildren:Ce.selectChildren,filter:Sg,merge:Tg,selection:Og,transition:ey,call:Ce.call,nodes:Ce.nodes,node:Ce.node,size:Ce.size,empty:Ce.empty,each:Ce.each,on:vg,attr:pg,attrTween:_g,style:Zg,styleTween:Wg,text:Xg,textTween:Qg,remove:Fg,tween:lg,delay:bg,duration:Bg,ease:$g,easeVarying:Ng,end:ty,[Symbol.iterator]:Ce[Symbol.iterator]};function oy(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var ry={time:null,delay:0,duration:250,ease:oy};function sy(n,t){for(var o;!(o=n.__transition)||!(o=o[t]);)if(!(n=n.parentNode))throw new Error(`transition ${t} not found`);return o}function ly(n){var t,o;n instanceof Be?(t=n._id,n=n._name):(t=Us(),(o=ry).time=Co(),n=n==null?null:n+"");for(var s=this._groups,r=s.length,l=0;l<r;++l)for(var i=s[l],a=i.length,c,d=0;d<a;++d)(c=i[d])&&En(c,n,t,d,i,o||sy(c,t));return new Be(s,this._parents,n,t)}At.prototype.interrupt=og,At.prototype.transition=ly;function iy(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function Nn(n,t){if((o=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var o,s=n.slice(0,o);return[s.length>1?s[0]+s.slice(2):s,+n.slice(o+1)]}function lt(n){return n=Nn(Math.abs(n)),n?n[1]:NaN}function ay(n,t){return function(o,s){for(var r=o.length,l=[],i=0,a=n[0],c=0;r>0&&a>0&&(c+a+1>s&&(a=Math.max(1,s-c)),l.push(o.substring(r-=a,r+a)),!((c+=a+1)>s));)a=n[i=(i+1)%n.length];return l.reverse().join(t)}}function cy(n){return function(t){return t.replace(/[0-9]/g,function(o){return n[+o]})}}var dy=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sn(n){if(!(t=dy.exec(n)))throw new Error("invalid format: "+n);var t;return new Mo({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Sn.prototype=Mo.prototype;function Mo(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}Mo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function uy(n){e:for(var t=n.length,o=1,s=-1,r;o<t;++o)switch(n[o]){case".":s=r=o;break;case"0":s===0&&(s=o),r=o;break;default:if(!+n[o])break e;s>0&&(s=0);break}return s>0?n.slice(0,s)+n.slice(r+1):n}var qs;function fy(n,t){var o=Nn(n,t);if(!o)return n+"";var s=o[0],r=o[1],l=r-(qs=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,i=s.length;return l===i?s:l>i?s+new Array(l-i+1).join("0"):l>0?s.slice(0,l)+"."+s.slice(l):"0."+new Array(1-l).join("0")+Nn(n,Math.max(0,t+l-1))[0]}function Ws(n,t){var o=Nn(n,t);if(!o)return n+"";var s=o[0],r=o[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}const Ks={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:iy,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Ws(n*100,t),r:Ws,s:fy,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function Ys(n){return n}var Xs=Array.prototype.map,Gs=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function py(n){var t=n.grouping===void 0||n.thousands===void 0?Ys:ay(Xs.call(n.grouping,Number),n.thousands+""),o=n.currency===void 0?"":n.currency[0]+"",s=n.currency===void 0?"":n.currency[1]+"",r=n.decimal===void 0?".":n.decimal+"",l=n.numerals===void 0?Ys:cy(Xs.call(n.numerals,String)),i=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function d(f){f=Sn(f);var p=f.fill,m=f.align,g=f.sign,k=f.symbol,x=f.zero,w=f.width,T=f.comma,B=f.precision,A=f.trim,h=f.type;h==="n"?(T=!0,h="g"):Ks[h]||(B===void 0&&(B=12),A=!0,h="g"),(x||p==="0"&&m==="=")&&(x=!0,p="0",m="=");var y=k==="$"?o:k==="#"&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",S=k==="$"?s:/[%p]/.test(h)?i:"",N=Ks[h],v=/[defgprs%]/.test(h);B=B===void 0?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function C($){var E=y,_=S,b,D,F;if(h==="c")_=N($)+_,$="";else{$=+$;var H=$<0||1/$<0;if($=isNaN($)?c:N(Math.abs($),B),A&&($=uy($)),H&&+$==0&&g!=="+"&&(H=!1),E=(H?g==="("?g:a:g==="-"||g==="("?"":g)+E,_=(h==="s"?Gs[8+qs/3]:"")+_+(H&&g==="("?")":""),v){for(b=-1,D=$.length;++b<D;)if(F=$.charCodeAt(b),48>F||F>57){_=(F===46?r+$.slice(b+1):$.slice(b))+_,$=$.slice(0,b);break}}}T&&!x&&($=t($,1/0));var Z=E.length+$.length+_.length,G=Z<w?new Array(w-Z+1).join(p):"";switch(T&&x&&($=t(G+$,G.length?w-_.length:1/0),G=""),m){case"<":$=E+$+_+G;break;case"=":$=E+G+$+_;break;case"^":$=G.slice(0,Z=G.length>>1)+E+$+_+G.slice(Z);break;default:$=G+E+$+_;break}return l($)}return C.toString=function(){return f+""},C}function u(f,p){var m=d((f=Sn(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(lt(p)/3)))*3,k=Math.pow(10,-g),x=Gs[8+g/3];return function(w){return m(k*w)+x}}return{format:d,formatPrefix:u}}var Tn,Js,Qs;my({thousands:",",grouping:[3],currency:["$",""]});function my(n){return Tn=py(n),Js=Tn.format,Qs=Tn.formatPrefix,Tn}function hy(n){return Math.max(0,-lt(Math.abs(n)))}function gy(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3-lt(Math.abs(n)))}function yy(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,lt(t)-lt(n))+1}function el(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n);break}return this}function _y(n){return function(){return n}}function ky(n){return+n}var tl=[0,1];function it(n){return n}function Ao(n,t){return(t-=n=+n)?function(o){return(o-n)/t}:_y(isNaN(t)?NaN:.5)}function wy(n,t){var o;return n>t&&(o=n,n=t,t=o),function(s){return Math.max(n,Math.min(t,s))}}function by(n,t,o){var s=n[0],r=n[1],l=t[0],i=t[1];return r<s?(s=Ao(r,s),l=o(i,l)):(s=Ao(s,r),l=o(l,i)),function(a){return l(s(a))}}function xy(n,t,o){var s=Math.min(n.length,t.length)-1,r=new Array(s),l=new Array(s),i=-1;for(n[s]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++i<s;)r[i]=Ao(n[i],n[i+1]),l[i]=o(t[i],t[i+1]);return function(a){var c=Qr(n,a,1,s)-1;return l[c](r[c](a))}}function nl(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function ol(){var n=tl,t=tl,o=Vo,s,r,l,i=it,a,c,d;function u(){var p=Math.min(n.length,t.length);return i!==it&&(i=wy(n[0],n[p-1])),a=p>2?xy:by,c=d=null,f}function f(p){return p==null||isNaN(p=+p)?l:(c||(c=a(n.map(s),t,o)))(s(i(p)))}return f.invert=function(p){return i(r((d||(d=a(t,n.map(s),pe)))(p)))},f.domain=function(p){return arguments.length?(n=Array.from(p,ky),u()):n.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),u()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),o=Zh,u()},f.clamp=function(p){return arguments.length?(i=p?!0:it,u()):i!==it},f.interpolate=function(p){return arguments.length?(o=p,u()):o},f.unknown=function(p){return arguments.length?(l=p,f):l},function(p,m){return s=p,r=m,u()}}function Vy(){return ol()(it,it)}function By(n,t,o,s){var r=Ap(n,t,o),l;switch(s=Sn(s??",f"),s.type){case"s":{var i=Math.max(Math.abs(n),Math.abs(t));return s.precision==null&&!isNaN(l=gy(r,i))&&(s.precision=l),Qs(s,i)}case"":case"e":case"g":case"p":case"r":{s.precision==null&&!isNaN(l=yy(r,Math.max(Math.abs(n),Math.abs(t))))&&(s.precision=l-(s.type==="e"));break}case"f":case"%":{s.precision==null&&!isNaN(l=hy(r))&&(s.precision=l-(s.type==="%")*2);break}}return Js(s)}function rl(n){var t=n.domain;return n.ticks=function(o){var s=t();return es(s[0],s[s.length-1],o??10)},n.tickFormat=function(o,s){var r=t();return By(r[0],r[r.length-1],o??10,s)},n.nice=function(o){o==null&&(o=10);var s=t(),r=0,l=s.length-1,i=s[r],a=s[l],c,d,u=10;for(a<i&&(d=i,i=a,a=d,d=r,r=l,l=d);u-- >0;){if(d=nt(i,a,o),d===c)return s[r]=i,s[l]=a,t(s);if(d>0)i=Math.floor(i/d)*d,a=Math.ceil(a/d)*d;else if(d<0)i=Math.ceil(i*d)/d,a=Math.floor(a*d)/d;else break;c=d}return n},n}function vo(){var n=Vy();return n.copy=function(){return nl(n,vo())},el.apply(n,arguments),rl(n)}function sl(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function ll(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function Cy(n){var t=1,o=n(sl(t),ll(t));return o.constant=function(s){return arguments.length?n(sl(t=+s),ll(t)):t},rl(o)}function Do(){var n=Cy(ol());return n.copy=function(){return nl(n,Do()).constant(n.constant())},el.apply(n,arguments)}function It(n,t,o){this.k=n,this.x=t,this.y=o}It.prototype={constructor:It,scale:function(n){return n===1?this:new It(this.k*n,this.x,this.y)},translate:function(n,t){return n===0&t===0?this:new It(this.k,this.x+this.k*n,this.y+this.k*t)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},It.prototype;function Fo(n,t){const{width:o,height:s,margin:r,compact:l}=t;return n.replaceChildren(),l&&(n.style.height=s+"px",n.style.lineHeight=s+"px"),ks(n).append("svg").attr("width",o+r.left+r.right).attr("height",s+r.top+r.bottom).append("g").attr("transform",`translate(${r.left},${r.top})`)}function zo(n,t,o,s){const{height:r}=o,{x:l,y:i}=s,a=ks("body").append("div").attr("class","svg-tooltip").style("position","absolute").style("visibility","hidden"),c=function(f,p){a.style("visibility","visible").text(`count: ${p.length}
|
|
10
|
+
x0: ${p.x0}
|
|
11
|
+
x1: ${p.x1}`)},d=function(f){a.style("top",f.pageY-10+"px").style("left",f.pageX+10+"px")},u=function(){a.style("visibility","hidden")};n.selectAll("rect").data(t).enter().append("rect").attr("x",f=>l(f.x0)).attr("y",f=>i(f.length)).attr("width",f=>l(f.x1)-l(f.x0)).attr("height",f=>r-i(f.length)).style("fill","#929BAD").attr("stroke","#fff").attr("stroke-opacity",.2).attr("stroke-width",.5).on("mouseover",c).on("mousemove",d).on("mouseout",u).append("title").text(f=>`[${f.x0}, ${f.x1}]
|
|
12
|
+
`+f.length+`
|
|
13
|
+
`)}function Po(n,t,o,s){const{width:r,height:l}=t;function i(){return un(o.y).ticks(6)}function a(){return s(dn(o.x))}n.append("g").attr("class","grid").attr("font-family","'Manrope', sans-serif").call(i().tickSize(-r).tickFormat(()=>"")),n.append("g").attr("class","grid").attr("font-family","'Manrope', sans-serif").attr("transform",`translate(0,${l})`).call(a().tickSize(-l).tickFormat(()=>"")),bh(".grid line").style("stroke","#E1E3EB").style("opacity",.7)}function il(n,t,o=50,s=10){if(o<=0)return[];const r=(t-n)/(o-1),l=[];for(let i=0;i<o;i++){const a=n+i*r;l.push(Math.pow(s,a))}return l}function Ro(n,t){const{height:o,width:s,margin:r,xAxisLabel:l,yAxisLabel:i,compact:a}=t;a||(n.append("text").attr("class","x-axis-label").attr("font-weight",500).attr("text-anchor","middle").attr("x",s/2).attr("y",o+r.bottom-5).text(l??"Value Range"),n.append("text").attr("class","y-axis-label").attr("font-weight",500).attr("text-anchor","middle").attr("x",-o/2).attr("y",-r.left+15).attr("transform","rotate(-90)").text(i??"Frequency"))}function Oo(n,t,o){const{threshold:s}=o;s&&n.append("line").attr("x1",t.x(s)).attr("x2",t.x(s)).attr("y1",0).attr("y2",o.height).style("stroke","#F05670").style("stroke-width","1").style("stroke-dasharray","7.4 3.2")}function Io(n){return n.map(t=>"from"in t?{x0:t.from,x1:t.to,length:t.weight}:{x0:t.x0,x1:t.x1,length:t.length})}const Lo=(n,t)=>n.append("g").style("font-size","14px").style("font-weight","500").attr("transform",`translate(0,${t})`),Ho=n=>n.append("g").style("font-size","14px").style("font-weight","500"),jo=(n,t)=>vo().domain([0,cn(n,o=>o.length)]).range([t,0]);function $y(n,t,o){const{width:s,height:r,nBins:l=10}=t,i=Fo(n,t),a=ao(o),c=cn(o),d=vo().domain([a,c]).range([0,s]),u=Io(ts().domain(d.domain()).thresholds(d.ticks(l))(o)),f=jo(u,r);Po(i,t,{x:d,y:f},p=>p.ticks(6)),zo(i,u,t,{x:d,y:f}),Oo(i,{x:d,y:f},t),Lo(i,r).call(dn(d).tickSize(0)),Ho(i).call(un(f).tickSize(0)),Ro(i,t)}function Ey(n,t,o){const{width:s,height:r,nBins:l=10}=t,i=Fo(n,t),a=ao(o),c=cn(o),d=Do().domain([a,c]).range([0,s]).nice(),u=g=>{const k=[];for(let x=0;x<=g;x++)k.push(Number(d.invert(s*(x/g)).toFixed(2)));return k},f=Io(ts().domain(d.domain()).thresholds(u(l))(o)),p=jo(f,r),m=il(0,Math.ceil(Math.log10(c)),6);Po(i,t,{x:d,y:p},g=>g.tickValues(m)),zo(i,f,t,{x:d,y:p}),Oo(i,{x:d,y:p},t),Lo(i,r).call(dn(d).tickValues(m).tickSize(0)),Ho(i).call(un(p).tickSize(0)),Ro(i,t)}function Ny(n,t,o){const{width:s,height:r}=t,l=Fo(n,t),i=Io(o),a=ao(i,p=>p.x0),c=cn(i,p=>p.x1),d=Do().domain([a,c]).range([0,s]).nice(),u=jo(i,r),f=il(0,Math.ceil(Math.log10(c)),6);Po(l,t,{x:d,y:u},p=>p.tickValues(f)),zo(l,i,t,{x:d,y:u}),Oo(l,{x:d,y:u},t),Lo(l,r).call(dn(d).tickValues(f).tickSize(0)),Ho(l).call(un(u).tickSize(0)),Ro(l,t)}const Sy=K(e.defineComponent({__name:"PlChartHistogram",props:{settings:{}},setup(n){const t=n,o=e.ref(),s=e.computed(()=>{const{xAxisLabel:l,yAxisLabel:i,threshold:a,compact:c,totalWidth:d=674,totalHeight:u=252}=t.settings,f=c?{top:0,right:0,bottom:0,left:0}:{top:0,right:30,bottom:40,left:85},p=d-f.left-f.right,m=u-f.top-f.bottom;return{width:p,height:m,margin:f,compact:c,nBins:"nBins"in t.settings?t.settings.nBins:10,xAxisLabel:l,yAxisLabel:i,threshold:a}}),r=()=>{const l=t.settings;if(l.type==="log-bins"){Ny(o.value,s.value,l.bins);return}l.log?Ey(o.value,s.value,l.numbers):$y(o.value,s.value,l.numbers)};return e.watch(t,r),e.onMounted(r),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.$style.component)},[l.settings.title&&!l.settings.compact?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.$style.title)},e.toDisplayString(l.settings.title),3)):e.createCommentVNode("",!0),i[0]||(i[0]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"chart",ref:o},null,512)],2))}}),[["__cssModules",{$style:{component:"_component_t90zs_2",title:"_title_t90zs_11"}}]]),al=["#FFF680","#E8F66C","#C4F16B","#9AEB71","#70E084","#43D18A","#2DBD96","#28A8A0","#2793A3","#337B9E","#3B6399","#424C8F","#4A3584","#481B70","#4A005C"],cl=["#FFF680","#FFE871","#FDCD6F","#FEAD66","#FA935F","#F57258","#EB555E","#D64470","#B83778","#982D82","#7E2584","#611B84","#49187A","#38116B","#2B125C"],dl={viridis:al,magma:cl,density:["#DFFADC","#C9F5D3","#B3F2CF","#9AEBCD","#80DCCC","#6DC8D2","#61B7DB","#5C97DB","#5A7CD6","#6060C7","#674BB3","#693799","#6A277B","#671D60","#611347"],salinity:["#FAFAB4","#ECFBA1","#D6F598","#BEEB91","#A2E082","#82D67C","#67C77E","#4FB281","#429E8C","#36898F","#2B668F","#254B85","#213475","#1E1E6B","#1C0F5C"],sunset:["#FFEA80","#FFD971","#FFC171","#FFA76C","#FB8B6F","#EB7179","#D75F7F","#C2518D","#A64392","#8038A4","#6135A4","#4735A3","#283A8F","#013C70","#003752"],rainbow:["#FFF780","#E7FA6F","#C1FA6A","#9BF56C","#79F080","#66E698","#56D7AC","#50C7C7","#56B4D7","#6898EB","#7481FA","#8769FA","#9450EB","#9634D6","#942AAE"],spectrum:["#43317B","#3B57A3","#3390B3","#5DC2B1","#95DBA5","#B9EBA0","#DBF5A6","#F5F5B7","#FEEA9D","#FFD285","#FA9B78","#E55C72","#C23665","#8F1150","#5C1243"],teal_red:["#122B5C","#1A496B","#1D7C8F","#21A3A3","#5FC7AB","#99E0B1","#CEF0CE","#F0F0F0","#FAE6D2","#FAC5AA","#FA9282","#E55C72","#C23665","#8F1150","#5C1243"],blue_red:["#0E0E8F","#1D23B8","#3748E5","#647DFA","#96A7FA","#C3CCFA","#E1E5FA","#F0F0F0","#F9DBDB","#F9BDBD","#F59393","#E55C72","#C23665","#8F1150","#5C1243"],lime_rose:["#2E5C00","#49850D","#3748E5","#8FC758","#ABDB7B","#C5EBA0","#DCF5C4","#F0F0F0","#FADCF5","#F5C4ED","#F0A3E3","#E573D2","#CC49B6","#991884","#701260"],viridis_magma:["#4A005C","#4A2F7F","#3F5895","#3181A0","#28A8A0","#3ECD8D","#86E67B","#CEF36C","#FFF680","#FED470","#FDA163","#F36C5A","#D64470","#A03080","#702084","#451777","#2B125C"]},ul={green_light:"#99E099",green_bright:"#198020",green_dark:"#42B842",violet_light:"#C1ADFF",violet_bright:"#845CFF",violet_dark:"#5F31CC",orange_light:"#FFCB8F",orange_bright:"#FF9429",orange_dark:"#C26A27",teal_light:"#90E0E0",teal_bright:"#27C2C2",teal_dark:"#068A94",rose_light:"#FAAAFA",rose_bright:"#E553E5",rose_dark:"#A324B2",lime_light:"#CBEB67",lime_bright:"#95C700",lime_dark:"#659406",blue_light:"#99CCFF",blue_bright:"#2D93FA",blue_dark:"#105BCC",red_light:"#FFADBA",red_bright:"#F05670",red_dark:"#AD3757",grey_light:"#D3D7E0",grey_bright:"#929BAD",grey_dark:"#5E5E70"};function le(n,t,o,s=1){return new class{constructor(r,l,i,a=1){this.r=r,this.g=l,this.b=i,this.a=a}get hex(){const r=n.toString(16).padStart(2,"0"),l=t.toString(16).padStart(2,"0"),i=o.toString(16).padStart(2,"0"),a=Math.round(s*255).toString(16).padStart(2,"0");return`#${r}${l}${i}${a}`}get rgba(){return`rgb(${n}, ${t}, ${o}, ${s})`}toString(){return this.hex}toJSON(){return this.hex}}(n,t,o,s)}le.fromHex=n=>{n=n.replace("#","");let t,o,s,r=1;if(n.length===6)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16);else if(n.length===8)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16),r=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return le(t,o,s,r)},le.fromString=n=>{if(n.startsWith("#"))return le.fromHex(n);throw Error("TODO: implement rgb(a), hsl")},le.categorical=n=>le.fromHex(ul[n]),le.fromHex=n=>{n=n.replace("#","");let t,o,s,r=1;if(n.length===6)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16);else if(n.length===8)t=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),s=parseInt(n.slice(4,6),16),r=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return le(t,o,s,r)},le.fromString=n=>{if(n.startsWith("#"))return le.fromHex(n);throw Error("TODO: implement rgb(a), hsl")};function Zo(n,t,o){return n+o*(t-n)}function fl(n,t,o){const s=Math.round(Zo(n.r,t.r,o)),r=Math.round(Zo(n.g,t.g,o)),l=Math.round(Zo(n.b,t.b,o));return le(s,r,l)}function pl(n){return typeof n=="string"?dl[n].map(t=>le.fromString(t)):n.map(t=>typeof t=="string"?le.fromString(t):t)}function Ty(n){return new class{constructor(t){this.colors=t}fromInterval(t){if(t<0)throw new Error("t must be greater than or equal to 0");if(t>1)throw new Error("t must be less than or equal to 1");const o=this.colors,s=o.length-1,r=Math.floor(t*s),l=t*s%1,i=o[r],a=o[Math.min(r+1,s)];return fl(i,a,l)}getNthOf(t,o){if(t<=0)throw new Error("n must be greater than 0");if(t>o)throw Error("n must be lower or equal than count of segments");return this.fromInterval((t-1)/(o-1))}split(t){if(t<=0)throw new Error("n must be greater than 0");const o=[];for(let s=0;s<t;s++){const r=s/(t-1);o.push(this.fromInterval(r))}return o}}(pl(n))}const My=e.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(n){const t=n;return e.provide(t.contextKey,e.computed(()=>t.context)),(o,s)=>e.renderSlot(o.$slots,"default")}});function ee(n,t,o){return t>n?t:n>o?o:n}const Uo=n=>e.computed(()=>{const t=[100],{min:o,max:s,step:r}=n.value;let l=o;for(;l<s;){l+=r;const a=(1-(ee(l,o,s)-o)/(s-o))*100;t.push(a)}return t}),Ay={class:"ui-slider__wrapper"},vy={class:"ui-slider__label-section"},Dy={key:0,class:"text-s"},Fy={key:1,class:"ui-slider__value-static text-s"},zy={class:"ui-slider__base"},Py={class:"ui-slider__container"},Ry={class:"ui-slider__container ui-slider__container-thumb"},Oy={class:"ui-slider__input-wrapper d-flex"},Iy=["value"],Ly={key:0,class:"ui-slider__error"},Hy=e.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.reactive({deltaValue:0}),i=e.computed(()=>r.max-r.min),a=e.computed(()=>ee((r.modelValue??0)+l.deltaValue,r.min,r.max)),c=e.ref(r.modelValue),d=e.computed(()=>{const h=r.modelValue;return Number.isFinite(h)?h<r.min?`Min value: ${r.min}`:h>r.max?`Max value: ${r.max}`:r.error:"Not a number"}),u=e.computed(()=>r),f=Uo(u),p=e.computed(()=>(a.value-r.min)/i.value),m=e.computed(()=>({right:Math.ceil((1-p.value)*100)+"%"})),g=e.computed(()=>({right:`calc(${Math.ceil((1-p.value)*100)}%) `})),k=e.ref(),x=e.ref();e.watch(()=>r.modelValue,h=>{c.value=h});function w(h){const y=ee(h,r.min,r.max);return Math.round((y+Number.EPSILON)*(1/r.step))/(1/r.step)}Ee(x,h=>{var y;X((y=e.unref(k))==null?void 0:y.getBoundingClientRect(),S=>{const{dx:N}=h;l.deltaValue=N/S.width*i.value,c.value=w(ee((r.modelValue??0)+l.deltaValue,r.min,r.max)),h.stop&&(s("update:modelValue",w(a.value)),l.deltaValue=0)})});function T(h){s("update:modelValue",w(h))}function B(h){T(+h.target.value)}function A(h){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(h.code)&&h.preventDefault();const y=h.code==="ArrowUp"||h.code==="ArrowRight"?r.step*1:h.code==="ArrowDown"||h.code==="ArrowLeft"?r.step*-1:0;T(r.modelValue+y)}return(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[e.createElementVNode("div",{class:e.normalizeClass([`ui-slider__mode-${r.mode}`,"ui-slider"])},[e.createElementVNode("div",Ay,[e.createElementVNode("div",vy,[h.label?(e.openBlock(),e.createElementBlock("label",Dy,[e.createElementVNode("span",null,e.toDisplayString(h.label),1),y[1]||(y[1]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(h.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),y[2]||(y[2]=e.createTextVNode()),r.mode==="text"?(e.openBlock(),e.createElementBlock("div",Fy,e.toDisplayString(c.value)+e.toDisplayString(h.measure),1)):e.createCommentVNode("",!0)]),y[6]||(y[6]=e.createTextVNode()),e.createElementVNode("div",zy,[e.createElementVNode("div",Py,[e.createElementVNode("div",{ref_key:"barRef",ref:k,class:"ui-slider__bar"},[e.createElementVNode("div",{class:"ui-slider__progress",style:e.normalizeStyle(m.value)},null,4)],512)]),y[5]||(y[5]=e.createTextVNode()),e.createElementVNode("div",Ry,[r.breakpoints?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(f),(S,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,style:e.normalizeStyle({right:`${S}%`}),class:"ui-slider__thumb-step"},null,4))),128)):e.createCommentVNode("",!0),y[4]||(y[4]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef",ref:x,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:e.normalizeStyle(g.value),onKeydown:A},y[3]||(y[3]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),y[7]||(y[7]=e.createTextVNode()),e.createElementVNode("div",Oy,[r.mode==="input"?(e.openBlock(),e.createElementBlock("input",{key:0,value:c.value,class:"ui-slider__value text-s",onChange:y[0]||(y[0]=S=>B(S))},null,40,Iy)):e.createCommentVNode("",!0)])],2),y[8]||(y[8]=e.createTextVNode()),d.value?(e.openBlock(),e.createElementBlock("div",Ly,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)],2))}});function jy(n,t=null,o=null){function s(a){const{scrollTop:c,scrollHeight:d,clientHeight:u}=a;if(!(d>u)||!t)return null;const p=d-c-u,m=c>t?t:0,g=p>t?u-t-m:u;return`linear-gradient(
|
|
10
14
|
to bottom,
|
|
11
15
|
transparent,
|
|
12
|
-
black ${
|
|
16
|
+
black ${m}px,
|
|
13
17
|
black ${g}px,
|
|
14
18
|
transparent 100%
|
|
15
|
-
)`}function r(a){const{scrollLeft:c,scrollWidth:d,clientWidth:
|
|
19
|
+
)`}function r(a){const{scrollLeft:c,scrollWidth:d,clientWidth:u}=a;if(!(d>u)||!o)return null;const p=d-c-u,m=c>o?o:0,g=p>o?u-o-m:u;return`linear-gradient(
|
|
16
20
|
to right,
|
|
17
21
|
transparent,
|
|
18
|
-
black ${
|
|
22
|
+
black ${m}px,
|
|
19
23
|
black ${g}px,
|
|
20
24
|
transparent 100%
|
|
21
|
-
)`}function l(){const a=n.value;if(!a)return;const c=[s(a),r(a)].filter(d=>d!==null);a.style.setProperty("-webkit-mask-image",c.join(",")),a.style.setProperty("mask-image",c.join(",")),c.length>1&&(a.style.setProperty("-webkit-mask-composite","source-in"),a.style.setProperty("mask-composite","source-in"))}const i=Ot(l);e.onMounted(l),W(window,"scroll",i,!0),W(window,"resize",i,!0)}function Vn(n,t){Po(()=>{G(e.unref(n),o=>{Oo(o,()=>t(o))})}),e.onUnmounted(()=>{G(e.unref(n),o=>{Ro(o)})})}const Ee={item:"sortable__item",animate:"sortable__animate"},mt=n=>n.getBoundingClientRect().y,Bn=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+Math.ceil(o/2)},Hd=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+o};function Zd(n,t){const o={item:void 0,options(){var y;return[...((y=n.value)==null?void 0:y.children)??[]]}},s=e.computed(()=>o.options()),r=t.shakeBuffer??10,l=t.reorderDelay??100;function i(y){const g=t.handle?this.querySelector(t.handle):null;g&&(g&&!g.contains(y.target)||(this.classList.remove(Ee.animate),this.classList.add(Ee.item),o.item={el:this,y:y.y,dy:0,orderChanged:!1}))}function a(y){const g=o.options();return g.slice(0,g.indexOf(y))}function c(y){const g=o.options();return g.slice(g.indexOf(y)+1)}function d(y,g){const V=o.options().filter(b=>b!==g),E=V.indexOf(y);return V.splice(E,0,g),V}function p(y,g){const V=o.options().filter(b=>b!==g),E=V.indexOf(y);return V.splice(E+1,0,g),V}function m(y,g){y.dy=g-y.y,y.el.style.setProperty("transform",`translateY(${y.dy}px)`)}function k(y){var u;if(!o.item)return;const{el:g}=o.item;if(!g.isConnected){o.item=void 0;return}const V=y.map(f=>mt(f)),E=mt(g);(u=n.value)==null||u.replaceChildren(...y);const b=mt(g),F=y.map(f=>mt(f)),C=[];for(let f=0;f<F.length;f++){const T=y[f];if(T===o.item.el)continue;const x=F[f],B=V[f]-x;T.style.transform=`translateY(${B}px)`,C.push(T)}const z=b-E;o.item.y=o.item.y+z,o.item.dy=o.item.dy-z,o.item.orderChanged=!0,o.item.el.style.setProperty("transform",`translateY(${o.item.dy}px)`),C.forEach(f=>f.classList.remove(Ee.animate)),requestAnimationFrame(function(){C.forEach(f=>{f.classList.add(Ee.animate),f.style.transform="",f.addEventListener("transitionend",()=>{f.classList.remove(Ee.animate)})})})}W(window,"mousemove",y=>{if(!o.item)return;const{el:g}=o.item;m(o.item,y.y);const V=mt(o.item.el),E=Hd(o.item.el),b=a(g),F=c(g);b.forEach(C=>{const z=Bn(C);V+r<z&&k(d(C,g))}),F.forEach(C=>{const z=Bn(C);E-r>z&&k(p(C,g))})}),W(window,"mouseup",()=>{if(!o.item)return;const{el:y,orderChanged:g}=o.item;y.classList.add(Ee.animate),y.style.removeProperty("transform"),y.addEventListener("transitionend",()=>{y.classList.remove(Ee.animate,Ee.item)}),setTimeout(()=>{if(!g)return;const V=o.options().map(b=>Number(b.getAttribute("data-index"))),E=n.value;if(E){for(const b of o.options())E.removeChild(b);s.value.forEach(b=>{E.appendChild(b)})}t.onChange(V)},l),o.item=void 0}),e.watchEffect(()=>{s.value.forEach((y,g)=>{y.removeEventListener("mousedown",i),y.addEventListener("mousedown",i),y.setAttribute("data-index",String(g))})})}const xe={item:"sortable__item",animate:"sortable__animate"},ut=n=>n.getBoundingClientRect().y,Cn=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+Math.ceil(o/2)},Ud=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+o};function Wd(n,t){const o={item:void 0,options(){var g;return[...((g=n.value)==null?void 0:g.children)??[]]}};let s=0;e.watch(()=>n.value,()=>{setTimeout(()=>{n.value&&(n.value.scrollTop=s)},0)});const r=e.computed(()=>o.options()),l=t.shakeBuffer??10,i=t.reorderDelay??100;function a(g){var E;const V=t.handle?this.querySelector(t.handle):null;V&&(V&&!V.contains(g.target)||(this.classList.remove(xe.animate),this.classList.add(xe.item),o.item={el:this,y:g.y,dy:0,initialScrollTop:((E=n.value)==null?void 0:E.scrollTop)||0,orderChanged:!1}))}function c(g){const V=o.options();return V.slice(0,V.indexOf(g))}function d(g){const V=o.options();return V.slice(V.indexOf(g)+1)}function p(g,V){const E=o.options().filter(F=>F!==V),b=E.indexOf(g);return E.splice(b,0,V),E}function m(g,V){const E=o.options().filter(F=>F!==V),b=E.indexOf(g);return E.splice(b+1,0,V),E}function k(g,V){var F;const b=(((F=n.value)==null?void 0:F.scrollTop)||0)-(g.initialScrollTop||0);g.dy=V-g.y+b,g.el.style.setProperty("transform",`translateY(${g.dy}px)`)}function y(g){var f;if(!o.item)return;const{el:V}=o.item;if(!V.isConnected){o.item=void 0;return}const E=g.map(T=>ut(T)),b=ut(V);(f=n.value)==null||f.replaceChildren(...g);const F=ut(V),C=g.map(T=>ut(T)),z=[];for(let T=0;T<C.length;T++){const x=g[T];if(x===o.item.el)continue;const D=C[T],A=E[T]-D;x.style.transform=`translateY(${A}px)`,z.push(x)}const u=F-b;o.item.y=o.item.y+u,o.item.dy=o.item.dy-u,o.item.orderChanged=!0,o.item.el.style.setProperty("transform",`translateY(${o.item.dy}px)`),z.forEach(T=>T.classList.remove(xe.animate)),requestAnimationFrame(function(){z.forEach(T=>{T.classList.add(xe.animate),T.style.transform="",T.addEventListener("transitionend",()=>{T.classList.remove(xe.animate)})})})}W(window,"mousemove",g=>{if(!o.item)return;const{el:V}=o.item;k(o.item,g.y);const E=ut(o.item.el),b=Ud(o.item.el),F=c(V),C=d(V);if(F.forEach(z=>{const u=Cn(z);E+l<u&&y(p(z,V))}),C.forEach(z=>{const u=Cn(z);b-l>u&&y(m(z,V))}),n.value){const z=n.value.getBoundingClientRect(),u=z.top+V.getBoundingClientRect().height/2;g.clientY<u&&(n.value.scrollTop+=g.clientY-u);const f=z.bottom-V.getBoundingClientRect().height/2;g.clientY>f&&(n.value.scrollTop+=g.clientY-f)}}),W(window,"mouseup",()=>{var E;if(!o.item)return;s=((E=n.value)==null?void 0:E.scrollTop)||0;const{el:g,orderChanged:V}=o.item;g.classList.add(xe.animate),g.style.removeProperty("transform"),g.addEventListener("transitionend",()=>{g.classList.remove(xe.animate,xe.item)}),setTimeout(()=>{if(!V)return;const b=o.options().map(C=>Number(C.getAttribute("data-index"))),F=n.value;if(F){for(const C of o.options())F.removeChild(C);r.value.forEach(C=>{F.appendChild(C)})}t.onChange(b)},i),o.item=void 0}),e.watchEffect(()=>{r.value.forEach((g,V)=>{g.removeEventListener("mousedown",a),g.addEventListener("mousedown",a),g.setAttribute("data-index",String(V))})})}function qd(n,t){let o;e.onMounted(()=>{o=setInterval(n,t)}),e.onUnmounted(()=>clearInterval(o))}function Kd(n,t,o){const s=e.reactive({data:Dt.deepClone(t(n.value)),changed:!1});return e.watch(()=>s.data,r=>{s.changed?o(Dt.deepClone(r)):s.changed=!0},{deep:!0}),e.watch(n,r=>{Object.assign(s,{data:Dt.deepClone(t(r)),changed:!1})},{deep:!0,immediate:!0}),s}function Yd(n){const t=e.reactive({isLoading:!1,result:void 0,error:void 0,async run(...o){this.isLoading=!0,this.error=void 0;try{this.result=await n(...o)}catch(s){this.error=s}finally{this.isLoading=!1}},debounce(o,s=1e3){return Un(()=>{const r=o();this.run(...r).catch(console.error)},s)}});return t.run=t.run.bind(t),t}function Gd(n,t){function o(i,a){const c=e.unref(n);if(!c)return;const d=`translate(${a.x-i.x}px, ${a.y-i.y}px)`;c.style.setProperty("transform",d),t(a)}function s(i){const a=c=>o(i,c);document.addEventListener("mousemove",a),document.addEventListener("mouseup",()=>{const c=e.unref(n);document.removeEventListener("mousemove",a),c&&(c.style.setProperty("transition","all .3s ease-in-out"),c.style.removeProperty("transform"),c.addEventListener("transitionend",()=>{c.style.removeProperty("transition")}))},{once:!0})}function r(){var i;(i=e.unref(n))==null||i.addEventListener("mousedown",s)}function l(){var i;(i=e.unref(n))==null||i.removeEventListener("mousedown",s)}e.onMounted(r),e.onUnmounted(l)}const Xd={class:"ui-slider__wrapper"},Jd={class:"ui-slider__label-section"},Qd={key:0,class:"text-s"},ep={class:"ui-slider__base"},tp={class:"ui-slider__container"},op={class:"ui-slider__container ui-slider__container-thumb"},np=["data-percent"],rp=["data-percent"],sp=["data-percent"],lp={key:0,class:"ui-slider__error"},ap=e.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),i=e.ref(),a=e.ref(),c=e.ref(),d=e.ref(),p=e.computed(()=>r.max-r.min),m=e.computed(()=>r),k=ao(m),y=e.computed(()=>Q((r.modelValue[0]??0)+l.deltaValue1,r.min,r.max)),g=e.computed(()=>Q((r.modelValue[1]??0)+l.deltaValue2,r.min,r.max)),V=e.computed(()=>Q((r.modelValue[2]??0)+l.deltaValue3,r.min,r.max)),E=e.computed(()=>{const S=r.modelValue;if(!(Array.isArray(S)&&S.length===3&&S.every(Z=>Number.isFinite(Z))))return"Expected model [number, number, number]";const H=[];return[...r.modelValue].forEach(Z=>{Z>r.max&&H.push(`Max model value must be lower than max props ${r.max}.`),Z<r.min&&H.push("Min model value must be greater than max props.")}),H.length>0?H.join(" "):r.error}),b=e.computed(()=>(y.value-r.min)/p.value),F=e.computed(()=>(g.value-r.min)/p.value),C=e.computed(()=>(V.value-r.min)/p.value),z=e.computed(()=>B()),u=e.computed(()=>({right:z.value[0]+"%",left:100-z.value[2]+"%"})),f=e.computed(()=>({right:Math.ceil((1-b.value)*100)+"%"})),T=e.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"})),x=e.computed(()=>({right:Math.ceil((1-C.value)*100)+"%"}));ye(a,S=>{var M;G((M=e.unref(i))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:Z}=S;l.deltaValue1=Z/H.width*p.value,a.value&&D(a.value,r.modelValue[0],l.deltaValue1),S.stop&&($([A(y.value),A(g.value),A(V.value)]),l.deltaValue1=0)})}),ye(c,S=>{var M;G((M=e.unref(i))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:Z}=S;l.deltaValue2=Z/H.width*p.value,c.value&&D(c.value,r.modelValue[1],l.deltaValue2),S.stop&&($([A(y.value),A(g.value),A(V.value)]),l.deltaValue2=0)})}),ye(d,S=>{var M;G((M=e.unref(i))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:Z}=S;l.deltaValue3=Z/H.width*p.value,d.value&&D(d.value,r.modelValue[2],l.deltaValue3),S.stop&&($([A(y.value),A(g.value),A(V.value)]),l.deltaValue3=0)})});function D(S,M,H){const Z=A(Q((M??0)+H,r.min,r.max));S.dataset.percent=`${Z}${r.measure}`,h()}function B(){const S=Math.ceil((1-b.value)*100),M=Math.ceil((1-F.value)*100),H=Math.ceil((1-C.value)*100);return[S,M,H].sort((Z,De)=>Z-De)}function A(S){const M=Q(S,r.min,r.max);return Math.round((M+Number.EPSILON)*(1/r.step))/(1/r.step)}function $(S){s("update:modelValue",S)}function h(){const S=Number(f.value.right.substring(0,f.value.right.length-1)),M=Number(T.value.right.substring(0,T.value.right.length-1)),H=Number(x.value.right.substring(0,x.value.right.length-1)),Z=[{r:S,th:a},{r:M,th:c},{r:H,th:d}].sort((De,He)=>De.r-He.r);Z[0].th.value&&(Z[0].th.value.dataset.hint="high"),Z[1].th.value&&(Z[1].th.value.dataset.hint="mid"),Z[2].th.value&&(Z[2].th.value.dataset.hint="low")}function _(S,M){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(S.code)&&S.preventDefault();const H=S.code==="ArrowUp"||S.code==="ArrowRight"?r.step*1:S.code==="ArrowDown"||S.code==="ArrowLeft"?r.step*-1:0,Z=[...r.modelValue];Z[M]=Q(Z[M]+H,r.min,r.max),$(Z),h()}return e.onMounted(()=>{h()}),(S,M)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[e.createElementVNode("div",{class:e.normalizeClass([`ui-slider__mode-${r.mode}`,"ui-slider"])},[e.createElementVNode("div",Xd,[e.createElementVNode("div",Jd,[S.label?(e.openBlock(),e.createElementBlock("label",Qd,[e.createElementVNode("span",null,e.toDisplayString(S.label),1),M[3]||(M[3]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(S.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),M[11]||(M[11]=e.createTextVNode()),e.createElementVNode("div",ep,[e.createElementVNode("div",tp,[e.createElementVNode("div",{ref_key:"barRef",ref:i,class:"ui-slider__bar"},[e.createElementVNode("div",{class:"ui-slider__progress",style:e.normalizeStyle(u.value)},null,4)],512)]),M[10]||(M[10]=e.createTextVNode()),e.createElementVNode("div",op,[r.breakpoints?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(k),(H,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z,style:e.normalizeStyle({right:`${H}%`}),class:"ui-slider__thumb-step"},null,4))),128)):e.createCommentVNode("",!0),M[7]||(M[7]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef1",ref:a,style:e.normalizeStyle(f.value),"data-percent":r.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:M[0]||(M[0]=H=>_(H,0))},M[4]||(M[4]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,np),M[8]||(M[8]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef2",ref:c,style:e.normalizeStyle(T.value),"data-percent":r.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:M[1]||(M[1]=H=>_(H,1))},M[5]||(M[5]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,rp),M[9]||(M[9]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef3",ref:d,style:e.normalizeStyle(x.value),"data-percent":r.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:M[2]||(M[2]=H=>_(H,2))},M[6]||(M[6]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,sp)])])]),M[12]||(M[12]=e.createTextVNode()),M[13]||(M[13]=e.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),M[14]||(M[14]=e.createTextVNode()),E.value?(e.openBlock(),e.createElementBlock("div",lp,e.toDisplayString(E.value),1)):e.createCommentVNode("",!0)],2))}}),ip={class:"ui-input-range__separator"},cp=e.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(n,{emit:t}){const o=n,s=t,r=e.reactive({left:o.modelValue[0],right:o.modelValue[1]}),l=e.ref(!1),i=e.computed(()=>(l.value,"ui-input-range-focused")),a=e.computed({get(){return{left:Math.min(...o.modelValue),right:Math.max(...o.modelValue)}},set(){}});e.watch(()=>a.value,p=>(r.left=p.left)&&(r.right=p.right));function c(){s("update:modelValue",[+r.left,+r.right]),s("change",[+r.left,+r.right])}function d(p,m){const k=m.target.value;/^[0-9]{0,2}$/.test(k)?p?r.left=+k:r.right=+k:p?r.left=+k.slice(0,k.length-1):r.right=+k.slice(0,k.length-1)}return(p,m)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[i.value,"ui-input-range"]},p.$attrs),[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=k=>a.value.left=k),class:"text-s",type:"text",onChange:c,onFocus:m[1]||(m[1]=k=>l.value=!0),onFocusout:m[2]||(m[2]=k=>l.value=!1),onInput:m[3]||(m[3]=k=>d(!0,k))},null,544),[[e.vModelText,a.value.left]]),m[8]||(m[8]=e.createTextVNode()),e.createElementVNode("div",ip,e.toDisplayString(o.separator),1),m[9]||(m[9]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[4]||(m[4]=k=>a.value.right=k),class:"text-s",type:"text",onChange:c,onFocus:m[5]||(m[5]=k=>l.value=!0),onFocusout:m[6]||(m[6]=k=>l.value=!1),onInput:m[7]||(m[7]=k=>d(!1,k))},null,544),[[e.vModelText,a.value.right]])],16))}}),dp={class:"ui-slider__wrapper"},pp={class:"ui-slider__label-section"},mp={key:0,class:"text-s"},up={key:1,class:"ui-slider__value-static text-s"},fp={class:"ui-slider__base"},hp={class:"ui-slider__container"},gp={class:"ui-slider__container ui-slider__container-thumb"},yp={class:"ui-slider__input-wrapper d-flex"},kp={key:0,class:"ui-slider__error"},_p=e.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.reactive({deltaValue1:0,deltaValue2:0}),i=e.ref(),a=e.ref(),c=e.ref(),d=e.ref(r.modelValue),p=e.ref(r.modelValue[0]),m=e.ref(r.modelValue[1]),k=e.computed(()=>r),y=ao(k),g=e.computed(()=>[p.value,m.value].sort((h,_)=>h-_).join("-")),V=e.computed(()=>r.max-r.min),E=e.computed(()=>Q((r.modelValue[0]??0)+l.deltaValue1,r.min,r.max)),b=e.computed(()=>Q((r.modelValue[1]??0)+l.deltaValue2,r.min,r.max)),F=e.computed(()=>{const h=r.modelValue;return Array.isArray(h)&&h.length===2&&h.every(S=>Number.isFinite(S))?r.error:"Expected model [number, number]"}),C=e.computed(()=>(E.value-r.min)/V.value),z=e.computed(()=>(b.value-r.min)/V.value),u=e.computed(()=>D()),f=e.computed(()=>({right:u.value[0]+"%",left:100-u.value[1]+"%"})),T=e.computed(()=>({right:Math.ceil((1-C.value)*100)+"%"})),x=e.computed(()=>({right:Math.ceil((1-z.value)*100)+"%"}));e.watch(()=>r.modelValue,h=>{d.value=h,p.value=+h[0],m.value=+h[1]},{immediate:!0}),ye(a,h=>{var _;G((_=e.unref(i))==null?void 0:_.getBoundingClientRect(),S=>{const{dx:M}=h;l.deltaValue1=M/S.width*V.value,p.value=B(Q((r.modelValue[0]??0)+l.deltaValue1,r.min,r.max)),d.value=[p.value,m.value].sort((H,Z)=>H-Z),h.stop&&(A([B(E.value),B(b.value)]),l.deltaValue1=0)})}),ye(c,h=>{var _;G((_=e.unref(i))==null?void 0:_.getBoundingClientRect(),S=>{const{dx:M}=h;l.deltaValue2=M/S.width*V.value,m.value=B(Q((r.modelValue[1]??0)+l.deltaValue2,r.min,r.max)),d.value=[p.value,m.value].sort((H,Z)=>H-Z),h.stop&&(A([B(E.value),B(b.value)]),l.deltaValue2=0)})});function D(){const h=Math.ceil((1-C.value)*100),_=Math.ceil((1-z.value)*100);return[h,_].sort((S,M)=>S-M)}function B(h){const _=Q(h,r.min,r.max);return Math.round((_+Number.EPSILON)*(1/r.step))/(1/r.step)}function A(h){s("update:modelValue",h)}function $(h,_){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(h.code)&&h.preventDefault();const S=h.code==="ArrowUp"||h.code==="ArrowRight"?r.step*1:h.code==="ArrowDown"||h.code==="ArrowLeft"?r.step*-1:0,M=[...r.modelValue];M[_]=Q(M[_]+S,r.min,r.max),A(M)}return(h,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[e.createElementVNode("div",{class:e.normalizeClass([`ui-slider__mode-${r.mode}`,"ui-slider"])},[e.createElementVNode("div",dp,[e.createElementVNode("div",pp,[h.label?(e.openBlock(),e.createElementBlock("label",mp,[e.createElementVNode("span",null,e.toDisplayString(h.label),1),_[3]||(_[3]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(X),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(h.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),_[4]||(_[4]=e.createTextVNode()),r.mode==="text"?(e.openBlock(),e.createElementBlock("div",up,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)]),_[10]||(_[10]=e.createTextVNode()),e.createElementVNode("div",fp,[e.createElementVNode("div",hp,[e.createElementVNode("div",{ref_key:"barRef",ref:i,class:"ui-slider__bar"},[e.createElementVNode("div",{class:"ui-slider__progress",style:e.normalizeStyle(f.value)},null,4)],512)]),_[9]||(_[9]=e.createTextVNode()),e.createElementVNode("div",gp,[r.breakpoints?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(y),(S,M)=>(e.openBlock(),e.createElementBlock("div",{key:M,style:e.normalizeStyle({right:`${S}%`}),class:"ui-slider__thumb-step"},null,4))),128)):e.createCommentVNode("",!0),_[7]||(_[7]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef1",ref:a,style:e.normalizeStyle(T.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:_[0]||(_[0]=S=>$(S,0))},_[5]||(_[5]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),_[8]||(_[8]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef2",ref:c,style:e.normalizeStyle(x.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:_[1]||(_[1]=S=>$(S,1))},_[6]||(_[6]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),_[11]||(_[11]=e.createTextVNode()),e.createElementVNode("div",yp,[r.mode==="input"?(e.openBlock(),e.createBlock(cp,{key:0,modelValue:d.value,"onUpdate:modelValue":_[2]||(_[2]=S=>d.value=S),class:"ui-focused-border",onChange:A},null,8,["modelValue"])):e.createCommentVNode("",!0)])],2),_[12]||(_[12]=e.createTextVNode()),F.value?(e.openBlock(),e.createElementBlock("div",kp,e.toDisplayString(F.value),1)):e.createCommentVNode("",!0)],2))}}),bp=e.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(),l=e.computed(()=>s.clientHeight/(s.scrollHeight||1)),i=e.computed(()=>l.value<1),a=e.computed(()=>{const c=e.unref(l);return{top:s.scrollTop*c+"px",height:Math.floor(s.clientHeight*c)+"px"}});return W(r,"pointerdown",c=>{const d={clientY:c.clientY},m=Yt(document,"mousemove",k=>{const y=(k.clientY-d.clientY)/l.value;o("update:scrollTop",s.scrollTop+y),d.clientY=k.clientY});["mouseup","pointercancel"].forEach(k=>{document.addEventListener(k,m,{once:!0})})}),(c,d)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:r,class:"v-scroll"},[e.createElementVNode("div",{class:"v-scroll__scrollbar",style:e.normalizeStyle(a.value)},null,4)],512)):e.createCommentVNode("",!0)}}),wp=e.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(),l=e.computed(()=>s.clientWidth/(s.scrollWidth||1)),i=e.computed(()=>l.value<1),a=e.computed(()=>{const c=e.unref(l);return{left:s.scrollLeft*c+"px",width:Math.floor(s.clientWidth*c)+"px"}});return W(r,"pointerdown",c=>{const d={clientX:c.clientX},m=Yt(document,"mousemove",k=>{const y=(k.clientX-d.clientX)/l.value;o("update:scrollLeft",s.scrollLeft+y),d.clientX=k.clientX});["mouseup","pointercancel"].forEach(k=>{document.addEventListener(k,m,{once:!0})})}),(c,d)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:r,class:"h-scroll"},[e.createElementVNode("div",{class:"h-scroll__scrollbar",style:e.normalizeStyle(a.value)},null,4)],512)):e.createCommentVNode("",!0)}}),Vp={class:"ui-scrollable"},Bp=e.defineComponent({__name:"Scrollable",setup(n){const t=e.ref(),o=e.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function s(a){Ks(o,a,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const r=a=>{a.preventDefault();const c=a.currentTarget;c.scrollTop+=a.deltaY,c.scrollLeft+=a.deltaX,s(c)};function l(a){G(e.unref(t),c=>{c.scrollTop=a,s(c)})}function i(a){G(e.unref(t),c=>{c.scrollLeft=a,s(c)})}return Vn(t,a=>{G(a,c=>s(c))}),e.onMounted(()=>{G(e.unref(t),a=>{s(a),a.addEventListener("wheel",r)})}),e.onUnmounted(()=>{G(e.unref(t),a=>a.removeEventListener("wheel",r))}),(a,c)=>(e.openBlock(),e.createElementBlock("div",Vp,[e.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"ui-scrollable__container",onWheel:r},[e.renderSlot(a.$slots,"default")],544),c[2]||(c[2]=e.createTextVNode()),e.createVNode(bp,{"scroll-top":o.scrollTop,"client-height":o.clientHeight,"scroll-height":o.scrollHeight,onWheel:c[0]||(c[0]=e.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),c[3]||(c[3]=e.createTextVNode()),e.createVNode(wp,{"scroll-left":o.scrollLeft,"client-width":o.clientWidth,"scroll-width":o.scrollWidth,onWheel:c[1]||(c[1]=e.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":i},null,8,["scroll-left","client-width","scroll-width"])]))}}),Cp={add:"add.svg","arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:"box.svg",calendar:"calendar.svg","caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:"checkmark.svg","chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:"clipboard.svg",close:"close.svg",copy:"copy.svg","data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:"download.svg","drag-dots":"drag-dots.svg",duplicate:"duplicate.svg",edit:"edit.svg",error:"error.svg",export:"export.svg","filter-on":"filter-on.svg",filter:"filter.svg","help-outline":"help-outline.svg",help:"help.svg","info-outline":"info-outline.svg",info:"info.svg","jump-link":"jump-link.svg",link:"link.svg",loading:"loading.svg",lock:"lock.svg",maximize:"maximize.svg",minimize:"minimize.svg",minus:"minus.svg",more:"more.svg",open:"open.svg","paper-clip":"paper-clip.svg",pause:"pause.svg",play:"play.svg",renew:"renew.svg",restart:"restart.svg",reverse:"reverse.svg",settings:"settings.svg",sort:"sort.svg",stop:"stop.svg",success:"success.svg",time:"time.svg",tune:"tune.svg",warning:"warning.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:"zip.svg"},Ep={"add-layer":"add-layer.svg",add:"add.svg","align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:"annotate.svg",annotation:"annotation.svg",area:"area.svg","arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:"axes.svg","bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:"bar.svg",bindot:"bindot.svg",box:"box.svg","boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:"boxplot.svg",bubble:"bubble.svg",calendar:"calendar.svg",canvas:"canvas.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:"checkbox.svg",checkmark:"checkmark.svg","chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:"clipboard.svg",close:"close.svg","cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:"cluster.svg",code:"code.svg","color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:"color.svg",columns:"columns.svg","connected-points":"connected-points.svg",container:"container.svg",cookie:"cookie.svg",copy:"copy.svg",cpu:"cpu.svg","data-dimentions":"data-dimentions.svg",debug:"debug.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg","dna-add":"dna-add.svg","dna-import":"dna-import.svg",dna:"dna.svg",download:"download.svg","drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:"duplicate.svg",edit:"edit.svg","error-bar":"error-bar.svg",error:"error.svg","expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","filter-on":"filter-on.svg",filter:"filter.svg","fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:"generate.svg",graph:"graph.svg",heatmap:"heatmap.svg","help-outline":"help-outline.svg",help:"help.svg","info-outline":"info-outline.svg",info:"info.svg",jitter:"jitter.svg","jump-link":"jump-link.svg",lasso:"lasso.svg",layers:"layers.svg",learn:"learn.svg","legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:"legend.svg","line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:"line.svg","linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:"link.svg",loading:"loading.svg",lock:"lock.svg",maximize:"maximize.svg",menu:"menu.svg",minimize:"minimize.svg",minus:"minus.svg",more:"more.svg","paper-clip":"paper-clip.svg",pause:"pause.svg",pin:"pin.svg",play:"play.svg","position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:"product.svg",publications:"publications.svg","radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:"renew.svg",restart:"restart.svg",reverse:"reverse.svg","rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:"search.svg","server-on":"server-on.svg",server:"server.svg",settings:"settings.svg",sina:"sina.svg",skatterplot:"skatterplot.svg",slice:"slice.svg","social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:"sort.svg",statistics:"statistics.svg",stop:"stop.svg","strip-plot":"strip-plot.svg",success:"success.svg","table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:"table.svg",template:"template.svg",terminal:"terminal.svg","text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:"time.svg",tune:"tune.svg",venn:"venn.svg","view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:"violin.svg",warning:"warning.svg",wetlab:"wetlab.svg","windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:"zip.svg","zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function xp(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const $p=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],Np=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna-add","dna-import","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],Tp={allCssVariables:xp(),icons16:Cp,icons24:Ep};w.Color=ne,w.ContextProvider=Sd,w.DataTable=qr,w.DemoData=Tp,w.DropdownListItem=Ae,w.DropdownOverlay=Gt,w.Gradient=Td,w.LongText=Kt,w.PlAccordion=Ai,w.PlAccordionSection=Pi,w.PlAlert=Es,w.PlBlockPage=ds,w.PlBtnAccent=Is,w.PlBtnDanger=js,w.PlBtnGhost=jt,w.PlBtnGroup=zo,w.PlBtnLink=Us,w.PlBtnPrimary=Mo,w.PlBtnSecondary=Ao,w.PlBtnSplit=As,w.PlChartStackedBar=Ed,w.PlChartStackedBarCompact=Nd,w.PlCheckbox=Qa,w.PlCheckboxGroup=ni,w.PlChip=Jt,w.PlCloseModalBtn=Wo,w.PlContainer=ms,w.PlDialogModal=qo,w.PlDropdown=Xt,w.PlDropdownLegacy=Ca,w.PlDropdownLine=da,w.PlDropdownMulti=Uo,w.PlDropdownMultiRef=Xa,w.PlDropdownRef=Jl,w.PlEditableTitle=ml,w.PlFileDialog=Qo,w.PlFileInput=hd,w.PlGrid=_s,w.PlIcon16=$e,w.PlIcon24=Wt,w.PlLoaderCircular=ji,w.PlLogView=Si,w.PlMaskIcon16=ze,w.PlMaskIcon24=te,w.PlNotificationAlert=bd,w.PlNumberField=Pa,w.PlProgressBar=Ta,w.PlProgressCell=Wi,w.PlRow=fs,w.PlSearchField=jo,w.PlSectionSeparator=Yo,w.PlSlideModal=fi,w.PlSpacer=ys,w.PlStatusTag=Oi,w.PlTabs=Mi,w.PlTextArea=Pl,w.PlTextField=xl,w.PlToggleSwitch=yi,w.PlTooltip=X,w.Scrollable=Bp,w.Slider=jd,w.SliderRange=_p,w.SliderRangeTriple=ap,w.ThemeSwitcher=ns,w.animate=xo,w.animateInfinite=Jr,w.call=wo,w.categoricalColors=_n,w.debounce=$o,w.delay=Vo,w.detectOutside=Ol,w.eventListener=Yt,w.getElementScrollPosition=Zo,w.interpolateColor=bn,w.isElementVisible=Ho,w.listToOptions=Qr,w.magma=yn,w.makeEaseInOut=Xr,w.makeEaseOut=Eo,w.maskIcons16=$p,w.maskIcons24=Np,w.normalizeGradient=wn,w.normalizeListOptions=ke,w.notEmpty=Pt,w.palettes=kn,w.randomInt=Co,w.randomString=Gr,w.requestTick=Ot,w.scrollIntoView=Vt,w.showContextMenu=Mt,w.throttle=No,w.timeout=Bo,w.useClickOutside=wt,w.useDraggable=Gd,w.useEventListener=W,w.useFormState=Kd,w.useHover=_o,w.useInterval=qd,w.useLabelNotch=ue,w.useLocalStorage=To,w.useMouse=ko,w.useMouseCapture=ye,w.usePosition=qe,w.useQuery=Yd,w.useResizeObserver=Vn,w.useScroll=vd,w.useSortable=Zd,w.useSortable2=Wd,w.useTheme=Do,w.viridis=gn,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
|
|
25
|
+
)`}function l(){const a=n.value;if(!a)return;const c=[s(a),r(a)].filter(d=>d!==null);a.style.setProperty("-webkit-mask-image",c.join(",")),a.style.setProperty("mask-image",c.join(",")),c.length>1&&(a.style.setProperty("-webkit-mask-composite","source-in"),a.style.setProperty("mask-composite","source-in"))}const i=Pn(l);e.onMounted(l),q(window,"scroll",i,!0),q(window,"resize",i,!0)}function ml(n,t){kr(()=>{X(e.unref(n),o=>{wr(o,()=>t(o))})}),e.onUnmounted(()=>{X(e.unref(n),o=>{br(o)})})}const Fe={item:"sortable__item",animate:"sortable__animate"},Lt=n=>n.getBoundingClientRect().y,hl=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+Math.ceil(o/2)},Zy=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+o};function Uy(n,t){const o={item:void 0,options(){var m;return[...((m=n.value)==null?void 0:m.children)??[]]}},s=e.computed(()=>o.options()),r=t.shakeBuffer??10,l=t.reorderDelay??100;function i(m){const g=t.handle?this.querySelector(t.handle):null;g&&(g&&!g.contains(m.target)||(this.classList.remove(Fe.animate),this.classList.add(Fe.item),o.item={el:this,y:m.y,dy:0,orderChanged:!1}))}function a(m){const g=o.options();return g.slice(0,g.indexOf(m))}function c(m){const g=o.options();return g.slice(g.indexOf(m)+1)}function d(m,g){const k=o.options().filter(w=>w!==g),x=k.indexOf(m);return k.splice(x,0,g),k}function u(m,g){const k=o.options().filter(w=>w!==g),x=k.indexOf(m);return k.splice(x+1,0,g),k}function f(m,g){m.dy=g-m.y,m.el.style.setProperty("transform",`translateY(${m.dy}px)`)}function p(m){var h;if(!o.item)return;const{el:g}=o.item;if(!g.isConnected){o.item=void 0;return}const k=m.map(y=>Lt(y)),x=Lt(g);(h=n.value)==null||h.replaceChildren(...m);const w=Lt(g),T=m.map(y=>Lt(y)),B=[];for(let y=0;y<T.length;y++){const S=m[y];if(S===o.item.el)continue;const N=T[y],C=k[y]-N;S.style.transform=`translateY(${C}px)`,B.push(S)}const A=w-x;o.item.y=o.item.y+A,o.item.dy=o.item.dy-A,o.item.orderChanged=!0,o.item.el.style.setProperty("transform",`translateY(${o.item.dy}px)`),B.forEach(y=>y.classList.remove(Fe.animate)),requestAnimationFrame(function(){B.forEach(y=>{y.classList.add(Fe.animate),y.style.transform="",y.addEventListener("transitionend",()=>{y.classList.remove(Fe.animate)})})})}q(window,"mousemove",m=>{if(!o.item)return;const{el:g}=o.item;f(o.item,m.y);const k=Lt(o.item.el),x=Zy(o.item.el),w=a(g),T=c(g);w.forEach(B=>{const A=hl(B);k+r<A&&p(d(B,g))}),T.forEach(B=>{const A=hl(B);x-r>A&&p(u(B,g))})}),q(window,"mouseup",()=>{if(!o.item)return;const{el:m,orderChanged:g}=o.item;m.classList.add(Fe.animate),m.style.removeProperty("transform"),m.addEventListener("transitionend",()=>{m.classList.remove(Fe.animate,Fe.item)}),setTimeout(()=>{if(!g)return;const k=o.options().map(w=>Number(w.getAttribute("data-index"))),x=n.value;if(x){for(const w of o.options())x.removeChild(w);s.value.forEach(w=>{x.appendChild(w)})}t.onChange(k)},l),o.item=void 0}),e.watchEffect(()=>{s.value.forEach((m,g)=>{m.removeEventListener("mousedown",i),m.addEventListener("mousedown",i),m.setAttribute("data-index",String(g))})})}const ze={item:"sortable__item",animate:"sortable__animate"},Ht=n=>n.getBoundingClientRect().y,gl=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+Math.ceil(o/2)},qy=n=>{const{y:t,height:o}=n.getBoundingClientRect();return t+o};function Wy(n,t){const o={item:void 0,options(){var g;return[...((g=n.value)==null?void 0:g.children)??[]]}};let s=0;e.watch(()=>n.value,()=>{setTimeout(()=>{n.value&&(n.value.scrollTop=s)},0)});const r=e.computed(()=>o.options()),l=t.shakeBuffer??10,i=t.reorderDelay??100;function a(g){var x;const k=t.handle?this.querySelector(t.handle):null;k&&(k&&!k.contains(g.target)||(this.classList.remove(ze.animate),this.classList.add(ze.item),o.item={el:this,y:g.y,dy:0,initialScrollTop:((x=n.value)==null?void 0:x.scrollTop)||0,orderChanged:!1}))}function c(g){const k=o.options();return k.slice(0,k.indexOf(g))}function d(g){const k=o.options();return k.slice(k.indexOf(g)+1)}function u(g,k){const x=o.options().filter(T=>T!==k),w=x.indexOf(g);return x.splice(w,0,k),x}function f(g,k){const x=o.options().filter(T=>T!==k),w=x.indexOf(g);return x.splice(w+1,0,k),x}function p(g,k){var T;const w=(((T=n.value)==null?void 0:T.scrollTop)||0)-(g.initialScrollTop||0);g.dy=k-g.y+w,g.el.style.setProperty("transform",`translateY(${g.dy}px)`)}function m(g){var y;if(!o.item)return;const{el:k}=o.item;if(!k.isConnected){o.item=void 0;return}const x=g.map(S=>Ht(S)),w=Ht(k);(y=n.value)==null||y.replaceChildren(...g);const T=Ht(k),B=g.map(S=>Ht(S)),A=[];for(let S=0;S<B.length;S++){const N=g[S];if(N===o.item.el)continue;const v=B[S],$=x[S]-v;N.style.transform=`translateY(${$}px)`,A.push(N)}const h=T-w;o.item.y=o.item.y+h,o.item.dy=o.item.dy-h,o.item.orderChanged=!0,o.item.el.style.setProperty("transform",`translateY(${o.item.dy}px)`),A.forEach(S=>S.classList.remove(ze.animate)),requestAnimationFrame(function(){A.forEach(S=>{S.classList.add(ze.animate),S.style.transform="",S.addEventListener("transitionend",()=>{S.classList.remove(ze.animate)})})})}q(window,"mousemove",g=>{if(!o.item)return;const{el:k}=o.item;p(o.item,g.y);const x=Ht(o.item.el),w=qy(o.item.el),T=c(k),B=d(k);if(T.forEach(A=>{const h=gl(A);x+l<h&&m(u(A,k))}),B.forEach(A=>{const h=gl(A);w-l>h&&m(f(A,k))}),n.value){const A=n.value.getBoundingClientRect(),h=A.top+k.getBoundingClientRect().height/2;g.clientY<h&&(n.value.scrollTop+=g.clientY-h);const y=A.bottom-k.getBoundingClientRect().height/2;g.clientY>y&&(n.value.scrollTop+=g.clientY-y)}}),q(window,"mouseup",()=>{var x;if(!o.item)return;s=((x=n.value)==null?void 0:x.scrollTop)||0;const{el:g,orderChanged:k}=o.item;g.classList.add(ze.animate),g.style.removeProperty("transform"),g.addEventListener("transitionend",()=>{g.classList.remove(ze.animate,ze.item)}),setTimeout(()=>{if(!k)return;const w=o.options().map(B=>Number(B.getAttribute("data-index"))),T=n.value;if(T){for(const B of o.options())T.removeChild(B);r.value.forEach(B=>{T.appendChild(B)})}t.onChange(w)},i),o.item=void 0}),e.watchEffect(()=>{r.value.forEach((g,k)=>{g.removeEventListener("mousedown",a),g.addEventListener("mousedown",a),g.setAttribute("data-index",String(k))})})}function Ky(n,t){let o;e.onMounted(()=>{o=setInterval(n,t)}),e.onUnmounted(()=>clearInterval(o))}function Yy(n,t,o){const s=e.reactive({data:Mn.deepClone(t(n.value)),changed:!1});return e.watch(()=>s.data,r=>{s.changed?o(Mn.deepClone(r)):s.changed=!0},{deep:!0}),e.watch(n,r=>{Object.assign(s,{data:Mn.deepClone(t(r)),changed:!1})},{deep:!0,immediate:!0}),s}function Xy(n){const t=e.reactive({isLoading:!1,result:void 0,error:void 0,async run(...o){this.isLoading=!0,this.error=void 0;try{this.result=await n(...o)}catch(s){this.error=s}finally{this.isLoading=!1}},debounce(o,s=1e3){return Pl(()=>{const r=o();this.run(...r).catch(console.error)},s)}});return t.run=t.run.bind(t),t}function Gy(n,t){function o(i,a){const c=e.unref(n);if(!c)return;const d=`translate(${a.x-i.x}px, ${a.y-i.y}px)`;c.style.setProperty("transform",d),t(a)}function s(i){const a=c=>o(i,c);document.addEventListener("mousemove",a),document.addEventListener("mouseup",()=>{const c=e.unref(n);document.removeEventListener("mousemove",a),c&&(c.style.setProperty("transition","all .3s ease-in-out"),c.style.removeProperty("transform"),c.addEventListener("transitionend",()=>{c.style.removeProperty("transition")}))},{once:!0})}function r(){var i;(i=e.unref(n))==null||i.addEventListener("mousedown",s)}function l(){var i;(i=e.unref(n))==null||i.removeEventListener("mousedown",s)}e.onMounted(r),e.onUnmounted(l)}function Jy(n){return e.computed(n)}const Qy={class:"ui-slider__wrapper"},e0={class:"ui-slider__label-section"},t0={key:0,class:"text-s"},n0={class:"ui-slider__base"},o0={class:"ui-slider__container"},r0={class:"ui-slider__container ui-slider__container-thumb"},s0=["data-percent"],l0=["data-percent"],i0=["data-percent"],a0={key:0,class:"ui-slider__error"},c0=e.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),i=e.ref(),a=e.ref(),c=e.ref(),d=e.ref(),u=e.computed(()=>r.max-r.min),f=e.computed(()=>r),p=Uo(f),m=e.computed(()=>ee((r.modelValue[0]??0)+l.deltaValue1,r.min,r.max)),g=e.computed(()=>ee((r.modelValue[1]??0)+l.deltaValue2,r.min,r.max)),k=e.computed(()=>ee((r.modelValue[2]??0)+l.deltaValue3,r.min,r.max)),x=e.computed(()=>{const D=r.modelValue;if(!(Array.isArray(D)&&D.length===3&&D.every(Z=>Number.isFinite(Z))))return"Expected model [number, number, number]";const H=[];return[...r.modelValue].forEach(Z=>{Z>r.max&&H.push(`Max model value must be lower than max props ${r.max}.`),Z<r.min&&H.push("Min model value must be greater than max props.")}),H.length>0?H.join(" "):r.error}),w=e.computed(()=>(m.value-r.min)/u.value),T=e.computed(()=>(g.value-r.min)/u.value),B=e.computed(()=>(k.value-r.min)/u.value),A=e.computed(()=>C()),h=e.computed(()=>({right:A.value[0]+"%",left:100-A.value[2]+"%"})),y=e.computed(()=>({right:Math.ceil((1-w.value)*100)+"%"})),S=e.computed(()=>({right:Math.ceil((1-T.value)*100)+"%"})),N=e.computed(()=>({right:Math.ceil((1-B.value)*100)+"%"}));Ee(a,D=>{var F;X((F=e.unref(i))==null?void 0:F.getBoundingClientRect(),H=>{const{dx:Z}=D;l.deltaValue1=Z/H.width*u.value,a.value&&v(a.value,r.modelValue[0],l.deltaValue1),D.stop&&(E([$(m.value),$(g.value),$(k.value)]),l.deltaValue1=0)})}),Ee(c,D=>{var F;X((F=e.unref(i))==null?void 0:F.getBoundingClientRect(),H=>{const{dx:Z}=D;l.deltaValue2=Z/H.width*u.value,c.value&&v(c.value,r.modelValue[1],l.deltaValue2),D.stop&&(E([$(m.value),$(g.value),$(k.value)]),l.deltaValue2=0)})}),Ee(d,D=>{var F;X((F=e.unref(i))==null?void 0:F.getBoundingClientRect(),H=>{const{dx:Z}=D;l.deltaValue3=Z/H.width*u.value,d.value&&v(d.value,r.modelValue[2],l.deltaValue3),D.stop&&(E([$(m.value),$(g.value),$(k.value)]),l.deltaValue3=0)})});function v(D,F,H){const Z=$(ee((F??0)+H,r.min,r.max));D.dataset.percent=`${Z}${r.measure}`,_()}function C(){const D=Math.ceil((1-w.value)*100),F=Math.ceil((1-T.value)*100),H=Math.ceil((1-B.value)*100);return[D,F,H].sort((Z,G)=>Z-G)}function $(D){const F=ee(D,r.min,r.max);return Math.round((F+Number.EPSILON)*(1/r.step))/(1/r.step)}function E(D){s("update:modelValue",D)}function _(){const D=Number(y.value.right.substring(0,y.value.right.length-1)),F=Number(S.value.right.substring(0,S.value.right.length-1)),H=Number(N.value.right.substring(0,N.value.right.length-1)),Z=[{r:D,th:a},{r:F,th:c},{r:H,th:d}].sort((G,at)=>G.r-at.r);Z[0].th.value&&(Z[0].th.value.dataset.hint="high"),Z[1].th.value&&(Z[1].th.value.dataset.hint="mid"),Z[2].th.value&&(Z[2].th.value.dataset.hint="low")}function b(D,F){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(D.code)&&D.preventDefault();const H=D.code==="ArrowUp"||D.code==="ArrowRight"?r.step*1:D.code==="ArrowDown"||D.code==="ArrowLeft"?r.step*-1:0,Z=[...r.modelValue];Z[F]=ee(Z[F]+H,r.min,r.max),E(Z),_()}return e.onMounted(()=>{_()}),(D,F)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[e.createElementVNode("div",{class:e.normalizeClass([`ui-slider__mode-${r.mode}`,"ui-slider"])},[e.createElementVNode("div",Qy,[e.createElementVNode("div",e0,[D.label?(e.openBlock(),e.createElementBlock("label",t0,[e.createElementVNode("span",null,e.toDisplayString(D.label),1),F[3]||(F[3]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(D.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),F[11]||(F[11]=e.createTextVNode()),e.createElementVNode("div",n0,[e.createElementVNode("div",o0,[e.createElementVNode("div",{ref_key:"barRef",ref:i,class:"ui-slider__bar"},[e.createElementVNode("div",{class:"ui-slider__progress",style:e.normalizeStyle(h.value)},null,4)],512)]),F[10]||(F[10]=e.createTextVNode()),e.createElementVNode("div",r0,[r.breakpoints?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(p),(H,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z,style:e.normalizeStyle({right:`${H}%`}),class:"ui-slider__thumb-step"},null,4))),128)):e.createCommentVNode("",!0),F[7]||(F[7]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef1",ref:a,style:e.normalizeStyle(y.value),"data-percent":r.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:F[0]||(F[0]=H=>b(H,0))},F[4]||(F[4]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,s0),F[8]||(F[8]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef2",ref:c,style:e.normalizeStyle(S.value),"data-percent":r.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:F[1]||(F[1]=H=>b(H,1))},F[5]||(F[5]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,l0),F[9]||(F[9]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef3",ref:d,style:e.normalizeStyle(N.value),"data-percent":r.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:F[2]||(F[2]=H=>b(H,2))},F[6]||(F[6]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,i0)])])]),F[12]||(F[12]=e.createTextVNode()),F[13]||(F[13]=e.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),F[14]||(F[14]=e.createTextVNode()),x.value?(e.openBlock(),e.createElementBlock("div",a0,e.toDisplayString(x.value),1)):e.createCommentVNode("",!0)],2))}}),d0={class:"ui-input-range__separator"},u0=e.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(n,{emit:t}){const o=n,s=t,r=e.reactive({left:o.modelValue[0],right:o.modelValue[1]}),l=e.ref(!1),i=e.computed(()=>(l.value,"ui-input-range-focused")),a=e.computed({get(){return{left:Math.min(...o.modelValue),right:Math.max(...o.modelValue)}},set(){}});e.watch(()=>a.value,u=>(r.left=u.left)&&(r.right=u.right));function c(){s("update:modelValue",[+r.left,+r.right]),s("change",[+r.left,+r.right])}function d(u,f){const p=f.target.value;/^[0-9]{0,2}$/.test(p)?u?r.left=+p:r.right=+p:u?r.left=+p.slice(0,p.length-1):r.right=+p.slice(0,p.length-1)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[i.value,"ui-input-range"]},u.$attrs),[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=p=>a.value.left=p),class:"text-s",type:"text",onChange:c,onFocus:f[1]||(f[1]=p=>l.value=!0),onFocusout:f[2]||(f[2]=p=>l.value=!1),onInput:f[3]||(f[3]=p=>d(!0,p))},null,544),[[e.vModelText,a.value.left]]),f[8]||(f[8]=e.createTextVNode()),e.createElementVNode("div",d0,e.toDisplayString(o.separator),1),f[9]||(f[9]=e.createTextVNode()),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":f[4]||(f[4]=p=>a.value.right=p),class:"text-s",type:"text",onChange:c,onFocus:f[5]||(f[5]=p=>l.value=!0),onFocusout:f[6]||(f[6]=p=>l.value=!1),onInput:f[7]||(f[7]=p=>d(!1,p))},null,544),[[e.vModelText,a.value.right]])],16))}}),f0={class:"ui-slider__wrapper"},p0={class:"ui-slider__label-section"},m0={key:0,class:"text-s"},h0={key:1,class:"ui-slider__value-static text-s"},g0={class:"ui-slider__base"},y0={class:"ui-slider__container"},_0={class:"ui-slider__container ui-slider__container-thumb"},k0={class:"ui-slider__input-wrapper d-flex"},w0={key:0,class:"ui-slider__error"},b0=e.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:t}){const o=e.useSlots(),s=t,r=n,l=e.reactive({deltaValue1:0,deltaValue2:0}),i=e.ref(),a=e.ref(),c=e.ref(),d=e.ref(r.modelValue),u=e.ref(r.modelValue[0]),f=e.ref(r.modelValue[1]),p=e.computed(()=>r),m=Uo(p),g=e.computed(()=>[u.value,f.value].sort((_,b)=>_-b).join("-")),k=e.computed(()=>r.max-r.min),x=e.computed(()=>ee((r.modelValue[0]??0)+l.deltaValue1,r.min,r.max)),w=e.computed(()=>ee((r.modelValue[1]??0)+l.deltaValue2,r.min,r.max)),T=e.computed(()=>{const _=r.modelValue;return Array.isArray(_)&&_.length===2&&_.every(D=>Number.isFinite(D))?r.error:"Expected model [number, number]"}),B=e.computed(()=>(x.value-r.min)/k.value),A=e.computed(()=>(w.value-r.min)/k.value),h=e.computed(()=>v()),y=e.computed(()=>({right:h.value[0]+"%",left:100-h.value[1]+"%"})),S=e.computed(()=>({right:Math.ceil((1-B.value)*100)+"%"})),N=e.computed(()=>({right:Math.ceil((1-A.value)*100)+"%"}));e.watch(()=>r.modelValue,_=>{d.value=_,u.value=+_[0],f.value=+_[1]},{immediate:!0}),Ee(a,_=>{var b;X((b=e.unref(i))==null?void 0:b.getBoundingClientRect(),D=>{const{dx:F}=_;l.deltaValue1=F/D.width*k.value,u.value=C(ee((r.modelValue[0]??0)+l.deltaValue1,r.min,r.max)),d.value=[u.value,f.value].sort((H,Z)=>H-Z),_.stop&&($([C(x.value),C(w.value)]),l.deltaValue1=0)})}),Ee(c,_=>{var b;X((b=e.unref(i))==null?void 0:b.getBoundingClientRect(),D=>{const{dx:F}=_;l.deltaValue2=F/D.width*k.value,f.value=C(ee((r.modelValue[1]??0)+l.deltaValue2,r.min,r.max)),d.value=[u.value,f.value].sort((H,Z)=>H-Z),_.stop&&($([C(x.value),C(w.value)]),l.deltaValue2=0)})});function v(){const _=Math.ceil((1-B.value)*100),b=Math.ceil((1-A.value)*100);return[_,b].sort((D,F)=>D-F)}function C(_){const b=ee(_,r.min,r.max);return Math.round((b+Number.EPSILON)*(1/r.step))/(1/r.step)}function $(_){s("update:modelValue",_)}function E(_,b){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(_.code)&&_.preventDefault();const D=_.code==="ArrowUp"||_.code==="ArrowRight"?r.step*1:_.code==="ArrowDown"||_.code==="ArrowLeft"?r.step*-1:0,F=[...r.modelValue];F[b]=ee(F[b]+D,r.min,r.max),$(F)}return(_,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[e.createElementVNode("div",{class:e.normalizeClass([`ui-slider__mode-${r.mode}`,"ui-slider"])},[e.createElementVNode("div",f0,[e.createElementVNode("div",p0,[_.label?(e.openBlock(),e.createElementBlock("label",m0,[e.createElementVNode("span",null,e.toDisplayString(_.label),1),b[3]||(b[3]=e.createTextVNode()),e.unref(o).tooltip?(e.openBlock(),e.createBlock(e.unref(J),{key:0,class:"info",position:"top"},{tooltip:e.withCtx(()=>[e.renderSlot(_.$slots,"tooltip")]),_:3})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),b[4]||(b[4]=e.createTextVNode()),r.mode==="text"?(e.openBlock(),e.createElementBlock("div",h0,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)]),b[10]||(b[10]=e.createTextVNode()),e.createElementVNode("div",g0,[e.createElementVNode("div",y0,[e.createElementVNode("div",{ref_key:"barRef",ref:i,class:"ui-slider__bar"},[e.createElementVNode("div",{class:"ui-slider__progress",style:e.normalizeStyle(y.value)},null,4)],512)]),b[9]||(b[9]=e.createTextVNode()),e.createElementVNode("div",_0,[r.breakpoints?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(m),(D,F)=>(e.openBlock(),e.createElementBlock("div",{key:F,style:e.normalizeStyle({right:`${D}%`}),class:"ui-slider__thumb-step"},null,4))),128)):e.createCommentVNode("",!0),b[7]||(b[7]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef1",ref:a,style:e.normalizeStyle(S.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:b[0]||(b[0]=D=>E(D,0))},b[5]||(b[5]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),b[8]||(b[8]=e.createTextVNode()),e.createElementVNode("div",{ref_key:"thumbRef2",ref:c,style:e.normalizeStyle(N.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:b[1]||(b[1]=D=>E(D,1))},b[6]||(b[6]=[e.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),b[11]||(b[11]=e.createTextVNode()),e.createElementVNode("div",k0,[r.mode==="input"?(e.openBlock(),e.createBlock(u0,{key:0,modelValue:d.value,"onUpdate:modelValue":b[2]||(b[2]=D=>d.value=D),class:"ui-focused-border",onChange:$},null,8,["modelValue"])):e.createCommentVNode("",!0)])],2),b[12]||(b[12]=e.createTextVNode()),T.value?(e.openBlock(),e.createElementBlock("div",w0,e.toDisplayString(T.value),1)):e.createCommentVNode("",!0)],2))}}),x0=e.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(),l=e.computed(()=>s.clientHeight/(s.scrollHeight||1)),i=e.computed(()=>l.value<1),a=e.computed(()=>{const c=e.unref(l);return{top:s.scrollTop*c+"px",height:Math.floor(s.clientHeight*c)+"px"}});return q(r,"pointerdown",c=>{const d={clientY:c.clientY},f=Yn(document,"mousemove",p=>{const m=(p.clientY-d.clientY)/l.value;o("update:scrollTop",s.scrollTop+m),d.clientY=p.clientY});["mouseup","pointercancel"].forEach(p=>{document.addEventListener(p,f,{once:!0})})}),(c,d)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:r,class:"v-scroll"},[e.createElementVNode("div",{class:"v-scroll__scrollbar",style:e.normalizeStyle(a.value)},null,4)],512)):e.createCommentVNode("",!0)}}),V0=e.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(n,{emit:t}){const o=t,s=n,r=e.ref(),l=e.computed(()=>s.clientWidth/(s.scrollWidth||1)),i=e.computed(()=>l.value<1),a=e.computed(()=>{const c=e.unref(l);return{left:s.scrollLeft*c+"px",width:Math.floor(s.clientWidth*c)+"px"}});return q(r,"pointerdown",c=>{const d={clientX:c.clientX},f=Yn(document,"mousemove",p=>{const m=(p.clientX-d.clientX)/l.value;o("update:scrollLeft",s.scrollLeft+m),d.clientX=p.clientX});["mouseup","pointercancel"].forEach(p=>{document.addEventListener(p,f,{once:!0})})}),(c,d)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:r,class:"h-scroll"},[e.createElementVNode("div",{class:"h-scroll__scrollbar",style:e.normalizeStyle(a.value)},null,4)],512)):e.createCommentVNode("",!0)}}),B0={class:"ui-scrollable"},C0=e.defineComponent({__name:"Scrollable",setup(n){const t=e.ref(),o=e.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function s(a){Ia(o,a,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const r=a=>{a.preventDefault();const c=a.currentTarget;c.scrollTop+=a.deltaY,c.scrollLeft+=a.deltaX,s(c)};function l(a){X(e.unref(t),c=>{c.scrollTop=a,s(c)})}function i(a){X(e.unref(t),c=>{c.scrollLeft=a,s(c)})}return ml(t,a=>{X(a,c=>s(c))}),e.onMounted(()=>{X(e.unref(t),a=>{s(a),a.addEventListener("wheel",r)})}),e.onUnmounted(()=>{X(e.unref(t),a=>a.removeEventListener("wheel",r))}),(a,c)=>(e.openBlock(),e.createElementBlock("div",B0,[e.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"ui-scrollable__container",onWheel:r},[e.renderSlot(a.$slots,"default")],544),c[2]||(c[2]=e.createTextVNode()),e.createVNode(x0,{"scroll-top":o.scrollTop,"client-height":o.clientHeight,"scroll-height":o.scrollHeight,onWheel:c[0]||(c[0]=e.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),c[3]||(c[3]=e.createTextVNode()),e.createVNode(V0,{"scroll-left":o.scrollLeft,"client-width":o.clientWidth,"scroll-width":o.scrollWidth,onWheel:c[1]||(c[1]=e.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":i},null,8,["scroll-left","client-width","scroll-width"])]))}}),$0={add:"add.svg","arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:"box.svg",calendar:"calendar.svg","caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:"checkmark.svg","chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:"clipboard.svg",close:"close.svg",copy:"copy.svg","data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:"download.svg","drag-dots":"drag-dots.svg",duplicate:"duplicate.svg",edit:"edit.svg",error:"error.svg",export:"export.svg","filter-on":"filter-on.svg",filter:"filter.svg","help-outline":"help-outline.svg",help:"help.svg","info-outline":"info-outline.svg",info:"info.svg","jump-link":"jump-link.svg",link:"link.svg",loading:"loading.svg",lock:"lock.svg",maximize:"maximize.svg",minimize:"minimize.svg",minus:"minus.svg",more:"more.svg",open:"open.svg","paper-clip":"paper-clip.svg",pause:"pause.svg",play:"play.svg",renew:"renew.svg",restart:"restart.svg",reverse:"reverse.svg",settings:"settings.svg",sort:"sort.svg",stop:"stop.svg",success:"success.svg",time:"time.svg",tune:"tune.svg",warning:"warning.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:"zip.svg"},E0={"add-layer":"add-layer.svg",add:"add.svg","align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:"annotate.svg",annotation:"annotation.svg",area:"area.svg","arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:"axes.svg","bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:"bar.svg",bindot:"bindot.svg",box:"box.svg","boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:"boxplot.svg",bubble:"bubble.svg",calendar:"calendar.svg",canvas:"canvas.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:"checkbox.svg",checkmark:"checkmark.svg","chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:"clipboard.svg",close:"close.svg","cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:"cluster.svg",code:"code.svg","color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:"color.svg",columns:"columns.svg","connected-points":"connected-points.svg",container:"container.svg",cookie:"cookie.svg",copy:"copy.svg",cpu:"cpu.svg","data-dimentions":"data-dimentions.svg",debug:"debug.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg","dna-add":"dna-add.svg","dna-import":"dna-import.svg",dna:"dna.svg",download:"download.svg","drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:"duplicate.svg",edit:"edit.svg","error-bar":"error-bar.svg",error:"error.svg","expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","filter-on":"filter-on.svg",filter:"filter.svg","fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:"generate.svg",graph:"graph.svg",heatmap:"heatmap.svg","help-outline":"help-outline.svg",help:"help.svg","info-outline":"info-outline.svg",info:"info.svg",jitter:"jitter.svg","jump-link":"jump-link.svg",lasso:"lasso.svg",layers:"layers.svg",learn:"learn.svg","legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:"legend.svg","line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:"line.svg","linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:"link.svg",loading:"loading.svg",lock:"lock.svg",maximize:"maximize.svg",menu:"menu.svg",minimize:"minimize.svg",minus:"minus.svg",more:"more.svg","paper-clip":"paper-clip.svg",pause:"pause.svg",pin:"pin.svg",play:"play.svg","position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:"product.svg",publications:"publications.svg","radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:"renew.svg",restart:"restart.svg",reverse:"reverse.svg","rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:"search.svg","server-on":"server-on.svg",server:"server.svg",settings:"settings.svg",sina:"sina.svg",skatterplot:"skatterplot.svg",slice:"slice.svg","social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:"sort.svg",statistics:"statistics.svg",stop:"stop.svg","strip-plot":"strip-plot.svg",success:"success.svg","table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:"table.svg",template:"template.svg",terminal:"terminal.svg","text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:"time.svg",tune:"tune.svg",venn:"venn.svg","view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:"violin.svg",warning:"warning.svg",wetlab:"wetlab.svg","windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:"zip.svg","zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function N0(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const S0=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],T0=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna-add","dna-import","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],M0={allCssVariables:N0(),icons16:$0,icons24:E0};V.Color=le,V.ContextProvider=My,V.DataTable=Oi,V.DemoData=M0,V.DropdownListItem=We,V.DropdownOverlay=Xn,V.Gradient=Ty,V.LongText=Kn,V.PlAccordion=$u,V.PlAccordionSection=Nu,V.PlAlert=ya,V.PlBlockPage=na,V.PlBtnAccent=Ma,V.PlBtnDanger=va,V.PlBtnGhost=Ln,V.PlBtnGroup=_r,V.PlBtnLink=Pa,V.PlBtnPrimary=gr,V.PlBtnSecondary=yr,V.PlBtnSplit=$a,V.PlChartHistogram=Sy,V.PlChartStackedBar=_p,V.PlChartStackedBarCompact=bp,V.PlCheckbox=Ud,V.PlCheckboxGroup=Yd,V.PlChip=Jn,V.PlCloseModalBtn=Sr,V.PlContainer=ra,V.PlDialogModal=Tr,V.PlDropdown=Gn,V.PlDropdownLegacy=gd,V.PlDropdownLine=nd,V.PlDropdownMulti=Nr,V.PlDropdownMultiRef=jd,V.PlDropdownRef=Zc,V.PlEditableTitle=rc,V.PlFileDialog=zr,V.PlFileInput=ap,V.PlGrid=ua,V.PlIcon16=Pe,V.PlIcon24=qn,V.PlLoaderCircular=vu,V.PlLogView=xu,V.PlMaskIcon16=Ke,V.PlMaskIcon24=oe,V.PlNotificationAlert=pp,V.PlNumberField=Nd,V.PlProgressBar=bd,V.PlProgressCell=Ru,V.PlRow=la,V.PlSearchField=Br,V.PlSectionSeparator=Ar,V.PlSlideModal=lu,V.PlSpacer=ca,V.PlStatusTag=Su,V.PlTabs=Cu,V.PlTextArea=Nc,V.PlTextField=_c,V.PlToggleSwitch=cu,V.PlTooltip=J,V.Scrollable=C0,V.Slider=Hy,V.SliderRange=b0,V.SliderRangeTriple=c0,V.ThemeSwitcher=Yi,V.animate=cr,V.animateInfinite=Zi,V.call=rr,V.categoricalColors=ul,V.debounce=dr,V.delay=sr,V.detectOutside=Sc,V.eventListener=Yn,V.getElementScrollPosition=Er,V.interpolateColor=fl,V.isElementVisible=$r,V.listToOptions=Ui,V.magma=cl,V.makeEaseInOut=ji,V.makeEaseOut=ar,V.maskIcons16=S0,V.maskIcons24=T0,V.normalizeGradient=pl,V.normalizeListOptions=Ne,V.notEmpty=zn,V.palettes=dl,V.randomInt=ir,V.randomString=Hi,V.requestTick=Pn,V.scrollIntoView=Gt,V.showContextMenu=vn,V.throttle=ur,V.timeout=lr,V.useClickOutside=Xt,V.useComponentProp=Jy,V.useDraggable=Gy,V.useEventListener=q,V.useFormState=Yy,V.useHover=nr,V.useInterval=Ky,V.useLabelNotch=be,V.useLocalStorage=fr,V.useMouse=tr,V.useMouseCapture=Ee,V.usePosition=ft,V.useQuery=Xy,V.useResizeObserver=ml,V.useScroll=jy,V.useSortable=Uy,V.useSortable2=Wy,V.useTheme=mr,V.viridis=al,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|