@zeng-alt/formkit-form-builder 0.1.3 → 1.0.0
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/LICENSE +168 -0
- package/README.md +240 -45
- package/dist/builder.css +2 -0
- package/dist/builder.es.js +40324 -0
- package/dist/builder.umd.js +496 -0
- package/dist/index.d.ts +807 -1
- package/package.json +33 -25
- package/dist/index.cjs +0 -422
- package/dist/index.mjs +0 -9403
- package/dist/src/builder/BuilderDropArea.d.ts +0 -4
- package/dist/src/builder/BuilderHeader.d.ts +0 -17
- package/dist/src/builder/BuilderMain.d.ts +0 -68
- package/dist/src/builder/BuilderPreview.d.ts +0 -5
- package/dist/src/builder/BuilderProvider.d.ts +0 -21
- package/dist/src/builder/ImportExportModal.d.ts +0 -9
- package/dist/src/components/ai-prompt/AiPrompt.d.ts +0 -2
- package/dist/src/components/sidebar-left/DraggableList.d.ts +0 -8
- package/dist/src/components/sidebar-left/NavMain.d.ts +0 -2
- package/dist/src/components/sidebar-left/SidebarLeft.d.ts +0 -2
- package/dist/src/components/sidebar-right/FormEditMain.d.ts +0 -2
- package/dist/src/components/sidebar-right/SidebarRight.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/EditsSection.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/ExpressionEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/common/EditsLayout.d.ts +0 -21
- package/dist/src/components/sidebar-right/edits/common/JsonTextarea.d.ts +0 -14
- package/dist/src/components/sidebar-right/edits/common/LabelHelpSection.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/common/NaiveBasicSection.d.ts +0 -7
- package/dist/src/components/sidebar-right/edits/common/NameInput.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/common/OptionsTagsSection.d.ts +0 -5
- package/dist/src/components/sidebar-right/edits/common/PlaceholderSection.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/common/RangeInputs.d.ts +0 -16
- package/dist/src/components/sidebar-right/edits/common/SelectInput.d.ts +0 -15
- package/dist/src/components/sidebar-right/edits/common/SelectSwitchesSection.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/common/SwitchInput.d.ts +0 -12
- package/dist/src/components/sidebar-right/edits/common/TagsInput.d.ts +0 -11
- package/dist/src/components/sidebar-right/edits/common/TextInput.d.ts +0 -14
- package/dist/src/components/sidebar-right/edits/common/ToggleInput.d.ts +0 -15
- package/dist/src/components/sidebar-right/edits/common/TreeOptionsJsonSection.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/CheckboxEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/ColorEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/DateLikeEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/DateTimeEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/FileEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/GroupEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveAvatarEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveBlockquoteEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveButtonEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveCascaderEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveCheckboxEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveDividerEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveH1Editor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveH2Editor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveH3Editor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveH4Editor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveH5Editor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveH6Editor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveHeaderEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveLiEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveLinkEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveMentionEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveOlEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveParagraphEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveRateEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveSwitchEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveTextEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveTreeSelectEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NaiveUlEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/NumberEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/RadioEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/RangeEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/SelectEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/SubmitEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/edits/editors/TextLikeEditor.d.ts +0 -2
- package/dist/src/components/sidebar-right/validations/DoubleParamValidation.d.ts +0 -11
- package/dist/src/components/sidebar-right/validations/SingleParamValidation.d.ts +0 -8
- package/dist/src/components/sidebar-right/validations/SingleValueValidation.d.ts +0 -7
- package/dist/src/components/sidebar-right/validations/ValidationSection.d.ts +0 -2
- package/dist/src/components/sidebar-right/validations/index.d.ts +0 -3
- package/dist/src/components/ui/button/CustomButton.d.ts +0 -5
- package/dist/src/components/ui/formkit/NaiveAvatar.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveCascader.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveCheckbox.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveCheckboxGroup.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveColorPicker.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveDatePicker.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveDivider.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveMention.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveNumberInput.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveRadioGroup.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveRate.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveSelect.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveSlider.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveSwitch.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTextInput.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTextarea.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTimePicker.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTreeSelect.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyA.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyBlockquote.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyHeader.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyHr.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyLi.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyOl.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyP.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyText.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveTypographyUl.d.ts +0 -6
- package/dist/src/components/ui/formkit/NaiveUpload.d.ts +0 -6
- package/dist/src/components/ui/sonner/Sonner.d.ts +0 -3
- package/dist/src/components/ui/sonner/index.d.ts +0 -1
- package/dist/src/components/ui/theme-switcher/ThemeSwitcher.d.ts +0 -2
- package/dist/src/components/ui/validation-card/ValidationCard.d.ts +0 -21
- package/dist/src/components/ui/validation-card/ValidationSwitch.d.ts +0 -14
- package/dist/src/components/ui/validation-card/index.d.ts +0 -2
- package/dist/src/composables/form-fields.d.ts +0 -809
- package/dist/src/composables/schema-history.d.ts +0 -12
- package/dist/src/composables/use-config.d.ts +0 -5
- package/dist/src/formkit.config.d.ts +0 -11
- package/dist/src/formkit.theme.d.ts +0 -26
- package/dist/src/i18n/context.d.ts +0 -12
- package/dist/src/i18n/messages.d.ts +0 -332
- package/dist/src/index.d.ts +0 -7
- package/dist/src/style-entry.d.ts +0 -1
- package/dist/src/types/env.d.ts +0 -5
- package/dist/src/utils/custom-insert-plugin.d.ts +0 -17
- package/dist/src/utils/default-form-elements.d.ts +0 -1558
- package/dist/src/utils/expression-eval.d.ts +0 -10
- package/dist/src/utils/field-props.d.ts +0 -8
- package/dist/src/utils/format-schema.d.ts +0 -3
- package/dist/src/utils/utils.d.ts +0 -10
- package/dist/style.cjs +0 -0
- package/dist/style.css +0 -2
- package/dist/style.d.ts +0 -1
- package/dist/style.mjs +0 -0
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`),require(`naive-ui`),require(`@vueuse/core`)):typeof define==`function`&&define.amd?define([`exports`,`vue`,`naive-ui`,`@vueuse/core`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FormKitFormBuilder={},e.Vue,e.naiveUi,e.VueUse))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.defineProperty,a=(e,t)=>()=>(e&&(t=e(e=0)),t),o=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},s=[`__key`,`__init`,`__shim`,`__original`,`__index`,`__prevKey`];function c(){return Math.random().toString(36).substring(2,15)}function l(e,t){let n=e instanceof Set?e:new Set(e);return t&&t.forEach(e=>n.add(e)),[...n]}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t,n=!0,r=[`__key`]){if(e===t)return!0;if(typeof t==`object`&&typeof e==`object`){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return f(e,t);if(e===null||t===null||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of r)if((n in e||n in t)&&e[n]!==t[n])return!1;for(let i in e)if(!(i in t)||e[i]!==t[i]&&!n||n&&!d(e[i],t[i],n,r))return!1;return!0}return!1}function f(e,t){return e.source===t.source&&e.flags.split(``).sort().join(``)===t.flags.split(``).sort().join(``)}function p(e){let t=typeof e;if(t===`number`)return!1;if(e===void 0)return!0;if(t===`string`)return e===``;if(t===`object`){if(e===null)return!0;for(let t in e)return!1;return!(e instanceof RegExp||e instanceof Date)}return!1}function m(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e){let t=`^${m(e)}$`,n={MM:`(0[1-9]|1[012])`,M:`([1-9]|1[012])`,DD:`([012][0-9]|3[01])`,D:`([012]?[0-9]|3[01])`,YYYY:`\\d{4}`,YY:`\\d{2}`};return new RegExp(Object.keys(n).reduce((e,t)=>e.replace(t,n[t]),t))}function g(e){return Object.prototype.toString.call(e)===`[object Object]`}function _(e){return g(e)||Array.isArray(e)}function v(e){if(g(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(g(n)===!1||n.hasOwnProperty(`isPrototypeOf`)===!1)}var y=(e,t,n=!1,r=!1)=>{if(t===null)return null;let i={};if(typeof t==`string`)return t;for(let a in e)if(u(t,a)&&(t[a]!==void 0||!r)){if(n&&Array.isArray(e[a])&&Array.isArray(t[a])){i[a]=e[a].concat(t[a]);continue}if(t[a]===void 0)continue;v(e[a])&&v(t[a])?i[a]=y(e[a],t[a],n,r):i[a]=t[a]}else i[a]=e[a];for(let e in t)!u(i,e)&&t[e]!==void 0&&(i[e]=t[e]);return i};function b(e){if(e[0]!==`"`&&e[0]!==`'`||e[0]!==e[e.length-1])return!1;let t=e[0];for(let n=1;n<e.length;n++)if(e[n]===t&&(n===1||e[n-1]!==`\\`)&&n!==e.length-1)return!1;return!0}function x(e){if(!e.length)return``;let t=``,n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);(i!==`\\`||n===`\\`)&&(t+=i),n=i}return t}function S(...e){return e.reduce((e,t)=>{let{value:n,name:r,modelValue:i,config:a,plugins:o,...s}=t;return Object.assign(e,s)},{})}function C(e){let t=[],n=``,r=0,i=``,a=``;for(let o=0;o<e.length;o++){let s=e.charAt(o);s===i&&a!==`\\`?i=``:(s===`'`||s===`"`)&&!i&&a!==`\\`?i=s:s===`(`&&!i?r++:s===`)`&&!i&&r--,s===`,`&&!i&&r===0?(t.push(n),n=``):(s!==` `||i)&&(n+=s),a=s}return n&&t.push(n),t}function w(e,t){let n={},r=t.filter(e=>e instanceof RegExp),i=new Set(t);for(let t in e)!i.has(t)&&!r.some(e=>e.test(t))&&(n[t]=e[t]);return n}function ee(e,t){let n={},r=t.filter(e=>e instanceof RegExp);return t.forEach(t=>{t instanceof RegExp||(n[t]=e[t])}),Object.keys(e).forEach(t=>{r.some(e=>e.test(t))&&(n[t]=e[t])}),n}function te(e){return e.replace(/-([a-z0-9])/gi,(e,t)=>t.toUpperCase())}function T(e){return e.replace(/([a-z0-9])([A-Z])/g,(e,t,n)=>t+`-`+n.toLowerCase()).replace(` `,`-`).toLowerCase()}function ne(e,t=s){if(typeof e==`object`&&e){let n;if(Array.isArray(e)?n=[...e]:v(e)&&(n={...e}),n)return le(e,n,t),n}return e}function re(e,t=s){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File==`function`&&e instanceof File)return e;let n;n=Array.isArray(e)?e.map(e=>typeof e==`object`?re(e,t):e):Object.keys(e).reduce((n,r)=>(n[r]=typeof e[r]==`object`?re(e[r],t):e[r],n),{});for(let r of t)r in e&&Object.defineProperty(n,r,{enumerable:!1,value:e[r]});return n}function ie(e){return typeof e==`object`?re(e):e}function ae(e,t){if(!e||typeof e!=`object`)return null;let n=t.split(`.`),r=e;for(let e in n){let t=n[e];if(u(r,t)&&(r=r[t]),+e==n.length-1)return r;if(!r||typeof r!=`object`)return null}return null}function oe(e){return e!==void 0&&e!==`false`&&e!==!1?!0:void 0}function se(e){return Object.isFrozen(e)?e:Object.defineProperty(e,`__init`,{enumerable:!1,value:!0})}function ce(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]/g,` `).trim().replace(/\s+/g,`-`)}function le(e,t,n){for(let r of n)r in e&&Object.defineProperty(t,r,{enumerable:!1,value:e[r]});return t}function ue(e){let t=!1;return((...n)=>{if(!t)return t=!0,queueMicrotask(()=>t=!1),e(...n)})}function de(e){if(!(e===`false`||e===!1))return!0}function fe(){let e=[],t=0,n=t=>e.push(t),r=n=>{let i=e[t];return typeof i==`function`?i(n,e=>(t++,r(e))):(t=0,n)};return n.dispatch=r,n.unshift=t=>e.unshift(t),n.remove=t=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},n}function pe(){let e=new Map,t=new Map,n,r=(t,r)=>{if(n){n.set(r.name,[t,r]);return}e.has(r.name)&&e.get(r.name).forEach(e=>{(r.origin===t||e.modifiers.includes(`deep`))&&e.listener(r)}),r.bubble&&t.bubble(r)};return r.flush=()=>{e.clear(),t.clear(),n?.clear()},r.on=(n,r,i=`push`)=>{let[a,...o]=n.split(`.`),s=r.receipt||c(),l={modifiers:o,event:a,listener:r,receipt:s};return e.has(a)?e.get(a)[i](l):e.set(a,[l]),t.has(s)?t.get(s)[i](a):t.set(s,[a]),s},r.off=n=>{t.has(n)&&(t.get(n)?.forEach(t=>{let r=e.get(t);Array.isArray(r)&&e.set(t,r.filter(e=>e.receipt!==n))}),t.delete(n))},r.pause=e=>{n||=new Map,e&&e.walk(e=>e._e.pause())},r.play=e=>{if(!n)return;let t=n;n=void 0,t.forEach(([e,t])=>r(e,t)),e&&e.walk(e=>e._e.play())},r}function me(e,t,n,r,i=!0,a){return t._e(e,{payload:r,name:n,bubble:i,origin:e,meta:a}),e}function he(e,t,n){return ot(e.parent)&&e.parent._e(e.parent,n),e}function ge(e,t,n,r,i){return t._e.on(n,r,i)}function _e(e,t,n){return t._e.off(n),e}var ve=fe();ve((e,t)=>(e.message||=String(`E${e.code}`),t(e)));var ye=fe();ye((e,t)=>{e.message||=String(`W${e.code}`);let n=t(e);return console&&typeof console.warn==`function`&&console.warn(n.message),n});function be(e,t={}){ye.dispatch({code:e,data:t})}function xe(e,t={}){throw Error(ve.dispatch({code:e,data:t}).message)}function Se(e,t){let n={blocking:!1,key:c(),meta:{},type:`state`,visible:!0,...e};return t&&n.value&&n.meta.localize!==!1&&(n.value=t.t(n),n.meta.locale=t.config.locale),n}var Ce={apply:Ae,set:Te,remove:De,filter:Oe,reduce:ke,release:Pe,touch:Ee};function we(e=!1){let t={},n,r=e,i=[],a=new Map,o,s=new Proxy(t,{get(...e){let[c,l]=e;return l===`buffer`?r:l===`_b`?i:l===`_m`?a:l===`_r`?o:u(Ce,l)?Ce[l].bind(null,t,s,n):Reflect.get(...e)},set(e,t,a){return t===`_n`?(n=a,o===`__n`&&Ne(n,s),!0):t===`_b`?(i=a,!0):t===`buffer`?(r=a,!0):t===`_r`?(o=a,!0):(xe(101,n),!1)}});return s}function Te(e,t,n,r){if(t.buffer)return t._b.push([[r]]),t;if(e[r.key]!==r){if(typeof r.value==`string`&&r.meta.localize!==!1){let e=r.value;r.value=n.t(r),r.value!==e&&(r.meta.locale=n.props.locale)}let t=`message-${u(e,r.key)?`updated`:`added`}`;e[r.key]=Object.freeze(n.hook.message.dispatch(r)),n.emit(t,r)}return t}function Ee(e,t){for(let n in e){let r={...e[n]};t.set(r)}}function De(e,t,n,r){if(u(e,r)){let t=e[r];delete e[r],n.emit(`message-removed`,t)}return t.buffer===!0&&(t._b=t._b.filter(e=>(e[0]=e[0].filter(e=>e.key!==r),e[1]||e[0].length))),t}function Oe(e,t,n,r,i){for(let a in e){let o=e[a];(!i||o.type===i)&&!r(o)&&De(e,t,n,a)}}function ke(e,t,n,r,i){for(let t in e){let n=e[t];i=r(i,n)}return i}function Ae(e,t,n,r,i){if(Array.isArray(r)){if(t.buffer){t._b.push([r,i]);return}let e=new Set(r.map(e=>(t.set(e),e.key)));typeof i==`string`?t.filter(t=>t.type!==i||e.has(t.key)):typeof i==`function`&&t.filter(t=>!i(t)||e.has(t.key))}else for(let e in r){let a=n.at(e);a?a.store.apply(r[e],i):Me(n,t,e,r[e],i)}}function je(e,...t){let n=`${e.name}-set`,r=e=>Se({key:ce(e),type:`error`,value:e,meta:{source:n,autoClear:!0}});return t.filter(e=>!!e).map(e=>{if(typeof e==`string`&&(e=[e]),Array.isArray(e))return e.map(e=>r(e));{let t={};for(let n in e)Array.isArray(e[n])?t[n]=e[n].map(e=>r(e)):t[n]=[r(e[n])];return t}})}function Me(e,t,n,r,i){let a=t._m;a.has(n)||a.set(n,[]),t._r||=Ne(e,t),a.get(n)?.push([r,i])}function Ne(e,t){return e.on(`child.deep`,({payload:n})=>{t._m.forEach((r,i)=>{e.at(i)===n&&(r.forEach(([e,t])=>{n.store.apply(e,t)}),t._m.delete(i))}),t._m.size===0&&t._r&&(e.off(t._r),t._r=void 0)})}function Pe(e,t){t.buffer=!1,t._b.forEach(([e,n])=>t.apply(e,n)),t._b=[]}function Fe(){let e={},t;return{count:(...n)=>Ie(t,e,...n),init(n){t=n,n.on(`message-added.deep`,ze(e,1)),n.on(`message-removed.deep`,ze(e,-1))},merge:n=>Be(t,e,n),settled(t){return u(e,t)?e[t].promise:Promise.resolve()},unmerge:n=>Be(t,e,n,!0),value(t){return u(e,t)?e[t].count:0}}}function Ie(e,t,n,r,i=0){if(r=Le(r||n),!u(t,n)){let a={condition:r,count:0,name:n,node:e,promise:Promise.resolve(),resolve:()=>{}};t[n]=a,i=e.store.reduce((e,t)=>e+a.condition(t)*1,i),e.each(e=>{e.ledger.count(a.name,a.condition),i+=e.ledger.value(a.name)})}return Re(t[n],i).promise}function Le(e){return typeof e==`function`?e:t=>t.type===e}function Re(e,t){let n=e.count,r=e.count+t;return e.count=r,n===0&&r!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(t=>e.resolve=t)):n!==0&&r===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function ze(e,t){return n=>{for(let r in e){let i=e[r];i.condition(n.payload)&&Re(i,t)}}}function Be(e,t,n,r=!1){let i=e;for(let a in t){let o=t[a].condition;r||n.ledger.count(a,o);let s=n.ledger.value(a)*(r?-1:1);if(e){do e.ledger.count(a,o,s),e=e.parent;while(e);e=i}}}var Ve=new Map,He=new Map,Ue=pe(),We=[];function Ge(e){e.props.id&&(Ve.set(e.props.id,e),He.set(e,e.props.id),Ue(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function Ke(e){if(He.has(e)){let t=He.get(e);He.delete(e),Ve.delete(t),Ue(e,{payload:null,name:t,bubble:!1,origin:e})}}function qe(e){return Ve.get(e)}function Je(e,t){let n=Ue.on(e,t);return We.push(n),n}function Ye(e,t,n){let r=!0;return t in e.config._t?r=!1:e.emit(`config:${t}`,n,!1),t in e.props||(e.emit(`prop`,{prop:t,value:n}),e.emit(`prop:${t}`,n)),r}function Xe(e={}){let t=new Set,n={...e,_add:e=>t.add(e),_rm:e=>t.delete(e)};return new Proxy(n,{set(e,n,r,i){return typeof n==`string`&&t.forEach(e=>Ye(e,n,r)),Reflect.set(e,n,r,i)}})}function Ze(e,t){let n=(t||document).getElementById(e);if(n instanceof HTMLFormElement){let e=new Event(`submit`,{cancelable:!0,bubbles:!0});n.dispatchEvent(e);return}be(151,e)}function Qe(e){let t=e=>{for(let t in e.store){let n=e.store[t];n.type===`error`||n.type===`ui`&&t===`incomplete`?e.store.remove(t):n.type===`state`&&e.store.set({...n,value:!1})}};t(e),e.walk(t)}function $e(e,t){let n=typeof e==`string`?qe(e):e;if(n){let e=e=>{let t=ie(e.props.initial);return t===void 0?e.type===`group`?{}:e.type===`list`?[]:void 0:t};n._e.pause(n);let r=ie(t);return t&&!p(t)&&(n.props.initial=_(r)?se(r):r,n.props._init=n.props.initial),n.input(e(n),!1),n.walk(t=>{t.type===`list`&&t.sync||t.input(e(t),!1)}),n.input(p(r)&&r?r:e(n),!1),n.type!==`input`&&t&&!p(t)&&_(t)&&n.walk(e=>{let t=ie(e.value);e.props.initial=_(t)?se(t):t,e.props._init=e.props.initial}),n._e.play(n),Qe(n),n.emit(`reset`,n),n}be(152,e)}var et={delimiter:`.`,delay:0,locale:`en`,rootClasses:e=>({[`formkit-${T(e)}`]:!0})},tt=Symbol(`index`),nt=Symbol(`removed`),rt=Symbol(`moved`),it=Symbol(`inserted`);function at(e){return e.type===`list`&&Array.isArray(e._value)}function ot(e){return e&&typeof e==`object`&&e.__FKNode__===!0}var st=(e,t,n)=>{xe(102,[e,n])},ct={_c:E(Lt,st,!1),add:E(Ot),addProps:E(Tt),address:E(zt,st,!1),at:E(Bt),bubble:E(he),clearErrors:E(Xt),calm:E(St),config:E(!1),define:E(wt),disturb:E(xt),destroy:E(Ct),extend:E(Qt),hydrate:E(yt),index:E(It,Ft,!1),input:E(ht),each:E(jt),emit:E(me),find:E(Ht),on:E(ge),off:E(_e),parent:E(!1,kt),plugins:E(!1),remove:E(At),root:E(Wt,st,!1),reset:E(Jt),resetConfig:E(Nt),setErrors:E(Yt),submit:E(qt),t:E(Kt),use:E(Pt),name:E(Rt,!1,!1),walk:E(Mt)};function lt(){return new Map(Object.entries(ct))}function E(e,t,n=!0){return{get:e?(t,r)=>n?(...n)=>e(t,r,...n):e(t,r):!1,set:t===void 0?st.bind(null):t}}function ut(){let e=new Map;return new Proxy(e,{get(t,n){return e.has(n)||e.set(n,fe()),e.get(n)}})}var dt=0,ft=0;function pt(e){return e.parent?.type===`list`?tt:e.name||`${e.props?.type||`input`}_${++dt}`}function mt(e){return e.type===`group`?se(e.value&&typeof e.value==`object`&&!Array.isArray(e.value)?e.value:{}):e.type===`list`?se(Array.isArray(e.value)?e.value:[]):e.value}function ht(e,t,n,r=!0){return t._value=gt(e,e.hook.input.dispatch(n)),e.emit(`input`,t._value),e.isCreated&&e.type===`input`&&d(t._value,t.value)&&!e.props.mergeStrategy?(e.emit(`commitRaw`,t.value),t.settled):(t.isSettled&&e.disturb(),r?(t._tmo&&clearTimeout(t._tmo),t._tmo=setTimeout(_t,e.props.delay,e,t)):_t(e,t),t.settled)}function gt(e,t){switch(e.type){case`input`:break;case`group`:(!t||typeof t!=`object`)&&xe(107,[e,t]);break;case`list`:Array.isArray(t)||xe(108,[e,t]);break}return t}function _t(e,t,n=!0,r=!0){t._value=t.value=e.hook.commit.dispatch(t._value),e.type!==`input`&&r&&e.hydrate(),e.emit(`commitRaw`,t.value),e.emit(`commit`,t.value),n&&e.calm()}function vt(e,{name:t,value:n,from:r}){if(!Object.isFrozen(e._value)){if(at(e)){let i=n===nt?[]:n===rt&&typeof r==`number`?e._value.splice(r,1):[n];e._value.splice(t,n===rt||r===it?0:1,...i);return}n===nt?delete e._value[t]:e._value[t]=n}}function yt(e,t){let n=t._value;return e.type===`list`&&e.sync&&bt(e,t),t.children.forEach(r=>{if(typeof n==`object`)if(r.name in n){let e=r.type!==`input`||n[r.name]&&typeof n[r.name]==`object`?se(n[r.name]):n[r.name];if(!r.isSettled||(!_(e)||r.props.mergeStrategy)&&d(e,r._value))return;r.input(e,!1)}else (e.type!==`list`||typeof r.name==`number`)&&vt(t,{name:r.name,value:r.value}),n.__init||(r.type===`group`?r.input({},!1):r.type===`list`?r.input([],!1):r.input(void 0,!1))}),e}function bt(e,t){let n=e._value;if(!Array.isArray(n))return;let r=[],i=new Set(t.children),a=new Map;n.forEach((e,n)=>{if(t.children[n]&&t.children[n]._value===e)r.push(t.children[n]),i.delete(t.children[n]);else{r.push(null);let t=a.get(e)||[];t.push(n),a.set(e,t)}}),i.size&&a.size&&i.forEach(e=>{if(a.has(e._value)){let t=a.get(e._value),n=t.shift();r[n]=e,i.delete(e),t.length||a.delete(e._value)}});let o=[];for(let e=0;e<r.length;e++)r[e]===null&&o.push(e);for(;i.size&&o.length;){let e=i.values().next().value,t=o.shift();if(t===void 0||e===void 0)break;r[t]=e,i.delete(e)}o.forEach(e=>{r[e]=nn({value:n[e]})}),i.size&&i.forEach(e=>{if(!(`__FKP`in e)){let t=e._c.parent;if(!t||rn(t))return;t.ledger.unmerge(e),e._c.parent=null,e.destroy()}}),t.children=r}function xt(e,t){return t._d<=0&&(t.isSettled=!1,e.emit(`settled`,!1,!1),t.settled=new Promise(e=>{t._resolve=e}),e.parent&&e.parent?.disturb()),t._d++,e}function St(e,t,n){if(n!==void 0&&e.type!==`input`)return vt(t,n),_t(e,t,!0,!!(e.config.mergeStrategy&&e.config.mergeStrategy[n.name]));t._d>0&&t._d--,t._d===0&&(t.isSettled=!0,e.emit(`settled`,!0,!1),e.parent&&e.parent?.calm({name:e.name,value:t.value}),t._resolve&&t._resolve(t.value))}function Ct(e,t){e.emit(`destroying`,e),e.store.filter(()=>!1),e.parent&&e.parent.remove(e),Ke(e),e.emit(`destroyed`,e),t._e.flush(),t._value=t.value=void 0;for(let e in t.context)delete t.context[e];t.plugins.clear(),t.context=null}function wt(e,t,n){t.type=n.type;let r=re(n);e.props.__propDefs=Dt(e.props.__propDefs??[],r?.props||[]),r.props=e.props.__propDefs,t.props.definition=r,t.value=t._value=mt({type:e.type,value:t.value}),n.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),t.props.type=n.forceTypeProp),n.family&&(t.props.family=n.family),n.features&&n.features.forEach(t=>t(e)),n.props&&e.addProps(n.props),e.emit(`defined`,n)}function Tt(e,t,n){let r=Array.isArray(n)?n:Object.keys(n),i=Array.isArray(n)?{}:r.reduce((e,t)=>(`default`in n[t]&&(e[t]=n[t].default),e),{});if(e.props.attrs){let a={...e.props.attrs};e.props._emit=!1;for(let t in a){let n=te(t);r.includes(n)&&(e.props[n]=a[t],delete a[t])}Array.isArray(n)||r.forEach(t=>{`default`in n[t]&&e.props[t]===void 0&&(e.props[t]=i[t])});let o=ie(t._value);e.props.initial=e.type===`input`?o:se(o),e.props._emit=!0,e.props.attrs=a}let a=Dt(e.props.__propDefs??[],n);return e.props.definition&&(e.props.definition.props=a),e.props.__propDefs=a,e.emit(`added-props`,n),e}function Et(e){return Array.isArray(e)?e.reduce((e,t)=>(e[t]={},e),{}):e}function Dt(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):y(Et(e),Et(t))}function Ot(e,t,n,r){if(e.type===`input`&&xe(100,e),n.parent&&n.parent!==e&&n.parent.remove(n),!t.children.includes(n)){if(r!==void 0&&e.type===`list`){let i=t.children[r];i&&`__FKP`in i?(n._c.uid=i.uid,t.children.splice(r,1,n)):t.children.splice(r,0,n),Array.isArray(e.value)&&e.value.length<t.children.length&&e.disturb().calm({name:r,value:n.value,from:it})}else t.children.push(n);n.isSettled||e.disturb()}if(n.parent!==e){if(n.parent=e,n.parent!==e)return e.remove(n),n.parent.add(n),e}else n.use(e.plugins);return _t(e,t,!1),e.ledger.merge(n),e.emit(`child`,n),e}function kt(e,t,n,r){return ot(r)?(e.parent&&e.parent!==r&&e.parent.remove(e),t.parent=r,e.resetConfig(),r.children.includes(e)?e.use(r.plugins):r.add(e),!0):r===null?(t.parent=null,!0):!1}function At(e,t,n){let r=t.children.indexOf(n);if(r!==-1){n.isSettled&&e.disturb(),t.children.splice(r,1);let i=oe(n.props.preserve),a=n.parent;for(;i===void 0&&a;)i=oe(a.props.preserve),a=a.parent;i?e.calm():e.calm({name:e.type===`list`?r:n.name,value:nt}),n.parent=null,n.config._rmn=n}return e.ledger.unmerge(n),e.emit(`childRemoved`,n),e}function jt(e,t,n){t.children.forEach(e=>!(`__FKP`in e)&&n(e))}function Mt(e,t,n,r=!1,i=!1){t.children.some(e=>{if(`__FKP`in e)return!1;let t=n(e);return r&&t===!1?!0:i&&t===!1?!1:e.walk(n,r,i)})}function Nt(e,t){let n=e.parent||void 0;t.config=Gt(e.config._t,n),e.walk(e=>e.resetConfig())}function Pt(e,t,n,r=!0,i=!0){return Array.isArray(n)||n instanceof Set?(n.forEach(n=>Pt(e,t,n)),e):(t.plugins.has(n)||(i&&typeof n.library==`function`&&n.library(e),r&&n(e)!==!1&&(t.plugins.add(n),e.children.forEach(e=>e.use(n)))),e)}function Ft(e,t,n,r){if(ot(e.parent)){let t=e.parent.children,n=r>=t.length?t.length-1:r<0?0:r,i=t.indexOf(e);return i===-1?!1:(t.splice(i,1),t.splice(n,0,e),e.parent.children=t,e.parent.type===`list`&&e.parent.disturb().calm({name:n,value:rt,from:i}),!0)}return!1}function It(e){if(e.parent){let t=[...e.parent.children].indexOf(e);return t===-1?e.parent.children.length:t}return-1}function Lt(e,t){return t}function Rt(e,t){return e.parent?.type===`list`||t.name===tt?e.index:t.name}function zt(e,t){return t.parent?t.parent.address.concat([e.name]):[e.name]}function Bt(e,t,n){let r=typeof n==`string`?n.split(e.config.delimiter):n;if(!r.length)return;let i=r[0],a=e.parent;for(a||=(String(r[0])===String(e.name)&&r.shift(),e),i===`$parent`&&r.shift();a&&r.length;){let t=r.shift();switch(t){case`$root`:a=e.root;break;case`$parent`:a=a.parent;break;case`$self`:a=e;break;default:a=a.children.find(e=>!(`__FKP`in e)&&String(e.name)===String(t))||Vt(a,t)}}return a||void 0}function Vt(e,t){let n=String(t).match(/^(find)\((.*)\)$/);if(n){let[,t,r]=n,i=r.split(`,`).map(e=>e.trim());switch(t){case`find`:return e.find(i[0],i[1]);default:return}}}function Ht(e,t,n,r){return Ut(e,n,r)}function Ut(e,t,n=`name`){let r=typeof n==`string`?e=>e[n]==t:n,i=[e];for(;i.length;){let e=i.shift();if(!(`__FKP`in e)){if(r(e,t))return e;i.push(...e.children)}}}function Wt(e){let t=e;for(;t.parent;)t=t.parent;return t}function Gt(e={},t){let n;return new Proxy(e,{get(...r){let i=r[1];if(i===`_t`)return e;let a=Reflect.get(...r);if(a!==void 0)return a;if(t){let e=t.config[i];if(e!==void 0)return e}if(e.rootConfig&&typeof i==`string`){let t=e.rootConfig[i];if(t!==void 0)return t}return i===`delay`&&n?.type===`input`?20:et[i]},set(...t){let r=t[1],i=t[2];if(r===`_n`)return n=i,e.rootConfig&&e.rootConfig._add(n),!0;if(r===`_rmn`)return e.rootConfig&&e.rootConfig._rm(n),n=void 0,!0;if(!d(e[r],i,!1)){let e=Reflect.set(...t);return n&&(n.emit(`config:${r}`,i,!1),Ye(n,r,i),n.walk(e=>Ye(e,r,i),!1,!0)),e}return!0}})}function Kt(e,t,n,r=`ui`){let i=typeof n==`string`?{key:n,value:n,type:r}:n,a=e.hook.text.dispatch(i);return e.emit(`text`,a,!1),a.value}function qt(e){let t=e.name;do{if(e.props.isForm===!0)break;e.parent||xe(106,t),e=e.parent}while(e);e.props.id&&Ze(e.props.id,e.props.__root)}function Jt(e,t,n){return $e(e,n)}function Yt(e,t,n,r){let i=`${e.name}-set`,a=e.hook.setErrors.dispatch({localErrors:n,childErrors:r});return je(e,a.localErrors,a.childErrors).forEach(t=>{e.store.apply(t,e=>e.meta.source===i)}),e}function Xt(e,t,n=!0,r){return e.store.filter(e=>!(r===void 0||e.meta.source===r),`error`),n&&(r||=`${e.name}-set`,e.walk(e=>{e.store.filter(e=>!(e.type===`error`&&e.meta&&e.meta.source===r))})),e}function Zt(e){let t={initial:typeof e==`object`?ie(e):e},n,r=!0,i={};return new Proxy(t,{get(...e){let[r,a]=e,o;u(t,a)?(o=Reflect.get(...e),i[a]?.boolean&&(o=de(o))):n&&typeof a==`string`&&n.config[a]!==void 0?(o=n.config[a],a===`mergeStrategy`&&n?.type===`input`&&g(o)&&n.name in o&&(o=o[n.name])):o=i[a]?.default;let s=i[a]?.getter;return i[a]?.boolean&&(o=!!o),s?s(o,n):o},set(e,a,o,s){if(a===`_n`)return n=o,!0;if(a===`_emit`)return r=o,!0;let{prop:c,value:l}=n.hook.prop.dispatch({prop:a,value:o}),u=i[c]?.setter;if(l=u?u(l,n):l,!d(t[c],l,!1)||typeof l==`object`){let t=Reflect.set(e,c,l,s);return c===`__propDefs`&&(i=Et(l)),r&&(n.emit(`prop`,{prop:c,value:l}),typeof c==`string`&&n.emit(`prop:${c}`,l)),t}return!0}})}function Qt(e,t,n,r){return t.traps.set(n,r),e}function $t(e,t){if(e.props.definition)return e.define(e.props.definition);for(let n of t){if(e.props.definition)return;typeof n.library==`function`&&n.library(e)}}function en(e){let t=mt(e),n=Gt(e.config||{},e.parent);return{_d:0,_e:pe(),uid:Symbol(),_resolve:!1,_tmo:!1,_value:t,children:l(e.children||[]),config:n,hook:ut(),isCreated:!1,isSettled:!0,ledger:Fe(),name:pt(e),parent:e.parent||null,plugins:new Set,props:Zt(t),settled:Promise.resolve(t),store:we(!0),sync:e.sync||!1,traps:lt(),type:e.type||`input`,value:t}}function tn(e,t){let n=t.props?.id;if(n||delete t.props?.id,e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,Object.assign(e.props,n?{}:{id:`input_${ft++}`},t.props??{}),e.props._emit=!0,$t(e,new Set([...t.plugins||[],...e.parent?e.parent.plugins:[]])),t.plugins)for(let n of t.plugins)Pt(e,e._c,n,!0,!1);return e.each(t=>e.add(t)),e.parent&&e.parent.add(e,t.index),e.type===`input`&&e.children.length&&xe(100,e),ht(e,e._c,e._value,!1),e.store.release(),n&&Ge(e),e.emit(`created`,e),e.isCreated=!0,e}function nn(e){return{__FKP:!0,uid:Symbol(),name:e?.name??`p_${dt++}`,value:e?.value??null,_value:e?.value??null,type:e?.type??`input`,props:{},use:()=>{},input(e){return this._value=e,this.value=e,Promise.resolve()},isSettled:!0}}function rn(e){return`__FKP`in e}function an(e){let t=e||{},n=en(t),r=new Proxy(n,{get(...e){let[,t]=e;if(t===`__FKNode__`)return!0;let i=n.traps.get(t);return i&&i.get?i.get(r,n):Reflect.get(...e)},set(...e){let[,t,i]=e,a=n.traps.get(t);return a&&a.set?a.set(r,n,t,i):Reflect.set(...e)}});return tn(r,t)}function on(e){return typeof e!=`string`&&u(e,`$el`)}function sn(e){return typeof e!=`string`&&u(e,`$cmp`)}function cn(e){return!e||typeof e==`string`?!1:u(e,`if`)&&u(e,`then`)}function ln(e){return typeof e!=`string`&&`$formkit`in e}function un(e){if(typeof e==`string`)return{$el:`text`,children:e};if(ln(e)){let{$formkit:t,for:n,if:r,children:i,bind:a,...o}=e;return Object.assign({$cmp:`FormKit`,props:{...o,type:t}},r?{if:r}:{},n?{for:n}:{},i?{children:i}:{},a?{bind:a}:{})}return e}function dn(e){let t,n=new Set,r=function(e,t){return typeof e==`function`?e(t):e},i=[{"&&":(e,t,n)=>r(e,n)&&r(t,n),"||":(e,t,n)=>r(e,n)||r(t,n)},{"===":(e,t,n)=>r(e,n)===r(t,n),"!==":(e,t,n)=>r(e,n)!==r(t,n),"==":(e,t,n)=>r(e,n)==r(t,n),"!=":(e,t,n)=>r(e,n)!=r(t,n),">=":(e,t,n)=>r(e,n)>=r(t,n),"<=":(e,t,n)=>r(e,n)<=r(t,n),">":(e,t,n)=>r(e,n)>r(t,n),"<":(e,t,n)=>r(e,n)<r(t,n)},{"+":(e,t,n)=>r(e,n)+r(t,n),"-":(e,t,n)=>r(e,n)-r(t,n)},{"*":(e,t,n)=>r(e,n)*r(t,n),"/":(e,t,n)=>r(e,n)/r(t,n),"%":(e,t,n)=>r(e,n)%r(t,n)}],a=i.reduce((e,t)=>e.concat(Object.keys(t)),[]),o=new Set(a.map(e=>e.charAt(0)));function s(e,t,n,r){let i=e.filter(e=>e.startsWith(t));return i.length?i.find(e=>r.length>=n+e.length&&r.substring(n,n+e.length)===e?e:!1):!1}function c(e,t,n=1){let r=n?t.substring(e+1).trim():t.substring(0,e).trim();if(!r.length)return-1;if(!n){let e=r.split(``).reverse(),t=e.findIndex(e=>o.has(e));r=e.slice(t).join(``)}let a=r[0];return i.findIndex(e=>!!s(Object.keys(e),a,0,r))}function l(e,t){let n=``,r=t.length,i=0;for(let o=e;o<r;o++){let e=t.charAt(o);if(e===`(`)i++;else if(e===`)`)i--;else if(i===0&&e===` `)continue;if(i===0&&s(a,e,o,t))return[n,o-1];n+=e}return[n,t.length-1]}function u(e,t=0){let n=i[t],r=e.length,a=Object.keys(n),o=0,u=!1,f=null,p=``,m=null,h,g=``,_=``,v=``,y=``,b=0,x=(e,t)=>{e?v+=t:p+=t};for(let i=0;i<r;i++)if(g=_,_=e.charAt(i),(_===`'`||_===`"`)&&g!==`\\`&&(o===0&&!u||o&&!y)){o?y=_:u=_,x(o,_);continue}else if(u&&(_!==u||g===`\\`)||y&&(_!==y||g===`\\`)){x(o,_);continue}else if(u===_){u=!1,x(o,_);continue}else if(y===_){y=!1,x(o,_);continue}else if(_===` `)continue;else if(_===`(`)o===0?b=i:v+=_,o++;else if(_===`)`)if(o--,o===0){let n=typeof p==`string`&&p.startsWith(`$`)?p:void 0,r=n&&e.charAt(i+1)===`.`,a=``;r&&([a,i]=l(i+2,e));let o=f?t:c(b,e,0),s=c(i,e);o===-1&&s===-1?(p=d(v,-1,n,a),typeof p==`string`&&(p=v)):f&&(o>=s||s===-1)&&t===o?(m=f.bind(null,d(v,-1,n,a)),f=null,p=``):s>o&&t===s?p=d(v,-1,n,a):p+=`(${v})${r?`.${a}`:``}`,v=``}else v+=_;else if(o===0&&(h=s(a,_,i,e))){i===0&&xe(103,[h,e]),i+=h.length-1,i===e.length-1&&xe(104,[h,e]),f?p&&=(m=f.bind(null,d(p,t)),f=n[h].bind(null,m),``):m?(f=n[h].bind(null,d(m,t)),m=null):(f=n[h].bind(null,d(p,t)),p=``);continue}else x(o,_);return p&&f&&(f=f.bind(null,d(p,t))),f=!f&&m?m:f,!f&&p&&(f=(e,t)=>typeof e==`function`?e(t):e,f=f.bind(null,d(p,t))),!f&&!p&&xe(105,e),f}function d(e,r,a,o){if(a){let n=d(a,i.length),r,s=o?dn(`$${o}`):!1;if(typeof n==`function`){let i=C(String(e)).map(e=>d(e,-1));return e=>{let c=n(e);return typeof c==`function`?(r=c(...i.map(t=>typeof t==`function`?t(e):t)),s&&=s.provide(e=>{let n=t(e);return e.reduce((e,t)=>{if(t===o||o?.startsWith(`${t}(`)){let n=ae(r,t);e[t]=()=>n}else e[t]=n[t];return e},{})}),s?s():r):(be(150,a),c)}}}else if(typeof e==`string`){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`undefined`)return;if(b(e))return x(e.substring(1,e.length-1));if(!isNaN(+e))return Number(e);if(r<i.length-1)return u(e,r+1);if(e.startsWith(`$`)){let t=e.substring(1);return n.add(t),function(e){return t in e?e[t]():void 0}}return e}return e}let f=u(e.startsWith(`$:`)?e.substring(2):e),p=Array.from(n);function m(e){return t=e,Object.assign(f.bind(null,e(p)),{provide:m})}return Object.assign(f,{provide:m})}function fn(e,t,n){return n?typeof n==`string`?n.split(` `).reduce((e,t)=>Object.assign(e,{[t]:!0}),{}):typeof n==`function`?fn(e,t,n(t,e)):n:{}}function pn(e,t,...n){let r=n.reduce((e,t)=>{if(!t)return mn(e);let{$reset:n,...r}=t;return mn(n?r:Object.assign(e,r))},{});return Object.keys(e.hook.classes.dispatch({property:t,classes:r}).classes).filter(e=>r[e]).join(` `)||null}function mn(e){let t=`$remove:`,n=!1,r=Object.keys(e).filter(r=>(e[r]&&r.startsWith(t)&&(n=!0),e[r]));return r.length>1&&n&&r.filter(e=>e.startsWith(t)).map(t=>{let n=t.substring(8);e[n]=!1,e[t]=!1}),e}function hn(e,t,n){let r=qe(e);r?r.setErrors(t,n):be(651,e)}function gn(e,t=!0){let n=qe(e);n?n.clearErrors(t):be(652,e)}var _n=`2.0.0`,vn=new WeakSet;function yn(e,t){let n=t||Object.assign(new Map,{active:!1}),r=new Map,i=function(t){n.active&&(n.has(e)||n.set(e,new Set),n.get(e)?.add(t))},a=function(e){return new Proxy(e,{get(...e){return typeof e[1]==`string`&&i(`prop:${e[1]}`),Reflect.get(...e)}})},o=function(e){return new Proxy(e,{get(...t){return t[1]===`value`?t=>(i(`count:${t}`),e.value(t)):Reflect.get(...t)}})},s=function(e,t){return ot(e)?yn(e,n):(t===`value`&&i(`commit`),t===`_value`&&i(`input`),t===`props`?a(e):t===`ledger`?o(e):(t===`children`&&(i(`child`),i(`childRemoved`)),e))},{proxy:c,revoke:l}=Proxy.revocable(e,{get(...t){switch(t[1]){case`_node`:return e;case`deps`:return n;case`watch`:return(e,t,n)=>Sn(c,e,t,n);case`observe`:return()=>{let e=new Map(n);return n.clear(),n.active=!0,e};case`stopObserve`:return()=>{let e=new Map(n);return n.active=!1,e};case`receipts`:return r;case`kill`:return()=>{xn(r),vn.add(t[2]),l()}}let i=Reflect.get(...t);return typeof i==`function`?(...e)=>s(i(...e),t[1]):s(i,t[1])}});return c}function bn(e,[t,n],r,i){t.forEach((t,n)=>{t.forEach(t=>{e.receipts.has(n)||e.receipts.set(n,{});let a=e.receipts.get(n)??{};a[t]=a[t]??[],a[t].push(n.on(t,r,i)),e.receipts.set(n,a)})}),n.forEach((t,n)=>{t.forEach(t=>{if(e.receipts.has(n)){let r=e.receipts.get(n);r&&u(r,t)&&(r[t].map(n.off),delete r[t],e.receipts.set(n,r))}})})}function xn(e){e.forEach((e,t)=>{for(let n in e)e[n].map(t.off)}),e.clear()}function Sn(e,t,n,r){let i=i=>{bn(e,Cn(a,e.stopObserve()),()=>Sn(e,t,n,r),r),n&&n(i)},a=new Map(e.deps);e.observe();let o=t(e);o instanceof Promise?o.then(e=>i(e)):i(o)}function Cn(e,t){let n=new Map,r=new Map;return t.forEach((t,r)=>{if(!e.has(r))n.set(r,t);else{let i=new Set,a=e.get(r);t.forEach(e=>!a?.has(e)&&i.add(e)),n.set(r,i)}}),e.forEach((e,n)=>{if(!t.has(n))r.set(n,e);else{let i=new Set,a=t.get(n);e.forEach(e=>!a?.has(e)&&i.add(e)),r.set(n,i)}}),[n,r]}function wn(e){return vn.has(e)}var Tn=o({accepted:()=>Dn,alpha:()=>jn,alpha_spaces:()=>Mn,alphanumeric:()=>Nn,between:()=>Ln,confirm:()=>zn,contains_alpha:()=>Bn,contains_alpha_spaces:()=>Vn,contains_alphanumeric:()=>Hn,contains_lowercase:()=>Un,contains_numeric:()=>Wn,contains_symbol:()=>Gn,contains_uppercase:()=>Kn,date_after:()=>On,date_after_node:()=>An,date_after_or_equal:()=>kn,date_before:()=>Pn,date_before_node:()=>Fn,date_before_or_equal:()=>In,date_between:()=>qn,date_format:()=>Jn,email:()=>Yn,ends_with:()=>Xn,is:()=>Zn,length:()=>Qn,lowercase:()=>$n,matches:()=>er,max:()=>tr,min:()=>nr,not:()=>rr,number:()=>ir,require_one:()=>or,required:()=>cr,starts_with:()=>lr,symbol:()=>ur,uppercase:()=>dr,url:()=>fr}),En=function({value:e}){return[`yes`,`on`,`1`,1,!0,`true`].includes(e)};En.skipEmpty=!1;var Dn=En,On=function({value:e},t=!1){let n=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r>n},kn=function({value:e},t=!1){let n=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r>n||r===n},An=function(e,t){if(!t)return!1;let n=Date.parse(String(e.value)),r=Date.parse(String(e.at(t)?.value));return isNaN(r)?!0:isNaN(n)?!1:n>r},jn=function({value:e},t=`default`){let n={default:/^\p{L}+$/u,latin:/^[a-z]+$/i};return n[u(n,t)?t:`default`].test(String(e))},Mn=function({value:e},t=`default`){let n={default:/^[\p{L} ]+$/u,latin:/^[a-z ]+$/i};return n[u(n,t)?t:`default`].test(String(e))},Nn=function({value:e},t=`default`){let n={default:/^[0-9\p{L}]+$/u,latin:/^[0-9a-z]+$/i};return n[u(n,t)?t:`default`].test(String(e))},Pn=function({value:e},t=!1){let n=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r<n},Fn=function(e,t){if(!t)return!1;let n=Date.parse(String(e.value)),r=Date.parse(String(e.at(t)?.value));return isNaN(r)?!0:isNaN(n)?!1:n<r},In=function({value:e},t=!1){let n=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r<n||r===n},Ln=function({value:e},t,n){if(!isNaN(e)&&!isNaN(t)&&!isNaN(n)){let r=1*e;t=Number(t),n=Number(n);let[i,a]=t<=n?[t,n]:[n,t];return r>=1*i&&r<=1*a}return!1},Rn=/(_confirm(?:ed)?)$/,zn=function(e,t,n=`loose`){t||=Rn.test(e.name)?e.name.replace(Rn,``):`${e.name}_confirm`;let r=e.at(t)?.value;return n===`strict`?e.value===r:e.value==r},Bn=function({value:e},t=`default`){let n={default:/\p{L}/u,latin:/[a-z]/i};return n[u(n,t)?t:`default`].test(String(e))},Vn=function({value:e},t=`default`){let n={default:/[\p{L} ]/u,latin:/[a-z ]/i};return n[u(n,t)?t:`default`].test(String(e))},Hn=function({value:e},t=`default`){let n={default:/[0-9\p{L}]/u,latin:/[0-9a-z]/i};return n[u(n,t)?t:`default`].test(String(e))},Un=function({value:e},t=`default`){let n={default:/\p{Ll}/u,latin:/[a-z]/};return n[u(n,t)?t:`default`].test(String(e))},Wn=function({value:e}){return/[0-9]/.test(String(e))},Gn=function({value:e}){return/[!-/:-@[-`{-~]/.test(String(e))},Kn=function({value:e},t=`default`){let n={default:/\p{Lu}/u,latin:/[A-Z]/};return n[u(n,t)?t:`default`].test(String(e))},qn=function({value:e},t,n){t=t instanceof Date?t.getTime():Date.parse(t),n=n instanceof Date?n.getTime():Date.parse(n);let r=e instanceof Date?e.getTime():Date.parse(String(e));if(t&&isNaN(n))n=t,t=Date.now();else if(t===void 0||r===void 0)return!1;return r>=t&&r<=n},Jn=function({value:e},t){return t&&typeof t==`string`?h(t).test(String(e)):!isNaN(Date.parse(String(e)))},Yn=function({value:e}){return/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(String(e))},Xn=function({value:e},...t){return typeof e==`string`&&t.length?t.some(t=>e.endsWith(t)):typeof e==`string`&&t.length===0},Zn=function({value:e},...t){return t.some(t=>typeof t==`object`?d(t,e):t==e)},Qn=function({value:e},t=0,n=1/0){t=parseInt(t),n=isNaN(parseInt(n))?1/0:parseInt(n);let r=t<=n?t:n,i=n>=t?n:t;if(typeof e==`string`||Array.isArray(e))return e.length>=r&&e.length<=i;if(e&&typeof e==`object`){let t=Object.keys(e).length;return t>=r&&t<=i}return!1},$n=function({value:e},t=`default`){let n={default:/^\p{Ll}+$/u,allow_non_alpha:/^[0-9\p{Ll}!-/:-@[-`{-~]+$/u,allow_numeric:/^[0-9\p{Ll}]+$/u,allow_numeric_dashes:/^[0-9\p{Ll}-]+$/u,latin:/^[a-z]+$/};return n[u(n,t)?t:`default`].test(String(e))},er=function({value:e},...t){return t.some(t=>(typeof t==`string`&&t.substr(0,1)===`/`&&t.substr(-1)===`/`&&(t=new RegExp(t.substr(1,t.length-2))),t instanceof RegExp?t.test(String(e)):t===e))},tr=function({value:e},t=10){return Array.isArray(e)?e.length<=t:Number(e)<=Number(t)},nr=function({value:e},t=1){return Array.isArray(e)?e.length>=t:Number(e)>=Number(t)},rr=function({value:e},...t){return!t.some(t=>typeof t==`object`?d(t,e):t===e)},ir=function({value:e}){return!isNaN(e)},ar=function(e,...t){return p(e.value)?t.map(t=>e.at(t)?.value).some(e=>!p(e)):!0};ar.skipEmpty=!1;var or=ar,sr=function({value:e},t=`default`){return t===`trim`&&typeof e==`string`?!p(e.trim()):!p(e)};sr.skipEmpty=!1;var cr=sr,lr=function({value:e},...t){return typeof e==`string`&&t.length?t.some(t=>e.startsWith(t)):typeof e==`string`&&t.length===0},ur=function({value:e}){return/^[!-/:-@[-`{-~]+$/.test(String(e))},dr=function({value:e},t=`default`){let n={default:/^\p{Lu}+$/u,latin:/^[A-Z]+$/};return n[u(n,t)?t:`default`].test(String(e))},fr=function({value:e},...t){try{let n=t.length?t:[`http:`,`https:`],r=new URL(String(e));return n.includes(r.protocol)}catch{return!1}},pr=Se({type:`state`,blocking:!0,visible:!1,value:!0,key:`validating`});function mr(e={}){return function(t){let n=ie(t.props.validationRules||{}),r={...e,...n},i={input:c(),rerun:null,isPassing:!0},a=ie(t.props.validation);t.on(`prop:validation`,({payload:e})=>o(e,n)),t.on(`prop:validationRules`,({payload:e})=>o(a,e));function o(o,s){d(Object.keys(n||{}),Object.keys(s||{}))&&d(a,o)||(n=ie(s),a=ie(o),r={...e,...n},t.props.parsedRules?.forEach(e=>{vr(e),xn(e.observer.receipts),e.observer.kill()}),t.store.filter(()=>!1,`validation`),t.props.parsedRules=Ar(o,r,t),i.isPassing=!0,hr(t,t.props.parsedRules,i))}t.props.parsedRules=Ar(a,r,t),hr(t,t.props.parsedRules,i)}}function hr(e,t,n){wn(e)||(n.input=c(),e.store.set(Se({key:`failing`,value:!n.isPassing,visible:!1})),n.isPassing=!0,e.store.filter(e=>!e.meta.removeImmediately,`validation`),t.forEach(e=>e.debounce&&clearTimeout(e.timer)),t.length&&(e.store.set(pr),gr(0,t,n,!1,()=>{e.store.remove(pr.key),e.store.set(Se({key:`failing`,value:!n.isPassing,visible:!1}))})))}function gr(e,t,n,r,i){let a=t[e];if(!a)return i();let o=a.observer;if(wn(o))return;let s=n.input;a.state=null;function c(c,l){if(n.input!==s)return;n.isPassing=n.isPassing&&!!l,a.queued=!1;let u=o.stopObserve();if(bn(o,Cn(a.deps,u),function(){try{o.store.set(pr)}catch{}a.queued=!0,n.rerun&&clearTimeout(n.rerun),n.rerun=setTimeout(hr,0,o,t,n)},`unshift`),a.deps=u,a.state=l,l===!1?yr(a,r||c):vr(a),t.length>e+1){let a=t[e+1];(l||a.force||!a.skipEmpty)&&a.state===null&&(a.queued=!0),gr(e+1,t,n,r||c,i)}else i()}(!p(o.value)||!a.skipEmpty)&&(n.isPassing||a.force)?a.queued?_r(a,o,e=>{e instanceof Promise?e.then(e=>c(!0,e)):c(!1,e)}):gr(e+1,t,n,r,i):p(o.value)&&a.skipEmpty&&n.isPassing?(o.observe(),o.value,c(!1,n.isPassing)):c(!1,null)}function _r(e,t,n){e.debounce?e.timer=setTimeout(()=>{t.observe(),n(e.rule(t,...e.args))},e.debounce):(t.observe(),n(e.rule(t,...e.args)))}function vr(e){let t=`rule_${e.name}`;e.messageObserver&&=e.messageObserver.kill(),u(e.observer.store,t)&&e.observer.store.remove(t)}function yr(e,t){let n=e.observer;wn(n)||(e.messageObserver||=yn(n._node),e.messageObserver.watch(t=>xr(t,e),r=>{let i=br(n,e,r),a=Se({blocking:e.blocking,key:`rule_${e.name}`,meta:{messageKey:e.name,removeImmediately:t,localize:!i,i18nArgs:r},type:`validation`,value:i||`This field is not valid.`});n.store.set(a)}))}function br(e,t,n){let r=e.props.validationMessages&&u(e.props.validationMessages,t.name)?e.props.validationMessages[t.name]:void 0;return typeof r==`function`?r(...n):r}function xr(e,t){return[{node:e,name:Sr(e),args:t.args}]}function Sr(e){return typeof e.props.validationLabel==`function`?e.props.validationLabel(e):e.props.validationLabel||e.props.label||e.props.name||String(e.name)}var Cr=`(?:[\\*+?()0-9]+)`,wr=`[a-zA-Z][a-zA-Z0-9_]+`,Tr=RegExp(`^(${Cr}?${wr})(?:\\:(.*)+)?$`,`i`),Er=RegExp(`^(${Cr})(${wr})$`,`i`),Dr=/([\*+?]+)?(\(\d+\))([\*+?]+)?/,Or=/\(\d+\)/,kr={blocking:!0,debounce:0,force:!1,skipEmpty:!0,name:``};function Ar(e,t,n){return e?(typeof e==`string`?jr(e):re(e)).reduce((e,r)=>{let i=r.shift(),a={};if(typeof i==`string`){let[e,n]=Nr(i);u(t,e)&&(i=t[e],Object.assign(a,n))}return typeof i==`function`&&e.push({observer:yn(n),rule:i,args:r,timer:0,state:null,queued:!0,deps:new Map,...kr,...Pr(a,i)}),e},[]):[]}function jr(e){return e.split(`|`).reduce((e,t)=>{let n=Mr(t);return n&&e.push(n),e},[])}function Mr(e){let t=e.trim();if(t){let e=t.match(Tr);if(e&&typeof e[1]==`string`)return[e[1].trim(),...e[2]&&typeof e[2]==`string`?e[2].split(`,`).map(e=>e.trim()):[]]}return!1}function Nr(e){let t=e.match(Er);if(!t)return[e,{name:e}];let n={"*":{force:!0},"+":{skipEmpty:!1},"?":{blocking:!1}},[,r,i]=t,a=Or.test(r)?r.match(Dr)||[]:[,r];return[i,[a[1],a[2],a[3]].reduce((e,t)=>(t&&(Or.test(t)?e.debounce=parseInt(t.substr(1,t.length-1)):t.split(``).forEach(t=>u(n,t)&&Object.assign(e,n[t]))),e),{name:i})]}function Pr(e,t){return e.name||=t.ruleName||t.name,[`skipEmpty`,`force`,`debounce`,`blocking`].reduce((e,n)=>(u(t,n)&&!u(e,n)&&Object.assign(e,{[n]:t[n]}),e),e)}function D(e){return e[0].toUpperCase()+e.substr(1)}function Fr(e,t=`or`){return e.reduce((n,r,i)=>(n+=r,i<=e.length-2&&e.length>2&&(n+=`, `),i===e.length-2&&(n+=`${e.length===2?` `:``}${t} `),n),``)}function Ir(e){let t=typeof e==`string`?new Date(Date.parse(e)):e;return t instanceof Date?new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeZone:`UTC`}).format(t):`(unknown)`}function Lr(e,t){return Number(e)>=Number(t)?[t,e]:[e,t]}var Rr={ui:{add:`Add`,remove:`Remove`,removeAll:`Remove all`,incomplete:`Sorry, not all fields are filled out correctly.`,submit:`Submit`,noFiles:`No file chosen`,moveUp:`Move up`,moveDown:`Move down`,isLoading:`Loading...`,loadMore:`Load more`,next:`Next`,prev:`Previous`,addAllValues:`Add all values`,addSelectedValues:`Add selected values`,removeAllValues:`Remove all values`,removeSelectedValues:`Remove selected values`,chooseDate:`Choose date`,changeDate:`Change date`,summaryHeader:`There were errors in your form.`,close:`Close`,open:`Open`},validation:{accepted({name:e}){return`Please accept the ${e}.`},date_after({name:e,args:t}){return Array.isArray(t)&&t.length?`${D(e)} must be after ${Ir(t[0])}.`:`${D(e)} must be in the future.`},alpha({name:e}){return`${D(e)} can only contain alphabetical characters.`},alphanumeric({name:e}){return`${D(e)} can only contain letters and numbers.`},alpha_spaces({name:e}){return`${D(e)} can only contain letters and spaces.`},contains_alpha({name:e}){return`${D(e)} must contain alphabetical characters.`},contains_alphanumeric({name:e}){return`${D(e)} must contain letters or numbers.`},contains_alpha_spaces({name:e}){return`${D(e)} must contain letters or spaces.`},contains_symbol({name:e}){return`${D(e)} must contain a symbol.`},contains_uppercase({name:e}){return`${D(e)} must contain an uppercase letter.`},contains_lowercase({name:e}){return`${D(e)} must contain a lowercase letter.`},contains_numeric({name:e}){return`${D(e)} must contain numbers.`},symbol({name:e}){return`${D(e)} must be a symbol.`},uppercase({name:e}){return`${D(e)} can only contain uppercase letters.`},lowercase({name:e,args:t}){let n=``;return Array.isArray(t)&&t.length&&(t[0]===`allow_non_alpha`&&(n=`, numbers and symbols`),t[0]===`allow_numeric`&&(n=` and numbers`),t[0]===`allow_numeric_dashes`&&(n=`, numbers and dashes`)),`${D(e)} can only contain lowercase letters${n}.`},date_before({name:e,args:t}){return Array.isArray(t)&&t.length?`${D(e)} must be before ${Ir(t[0])}.`:`${D(e)} must be in the past.`},between({name:e,args:t}){if(isNaN(t[0])||isNaN(t[1]))return`This field was configured incorrectly and can’t be submitted.`;let[n,r]=Lr(t[0],t[1]);return`${D(e)} must be between ${n} and ${r}.`},confirm({name:e}){return`${D(e)} does not match.`},date_format({name:e,args:t}){return Array.isArray(t)&&t.length?`${D(e)} is not a valid date, please use the format ${t[0]}`:`This field was configured incorrectly and can’t be submitted`},date_between({name:e,args:t}){return`${D(e)} must be between ${Ir(t[0])} and ${Ir(t[1])}`},email:`Please enter a valid email address.`,ends_with({name:e,args:t}){return`${D(e)} doesn’t end with ${Fr(t)}.`},is({name:e}){return`${D(e)} is not an allowed value.`},length({name:e,args:[t=0,n=1/0]}){let r=Math.min(t,n),i=Math.max(t,n);return r==1&&i===1/0?`${D(e)} must be at least one character.`:r==0&&i?`${D(e)} must be less than or equal to ${i} characters.`:r===i?`${D(e)} should be ${i} characters long.`:r&&i===1/0?`${D(e)} must be greater than or equal to ${r} characters.`:`${D(e)} must be between ${r} and ${i} characters.`},matches({name:e}){return`${D(e)} is not an allowed value.`},max({name:e,node:{value:t},args:n}){return Array.isArray(t)?`Cannot have more than ${n[0]} ${e}.`:`${D(e)} must be no more than ${n[0]}.`},mime({name:e,args:t}){return t[0]?`${D(e)} must be of the type: ${t[0]}`:`No file formats allowed.`},min({name:e,node:{value:t},args:n}){return Array.isArray(t)?`Cannot have fewer than ${n[0]} ${e}.`:`${D(e)} must be at least ${n[0]}.`},not({name:e,node:{value:t}}){return`“${t}” is not an allowed ${e}.`},number({name:e}){return`${D(e)} must be a number.`},require_one:({name:e,node:t,args:n})=>{let r=n.map(e=>{let n=t.at(e);return n?Sr(n):!1}).filter(e=>!!e);return r.unshift(e),`${r.join(` or `)} is required.`},required({name:e}){return`${D(e)} is required.`},starts_with({name:e,args:t}){return`${D(e)} doesn’t start with ${Fr(t)}.`},url(){return`Please enter a valid URL.`},invalidDate:`The selected date is invalid.`}},zr={ui:{add:`添加`,remove:`移除`,removeAll:`移除全部`,incomplete:`抱歉,部分字段未被正确填写。`,submit:`提交`,noFiles:`未选择文件`,moveUp:`上移`,moveDown:`下移`,isLoading:`加载中...`,loadMore:`加载更多`,next:`下一步`,prev:`上一步`,addAllValues:`添加所有值`,addSelectedValues:`添加所选值`,removeAllValues:`移除所有值`,removeSelectedValues:`移除所选值`,chooseDate:`选择日期`,changeDate:`更改日期`,summaryHeader:`您的表单中存在错误。`,close:`关闭`,open:`打开`},validation:{accepted({name:e}){return`请接受${e}。`},date_after({name:e,args:t}){return Array.isArray(t)&&t.length?`${D(e)}必须晚于${Ir(t[0])}。`:`${D(e)}必须是未来的日期。`},alpha({name:e}){return`${D(e)}只能包含英文字母。`},alphanumeric({name:e}){return`${D(e)}只能包含字母和数字。`},alpha_spaces({name:e}){return`${D(e)}只能包含字母和空格。`},contains_alpha({name:e}){return`${D(e)} 必须包含字母字符`},contains_alphanumeric({name:e}){return`${D(e)} 必须包含字母或数字。`},contains_alpha_spaces({name:e}){return`${D(e)} 必须包含字母或空格。`},contains_symbol({name:e}){return`${D(e)} 必须包含符号。`},contains_uppercase({name:e}){return`${D(e)} 必须包含大写字母。`},contains_lowercase({name:e}){return`${D(e)} 必须包含小写字母。`},contains_numeric({name:e}){return`${D(e)} 必须包含数字。`},symbol({name:e}){return`${D(e)} 必须是符号。`},uppercase({name:e}){return`${D(e)} 只能包含大写字母。`},lowercase({name:e}){return`${D(e)} 只能包含小写字母。`},date_before({name:e,args:t}){return Array.isArray(t)&&t.length?`${D(e)}必须早于${Ir(t[0])}。`:`${D(e)}必须是过去的日期。`},between({name:e,args:t}){if(isNaN(t[0])||isNaN(t[1]))return`该字段未被正确设置而无法提交。`;let[n,r]=Lr(t[0],t[1]);return`${D(e)}必须在${n}和${r}之间。`},confirm({name:e}){return`${D(e)}不匹配。`},date_format({name:e,args:t}){return Array.isArray(t)&&t.length?`${D(e)}不是合法日期,请使用 ${t[0]} 格式`:`该字段未被正确设置而无法提交`},date_between({name:e,args:t}){return`${D(e)}必须在${Ir(t[0])}和${Ir(t[1])}之间`},email:`请输入合法的电子邮件地址。`,ends_with({name:e,args:t}){return`${D(e)}必须以${Fr(t)}结尾。`},is({name:e}){return`${D(e)}是不允许的。`},length({name:e,args:[t=0,n=1/0]}){let r=Math.min(t,n),i=Math.max(t,n);return r==1&&i===1/0?`${D(e)}至少要有一个字符。`:r==0&&i?`${D(e)}必须少于或等于${i}个字符。`:r===i?`${D(e)}必须包含${i}个字符。`:r&&i===1/0?`${D(e)}必须多于或等于${r}个字符。`:`${D(e)}必须介于${r}和${i}个字符之间。`},matches({name:e}){return`${D(e)}是不允许的。`},max({name:e,node:{value:t},args:n}){return Array.isArray(t)?`${e}不得多于${n[0]}个值。`:`${e}不得大于${n[0]}。`},mime({name:e,args:t}){return t[0]?`${D(e)}的类型必须为:${t[0]}`:`没有允许的文件格式。`},min({name:e,node:{value:t},args:n}){return Array.isArray(t)?`${e}不得少于${n[0]}个值。`:`${D(e)}不得小于${n[0]}。`},not({name:e,node:{value:t}}){return`"${t}"不是一个合法的${e}。`},number({name:e}){return`${D(e)}必须为数字。`},require_one:({name:e,node:t,args:n})=>{let r=n.map(e=>{let n=t.at(e);return n?Sr(n):!1}).filter(e=>!!e);return r.unshift(e),`${r.join(`或`)}${r}需要。`},required({name:e}){return`${D(e)}不得留空。`},starts_with({name:e,args:t}){return`${D(e)}必须以${Fr(t)}开头。`},url(){return`请输入有效的 URL。`},invalidDate:`所选日期无效。`}},Br=new Set,Vr=null;function Hr(e){return function(t){Br.add(t),Vr&&(t.config.locale=Vr),t.on(`destroying`,()=>Br.delete(t));let n=Ur(t.config.locale,e),r=n?e[n]:{};t.on(`prop:locale`,({payload:i})=>{n=Ur(i,e),r=n?e[n]:{},t.store.touch()}),t.on(`prop:label`,()=>t.store.touch()),t.on(`prop:validationLabel`,()=>t.store.touch()),t.hook.text((e,t)=>{let n=e.meta?.messageKey||e.key;if(u(r,e.type)&&u(r[e.type],n)){let t=r[e.type][n];typeof t==`function`?e.value=Array.isArray(e.meta?.i18nArgs)?t(...e.meta.i18nArgs):t(e):e.value=t}return t(e)})}}function Ur(e,t){if(u(t,e))return e;let[n]=e.split(`-`);if(u(t,n))return n;for(let e in t)return e;return!1}function Wr(e){Vr=e;for(let t of Br)t.config.locale=e}function Gr(...e){let t=e.reduce((e,t)=>y(e,t),{}),n=()=>{};return n.library=function(e){let n=te(e.props.type);u(t,n)&&e.define(t[n])},n}var Kr=`classes.config.delay.errors.id.index.inputErrors.library.modelValue.onUpdate:modelValue.name.number.parent.plugins.sectionsSchema.type.validation.validationLabel.validationMessages.validationRules.onInput.onInputRaw.onUpdate:modelValue.onNode.onSubmit.onSubmitInvalid.onSubmitRaw`.split(`.`);function qr(e){return e&&typeof e==`object`&&`group`in e&&Array.isArray(e.options)}function Jr(e,t={count:1}){return Array.isArray(e)?e.map(e=>{if(typeof e==`string`||typeof e==`number`)return{label:String(e),value:String(e)};if(typeof e==`object`){if(`group`in e)return e.options=Jr(e.options||[],t),e;`value`in e&&typeof e.value!=`string`&&Object.assign(e,{value:`__mask_${t.count++}`,__original:e.value})}return e}):Object.keys(e).map(t=>({label:e[t],value:t}))}function Yr(e,t,n=!1){if(Array.isArray(e)){for(let n of e)if(!(typeof n!=`object`&&n)){if(qr(n)){let e=Yr(n.options,t,!0);if(e!==void 0)return e}else if(t==n.value)return`__original`in n?n.__original:n.value}}return n?void 0:t}function Xr(e,t){return e===null&&t===void 0||e===void 0&&t===null?!1:e==t?!0:v(e)&&v(t)?d(e,t):!1}function Zr(e){e.hook.prop((t,n)=>{var r;return t.prop===`options`&&(typeof t.value==`function`?(e.props.optionsLoader=t.value,t.value=[]):((r=e.props)._normalizeCounter??(r._normalizeCounter={count:1}),t.value=Jr(t.value,e.props._normalizeCounter))),n(t)})}function O(e,t,n=!1){return(...r)=>{let i=n=>{let i=!t||typeof t==`string`?{$el:t}:t();return(on(i)||sn(i))&&(i.meta?i.meta.section=e:i.meta={section:e},r.length&&!i.children&&(i.children=[...r.map(e=>typeof e==`function`?e(n):e)]),on(i)&&(i.attrs={class:`$classes.${e}`,...i.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in n?ei(i,n[e]):i}};return i._s=e,n?Qr(i):i}}function Qr(e){return t=>[e(t)]}function $r(e){return!!(e&&typeof e==`object`&&(`$el`in e||`$cmp`in e||`$formkit`in e))}function ei(e,t={}){return typeof e==`string`?$r(t)||typeof t==`string`?t:e:Array.isArray(e)?$r(t)?t:e:y(e,t)}var ti=O(`actions`,()=>({$el:`div`,if:`$actions`})),ni=O(`input`,()=>({$el:`input`,bind:`$attrs`,attrs:{type:`$type`,name:`$node.props.altName || $node.name`,disabled:`$option.attrs.disabled || $disabled`,onInput:`$handlers.toggleChecked`,checked:`$fns.eq($_value, $onValue)`,onBlur:`$handlers.blur`,value:`$: true`,id:`$id`,"aria-describedby":{if:`$options.length`,then:{if:`$option.help`,then:`$: "help-" + $option.attrs.id`,else:void 0},else:{if:`$help`,then:`$: "help-" + $id`,else:void 0}}}})),ri=O(`optionHelp`,()=>({$el:`div`,if:`$option.help`,attrs:{id:`$: "help-" + $option.attrs.id`}})),ii=O(`inner`,`span`),ai=O(`label`,`span`),oi=O(`option`,()=>({$el:`li`,for:[`option`,`$options`],attrs:{"data-disabled":`$option.attrs.disabled || $disabled || undefined`}})),si=O(`options`,`ul`),ci=O(`wrapper`,()=>({$el:`label`,attrs:{"data-disabled":{if:`$options.length`,then:void 0,else:`$disabled || undefined`},"data-checked":{if:`$options == undefined`,then:`$fns.eq($_value, $onValue) || undefined`,else:`$fns.isChecked($option.value) || undefined`}}})),li=O(`input`,()=>({$el:`button`,bind:`$attrs`,attrs:{type:`$type`,disabled:`$disabled`,name:`$node.name`,id:`$id`}})),ui=O(`default`,null),di=O(`decorator`,()=>({$el:`span`,attrs:{"aria-hidden":`true`}})),fi=O(`fieldset`,()=>({$el:`fieldset`,attrs:{id:`$id`,"aria-describedby":{if:`$help`,then:`$: "help-" + $id`,else:void 0}}})),pi=O(`input`,()=>({$el:`input`,bind:`$attrs`,attrs:{type:`file`,disabled:`$disabled`,name:`$node.name`,onChange:`$handlers.files`,onBlur:`$handlers.blur`,id:`$id`,"aria-describedby":`$describedBy`,"aria-required":`$state.required || undefined`}})),mi=O(`fileItem`,()=>({$el:`li`,for:[`file`,`$value`]})),hi=O(`fileList`,()=>({$el:`ul`,if:`$value.length`,attrs:{"data-has-multiple":`$_hasMultipleFiles`}})),gi=O(`fileName`,()=>({$el:`span`,attrs:{class:`$classes.fileName`}})),_i=O(`fileRemove`,()=>({$el:`button`,attrs:{type:`button`,onClick:`$handlers.resetFiles`}})),vi=O(`form`,()=>({$el:`form`,bind:`$attrs`,meta:{autoAnimate:!0},attrs:{id:`$id`,name:`$node.name`,onSubmit:`$handlers.submit`,"data-loading":`$state.loading || undefined`}})),yi=O(`wrapper`,null,!0),bi=O(`help`,()=>({$el:`div`,if:`$help`,attrs:{id:`$: "help-" + $id`}})),xi=(e,t)=>O(`${e}Icon`,()=>{let n=`_raw${e.charAt(0).toUpperCase()}${e.slice(1)}Icon`;return{if:`$${e}Icon && $${n}`,$el:`${t||`span`}`,attrs:{class:`$classes.${e}Icon + " " + $classes.icon`,innerHTML:`$${n}`,onClick:`$handlers.iconClick(${e})`,role:`$fns.iconRole(${e})`,tabindex:`$fns.iconRole(${e}) === "button" && "0" || undefined`,for:{if:`${t===`label`}`,then:`$id`}}}})(),Si=O(`inner`,`div`),Ci=O(`label`,()=>({$el:`label`,if:`$label`,attrs:{for:`$id`}})),wi=O(`legend`,()=>({$el:`legend`,if:`$label`})),Ti=O(`message`,()=>({$el:`li`,for:[`message`,`$messages`],attrs:{key:`$message.key`,id:`$id + '-' + $message.key`,"data-message-type":`$message.type`}})),Ei=O(`messages`,()=>({$el:`ul`,if:`$defaultMessagePlacement && $fns.length($messages)`})),Di=O(`noFiles`,()=>({$el:`span`,if:`$value == null || $value.length == 0`})),Oi=O(`optGroup`,()=>({$el:`optgroup`,bind:`$option.attrs`,attrs:{label:`$option.group`}})),ki=O(`option`,()=>({$el:`option`,bind:`$option.attrs`,attrs:{class:`$classes.option`,value:`$option.value`,selected:`$fns.isSelected($option)`}})),Ai=O(`options`,()=>({$el:null,if:`$options.length`,for:[`option`,`$option.options || $options`]})),ji=O(`outer`,()=>({$el:`div`,meta:{autoAnimate:!0},attrs:{key:`$id`,"data-family":`$family || undefined`,"data-type":`$type`,"data-multiple":`$attrs.multiple || ($type != "select" && $options != undefined) || undefined`,"data-has-multiple":`$_hasMultipleFiles`,"data-disabled":`$: ($disabled !== "false" && $disabled) || undefined`,"data-empty":`$state.empty || undefined`,"data-complete":`$state.complete || undefined`,"data-invalid":`$state.invalid || undefined`,"data-errors":`$state.errors || undefined`,"data-submitted":`$state.submitted || undefined`,"data-prefix-icon":`$_rawPrefixIcon !== undefined || undefined`,"data-suffix-icon":`$_rawSuffixIcon !== undefined || undefined`,"data-prefix-icon-click":`$onPrefixIconClick !== undefined || undefined`,"data-suffix-icon-click":`$onSuffixIconClick !== undefined || undefined`}})),Mi=O(`prefix`,null),Ni=O(`input`,()=>({$el:`select`,bind:`$attrs`,attrs:{id:`$id`,"data-placeholder":`$fns.showPlaceholder($_value, $placeholder)`,disabled:`$disabled`,class:`$classes.input`,name:`$node.name`,onChange:`$handlers.onChange`,onInput:`$handlers.selectInput`,onBlur:`$handlers.blur`,"aria-describedby":`$describedBy`,"aria-required":`$state.required || undefined`}})),Pi=O(`submit`,()=>({$cmp:`FormKit`,bind:`$submitAttrs`,props:{type:`submit`,label:`$submitLabel`}})),Fi=O(`suffix`,null),Ii=O(`input`,()=>({$el:`input`,bind:`$attrs`,attrs:{type:`$type`,disabled:`$disabled`,name:`$node.name`,onInput:`$handlers.DOMInput`,onBlur:`$handlers.blur`,value:`$_value`,id:`$id`,"aria-describedby":`$describedBy`,"aria-required":`$state.required || undefined`}})),Li=O(`input`,()=>({$el:`textarea`,bind:`$attrs`,attrs:{disabled:`$disabled`,name:`$node.name`,onInput:`$handlers.DOMInput`,onBlur:`$handlers.blur`,value:`$_value`,id:`$id`,"aria-describedby":`$describedBy`,"aria-required":`$state.required || undefined`},children:`$initialValue`})),Ri=O(`wrapper`,`div`),zi=0;function Bi(e){(e.type===`group`||e.type===`list`)&&e.plugins.add(Vi)}function Vi(e){e.props.type===`radio`&&(e.addProps([`altName`]),e.props.altName=`${e.name}_${zi++}`)}function Hi(e){return function(t,n){return t.prop===`options`&&Array.isArray(t.value)&&(t.value=t.value.map(t=>t.attrs?.id?t:y(t,{attrs:{id:`${e.props.id}-option-${ce(String(t.value))}`}})),e.props.type===`checkbox`&&!Array.isArray(e.value)&&(e.isCreated?e.input([],!1):e.on(`created`,()=>{Array.isArray(e.value)||e.input([],!1)}))),n(t)}}function Ui(e,t){let n=t.target;if(n instanceof HTMLInputElement){let t=Array.isArray(e.props.options)?Yr(e.props.options,n.value):n.value;Array.isArray(e.props.options)&&e.props.options.length?Array.isArray(e._value)?e._value.some(e=>Xr(t,e))?e.input(e._value.filter(e=>!Xr(t,e))):e.input([...e._value,t]):e.input([t]):n.checked?e.input(e.props.onValue):e.input(e.props.offValue)}}function Wi(e,t){return e.context?.value,e.context?._value,Array.isArray(e._value)?e._value.some(n=>Xr(Yr(e.props.options,t),n)):!1}function Gi(e){e.on(`created`,()=>{e.context?.handlers&&(e.context.handlers.toggleChecked=Ui.bind(null,e)),e.context?.fns&&(e.context.fns.isChecked=Wi.bind(null,e)),u(e.props,`onValue`)||(e.props.onValue=!0),u(e.props,`offValue`)||(e.props.offValue=!1)}),e.hook.prop(Hi(e))}function Ki(e,t){return n=>{n.props[`${e}Icon`]===void 0&&(n.props[`${e}Icon`]=t.startsWith(`<svg`)?t:`default:${t}`)}}function qi(e){e.on(`created`,()=>{`disabled`in e.props&&(e.props.disabled=oe(e.props.disabled),e.config.disabled=oe(e.props.disabled))}),e.hook.prop(({prop:e,value:t},n)=>(t=e===`disabled`?oe(t):t,n({prop:e,value:t}))),e.on(`prop:disabled`,({payload:t})=>{e.config.disabled=oe(t)})}function Ji(e,t){return n=>{n.store.set(Se({key:e,type:`ui`,value:t||e,meta:{localize:!0,i18nArgs:[n]}}))}}var Yi=typeof window<`u`;function Xi(e){e.target instanceof HTMLElement&&e.target.hasAttribute(`data-file-hover`)&&e.target.removeAttribute(`data-file-hover`)}function Zi(e,t){t.target instanceof HTMLInputElement?e===`dragover`&&t.target.setAttribute(`data-file-hover`,`true`):t.preventDefault(),e===`drop`&&Xi(t)}function Qi(e){Ji(`noFiles`,`Select file`)(e),Ji(`removeAll`,`Remove all`)(e),Ji(`remove`)(e),e.addProps([`_hasMultipleFiles`]),Yi&&(window._FormKit_File_Drop||(window.addEventListener(`dragover`,Zi.bind(null,`dragover`)),window.addEventListener(`drop`,Zi.bind(null,`drop`)),window.addEventListener(`dragleave`,Xi),window._FormKit_File_Drop=!0)),e.hook.input((e,t)=>t(Array.isArray(e)?e:[])),e.on(`input`,({payload:t})=>{e.props._hasMultipleFiles=Array.isArray(t)&&t.length>1?!0:void 0}),e.on(`reset`,()=>{if(e.props.id&&Yi){let t=document.getElementById(e.props.id);t&&(t.value=``)}}),e.on(`created`,()=>{Array.isArray(e.value)||e.input([],!1),e.context&&(e.context.handlers.resetFiles=t=>{if(t.preventDefault(),e.input([]),e.props.id&&Yi){let t=document.getElementById(e.props.id);t&&(t.value=``),t?.focus()}},e.context.handlers.files=t=>{let n=[];if(t.target instanceof HTMLInputElement&&t.target.files){for(let e=0;e<t.target.files.length;e++){let r;(r=t.target.files.item(e))&&n.push({name:r.name,file:r})}e.input(n)}e.context&&(e.context.files=n),typeof e.props.attrs?.onChange==`function`&&e.props.attrs?.onChange(t)})})}var $i=Se({key:`loading`,value:!0,visible:!1});async function ea(e,t){let n=Math.random();if(e.props._submitNonce=n,t.preventDefault(),await e.settled,e.ledger.value(`validating`)&&(e.store.set($i),await e.ledger.settled(`validating`),e.store.remove(`loading`),e.props._submitNonce!==n))return;let r=e=>e.store.set(Se({key:`submitted`,value:!0,visible:!1}));if(e.walk(r),r(e),e.emit(`submit-raw`),typeof e.props.onSubmitRaw==`function`&&e.props.onSubmitRaw(t,e),e.ledger.value(`blocking`))typeof e.props.onSubmitInvalid==`function`&&e.props.onSubmitInvalid(e),e.props.incompleteMessage!==!1&&ta(e);else if(typeof e.props.onSubmit==`function`){let t=e.props.onSubmit(e.hook.submit.dispatch(re(e.value)),e);if(t instanceof Promise){let n=e.props.disabled===void 0&&e.props.submitBehavior!==`live`;n&&(e.props.disabled=!0),e.store.set($i),await t,n&&(e.props.disabled=!1),e.store.remove(`loading`)}}else t.target instanceof HTMLFormElement&&t.target.submit()}function ta(e){e.store.set(Se({blocking:!1,key:`incomplete`,meta:{localize:e.props.incompleteMessage===void 0,i18nArgs:[{node:e}],showAsMessage:!0},type:`ui`,value:e.props.incompleteMessage||`Form incomplete.`}))}function na(e){var t;e.props.isForm=!0,e.ledger.count(`validating`,e=>e.key===`validating`),(t=e.props).submitAttrs??(t.submitAttrs={disabled:e.props.disabled}),e.on(`prop:disabled`,({payload:t})=>{e.props.submitAttrs={...e.props.submitAttrs,disabled:t}}),e.on(`created`,()=>{e.context?.handlers&&(e.context.handlers.submit=ea.bind(null,e)),u(e.props,`actions`)||(e.props.actions=!0)}),e.on(`prop:incompleteMessage`,()=>{e.store.incomplete&&ta(e)}),e.on(`settled:blocking`,()=>e.store.remove(`incomplete`))}function ra(e){e.props.ignore===void 0&&(e.props.ignore=!0,e.parent=null)}function ia(e){e.on(`created`,()=>{e.context&&(e.context.initialValue=e.value||``)})}function aa(e){if(e.props.number===void 0)return;let t=[`number`,`range`,`hidden`].includes(e.props.type);e.hook.input((n,r)=>{if(n===``)return r(void 0);let i=e.props.number===`integer`?parseInt(n):parseFloat(n);return r(Number.isFinite(i)?i:t?void 0:n)})}function oa(e,t){t.target instanceof HTMLInputElement&&e.input(Yr(e.props.options,t.target.value))}function sa(e,t){return e.context?.value,e.context?._value,Xr(Yr(e.props.options,t),e._value)}function ca(e){e.on(`created`,()=>{Array.isArray(e.props.options)||be(350,{node:e,inputType:`radio`}),e.context?.handlers&&(e.context.handlers.toggleChecked=oa.bind(null,e)),e.context?.fns&&(e.context.fns.isChecked=sa.bind(null,e))}),e.hook.prop(Hi(e))}function la(e,t){if(qr(t))return!1;e.context&&e.context.value;let n=`__original`in t?t.__original:t.value;return Array.isArray(e._value)?e._value.some(e=>Xr(e,n)):(e._value===void 0||e._value===null&&!ua(e.props.options,null))&&t.attrs&&t.attrs[`data-is-placeholder`]?!0:Xr(n,e._value)}function ua(e,t){return e.some(e=>qr(e)?ua(e.options,t):(`__original`in e?e.__original:e.value)===t)}async function da(e,t){typeof e.props.attrs?.onChange==`function`&&(await new Promise(e=>setTimeout(e,0)),await e.settled,e.props.attrs.onChange(t))}function fa(e,t){let n=t.target,r=n.hasAttribute(`multiple`)?Array.from(n.selectedOptions).map(t=>Yr(e.props.options,t.value)):Yr(e.props.options,n.value);e.input(r)}function pa(e,t){return e.some(e=>e.attrs&&e.attrs[`data-is-placeholder`])?e:[{label:t,value:``,attrs:{hidden:!0,disabled:!0,"data-is-placeholder":`true`}},...e]}function ma(e){let t=e.length>0?e[0]:void 0;if(t)return qr(t)?ma(t.options):`__original`in t?t.__original:t.value}function ha(e){e.on(`created`,()=>{let t=oe(e.props.attrs?.multiple);!t&&e.props.placeholder&&Array.isArray(e.props.options)&&(e.hook.prop(({prop:t,value:n},r)=>(t===`options`&&(n=pa(n,e.props.placeholder)),r({prop:t,value:n}))),e.props.options=pa(e.props.options,e.props.placeholder)),t?e.value===void 0&&e.input([],!1):e.context&&!e.context.options&&(e.props.attrs=Object.assign({},e.props.attrs,{value:e._value}),e.on(`input`,({payload:t})=>{e.props.attrs=Object.assign({},e.props.attrs,{value:t})})),e.context?.handlers&&(e.context.handlers.selectInput=fa.bind(null,e),e.context.handlers.onChange=da.bind(null,e)),e.context?.fns&&(e.context.fns.isSelected=la.bind(null,e),e.context.fns.showPlaceholder=(t,n)=>{if(!Array.isArray(e.props.options))return!1;let r=e.props.options.some(e=>e.attrs&&`data-is-placeholder`in e.attrs?!1:d(t,`__original`in e?e.__original:e.value));return n&&!r?!0:void 0})}),e.hook.input((t,n)=>(!e.props.placeholder&&t===void 0&&Array.isArray(e.props?.options)&&e.props.options.length&&!oe(e.props?.attrs?.multiple)&&(t=ma(e.props.options)),n(t)))}function ga(e){return!!(cn(e)&&e.if&&e.if.startsWith(`$slots.`)&&typeof e.then==`string`&&e.then.startsWith(`$slots.`)&&`else`in e)}function _a(e,t={}){let n=ji(Ri(Ci(`$label`),Si(xi(`prefix`),Mi(),e(),Fi(),xi(`suffix`))),bi(`$help`),Ei(Ti(`$message.value`)));return(e={})=>n(y(t,e))}function va(e,t,n){let r=r=>{let i=t(r);if(n||$r(i)&&`if`in i||ga(i)){let t={if:e,then:i};return n&&(t.else=n(r)),t}else ga(i)?Object.assign(i.else,{if:e}):$r(i)&&Object.assign(i,{if:e});return i};return r._s=c(),r}function ya(e,t){let n=n=>{let r=e({});return ga(r)?(Array.isArray(r.else)||(r.else=ei(ei(r.else,t),e._s?n[e._s]:{})),r):ei(ei(r,t),e._s?n[e._s]:{})};return n._s=e._s,n}var ba={schema:ji(Ei(Ti(`$message.value`)),Ri(li(xi(`prefix`),Mi(),ui(`$label || $ui.submit.value`),Fi(),xi(`suffix`))),bi(`$help`)),type:`input`,family:`button`,props:[],features:[Ji(`submit`),ra],schemaMemoKey:`h6st4epl3j8`},xa={schema:ji(va(`$options == undefined`,ci(ii(Mi(),ni(),di(xi(`decorator`)),Fi()),ya(ai(`$label`),{if:`$label`})),fi(wi(`$label`),bi(`$help`),si(oi(ci(ii(Mi(),ya(ni(),{bind:`$option.attrs`,attrs:{id:`$option.attrs.id`,value:`$option.value`,checked:`$fns.isChecked($option.value)`}}),di(xi(`decorator`)),Fi()),ya(ai(`$option.label`),{if:`$option.label`})),ri(`$option.help`))))),va(`$options == undefined && $help`,bi(`$help`)),Ei(Ti(`$message.value`))),type:`input`,family:`box`,props:[`options`,`onValue`,`offValue`,`optionsLoader`],features:[Zr,Gi,Ki(`decorator`,`checkboxDecorator`)],schemaMemoKey:`qje02tb3gu8`},Sa={schema:ji(Ri(Ci(`$label`),Si(xi(`prefix`,`label`),Mi(),pi(),hi(mi(xi(`fileItem`),gi(`$file.name`),va(`$value.length === 1`,_i(xi(`fileRemove`),`$ui.remove.value + " " + $file.name`)))),va(`$value.length > 1`,_i(`$ui.removeAll.value`)),Di(xi(`noFiles`),`$ui.noFiles.value`),Fi(),xi(`suffix`))),bi(`$help`),Ei(Ti(`$message.value`))),type:`input`,family:`text`,props:[],features:[Qi,Ki(`fileItem`,`fileItem`),Ki(`fileRemove`,`fileRemove`),Ki(`noFiles`,`noFiles`)],schemaMemoKey:`9kqc4852fv8`},Ca={schema:vi(`$slots.default`,Ei(Ti(`$message.value`)),ti(Pi())),type:`group`,props:[`actions`,`submit`,`submitLabel`,`submitAttrs`,`submitBehavior`,`incompleteMessage`],features:[na,qi],schemaMemoKey:`5bg016redjo`},wa={schema:yi(`$slots.default`),type:`group`,props:[],features:[qi,Bi]},Ta={schema:Ii(),type:`input`,props:[],features:[aa]},Ea={schema:yi(`$slots.default`),type:`list`,props:[`sync`,`dynamic`],features:[qi,Bi]},Da={schema:yi(),type:`input`,props:[],features:[]},Oa={schema:ji(va(`$options == undefined`,ci(ii(Mi(),ni(),di(xi(`decorator`)),Fi()),ya(ai(`$label`),{if:`$label`})),fi(wi(`$label`),bi(`$help`),si(oi(ci(ii(Mi(),ya(ni(),{bind:`$option.attrs`,attrs:{id:`$option.attrs.id`,value:`$option.value`,checked:`$fns.isChecked($option.value)`}}),di(xi(`decorator`)),Fi()),ya(ai(`$option.label`),{if:`$option.label`})),ri(`$option.help`))))),va(`$options == undefined && $help`,bi(`$help`)),Ei(Ti(`$message.value`))),type:`input`,family:`box`,props:[`options`,`onValue`,`offValue`,`optionsLoader`],features:[Zr,ca,Ki(`decorator`,`radioDecorator`)],schemaMemoKey:`qje02tb3gu8`},ka={schema:ji(Ri(Ci(`$label`),Si(xi(`prefix`),Mi(),Ni(va(`$slots.default`,()=>`$slots.default`,Ai(va(`$option.group`,Oi(Ai(ki(`$option.label`))),ki(`$option.label`))))),va(`$attrs.multiple !== undefined`,()=>``,xi(`select`)),Fi(),xi(`suffix`))),bi(`$help`),Ei(Ti(`$message.value`))),type:`input`,props:[`options`,`placeholder`,`optionsLoader`],features:[Zr,ha,Ki(`select`,`select`)],schemaMemoKey:`cb119h43krg`},Aa={schema:ji(Ri(Ci(`$label`),Si(xi(`prefix`,`label`),Mi(),Li(),Fi(),xi(`suffix`))),bi(`$help`),Ei(Ti(`$message.value`))),type:`input`,props:[],features:[ia],schemaMemoKey:`b1n0td79m9g`},ja={schema:ji(Ri(Ci(`$label`),Si(xi(`prefix`,`label`),Mi(),Ii(),Fi(),xi(`suffix`))),bi(`$help`),Ei(Ti(`$message.value`))),type:`input`,family:`text`,props:[],features:[aa],schemaMemoKey:`c3cc4kflsg`},Ma={button:ba,submit:ba,checkbox:xa,file:Sa,form:Ca,group:wa,hidden:Ta,list:Ea,meta:Da,radio:Oa,select:ka,textarea:Aa,text:ja,color:ja,date:ja,datetimeLocal:ja,email:ja,month:ja,number:ja,password:ja,search:ja,tel:ja,time:ja,url:ja,week:ja,range:ja},Na=void 0,Pa=null,Fa,Ia=!1,La=!1,Ra=new Promise(e=>{Fa=()=>{Ia=!0,e()}}),za=typeof window<`u`&&typeof fetch<`u`;Na=za?getComputedStyle(document.documentElement):void 0;var Ba={},Va={};function Ha(e,t,n,r){t&&Object.assign(Ba,t),za&&!La&&Na?.getPropertyValue(`--formkit-theme`)?(Fa(),La=!0):e&&!La&&za?Ua(e):!La&&za&&Fa();let i=function(e){e.addProps([`iconLoader`,`iconLoaderUrl`]),e.props.iconHandler=Wa(e.props?.iconLoader?e.props.iconLoader:r,e.props?.iconLoaderUrl?e.props.iconLoaderUrl:n),Ja(e,e.props.iconHandler),e.on(`created`,()=>{e?.context?.handlers&&(e.context.handlers.iconClick=t=>{let n=`on${t.charAt(0).toUpperCase()}${t.slice(1)}IconClick`,r=e.props[n];if(r&&typeof r==`function`)return t=>r(e,t)}),e?.context?.fns&&(e.context.fns.iconRole=t=>{let n=`on${t.charAt(0).toUpperCase()}${t.slice(1)}IconClick`;return typeof e.props[n]==`function`?`button`:null})})};return i.iconHandler=Wa(r,n),i}function Ua(e){if(!(!e||!za||typeof getComputedStyle!=`function`)&&(La=!0,Pa=document.getElementById(`formkit-theme`),e&&za&&(!Na?.getPropertyValue(`--formkit-theme`)&&!Pa||Pa?.getAttribute(`data-theme`)&&Pa?.getAttribute(`data-theme`)!==e))){let t=`https://cdn.jsdelivr.net/npm/@formkit/themes@${_n}/dist/${e}/theme.css`,n=document.createElement(`link`);n.type=`text/css`,n.rel=`stylesheet`,n.id=`formkit-theme`,n.setAttribute(`data-theme`,e),n.onload=()=>{Na=getComputedStyle(document.documentElement),Fa()},document.head.appendChild(n),n.href=t,Pa&&Pa.remove()}}function Wa(e,t){return n=>{if(typeof n!=`string`)return;if(n.startsWith(`<svg`))return n;let r=n.startsWith(`default:`);n=r?n.split(`:`)[1]:n;let i=n in Ba,a;if(i)return Ba[n];if(!Va[n]){if(a=Ga(n),a=za&&a===void 0?Promise.resolve(a):a,a instanceof Promise)Va[n]=a.then(i=>!i&&typeof n==`string`&&!r?a=typeof e==`function`?e(n):qa(n,t):i).then(e=>(typeof n==`string`&&(Ba[r?`default:${n}`:n]=e),e));else if(typeof a==`string`)return Ba[r?`default:${n}`:n]=a,a}return Va[n]}}function Ga(e){if(za)return Ia?Ka(e):Ra.then(()=>Ka(e))}function Ka(e){let t=Na?.getPropertyValue(`--fk-icon-${e}`);if(t){let n=atob(t);if(n.startsWith(`<svg`))return Ba[e]=n,n}}function qa(e,t){let n=typeof t==`function`?t(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${_n}/dist/icons/${e}.svg`;if(za)return fetch(`${n}`).then(async e=>{let t=await e.text();if(t.startsWith(`<svg`))return t}).catch(e=>{console.error(e)})}function Ja(e,t){let n=/^[a-zA-Z-]+(?:-icon|Icon)$/;Object.keys(e.props).filter(e=>n.test(e)).forEach(n=>Ya(e,t,n))}function Ya(e,t,n){let r=e.props[n],i=t(r),a=`_raw${n.charAt(0).toUpperCase()}${n.slice(1)}`,o=`on${n.charAt(0).toUpperCase()}${n.slice(1)}Click`;if(e.addProps([a,o]),e.on(`prop:${n}`,Xa),i instanceof Promise)return i.then(t=>{e.props[a]=t});e.props[a]=i}function Xa(e){let t=e.origin,n=e.payload,r=t?.props?.iconHandler,i=e.name.split(`:`)[1],a=`_raw${i.charAt(0).toUpperCase()}${i.slice(1)}`;if(r&&typeof r==`function`){let e=r(n);if(e instanceof Promise)return e.then(e=>{t.props[a]=e});t.props[a]=e}}var Za={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,t]})=>`You cannot directly assign node.${t} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,t]})=>`Schema expressions cannot end with an operator (${e} in "${t}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,t]})=>`Cannot set ${e.name} to non object value: ${t}`,108:({data:[e,t]})=>`Cannot set ${e.name} to non array value: ${t}`,300:({data:[e]})=>`Cannot set behavior prop to overscroll (on ${e.name} input) when options prop is a function.`,600:({data:e})=>`Unknown input type${typeof e.props.type==`string`?` "`+e.props.type+`"`:``} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type==`string`?` "`+e.props.type+`"`:``} is missing a schema or component property (${e.name}).`},Qa={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:{node:e,inputType:t}})=>`Invalid options prop for ${e.name} input (${t}). See https://formkit.com/inputs/${t}`,650:`Schema "$get()" must use the id of an input to access.`,651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`},$a=(e,t)=>{if(e.code in Za){let t=Za[e.code];e.message=typeof t==`function`?t(e):t}return t(e)},eo=!1;function to(){eo||=(ve($a),ye(no),!0)}var no=(e,t)=>{if(e.code in Qa){let t=Qa[e.code];e.message=typeof t==`function`?t(e):t}return t(e)},ro=Object.defineProperty,io=Object.getOwnPropertyNames,ao=(e,t)=>function(){return e&&(t=(0,e[io(e)[0]])(e=0)),t},oo=(e,t)=>{for(var n in t)ro(e,n,{get:t[n],enumerable:!0})},so,co,lo=ao({"packages/vue/src/bindings.ts"(){so=function(e){e.ledger.count(`blocking`,e=>e.blocking);let n=(0,t.ref)(!e.ledger.value(`blocking`));e.ledger.count(`errors`,e=>e.type===`error`);let r=(0,t.ref)(!!e.ledger.value(`errors`)),i=!1;(0,t.nextTick)(()=>{i=!0});let a=(0,t.reactive)(e.store.reduce((e,t)=>(t.visible&&(e[t.key]=t),e),{})),o=(0,t.ref)(e.props.validationVisibility||(e.props.type===`checkbox`?`dirty`:`blur`));e.on(`prop:validationVisibility`,({payload:e})=>{o.value=e});let s=(0,t.ref)(o.value===`live`),c=(0,t.ref)(!1),l=e=>{c.value=(e??[]).some(e=>e.name===`required`)};l(e.props.parsedRules),e.on(`prop:parsedRules`,({payload:e})=>l(e));let f=(0,t.ref)(e.children.map(e=>e.uid)),m=(0,t.computed)(()=>{if(!T.state)return!1;if(T.state.submitted)return!0;if(!s.value&&!T.state.settled)return!1;switch(o.value){case`live`:return!0;case`blur`:return T.state.blurred;case`dirty`:return T.state.dirty;default:return!1}}),h=(0,t.computed)(()=>T.state.failing&&m.value),g=(0,t.computed)(()=>T&&_.value?n.value&&!r.value:T.state.dirty&&!p(T.value)),_=(0,t.ref)(Array.isArray(e.props.parsedRules)&&e.props.parsedRules.length>0);e.on(`prop:parsedRules`,({payload:e})=>{_.value=Array.isArray(e)&&e.length>0});let v=(0,t.computed)(()=>{let e={};for(let t in a){let n=a[t];(n.type!==`validation`||m.value)&&(e[t]=n)}return e}),y=(0,t.reactive)(e.store.reduce((e,t)=>(t.type===`ui`&&t.visible&&(e[t.key]=t),e),{})),b=(0,t.computed)(()=>!T.state.failing),x=(0,t.reactive)({}),S=new Proxy(x,{get(...t){if(!e)return``;let[n,r]=t,i=Reflect.get(...t);return!i&&typeof r==`string`&&!u(n,r)&&!r.startsWith(`__v`)&&yn(e).watch(e=>{i=pn(e,r,typeof e.config.rootClasses==`function`?e.config.rootClasses(r,e):{},e.config.classes?fn(r,e,e.config.classes[r]):{},fn(r,e,e.props[`_${r}Class`]),fn(r,e,e.props[`${r}Class`])),n[r]=i??``}),i}});e.on(`prop:rootClasses`,()=>{let e=Object.keys(x);for(let t of e)delete x[t]});let C=(0,t.computed)(()=>{if(!e)return;let t=[];T.help&&t.push(`help-${e.props.id}`);for(let n in v.value)t.push(`${e.props.id}-${n}`);return t.length?t.join(` `):void 0}),w=(0,t.ref)(e.value),ee=(0,t.ref)(e.value),T=(0,t.reactive)({_value:ee,attrs:e.props.attrs,disabled:e.props.disabled,describedBy:C,fns:{length:e=>Object.keys(e).length,number:e=>Number(e),string:e=>String(e),json:e=>JSON.stringify(e),eq:d},handlers:{blur:t=>{e&&(e.store.set(Se({key:`blurred`,visible:!1,value:!0})),typeof e.props.attrs.onBlur==`function`&&e.props.attrs.onBlur(t))},touch:()=>{let t=T.dirtyBehavior===`compare`;if(e.store.dirty?.value&&!t)return;let n=!d(e.props._init,e._value);!n&&!t||e.store.set(Se({key:`dirty`,visible:!1,value:n}))},DOMInput:t=>{e.input(t.target.value),e.emit(`dom-input-event`,t)}},help:e.props.help,id:e.props.id,items:f,label:e.props.label,messages:v,didMount:!1,node:(0,t.markRaw)(e),options:e.props.options,defaultMessagePlacement:!0,slots:e.props.__slots,state:{blurred:!1,complete:g,dirty:!1,empty:p(w),submitted:!1,settled:e.isSettled,valid:n,invalid:h,errors:r,rules:_,validationVisible:m,required:c,failing:!1,passing:b},type:e.props.type,family:e.props.family,ui:y,value:w,classes:S});e.on(`created`,()=>{d(T.value,e.value)||(ee.value=e.value,w.value=e.value,(0,t.triggerRef)(w),(0,t.triggerRef)(ee)),(async()=>{await e.settled,e&&(e.props._init=ie(e.value))})()}),e.on(`mounted`,()=>{T.didMount=!0}),e.on(`settled`,({payload:e})=>{T.state.settled=e});function re(t){(Array.isArray(t)?t:Object.keys(t)).forEach(t=>{t=te(t),u(T,t)||(T[t]=e.props[t]),e.on(`prop:${t}`,({payload:e})=>{T[t]=e})})}re((()=>{let t=[`__root`,`help`,`label`,`disabled`,`options`,`type`,`attrs`,`preserve`,`preserveErrors`,`id`,`dirtyBehavior`],n=/^[a-zA-Z-]+(?:-icon|Icon)$/,r=Object.keys(e.props).filter(e=>n.test(e));return t.concat(r)})());function ae(e){e.props&&re(e.props)}e.props.definition&&ae(e.props.definition),e.on(`added-props`,({payload:e})=>re(e)),e.on(`input`,({payload:n})=>{e.type!==`input`&&!(0,t.isRef)(n)&&!(0,t.isReactive)(n)?ee.value=ne(n):(ee.value=n,(0,t.triggerRef)(ee))}),e.on(`commitRaw`,({payload:n})=>{e.type!==`input`&&!(0,t.isRef)(n)&&!(0,t.isReactive)(n)?w.value=ee.value=ne(n):(w.value=ee.value=n,(0,t.triggerRef)(w)),e.emit(`modelUpdated`)}),e.on(`commit`,({payload:t})=>{if((!T.state.dirty||T.dirtyBehavior===`compare`)&&e.isCreated&&i)if(!e.store.validating?.value)T.handlers.touch();else{let t=e.on(`message-removed`,({payload:n})=>{n.key===`validating`&&(T.handlers.touch(),e.off(t))})}g&&e.type===`input`&&r.value&&!oe(e.props.preserveErrors)&&e.store.filter(e=>!(e.type===`error`&&e.meta?.autoClear===!0)),e.type===`list`&&e.sync&&(f.value=e.children.map(e=>e.uid)),T.state.empty=p(t)});let se=async e=>{e.type===`ui`&&e.visible&&!e.meta.showAsMessage?y[e.key]=e:e.visible?a[e.key]=e:e.type===`state`&&(T.state[e.key]=!!e.value)};e.on(`message-added`,e=>se(e.payload)),e.on(`message-updated`,e=>se(e.payload)),e.on(`message-removed`,({payload:e})=>{delete y[e.key],delete a[e.key],delete T.state[e.key]}),e.on(`settled:blocking`,()=>{n.value=!0}),e.on(`unsettled:blocking`,()=>{n.value=!1}),e.on(`settled:errors`,()=>{r.value=!1}),e.on(`unsettled:errors`,()=>{r.value=!0}),(0,t.watch)(m,e=>{e&&(s.value=!0)}),e.context=T,e.emit(`context`,e,!1),e.on(`destroyed`,()=>{e.context=void 0,e=null})},co=so}});oo({},{defaultConfig:()=>uo});var uo,fo=ao({"packages/vue/src/defaultConfig.ts"(){lo(),uo=(e={})=>{to();let{rules:t={},locales:n={},inputs:r={},messages:i={},locale:a=void 0,theme:o=void 0,iconLoaderUrl:s=void 0,iconLoader:c=void 0,icons:l={},...u}=e,d=mr({...Tn,...t||{}}),f=Hr(y({en:Rr,...n||{}},i));return y({plugins:[Gr(Ma,r),Ha(o,l,s,c),co,f,d],...a?{config:{locale:a}}:{}},u||{},!0)}}}),po=typeof window>`u`,mo=new Map;function ho(e,t){!po||!e||(mo.has(e)||mo.set(e,new Set),mo.get(e)?.add(t))}var go=typeof window>`u`,_o={},vo={},yo,bo=new WeakMap,xo=`__raw__`,So=/[a-zA-Z0-9\-][cC]lass$/;function Co(e,n){let r=(0,t.ref)(null);if(e===`get`)return r.value=To.bind(null,{}),r;let i=e.split(`.`);return(0,t.watchEffect)(()=>{r.value=wo((0,t.isRef)(n)?n.value:n,i)}),r}function wo(e,t){if(Array.isArray(e)){for(let n of e){let e=n!==!1&&wo(n,t);if(e!==void 0)return e}return}let n,r=e;for(let e in t){let i=t[e];if(typeof r!=`object`||!r){n=void 0;break}let a=r[i];if(Number(e)===t.length-1&&a!==void 0){n=typeof a==`function`?a.bind(r):a;break}r=a}return n}function To(e,n){if(typeof n!=`string`)return be(650);if(n in e||(e[n]=(0,t.ref)(void 0)),e[n].value===void 0){e[n].value=null;let t=qe(n);t&&(e[n].value=t.context),Je(n,({payload:t})=>{e[n].value=ot(t)?t.context:t})}return e[n].value}function Eo(e,n,r){function i(e,t){return[p(dn(t.if),{if:!0}),d(e,t.then),t.else?d(e,t.else):null]}function a(e,t){let n=p(dn(e.if)),r=()=>t,i=()=>t;return i=typeof e.then==`object`?o(e.then,void 0):typeof e.then==`string`&&e.then?.startsWith(`$`)?p(dn(e.then)):()=>e.then,u(e,`else`)&&(r=typeof e.else==`object`?o(e.else):typeof e.else==`string`&&e.else?.startsWith(`$`)?p(dn(e.else)):()=>e.else),()=>n()?i():r()}function o(e,t,n={}){let r=new Set(Object.keys(e||{})),i=t?p(dn(t)):()=>({}),s=[e=>{let t=i();for(let n in t)r.has(n)||(e[n]=t[n])}];if(e){if(cn(e))return a(e,n);for(let t in e){let n=e[t],r,i=typeof n==`string`;t.startsWith(xo)?(t=t.substring(7),r=()=>n):r=i&&n.startsWith(`$`)&&n.length>1&&!(n.startsWith(`$reset`)&&So.test(t))?p(dn(n)):typeof n==`object`&&cn(n)?a(n,void 0):typeof n==`object`&&v(n)?o(n):()=>n,s.push(e=>{e[t]=r()})}}return()=>{let t=Array.isArray(e)?[]:{};return s.forEach(e=>e(t)),t}}function s(e,t){let n=null,r=()=>null,a=!1,s=null,c=null,l=null,f=!1,m=un(t);if(on(m)?(n=m.$el,r=m.$el===`text`?()=>null:o(m.attrs,m.bind)):sn(m)?(typeof m.$cmp==`string`?u(e,m.$cmp)?n=e[m.$cmp]:(n=m.$cmp,f=!0):n=m.$cmp,r=o(m.props,m.bind)):cn(m)&&([a,s,c]=i(e,m)),!cn(m)&&`if`in m?a=p(dn(m.if)):!cn(m)&&n===null&&(a=()=>!0),`children`in m&&m.children)if(typeof m.children==`string`)if(m.children.startsWith(`$slots.`))n=n===`text`?`slot`:n,s=p(dn(m.children));else if(m.children.startsWith(`$`)&&m.children.length>1){let e=p(dn(m.children));s=()=>String(e())}else s=()=>String(m.children);else if(Array.isArray(m.children))s=d(e,m.children);else{let[t,n,r]=i(e,m.children);s=e=>t&&t()?n&&n(e):r&&r(e)}if(sn(m))if(s){let e=s;s=t=>({default(n,r,i){let a=yo;r&&(yo=r);let o=i?.length||0;if(i)for(let e=i.length-1;e>=0;e--)bo.get(yo)?.unshift(i[e]);t&&bo.get(yo)?.unshift(t),n&&bo.get(yo)?.unshift(n);let s=e(t);n&&bo.get(yo)?.shift(),t&&bo.get(yo)?.shift();for(let e=0;e<o;e++)bo.get(yo)?.shift();return yo=a,s}}),s.slot=!0}else s=()=>({});if(`for`in m&&m.for){let e=m.for.length===3?m.for[2]:m.for[1];l=[typeof e==`string`&&e.startsWith(`$`)?p(dn(e)):()=>e,m.for[0],m.for.length===3?String(m.for[1]):null]}return[a,n,r,s,c,l,f]}function c(e,t){let n=e(t),r=yo,i=bo.get(r)?.slice()||[];return Object.keys(n).reduce((e,t)=>{let a=n&&n[t];return e[t]=e=>a&&a(e,r,i)||null,e},{})}function l(e,n){let[r,i,a,o,l,u,d]=s(e,n),f=(e=>{if(r&&i===null&&o)return r()?o(e):l&&l(e);if(i&&(!r||r())){if(i===`text`&&o)return(0,t.createTextVNode)(String(o()));if(i===`slot`&&o)return o(e);let n=d?(0,t.resolveComponent)(i):i,r=o?.slot?c(o,e):null;return(0,t.h)(n,a(),r||(o?o(e):[]))}return typeof l==`function`?l(e):l});if(u){let e=f,[t,n,r]=u;f=(()=>{let i=t(),a=Number.isFinite(i)?Array(Number(i)).fill(0).map((e,t)=>t):i,o=[];if(typeof a!=`object`)return null;let s=bo.get(yo)||[],c=Array.isArray(a);for(let t in a){if(c&&t in Array.prototype)continue;let i=Object.defineProperty({...s.reduce((e,t)=>e.__idata?{...e,...t}:t,{}),[n]:a[t],...r===null?{}:{[r]:c?Number(t):t}},`__idata`,{enumerable:!1,value:!0});s.unshift(i),o.push(e.bind(null,i)()),s.shift()}return o})}return f}function d(e,t){if(Array.isArray(t)){let n=t.map(l.bind(null,e));return e=>n.map(t=>t(e))}let n=l(e,t);return e=>n(e)}let f=[];function p(e,t={}){let n=new WeakMap;return f.push((r,i)=>{n.set(i,e.provide(e=>r(e,t)))}),()=>n.get(yo)()}function m(t,i){r??=jo(n);let[a,o]=u(_o,r)?_o[r]:[d(e,n),f];return go||(vo[r]??(vo[r]=0),vo[r]++,_o[r]=[a,o]),o.forEach(e=>{e(t,i)}),()=>(yo=i,a())}return m}function Do(e,t){let n=bo.get(yo)||[],r;return n.length&&(r=wo(n,e.split(`.`))),r===void 0?t:r}function Oo(e,t){return new Proxy(e,{get(...e){let n,r=e[1];if(typeof r==`string`){let e=yo;yo=t,n=Do(r,void 0),yo=e}return n===void 0?Reflect.get(...e):n}})}function ko(e,t,n){return e((e,r={})=>e.reduce((e,i)=>{if(i.startsWith(`slots.`)){let a=i.substring(6),o=()=>t.slots&&u(t.slots,a)&&typeof t.slots[a]==`function`;if(r.if)e[i]=o;else if(t.slots){let r=Oo(t,n);e[i]=()=>o()?t.slots[a](r):null}}else{let n=Co(i,t);e[i]=()=>Do(i,n.value)}return e},{}),n)}function Ao(e,t,n){if(t??=jo(e),vo[t]--,vo[t]===0){delete vo[t];let[,e]=_o[t];delete _o[t],e.length=0}bo.delete(n)}function jo(e){return JSON.stringify(e,(e,t)=>typeof t==`function`?t.toString():t)}var Mo=(0,t.defineComponent)({name:`FormKitSchema`,props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})},memoKey:{type:String,required:!1}},emits:[`mounted`],setup(e,n){let r=(0,t.getCurrentInstance)(),i={};bo.set(i,[]);let a={FormKit:(0,t.markRaw)(zo),...e.library},o=Eo(a,e.schema,e.memoKey),s,c;go||(0,t.watch)(()=>e.schema,(t,n)=>{let l=i;i={},bo.set(i,[]),o=Eo(a,e.schema,e.memoKey),s=ko(o,c,i),t===n&&(r?.proxy?.$forceUpdate)(),Ao(e.schema,e.memoKey,l)},{deep:!0}),(0,t.watchEffect)(()=>{c=Object.assign((0,t.reactive)(e.data??{}),{slots:n.slots}),n.slots,s=ko(o,c,i)});function l(){Ao(e.schema,e.memoKey,i),c&&=(c.node&&c.node.destroy(),c.slots=null,null),s=null}return(0,t.onMounted)(()=>n.emit(`mounted`)),(0,t.onUnmounted)(l),ho((0,t.getCurrentInstance)()?.appContext.app,l),()=>s?s():null}}),No=Mo,Po=typeof window>`u`,Fo=Symbol(`FormKitParent`),Io=Symbol(`FormKitComponentCallback`);function Lo(e,n){let r=Zo(e,n);if(r.props.definition||xe(600,r),r.props.definition.component)return()=>(0,t.h)(r.props.definition?.component,{context:r.context},{...n.slots});let i=(0,t.ref)([]),a=r.props.definition.schemaMemoKey,o=()=>{let t=r.props?.definition?.schema;t||xe(601,r),typeof t==`function`?(i.value=t({...e.sectionsSchema||{}}),(a&&e.sectionsSchema||`memoKey`in t&&typeof t.memoKey==`string`)&&(a=(a??t?.memoKey)+JSON.stringify(e.sectionsSchema))):i.value=t};o(),Po||r.on(`schema`,()=>{a+=`♻️`,o()}),n.emit(`node`,r);let s=r.props.definition.library,c={FormKit:(0,t.markRaw)(Ro),...s,...e.library??{}};function l(){r.emit(`mounted`)}return n.expose({node:r}),()=>(0,t.h)(Mo,{schema:i.value,data:r.context,onMounted:l,library:c,memoKey:a},{...n.slots})}var Ro=(0,t.defineComponent)(Lo,{props:Kr,inheritAttrs:!1}),zo=Ro,Bo=Symbol();function Vo(e){if(typeof window<`u`&&globalThis.__FORMKIT_CONFIGS__){let t=globalThis.__FORMKIT_CONFIGS__.indexOf(e);t!==-1&&globalThis.__FORMKIT_CONFIGS__.splice(t,1)}}function Ho(e,t){return e.component(t.alias||`FormKit`,zo).component(t.schemaAlias||`FormKitSchema`,No),{get:qe,setLocale:e=>{t.config?.rootConfig&&(t.config.rootConfig.locale=e)},clearErrors:gn,setErrors:hn,submit:Ze,reset:$e}}var Uo=Symbol.for(`FormKitOptions`),Wo=Symbol.for(`FormKitConfig`),Go={install(e,t){let n=Object.assign({alias:`FormKit`,schemaAlias:`FormKitSchema`},typeof t==`function`?t():t),r=Xe(n.config||{});n.config={rootConfig:r},e.config.globalProperties.$formkit=Ho(e,n),e.provide(Uo,n),e.provide(Wo,r),typeof window<`u`&&(globalThis.__FORMKIT_CONFIGS__=(globalThis.__FORMKIT_CONFIGS__||[]).concat([r]));let i=e;if(typeof i.onUnmount==`function`)i.onUnmount(()=>{Vo(r)});else{let t=e.unmount.bind(e);e.unmount=()=>(Vo(r),t())}}},Ko=typeof window<`u`,qo=[`ignore`,`disabled`,`preserve`,`help`,`label`,/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/,/^[a-zA-Z-]+(?:-class|Class)$/,`prefixIcon`,`suffixIcon`,/^[a-zA-Z-]+(?:-icon|Icon)$/],Jo=[`disabled`,`ignore`,`preserve`];function Yo(e,t){t.classes&&Object.keys(t.classes).forEach(n=>{typeof n==`string`&&(e.props[`_${n}Class`]=t.classes[n],_(t.classes[n])&&n===`inner`&&Object.values(t.classes[n]))})}function Xo(e){return e?[`Submit`,`SubmitRaw`,`SubmitInvalid`].reduce((t,n)=>{let r=`on${n}`;return r in e&&typeof e[r]==`function`&&(t[r]=e[r]),t},{}):{}}function Zo(e,n,r={}){let i=Object.assign({},(0,t.inject)(Uo)||{},r),a=(0,t.inject)(Bo,(0,t.ref)(Ko?document:void 0)),o=(0,t.inject)(Io,()=>{}),s=(0,t.getCurrentInstance)(),l=Xo(s?.vnode.props),u=[`modelValue`,`model-value`].some(e=>e in(s?.vnode.props??{})),f=!1;(0,t.onMounted)(()=>{f=!0});let p=e.modelValue===void 0?ie(n.attrs.value):e.modelValue;function m(){let t={...S(e),...l,type:e.type??`text`,__root:a.value,__slots:n.slots},r=w(S(n.attrs),qo);r.key||=c(),t.attrs=r;let i=ee(S(n.attrs),qo);for(let e in i)Jo.includes(e)&&i[e]===``&&(i[e]=!0),t[te(e)]=i[e];let o={props:{}};return Yo(o,e),Object.assign(t,o.props),typeof t.type!=`string`&&(t.definition=t.type,delete t.type),t}let h=m(),g=h.ignore?null:e.parent||(0,t.inject)(Fo,null),_=an(y(i||{},{name:e.name||void 0,value:p,parent:g,plugins:(i.plugins||[]).concat(e.plugins??[]),config:e.config||{},props:h,index:e.index,sync:!!oe(n.attrs.sync||n.attrs.dynamic)},!1,!0));o(_),_.props.definition||xe(600,_);let v=(0,t.ref)(new Set(Array.isArray(_.props.__propDefs)?_.props.__propDefs:Object.keys(_.props.__propDefs??{})));_.on(`added-props`,({payload:e})=>{(Array.isArray(e)?e:Object.keys(e??{})).forEach(e=>v.value.add(e))});let b=(0,t.computed)(()=>qo.concat([...v.value]).reduce((e,t)=>(typeof t==`string`?(e.push(te(t)),e.push(T(t))):e.push(t),e),[]));(0,t.watchEffect)(()=>Yo(_,e));let x=S(e);for(let n in x)(0,t.watch)(()=>e[n],()=>{e[n]!==void 0&&(_.props[n]=e[n])});(0,t.watchEffect)(()=>{_.props.__root=a.value});let C=new Set,re=S(n.attrs);(0,t.watchEffect)(()=>{ae(ee(re,b.value))});function ae(e){C.forEach(e=>{e(),C.delete(e)});for(let r in e){let e=te(r);C.add((0,t.watch)(()=>n.attrs[r],()=>{_.props[e]=n.attrs[r]}))}}if((0,t.watchEffect)(()=>{let e=w(S(n.attrs),b.value);`multiple`in e&&(e.multiple=oe(e.multiple)),typeof e.onBlur==`function`&&(e.onBlur=ue(e.onBlur)),_.props.attrs=Object.assign({},_.props.attrs||{},e)}),(0,t.watchEffect)(()=>{let t=(e.errors??[]).map(e=>Se({key:ce(e),type:`error`,value:e,meta:{source:`prop`}}));_.store.apply(t,e=>e.type===`error`&&e.meta.source===`prop`)}),_.type!==`input`){let n=`${_.name}-prop`;(0,t.watchEffect)(()=>{let t=e.inputErrors??{},r=Object.keys(t);r.length||_.clearErrors(!0,n);let i=r.reduce((e,r)=>{let i=t[r];return typeof i==`string`&&(i=[i]),Array.isArray(i)&&(e[r]=i.map(e=>Se({key:e,type:`error`,value:e,meta:{source:n}}))),e},{});_.store.apply(i,e=>e.type===`error`&&e.meta.source===n)})}(0,t.watchEffect)(()=>Object.assign(_.config,e.config)),_.type!==`input`&&(0,t.provide)(Fo,_);let se;return _.on(`modelUpdated`,()=>{n.emit(`inputRaw`,_.context?.value,_),f&&n.emit(`input`,_.context?.value,_),u&&_.context&&(se=ie(_.value),n.emit(`update:modelValue`,ne(_.value)))}),u&&((0,t.watch)((0,t.toRef)(e,`modelValue`),e=>{d(se,e)||_.input(e,!1)},{deep:!0}),_.value!==p&&_.emit(`modelUpdated`)),(0,t.onBeforeUnmount)(()=>_.destroy()),_}var Qo=1;function $o(e){return typeof e==`function`&&e.length===2||typeof e==`object`&&!Array.isArray(e)&&!(`$el`in e)&&!(`$cmp`in e)&&!(`if`in e)}function es(e,n={},r={}){let i={type:`input`,...n},a;if($o(e)){let n=`SchemaComponent${Qo++}`;a=O(`input`,()=>({$cmp:n,props:{context:`$node.context`}})),i.library={[n]:(0,t.markRaw)(e)}}else a=typeof e==`function`?e:O(`input`,()=>ie(e));return i.schema=_a(a||`Schema undefined`,r),i.schemaMemoKey||=`${Math.random()}`,i}O(`messages`,()=>({$el:`ul`,if:`$fns.length($messages)`}))(O(`message`,()=>({$el:`li`,for:[`message`,`$messages`],attrs:{key:`$message.key`,id:`$id + '-' + $message.key`,"data-message-type":`$message.type`}}))(`$message.value`));var ts=O(`summary`,()=>({$el:`div`,attrs:{"aria-live":`polite`}})),ns=O(`summaryInner`,()=>({$el:`div`,if:`$summaries.length && $showSummaries`})),rs=O(`messages`,()=>({$el:`ul`,if:`$summaries.length && $showSummaries`})),is=O(`message`,()=>({$el:`li`,for:[`summary`,`$summaries`],attrs:{key:`$summary.key`,"data-message-type":`$summary.type`}})),as=O(`summaryHeader`,()=>({$el:`h2`,attrs:{id:`$id`}})),os=O(`messageLink`,()=>({$el:`a`,attrs:{id:`$summary.key`,href:`$: "#" + $summary.id`,onClick:`$jumpLink`}}));ts(ns(as(`$summaryHeader`),rs(is(os(`$summary.message`))))),fo(),lo();var ss,cs=a((()=>{ss={common:{selectFieldToEdit:`Select a field to edit its properties`,cancel:`Cancel`,confirm:`Confirm`,save:`Save`},sidebar:{search:`Search...`},builder:{clearForm:`Clear form`,previewForm:`Preview Form`,undo:`Undo`,redo:`Redo`,deleteField:`Delete field`,resizeFieldWidth:`Resize field width`,clearConfirm:`Are you absolutely sure? This will permanently delete the form you have created.`,creatingForm:`Creating your new form...`,desktopView:`Desktop View`,tabletView:`Tablet View`,mobileView:`Mobile View`,importExportSchema:`Import / Export Schema`,switchLanguage:`Switch Language`,previewTitle:`Form Preview`,previewDescription:`Preview your form and test its functionality.`,bindTitle:`Bind`,bindEvents:`Events`,noEvents:`No events`,editEvent:`Edit event`,bindHint:`Write JavaScript. Available params: event (event object), form (form data), $value (current value), $node (node), $name (field name), $get(name) (get field value), $slots (slots), attrs (node config), ctx (full context), axios (HTTP).`,addListContainer:`Add list container`,formDataTitle:`Form Data:`,formSubmitted:`Form submitted!`,listContainer:`List container`,listAdd:`Add item`,listRemove:`Remove container`,listDropHere:`Drag fields here`},importExport:{title:`Import / Export Schema`,placeholder:`Paste your form schema JSON here...`,downloadJson:`Download JSON`,downloadJs:`Download JS`,saveAndImport:`Save & Import`,schemaMustBeArray:`Schema must be an array`,importSuccess:`Schema imported successfully`,downloadedSuccess:`Schema downloaded successfully`,failedParseJson:`Failed to parse JSON: {message}`,failedGenerateDownload:`Failed to generate download: Invalid JSON`,unknownError:`Unknown error`},formSettings:{title:`Form settings`,name:`Form name`,labelPosition:`Label position`,labelWidth:`Label width`,positionTop:`Top`,positionLeft:`Left`},expression:{useExpressionValue:`Use expression value`,placeholder:`e.g. $my_variable + 1`,variablesNotFound:`Variables not found: {vars}`},condition:{useIf:`Conditional render (if)`,placeholder:`e.g. $other == "yes" && $age >= 18`},ai:{tooltip:`AI Assistant`,placeholder:`AI Assistant`,promptPlaceholder:`Prompt AI`,emptyPrompt:`Empty chat prompt!`,emptyPromptDescription:`Please enter a prompt to generate a form.`,close:`Close`,defaultInstructions:`Generate a FormKit schema based on the user's description`},validation:{rulesTitle:`Validation Rules`,bothValuesMustBeSet:`Both values must be set`,accepted:{label:`Accepted`,tooltip:`Value must be accepted (typically for checkboxes)`},required:{label:`Required`,tooltip:`Value is required for completion`},email:{label:`Email`,tooltip:`Input must be a valid email address`},number:{label:`Number`,tooltip:`Input must be a valid numeric value`},lowercase:{label:`Lowercase`,tooltip:`Input must be all lowercase letters`},uppercase:{label:`Uppercase`,tooltip:`Input must be all uppercase letters`},url:{label:`URL`,tooltip:`Input must be a valid URL`},alpha:{label:`Alpha`,tooltip:`Input must only contain letters`},alpha_spaces:{label:`Alpha spaces`,tooltip:`Input must only contain letters and spaces`},alphanumeric:{label:`Alphanumeric`,tooltip:`Input must only contain letters and numbers`},symbol:{label:`Symbol`,tooltip:`Input must only contain symbols`},contains_alpha:{label:`Contains alpha`,tooltip:`Input must contain a letter`},contains_alphanumeric:{label:`Contains alphanumeric`,tooltip:`Input must contain a letter or number`},contains_alpha_spaces:{label:`Contains alpha spaces`,tooltip:`Input must contain a letter or space`},contains_symbol:{label:`Contains symbol`,tooltip:`Input must contain a symbol`},contains_uppercase:{label:`Contains uppercase`,tooltip:`Input must contain an uppercase letter`},contains_lowercase:{label:`Contains lowercase`,tooltip:`Input must contain a lowercase letter`},contains_numeric:{label:`Contains numeric`,tooltip:`Input must contain a number`},confirm:{label:`Confirm`,tooltip:`Input must match another field value`,placeholder:`other_field_name`},min:{label:`Minimum`,tooltip:`Number must be greater or equal to the given value`,placeholder:`0`},max:{label:`Maximum`,tooltip:`Number must be less than or equal to the given value`,placeholder:`10`},matches:{label:`Matches`,tooltip:`Input must match a particular value or pattern. If you pass multiple arguments, it checks each until a match is found`,placeholder:`/[0-9]/`},matchesMessage:{label:`Matches message`,tooltip:`Custom validation error message for matches rule`,placeholder:`Passwords must include a number.`},starts_with:{label:`Starts with`,tooltip:`Value must start with given string`,placeholder:`Value`},ends_with:{label:`Ends with`,tooltip:`Value must end with given string`,placeholder:`Value`},date_after:{label:`Date after`,tooltip:`Input must be after the given date`,placeholder:`YYYY-MM-DD`},date_before:{label:`Date before`,tooltip:`Input must be before the given date`,placeholder:`YYYY-MM-DD`},date_format:{label:`Date format`,tooltip:`Date must match the given format`,placeholder:`YYYY-MM-DD`},date_between:{label:`Date between`,tooltip:`Date must be between the given dates`},is:{label:`Is`,tooltip:`Value must equal the given value`,placeholder:`Value`},not:{label:`Not`,tooltip:`Value must not equal the given value`,placeholder:`Value`},require_one:{label:`Require one`,tooltip:`At least one field in the given list must be completed`,placeholder:`field_one,field_two`},length:{label:`Length`,tooltip:`Sentence length must be between min and max.`},between:{label:`Between`,tooltip:`Number is (inclusively) between two other numbers`},minLabel:`Min`,maxLabel:`Max`},edits:{content:{text:`Content`,title:`Title`,content:`Content`},inlineEditHint:`Double-click to edit content`,placeholder:{label:`Enter label`,help:`Enter help text`,placeholder:`Enter placeholder`,text:`Enter text`,dividerTitle:`Divider title`,addItems:`Add Items...`,fieldName:`field_name`,prefix:`Text or icon class`,suffix:`Text or icon class`},pair:{label:`pair`,separatorLabel:`separator`,separatorPlaceholder:`e.g. -`},optionsSource:{title:`Options source`,labelList:`Labels`,addPairRow:`Add row`,pairLabelPlaceholder:`label`,pairValuePlaceholder:`value`,endpointPlaceholder:`https://api.example.com/options`,dictInputPlaceholder:`Dictionary code`,dictBrowse:`Browse`,dictPickerTitle:`Select dictionary`,dictCode:`Code`,dictLabel:`Label`,dictAction:`Action`,dictChoose:`Choose`,dictCodePlaceholder:`Filter by code`,dictLabelPlaceholder:`Filter by label`,dictSearch:`Search`,dictEmpty:`No data`,dictProviderMissing:`No dictionary methods configured. Pass fetchDictionary / fetchDictionaryPage in BuilderProvider config.`,treeDictProviderMissing:`No tree dictionary methods configured. Pass fetchTreeDictionary / fetchTreeDictionaryPage in BuilderProvider config.`,dictCancel:`Cancel`,jsonParseError:`Invalid JSON`,jsonArrayError:`Options must be a JSON array`,tabs:{label:`label`,pair:`pair`,json:`json`,dynamicDict:`Dynamic Dict`,dynamicTreeDict:`Dynamic Tree Dict`}},optionsLayout:{horizontal:`Horizontal`},image:{srcLabel:`Image src`,srcPlaceholder:`https://...`,altLabel:`Alt text`,altPlaceholder:`Image description`,widthLabel:`Width`,widthPlaceholder:`240`,heightLabel:`Height`,heightPlaceholder:`160`,objectFitLabel:`Object fit`,previewDisabledLabel:`Disable preview`,lazyLabel:`Lazy`},grid:{rowSpanLabel:`Row span`,colSpanLabel:`Column span`},optionsLabel:`Add Items to List`},fieldProps:{category:{fields:`Fields`,containers:`Containers`,layouts:`Layouts`,static:`Static`},tooltip:{text:`Allows user to enter text`,email:`Allows user to enter email`,color:`Allows user to select color`,number:`Allows user to enter number`,checkbox:`Allows user to select multiple options`,date:`Allows user to select date`,datetimeLocal:`Allows user to select date and time`,dateTime:`Allows user to select date and time`,file:`Allows user to upload file`,password:`Allows user to enter password`,radio:`Allows user to select single option`,range:`Allows user to select between a range of values`,select:`Allows user to select from a list of options`,naiveCascader:`Allows user to select from a cascader`,naiveTreeSelect:`Allows user to select from a tree`,naiveMention:`Allows user to mention options`,naiveRate:`Allows user to rate with stars`,naiveSwitch:`Allows user to toggle a boolean value`,naiveAvatar:`Avatar display`,naiveImage:`Image display`,tel:`Allows user to enter telephone number`,textarea:`Allows user to enter multiple lines of text`,time:`Allows user to select time`,url:`Allows user to enter url`,submit:`Allows user to submit form`,reset:`Allows user to reset form`,naiveButton:`Naive UI button`,naiveText:`Typography text`,naiveP:`Typography paragraph`,naiveA:`Typography link`,naiveBlockquote:`Typography blockquote`,naiveH1:`Typography H1`,naiveH2:`Typography H2`,naiveH3:`Typography H3`,naiveH4:`Typography H4`,naiveH5:`Typography H5`,naiveH6:`Typography H6`,naiveUl:`Typography unordered list`,naiveOl:`Typography ordered list`,naiveLi:`Typography list item`,naiveDivider:`Naive UI divider`,naiveAlert:`Naive UI alert`,naiveBackTop:`BackTop (floating button)`,list:`Allows user to group fields into an array`,card:`Card container`,inputGroup:`Input group (NInputGroup)`,buttonGroup:`Button group (NButtonGroup)`,tabs:`Tabs container`,group:`Nested object field group`}},elements:{common:{help:`This is help text`,selectPlaceholder:`Select...`},text:{name:`Text`,label:`Client Name`,placeholder:`Enter your name`,description:`Single line text field`},textarea:{name:`Text Area`,label:`Client Address`,placeholder:`Enter your address`,description:`Multi-line text field`},email:{name:`Email`,label:`Client Email`,placeholder:`Enter your email`,description:`Email field input`},number:{name:`Number`,label:`Client Age`,placeholder:`Enter your age`,description:`Single number input`},url:{name:`URL`,label:`URL Field`,placeholder:`https://www.example.com`,description:`URL field input`},checkbox:{name:`Checkbox`,label:`Label For Checkbox`,description:`Multiple choice checkbox`},color:{name:`Color`,label:`Color Field`,description:`Color picker`},date:{name:`Date`,label:`Date Field`,description:`Date input picker`},time:{name:`Time`,label:`Time Field`,description:`Time input picker`},datetimeLocal:{name:`Date-Time`,label:`Date Time Local Field`,description:`Date and time input`},dateTime:{name:`Date-Time`,label:`Date Time Field`,description:`Date and time input`},file:{name:`File Picker`,label:`File Field`,help:`Accepts .pdf, .doc, .docx, .xml, .md, .csv, .jpg, .png, .webp`,description:`One or more file uploads`},password:{name:`Password`,label:`Password Field`,placeholder:`Enter your password`,description:`Password masked field`},radio:{name:`Radio`,label:`Radio Field`,description:`Single choice select`},range:{name:`Range`,label:`Range Field`,description:`Slider field input`},select:{name:`Dropdown Select`,label:`Select Field`,description:`Selection dropdown`},naiveCascader:{name:`Naive Cascader`,label:`Cascader Field`,description:`Cascader selection`},naiveTreeSelect:{name:`Naive Tree Select`,label:`Tree Select Field`,description:`Tree selection`},naiveMention:{name:`Naive Mention`,label:`Mention Field`,placeholder:`Type @ to mention`,description:`Mention input`},naiveRate:{name:`Naive Rate`,label:`Rate Field`,description:`Rating input`},naiveSwitch:{name:`Naive Switch`,label:`Switch Field`,description:`Boolean switch`},naiveAvatar:{name:`Naive Avatar`,label:`Avatar`,description:`Avatar display`},naiveImage:{name:`Naive Image`,label:`Image`,description:`Image display`},naiveText:{name:`Naive Text`,description:`Naive UI typography text`},naiveP:{name:`Naive Paragraph`,description:`Naive UI typography paragraph`},naiveA:{name:`Naive Link`,description:`Naive UI typography link`},naiveBlockquote:{name:`Naive Blockquote`,description:`Naive UI typography blockquote`},naiveH1:{name:`Naive H1`,description:`Naive UI typography header`},naiveH2:{name:`Naive H2`,description:`Naive UI typography header`},naiveH3:{name:`Naive H3`,description:`Naive UI typography header`},naiveH4:{name:`Naive H4`,description:`Naive UI typography header`},naiveH5:{name:`Naive H5`,description:`Naive UI typography header`},naiveH6:{name:`Naive H6`,description:`Naive UI typography header`},naiveUl:{name:`Naive Ul`,description:`Naive UI typography unordered list`},naiveOl:{name:`Naive Ol`,description:`Naive UI typography ordered list`},naiveLi:{name:`Naive Li`,description:`Naive UI typography list item`},naiveDivider:{name:`Naive Divider`,description:`Naive UI divider`},naiveAlert:{name:`Naive Alert`,label:`Alert`,description:`Naive UI alert`},naiveBackTop:{name:`BackTop`,description:`Naive UI back-top button (can be used as a floating button)`},tel:{name:`Telephone Number`,label:`Tel Field`,placeholder:`(+XX) XXXXXXXXXX`,description:`Telephone input field`},naiveButton:{name:`Naive Button`,label:`Button`,description:`Naive UI button`},submit:{name:`Submit Button`,label:`Submit`,description:`Allows form submission`},reset:{name:`Reset Button`,label:`Reset`,description:`Resets form values`},list:{name:`List`,label:`List`,description:`Array grouping of fields`},card:{name:`Card`,label:`Card`,description:`Card container with children`},inputGroup:{name:`Input Group`,label:`Input Group`,description:`Naive UI NInputGroup container (horizontal only)`},buttonGroup:{name:`Button Group`,label:`Button Group`,description:`Naive UI NButtonGroup container (can be disabled as a whole)`},tabs:{name:`Tabs`,label:`Tabs`,description:`Naive UI Tabs container`},group:{name:`Group`,label:`Group`,description:`Nested object field group (FormKit group)`}}}})),ls,us=a((()=>{ls={common:{selectFieldToEdit:`请选择一个字段来编辑属性`,cancel:`取消`,confirm:`确认`,save:`保存`},sidebar:{search:`搜索...`},builder:{clearForm:`清空表单`,previewForm:`预览表单`,undo:`撤销`,redo:`重做`,deleteField:`删除字段`,resizeFieldWidth:`调整字段宽度`,clearConfirm:`确定要清空吗?这会永久删除你创建的表单。`,creatingForm:`正在生成新表单...`,desktopView:`桌面视图`,tabletView:`平板视图`,mobileView:`手机视图`,importExportSchema:`导入 / 导出 Schema`,switchLanguage:`切换语言`,previewTitle:`表单预览`,previewDescription:`预览表单并测试其功能。`,bindTitle:`Bind`,bindEvents:`事件`,noEvents:`暂无事件`,editEvent:`编辑事件`,bindHint:`编写 JavaScript。可用参数:event(事件对象)、form(表单数据)、$value(当前值)、$node(节点)、$name(字段名)、$get(name)(取字段值)、$slots(插槽)、attrs(节点配置)、ctx(全量)、axios(HTTP 请求)。`,addListContainer:`添加列表容器`,formDataTitle:`表单数据:`,formSubmitted:`表单已提交!`,listContainer:`列表容器`,listAdd:`添加一项`,listRemove:`删除容器`,listDropHere:`拖拽字段到这里`},importExport:{title:`导入 / 导出 Schema`,placeholder:`在这里粘贴表单 schema 的 JSON...`,downloadJson:`下载 JSON`,downloadJs:`下载 JS`,saveAndImport:`保存并导入`,schemaMustBeArray:`Schema 必须是数组`,importSuccess:`Schema 导入成功`,downloadedSuccess:`Schema 下载成功`,failedParseJson:`解析 JSON 失败:{message}`,failedGenerateDownload:`生成下载失败:JSON 无效`,unknownError:`未知错误`},formSettings:{title:`表单设置`,name:`表单名称`,id:`表单 ID`,version:`版本`,labelPosition:`Label 方向`,labelWidth:`Label 宽度`,positionTop:`上方`,positionLeft:`左侧`,submit:`提交逻辑`,editSubmit:`编辑提交逻辑`},expression:{useExpressionValue:`使用表达式值`,placeholder:`例如:$my_variable + 1`,variablesNotFound:`未找到变量:{vars}`},condition:{useIf:`条件渲染(if)`,placeholder:`例如:$other == "yes" && $age >= 18`},ai:{tooltip:`AI 助手`,placeholder:`AI 助手`,promptPlaceholder:`让 AI 生成表单`,emptyPrompt:`提示为空!`,emptyPromptDescription:`请输入提示词以生成表单。`,close:`关闭`,defaultInstructions:`根据用户描述生成 FormKit schema`},validation:{rulesTitle:`校验规则`,bothValuesMustBeSet:`两个值都必须填写`,accepted:{label:`已同意`,tooltip:`必须勾选/同意(常用于复选框)`},required:{label:`必填`,tooltip:`必须填写该字段才能提交`},email:{label:`邮箱`,tooltip:`必须是合法的邮箱地址`},number:{label:`数字`,tooltip:`必须是合法的数字`},lowercase:{label:`小写`,tooltip:`必须全为小写字母`},uppercase:{label:`大写`,tooltip:`必须全为大写字母`},url:{label:`URL`,tooltip:`必须是合法的 URL`},alpha:{label:`仅字母`,tooltip:`只能包含字母`},alpha_spaces:{label:`字母空格`,tooltip:`只能包含字母和空格`},alphanumeric:{label:`字母数字`,tooltip:`只能包含字母和数字`},symbol:{label:`仅符号`,tooltip:`只能包含符号`},contains_alpha:{label:`包含字母`,tooltip:`必须包含一个字母`},contains_alphanumeric:{label:`包含字母数字`,tooltip:`必须包含字母或数字`},contains_alpha_spaces:{label:`包含字母空格`,tooltip:`必须包含字母或空格`},contains_symbol:{label:`包含符号`,tooltip:`必须包含一个符号`},contains_uppercase:{label:`包含大写`,tooltip:`必须包含一个大写字母`},contains_lowercase:{label:`包含小写`,tooltip:`必须包含一个小写字母`},contains_numeric:{label:`包含数字`,tooltip:`必须包含一个数字`},confirm:{label:`确认一致`,tooltip:`必须与另一个字段的值一致`,placeholder:`other_field_name`},min:{label:`最小值`,tooltip:`数字必须大于等于指定值`,placeholder:`0`},max:{label:`最大值`,tooltip:`数字必须小于等于指定值`,placeholder:`10`},matches:{label:`匹配`,tooltip:`输入必须匹配指定的值或正则;多个参数时将逐个尝试直到匹配`,placeholder:`/[0-9]/`},matchesMessage:{label:`错误信息`,tooltip:`matches 规则的自定义错误提示`,placeholder:`密码必须包含数字。`},starts_with:{label:`前缀`,tooltip:`必须以指定字符串开头`,placeholder:`值`},ends_with:{label:`后缀`,tooltip:`必须以指定字符串结尾`,placeholder:`值`},date_after:{label:`日期晚于`,tooltip:`必须晚于指定日期`,placeholder:`YYYY-MM-DD`},date_before:{label:`日期早于`,tooltip:`必须早于指定日期`,placeholder:`YYYY-MM-DD`},date_format:{label:`日期格式`,tooltip:`必须符合指定日期格式`,placeholder:`YYYY-MM-DD`},date_between:{label:`日期区间`,tooltip:`必须在指定日期区间内`},is:{label:`等于`,tooltip:`必须等于指定值`,placeholder:`值`},not:{label:`不等于`,tooltip:`必须不等于指定值`,placeholder:`值`},require_one:{label:`至少填一个`,tooltip:`指定字段列表中至少有一个需要填写`,placeholder:`field_one,field_two`},length:{label:`长度区间`,tooltip:`文本长度必须在最小值与最大值之间`},between:{label:`区间`,tooltip:`数字必须在两个数值之间(包含边界)`},minLabel:`最小值`,maxLabel:`最大值`},edits:{content:{text:`内容`,title:`标题`,content:`内容`},inlineEditHint:`双击编辑内容`,placeholder:{label:`请输入 Label`,help:`请输入帮助文本`,placeholder:`请输入占位文本`,text:`请输入文本`,dividerTitle:`请输入分割线标题`,addItems:`添加条目...`,fieldName:`字段名`,prefix:`文字或 图标类名`,suffix:`文字或 图标类名`},pair:{label:`pair`,separatorLabel:`separator`,separatorPlaceholder:`例如:-`},optionsSource:{title:`选项数据来源`,labelList:`Labels`,addPairRow:`添加一行`,pairLabelPlaceholder:`label`,pairValuePlaceholder:`value`,endpointPlaceholder:`https://api.example.com/options`,dictInputPlaceholder:`字典编码`,dictBrowse:`查找`,dictPickerTitle:`选择字典`,dictCode:`编码`,dictLabel:`名称`,dictAction:`操作`,dictChoose:`选择`,dictCodePlaceholder:`按编码过滤`,dictLabelPlaceholder:`按名称过滤`,dictSearch:`查询`,dictEmpty:`暂无数据`,dictProviderMissing:`未配置字典方法,请在 BuilderProvider 的 config 中传入 fetchDictionary / fetchDictionaryPage`,treeDictProviderMissing:`未配置树型字典方法,请在 BuilderProvider 的 config 中传入 fetchTreeDictionary / fetchTreeDictionaryPage`,dictCancel:`取消`,jsonParseError:`JSON 格式错误`,jsonArrayError:`Options 必须是数组 JSON`,tabs:{label:`label`,pair:`成对值`,json:`json`,dynamicDict:`动态字典`,dynamicTreeDict:`动态树字典`}},optionsLayout:{horizontal:`水平排列`},image:{srcLabel:`图片地址(src)`,srcPlaceholder:`https://...`,altLabel:`替代文本(alt)`,altPlaceholder:`图片描述`,widthLabel:`宽度(width)`,widthPlaceholder:`240`,heightLabel:`高度(height)`,heightPlaceholder:`160`,objectFitLabel:`填充方式(object-fit)`,previewDisabledLabel:`禁用预览(preview-disabled)`,lazyLabel:`懒加载(lazy)`},grid:{rowSpanLabel:`占用行数`,colSpanLabel:`占用列数`},optionsLabel:`添加选项`},fieldProps:{category:{fields:`字段`,containers:`容器`,layouts:`布局`,static:`静态`},tooltip:{text:`文本输入`,email:`邮箱输入`,color:`颜色选择`,number:`数字输入`,checkbox:`复选框`,date:`日期`,datetimeLocal:`日期时间`,dateTime:`日期时间`,file:`文件上传`,password:`密码`,radio:`单选`,range:`范围选择`,select:`下拉选择`,naiveCascader:`级联选择`,naiveTreeSelect:`树选择`,naiveMention:`提及`,naiveRate:`评分`,naiveSwitch:`开关`,naiveAvatar:`头像`,naiveImage:`图片`,tel:`电话`,textarea:`多行文本`,time:`时间`,url:`链接`,submit:`提交按钮`,reset:`重置按钮`,naiveButton:`按钮(Naive)`,naiveText:`文本(Typography)`,naiveP:`段落(Typography)`,naiveA:`链接(Typography)`,naiveBlockquote:`引用(Typography)`,naiveH1:`标题 H1`,naiveH2:`标题 H2`,naiveH3:`标题 H3`,naiveH4:`标题 H4`,naiveH5:`标题 H5`,naiveH6:`标题 H6`,naiveUl:`无序列表`,naiveOl:`有序列表`,naiveLi:`列表项`,naiveDivider:`分割线(Naive)`,naiveAlert:`提示(NAlert)`,naiveBackTop:`浮动按钮(BackTop)`,list:`列表`,card:`卡片容器`,inputGroup:`输入组(NInputGroup)`,buttonGroup:`按钮组(NButtonGroup)`,tabs:`Tabs 容器`,group:`嵌套对象字段组`}},elements:{common:{help:`这是帮助文本`,selectPlaceholder:`请选择...`},text:{name:`文本`,label:`客户姓名`,placeholder:`请输入姓名`,description:`单行文本输入框`},textarea:{name:`文本域`,label:`客户地址`,placeholder:`请输入地址`,description:`多行文本输入框`},email:{name:`邮箱`,label:`客户邮箱`,placeholder:`请输入邮箱`,description:`邮箱输入框`},number:{name:`数字`,label:`客户年龄`,placeholder:`请输入年龄`,description:`数字输入框`},url:{name:`链接`,label:`URL 字段`,placeholder:`https://www.example.com`,description:`URL 输入框`},checkbox:{name:`复选框`,label:`复选框`,description:`多选复选框`},color:{name:`颜色`,label:`颜色字段`,description:`颜色选择器`},date:{name:`日期`,label:`日期字段`,description:`日期选择器`},time:{name:`时间`,label:`时间字段`,description:`时间选择器`},datetimeLocal:{name:`日期时间(本地)`,label:`日期时间字段`,description:`日期与时间输入`},dateTime:{name:`日期时间`,label:`日期时间字段`,description:`日期与时间输入`},file:{name:`文件上传`,label:`文件字段`,help:`支持 .pdf, .doc, .docx, .xml, .md, .csv, .jpg, .png, .webp`,description:`一个或多个文件上传`},password:{name:`密码`,label:`密码字段`,placeholder:`请输入密码`,description:`密码输入框`},radio:{name:`单选`,label:`单选字段`,description:`单选选择`},range:{name:`滑块`,label:`范围字段`,description:`滑块输入`},select:{name:`下拉选择`,label:`选择字段`,description:`下拉选择框`},naiveCascader:{name:`级联选择`,label:`级联字段`,description:`级联选择`},naiveTreeSelect:{name:`树选择`,label:`树选择字段`,description:`树形选择`},naiveMention:{name:`提及`,label:`提及字段`,placeholder:`输入 @ 提及`,description:`提及输入`},naiveRate:{name:`评分`,label:`评分字段`,description:`评分输入`},naiveSwitch:{name:`开关`,label:`开关字段`,description:`布尔开关`},naiveAvatar:{name:`头像`,label:`头像`,description:`头像展示`},naiveImage:{name:`图片`,label:`图片`,description:`图片展示`},naiveText:{name:`文本(Naive)`,description:`Naive UI 排版文本`},naiveP:{name:`段落(Naive)`,description:`Naive UI 排版段落`},naiveA:{name:`链接(Naive)`,description:`Naive UI 排版链接`},naiveBlockquote:{name:`引用(Naive)`,description:`Naive UI 排版引用`},naiveH1:{name:`标题 H1(Naive)`,description:`Naive UI 标题`},naiveH2:{name:`标题 H2(Naive)`,description:`Naive UI 标题`},naiveH3:{name:`标题 H3(Naive)`,description:`Naive UI 标题`},naiveH4:{name:`标题 H4(Naive)`,description:`Naive UI 标题`},naiveH5:{name:`标题 H5(Naive)`,description:`Naive UI 标题`},naiveH6:{name:`标题 H6(Naive)`,description:`Naive UI 标题`},naiveUl:{name:`无序列表(Naive)`,description:`Naive UI 无序列表`},naiveOl:{name:`有序列表(Naive)`,description:`Naive UI 有序列表`},naiveLi:{name:`列表项(Naive)`,description:`Naive UI 列表项`},naiveDivider:{name:`分割线(Naive)`,description:`Naive UI 分割线`},naiveAlert:{name:`提示(NAlert)`,label:`提示`,description:`Naive UI Alert 提示`},naiveBackTop:{name:`浮动按钮(BackTop)`,description:`Naive UI 回到顶部按钮(可当浮动按钮使用)`},tel:{name:`电话`,label:`电话字段`,placeholder:`(+XX) XXXXXXXXXX`,description:`电话输入框`},naiveButton:{name:`按钮(Naive)`,label:`按钮`,description:`Naive UI 按钮`},submit:{name:`提交按钮`,label:`提交`,description:`提交表单`},reset:{name:`重置按钮`,label:`重置`,description:`重置表单内容`},list:{name:`列表`,label:`列表`,description:`字段数组分组`},card:{name:`卡片容器`,label:`卡片`,description:`可包含子字段的卡片容器`},inputGroup:{name:`输入组`,label:`输入组`,description:`Naive UI NInputGroup 容器(仅左右拖拽)`},buttonGroup:{name:`按钮组`,label:`按钮组`,description:`Naive UI NButtonGroup 容器(按钮组合,可整体禁用)`},tabs:{name:`Tabs`,label:`Tabs`,description:`Naive UI Tabs 容器`},group:{name:`分组`,label:`分组`,description:`嵌套对象字段组(FormKit group)`}}}})),ds,fs=a((()=>{cs(),us(),ds={"zh-CN":ls,en:ss}}));function ps(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ms(e,...t){if(!t.length)return e;let n=t.shift();if(ps(e)&&ps(n))for(let t in n)ps(n[t])&&ps(e[t])?ms(e[t],n[t]):e[t]=n[t];return ms(e,...t)}function hs(e,t){let n={};for(let t of Object.keys(e))n[t]=ms({},e[t]);for(let e of Object.keys(t))n[e]=ms(n[e]??{},t[e]??{});return n}function gs(e,t){let n=t.split(`.`),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}function _s(e,t){return t?e.replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??`{${n}}`)):e}function vs(e){let n=(0,t.computed)(()=>e.locale.value??e.localeFallback?.value??`zh-CN`),r=(0,t.computed)(()=>e.localeFallback?.value??`zh-CN`),i=(0,t.computed)(()=>hs(ds,e.messages?.value??{})),a={locale:n,localeFallback:r,t:(e,t)=>{let a=gs(i.value[n.value]??{},e),o=gs(i.value[r.value]??{},e),s=gs(i.value.en??{},e),c=a??o??s;return typeof c==`string`?_s(c,t):e}};return(0,t.provide)(ys,a),a}function k(){return(0,t.inject)(ys,{locale:(0,t.computed)(()=>`zh-CN`),localeFallback:(0,t.computed)(()=>`zh-CN`),t:e=>e})}var ys,A=a((()=>{fs(),ys=Symbol(`FormBuilderI18n`)})),bs,xs,Ss,Cs=a((()=>{bs=`yyyy-MM-dd`,xs=`HH:mm:ss`,Ss=`yyyy-MM-dd HH:mm:ss`})),ws,Ts,Es,Ds,Os,ks=a((()=>{ws=()=>globalThis.crypto?.randomUUID?.()||`${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`,Ts=(e,t)=>{for(let n of e){if(n&&typeof n==`object`&&n.__key===t)return n;let e=n?.children;if(Array.isArray(e)){let n=Ts(e,t);if(n)return n}}},Es=e=>{let t=(typeof e==`string`?e:``).trim().toLowerCase().replace(/[^a-z0-9_]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``);return t||=`field`,/^\d/.test(t)&&(t=`field_${t}`),t},Ds=(e,t)=>{for(let n of e){typeof n?.name==`string`&&n.name&&t.add(n.name);let e=n?.children;Array.isArray(e)&&Ds(e,t)}},Os=e=>{let t=0;for(let n of e){let e=/^field_(\d+)$/.exec(n);e&&(t=Math.max(t,Number(e[1])))}let n=`field_${t+1}`;for(;e.has(n);)t++,n=`field_${t+1}`;return e.add(n),n}}));function As(e){return e?js[e]??null:null}var js,Ms=a((()=>{js={group:{dataShape:`object`,keyProp:`groupKey`,primitive:`group`},list:{dataShape:`arrayOfObjects`,keyProp:`listKey`,primitive:`cmp`},card:{dataShape:`object`,keyProp:`cardKey`,primitive:`cmp`},inputGroup:{dataShape:`object`,keyProp:`inputGroupKey`,primitive:`cmp`},buttonGroup:{dataShape:`none`,keyProp:`buttonGroupKey`,primitive:`cmp`},tabs:{dataShape:`objectOfObjects`,keyProp:`tabsKey`,primitive:`cmp`}}}));function Ns(e){return zs[e]}var Ps,Fs,Is,Ls,Rs,zs,Bs=a((()=>{Ps=e=>typeof e==`number`?e:typeof e==`string`?e.trim()?Number(e):0:e==null?0:typeof e==`boolean`?+!!e:Number(e),Fs=e=>!!e,Is=(e,t)=>{if(e==null&&t==null)return!0;let n=Ps(e),r=Ps(t);return Number.isFinite(n)&&Number.isFinite(r)?n===r:String(e??``)===String(t??``)},Ls=e=>([t,n])=>e(Ps(t),Ps(n)),Rs=e=>([t,n])=>{let r=Ps(t),i=Ps(n),a=Number.isFinite(r)&&Number.isFinite(i);return e(a?r:String(t??``),a?i:String(n??``))},zs={and:{name:`and`,arity:[1,1/0],returns:`boolean`,toJs:e=>`(${e.join(` && `)})`,eval:e=>e.every(Fs)},or:{name:`or`,arity:[1,1/0],returns:`boolean`,toJs:e=>`(${e.join(` || `)})`,eval:e=>e.some(Fs)},not:{name:`not`,arity:[1,1],returns:`boolean`,toJs:([e])=>`!(${e})`,eval:([e])=>!Fs(e)},eq:{name:`eq`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`(${e} === ${t})`,eval:([e,t])=>Is(e,t)},neq:{name:`neq`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`(${e} !== ${t})`,eval:([e,t])=>!Is(e,t)},gt:{name:`gt`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`(${e} > ${t})`,eval:Rs((e,t)=>e>t)},gte:{name:`gte`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`(${e} >= ${t})`,eval:Rs((e,t)=>e>=t)},lt:{name:`lt`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`(${e} < ${t})`,eval:Rs((e,t)=>e<t)},lte:{name:`lte`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`(${e} <= ${t})`,eval:Rs((e,t)=>e<=t)},contains:{name:`contains`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`String(${e}).includes(${t})`,eval:([e,t])=>String(e??``).includes(String(t??``))},notContains:{name:`notContains`,arity:[2,2],returns:`boolean`,toJs:([e,t])=>`!String(${e}).includes(${t})`,eval:([e,t])=>!String(e??``).includes(String(t??``))},empty:{name:`empty`,arity:[1,1],returns:`boolean`,toJs:([e])=>`(${e} == null || ${e} === '')`,eval:([e])=>e==null||e===``},notEmpty:{name:`notEmpty`,arity:[1,1],returns:`boolean`,toJs:([e])=>`(${e} != null && ${e} !== '')`,eval:([e])=>e!=null&&e!==``},add:{name:`add`,arity:[2,2],returns:`any`,toJs:([e,t])=>`(${e} + ${t})`,eval:([e,t])=>typeof e==`string`||typeof t==`string`?String(e??``)+String(t??``):Ps(e)+Ps(t)},sub:{name:`sub`,arity:[2,2],returns:`number`,toJs:([e,t])=>`(${e} - ${t})`,eval:Ls((e,t)=>e-t)},mul:{name:`mul`,arity:[2,2],returns:`number`,toJs:([e,t])=>`(${e} * ${t})`,eval:Ls((e,t)=>e*t)},div:{name:`div`,arity:[2,2],returns:`number`,toJs:([e,t])=>`(${e} / ${t})`,eval:Ls((e,t)=>e/t)},mod:{name:`mod`,arity:[2,2],returns:`number`,toJs:([e,t])=>`(${e} % ${t})`,eval:Ls((e,t)=>e%t)},concat:{name:`concat`,arity:[1,1/0],returns:`string`,toJs:e=>`(${e.join(` + `)})`,eval:e=>e.map(e=>String(e??``)).join(``)},lower:{name:`lower`,arity:[1,1],returns:`string`,toJs:([e])=>`String(${e}).toLowerCase()`,eval:([e])=>String(e??``).toLowerCase()},upper:{name:`upper`,arity:[1,1],returns:`string`,toJs:([e])=>`String(${e}).toUpperCase()`,eval:([e])=>String(e??``).toUpperCase()},trim:{name:`trim`,arity:[1,1],returns:`string`,toJs:([e])=>`String(${e}).trim()`,eval:([e])=>String(e??``).trim()},length:{name:`length`,arity:[1,1],returns:`number`,toJs:([e])=>`String(${e}).length`,eval:([e])=>String(e??``).length},coalesce:{name:`coalesce`,arity:[2,2],returns:`any`,toJs:([e,t])=>`(${e} ?? ${t})`,eval:([e,t])=>e??t},__raw__:{name:`__raw__`,arity:[1,1],returns:`any`,toJs:([e])=>e??``,eval:([e])=>e}}}));function Vs(e){return typeof e==`object`&&!!e&&`$expr`in e}function Hs(e,t=`var`){switch(e.type){case`literal`:return e.value===void 0?`undefined`:JSON.stringify(e.value);case`field`:return t===`formData`?`$formData.${e.name}`:`$${e.name}`;case`call`:{if(e.fn===`__raw__`){let t=e.args[0];if(t&&t.type===`literal`&&typeof t.value==`string`)return t.value}let n=Ns(e.fn),r=e.args.map(e=>Hs(e,t));return n?n.toJs(r):`${e.fn}(${r.join(`, `)})`}}}function Us(e){if(!e)return``;let t=``;return e.debounce&&(t+=`(${e.debounce})`),e.empty&&(t+=`+`),e.force&&(t+=`*`),e.optional&&(t+=`?`),t}function Ws(e){if(!e?.length)return{};let t=e.map(e=>{let t=Us(e),n=e.args?.length?`:${e.args.join(`,`)}`:``;return`${t}${e.rule}${n}`}).join(`|`),n=e.filter(e=>e.message).reduce((e,t)=>(e[t.rule]=t.message,e),{});return{validation:t,...Object.keys(n).length?{"validation-messages":n}:{}}}function Gs(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ks(e){return e?.length?e.reduce((e,t)=>{let n=`on${Gs(t.event)}`;return e[n]=`($event) => { ${t.handler} }`,e},{}):{}}var qs=a((()=>{Bs()}));function Js(e){let t=e;return typeof t.$cmp==`string`?{renderAs:`cmp`,target:t.$cmp}:typeof t.$el==`string`?{renderAs:`el`,target:t.$el}:{renderAs:`formkit`,target:typeof t.$formkit==`string`?t.$formkit:void 0}}function Ys(e,t){let n=e,r=t?.renderAs??`formkit`,i=t?.target;return r===`cmp`?typeof n.$cmp==`string`&&n.$cmp===i:r===`el`?typeof n.$el==`string`&&n.$el===i:typeof n.$formkit==`string`?i==null||n.$formkit===i:!1}function Xs(e,t=`col-span-12`){if(!e)return t;let n=[];return e.colspan!=null&&e.colspan>0&&n.push(`col-span-${e.colspan}`),e.rowspan!=null&&e.rowspan>1&&n.push(`row-span-${e.rowspan}`),n.length?n.join(` `):t}function Zs(e){if(typeof e!=`string`||!e.trim())return;let t={},n=e.match(/\bcol-span-(\d+)\b/),r=e.match(/\brow-span-(\d+)\b/);if(n&&(t.colspan=Number(n[1])),r&&(t.rowspan=Number(r[1])),Object.keys(t).length&&!(t.colspan===12&&t.rowspan==null))return t}function Qs(e,t){let n=typeof e==`string`?e.trim():``;if(!n)return;let r=Zs(n);r&&(t.layout=r),Xs(r)!==n&&(t.outerClass=n)}function $s(e){return e.outerClass?.trim()?e.outerClass:Xs(e.layout)}function ec(e,t,n,r){r===`cmp`?(e.props||={},e.props[t]=n):r===`el`?(e.attrs||={},e.attrs[t]=n):e[t]=n}function tc(e,t,n){n===`cmp`?(e.props||={},Object.assign(e.props,t)):n===`el`?(e.attrs||={},Object.assign(e.attrs,t)):Object.assign(e,t)}function nc(e,t,n){let r=t===`cmp`?{$cmp:n??e.type}:t===`el`?{$el:n??e.type}:{$formkit:e.type};e.key&&(r.__key=e.key),e.visibleIf&&(r.if=Hs(e.visibleIf,`var`));let i=Ks(e.events);return i&&Object.keys(i).length&&tc(r,i,t),e.label&&ec(r,`label`,e.label,t),e.id&&ec(r,`id`,e.id,t),r}function rc(e){return typeof e==`object`&&!!e&&`$expr`in e}function ic(e,t){let n=t?.renderAs??`formkit`,r=nc(e,n,t?.target);if(e.name?ec(r,`name`,e.name,n):e.id&&ec(r,`name`,e.id,n),e.value!==void 0&&(rc(e.value)?(ec(r,`useExpressionValue`,!0,n),ec(r,`__raw__valueExpression`,Hs(e.value.$expr,`var`),n)):ec(r,`value`,e.value,n)),tc(r,{...Ws(e.validation)},n),(Array.isArray(e.options)?e.options.length:e.options!==void 0)&&ec(r,`options`,e.options,n),e.props)if(n===`cmp`||n===`el`)tc(r,e.props,n);else{let t={};for(let[n,i]of Object.entries(e.props))Sc.has(n)?r[n]=i:t[n]=i;Object.keys(t).length&&(r.props=t)}let i=$s(e);return r.outerClass=i,n===`cmp`&&(typeof r.props?.name==`string`&&(r.name=r.props.name),i&&(r.props.outerClass=i)),r}function ac(e,t=`text`){let n=e,r=Js(e),i=r.renderAs===`cmp`,a=r.renderAs===`el`,o=i?n.props&&typeof n.props==`object`?n.props:{}:a?n.attrs&&typeof n.attrs==`object`?n.attrs:{}:n,s=typeof n.$formkit==`string`?n.$formkit:typeof n.$cmp==`string`?t:typeof n.$el==`string`?n.$el:t,c={id:typeof o.id==`string`&&o.id?o.id:typeof n.__key==`string`?n.__key:ws(),category:`field`,type:s,renderAs:r.renderAs};r.target&&r.target!==s&&(c.target=r.target),typeof n.__key==`string`&&n.__key&&(c.key=n.__key),typeof o.name==`string`&&o.name&&o.name!==c.id&&(c.name=o.name),typeof o.label==`string`&&o.label&&(c.label=o.label),o.useExpressionValue===!0&&typeof o.__raw__valueExpression==`string`?c.value={$expr:bc(o.__raw__valueExpression)}:o.value!==void 0&&(c.value=o.value);let l=vc(o.validation,o[`validation-messages`]??o.validationMessages);l?.length&&(c.validation=l),Array.isArray(o.options)&&(c.options=o.options),typeof n.if==`string`&&n.if?c.visibleIf=bc(n.if):typeof n.if==`boolean`&&(c.visibleIf={type:`literal`,value:n.if});let u=yc(o);u?.length&&(c.events=u),Qs(n.outerClass,c);let d={},f=e=>{for(let[t,n]of Object.entries(e))xc.has(t)||n!==void 0&&(d[t]=n)};if(i){f(n.props??{});for(let[e,t]of Object.entries(n))e===`props`||e===`$cmp`||xc.has(e)||t===void 0||d[e]!==void 0||(d[e]=t)}else if(a){f(n.attrs??{});for(let[e,t]of Object.entries(n))e===`attrs`||e===`$el`||xc.has(e)||t!==void 0&&(d[e]=t)}else f(n);return Object.keys(d).length&&(c.props=d),c}function oc(e,t,n){let r=t??[],i=e.label,a=n?.container;if(a){if(a.primitive===`group`){let t={$formkit:`group`,name:e.name??e.id};return e.id&&(t.id=e.id),e.key&&(t.__key=e.key),i&&(t.label=i),e.visibleIf&&(t.if=Hs(e.visibleIf,`var`)),e.props&&Object.assign(t,e.props),r.length&&(t.children=r),t.outerClass=$s(e),t}let t={[a.keyProp]:e.key??e.id,name:e.name??e.id,modelValue:r,...e.props};i&&(t.label=i);let n={$cmp:e.type,props:t};return e.key&&(n.__key=e.key),e.visibleIf&&(n.if=Hs(e.visibleIf,`var`)),typeof n.props?.name==`string`&&(n.name=n.props.name),n.children=r,n.outerClass=$s(e),n}let o=n?.renderAs??`cmp`,s=nc(e,o,n?.target);return o===`cmp`?(s.props={...s.props,...e.props,label:i},r.length&&(s.children=r)):o===`el`?r.length&&(s.children=r):(i&&(s.label=i),e.props&&Object.assign(s,e.props),r.length&&(s.children=r)),s.outerClass=$s(e),s}function sc(e,t){let n=e,r=typeof n.$formkit==`string`?n.$formkit:typeof n.$cmp==`string`?n.$cmp:typeof n.$el==`string`?n.$el:`group`,i=n.props&&typeof n.props==`object`?{...n.props}:{},a=typeof n.name==`string`&&n.name?n.name:typeof i.name==`string`?i.name:void 0;delete i.name;let o=Array.isArray(n.children)?n.children:Array.isArray(i.modelValue)?i.modelValue:[],s=As(r),c={id:typeof n.id==`string`&&n.id?n.id:typeof i.id==`string`&&i.id?i.id:typeof n.__key==`string`?n.__key:ws(),category:`container`,type:r,renderAs:Js(e).renderAs,dataType:s==null?r===`group`?`object`:`array`:s.dataShape===`object`?`object`:`array`,children:t.children?t.children(o):[]},l=Js(e);l.target&&l.target!==r&&(c.target=l.target),typeof n.__key==`string`&&n.__key&&(c.key=n.__key),typeof a==`string`&&a&&a!==c.id&&(c.name=a),typeof n.label==`string`&&n.label?c.label=n.label:typeof i.label==`string`&&i.label&&(c.label=i.label),typeof n.if==`string`&&n.if&&(c.visibleIf=bc(n.if)),Qs(n.outerClass,c);let u={};for(let[e,t]of Object.entries(i))Cc.has(e)||t!==void 0&&(u[e]=t);for(let[e,t]of Object.entries(n))[`$formkit`,`$cmp`,`$el`,`name`,`label`,`if`,`children`,`outerClass`,`props`,`attrs`,`__key`,`__preview_placeholder`,`id`].includes(e)||u[e]===void 0&&t!==void 0&&(u[e]=t);return Object.keys(u).length&&(c.props=u),c}function cc(e,t,n){let r=t??[],i=e.label,a=n?.container;if(a){let t=a.dataShape===`objectOfObjects`?r.map(e=>({...e,__key:e?.__key??ws()})):r,n={$cmp:e.type,props:{[a.keyProp]:e.key??e.id,name:e.name,modelValue:t,...e.props}};return i&&(n.props={...n.props,label:i}),e.key&&(n.__key=e.key),e.visibleIf&&(n.if=Hs(e.visibleIf,`var`)),typeof n.props?.name==`string`&&(n.name=n.props.name),n.children=t,n.outerClass=$s(e),n}switch(e.type){case`grid`:{let t={$el:`div`,attrs:{class:`grid grid-cols-${Number(e.props?.columns)||12} gap-${Number(e.props?.gap)||4}`}};return e.key&&(t.__key=e.key),e.visibleIf&&(t.if=Hs(e.visibleIf,`var`)),r.length&&(t.children=r),t.outerClass=$s(e),t}case`row`:{let t={$el:`div`,attrs:{class:`flex flex-row flex-wrap gap-2`}};return e.key&&(t.__key=e.key),e.visibleIf&&(t.if=Hs(e.visibleIf,`var`)),r.length&&(t.children=r),t.outerClass=$s(e),t}case`column`:{let t={$el:`div`,attrs:{class:`flex flex-col gap-2`}};return e.key&&(t.__key=e.key),e.visibleIf&&(t.if=Hs(e.visibleIf,`var`)),r.length&&(t.children=r),t.outerClass=Xs(e.layout),t}default:{let t=n?.renderAs??`cmp`,a=nc(e,t,n?.target);return t===`cmp`?a.props={...a.props,...e.props,...i?{label:i}:{}}:t===`el`?e.props&&(a.attrs={...a.attrs,...e.props}):(i&&(a.label=i),e.props&&Object.assign(a,e.props)),r.length&&(a.children=r),a.outerClass=$s(e),a}}}function lc(e,t){let n=e,r=uc(e),i=Array.isArray(n.children)?n.children:[],a={id:typeof n.id==`string`&&n.id?n.id:typeof n.__key==`string`?n.__key:ws(),category:`layout`,type:r,renderAs:Js(e).renderAs,children:t.children?t.children(i):[]},o=Js(e);o.target&&o.target!==r&&(a.target=o.target),typeof n.__key==`string`&&n.__key&&(a.key=n.__key),typeof n.label==`string`&&n.label?a.label=n.label:typeof n.props?.label==`string`&&n.props.label&&(a.label=n.props.label),typeof n.if==`string`&&n.if&&(a.visibleIf=bc(n.if)),Qs(n.outerClass,a);let s=typeof n.name==`string`&&n.name?n.name:typeof n.props?.name==`string`?n.props.name:void 0;typeof s==`string`&&s&&s!==a.id&&(a.name=s);let c={};if(n.props&&typeof n.props==`object`)for(let[e,t]of Object.entries(n.props))Cc.has(e)||e===`name`||t!==void 0&&(c[e]=t);if(typeof n.props?.title==`string`&&(a.label=a.label??n.props.title,delete c.title),o.renderAs===`el`&&n.attrs&&typeof n.attrs==`object`)for(let[e,t]of Object.entries(n.attrs))e===`class`||t===void 0||(c[e]=t);if(r===`grid`&&typeof n.attrs?.class==`string`){let e=n.attrs.class.match(/grid-cols-(\d+)/),t=n.attrs.class.match(/gap-(\d+)/);e&&(c.columns=Number(e[1])),t&&(c.gap=Number(t[1]))}return Object.keys(c).length&&(a.props=c),a}function uc(e){let t=e;if(t.$cmp===`card`)return`card`;if(t.$cmp===`tabs`)return`tabs`;if(t.$el===`div`&&typeof t.attrs?.class==`string`){let e=t.attrs.class;if(e.includes(`grid-cols`))return`grid`;if(e.includes(`flex-row`))return`row`;if(e.includes(`flex-col`))return`column`}return typeof t.__key==`string`&&!t.$formkit&&!t.$cmp&&!t.$el?`tabsPane`:typeof t.$cmp==`string`?t.$cmp:`card`}function dc(e,t){let n={__key:e.key??e.id};e.label&&(n.label=e.label),e.name&&(n.name=e.name);let r=t??[];return r.length&&(n.children=r),n.outerClass=$s(e),n}function fc(e,t){let n=e,r=Array.isArray(n.children)?n.children:[],i={id:typeof n.__key==`string`&&n.__key?n.__key:ws(),category:`layout`,type:`tabsPane`,renderAs:`el`,children:t.children?t.children(r):[]};return typeof n.__key==`string`&&n.__key&&(i.key=n.__key),typeof n.name==`string`&&n.name&&(i.name=n.name),typeof n.label==`string`&&n.label&&(i.label=n.label),Qs(n.outerClass,i),i}function pc(e,t){let n=e.props&&typeof e.props==`object`?e.props:{},r=t?.renderAs??(e.type===`submit`||e.type===`reset`?`formkit`:`el`),i={},a=e=>r===`cmp`?{$cmp:t?.target??e}:r===`el`?{$el:t?.target??e}:{$formkit:e};switch(e.type){case`submit`:case`reset`:{let t=e.type;Object.assign(i,a(t));let o=(e,t)=>ec(i,e,t,r);o(`name`,e.name??`${t}_button`),o(`label`,e.label??(t===`submit`?`Submit`:`Reset`)),o(`type`,t),tc(i,n,r);let s=$s(e);i.outerClass=s===`col-span-12`&&!e.outerClass&&!e.layout?`col-span-12 pt-2`:s;break}case`button`:i.$el=`button`,i.attrs={type:n.htmlType??`button`,...n.attrs},e.label&&(i.children=e.label);break;case`paragraph`:i.$el=`p`,i.attrs={class:`text-sm text-muted-foreground`},i.children=e.text??e.label??``;break;case`heading`:i.$el=`h3`,i.children=e.text??e.label??``;break;case`divider`:i.$el=`hr`;break;default:{Object.assign(i,a(e.type));let t=(e,t)=>ec(i,e,t,r);e.name&&t(`name`,e.name),e.id&&t(`id`,e.id),e.label&&t(`label`,e.label);for(let[e,t]of Object.entries(n))r===`formkit`&&wc.has(e)?i[e]=t:ec(i,e,t,r);i.outerClass=$s(e)}}e.key&&(i.__key=e.key),e.visibleIf&&(i.if=Hs(e.visibleIf,`var`));let o=Ks(e.events);return o&&Object.keys(o).length&&tc(i,o,r),r===`cmp`&&(Object.keys(i.props??{}).length===0&&delete i.props,typeof i.outerClass==`string`&&i.outerClass&&(i.props={...i.props,outerClass:i.outerClass}),typeof i.props?.name==`string`&&(i.name=i.props.name)),i}function mc(e,t){let n=e,r=Js(e),i=r.renderAs===`cmp`,a=r.renderAs===`el`,o=i?n.props&&typeof n.props==`object`?n.props:{}:a?n.attrs&&typeof n.attrs==`object`?n.attrs:{}:n,s=n.$formkit===`submit`?`submit`:typeof n.$formkit==`string`?n.$formkit:typeof n.$el==`string`?hc(n.$el):t??`html`,c={id:typeof o.id==`string`&&o.id?o.id:typeof n.__key==`string`?n.__key:ws(),category:`static`,type:s,renderAs:r.renderAs};r.target&&r.target!==s&&(c.target=r.target),typeof n.__key==`string`&&n.__key&&(c.key=n.__key),typeof o.name==`string`&&o.name&&o.name!==c.id&&(c.name=o.name),typeof o.label==`string`&&o.label&&(c.label=o.label),typeof n.if==`string`&&n.if?c.visibleIf=bc(n.if):typeof n.if==`boolean`&&(c.visibleIf={type:`literal`,value:n.if}),(c.type===`paragraph`||c.type===`heading`)&&(typeof n.children==`string`?c.text=n.children:typeof n.children==`number`&&(c.text=String(n.children)));let l=yc(o);l?.length&&(c.events=l),Qs(n.outerClass,c);let u={},d=e=>{for(let[t,n]of Object.entries(e))Tc.has(t)||/^on[A-Z]/.test(t)||n!==void 0&&(u[t]=n)};if(i){for(let[e,t]of Object.entries(n.props??{})){if(e===`type`){u.type=t;continue}Tc.has(e)||/^on[A-Z]/.test(e)||t!==void 0&&(u[e]=t)}for(let[e,t]of Object.entries(n))e===`props`||e===`$cmp`||Tc.has(e)||t===void 0||u[e]!==void 0||(u[e]=t)}else if(a){d(n.attrs??{});for(let[e,t]of Object.entries(n))e===`attrs`||e===`$el`||Tc.has(e)||t!==void 0&&(u[e]=t)}else d(n);return c.type===`button`&&n.attrs&&(u.attrs=n.attrs),Object.keys(u).length&&(c.props=u),c}function hc(e){return e===`button`?`button`:e===`h1`||e===`h2`||e===`h3`||e===`h4`||e===`h5`||e===`h6`?`heading`:e===`hr`?`divider`:e===`p`||e===`span`||e===`div`?`paragraph`:`html`}function gc(e,t,n,r){switch(t){case`field`:return ic(e,n);case`container`:return oc(e,r?.children,n);case`layout`:return cc(e,r?.children,n);case`static`:return pc(e,n);default:throw Error(`[convert-common] 未知分类: ${t}`)}}function _c(e,t,n,r){switch(t){case`field`:return ac(e,r);case`container`:return sc(e,n??{});case`layout`:return lc(e,n??{});case`static`:return mc(e,r);default:throw Error(`[convert-common] 未知分类: ${t}`)}}function vc(e,t){if(typeof e!=`string`||!e.trim())return;let n=t&&typeof t==`object`?t:{};return e.split(`|`).map(e=>{let t=e.trim(),r={rule:``},i=t.match(/^\((\d+)\)/);i&&(r.debounce=Number(i[1]),t=t.slice(i[0].length)),t.startsWith(`+`)&&(r.empty=!0,t=t.slice(1)),t.startsWith(`*`)&&(r.force=!0,t=t.slice(1)),t.startsWith(`?`)&&(r.optional=!0,t=t.slice(1));let[a,o]=t.split(`:`);return r.rule=a??``,o&&(r.args=o.split(`,`).map(e=>{let t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?Number(t):t===`true`?!0:t===`false`?!1:t})),n[r.rule]&&(r.message=n[r.rule]),r})}function yc(e){let t=[];for(let[n,r]of Object.entries(e)){if(!/^on[A-Z]/.test(n)||typeof r!=`string`)continue;let e=n.charAt(2).toLowerCase()+n.slice(3),i=r,a=i.match(/^\(\$event\)\s*=>\s*\{\s*([\s\S]*?)\s*\}$/);a&&a[1]!==void 0&&(i=a[1]),t.push({event:e,handler:i})}return t.length?t:void 0}function bc(e){let t=e=>({type:`call`,fn:`__raw__`,args:[{type:`literal`,value:e}]});if(typeof e!=`string`)return t(String(e));let n=e.trim();if(!n)return t(``);let r=0,i=n.length,a=()=>r>=i,o=()=>n[r],s=()=>{for(;!a()&&/\s/.test(o());)r++},c=e=>n[r]===e?(r++,!0):!1,l=e=>{if(s(),n.slice(r,r+e.length)!==e)return!1;let t=n[r+e.length];return t!==void 0&&/[a-zA-Z0-9_]/.test(t)?!1:(r+=e.length,!0)},u=e=>({type:`literal`,value:e}),d=(e,t)=>({type:`call`,fn:e,args:t}),f=()=>{let e=p();for(;s(),n.slice(r,r+2)===`||`;)r+=2,e=d(`or`,[e,p()]);return e},p=()=>{let e=m();for(;s(),n.slice(r,r+2)===`&&`;)r+=2,e=d(`and`,[e,m()]);return e},m=()=>{let e=h();for(;;){s();let t=n.slice(r,r+3),i=n.slice(r,r+2);if(t===`===`)r+=3,e=d(`eq`,[e,h()]);else if(t===`!==`)r+=3,e=d(`neq`,[e,h()]);else if(i===`==`)r+=2,e=d(`eq`,[e,h()]);else if(i===`!=`)r+=2,e=d(`neq`,[e,h()]);else break}return e},h=()=>{let e=g();for(;;){s();let t=n.slice(r,r+2),i=o();if(t===`>=`)r+=2,e=d(`gte`,[e,g()]);else if(t===`<=`)r+=2,e=d(`lte`,[e,g()]);else if(i===`>`)r++,e=d(`gt`,[e,g()]);else if(i===`<`)r++,e=d(`lt`,[e,g()]);else break}return e},g=()=>{let e=_();for(;;){s();let t=o();if(t===`+`)r++,e=d(`add`,[e,_()]);else if(t===`-`)r++,e=d(`sub`,[e,_()]);else break}return e},_=()=>{let e=v();for(;;){s();let t=o();if(t===`*`)r++,e=d(`mul`,[e,v()]);else if(t===`/`)r++,e=d(`div`,[e,v()]);else break}return e},v=()=>{s();let e=o();return e===`!`?(r++,d(`not`,[v()])):e===`-`?(r++,d(`sub`,[u(0),v()])):b()},y=()=>{if(!l(`String`)||o()!==`(`)return null;r++,s();let e=f();if(s(),!c(`)`))throw Error(`parse error`);if(s(),o()===`.`){r++,s();let t=n.slice(r).match(/^[a-zA-Z]+/);if(t){if(r+=t[0].length,t[0]===`includes`&&o()===`(`){r++,s();let t=f();if(s(),!c(`)`))throw Error(`parse error`);return d(`contains`,[e,t])}if(t[0]===`toLowerCase`){if(!c(`(`)||!c(`)`))throw Error(`parse error`);return d(`lower`,[e])}if(t[0]===`toUpperCase`){if(!c(`(`)||!c(`)`))throw Error(`parse error`);return d(`upper`,[e])}if(t[0]===`trim`){if(!c(`(`)||!c(`)`))throw Error(`parse error`);return d(`trim`,[e])}}}return e},b=()=>{s();let e=o();if(e===`"`||e===`'`){let t=e;r++;let n=``;for(;;){if(a())throw Error(`parse error`);let e=o();if(e===`\\`){if(r++,a())throw Error(`parse error`);n+=o(),r++;continue}if(e===t)break;n+=e,r++}if(!c(t))throw Error(`parse error`);return u(n)}if(e===`$`){r++;let e=r;for(;!a()&&/[a-zA-Z0-9_]/.test(o());)r++;let t=n.slice(e,r);if(o()===`.`){r++;let e=r;for(;!a()&&/[a-zA-Z0-9_.]/.test(o());)r++;let i=n.slice(e,r);i&&(t=i)}return{type:`field`,name:t}}if(e===`(`){r++,s();let e=f();if(s(),!c(`)`))throw Error(`parse error`);return e}if(e!==void 0&&/[0-9.]/.test(e)){let e=n.slice(r).match(/^\d+(\.\d+)?/);if(e)return r+=e[0].length,u(Number(e[0]))}if(l(`true`))return u(!0);if(l(`false`))return u(!1);if(l(`null`))return u(null);let t=y();if(t)return t;throw Error(`parse error`)};try{s();let n=f();return s(),a()?n:t(e)}catch{return t(e)}}var xc,Sc,Cc,wc,Tc,Ec=a((()=>{ks(),qs(),Ms(),xc=new Set([`$formkit`,`$cmp`,`$el`,`name`,`id`,`label`,`if`,`__raw__ifExpression`,`value`,`useExpressionValue`,`__raw__valueExpression`,`validation`,`validation-messages`,`validationMessages`,`options`,`outerClass`,`children`,`__key`,`__preview_placeholder`,`bind`,`props`,`attrs`]),Sc=new Set([`min`,`max`,`step`,`multiple`,`accept`,`number`,`validationVisibility`,`placeholder`,`help`,`description`,`options`,`value`,`__bind`,`buttonText`]),Cc=new Set([`listKey`,`cardKey`,`inputGroupKey`,`buttonGroupKey`,`tabsKey`,`modelValue`,`label`,`title`]),wc=new Set([`options`,`value`,`min`,`max`,`step`,`multiple`,`accept`,`placeholder`,`__bind`,`buttonText`]),Tc=new Set([`$formkit`,`$el`,`$cmp`,`name`,`id`,`label`,`type`,`if`,`children`,`attrs`,`outerClass`,`props`,`__key`,`__preview_placeholder`])}));function Dc(e,t=!1){if(zc.has(e.type)){if(!t)throw Error(`[formkit-form-builder] DSL 元素类型 "${e.type}" 重复注册`);zc.delete(e.type)}zc.set(e.type,e)}function Oc(e){if(e)return zc.get(e)}function kc(){return Array.from(zc.values())}function Ac(e){Object.assign(Bc,e)}function jc(e){let t=e?.$cmp;if(typeof t==`string`)return Bc[t]}function Mc(e,t,n,r){let i=r??e??t;return e?{renderAs:`cmp`,target:i}:{renderAs:n,target:i}}function Nc(e){let{type:t,category:n,schema:r}=e,i=e.container??As(t),a={renderAs:r.renderAs,target:r.target??t,...i?{container:i}:{}};return{type:t,category:n,renderAs:a.renderAs,target:a.target,...i?{container:i}:{},template:r,icon:e.icon,tooltipKey:e.tooltipKey,editor:e.editor,defaults:()=>Pc(e),toSchema:r.toSchema??((e,t)=>gc(e,n,a,t)),match:r.match??(e=>Ys(e,a)||e.$formkit===t||jc(e)===t),fromSchema:r.fromSchema??((e,r)=>_c(e,n,r,t))}}function Pc(e){let{type:t,category:n,schema:r}=e,i={id:ws(),category:n,type:t,renderAs:r.renderAs};r.target&&r.target!==t&&(i.target=r.target),r.outerClass&&(i.outerClass=r.outerClass);let a={...r.props};if(n===`field`){r.value!==void 0&&(i.value=r.value),Array.isArray(r.options)?i.options=r.options:Array.isArray(a.options)&&(i.options=a.options,delete a.options);let e=vc(r.validation);e?.length&&(i.validation=e)}else r.value!==void 0&&(a.value=r.value),r.options!==void 0&&(a.options=r.options);return Object.keys(a).length&&(i.props=a),(n===`container`||n===`layout`)&&(i.children=[]),i}function Fc(e,t){let n=t?.dataType??`object`,r=t?.cmp,i=t?.container??As(e),a={renderAs:i==null?r!=null||t?.target!=null?`cmp`:`formkit`:i.primitive===`group`?`formkit`:`cmp`,target:t?.target??r??e,...i?{container:i}:{}};return{type:e,category:`container`,renderAs:a.renderAs,target:a.target,container:i??void 0,defaults:()=>({id:ws(),category:`container`,type:e,renderAs:a.renderAs,...a.target&&a.target!==e?{target:a.target}:{},dataType:n,children:[]}),toSchema:(e,t)=>gc(e,`container`,a,t),match:t=>Ys(t,a)||t.$cmp===e,fromSchema:(t,n)=>_c(t,`container`,n,e),...t}}function Ic(e,t){let n=t?.cmp,r=t?.container??As(e),i={renderAs:n!=null||r!=null?`cmp`:`el`,target:t?.target??n??e,...r?{container:r}:{}};return{type:e,category:`layout`,renderAs:i.renderAs,target:i.target,container:r??void 0,defaults:()=>({id:ws(),category:`layout`,type:e,renderAs:i.renderAs,...i.target&&i.target!==e?{target:i.target}:{},children:[]}),toSchema:(e,t)=>gc(e,`layout`,i,t),match:t=>{let n=t;return e===`card`?n.$cmp===`card`||n.$formkit===`card`:e===`tabs`?n.$cmp===`tabs`||n.$formkit===`tabs`:e===`grid`?n.$el===`div`&&typeof n.attrs?.class==`string`&&String(n.attrs.class).includes(`grid-cols`):e===`row`?n.$el===`div`&&typeof n.attrs?.class==`string`&&String(n.attrs.class).includes(`flex-row`):e===`column`?n.$el===`div`&&typeof n.attrs?.class==`string`&&String(n.attrs.class).includes(`flex-col`):n.$cmp===e},fromSchema:(t,n)=>_c(t,`layout`,n,e),...t}}function Lc(e,t){let n=Mc(t?.cmp,e,e===`submit`||e===`reset`?`formkit`:`el`,t?.target);return{type:e,category:`static`,renderAs:n.renderAs,target:n.target,defaults:()=>({id:ws(),category:`static`,type:e,renderAs:n.renderAs,...n.target&&n.target!==e?{target:n.target}:{}}),toSchema:e=>gc(e,`static`,n,void 0),match:t=>{let r=t;return n.renderAs===`cmp`?r.$cmp===n.target||r.$formkit===e:e===`submit`?r.$formkit===`submit`:e===`reset`?r.$formkit===`reset`:r.$el===e},fromSchema:t=>_c(t,`static`,void 0,e),...t}}function Rc(){return{type:`tabsPane`,category:`layout`,renderAs:`el`,defaults:()=>({id:ws(),category:`layout`,type:`tabsPane`,renderAs:`el`,children:[]}),toSchema:(e,t)=>dc(e,t.children),match:e=>{let t=e;return typeof t.__key==`string`&&!t.$formkit&&!t.$cmp&&!t.$el},fromSchema:(e,t)=>fc(e,t)}}var zc,Bc,Vc=a((()=>{ks(),Ms(),Ec(),zc=new Map,Bc={NaiveSubmit:`submit`,NaiveReset:`reset`,NaiveButton:`naiveButton`,NaiveH1:`naiveH1`,NaiveH2:`naiveH2`,NaiveH3:`naiveH3`,NaiveH4:`naiveH4`,NaiveH5:`naiveH5`,NaiveH6:`naiveH6`}}));function Hc(e){return e.category===`container`||e.category===`layout`?e.children??[]:[]}function Uc(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(!r)continue;if(r.key===t||r.id===t)return{node:r,parent:null,rootIndex:n,index:n};let i=Hc(r);if(i.length){let e=Uc(i,t);if(e)return{node:e.node,parent:r,rootIndex:n,index:e.index}}}return null}function Wc(e,t,n){let r=!1;return{nodes:e.map(e=>{if(!e)return e;if(e.key===t||e.id===t)return r=!0,n;let i=Hc(e);if(i.length){let a=Wc(i,t,n);if(a.found)return r=!0,{...e,children:a.nodes}}return e}),found:r}}var Gc=a((()=>{})),Kc=a((()=>{}));function qc(e){let t=n=>{let r=Oc(n.type);if(!r){let e=n.meta?.rawSchema;if(e&&typeof e==`object`)return e;throw Error(`[dslToSchema] 未注册的 DSL 类型: ${n.category}/${n.type}`)}let i=(n.category===`container`||n.category===`layout`)&&Array.isArray(n.children)?n.children.map(t):void 0;return r.toSchema(n,{form:e,children:i})},n=e.root.children.map(t),r=e.settings;return[{$formkit:`form`,name:e.name,props:{labelPosition:r.labelAlign===`left`?`left`:`top`,labelWidth:r.labelWidth??80,columns:r.columns??12,layout:r.layout,submit:r.submit,id:e.id,version:e.version},children:n}]}function Jc(e){return qc(e).map(e=>Yc(e))}function Yc(e){let t=e;return!t||typeof t!=`object`||Array.isArray(t.children)&&(t.children=t.children.map(e=>Xc(e))),e}function Xc(e){if(!e||typeof e!=`object`||(Array.isArray(e.children)&&(e.children=e.children.map(e=>Xc(e))),e.$formkit===`group`||e.$formkit===`form`||e.$formkit===`list`)||e.$formkit===`submit`||e.$formkit===`reset`)return e;let t=Array.isArray(e.children)&&e.children.length>0;if(!(typeof e.$cmp==`string`&&e.$cmp!==``||typeof e.$el==`string`&&t))return e;let n=e.props?.name??e.name,r={...e};r.props&&r.props.name&&delete r.props.name,delete r.name;let i=r.outerClass;delete r.outerClass;let a={$formkit:`group`,children:[r],outerClass:[i||`col-span-12`,`!border-0`,`!p-0`,`!m-0`,`[&>.formkit-wrapper]:!border-0`,`[&>.formkit-wrapper]:!p-0`,`[&>.formkit-wrapper]:!m-0`,`[&>.formkit-wrapper>fieldset]:!border-0`,`[&>.formkit-wrapper>fieldset]:!p-0`,`[&>.formkit-wrapper>fieldset]:!m-0`].join(` `)};return typeof n==`string`&&n.trim()&&(a.name=n),a}function Zc(e,t){Dg();let n=e,r=t?.name??`form`,i=t?.id??ws(),a=2,o={layout:`vertical`};if(e.length===1){let t=e[0];t?.$formkit===`form`&&Array.isArray(t.children)&&(typeof t.name==`string`&&t.name.trim()&&(r=t.name),typeof t.props?.id==`string`&&t.props.id.trim()&&(i=t.props.id),Number.isFinite(Number(t.props?.version))&&(a=Number(t.props.version)),Object.assign(o,nl(t.props)),n=t.children)}let s=e=>{for(let t of kc())if(t.match?.(e)){if(t.fromSchema){let n=t.fromSchema(e,{children:e=>Array.isArray(e)?e.map(s):[]});if(n)return n}break}return rl(e)};return{version:a,id:i,name:r,root:{id:`root`,category:`container`,type:`group`,renderAs:`formkit`,dataType:`object`,children:n.map(s)},settings:o}}function Qc(e){Dg();let t=e=>{for(let n of kc())if(n.match?.(e)){if(n.fromSchema){let r=n.fromSchema(e,{children:e=>Array.isArray(e)?e.map(t):[]});if(r)return r}break}return rl(e)};return t(e)}function $c(e){let t=e;if(typeof t?.__key==`string`&&t.__key)return t.__key;if(typeof t?.id==`string`&&t.id)return t.id}function el(e){let t=e,n=Array.isArray(t?.children)?t.children:t?.props?.modelValue;return Array.isArray(n)?n:[]}function tl(e,t,n){let r=new Map,i=e=>{for(let t of e){t.key&&r.set(t.key,t),t.id&&r.set(t.id,t);let e=t.children;Array.isArray(e)&&i(e)}};i(e);let a=new Map,o=e=>{for(let t of e){let e=$c(t);e&&a.set(e,t);let n=el(t);n.length&&o(n)}};o(t);let s=(e,t)=>t.map(e=>{let t=$c(e),n=r.get(t);if(!t)return Qc(e);n=r.get(t);let i=a.get(t);if(n&&i&&JSON.stringify(i)===JSON.stringify(e))return n;let o=Qc(e);if(!n)return o;let c={...o};if(c.id=n.id,c.key=n.key,n.category===`container`||n.category===`layout`){let t=n.children,r=el(e);i&&JSON.stringify(el(i))===JSON.stringify(r)?c.children=t:c.children=s(t,r)}return c});return s(e,n)}function nl(e){let t=e??{},n={};return(t.labelPosition===`left`||t.labelPosition===`top`)&&(n.labelAlign=t.labelPosition),Number.isFinite(Number(t.labelWidth))&&(n.labelWidth=Number(t.labelWidth)),Number.isFinite(Number(t.columns))&&(n.columns=Number(t.columns)),(t.layout===`horizontal`||t.layout===`inline`)&&(n.layout=t.layout),typeof t.submit==`string`&&t.submit&&(n.submit=t.submit),n}function rl(e){let t=e,n=t.$formkit?`field`:t.$cmp?`container`:`layout`,r={id:typeof t.id==`string`&&t.id?t.id:ws(),category:n,type:t.$formkit??t.$cmp??t.$el??`unknown`,meta:{rawSchema:e}};return typeof t.label==`string`&&t.label&&(r.label=t.label),(n===`container`||n===`layout`)&&(r.children=Array.isArray(t.children)?t.children.map(rl):[]),r}var il=a((()=>{Kc(),ks(),Vc(),kg(),Dg()})),al=a((()=>{Kc(),il(),Vc(),kg(),Bs(),qs(),Ec()}));function ol(e,t,n){let r=t?.name??n?.name??ll,i=t?.settings??n?.settings??ul;return[{$formkit:`form`,name:r,props:{labelPosition:i.labelAlign===`left`?`left`:`top`,labelWidth:i.labelWidth??80},children:e}]}function sl(e){let n=(0,t.ref)(e??Zc(ol(cl,{name:ll,settings:ul})));return{formDefinition:n,formSchema:(0,t.computed)(()=>{let e=qc(n.value)[0]?.children;return Array.isArray(e)?e:[]}),commitSchemaChildren:(e,t)=>Zc(ol(e,t,n.value),{id:n.value?.id})}}var cl,ll,ul,dl,fl,pl,ml,hl=a((()=>{al(),cl=[{$formkit:`submit`,type:`submit`,name:`submit_button`,label:`Submit`,__key:`submit_default`}],ll=`form`,ul={layout:`vertical`,labelWidth:80,labelAlign:`top`},dl=sl(),{formDefinition:fl,formSchema:pl,commitSchemaChildren:ml}=dl}));function gl(){return{selectedIndex:(0,t.ref)(0),selectedKey:(0,t.ref)(null),selectedTarget:(0,t.ref)(`form`)}}var _l,vl,yl,bl,xl=a((()=>{hl(),_l=gl(),{selectedIndex:vl,selectedKey:yl,selectedTarget:bl}=_l}));function Sl(){return{canvasView:(0,t.ref)(`desktop`),isLoading:(0,t.ref)(!1)}}var Cl,wl,Tl,El=a((()=>{Cl=Sl(),{canvasView:wl,isLoading:Tl}=Cl}));function Dl(e){try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}}function Ol(e){return Array.isArray(e?.root?.children)?e.root.children:[]}function kl(e){let t=e=>{for(let n of e){if(!n||typeof n!=`object`)continue;(typeof n.__key!=`string`||!n.__key)&&(n.__key=ws()),typeof n.valueExpression==`string`&&typeof n.__raw__valueExpression!=`string`&&(n.__raw__valueExpression=n.valueExpression),typeof n.if==`string`&&typeof n.__raw__ifExpression!=`string`&&(n.__raw__ifExpression=n.if),`valueExpression`in n&&delete n.valueExpression;let e=n.bind;e&&typeof e!=`string`?(typeof e==`object`&&!Array.isArray(e)&&typeof n.__bind!=`object`&&(n.__bind=e),delete n.bind):typeof e==`string`&&(e===`$someAttributes`||e.startsWith(`$bind_`))&&delete n.bind,Array.isArray(n.children)&&t(n.children)}};t(e)}function Al(e){let{formDefinition:n,formSchema:r,selectedIndex:i,selectedKey:a,commitSchemaChildren:o}=e,s=(0,t.ref)([]),c=(0,t.ref)([]),l=(0,t.ref)(null),u=(0,t.computed)(()=>s.value.length>0),d=(0,t.computed)(()=>c.value.length>0);function f(e){let t=Ol(e).length;if(t<=0){i.value=0,a.value=null;return}i.value>t-1&&(i.value=t-1)}function p(e){let t=a.value;if(n.value=e,t){let n=Uc(Ol(e),t);n?(i.value=n.rootIndex,a.value=t):a.value=null}f(e)}function m(e,t){let r=Date.now(),i=n.value;if(i===e)return;let a=l.value;t?.merge===!0&&a?.reason===t?.reason&&a&&r-a.at<=Ml&&s.value.length>0||(s.value.push(Dl(i)),s.value.length>jl&&s.value.splice(0,s.value.length-jl)),c.value=[],l.value={at:r,reason:t?.reason},p(e)}function h(e,t){let r=Dl(e);kl(r),m(o(r,t?.name||t?.settings?{name:t.name??n.value?.name??`form`,settings:t.settings??n.value?.settings}:void 0),t)}function g(e,t){let i=Dl(e);kl(i);let a=n.value,o=(()=>{try{return qc(a)[0]?.children??[]}catch{return r.value}})(),s=tl(Ol(a),o,i);m({...a,root:{...a.root,children:s}},t)}function _(){let e=s.value.pop();e&&(c.value.unshift(Dl(n.value)),c.value.length>jl&&c.value.splice(jl),l.value=null,p(Dl(e)))}function v(){let e=c.value.shift();e&&(s.value.push(Dl(n.value)),s.value.length>jl&&s.value.splice(0,s.value.length-jl),l.value=null,p(Dl(e)))}function y(){s.value=[],c.value=[],l.value=null}function b(e,t){p(e),t?.resetHistory!==!1&&y()}return{canUndo:u,canRedo:d,commitFormDefinition:m,commitSchema:h,commitSchemaReconcile:g,undo:_,redo:v,resetHistory:y,setFormDefinition:b}}var jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul=a((()=>{hl(),xl(),al(),ks(),Gc(),jl=100,Ml=500,Nl=Al({formDefinition:dl.formDefinition,formSchema:dl.formSchema,selectedIndex:_l.selectedIndex,selectedKey:_l.selectedKey,commitSchemaChildren:dl.commitSchemaChildren}),{canUndo:Pl,canRedo:Fl,commitFormDefinition:Il,commitSchema:Ll,commitSchemaReconcile:Rl,undo:zl,redo:Bl,resetHistory:Vl,setFormDefinition:Hl}=Nl}));function Wl(){return`fbb-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Gl(){let e=sl(),t=gl(),n=Sl(),r=Al({...e,...t});return{...e,...t,...n,...r,instanceId:Wl()}}function Kl(e){let n=sl(e),r=()=>{},i=e=>{},a=(0,t.computed)(()=>!1);return{...n,selectedIndex:(0,t.ref)(0),selectedKey:(0,t.ref)(null),selectedTarget:(0,t.ref)(`form`),canvasView:(0,t.ref)(`desktop`),isLoading:(0,t.ref)(!1),commitFormDefinition:i,commitSchema:i,commitSchemaReconcile:i,undo:r,redo:r,resetHistory:r,setFormDefinition:i,canUndo:a,canRedo:a,instanceId:`renderer-${Date.now()}`}}function ql(e=Gl()){return(0,t.provide)(Yl,e),e}function Jl(){return(0,t.inject)(Yl,Xl)}var Yl,Xl,Zl=a((()=>{hl(),xl(),El(),Ul(),Yl=Symbol(`formBuilderState`),Xl=Gl()}));function j(){let e=Jl(),{formDefinition:n,selectedIndex:r,selectedKey:i,selectedTarget:a}=e,{commitFormDefinition:o}=e,s=(0,t.computed)(()=>{let e=n.value?.root?.children;if(!Array.isArray(e))return;let t=i.value;return t?Uc(e,t)?.node:e[r.value]}),c=e=>{let t=e.trim().replace(/[^a-zA-Z0-9_]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``);return t?(/^\d/.test(t)&&(t=`field_${t}`),t):``},l=e=>{let t=n.value,a=Array.isArray(t?.root?.children)?t.root.children:[];if(!a.length)return;let s=Math.max(0,Math.min(r.value,a.length-1)),c=i.value??a[s]?.key??a[s]?.id,l=c?Uc(a,c)?.node??a[s]:a[s];if(!l)return;let u=e({...l});u.id=l.id;let d=c?Wc(a,c,u).nodes:a.map((e,t)=>t===s?u:e);o({...t,root:{...t.root,children:d}},{reason:`field-edit`,merge:!0})},u=(e,t)=>{l(n=>{let r=n;return t===void 0?delete r[e]:r[e]=t,n})},d=(e,t)=>{l(n=>{let r={...n.props};return t===void 0?delete r[e]:r[e]=t,n.props=Object.keys(r).length?r:void 0,n})},f=(e,n)=>(0,t.computed)({get:()=>s.value?.props?.[e]??n,set:t=>d(e,t)}),p=(e,n)=>(0,t.computed)({get:()=>s.value?.props?.[e]??n,set:t=>d(e,t)}),m=(0,t.computed)({get:()=>{let e=s.value?.validation;return Ws(e).validation??``},set:e=>{let t=e.trim();l(e=>{if(e.category!==`field`)return e;let n=e;if(t){let e=(vc(t)??[]).filter(e=>e.rule);n.validation=e.length?e:void 0}else n.validation=void 0;return e})}}),h=(0,t.computed)(()=>m.value?m.value.split(`|`).length:0),g=(e,n=!0)=>(0,t.computed)({get:()=>ue(e),set:t=>{ce(`${e}:${t}`,n)}}),_=e=>(0,t.computed)({get:()=>(s.value?.validation)?.find(t=>t.rule===e)?.message??``,set:t=>{l(n=>{if(n.category!==`field`)return n;let r=n,i=[...r.validation??[]],a=i.findIndex(t=>t.rule===e),o=t.trim();if(a>=0){let e={...i[a]};o?e.message=o:delete e.message,i[a]=e}else o&&i.push({rule:e,message:o});return r.validation=i.length?i:void 0,n})}}),v=(0,t.computed)({get:()=>s.value?.name||``,set:e=>{u(`name`,c(e)||void 0)}}),y=(0,t.computed)({get:()=>s.value?.label||``,set:e=>{l(t=>{let n=e.trim();return n?t.label=n:delete t.label,t})}}),b=(0,t.computed)({get:()=>{let e=s.value?.props?.help;return typeof e==`string`?e:``},set:e=>d(`help`,e.trim()||void 0)}),x=(0,t.computed)({get:()=>{let e=s.value?.props?.placeholder;return typeof e==`string`?e:``},set:e=>d(`placeholder`,e.trim()||void 0)}),S=(0,t.computed)({get:()=>{let e=s.value,t=e?.props?.buttonText??e?.props?.text??e?.label;return typeof t==`string`?t:``},set:e=>{d(`buttonText`,e.trim()||void 0)}}),C=(0,t.computed)({get:()=>{let e=s.value?.props?.buttonType??`default`;return typeof e==`string`?e:``},set:e=>{d(`buttonType`,e.trim()||void 0)}}),w=(0,t.computed)({get:()=>{let e=s.value;if(!e)return``;let t=e.value;if(Vs(t))return``;if(t!=null)return String(t);let n=e.props?.value??e.props?.text;return n==null?``:String(n)},set:e=>{l(t=>{if(t.category===`field`)t.value=e===``?void 0:e;else{let n={...t.props},r=`value`in n||!(`text`in n)?`value`:`text`;e===``?delete n[r]:n[r]=e,t.props=Object.keys(n).length?n:void 0}return t})}}),ee=(0,t.computed)({get:()=>Vs(s.value?.value),set:e=>{l(t=>{if(t.category!==`field`)return t;let n=t;if(e){if(!Vs(n.value)){let e=n.value;n.value={$expr:bc((e==null?``:String(e))||`$`)}}}else Vs(n.value)&&(n.value=void 0);return t})}}),te=(0,t.computed)({get:()=>{let e=s.value?.value;return Vs(e)?Hs(e.$expr,`var`):``},set:e=>{l(t=>{if(t.category!==`field`)return t;let n=t;return e.trim()?n.value={$expr:bc(e)}:n.value=void 0,t})}}),T=(0,t.computed)({get:()=>{let e=s.value?.visibleIf;return e?Hs(e,`var`):``},set:e=>{let t=e.trim();u(`visibleIf`,t?bc(t):void 0)}}),ne=(0,t.computed)({get:()=>{let e=s.value?.props?.number;return typeof e==`string`?e:`integer`},set:e=>{l(t=>{let n={...t.props};return n.number=e,n.step=e===`integer`?`1`:`0.1`,t.props=Object.keys(n).length?n:void 0,t})}}),re=(0,t.computed)({get:()=>{let e=s.value?.props?.multiple;return typeof e==`string`?e:`false`},set:e=>d(`multiple`,e)}),ie=(0,t.computed)({get:()=>s.value?.props?.min,set:e=>d(`min`,e)}),ae=(0,t.computed)({get:()=>s.value?.props?.max,set:e=>d(`max`,e)}),oe=(0,t.computed)({get:()=>{let e=s.value,t=e?.options??e?.props?.options;return Array.isArray(t)?t:[]},set:e=>{l(t=>{if(t.category===`field`)t.options=e;else{let n={...t.props};n.options=e,t.props=Object.keys(n).length?n:void 0}return t})}}),se=(0,t.computed)({get:()=>{let e=s.value;return e?.options??e?.props?.options??[]},set:e=>{l(t=>{if(t.category===`field`)t.options=e;else{let n={...t.props};n.options=e,t.props=Object.keys(n).length?n:void 0}return t})}}),ce=(e,t=!0)=>{let n=m.value.split(`|`).filter(Boolean),r;if(e.includes(`:`)){let[i,a]=e.split(`:`);if(n.includes(e)&&!t)r=n.filter(t=>t!==e);else{let t=n.findIndex(e=>e.startsWith(`${i}:`));r=t===-1?[...n,e]:[...n.slice(0,t),`${i}:${a}`,...n.slice(t+1)]}m.value=r.join(`|`);return}else{r=n.includes(e)?n.filter(t=>t!==e):[...n,e],m.value=r.join(`|`);return}},le=(e,n)=>(0,t.computed)(()=>e(n)),ue=e=>{if(!m.value)return``;let t=m.value.split(`|`).find(t=>t.startsWith(`${e}`));return t?t.replace(`${e}:`,``):``},de=(0,t.computed)(()=>a.value===`form`),fe=(0,t.computed)(()=>de.value||!!s.value),pe=e=>{if(!fe.value)return!1;let t=s.value?.validation;return t?.length?t.some(t=>t.rule===e):!1},me=(0,t.computed)(()=>{if(!fe.value)return null;if(de.value)return`form`;let e=s.value;return e?e.type:null}),he=(0,t.computed)({get:()=>n.value?.name??`form`,set:e=>{let t=e.trim(),r=n.value;o({...r,name:t||`form`},{reason:`form-name`,merge:!0})}}),ge=(0,t.computed)({get:()=>n.value?.id??`form`,set:e=>{let t=e.trim(),r=n.value;o({...r,id:t||`form`},{reason:`form-id`,merge:!0})}}),_e=(0,t.computed)({get:()=>n.value?.version??2,set:e=>{let t=Number(e),r=Number.isFinite(t)&&t>0?Math.round(t):2,i=n.value;o({...i,version:r},{reason:`form-version`,merge:!0})}}),ve=(0,t.computed)({get:()=>n.value?.settings?.labelAlign===`left`?`left`:`top`,set:e=>{let t=n.value;o({...t,settings:{...t.settings,labelAlign:e}},{reason:`form-label-position`,merge:!0})}}),ye=(0,t.computed)({get:()=>n.value?.settings?.labelWidth??80,set:e=>{let t=Number(e),r=Number.isFinite(t)?Math.max(0,Math.min(2e3,Math.round(t))):120,i=n.value;o({...i,settings:{...i.settings,labelWidth:r}},{reason:`form-label-width`,merge:!0})}}),be=(0,t.computed)({get:()=>n.value?.settings?.submit??``,set:e=>{let t=n.value;o({...t,settings:{...t.settings,submit:e}},{reason:`form-submit`,merge:!0})}});return{selectedField:s,fieldName:v,useExpressionValue:ee,valueExpression:te,ifExpression:T,label:y,buttonText:S,buttonType:C,placeholder:x,fieldValue:w,updateValidationString:ce,isActive:le,createValidationValue:g,createValidationMessageValue:_,validationStringLength:h,currentFieldType:me,availableFieldNames:(0,t.computed)(()=>{let e=new Set,t=n=>{for(let r of n){r.name&&typeof r.name==`string`&&e.add(r.name);let n=r.children;Array.isArray(n)&&t(n)}};return t(n.value?.root?.children??[]),Array.from(e)}),hasField:fe,selectedIsForm:de,formName:he,formId:ge,formVersion:_e,formLabelPosition:ve,formLabelWidth:ye,formSubmit:be,help:b,whichNumber:ne,validationString:m,numOfFiles:re,modelValue:oe,optionsRaw:se,min:ie,max:ae,isValidationChecked:pe,createButtonProp:p,createPropsProp:f,rowSpan:(0,t.computed)({get:()=>s.value?.layout?.rowspan??1,set:e=>{let t=Math.max(1,Math.min(6,Math.round(e)));l(e=>{let n={...e.layout};t>1?n.rowspan=t:delete n.rowspan,e.layout=Object.keys(n).length?n:void 0;let r=typeof e.outerClass==`string`?e.outerClass:``;return r=t>1?/\brow-span-\d+\b/.test(r)?r.replace(/\brow-span-\d+\b/g,`row-span-${t}`):`${r} row-span-${t}`.replace(/\s+/g,` `).trim():r.replace(/\brow-span-\d+\b/g,``).replace(/\s+/g,` `).trim(),r?e.outerClass=r:delete e.outerClass,e})}}),colSpan:(0,t.computed)({get:()=>s.value?.layout?.colspan??12,set:e=>{let t=Math.max(1,Math.min(12,Math.round(e)));l(e=>{let n={...e.layout};t<12?n.colspan=t:delete n.colspan,e.layout=Object.keys(n).length?n:void 0;let r=typeof e.outerClass==`string`?e.outerClass:``;return r=t<12?/\bcol-span-\d+\b/.test(r)?r.replace(/\bcol-span-\d+\b/g,`col-span-${t}`):`${r} col-span-${t}`.replace(/\s+/g,` `).trim():r.replace(/\bcol-span-\d+\b/g,``).replace(/\s+/g,` `).trim(),r?e.outerClass=r:delete e.outerClass,e})}}),bindEvents:(0,t.computed)({get:()=>{let e=s.value?.props?.__bind;return e&&typeof e==`object`?e:{}},set:e=>{d(`__bind`,e&&typeof e==`object`&&Object.keys(e).length>0?e:void 0)}})}}function Ql(){let e=Jl();return{formDefinition:(0,t.computed)(()=>e.formDefinition.value),formName:(0,t.computed)(()=>e.formDefinition.value?.name??`form`),formId:(0,t.computed)(()=>e.formDefinition.value?.id??`form`),formVersion:(0,t.computed)(()=>e.formDefinition.value?.version??2),formLabelPosition:(0,t.computed)(()=>e.formDefinition.value?.settings?.labelAlign===`left`?`left`:`top`),formLabelWidth:(0,t.computed)(()=>e.formDefinition.value?.settings?.labelWidth??80),formSubmit:(0,t.computed)(()=>e.formDefinition.value?.settings?.submit??``),formLayout:(0,t.computed)(()=>e.formDefinition.value?.settings?.layout??`vertical`),formColumns:(0,t.computed)(()=>e.formDefinition.value?.settings?.columns??12),formFullWidth:(0,t.computed)(()=>e.formDefinition.value?.settings?.fullWidth??!1),formRoot:(0,t.computed)(()=>e.formDefinition.value?.root),formSettings:(0,t.computed)(()=>e.formDefinition.value?.settings),formMeta:(0,t.computed)(()=>e.formDefinition.value?.meta)}}var M=a((()=>{Gc(),al(),qs(),Zl(),Kc()}));function $l(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$l(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function eu(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$l(e))&&(r&&(r+=` `),r+=t);return r}var tu=a((()=>{}));function nu(...e){return eu(e)}function ru(e,t){return e.source===t.source&&e.flags.split(``).sort().join(``)===t.flags.split(``).sort().join(``)}function iu(e){e.preventDefault()}function au(e){return{x:e.clientX,y:e.clientY}}function ou(e,t,n=!0,r=[`__key`]){if(e===t)return!0;if(typeof t==`object`&&typeof e==`object`&&e&&t!==null){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return ru(e,t);let i=e,a=t;if(Object.keys(i).length!==Object.keys(a).length)return!1;for(let e of r)if((e in i||e in a)&&i[e]!==a[e])return!1;for(let e in i)if(!(e in a)||i[e]!==a[e]&&!n||n&&!ou(i[e],a[e],n,r))return!1;return!0}return!1}var su,cu=a((()=>{tu(),su=e=>{let t=e.split(`,`);return[t[0]||``,t[1]||``]}})),lu,uu=a((()=>{cu(),lu=(0,t.defineComponent)({__name:`EditsLayout`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let n=e;return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`flex flex-col gap-1`,n.class))},[(0,t.renderSlot)(e.$slots,`default`)],2))}})})),du,fu=a((()=>{uu(),uu(),du=lu})),pu,mu,hu,gu=a((()=>{cu(),fu(),pu={for:`myInput`,class:`text-xs font-medium tracking-wide text-foreground/80 block mb-1`},mu={key:0,class:`text-[11px] text-destructive leading-tight`},hu=(0,t.defineComponent)({__name:`TextInput`,props:{class:{type:[Boolean,null,String,Object,Array]},value:{},placeholder:{},label:{},error:{}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,pu,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NInput),{id:`myInput`,value:i.value,"onUpdate:value":r[0]||=e=>a(`update:value`,e),placeholder:i.placeholder,class:(0,t.normalizeClass)((0,t.unref)(nu)(`h-8 rounded-md text-xs`,i.class))},null,8,[`value`,`placeholder`,`class`]),i.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mu,(0,t.toDisplayString)(i.error),1)):(0,t.createCommentVNode)(``,!0)]),_:1}))}})})),N,_u=a((()=>{gu(),gu(),N=hu})),vu,yu=a((()=>{M(),A(),_u(),vu=(0,t.defineComponent)({__name:`LabelHelpSection`,setup(e){let{label:n,help:r}=j(),{t:i}=k();return(e,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(N,{label:`Label`,placeholder:(0,t.unref)(i)(`edits.placeholder.label`),value:(0,t.unref)(n),"onUpdate:value":a[0]||=e=>n.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)(N,{label:`Help Text`,placeholder:(0,t.unref)(i)(`edits.placeholder.help`),value:(0,t.unref)(r),"onUpdate:value":a[1]||=e=>r.value=e},null,8,[`placeholder`,`value`])],64))}})})),bu,xu=a((()=>{yu(),yu(),bu=vu})),Su,Cu=a((()=>{M(),A(),_u(),Su=(0,t.defineComponent)({__name:`PlaceholderSection`,setup(e){let{placeholder:n}=j(),{t:r}=k();return(e,i)=>((0,t.openBlock)(),(0,t.createBlock)(N,{label:`Placeholder`,placeholder:(0,t.unref)(r)(`edits.placeholder.placeholder`),value:(0,t.unref)(n),"onUpdate:value":i[0]||=e=>n.value=e},null,8,[`placeholder`,`value`]))}})})),wu,Tu=a((()=>{Cu(),Cu(),wu=Su})),Eu,Du,Ou=a((()=>{cu(),fu(),Eu={class:`text-xs font-medium tracking-wide text-foreground/80 block mb-1`},Du=(0,t.defineComponent)({__name:`NumberInput`,props:{class:{type:[Boolean,null,String,Object,Array]},value:{},placeholder:{},label:{}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,{class:(0,t.normalizeClass)((0,t.unref)(nu)(i.class))},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,Eu,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NInputNumber),{size:`small`,value:i.value,placeholder:i.placeholder,"onUpdate:value":r[0]||=e=>a(`update:value`,e)},null,8,[`value`,`placeholder`])]),_:1},8,[`class`]))}})})),ku,Au=a((()=>{Ou(),Ou(),ku=Du})),ju,Mu,Nu=a((()=>{fu(),ju={class:`text-xs font-medium tracking-wide text-foreground/80 block mb-1`},Mu=(0,t.defineComponent)({__name:`SelectInput`,props:{value:{},label:{},options:{}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,ju,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NSelect),{size:`small`,value:i.value,options:i.options,"onUpdate:value":r[0]||=e=>{e!==null&&a(`update:value`,e)}},null,8,[`value`,`options`])]),_:1}))}})})),Pu,Fu=a((()=>{Nu(),Nu(),Pu=Mu})),Iu,Lu,Ru=a((()=>{cu(),Iu={class:`text-xs text-foreground/80 font-medium`},Lu=(0,t.defineComponent)({__name:`SwitchInput`,props:{class:{type:[Boolean,null,String,Object,Array]},label:{},value:{type:Boolean}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r;function o(e){a(`update:value`,e)}return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`flex flex-row gap-2 items-center justify-between py-1`,i.class))},[(0,t.createElementVNode)(`label`,Iu,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NSwitch),{size:`small`,value:i.value,"onUpdate:value":o},null,8,[`value`])],2))}})})),P,zu=a((()=>{Ru(),Ru(),P=Lu})),Bu,Vu=a((()=>{M(),Au(),Fu(),zu(),Bu=(0,t.defineComponent)({__name:`NaiveBasicSection`,props:{size:{type:Boolean},disabled:{type:Boolean},clearable:{type:Boolean},bordered:{type:Boolean},readonly:{type:Boolean},round:{type:Boolean},autofocus:{type:Boolean},showCount:{type:Boolean},showPasswordOn:{type:Boolean},maxlength:{type:Boolean},minlength:{type:Boolean}},setup(e){let n=e,{createPropsProp:r}=j(),i=r(`size`,`medium`),a=r(`disabled`,!1),o=r(`clearable`,!0),s=r(`bordered`,!0),c=r(`readonly`,!1),l=r(`round`,!1),u=r(`autofocus`,!1),d=r(`showCount`,!1),f=r(`showPasswordOn`,`click`),p=r(`maxlength`,null),m=r(`minlength`,null);return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[n.size?((0,t.openBlock)(),(0,t.createBlock)(Pu,{key:0,label:`size`,value:(0,t.unref)(i),options:[{label:`tiny`,value:`tiny`},{label:`small`,value:`small`},{label:`medium`,value:`medium`},{label:`large`,value:`large`}],"onUpdate:value":r[0]||=e=>i.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.disabled?((0,t.openBlock)(),(0,t.createBlock)(P,{key:1,label:`disabled`,value:(0,t.unref)(a),"onUpdate:value":r[1]||=e=>a.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.clearable?((0,t.openBlock)(),(0,t.createBlock)(P,{key:2,label:`clearable`,value:(0,t.unref)(o),"onUpdate:value":r[2]||=e=>o.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.bordered?((0,t.openBlock)(),(0,t.createBlock)(P,{key:3,label:`bordered`,value:(0,t.unref)(s),"onUpdate:value":r[3]||=e=>s.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.readonly?((0,t.openBlock)(),(0,t.createBlock)(P,{key:4,label:`readonly`,value:(0,t.unref)(c),"onUpdate:value":r[4]||=e=>c.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.round?((0,t.openBlock)(),(0,t.createBlock)(P,{key:5,label:`round`,value:(0,t.unref)(l),"onUpdate:value":r[5]||=e=>l.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.autofocus?((0,t.openBlock)(),(0,t.createBlock)(P,{key:6,label:`autofocus`,value:(0,t.unref)(u),"onUpdate:value":r[6]||=e=>u.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.showCount?((0,t.openBlock)(),(0,t.createBlock)(P,{key:7,label:`showCount`,value:(0,t.unref)(d),"onUpdate:value":r[7]||=e=>d.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.showPasswordOn?((0,t.openBlock)(),(0,t.createBlock)(Pu,{key:8,label:`show-password-on`,value:(0,t.unref)(f),options:[{label:`click`,value:`click`},{label:`mousedown`,value:`mousedown`}],"onUpdate:value":r[8]||=e=>f.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.maxlength?((0,t.openBlock)(),(0,t.createBlock)(ku,{key:9,label:`maxlength`,placeholder:`null`,value:(0,t.unref)(p),"onUpdate:value":r[9]||=e=>p.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),n.minlength?((0,t.openBlock)(),(0,t.createBlock)(ku,{key:10,label:`minlength`,placeholder:`null`,value:(0,t.unref)(m),"onUpdate:value":r[10]||=e=>m.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0)],64))}})})),Hu,Uu=a((()=>{Vu(),Vu(),Hu=Bu})),Wu,Gu=a((()=>{M(),A(),_u(),Wu=(0,t.defineComponent)({__name:`PrefixSuffixSection`,setup(e){let{createPropsProp:n}=j(),{t:r}=k(),i=n(`prefix`,``),a=n(`suffix`,``);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(N,{label:`prefix`,placeholder:(0,t.unref)(r)(`edits.placeholder.prefix`),value:(0,t.unref)(i),"onUpdate:value":n[0]||=e=>i.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)(N,{label:`suffix`,placeholder:(0,t.unref)(r)(`edits.placeholder.suffix`),value:(0,t.unref)(a),"onUpdate:value":n[1]||=e=>a.value=e},null,8,[`placeholder`,`value`])],64))}})})),Ku,qu=a((()=>{Gu(),Gu(),Ku=Wu})),Ju,Yu=a((()=>{A(),M(),zu(),_u(),Ju=(0,t.defineComponent)({__name:`PairSection`,setup(e){let{t:n}=k(),{createPropsProp:r}=j(),i=r(`pair`,!1),a=r(`separator`,`-`),o=(0,t.computed)(()=>!!i.value);return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(P,{label:(0,t.unref)(n)(`edits.pair.label`),value:(0,t.unref)(i),"onUpdate:value":r[0]||=e=>i.value=e},null,8,[`label`,`value`]),o.value?((0,t.openBlock)(),(0,t.createBlock)(N,{key:0,label:(0,t.unref)(n)(`edits.pair.separatorLabel`),placeholder:(0,t.unref)(n)(`edits.pair.separatorPlaceholder`),value:(0,t.unref)(a),"onUpdate:value":r[1]||=e=>a.value=e},null,8,[`label`,`placeholder`,`value`])):(0,t.createCommentVNode)(``,!0)],64))}})})),Xu,Zu=a((()=>{Yu(),Yu(),Xu=Ju})),Qu,$u=a((()=>{xu(),Tu(),Uu(),qu(),Zu(),Qu=(0,t.defineComponent)({__name:`TextLikeEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(Ku),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0,bordered:!0,readonly:!0,round:!0,autofocus:!0,"show-count":!0,maxlength:!0,minlength:!0}),(0,t.createVNode)(Xu)],64))}})})),ed=o({default:()=>td}),td,nd=a((()=>{$u(),$u(),td=Qu})),rd,id,ad=a((()=>{fu(),rd={for:`tgroup`,class:`text-xs text-foreground/80`},id=(0,t.defineComponent)({__name:`ToggleInput`,props:{value:{},label:{},itemLabelOne:{},itemLabelTwo:{},valueOne:{},valueTwo:{},type:{}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.computed)({get:()=>i.value,set:e=>{a(`update:value`,e)}});return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,rd,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NRadioGroup),{id:`tgroup`,value:o.value,"onUpdate:value":r[0]||=e=>o.value=e,size:`small`,name:`tgroup`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NRadioButton),{value:i.valueOne},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i.itemLabelOne),1)]),_:1},8,[`value`]),(0,t.createVNode)((0,t.unref)(n.NRadioButton),{value:i.valueTwo},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i.itemLabelTwo),1)]),_:1},8,[`value`])]),_:1},8,[`value`])]),_:1}))}})})),od,sd=a((()=>{ad(),ad(),od=id})),cd,ld=a((()=>{M(),xu(),Tu(),Uu(),sd(),cd=(0,t.defineComponent)({__name:`NumberEditor`,setup(e){let{whichNumber:n}=j();return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(od,{label:``,"item-label-one":`Decimal`,"item-label-two":`Integer`,"value-one":`float`,"value-two":`integer`,type:`single`,value:(0,t.unref)(n),"onUpdate:value":r[0]||=e=>n.value=e},null,8,[`value`]),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),ud=o({default:()=>dd}),dd,fd=a((()=>{ld(),ld(),dd=cd}));function pd(e){e&&(_d=e)}function md(e){(0,t.provide)(gd,e)}function hd(){return(0,t.inject)(gd,_d)}var gd,_d,vd=a((()=>{gd=Symbol(`configKey`),_d={}}));function yd(e){if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;if(typeof t.code==`string`&&t.code)return{code:t.code,label:typeof t.label==`string`?t.label:void 0};if(typeof t.endpoint==`string`&&t.endpoint)return{code:t.endpoint}}return null}function bd(){let e=hd();return{fetchDictionary:e.fetchDictionary,fetchDictionaryPage:e.fetchDictionaryPage,fetchTreeDictionary:e.fetchTreeDictionary,fetchTreeDictionaryPage:e.fetchTreeDictionaryPage}}var xd=a((()=>{vd()})),Sd,Cd,wd,Td=a((()=>{cu(),fu(),Sd={class:`text-xs font-medium tracking-wide text-foreground/80 block mb-1`},Cd={key:0,class:`text-[11px] text-destructive leading-tight`},wd=(0,t.defineComponent)({__name:`JsonTextarea`,props:{class:{type:[Boolean,null,String,Object,Array]},value:{},placeholder:{},label:{},error:{}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,Sd,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NInput),{value:i.value,"onUpdate:value":r[0]||=e=>a(`update:value`,e),placeholder:i.placeholder,type:`textarea`,autosize:{minRows:6,maxRows:14},class:(0,t.normalizeClass)((0,t.unref)(nu)(`rounded-md text-xs font-mono`,i.class))},null,8,[`value`,`placeholder`,`class`]),i.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cd,(0,t.toDisplayString)(i.error),1)):(0,t.createCommentVNode)(``,!0)]),_:1}))}})})),Ed,Dd=a((()=>{Td(),Td(),Ed=wd})),Od,kd,Ad,jd,Md,Nd=a((()=>{xd(),A(),Od={class:`flex flex-col gap-3`},kd={class:`flex flex-row gap-2 items-center`},Ad={class:`flex justify-end`},jd={class:`flex justify-end`},Md=(0,t.defineComponent)({__name:`DictionaryPickerModal`,props:{show:{type:Boolean}},emits:[`update:show`,`select`],setup(e,{emit:r}){let i=e,a=r,{fetchDictionaryPage:o}=bd(),{t:s}=k(),c=(0,t.computed)(()=>typeof o==`function`),l=(0,t.ref)(``),u=(0,t.ref)(``),d=(0,t.ref)([]),f=(0,t.ref)(0),p=(0,t.ref)(1),m=(0,t.ref)(10),h=(0,t.ref)(!1),g=[{title:()=>s(`edits.optionsSource.dictCode`),key:`code`,minWidth:140},{title:()=>s(`edits.optionsSource.dictLabel`),key:`label`,minWidth:200},{title:()=>s(`edits.optionsSource.dictAction`),key:`actions`,width:72,render:e=>(0,t.h)(n.NButton,{size:`tiny`,type:`primary`,secondary:!0,onClick:()=>b(e)},{default:()=>s(`edits.optionsSource.dictChoose`)})}];async function _(){if(o){h.value=!0;try{let e=await o({code:l.value.trim()||void 0,label:u.value.trim()||void 0,pageNum:p.value,pageSize:m.value});d.value=e?.data??[],f.value=e?.total??0}catch{d.value=[],f.value=0}finally{h.value=!1}}}function v(e){p.value=e,_()}function y(e){m.value=e,p.value=1,_()}function b(e){a(`select`,e),a(`update:show`,!1)}return(0,t.watch)(()=>i.show,e=>{e&&(p.value=1,_())}),(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NModal),{show:i.show,preset:`card`,title:(0,t.unref)(s)(`edits.optionsSource.dictPickerTitle`),class:`!w-[560px]`,"onUpdate:show":r[4]||=e=>a(`update:show`,!!e)},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,jd,[(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,onClick:r[3]||=e=>a(`update:show`,!1)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.dictCancel`)),1)]),_:1})])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Od,[(0,t.createElementVNode)(`div`,kd,[(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,placeholder:(0,t.unref)(s)(`edits.optionsSource.dictCodePlaceholder`),value:l.value,"onUpdate:value":r[0]||=e=>l.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,placeholder:(0,t.unref)(s)(`edits.optionsSource.dictLabelPlaceholder`),value:u.value,"onUpdate:value":r[1]||=e=>u.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,loading:h.value,onClick:_},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.dictSearch`)),1)]),_:1},8,[`loading`])]),(0,t.createVNode)((0,t.unref)(n.NDataTable),{size:`small`,loading:h.value,columns:g,data:d.value,"max-height":320},{empty:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:c.value?(0,t.unref)(s)(`edits.optionsSource.dictEmpty`):(0,t.unref)(s)(`edits.optionsSource.dictProviderMissing`)},null,8,[`description`])]),_:1},8,[`loading`,`data`]),(0,t.createElementVNode)(`div`,Ad,[(0,t.createVNode)((0,t.unref)(n.NPagination),{page:p.value,"onUpdate:page":r[2]||=e=>p.value=e,"page-size":m.value,"item-count":f.value,"on-update:page":v,"on-update:page-size":y,"show-size-picker":!0,"page-sizes":[10,20,50],size:`small`},null,8,[`page`,`page-size`,`item-count`])])])]),_:1},8,[`show`,`title`]))}})})),Pd,Fd=a((()=>{Nd(),Nd(),Pd=Md})),Id,Ld,Rd,zd,Bd,Vd=a((()=>{A(),xd(),Id={class:`flex flex-col gap-3`},Ld={class:`flex flex-row gap-2 items-center`},Rd={class:`flex justify-end`},zd={class:`flex justify-end`},Bd=(0,t.defineComponent)({__name:`TreeDictionaryPickerModal`,props:{show:{type:Boolean}},emits:[`update:show`,`select`],setup(e,{emit:r}){let i=e,a=r,{fetchTreeDictionaryPage:o}=bd(),{t:s}=k(),c=(0,t.computed)(()=>typeof o==`function`),l=(0,t.ref)(``),u=(0,t.ref)(``),d=(0,t.ref)([]),f=(0,t.ref)(0),p=(0,t.ref)(1),m=(0,t.ref)(10),h=(0,t.ref)(!1),g=[{title:()=>s(`edits.optionsSource.dictCode`),key:`value`,minWidth:140},{title:()=>s(`edits.optionsSource.dictLabel`),key:`label`,minWidth:200},{title:()=>s(`edits.optionsSource.dictAction`),key:`actions`,width:72,render:e=>(0,t.h)(n.NButton,{size:`tiny`,type:`primary`,secondary:!0,onClick:()=>b(e)},{default:()=>s(`edits.optionsSource.dictChoose`)})}];async function _(){if(o){h.value=!0;try{let e=await o({value:l.value.trim()||void 0,label:u.value.trim()||void 0,pageNum:p.value,pageSize:m.value});d.value=e?.data??[],f.value=e?.total??0}catch{d.value=[],f.value=0}finally{h.value=!1}}}function v(e){p.value=e,_()}function y(e){m.value=e,p.value=1,_()}function b(e){a(`select`,e),a(`update:show`,!1)}return(0,t.watch)(()=>i.show,e=>{e&&(p.value=1,_())}),(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NModal),{show:i.show,preset:`card`,title:(0,t.unref)(s)(`edits.optionsSource.dictPickerTitle`),class:`!w-[560px]`,"onUpdate:show":r[4]||=e=>a(`update:show`,!!e)},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,zd,[(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,onClick:r[3]||=e=>a(`update:show`,!1)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.dictCancel`)),1)]),_:1})])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Id,[(0,t.createElementVNode)(`div`,Ld,[(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,placeholder:(0,t.unref)(s)(`edits.optionsSource.dictCodePlaceholder`),value:l.value,"onUpdate:value":r[0]||=e=>l.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,placeholder:(0,t.unref)(s)(`edits.optionsSource.dictLabelPlaceholder`),value:u.value,"onUpdate:value":r[1]||=e=>u.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,loading:h.value,onClick:_},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.dictSearch`)),1)]),_:1},8,[`loading`])]),(0,t.createVNode)((0,t.unref)(n.NDataTable),{size:`small`,loading:h.value,columns:g,data:d.value,"max-height":320},{empty:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:c.value?(0,t.unref)(s)(`edits.optionsSource.dictEmpty`):(0,t.unref)(s)(`edits.optionsSource.dictProviderMissing`)},null,8,[`description`])]),_:1},8,[`loading`,`data`]),(0,t.createElementVNode)(`div`,Rd,[(0,t.createVNode)((0,t.unref)(n.NPagination),{page:p.value,"onUpdate:page":r[2]||=e=>p.value=e,"page-size":m.value,"item-count":f.value,"on-update:page":v,"on-update:page-size":y,"show-size-picker":!0,"page-sizes":[10,20,50],size:`small`},null,8,[`page`,`page-size`,`item-count`])])])]),_:1},8,[`show`,`title`]))}})})),Hd,Ud=a((()=>{Vd(),Vd(),Hd=Bd})),Wd,Gd,Kd=a((()=>{fu(),Wd={for:`selectTags`,class:`text-[11px] text-foreground/80 font-medium`},Gd=(0,t.defineComponent)({__name:`TagsInput`,props:{value:{},label:{},placeholder:{}},emits:[`update:value`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.computed)({get:()=>i.value||[],set:e=>{a(`update:value`,e)}});return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,null,[(0,t.createElementVNode)(`label`,Wd,(0,t.toDisplayString)(i.label),1)]),(0,t.createElementVNode)(`div`,null,[(0,t.createVNode)((0,t.unref)(n.NDynamicTags),{value:o.value,"onUpdate:value":r[0]||=e=>o.value=e,id:`selectTags`},null,8,[`value`])])]),_:1}))}})})),qd,Jd=a((()=>{Kd(),Kd(),qd=Gd})),Yd,Xd,Zd,Qd,$d,ef,tf,nf=a((()=>{Zl(),M(),xd(),A(),fu(),Dd(),Fd(),Ud(),Jd(),Yd={class:`text-xs font-medium tracking-wide text-foreground/80 block mb-1`},Xd={class:`flex flex-col gap-2`},Zd={class:`flex flex-col gap-2`},Qd={key:0,class:`text-[11px] text-muted-foreground`},$d={class:`flex flex-col gap-2`},ef={key:0,class:`text-[11px] text-muted-foreground`},tf=(0,t.defineComponent)({__name:`OptionsSourceTabs`,props:{mode:{}},setup(e){let r=e,{selectedIndex:i,selectedKey:a}=Jl(),{optionsRaw:o}=j(),{t:s}=k(),c=(0,t.computed)(()=>a.value??String(i.value)),l=(0,t.computed)(()=>{let e=[`label`,`pair`,`json`];return r.mode===`tree`?[...e,`dynamicTreeDict`]:[...e,`dynamicDict`]}),u=(0,t.ref)(`json`),d=(0,t.ref)([]),f=(0,t.ref)([{label:``,value:``}]),p=(0,t.ref)(``),m=(0,t.ref)(``),h=(0,t.ref)(``),g=(0,t.ref)(``),_=(0,t.ref)(!1),v=(0,t.ref)(``),y=(0,t.ref)(``),b=(0,t.ref)(!1),x=e=>e.length===0?!1:e.every(e=>{if(!e||typeof e!=`object`)return!1;let t=e;return!(`label`in t)||!(`value`in t)?!1:Object.keys(t).every(e=>e===`label`||e===`value`||e===`disabled`)}),S=e=>e.length===0?[{label:``,value:``}]:e.map(e=>{if(!e||typeof e!=`object`)return{label:String(e??``),value:String(e??``)};let t=e;return{label:String(t.label??``),value:String(t.value??``)}}),C=e=>{let t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?Number(t):t},w=e=>Array.isArray(e)?e.every(e=>typeof e==`string`||typeof e==`number`)?e.map(String):e.map(e=>e&&typeof e==`object`?String(e.value??``):``).filter(e=>e!==``):[],ee=e=>!Array.isArray(e)||e.length===0?[{label:``,value:``}]:e.map(e=>{if(typeof e==`string`||typeof e==`number`)return{label:String(e),value:String(e)};if(e&&typeof e==`object`){let t=e;return{label:String(t.label??t.value??``),value:String(t.value??t.label??``)}}return{label:``,value:``}}),te=e=>{if(!Array.isArray(e))return``;let t=e.every(e=>typeof e==`string`||typeof e==`number`)?e.map(e=>({label:String(e),value:String(e)})):e;return JSON.stringify(t,null,2)},T=e=>{let t=yd(e);h.value=t?.code??``,g.value=t?.label??``},ne=e=>{let t=yd(e);v.value=t?.code??``,y.value=t?.label??``},re=e=>{d.value=e,o.value=[...e]},ie=e=>{f.value=e,o.value=e.map(e=>({label:e.label.trim(),value:C(e.value)})).filter(e=>e.label&&String(e.value).trim()!==``)},ae=e=>{if(p.value=e,!e.trim()){o.value=[],m.value=``;return}try{let t=JSON.parse(e);if(!Array.isArray(t)){m.value=s(`edits.optionsSource.jsonArrayError`);return}o.value=t,m.value=``}catch{m.value=s(`edits.optionsSource.jsonParseError`)}},oe=e=>{h.value=e;let t=e.trim();if(!t){o.value=[];return}o.value={dynamic:!0,code:t,...g.value?{label:g.value}:{}}},se=e=>{v.value=e;let t=e.trim();if(!t){o.value=[];return}o.value={dynamic:!0,code:t,...y.value?{label:y.value}:{}}},ce=e=>{h.value=e.code,g.value=e.label??``,o.value={dynamic:!0,code:e.code,...e.label?{label:e.label}:{}}},le=e=>{v.value=e.value,y.value=e.label??``,o.value={dynamic:!0,code:e.value,...e.label?{label:e.label}:{}}},{fetchDictionary:ue,fetchTreeDictionary:de}=bd(),fe=async e=>{if(!ue)return[];try{return await ue(e.code)}catch{return[]}},pe=async e=>{if(!de)return[];try{return await de(e.code)}catch{return[]}},me=e=>yd(e)?r.mode===`tree`?`dynamicTreeDict`:`dynamicDict`:Array.isArray(e)?e.every(e=>typeof e==`string`||typeof e==`number`)?`label`:x(e)?`pair`:`json`:`label`;(0,t.watch)(c,()=>{let e=o.value,t=me(e);u.value=l.value.includes(t)?t:l.value[0]||`json`,m.value=``,t===`label`?d.value=Array.isArray(e)?e.filter(e=>typeof e==`string`):[]:t===`pair`?f.value=Array.isArray(e)?S(e):[{label:``,value:``}]:t===`json`?p.value=JSON.stringify(Array.isArray(e)?e:[],null,2):t===`dynamicDict`?T(e):t===`dynamicTreeDict`&&ne(e)},{immediate:!0});let he=async e=>{let t=e;m.value=``;let n=o.value;if(t!==`dynamicDict`&&t!==`dynamicTreeDict`){let e=yd(n);if(e){let n=[];u.value===`dynamicDict`?n=await fe(e):u.value===`dynamicTreeDict`&&(n=await pe(e)),o.value=[],t===`label`?re(n.map(e=>String(e.label))):t===`pair`?ie(n.map(e=>({label:String(e.label),value:String(e.value)}))):ae(JSON.stringify(n,null,2));return}}u.value=t,t===`label`?re(w(n)):t===`pair`?ie(ee(n)):t===`json`?ae(te(n)):t===`dynamicDict`?T(n):t===`dynamicTreeDict`&&ne(n)},ge=()=>{f.value=[...f.value,{label:``,value:``}]},_e=e=>{let t=f.value.filter((t,n)=>n!==e);f.value=t.length?t:[{label:``,value:``}],ie(f.value)};return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,Yd,(0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.title`)),1),(0,t.createVNode)((0,t.unref)(n.NTabs),{type:`segment`,size:`small`,value:u.value,"onUpdate:value":r[8]||=e=>he(String(e))},{default:(0,t.withCtx)(()=>[l.value.includes(`label`)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:0,name:`label`,tab:(0,t.unref)(s)(`edits.optionsSource.tabs.label`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(qd,{label:(0,t.unref)(s)(`edits.optionsSource.labelList`),placeholder:(0,t.unref)(s)(`edits.placeholder.addItems`),value:d.value,"onUpdate:value":r[0]||=e=>re(e)},null,8,[`label`,`placeholder`,`value`])]),_:1},8,[`tab`])):(0,t.createCommentVNode)(``,!0),l.value.includes(`pair`)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:1,name:`pair`,tab:(0,t.unref)(s)(`edits.optionsSource.tabs.pair`)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Xd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(f.value,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:i,class:`flex flex-row gap-2 items-center`},[(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,class:`flex-1`,placeholder:(0,t.unref)(s)(`edits.optionsSource.pairLabelPlaceholder`),value:e.label,"onUpdate:value":t=>{f.value[i]={...e,label:t},ie(f.value)}},null,8,[`placeholder`,`value`,`onUpdate:value`]),(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,class:`flex-1`,placeholder:(0,t.unref)(s)(`edits.optionsSource.pairValuePlaceholder`),value:e.value,"onUpdate:value":t=>{f.value[i]={...e,value:t},ie(f.value)}},null,8,[`placeholder`,`value`,`onUpdate:value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,size:`small`,onClick:e=>_e(i),class:`!px-2`},{default:(0,t.withCtx)(()=>[...r[9]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-trash-2 h-4 w-4`},null,-1)]]),_:1},8,[`onClick`])]))),128)),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,secondary:``,onClick:ge},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.addPairRow`)),1)]),_:1})])]),_:1},8,[`tab`])):(0,t.createCommentVNode)(``,!0),l.value.includes(`json`)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:2,name:`json`,tab:(0,t.unref)(s)(`edits.optionsSource.tabs.json`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(Ed,{label:`Options (JSON)`,placeholder:`[{"label":"Option 1","value":"1"}]`,value:p.value,error:m.value,"onUpdate:value":r[1]||=e=>ae(e)},null,8,[`value`,`error`])]),_:1},8,[`tab`])):(0,t.createCommentVNode)(``,!0),l.value.includes(`dynamicDict`)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:3,name:`dynamicDict`,tab:(0,t.unref)(s)(`edits.optionsSource.tabs.dynamicDict`)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Zd,[(0,t.createVNode)((0,t.unref)(n.NInputGroup),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,placeholder:(0,t.unref)(s)(`edits.optionsSource.dictInputPlaceholder`),value:h.value,"onUpdate:value":r[2]||=e=>oe(String(e))},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,secondary:``,onClick:r[3]||=e=>_.value=!0},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.dictBrowse`)),1)]),_:1})]),_:1}),g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Qd,(0,t.toDisplayString)(g.value),1)):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(Pd,{show:_.value,"onUpdate:show":r[4]||=e=>_.value=e,onSelect:ce},null,8,[`show`])])]),_:1},8,[`tab`])):(0,t.createCommentVNode)(``,!0),l.value.includes(`dynamicTreeDict`)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:4,name:`dynamicTreeDict`,tab:(0,t.unref)(s)(`edits.optionsSource.tabs.dynamicTreeDict`)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,$d,[(0,t.createVNode)((0,t.unref)(n.NInputGroup),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,placeholder:(0,t.unref)(s)(`edits.optionsSource.dictInputPlaceholder`),value:v.value,"onUpdate:value":r[5]||=e=>se(String(e))},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,secondary:``,onClick:r[6]||=e=>b.value=!0},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`edits.optionsSource.dictBrowse`)),1)]),_:1})]),_:1}),y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ef,(0,t.toDisplayString)(y.value),1)):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(Hd,{show:b.value,"onUpdate:show":r[7]||=e=>b.value=e,onSelect:le},null,8,[`show`])])]),_:1},8,[`tab`])):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`value`])]),_:1}))}})})),rf,af=a((()=>{nf(),nf(),rf=tf})),of,sf=a((()=>{A(),M(),zu(),of=(0,t.defineComponent)({__name:`OptionsLayoutSection`,setup(e){let{t:n}=k(),{createPropsProp:r}=j(),i=r(`horizontal`,!1);return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(P,{label:(0,t.unref)(n)(`edits.optionsLayout.horizontal`),value:(0,t.unref)(i),"onUpdate:value":r[0]||=e=>i.value=e},null,8,[`label`,`value`]))}})})),cf,lf=a((()=>{sf(),sf(),cf=of})),uf,df=a((()=>{xu(),af(),lf(),Uu(),uf=(0,t.defineComponent)({__name:`CheckboxEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(rf),(0,t.createVNode)(cf),(0,t.createVNode)(Hu,{size:!0,disabled:!0})],64))}})})),ff=o({default:()=>pf}),pf,mf=a((()=>{df(),df(),pf=uf})),hf,gf=a((()=>{xu(),Uu(),hf=(0,t.defineComponent)({__name:`ColorEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),_f=o({default:()=>vf}),vf,yf=a((()=>{gf(),gf(),vf=hf})),bf,xf=a((()=>{M(),Cs(),xu(),Tu(),Uu(),_u(),Fu(),bf=(0,t.defineComponent)({__name:`DateLikeEditor`,setup(e){let{createPropsProp:n,currentFieldType:r}=j(),i=(0,t.computed)(()=>r.value===`time`?xs:bs),a=n(`valueFormat`,``),o=(0,t.computed)({get:()=>{let e=a.value;return typeof e==`string`&&e.trim()?e:i.value},set:e=>{a.value=e}}),s=n(`type`,`date`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.unref)(r)===`date`?((0,t.openBlock)(),(0,t.createBlock)(Pu,{key:0,label:`type`,value:(0,t.unref)(s),options:[{label:`date`,value:`date`},{label:`datetime`,value:`datetime`},{label:`daterange`,value:`daterange`},{label:`datetimerange`,value:`datetimerange`},{label:`month`,value:`month`},{label:`monthrange`,value:`monthrange`},{label:`year`,value:`year`},{label:`yearrange`,value:`yearrange`},{label:`quarter`,value:`quarter`},{label:`quarterrange`,value:`quarterrange`},{label:`week`,value:`week`}],"onUpdate:value":n[0]||=e=>s.value=e},null,8,[`value`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(N,{label:`value-format`,placeholder:i.value,value:o.value,"onUpdate:value":n[1]||=e=>o.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),Sf=o({default:()=>Cf}),Cf,wf=a((()=>{xf(),xf(),Cf=bf})),Tf,Ef=a((()=>{M(),Cs(),xu(),Tu(),Uu(),_u(),Fu(),Tf=(0,t.defineComponent)({__name:`DateTimeEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`valueFormat`,``),i=(0,t.computed)({get:()=>{let e=r.value;return typeof e==`string`&&e.trim()?e:Ss},set:e=>{r.value=e}}),a=n(`type`,`datetime`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(Pu,{label:`type`,value:(0,t.unref)(a),options:[{label:`date`,value:`date`},{label:`datetime`,value:`datetime`},{label:`daterange`,value:`daterange`},{label:`datetimerange`,value:`datetimerange`},{label:`month`,value:`month`},{label:`monthrange`,value:`monthrange`},{label:`year`,value:`year`},{label:`yearrange`,value:`yearrange`},{label:`quarter`,value:`quarter`},{label:`quarterrange`,value:`quarterrange`},{label:`week`,value:`week`}],"onUpdate:value":n[0]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(N,{label:`value-format`,placeholder:(0,t.unref)(Ss),value:i.value,"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),Df=o({default:()=>Of}),Of,kf=a((()=>{Ef(),Ef(),Of=Tf})),Af,jf=a((()=>{M(),xu(),Uu(),sd(),Af=(0,t.defineComponent)({__name:`FileEditor`,setup(e){let{numOfFiles:n}=j();return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(od,{label:`Number of files`,"item-label-one":`Multiple`,"item-label-two":`Single`,"value-one":`true`,"value-two":`false`,type:`single`,value:(0,t.unref)(n),"onUpdate:value":r[0]||=e=>n.value=e},null,8,[`value`]),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),Mf=o({default:()=>Nf}),Nf,Pf=a((()=>{jf(),jf(),Nf=Af})),Ff,If=a((()=>{xu(),Tu(),Uu(),qu(),Ff=(0,t.defineComponent)({__name:`PasswordEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(Ku),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0,bordered:!0,readonly:!0,round:!0,autofocus:!0,"show-count":!0,"show-password-on":!0,maxlength:!0,minlength:!0})],64))}})})),Lf=o({default:()=>Rf}),Rf,zf=a((()=>{If(),If(),Rf=Ff})),Bf,Vf=a((()=>{xu(),af(),lf(),Uu(),Bf=(0,t.defineComponent)({__name:`RadioEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(rf),(0,t.createVNode)(cf),(0,t.createVNode)(Hu,{size:!0,disabled:!0})],64))}})})),Hf=o({default:()=>Uf}),Uf,Wf=a((()=>{Vf(),Vf(),Uf=Bf})),Gf,Kf,qf,Jf,Yf,Xf=a((()=>{fu(),Gf={class:`flex flex-col gap-1`},Kf={for:`minInput`,class:`text-xs text-foreground/80`},qf={class:`flex flex-col gap-1`},Jf={for:`maxInput`,class:`text-xs text-foreground/80`},Yf=(0,t.defineComponent)({__name:`RangeInputs`,props:{valueOne:{},valueTwo:{},labelOne:{},labelTwo:{},placeholderOne:{},placeholderTwo:{}},emits:[`update:valueOne`,`update:valueTwo`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.computed)({get:()=>i.valueOne,set:e=>{a(`update:valueOne`,e)}}),s=(0,t.computed)({get:()=>i.valueTwo,set:e=>{a(`update:valueTwo`,e)}});return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(du,{class:`flex-row items-center gap-2`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Gf,[(0,t.createElementVNode)(`label`,Kf,(0,t.toDisplayString)(i.labelOne),1),(0,t.createVNode)((0,t.unref)(n.NInputNumber),{id:`minInput`,size:`small`,value:o.value,"onUpdate:value":r[0]||=e=>o.value=e,placeholder:i.placeholderOne},null,8,[`value`,`placeholder`])]),r[2]||=(0,t.createElementVNode)(`span`,{class:`i-lucide-move-right pt-4 h-4 w-4`},null,-1),(0,t.createElementVNode)(`div`,qf,[(0,t.createElementVNode)(`label`,Jf,(0,t.toDisplayString)(i.labelTwo),1),(0,t.createVNode)((0,t.unref)(n.NInputNumber),{id:`maxInput`,size:`small`,value:s.value,"onUpdate:value":r[1]||=e=>s.value=e,placeholder:i.placeholderTwo},null,8,[`value`,`placeholder`])])]),_:1}))}})})),Zf,Qf=a((()=>{Xf(),Xf(),Zf=Yf})),$f,ep=a((()=>{M(),xu(),Uu(),Qf(),$f=(0,t.defineComponent)({__name:`RangeEditor`,setup(e){let{min:n,max:r}=j();return(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(Zf,{"label-one":`Min`,"label-two":`Max`,"placeholder-one":`0`,"placeholder-two":`10`,"value-one":(0,t.unref)(n)??null,"value-two":(0,t.unref)(r)??null,"onUpdate:valueOne":i[0]||=e=>{e!==null&&(n.value=e)},"onUpdate:valueTwo":i[1]||=e=>{e!==null&&(r.value=e)}},null,8,[`value-one`,`value-two`]),(0,t.createVNode)(Hu,{size:!0,disabled:!0})],64))}})})),tp=o({default:()=>np}),np,rp=a((()=>{ep(),ep(),np=$f})),ip,ap=a((()=>{M(),zu(),ip=(0,t.defineComponent)({__name:`SelectSwitchesSection`,setup(e){let{createPropsProp:n}=j(),r=n(`filterable`,!1),i=n(`multiple`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(P,{label:`filterable`,value:(0,t.unref)(r),"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`multiple`,value:(0,t.unref)(i),"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`])],64))}})})),op,sp=a((()=>{ap(),ap(),op=ip})),cp,lp=a((()=>{xu(),af(),sp(),Uu(),cp=(0,t.defineComponent)({__name:`SelectEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(rf),(0,t.createVNode)(op),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),up=o({default:()=>dp}),dp,fp=a((()=>{lp(),lp(),dp=cp})),pp,mp=a((()=>{xu(),Tu(),af(),sp(),Uu(),pp=(0,t.defineComponent)({__name:`NaiveCascaderEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(rf,{mode:`tree`}),(0,t.createVNode)(op),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),hp=o({default:()=>gp}),gp,_p=a((()=>{mp(),mp(),gp=pp})),vp,yp=a((()=>{xu(),Tu(),af(),sp(),Uu(),vp=(0,t.defineComponent)({__name:`NaiveTreeSelectEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(rf,{mode:`tree`}),(0,t.createVNode)(op),(0,t.createVNode)(Hu,{size:!0,disabled:!0,clearable:!0})],64))}})})),bp=o({default:()=>xp}),xp,Sp=a((()=>{yp(),yp(),xp=vp})),Cp,wp=a((()=>{M(),A(),Jd(),Cp=(0,t.defineComponent)({__name:`OptionsTagsSection`,props:{label:{}},setup(e){let n=e,{modelValue:r}=j(),{t:i}=k();return(e,a)=>((0,t.openBlock)(),(0,t.createBlock)(qd,{label:n.label??(0,t.unref)(i)(`edits.optionsLabel`),placeholder:(0,t.unref)(i)(`edits.placeholder.addItems`),value:(0,t.unref)(r),"onUpdate:value":a[0]||=e=>r.value=e},null,8,[`label`,`placeholder`,`value`]))}})})),Tp,Ep=a((()=>{wp(),wp(),Tp=Cp})),Dp,Op=a((()=>{xu(),Tu(),Ep(),Uu(),Dp=(0,t.defineComponent)({__name:`NaiveMentionEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(wu),(0,t.createVNode)(Tp),(0,t.createVNode)(Hu,{size:!0,disabled:!0})],64))}})})),kp=o({default:()=>Ap}),Ap,jp=a((()=>{Op(),Op(),Ap=Dp})),Mp,Np=a((()=>{M(),xu(),Uu(),zu(),_u(),Mp=(0,t.defineComponent)({__name:`NaiveRateEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`allowHalf`,!1),i=n(`count`,5),a=(0,t.computed)({get:()=>{let e=i.value;return typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`string`?e:`5`},set:e=>{let t=Number(e);i.value=Number.isFinite(t)?t:e}});return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(N,{label:`count`,placeholder:`5`,value:a.value,"onUpdate:value":n[0]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`allow-half`,value:(0,t.unref)(r),"onUpdate:value":n[1]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Hu,{disabled:!0,clearable:!0})],64))}})})),Pp=o({default:()=>Fp}),Fp,Ip=a((()=>{Np(),Np(),Fp=Mp})),Lp,Rp=a((()=>{xu(),Uu(),Lp=(0,t.defineComponent)({__name:`NaiveSwitchEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(Hu,{size:!0,disabled:!0})],64))}})})),zp=o({default:()=>Bp}),Bp,Vp=a((()=>{Rp(),Rp(),Bp=Lp})),Hp,Up=a((()=>{M(),xu(),zu(),_u(),Hp=(0,t.defineComponent)({__name:`NaiveAvatarEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`src`,``),i=n(`avatarSize`,48),a=(0,t.computed)({get:()=>{let e=i.value;return typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`string`?e:`48`},set:e=>{let t=Number(e);i.value=Number.isFinite(t)?t:e}}),o=n(`round`,!0),s=n(`bordered`,!1),c=n(`fallbackText`,`A`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(N,{label:`src`,placeholder:`https://...`,value:(0,t.unref)(r),"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(N,{label:`size`,placeholder:`48`,value:a.value,"onUpdate:value":n[1]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(N,{label:`fallback-text`,placeholder:`A`,value:(0,t.unref)(c),"onUpdate:value":n[2]||=e=>c.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`round`,value:(0,t.unref)(o),"onUpdate:value":n[3]||=e=>o.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`bordered`,value:(0,t.unref)(s),"onUpdate:value":n[4]||=e=>s.value=e},null,8,[`value`])],64))}})})),Wp=o({default:()=>Gp}),Gp,Kp=a((()=>{Up(),Up(),Gp=Hp})),qp,Jp=a((()=>{M(),A(),Fu(),qp=(0,t.defineComponent)({__name:`RowSpanSection`,setup(e){let{rowSpan:n}=j(),{t:r}=k(),i=(0,t.computed)({get:()=>String(n.value??1),set:e=>{let t=Number(e);n.value=Number.isFinite(t)?t:1}});return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Pu,{label:(0,t.unref)(r)(`edits.grid.rowSpanLabel`),value:i.value,options:[{label:`1`,value:`1`},{label:`2`,value:`2`},{label:`3`,value:`3`},{label:`4`,value:`4`},{label:`5`,value:`5`},{label:`6`,value:`6`}],"onUpdate:value":n[0]||=e=>i.value=e},null,8,[`label`,`value`]))}})})),Yp,Xp=a((()=>{Jp(),Jp(),Yp=qp})),Zp,Qp=a((()=>{M(),A(),xu(),Xp(),Fu(),zu(),_u(),Zp=(0,t.defineComponent)({__name:`NaiveImageEditor`,setup(e){let{createPropsProp:n}=j(),{t:r}=k(),i=n(`src`,``),a=n(`alt`,``),o=n(`width`,240),s=(0,t.computed)({get:()=>{let e=o.value;return typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`string`?e:`240`},set:e=>{let t=Number(e);o.value=Number.isFinite(t)?t:e}}),c=n(`height`,160),l=(0,t.computed)({get:()=>{let e=c.value;return typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`string`?e:`160`},set:e=>{let t=Number(e);c.value=Number.isFinite(t)?t:e}}),u=n(`objectFit`,`cover`),d=n(`previewDisabled`,!1),f=n(`lazy`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(Yp),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`edits.image.srcLabel`),placeholder:(0,t.unref)(r)(`edits.image.srcPlaceholder`),value:(0,t.unref)(i),"onUpdate:value":n[0]||=e=>i.value=e},null,8,[`label`,`placeholder`,`value`]),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`edits.image.altLabel`),placeholder:(0,t.unref)(r)(`edits.image.altPlaceholder`),value:(0,t.unref)(a),"onUpdate:value":n[1]||=e=>a.value=e},null,8,[`label`,`placeholder`,`value`]),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`edits.image.widthLabel`),placeholder:(0,t.unref)(r)(`edits.image.widthPlaceholder`),value:s.value,"onUpdate:value":n[2]||=e=>s.value=e},null,8,[`label`,`placeholder`,`value`]),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`edits.image.heightLabel`),placeholder:(0,t.unref)(r)(`edits.image.heightPlaceholder`),value:l.value,"onUpdate:value":n[3]||=e=>l.value=e},null,8,[`label`,`placeholder`,`value`]),(0,t.createVNode)(Pu,{label:(0,t.unref)(r)(`edits.image.objectFitLabel`),value:(0,t.unref)(u),options:[{label:`fill`,value:`fill`},{label:`contain`,value:`contain`},{label:`cover`,value:`cover`},{label:`none`,value:`none`},{label:`scale-down`,value:`scale-down`}],"onUpdate:value":n[4]||=e=>u.value=e},null,8,[`label`,`value`]),(0,t.createVNode)(P,{label:(0,t.unref)(r)(`edits.image.previewDisabledLabel`),value:(0,t.unref)(d),"onUpdate:value":n[5]||=e=>d.value=e},null,8,[`label`,`value`]),(0,t.createVNode)(P,{label:(0,t.unref)(r)(`edits.image.lazyLabel`),value:(0,t.unref)(f),"onUpdate:value":n[6]||=e=>f.value=e},null,8,[`label`,`value`])],64))}})})),$p=o({default:()=>em}),em,tm=a((()=>{Qp(),Qp(),em=Zp})),nm,rm,im=a((()=>{Cs(),nm={size:`medium`,disabled:!1,clearable:!0},rm=[{type:`text`,category:`field`,icon:`i-lucide-type`,tooltipKey:`fieldProps.tooltip.text`,editor:()=>Promise.resolve().then(()=>(nd(),ed)),schema:{renderAs:`cmp`,nameKey:`elements.text.name`,labelKey:`elements.text.label`,outerClass:`col-span-12`,props:{...nm},placeholderKey:`elements.text.placeholder`,helpKey:`elements.common.help`,descriptionKey:`elements.text.description`}},{type:`textarea`,category:`field`,icon:`i-lucide-letter-text`,tooltipKey:`fieldProps.tooltip.textarea`,editor:()=>Promise.resolve().then(()=>(nd(),ed)),schema:{renderAs:`cmp`,nameKey:`elements.textarea.name`,labelKey:`elements.textarea.label`,outerClass:`col-span-12`,props:{...nm},placeholderKey:`elements.textarea.placeholder`,helpKey:`elements.common.help`,descriptionKey:`elements.textarea.description`}},{type:`email`,category:`field`,icon:`i-lucide-mail`,tooltipKey:`fieldProps.tooltip.email`,editor:()=>Promise.resolve().then(()=>(nd(),ed)),schema:{renderAs:`cmp`,nameKey:`elements.email.name`,labelKey:`elements.email.label`,outerClass:`col-span-12`,props:{...nm},placeholderKey:`elements.email.placeholder`,helpKey:`elements.common.help`,validation:`email`,descriptionKey:`elements.email.description`}},{type:`number`,category:`field`,icon:`i-lucide-hash`,tooltipKey:`fieldProps.tooltip.number`,editor:()=>Promise.resolve().then(()=>(fd(),ud)),schema:{renderAs:`cmp`,nameKey:`elements.number.name`,labelKey:`elements.number.label`,outerClass:`col-span-12`,props:{...nm,number:`integer`},placeholderKey:`elements.number.placeholder`,helpKey:`elements.common.help`,validation:`number`,descriptionKey:`elements.number.description`}},{type:`url`,category:`field`,icon:`i-lucide-link-2`,tooltipKey:`fieldProps.tooltip.url`,editor:()=>Promise.resolve().then(()=>(nd(),ed)),schema:{renderAs:`cmp`,nameKey:`elements.url.name`,labelKey:`elements.url.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm},placeholderKey:`elements.url.placeholder`,validation:`url`,descriptionKey:`elements.url.description`}},{type:`checkbox`,category:`field`,icon:`i-lucide-square-check`,tooltipKey:`fieldProps.tooltip.checkbox`,editor:()=>Promise.resolve().then(()=>(mf(),ff)),schema:{renderAs:`cmp`,nameKey:`elements.checkbox.name`,labelKey:`elements.checkbox.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,options:[`One`]},descriptionKey:`elements.checkbox.description`}},{type:`color`,category:`field`,icon:`i-lucide-pipette`,tooltipKey:`fieldProps.tooltip.color`,editor:()=>Promise.resolve().then(()=>(yf(),_f)),schema:{renderAs:`cmp`,nameKey:`elements.color.name`,labelKey:`elements.color.label`,value:`#00ff00`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm},descriptionKey:`elements.color.description`}},{type:`date`,category:`field`,icon:`i-lucide-calendar`,tooltipKey:`fieldProps.tooltip.date`,editor:()=>Promise.resolve().then(()=>(wf(),Sf)),schema:{renderAs:`cmp`,nameKey:`elements.date.name`,labelKey:`elements.date.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,valueFormat:bs,type:`date`},descriptionKey:`elements.date.description`}},{type:`time`,category:`field`,icon:`i-lucide-clock`,tooltipKey:`fieldProps.tooltip.time`,editor:()=>Promise.resolve().then(()=>(wf(),Sf)),schema:{renderAs:`cmp`,nameKey:`elements.time.name`,labelKey:`elements.time.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,valueFormat:xs},descriptionKey:`elements.time.description`}},{type:`naiveDateTime`,category:`field`,icon:`i-lucide-calendar-clock`,tooltipKey:`fieldProps.tooltip.dateTime`,editor:()=>Promise.resolve().then(()=>(kf(),Df)),schema:{renderAs:`cmp`,nameKey:`elements.dateTime.name`,labelKey:`elements.dateTime.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,valueFormat:Ss,type:`datetime`},descriptionKey:`elements.dateTime.description`}},{type:`file`,category:`field`,icon:`i-lucide-paperclip`,tooltipKey:`fieldProps.tooltip.file`,editor:()=>Promise.resolve().then(()=>(Pf(),Mf)),schema:{renderAs:`cmp`,nameKey:`elements.file.name`,labelKey:`elements.file.label`,helpKey:`elements.file.help`,outerClass:`col-span-12`,props:{...nm,accept:`.pdf,.doc,.docx,.xml,.md,.csv,.jpg,.png,.webp`},descriptionKey:`elements.file.description`}},{type:`password`,category:`field`,icon:`i-lucide-lock`,tooltipKey:`fieldProps.tooltip.password`,editor:()=>Promise.resolve().then(()=>(zf(),Lf)),schema:{renderAs:`cmp`,nameKey:`elements.password.name`,labelKey:`elements.password.label`,placeholderKey:`elements.password.placeholder`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm},descriptionKey:`elements.password.description`}},{type:`radio`,category:`field`,icon:`i-lucide-circle-dot`,tooltipKey:`fieldProps.tooltip.radio`,editor:()=>Promise.resolve().then(()=>(Wf(),Hf)),schema:{renderAs:`cmp`,nameKey:`elements.radio.name`,labelKey:`elements.radio.label`,outerClass:`col-span-12`,helpKey:`elements.common.help`,props:{...nm,options:[`one`]},descriptionKey:`elements.radio.description`}},{type:`range`,category:`field`,icon:`i-lucide-sliders-horizontal`,tooltipKey:`fieldProps.tooltip.range`,editor:()=>Promise.resolve().then(()=>(rp(),tp)),schema:{renderAs:`cmp`,nameKey:`elements.range.name`,labelKey:`elements.range.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,children:`$slots.default`,__raw__sectionsSchema:{prefix:{$el:`div`,attrs:{class:` py-1 px-2 mr-1 text-sm flex items-center bg-muted mr-2 rounded-md`},children:`$value`}}},value:0,descriptionKey:`elements.range.description`}},{type:`select`,category:`field`,icon:`i-lucide-list`,tooltipKey:`fieldProps.tooltip.select`,editor:()=>Promise.resolve().then(()=>(fp(),up)),schema:{renderAs:`cmp`,nameKey:`elements.select.name`,labelKey:`elements.select.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,filterable:!1,multiple:!1,options:[`one`]},descriptionKey:`elements.select.description`}},{type:`naiveCascader`,category:`field`,icon:`i-lucide-list`,tooltipKey:`fieldProps.tooltip.naiveCascader`,editor:()=>Promise.resolve().then(()=>(_p(),hp)),schema:{renderAs:`cmp`,nameKey:`elements.naiveCascader.name`,labelKey:`elements.naiveCascader.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,filterable:!1,multiple:!1,options:[{label:`Option 1`,value:`1`,children:[{label:`Option 1-1`,value:`1-1`},{label:`Option 1-2`,value:`1-2`}]},{label:`Option 2`,value:`2`}]},placeholderKey:`elements.common.selectPlaceholder`,descriptionKey:`elements.naiveCascader.description`}},{type:`naiveTreeSelect`,category:`field`,icon:`i-lucide-list-tree`,tooltipKey:`fieldProps.tooltip.naiveTreeSelect`,editor:()=>Promise.resolve().then(()=>(Sp(),bp)),schema:{renderAs:`cmp`,nameKey:`elements.naiveTreeSelect.name`,labelKey:`elements.naiveTreeSelect.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{...nm,filterable:!1,multiple:!1,options:[{label:`Node 1`,key:`1`,children:[{label:`Node 1-1`,key:`1-1`},{label:`Node 1-2`,key:`1-2`}]},{label:`Node 2`,key:`2`}]},placeholderKey:`elements.common.selectPlaceholder`,descriptionKey:`elements.naiveTreeSelect.description`}},{type:`naiveMention`,category:`field`,icon:`i-lucide-letter-text`,tooltipKey:`fieldProps.tooltip.naiveMention`,editor:()=>Promise.resolve().then(()=>(jp(),kp)),schema:{renderAs:`cmp`,nameKey:`elements.naiveMention.name`,labelKey:`elements.naiveMention.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{size:`medium`,disabled:!1},placeholderKey:`elements.naiveMention.placeholder`,options:[`alice`,`bob`],descriptionKey:`elements.naiveMention.description`}},{type:`naiveRate`,category:`field`,icon:`i-lucide-sliders-horizontal`,tooltipKey:`fieldProps.tooltip.naiveRate`,editor:()=>Promise.resolve().then(()=>(Ip(),Pp)),schema:{renderAs:`cmp`,nameKey:`elements.naiveRate.name`,labelKey:`elements.naiveRate.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{disabled:!1,clearable:!0,allowHalf:!1,count:5},value:0,descriptionKey:`elements.naiveRate.description`}},{type:`naiveSwitch`,category:`field`,icon:`i-lucide-square-check`,tooltipKey:`fieldProps.tooltip.naiveSwitch`,editor:()=>Promise.resolve().then(()=>(Vp(),zp)),schema:{renderAs:`cmp`,nameKey:`elements.naiveSwitch.name`,labelKey:`elements.naiveSwitch.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{size:`medium`,disabled:!1},value:!1,descriptionKey:`elements.naiveSwitch.description`}},{type:`naiveAvatar`,category:`field`,icon:`i-stash:user-avatar`,tooltipKey:`fieldProps.tooltip.naiveAvatar`,editor:()=>Promise.resolve().then(()=>(Kp(),Wp)),schema:{renderAs:`cmp`,nameKey:`elements.naiveAvatar.name`,labelKey:`elements.naiveAvatar.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{src:``,avatarSize:48,round:!0,bordered:!1,fallbackText:`A`},descriptionKey:`elements.naiveAvatar.description`}},{type:`naiveImage`,category:`field`,icon:`i-lucide-image`,tooltipKey:`fieldProps.tooltip.naiveImage`,editor:()=>Promise.resolve().then(()=>(tm(),$p)),schema:{renderAs:`cmp`,nameKey:`elements.naiveImage.name`,labelKey:`elements.naiveImage.label`,helpKey:`elements.common.help`,outerClass:`col-span-12`,props:{src:``,alt:``,width:240,height:160,objectFit:`cover`,previewDisabled:!1,lazy:!1},descriptionKey:`elements.naiveImage.description`}},{type:`tel`,category:`field`,icon:`i-lucide-phone`,tooltipKey:`fieldProps.tooltip.tel`,editor:()=>Promise.resolve().then(()=>(nd(),ed)),schema:{renderAs:`cmp`,nameKey:`elements.tel.name`,labelKey:`elements.tel.label`,placeholderKey:`elements.tel.placeholder`,outerClass:`col-span-12`,helpKey:`elements.common.help`,props:{...nm},descriptionKey:`elements.tel.description`}}]})),am,om=a((()=>{M(),Fu(),zu(),_u(),am=(0,t.defineComponent)({__name:`SubmitEditor`,setup(e){let{createButtonProp:n,buttonText:r}=j(),i=n(`block`,!1),a=n(`bordered`,!0),o=n(`circle`,!1),s=n(`dashed`,!1),c=n(`disabled`,!1),l=n(`focusable`,!0),u=n(`fullWidth`,!1),d=n(`align`,`left`),f=n(`ghost`,!1),p=n(`round`,!1),m=n(`secondary`,!1),h=n(`size`,`medium`),g=n(`buttonType`,`default`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(N,{label:`text`,placeholder:`Button text`,value:(0,t.unref)(r),"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`align`,value:(0,t.unref)(d),options:[{label:`left`,value:`left`},{label:`center`,value:`center`},{label:`right`,value:`right`}],"onUpdate:value":n[1]||=e=>d.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`size`,value:(0,t.unref)(h),options:[{label:`tiny`,value:`tiny`},{label:`small`,value:`small`},{label:`medium`,value:`medium`},{label:`large`,value:`large`}],"onUpdate:value":n[2]||=e=>h.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`type`,value:(0,t.unref)(g),options:[{label:`default`,value:`default`},{label:`tertiary`,value:`tertiary`},{label:`primary`,value:`primary`},{label:`success`,value:`success`},{label:`info`,value:`info`},{label:`warning`,value:`warning`},{label:`error`,value:`error`}],"onUpdate:value":n[3]||=e=>g.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`block`,value:(0,t.unref)(i),"onUpdate:value":n[4]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`bordered`,value:(0,t.unref)(a),"onUpdate:value":n[5]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`circle`,value:(0,t.unref)(o),"onUpdate:value":n[6]||=e=>o.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`dashed`,value:(0,t.unref)(s),"onUpdate:value":n[7]||=e=>s.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`disabled`,value:(0,t.unref)(c),"onUpdate:value":n[8]||=e=>c.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`focusable`,value:(0,t.unref)(l),"onUpdate:value":n[9]||=e=>l.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`full width`,value:(0,t.unref)(u),"onUpdate:value":n[10]||=e=>u.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`ghost`,value:(0,t.unref)(f),"onUpdate:value":n[11]||=e=>f.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`round`,value:(0,t.unref)(p),"onUpdate:value":n[12]||=e=>p.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`secondary`,value:(0,t.unref)(m),"onUpdate:value":n[13]||=e=>m.value=e},null,8,[`value`])],64))}})})),sm=o({default:()=>cm}),cm,lm=a((()=>{om(),om(),cm=am})),um,dm=a((()=>{M(),Fu(),zu(),_u(),um=(0,t.defineComponent)({__name:`NaiveButtonEditor`,setup(e){let{createButtonProp:n,buttonText:r}=j(),i=n(`block`,!1),a=n(`bordered`,!0),o=n(`circle`,!1),s=n(`dashed`,!1),c=n(`disabled`,!1),l=n(`focusable`,!0),u=n(`fullWidth`,!1),d=n(`align`,`left`),f=n(`ghost`,!1),p=n(`round`,!1),m=n(`secondary`,!1),h=n(`size`,`medium`),g=n(`buttonType`,`default`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(N,{label:`text`,placeholder:`Button text`,value:(0,t.unref)(r),"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`align`,value:(0,t.unref)(d),options:[{label:`left`,value:`left`},{label:`center`,value:`center`},{label:`right`,value:`right`}],"onUpdate:value":n[1]||=e=>d.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`size`,value:(0,t.unref)(h),options:[{label:`tiny`,value:`tiny`},{label:`small`,value:`small`},{label:`medium`,value:`medium`},{label:`large`,value:`large`}],"onUpdate:value":n[2]||=e=>h.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`type`,value:(0,t.unref)(g),options:[{label:`default`,value:`default`},{label:`tertiary`,value:`tertiary`},{label:`primary`,value:`primary`},{label:`success`,value:`success`},{label:`info`,value:`info`},{label:`warning`,value:`warning`},{label:`error`,value:`error`}],"onUpdate:value":n[3]||=e=>g.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`block`,value:(0,t.unref)(i),"onUpdate:value":n[4]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`bordered`,value:(0,t.unref)(a),"onUpdate:value":n[5]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`circle`,value:(0,t.unref)(o),"onUpdate:value":n[6]||=e=>o.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`dashed`,value:(0,t.unref)(s),"onUpdate:value":n[7]||=e=>s.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`disabled`,value:(0,t.unref)(c),"onUpdate:value":n[8]||=e=>c.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`focusable`,value:(0,t.unref)(l),"onUpdate:value":n[9]||=e=>l.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`full width`,value:(0,t.unref)(u),"onUpdate:value":n[10]||=e=>u.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`ghost`,value:(0,t.unref)(f),"onUpdate:value":n[11]||=e=>f.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`round`,value:(0,t.unref)(p),"onUpdate:value":n[12]||=e=>p.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`secondary`,value:(0,t.unref)(m),"onUpdate:value":n[13]||=e=>m.value=e},null,8,[`value`])],64))}})})),fm=o({default:()=>pm}),pm,mm=a((()=>{dm(),dm(),pm=um})),hm,gm=a((()=>{M(),Fu(),zu(),hm=(0,t.defineComponent)({__name:`NaiveTextEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`theme`,`default`),i=n(`depth`,1),a=(0,t.computed)({get:()=>{let e=i.value;return typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`string`?e:`1`},set:e=>{let t=Number(e);i.value=Number.isFinite(t)?t:e}}),o=n(`strong`,!1),s=n(`italic`,!1),c=n(`underline`,!1),l=n(`delete`,!1),u=n(`code`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(Pu,{label:`theme`,value:(0,t.unref)(r),options:[{label:`default`,value:`default`},{label:`primary`,value:`primary`},{label:`info`,value:`info`},{label:`success`,value:`success`},{label:`warning`,value:`warning`},{label:`error`,value:`error`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`depth`,value:a.value,options:[{label:`1`,value:`1`},{label:`2`,value:`2`},{label:`3`,value:`3`}],"onUpdate:value":n[1]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`strong`,value:(0,t.unref)(o),"onUpdate:value":n[2]||=e=>o.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`italic`,value:(0,t.unref)(s),"onUpdate:value":n[3]||=e=>s.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`underline`,value:(0,t.unref)(c),"onUpdate:value":n[4]||=e=>c.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`delete`,value:(0,t.unref)(l),"onUpdate:value":n[5]||=e=>l.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`code`,value:(0,t.unref)(u),"onUpdate:value":n[6]||=e=>u.value=e},null,8,[`value`])],64))}})})),_m=o({default:()=>vm}),vm,ym=a((()=>{gm(),gm(),vm=hm})),bm,xm=a((()=>{M(),Fu(),bm=(0,t.defineComponent)({__name:`NaiveParagraphEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`theme`,`default`),i=n(`depth`,1),a=(0,t.computed)({get:()=>{let e=i.value;return typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`string`?e:`1`},set:e=>{let t=Number(e);i.value=Number.isFinite(t)?t:e}}),o=n(`align`,`start`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(Pu,{label:`theme`,value:(0,t.unref)(r),options:[{label:`default`,value:`default`},{label:`primary`,value:`primary`},{label:`info`,value:`info`},{label:`success`,value:`success`},{label:`warning`,value:`warning`},{label:`error`,value:`error`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`depth`,value:a.value,options:[{label:`1`,value:`1`},{label:`2`,value:`2`},{label:`3`,value:`3`}],"onUpdate:value":n[1]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`align`,value:(0,t.unref)(o),options:[{label:`start`,value:`start`},{label:`center`,value:`center`},{label:`end`,value:`end`},{label:`justify`,value:`justify`}],"onUpdate:value":n[2]||=e=>o.value=e},null,8,[`value`])],64))}})})),Sm=o({default:()=>Cm}),Cm,wm=a((()=>{xm(),xm(),Cm=bm})),Tm,Em=a((()=>{M(),_u(),Fu(),Tm=(0,t.defineComponent)({__name:`NaiveLinkEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`href`,`https://www.example.com`),i=n(`target`,`_blank`);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(N,{label:`href`,placeholder:`https://...`,value:(0,t.unref)(r),"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`target`,value:(0,t.unref)(i),options:[{label:`_blank`,value:`_blank`},{label:`_self`,value:`_self`}],"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`])],64))}})})),Dm=o({default:()=>Om}),Om,km=a((()=>{Em(),Em(),Om=Tm})),Am,jm=a((()=>{Am=(0,t.defineComponent)({__name:`NaiveBlockquoteEditor`,setup(e){return()=>{}}})})),Mm=o({default:()=>Nm}),Nm,Pm=a((()=>{jm(),jm(),Nm=Am})),Fm,Im,Lm=a((()=>{Fm={class:`hidden`},Im=(0,t.defineComponent)({__name:`NaiveHeaderEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Fm))}})})),Rm,zm=a((()=>{Lm(),Lm(),Rm=Im})),Bm,Vm=a((()=>{zm(),Bm=(0,t.defineComponent)({__name:`NaiveH1Editor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Rm))}})})),Hm=o({default:()=>Um}),Um,Wm=a((()=>{Vm(),Vm(),Um=Bm})),Gm,Km=a((()=>{zm(),Gm=(0,t.defineComponent)({__name:`NaiveH2Editor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Rm))}})})),qm=o({default:()=>Jm}),Jm,Ym=a((()=>{Km(),Km(),Jm=Gm})),Xm,Zm=a((()=>{zm(),Xm=(0,t.defineComponent)({__name:`NaiveH3Editor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Rm))}})})),Qm=o({default:()=>$m}),$m,eh=a((()=>{Zm(),Zm(),$m=Xm})),th,nh=a((()=>{zm(),th=(0,t.defineComponent)({__name:`NaiveH4Editor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Rm))}})})),rh=o({default:()=>ih}),ih,ah=a((()=>{nh(),nh(),ih=th})),oh,sh=a((()=>{zm(),oh=(0,t.defineComponent)({__name:`NaiveH5Editor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Rm))}})})),ch=o({default:()=>lh}),lh,uh=a((()=>{sh(),sh(),lh=oh})),dh,fh=a((()=>{zm(),dh=(0,t.defineComponent)({__name:`NaiveH6Editor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Rm))}})})),ph=o({default:()=>mh}),mh,hh=a((()=>{fh(),fh(),mh=dh})),gh,_h=a((()=>{Ep(),gh=(0,t.defineComponent)({__name:`NaiveUlEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Tp,{label:`Items`}))}})})),vh=o({default:()=>yh}),yh,bh=a((()=>{_h(),_h(),yh=gh})),xh,Sh=a((()=>{Ep(),xh=(0,t.defineComponent)({__name:`NaiveOlEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Tp,{label:`Items`}))}})})),Ch=o({default:()=>wh}),wh,Th=a((()=>{Sh(),Sh(),wh=xh})),Eh,Dh=a((()=>{Eh=(0,t.defineComponent)({__name:`NaiveLiEditor`,setup(e){return()=>{}}})})),Oh=o({default:()=>kh}),kh,Ah=a((()=>{Dh(),Dh(),kh=Eh})),jh,Mh=a((()=>{M(),Fu(),zu(),jh=(0,t.defineComponent)({__name:`NaiveDividerEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`titlePlacement`,`center`),i=n(`dashed`,!1),a=n(`vertical`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(Pu,{label:`title-placement`,value:(0,t.unref)(r),options:[{label:`left`,value:`left`},{label:`center`,value:`center`},{label:`right`,value:`right`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`dashed`,value:(0,t.unref)(i),"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`vertical`,value:(0,t.unref)(a),"onUpdate:value":n[2]||=e=>a.value=e},null,8,[`value`])],64))}})})),Nh=o({default:()=>Ph}),Ph,Fh=a((()=>{Mh(),Mh(),Ph=jh})),Ih,Lh=a((()=>{M(),Fu(),zu(),Ih=(0,t.defineComponent)({__name:`NaiveAlertEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`theme`,`default`),i=n(`closable`,!1),a=n(`bordered`,!1),o=n(`showIcon`,!0);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(Pu,{label:`theme`,value:(0,t.unref)(r),options:[{label:`default`,value:`default`},{label:`info`,value:`info`},{label:`success`,value:`success`},{label:`warning`,value:`warning`},{label:`error`,value:`error`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`closable`,value:(0,t.unref)(i),"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`bordered`,value:(0,t.unref)(a),"onUpdate:value":n[2]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`show-icon`,value:(0,t.unref)(o),"onUpdate:value":n[3]||=e=>o.value=e},null,8,[`value`])],64))}})})),Rh=o({default:()=>zh}),zh,Bh=a((()=>{Lh(),Lh(),zh=Ih})),Vh,Hh=a((()=>{M(),_u(),zu(),Vh=(0,t.defineComponent)({__name:`NaiveBackTopEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`show`,!0),i=n(`right`,40),a=n(`bottom`,40),o=n(`visibilityHeight`,0),s=e=>e==null?``:String(e),c=e=>{let t=e.trim();if(!t)return``;let n=Number(t);return Number.isFinite(n)?n:t},l=(0,t.computed)({get:()=>s(i.value),set:e=>{i.value=c(e)}}),u=(0,t.computed)({get:()=>s(a.value),set:e=>{a.value=c(e)}}),d=(0,t.computed)({get:()=>s(o.value),set:e=>{let t=Number(e);o.value=Number.isFinite(t)?t:0}});return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(P,{label:`show`,value:(0,t.unref)(r),"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(N,{label:`right`,placeholder:`40`,value:l.value,"onUpdate:value":n[1]||=e=>l.value=e},null,8,[`value`]),(0,t.createVNode)(N,{label:`bottom`,placeholder:`40`,value:u.value,"onUpdate:value":n[2]||=e=>u.value=e},null,8,[`value`]),(0,t.createVNode)(N,{label:`visibility-height`,placeholder:`0`,value:d.value,"onUpdate:value":n[3]||=e=>d.value=e},null,8,[`value`])],64))}})})),Uh=o({default:()=>Wh}),Wh,Gh=a((()=>{Hh(),Hh(),Wh=Vh})),Kh,qh,Jh=a((()=>{Kh=(e,t,n,r)=>({type:`naiveH${e}`,category:`static`,icon:t,tooltipKey:n,editor:r,schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{text:`text`},nameKey:`elements.naiveH${e}.name`,descriptionKey:`elements.naiveH${e}.description`}}),qh=[{type:`submit`,category:`static`,icon:`i-lucide-send-horizontal`,tooltipKey:`fieldProps.tooltip.submit`,editor:()=>Promise.resolve().then(()=>(lm(),sm)),schema:{renderAs:`cmp`,outerClass:`col-span-12 pt-2`,nameKey:`elements.submit.name`,descriptionKey:`elements.submit.description`,labelKey:`elements.submit.label`,props:{buttonType:`default`}}},{type:`reset`,category:`static`,icon:`i-lucide-rotate-ccw`,tooltipKey:`fieldProps.tooltip.reset`,editor:()=>Promise.resolve().then(()=>(lm(),sm)),schema:{renderAs:`cmp`,outerClass:`col-span-12 pt-2`,nameKey:`elements.reset.name`,descriptionKey:`elements.reset.description`,labelKey:`elements.reset.label`,props:{buttonType:`error`}}},{type:`naiveButton`,category:`static`,icon:`i-lucide-square-mouse-pointer`,tooltipKey:`fieldProps.tooltip.naiveButton`,editor:()=>Promise.resolve().then(()=>(mm(),fm)),schema:{renderAs:`cmp`,outerClass:`col-span-12 pt-2`,props:{block:!1,bordered:!0,circle:!1,dashed:!1,disabled:!1,focusable:!0,fullWidth:!1,align:`left`,ghost:!1,round:!1,secondary:!1,size:`medium`,buttonType:`default`},nameKey:`elements.naiveButton.name`,descriptionKey:`elements.naiveButton.description`,labelKey:`elements.naiveButton.label`}},{type:`naiveText`,category:`static`,icon:`i-lucide-letter-text`,tooltipKey:`fieldProps.tooltip.naiveText`,editor:()=>Promise.resolve().then(()=>(ym(),_m)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{text:`text`,theme:`default`,depth:1,strong:!1,italic:!1,underline:!1,delete:!1,code:!1},nameKey:`elements.naiveText.name`,descriptionKey:`elements.naiveText.description`}},{type:`naiveP`,category:`static`,icon:`i-lucide-letter-text`,tooltipKey:`fieldProps.tooltip.naiveP`,editor:()=>Promise.resolve().then(()=>(wm(),Sm)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{theme:`default`,depth:1,align:`start`,text:`text`},nameKey:`elements.naiveP.name`,descriptionKey:`elements.naiveP.description`}},{type:`naiveA`,category:`static`,icon:`i-lucide-link-2`,tooltipKey:`fieldProps.tooltip.naiveA`,editor:()=>Promise.resolve().then(()=>(km(),Dm)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{text:`text`,href:`https://www.example.com`,target:`_blank`},nameKey:`elements.naiveA.name`,descriptionKey:`elements.naiveA.description`}},{type:`naiveBlockquote`,category:`static`,icon:`i-lucide-letter-text`,tooltipKey:`fieldProps.tooltip.naiveBlockquote`,editor:()=>Promise.resolve().then(()=>(Pm(),Mm)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{text:`text`},nameKey:`elements.naiveBlockquote.name`,descriptionKey:`elements.naiveBlockquote.description`}},Kh(1,`i-lucide-heading-1`,`fieldProps.tooltip.naiveH1`,()=>Promise.resolve().then(()=>(Wm(),Hm))),Kh(2,`i-lucide-heading-2`,`fieldProps.tooltip.naiveH2`,()=>Promise.resolve().then(()=>(Ym(),qm))),Kh(3,`i-lucide-heading-3`,`fieldProps.tooltip.naiveH3`,()=>Promise.resolve().then(()=>(eh(),Qm))),Kh(4,`i-lucide-heading-4`,`fieldProps.tooltip.naiveH4`,()=>Promise.resolve().then(()=>(ah(),rh))),Kh(5,`i-lucide-heading-5`,`fieldProps.tooltip.naiveH5`,()=>Promise.resolve().then(()=>(uh(),ch))),Kh(6,`i-lucide-heading-6`,`fieldProps.tooltip.naiveH6`,()=>Promise.resolve().then(()=>(hh(),ph))),{type:`naiveUl`,category:`static`,icon:`i-lucide-list`,tooltipKey:`fieldProps.tooltip.naiveUl`,editor:()=>Promise.resolve().then(()=>(bh(),vh)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,options:[`Item 1`,`Item 2`,`Item 3`],nameKey:`elements.naiveUl.name`,descriptionKey:`elements.naiveUl.description`}},{type:`naiveOl`,category:`static`,icon:`i-lucide-list`,tooltipKey:`fieldProps.tooltip.naiveOl`,editor:()=>Promise.resolve().then(()=>(Th(),Ch)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,options:[`Item 1`,`Item 2`,`Item 3`],nameKey:`elements.naiveOl.name`,descriptionKey:`elements.naiveOl.description`}},{type:`naiveLi`,category:`static`,icon:`i-lucide-list`,tooltipKey:`fieldProps.tooltip.naiveLi`,editor:()=>Promise.resolve().then(()=>(Ah(),Oh)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,value:`List Item`,nameKey:`elements.naiveLi.name`,descriptionKey:`elements.naiveLi.description`}},{type:`naiveDivider`,category:`static`,icon:`i-lucide-sliders-horizontal`,tooltipKey:`fieldProps.tooltip.naiveDivider`,editor:()=>Promise.resolve().then(()=>(Fh(),Nh)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{title:`Divider`,titlePlacement:`center`,dashed:!1,vertical:!1},nameKey:`elements.naiveDivider.name`,descriptionKey:`elements.naiveDivider.description`}},{type:`naiveAlert`,category:`static`,icon:`i-lucide-triangle-alert`,tooltipKey:`fieldProps.tooltip.naiveAlert`,editor:()=>Promise.resolve().then(()=>(Bh(),Rh)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{title:`Title`,content:`Alert`,theme:`default`,closable:!1,bordered:!1,showIcon:!0},nameKey:`elements.naiveAlert.name`,labelKey:`elements.naiveAlert.label`,descriptionKey:`elements.naiveAlert.description`}},{type:`naiveBackTop`,category:`static`,icon:`i-lucide-arrow-up-to-line`,tooltipKey:`fieldProps.tooltip.naiveBackTop`,editor:()=>Promise.resolve().then(()=>(Gh(),Uh)),schema:{renderAs:`cmp`,outerClass:`col-span-12`,props:{show:!0,right:40,bottom:40,visibilityHeight:0},nameKey:`elements.naiveBackTop.name`,descriptionKey:`elements.naiveBackTop.description`}}]})),Yh,Xh=a((()=>{xu(),Yh=(0,t.defineComponent)({__name:`ListEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(bu))}})})),Zh=o({default:()=>Qh}),Qh,$h=a((()=>{Xh(),Xh(),Qh=Yh})),eg,tg=a((()=>{xu(),eg=(0,t.defineComponent)({__name:`InputGroupEditor`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(bu))}})})),ng=o({default:()=>rg}),rg,ig=a((()=>{tg(),tg(),rg=eg})),ag,og=a((()=>{M(),Fu(),zu(),ag=(0,t.defineComponent)({__name:`ButtonGroupEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`size`,`medium`),i=n(`vertical`,!1),a=n(`disabled`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(Pu,{label:`size`,value:(0,t.unref)(r),options:[{label:`tiny`,value:`tiny`},{label:`small`,value:`small`},{label:`medium`,value:`medium`},{label:`large`,value:`large`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`vertical`,value:(0,t.unref)(i),"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`disabled`,value:(0,t.unref)(a),"onUpdate:value":n[2]||=e=>a.value=e},null,8,[`value`])],64))}})})),sg=o({default:()=>cg}),cg,lg=a((()=>{og(),og(),cg=ag})),ug,dg=a((()=>{M(),xu(),Fu(),zu(),ug=(0,t.defineComponent)({__name:`CardEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`size`,`medium`),i=n(`bordered`,!0),a=n(`embedded`,!1),o=n(`hoverable`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(Pu,{label:`size`,value:(0,t.unref)(r),options:[{label:`small`,value:`small`},{label:`medium`,value:`medium`},{label:`large`,value:`large`},{label:`huge`,value:`huge`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`bordered`,value:(0,t.unref)(i),"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`embedded`,value:(0,t.unref)(a),"onUpdate:value":n[2]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`hoverable`,value:(0,t.unref)(o),"onUpdate:value":n[3]||=e=>o.value=e},null,8,[`value`])],64))}})})),fg=o({default:()=>pg}),pg,mg=a((()=>{dg(),dg(),pg=ug})),hg,gg=a((()=>{xu(),Fu(),zu(),M(),hg=(0,t.defineComponent)({__name:`TabsEditor`,setup(e){let{createPropsProp:n}=j(),r=n(`type`,`line`),i=n(`placement`,`top`),a=n(`size`,`medium`),o=n(`animated`,!0),s=n(`closable`,!1);return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(bu),(0,t.createVNode)(Pu,{label:`type`,value:(0,t.unref)(r),options:[{label:`line`,value:`line`},{label:`bar`,value:`bar`},{label:`segment`,value:`segment`},{label:`card`,value:`card`}],"onUpdate:value":n[0]||=e=>r.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`placement`,value:(0,t.unref)(i),options:[{label:`top`,value:`top`},{label:`bottom`,value:`bottom`},{label:`left`,value:`left`},{label:`right`,value:`right`}],"onUpdate:value":n[1]||=e=>i.value=e},null,8,[`value`]),(0,t.createVNode)(Pu,{label:`size`,value:(0,t.unref)(a),options:[{label:`small`,value:`small`},{label:`medium`,value:`medium`},{label:`large`,value:`large`}],"onUpdate:value":n[2]||=e=>a.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`animated`,value:(0,t.unref)(o),"onUpdate:value":n[3]||=e=>o.value=e},null,8,[`value`]),(0,t.createVNode)(P,{label:`closable`,value:(0,t.unref)(s),"onUpdate:value":n[4]||=e=>s.value=e},null,8,[`value`])],64))}})})),_g=o({default:()=>vg}),vg,yg=a((()=>{gg(),gg(),vg=hg})),bg,xg=a((()=>{Ms(),bg=[{type:`list`,category:`container`,icon:`i-lucide-list-tree`,tooltipKey:`fieldProps.tooltip.list`,editor:()=>Promise.resolve().then(()=>($h(),Zh)),container:As(`list`)??void 0,schema:{renderAs:`cmp`,nameKey:`elements.list.name`,labelKey:`elements.list.label`,outerClass:`col-span-12`,props:{showActions:!1},descriptionKey:`elements.list.description`}},{type:`inputGroup`,category:`container`,icon:`i-lucide-align-horizontal-justify-start`,tooltipKey:`fieldProps.tooltip.inputGroup`,editor:()=>Promise.resolve().then(()=>(ig(),ng)),container:As(`inputGroup`)??void 0,schema:{renderAs:`cmp`,nameKey:`elements.inputGroup.name`,labelKey:`elements.inputGroup.label`,outerClass:`col-span-12`,props:{},descriptionKey:`elements.inputGroup.description`}},{type:`buttonGroup`,category:`container`,icon:`i-lucide-rectangle-horizontal`,tooltipKey:`fieldProps.tooltip.buttonGroup`,editor:()=>Promise.resolve().then(()=>(lg(),sg)),container:As(`buttonGroup`)??void 0,schema:{renderAs:`cmp`,nameKey:`elements.buttonGroup.name`,outerClass:`col-span-12`,props:{size:`medium`,vertical:!1,disabled:!1},descriptionKey:`elements.buttonGroup.description`}},{type:`card`,category:`layout`,icon:`i-lucide-credit-card`,tooltipKey:`fieldProps.tooltip.card`,editor:()=>Promise.resolve().then(()=>(mg(),fg)),container:As(`card`)??void 0,schema:{renderAs:`cmp`,nameKey:`elements.card.name`,labelKey:`elements.card.label`,outerClass:`col-span-12`,props:{size:`medium`,bordered:!0,embedded:!1,hoverable:!1},descriptionKey:`elements.card.description`}},{type:`tabs`,category:`layout`,icon:`i-lucide-panel-top`,tooltipKey:`fieldProps.tooltip.tabs`,editor:()=>Promise.resolve().then(()=>(yg(),_g)),container:As(`tabs`)??void 0,schema:{renderAs:`cmp`,nameKey:`elements.tabs.name`,labelKey:`elements.tabs.label`,outerClass:`col-span-12`,props:{},descriptionKey:`elements.tabs.description`}}]})),Sg,Cg=a((()=>{Sg=(0,t.defineComponent)({__name:`GroupEditor`,setup(e){return(e,t)=>null}})})),wg=o({default:()=>Tg}),Tg,Eg=a((()=>{Cg(),Cg(),Tg=Sg}));function Dg(){if(!Og){Og=!0;for(let e of[...rm,...qh,...bg])Dc(Nc(e));Dc(Fc(`group`,{dataType:`object`,icon:`i-lucide-group`,tooltipKey:`fieldProps.tooltip.group`,editor:()=>Promise.resolve().then(()=>(Eg(),wg)),template:{renderAs:`cmp`,nameKey:`elements.group.name`,outerClass:`col-span-12`,props:{},descriptionKey:`elements.group.description`}})),Dc(Ic(`grid`,{target:`div`})),Dc(Ic(`row`,{target:`div`})),Dc(Ic(`column`,{target:`div`})),Dc(Rc()),Dc(Lc(`button`,{match:e=>e.$el===`button`})),Dc(Lc(`paragraph`,{match:e=>e.$el===`p`})),Dc(Lc(`heading`,{match:e=>/^h[1-6]$/.test(String(e.$el))})),Dc(Lc(`divider`,{match:e=>e.$el===`hr`}))}}var Og,kg=a((()=>{Vc(),im(),Jh(),xg(),Og=!1}));Vc(),kg(),Dg();var Ag=new Map;function jg(e){let n=Oc(e??void 0);if(!n?.editor)return null;let r=Ag.get(e);if(r)return r;let i=(0,t.defineAsyncComponent)(n.editor);return Ag.set(e,i),i}function Mg(e){return kc().filter(e=>e.template&&e.icon).map(t=>({name:t.type,tooltip:e(t.tooltipKey??``),icon:t.icon,category:t.category}))}Mg(e=>e);function Ng(e,t){let n=e.defaults(),r=e.template;r.nameKey&&(n.name=t(r.nameKey)),r.labelKey&&(n.label=t(r.labelKey));let i={...n.props};return r.placeholderKey&&(i.placeholder=t(r.placeholderKey)),r.helpKey&&(i.help=t(r.helpKey)),r.labelKey&&e.category===`static`&&(e.type===`submit`||e.type===`reset`||e.type===`naiveButton`)&&(i.text=t(r.labelKey)),n.props=Object.keys(i).length?i:void 0,n}function Pg(e){let t=[];for(let n of kc()){if(!n.template)continue;let r=Ng(n,e),i=n.toSchema(r,{});i.description=e(n.template.descriptionKey),t.push(i)}return t}function Fg(e){let t=e;if(!(!t||typeof t!=`object`)){for(let e of kc())if(e.match?.(t))return e.type}}var Ig=new Set([`context`,`key`,`__key`,`__bind`,`outerClass`,`value`,`modelValue`,`name`,`label`,`help`,`disabled`,`type`,`validation`,`validation-messages`,`validationMessages`,`config`,`plugins`,`__root`,`__slots`,`_value`,`if`,`children`]);function Lg(e,n={}){let r=new Set(n.omit??[]),i=(0,t.reactive)({});return(0,t.watchEffect)(()=>{let t=e?.attrs,n=t&&typeof t==`object`?t:{};for(let e of Object.keys(i))e in n||delete i[e];Object.assign(i,n)}),{config:i,props:(0,t.computed)(()=>{let e={};for(let[t,n]of Object.entries(i))Ig.has(t)||r.has(t)||n===void 0||(e[t]=n);return e}),bind:(0,t.computed)(()=>typeof i.__bind==`object`&&i.__bind?i.__bind:{})}}function Rg(e,t){return function(){return e.apply(t,arguments)}}var{toString:zg}=Object.prototype,{getPrototypeOf:Bg}=Object,{iterator:Vg,toStringTag:Hg}=Symbol,Ug=(e=>t=>{let n=zg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wg=e=>(e=e.toLowerCase(),t=>Ug(t)===e),Gg=e=>t=>typeof t===e,{isArray:Kg}=Array,qg=Gg(`undefined`);function Jg(e){return e!==null&&!qg(e)&&e.constructor!==null&&!qg(e.constructor)&&Qg(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Yg=Wg(`ArrayBuffer`);function Xg(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Yg(e.buffer),t}var Zg=Gg(`string`),Qg=Gg(`function`),$g=Gg(`number`),e_=e=>typeof e==`object`&&!!e,t_=e=>e===!0||e===!1,n_=e=>{if(Ug(e)!==`object`)return!1;let t=Bg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Hg in e)&&!(Vg in e)},r_=e=>{if(!e_(e)||Jg(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},i_=Wg(`Date`),a_=Wg(`File`),o_=e=>!!(e&&e.uri!==void 0),s_=e=>e&&e.getParts!==void 0,c_=Wg(`Blob`),l_=Wg(`FileList`),u_=e=>e_(e)&&Qg(e.pipe);function d_(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var f_=d_(),p_=f_.FormData===void 0?void 0:f_.FormData,m_=e=>{if(!e)return!1;if(p_&&e instanceof p_)return!0;let t=Bg(e);if(!t||t===Object.prototype||!Qg(e.append))return!1;let n=Ug(e);return n===`formdata`||n===`object`&&Qg(e.toString)&&e.toString()===`[object FormData]`},h_=Wg(`URLSearchParams`),[g_,__,v_,y_]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Wg),b_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function x_(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),Kg(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Jg(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function S_(e,t){if(Jg(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var C_=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,w_=e=>!qg(e)&&e!==C_;function T_(){let{caseless:e,skipUndefined:t}=w_(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&S_(n,i)||i;n_(n[a])&&n_(r)?n[a]=T_(n[a],r):n_(r)?n[a]=T_({},r):Kg(r)?n[a]=r.slice():(!t||!qg(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x_(arguments[e],r);return n}var E_=(e,t,n,{allOwnKeys:r}={})=>(x_(t,(t,r)=>{n&&Qg(t)?Object.defineProperty(e,r,{value:Rg(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),D_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),O_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},k_=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Bg(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},A_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},j_=e=>{if(!e)return null;if(Kg(e))return e;let t=e.length;if(!$g(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},M_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Bg(Uint8Array)),N_=(e,t)=>{let n=(e&&e[Vg]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},P_=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},F_=Wg(`HTMLFormElement`),I_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),L_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),R_=Wg(`RegExp`),z_=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};x_(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},B_=e=>{z_(e,(t,n)=>{if(Qg(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(Qg(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},V_=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Kg(e)?r(e):r(String(e).split(t)),n},H_=()=>{},U_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function W_(e){return!!(e&&Qg(e.append)&&e[Hg]===`FormData`&&e[Vg])}var G_=e=>{let t=Array(10),n=(e,r)=>{if(e_(e)){if(t.indexOf(e)>=0)return;if(Jg(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=Kg(e)?[]:{};return x_(e,(e,t)=>{let a=n(e,r+1);!qg(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},K_=Wg(`AsyncFunction`),q_=e=>e&&(e_(e)||Qg(e))&&Qg(e.then)&&Qg(e.catch),J_=((e,t)=>e?setImmediate:t?((e,t)=>(C_.addEventListener(`message`,({source:n,data:r})=>{n===C_&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),C_.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Qg(C_.postMessage)),F={isArray:Kg,isArrayBuffer:Yg,isBuffer:Jg,isFormData:m_,isArrayBufferView:Xg,isString:Zg,isNumber:$g,isBoolean:t_,isObject:e_,isPlainObject:n_,isEmptyObject:r_,isReadableStream:g_,isRequest:__,isResponse:v_,isHeaders:y_,isUndefined:qg,isDate:i_,isFile:a_,isReactNativeBlob:o_,isReactNative:s_,isBlob:c_,isRegExp:R_,isFunction:Qg,isStream:u_,isURLSearchParams:h_,isTypedArray:M_,isFileList:l_,forEach:x_,merge:T_,extend:E_,trim:b_,stripBOM:D_,inherits:O_,toFlatObject:k_,kindOf:Ug,kindOfTest:Wg,endsWith:A_,toArray:j_,forEachEntry:N_,matchAll:P_,isHTMLForm:F_,hasOwnProperty:L_,hasOwnProp:L_,reduceDescriptors:z_,freezeMethods:B_,toObjectSet:V_,toCamelCase:I_,noop:H_,toFiniteNumber:U_,findKey:S_,global:C_,isContextDefined:w_,isSpecCompliantForm:W_,toJSONObject:G_,isAsyncFn:K_,isThenable:q_,setImmediate:J_,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(C_):typeof process<`u`&&process.nextTick||J_,isIterable:e=>e!=null&&Qg(e[Vg])},I=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}};I.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,I.ERR_BAD_OPTION=`ERR_BAD_OPTION`,I.ECONNABORTED=`ECONNABORTED`,I.ETIMEDOUT=`ETIMEDOUT`,I.ERR_NETWORK=`ERR_NETWORK`,I.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,I.ERR_DEPRECATED=`ERR_DEPRECATED`,I.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,I.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,I.ERR_CANCELED=`ERR_CANCELED`,I.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,I.ERR_INVALID_URL=`ERR_INVALID_URL`,I.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Y_(e){return F.isPlainObject(e)||F.isArray(e)}function X_(e){return F.endsWith(e,`[]`)?e.slice(0,-2):e}function Z_(e,t,n){return e?e.concat(t).map(function(e,t){return e=X_(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Q_(e){return F.isArray(e)&&!e.some(Y_)}var $_=F.toFlatObject(F,{},null,function(e){return/^is[A-Z]/.test(e)});function ev(e,t,n){if(!F.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!F.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(F.isDate(e))return e.toISOString();if(F.isBoolean(e))return e.toString();if(!l&&F.isBlob(e))throw new I(`Blob is not supported. Use a Buffer instead.`);return F.isArrayBuffer(e)||F.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(F.isReactNative(t)&&F.isReactNativeBlob(e))return t.append(Z_(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(F.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&Q_(e)||(F.isFileList(e)||F.endsWith(n,`[]`))&&(s=F.toArray(e)))return n=X_(n),s.forEach(function(e,r){!(F.isUndefined(e)||e===null)&&t.append(o===!0?Z_([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return Y_(e)?!0:(t.append(Z_(i,n,a),u(e)),!1)}let f=[],p=Object.assign($_,{defaultVisitor:d,convertValue:u,isVisitable:Y_});function m(e,n,r=0){if(!F.isUndefined(e)){if(r>c)throw new I(`Object is too deeply nested (`+r+` levels). Max depth: `+c,I.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),F.forEach(e,function(e,a){(!(F.isUndefined(e)||e===null)&&i.call(t,e,F.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!F.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function tv(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function nv(e,t){this._pairs=[],e&&ev(e,this,t)}var rv=nv.prototype;rv.append=function(e,t){this._pairs.push([e,t])},rv.toString=function(e){let t=e?function(t){return e.call(this,t,tv)}:tv;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function iv(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function av(e,t,n){if(!t)return e;let r=n&&n.encode||iv,i=F.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):F.isURLSearchParams(t)?t.toString():new nv(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var ov=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){F.forEach(this.handlers,function(t){t!==null&&e(t)})}},sv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},cv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:nv,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},lv=o({hasBrowserEnv:()=>uv,hasStandardBrowserEnv:()=>fv,hasStandardBrowserWebWorkerEnv:()=>pv,navigator:()=>dv,origin:()=>mv}),uv=typeof window<`u`&&typeof document<`u`,dv=typeof navigator==`object`&&navigator||void 0,fv=uv&&(!dv||[`ReactNative`,`NativeScript`,`NS`].indexOf(dv.product)<0),pv=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,mv=uv&&window.location.href||`http://localhost`,hv={...lv,...cv};function gv(e,t){return ev(e,new hv.classes.URLSearchParams,{visitor:function(e,t,n,r){return hv.isNode&&F.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function _v(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function vv(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function yv(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&F.isArray(r)?r.length:a,s?(F.hasOwnProp(r,a)?r[a]=F.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!r[a]||!F.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&F.isArray(r[a])&&(r[a]=vv(r[a])),!o)}if(F.isFormData(e)&&F.isFunction(e.entries)){let n={};return F.forEachEntry(e,(e,r)=>{t(_v(e),r,n,0)}),n}return null}var bv=(e,t)=>e!=null&&F.hasOwnProp(e,t)?e[t]:void 0;function xv(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Sv={transitional:sv,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=F.isObject(e);if(i&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return r?JSON.stringify(yv(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e)||F.isReadableStream(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=bv(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return gv(e,t).toString();if((a=F.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=bv(this,`env`),r=n&&n.FormData;return ev(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),xv(e)):e}],transformResponse:[function(e){let t=bv(this,`transitional`)||Sv.transitional,n=t&&t.forcedJSONParsing,r=bv(this,`responseType`),i=r===`json`;if(F.isResponse(e)||F.isReadableStream(e))return e;if(e&&F.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,bv(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?I.from(e,I.ERR_BAD_RESPONSE,this,null,bv(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:hv.classes.FormData,Blob:hv.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};F.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{Sv.headers[e]={}});var Cv=F.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),wv=e=>{let t={},n,r,i;return e&&e.split(`
|
|
2
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Cv[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},Tv=Symbol(`internals`),Ev=/[^\x09\x20-\x7E\x80-\xFF]/g;function Dv(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function Ov(e){return e&&String(e).trim().toLowerCase()}function kv(e){return Dv(e.replace(Ev,``))}function Av(e){return e===!1||e==null?e:F.isArray(e)?e.map(Av):kv(String(e))}function jv(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Mv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nv(e,t,n,r,i){if(F.isFunction(r))return r.call(this,t,n);if(i&&(t=n),F.isString(t)){if(F.isString(r))return t.indexOf(r)!==-1;if(F.isRegExp(r))return r.test(t)}}function Pv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Fv(e,t){let n=F.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var Iv=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Ov(t);if(!i)throw Error(`header name must be a non-empty string`);let a=F.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Av(e))}let a=(e,t)=>F.forEach(e,(e,n)=>i(e,n,t));if(F.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(F.isString(e)&&(e=e.trim())&&!Mv(e))a(wv(e),t);else if(F.isObject(e)&&F.isIterable(e)){let n={},r,i;for(let t of e){if(!F.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?F.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Ov(e),e){let n=F.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return jv(e);if(F.isFunction(t))return t.call(this,e,n);if(F.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Ov(e),e){let n=F.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Nv(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Ov(e),e){let i=F.findKey(n,e);i&&(!t||Nv(n,n[i],i,t))&&(delete n[i],r=!0)}}return F.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Nv(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return F.forEach(this,(r,i)=>{let a=F.findKey(n,i);if(a){t[a]=Av(r),delete t[i];return}let o=e?Pv(i):String(i).trim();o!==i&&delete t[i],t[o]=Av(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return F.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&F.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Tv]=this[Tv]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Ov(e);t[r]||(Fv(n,e),t[r]=!0)}return F.isArray(e)?e.forEach(r):r(e),this}};Iv.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),F.reduceDescriptors(Iv.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),F.freezeMethods(Iv);function Lv(e,t){let n=this||Sv,r=t||n,i=Iv.from(r.headers),a=r.data;return F.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Rv(e){return!!(e&&e.__CANCEL__)}var zv=class extends I{constructor(e,t,n){super(e??`canceled`,I.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Bv(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new I(`Request failed with status code `+n.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Vv(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function Hv(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Uv(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Wv=(e,t,n=3)=>{let r=0,i=Hv(50,250);return Uv(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Gv=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kv=e=>(...t)=>F.asap(()=>e(...t)),qv=hv.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,hv.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(hv.origin),hv.navigator&&/(msie|trident)/i.test(hv.navigator.userAgent)):()=>!0,Jv=hv.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];F.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),F.isString(r)&&s.push(`path=${r}`),F.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),F.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Yv(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Xv(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Zv(e,t,n){let r=!Yv(t);return e&&(r||n===!1)?Xv(e,t):t}var Qv=e=>e instanceof Iv?{...e}:e;function $v(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,n,i){if(!F.isUndefined(t))return r(e,t,n,i);if(!F.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!F.isUndefined(t))return r(void 0,t)}function o(e,t){if(!F.isUndefined(t))return r(void 0,t);if(!F.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(F.hasOwnProp(t,a))return r(n,i);if(F.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Qv(e),Qv(t),n,!0)};return F.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=F.hasOwnProp(c,r)?c[r]:i,o=a(F.hasOwnProp(e,r)?e[r]:void 0,F.hasOwnProp(t,r)?t[r]:void 0,r);F.isUndefined(o)&&a!==s||(n[r]=o)}),n}var ey=e=>{let t=$v({},e),n=e=>F.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=Iv.from(s),t.url=av(Zv(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?unescape(encodeURIComponent(c.password)):``))),F.isFormData(r)){if(hv.hasStandardBrowserEnv||hv.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(F.isFunction(r.getHeaders)){let e=r.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}}if(hv.hasStandardBrowserEnv&&(F.isFunction(i)&&(i=i(t)),i===!0||i==null&&qv(t.url))){let e=a&&o&&Jv.read(o);e&&s.set(a,e)}return t},ty=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=ey(e),i=r.data,a=Iv.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=Iv.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Bv(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new I(`Request aborted`,I.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new I(t&&t.message?t.message:`Network Error`,I.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||sv;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new I(t,i.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&F.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),F.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Wv(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Wv(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new zv(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Vv(r.url);if(_&&hv.protocols.indexOf(_)===-1){n(new I(`Unsupported protocol `+_+`:`,I.ERR_BAD_REQUEST,e));return}h.send(i||null)})},ny=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof I?t:new zv(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new I(`timeout of ${t}ms exceeded`,I.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>F.asap(o),s}},ry=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},iy=async function*(e,t){for await(let n of ay(e))yield*ry(n,t)},ay=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},oy=(e,t,n,r)=>{let i=iy(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},sy=64*1024,{isFunction:cy}=F,ly=(({Request:e,Response:t})=>({Request:e,Response:t}))(F.global),{ReadableStream:uy,TextEncoder:dy}=F.global,fy=(e,...t)=>{try{return!!e(...t)}catch{return!1}},py=e=>{e=F.merge.call({skipUndefined:!0},ly,e);let{fetch:t,Request:n,Response:r}=e,i=t?cy(t):typeof fetch==`function`,a=cy(n),o=cy(r);if(!i)return!1;let s=i&&cy(uy),c=i&&(typeof dy==`function`?(e=>t=>e.encode(t))(new dy):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&fy(()=>{let e=!1,t=new n(hv.origin,{body:new uy,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),u=o&&s&&fy(()=>F.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new I(`Response type '${e}' is not supported`,I.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new n(hv.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(F.isArrayBufferView(e)||F.isArrayBuffer(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e+=``),F.isString(e))return(await c(e)).byteLength},p=async(e,t)=>F.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=ey(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=ny([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),ee;try{if(g&&l&&o!==`get`&&o!==`head`&&(ee=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(F.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=Gv(ee,Wv(Kv(g)));s=oy(e.body,sy,t,n)}}F.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype;if(F.isFormData(s)){let e=v.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&v.delete(`content-type`)}let c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=F.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Gv(t,Wv(Kv(h),!0))||[];f=new r(oy(f.body,sy,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let te=await d[F.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{Bv(t,n,{data:te,headers:Iv.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new I(`Network Error`,I.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):I.from(t,t&&t.code,e,C,t&&t.response)}}},my=new Map,hy=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=my;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:py(t)),l=c;return c};hy();var gy={http:null,xhr:ty,fetch:{get:hy}};F.forEach(gy,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var _y=e=>`- ${e}`,vy=e=>F.isFunction(e)||e===null||e===!1;function yy(e,t){e=F.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!vy(r)&&(i=gy[(n=String(r)).toLowerCase()],i===void 0))throw new I(`Unknown adapter '${n}'`);if(i&&(F.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new I(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
4
|
+
`+e.map(_y).join(`
|
|
5
|
+
`):` `+_y(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var by={getAdapter:yy,adapters:gy};function xy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zv(null,e)}function Sy(e){return xy(e),e.headers=Iv.from(e.headers),e.data=Lv.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),by.getAdapter(e.adapter||Sv.adapter,e)(e).then(function(t){return xy(e),t.data=Lv.call(e,e.transformResponse,t),t.headers=Iv.from(t.headers),t},function(t){return Rv(t)||(xy(e),t&&t.response&&(t.response.data=Lv.call(e,e.transformResponse,t.response),t.response.headers=Iv.from(t.response.headers))),Promise.reject(t)})}var Cy=`1.15.2`,wy={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{wy[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Ty={};wy.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Cy+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new I(r(i,` has been removed`+(t?` in `+t:``)),I.ERR_DEPRECATED);return t&&!Ty[i]&&(Ty[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},wy.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ey(e,t,n){if(typeof e!=`object`)throw new I(`options must be an object`,I.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new I(`option `+a+` must be `+n,I.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new I(`Unknown option `+a,I.ERR_BAD_OPTION)}}var Dy={assertOptions:Ey,validators:wy},Oy=Dy.validators,ky=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ov,response:new ov}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
|
6
|
+
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
7
|
+
`),r=t===-1?-1:n.indexOf(`
|
|
8
|
+
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
9
|
+
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=$v(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Dy.assertOptions(n,{silentJSONParsing:Oy.transitional(Oy.boolean),forcedJSONParsing:Oy.transitional(Oy.boolean),clarifyTimeoutError:Oy.transitional(Oy.boolean),legacyInterceptorReqResOrdering:Oy.transitional(Oy.boolean)},!1),r!=null&&(F.isFunction(r)?t.paramsSerializer={serialize:r}:Dy.assertOptions(r,{encode:Oy.function,serialize:Oy.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Dy.assertOptions(t,{baseUrl:Oy.spelling(`baseURL`),withXsrfToken:Oy.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&F.merge(i.common,i[t.method]);i&&F.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=Iv.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||sv;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Sy.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Sy.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=$v(this.defaults,e),av(Zv(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};F.forEach([`delete`,`get`,`head`,`options`],function(e){ky.prototype[e]=function(t,n){return this.request($v(n||{},{method:e,url:t,data:(n||{}).data}))}}),F.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request($v(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}ky.prototype[e]=t(),ky.prototype[e+`Form`]=t(!0)});var Ay=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new zv(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function jy(e){return function(t){return e.apply(null,t)}}function My(e){return F.isObject(e)&&e.isAxiosError===!0}var Ny={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ny).forEach(([e,t])=>{Ny[t]=e});function Py(e){let t=new ky(e),n=Rg(ky.prototype.request,t);return F.extend(n,ky.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Py($v(e,t))},n}var Fy=Py(Sv);Fy.Axios=ky,Fy.CanceledError=zv,Fy.CancelToken=Ay,Fy.isCancel=Rv,Fy.VERSION=Cy,Fy.toFormData=ev,Fy.AxiosError=I,Fy.Cancel=Fy.CanceledError,Fy.all=function(e){return Promise.all(e)},Fy.spread=jy,Fy.isAxiosError=My,Fy.mergeConfig=$v,Fy.AxiosHeaders=Iv,Fy.formToJSON=e=>yv(F.isHTMLForm(e)?new FormData(e):e),Fy.getAdapter=by.getAdapter,Fy.HttpStatusCode=Ny,Fy.default=Fy;async function Iy(e,t,n,r,i,a){let{form:o,attrs:s,$value:c,$node:l,$name:u,$get:d,$slots:f}=n;return await Function(`event`,`form`,`id`,`version`,`$value`,`$node`,`$name`,`$get`,`$slots`,`attrs`,`ctx`,`extra`,`axios`,`"use strict";
|
|
10
|
+
return (async () => {
|
|
11
|
+
${e}
|
|
12
|
+
})()`)(t,o,r,i,c,l,u,d,f,s,n,a,Fy)}M();var Ly={key:1,class:`text-xs text-muted-foreground`},Ry={key:1,class:`text-xs text-muted-foreground`},zy=(0,t.defineComponent)({__name:`NaiveTextInput`,props:{context:{}},setup(e){let{config:r,props:i,bind:a}=Lg(e.context,{omit:[`prefix`,`suffix`]}),{formId:o,formVersion:s}=Ql(),c=(0,t.computed)(()=>!!(e.context.disabled??!1)),l=(0,t.computed)(()=>e.context.type===`password`?`password`:`text`),u=(0,t.computed)(()=>String(r.prefix??``).trim()),d=(0,t.computed)(()=>String(r.suffix??``).trim()),f=e=>e.startsWith(`i-`),p=(0,t.computed)(()=>!!(r.pair??!1)),m=(0,t.computed)(()=>r.separator??`-`),h=(0,t.computed)(()=>{let t=e.context._value;if(!p.value)return t??``;if(Array.isArray(t)){let e=t[0]??``,n=t[1]??``;return[String(e),String(n)]}if(typeof t==`string`){let e=t.split(m.value);return[e[0]??``,e[1]??``]}return[``,``]}),g=async(t,n)=>{let r=a.value[t];typeof r!=`string`||!r.trim()||await Iy(r,n,e.context,o.value,s.value)};async function _(t){e.context.node.input(t),await g(`onInput`,t),await g(`onChange`,t)}let v=async e=>{await g(`onFocus`,e)},y=async t=>{await g(`onBlur`,t),e.context.handlers.blur(t)};return(r,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),(0,t.mergeProps)((0,t.unref)(i),{value:h.value,type:l.value,disabled:c.value,"input-props":{id:e.context.id},pair:p.value,separator:m.value,"onUpdate:value":_,onFocus:v,onBlur:y}),(0,t.createSlots)({_:2},[u.value?{name:`prefix`,fn:(0,t.withCtx)(()=>[f(u.value)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([u.value,`h-4 w-4`])},null,2)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ly,(0,t.toDisplayString)(u.value),1))]),key:`0`}:void 0,d.value?{name:`suffix`,fn:(0,t.withCtx)(()=>[f(d.value)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([d.value,`h-4 w-4`])},null,2)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ry,(0,t.toDisplayString)(d.value),1))]),key:`1`}:void 0]),1040,[`value`,`type`,`disabled`,`input-props`,`pair`,`separator`]))}}),By={key:1,class:`text-xs text-muted-foreground`},Vy={key:1,class:`text-xs text-muted-foreground`},Hy=(0,t.defineComponent)({__name:`NaiveTextarea`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`prefix`,`suffix`]}),a=(0,t.computed)(()=>!!(e.context.disabled??!1)),o=(0,t.computed)(()=>String(r.prefix??``).trim()),s=(0,t.computed)(()=>String(r.suffix??``).trim()),c=e=>e.startsWith(`i-`),l=(0,t.computed)(()=>e.context._value??``);function u(t){e.context.node.input(t)}return(r,d)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),(0,t.mergeProps)((0,t.unref)(i),{value:l.value,type:`textarea`,disabled:a.value,"input-props":{id:e.context.id},"onUpdate:value":u,onBlur:e.context.handlers.blur}),(0,t.createSlots)({_:2},[o.value?{name:`prefix`,fn:(0,t.withCtx)(()=>[c(o.value)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([o.value,`h-4 w-4`])},null,2)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,By,(0,t.toDisplayString)(o.value),1))]),key:`0`}:void 0,s.value?{name:`suffix`,fn:(0,t.withCtx)(()=>[c(s.value)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([s.value,`h-4 w-4`])},null,2)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Vy,(0,t.toDisplayString)(s.value),1))]),key:`1`}:void 0]),1040,[`value`,`disabled`,`input-props`,`onBlur`]))}}),Uy=(0,t.defineComponent)({__name:`NaiveNumberInput`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e??`medium`}),o=(0,t.computed)(()=>r.clearable??!0),s=(0,t.computed)(()=>!!(e.context.disabled??!1)),c=(0,t.computed)(()=>{let e=r.step;if(e===void 0)return;if(typeof e==`number`)return e;let t=Number(e);return Number.isFinite(t)?t:void 0}),l=(0,t.computed)(()=>{let t=e.context._value;if(t==null||t===``)return null;let n=typeof t==`number`?t:Number(t);return Number.isFinite(n)?n:null});function u(t){e.context.node.input(t)}return(r,d)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInputNumber),(0,t.mergeProps)((0,t.unref)(i),{value:l.value,size:a.value,clearable:o.value,disabled:s.value,step:c.value,"input-props":{id:e.context.id},"onUpdate:value":u,onBlur:e.context.handlers.blur}),null,16,[`value`,`size`,`clearable`,`disabled`,`step`,`input-props`,`onBlur`]))}});xd();function Wy(e){let{fetchDictionary:n}=bd(),r=(0,t.computed)(()=>yd(e.value)),i=(0,t.computed)(()=>r.value!==null),a=(0,t.ref)([]),o=(0,t.ref)();return(0,t.watch)(r,async e=>{if(!e){a.value=[],o.value=void 0;return}if(!n){a.value=[];return}try{a.value=await n(e.code),o.value=void 0}catch(e){a.value=[],o.value=e?.message}},{immediate:!0}),{isDynamic:i,dynamicOptions:a,dynamicLoadError:o}}var Gy=(0,t.defineComponent)({__name:`NaiveSelect`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>r.size??`medium`),o=(0,t.computed)(()=>r.clearable??!0),s=(0,t.computed)(()=>!!(e.context.disabled??!1)),c=(0,t.computed)(()=>r.multiple??!1),l=(0,t.computed)(()=>i.value.options),{isDynamic:u,dynamicOptions:d}=Wy(l),f=(0,t.computed)(()=>{if(u.value)return d.value;let e=l.value;return Array.isArray(e)?e.reduce((e,t)=>{if(typeof t==`string`||typeof t==`number`)return e.push({label:String(t),value:t}),e;if(t&&typeof t==`object`){let n=t.value,r=t.label;(typeof n==`string`||typeof n==`number`)&&e.push({label:String(r??n),value:n})}return e},[]):[]}),p=(0,t.computed)(()=>{let t=e.context._value;return c.value?Array.isArray(t)?t.filter(e=>typeof e==`string`||typeof e==`number`):typeof t==`string`||typeof t==`number`?[t]:[]:typeof t==`string`||typeof t==`number`?t:Array.isArray(t)?t.find(e=>typeof e==`string`||typeof e==`number`)??null:null});function m(t){e.context.node.input(t)}return(r,c)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NSelect),(0,t.mergeProps)((0,t.unref)(i),{value:p.value,size:a.value,clearable:o.value,disabled:s.value,options:f.value,"input-props":{id:e.context.id},"onUpdate:value":m,onBlur:e.context.handlers.blur}),null,16,[`value`,`size`,`clearable`,`disabled`,`options`,`input-props`,`onBlur`]))}}),Ky=(0,t.defineComponent)({__name:`NaiveCheckboxGroup`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`horizontal`]}),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e===`small`||e===`medium`||e===`large`?e:`medium`}),o=(0,t.computed)(()=>!!(e.context.disabled??!1)),s=(0,t.computed)(()=>r.horizontal??!1),c=(0,t.computed)(()=>i.value.options),{isDynamic:l,dynamicOptions:u}=Wy(c),d=(0,t.computed)(()=>{if(l.value)return u.value;let e=c.value;return Array.isArray(e)?e.map(e=>{if(typeof e==`string`||typeof e==`number`)return{label:String(e),value:e};if(e&&typeof e==`object`){let t=e.value,n=e.label;if(t!==void 0)return{label:String(n??t),value:t}}return null}).filter(e=>e!==null):[]}),f=(0,t.computed)(()=>{let t=e.context._value;return Array.isArray(t)?t:t==null||t===``?[]:[t]});function p(t){e.context.node.input(t)}return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NCheckboxGroup),(0,t.mergeProps)((0,t.unref)(i),{value:f.value,disabled:o.value,size:a.value,"onUpdate:value":p}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(s.value?`flex flex-row flex-wrap gap-4 w-full py-1`:`flex flex-col gap-2 w-full py-1`)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,e=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NCheckbox),{key:String(e.value),value:e.value,label:e.label},null,8,[`value`,`label`]))),128))],2)]),_:1},16,[`value`,`disabled`,`size`]))}}),qy=(0,t.defineComponent)({__name:`NaiveRadioGroup`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`horizontal`]}),a=(0,t.computed)(()=>!!(e.context.disabled??!1)),o=(0,t.computed)(()=>r.horizontal??!1),s=(0,t.computed)(()=>i.value.options),{isDynamic:c,dynamicOptions:l}=Wy(s),u=(0,t.computed)(()=>{if(c.value)return l.value;let e=s.value;return Array.isArray(e)?e.map(e=>{if(typeof e==`string`||typeof e==`number`)return{label:String(e),value:e};if(e&&typeof e==`object`){let t=e.value,n=e.label;if(t!==void 0)return{label:String(n??t),value:t}}return null}).filter(e=>e!==null):[]}),d=(0,t.computed)(()=>e.context._value);function f(t){e.context.node.input(t)}return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NRadioGroup),(0,t.mergeProps)((0,t.unref)(i),{value:d.value,disabled:a.value,"onUpdate:value":f}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)(o.value?`flex flex-row flex-wrap gap-4 w-full py-1`:`flex flex-col gap-2 w-full py-1`)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(u.value,e=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NRadio),{key:String(e.value),value:e.value},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),_:2},1032,[`value`]))),128))],2)]),_:1},16,[`value`,`disabled`]))}}),Jy=(0,t.defineComponent)({__name:`NaiveSlider`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>!!(e.context.disabled??!1)),o=(0,t.computed)(()=>r.min??0),s=(0,t.computed)(()=>r.max??100),c=(0,t.computed)(()=>{let e=r.step;if(e===void 0)return 1;if(typeof e==`number`)return e;let t=Number(e);return Number.isFinite(t)?t:1}),l=(0,t.computed)(()=>{let t=e.context._value;if(t==null||t===``)return o.value;let n=typeof t==`number`?t:Number(t);return Number.isFinite(n)?n:o.value});function u(t){e.context.node.input(t)}return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NSlider),(0,t.mergeProps)((0,t.unref)(i),{value:l.value,min:o.value,max:s.value,step:c.value,disabled:a.value,"onUpdate:value":u}),null,16,[`value`,`min`,`max`,`step`,`disabled`]))}}),Yy=(0,t.defineComponent)({__name:`NaiveDatePicker`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e??`medium`}),o=(0,t.computed)(()=>r.clearable??!0),s=(0,t.computed)(()=>!!(e.context.disabled??!1)),c=(0,t.computed)(()=>{let t=r.type;return typeof t==`string`&&t.trim()?t:e.context.type===`naiveDateTime`?`datetime`:`date`}),l=(0,t.computed)({get:()=>{let t=e.context._value;return t==null||t===``?null:Array.isArray(t)&&t.length===2?[String(t[0]),String(t[1])]:String(t)},set:t=>{e.context.node.input(t)}});return(r,u)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NDatePicker),(0,t.mergeProps)((0,t.unref)(i),{"formatted-value":l.value,"onUpdate:formattedValue":u[0]||=e=>l.value=e,type:c.value,size:a.value,clearable:o.value,disabled:s.value,"input-props":{id:e.context.id},onBlur:e.context.handlers.blur}),null,16,[`formatted-value`,`type`,`size`,`clearable`,`disabled`,`input-props`,`onBlur`]))}}),Xy=(0,t.defineComponent)({__name:`NaiveTimePicker`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e??`medium`}),o=(0,t.computed)(()=>r.clearable??!0),s=(0,t.computed)(()=>!!(e.context.disabled??!1)),c=(0,t.computed)({get:()=>{let t=e.context._value;return t==null||t===``?null:String(t)},set:t=>{e.context.node.input(t)}});return(r,l)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTimePicker),(0,t.mergeProps)((0,t.unref)(i),{"formatted-value":c.value,"onUpdate:formattedValue":l[0]||=e=>c.value=e,size:a.value,clearable:o.value,disabled:s.value,"input-props":{id:e.context.id},onBlur:e.context.handlers.blur}),null,16,[`formatted-value`,`size`,`clearable`,`disabled`,`input-props`,`onBlur`]))}}),Zy=(0,t.defineComponent)({__name:`NaiveUpload`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`size`]}),a=(0,t.computed)(()=>!!(e.context.disabled??!1)),o=(0,t.computed)(()=>r.size??`medium`),s=(0,t.computed)(()=>{let e=r.multiple;return typeof e==`boolean`?e:typeof e==`string`?e===`true`:!1});function c(e){return e?(Array.isArray(e)?e:[e]).map((e,t)=>{if(e instanceof File)return{id:`${t}-${e.name}-${e.size}`,name:e.name,status:`finished`,file:e};if(e&&typeof e==`object`){let n=e.file;if(n instanceof File)return{id:`${t}-${n.name}-${n.size}`,name:n.name,status:`finished`,file:n}}return null}).filter(e=>e!==null):[]}let l=(0,t.ref)([]);(0,t.watch)(()=>e.context._value,e=>{l.value=c(e)},{immediate:!0,deep:!0});function u(t){l.value=t;let n=t.map(e=>e.file).filter(e=>e instanceof File);e.context.node.input(s.value?n:n[0]?[n[0]]:[])}function d(e){e.onFinish()}return(e,r)=>{let c=n.NText,f=n.NP,p=n.NUploadDragger;return(0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NUpload),(0,t.mergeProps)((0,t.unref)(i),{"file-list":l.value,"onUpdate:fileList":[r[0]||=e=>l.value=e,u],disabled:a.value,multiple:s.value,"custom-request":d,"show-download-button":!1,"show-preview-button":!1,class:o.value===`small`?`text-xs`:``}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p,null,{default:(0,t.withCtx)(()=>[r[3]||=(0,t.createElementVNode)(`div`,{class:`flex justify-center mb-3`},[(0,t.createElementVNode)(`span`,{class:`i-lucide-upload text-[48px] text-muted-foreground`})],-1),(0,t.createVNode)(c,{style:{"font-size":`16px`}},{default:(0,t.withCtx)(()=>[...r[1]||=[(0,t.createTextVNode)(` 点击或者拖动文件到该区域来上传 `,-1)]]),_:1}),(0,t.createVNode)(f,{depth:`3`,style:{margin:`8px 0 0 0`}},{default:(0,t.withCtx)(()=>[...r[2]||=[(0,t.createTextVNode)(` 请不要上传敏感数据,比如你的银行卡号和密码,信用卡号有效期和安全码 `,-1)]]),_:1})]),_:1})]),_:1},16,[`file-list`,`disabled`,`multiple`,`class`])}}}),Qy={class:`w-full`},$y=(0,t.defineComponent)({__name:`NaiveColorPicker`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e??`medium`}),o=(0,t.computed)(()=>!!(e.context.disabled??!1)),s=(0,t.computed)(()=>e.context._value??``);function c(t){e.context.node.input(t)}return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Qy,[(0,t.createVNode)((0,t.unref)(n.NColorPicker),(0,t.mergeProps)((0,t.unref)(i),{style:{width:`100%`},value:s.value,size:a.value,disabled:o.value,"onUpdate:value":c}),null,16,[`value`,`size`,`disabled`])]))}}),eb={class:`w-full py-2 flex items-center`},tb=(0,t.defineComponent)({__name:`NaiveAvatar`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`avatarSize`,`fallbackText`]}),a=(0,t.computed)(()=>!!(r.round??!0)),o=(0,t.computed)(()=>r.fallbackText??``),s=(0,t.computed)(()=>{let e=r.avatarSize;if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(Number.isFinite(t))return t}return 48});return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,eb,[(0,t.createVNode)((0,t.unref)(n.NAvatar),(0,t.mergeProps)((0,t.unref)(i),{round:a.value,size:s.value}),{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o.value),1)]),_:1},16,[`round`,`size`])]))}}),nb={class:`w-full py-2`},rb=(0,t.defineComponent)({__name:`NaiveImage`,props:{context:{}},setup(e){let{props:r}=Lg(e.context);return(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,nb,[(0,t.createVNode)((0,t.unref)(n.NImage),(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(r))),null,16)]))}});xd();function ib(e){let{fetchTreeDictionary:n}=bd(),r=(0,t.computed)(()=>yd(e.value)),i=(0,t.computed)(()=>r.value!==null),a=(0,t.ref)([]),o=(0,t.ref)();return(0,t.watch)(r,async e=>{if(!e){a.value=[],o.value=void 0;return}if(!n){a.value=[];return}try{a.value=await n(e.code),o.value=void 0}catch(e){a.value=[],o.value=e?.message}},{immediate:!0}),{isDynamic:i,dynamicOptions:a,dynamicLoadError:o}}var ab=(0,t.defineComponent)({__name:`NaiveCascader`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e===`small`||e===`medium`||e===`large`?e:`medium`}),o=(0,t.computed)(()=>r.clearable??!0),s=(0,t.computed)(()=>!!(e.context.disabled??!1)),c=(0,t.computed)(()=>r.multiple??!1),l=(0,t.computed)(()=>i.value.options),{isDynamic:u,dynamicOptions:d}=ib(l),f=(0,t.computed)(()=>{if(u.value)return d.value;let e=l.value;return Array.isArray(e)?e.map(e=>typeof e==`string`||typeof e==`number`?{label:String(e),value:e}:e&&typeof e==`object`?e:null).filter(e=>e!==null):[]}),p=(0,t.computed)(()=>{let t=e.context._value;return t==null||t===``?c.value?[]:null:t});function m(t){e.context.node.input(t)}return(r,c)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NCascader),(0,t.mergeProps)((0,t.unref)(i),{value:p.value,options:f.value,size:a.value,clearable:o.value,disabled:s.value,"input-props":{id:e.context.id},"onUpdate:value":m,onBlur:e.context.handlers.blur}),null,16,[`value`,`options`,`size`,`clearable`,`disabled`,`input-props`,`onBlur`]))}}),ob=(0,t.defineComponent)({__name:`NaiveMention`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e===`small`||e===`medium`||e===`large`?e:`medium`}),o=(0,t.computed)(()=>!!(e.context.disabled??!1)),s=(0,t.computed)(()=>{let t=r.options??e.context.options;return Array.isArray(t)?t.map(e=>{if(typeof e==`string`||typeof e==`number`){let t=String(e);return{label:t,value:t}}if(e&&typeof e==`object`){let t=e.value,n=e.label;if(typeof t==`string`||typeof t==`number`)return{label:String(n??t),value:String(t)}}return null}).filter(e=>e!==null):[]}),c=(0,t.computed)(()=>e.context._value??``);function l(t){e.context.node.input(t)}return(r,u)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NMention),(0,t.mergeProps)((0,t.unref)(i),{value:c.value,options:s.value,disabled:o.value,size:a.value,"onUpdate:value":l,onBlur:e.context.handlers.blur}),null,16,[`value`,`options`,`disabled`,`size`,`onBlur`]))}}),sb=(0,t.defineComponent)({__name:`NaiveRate`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>!!(e.context.disabled??!1)),o=(0,t.computed)(()=>!!(r.clearable??!0)),s=(0,t.computed)(()=>{let e=r.count;if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(Number.isFinite(t))return t}return 5}),c=(0,t.computed)(()=>{let t=e.context._value;if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`){let e=Number(t);return Number.isFinite(e)?e:0}return 0});function l(t){e.context.node.input(t)}return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NRate),(0,t.mergeProps)((0,t.unref)(i),{value:c.value,count:s.value,clearable:o.value,disabled:a.value,"onUpdate:value":l}),null,16,[`value`,`count`,`clearable`,`disabled`]))}}),cb=(0,t.defineComponent)({__name:`NaiveSwitch`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e===`small`||e===`medium`||e===`large`?e:`medium`}),o=(0,t.computed)(()=>!!(e.context.disabled??!1)),s=(0,t.computed)(()=>!!(e.context._value??!1));function c(t){e.context.node.input(t)}return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NSwitch),(0,t.mergeProps)((0,t.unref)(i),{value:s.value,size:a.value,disabled:o.value,"onUpdate:value":c}),null,16,[`value`,`size`,`disabled`]))}}),lb=(0,t.defineComponent)({__name:`NaiveTreeSelect`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context),a=(0,t.computed)(()=>{let e=r.size;return e===`tiny`?`small`:e===`small`||e===`medium`||e===`large`?e:`medium`}),o=(0,t.computed)(()=>r.clearable??!0),s=(0,t.computed)(()=>!!(e.context.disabled??!1)),c=(0,t.computed)(()=>r.multiple??!1),l=(0,t.computed)(()=>i.value.options),{isDynamic:u,dynamicOptions:d}=ib(l),f=(0,t.computed)(()=>{if(u.value)return d.value;let e=l.value;return Array.isArray(e)?e.map(e=>typeof e==`string`||typeof e==`number`?{label:String(e),key:e}:e&&typeof e==`object`?e:null).filter(e=>e!==null):[]}),p=(0,t.computed)(()=>{let t=e.context._value;return t==null||t===``?c.value?[]:null:t});function m(t){e.context.node.input(t)}return(r,c)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTreeSelect),(0,t.mergeProps)((0,t.unref)(i),{value:p.value,options:f.value,size:a.value,clearable:o.value,disabled:s.value,"input-props":{id:e.context.id},"onUpdate:value":m,onBlur:e.context.handlers.blur}),null,16,[`value`,`options`,`size`,`clearable`,`disabled`,`input-props`,`onBlur`]))}}),ub=Symbol(`canvas-schema-context`);function db(e){(0,t.provide)(ub,e)}function fb(){return(0,t.inject)(ub,null)}A();var pb=[`title`],mb=(0,t.defineComponent)({__name:`InlineEditableText`,props:{context:{},propKey:{},value:{},propIndex:{}},setup(e){let r=e,i=fb(),{t:a}=k(),o=(0,t.ref)(!1),s=(0,t.ref)(``),c=(0,t.ref)(null),l=(0,t.computed)(()=>{let e=r.context?.node?.props?.__key;return typeof e==`string`&&e?e:null}),u=(0,t.computed)(()=>!!(i?.updateNodePropsByKey&&l.value));function d(){u.value&&(o.value=!0,s.value=r.value,requestAnimationFrame(()=>c.value?.focus()))}function f(){o.value=!1,s.value=``}function p(){if(!o.value)return;o.value=!1;let e=s.value.trim();if(e!==r.value&&!(!i?.updateNodePropsByKey||!l.value))if(r.propIndex!==void 0){let t=r.context?.node?.props?.[r.propKey],n=Array.isArray(t)?t.slice():Array.isArray(r.context?.options)?r.context.options.slice():[];n[r.propIndex]!==void 0&&(n[r.propIndex]=e,i.updateNodePropsByKey(l.value,{[r.propKey]:n}))}else e&&i.updateNodePropsByKey(l.value,{[r.propKey]:e})}return(r,i)=>u.value&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),{key:0,ref_key:`inputRef`,ref:c,size:`tiny`,value:s.value,placeholder:e.value,"onUpdate:value":i[0]||=e=>s.value=e,onBlur:p,onKeydown:[(0,t.withKeys)((0,t.withModifiers)(p,[`prevent`]),[`enter`]),(0,t.withKeys)((0,t.withModifiers)(f,[`prevent`]),[`esc`]),i[1]||=(0,t.withModifiers)(()=>{},[`stop`])],onPointerdown:i[2]||=(0,t.withModifiers)(()=>{},[`stop`])},null,8,[`value`,`placeholder`,`onKeydown`])):u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,class:`cursor-text rounded-sm outline-none ring-0 hover:ring-1 hover:ring-[#a277ff]/40 focus:ring-[#a277ff]`,title:(0,t.unref)(a)(`edits.inlineEditHint`),onDblclick:d},(0,t.toDisplayString)(e.value),41,pb)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createTextVNode)((0,t.toDisplayString)(e.value),1)],64))}});M();var hb=(0,t.defineComponent)({__name:`CustomButton`,props:{context:{}},setup(e){let{formId:r,formVersion:i}=Ql(),{config:a,props:o,bind:s}=Lg(e.context,{omit:[`buttonText`,`buttonType`,`text`,`fullWidth`,`align`]}),c=(0,t.computed)(()=>!!(e.context?.disabled??!1)),l=(0,t.computed)(()=>a.buttonText??a.text??e.context?.label??``),u=(0,t.computed)(()=>a.buttonType??`primary`),d=(0,t.computed)(()=>{let t=e.context.node.props.type;return t===`submit`?`submit`:t===`reset`?`reset`:`button`}),f=(0,t.computed)(()=>a.align||`left`),p=(0,t.computed)(()=>!!a.fullWidth);async function m(t){if(e.context.node.props.type===`reset`){t.preventDefault(),e.context?.node?.root?.reset?.();return}let n=s.value.onClick;typeof n==`string`&&n.trim()&&await Iy(n,t,e.context,r.value,i.value),e.context?.handlers?.click?.(t)}return(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`flex`,p.value?`w-full`:``,f.value===`center`?`justify-center`:f.value===`right`?`justify-end`:`justify-start`])},[(0,t.createVNode)((0,t.unref)(n.NButton),(0,t.mergeProps)((0,t.unref)(o),{class:[p.value?`w-full`:``],type:u.value,"attr-type":d.value,disabled:c.value,onClick:m}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`buttonText`,value:l.value},null,8,[`context`,`value`])]),_:1},16,[`class`,`type`,`attr-type`,`disabled`])],2))}}),gb=(0,t.defineComponent)({__name:`NaiveTypographyText`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`text`,`theme`,`depth`]}),a=(0,t.computed)(()=>{let t=r.text;return typeof t==`string`?t:String(e.context._value??``)}),o=(0,t.computed)(()=>r.theme),s=(0,t.computed)(()=>{let e=r.depth;if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);return Number.isFinite(t)?t:void 0}});return(r,c)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NText),(0,t.mergeProps)((0,t.unref)(i),{type:o.value,depth:s.value}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`text`,value:a.value},null,8,[`context`,`value`])]),_:1},16,[`type`,`depth`]))}}),_b=(0,t.defineComponent)({__name:`NaiveTypographyP`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`text`,`theme`,`depth`]}),a=(0,t.computed)(()=>{let t=r.text;return typeof t==`string`?t:String(e.context._value??``)}),o=(0,t.computed)(()=>r.theme),s=(0,t.computed)(()=>{let e=r.depth;if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);return Number.isFinite(t)?t:void 0}});return(r,c)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NP),(0,t.mergeProps)((0,t.unref)(i),{type:o.value,depth:s.value}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`text`,value:a.value},null,8,[`context`,`value`])]),_:1},16,[`type`,`depth`]))}}),vb=(0,t.defineComponent)({__name:`NaiveTypographyA`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`text`,`href`]}),a=(0,t.computed)(()=>{let t=r.text;return typeof t==`string`?t:String(e.context._value??``)}),o=(0,t.computed)(()=>r.href??`#`);return(r,s)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NA),(0,t.mergeProps)((0,t.unref)(i),{href:o.value}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`text`,value:a.value},null,8,[`context`,`value`])]),_:1},16,[`href`]))}}),yb=(0,t.defineComponent)({__name:`NaiveTypographyBlockquote`,props:{context:{}},setup(e){let{config:r}=Lg(e.context),i=(0,t.computed)(()=>{let t=r.text;return typeof t==`string`?t:String(e.context._value??``)});return(r,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NBlockquote),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`text`,value:i.value},null,8,[`context`,`value`])]),_:1}))}}),bb=(0,t.defineComponent)({__name:`NaiveTypographyHeader`,props:{context:{}},setup(e){let{config:r}=Lg(e.context),i=(0,t.computed)(()=>{let t=r.text;return typeof t==`string`?t:String(e.context._value??``)}),a=(0,t.computed)(()=>{let t=e.context.type;return t===`naiveH1`?n.NH1:t===`naiveH2`?n.NH2:t===`naiveH3`?n.NH3:t===`naiveH4`?n.NH4:t===`naiveH5`?n.NH5:n.NH6});return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(a.value),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`text`,value:i.value},null,8,[`context`,`value`])]),_:1}))}}),xb=(0,t.defineComponent)({__name:`NaiveTypographyUl`,props:{context:{}},setup(e){let{config:r}=Lg(e.context),i=(0,t.computed)(()=>{let e=r.options;return Array.isArray(e)?e.map(e=>String(e)):[]});return(r,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NUl),null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,(r,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NLi),{key:i},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`options`,"prop-index":i,value:r},null,8,[`context`,`prop-index`,`value`])]),_:2},1024))),128))]),_:1}))}}),Sb=(0,t.defineComponent)({__name:`NaiveTypographyOl`,props:{context:{}},setup(e){let{config:r}=Lg(e.context),i=(0,t.computed)(()=>{let e=r.options;return Array.isArray(e)?e.map(e=>String(e)):[]});return(r,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NOl),null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,(r,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NLi),{key:i},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`options`,"prop-index":i,value:r},null,8,[`context`,`prop-index`,`value`])]),_:2},1024))),128))]),_:1}))}}),Cb=(0,t.defineComponent)({__name:`NaiveTypographyLi`,props:{context:{}},setup(e){let r=e,i=(0,t.computed)(()=>String(r.context._value??``));return(e,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NLi),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:r.context,"prop-key":`value`,value:i.value},null,8,[`context`,`value`])]),_:1}))}}),wb=(0,t.defineComponent)({__name:`NaiveDivider`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`title`]}),a=(0,t.computed)(()=>{let t=r.title;return typeof t==`string`?t:String(e.context._value??``)});return(r,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NDivider),(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(i))),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`title`,value:a.value},null,8,[`context`,`value`])]),_:1},16))}}),Tb=(0,t.defineComponent)({__name:`NaiveAlert`,props:{context:{}},setup(e){let{config:r,props:i}=Lg(e.context,{omit:[`title`,`content`,`theme`]}),a=(0,t.computed)(()=>{let t=r.title;return typeof t==`string`?t:String(e.context._value??``)}),o=(0,t.computed)(()=>r.theme??`default`),s=(0,t.computed)(()=>{let t=r.content;return typeof t==`string`?t:String(e.context._value??``)});return(r,c)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NAlert),(0,t.mergeProps)((0,t.unref)(i),{type:o.value}),{header:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`title`,value:a.value},null,8,[`context`,`value`])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(mb,{context:e.context,"prop-key":`content`,value:s.value},null,8,[`context`,`value`])]),_:1},16,[`type`]))}}),Eb=(0,t.defineComponent)({__name:`NaiveBackTop`,props:{context:{}},setup(e){let{props:r}=Lg(e.context);return(e,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NBackTop),(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(r))),null,16))}});Vc(),kg(),Dg();var Db={text:{component:zy,libraryName:`NaiveTextInput`},textarea:{component:Hy,libraryName:`NaiveTextarea`},email:{component:zy,libraryName:`NaiveEmailInput`},number:{component:Uy,libraryName:`NaiveNumberInput`},url:{component:zy,libraryName:`NaiveUrlInput`},checkbox:{component:Ky,libraryName:`NaiveCheckboxGroup`},color:{component:$y,libraryName:`NaiveColorPicker`},date:{component:Yy,libraryName:`NaiveDatePicker`},time:{component:Xy,libraryName:`NaiveTimePicker`},naiveDateTime:{component:Yy,libraryName:`NaiveDateTimePicker`},file:{component:Zy,libraryName:`NaiveUpload`},password:{component:zy,libraryName:`NaivePasswordInput`},radio:{component:qy,libraryName:`NaiveRadioGroup`},range:{component:Jy,libraryName:`NaiveSlider`},select:{component:Gy,libraryName:`NaiveSelect`},naiveCascader:{component:ab,libraryName:`NaiveCascader`},naiveTreeSelect:{component:lb,libraryName:`NaiveTreeSelect`},naiveMention:{component:ob,libraryName:`NaiveMention`},naiveRate:{component:sb,libraryName:`NaiveRate`},naiveSwitch:{component:cb,libraryName:`NaiveSwitch`},naiveAvatar:{component:tb,libraryName:`NaiveAvatar`},naiveImage:{component:rb,libraryName:`NaiveImage`},tel:{component:zy,libraryName:`NaiveTelInput`},submit:{component:hb,libraryName:`CustomButton`},reset:{component:hb,libraryName:`CustomButton`},naiveButton:{component:hb,libraryName:`CustomButton`},naiveText:{component:gb,libraryName:`NaiveTypographyText`},naiveP:{component:_b,libraryName:`NaiveTypographyP`},naiveA:{component:vb,libraryName:`NaiveTypographyA`},naiveBlockquote:{component:yb,libraryName:`NaiveTypographyBlockquote`},naiveH1:{component:bb,libraryName:`NaiveTypographyHeader`},naiveH2:{component:bb,libraryName:`NaiveTypographyHeader`},naiveH3:{component:bb,libraryName:`NaiveTypographyHeader`},naiveH4:{component:bb,libraryName:`NaiveTypographyHeader`},naiveH5:{component:bb,libraryName:`NaiveTypographyHeader`},naiveH6:{component:bb,libraryName:`NaiveTypographyHeader`},naiveUl:{component:xb,libraryName:`NaiveTypographyUl`},naiveOl:{component:Sb,libraryName:`NaiveTypographyOl`},naiveLi:{component:Cb,libraryName:`NaiveTypographyLi`},naiveDivider:{component:wb,libraryName:`NaiveDivider`},naiveAlert:{component:Tb,libraryName:`NaiveAlert`},naiveBackTop:{component:Eb,libraryName:`NaiveBackTop`}};Ac(Object.fromEntries(Object.entries(Db).map(([e,t])=>[t.libraryName??e,e])));var Ob=new Map;function kb(e,t){Ob.set(e,t),Ac({[t.libraryName??e]:e})}function Ab(e){return Db[e]??Ob.get(e)}function jb(){let e={...Db};for(let[t,n]of Ob)e[t]=n;return Object.entries(e)}function Mb(){let e={};for(let[t,n]of jb()){let r=n.libraryName??t;e[t]=es({$el:`div`,attrs:{class:`w-full`},children:[{$cmp:r,props:{context:`$node.context`}}]},{family:`naive`,library:{[r]:n.component},features:[],props:[]})}return e}function Nb(e){return(0,t.markRaw)((0,t.defineComponent)({inheritAttrs:!1,setup(n,{attrs:r}){return()=>(0,t.h)(zo,{...r,type:e})}}))}function Pb(e){let t=Oc(e);return t?.target?t.target:Ab(e)?.libraryName??e}function Fb(){let e={};for(let t of kc())Ab(t.type)&&(e[Pb(t.type)]=Nb(t.type));return e}function Ib(e){let t=e?.layout?.colspan;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return Math.max(1,Math.min(12,Math.round(t)));let n=e?.outerClass;if(typeof n!=`string`)return 12;let r=n.match(/col-span-(\d+)/);return r?parseInt(r[1],10):12}function Lb(e,t){if(!e)return;let n=e.outerClass||``;n=/col-span-\d+/.test(n)?n.replace(/col-span-\d+/,`col-span-${t}`):`${n} col-span-${t}`.trim(),e.outerClass=n}function Rb(e){if(!e||typeof e!=`object`)return e;let t=e=>(typeof e==`string`?e:``).replace(/\bw-\[[^\]]+\]/g,``).replace(/\bpt-2\b/g,``).replace(/\s+/g,` `).trim(),n={...e,outerClass:t(e.outerClass)||void 0};return e.props&&typeof e.props==`object`&&(n.props={...e.props,outerClass:t(e.props.outerClass)||void 0}),n}function zb(e){if(!e||typeof e!=`object`)return e;let t={...e};return typeof t.$cmp==`string`?t.props={...t.props&&typeof t.props==`object`?t.props:{},disabled:!0}:typeof t.$el==`string`?t.attrs={...t.attrs&&typeof t.attrs==`object`?t.attrs:{},disabled:!0}:t.disabled=!0,t}function Bb(e){let t=e?.outerClass;if(typeof t!=`string`)return 1;let n=t.match(/\brow-span-(\d+)\b/),r=n?parseInt(n[1],10):1;return Number.isFinite(r)&&r>0?r:1}function Vb(e,t=12){if(!Array.isArray(e)||e.length===0)return;let n=e.map(e=>Math.max(1,Math.min(t,Ib(e)))),r=n.reduce((e,t)=>e+t,0);if(r<=t)return;let i=t/r,a=n.map(e=>Math.max(1,Math.round(e*i))),o=a.reduce((e,t)=>e+t,0),s=a.map((e,t)=>[e,t]).sort((e,t)=>t[0]-e[0]),c=0;for(;o>t&&c<s.length;){let e=s[c][1];a[e]>1&&(a[e]=a[e]-1,o--),c++}e.forEach((e,t)=>Lb(e,a[t]))}function Hb(e){let t=[],n=new Set,r=(e,t)=>`${e}:${t}`,i=(e,t,i,a)=>{for(let o=e;o<e+i;o++)for(let e=t;e<t+a;e++)if(n.has(r(o,e)))return!1;return!0},a=(e,t,i,a)=>{for(let o=e;o<e+i;o++)for(let e=t;e<t+a;e++)n.add(r(o,e))};for(let n=0;n<e.length;n++){let r=e[n],o=Math.max(1,Math.min(12,Ib(r))),s=Math.max(1,Math.min(6,Bb(r))),c=!1;for(let e=1;e<=200&&!c;e++)for(let r=1;r<=12-o+1;r++)if(i(e,r,s,o)){a(e,r,s,o),t.push({index:n,row:e,col:r,rowSpan:s,colSpan:o}),c=!0;break}c||t.push({index:n,row:1,col:1,rowSpan:s,colSpan:o})}return t}function Ub(e,t){return e*100+t}function Wb(e,t,n){let r=Ub(t,n);for(let t=0;t<e.length;t++){let n=e[t];if(Ub(n.row,n.col)>=r)return t}return e.length}function Gb(e){let t=[],n={startIndex:0,endIndex:0,items:[],totalSpan:0};for(let r=0;r<e.length;r++){let i=e[r],a=Ib(i);n.totalSpan+a>12&&n.items.length>0?(t.push(n),n={startIndex:r,endIndex:r,items:[i],totalSpan:a}):(n.items.push(i),n.endIndex=r,n.totalSpan+=a)}return n.items.length>0&&t.push(n),t}function Kb(e,t,n){let r=Hb(e).filter(e=>t>=e.row&&t<e.row+e.rowSpan).map(e=>e.index).map(t=>e[t]).filter(Boolean),i=r.length+n.length;if(!(i<=0))if(i<=4){let e=12/i;r.forEach(t=>Lb(t,e)),n.forEach(t=>Lb(t,e))}else n.forEach(e=>Lb(e,3))}function qb(e){e.preventDefault()}function Jb(e){e.stopPropagation()}function Yb(){let e=new Map;return[function(t,n){e.get(t)&&e.get(t).forEach(e=>{e(n)})},function(t,n){let r=e.get(t)??[];r.push(n),e.set(t,r)}]}var[Xb,Zb]=Yb();function Qb(e,t){return e.source===t.source&&e.flags.split(``).sort().join(``)===t.flags.split(``).sort().join(``)}function $b(e,t,n=!0,r=[`__key`]){if(e===t)return!0;if(typeof t==`object`&&typeof e==`object`&&e&&t!==null){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return Qb(e,t);if(e===null||t===null)return!1;let i=e,a=t;if(Object.keys(i).length!==Object.keys(a).length)return!1;for(let e of r)if((e in i||e in a)&&i[e]!==a[e])return!1;for(let e in i)if(!(e in a)||i[e]!==a[e]&&!n||n&&!$b(i[e],a[e],n,r))return!1;return!0}return!1}function ex(e){return e.split(` `).filter(e=>e)}function tx(e){return{x:e.clientX,y:e.clientY}}var nx=typeof window<`u`,rx=new WeakMap,ix=new WeakMap;function ax(){if(!nx)return!1;if(`userAgentData`in navigator)return navigator.userAgentData.mobile===!0;let e=navigator.userAgent,t=/android|iphone|ipod/i.test(e),n=/iPad/.test(e)||e.includes(`Macintosh`)&&navigator.maxTouchPoints>1;return t||n}var L={affectedNodes:[],coordinates:{x:0,y:0},currentTargetValue:void 0,on:Zb,emit:Xb,originalZIndex:void 0,pointerSelection:!1,preventEnter:!1,rootUserSelect:void 0,nodePointerdown:void 0,longPress:!1,scrolling:!1,longPressTimeout:void 0,remapJustFinished:!1,selectedNodes:[],selectedParent:void 0,preventSynthDrag:!1,pointerDown:void 0,lastScrollContainerX:null,lastScrollContainerY:null,rootScrollWidth:void 0,rootScrollHeight:void 0,dragItemRect:void 0,windowScrollX:void 0,windowScrollY:void 0,lastScrollDirectionX:void 0,lastScrollDirectionY:void 0,scrollDebounceTimeout:void 0,frameIdX:void 0,frameIdY:void 0},ox=!1,sx,cx;function lx(){L.scrollDebounceTimeout&&clearTimeout(L.scrollDebounceTimeout),L.longPressTimeout&&clearTimeout(L.longPressTimeout),L.frameIdX!==void 0&&cancelAnimationFrame(L.frameIdX),L.frameIdY!==void 0&&cancelAnimationFrame(L.frameIdY),L={affectedNodes:[],coordinates:{x:0,y:0},on:Zb,emit:Xb,currentTargetValue:void 0,originalZIndex:void 0,pointerId:void 0,preventEnter:!1,remapJustFinished:!1,selectedNodes:[],nodePointerdown:void 0,rootUserSelect:void 0,preventSynthDrag:!1,scrolling:!1,selectedParent:void 0,pointerSelection:!1,synthScrollDirection:void 0,draggedNodeDisplay:void 0,synthDragScrolling:!1,longPress:!1,pointerDown:void 0,longPressTimeout:void 0,lastScrollContainerX:null,lastScrollContainerY:null,rootScrollWidth:void 0,rootScrollHeight:void 0,dragItemRect:void 0,windowScrollX:void 0,windowScrollY:void 0,lastScrollDirectionX:void 0,lastScrollDirectionY:void 0,scrollDebounceTimeout:void 0,frameIdX:void 0,frameIdY:void 0}}function ux(e){return Object.assign(L,e),e.initialParent.data.emit(`dragStarted`,L),ox=!1,L.emit(`dragStarted`,L),L}function dx(){L.activeState&&bx(L.activeState.parent,void 0,L),L.selectedState&&xx(L.selectedState.nodes,L.selectedState.parent,L),L.selectedState=L.activeState=void 0}function fx(){if(L.pointerDown&&(L.pointerDown.node.el.draggable=!0),L.pointerDown=void 0,!Ax(L))return;let e=L.currentParent.data.config;Ax(L)&&e.handleEnd(L)}function px(e){e.key===`Escape`&&(L.selectedState&&xx(L.selectedState.nodes,L.selectedState.parent,L),L.activeState&&bx(L.activeState.parent,void 0,L),L.selectedState=L.activeState=void 0)}function mx(e){if(!kx(L))return;ox=!0;let t=L.initialParent.data.config.handleEnd;t(L)}function hx(e){if(!kx(L))return;qb(e);let{x:t,y:n}=tx(e);kx(L)&&ES({x:t,y:n},e,L)}function gx(e){if(!L.pointerDown||!L.pointerDown.validated)return;let t=L.pointerDown.parent.data.config;if(!(e.pointerType===`mouse`&&!ax()))if(Ax(L))Ax(L)&&sS(e,L);else{if(qb(e),t.longPress&&!L.longPress){clearTimeout(L.longPressTimeout),L.longPress=!1;return}let n=t.draggedNodes(L.pointerDown);t.dragstartClasses(L.pointerDown.node,n,t,!0);let r=L.pointerDown.node.el.getBoundingClientRect();sS(e,rS(L.pointerDown.node,L.pointerDown.parent,e,L,n,r),!0)}}function _x({parent:e,getValues:t,setValues:n,config:r={}}){if(!nx)return;sx||=kS(document,{dragover:hx,pointerdown:dx,pointerup:fx,keydown:px,drop:mx,pointermove:gx,pointercancel:gS(r.handlePointercancel),touchmove:e=>{kx(L)&&e.cancelable&&qb(e)},contextmenu:e=>{Ax(L)&&qb(e)}}),Ox(e);let[i,a]=Yb(),o={getValues:t,setValues:n,config:{dragDropEffect:r.dragDropEffect??`move`,dragEffectAllowed:r.dragEffectAllowed??`move`,draggedNodes:Vx,dragstartClasses:Gx,handleNodeKeydown:Jx,handleDragstart:Ux,handleNodeDragover:cS,handleParentDragover:lS,handleNodeDrop:Xx,handleNodeFocus:Zx,handleNodeBlur:Qx,handlePointercancel:eS,handleEnd:tS,handleDragend:$x,handleParentFocus:Cx,handleNodePointerup:nS,handleNodePointerover:Yx,handleParentPointerover:uS,handleParentScroll:Hx,handleNodePointerdown:Wx,handleNodeDragenter:fS,handleNodeDragleave:pS,handleParentDrop:Dx,multiDrag:r.multiDrag??!1,nativeDrag:r.nativeDrag??!0,performSort:yx,performTransfer:wx,root:r.root??document,setupNode:Mx,setupNodeRemap:Nx,reapplyDragClasses:Px,tearDownNode:Ix,tearDownNodeRemap:Fx,remapFinished:zx,threshold:{horizontal:0,vertical:0},...r},enabledNodes:[],abortControllers:{},privateClasses:[],on:a,emit:i};new MutationObserver(Lx).observe(e,{childList:!0}),rx.set(e,o),r.plugins?.forEach(t=>{t(e)?.tearDown?.()}),r.plugins?.forEach(t=>{t(e)?.tearDown?.()}),r.plugins?.forEach(t=>{t(e)?.setup?.()}),jx(e,o),Rx(e,!0)}function vx(e,t,n,r,i,a){let{x:o,y:s}=tx(n),c=e.el.getBoundingClientRect();return{affectedNodes:[],ascendingDirection:!1,clonedDraggedEls:[],coordinates:{x:o,y:s},draggedNode:{el:e.el,data:e.data},draggedNodes:r,incomingDirection:void 0,initialIndex:e.data.index,initialParent:{el:t.el,data:t.data},currentParent:{el:t.el,data:t.data},longPress:t.data.config.longPress??!1,longPressTimeout:void 0,currentTargetValue:e.data.value,scrollEls:[],startLeft:i||o-(c?.left??0),startTop:a||s-(c?.top??0),targetIndex:e.data.index,transferred:!1}}function yx({parent:e,draggedNodes:t,targetNodes:n}){Rx(e.el);let r=t.map(e=>e.data.value),i=Tx(e.el,e.data),a=t[0].data.index,o=[...e.data.enabledNodes],s=[...i.filter(e=>!r.some(t=>$b(e,t)))];s.splice(n[0].data.index,0,...r),`draggedNode`in L&&(L.currentTargetValue=n[0].data.value),Ex(e.el,e.data,[...s]),e.data.config.onSort&&e.data.config.onSort({parent:{el:e.el,data:e.data},previousValues:[...i],previousNodes:[...o],nodes:[...e.data.enabledNodes],values:[...s],draggedNodes:t,previousPosition:a,position:n[0].data.index,targetNodes:n,state:L})}function bx(e,t,n){if(!t){n.activeState=void 0;return}n.activeState={node:t,parent:e}}function xx(e,t,n){let r=t.data.config.selectedClass;if(!n.selectedState)return;let i=Array.from(e);SS(e.map(e=>e.el),r);for(let e of i){e.el.setAttribute(`aria-selected`,`false`);let t=n.selectedState.nodes.findIndex(t=>t.el===e.el);t!==-1&&n.selectedState.nodes.splice(t,1)}}function Sx(e,t,n,r,i=!1){r.pointerSelection=i;for(let n of t)n.el.setAttribute(`aria-selected`,`true`),yS([n.el],e.data.config.selectedClass,!0);r.selectedState={nodes:t,parent:e},bx(e,n,r)}function Cx(e,t){let n=e.targetData.parent.data.enabledNodes[0];n&&(t.selectedState&&t.selectedState.parent.el!==e.targetData.parent.el?bx(e.targetData.parent,n,t):t.selectedState||bx(e.targetData.parent,n,t))}function wx({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,initialIndex:i,targetNodes:a,state:o}){Rx(n.el);let s=r.map(e=>e.data.value),c=[...Tx(e.el,e.data).filter(e=>!s.some(t=>$b(e,t)))],l=Tx(t.el,t.data),u=n.el===t.el&&t.data.config.sortable===!1,d;a.length?(d=u?i:t.data.config.sortable===!1?t.data.enabledNodes.length:a[0].data.index,l.splice(d,0,...s)):(d=u?i:t.data.enabledNodes.length,l.splice(d,0,...s)),Ex(e.el,e.data,c),Ex(t.el,t.data,l),t.data.config.onTransfer&&t.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:d,state:o,targetNodes:a}),e.data.config.onTransfer&&e.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:d,state:o,targetNodes:a||[]})}function Tx(e,t){return[...t.getValues(e)]}function Ex(e,t,n){t.setValues(n,e)}function Dx(e,t){Jb(e.e),ox=!0;let n=t.initialParent.data.config.handleEnd;n(t)}function Ox(e){let t=rx.get(e);t&&t.abortControllers.mainParent&&t.abortControllers.mainParent.abort()}function kx(e){return`draggedNode`in e&&!!e.draggedNode}function Ax(e){return`synthDragging`in e&&!!e.synthDragging}function jx(e,t){t.abortControllers.mainParent=kS(e,{dragover:vS(t.config.handleParentDragover),handleParentPointerover:t.config.handleParentPointerover,scroll:vS(t.config.handleParentScroll),drop:vS(t.config.handleParentDrop),hasNestedParent:e=>{let t=rx.get(e.target);t&&(t.nestedParent=e.detail.parent)},focus:vS(t.config.handleParentFocus)}),t.config.externalDragHandle&&t.config.externalDragHandle.el&&t.config.externalDragHandle.callback&&(t.abortControllers.externalDragHandle=kS(t.config.externalDragHandle.el,{pointerdown:e=>{if(!t.config.externalDragHandle||!t.config.externalDragHandle.callback)return;let n=t.config.externalDragHandle.callback();if(!OS(n)){console.warn(`No draggable item found from external drag handle callback`);return}let r=ix.get(n);if(!r)return;let i=n.parentNode;if(!(i instanceof HTMLElement))return;let a=rx.get(i);a&&(L.pointerDown={parent:{el:i,data:a},node:{el:n,data:r},validated:!0},n.draggable=!0)}}))}function Mx(e){let t=e.parent.data.config;e.node.data.abortControllers.mainNode=kS(e.node.el,{keydown:gS(t.handleNodeKeydown),dragstart:gS(t.handleDragstart),dragover:gS(t.handleNodeDragover),dragenter:gS(t.handleNodeDragenter),dragleave:gS(t.handleNodeDragleave),dragend:gS(t.handleDragend),drop:gS(t.handleNodeDrop),focus:gS(t.handleNodeFocus),blur:gS(t.handleNodeBlur),pointerup:gS(t.handleNodePointerup),pointercancel:gS(t.handlePointercancel),pointerdown:gS(t.handleNodePointerdown),handleNodePointerover:t.handleNodePointerover,touchmove:e=>{kx(L)&&e.cancelable&&qb(e)},contextmenu:e=>{Ax(L)&&qb(e)}}),e.node.el.draggable=!0,t.reapplyDragClasses(e.node.el,e.parent.data),e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.setupNode?.(e)})}function Nx(e){ix.set(e.node.el,e.node.data),e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.setupNodeRemap?.(e)})}function Px(e,t){if(!kx(L))return;let n=Ax(L)?t.config.synthDropZoneClass:t.config.dropZoneClass;L.draggedNode.el===e&&yS([e],n,!0)}function Fx(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNodeRemap?.(e)})}function Ix(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNode?.(e)}),e.node.el.draggable=!1,e.node.data?.abortControllers?.mainNode&&e.node.data?.abortControllers?.mainNode.abort()}function Lx(e){if(e.length===1&&e[0].addedNodes.length===1&&!(e[0].addedNodes[0]instanceof HTMLElement))return;let t=e[0].target;t instanceof HTMLElement&&rx.get(t)&&Rx(t)}function Rx(e,t){let n=rx.get(e);if(!n)return;n.privateClasses=Array.from(e.classList);let r=[],i=n.config;for(let a=0;a<e.children.length;a++){let o=e.children[a];if(!OS(o)||o.id===`dnd-dragged-node-clone`)continue;let s=ix.get(o);(t||!s)&&i.tearDownNode({parent:{el:e,data:n},node:{el:o,data:s}}),!i.disabled&&(!i.draggable||i.draggable&&i.draggable(o))&&r.push(o)}if(r.length!==n.getValues(e).length&&!i.disabled){console.warn(`The number of draggable items defined in the parent element does not match the number of values. This may cause unexpected behavior.`);return}let a=n.getValues(e),o=[];for(let s=0;s<r.length;s++){let c=r[s],l=ix.get(c);if(i.draggableValue&&!i.draggableValue(a[s]))continue;let u=Object.assign(l??{privateClasses:[],abortControllers:{}},{value:a[s],index:s});if(!kx(L)&&L.activeState&&$b(L.activeState.node.data.value,u.value)&&bx({data:n,el:e},{el:c,data:u},L),kx(L)&&$b(L.draggedNode.data.value,u.value)){L.draggedNode.data=u,L.draggedNode.el=c;let e=L.draggedNodes.find(e=>e.data.value===u.value);e&&(e.el=c)}o.push({el:c,data:u}),(t||!l)&&i.setupNode({parent:{el:e,data:n},node:{el:c,data:u}}),Nx({parent:{el:e,data:n},node:{el:c,data:u}})}rx.set(e,{...n,enabledNodes:o}),i.remapFinished(n),n.config.plugins?.forEach(t=>{t(e)?.remapFinished?.()})}function zx(){L.remapJustFinished=!0,`draggedNode`in L&&(L.affectedNodes=[])}function Bx(e){return!!e.targetData.parent.data.config.nativeDrag}function Vx(e){return e.parent.data.config.multiDrag?L.selectedState?[e.node,...L.selectedState?.nodes.filter(t=>t.el!==e.node.el)]:[]:[e.node]}function Hx(e){kx(L)&&(L.emit(`scrollStarted`,L),!Ax(L)&&(L.preventEnter=!0,cx&&clearTimeout(cx),cx=setTimeout(()=>{L.preventEnter=!1,L.emit(`scrollEnded`,L)},100)))}function Ux(e,t){let n=e.targetData.parent.data.config;if(!n.nativeDrag||!Bx(e)||!qx({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:n})){qb(e.e);return}let r=n.draggedNodes({parent:e.targetData.parent,node:e.targetData.node});r.length===0&&(r=[e.targetData.node]),n.dragstartClasses(e.targetData.node,r,n);let i=Kx(e,r);if(n.onDragstart){let t={parent:e.targetData.parent,values:Tx(e.targetData.parent.el,e.targetData.parent.data),draggedNode:i.draggedNode,draggedNodes:i.draggedNodes,position:i.initialIndex,state:i};n.onDragstart(t)}}function Wx(e,t){if(Jb(e.e),t.pointerDown={parent:e.targetData.parent,node:e.targetData.node,validated:!1},!qx({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:e.targetData.parent.data.config}))return;t.pointerDown.validated=!0,iS(e,t,e.targetData.node);let n=e.targetData.parent.data,r=[e.targetData.node],i=e.e.ctrlKey||e.e.metaKey,a=e.e.shiftKey,o=e.targetData.node;if(i&&n.config.multiDrag){r=t.selectedState?t.selectedState.nodes.findIndex(e=>e.el===o.el)===-1?[...t.selectedState.nodes,o]:t.selectedState.nodes.filter(e=>e.el!==o.el):[o],Sx(e.targetData.parent,r,e.targetData.node,t,!0);return}if(a&&n.config.multiDrag){let n=e.targetData.parent.data.enabledNodes;if(t.selectedState&&t.activeState)if(t.selectedState.parent.el!==e.targetData.parent.el){xx(t.selectedState.nodes,t.selectedState.parent,t),t.selectedState=void 0;for(let e=0;e<=o.data.index;e++)r.push(n[e])}else{let[i,a]=t.activeState.node.data.index<e.targetData.node.data.index?[t.activeState.node.data.index,e.targetData.node.data.index]:[e.targetData.node.data.index,t.activeState.node.data.index];r=n.slice(i,a+1)}else for(let e=0;e<=o.data.index;e++)r.push(n[e]);Sx(e.targetData.parent,r,e.targetData.node,t,!0);return}t.selectedState?.nodes?.length?t.selectedState.nodes.findIndex(t=>t.el===e.targetData.node.el)===-1&&(t.selectedState.parent.el===e.targetData.parent.el&&n.config.multiDrag&&ax()?r.push(...t.selectedState.nodes):xx(t.selectedState.nodes,e.targetData.parent,t),Sx(e.targetData.parent,r,e.targetData.node,t,!0)):Sx(e.targetData.parent,[e.targetData.node],e.targetData.node,t,!0)}function Gx(e,t,n,r=!1){yS(t.map(e=>e.el),r?n.synthDraggingClass:n.draggingClass),setTimeout(()=>{SS(t.map(e=>e.el),r?n.synthDraggingClass:n.draggingClass),yS(t.map(e=>e.el),r?n.synthDragPlaceholderClass:n.dragPlaceholderClass),yS(t.map(e=>e.el),r?n.synthDropZoneClass:n.dropZoneClass),SS(t.map(e=>e.el),n.selectedClass)})}function Kx(e,t){Jb(e.e);let n=ux(vx(e.targetData.node,e.targetData.parent,e.e,t));if(e.e.dataTransfer){let r=e.targetData.parent.data.config;e.e.dataTransfer.dropEffect=r.dragDropEffect,e.e.dataTransfer.effectAllowed=r.dragEffectAllowed;let i;if(e.e.dataTransfer.setData(`text/plain`,``),r.dragImage)i=r.dragImage(e,t);else if(!r.multiDrag||t.length===1)return e.targetData.node.el.style.zIndex=`9999`,e.targetData.node.el.style.boxSizing=`border-box`,e.e.dataTransfer.setDragImage(e.targetData.node.el,e.e.offsetX,e.e.offsetY),n.originalZIndex=e.targetData.node.el.style.zIndex,n;else{let n=document.createElement(`div`);n.setAttribute(`id`,`dnd-dragged-node-clone`),n.setAttribute(`popover`,`manual`);for(let e of t){let t=e.el.cloneNode(!0);t.id=e.el.id+`-clone`,t.style.pointerEvents=`none`,n.appendChild(t)}let{width:r}=t[0].el.getBoundingClientRect();Object.assign(n.style,{display:`flex`,flexDirection:`column`,width:`${r}px`,position:`absolute`,pointerEvents:`none`,zIndex:`9999`,left:`-9999px`,boxSizing:`border-box`,background:`transparent`,overflow:`hidden`}),e.targetData.parent.el.appendChild(n),n.showPopover(),n.getBoundingClientRect(),i=n,e.e.dataTransfer.setDragImage(i,e.e.offsetX,e.e.offsetY)}setTimeout(()=>{i?.remove()})}return n}function qx({x:e,y:t,node:n,config:r}){if(r.externalDragHandle)return!1;if(!r.dragHandle)return!0;let i=n.el.querySelectorAll(r.dragHandle);if(!i)return!1;let a=r.root.elementFromPoint(e,t);if(!a)return!1;for(let e of Array.from(i))if(a===e||e.contains(a))return!0;return!1}function Jx(e){}function Yx(e){e.detail.targetData.parent.el===e.detail.state.currentParent.el?hS(e.detail,e.detail.state):_S(e.detail,e.detail.state)}function Xx(e,t){let n=e.targetData.parent.data.config;n.nativeDrag&&(Jb(e.e),ox=!0,n.handleEnd(t))}function Zx(e){e.e.target!==e.e.currentTarget&&L.pointerDown&&(L.pointerDown.node.el.draggable=!1)}function Qx(e){e.e.target!==e.e.currentTarget&&L.pointerDown&&(L.pointerDown.node.el.draggable=!0)}function $x(e,t){let n=e.targetData.parent.data.config;if(n.nativeDrag){if(qb(e.e),Jb(e.e),ox){ox=!1;return}n.handleEnd(t)}}function eS(e,t){if(!Ax(t))return;if(qb(e.e),ox){ox=!1;return}let n=rx.get(t.initialParent.el)?.config;n?.onDragend&&n.onDragend({parent:t.currentParent,values:Tx(t.currentParent.el,t.currentParent.data),draggedNode:t.draggedNode,draggedNodes:t.draggedNodes,state:t}),n?.handleEnd(t)}function tS(e){e.draggedNode&&(e.draggedNode.el.draggable=!0);let t=e.draggedNodes.map(e=>e.el),n=e.initialParent.data,r=Ax(e),i=rx.get(e.initialParent.el)?.config,a=r?i?.synthDropZoneClass:i?.dropZoneClass,o=n?.config?.longPressClass,s=r?n?.config?.synthDragPlaceholderClass:n?.config?.dragPlaceholderClass,c=e.originalZIndex;Ax(e)&&(e.clonedDraggedNode&&e.clonedDraggedNode.remove(),e.longPressTimeout&&clearTimeout(e.longPressTimeout)),aS(e),e.lastScrollDirectionX=void 0,e.lastScrollDirectionY=void 0,e.preventEnter=!1,e.scrollDebounceTimeout&&=(clearTimeout(e.scrollDebounceTimeout),void 0),c!==void 0&&e.draggedNode&&(e.draggedNode.el.style.zIndex=c),requestAnimationFrame(()=>{SS(t,a),SS(t,o),SS(t,s)}),xx(e.draggedNodes,e.currentParent,e),bx(e.currentParent,void 0,e);let l={...e};i?.onDragend?.({parent:l.currentParent,values:Tx(l.currentParent.el,l.currentParent.data),draggedNode:l.draggedNode,draggedNodes:l.draggedNodes,state:l}),e.emit(`dragEnded`,l),lx()}function nS(e,t){Jb(e.e),!t.pointerSelection&&t.selectedState&&xx(t.selectedState.nodes,e.targetData.parent,t);let n=e.targetData.parent.data.config;t.pointerSelection=!1,`longPressTimeout`in t&&t.longPressTimeout&&clearTimeout(t.longPressTimeout),t.longPress=!1,SS(e.targetData.parent.data.enabledNodes.map(e=>e.el),n.longPressClass),kx(t)&&n.handleEnd(t)}function rS(e,t,n,r,i,a){let o=t.data.config,s,c,l=`display.flexDirection.alignItems.justifyContent.padding.paddingTop.margin.marginTop.marginBottom.marginLeft.marginRight.paddingBottom.paddingLeft.paddingRight.border.borderRadius.background.backgroundColor.boxShadow.font.color.lineHeight.gap.width.height.boxSizing.overflow`.split(`.`),u=(e,t)=>{let n=window.getComputedStyle(e);l.forEach(e=>{t.style[e]=n[e]})},d=(e,t={})=>{Object.assign(e.style,{position:`absolute`,zIndex:`9999`,pointerEvents:`none`,willChange:`transform`,boxSizing:`border-box`,opacity:`0`,overflow:`hidden`,width:`${a.width}px`,height:`${a.height}px`,...t})};if(o.synthDragImage)c=o.synthDragImage(e,t,n,i),s=c.dragImage,s.setAttribute(`popover`,`manual`),d(s);else if(!o.multiDrag||i.length===1)s=e.el.cloneNode(!0),u(e.el,s),s.setAttribute(`popover`,`manual`),d(s);else{let e=document.createElement(`div`);e.setAttribute(`popover`,`manual`),i.forEach(t=>{let n=t.el.cloneNode(!0);u(t.el,n),n.style.pointerEvents=`none`,n.style.margin=`0`,e.append(n)}),e.style.display=`flex`,e.style.flexDirection=`column`,e.style.padding=`0`,e.style.margin=`0`,e.style.position=`absolute`,e.style.zIndex=`9999`,e.style.pointerEvents=`none`,s=e}s.id=`dnd-dragged-node-clone`,t.el.appendChild(s),s.showPopover();let f={clonedDraggedEls:[],clonedDraggedNode:s,synthDragScrolling:!1,synthDragging:!0,rootScrollWidth:document.scrollingElement?.scrollWidth,rootScrollHeight:document.scrollingElement?.scrollHeight};return ux({...vx(e,t,n,i,c?.offsetX,c?.offsetY),...f})}function iS(e,t,n){let r=e.targetData.parent.data.config;t.longPressTimeout=setTimeout(()=>{t&&(t.longPress=!0,r.longPressClass&&e.e.cancelable&&yS([n.el],r.longPressClass),qb(e.e))},r.longPressDuration||1e3)}function aS(e,t=!0,n=!0){t&&(e.frameIdX!==void 0&&(cancelAnimationFrame(e.frameIdX),e.frameIdX=void 0),e.lastScrollDirectionX=void 0),n&&(e.frameIdY!==void 0&&(cancelAnimationFrame(e.frameIdY),e.frameIdY=void 0),e.lastScrollDirectionY=void 0),!e.frameIdX&&!e.frameIdY&&(e.preventEnter=!1)}function oS(e,t=!1){let{x:n,y:r}=e.coordinates,i=e.startLeft??0,a=e.startTop??0,o=window.scrollX??0,s=window.scrollY??0,c=n-i+o,l=r-a+s;e.clonedDraggedNode.style.transform=`translate3d(${c}px, ${l}px, 0px)`,t&&(e.clonedDraggedNode.style.opacity=`1`,SS(e.draggedNodes.map(e=>e.el),e.initialParent.data.config?.longPressClass))}function sS(e,t,n=!1){let r=tx(e);t.coordinates.x=r.x,t.coordinates.y=r.y,oS(t,n),t.scrollDebounceTimeout&&=(clearTimeout(t.scrollDebounceTimeout),void 0),t.scrollDebounceTimeout=setTimeout(()=>{Ax(t)&&ES(t.coordinates,e,t)},16);let i=DS(r);if(!i){document.dispatchEvent(new CustomEvent(`handleRootPointerover`,{detail:{e,state:t}}));return}let a={e,targetData:i,state:t};`node`in i?i.node.el.dispatchEvent(new CustomEvent(`handleNodePointerover`,{detail:a})):i.parent.el.dispatchEvent(new CustomEvent(`handleParentPointerover`,{detail:a}))}function cS(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;let{x:n,y:r}=tx(e.e);t.coordinates.y=r,t.coordinates.x=n,qb(e.e),Jb(e.e),kx(t)&&ES({x:n,y:r},e.e,t),e.targetData.parent.el===t.currentParent?.el?hS(e,t):_S(e,t)}function lS(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;qb(e.e),Jb(e.e);let{x:n,y:r}=tx(e.e);kx(t)&&ES({x:n,y:r},e.e,t),_S(e,t)}function uS(e){e.detail.targetData.parent.el!==e.detail.state.currentParent.el&&_S(e.detail,e.detail.state)}function dS({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,state:i}){if(t.el===e.el)return!1;let a=t.data.config;if(r[0].el.contains(t.el)||a.dropZone===!1)return!1;let o=n.data.config;return a.accepts?a.accepts(t,n,e,i):!(!a.group||a.group!==o.group)}function fS(e,t){qb(e.e)}function pS(e,t){qb(e.e)}function mS(e,t,n,r){if(t.affectedNodes.map(e=>e.data.value).includes(e.targetData.node.data.value))return!1;if(t.remapJustFinished)return t.remapJustFinished=!1,(e.targetData.node.data.value===t.currentTargetValue||t.draggedNodes.map(e=>e.el).includes(e.targetData.node.el))&&(t.currentTargetValue=e.targetData.node.data.value),!1;if(t.preventEnter)return!1;if(t.draggedNodes.map(e=>e.el).includes(e.targetData.node.el))return t.currentTargetValue=void 0,!1;if(e.targetData.node.data.value===t.currentTargetValue||e.targetData.parent.el!==t.currentParent?.el||e.targetData.parent.data.config.sortable===!1||e.targetData.node.el.contains(t.draggedNodes[0].el))return!1;let i=e.targetData.node.el.getBoundingClientRect(),a=t.draggedNode.el.getBoundingClientRect(),o=i.y-a.y,s=i.x-a.x,c;c=Math.abs(o)>Math.abs(s)?o>0?`above`:`below`:s>0?`left`:`right`;let l=t.currentParent.data.config.threshold;switch(c){case`left`:if(n>i.x+i.width*l.horizontal)return t.incomingDirection=`left`,!0;break;case`right`:if(n<i.x+i.width*(1-l.horizontal))return t.incomingDirection=`right`,!0;break;case`above`:if(r>i.y+i.height*l.vertical)return t.incomingDirection=`above`,!0;break;case`below`:if(r<i.y+i.height*(1-l.vertical))return t.incomingDirection=`below`,!0;break;default:break}return!1}function hS(e,t){let{x:n,y:r}=tx(e.e);if(!mS(e,t,n,r))return;let i=t.draggedNode.data.index>e.targetData.node.data.index?[e.targetData.node.data.index,t.draggedNode.data.index]:[t.draggedNode.data.index,e.targetData.node.data.index];t.targetIndex=e.targetData.node.data.index,t.affectedNodes=e.targetData.parent.data.enabledNodes.filter(e=>i[0]<=e.data.index&&e.data.index<=i[1]&&e.el!==t.draggedNode.el),e.targetData.parent.data.config.performSort({parent:e.targetData.parent,draggedNodes:t.draggedNodes,targetNodes:[e.targetData.node]})}function gS(e){function t(e){let t=ix.get(e);if(!t)return;let n=rx.get(e.parentNode);if(n)return{node:{el:e,data:t},parent:{el:e.parentNode,data:n}}}return n=>{let r=t(n.currentTarget);if(r)return e({e:n,targetData:r},L)}}function _S(e,t){qb(e.e),dS({currentParent:t.currentParent,targetParent:e.targetData.parent,initialParent:t.initialParent,draggedNodes:t.draggedNodes,state:t})&&(e.targetData.parent.data.config.performTransfer({currentParent:t.currentParent,targetParent:e.targetData.parent,initialParent:t.initialParent,draggedNodes:t.draggedNodes,initialIndex:t.initialIndex,state:t,targetNodes:`node`in e.targetData?[e.targetData.node]:[]}),t.currentParent=e.targetData.parent,t.transferred=!0)}function vS(e){function t(e){let t=rx.get(e);if(t)return{parent:{el:e,data:t}}}return n=>{let r=t(n.currentTarget);if(r)return e({e:n,targetData:r},L)}}function yS(e,t,n=!1){function r(e,t){ix.set(e,t)}for(let i of e){let e=xS(i,t,ix.get(i),n);e&&r(i,e)}}function bS(e,t,n=!1){function r(e,t){rx.set(e,t)}for(let i of e){let e=xS(i,t,rx.get(i),n);e&&r(i,e)}}function xS(e,t,n,r=!1){if(!t)return;let i=ex(t);if(!i.length)return;if(!n){e.classList.add(...i);return}let a=[];for(let t of i)e.classList.contains(t)?e.classList.contains(t)&&r===!1&&a.push(t):e.classList.add(t);return n.privateClasses=a,n}function SS(e,t){if(!t)return;let n=ex(t);if(n.length)for(let t of e){if(!OS(t)){t.classList.remove(...n);continue}let e=ix.get(t)||rx.get(t);if(e)for(let r of n)e.privateClasses.includes(r)||t.classList.remove(r)}}function CS(e,t,n,r,i){let a=.075,o=i.axis===`x`,s=e===document.scrollingElement,c=o?`scrollLeft`:`scrollTop`,l=o?`clientWidth`:`clientHeight`,u=o?`offsetWidth`:`offsetHeight`,d=o?`scrollWidth`:`scrollHeight`,f=o?t.clientX:t.clientY,p=o?r.left:r.top,m=o?n.overflowX:n.overflowY;if(s){let t=e[c],n=e[l],r=t>0,s=t+n<(o?i.state.rootScrollWidth||0:e[d]);return o?{left:r&&f<n*a,right:s&&f>n*(1-a)}:{up:r&&f<n*a,down:s&&f>n*(1-a)}}if((m===`auto`||m===`scroll`)&&e!==document.body&&e!==document.documentElement){let t=e[d],n=e[u],r=e[c],i=r>0,s=r<t-n;return o?{left:i&&f<p+n*a,right:s&&f>p+n*(1-a)}:{up:i&&f<p+n*a,down:s&&f>p+n*(1-a)}}return o?{left:!1,right:!1}:{up:!1,down:!1}}function wS(e,t,n,r){if(!kx(n)||!n.draggedNode)return;n.preventEnter=!0;let i=r.axis===`x`,a=r.direction===`positive`?1:-1,o=i?`lastScrollDirectionX`:`lastScrollDirectionY`,s=i?`frameIdX`:`frameIdY`;n[s]!==void 0&&(cancelAnimationFrame(n[s]),n[s]=void 0),n[o]=r.direction;let c=()=>{if(!kx(n)||!n.draggedNode){n[s]!==void 0&&(cancelAnimationFrame(n[s]),n[s]=void 0);return}let t=i?`scrollLeft`:`scrollTop`,r=i?`clientWidth`:`clientHeight`,l=i?`scrollWidth`:`scrollHeight`,u=e[t],d=e[r],f=e[l];if(!(a>0?u+d<f:u>0)){n[s]=void 0,n[o]=void 0;return}e[t]+=20*a,Ax(n)&&oS(n),n[s]=requestAnimationFrame(c)};n[s]=requestAnimationFrame(c)}function TS(e,t,n){let r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom}function ES(e,t,n){if(!kx(n)||!n.draggedNode)return;aS(n);let{x:r,y:i}=e,a=!1,o=(e,r,i)=>{wS(i,t,n,{axis:e,direction:r}),a=!0},s=e=>{let r=window.getComputedStyle(e),i=e.getBoundingClientRect(),a=CS(e,t,r,i,{axis:`x`,state:n}),s=CS(e,t,r,i,{axis:`y`});(a.left||a.right)&&(n.lastScrollContainerX=e,o(`x`,a.right?`positive`:`negative`,e)),(s.up||s.down)&&(n.lastScrollContainerY=e,o(`y`,s.down?`positive`:`negative`,e))};if(n.lastScrollContainerX&&TS(n.lastScrollContainerX,r,i)&&s(n.lastScrollContainerX),!a&&n.lastScrollContainerY&&TS(n.lastScrollContainerY,r,i)&&s(n.lastScrollContainerY),!a){let e=document.elementFromPoint(r,i);for(;e&&!(a&&n.lastScrollContainerX&&n.lastScrollContainerY);)e instanceof HTMLElement&&s(e),e=e.parentElement}if(!a){let e=document.scrollingElement;e instanceof HTMLElement&&s(e)}a||aS(n)}function DS(e){let t=document.elementFromPoint(e.x,e.y);if(!OS(t))return;let n,r=!0;for(;t&&r;){if(ix.has(t)||rx.has(t)){r=!1,n=rx.has(t);break}t=t.parentNode}if(n){let e=rx.get(t);return e?{parent:{el:t,data:e}}:void 0}else{let e=ix.get(t);if(!e)return;let n=rx.get(t.parentNode);return n?{node:{el:t,data:e},parent:{el:t.parentNode,data:n}}:void 0}}function OS(e){return e instanceof HTMLElement&&e.parentNode instanceof HTMLElement}function kS(e,t){let n=new AbortController;for(let r in t){let i=t[r];e.addEventListener(r,i,{signal:n.signal,passive:!1,capture:r===`focus`||r===`blur`})}return n}function AS(e){if(e instanceof HTMLElement)return e;if(e.value instanceof HTMLElement)return e.value;if(`$el`in e&&e.$el instanceof HTMLElement)return e.$el}function jS(e,n){Array.isArray(e)||(e=[e]);for(let r of e){let e=AS(r);if(e)return n(e);let i=(0,t.watch)(r,e=>{if(!e)return;let t=AS(e);t?n(t):console.warn(`Invalid parent element`,e),i()})}}var MS=new WeakMap;function NS(e){let t=MS.get(e);return t?`value`in t?t.value:t:(console.warn(`No values found for parent element`),[])}function PS(e,t){let n=MS.get(t);n&&`value`in n&&(n.value=e)}function FS(e){nx&&(Array.isArray(e)||(e=[e]),e.forEach(e=>{let{parent:t,values:n,...r}=e;jS(t,LS(r,n))}))}function IS(e,n={}){let r=(0,t.ref)(),i=(0,t.ref)(e);function a(e={}){FS({parent:r,values:i,...e})}return FS({parent:r,values:i,...n}),(0,t.onUnmounted)(()=>r.value&&Ox(r.value)),[r,i,a]}function LS(e,t){return n=>{MS.set(n,t),_x({parent:n,getValues:NS,setValues:PS,config:{...e}})}}var R={draggedOverNodes:[],draggedOverParent:null,targetIndex:0,ascending:!1,insertPoint:null,dragging:!1};function RS(e){let t=e??null;for(;t&&t!==document.body;){let e=t.getAttribute(`data-testid`);if(e&&e.startsWith(`drop-area`))return t;t=t.parentElement}return null}function zS(e){let t=e?.getAttribute(`data-testid`);return!!t&&t.startsWith(`drop-area`)}Ul(),xl(),ks(),Ms(),cu();function BS(e){let t=Array.isArray(e)?e:[];if(t.length===0)return[];if(t.length===1){let e=t[0];return Lb(e,12),[Rb(e)]}return Vb(t,12),t.map(e=>Rb(e))}function VS(e){if(!e)return null;let t=e.getAttribute(`data-list-key`)||e.getAttribute(`data-card-key`)||e.getAttribute(`data-input-group-key`)||e.getAttribute(`data-button-group-key`)||e.getAttribute(`data-tabs-key`)||e.getAttribute(`data-tabs-pane-key`)||e.getAttribute(`data-group-key`);return t&&t.trim()?t:null}function HS(e,t,n){if(!t)return e;let r=new Set;return Ds(n,r),e.map(e=>{let t=JSON.parse(JSON.stringify(e));if(typeof t==`object`&&t){let e=t;e.$formkit===`submit`&&Array.isArray(e.children)&&delete e.children;let n=typeof e.__key==`string`&&e.__key?e.__key:ws(),i=e.$formkit===`submit`?e.name:Os(r);if(e.$formkit===`submit`)return{...t,__key:n,outerClass:`col-span-12 pt-2`};typeof e.$cmp==`string`&&(e.props=e.props&&typeof e.props==`object`?{...e.props,name:i}:{name:i});let a=As(e.$cmp??e.$formkit);if(a&&a.primitive===`cmp`){let r={...e.props,[a.keyProp]:n};return r&&typeof r==`object`&&delete r.modelValue,{...t,__key:n,name:i,id:`field_${n}`,props:r,children:Array.isArray(e.children)?e.children:[],outerClass:e.outerClass||`col-span-12`}}return{...t,__key:n,name:i,id:`field_${n}`,outerClass:e.outerClass||`col-span-12`}}return t})}function US(e,t,n,r){let i=R.insertPoint?.parent?.el,a=i?.getAttribute(`data-dnd-axis`),o=!!i?.getAttribute(`data-input-group-key`);if(a===`x`&&!o)return;if(r){n.forEach(e=>Lb(e,12));return}let s=R.explicitRow;if(typeof s==`number`&&Number.isFinite(s)){Kb(e,s,n);return}let c=Gb(e).find(e=>e.items.includes(t));if(!c){n.forEach(e=>Lb(e,12));return}let l=c.items.length+n.length;if(l<=4){let e=12/l;c.items.forEach(t=>Lb(t,e)),n.forEach(t=>Lb(t,e))}else n.forEach(e=>Lb(e,3))}function WS(e){if(!kx(e)&&!Ax(e))return;let t=R.insertPoint,n=e.initialParent,r=(()=>{let t=R.draggedOverParent;if(t?.el&&rx.get(t.el))return t;let n=e.coordinates;if(n?.x===void 0||n?.y===void 0)return e.currentParent;let r=n.x-(window.scrollX||document.documentElement.scrollLeft),i=n.y-(window.scrollY||document.documentElement.scrollTop),a=document.elementFromPoint(r,i),o=a instanceof HTMLElement?a:null;for(;o;){let t=rx.get(o);if(t){let n={el:o,data:t},r=t.config?.accepts;if(typeof r==`function`){let t=!0;try{t=r(n,e.initialParent,e.currentParent,e)}catch{t=!0}if(!t){o=o.parentElement;continue}}return n}o=o.parentElement}return e.currentParent})(),i=r.data.config?.dndContext,a=i?.formSchema.value??pl.value,o=VS(n.el),s=VS(r.el),c=e.draggedNodes.map(e=>e.data.value),l=new Set;for(let e of c){let t=e?.__key;typeof t==`string`&&t&&l.add(t)}let u=n.el.getAttribute(`data-is-source`)===`true`,d=Tx(n.el,n.data),f=Tx(r.el,r.data),p=R.draggedOverNodes[0],m=R.explicitIndex,h=typeof m==`number`&&Number.isFinite(m),g=f.length;R.draggedOverParent&&(g=0),p&&(g=p.data.index||0),h&&(g=m),!h&&p&&R.ascending&&g++,g=Math.max(0,Math.min(f.length,g));let _=HS(n.data.config.insertConfig?.dynamicValues&&u?n.data.config.insertConfig.dynamicValues({sourceParent:n,targetParent:r,draggedNodes:e.draggedNodes,targetNodes:R.draggedOverNodes,targetIndex:g}):c,u,a),v=null,y=null;if(n.el===r.el){let t=d.filter(e=>{let t=e?.__key;return typeof t==`string`&&t?!l.has(t):!c.some(t=>ou(e,t))}),r=e.draggedNodes.filter(e=>e.data.index<g).length,i=Math.max(0,Math.min(t.length,g-r));p?US(t,p.data.value,_,R.verticalInsert??!1):_.forEach(e=>Lb(e,12)),t.splice(i,0,..._),Ex(n.el,n.data,[...t]),v=t}else{if(!u){let e=d.filter(e=>{let t=e?.__key;return typeof t==`string`&&t?!l.has(t):!c.some(t=>ou(e,t))});Ex(n.el,n.data,[...e]),v=e}let e=[...f];p?US(e,p.data.value,_,R.verticalInsert??!1):_.forEach(e=>Lb(e,12)),e.splice(g,0,..._),Ex(r.el,r.data,[...e]),y=e}let b=RS(r.el),x=b?rx.get(b):void 0;if(!b||!x)return;let S=Tx(b,x);b===n.el&&v&&(S=v),b===r.el&&y&&(S=y);let C=new Map,w=Array.from(b.querySelectorAll(`[data-list-key],[data-card-key],[data-input-group-key],[data-button-group-key],[data-tabs-key],[data-tabs-pane-key],[data-group-key]`));for(let e of w){let t=VS(e);if(!t)continue;let i=rx.get(e);if(!i)continue;let a=Tx(e,i);o&&t===o&&v&&n.el!==b&&(a=v),s&&t===s&&y&&r.el!==b&&(a=y);let c=a.map(e=>{if(e?.$formkit===`submit`&&Array.isArray(e.children)){let t={...e};return delete t.children,t}return e});C.set(t,c)}let ee=e=>{if(!e||typeof e!=`object`)return e;if(e.$formkit===`submit`&&Array.isArray(e.children)){let t={...e};return delete t.children,t}let t=e.__key,n=e;if(typeof t==`string`&&t&&C.has(t)){let r=C.get(t)??[],i=e.$formkit===`inputGroup`||e.$cmp===`inputGroup`,a=e.$formkit===`buttonGroup`||e.$cmp===`buttonGroup`,o=i?BS(r):a?r.map(e=>Rb(e)):r;n={...e,children:o},n.$cmp&&(n.props={...n.props},n.props&&typeof n.props==`object`&&delete n.props.modelValue)}else{let t=As(e.$cmp??e.$formkit);t&&t.primitive===`cmp`&&!Array.isArray(e.children)&&(n={...e,children:[]},n.$cmp&&(n.props={...n.props},n.props&&typeof n.props==`object`&&delete n.props.modelValue))}if(Array.isArray(n.children)){let e=n.children.map(e=>ee(e));n={...n,children:e}}return n},te=S.map(e=>ee(e));(i?.commitSchemaReconcile??Rl)(te,{reason:`dnd`}),t&&(t.el.style.display=`none`);let T=Ax(e)?e.initialParent.data.config.synthDropZoneClass:e.initialParent.data.config.dropZoneClass;SS(R.draggedOverNodes.map(e=>e.el),T),R.draggedOverParent&&SS([R.draggedOverParent.el],R.draggedOverParent.data.config.dropZoneClass),R.draggedOverNodes=[],R.draggedOverParent=null,R.explicitIndex=void 0,R.explicitRow=void 0}function GS(e){let{top:t,bottom:n,left:r,right:i,height:a,width:o}=e.getBoundingClientRect(),s=window.scrollX||document.documentElement.scrollLeft,c=window.scrollY||document.documentElement.scrollTop;return{top:t+c,bottom:n+c,left:r+s,right:i+s,height:a,width:o}}function KS(e){if(!kx(L)&&!Ax(L))return;let t=rx.get(e);if(!t)return;let n=e.getAttribute(`data-dnd-axis`)===`x`;t.enabledNodes.forEach(e=>{e.data.range={};let t=GS(e.el),r=t.top,i=t.bottom,a=t.left,o=t.right,s=t.width,c=t.height,l=Math.min(s*.25,60),u=e.data.range;u.left={x:[a,a+l],y:[r,i],vertical:!1},u.right={x:[o-l,o],y:[r,i],vertical:!1},n||(u.top={x:[a+l,o-l],y:[r,r+c/2],vertical:!0},u.bottom={x:[a+l,o-l],y:[r+c/2,i],vertical:!0})})}ks();function qS(e,t){let n=e.data.config.insertConfig?.insertPoint({el:e.el,data:e.data});if(!n)throw Error(`Insert point not found`);t.insertPoint={parent:e,el:n},document.body.appendChild(n),Object.assign(n.style,{position:`absolute`,display:`none`})}function JS(e){e.insertPoint?.el&&e.insertPoint.el.remove(),e.insertPoint=null}function YS(e,t,n,r,i){let a=(e.data.config?.dndContext)?.formSchema.value??[];if(i.insertPoint?.parent.el!==e.el&&(JS(i),qS(e,i)),i.draggedOverNodes=[r],i.targetIndex=r.data.index,i.ascending=n,!i.insertPoint)return;i.insertPoint.el.style.display=`block`;let o=i.insertPoint.el;i.explicitIndex=void 0,i.explicitRow=void 0;let s=()=>{o.childElementCount&&o.replaceChildren();let e=o.getAttribute(`data-insert-bg`);e&&(o.style.backgroundColor=e)};if(t.vertical){s();let e=o.getBoundingClientRect().height||4,r=t.y[+!!n]-e/2;Object.assign(o.style,{top:`${r}px`,left:`${t.x[0]}px`,width:`${t.x[1]-t.x[0]}px`,height:`4px`,bottom:``,right:``})}else{let c=o.getBoundingClientRect().width||4,l=t.x[+!!n]-c/2,u=t.y[1]-t.y[0],d=e.data.getValues(e.el),f=Array.isArray(d)&&typeof r.data.index==`number`?d[r.data.index]:void 0,p=r.data.value?.__key,m=Bb((typeof p==`string`&&p?Ts(a,p):void 0)??f??r.data.value),h=i.draggedRowSpan??1,g=m>1&&h===1,_=L.coordinates;if(m>1&&typeof r.data.index==`number`&&_?.y!==void 0){let e=GS(r.el),t=_.y-e.top,o=e.height/m,s=Math.max(1,Math.min(m,Math.floor(t/o)+1));if(s>1){let e=Hb(Array.isArray(d)?d.map(e=>{let t=e?.__key;return typeof t==`string`&&t?Ts(a,t)??e:e}):[]),t=e[r.data.index];if(t){let r=t.row+(s-1),a=n?t.col+t.colSpan:t.col;i.explicitRow=r,i.explicitIndex=Wb(e,r,a)}}}if(g){let e=(u-8*(m-1))/m,t=getComputedStyle(o).backgroundColor;o.style.backgroundColor=`transparent`,o.replaceChildren();for(let n=0;n<m;n++){let r=document.createElement(`div`);Object.assign(r.style,{position:`absolute`,left:`0px`,top:`${n*(e+8)}px`,width:`4px`,height:`${Math.max(0,e)}px`,backgroundColor:t,borderRadius:`2px`}),o.appendChild(r)}}else s();Object.assign(o.style,{left:`${l}px`,top:`${t.y[0]}px`,bottom:``,height:`${u}px`,width:`4px`,right:``})}i.targetIndex=r.data.index,i.ascending=n}cu();var XS,ZS=e=>{let t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?100:0,n=null;return(...r)=>{n===null&&(e(...r),n=setTimeout(()=>{n=null},t))}};function QS(e){let t=e.parentElement;for(;t;){let{overflow:e,overflowY:n,overflowX:r}=getComputedStyle(t),i=e!==`visible`||n!==`visible`||r!==`visible`,a=t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth,o=t.scrollTop>0||t.scrollLeft>0;if(i&&(a||o))return t;t=t.parentElement}return null}function $S(e){if(!kx(L))return;let t=document.elementFromPoint(e.clientX,e.clientY);if(!(t instanceof HTMLElement)||t===R.insertPoint?.el){R.insertPoint&&(R.insertPoint.el.style.display=`none`);return}let n=!1,r=t;for(;r;){if(ix.has(r)||rx.has(r)){n=!0;break}if(r===document.body)break;r=r.parentElement}n||(R.insertPoint&&(R.insertPoint.el.style.display=`none`),R.draggedOverParent&&SS([R.draggedOverParent.el],R.draggedOverParent.data.config.dropZoneClass),R.draggedOverNodes=[],R.draggedOverParent=null,L.currentParent=L.initialParent)}function eC(e){e.targetData.parent.data.config.nativeDrag&&e.e.preventDefault()}var tC=ZS(oC);function nC(e,t,n,r=!1){if(iu(e),r&&e instanceof PointerEvent)return;let{x:i,y:a}=au(e),o=window.scrollX||document.documentElement.scrollLeft,s=window.scrollY||document.documentElement.scrollTop;n.coordinates.x=i+o,n.coordinates.y=a+s;let c=t.parent.data.nestedParent,l=t.parent;if(c){let e=c.el.getBoundingClientRect();n.coordinates.y>e.top&&n.coordinates.y<e.bottom&&(l=c)}KS(l.el),l.el===n.currentParent?.el?tC(l,n):sC(l,n),n.currentParent=l}function rC(e,t){nC(e.e,e.targetData,t,!0)}function iC(e){let{detail:t}=e,{state:n,targetData:r}=t;n.scrolling||nC(t.e,r,n)}function aC(e,t){if(!e)return;let n=e[1],r=e[0].data.range?e[0].data.range[n]:void 0;r&&(R.verticalInsert=n===`top`||n===`bottom`,YS(t,r,n===`right`||n===`bottom`,e[0],R))}function oC(e,t){if(e.data.config.sortable!==!1){if(R.draggedRowSpan=Math.max(1,...t.draggedNodes.map(e=>{let t=e.data?.value?.outerClass;if(typeof t!=`string`)return 1;let n=t.match(/\brow-span-(\d+)\b/),r=n?parseInt(n[1],10):1;return Number.isFinite(r)&&r>0?r:1})),e.data.getValues(e.el).length===0){if(R.draggedOverParent=e,bS([e.el],e.data.config.dropZoneClass),R.insertPoint||qS(e,R),R.insertPoint){let t=e.el.getBoundingClientRect(),n=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,i=e.el.getAttribute(`data-dnd-axis`)===`x`;Object.assign(R.insertPoint.el.style,{position:`absolute`,display:`block`,top:i?`${t.top+r}px`:`${t.top+t.height/2+r-2}px`,left:i?`${t.left+t.width/2+n-2}px`:`${t.left+n}px`,width:i?`4px`:`${t.width}px`,height:i?`${t.height}px`:`4px`,transform:``})}R.verticalInsert=e.el.getAttribute(`data-dnd-axis`)!==`x`,R.targetIndex=0,R.ascending=!0;return}e.el===R.draggedOverParent?.el&&R.draggedOverParent.data.getValues(e.el).length===0||(R.draggedOverParent?.el&&(SS([R.draggedOverParent.el],R.draggedOverParent.data.config.dropZoneClass),R.draggedOverParent=null),aC(cC(e.data.enabledNodes,t),e))}}function sC(e,t){if(e.el===t.currentParent.el)return!1;let n=e.data.config;if(t.draggedNode.el.contains(e.el))return!1;if(n.dropZone===!1)return;let r=t.initialParent.data.config;if(n.accepts)return n.accepts(e,t.initialParent,t.currentParent,t);if(!n.group||n.group!==r.group)return!1;if(e.data.getValues(e.el).length)SS([t.currentParent.el],n.dropZoneClass),R.draggedOverParent?.el&&(SS([R.draggedOverParent.el],R.draggedOverParent.data.config.dropZoneClass),R.draggedOverParent=null),R.draggedRowSpan=Math.max(1,...t.draggedNodes.map(e=>{let t=e.data?.value?.outerClass;if(typeof t!=`string`)return 1;let n=t.match(/\brow-span-(\d+)\b/),r=n?parseInt(n[1],10):1;return Number.isFinite(r)&&r>0?r:1})),aC(cC(e.data.enabledNodes,t),e);else{R.draggedOverParent?.el&&R.draggedOverParent.el!==e.el&&SS([R.draggedOverParent.el],R.draggedOverParent.data.config.dropZoneClass),bS([e.el],n.dropZoneClass),R.draggedOverParent=e;let t=R.insertPoint;t&&(t.el.style.display=`none`)}}function cC(e,t){if(t.coordinates?.x===void 0||t.coordinates?.y===void 0)return null;let n=null;for(let r=0;r<e.length;r++){let i=e[r];if(!i||!i.data.range)continue;let a=i.data.range,o=e=>t.coordinates.y>e.y[0]&&t.coordinates.y<e.y[1]&&t.coordinates.x>e.x[0]&&t.coordinates.x<e.x[1];if(a?.left&&o(a.left)){n=[i,`left`];break}if(a?.right&&o(a.right)){n=[i,`right`];break}if(a?.top&&o(a.top)){n=[i,`top`];break}if(a?.bottom&&o(a.bottom)){n=[i,`bottom`];break}}return R.insertPoint&&t.initialParent?.el!==t.currentParent?.el&&(R.insertPoint.el.style.display=`none`),n}function lC(e,n){return r=>{let i=rx.get(r);if(!i)return;let a={...i.config,insertConfig:e,dndContext:n};return{setup(){a.handleNodeDragover=e.handleNodeDragover||eC,a.handleParentPointerover=e.handleParentPointerover||iC,a.handleNodePointerover=e.handleNodePointerover||iC,a.handleParentDragover=e.handleParentDragover||rC;let o=a.handleEnd;a.handleEnd=e=>{WS(e),o(e)},i.on(`dragStarted`,()=>{XS=kS(document,{dragover:ZS($S),pointermove:ZS($S)})}),i.on(`dragEnded`,()=>{XS?.abort()}),i.config=a,L.on(`dragStarted`,()=>{KS(r)}),n&&zS(r)&&(0,t.watch)(n.formSchema,e=>{e&&Ex(r,i,[...e])},{deep:!0}),L.on(`scrollStarted`,()=>{R.insertPoint&&(R.insertPoint.el.style.display=`none`)}),L.on(`scrollEnded`,()=>{KS(r)});let s=QS(r);s&&s.addEventListener(`scroll`,KS.bind(null,r)),window.addEventListener(`resize`,KS.bind(null,r))}}}}function uC(){let e=document.createElement(`div`);return e.setAttribute(`data-insert-bg`,`#22c55e`),Object.assign(e.style,{backgroundColor:`#22c55e`,opacity:`0.9`,pointerEvents:`none`,borderRadius:`2px`,zIndex:`2000`}),e}cu(),Zl();function dC(e){let n=Jl(),r=(0,t.computed)(()=>e.rootSelector??`[data-testid="drop-area-${n.instanceId}"]`),i=(0,t.computed)(()=>e.insertPoint??uC),a=(0,t.computed)(()=>(0,t.unref)(e.enabled)??!0),o=(0,t.computed)(()=>(0,t.unref)(e.dragHandle)),s={formSchema:n.formSchema,commitSchemaReconcile:n.commitSchemaReconcile},[c,l,u]=IS(e.modelValue.value,{group:`form-builder`,nativeDrag:!0,accepts:(t,n,r,i)=>{if(!e.accepts)return!0;let a=i,o=a.activeState?.node?.data?.value??a.currentTargetValue??a.draggedNodes?.[0]?.data?.value;return e.accepts(o)},sortable:a.value,draggable:()=>!0,disabled:!a.value,dragHandle:o.value,plugins:[lC({insertPoint:i.value},s)],handleNodePointerup(e){e.targetData.node.el.setAttribute(`draggable`,`true`)}}),d=(0,t.ref)(!1),f=()=>document.querySelector(r.value);return(0,t.watch)(e.modelValue,e=>{if(!Array.isArray(e)||ou(e,l.value))return;d.value=!0;let t=c.value??null,n=t?rx.get(t):void 0;t&&n?Ex(t,n,[...e]):l.value=[...e],queueMicrotask(()=>{d.value=!1})},{deep:!0}),(0,t.watch)([a,o],([e,t])=>{u({sortable:e,disabled:!e,dragHandle:e?t:void 0})}),{containerRef:c,items:l,emitUpdate:()=>{d.value||e.onUpdateModelValue([...l.value])},setNestedParentOnRoot:e=>{let t=f();if(!t)return;let n=c.value??null,r=n?rx.get(n):void 0;!n||!r||t.dispatchEvent(new CustomEvent(`hasNestedParent`,{detail:{parent:e?{el:n,data:r}:null}}))}}}function fC(e){let t=e;if(!t||typeof t!=`object`)return e;let n={...t};return`if`in n&&delete n.if,`__raw__ifExpression`in n&&delete n.__raw__ifExpression,`bind`in n&&typeof n.bind!=`string`&&(n.__bind||=n.bind,delete n.bind),typeof n.$cmp==`string`&&typeof n.__key==`string`&&(n.props={...n.props,__key:n.__key}),Array.isArray(n.children)&&(n.children=n.children.map(e=>fC(e))),n}function pC(e,t,n=`s`){return e===1?t:t+n}function mC(e){let t=e?.props?.validation??e?.validation;return typeof t==`string`?t.split(`|`).map(e=>e.trim()).filter(Boolean).length:0}function hC(e,t){let n=Math.max(1,Math.min(12,Math.round(t))),r=typeof e.outerClass==`string`?e.outerClass:``;return r=/\bcol-span-\d+\b/.test(r)?r.replace(/\bcol-span-\d+\b/g,`col-span-${n}`).replace(/\s+/g,` `).trim():`${r} col-span-${n}`.replace(/\s+/g,` `).trim(),{...e,outerClass:r||void 0}}function gC(e){let n=(0,t.ref)(null),r=(0,t.ref)(null),i=(0,t.ref)(0),a=(0,t.ref)(12),o=(0,t.ref)(0),s=(t,n)=>{let r=e.items.value[t];if(!r)return;let i=[...e.items.value];i[t]=hC(r,n),e.items.value=i},c=(t,s)=>{n.value=s,r.value=t.pointerId,i.value=t.clientX,a.value=Ib(e.items.value[s]);let c=e.containerRef.value??null;c&&(o.value=c.getBoundingClientRect().width/12),window.addEventListener(`pointermove`,l),window.addEventListener(`pointerup`,u),window.addEventListener(`pointercancel`,u)},l=t=>{if(n.value===null||r.value!==null&&t.pointerId!==r.value||!o.value)return;let c=t.clientX-i.value,l=Math.round(c/o.value),u=a.value+l;if(e.maxSpanFor&&n.value!==null){let t=Math.max(1,e.maxSpanFor(n.value,e.items.value));u=Math.min(u,t)}s(n.value,u)},u=t=>{r.value!==null&&t.pointerId!==r.value||(n.value=null,r.value=null,window.removeEventListener(`pointermove`,l),window.removeEventListener(`pointerup`,u),window.removeEventListener(`pointercancel`,u),e.onResizeEnd())};return{resizingIndex:n,startResize:c}}var _C=[`onPointerdown`,`onKeydown`],vC={key:0,type:`button`,tabindex:`-1`,"aria-label":`Drag to reorder`,draggable:`false`,"data-dnd-handle":`true`,class:`absolute top-2 left-2 z-40 text-muted-foreground/70 hover:text-muted-foreground !cursor-grab`},yC={class:`flex gap-1.5 p-1 w-full pb-2`},bC={class:`flex-1 w-full min-w-0`},xC={class:`absolute bottom-2 right-2 flex flex-row z-40`},SC={key:0,class:`px-2 mr-1 border-1 border-ring/40 dark:border-ring/20 rounded-md flex items-center justify-center`},CC={class:`text-xs`},wC={key:2,class:`absolute inset-0 z-40 bg-[#a277ff]/[0.06] flex items-center justify-center rounded-xl border-[1.5px] border-[#a277ff]/50`},TC={class:`bg-[#a277ff] text-white text-xs font-medium px-2.5 py-1 rounded-lg tracking-wide`},EC=(0,t.defineComponent)({__name:`ContainerChildrenGrid`,props:{containerRef:{},items:{},selectedKey:{},emptyText:{},deleteAriaLabel:{},resizeAriaLabel:{},dragHandle:{type:Boolean},dragEnabled:{type:Boolean},showDeleteTooltip:{type:Boolean},deleteTooltipText:{},dataAttrs:{},ulClass:{},layout:{},autoWidth:{type:Boolean},equalWidth:{type:Boolean},vertical:{type:Boolean},setNestedParentOnRoot:{type:Function},onSelect:{type:Function},onSelectBlank:{type:Function},onDelete:{type:Function},onResizeEnd:{type:Function},maxSpanFor:{type:Function}},setup(e){let r=e,i=(0,t.ref)(!1),a=fb(),o=(0,t.computed)(()=>a?.library),s=e=>a?.renderNode?a.renderNode(e):fC(e),{resizingIndex:c,startResize:l}=gC({items:r.items,containerRef:r.containerRef,onResizeEnd:r.onResizeEnd,maxSpanFor:r.maxSpanFor}),u=(0,t.computed)(()=>r.layout??`grid`),d=(0,t.computed)(()=>r.dragEnabled!==!1),f=(0,t.computed)(()=>r.dragHandle===!0),p=(0,t.computed)(()=>u.value===`row`?r.vertical?`w-full flex-1 flex flex-col items-start gap-0 list-none p-0 m-0`:r.autoWidth?`w-full flex-1 flex flex-row flex-nowrap items-center gap-0 list-none p-0 m-0 overflow-x-hidden`:`w-full flex-1 flex flex-row flex-nowrap items-stretch gap-0 list-none p-0 m-0 overflow-x-hidden`:`w-full flex-1 grid grid-cols-12 gap-x-4 gap-y-2 list-none p-2 m-0`),m=(0,t.computed)(()=>u.value===`row`?`w-full min-h-[140px] flex items-center justify-center pointer-events-none`:`col-span-12 min-h-[140px] flex items-center justify-center pointer-events-none`),h=e=>{if(u.value===`row`){if(r.autoWidth)return{width:`auto`,flex:`0 0 auto`};if(r.equalWidth&&r.vertical)return{width:`100%`,flex:`0 0 auto`};if(r.equalWidth)return{flex:`1 1 0%`,width:`0%`};if(r.items.value.length===1)return{width:`100%`,flex:`0 0 auto`};let t=r.items.value.map(e=>Math.max(1,Math.min(12,Ib(e)))).reduce((e,t)=>e+t,0)||1,n=Math.max(1,Math.min(12,Ib(e)));return{width:`${t>12?n/t*100:n/12*100}%`,flex:`0 0 auto`}}return{gridColumn:`span ${Ib(e)} / span ${Ib(e)}`,gridRow:`span ${Bb(e)} / span ${Bb(e)}`}},g=(0,t.computed)(()=>u.value===`row`?`absolute top-2 right-1 z-30`:`absolute top-1/2 -translate-y-1/2 -right-3 z-30`);return(e,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`relative w-full flex flex-col flex-1 min-h-0`,u.value===`row`?`min-w-0`:``]),onPointerdown:a[7]||=(0,t.withModifiers)(e=>r.onSelectBlank?.(),[`self`])},[(0,t.createElementVNode)(`ul`,(0,t.mergeProps)({ref:r.containerRef,class:[p.value,r.ulClass,r.items.value.length===0?`min-h-[140px] bg-muted/20 rounded-lg`:``,u.value===`row`&&r.items.value.length===0?`items-center justify-center`:``]},r.dataAttrs,{onPointerdown:a[2]||=(0,t.withModifiers)(e=>r.onSelectBlank?.(),[`self`]),onDragoverCapture:a[3]||=e=>r.setNestedParentOnRoot?.(!0),onDragstartCapture:a[4]||=e=>i.value=!0,onDragendCapture:a[5]||=e=>(i.value=!1,r.setNestedParentOnRoot?.(!1)),onDrop:a[6]||=e=>(i.value=!1,r.setNestedParentOnRoot?.(!1))}),[r.items.value.length===0?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:0,class:(0,t.normalizeClass)(m.value)},[(0,t.renderSlot)(e.$slots,`empty`,{},()=>[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:r.emptyText},null,8,[`description`])])],2)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.items.value,(e,u)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:e?.__key||e.name||`${e.$formkit}-${u}`,"data-canvas-item":`true`,class:(0,t.normalizeClass)([`group rounded-xl transition-[border-color,background-color,box-shadow] duration-150`,`px-2 py-1 pr-4 h-full !z-20 relative border-[1.5px] min-w-0 box-border`,d.value?f.value?`!cursor-default`:`!cursor-grab`:`!cursor-default`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#a277ff] focus-visible:ring-offset-2`,e?.__key&&e.__key===r.selectedKey?`border-solid border-[#a277ff] bg-[#a277ff]/[0.05] shadow-[0_0_0_3px_rgba(79,110,247,0.12)] dark:bg-[#a277ff]/[0.08]`:`border-dashed border-transparent hover:border-[#7c9ef8] hover:bg-[#f0f4ff] dark:hover:bg-[rgba(100,130,255,0.07)]`]),style:(0,t.normalizeStyle)(h(e)),tabindex:`0`,onPointerdown:(0,t.withModifiers)(t=>r.onSelect(e,u),[`stop`]),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(t=>r.onSelect(e,u),[`stop`,`prevent`]),[`enter`]),(0,t.withKeys)((0,t.withModifiers)(t=>r.onSelect(e,u),[`stop`,`prevent`]),[`space`])]},[d.value&&f.value?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,vC,[...a[8]||=[(0,t.createElementVNode)(`span`,{"aria-hidden":`true`,class:`i-lucide-grip-vertical h-4 w-4`},null,-1)]])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,yC,[(0,t.createElementVNode)(`div`,bC,[((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mo),{schema:[s(e)],library:o.value,key:`container-child-${u}`},null,8,[`schema`,`library`]))])]),(0,t.createElementVNode)(`div`,xC,[e?.__key&&e.__key===r.selectedKey?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,SC,[(0,t.createElementVNode)(`span`,CC,(0,t.toDisplayString)((0,t.unref)(mC)(e))+` `+(0,t.toDisplayString)((0,t.unref)(pC)((0,t.unref)(mC)(e),`rule`)),1)])):(0,t.createCommentVNode)(``,!0),r.showDeleteTooltip?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTooltip),{key:1,placement:`top`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,size:`small`,"aria-label":r.deleteAriaLabel,draggable:`false`,onPointerdown:a[0]||=(0,t.withModifiers)(()=>{},[`stop`,`prevent`]),onClick:(0,t.withModifiers)(e=>r.onDelete(u),[`stop`]),class:`!h-[26px] !w-[26px] !rounded-[7px] !text-muted-foreground hover:!bg-red-100 hover:!text-red-600 active:!scale-95 active:!bg-red-200 active:!text-red-700 dark:hover:!bg-red-950/50 dark:hover:!text-red-400 transition-[transform,background-color,color,opacity] duration-150`},{icon:(0,t.withCtx)(()=>[...a[9]||=[(0,t.createElementVNode)(`span`,{"aria-hidden":`true`,class:`i-lucide-trash-2 !h-[13px] !w-[13px]`},null,-1)]]),_:1},8,[`aria-label`,`onClick`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)(r.deleteTooltipText),1)]),_:2},1024)):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NButton),{key:2,quaternary:``,size:`small`,"aria-label":r.deleteAriaLabel,draggable:`false`,onPointerdown:a[1]||=(0,t.withModifiers)(()=>{},[`stop`,`prevent`]),onClick:(0,t.withModifiers)(e=>r.onDelete(u),[`stop`]),class:`!h-[26px] !w-[26px] !rounded-[7px] !text-muted-foreground hover:!bg-red-100 hover:!text-red-600 active:!scale-95 active:!bg-red-200 active:!text-red-700 dark:hover:!bg-red-950/50 dark:hover:!text-red-400 transition-[transform,background-color,color,opacity] duration-150`},{icon:(0,t.withCtx)(()=>[...a[10]||=[(0,t.createElementVNode)(`span`,{"aria-hidden":`true`,class:`i-lucide-trash-2 !h-[13px] !w-[13px]`},null,-1)]]),_:1},8,[`aria-label`,`onClick`]))]),!r.autoWidth&&!r.equalWidth?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NButton),{key:1,text:``,size:`small`,"aria-label":r.resizeAriaLabel??`Resize`,class:(0,t.normalizeClass)([g.value,`opacity-0 pointer-events-none`,`group-hover:opacity-100 group-hover:pointer-events-auto`,`transition-[transform,opacity] duration-150`,`!cursor-ew-resize`,(0,t.unref)(c)===u?`!opacity-100 scale-110`:i.value?`!opacity-0 !pointer-events-none`:``]),"content-class":`!cursor-ew-resize`,onPointerdown:(0,t.withModifiers)(e=>(0,t.unref)(l)(e,u),[`stop`,`prevent`])},{icon:(0,t.withCtx)(()=>[...a[11]||=[(0,t.createElementVNode)(`span`,{"aria-hidden":`true`,class:`i-lucide-more-vertical h-5 w-5`},null,-1)]]),_:1},8,[`aria-label`,`class`,`onPointerdown`])):(0,t.createCommentVNode)(``,!0),(0,t.unref)(c)===u?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,wC,[(0,t.createElementVNode)(`span`,TC,(0,t.toDisplayString)((0,t.unref)(Ib)(e)),1)])):(0,t.createCommentVNode)(``,!0)],46,_C))),128))],16)],34))}});A(),Zl();var DC={class:`w-full rounded-xl border border-border/50 bg-card/50`},OC={key:0,class:`flex items-center justify-between px-3 py-2 border-b border-border/50`},kC={key:0,class:`text-xs text-muted-foreground`},AC={class:`p-2`},jC=(0,t.defineComponent)({__name:`ListContainer`,props:{listKey:{},modelValue:{},label:{},disabled:{type:Boolean},showActions:{type:Boolean}},emits:[`update:modelValue`,`duplicate`,`remove`,`select`],setup(e,{emit:r}){let{selectedKey:i}=Jl(),a=e,o=r,{t:s}=k(),c=(0,t.computed)(()=>Array.isArray(a.modelValue)?a.modelValue:[]),l=fb(),u=dC({modelValue:c,onUpdateModelValue:e=>{let t=a.listKey;t&&l?.updateContainerChildren?l.updateContainerChildren(t,e):o(`update:modelValue`,e)}}),d=(0,t.computed)(()=>a.showActions===!0),f=(0,t.computed)(()=>typeof a.label==`string`&&a.label.trim()?a.label.trim():``),p=(0,t.computed)(()=>!!f.value||d.value),m=(e,t)=>{let n=e?.__key;n&&(l?.selectByKey?l.selectByKey(n):o(`select`,n))},h=e=>{let t=u.items.value.filter((t,n)=>n!==e);u.items.value=t,u.emitUpdate()};return(r,c)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,DC,[p.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,OC,[f.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kC,(0,t.toDisplayString)(f.value),1)):(0,t.createCommentVNode)(``,!0),d.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NButtonGroup),{key:1},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NTooltip),{placement:`top`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,size:`small`,disabled:e.disabled,onClick:c[0]||=(0,t.withModifiers)(e=>o(`duplicate`),[`stop`])},{icon:(0,t.withCtx)(()=>[...c[2]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-plus h-4 w-4`},null,-1)]]),_:1},8,[`disabled`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(s)(`builder.listAdd`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NTooltip),{placement:`top`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,size:`small`,disabled:e.disabled,onClick:c[1]||=(0,t.withModifiers)(e=>o(`remove`),[`stop`])},{icon:(0,t.withCtx)(()=>[...c[3]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-trash-2 h-4 w-4`},null,-1)]]),_:1},8,[`disabled`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(s)(`builder.listRemove`)),1)]),_:1})]),_:1})):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,AC,[(0,t.createVNode)(EC,{"container-ref":(0,t.unref)(u).containerRef,items:(0,t.unref)(u).items,"selected-key":(0,t.unref)(i),"empty-text":(0,t.unref)(s)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(s)(`builder.deleteField`),"resize-aria-label":(0,t.unref)(s)(`builder.resizeFieldWidth`),"data-attrs":{"data-list-key":a.listKey},"set-nested-parent-on-root":(0,t.unref)(u).setNestedParentOnRoot,"on-select":m,"on-delete":h,"on-resize-end":(0,t.unref)(u).emitUpdate},null,8,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`resize-aria-label`,`data-attrs`,`set-nested-parent-on-root`,`on-resize-end`])])]))}});A();var MC={class:`w-full rounded-xl border border-border/50 bg-card/50`},NC={key:0,class:`flex items-center justify-between px-3 py-2 border-b border-border/50`},PC={class:`text-xs text-muted-foreground`},FC={class:`p-2`},IC={key:0,class:`min-h-[140px] flex items-center justify-center`},LC={class:`flex flex-col items-center gap-3`},RC={class:`grid grid-cols-12 gap-x-4 gap-y-2`},zC={key:1,class:`flex w-full items-center justify-center`},BC=(0,t.defineComponent)({__name:`ListContainerPreview`,props:{nodeKey:{},listKey:{},children:{},modelValue:{},label:{},name:{},isPlaceholder:{type:Boolean}},setup(e){let r=e,i=(0,t.inject)(`previewListRestore`,null),a=(0,t.inject)(`previewListInteractive`,!0),{t:o}=k(),s=Yw(),c=(0,t.computed)(()=>typeof r.label==`string`&&r.label.trim()?r.label.trim():``),l=(0,t.computed)(()=>r.nodeKey??r.listKey??``),u=(0,t.computed)(()=>typeof r.name==`string`&&r.name.trim()?r.name.trim():r.listKey||`list`),d=(0,t.computed)(()=>Array.isArray(r.modelValue)?r.modelValue:Array.isArray(r.children)?r.children:[]),f=(0,t.computed)(()=>r.isPlaceholder===!0&&typeof i==`function`),p=(e,t)=>{e.input([...Array.isArray(t)?t:[],{}])},m=(e,t,n)=>{e.input((Array.isArray(t)?t:[]).filter((e,t)=>t!==n))};return(e,h)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,MC,[c.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,NC,[(0,t.createElementVNode)(`div`,PC,(0,t.toDisplayString)(c.value),1)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,FC,[r.isPlaceholder===!0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,IC,[(0,t.createElementVNode)(`div`,LC,[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:(0,t.unref)(o)(`builder.listRemove`)},null,8,[`description`]),f.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NButton),{key:0,secondary:``,onClick:h[0]||=e=>(0,t.unref)(i)?.(l.value)},{icon:(0,t.withCtx)(()=>[...h[1]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-plus h-4 w-4`},null,-1)]]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(o)(`builder.addListContainer`)),1)]),_:1})):(0,t.createCommentVNode)(``,!0)])])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(zo),{key:1,type:`list`,name:u.value,dynamic:!0,value:[{}]},{default:(0,t.withCtx)(({items:e,node:r,value:i})=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e,(c,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:l,class:`relative mb-2 rounded-lg border border-border/40 bg-card/40 p-2`},[(0,t.createVNode)((0,t.unref)(zo),{type:`group`,index:l},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,RC,[(0,t.createVNode)((0,t.unref)(Mo),{schema:d.value,library:(0,t.unref)(s)},null,8,[`schema`,`library`])])]),_:1},8,[`index`]),(0,t.unref)(a)&&e.length>1&&l>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTooltip),{key:0,placement:`top`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,text:``,type:`error`,size:`small`,class:`!absolute -top-2 -right-2 z-10`,onClick:(0,t.withModifiers)(e=>m(r,i,l),[`stop`])},{icon:(0,t.withCtx)(()=>[...h[2]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-trash-2 h-4 w-4`},null,-1)]]),_:1},8,[`onClick`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(o)(`builder.listRemove`)),1)]),_:2},1024)):(0,t.createCommentVNode)(``,!0)]))),128)),(0,t.unref)(a)&&d.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NButton),{key:0,secondary:``,type:`primary`,size:`small`,class:`w-full`,onClick:e=>p(r,i)},{icon:(0,t.withCtx)(()=>[...h[3]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-plus h-4 w-4`},null,-1)]]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(o)(`builder.listAdd`)),1)]),_:1},8,[`onClick`])):(0,t.createCommentVNode)(``,!0),d.value.length<=0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,zC,[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:(0,t.unref)(o)(`builder.listDropHere`)},null,8,[`description`])])):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`name`]))])]))}});A(),Zl();var VC={class:`flex flex-col gap-0.5`},HC={key:0,class:`text-sm font-medium`},UC={key:1,class:`text-xs text-muted-foreground`},WC=(0,t.defineComponent)({__name:`CardContainer`,props:{cardKey:{},modelValue:{},label:{},disabled:{type:Boolean},help:{},bordered:{type:Boolean},embedded:{type:Boolean},hoverable:{type:Boolean},size:{}},emits:[`update:modelValue`,`select`],setup(e,{emit:r}){let{selectedKey:i}=Jl(),a=e,o=r,{t:s}=k(),c=(0,t.computed)(()=>Array.isArray(a.modelValue)?a.modelValue:[]),l=fb(),u=dC({modelValue:c,onUpdateModelValue:e=>{let t=a.cardKey;t&&l?.updateContainerChildren?l.updateContainerChildren(t,e):o(`update:modelValue`,e)}}),d=(0,t.computed)(()=>typeof a.label==`string`&&a.label.trim()?a.label.trim():``),f=(0,t.computed)(()=>typeof a.help==`string`&&a.help.trim()?a.help.trim():``),p=(0,t.computed)(()=>a.bordered??!0),m=(0,t.computed)(()=>a.embedded??!1),h=(0,t.computed)(()=>a.hoverable??!1),g=(0,t.computed)(()=>a.size??`medium`),_=(0,t.computed)(()=>!!(d.value||f.value)),v=(e,t)=>{let n=e?.__key;n&&(l?.selectByKey?l.selectByKey(n):o(`select`,n))},y=e=>{let t=u.items.value.filter((t,n)=>n!==e);u.items.value=t,u.emitUpdate()};return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NCard),{class:`w-full`,bordered:p.value,embedded:m.value,hoverable:h.value,size:g.value,"content-style":`padding: 8px;`},(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.createVNode)(EC,{"container-ref":(0,t.unref)(u).containerRef,items:(0,t.unref)(u).items,"selected-key":(0,t.unref)(i),"empty-text":(0,t.unref)(s)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(s)(`builder.deleteField`),"resize-aria-label":(0,t.unref)(s)(`builder.resizeFieldWidth`),"show-delete-tooltip":!0,"delete-tooltip-text":(0,t.unref)(s)(`builder.deleteField`),"data-attrs":{"data-card-key":a.cardKey},"set-nested-parent-on-root":(0,t.unref)(u).setNestedParentOnRoot,"on-select":v,"on-delete":y,"on-resize-end":(0,t.unref)(u).emitUpdate},null,8,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`resize-aria-label`,`delete-tooltip-text`,`data-attrs`,`set-nested-parent-on-root`,`on-resize-end`])]),_:2},[_.value?{name:`header`,fn:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,VC,[d.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,HC,(0,t.toDisplayString)(d.value),1)):(0,t.createCommentVNode)(``,!0),f.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,UC,(0,t.toDisplayString)(f.value),1)):(0,t.createCommentVNode)(``,!0)])]),key:`0`}:void 0]),1032,[`bordered`,`embedded`,`hoverable`,`size`]))}});A();var GC={class:`flex flex-col gap-0.5`},KC={key:0,class:`text-sm font-medium`},qC={key:1,class:`text-xs text-muted-foreground`},JC={class:`w-full grid grid-cols-12 gap-x-4 gap-y-2`},YC={key:1,class:`col-span-12 flex min-h-[120px] items-center justify-center`},XC=(0,t.defineComponent)({__name:`CardContainerPreview`,props:{children:{},modelValue:{},label:{},help:{},bordered:{type:Boolean},embedded:{type:Boolean},hoverable:{type:Boolean},size:{}},setup(e){let r=e,{t:i}=k(),a=Yw(),o=(0,t.computed)(()=>typeof r.label==`string`&&r.label.trim()?r.label.trim():``),s=(0,t.computed)(()=>typeof r.help==`string`&&r.help.trim()?r.help.trim():``),c=(0,t.computed)(()=>Array.isArray(r.modelValue)?r.modelValue:Array.isArray(r.children)?r.children:[]),l=(0,t.computed)(()=>r.bordered??!0),u=(0,t.computed)(()=>r.embedded??!1),d=(0,t.computed)(()=>r.hoverable??!1),f=(0,t.computed)(()=>r.size??`medium`),p=(0,t.computed)(()=>!!(o.value||s.value));return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NCard),{class:`w-full`,bordered:l.value,embedded:u.value,hoverable:d.value,size:f.value,"content-style":`padding: 8px;`},(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,JC,[c.value.length?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mo),{key:0,schema:c.value,library:(0,t.unref)(a)},null,8,[`schema`,`library`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,YC,[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:(0,t.unref)(i)(`builder.listDropHere`)},null,8,[`description`])]))])]),_:2},[p.value?{name:`header`,fn:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,GC,[o.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,KC,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)(``,!0),s.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,qC,(0,t.toDisplayString)(s.value),1)):(0,t.createCommentVNode)(``,!0)])]),key:`0`}:void 0]),1032,[`bordered`,`embedded`,`hoverable`,`size`]))}});A(),Zl();var ZC={class:`w-full rounded-xl border border-border/50 bg-card/50`},QC={key:0,class:`flex flex-col gap-0.5 px-3 py-2 border-b border-border/50`},$C={key:0,class:`text-xs text-muted-foreground`},ew={class:`p-2`},tw={key:1,class:`text-[11px] text-muted-foreground`},nw=(0,t.defineComponent)({__name:`InputGroupContainer`,props:{inputGroupKey:{},modelValue:{},label:{},disabled:{type:Boolean},help:{}},emits:[`update:modelValue`,`select`],setup(e,{emit:r}){let{selectedKey:i}=Jl(),a=e,o=r,{t:s}=k(),c=(0,t.computed)(()=>Array.isArray(a.modelValue)?a.modelValue:[]),l=fb(),u=e=>{let t=Array.isArray(e)?e:[];if(t.length===0)return[];if(t.length===1){let e=t[0];return Lb(e,12),[Rb(e)]}return Vb(t,12),t.map(e=>Rb(e))},d=(e,t)=>{let n=0;for(let r=0;r<t.length;r++)r!==e&&(n+=Math.max(1,Math.min(12,Ib(t[r]))));return Math.max(1,12-n)},f=dC({modelValue:c,onUpdateModelValue:e=>{let t=u(e),n=a.inputGroupKey;n&&l?.updateContainerChildren?l.updateContainerChildren(n,t):o(`update:modelValue`,t)}}),p=()=>{let e=u(f.items.value);f.items.value=e,f.emitUpdate()},m=(0,t.computed)(()=>typeof a.label==`string`&&a.label.trim()?a.label.trim():``),h=(0,t.computed)(()=>typeof a.help==`string`&&a.help.trim()?a.help.trim():``),g=(0,t.computed)(()=>!!(m.value||h.value)),_=(e,t)=>{let n=e?.__key;n&&(l?.selectByKey?l.selectByKey(n):o(`select`,n))},v=e=>{let t=f.items.value.filter((t,n)=>n!==e);f.items.value=t,p()};return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ZC,[g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,QC,[m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,$C,(0,t.toDisplayString)(m.value),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,ew,[(0,t.createVNode)((0,t.unref)(n.NInputGroup),{class:`w-full`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(EC,{"container-ref":(0,t.unref)(f).containerRef,items:(0,t.unref)(f).items,"selected-key":(0,t.unref)(i),"empty-text":(0,t.unref)(s)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(s)(`builder.deleteField`),"resize-aria-label":(0,t.unref)(s)(`builder.resizeFieldWidth`),"data-attrs":{"data-input-group-key":a.inputGroupKey,"data-dnd-axis":`x`},layout:`row`,"set-nested-parent-on-root":(0,t.unref)(f).setNestedParentOnRoot,"on-select":_,"on-delete":v,"on-resize-end":p,"max-span-for":d,"ul-class":`p-0`},null,8,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`resize-aria-label`,`data-attrs`,`set-nested-parent-on-root`])]),_:1})]),h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,tw,(0,t.toDisplayString)(h.value),1)):(0,t.createCommentVNode)(``,!0)]))}}),rw=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},iw=rw(nw,[[`__scopeId`,`data-v-99419944`]]);A();var aw={class:`w-full`},ow={key:0,class:`mb-2px`},sw={key:0,class:`text-12px font-bold`},cw={key:1,class:`flex w-full items-center justify-center`},lw={key:1,class:`text-xs text-muted-foreground`},uw=rw((0,t.defineComponent)({__name:`InputGroupContainerPreview`,props:{children:{},modelValue:{},label:{},help:{}},setup(e){let r=e,{t:i}=k(),a=Yw(),o=(0,t.computed)(()=>typeof r.label==`string`&&r.label.trim()?r.label.trim():``),s=(0,t.computed)(()=>typeof r.help==`string`&&r.help.trim()?r.help.trim():``),c=(0,t.computed)(()=>!!(o.value||s.value)),l=(0,t.computed)(()=>Array.isArray(r.modelValue)?r.modelValue:Array.isArray(r.children)?r.children:[]);return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,aw,[c.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ow,[o.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,sw,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)((0,t.unref)(n.NInputGroup),{class:`w-full`},{default:(0,t.withCtx)(()=>[l.value.length?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mo),{key:0,schema:l.value,library:(0,t.unref)(a)},null,8,[`schema`,`library`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,cw,[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:(0,t.unref)(i)(`builder.listDropHere`)},null,8,[`description`])]))]),_:1}),s.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,lw,(0,t.toDisplayString)(s.value),1)):(0,t.createCommentVNode)(``,!0)]))}}),[[`__scopeId`,`data-v-599060da`]]);A(),Zl();var dw={class:`w-full rounded-xl border border-border/50 bg-card/50`},fw={class:`p-2`},pw=rw((0,t.defineComponent)({__name:`ButtonGroupContainer`,props:{buttonGroupKey:{},modelValue:{},size:{},vertical:{type:Boolean},disabled:{type:Boolean}},emits:[`update:modelValue`,`select`],setup(e,{emit:r}){let{selectedKey:i}=Jl(),a=e,o=r,{t:s}=k(),c=(0,t.computed)(()=>Array.isArray(a.modelValue)?a.modelValue:[]),l=fb(),u=new Set([`submit`,`reset`,`naiveButton`]),d=e=>{if(!e||typeof e!=`object`)return!1;let t=e,n=t.$cmp??t.$formkit;return typeof n==`string`&&u.has(n)},f=e=>(Array.isArray(e)?e:[]).map(e=>Rb(e)),p=dC({modelValue:c,accepts:d,onUpdateModelValue:e=>{let t=f(e),n=a.buttonGroupKey;n&&l?.updateContainerChildren?l.updateContainerChildren(n,t):o(`update:modelValue`,t)}}),m=()=>{let e=f(p.items.value);p.items.value=e,p.emitUpdate()},h={items:(0,t.computed)(()=>{let e=Array.isArray(p.items.value)?p.items.value:[];return a.disabled?e.map(e=>zb(e)):e})},g=(e,t)=>{let n=e?.__key;n&&(l?.selectByKey?l.selectByKey(n):o(`select`,n))},_=e=>{let t=p.items.value.filter((t,n)=>n!==e);p.items.value=t,m()};return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,dw,[(0,t.createElementVNode)(`div`,fw,[(0,t.createVNode)((0,t.unref)(n.NButtonGroup),{size:a.size,vertical:a.vertical,class:`w-full`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(EC,{"container-ref":(0,t.unref)(p).containerRef,items:h.items,"selected-key":(0,t.unref)(i),"empty-text":(0,t.unref)(s)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(s)(`builder.deleteField`),"data-attrs":{"data-button-group-key":a.buttonGroupKey,"data-dnd-axis":a.vertical?`y`:`x`},layout:`row`,"equal-width":``,vertical:a.vertical,"set-nested-parent-on-root":(0,t.unref)(p).setNestedParentOnRoot,"on-select":g,"on-delete":_,"on-resize-end":m,"ul-class":`p-0`},null,8,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`data-attrs`,`vertical`,`set-nested-parent-on-root`])]),_:1},8,[`size`,`vertical`])])]))}}),[[`__scopeId`,`data-v-66e135b0`]]);A();var mw={class:`w-full`},hw={key:1,class:`flex w-full items-center justify-center`},gw=rw((0,t.defineComponent)({__name:`ButtonGroupContainerPreview`,props:{children:{},modelValue:{},size:{},vertical:{type:Boolean}},setup(e){let r=e,{t:i}=k(),a=Yw(),o=(0,t.computed)(()=>Array.isArray(r.modelValue)?r.modelValue:Array.isArray(r.children)?r.children:[]);return(e,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mw,[(0,t.createVNode)((0,t.unref)(n.NButtonGroup),{size:r.size,vertical:r.vertical,class:`w-full`},{default:(0,t.withCtx)(()=>[o.value.length?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mo),{key:0,schema:o.value,library:(0,t.unref)(a)},null,8,[`schema`,`library`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hw,[(0,t.createVNode)((0,t.unref)(n.NEmpty),{description:(0,t.unref)(i)(`builder.listDropHere`)},null,8,[`description`])]))]),_:1},8,[`size`,`vertical`])]))}}),[[`__scopeId`,`data-v-1834692d`]]);A(),Zl(),ks();var _w={class:`w-full rounded-xl border border-border/50 bg-card/50`},vw={key:0,class:`flex flex-col gap-0.5 px-3 py-2 border-b border-border/50`},yw={key:0,class:`text-xs text-muted-foreground`},bw={key:1,class:`text-[11px] text-muted-foreground`},xw={class:`px-2 pt-2`},Sw={class:`flex items-center gap-1 border-b border-border/50 pb-1`},Cw=[`onClick`,`onDblclick`],ww={key:1,class:`select-none`},Tw={class:`p-2`},Ew=(0,t.defineComponent)({__name:`TabsContainer`,props:{tabsKey:{},modelValue:{},label:{},help:{},disabled:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:r}){let{selectedKey:i}=Jl(),a=e,o=r,{t:s}=k(),c=fb(),l=(0,t.computed)(()=>Array.isArray(a.modelValue)?a.modelValue:[]),u=(0,t.ref)(null),d=(0,t.ref)(0);(0,t.watch)(()=>l.value.length,e=>{e<=0?d.value=0:d.value>e-1&&(d.value=e-1)},{immediate:!0}),(0,t.watch)(()=>l.value.map(e=>e.__key).join(`|`),e=>{let t=e?e.split(`|`).filter(Boolean):[];if(t.length===0){d.value=0,u.value=null;return}if(!u.value){u.value=t[0]??null,d.value=0;return}let n=t.indexOf(u.value);n>=0?d.value=n:(u.value=t[0]??null,d.value=0)},{immediate:!0});let f=e=>{let t=a.tabsKey;t&&c?.updateContainerChildren?c.updateContainerChildren(t,e):o(`update:modelValue`,e)},p=e=>({__key:ws(),label:e,outerClass:`col-span-12`,children:[]}),m=(0,t.ref)(!1);(0,t.watch)(()=>l.value.length,e=>{if(!m.value&&a.tabsKey&&c?.updateContainerChildren){if(e>0){m.value=!0;return}m.value=!0,f([p(`Tab 1`)])}},{immediate:!0});let h=(0,t.computed)(()=>l.value[d.value]),g=(0,t.computed)(()=>h.value?.__key),_=dC({modelValue:(0,t.computed)(()=>{let e=h.value?.children;return Array.isArray(e)?e:[]}),onUpdateModelValue:e=>{let t=g.value;t&&c?.updateContainerChildren&&c.updateContainerChildren(t,e)}}),v=(e,t)=>{let n=e?.label;return typeof n==`string`&&n.trim()?n.trim():`Tab ${t+1}`},y=e=>{d.value=e;let t=l.value[e]?.__key??null;u.value=t,t&&c?.selectByKey&&c.selectByKey(t)},b=()=>{let e=[...l.value,p(`Tab ${l.value.length+1}`)];f(e),d.value=e.length-1,u.value=e[e.length-1]?.__key??null},x=(0,t.ref)(null),S=(0,t.ref)(``),C=e=>{x.value=e,S.value=v(l.value[e],e)},w=()=>{let e=x.value;if(e===null)return;let t=S.value.trim()||v(l.value[e],e);f(l.value.map((n,r)=>r===e?{...n,label:t}:n)),x.value=null},ee=e=>{let t=e?.__key;t&&c?.selectByKey&&c.selectByKey(t)},te=e=>{let t=_.items.value.filter((t,n)=>n!==e);_.items.value=t,_.emitUpdate()};return(e,r)=>{let o=n.NInput,c=n.NButton;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,_w,[a.label||a.help?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,vw,[a.label?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yw,(0,t.toDisplayString)(a.label),1)):(0,t.createCommentVNode)(``,!0),a.help?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,bw,(0,t.toDisplayString)(a.help),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,xw,[(0,t.createElementVNode)(`div`,Sw,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.__key||n,class:(0,t.normalizeClass)([`relative flex items-center rounded-md px-2 py-1 text-xs select-none`,n===d.value?`bg-background border border-[#a277ff] shadow-[0_0_0_3px_rgba(79,110,247,0.12)]`:`text-muted-foreground border border-transparent hover:border-[#7c9ef8] hover:bg-[#f0f4ff] dark:hover:bg-[rgba(100,130,255,0.07)]`]),onClick:e=>y(n),onDblclick:(0,t.withModifiers)(e=>C(n),[`stop`])},[x.value===n?((0,t.openBlock)(),(0,t.createBlock)(o,{key:0,size:`small`,class:`!w-32`,value:S.value,"onUpdate:value":r[0]||=e=>S.value=e,onBlur:w,onKeydown:[(0,t.withKeys)((0,t.withModifiers)(w,[`stop`,`prevent`]),[`enter`]),r[1]||=(0,t.withKeys)((0,t.withModifiers)(e=>x.value=null,[`stop`,`prevent`]),[`esc`])]},null,8,[`value`,`onKeydown`])):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ww,(0,t.toDisplayString)(v(e,n)),1))],42,Cw))),128)),(0,t.createVNode)(c,{quaternary:``,size:`small`,class:`!h-7 !px-2`,onClick:b},{default:(0,t.withCtx)(()=>[...r[2]||=[(0,t.createTextVNode)(` + `,-1)]]),_:1})])]),(0,t.createElementVNode)(`div`,Tw,[(0,t.createVNode)(EC,{"container-ref":(0,t.unref)(_).containerRef,items:(0,t.unref)(_).items,"selected-key":(0,t.unref)(i),"empty-text":(0,t.unref)(s)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(s)(`builder.deleteField`),"resize-aria-label":(0,t.unref)(s)(`builder.resizeFieldWidth`),"show-delete-tooltip":!0,"delete-tooltip-text":(0,t.unref)(s)(`builder.deleteField`),"data-attrs":{"data-tabs-pane-key":g.value},"set-nested-parent-on-root":(0,t.unref)(_).setNestedParentOnRoot,"on-select":e=>ee(e),"on-delete":te,"on-resize-end":(0,t.unref)(_).emitUpdate},null,8,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`resize-aria-label`,`delete-tooltip-text`,`data-attrs`,`set-nested-parent-on-root`,`on-select`,`on-resize-end`])])])}}});A();var Dw={class:`w-full`},Ow={key:0,class:`flex flex-col gap-0.5 mb-2`},kw={key:0,class:`text-sm font-medium`},Aw={key:1,class:`text-xs text-muted-foreground`},jw=(0,t.defineComponent)({__name:`TabsContainerPreview`,props:{children:{},modelValue:{},label:{},help:{},type:{},placement:{},size:{},animated:{type:Boolean},closable:{type:Boolean}},setup(e){let r=e,{t:i}=k(),a=Yw(),o=(0,t.computed)(()=>Array.isArray(r.modelValue)?r.modelValue:Array.isArray(r.children)?r.children:[]),s=(e,t)=>{let n=e?.label??e?.props?.label;if(typeof n==`string`&&n.trim())return n.trim();let r=e?.name;return typeof r==`string`&&r.trim()?r.trim():`Tab ${t+1}`},c=(0,t.computed)(()=>!!(r.closable??!1));return(e,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Dw,[r.label||r.help?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ow,[r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kw,(0,t.toDisplayString)(r.label),1)):(0,t.createCommentVNode)(``,!0),r.help?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Aw,(0,t.toDisplayString)(r.help),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),o.value.length===0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NEmpty),{key:1,description:(0,t.unref)(i)(`builder.listDropHere`)},null,8,[`description`])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabs),{key:2,type:r.type||`line`,placement:r.placement||`top`,size:r.size||`small`,animated:r.animated??!0},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.value,(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:e?.__key||r,name:e?.__key||r,tab:s(e,r),closable:c.value,"display-directive":`show:lazy`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,null,[Array.isArray(e?.children)&&e.children.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mo),{key:0,schema:Array.isArray(e?.children)?e.children:[],library:(0,t.unref)(a)},null,8,[`schema`,`library`])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NEmpty),{key:1,description:(0,t.unref)(i)(`builder.listDropHere`)},null,8,[`description`]))])]),_:2},1032,[`name`,`tab`,`closable`]))),128))]),_:1},8,[`type`,`placement`,`size`,`animated`]))]))}});A(),Zl();var Mw={class:(0,t.normalizeClass)([`w-full rounded-xl bg-card/40`])},Nw={class:`p-1`},Pw=(0,t.defineComponent)({__name:`GroupContainer`,props:{groupKey:{},modelValue:{},name:{},disabled:{type:Boolean}},emits:[`update:modelValue`,`select`],setup(e,{emit:n}){let{selectedKey:r}=Jl(),i=e,a=n,{t:o}=k(),s=(0,t.computed)(()=>Array.isArray(i.modelValue)?i.modelValue:[]),c=fb(),l=dC({modelValue:s,onUpdateModelValue:e=>{let t=i.groupKey;t&&c?.updateContainerChildren?c.updateContainerChildren(t,e):a(`update:modelValue`,e)}}),u=(e,t)=>{let n=e?.__key;n&&(c?.selectByKey?c.selectByKey(n):a(`select`,n))},d=e=>{let t=l.items.value.filter((t,n)=>n!==e);l.items.value=t,l.emitUpdate()};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Mw,[(0,t.createElementVNode)(`div`,Nw,[(0,t.createVNode)(EC,{"container-ref":(0,t.unref)(l).containerRef,items:(0,t.unref)(l).items,"selected-key":(0,t.unref)(r),"empty-text":(0,t.unref)(o)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(o)(`builder.deleteField`),"resize-aria-label":(0,t.unref)(o)(`builder.resizeFieldWidth`),"data-attrs":{"data-group-key":i.groupKey},"set-nested-parent-on-root":(0,t.unref)(l).setNestedParentOnRoot,"on-select":u,"on-delete":d,"on-resize-end":(0,t.unref)(l).emitUpdate},null,8,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`resize-aria-label`,`data-attrs`,`set-nested-parent-on-root`,`on-resize-end`])])]))}});kg(),Ms(),Dg();function Fw(e){let t=As(e);if(!t)throw Error(`[formkit-form-builder] 缺少容器规格: ${e}`);return t}function Iw(e,t){if(!e||typeof e!=`object`)return!1;let n=e;return n.$cmp===t||n.$formkit===t}function Lw(e,t,n){let r={...e};r.$cmp=t,n.primitive===`group`&&delete r.$formkit,r.children=Array.isArray(r.children)?r.children:[];let i=typeof r.props==`object`&&r.props?{...r.props}:{};return i[n.keyProp]=typeof i[n.keyProp]==`string`&&i[n.keyProp]?i[n.keyProp]:r.__key??``,i.modelValue=r.children,n.primitive===`group`&&typeof r.name==`string`&&r.name&&(i.name=r.name),n.dataShape===`arrayOfObjects`&&i.showActions===void 0&&(i.showActions=!1),r.props=i,r}var Rw={1:`w-[8.33%]`,2:`w-[16.67%]`,3:`w-[25%]`,4:`w-[33.33%]`,5:`w-[41.67%]`,6:`w-[50%]`,7:`w-[58.33%]`,8:`w-[66.67%]`,9:`w-[75%]`,10:`w-[83.33%]`,11:`w-[91.67%]`,12:`w-[100%]`},zw=e=>(typeof e==`string`?e:``).replace(/\bcol-span-\d+\b/g,``).replace(/\bw-\[[^\]]+\]/g,``).replace(/\bpt-2\b/g,``).replace(/\s+/g,` `).trim();function Bw(e){let t=e?.layout?.colspan;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return Math.max(1,Math.min(12,Math.round(t)));let n=(typeof e?.outerClass==`string`?e.outerClass:``).match(/\bcol-span-(\d+)\b/);return n?Math.max(1,Math.min(12,parseInt(n[1],10))):12}function Vw(e){let t=e,n=`${Rw[Bw(t)]??`w-[100%]`} ${zw(t?.outerClass)}`.trim(),r={...e,outerClass:n||void 0};if(t&&typeof t==`object`&&t.props&&typeof t.props==`object`){let e={...t.props},i=zw(e.outerClass);e.outerClass=n||i,r.props=e}return r}function Hw(e,t){return e.map(Vw)}function Uw(e,t){let n=t.props?.disabled;return e.map(e=>{let t=Rb(e);return n?zb(t):t})}var Ww=[{id:`list`,match:e=>Iw(e,`list`),canvas:{libraryKey:`list`,component:jC},preview:{libraryKey:`list`,component:BC},normalize:e=>Lw(e,`list`,Fw(`list`)),formatPreview:(e,t)=>Zw(e,t,`list`,Fw(`list`))},{id:`card`,match:e=>Iw(e,`card`),canvas:{libraryKey:`card`,component:WC},preview:{libraryKey:`card`,component:XC},normalize:e=>Lw(e,`card`,Fw(`card`)),formatPreview:(e,t)=>Zw(e,t,`card`,Fw(`card`))},{id:`inputGroup`,match:e=>Iw(e,`inputGroup`),canvas:{libraryKey:`inputGroup`,component:iw},preview:{libraryKey:`inputGroup`,component:uw},normalize:e=>Lw(e,`inputGroup`,Fw(`inputGroup`)),formatPreview:(e,t)=>Zw(e,t,`inputGroup`,Fw(`inputGroup`),{transformChildren:Hw})},{id:`buttonGroup`,match:e=>Iw(e,`buttonGroup`),canvas:{libraryKey:`buttonGroup`,component:pw},preview:{libraryKey:`buttonGroup`,component:gw},normalize:e=>Lw(e,`buttonGroup`,Fw(`buttonGroup`)),formatPreview:(e,t)=>Zw(e,t,`buttonGroup`,Fw(`buttonGroup`),{transformChildren:Uw})},{id:`tabs`,match:e=>Iw(e,`tabs`),canvas:{libraryKey:`tabs`,component:Ew},preview:{libraryKey:`tabs`,component:jw},normalize:e=>Lw(e,`tabs`,Fw(`tabs`)),formatPreview:(e,t)=>Zw(e,t,`tabs`,Fw(`tabs`))},{id:`group`,match:e=>Iw(e,`group`),canvas:{libraryKey:`group`,component:Pw},normalize:e=>Lw(e,`group`,Fw(`group`)),formatPreview:(e,t)=>Zw(e,t,`group`,Fw(`group`))}];function Gw(e){for(let t of Ww)if(t.match(e))return t;return null}function Kw(e){Ww.push(e)}function qw(e){let t=Gw(e);return t?.normalize?t.normalize(e):e}function Jw(){let e={...Fb()};for(let n of Ww)n.canvas&&(e[n.canvas.libraryKey]=(0,t.markRaw)(n.canvas.component));return e}function Yw(){let e={...Fb()};for(let n of Ww)n.preview&&(e[n.preview.libraryKey]=(0,t.markRaw)(n.preview.component));return e}function Xw(e,t){let n=Gw(e);return n?.formatPreview?n.formatPreview(e,t):null}function Zw(e,t,n,r,i){let a=e?.__key,o=Lw(e,n,r),s=Array.isArray(o.children)?o.children.map((e,n)=>t.format(e,n)):[],c=i?.transformChildren?i.transformChildren(s,o):s,l=o.if,u=o.props?.name??o.name,d=o.props?.[r.keyProp]??a??``;if(r.dataShape===`none`){let e={$el:`div`,attrs:{class:o.outerClass||`col-span-12`},children:[{$cmp:n,props:{...o.props,[r.keyProp]:d,modelValue:c}}]};return(typeof l==`string`&&l.trim()||typeof l==`boolean`)&&(e.if=l),e}if(r.dataShape===`arrayOfObjects`){let e={...o.props};delete e.modelValue;let i={$cmp:n,props:{...e,[r.keyProp]:d,name:u,modelValue:c,isPlaceholder:t.isPlaceholder}},a={$el:`div`,attrs:{class:o.outerClass||`col-span-12`},children:[i]};return(typeof l==`string`&&l.trim()||typeof l==`boolean`)&&(a.if=l),a}if(r.dataShape===`objectOfObjects`){let e=Array.isArray(o.children)?o.children.map((e,n)=>{let r=Array.isArray(e?.children)?e.children.map((e,n)=>t.format(e,n)):[],i=e?.label,a=e?.name,o={$formkit:`group`,children:r.length?[{$el:`div`,attrs:{class:`grid grid-cols-12 gap-x-4 gap-y-2`},children:r}]:[],outerClass:`!border-0 !p-0 !m-0 ![&>.formkit-wrapper]:border-0 ![&>.formkit-wrapper]:p-0 ![&>.formkit-wrapper]:m-0 ![&>.formkit-wrapper>fieldset]:border-0 ![&>.formkit-wrapper>fieldset]:p-0 ![&>.formkit-wrapper>fieldset]:m-0`},s=a??i;return s&&(o.name=s),{...e,label:i,children:[o],__key:e?.__key??`${n}`}}):[],i={$el:`div`,attrs:{class:o.outerClass||`col-span-12`},children:[{$cmp:n,props:{...o.props,[r.keyProp]:d,modelValue:e}}]};return(typeof l==`string`&&l.trim()||typeof l==`boolean`)&&(i.if=l),i}if(r.primitive===`group`){let e=o.outerClass,t={$formkit:`group`,children:c.length?[{$el:`div`,attrs:{class:`grid grid-cols-12 gap-x-4 gap-y-2`},children:c}]:[]};u&&(t.name=u);let n={$el:`div`,attrs:{class:e||`col-span-12`},children:[t]};return(typeof l==`string`&&l.trim()||typeof l==`boolean`)&&(n.if=l),n}let f={...o.props};delete f.name;let p={$formkit:`group`,children:[{$cmp:n,props:{...f,[r.keyProp]:d,modelValue:c}}],outerClass:`!border-0 !p-0 !m-0 ![&>.formkit-wrapper]:border-0 ![&>.formkit-wrapper]:p-0 ![&>.formkit-wrapper]:m-0 ![&>.formkit-wrapper>fieldset]:border-0 ![&>.formkit-wrapper>fieldset]:p-0 ![&>.formkit-wrapper>fieldset]:m-0`};u&&(p.name=u);let m={$el:`div`,attrs:{class:o.outerClass||`col-span-12`},children:[p]};return(typeof l==`string`&&l.trim()||typeof l==`boolean`)&&(m.if=l),m}A();var Qw={key:0},$w={class:`h-8 w-8 rounded-md flex items-center justify-center`},eT={key:2,class:`ml-3 flex flex-col justify-center overflow-hidden`},tT={class:`text-[11px] text-secondary-foreground/80 font-medium`},nT={class:`text-[9px] text-muted-foreground truncate`},rT=(0,t.defineComponent)({__name:`DraggableList`,props:{elements:{}},setup(e){let r=e,{t:i}=k(),a=(0,t.computed)(()=>Mg(i)),o=(0,t.inject)(`sidebarCollapsed`,(0,t.ref)(!1)),s={group:`form-builder`,sortable:!1,nativeDrag:!0,draggable:()=>!0,handleNodePointerup(e){e.targetData.node.el.setAttribute(`draggable`,`true`)},insertConfig:{dynamicValues:e=>e.draggedNodes.map(e=>JSON.parse(JSON.stringify(e.data.value)))},onDragend(){l.value=[...r.elements]},plugins:[lC({insertPoint:()=>{let e=document.createElement(`div`);return Object.assign(e.style,{position:`absolute`,width:`0px`,height:`0px`,pointerEvents:`none`,opacity:`0`}),e}})]},[c,l]=IS(r.elements,s),u=e=>Fg(e)??String(e?.$formkit??e?.$cmp??``);return(0,t.watch)(()=>r.elements,e=>{l.value=e},{deep:!0}),(e,r)=>{let i=n.NPopover;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`parentRef`,ref:c,"data-is-source":`true`,class:(0,t.normalizeClass)((0,t.unref)(o)?`grid grid-cols-1 gap-2 p-2 min-h-[50px]`:`flex flex-col gap-1 p-2 min-h-[50px]`)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(l),e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.name,class:(0,t.normalizeClass)([(0,t.unref)(o)?`h-12 w-12 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 cursor-grab flex items-center justify-center border border-transparent hover:border-gray-200 dark:hover:border-gray-700`:`p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 cursor-grab flex items-center border border-transparent hover:border-gray-200 dark:hover:border-gray-700`,e.name.trim().replace(/\s+/g,`-`).toLowerCase()])},[(0,t.unref)(o)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Qw,[(0,t.createVNode)(i,{placement:`right`},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,$w,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(`${a.value.find(t=>t.name===u(e))?.icon??``} h-4 w-4`)},null,2)])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,null,(0,t.toDisplayString)(e.name.trim()),1)]),_:2},1024)])):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,class:(0,t.normalizeClass)(`${a.value.find(t=>t.name===u(e))?.icon??``} h-4 w-4 shrink-0`)},null,2)),(0,t.unref)(o)?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,eT,[(0,t.createElementVNode)(`span`,tT,(0,t.toDisplayString)(e.name),1),(0,t.createElementVNode)(`span`,nT,(0,t.toDisplayString)(e.description),1)]))],2))),128))],2)}}});A();var iT={class:`h-full flex flex-col overflow-hidden`},aT=(0,t.defineComponent)({__name:`NavMain`,setup(e){let r=(0,t.inject)(`searchInput`,(0,t.ref)(``)),i=(0,t.inject)(`sidebarCollapsed`,(0,t.ref)(!1)),{t:a}=k(),o=(0,t.computed)(()=>Mg(a)),s=(0,t.computed)(()=>Pg(a)),c=(0,t.computed)(()=>{if(!r.value.trim())return s.value;let e=r.value.toLowerCase();return s.value.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)||String(t.$formkit??t.$cmp??``).toLowerCase().includes(e))}),l=(0,t.computed)(()=>[{id:`field`,label:a(`fieldProps.category.fields`)},{id:`container`,label:a(`fieldProps.category.containers`)},{id:`layout`,label:a(`fieldProps.category.layouts`)},{id:`static`,label:a(`fieldProps.category.static`)}]),u=(0,t.computed)(()=>{let e={field:[],container:[],layout:[],static:[]};return c.value.forEach(t=>{let n=Fg(t)??String(t.$formkit??t.$cmp??``),r=o.value.find(e=>e.name===n)?.category||`field`;e[r]&&e[r].push(t)}),e});return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,iT,[(0,t.unref)(i)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NScrollbar),{key:0,size:4,class:`h-full sidebar-scrollbar`,"content-class":`py-2 px-1`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(rT,{elements:c.value},null,8,[`elements`])]),_:1})):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabs),{key:1,type:`line`,size:`small`,"justify-content":`space-evenly`,class:`h-full flex flex-col`,"pane-class":`flex-1 overflow-hidden`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,e=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTabPane),{key:e.id,name:e.id,tab:e.label},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NScrollbar),{class:`h-full sidebar-scrollbar`,"content-class":`pb-4 px-2`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(rT,{elements:u.value[e.id]},null,8,[`elements`])]),_:2},1024)]),_:2},1032,[`name`,`tab`]))),128))]),_:1}))]))}});A();var oT={key:0,class:`p-4 shrink-0`},sT={class:`flex-1 overflow-hidden`},cT=(0,t.defineComponent)({__name:`SidebarLeft`,setup(e){let r=(0,t.ref)(``);(0,t.provide)(`searchInput`,r);let i=(0,t.ref)(!1);(0,t.provide)(`sidebarCollapsed`,i);let{t:a}=k();return(e,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NLayoutSider),{collapsed:i.value,"onUpdate:collapsed":o[1]||=e=>i.value=e,bordered:``,"collapse-mode":`width`,"collapsed-width":64,width:240,"show-trigger":``,"native-scrollbar":!1,"content-style":`display: flex; flex-direction: column; height: 100%;`,class:`sidebar-sider`},{default:(0,t.withCtx)(()=>[i.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,oT,[(0,t.createVNode)((0,t.unref)(n.NInput),{placeholder:(0,t.unref)(a)(`sidebar.search`),value:r.value,"onUpdate:value":o[0]||=e=>r.value=e},null,8,[`placeholder`,`value`])])),(0,t.createElementVNode)(`div`,sT,[(0,t.createVNode)(aT)])]),_:1},8,[`collapsed`]))}});cu();var lT=(0,t.defineComponent)({__name:`ValidationCard`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let n=e;return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`py-2 rounded-lg flex flex-col justify-center gap-2`,n.class))},[(0,t.renderSlot)(e.$slots,`default`)],2))}});cu();var uT={class:`flex flex-row justify-between items-center w-full`},dT={class:`text-xs`},fT=(0,t.defineComponent)({__name:`ValidationSwitch`,props:{class:{type:[Boolean,null,String,Object,Array]},isActive:{type:Boolean},label:{},showSwitch:{type:Boolean},tooltip:{}},emits:[`update:isActive`],setup(e,{emit:r}){let i=e,a=r;function o(e){a(`update:isActive`,e)}return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`flex flex-row gap-2 items-center cursor-pointer`,i.class)),onClick:r[2]||=e=>o(!(i.isActive??!1))},[(0,t.createVNode)((0,t.unref)(n.NSwitch),{size:`small`,value:i.isActive,"onUpdate:value":o,onClick:r[0]||=(0,t.withModifiers)(()=>{},[`stop`])},null,8,[`value`]),(0,t.createElementVNode)(`div`,uT,[(0,t.createElementVNode)(`span`,dT,(0,t.toDisplayString)(i.label),1),(0,t.createVNode)((0,t.unref)(n.NTooltip),{trigger:`hover`,placement:`top`},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,{class:`i-lucide-circle-help h-4 w-4 text-muted-foreground rounded-full`,onClick:r[1]||=(0,t.withModifiers)(()=>{},[`stop`])})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)(i.tooltip),1)]),_:1})])],2))}});M();var pT=(0,t.defineComponent)({__name:`SingleValueValidation`,props:{value:{},tooltip:{},label:{}},setup(e){let n=e,{isActive:r,updateValidationString:i,isValidationChecked:a}=j(),o=r(a,n.value);function s(){i(n.value)}return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(lT),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(fT),{isActive:(0,t.unref)(o),"onUpdate:isActive":s,label:n.label,tooltip:n.tooltip,"show-switch":!0},null,8,[`isActive`,`label`,`tooltip`])]),_:1}))}});M(),A();var mT=(0,t.defineComponent)({__name:`SingleParamValidation`,props:{value:{},tooltip:{},label:{},placeholder:{}},setup(e){let r=e,{t:i}=k(),{isActive:a,createValidationValue:o,createValidationMessageValue:s,updateValidationString:c,isValidationChecked:l}=j(),u=a(l,r.value),d=o(r.value),f=s(r.value),p=(0,t.computed)({get:()=>d.value||``,set:e=>{d.value=e}}),m=(0,t.computed)({get:()=>d.value?new Date(d.value).getTime():null,set:e=>{if(e){let t=new Date(e);d.value=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}else d.value=``}}),h=()=>{let e=!u.value,t=d.value;e&&r.value===`matches`&&!t&&(t=`/[0-9]/`),!e&&r.value===`matches`&&(f.value=``),c(`${r.value}:${t}`,e)};return(e,a)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(lT),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(fT),{isActive:(0,t.unref)(u),"onUpdate:isActive":h,label:r.label,tooltip:r.tooltip,"show-switch":!0},null,8,[`isActive`,`label`,`tooltip`]),(0,t.unref)(u)&&r.value!==`date_after`&&r.value!==`date_before`?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),{key:0,value:p.value,"onUpdate:value":a[0]||=e=>p.value=e,size:`small`,placeholder:r.placeholder,class:`text-[10px]`,style:{"font-size":`10px`}},null,8,[`value`,`placeholder`])):(0,t.createCommentVNode)(``,!0),(0,t.unref)(u)&&r.value===`matches`?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),{key:1,value:(0,t.unref)(f),"onUpdate:value":a[1]||=e=>(0,t.isRef)(f)?f.value=e:null,size:`small`,placeholder:(0,t.unref)(i)(`validation.matchesMessage.placeholder`),class:`text-[10px]`,style:{"font-size":`10px`}},null,8,[`value`,`placeholder`])):(0,t.createCommentVNode)(``,!0),(0,t.unref)(u)&&(r.value===`date_after`||r.value===`date_before`)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NDatePicker),{key:2,value:m.value,"onUpdate:value":a[2]||=e=>m.value=e,size:`small`,type:`date`},null,8,[`value`])):(0,t.createCommentVNode)(``,!0)]),_:1}))}});M(),cu(),A();var hT={key:0,class:`flex flex-row gap-2`},gT={class:`flex flex-col gap-1`},_T={class:`text-xs`},vT={class:`flex flex-col gap-1`},yT={class:`text-xs`},bT={key:1,class:`flex flex-col gap-2`},xT={class:`flex flex-col gap-1`},ST={class:`text-xs`},CT={class:`flex flex-col gap-1`},wT={class:`text-xs`},TT={key:2,class:`text-xs text-destructive`},ET=(0,t.defineComponent)({__name:`DoubleParamValidation`,props:{value:{},tooltip:{},switchLabel:{},labelOne:{},labelTwo:{},placeholderOne:{},placeholderTwo:{}},setup(e){let r=e,{updateValidationString:i,isValidationChecked:a,isActive:o,createValidationValue:s}=j(),{t:c}=k(),l=o(a,r.value),u=s(r.value),d=(0,t.computed)({get:()=>su(u.value||``)[0]||``,set:e=>{let t=e||``,[,n]=su(u.value||``);u.value=r.value===`between`||r.value===`date_between`?`${t},${n}`:n?`${t||`0`},${n}`:t}}),f=(0,t.computed)({get:()=>su(u.value||``)[1]||``,set:e=>{let t=e||``,[n]=su(u.value||``);u.value=r.value===`between`||r.value===`date_between`?`${n},${t}`:t===``?n||``:`${n||`0`},${t}`}}),p=(0,t.computed)({get:()=>d.value?new Date(d.value).getTime():null,set:e=>{e?d.value=new Date(e).toISOString().split(`T`)[0]||``:d.value=``}}),m=(0,t.computed)({get:()=>f.value?new Date(f.value).getTime():null,set:e=>{e?f.value=new Date(e).toISOString().split(`T`)[0]||``:f.value=``}}),h=()=>{r.value===`between`?i(`between:${d.value},${f.value}`,!l.value):r.value===`date_between`?!d.value||!f.value?i(`date_between:01/01/2002,01/01/2003`,!l.value):i(`date_between:${d.value},${f.value}`,!l.value):i(f.value?d.value?`length:${d.value},${f.value}`:`length:0,${f.value}`:`length:${d.value}`,!l.value)};return(e,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(lT),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(fT),{isActive:(0,t.unref)(l),"onUpdate:isActive":h,label:r.switchLabel,tooltip:r.tooltip,"show-switch":!0},null,8,[`isActive`,`label`,`tooltip`]),(0,t.unref)(l)&&r.value!==`date_between`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hT,[(0,t.createElementVNode)(`div`,gT,[(0,t.createElementVNode)(`span`,_T,(0,t.toDisplayString)(r.labelOne),1),(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,value:d.value,"onUpdate:value":i[0]||=e=>d.value=e,placeholder:r.placeholderOne,class:`text-[10px]`},null,8,[`value`,`placeholder`])]),i[4]||=(0,t.createElementVNode)(`span`,{class:`i-lucide-move-right mt-5 h-4 w-4`},null,-1),(0,t.createElementVNode)(`div`,vT,[(0,t.createElementVNode)(`span`,yT,(0,t.toDisplayString)(r.labelTwo),1),(0,t.createVNode)((0,t.unref)(n.NInput),{size:`small`,value:f.value,"onUpdate:value":i[1]||=e=>f.value=e,placeholder:r.placeholderTwo,class:`text-[10px]`},null,8,[`value`,`placeholder`])])])):(0,t.createCommentVNode)(``,!0),(0,t.unref)(l)&&r.value===`date_between`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,bT,[(0,t.createElementVNode)(`div`,xT,[(0,t.createElementVNode)(`span`,ST,(0,t.toDisplayString)(r.labelOne),1),(0,t.createVNode)((0,t.unref)(n.NDatePicker),{size:`small`,type:`date`,value:p.value,"onUpdate:value":i[2]||=e=>p.value=e},null,8,[`value`])]),(0,t.createElementVNode)(`div`,CT,[(0,t.createElementVNode)(`span`,wT,(0,t.toDisplayString)(r.labelTwo),1),(0,t.createVNode)((0,t.unref)(n.NDatePicker),{size:`small`,type:`date`,value:m.value,"onUpdate:value":i[3]||=e=>m.value=e},null,8,[`value`])])])):(0,t.createCommentVNode)(``,!0),(!f.value||!d.value)&&(r.value===`between`||r.value===`date_between`)&&(0,t.unref)(l)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,TT,(0,t.toDisplayString)((0,t.unref)(c)(`validation.bothValuesMustBeSet`)),1)):(0,t.createCommentVNode)(``,!0)]),_:1}))}});A(),M();var DT={key:0},OT={class:`text-sm`},kT=(0,t.defineComponent)({__name:`ValidationSection`,setup(e){let{t:n}=k(),{currentFieldType:r,selectedField:i}=j(),a=(0,t.computed)(()=>({singleValue:[{value:`accepted`,label:n(`validation.accepted.label`),tooltip:n(`validation.accepted.tooltip`)},{value:`required`,label:n(`validation.required.label`),tooltip:n(`validation.required.tooltip`)},{value:`email`,label:n(`validation.email.label`),tooltip:n(`validation.email.tooltip`)},{value:`number`,label:n(`validation.number.label`),tooltip:n(`validation.number.tooltip`)},{value:`lowercase`,label:n(`validation.lowercase.label`),tooltip:n(`validation.lowercase.tooltip`)},{value:`uppercase`,label:n(`validation.uppercase.label`),tooltip:n(`validation.uppercase.tooltip`)},{value:`url`,label:n(`validation.url.label`),tooltip:n(`validation.url.tooltip`)},{value:`alpha`,label:n(`validation.alpha.label`),tooltip:n(`validation.alpha.tooltip`)},{value:`alpha_spaces`,label:n(`validation.alpha_spaces.label`),tooltip:n(`validation.alpha_spaces.tooltip`)},{value:`alphanumeric`,label:n(`validation.alphanumeric.label`),tooltip:n(`validation.alphanumeric.tooltip`)},{value:`symbol`,label:n(`validation.symbol.label`),tooltip:n(`validation.symbol.tooltip`)},{value:`contains_alpha`,label:n(`validation.contains_alpha.label`),tooltip:n(`validation.contains_alpha.tooltip`)},{value:`contains_alphanumeric`,label:n(`validation.contains_alphanumeric.label`),tooltip:n(`validation.contains_alphanumeric.tooltip`)},{value:`contains_alpha_spaces`,label:n(`validation.contains_alpha_spaces.label`),tooltip:n(`validation.contains_alpha_spaces.tooltip`)},{value:`contains_symbol`,label:n(`validation.contains_symbol.label`),tooltip:n(`validation.contains_symbol.tooltip`)},{value:`contains_uppercase`,label:n(`validation.contains_uppercase.label`),tooltip:n(`validation.contains_uppercase.tooltip`)},{value:`contains_lowercase`,label:n(`validation.contains_lowercase.label`),tooltip:n(`validation.contains_lowercase.tooltip`)},{value:`contains_numeric`,label:n(`validation.contains_numeric.label`),tooltip:n(`validation.contains_numeric.tooltip`)}],singleParam:[{value:`confirm`,label:n(`validation.confirm.label`),tooltip:n(`validation.confirm.tooltip`),placeholder:n(`validation.confirm.placeholder`)},{value:`min`,label:n(`validation.min.label`),tooltip:n(`validation.min.tooltip`),placeholder:n(`validation.min.placeholder`)},{value:`max`,label:n(`validation.max.label`),tooltip:n(`validation.max.tooltip`),placeholder:n(`validation.max.placeholder`)},{value:`matches`,label:n(`validation.matches.label`),tooltip:n(`validation.matches.tooltip`),placeholder:n(`validation.matches.placeholder`)},{value:`starts_with`,label:n(`validation.starts_with.label`),tooltip:n(`validation.starts_with.tooltip`),placeholder:n(`validation.starts_with.placeholder`)},{value:`ends_with`,label:n(`validation.ends_with.label`),tooltip:n(`validation.ends_with.tooltip`),placeholder:n(`validation.ends_with.placeholder`)},{value:`date_after`,label:n(`validation.date_after.label`),tooltip:n(`validation.date_after.tooltip`),placeholder:n(`validation.date_after.placeholder`)},{value:`date_before`,label:n(`validation.date_before.label`),tooltip:n(`validation.date_before.tooltip`),placeholder:n(`validation.date_before.placeholder`)},{value:`date_format`,label:n(`validation.date_format.label`),tooltip:n(`validation.date_format.tooltip`),placeholder:n(`validation.date_format.placeholder`)},{value:`is`,label:n(`validation.is.label`),tooltip:n(`validation.is.tooltip`),placeholder:n(`validation.is.placeholder`)},{value:`not`,label:n(`validation.not.label`),tooltip:n(`validation.not.tooltip`),placeholder:n(`validation.not.placeholder`)},{value:`require_one`,label:n(`validation.require_one.label`),tooltip:n(`validation.require_one.tooltip`),placeholder:n(`validation.require_one.placeholder`)}],doubleParam:[{value:`date_between`,label:n(`validation.date_between.label`),tooltip:n(`validation.date_between.tooltip`),switchLabel:n(`validation.date_between.label`),labelOne:n(`validation.minLabel`),labelTwo:n(`validation.maxLabel`),placeholderOne:n(`validation.min.placeholder`),placeholderTwo:n(`validation.max.placeholder`)},{value:`length`,label:n(`validation.length.label`),tooltip:n(`validation.length.tooltip`),switchLabel:n(`validation.length.label`),labelOne:n(`validation.minLabel`),labelTwo:n(`validation.maxLabel`),placeholderOne:n(`validation.min.placeholder`),placeholderTwo:n(`validation.max.placeholder`)},{value:`between`,label:n(`validation.between.label`),tooltip:n(`validation.between.tooltip`),switchLabel:n(`validation.between.label`),labelOne:n(`validation.minLabel`),labelTwo:n(`validation.maxLabel`),placeholderOne:n(`validation.min.placeholder`),placeholderTwo:n(`validation.max.placeholder`)}]})),o=(e,t)=>!t||{accepted:[`checkbox`],required:[`text`,`textarea`,`number`,`date`,`radio`,`checkbox`,`email`,`url`,`color`,`time`,`naiveDateTime`,`file`,`password`,`range`,`select`,`naiveCascader`,`naiveTreeSelect`,`naiveMention`,`naiveRate`,`naiveSwitch`,`tel`],alpha:[`text`,`textarea`,`password`],alpha_spaces:[`text`,`textarea`,`password`],alphanumeric:[`text`,`textarea`,`password`],symbol:[`text`,`textarea`,`password`],contains_alpha:[`text`,`textarea`,`password`],contains_alphanumeric:[`text`,`textarea`,`password`],contains_alpha_spaces:[`text`,`textarea`,`password`],contains_symbol:[`text`,`textarea`,`password`],contains_uppercase:[`text`,`textarea`,`password`],contains_lowercase:[`text`,`textarea`,`password`],contains_numeric:[`text`,`textarea`,`password`],confirm:[`password`,`text`],email:[`text`,`email`],number:[`text`,`number`,`naiveRate`],lowercase:[`text`,`textarea`,`password`],uppercase:[`text`,`textarea`,`password`],url:[`text`,`url`],min:[`number`,`text`,`file`,`naiveRate`],max:[`number`,`text`,`file`,`naiveRate`],matches:[`text`,`password`,`url`,`tel`],starts_with:[`text`,`textarea`,`password`,`url`,`tel`,`email`],ends_with:[`text`,`textarea`,`password`,`url`,`tel`,`email`],date_after:[`date`,`naiveDateTime`],date_before:[`date`,`naiveDateTime`],date_between:[`date`,`naiveDateTime`],date_format:[`date`,`naiveDateTime`,`text`],is:[`text`,`textarea`,`password`,`url`,`tel`,`email`,`number`],not:[`text`,`textarea`,`password`,`url`,`tel`,`email`,`number`],require_one:[`checkbox`,`radio`,`select`],length:[`text`,`textarea`,`password`,`url`,`tel`,`email`,`naiveMention`],between:[`number`]}[e]?.includes(t)||!1,s=(0,t.computed)(()=>({singleValue:a.value.singleValue.filter(e=>o(e.value,r.value??null)),singleParam:a.value.singleParam.filter(e=>o(e.value,r.value??null)),doubleParam:a.value.doubleParam.filter(e=>o(e.value,r.value??null))}));return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.unref)(i)?.type===`submit`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,DT,[(0,t.createElementVNode)(`span`,OT,(0,t.toDisplayString)((0,t.unref)(n)(`validation.rulesTitle`)),1)])),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(s.value.singleValue,e=>((0,t.openBlock)(),(0,t.createBlock)(pT,{key:e.value,value:e.value,tooltip:e.tooltip,label:e.label},null,8,[`value`,`tooltip`,`label`]))),128)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(s.value.singleParam,e=>((0,t.openBlock)(),(0,t.createBlock)(mT,{key:e.value,value:e.value,tooltip:e.tooltip,label:e.label,placeholder:e.placeholder},null,8,[`value`,`tooltip`,`label`,`placeholder`]))),128)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(s.value.doubleParam,e=>((0,t.openBlock)(),(0,t.createBlock)(ET,{key:e.value,value:e.value,tooltip:e.tooltip,"switch-label":e.switchLabel,"label-one":e.labelOne,"label-two":e.labelTwo,"placeholder-one":e.placeholderOne,"placeholder-two":e.placeholderTwo},null,8,[`value`,`tooltip`,`switch-label`,`label-one`,`label-two`,`placeholder-one`,`placeholder-two`]))),128))],64))}});al(),M(),Zl(),A(),_u();var AT=(0,t.defineComponent)({__name:`NameInput`,setup(e){let{formSchema:n,selectedIndex:r,selectedKey:i}=Jl(),{currentFieldType:a,fieldName:o,label:s,hasField:c}=j(),{t:l}=k(),u=(0,t.computed)(()=>a.value?Oc(a.value)?.category??null:null),d=(0,t.computed)(()=>a.value===`tabsPane`),f=(0,t.computed)(()=>{let e=u.value;return e===`field`||e===`container`||e===`layout`||d.value}),p=(0,t.computed)(()=>u.value===`field`),m=(0,t.computed)(()=>i.value??void 0),h=e=>{let t=r.value,i=r=>{for(let a of r){if(a?.name===e){let e=a?.__key;if(m.value&&e&&e!==m.value||!m.value&&a!==n.value[t])return!0}if(Array.isArray(a?.children)&&i(a.children))return!0}return!1};return e?i(n.value):!1},g=(0,t.computed)(()=>f.value?p.value&&!o.value?`Name 不能为空`:o.value?/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(o.value)?h(o.value)?`Name 已存在`:``:`Name 只能包含字母/数字/_ 且不能以数字开头`:``:``);return(e,n)=>(0,t.unref)(c)&&d.value?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createVNode)(N,{label:`Name`,placeholder:(0,t.unref)(l)(`edits.placeholder.fieldName`),value:(0,t.unref)(o),error:g.value,"onUpdate:value":n[0]||=e=>o.value=e},null,8,[`placeholder`,`value`,`error`]),(0,t.createVNode)(N,{label:`Label`,placeholder:(0,t.unref)(l)(`edits.placeholder.label`),value:(0,t.unref)(s),"onUpdate:value":n[1]||=e=>s.value=e},null,8,[`placeholder`,`value`])],64)):(0,t.unref)(c)&&f.value?((0,t.openBlock)(),(0,t.createBlock)(N,{key:1,label:`Name`,placeholder:(0,t.unref)(l)(`edits.placeholder.fieldName`),value:(0,t.unref)(o),error:g.value,"onUpdate:value":n[2]||=e=>o.value=e},null,8,[`placeholder`,`value`,`error`])):(0,t.createCommentVNode)(``,!0)}}),jT={naiveH1:[{key:`text`,labelKey:`edits.content.text`}],naiveH2:[{key:`text`,labelKey:`edits.content.text`}],naiveH3:[{key:`text`,labelKey:`edits.content.text`}],naiveH4:[{key:`text`,labelKey:`edits.content.text`}],naiveH5:[{key:`text`,labelKey:`edits.content.text`}],naiveH6:[{key:`text`,labelKey:`edits.content.text`}],naiveText:[{key:`text`,labelKey:`edits.content.text`,multiline:!0}],naiveP:[{key:`text`,labelKey:`edits.content.text`,multiline:!0}],naiveA:[{key:`text`,labelKey:`edits.content.text`}],naiveBlockquote:[{key:`text`,labelKey:`edits.content.text`,multiline:!0}],naiveLi:[{key:`value`,labelKey:`edits.content.text`}],naiveDivider:[{key:`title`,labelKey:`edits.content.title`}],naiveAlert:[{key:`title`,labelKey:`edits.content.title`},{key:`content`,labelKey:`edits.content.content`,multiline:!0}]};function MT(e){return e?jT[e]??[]:[]}M(),A(),fu();var NT={class:`text-xs font-medium tracking-wide text-foreground/80 block mb-1`},PT=(0,t.defineComponent)({__name:`StaticContentSection`,setup(e){let{currentFieldType:r,createPropsProp:i}=j(),{t:a}=k(),o=(0,t.computed)(()=>MT(r.value).map(e=>({...e,model:i(e.key,``)})));return(e,r)=>((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.value,e=>((0,t.openBlock)(),(0,t.createBlock)(du,{key:e.key,class:`mt-2`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`label`,NT,(0,t.toDisplayString)((0,t.unref)(a)(e.labelKey)),1),e.multiline?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),{key:0,size:`small`,type:`textarea`,autosize:{minRows:2,maxRows:6},placeholder:(0,t.unref)(a)(`edits.placeholder.text`),value:e.model.value,"onUpdate:value":t=>e.model.value=t},null,8,[`placeholder`,`value`,`onUpdate:value`])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NInput),{key:1,size:`small`,placeholder:(0,t.unref)(a)(`edits.placeholder.text`),value:e.model.value,"onUpdate:value":t=>e.model.value=t},null,8,[`placeholder`,`value`,`onUpdate:value`]))]),_:2},1024))),128))}});M(),A(),Fu();var FT=(0,t.defineComponent)({__name:`ColSpanSection`,setup(e){let{colSpan:n}=j(),{t:r}=k(),i=Array.from({length:12},(e,t)=>({label:String(t+1),value:String(t+1)})),a=(0,t.computed)({get:()=>String(n.value??12),set:e=>{let t=Number(e);n.value=Number.isFinite(t)?t:12}});return(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(Pu,{label:(0,t.unref)(r)(`edits.grid.colSpanLabel`),value:a.value,options:(0,t.unref)(i),"onUpdate:value":n[0]||=e=>a.value=e},null,8,[`label`,`value`,`options`]))}});M(),A(),al();var IT={key:0,class:`flex p-2 h-full text-[11px] md:text-xs text-muted-foreground`},LT={key:1,class:`p-2`},RT={class:`space-y-2 md:space-y-3`},zT=(0,t.defineComponent)({__name:`EditsSection`,setup(e){let{hasField:n,currentFieldType:r,selectedIsForm:i}=j(),{t:a}=k(),o=(0,t.computed)(()=>r.value?Oc(r.value)?.category===`static`:!1),s=(0,t.computed)(()=>jg(r.value));return(e,r)=>(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,LT,[(0,t.createElementVNode)(`div`,RT,[(0,t.createVNode)(AT),(0,t.unref)(i)?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createBlock)(FT,{key:0})),o.value?((0,t.openBlock)(),(0,t.createBlock)(PT,{key:1})):(0,t.createCommentVNode)(``,!0),s.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(s.value),{key:2})):(0,t.createCommentVNode)(``,!0)])])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,IT,(0,t.toDisplayString)((0,t.unref)(a)(`common.selectFieldToEdit`)),1))}}),BT=e=>e===` `||e===` `||e===`
|
|
13
|
+
`||e===`\r`,VT=e=>e>=`0`&&e<=`9`,HT=e=>e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`_`,UT=e=>HT(e)||VT(e);function WT(e,t){let n=new Set,r=GT(e,n);if(!r.ok)return{ok:!1,error:r.error,deps:Array.from(n)};let i=KT(r.tokens);if(!i.ok)return{ok:!1,error:i.error,deps:Array.from(n)};let a=qT(i.rpn,t);return a.ok?{ok:!0,value:a.value,deps:Array.from(n)}:{ok:!1,error:a.error,deps:Array.from(n)}}function GT(e,t){let n=[],r=0,i=e.length,a=e=>{n.push({type:`op`,op:e})};for(;r<i;){let o=e[r];if(BT(o)){r++;continue}if(o===`(`){n.push({type:`lparen`}),r++;continue}if(o===`)`){n.push({type:`rparen`}),r++;continue}if(o===`&`){if(e[r+1]!==`&`)return{ok:!1,error:`无法解析字符: &`};a(`&&`),r+=2;continue}if(o===`|`){if(e[r+1]!==`|`)return{ok:!1,error:`无法解析字符: |`};a(`||`),r+=2;continue}if(o===`=`){if(e[r+1]!==`=`)return{ok:!1,error:`无法解析字符: =`};a(`==`),r+=2;continue}if(o===`!`){if(e[r+1]===`=`){a(`!=`),r+=2;continue}a(`!`),r++;continue}if(o===`>`){if(e[r+1]===`=`){a(`>=`),r+=2;continue}a(`>`),r++;continue}if(o===`<`){if(e[r+1]===`=`){a(`<=`),r+=2;continue}a(`<`),r++;continue}if(o===`+`||o===`-`||o===`*`||o===`/`){a(o),r++;continue}if(o===`$`){if(r++,r>=i)return{ok:!1,error:`表达式以 $ 结尾`};let a=r,o=e[r];if(!HT(o))return{ok:!1,error:`变量名不合法`};for(r++;r<i&&UT(e[r]);)r++;let s=e.slice(a,r);t.add(s),n.push({type:`var`,name:s});continue}if(HT(o)){let t=r;for(r++;r<i&&UT(e[r]);)r++;let a=e.slice(t,r);if(a===`true`){n.push({type:`boolean`,value:!0});continue}if(a===`false`){n.push({type:`boolean`,value:!1});continue}return{ok:!1,error:`未知标识符: ${a}`}}if(o===`"`||o===`'`){let t=o;r++;let a=``;for(;r<i;r++){let n=e[r];if(n===`\\`){let t=e[r+1];if(t===void 0)return{ok:!1,error:`字符串转义不完整`};a+=t,r++;continue}if(n===t)break;a+=n}if(r>=i||e[r]!==t)return{ok:!1,error:`字符串未闭合`};r++,n.push({type:`string`,value:a});continue}if(VT(o)||o===`.`&&r+1<i&&VT(e[r+1])){let t=r;for(r++;r<i&&(VT(e[r])||e[r]===`.`);)r++;let a=e.slice(t,r),o=Number(a);if(!Number.isFinite(o))return{ok:!1,error:`数字不合法: ${a}`};n.push({type:`number`,value:o});continue}return{ok:!1,error:`无法解析字符: ${o}`}}return{ok:!0,tokens:n}}function KT(e){let t=[],n=[],r=e=>e===`u-`||e===`u+`||e===`!`?7:e===`*`||e===`/`?6:e===`+`||e===`-`?5:e===`>`||e===`>=`||e===`<`||e===`<=`?4:e===`==`||e===`!=`?3:e===`&&`?2:+(e===`||`),i=e=>e===`u-`||e===`u+`||e===`!`,a=null;for(let o of e){if(o.type===`number`||o.type===`string`||o.type===`boolean`||o.type===`var`){t.push(o),a=o;continue}if(o.type===`lparen`){n.push(o),a=o;continue}if(o.type===`rparen`){let e=!1;for(;n.length;){let r=n.pop();if(r.type===`lparen`){e=!0;break}t.push(r)}if(!e)return{ok:!1,error:`括号不匹配`};a=o;continue}if(o.type===`op`){let e=o.op===`!`||a===null||a.type===`op`||a.type===`lparen`?{type:`op`,op:o.op===`-`?`u-`:o.op===`+`?`u+`:o.op}:o;for(;n.length;){let a=n[n.length-1];if(a.type!==`op`)break;let o=r(e.op),s=r(a.op);if(i(e.op)&&o<s||!i(e.op)&&o<=s)t.push(n.pop());else break}n.push(e),a=e;continue}}for(;n.length;){let e=n.pop();if(e.type===`lparen`||e.type===`rparen`)return{ok:!1,error:`括号不匹配`};t.push(e)}return{ok:!0,rpn:t}}function qT(e,t){let n=[],r=e=>!!e,i=e=>typeof e==`number`?e:typeof e==`string`?e.trim()?Number(e):0:e==null?0:typeof e==`boolean`?+!!e:Number(e);for(let a of e){if(a.type===`number`){n.push(a.value);continue}if(a.type===`string`){n.push(a.value);continue}if(a.type===`boolean`){n.push(a.value);continue}if(a.type===`var`){n.push(t[a.name]);continue}if(a.type===`op`){if(a.op===`u-`||a.op===`u+`||a.op===`!`){if(n.length<1)return{ok:!1,error:`表达式不完整`};let e=n.pop();if(a.op===`!`){n.push(!r(e));continue}let t=i(e);if(!Number.isFinite(t))return{ok:!1,error:`数值运算失败`};n.push(a.op===`u-`?-t:t);continue}if(n.length<2)return{ok:!1,error:`表达式不完整`};let e=n.pop(),t=n.pop();if(a.op===`+`){if(typeof t==`string`||typeof e==`string`){n.push(String(t??``)+String(e??``));continue}let r=i(t),a=i(e);if(!Number.isFinite(r)||!Number.isFinite(a))return{ok:!1,error:`数值运算失败`};n.push(r+a);continue}if(a.op===`&&`){n.push(r(t)&&r(e));continue}if(a.op===`||`){n.push(r(t)||r(e));continue}if(a.op===`==`||a.op===`!=`){let r=t==null&&e==null?!0:(()=>{let n=i(t),r=i(e);return Number.isFinite(n)&&Number.isFinite(r)?n===r:String(t??``)===String(e??``)})();n.push(a.op===`==`?r:!r);continue}if(a.op===`>`||a.op===`>=`||a.op===`<`||a.op===`<=`){let r=i(t),o=i(e),s=Number.isFinite(r)&&Number.isFinite(o),c=s?r:String(t??``),l=s?o:String(e??``);a.op===`>`?n.push(c>l):a.op===`>=`?n.push(c>=l):a.op===`<`?n.push(c<l):n.push(c<=l);continue}let o=i(t),s=i(e);if(!Number.isFinite(o)||!Number.isFinite(s))return{ok:!1,error:`数值运算失败`};if(a.op===`-`)n.push(o-s);else if(a.op===`*`)n.push(o*s);else if(a.op===`/`)n.push(o/s);else return{ok:!1,error:`未知运算符`};continue}}return n.length===1?{ok:!0,value:n[0]}:{ok:!1,error:`表达式不完整`}}M(),Zl(),A();var JT={class:`space-y-2 mt-4 p-3 border border-border rounded-md bg-muted/30`},YT={class:`flex items-center justify-between`},XT={class:`text-xs font-medium text-foreground`},ZT={key:0,class:`space-y-2`},QT=(0,t.defineComponent)({__name:`ExpressionEditor`,setup(e){let{selectedIndex:r,selectedKey:i}=Jl(),{availableFieldNames:a,useExpressionValue:o,valueExpression:s,fieldValue:c}=j(),{t:l}=k(),u=(0,t.ref)(!1),d=(0,t.ref)(``);(0,t.watch)((0,t.computed)(()=>i.value??String(r.value)),()=>{let e=c.value.trim();!o.value&&!s.value&&e.startsWith(`$`)&&(o.value=!0,s.value=e,c.value=``),u.value=!!o.value,d.value=s.value},{immediate:!0}),(0,t.watch)(s,e=>{u.value&&d.value!==e&&(d.value=e)});let f=e=>{u.value=e,e?(o.value=!0,s.value||=`$`,d.value=s.value):(o.value=!1,s.value=``,d.value=``,c.value.trim().startsWith(`$`)&&(c.value=``))},p=/\$([a-zA-Z0-9_]+)/g,m=(0,t.computed)(()=>!u.value||!d.value?[]:[...d.value.matchAll(p)].map(e=>e[1]).filter(Boolean).filter(e=>!a.value.includes(e))),h=(0,t.computed)(()=>{if(!u.value)return``;let e=d.value;if(!e.trim())return``;let t=WT(e,{});return t.ok?``:t.error});return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,JT,[(0,t.createElementVNode)(`div`,YT,[(0,t.createElementVNode)(`label`,XT,(0,t.toDisplayString)((0,t.unref)(l)(`expression.useExpressionValue`)),1),(0,t.createVNode)((0,t.unref)(n.NSwitch),{size:`small`,value:u.value,"onUpdate:value":f},null,8,[`value`])]),u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ZT,[(0,t.createVNode)((0,t.unref)(n.NInput),{value:d.value,"onUpdate:value":r[0]||=e=>{d.value=e,s.value=e},type:`textarea`,placeholder:(0,t.unref)(l)(`expression.placeholder`),autosize:{minRows:2,maxRows:5}},null,8,[`value`,`placeholder`]),h.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NAlert),{key:0,type:`error`,"show-icon":!0,class:`mt-2 text-xs`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(h.value),1)]),_:1})):(0,t.createCommentVNode)(``,!0),m.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NAlert),{key:1,type:`warning`,"show-icon":!0,class:`mt-2 text-xs`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(l)(`expression.variablesNotFound`,{vars:m.value.join(`, `)})),1)]),_:1})):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)]))}});A(),Zl(),M();var $T={class:`space-y-2 mt-4 p-3 border border-border rounded-md bg-muted/30`},eE={class:`flex items-center justify-between`},tE={class:`text-xs font-medium text-foreground`},nE={key:0,class:`space-y-2`},rE=(0,t.defineComponent)({__name:`IfConditionEditor`,setup(e){let{selectedIndex:r,selectedKey:i}=Jl(),{availableFieldNames:a,ifExpression:o}=j(),{t:s}=k(),c=(0,t.ref)(!1),l=(0,t.ref)(``);(0,t.watch)((0,t.computed)(()=>i.value??String(r.value)),()=>{c.value=!!o.value,l.value=o.value},{immediate:!0}),(0,t.watch)(o,e=>{c.value&&l.value!==e&&(l.value=e)});let u=e=>{c.value=e,e?(o.value||=`$`,l.value=o.value):(o.value=``,l.value=``)},d=/\$([a-zA-Z0-9_]+)/g,f=(0,t.computed)(()=>!c.value||!l.value?[]:[...l.value.matchAll(d)].map(e=>e[1]).filter(Boolean).filter(e=>!a.value.includes(e))),p=(0,t.computed)(()=>{if(!c.value)return``;let e=l.value;if(!e.trim())return``;let t=WT(e,{});return t.ok?``:t.error});return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,$T,[(0,t.createElementVNode)(`div`,eE,[(0,t.createElementVNode)(`label`,tE,(0,t.toDisplayString)((0,t.unref)(s)(`condition.useIf`)),1),(0,t.createVNode)((0,t.unref)(n.NSwitch),{size:`small`,value:c.value,"onUpdate:value":u},null,8,[`value`])]),c.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,nE,[(0,t.createVNode)((0,t.unref)(n.NInput),{value:l.value,"onUpdate:value":r[0]||=e=>{l.value=e,o.value=e},type:`textarea`,placeholder:(0,t.unref)(s)(`condition.placeholder`),autosize:{minRows:2,maxRows:5}},null,8,[`value`,`placeholder`]),p.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NAlert),{key:0,type:`error`,"show-icon":!0,class:`mt-2 text-xs`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(p.value),1)]),_:1})):(0,t.createCommentVNode)(``,!0),f.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NAlert),{key:1,type:`warning`,"show-icon":!0,class:`mt-2 text-xs`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(s)(`expression.variablesNotFound`,{vars:f.value.join(`, `)})),1)]),_:1})):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)]))}}),iE=[],aE=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?aE:iE).push(n+=e[t])})();function oE(e){if(e<768)return!1;for(let t=0,n=iE.length;;){let r=t+n>>1;if(e<iE[r])n=r;else if(e>=aE[r])t=r+1;else return!0;if(t==n)return!1}}function sE(e){return e>=127462&&e<=127487}var cE=8205;function lE(e,t,n=!0,r=!0){return(n?uE:dE)(e,t,r)}function uE(e,t,n){if(t==e.length)return t;t&&pE(e.charCodeAt(t))&&mE(e.charCodeAt(t-1))&&t--;let r=fE(e,t);for(t+=hE(r);t<e.length;){let i=fE(e,t);if(r==cE||i==cE||n&&oE(i))t+=hE(i),r=i;else if(sE(i)){let n=0,r=t-2;for(;r>=0&&sE(fE(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function dE(e,t,n){for(;t>0;){let r=uE(e,t-2,n);if(r<t)return r;t--}return 0}function fE(e,t){let n=e.charCodeAt(t);if(!mE(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return pE(r)?(n-55296<<10)+(r-56320)+65536:n}function pE(e){return e>=56320&&e<57344}function mE(e){return e>=55296&&e<56320}function hE(e){return e<65536?1:2}var z=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=TE(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),_E.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=TE(this,e,t);let n=[];return this.decompose(e,t,n,0),_E.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new xE(this),i=new xE(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new xE(this,e)}iterRange(e,t=this.length){return new SE(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new CE(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new gE(t):_E.from(gE.split(t,[]))}},gE=class e extends z{constructor(e,t=vE(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new wE(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(bE(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=yE(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=TE(this,t,n);let i=yE(this.text,yE(r.text,bE(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):_E.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
14
|
+
`){[e,t]=TE(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},_E=class e extends z{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=TE(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
15
|
+
`){[e,t]=TE(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new gE(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof gE&&c&&(n=u[u.length-1])instanceof gE&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new gE(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};z.empty=new gE([``],0);function vE(e){let t=-1;for(let n of e)t+=n.length+1;return t}function yE(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function bE(e,t,n){return yE(e,[``],t,n)}var xE=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof gE?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof gE?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
16
|
+
`,this;e--}else if(r instanceof gE){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof gE?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},SE=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new xE(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},CE=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(z.prototype[Symbol.iterator]=function(){return this.iter()},xE.prototype[Symbol.iterator]=SE.prototype[Symbol.iterator]=CE.prototype[Symbol.iterator]=function(){return this});var wE=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function TE(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function EE(e,t,n=!0,r=!0){return lE(e,t,n,r)}function DE(e){return e>=56320&&e<57344}function OE(e){return e>=55296&&e<56320}function kE(e,t){let n=e.charCodeAt(t);if(!OE(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return DE(r)?(n-55296<<10)+(r-56320)+65536:n}function AE(e){return e<65536?1:2}var jE=/\r\n?|\n/,ME=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(ME||={}),NE=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){LE(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:zE(this,e)}mapDesc(e,t=!1){return e.empty?this:RE(this,e,t)}mapPos(e,t=-1,n=ME.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=ME.Simple&&c>=e&&(n==ME.TrackDel&&r<e&&c>e||n==ME.TrackBefore&&r<e||n==ME.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},PE=class e extends NE{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return LE(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return RE(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(z.empty);r.push(a?t.slice(i,i+a):z.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:zE(this,e,!0)}map(e,t=!1){return e.empty?this:RE(this,e,t,!0)}iterChanges(e,t=!1){LE(this,e,t)}get desc(){return NE.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new BE(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);FE(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;FE(n,e,t),t>0&&IE(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);FE(n,e,-1),FE(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:NE.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&FE(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?z.of(l.split(r||jE)):l:z.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&FE(i,e-o,-1),FE(i,s-e,d),IE(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(z.empty);r[e]=z.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function FE(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function IE(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(z.empty);e.push(n)}}function LE(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=z.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function RE(e,t,n,r=!1){let i=[],a=r?[]:null,o=new BE(e),s=new BE(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);FE(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(FE(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(FE(i,0,o.ins),a&&IE(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;FE(i,t,e<o.i?o.ins:0),a&&e<o.i&&IE(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?PE.createSet(i,a):NE.create(i);else throw Error(`Mismatched change set lengths`)}function zE(e,t,n=!1){let r=[],i=n?[]:null,a=new BE(e),o=new BE(t);for(let e=!1;;)if(a.done&&o.done)return i?PE.createSet(r,i):NE.create(r);else if(a.ins==0)FE(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)FE(r,0,o.ins,e),i&&IE(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;FE(r,t,n,e),i&&n&&IE(i,r,o.text)}else o.ins==-1?(FE(r,a.off?0:a.len,t,e),i&&IE(i,r,a.textBit(t))):(FE(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&IE(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var BE=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?z.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?z.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},VE=class e{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return B.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return B.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return B.range(e.anchor,e.head)}static create(t,n,r){return new e(t,n,r)}},B=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>VE.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return VE.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(r??16777215)<<6)}static range(e,t,n,r,i){let a=(n??16777215)<<6|(r==null?7:Math.min(6,r));return!i&&e!=t&&(i=t<e?1:-1),t<e?VE.create(t,e,48|a):VE.create(e,t,(i?i<0?8:16:0)|a)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function HE(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var UE=0,V=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=UE++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:WE),!!t.static,t.enables)}of(e){return new GE([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new GE(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new GE(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function WE(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var GE=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=UE++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||qE(e,c)){let r=t(e);if(a?!KE(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=oD(o,c);if(this.dependencies.every(t=>t instanceof V?o.facet(t)===e.facet(t):t instanceof XE?o.field(t,!1)==e.field(t,!1):!0)||(a?KE(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}};function KE(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function qE(e,t){let n=!1;for(let r of t)aD(e,r)&1&&(n=!0);return n}function JE(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=oD(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)aD(e,t);return e.values[o]=s(e),1},update(e,n){if(!qE(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=qE(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&WE(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var YE=V.define({static:!0}),XE=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(UE++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(YE).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(YE),i=n.facet(YE),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,YE.of({field:this,create:e})]}get extension(){return this}},ZE={lowest:4,low:3,default:2,high:1,highest:0};function QE(e){return t=>new eD(t,e)}var $E={highest:QE(ZE.highest),high:QE(ZE.high),default:QE(ZE.default),low:QE(ZE.low),lowest:QE(ZE.lowest)},eD=class{constructor(e,t){this.inner=e,this.prec=t}},tD=class e{of(e){return new nD(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},nD=class{constructor(e,t){this.compartment=e,this.inner=t}},rD=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of iD(t,n,o))e instanceof XE?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,WE(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>JE(e,n,t))}}return new e(t,o,l.map(e=>e(s)),s,c,a)}};function iD(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof nD&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof nD){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof eD)a(e.inner,e.prec);else if(e instanceof XE)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof GE)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,ZE.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,ZE.default),r.reduce((e,t)=>e.concat(t))}function aD(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function oD(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var sD=V.define(),cD=V.define({combine:e=>e.some(e=>e),static:!0}),lD=V.define({combine:e=>e.length?e[0]:void 0,static:!0}),uD=V.define(),dD=V.define(),fD=V.define(),pD=V.define({combine:e=>e.length?e[0]:!1}),mD=class{constructor(e,t){this.type=e,this.value=t}static define(){return new hD}},hD=class{of(e){return new mD(this,e)}},gD=class{constructor(e){this.map=e}of(e){return new _D(this,e)}},_D=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new gD(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};_D.reconfigure=_D.define(),_D.appendConfig=_D.define();var vD=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&HE(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};vD.time=mD.define(),vD.userEvent=mD.define(),vD.addToHistory=mD.define(),vD.remote=mD.define();function yD(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function bD(e,t,n){let r,i,a;return n?(r=t.changes,i=PE.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:_D.mapEffects(e.effects,r).concat(_D.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function xD(e,t,n){let r=t.selection,i=ED(t.annotations);return t.userEvent&&(i=i.concat(vD.userEvent.of(t.userEvent))),{changes:t.changes instanceof PE?t.changes:PE.of(t.changes||[],n,e.facet(lD)),selection:r&&(r instanceof B?r:B.single(r.anchor,r.head)),effects:ED(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function SD(e,t,n){let r=xD(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=bD(r,xD(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=vD.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return wD(n?CD(i):i)}function CD(e){let t=e.startState,n=!0;for(let r of t.facet(uD)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:yD(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=PE.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=vD.create(t,r,e.selection&&e.selection.map(i),_D.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(dD);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof vD?i:Array.isArray(i)&&i.length==1&&i[0]instanceof vD?i[0]:SD(t,ED(i),!1)}return e}function wD(e){let t=e.startState,n=t.facet(fD),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=bD(r,xD(t,a,e.changes.newLength),!0))}return r==e?e:vD.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var TD=[];function ED(e){return e==null?TD:Array.isArray(e)?e:[e]}var DD=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(DD||={}),OD=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,kD;try{kD=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function AD(e){if(kD)return kD.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||OD.test(n)))return!0}return!1}function jD(e){return t=>{if(!/\S/.test(t))return DD.Space;if(AD(t))return DD.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return DD.Word;return DD.Other}}var MD=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)aD(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return aD(this,n),oD(this,n)}update(...e){return SD(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(tD.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(_D.reconfigure)?(n=null,r=e.value):e.is(_D.appendConfig)&&(n=null,r=ED(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=rD.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(cD)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:B.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=ED(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=_D.mapEffects(a,c).concat(_D.mapEffects(ED(o.effects),l))}return{changes:r,selection:B.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof PE?t:PE.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return z.of(t.split(this.facet(e.lineSeparator)||jE))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(aD(this,t),oD(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof XE&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:B.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=rD.resolve(t.extensions||[],new Map),r=t.doc instanceof z?t.doc:z.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||jE)),i=t.selection?t.selection instanceof B?t.selection:B.single(t.selection.anchor,t.selection.head):B.single(0);return HE(i,r.length),n.staticFacet(cD)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
|
17
|
+
`}get readOnly(){return this.facet(pD)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(sD))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return jD(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=EE(t,a,!1);if(i(t.slice(e,a))!=DD.Word)break;a=e}for(;o<r;){let e=EE(t,o);if(i(t.slice(o,e))!=DD.Word)break;o=e}return a==o?null:B.range(a+n,o+n)}};MD.allowMultipleSelections=cD,MD.tabSize=V.define({combine:e=>e.length?e[0]:4}),MD.lineSeparator=lD,MD.readOnly=pD,MD.phrases=V.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),MD.languageData=sD,MD.changeFilter=uD,MD.transactionFilter=dD,MD.transactionExtender=fD,tD.reconfigure=_D.define();function ND(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(!(a===i||i===void 0))if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var PD=class{eq(e){return this==e}range(e,t=e){return ID.create(e,t,this)}};PD.prototype.startSide=PD.prototype.endSide=0,PD.prototype.point=!1,PD.prototype.mapMode=ME.TrackDel;function FD(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var ID=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function LD(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var RD=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},zD=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(LD)),this.isEmpty)return n.length?e.of(n):this;let s=new UD(this,null,-1).goto(0),c=0,l=[],u=new VD;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(ID.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return WD.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return WD.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=HD(a,o,n),c=new KD(a,s,i),l=new KD(o,s,i);n.iterGaps((e,t,n)=>qD(c,e,l,t,n,r)),n.empty&&n.length==0&&qD(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=999999999;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=HD(i,a),s=new KD(i,o,0).goto(n),c=new KD(a,o,0).goto(n);for(;;){if(s.to!=c.to||!JD(s.active,c.active)||s.point&&(!c.point||!FD(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new KD(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new VD;for(let r of e instanceof ID?[e]:t?BD(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};zD.empty=new zD([],[],null,-1);function BD(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(LD(t,r)>0)return e.slice().sort(LD);t=r}return e}zD.empty.nextLayer=zD.empty;var VD=class e{finishChunk(e){this.chunks.push(new RD(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||=new e).add(t,n,r)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(zD.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=zD.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function HD(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var UD=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex];if(this.from=e+t.from[this.rangeIndex],this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},WD=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new UD(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)GD(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)GD(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),GD(this.heap,0)}}};function GD(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var KD=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=WD.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){YD(this.active,e),YD(this.activeTo,e),YD(this.activeRank,e),this.minActive=ZD(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;XD(this.active,t,n),XD(this.activeTo,t,r),XD(this.activeRank,t,i),e&&XD(e,t,this.cursor.from),this.minActive=ZD(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&YD(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function qD(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&FD(e.point,n.point)&&JD(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!JD(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function JD(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!FD(e[n],t[n]))return!1;return!0}function YD(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function XD(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function ZD(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function QD(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=EE(e,i));return r}function $D(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=EE(e,r)}return r===!0?-1:e.length}for(var eO=`ͼ`,tO=typeof Symbol>`u`?`__`+eO:Symbol.for(eO),nO=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),rO=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},iO=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
|
|
18
|
+
`)}static newName(){let e=rO[tO]||1;return rO[tO]=e+1,eO+e.toString(36)}static mount(e,t,n){let r=e[nO],i=n&&n.nonce;r?i&&r.setNonce(i):r=new oO(e,i),r.mount(Array.isArray(t)?t:[t],e)}},aO=new Map,oO=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=aO.get(n);if(t)return e[nO]=t;this.sheet=new r.CSSStyleSheet,aO.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[nO]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
|
19
|
+
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},sO={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},cO={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},lO=typeof navigator<`u`&&/Mac/.test(navigator.platform),uO=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),dO=0;dO<10;dO++)sO[48+dO]=sO[96+dO]=String(dO);for(var dO=1;dO<=24;dO++)sO[dO+111]=`F`+dO;for(var dO=65;dO<=90;dO++)sO[dO]=String.fromCharCode(dO+32),cO[dO]=String.fromCharCode(dO);for(var fO in sO)cO.hasOwnProperty(fO)||(cO[fO]=sO[fO]);function pO(e){var t=!(lO&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||uO&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?cO:sO)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var mO=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},hO=typeof document<`u`?document:{documentElement:{style:{}}},gO=/Edge\/(\d+)/.exec(mO.userAgent),_O=/MSIE \d/.test(mO.userAgent),vO=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(mO.userAgent),yO=!!(_O||vO||gO),bO=!yO&&/gecko\/(\d+)/i.test(mO.userAgent),xO=!yO&&/Chrome\/(\d+)/.exec(mO.userAgent),SO=`webkitFontSmoothing`in hO.documentElement.style,CO=!yO&&/Apple Computer/.test(mO.vendor),wO=CO&&(/Mobile\/\w+/.test(mO.userAgent)||mO.maxTouchPoints>2),H={mac:wO||/Mac/.test(mO.platform),windows:/Win/.test(mO.platform),linux:/Linux|X11/.test(mO.platform),ie:yO,ie_version:_O?hO.documentMode||6:vO?+vO[1]:gO?+gO[1]:0,gecko:bO,gecko_version:bO?+(/Firefox\/(\d+)/.exec(mO.userAgent)||[0,0])[1]:0,chrome:!!xO,chrome_version:xO?+xO[1]:0,ios:wO,android:/Android\b/.test(mO.userAgent),webkit:SO,webkit_version:SO?+(/\bAppleWebKit\/(\d+)/.exec(mO.userAgent)||[0,0])[1]:0,safari:CO,safari_version:CO?+(/\bVersion\/(\d+(\.\d+)?)/.exec(mO.userAgent)||[0,0])[1]:0,tabSize:hO.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function TO(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var EO=Object.create(null);function DO(e,t,n){if(e==t)return!0;e||=EO,t||=EO;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function OO(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function kO(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function AO(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var jO=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},MO=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(MO||={}),NO=class extends PD{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new PO(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new IO(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=LO(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new IO(e,n,r,t,e.widget||null,!0)}static line(e){return new FO(e)}static set(e,t=!1){return zD.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};NO.none=zD.empty;var PO=class e extends NO{constructor(e){let{start:t,end:n}=LO(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?TO(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||EO}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&DO(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};PO.prototype.point=!1;var FO=class e extends NO{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&DO(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};FO.prototype.mapMode=ME.TrackBefore,FO.prototype.point=!0;var IO=class e extends NO{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?ME.TrackBefore:ME.TrackAfter:ME.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?MO.WidgetBefore:MO.WidgetAfter:MO.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&RO(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};IO.prototype.point=!0;function LO(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function RO(e,t){return e==t||!!(e&&t&&e.compare(t))}function zO(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var BO=class e extends PD{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&DO(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||EO)}static set(e,t=!1){return zD.of(e,t)}};BO.prototype.startSide=BO.prototype.endSide=-1;function VO(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function HO(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function UO(e,t){if(!t.anchorNode)return!1;try{return HO(e,t.anchorNode)}catch{return!1}}function WO(e){return e.nodeType==3?ak(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function GO(e,t,n,r){return n?JO(e,t,n,r,-1)||JO(e,t,n,r,1):!1}function KO(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function qO(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function JO(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:YO(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=KO(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?YO(e):0}else return!1}}function YO(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function XO(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function ZO(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function QO(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function $O(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=ZO(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=QO(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function ek(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var tk=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?YO(t):0),n,Math.min(e.focusOffset,n?YO(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},nk=null;H.safari&&H.safari_version>=26&&(nk=!1);function rk(e){if(e.setActive)return e.setActive();if(nk)return e.focus(nk);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(nk==null?{get preventScroll(){return nk={preventScroll:!0},!0}}:void 0),!nk){nk=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}var ik;function ak(e,t,n=t){let r=ik||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function ok(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function sk(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function ck(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,YO(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=YO(n))}else if(n==e)return!0;else r=KO(n),n=n.parentNode}function lk(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function uk(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=YO(n)}else if(n.parentNode&&!qO(n))r=KO(n),n=n.parentNode;else return null}function dk(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!qO(n))r=KO(n)+1,n=n.parentNode;else return null}var fk=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,KO(t),n)}static after(t,n){return new e(t.parentNode,KO(t)+1,n)}},pk=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(pk||={}),mk=pk.LTR,hk=pk.RTL;function gk(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var _k=gk(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),vk=gk(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),yk=Object.create(null),bk=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);yk[t]=n,yk[n]=-t}function xk(e){return e<=247?_k[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?vk[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var Sk=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Ck=class{get dir(){return this.level%2?hk:mk}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function wk(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!wk(r.inner,i.inner))return!1}return!0}var Tk=[];function Ek(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=xk(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),Tk[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=Tk[e];if(i==128)e<s-1&&t==Tk[e+1]&&t&24?i=Tk[e]=t:Tk[e]=256;else if(i==64){let i=e+1;for(;i<s&&Tk[i]==64;)i++;let a=e&&t==8||i<n&&Tk[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)Tk[t]=a;e=i-1}else i==8&&r==1&&(Tk[e]=1);t=i,i&7&&(r=i)}}}function Dk(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=yk[n=e.charCodeAt(t)])if(r<0){for(let e=s-3;e>=0;e-=3)if(bk[e+1]==-r){let n=bk[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(Tk[t]=Tk[bk[e]]=r),s=e;break}}else if(bk.length==189)break;else bk[s++]=t,bk[s++]=n,bk[s++]=c;else if((o=Tk[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=bk[t+2];if(n&2)break;if(e)bk[t+2]|=2;else{if(n&4)break;bk[t+2]|=4}}}}}function Ok(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=Tk[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(Tk[o]==256)o++;else break;let l=a==1,u=l==((o<t?Tk[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),Tk[--t]=u;c=o}else a=o,c++}}}function kk(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=Tk[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(Tk[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new Ck(c,m.from,f)),Ak(e,m.direction==mk==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?Tk[p]!=s:Tk[p]==s))break;else p++;d?kk(e,c,p,r+1,i,d,o):c<p&&o.push(new Ck(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=Tk[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(Tk[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new Ck(m.to,c,f)),Ak(e,m.direction==mk==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?Tk[p-1]!=s:Tk[p-1]==s))break;else p--;d?kk(e,p,c,r+1,i,d,o):p<c&&o.push(new Ck(p,c,f)),c=p}}function Ak(e,t,n,r,i,a,o){let s=t%2?2:1;Ek(e,i,a,r,s),Dk(e,i,a,r,s),Ok(i,a,r,s),kk(e,i,a,t,n,r,o)}function jk(e,t,n){if(!e)return[new Ck(0,0,+(t==hk))];if(t==mk&&!n.length&&!Sk.test(e))return Mk(e.length);if(n.length)for(;e.length>Tk.length;)Tk[Tk.length]=256;let r=[],i=t==mk?0:1;return Ak(e,i,i,n,0,e.length,r),r}function Mk(e){return[new Ck(0,e,0)]}var Nk=``;function Pk(e,t,n,r,i){let a=r.head-e.from,o=Ck.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=EE(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),Nk=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?B.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):B.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function Fk(e,t,n){for(let r=t;r<n;r++){let t=xk(e.charCodeAt(r));if(t==1)return mk;if(t==2||t==4)return hk}return mk}var Ik=V.define(),Lk=V.define(),Rk=V.define(),zk=V.define(),Bk=V.define(),Vk=V.define(),Hk=V.define(),Uk=V.define(),Wk=V.define(),Gk=V.define({combine:e=>e.some(e=>e)}),Kk=V.define({combine:e=>e.some(e=>e)}),qk=V.define(),Jk=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(B.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Yk=_D.define({map:(e,t)=>e.map(t)}),Xk=_D.define();function Zk(e,t,n){let r=e.facet(zk);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Qk=V.define({combine:e=>e.length?e[0]:!0}),$k=0,eA=V.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),tA=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(eA.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(eA.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e($k++,t,r,i,e=>{let t=[];return o&&t.push(aA.of(t=>{let n=t.plugin(e);return n?o(n):NO.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},nA=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Zk(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Zk(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){Zk(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},rA=V.define(),iA=V.define(),aA=V.define(),oA=V.define(),sA=V.define(),cA=V.define(),lA=V.define();function uA(e,t){let n=e.state.facet(lA);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return zD.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=Fk(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var dA=V.define();function fA(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(dA)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var pA=V.define(),mA=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},hA=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=PE.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new mA(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},gA=[],_A=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return gA}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&OO(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=KO(this.dom),r=this.length?e>0:t>0;return new fk(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof bA)return e;return null}static get(e){return e.cmTile}},vA=class extends _A{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=yA(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=yA(r);this.length=a}};function yA(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var bA=class extends vA{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=_A.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof xA)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},xA=class e extends vA{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},SA=class e extends vA{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0||n&&wA(a,d)))&&(f>c||d.flags&32)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t):CA(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new fk(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new fk(e.dom,0);e==n.tile&&(a=!0)}}return new fk(this.dom,0)}};function CA(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=WO(t);return n[n.length-1]||null}function wA(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var TA=class e extends vA{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},EA=class e extends _A{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let n=this.dom.nodeValue.length;e>n&&(e=n);let r=e,i=e,a=0;e==0&&t<0||e==n&&t>=0?H.chrome||H.gecko||(e?(r--,a=1):i<n&&(i++,a=-1)):t<0?r--:i<n&&i++;let o=ak(this.dom,r,i).getClientRects();if(!o.length)return null;let s=o[(a?a<0:t>=0)?0:o.length-1];return H.safari&&!a&&s.width==0&&(s=Array.prototype.find.call(o,e=>e.width)||s),a?XO(s,a<0):s||null}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},DA=class e extends _A{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return XO(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return XO(n,!r)}}get overrideDOMText(){if(!this.length)return z.empty;let{root:e}=this;if(!e)return z.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},OA=class extends _A{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return z.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},kA=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite())if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(e){let t=Math.min(e,r.length-i);n&&n.skip(r,i,i+t),e-=t,i+=t}else break;else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},AA=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},jA=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new EA(a.dom,a.text+e);t.parent=i}else i.append(r||EA.of(e,this.cache.find(EA)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?VA(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof TA&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(VA(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=_A.get(n.dom);e&&e.setDOM(VA(n.dom))}let e=TA.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=_A.get(e.text);i&&this.cache.reused.set(i,2);let a=new EA(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=RA;let n=SA.start(e,t||this.cache.find(SA)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof TA&&a.mark.eq(i))n=a,t--;else{let e=TA.of(i,this.cache.find(TA,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!IA(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(H.ios&&IA(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(UA,0,32)||new DA(UA.toDOM(),0,UA,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new AA(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof xA&&n.wrapper.eq(t.wrapper))e=n;else{let n=xA.of(t.wrapper,this.cache.find(xA,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(OA,void 0,1);return n&&(n.flags=t),n||new OA(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},MA=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},NA=[DA,SA,EA,TA,OA,xA,bA];for(let e=0;e<NA.length;e++)NA[e].bucket=e;var PA=class{constructor(e){this.view=e,this.buckets=NA.map(()=>[]),this.index=NA.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=i.length-1;e>=0;e--){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new DA(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},FA=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new PA(e),this.text=new MA(e.state.doc),this.builder=new jA(this.cache,new bA(e,e.contentDOM),zD.iter(n)),this.cache.reused.set(t,2),this.old=new kA(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=BA(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?DA.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof OA)this.cache.add(e);else if(e instanceof TA)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof TA&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof TA&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=zD.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof IO){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?HA.block:HA.inline),c=LA(a),l=this.cache.findWidget(i,t-e,c)||DA.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=zA(n,a);t>e&&this.text.skip(t-e)},span:(e,t,i,a)=>{for(let o=e;o<t;){let s=this.text.next(Math.min(512,t-o));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),o++):(r.ensureLine(n),r.addText(s,i,o==e?a:i.length),o+=s.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=_A.get(r);if(r==this.view.contentDOM)break;e instanceof TA?t.push(e):e?.isLine()?n=e:e instanceof xA||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new SA(r,RA):n||t.push(TA.of(new PO({tagName:r.nodeName.toLowerCase(),attributes:AO(r)}),r)))}return{line:n,marks:t}}};function IA(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function LA(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var RA={class:`cm-line`};function zA(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&TO(n,e),r&&(e.class+=` `+r),e)}function BA(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof TA&&t.push(r.mark)}return t}function VA(e){let t=_A.get(e);return t&&t.setDOM(e.cloneNode()),e}var HA=class extends jO{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};HA.inline=new HA(`span`),HA.block=new HA(`div`);var UA=new class extends jO{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},WA=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=NO.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new bA(e,e.contentDOM),this.updateInner([new mA(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!tj(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?JA(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new mA(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(H.ie||H.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=ZA(i,this.decorations,e.changes);o.length&&(t=mA.extendWithRanges(t,o));let s=$A(a,this.blockWrappers,e.changes);return s.length&&(t=mA.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new FA(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&_A.get(t.text)&&r.cache.reused.set(_A.get(t.text),2),this.tile=r.run(e,t),GA(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=H.chrome||H.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof nj&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Xk)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Qk)||n.tabIndex>-1)&&UO(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),H.gecko&&s.empty&&!this.hasComposition&&KA(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new fk(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!GO(c.node,c.offset,u.anchorNode,u.anchorOffset)||!GO(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{H.android&&H.chrome&&n.contains(u.focusNode)&&ej(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=VO(this.view.root);if(e)if(s.empty){if(H.gecko){let e=YA(c.node,c.offset);if(e&&e!=3){let t=(e==1?uk:dk)(c.node,c.offset);t&&(c=new fk(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new fk(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new fk(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&GO(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=VO(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=YO(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!_A.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof nj?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=EE(e.text,t);if(n==t)return null;let r=ak(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==pk.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof xA)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?WO(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?pk.RTL:pk.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=WO(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=WO(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(NO.replace({widget:new nj(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return NO.set(e)}updateDeco(){let e=1,t=this.view.state.facet(aA).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(sA).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(zD.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(oA).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(qk))try{if(t(this.view,e.range,e))return!0}catch(e){Zk(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc??(t.empty?0:t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=fA(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if($O(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==pk.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);e&&e.dom.scrollIntoView({block:`nearest`})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){GA(this.tile)}};function GA(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)GA(n,t)}}function KA(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function qA(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=uk(n.focusNode,n.focusOffset),i=dk(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=_A.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=_A.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function JA(e,t,n){let r=qA(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new mA(c.mapPos(a),c.mapPos(o),a,o),text:i}}function YA(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var XA=class{constructor(){this.changes=[]}compareRange(e,t){zO(e,t,this.changes)}comparePoint(e,t){zO(e,t,this.changes)}boundChange(e){zO(e,e,this.changes)}};function ZA(e,t,n){let r=new XA;return zD.compare(e,t,n,r),r.changes}var QA=class{constructor(){this.changes=[]}compareRange(e,t){zO(e,t,this.changes)}comparePoint(){}boundChange(e){zO(e,e,this.changes)}};function $A(e,t,n){let r=new QA;return zD.compare(e,t,n,r),r.changes}function ej(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function tj(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var nj=class extends jO{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function rj(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return B.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=EE(i.text,a,!1):s=EE(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=EE(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=EE(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return B.range(o+i.from,s+i.from)}function ij(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+$D(o,a,e.state.tabSize)}function aj(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==MO.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function oj(e,t,n,r){let i=aj(e,t.head,t.assoc||-1),a=!r||i.type!=MO.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==pk.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return B.cursor(o,n?-1:1)}return B.cursor(n?i.to:i.from,n?-1:1)}function sj(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=Pk(i,a,o,s,n),l=Nk;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
|
20
|
+
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function cj(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==DD.Space&&(i=t),i==t}}function lj(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return B.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=mj(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return B.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return B.cursor(i.pos,i.assoc,void 0,o)}}function uj(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function dj(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=uj(e,i.from,0);t!=i.from&&(a=B.cursor(t,-1))}else{let t=uj(e,i.from,-1),n=uj(e,i.to,1);(t!=i.from||n!=i.to)&&(a=B.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?B.create(n,t.mainIndex):t}function fj(e,t,n){let r=uj(e.state.facet(cA).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:B.cursor(r,r<n.from?1:-1)}var pj=class{constructor(e,t){this.pos=e,this.assoc=t}};function mj(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new pj(0,1);if(c>e.viewState.docHeight)return new pj(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==MO.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==MO.Text){let t=ij(e,i,l,o,s);return new pj(t,t==l.from?1:-1)}}if(l.type!=MO.Text)return c<(l.top+l.bottom)/2?new pj(l.from,1):new pj(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new hj(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var hj=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Ck.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Ck.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),o,s,c=-1,l=1e9,u;search:for(;n<r;){let d=r-n,f=n+r>>1;adjust:if(i.has(f)){let e=n+Math.floor(Math.random()*d);for(let t=0;t<d;t++){if(!i.has(e)){f=e;break adjust}e++,e==r&&(e=n)}break search}i.add(f);let p=t(f);if(p)for(let t=0;t<p.length;t++){let i=p[t],d=0;if(!(i.width==0&&p.length>1)){if(i.bottom<this.y)(!o||o.bottom<i.bottom)&&(o=i),d=1;else if(i.top>this.y)(!s||s.top>i.top)&&(s=i),d=-1;else{let e=i.left>this.x?this.x-i.left:i.right<this.x?this.x-i.right:0,t=Math.abs(e);t<l&&(c=f,l=t,u=i),e&&(d=e<0==(this.baseDir==pk.LTR)?-1:1)}d==-1&&(!a||this.baseDirAt(e[f],1))?r=f:d==1&&(!a||this.baseDirAt(e[f+1],-1))&&(n=f+1)}}}if(!u){let n=o&&(!s||this.y-o.bottom<s.top-this.y)?o:s;return this.y=(n.top+n.bottom)/2,this.scan(e,t)}if(l){let{top:n,bottom:r}=u;if(o&&o.bottom>(n+n+r)/3)return this.y=o.bottom-1,this.scan(e,t);if(s&&s.top<(n+r+r)/3)return this.y=s.top+1,this.scan(e,t)}let d=(a?this.dirAt(e[c],1):this.baseDir)==pk.LTR;return{i:c,after:this.x>(u.left+u.right)/2==d}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=EE(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return ak(e.dom,i,a).getClientRects()});return r.after?new pj(n[r.i+1],-1):new pj(n[r.i],1)}scanTile(e,t){if(!e.length)return new pj(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:ak(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new pj(n[r.i+1],-1):new pj(a,1)}},gj=``,_j=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(MD.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=gj}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=_A.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=_A.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:qO(r))||qO(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!yj(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=_A.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(vj(e,n.node,n.offset)?t:0))}};function vj(e,t,n){for(;;){if(!t||n<YO(t))return!1;if(t==e)return!0;n=KO(t)+1,t=t.parentNode}}function yj(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=_A.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var bj=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},xj=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Sj(e.docView.tile,t,n,0))){let t=i||a?[]:Dj(e),n=new _j(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=Oj(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!HO(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!HO(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((H.ios||H.chrome)&&o.main.empty&&n!=r&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(B.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=B.create([B.cursor(n,r)])}else this.newSel=B.single(r,n)}}};function Sj(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return Sj(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}else if(e.isText())return{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling};else return null}function Cj(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||H.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,gj),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:z.of(t.text.slice(a.from-e,u).split(gj))}:(d=Ej(l,t.text,s-e,c))&&(H.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==gj+gj&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:z.of(t.text.slice(d.from,d.toB).split(gj))})}else r&&(!e.hasFocus&&i.facet(Qk)||kj(r,a))&&(r=null);if(!n&&!r)return!1;if((H.mac||H.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=B.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:z.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:H.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
21
|
+
`&&e.lineWrapping&&(r&&=B.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:z.of([` `])}),n)return wj(e,n,r,o);if(r&&!kj(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=dj(i.facet(cA).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function wj(e,t,n,r=-1){if(H.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(H.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&ok(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&ok(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&ok(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=Tj(e,t,n);return e.state.facet(Vk).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function Tj(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=uj(i.facet(cA).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:B.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&qA(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?B.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function Ej(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function Dj(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new bj(n,r)),(i!=n||a!=r)&&t.push(new bj(i,a))),t}function Oj(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?B.single(n+t,r+t):null}function kj(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var Aj=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,H.safari&&e.contentDOM.addEventListener(`input`,()=>null),H.gecko&&fM(e.contentDOM.ownerDocument)}handleEvent(e){!Uj(this.view,e)||this.ignoreDuringComposition(e)||e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Mj(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Fj.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),H.android&&H.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return H.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=Nj.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||Pj.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,ok(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:H.safari&&!H.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function jj(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Zk(n.state,e)}}}function Mj(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(jj(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(jj(t.value,r))}}for(let e in Wj)n(e).handlers.push(Wj[e]);for(let e in Gj)n(e).observers.push(Gj[e]);return t}var Nj=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],Pj=`dthko`,Fj=[16,17,18,20,91,92,224,225],Ij=6;function Lj(e){return Math.max(0,e)*.7+8}function Rj(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var zj=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=ek(e.contentDOM),this.atoms=e.state.facet(cA).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(MD.allowMultipleSelections)&&Bj(e,t),this.dragging=Hj(e,t)&&tM(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Rj(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=fA(this.view);e.clientX-s.left<=r+Ij?t=-Lj(r-e.clientX):e.clientX+s.right>=a-Ij&&(t=Lj(e.clientX-a)),e.clientY-s.top<=i+Ij?n=-Lj(i-e.clientY):e.clientY+s.bottom>=o-Ij&&(n=Lj(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=dj(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function Bj(e,t){let n=e.state.facet(Ik);return n.length?n[0](t):H.mac?t.metaKey:t.ctrlKey}function Vj(e,t){let n=e.state.facet(Lk);return n.length?n[0](t):H.mac?!t.altKey:!t.ctrlKey}function Hj(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=VO(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function Uj(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=_A.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Wj=Object.create(null),Gj=Object.create(null),Kj=H.ie&&H.ie_version<15||H.ios&&H.webkit_version<604;function qj(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),Yj(e,n.value)},50)}function Jj(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function Yj(e,t){t=Jj(e.state,Uk,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(sM!=null&&n.selection.ranges.every(e=>e.empty)&&sM==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:B.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:B.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}Gj.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Gj.wheel=Gj.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},Wj.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),Gj.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},Gj.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},Wj.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(Rk))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=nM(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new zj(e,t,n,r)),r&&e.observer.ignore(()=>{rk(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function Xj(e,t,n,r){if(r==1)return B.cursor(t,n);if(r==2)return rj(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,B.range(a,o)}}var Zj=H.ie&&H.ie_version<=11,Qj=null,$j=0,eM=0;function tM(e){if(!Zj)return e.detail;let t=Qj,n=eM;return Qj=e,eM=Date.now(),$j=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?($j+1)%3:1}function nM(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=tM(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=Xj(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=Xj(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?B.range(i,a,l.assoc):B.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=rM(i,s.pos))?c:o?i.addRange(l):B.create([l])}}}function rM(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return B.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}Wj.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=B.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,Jj(e.state,Wk,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},Wj.dragend=e=>(e.inputState.draggedContent=null,!1);function iM(e,t,n,r){if(n=Jj(e.state,Uk,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&Vj(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}Wj.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&iM(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}else{let n=t.dataTransfer.getData(`Text`);if(n)return iM(e,t,n,!0),!0}return!1},Wj.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Kj?null:t.clipboardData;return n?(Yj(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(qj(e),!1)};function aM(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function oM(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:Jj(e,Wk,t.join(e.lineBreak)),ranges:n,linewise:r}}var sM=null;Wj.copy=Wj.cut=(e,t)=>{if(!UO(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=oM(e.state);if(!n&&!i)return!1;sM=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=Kj?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(aM(e,n),!1)};var cM=mD.define();function lM(e,t){let n=[];for(let r of e.facet(Hk)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:cM.of(!0)}):null}function uM(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=lM(e.state,t);n?e.dispatch(n):e.update([])}},10)}Gj.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),uM(e)},Gj.blur=e=>{e.observer.clearSelectionRange(),uM(e)},Gj.compositionstart=Gj.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},Gj.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,H.chrome&&H.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},Gj.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Wj.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return wj(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(H.chrome&&H.android&&(n=Nj.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return H.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),H.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>Gj.compositionend(e,t),20),!1};var dM=new Set;function fM(e){dM.has(e)||(dM.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var pM=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],mM=!1;function hM(){mM=!1}var gM=class{constructor(e){this.lineWrapping=e,this.doc=z.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return pM.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=pM.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},_M=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},vM=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?MO.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof IO?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},yM=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(yM||={}),bM=.001,xM=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>bM&&(mM=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,yM.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,yM.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,yM.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=AM.build(n.setDoc(a),e,l,u);i=SM(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new TM(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break;else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new DM(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function SM(e,t){return e==t?e:(e.constructor!=t.constructor&&(mM=!0),t)}xM.prototype.size=1;var CM=NO.replace({}),wM=class extends xM{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new vM(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new vM(r,0,n,this.spaceAbove,CM):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,yM.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},TM=class e extends wM{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new vM(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof EM&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof EM?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):xM.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},EM=class e extends xM{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new vM(a.from,a.length,l,c,0)}else{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new vM(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==yM.ByHeight)return this.blockAt(e,n,r,i);if(t==yM.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new vM(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new vM(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new vM(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return xM.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=bM&&(s=-2);let c=new TM(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=xM.of(r);return(s<0||Math.abs(c.height-this.height)>=bM||Math.abs(s-this.heightMetrics(t,n).perLine)>=bM)&&(mM=!0),SM(this,c)}else (r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},DM=class extends xM{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==yM.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==yM.ByPosNoHeight?yM.ByPosNoHeight:yM.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,yM.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&OM(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),OM(i,e)}return xM.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?xM.of(this.break?[e,null,t]:[e,t]):(this.left=SM(this.left,e),this.right=SM(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function OM(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof EM&&(r=e[t+1])instanceof EM&&e.splice(t-1,3,new EM(n.length+1+r.length))}var kM=5,AM=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof TM?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new TM(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new wM(a,r,n)):(a||i||r>=kM)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new TM(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new EM(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof TM)return e;let t=new TM(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof TM)&&!this.isCovered?this.nodes.push(new TM(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof TM&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return zD.spans(n,r,i,a,0),a.finish(r)}};function jM(e,t,n){let r=new MM;return zD.compare(e,t,n,r,0),r.changes}var MM=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&zO(e,t,this.changes,5)}};function NM(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function PM(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function FM(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var IM=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return NO.replace({widget:new LM(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},LM=class extends jO{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},RM=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=WM,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=pk.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1,this.heightOracle=new gM(t.facet(iA).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`)),this.stateDeco=GM(t),this.heightMap=xM.empty().applyChanges(this.stateDeco,z.empty,this.heightOracle.setDoc(t.doc),[new mA(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=NO.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new zM(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?WM:new KM(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(qM(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=GM(this.state);let r=e.changedRanges,i=mA.extendWithRanges(r,jM(n,this.stateDeco,e?e.changes:PE.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);hM(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||mM)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Kk)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?pk.RTL:pk.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=QO(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=ek(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=lk(this.scrollParent||e.win);let m=(this.printing?FM:NM)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!PM(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),hM();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?xM.empty().applyChanges(this.stateDeco,z.empty,this.heightOracle,[new mA(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new _M(n.from,i))}mM&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new zM(r.lineAt(a-n*1e3,yM.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,yM.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,yM.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new zM(r.lineAt(o-1e3/2,yM.ByHeight,i,0,0).from,r.lineAt(o+n+1e3/2,yM.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new zM(this.heightMap.lineAt(n,yM.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,yM.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,yM.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,yM.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new IM(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=pk.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=UM(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(B.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new IM(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=MO.Text)return;let i=BM(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=HM(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=VM(i,n),l=VM(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=HM(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=VM(i,f),l=VM(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=HM(r,n)-HM(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){IM.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=NO.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];zD.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||qM(this.heightMap.lineAt(e,yM.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||qM(this.heightMap.lineAt(this.scaler.fromDOM(e),yM.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return qM(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},zM=class{constructor(e,t){this.from=e,this.to=t}};function BM(e,t,n){let r=[],i=e,a=0;return zD.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function VM({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function HM(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function UM(e,t){for(let n of e)if(t(n))return n}var WM={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function GM(e){let t=e.facet(aA).filter(e=>typeof e!=`function`),n=e.facet(sA).filter(e=>typeof e!=`function`);return n.length&&t.push(zD.join(n)),t}var KM=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,yM.ByPos,e,0,0).top,o=t.lineAt(i,yM.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to):!1}};function qM(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new vM(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>qM(e,t)):e._content)}var JM=V.define({combine:e=>e.join(` `)}),YM=V.define({combine:e=>e.indexOf(!0)>-1}),XM=iO.newName(),ZM=iO.newName(),QM=iO.newName(),$M={"&light":`.`+ZM,"&dark":`.`+QM};function eN(e,t,n){return new iO(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var tN=eN(`.`+XM,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{backgroundImage:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)`,backgroundPosition:`center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},$M),nN={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},rN=H.ie&&H.ie_version<=11,iN=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new tk,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(H.ie&&H.ie_version<=11||H.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&H.android&&e.constructor.EDIT_CONTEXT!==!1&&!(H.chrome&&H.chrome_version<126)&&(this.editContext=new cN(e),e.state.facet(Qk)&&(e.contentDOM.editContext=this.editContext.editContext)),rN&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type==`change`||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Qk)?n.root.activeElement!=this.dom:!UO(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(H.ie&&H.ie_version<=11||H.android&&H.chrome)&&!n.state.selection.main.empty&&r.focusNode&&GO(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=VO(e.root);if(!t)return!1;let n=H.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&sN(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=UO(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&ck(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,nN),rN&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),rN&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){this.delayedAndroidKey||(this.flushingAndroidKey=this.view.win.requestAnimationFrame(()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&ok(this.dom,e.key,e.keyCode))})),(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&UO(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new xj(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=Cj(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!kj(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=aN(t,e.previousSibling||e.target.previousSibling,-1),r=aN(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type==`characterData`)return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Qk)!=e.state.facet(Qk)&&(e.view.contentDOM.editContext=e.state.facet(Qk)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function aN(e,t,n){for(;t;){let r=_A.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function oN(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return GO(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function sN(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return oN(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?oN(e,n):null}var cN=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=Ej(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=B.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));kj(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:z.of(n.text.slice(l.from,l.toB).split(`
|
|
22
|
+
`))};if((H.mac||H.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:z.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);wj(e,u,B.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(NO.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Xk.of(NO.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=VO(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},U=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||sk(e.parent)||document,this.viewState=new RM(this,e.state||MD.create(e)),e.scrollTo&&e.scrollTo.is(Yk)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(eA).map(e=>new nA(e));for(let e of this.plugins)e.update(this);this.observer=new iN(this),this.inputState=new Aj(this),this.inputState.ensureHandlers(this.plugins),this.docView=new WA(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof vD?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(cM))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=lM(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(MD.phrases)!=this.state.facet(MD.phrases))return this.setState(a);i=hA.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new Jk(t.empty?t:B.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(Yk)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=dN.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(pA)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(JM)!=i.state.facet(JM)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(Bk))try{e(i)}catch(e){Zk(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Cj(this,u)&&l.force&&ok(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new RM(this,e),this.plugins=e.facet(eA).map(e=>new nA(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new WA(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(eA),n=e.state.facet(eA);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new nA(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){Zk(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0)if(lk(n||this.win))i=-1,a=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}this.updateState=1;let o=this.viewState.measure();if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let s=[];o&4||([this.measureRequests,s]=[s,this.measureRequests]);let c=s.map(e=>{try{return e.read(this)}catch(e){return Zk(this.state,e),uN}}),l=hA.create(this,this.state,[]),u=!1;l.flags|=o,t?t.flags|=o:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),u=this.docView.update(l),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(c[e]!=uN)try{let t=s[e];t.write&&t.write(c[e],this)}catch(e){Zk(this.state,e)}if(u&&this.docView.updateSelection(!0),!l.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let e=((i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-a)/this.scaleY;if((e>1||e<-1)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Bk))e(t)}get themeClasses(){return XM+` `+(this.state.facet(YM)?QM:ZM)+` `+this.state.facet(JM)}updateAttrs(){let e=fN(this,rA,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Qk)?`true`:`false`,class:`cm-content`,style:`${H.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),fN(this,iA,t);let n=this.observer.ignore(()=>{let n=kO(this.contentDOM,this.contentAttrs,t),r=kO(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(pA);let t=this.state.facet(e.cspNonce);iO.mount(this.root,this.styleModules.concat(tN).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return fj(this,e,sj(this,e,t,n))}moveByGroup(e,t){return fj(this,e,sj(this,e,t,t=>cj(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return B.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return oj(this,e,t,n)}moveVertically(e,t,n){return fj(this,e,lj(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=mj(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),mj(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r),a=i[Ck.find(i,e-r.from,-1,t)];return XO(n,a.dir==pk.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Gk)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>lN)return Mk(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||wk(r.isolates,n=uA(this,e))))return r.order;n||=uA(this,e);let r=jk(e.text,t,n);return this.bidiCache.push(new dN(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||H.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{rk(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Yk.of(new Jk(typeof e==`number`?B.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Yk.of(new Jk(B.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return tA.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return tA.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=iO.newName(),r=[JM.of(n),pA.of(eN(`.${n}`,e))];return t&&t.dark&&r.push(YM.of(!0)),r}static baseTheme(e){return $E.lowest(pA.of(eN(`.`+XM,e,$M)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&_A.get(t)||_A.get(e))?.root?.view||null}};U.styleModule=pA,U.inputHandler=Vk,U.clipboardInputFilter=Uk,U.clipboardOutputFilter=Wk,U.scrollHandler=qk,U.focusChangeEffect=Hk,U.perLineTextDirection=Gk,U.exceptionSink=zk,U.updateListener=Bk,U.editable=Qk,U.mouseSelectionStyle=Rk,U.dragMovesSelection=Lk,U.clickAddsSelectionRange=Ik,U.decorations=aA,U.blockWrappers=oA,U.outerDecorations=sA,U.atomicRanges=cA,U.bidiIsolatedRanges=lA,U.cursorScrollMargin=V.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),U.scrollMargins=dA,U.darkTheme=YM,U.cspNonce=V.define({combine:e=>e.length?e[0]:``}),U.contentAttributes=iA,U.editorAttributes=rA,U.lineWrapping=U.contentAttributes.of({class:`cm-lineWrapping`}),U.announce=_D.define();var lN=4096,uN={},dN=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:pk.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function fN(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&TO(a,n)}return n}var pN=H.mac?`mac`:H.windows?`win`:H.linux?`linux`:`key`;function mN(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function hN(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var gN=$E.default(U.domEventHandlers({keydown(e,t){return wN(yN(t.state),e,t,`editor`)}})),_N=V.define({enables:gN}),vN=new WeakMap;function yN(e){let t=e.facet(_N),n=vN.get(t);return n||vN.set(t,n=SN(t.reduce((e,t)=>e.concat(t),[]))),n}var bN=null,xN=4e3;function SN(e,t=pN){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>mN(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=bN={view:t,prefix:n,scope:e};return setTimeout(()=>{bN==r&&(bN=null)},xN),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,CN))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var CN=null;function wN(e,t,n,r){CN=t;let i=pO(t),a=AE(kE(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;bN&&bN.view==n&&bN.scope==r&&(o=bN.prefix+` `,Fj.indexOf(t.keyCode)<0&&(c=!0,bN=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+hN(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(H.windows&&t.ctrlKey&&t.altKey)&&!(H.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=sO[t.keyCode])&&p!=i?(d(f[o+hN(p,t,!0)])||t.shiftKey&&(m=cO[t.keyCode])!=i&&m!=p&&d(f[o+hN(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+hN(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),CN=null,s}/x/.unicode;var TN=class extends PD{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};TN.prototype.elementClass=``,TN.prototype.toDOM=void 0,TN.prototype.mapMode=ME.TrackBefore,TN.prototype.startSide=TN.prototype.endSide=-1,TN.prototype.point=!0;var EN=V.define(),DN=V.define(),ON=V.define(),kN=V.define({combine:e=>e.some(e=>e)});function AN(e){let t=[jN];return e&&e.fixed===!1&&t.push(kN.of(!0)),t}var jN=tA.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(ON).map(t=>new FN(e,t)),this.fixed=!e.state.facet(kN);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(kN)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=zD.iter(this.view.state.facet(EN),this.view.viewport.from),r=[],i=this.gutters.map(e=>new PN(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==MO.Text&&t){NN(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==MO.Text){NN(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(ON),n=e.state.facet(ON),r=e.docChanged||e.heightChanged||e.viewportChanged||!zD.eq(e.startState.facet(EN),e.state.facet(EN),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new FN(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>U.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==pk.LTR?{left:r,right:i}:{right:r,left:i}})});function MN(e){return Array.isArray(e)?e:[e]}function NN(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var PN=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=zD.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new IN(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];NN(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(DN)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},FN=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=MN(t.markers(e)),t.initialSpacer&&(this.spacer=new IN(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=MN(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!zD.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},IN=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),LN(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function LN(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var RN=V.define(),zN=V.define(),BN=V.define({combine(e){return ND(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),VN=class extends TN{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function HN(e,t){return e.state.facet(BN).formatNumber(t,e.state)}var UN=ON.compute([BN],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(RN)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new VN(HN(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(zN)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(BN)!=e.state.facet(BN),initialSpacer(e){return new VN(HN(e,GN(e.state.doc.lines)))},updateSpacer(e,t){let n=HN(t.view,GN(t.view.state.doc.lines));return n==e.number?e:new VN(n)},domEventHandlers:e.facet(BN).domEventHandlers,side:`before`}));function WN(e={}){return[BN.of(e),AN(),UN]}function GN(e){let t=9;for(;t<e;)t=t*10+9;return t}var KN=new class extends TN{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},qN=EN.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(KN.range(i)))}return zD.of(t)});function JN(){return qN}var YN=1024,XN=0,ZN=class{constructor(e,t){this.from=e,this.to=t}},W=class{constructor(e={}){this.id=XN++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=eP.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};W.closedBy=new W({deserialize:e=>e.split(` `)}),W.openedBy=new W({deserialize:e=>e.split(` `)}),W.group=new W({deserialize:e=>e.split(` `)}),W.isolate=new W({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),W.contextHash=new W({perNode:!0}),W.lookAhead=new W({perNode:!0}),W.mounted=new W({perNode:!0});var QN=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[W.mounted.id]}},$N=Object.create(null),eP=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):$N,r=!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(W.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(W.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};eP.none=new eP(``,Object.create(null),0,8);var tP=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new eP(e.name,r,e.id,e.flags):e)}return new e(n)}},nP=new WeakMap,rP=new WeakMap,iP;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(iP||={});var aP=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=QN.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new yP(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new yP(nP.get(this)||this.topNode);return r.moveTo(e,t),nP.set(this,r._tree),r}get topNode(){return new dP(this,0,0,null)}resolve(e,t=0){let n=lP(nP.get(this)||this.topNode,e,t,!1);return nP.set(this,n),n}resolveInner(e,t=0){let n=lP(rP.get(this)||this.topNode,e,t,!0);return rP.set(this,n),n}resolveStack(e,t=0){return vP(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&iP.IncludeAnonymous)>0;for(let e=this.cursor(a|iP.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:wP(eP.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(eP.none,t,n,r)))}static build(e){return xP(e)}};aP.empty=new aP(eP.none,[],[],0);var oP=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},sP=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return eP.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(cP(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function cP(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function lP(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof dP&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:iP.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof dP&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var uP=class{cursor(e=0){return new yP(this,e)}getChild(e,t=null,n=null){let r=fP(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return fP(this,e,t,n)}resolve(e,t=0){return lP(this,e,t,!1)}resolveInner(e,t=0){return lP(this,e,t,!0)}matchContext(e){return pP(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},dP=class e extends uP{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(!(!(a&iP.EnterBracketed&&l instanceof aP&&(d=QN.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length)&&!cP(i,r,u,u+l.length))){if(l instanceof sP){if(a&iP.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new hP(new mP(o,l,t,u),null,e)}else if(a&iP.IncludeAnonymous||!l.type.isAnonymous||bP(l)){let s;if(!(a&iP.IgnoreMounts)&&(s=QN.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&iP.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&iP.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&iP.IgnoreOverlays)&&(i=QN.get(this._tree))&&i.overlay){let a=t-this.from,o=r&iP.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function fP(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function pP(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var mP=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},hP=class e extends uP{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&iP.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new aP(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function gP(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof dP&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new _P(i,n)}var _P=class{constructor(e,t){this.heads=e,this.node=t}get next(){return gP(this.heads)}};function vP(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof dP?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=QN.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new dP(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(lP(o,t,n,!1))}}return i?gP(i):r}var yP=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~iP.EnterBracketed,e instanceof dP)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof dP?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&iP.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&iP.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&iP.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else ({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&iP.IncludeAnonymous||e instanceof sP||!e.type.isAnonymous||bP(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new hP(this.buffer,t,this.stack[e]);return this.bufferNode=new hP(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return pP(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return pP(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function bP(e){return e.children.some(e=>e instanceof sP||!e.type.isAnonymous||bP(e))}function xP(e){let{buffer:t,nodeSet:n,maxBufferLength:r=YN,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new oP(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,ee=l,te=c;if(w<0)if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}else if(w==-3){c=x;return}else if(w==-4){l=x;return}else throw RangeError(`Unrecognized record size: ${w}`);let T=s[x],ne,re,ie=S-e;if(C-S<=r&&(re=h(o.pos-t,y))){let t=new Uint16Array(re.size-re.skip),r=o.pos-re.size,i=t.length;for(;o.pos>r;)i=g(re.start,t,i);ne=new sP(t,C-re.start,n),ie=re.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,ee,te),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,ee,te),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(T,te);ne=wP(T,t,n,0,t.length,0,C-S,e,e)}else ne=m(T,t,n,C-S,ee-C,te)}_.push(ne),v.push(ie)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new sP(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof aP){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(W.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[W.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[W.lookAhead,i];o=o?[e].concat(o):[e]}return new aP(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0)if(n.size==-3||n.size==-4)d+=4;else break scan;else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new aP(s[e.topID],_.reverse(),v.reverse(),y)}var SP=new WeakMap;function CP(e,t){if(!e.isAnonymous||t instanceof sP||t.type!=e)return 1;let n=SP.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof aP)){n=1;break}n+=CP(e,r)}SP.set(t,n)}return n}function wP(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=CP(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=CP(e,t[s]);for(s++;s<i;s++){let n=CP(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(wP(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var TP=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof hP?this.setBuffer(e.context.buffer,e.index,t):e instanceof dP&&this.map.set(e.tree,t)}get(e){return e instanceof hP?this.getBuffer(e.context.buffer,e.index):e instanceof dP?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},EP=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},DP=class{startParse(e,t,n){return typeof e==`string`&&(e=new OP(e)),n=n?n.length?n.map(e=>new ZN(e.from,e.to)):[new ZN(0,0)]:[new ZN(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},OP=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new W({perNode:!0});var kP=0,AP=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=kP++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new MP(e);return e=>e.modified.indexOf(t)>-1?e:MP.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},jP=0,MP=class e{constructor(e){this.name=e,this.instances=[],this.id=jP++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&NP(n,e.modified));if(r)return r;let i=[],a=new AP(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=PP(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function NP(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function PP(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function FP(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new LP(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return IP.add(t)}var IP=new W({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new LP(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),LP=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};LP.empty=new LP([],2,null);function RP(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function zP(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function BP(e,t,n,r=0,i=e.length){let a=new VP(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var VP=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=HP(e)||LP.empty,u=zP(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(W.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function HP(e){let t=e.type.prop(IP);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var G=AP.define,UP=G(),WP=G(),GP=G(WP),KP=G(WP),qP=G(),JP=G(qP),YP=G(qP),XP=G(),ZP=G(XP),QP=G(),$P=G(),eF=G(),tF=G(eF),nF=G(),K={comment:UP,lineComment:G(UP),blockComment:G(UP),docComment:G(UP),name:WP,variableName:G(WP),typeName:GP,tagName:G(GP),propertyName:KP,attributeName:G(KP),className:G(WP),labelName:G(WP),namespace:G(WP),macroName:G(WP),literal:qP,string:JP,docString:G(JP),character:G(JP),attributeValue:G(JP),number:YP,integer:G(YP),float:G(YP),bool:G(qP),regexp:G(qP),escape:G(qP),color:G(qP),url:G(qP),keyword:QP,self:G(QP),null:G(QP),atom:G(QP),unit:G(QP),modifier:G(QP),operatorKeyword:G(QP),controlKeyword:G(QP),definitionKeyword:G(QP),moduleKeyword:G(QP),operator:$P,derefOperator:G($P),arithmeticOperator:G($P),logicOperator:G($P),bitwiseOperator:G($P),compareOperator:G($P),updateOperator:G($P),definitionOperator:G($P),typeOperator:G($P),controlOperator:G($P),punctuation:eF,separator:G(eF),bracket:tF,angleBracket:G(tF),squareBracket:G(tF),paren:G(tF),brace:G(tF),content:XP,heading:ZP,heading1:G(ZP),heading2:G(ZP),heading3:G(ZP),heading4:G(ZP),heading5:G(ZP),heading6:G(ZP),contentSeparator:G(XP),list:G(XP),quote:G(XP),emphasis:G(XP),strong:G(XP),link:G(XP),monospace:G(XP),strikethrough:G(XP),inserted:G(),deleted:G(),changed:G(),invalid:G(),meta:nF,documentMeta:G(nF),annotation:G(nF),processingInstruction:G(nF),definition:AP.defineModifier(`definition`),constant:AP.defineModifier(`constant`),function:AP.defineModifier(`function`),standard:AP.defineModifier(`standard`),local:AP.defineModifier(`local`),special:AP.defineModifier(`special`)};for(let e in K){let t=K[e];t instanceof AP&&(t.name=e)}RP([{tag:K.link,class:`tok-link`},{tag:K.heading,class:`tok-heading`},{tag:K.emphasis,class:`tok-emphasis`},{tag:K.strong,class:`tok-strong`},{tag:K.keyword,class:`tok-keyword`},{tag:K.atom,class:`tok-atom`},{tag:K.bool,class:`tok-bool`},{tag:K.url,class:`tok-url`},{tag:K.labelName,class:`tok-labelName`},{tag:K.inserted,class:`tok-inserted`},{tag:K.deleted,class:`tok-deleted`},{tag:K.literal,class:`tok-literal`},{tag:K.string,class:`tok-string`},{tag:K.number,class:`tok-number`},{tag:[K.regexp,K.escape,K.special(K.string)],class:`tok-string2`},{tag:K.variableName,class:`tok-variableName`},{tag:K.local(K.variableName),class:`tok-variableName tok-local`},{tag:K.definition(K.variableName),class:`tok-variableName tok-definition`},{tag:K.special(K.variableName),class:`tok-variableName2`},{tag:K.definition(K.propertyName),class:`tok-propertyName tok-definition`},{tag:K.typeName,class:`tok-typeName`},{tag:K.namespace,class:`tok-namespace`},{tag:K.className,class:`tok-className`},{tag:K.macroName,class:`tok-macroName`},{tag:K.propertyName,class:`tok-propertyName`},{tag:K.operator,class:`tok-operator`},{tag:K.comment,class:`tok-comment`},{tag:K.meta,class:`tok-meta`},{tag:K.invalid,class:`tok-invalid`},{tag:K.punctuation,class:`tok-punctuation`}]);var rF=new W;function iF(e){return V.define({combine:e?t=>t.concat(e):void 0})}var aF=new W,oF=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,MD.prototype.hasOwnProperty(`tree`)||Object.defineProperty(MD.prototype,`tree`,{get(){return lF(this)}}),this.parser=t,this.extension=[vF.of(this),MD.languageData.of((e,t,n)=>{let r=sF(e,t,n),i=r.type.prop(rF);if(!i)return[];let a=e.facet(i),o=r.type.prop(aF);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return sF(e,t,n).type.prop(rF)==this.data}findRegions(e){let t=e.facet(vF);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(rF)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(W.mounted);if(i){if(i.tree.prop(rF)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof aP&&r(i,e.positions[n]+t)}};return r(lF(e),0),n}get allowsNesting(){return!0}};oF.setState=_D.define();function sF(e,t,n){let r=e.facet(vF),i=lF(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,iP.ExcludeBuffers|iP.EnterBracketed))e.type.isTop&&(i=e);return i}var cF=class e extends oF{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=iF(t.languageData);return new e(n,t.parser.configure({props:[rF.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function lF(e){let t=e.field(oF.state,!1);return t?t.tree:aP.empty}var uF=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},dF=null,fF=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],aP.empty,0,r,[],null)}startParse(){return this.parser.startParse(new uF(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=aP.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(EP.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(EP.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=dF;dF=this;try{return e()}finally{dF=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=pF(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=EP.applyChanges(r,e),i=aP.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=pF(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends DP{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=dF;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new aP(eP.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return dF}};function pF(e,t,n){return EP.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var mF=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=fF.create(t.facet(vF).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};oF.state=XE.define({create:mF.init,update(e,t){for(let e of t.effects)if(e.is(oF.setState))return e.value;return t.startState.facet(vF)==t.state.facet(vF)?e.apply(t):mF.init(t.state)}});var hF=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(hF=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var gF=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,_F=tA.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(oF.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(oF.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=hF(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(oF.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!gF?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>gF&&gF()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:oF.setState.of(new mF(i.context))})),this.chunkBudget>0&&!(s&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>Zk(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),vF=V.define({combine(e){return e.length?e[0]:null},enables:e=>[oF.state,_F,U.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),yF=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},bF=V.define(),xF=V.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function SF(e){let t=e.facet(xF);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function CF(e,t){let n=``,r=e.tabSize,i=e.facet(xF)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function wF(e,t){e instanceof MD&&(e=new TF(e));for(let n of e.state.facet(bF)){let r=n(e,t);if(r!==void 0)return r}let n=lF(e.state);return n.length>=t?DF(e,n,t):null}var TF=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=SF(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return QD(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},EF=new W;function DF(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return OF(r,e,n)}function OF(e,t,n){for(let r=e;r;r=r.next){let e=AF(r.node);if(e)return e(MF.create(t,n,r))}return 0}function kF(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function AF(e){let t=e.type.prop(EF);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(W.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>IF(e,!0,1,void 0,n&&!kF(e)?t.from:void 0)}return e.parent==null?jF:null}function jF(){return 0}var MF=class e extends TF{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(NF(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return OF(this.context.next,this.base,this.pos)}};function NF(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function PF(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function FF({closing:e,align:t=!0,units:n=1}){return r=>IF(r,t,n,e)}function IF(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?PF(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var LF=e=>e.baseIndent;function RF({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var zF=new W;function BF(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}var VF=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=iO.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof oF?e=>e.prop(rF)==a.data:a?e=>e==a:void 0,this.style=RP(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new iO(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},HF=V.define(),UF=V.define({combine(e){return e.length?[e[0]]:null}});function WF(e){let t=e.facet(HF);return t.length?t:e.facet(UF)}function GF(e,t){let n=[qF],r;return e instanceof VF&&(e.module&&n.push(U.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(UF.of(e)):r?n.push(HF.computeN([U.darkTheme],t=>t.facet(U.darkTheme)==(r==`dark`)?[e]:[])):n.push(HF.of(e)),n}var KF=class{constructor(e){this.markCache=Object.create(null),this.tree=lF(e.state),this.decorations=this.buildDeco(e,WF(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=lF(e.state),n=WF(e.state),r=n!=WF(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return NO.none;let n=new VD;for(let{from:r,to:i}of e.visibleRanges)BP(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=NO.mark({class:r})))},r,i);return n.finish()}},qF=$E.high(tA.fromClass(KF,{decorations:e=>e.decorations}));K.meta,K.link,K.heading,K.emphasis,K.strong,K.strikethrough,K.keyword,K.atom,K.bool,K.url,K.contentSeparator,K.labelName,K.literal,K.inserted,K.string,K.deleted,K.regexp,K.escape,K.string,K.variableName,K.variableName,K.typeName,K.namespace,K.className,K.variableName,K.macroName,K.propertyName,K.comment,K.invalid;var JF=1e4,YF=`()[]{}`,XF=new W;function ZF(e,t,n){let r=e.prop(t<0?W.openedBy:W.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function QF(e){let t=e.type.prop(XF);return t?t(e.node):e}function $F(e,t,n,r={}){let i=r.maxScanDistance||JF,a=r.brackets||YF,o=lF(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=ZF(r.type,n,a);if(i&&r.from<r.to){let o=QF(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return eI(e,t,n,r,o,i,a)}}return tI(e,t,n,o,s.type,i,a)}function eI(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=QF(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(ZF(u.type,n,o))l++;else if(ZF(u.type,-n,o)){if(l==0){let e=QF(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function tI(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i))if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var nI=Object.create(null),rI=[eP.none],iI=[],aI=Object.create(null),oI=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])oI[e]=cI(nI,t);function sI(e,t){iI.indexOf(e)>-1||(iI.push(e),console.warn(t))}function cI(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||K[n];r?typeof r==`function`?t.length?t=t.map(r):sI(n,`Modifier ${n} used at start of tag`):t.length?sI(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:sI(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=aI[i];if(a)return a.id;let o=aI[i]=eP.define({id:rI.length,name:r,props:[FP({[r]:n})]});return rI.push(o),o.id}pk.RTL,pk.LTR;var lI=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=mI(e.state,n.from);return r.line?dI(e):r.block?pI(e):!1};function uI(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var dI=uI(yI,0),fI=uI(vI,0),pI=uI((e,t)=>vI(e,t,_I(t)),0);function mI(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var hI=50;function gI(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-hI,r),o=e.sliceDoc(i,i+hI),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*hI?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+hI),d=e.sliceDoc(i-hI,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function _I(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function vI(e,t,n=t.selection.ranges){let r=n.map(e=>mI(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>gI(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function yI(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=mI(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var bI=mD.define(),xI=mD.define(),SI=V.define(),CI=V.define({combine(e){return ND(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),wI=XE.define({create(){return UI.empty},update(e,t){let n=t.state.facet(CI),r=t.annotation(bI);if(r){let i=jI.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?MI(o,o.length,n.minDepth,i):RI(o,t.startState.selection),new UI(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(xI);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(vD.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=jI.fromTransaction(t),o=t.annotation(vD.time),s=t.annotation(vD.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new UI(e.done.map(jI.fromJSON),e.undone.map(jI.fromJSON))}});function TI(e={}){return[wI,CI.of(e),U.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?DI:e.inputType==`historyRedo`?OI:null;return n?(e.preventDefault(),n(t)):!1}})]}function EI(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(wI,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var DI=EI(0,!1),OI=EI(1,!1),kI=EI(0,!0),AI=EI(1,!0),jI=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&PE.fromJSON(t.changes),[],t.mapped&&NE.fromJSON(t.mapped),t.startSelection&&B.fromJSON(t.startSelection),t.selectionsAfter.map(B.fromJSON))}static fromTransaction(t,n){let r=II;for(let e of t.startState.facet(SI)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,II)}static selection(t){return new e(void 0,II,void 0,void 0,t)}};function MI(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function NI(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function PI(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function FI(e,t){return e.length?t.length?e.concat(t):e:t}var II=[],LI=200;function RI(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-LI));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),MI(e,e.length-1,1e9,n.setSelAfter(r)))}else return[jI.selection([t])]}function zI(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function BI(e,t){if(!e.length)return e;let n=e.length,r=II;for(;n;){let i=VI(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[jI.selection(r)]:II}function VI(e,t,n){let r=FI(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):II,n);if(!e.changes)return jI.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new jI(i,_D.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var HI=/^(input\.type|delete)($|\.)/,UI=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||HI.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,NI(s.changes,t.changes))||r==`input.type.compose`)?MI(o,o.length-1,i.minDepth,new jI(t.changes.compose(s.changes),FI(_D.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,II)):MI(o,o.length,i.minDepth,t),new e(o,II,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:II;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&PI(a[a.length-1],t)?this:new e(RI(this.done,t),this.undone,n,r)}addMapping(t){return new e(BI(this.done,t),BI(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:bI.of({side:e,rest:zI(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?II:r.slice(0,r.length-1);return i.mapped&&(n=BI(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:bI.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};UI.empty=new UI(II,II);var WI=[{key:`Mod-z`,run:DI,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:OI,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:OI,preventDefault:!0},{key:`Mod-u`,run:kI,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:AI,preventDefault:!0}];function GI(e,t){return B.create(e.ranges.map(t),e.mainIndex)}function KI(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function qI({state:e,dispatch:t},n){let r=GI(e.selection,n);return r.eq(e.selection,!0)?!1:(t(KI(e,r)),!0)}function JI(e,t){return B.cursor(t?e.to:e.from)}function YI(e,t){return qI(e,n=>n.empty?e.moveByChar(n,t):JI(n,t))}function XI(e){return e.textDirectionAt(e.state.selection.main.head)==pk.LTR}var ZI=e=>YI(e,!XI(e)),QI=e=>YI(e,XI(e));function $I(e,t){return qI(e,n=>n.empty?e.moveByGroup(n,t):JI(n,t))}var eL=e=>$I(e,!XI(e)),tL=e=>$I(e,XI(e));typeof Intl<`u`&&Intl.Segmenter;function nL(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function rL(e,t,n){let r=lF(e).resolveInner(t.head),i=n?W.closedBy:W.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;nL(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?$F(e,r.from,1):$F(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,B.cursor(s,n?-1:1)}var iL=e=>qI(e,t=>rL(e.state,t,!XI(e))),aL=e=>qI(e,t=>rL(e.state,t,XI(e)));function oL(e,t){return qI(e,n=>{if(!n.empty)return JI(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var sL=e=>oL(e,!1),cL=e=>oL(e,!0);function lL(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(U.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function uL(e,t){let n=lL(e),{state:r}=e,i=GI(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):JI(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=U.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(KI(r,i),{effects:a}),!0}var dL=e=>uL(e,!1),fL=e=>uL(e,!0);function pL(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=B.cursor(r.from+n))}return i}var mL=e=>qI(e,t=>pL(e,t,!0)),hL=e=>qI(e,t=>pL(e,t,!1)),gL=e=>qI(e,t=>pL(e,t,!XI(e))),_L=e=>qI(e,t=>pL(e,t,XI(e))),vL=e=>qI(e,t=>B.cursor(e.lineBlockAt(t.head).from,1)),yL=e=>qI(e,t=>B.cursor(e.lineBlockAt(t.head).to,-1));function bL(e,t,n){let r=!1,i=GI(e.selection,t=>{let i=$F(e,t.head,-1)||$F(e,t.head,1)||t.head>0&&$F(e,t.head-1,1)||t.head<e.doc.length&&$F(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?B.range(t.anchor,a):B.cursor(a)});return r?(t(KI(e,i)),!0):!1}var xL=({state:e,dispatch:t})=>bL(e,t,!1);function SL(e,t){let n=GI(e.state.selection,e=>{let n=t(e);return B.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return n.eq(e.state.selection)?!1:(e.dispatch(KI(e.state,n)),!0)}function CL(e,t){return SL(e,n=>e.moveByChar(n,t))}var wL=e=>CL(e,!XI(e)),TL=e=>CL(e,XI(e));function EL(e,t){return SL(e,n=>e.moveByGroup(n,t))}var DL=e=>EL(e,!XI(e)),OL=e=>EL(e,XI(e)),kL=e=>SL(e,t=>rL(e.state,t,!XI(e))),AL=e=>SL(e,t=>rL(e.state,t,XI(e)));function jL(e,t){return SL(e,n=>e.moveVertically(n,t))}var ML=e=>jL(e,!1),NL=e=>jL(e,!0);function PL(e,t){return SL(e,n=>e.moveVertically(n,t,lL(e).height))}var FL=e=>PL(e,!1),IL=e=>PL(e,!0),LL=e=>SL(e,t=>pL(e,t,!0)),RL=e=>SL(e,t=>pL(e,t,!1)),zL=e=>SL(e,t=>pL(e,t,!XI(e))),BL=e=>SL(e,t=>pL(e,t,XI(e))),VL=e=>SL(e,t=>B.cursor(e.lineBlockAt(t.head).from)),HL=e=>SL(e,t=>B.cursor(e.lineBlockAt(t.head).to)),UL=({state:e,dispatch:t})=>(t(KI(e,{anchor:0})),!0),WL=({state:e,dispatch:t})=>(t(KI(e,{anchor:e.doc.length})),!0),GL=({state:e,dispatch:t})=>(t(KI(e,{anchor:e.selection.main.anchor,head:0})),!0),KL=({state:e,dispatch:t})=>(t(KI(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),qL=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),JL=({state:e,dispatch:t})=>{let n=pR(e).map(({from:t,to:n})=>B.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:B.create(n),userEvent:`select`})),!0},YL=({state:e,dispatch:t})=>{let n=GI(e.selection,t=>{let n=lF(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return B.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(KI(e,n)),!0)};function XL(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(KI(n,B.create(i,i.length-1))),!0)}var ZL=e=>XL(e,!1),QL=e=>XL(e,!0),$L=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=B.create([n.main]):n.main.empty||(r=B.create([B.cursor(n.main.head)])),r?(t(KI(e,r)),!0):!1};function eR(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=tR(e,o,!1)):o>i&&(n=`delete.forward`,o=tR(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=tR(e,i,!1),a=tR(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:B.cursor(i,i<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?U.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function tR(e,t,n){if(e instanceof U)for(let r of e.state.facet(U.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var nR=(e,t,n)=>eR(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=QD(s,a.tabSize)%SF(a)||SF(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=EE(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=EE(o.text,c-o.from,!1,!1)+o.from);return c}),rR=e=>nR(e,!1,!0),iR=e=>nR(e,!0,!1),aR=(e,t)=>eR(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=EE(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),oR=e=>aR(e,!1),sR=e=>aR(e,!0),cR=e=>eR(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),lR=e=>eR(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),uR=e=>eR(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),dR=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:z.of([``,``])},range:B.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},fR=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:EE(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:EE(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:B.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function pR(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function mR(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of pR(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(B.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(B.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:B.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var hR=({state:e,dispatch:t})=>mR(e,t,!1),gR=({state:e,dispatch:t})=>mR(e,t,!0);function _R(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of pR(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var vR=({state:e,dispatch:t})=>_R(e,t,!1),yR=({state:e,dispatch:t})=>_R(e,t,!0),bR=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(pR(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=GI(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function xR(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=lF(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(W.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var SR=wR(!1),CR=wR(!0);function wR(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&xR(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new TF(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=wF(s,r);for(c??=QD(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,CF(t,c)];return o&&l.push(CF(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:z.of(l)},range:B.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function TR(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:B.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var ER=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new TF(e,{overrideIndentation:e=>n[e]??-1}),i=TR(e,(t,i,a)=>{let o=wF(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=CF(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},DR=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(TR(e,(t,n)=>{n.push({from:t.from,insert:e.facet(xF)})}),{userEvent:`input.indent`})),!0),OR=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(TR(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=QD(r,e.tabSize),a=0,o=CF(e,Math.max(0,i-SF(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),kR=e=>(e.setTabFocusMode(),!0),AR=[{key:`Ctrl-b`,run:ZI,shift:wL,preventDefault:!0},{key:`Ctrl-f`,run:QI,shift:TL},{key:`Ctrl-p`,run:sL,shift:ML},{key:`Ctrl-n`,run:cL,shift:NL},{key:`Ctrl-a`,run:vL,shift:VL},{key:`Ctrl-e`,run:yL,shift:HL},{key:`Ctrl-d`,run:iR},{key:`Ctrl-h`,run:rR},{key:`Ctrl-k`,run:cR},{key:`Ctrl-Alt-h`,run:oR},{key:`Ctrl-o`,run:dR},{key:`Ctrl-t`,run:fR},{key:`Ctrl-v`,run:fL}],jR=[{key:`ArrowLeft`,run:ZI,shift:wL,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:eL,shift:DL,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:gL,shift:zL,preventDefault:!0},{key:`ArrowRight`,run:QI,shift:TL,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:tL,shift:OL,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:_L,shift:BL,preventDefault:!0},{key:`ArrowUp`,run:sL,shift:ML,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:UL,shift:GL},{mac:`Ctrl-ArrowUp`,run:dL,shift:FL},{key:`ArrowDown`,run:cL,shift:NL,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:WL,shift:KL},{mac:`Ctrl-ArrowDown`,run:fL,shift:IL},{key:`PageUp`,run:dL,shift:FL},{key:`PageDown`,run:fL,shift:IL},{key:`Home`,run:hL,shift:RL,preventDefault:!0},{key:`Mod-Home`,run:UL,shift:GL},{key:`End`,run:mL,shift:LL,preventDefault:!0},{key:`Mod-End`,run:WL,shift:KL},{key:`Enter`,run:SR,shift:SR},{key:`Mod-a`,run:qL},{key:`Backspace`,run:rR,shift:rR,preventDefault:!0},{key:`Delete`,run:iR,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:oR,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:sR,preventDefault:!0},{mac:`Mod-Backspace`,run:lR,preventDefault:!0},{mac:`Mod-Delete`,run:uR,preventDefault:!0}].concat(AR.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),MR=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:iL,shift:kL},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:aL,shift:AL},{key:`Alt-ArrowUp`,run:hR},{key:`Shift-Alt-ArrowUp`,run:vR},{key:`Alt-ArrowDown`,run:gR},{key:`Shift-Alt-ArrowDown`,run:yR},{key:`Mod-Alt-ArrowUp`,run:ZL},{key:`Mod-Alt-ArrowDown`,run:QL},{key:`Escape`,run:$L},{key:`Mod-Enter`,run:CR},{key:`Alt-l`,mac:`Ctrl-l`,run:JL},{key:`Mod-i`,run:YL,preventDefault:!0},{key:`Mod-[`,run:OR},{key:`Mod-]`,run:DR},{key:`Mod-Alt-\\`,run:ER},{key:`Shift-Mod-k`,run:bR},{key:`Shift-Mod-\\`,run:xL},{key:`Mod-/`,run:lI},{key:`Alt-A`,run:fI},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:kR}].concat(jR),NR=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new PR(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new FR(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new PR(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},PR=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},FR=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3,this.state=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0)}},IR=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function LR(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var RR=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},zR=new RR,BR=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=zR,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos);this.chunk=this.pos+e.length>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=zR,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},VR=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;WR(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};VR.prototype.contextual=VR.prototype.fallback=VR.prototype.extend=!1;var HR=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?LR(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(WR(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};HR.prototype.contextual=VR.prototype.fallback=VR.prototype.extend=!1;var UR=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function WR(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||KR(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function GR(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function KR(e,t,n,r){let i=GR(n,r,t);return i<0||GR(n,r,e)<i}var qR=typeof process<`u`&&process.env&&/\bparse\b/.test(process.env.LOG),JR=null;function YR(e,t,n){let r=e.cursor(iP.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var XR=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?YR(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?YR(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof aP){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(W.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},ZR=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new RR)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new RR,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new RR,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=iz(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(iz(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction(iz(o,s+1),t,n,r))}return r}},QR=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new BR(t,r),this.tokens=new ZR(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[NR.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new XR(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&az(r);if(e)return qR&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw qR&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return qR&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=qR?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(W.contextHash)||0)==n))return e.useNode(o,r),qR&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof aP)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof aP&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),qR&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),qR&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return $R(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=qR?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),qR&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(qR&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)qR&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))qR&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),qR&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),$R(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),aP.build({buffer:IR.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(JR||=new WeakMap).get(e);return t||JR.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function $R(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var ez=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},tz=e=>e,nz=class{constructor(e){this.start=e.start,this.shift=e.shift||tz,this.reduce=e.reduce||tz,this.reuse=e.reuse||tz,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},rz=class e extends DP{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=W[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new tP(t.map((t,i)=>eP.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=YN;let a=LR(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(oz),this.states=LR(e.states,Uint32Array),this.data=LR(e.stateData),this.goto=LR(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new VR(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new QR(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=iz(n,i+2)];else if(n[i+1]==2)return iz(n,i+2);else break;if(a==t||a==0)return iz(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=iz(this.data,n+2);else break;r=t(iz(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=iz(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=oz(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new ez(e,n,r)}static deserialize(t){return new e(t)}};function iz(e,t){return e[t]|e[t+1]<<16}function az(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function oz(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var sz=316,cz=317,lz=1,uz=2,dz=3,fz=4,pz=318,mz=320,hz=321,gz=5,_z=6,vz=0,yz=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],bz=125,xz=59,Sz=47,Cz=42,wz=43,Tz=45,Ez=60,Dz=44,Oz=63,kz=46,Az=91,jz=new nz({start:!1,shift(e,t){return t==gz||t==_z||t==mz?e:t==hz},strict:!1}),Mz=new UR((e,t)=>{let{next:n}=e;(n==bz||n==-1||t.context)&&e.acceptToken(pz)},{contextual:!0,fallback:!0}),Nz=new UR((e,t)=>{let{next:n}=e,r;yz.indexOf(n)>-1||n==Sz&&((r=e.peek(1))==Sz||r==Cz)||n!=bz&&n!=xz&&n!=-1&&!t.context&&e.acceptToken(sz)},{contextual:!0}),Pz=new UR((e,t)=>{e.next==Az&&!t.context&&e.acceptToken(cz)},{contextual:!0}),Fz=new UR((e,t)=>{let{next:n}=e;if(n==wz||n==Tz){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(lz);e.acceptToken(n?lz:uz)}}else n==Oz&&e.peek(1)==kz&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(dz))},{contextual:!0});function Iz(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var Lz=new UR((e,t)=>{if(e.next!=Ez||!t.dialectEnabled(vz)||(e.advance(),e.next==Sz))return;let n=0;for(;yz.indexOf(e.next)>-1;)e.advance(),n++;if(Iz(e.next,!0)){for(e.advance(),n++;Iz(e.next,!1);)e.advance(),n++;for(;yz.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==Dz)return;for(let t=0;;t++){if(t==7){if(!Iz(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(fz,-n)}),Rz=FP({"get set async static":K.modifier,"for while do if else switch try catch finally return throw break continue default case defer":K.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":K.operatorKeyword,"let var const using function class extends":K.definitionKeyword,"import export from":K.moduleKeyword,"with debugger new":K.keyword,TemplateString:K.special(K.string),super:K.atom,BooleanLiteral:K.bool,this:K.self,null:K.null,Star:K.modifier,VariableName:K.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":K.function(K.variableName),VariableDefinition:K.definition(K.variableName),Label:K.labelName,PropertyName:K.propertyName,PrivatePropertyName:K.special(K.propertyName),"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),"FunctionDeclaration/VariableDefinition":K.function(K.definition(K.variableName)),"ClassDeclaration/VariableDefinition":K.definition(K.className),"NewExpression/VariableName":K.className,PropertyDefinition:K.definition(K.propertyName),PrivatePropertyDefinition:K.definition(K.special(K.propertyName)),UpdateOp:K.updateOperator,"LineComment Hashbang":K.lineComment,BlockComment:K.blockComment,Number:K.number,String:K.string,Escape:K.escape,ArithOp:K.arithmeticOperator,LogicOp:K.logicOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,RegExp:K.regexp,Equals:K.definitionOperator,Arrow:K.function(K.punctuation),": Spread":K.punctuation,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,"InterpolationStart InterpolationEnd":K.special(K.brace),".":K.derefOperator,", ;":K.separator,"@":K.meta,TypeName:K.typeName,TypeDefinition:K.definition(K.typeName),"type enum interface implements namespace module declare":K.definitionKeyword,"abstract global Privacy readonly override":K.modifier,"is keyof unique infer asserts":K.operatorKeyword,JSXAttributeValue:K.attributeValue,JSXText:K.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":K.angleBracket,"JSXIdentifier JSXNameSpacedName":K.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":K.attributeName,"JSXBuiltin/JSXIdentifier":K.standard(K.tagName)}),zz={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Bz={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Vz={__proto__:null,"<":193},Hz=rz.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#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3s<aQ3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:380,context:jz,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,`Expression`,-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,160,`JSXStartCloseTag`],[`closedBy`,-2,24,168,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,165,`JSXEndTag`]],propSources:[Rz],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$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`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Nz,Pz,Fz,Lz,2,3,4,5,6,7,8,9,10,11,12,13,14,Mz,new HR("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new HR(`j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~`,25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>zz[e]||-1},{term:343,get:e=>Bz[e]||-1},{term:95,get:e=>Vz[e]||-1}],tokenPrec:15201});function Uz(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Wz(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Uz(t)+Uz(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function Gz(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Wz(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Kz(e,t){return n=>{for(let t=lF(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var qz=mD.define();typeof navigator==`object`&&navigator.platform;var Jz=U.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Yz=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Xz=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,ME.TrackDel),r=t.mapPos(this.to,1,ME.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Zz=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(xF);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Xz(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1,c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Yz(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Qz=NO.widget({widget:new class extends jO{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),$z=NO.mark({class:`cm-snippetField`}),eB=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=NO.set(e.map(e=>(e.from==e.to?Qz:$z).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},tB=_D.define({map(e,t){return e&&e.map(t)}}),nB=_D.define(),rB=XE.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(tB))return n.value;if(n.is(nB)&&e)return new eB(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>U.decorations.from(e,e=>e?e.deco:NO.none)});function iB(e,t){return B.create(e.filter(e=>e.field==t).map(e=>B.range(e.from,e.to)))}function aB(e){let t=Zz.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:z.of(a)},scrollIntoView:!0,annotations:n?[qz.of(n),vD.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=iB(o,0)),o.some(e=>e.field>0)){let t=new eB(o,0),n=c.effects=[tB.of(t)];e.state.field(rB,!1)===void 0&&n.push(_D.appendConfig.of([rB,lB,dB,Jz]))}e.dispatch(e.state.update(c))}}function oB(e){return({state:t,dispatch:n})=>{let r=t.field(rB,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:iB(r.ranges,i),effects:tB.of(a?null:new eB(r.ranges,i)),scrollIntoView:!0})),!0}}var sB=[{key:`Tab`,run:oB(1),shift:oB(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(rB,!1)?(t(e.update({effects:tB.of(null)})),!0):!1}],cB=V.define({combine(e){return e.length?e[0]:sB}}),lB=$E.highest(_N.compute([cB],e=>e.facet(cB)));function uB(e,t){return{...t,apply:aB(e)}}var dB=U.domEventHandlers({mousedown(e,t){let n=t.state.field(rB,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:iB(n.ranges,i.field),effects:tB.of(n.ranges.some(e=>e.field>i.field)?new eB(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),fB=new class extends PD{};fB.startSide=1,fB.endSide=-1,typeof navigator==`object`&&navigator.userAgent;var pB=[uB("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),uB("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),uB("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),uB(`do {
|
|
23
|
+
\${}
|
|
24
|
+
} while (\${})`,{label:`do`,detail:`loop`,type:`keyword`}),uB(`while (\${}) {
|
|
25
|
+
\${}
|
|
26
|
+
}`,{label:`while`,detail:`loop`,type:`keyword`}),uB(`try {
|
|
27
|
+
\${}
|
|
28
|
+
} catch (\${error}) {
|
|
29
|
+
\${}
|
|
30
|
+
}`,{label:`try`,detail:`/ catch block`,type:`keyword`}),uB(`if (\${}) {
|
|
31
|
+
\${}
|
|
32
|
+
}`,{label:`if`,detail:`block`,type:`keyword`}),uB(`if (\${}) {
|
|
33
|
+
\${}
|
|
34
|
+
} else {
|
|
35
|
+
\${}
|
|
36
|
+
}`,{label:`if`,detail:`/ else block`,type:`keyword`}),uB(`class \${name} {
|
|
37
|
+
constructor(\${params}) {
|
|
38
|
+
\${}
|
|
39
|
+
}
|
|
40
|
+
}`,{label:`class`,detail:`definition`,type:`keyword`}),uB('import {${names}} from "${module}"\n${}',{label:`import`,detail:`named`,type:`keyword`}),uB('import ${name} from "${module}"\n${}',{label:`import`,detail:`default`,type:`keyword`})],mB=pB.concat([uB(`interface \${name} {
|
|
41
|
+
\${}
|
|
42
|
+
}`,{label:`interface`,detail:`definition`,type:`keyword`}),uB("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),uB(`enum \${name} {
|
|
43
|
+
\${}
|
|
44
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),hB=new TP,gB=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function _B(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var vB=[`FunctionDeclaration`],yB={FunctionDeclaration:_B(`function`),ClassDeclaration:_B(`class`),ClassExpression:()=>!0,EnumDeclaration:_B(`constant`),TypeAliasDeclaration:_B(`type`),NamespaceDeclaration:_B(`namespace`),VariableDefinition(e,t){e.matchContext(vB)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function bB(e,t){let n=hB.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(iP.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=yB[t.name];if(e&&e(t,a)||gB.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of bB(e,t.node))r.push(n);return!1}}),hB.set(t,r),r}var xB=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,SB=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function CB(e){let t=lF(e.state).resolveInner(e.pos,-1);if(SB.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&xB.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)gB.has(n.name)&&(r=r.concat(bB(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:xB}}var wB=cF.define({name:`javascript`,parser:Hz.configure({props:[EF.add({IfStatement:RF({except:/^\s*({|else\b)/}),TryStatement:RF({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:LF,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:FF({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":RF({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),zF.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":BF,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),TB={test:e=>/^JSX/.test(e.name),facet:iF({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},EB=wB.configure({dialect:`ts`},`typescript`),DB=wB.configure({dialect:`jsx`,props:[aF.add(e=>e.isTop?[TB]:void 0)]}),OB=wB.configure({dialect:`jsx ts`,props:[aF.add(e=>e.isTop?[TB]:void 0)]},`typescript`),kB=e=>({label:e,type:`keyword`}),AB=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(kB),jB=AB.concat([`declare`,`implements`,`private`,`protected`,`public`].map(kB));function MB(e={}){let t=e.jsx?e.typescript?OB:DB:e.typescript?EB:wB,n=e.typescript?mB.concat(jB):pB.concat(AB);return new yF(t,[wB.data.of({autocomplete:Kz(SB,Gz(n))}),wB.data.of({autocomplete:CB}),e.jsx?IB:[]])}function NB(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function PB(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var FB=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),IB=U.inputHandler.of((e,t,n,r,i)=>{if((FB?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!wB.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=lF(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=PB(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:B.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=NB(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=PB(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),LB=`#e5c07b`,RB=`#e06c75`,zB=`#56b6c2`,BB=`#ffffff`,VB=`#abb2bf`,HB=`#7d8799`,UB=`#61afef`,WB=`#98c379`,GB=`#d19a66`,KB=`#c678dd`,qB=`#21252b`,JB=`#2c313a`,YB=`#282c34`,XB=`#353a42`,ZB=`#3E4451`,QB=`#528bff`,$B=[U.theme({"&":{color:VB,backgroundColor:YB},".cm-content":{caretColor:QB},".cm-cursor, .cm-dropCursor":{borderLeftColor:QB},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ZB},".cm-panels":{backgroundColor:qB,color:VB},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:YB,color:HB,border:`none`},".cm-activeLineGutter":{backgroundColor:JB},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:XB},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:XB,borderBottomColor:XB},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:JB,color:VB}}},{dark:!0}),GF(VF.define([{tag:K.keyword,color:KB},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:RB},{tag:[K.function(K.variableName),K.labelName],color:UB},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:GB},{tag:[K.definition(K.name),K.separator],color:VB},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:LB},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:zB},{tag:[K.meta,K.comment],color:HB},{tag:K.strong,fontWeight:`bold`},{tag:K.emphasis,fontStyle:`italic`},{tag:K.strikethrough,textDecoration:`line-through`},{tag:K.link,color:HB,textDecoration:`underline`},{tag:K.heading,fontWeight:`bold`,color:RB},{tag:[K.atom,K.bool,K.special(K.variableName)],color:GB},{tag:[K.processingInstruction,K.string,K.inserted],color:WB},{tag:K.invalid,color:BB}]))],eV={class:`w-full`},tV=(0,t.defineComponent)({__name:`JsCodeEditor`,props:{modelValue:{},height:{}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(null),o=null,s=!1;function c(e){return MD.create({doc:e,extensions:[WN(),JN(),TI(),_N.of([...MR,...WI]),MB({typescript:!1,jsx:!1}),$B,U.updateListener.of(e=>{e.docChanged&&(s||i(`update:modelValue`,e.state.doc.toString()))}),U.theme({"&":{borderRadius:`10px`,overflow:`hidden`,border:`1px solid rgba(120, 120, 120, 0.25)`},".cm-content":{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,fontSize:`12px`,lineHeight:`1.55`},".cm-scroller":{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`}})]})}return(0,t.onMounted)(()=>{if(!a.value)return;o=new U({state:c(r.modelValue??``),parent:a.value});let e=Math.max(160,Math.min(720,Math.round(r.height??280)));o.dom.style.height=`${e}px`}),(0,t.onBeforeUnmount)(()=>{o?.destroy(),o=null}),(0,t.watch)(()=>r.modelValue,e=>{if(!o)return;let t=o.state.doc.toString();t!==e&&(s=!0,o.dispatch({changes:{from:0,to:t.length,insert:e??``}}),queueMicrotask(()=>{s=!1}))}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,eV,[(0,t.createElementVNode)(`div`,{ref_key:`hostRef`,ref:a,class:`w-full`},null,512)]))}});M(),A(),zu();var nV={key:0,class:`space-y-2`},rV={class:`flex items-start gap-3`},iV={class:`w-28 shrink-0`},aV={class:`text-[11px] font-medium text-foreground/80 mb-2`},oV={class:`flex flex-col gap-1.5`},sV={key:0,class:`text-[11px] text-muted-foreground`},cV={class:`flex-1 min-w-0`},lV={class:`flex items-center justify-between`},uV={class:`text-xs font-medium text-foreground/80`},dV={class:`space-y-1`},fV={class:`flex items-center gap-2`},pV={class:`text-sm font-medium`},mV={class:`space-y-2`},hV={class:`text-[11px] text-muted-foreground`},gV={class:`flex justify-end gap-2`},_V=(0,t.defineComponent)({__name:`BindEditor`,setup(e){let r=[{key:`onClick`,title:`Click`,placeholder:`// 可用参数:event · form 表单数据 · id 表单ID · version 版本 · $value 当前值 · $node 节点 · $name 字段名 · $get(name) 取字段值 · $slots 插槽 · attrs 节点配置 · ctx 全量合并 · axios
|
|
45
|
+
console.log('event', event)
|
|
46
|
+
console.log('form', form)
|
|
47
|
+
console.log('id', id)
|
|
48
|
+
console.log('version', version)
|
|
49
|
+
console.log('$value', $value)
|
|
50
|
+
console.log('$node', $node)
|
|
51
|
+
console.log('$name', $name)
|
|
52
|
+
console.log('$get', $get)
|
|
53
|
+
console.log('$slots', $slots)
|
|
54
|
+
console.log('attrs', attrs)
|
|
55
|
+
console.log('ctx', ctx)
|
|
56
|
+
await axios.get('/api/ping')`},{key:`onChange`,title:`Change`,placeholder:`console.log('change', event)`},{key:`onInput`,title:`Input`,placeholder:`console.log('input', event)`},{key:`onFocus`,title:`Focus`,placeholder:`console.log('focus', event)`},{key:`onBlur`,title:`Blur`,placeholder:`console.log('blur', event)`}],{hasField:i,bindEvents:a}=j(),{t:o}=k(),s=(0,t.ref)(!1),c=(0,t.ref)(`onClick`),l=(0,t.ref)(``),u=(0,t.computed)({get:()=>{let e=a.value;return!e||typeof e!=`object`?{}:e},set:e=>{a.value=e}}),d=(0,t.computed)(()=>r.filter(e=>!!u.value[e.key]));function f(e){return!!u.value[e]}function p(e,t){let n={...u.value};if(!t){delete n[e],u.value=n;return}let i=n[e];if(typeof i==`string`){u.value=n;return}if(i&&typeof i==`object`&&typeof i.__js==`string`){n[e]=i.__js,u.value=n;return}n[e]=r.find(t=>t.key===e)?.placeholder??``,u.value=n}function m(e){c.value=e;let t=u.value[e];typeof t==`string`?l.value=t:t&&typeof t==`object`&&typeof t.__js==`string`?l.value=t.__js:l.value=``,s.value=!0}function h(){let e=c.value,t={...u.value};t[e]=l.value,u.value=t,s.value=!1}return(e,a)=>(0,t.unref)(i)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,nV,[(0,t.createVNode)((0,t.unref)(n.NCard),{size:`small`,class:`rounded-xl border border-border/50`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,rV,[(0,t.createElementVNode)(`div`,iV,[(0,t.createElementVNode)(`div`,aV,(0,t.toDisplayString)((0,t.unref)(o)(`builder.bindEvents`)),1),(0,t.createElementVNode)(`div`,oV,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,e=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NButton),{key:e.key,size:`tiny`,quaternary:``,class:`justify-start`,onClick:t=>m(e.key)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)]),_:2},1032,[`onClick`]))),128)),d.value.length===0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,sV,(0,t.toDisplayString)((0,t.unref)(o)(`builder.noEvents`)),1)):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,cV,[(0,t.createElementVNode)(`div`,lV,[(0,t.createElementVNode)(`div`,uV,(0,t.toDisplayString)((0,t.unref)(o)(`builder.bindTitle`)),1),(0,t.createVNode)((0,t.unref)(n.NTag),{size:`small`,type:`info`,bordered:!1},{default:(0,t.withCtx)(()=>[...a[3]||=[(0,t.createTextVNode)(`axios`,-1)]]),_:1})]),(0,t.createVNode)((0,t.unref)(n.NDivider),{class:`!my-2`}),(0,t.createElementVNode)(`div`,dV,[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r,e=>(0,t.createVNode)(P,{key:e.key,label:e.title,value:f(e.key),"onUpdate:value":t=>p(e.key,t)},null,8,[`label`,`value`,`onUpdate:value`])),64))])])])]),_:1}),(0,t.createVNode)((0,t.unref)(n.NModal),{show:s.value,"onUpdate:show":a[2]||=e=>s.value=e,preset:`card`,class:`max-w-[860px]`},{header:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,fV,[(0,t.createElementVNode)(`span`,pV,(0,t.toDisplayString)((0,t.unref)(o)(`builder.editEvent`)),1),(0,t.createVNode)((0,t.unref)(n.NTag),{size:`small`,type:`success`,bordered:!1},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(c.value),1)]),_:1})])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,mV,[(0,t.createElementVNode)(`div`,hV,(0,t.toDisplayString)((0,t.unref)(o)(`builder.bindHint`)),1),(0,t.createVNode)(tV,{modelValue:l.value,"onUpdate:modelValue":a[0]||=e=>l.value=e,height:360},null,8,[`modelValue`]),(0,t.createElementVNode)(`div`,gV,[(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,onClick:a[1]||=e=>s.value=!1},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(o)(`common.cancel`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,onClick:h},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(o)(`common.save`)),1)]),_:1})])])]),_:1},8,[`show`])])):(0,t.createCommentVNode)(``,!0)}});A(),M(),_u(),Fu();var vV={class:`mt-4`},yV={class:`text-[11px] font-medium text-foreground/80 mb-2`},bV={class:`flex items-center gap-2`},xV={class:`text-sm font-medium`},SV={class:`space-y-2`},CV={class:`text-[11px] text-muted-foreground`},wV={class:`flex justify-end gap-2`},TV=(0,t.defineComponent)({__name:`FormEditor`,setup(e){let{t:r}=k(),{formName:i,formId:a,formVersion:o,formLabelPosition:s,formLabelWidth:c,formSubmit:l}=j(),u=(0,t.computed)({get:()=>String(c.value),set:e=>{let t=Number(e);c.value=Number.isFinite(t)?t:120}}),d=(0,t.computed)({get:()=>String(o.value),set:e=>{let t=Number(e);o.value=Number.isFinite(t)?t:o.value}}),f=(0,t.ref)(!1),p=(0,t.ref)(``);function m(){p.value=l.value,f.value=!0}function h(){l.value=p.value,f.value=!1}return(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(N,{label:(0,t.unref)(r)(`formSettings.name`),placeholder:`form`,value:(0,t.unref)(i),"onUpdate:value":o[0]||=e=>i.value=e},null,8,[`label`,`value`]),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`formSettings.id`),placeholder:`demo-form`,value:(0,t.unref)(a),"onUpdate:value":o[1]||=e=>a.value=e},null,8,[`label`,`value`]),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`formSettings.version`),placeholder:`2`,value:d.value,"onUpdate:value":o[2]||=e=>d.value=e},null,8,[`label`,`value`]),(0,t.createVNode)(Pu,{label:(0,t.unref)(r)(`formSettings.labelPosition`),value:(0,t.unref)(s),options:[{label:(0,t.unref)(r)(`formSettings.positionTop`),value:`top`},{label:(0,t.unref)(r)(`formSettings.positionLeft`),value:`left`}],"onUpdate:value":o[3]||=e=>s.value=e===`left`?`left`:`top`},null,8,[`label`,`value`,`options`]),(0,t.createVNode)(N,{label:(0,t.unref)(r)(`formSettings.labelWidth`),placeholder:`120`,value:u.value,"onUpdate:value":o[4]||=e=>u.value=e},null,8,[`label`,`value`]),(0,t.createElementVNode)(`div`,vV,[(0,t.createElementVNode)(`div`,yV,(0,t.toDisplayString)((0,t.unref)(r)(`formSettings.submit`)),1),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,quaternary:``,onClick:m,class:`w-full justify-start border border-dashed rounded-xl`},{icon:(0,t.withCtx)(()=>[...o[8]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-code-2 h-4 w-4`},null,-1)]]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(l)?(0,t.unref)(r)(`formSettings.editSubmit`)+` (✓)`:(0,t.unref)(r)(`formSettings.editSubmit`)),1)]),_:1})]),(0,t.createVNode)((0,t.unref)(n.NModal),{show:f.value,"onUpdate:show":o[7]||=e=>f.value=e,preset:`card`,class:`max-w-[860px]`},{header:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,bV,[(0,t.createElementVNode)(`span`,xV,(0,t.toDisplayString)((0,t.unref)(r)(`formSettings.editSubmit`)),1),(0,t.createVNode)((0,t.unref)(n.NTag),{size:`small`,type:`success`,bordered:!1},{default:(0,t.withCtx)(()=>[...o[9]||=[(0,t.createTextVNode)(`onSubmit`,-1)]]),_:1})])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,SV,[(0,t.createElementVNode)(`div`,CV,(0,t.toDisplayString)((0,t.unref)(r)(`builder.bindHint`)),1),(0,t.createVNode)(tV,{modelValue:p.value,"onUpdate:modelValue":o[5]||=e=>p.value=e,height:360},null,8,[`modelValue`]),(0,t.createElementVNode)(`div`,wV,[(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,onClick:o[6]||=e=>f.value=!1},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`common.cancel`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,onClick:h},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`common.save`)),1)]),_:1})])])]),_:1},8,[`show`])],64))}});M(),al();var EV={class:`p-2`},DV={class:`space-y-2 md:space-y-3`},OV=(0,t.defineComponent)({__name:`FormEditMain`,setup(e){let{hasField:r,currentFieldType:i,selectedIsForm:a}=j(),o=(0,t.computed)(()=>a.value||!i.value?!1:Oc(i.value)?.category===`field`);return(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,EV,[(0,t.createElementVNode)(`div`,DV,[!(0,t.unref)(r)||(0,t.unref)(a)?((0,t.openBlock)(),(0,t.createBlock)(TV,{key:0})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[o.value?((0,t.openBlock)(),(0,t.createBlock)(QT,{key:0})):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(rE),(0,t.createVNode)(_V),(0,t.createVNode)(zT),(0,t.createVNode)((0,t.unref)(n.NDivider)),(0,t.createVNode)(kT)],64))])]))}});M(),A();var kV={class:`p-3 border-b`},AV={class:`flex items-center gap-3`},jV={class:`h-8 w-8 rounded-md flex items-center justify-center shrink-0`},MV={class:`min-w-0 flex-1`},NV={class:`text-sm font-medium text-foreground truncate`},PV={class:`text-[11px] text-muted-foreground truncate`},FV=(0,t.defineComponent)({__name:`SidebarRight`,setup(e){let{currentFieldType:r,selectedIsForm:i,formName:a}=j(),{t:o}=k(),s=(0,t.computed)(()=>Mg(o)),c=(0,t.computed)(()=>s.value.find(e=>e.name===r.value)),l=(0,t.computed)(()=>i.value?o(`formSettings.title`):c.value?.tooltip??``),u=(0,t.computed)(()=>i.value?a.value:r.value??``),d=(0,t.computed)(()=>i.value?`i-lucide-panel-top`:c.value?.icon??``);return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NLayoutSider),{bordered:``,width:300,"collapsed-width":0,"show-trigger":`bar`,"collapse-mode":`width`,"native-scrollbar":!1,"content-style":`display: flex; flex-direction: column; height: 100%;`,class:`sidebar-sider`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,kV,[(0,t.createElementVNode)(`div`,AV,[(0,t.createElementVNode)(`div`,jV,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(`${d.value} h-8 w-8`)},null,2)]),(0,t.createElementVNode)(`div`,MV,[(0,t.createElementVNode)(`div`,NV,(0,t.toDisplayString)(l.value),1),(0,t.createElementVNode)(`div`,PV,(0,t.toDisplayString)(u.value),1)])])]),(0,t.createVNode)((0,t.unref)(n.NScrollbar),{class:`flex-1 sidebar-scrollbar`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(OV)]),_:1})]),_:1}))}});function IV(e){return e.filter(e=>e!==-1)}function LV(e,t,n=[],r=-1){for(let i=0;i<e.length;i++){let a=e[i];if(!a||typeof a!=`object`)continue;let o=[...n,i],s=r>=0?r:i;if(a.__key===t)return{node:a,path:o,rootIndex:s};let c=a?.children;if(Array.isArray(c)){let e=LV(c,t,[...o,-1],s);if(e)return e}}return null}function RV(e,t,n){let r=IV(t);if(r.length===0)return e;let i=[...e],a=r[0];if(r.length===1)return i[a]=n,i;let o={...i[a]},s=o;for(let e=1;e<r.length-1;e++){let t=r[e],n=Array.isArray(s.children)?[...s.children]:[],i={...n[t]};n[t]=i,s.children=n,s=i}let c=r[r.length-1],l=Array.isArray(s.children)?[...s.children]:[];return l[c]=n,s.children=l,i[a]=o,i}var zV=Jw();Yw(),Zl(),ks();function BV(){let e=Jl(),{formDefinition:n,formSchema:r,selectedIndex:i,selectedKey:a,selectedTarget:o,commitSchemaReconcile:s}=e,c=(0,t.computed)(()=>{let e=[`[&_.formkit-label]:text-xs`,`[&_.formkit-label]:font-bold`].join(` `);return n.value?.settings?.labelAlign===`left`?[e,`[&_.formkit-wrapper]:flex`,`[&_.formkit-wrapper]:flex-row`,`[&_.formkit-wrapper]:items-start`,`[&_.formkit-wrapper]:gap-3`,`[&_.formkit-label]:mb-0`,`[&_.formkit-label]:w-[var(--fk-label-width)]`,`[&_.formkit-label]:shrink-0`,`[&_.formkit-label]:pt-1`,`[&_.formkit-inner]:flex-1`,`[&_.formkit-inner]:min-w-0`].join(` `):e}),l=e=>{s(r.value.filter((t,n)=>n!==e),{reason:`delete`}),h.value=h.value.filter((t,n)=>n!==e)},u=(e,t)=>{if(!LV(r.value,e))return;let n=new Set;Ds(r.value,n);let i=e=>{if(!e||typeof e!=`object`)return e;if(e.$formkit===`submit`&&Array.isArray(e.children)&&delete e.children,typeof e.__key==`string`&&e.__key)return Array.isArray(e.children)&&(e.children=e.children.map(e=>i(e))),e;let t=ws(),r=e.$formkit===`submit`?e.name:Os(n),a=e.$formkit===`submit`?{...e,__key:t,outerClass:e.outerClass||`col-span-12 pt-2`}:{...e,__key:t,name:r,id:`field_${t}`,...typeof e.$cmp==`string`?{props:e.props&&typeof e.props==`object`?{...e.props,name:r}:{name:r}}:{},outerClass:e.outerClass||`col-span-12`};return Array.isArray(e.children)&&(a.children=e.children.map(e=>i(e))),a},a=t.map(e=>i({...e})),o=new Set,c=e=>{for(let t of e){let e=t?.__key;typeof e==`string`&&e&&o.add(e);let n=t?.children;Array.isArray(n)&&c(n)}};c(a);let l=t=>t.filter(t=>{let n=t?.__key;if(typeof n==`string`&&n){if(n===e)return!0;if(o.has(n))return!1}return!0}).map(e=>{if(!e||typeof e!=`object`)return e;let t=e.children;if(!Array.isArray(t))return e;let n=l(t);return{...e,children:n}}),u=l(r.value),d=LV(u,e);if(!d)return;let f={...d.node,children:a};f.$cmp&&(f.props={...f.props},f.props&&typeof f.props==`object`&&delete f.props.modelValue),s(RV(u,d.path,f),{reason:`container-children`,merge:!0})},d=e=>{let t=LV(r.value,e);t&&(o.value=`field`,i.value=t.rootIndex,a.value=e)},f=(e,t)=>{let n=LV(r.value,e);if(!n)return;let i={...n.node};i.props={...i.props,...t},s(RV(r.value,n.path,i),{reason:`inline-edit`,merge:!0})},p={formSchema:e.formSchema,commitSchemaReconcile:e.commitSchemaReconcile},[m,h]=IS(r.value,{group:`form-builder`,nativeDrag:!0,draggingClass:`opacity-5 bg-green-400/50`,accepts:()=>!0,sortable:!0,draggable:()=>!0,handleNodePointerup(e){e.targetData.node.el.setAttribute(`draggable`,`true`)},plugins:[lC({insertPoint:()=>uC()},p)]}),g={containerRef:m,items:h};(0,t.watch)(()=>r.value,e=>{e!==h.value&&(h.value=[...e])});let _=(0,t.computed)(()=>[`w-full grid grid-cols-12 gap-x-4 gap-y-2 list-none p-0 m-0 flex-1`,h.value.length===0?`min-h-[200px] h-full`:`h-fit`].join(` `));return db({library:zV,renderNode:e=>!e||typeof e!=`object`?e:fC(qw(e)),updateContainerChildren:u,selectByKey:d,updateNodePropsByKey:f}),{rootGrid:g,dropAreaUlClass:_,canvasFormClass:c,onSelectRoot:(e,t)=>{let n=e?.__key;o.value=`field`,n?d(n):i.value=t},onSelectBlank:()=>{o.value=`form`,a.value=null},onDelete:l,onResizeEnd:()=>{s(h.value,{reason:`resize`,merge:!0})},instanceId:e.instanceId}}Zl(),A();var VV={class:`w-16 shrink-0 flex flex-col items-center`},HV=(0,t.defineComponent)({__name:`CanvasViewportControls`,setup(e){let{canvasView:r}=Jl(),{t:i}=k(),a=[{id:`desktop`,icon:`i-lucide-monitor`,label:`builder.desktopView`},{id:`tablet`,icon:`i-lucide-tablet`,label:`builder.tabletView`},{id:`mobile`,icon:`i-lucide-smartphone`,label:`builder.mobileView`}];return(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,VV,[(0,t.createVNode)((0,t.unref)(n.NButtonGroup),{vertical:``,class:`sticky top-20 bg-card shadow-sm rounded-lg border border-border/50`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a,e=>(0,t.createVNode)((0,t.unref)(n.NTooltip),{key:e.id,placement:`right`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{type:(0,t.unref)(r)===e.id?`primary`:`default`,"aria-label":(0,t.unref)(i)(e.label),onClick:t=>r.value=e.id,size:`small`,class:`w-8 h-8`},{icon:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(`${e.icon} h-3.5 w-3.5`)},null,2)]),_:2},1032,[`type`,`aria-label`,`onClick`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(i)(e.label)),1)]),_:2},1024)),64))]),_:1})]))}});Zl(),cu(),A();var UV={class:`flex-1 flex justify-center px-4 relative`},WV={key:0,class:`absolute inset-0 flex items-center justify-center z-50`},GV={class:`flex flex-col items-center bg-white dark:bg-neutral-600 justify-center gap-3 p-4 rounded-lg shadow-md`},KV={class:`font-medium text-sm text-zinc-700 dark:text-zinc-300`},qV=(0,t.defineComponent)({__name:`CanvasBoard`,props:{containerRef:{},items:{},ulClass:{},canvasFormClass:{},onSelect:{type:Function},onSelectBlank:{type:Function},onDelete:{type:Function},onResizeEnd:{type:Function}},setup(e){let{t:r}=k(),i=Jl(),{selectedKey:a,formDefinition:o,canvasView:s,isLoading:c}=i,l={"data-testid":`drop-area-${i.instanceId}`};return(i,u)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,UV,[(0,t.unref)(c)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,WV,[(0,t.createElementVNode)(`div`,GV,[(0,t.createElementVNode)(`span`,KV,(0,t.toDisplayString)((0,t.unref)(r)(`builder.creatingForm`)),1),(0,t.createVNode)((0,t.unref)(n.NSpin),{size:`medium`})])])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)((0,t.unref)(n.NCard),{style:(0,t.normalizeStyle)({"--fk-label-width":`${(0,t.unref)(o)?.settings?.labelWidth??80}px`}),class:(0,t.normalizeClass)((0,t.unref)(nu)(`relative min-h-[80%] !h-fit rounded-xl shadow-md transition-[width] duration-300 flex flex-col`,e.canvasFormClass,(0,t.unref)(s)===`desktop`?`w-full lg:w-[94%]`:``,(0,t.unref)(s)===`tablet`?`w-[768px]`:``,(0,t.unref)(s)===`mobile`?`w-[375px]`:``)),"content-style":`padding: 16px; flex: 1; display: flex; flex-direction: column;`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(EC,{"container-ref":e.containerRef,items:e.items,"selected-key":(0,t.unref)(a),"empty-text":(0,t.unref)(r)(`builder.listDropHere`),"delete-aria-label":(0,t.unref)(r)(`builder.deleteField`),"data-attrs":l,"ul-class":`${e.ulClass} min-h-full`,"on-select":e.onSelect,"on-select-blank":e.onSelectBlank,"on-delete":e.onDelete,"on-resize-end":e.onResizeEnd},(0,t.createSlots)({_:2},[i.$slots.empty?{name:`empty`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(i.$slots,`empty`)]),key:`0`}:void 0]),1032,[`container-ref`,`items`,`selected-key`,`empty-text`,`delete-aria-label`,`ul-class`,`on-select`,`on-select-blank`,`on-delete`,`on-resize-end`])]),_:3},8,[`style`,`class`])]))}}),JV={"zh-CN":n.zhCN,en:n.enUS},YV={"zh-CN":n.dateZhCN,en:n.dateEnUS};function XV(e){return JV[e]??JV[`zh-CN`]}function ZV(e){return YV[e]??YV[`zh-CN`]}var QV=Symbol(`FormBuilderRuntimeLocale`);function $V(e){let{initialLocale:n,availableLocales:r=[`zh-CN`,`en`],localeFallback:i=`zh-CN`}=e,a=(0,t.ref)(n),o=(0,t.ref)(i),s={locale:a,setLocale:e=>{r.includes(e)&&(a.value=e)},availableLocales:(0,t.computed)(()=>r.map(e=>({label:e===`zh-CN`?`中文`:e===`en`?`English`:e,value:e}))),localeFallback:o,naiveLocale:(0,t.computed)(()=>XV(a.value)),naiveDateLocale:(0,t.computed)(()=>ZV(a.value))};return(0,t.provide)(QV,s),s}function eH(){let e=(0,t.ref)(`zh-CN`);return(0,t.inject)(QV,{locale:e,setLocale:t=>{e.value=t},availableLocales:(0,t.computed)(()=>[{label:`中文`,value:`zh-CN`},{label:`English`,value:`en`}]),localeFallback:(0,t.ref)(`zh-CN`),naiveLocale:(0,t.computed)(()=>XV(e.value)),naiveDateLocale:(0,t.computed)(()=>ZV(e.value))})}var tH=1,nH=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:tH++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(e instanceof Function?e():e),a=r!==void 0,o,s=i.then(async e=>{if(o=[`resolve`,e],(0,t.isVNode)(e))a=!1,this.create({id:r,type:`default`,message:e});else if(iH(e)&&!e.ok){a=!1;let i=typeof n.error==`function`?await n.error(`HTTP error! status: ${e.status}`):n.error,o=typeof n.description==`function`?await n.description(`HTTP error! status: ${e.status}`):n.description,s=typeof i==`object`&&!(0,t.isVNode)(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}else if(e instanceof Error){a=!1;let i=typeof n.error==`function`?await n.error(e):n.error,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!(0,t.isVNode)(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}else if(n.success!==void 0){a=!1;let i=typeof n.success==`function`?await n.success(e):n.success,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!(0,t.isVNode)(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`success`,description:o,...s})}}).catch(async e=>{if(o=[`reject`,e],n.error!==void 0){a=!1;let i=typeof n.error==`function`?await n.error(e):n.error,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!(0,t.isVNode)(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:c}:Object.assign(r,{unwrap:c})};custom=(e,t)=>{let n=t?.id||tH++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function rH(e,t){let n=t?.id||tH++;return nH.create({message:e,id:n,type:`default`,...t}),n}var iH=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,aH=Object.assign(rH,{success:nH.success,info:nH.info,warning:nH.warning,error:nH.error,custom:nH.custom,message:nH.message,promise:nH.promise,dismiss:nH.dismiss,loading:nH.loading},{getHistory:()=>nH.toasts,getToasts:()=>nH.getActiveToasts()});al(),ks(),A(),Zl();var oH=(0,t.defineComponent)({__name:`ImportExportModal`,props:{show:{type:Boolean}},emits:[`update:show`],setup(e,{emit:r}){let i=e,a=r,{t:o}=k(),{formDefinition:s,commitFormDefinition:c,commitSchema:l}=Jl(),u=(0,t.ref)(``),d=()=>qc(s.value),f=e=>{let t=e;return typeof t==`object`&&!!t&&!Array.isArray(t)&&typeof t.version==`number`&&t.root!==null&&typeof t.root==`object`&&Array.isArray(t.root.children)};(0,t.watch)(()=>i.show,e=>{e&&(u.value=JSON.stringify(s.value,null,2))});let p=()=>{a(`update:show`,!1)},m=()=>{try{let e=JSON.parse(u.value);if(f(e)){c(e.id?e:{...e,id:ws()},{reason:`import`}),aH.success(o(`importExport.importSuccess`)),p();return}if(!Array.isArray(e))throw Error(o(`importExport.schemaMustBeArray`));let t=e[0];if(e.length===1&&t&&typeof t==`object`&&t.$formkit===`form`&&Array.isArray(t.children)){let e=t.name,n=typeof e==`string`&&e.trim()?e.trim():`form`,r=t?.props?.labelPosition===`left`?`left`:`top`,i=Number(t?.props?.labelWidth),a=Number.isFinite(i)?i:120;l(t.children,{reason:`import`,name:n,settings:{layout:`vertical`,labelAlign:r,labelWidth:a}})}else l(e,{reason:`import`});aH.success(o(`importExport.importSuccess`)),p()}catch(e){let t=e instanceof Error?e.message:o(`importExport.unknownError`);aH.error(o(`importExport.failedParseJson`,{message:t}))}},h=()=>{try{JSON.parse(u.value);let e=new Blob([u.value],{type:`application/json`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`form-schema.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t),aH.success(o(`importExport.downloadedSuccess`))}catch{aH.error(o(`importExport.failedGenerateDownload`))}},g=(e,t)=>{let n=` `.repeat(t);return e.split(`
|
|
57
|
+
`).map(e=>e.trim()?`${n}${e}`:e).join(`
|
|
58
|
+
`)},_=e=>{let t=String(e??``).replace(/[^a-zA-Z0-9_]/g,`_`);return(t.match(/^[a-zA-Z_]/)?t:`k_${t}`)||`k_bind`},v=e=>{try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}},y=()=>{let e=v(d()),t={},n=e=>{for(let r of e){if(!r||typeof r!=`object`)continue;let e=r.__bind;if(e&&typeof e==`object`&&!Array.isArray(e)){let n=`bind_${_(r.__key||r.name||r.$formkit||r.$el)}`;t[n]=e,r.bind=`$${n}`,delete r.__bind}Array.isArray(r.children)&&n(r.children)}};n(e);let r=JSON.stringify(e,null,2),i=`reactive({\n${Object.entries(t).map(([e,t])=>{let n=[];for(let[e,r]of Object.entries(t))typeof r==`string`?n.push(`${e}: async (event) => {\n${g(r,6)}\n }`):r&&typeof r==`object`&&typeof r.__js==`string`?n.push(`${e}: async (event) => {\n${g(String(r.__js),6)}\n }`):n.push(`${e}: ${JSON.stringify(r)}`);return` ${e}: {\n ${n.join(`,
|
|
59
|
+
`)}\n }`}).join(`,
|
|
60
|
+
`)}\n})`;return[`import { reactive } from 'vue'`,`import axios from 'axios'`,``,`export const schema = ${r}`,``,`export const data = ${i}`].join(`
|
|
61
|
+
`)},b=()=>{try{let e=y(),t=new Blob([e],{type:`text/javascript`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`form-schema.js`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),aH.success(o(`importExport.downloadedSuccess`))}catch(e){let t=e instanceof Error?e.message:o(`importExport.unknownError`);aH.error(o(`importExport.failedParseJson`,{message:t}))}};return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NModal),{show:e.show,"onUpdate:show":i[1]||=e=>a(`update:show`,e),class:`w-70%`,preset:`card`,title:(0,t.unref)(o)(`importExport.title`),bordered:!1,size:`small`,segmented:{content:`soft`,footer:`soft`}},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NSpace),{justify:`end`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,onClick:p},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(o)(`common.cancel`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`info`,onClick:b},{icon:(0,t.withCtx)(()=>[...i[2]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-file-code-2 w-4 h-4`},null,-1)]]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(o)(`importExport.downloadJs`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`info`,onClick:h},{icon:(0,t.withCtx)(()=>[...i[3]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-download w-4 h-4`},null,-1)]]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(o)(`importExport.downloadJson`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,type:`primary`,onClick:m},{icon:(0,t.withCtx)(()=>[...i[4]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-save w-4 h-4`},null,-1)]]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(o)(`importExport.saveAndImport`)),1)]),_:1})]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,null,[(0,t.createVNode)((0,t.unref)(n.NInput),{value:u.value,"onUpdate:value":i[0]||=e=>u.value=e,type:`textarea`,autosize:{minRows:15,maxRows:25},placeholder:(0,t.unref)(o)(`importExport.placeholder`),class:`font-mono text-sm`},null,8,[`value`,`placeholder`])])]),_:1},8,[`show`,`title`]))}});A();var sH={class:`w-16 shrink-0 hidden md:flex flex-col items-center`},cH={class:`sticky top-20 flex flex-col gap-2`},lH=(0,t.defineComponent)({__name:`CanvasActionsBar`,setup(e){let{t:r}=k(),{setLocale:i,locale:a,availableLocales:o}=eH(),s=(0,t.ref)(!1);return(e,c)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,sH,[(0,t.createElementVNode)(`div`,cH,[(0,t.createVNode)((0,t.unref)(n.NButtonGroup),{vertical:``,class:`bg-card shadow-sm rounded-lg border border-border/50`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NTooltip),{placement:`left`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{onClick:c[0]||=e=>s.value=!0,size:`small`,"aria-label":(0,t.unref)(r)(`builder.importExportSchema`),class:`w-8 h-8`},{icon:(0,t.withCtx)(()=>[...c[2]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-code-xml h-3.5 w-3.5`},null,-1)]]),_:1},8,[`aria-label`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(r)(`builder.importExportSchema`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NPopselect),{value:(0,t.unref)(a),options:(0,t.unref)(o),"onUpdate:value":(0,t.unref)(i),trigger:`click`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{size:`small`,"aria-label":(0,t.unref)(r)(`builder.switchLanguage`),class:`w-8 h-8`},{icon:(0,t.withCtx)(()=>[...c[3]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-languages h-3.5 w-3.5`},null,-1)]]),_:1},8,[`aria-label`])]),_:1},8,[`value`,`options`,`onUpdate:value`])]),_:1})]),(0,t.createVNode)(oH,{show:s.value,"onUpdate:show":c[1]||=e=>s.value=e},null,8,[`show`])]))}}),uH={class:`flex flex-1 h-full min-h-0 flex-row justify-start pb-15 pt-10`},dH={class:`flex flex-col gap-4`},fH=(0,t.defineComponent)({__name:`BuilderCanvas`,setup(e){let n=BV();return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,uH,[(0,t.createVNode)(HV),(0,t.createVNode)(qV,{"container-ref":(0,t.unref)(n).rootGrid.containerRef,items:(0,t.unref)(n).rootGrid.items,"ul-class":(0,t.unref)(n).dropAreaUlClass.value,"canvas-form-class":(0,t.unref)(n).canvasFormClass.value,"on-select":(0,t.unref)(n).onSelectRoot,"on-select-blank":(0,t.unref)(n).onSelectBlank,"on-delete":(0,t.unref)(n).onDelete,"on-resize-end":(0,t.unref)(n).onResizeEnd},(0,t.createSlots)({_:2},[e.$slots.empty?{name:`empty`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,`empty`)]),key:`0`}:void 0]),1032,[`container-ref`,`items`,`ul-class`,`canvas-form-class`,`on-select`,`on-select-blank`,`on-delete`,`on-resize-end`]),(0,t.createElementVNode)(`div`,dH,[(0,t.createVNode)(lH),(0,t.renderSlot)(e.$slots,`toolbar`)])]))}}),pH=(0,t.defineComponent)({__name:`FormKitSchemaWrapper`,props:{schema:{},data:{},library:{}},setup(e){let n=Mo;return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n),{schema:e.schema,data:e.data,library:e.library},null,8,[`schema`,`data`,`library`]))}});function mH(e){return(0,t.computed)(()=>{if(!e)return[];let t=(e,n)=>{let r=e?.__key,i=e?.__preview_placeholder===!0,a=Xw(qw(e),{key:r,isPlaceholder:i,format:t});if(a)return a;let o=e,s=Array.isArray(o.children);if(typeof o.$cmp==`string`){let{bind:i,if:a,...c}=o,l=s?o.children.map((e,n)=>t(e,n)):Array.isArray(o.props?.modelValue)?o.props.modelValue.map((e,n)=>t(e,n)):void 0,u={...c,name:e.name||(r?`field_${r}`:`field_${n}`),id:e.id||(r?`preview_field_${r}`:`preview_field_${n}`)};return l&&(u.children=l),typeof i==`string`&&i.trim()&&(u.bind=i),(typeof a==`string`&&a.trim()||typeof a==`boolean`)&&(u.if=a),u}if(typeof o.$el==`string`&&s){let{bind:e,if:n,outerClass:r,...i}=o,a=o.children.map((e,n)=>t(e,n)),s=o.name||o.props?.name,c={$formkit:`group`,children:[{...i,children:a}],outerClass:`${r||`col-span-12`} !border-0 !p-0 !m-0 ![&>.formkit-wrapper]:border-0 ![&>.formkit-wrapper]:p-0 ![&>.formkit-wrapper]:m-0 ![&>.formkit-wrapper>fieldset]:border-0 ![&>.formkit-wrapper>fieldset]:p-0 ![&>.formkit-wrapper>fieldset]:m-0`};return s&&(c.name=s),typeof e==`string`&&e.trim()&&(c.bind=e),(typeof n==`string`&&n.trim()||typeof n==`boolean`)&&(c.if=n),c}if(typeof o.$formkit==`string`&&s){let{bind:i,if:a,...s}=o,c={...s,name:e.name||(r?`field_${r}`:`field_${n}`),id:e.id||(r?`preview_field_${r}`:`preview_field_${n}`),children:o.children.map((e,n)=>t(e,n))};return typeof i==`string`&&i.trim()&&(c.bind=i),(typeof a==`string`&&a.trim()||typeof a==`boolean`)&&(c.if=a),c}let{$formkit:c,label:l,validation:u,validationMessages:d,help:f,placeholder:p,value:m,options:h,number:g,outerClass:_,type:v,buttonProps:y,buttonText:b,props:x,__bind:S,bind:C,min:w,max:ee,validationVisibility:te,__raw__sectionsSchema:T,step:ne,multiple:re,accept:ie,if:ae}=e,oe={$formkit:c,name:e.name||(r?`field_${r}`:`field_${n}`),id:e.id||(r?`preview_field_${r}`:`preview_field_${n}`),label:l,validation:u,validationMessages:d,help:f,placeholder:p,value:m,options:h,outerClass:_,type:v,buttonProps:y,buttonText:b,props:x,__bind:S,number:g,min:w,max:ee,validationVisibility:te,__raw__sectionsSchema:T,step:ne,multiple:re,accept:ie};return typeof C==`string`&&C.trim()&&(oe.bind=C),(typeof ae==`string`&&ae.trim()||typeof ae==`boolean`)&&(oe.if=ae),oe};return e.value.map((e,n)=>t(e,n))})}function hH(e){let t=Gw(e);return t?t.id:null}var gH=Symbol(`FormBuilderTheme`);function _H(e){let i=(0,r.useColorMode)(),a=(0,r.usePreferredDark)(),o=(0,t.computed)(()=>i.value===`dark`||i.value===`auto`&&a.value?n.darkTheme:n.lightTheme),s=e=>{i.value=e};return e&&(0,t.watch)(e,e=>{(e===`light`||e===`dark`)&&s(e)},{immediate:!0}),{activeTheme:o,setTheme:s}}function vH(e){(0,t.provide)(gH,e)}function yH(){return(0,t.inject)(gH,null)}var bH=(0,t.defineComponent)({__name:`BuilderThemeScope`,props:{theme:{},locale:{},dateLocale:{},themeOverrides:{},breakpoints:{},clsPrefix:{},inlineThemeDisabled:{type:Boolean},preflightStyleDisabled:{type:Boolean}},setup(e){let r=e,i=yH(),a=i??_H(()=>r.theme);i||vH(a);let o=(0,t.computed)(()=>({themeOverrides:r.themeOverrides,breakpoints:r.breakpoints,clsPrefix:r.clsPrefix,inlineThemeDisabled:r.inlineThemeDisabled,preflightStyleDisabled:r.preflightStyleDisabled}));return(e,s)=>(0,t.unref)(i)?(0,t.renderSlot)(e.$slots,`default`,{key:1}):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NConfigProvider),(0,t.mergeProps)({key:0,abstract:``,theme:(0,t.unref)(a).activeTheme.value,locale:r.locale,"date-locale":r.dateLocale},o.value),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,`default`)]),_:3},16,[`theme`,`locale`,`date-locale`]))}});ks(),Ms(),al(),A(),Zl();var xH=(0,t.defineComponent)({__name:`FormSchemaRenderer`,props:{definition:{},schema:{},dataStructure:{default:`flat`},modelValue:{},actions:{type:Boolean,default:!1},submitLabel:{},resetLabel:{},submitAttrs:{},resetAttrs:{},actionsJustify:{default:`start`},formClass:{default:`w-full !grid !grid-cols-12 gap-x-4 gap-y-2`},formName:{},labelPosition:{},labelWidth:{},schemaLibrary:{},interactiveContainers:{type:Boolean,default:!0},theme:{},abstract:{type:Boolean},bordered:{type:Boolean},clsPrefix:{},locale:{},dateLocale:{},namespace:{},rtl:{},tag:{},hljs:{},katex:{},themeOverrides:{},componentOptions:{},icons:{},breakpoints:{},preflightStyleDisabled:{type:Boolean},styleMountTarget:{},inlineThemeDisabled:{type:Boolean},as:{}},emits:[`update:modelValue`,`submit`],setup(e,{expose:r,emit:i}){let a=zo,o=e;ql((0,t.computed)(()=>o.definition?Kl(o.definition):Kl({version:2,id:`default-form`,name:`form`,root:{id:`root`,category:`container`,type:`group`,renderAs:`formkit`,dataType:`object`,children:[]},settings:{layout:`vertical`,labelWidth:80,labelAlign:`top`}})).value);let s=i,c=eH(),l=(0,t.computed)(()=>o.locale??c.naiveLocale.value),u=(0,t.computed)(()=>o.dateLocale??c.naiveDateLocale.value);(0,t.watch)(()=>c.locale.value,e=>{Wr(e===`en`?`en`:`zh`)},{immediate:!0});let d=e=>{try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}},f=(0,t.ref)([]),p=(0,t.ref)({}),m=(0,t.ref)({}),h=!1;(0,t.watch)((0,t.computed)(()=>{if(o.definition){o.schema&&Array.isArray(o.schema)&&!h&&(h=!0,console.warn(`[FormRenderer] both "definition" and "schema" provided — using "definition"`));let e=o.dataStructure===`nested`?Jc:qc;try{let t=e(o.definition);return Array.isArray(t)?t:[]}catch(e){return console.error(`[FormRenderer] dslToSchema failed`,e),[]}}return Array.isArray(o.schema)?o.schema:[]}),e=>{f.value=d(Array.isArray(e)?e:[]),m.value={}},{immediate:!0,deep:!0}),(0,t.watch)(()=>o.modelValue,e=>{e&&e!==p.value&&(p.value=d(e))},{immediate:!0,deep:!0}),(0,t.watch)(p,e=>{s(`update:modelValue`,e)},{deep:!0});let g=(0,t.computed)(()=>o.schemaLibrary?o.schemaLibrary:Yw()),_=(0,t.computed)(()=>{let e=f.value.length===1?f.value[0]:null;return!e||typeof e!=`object`||e.$formkit!==`form`||!Array.isArray(e.children)?null:e}),v=(0,t.computed)(()=>_.value?_.value.children:f.value),y=(0,t.computed)(()=>{let e=_.value?.name;if(typeof e==`string`&&e.trim())return e;let t=o.formName;if(typeof t==`string`&&t.trim())return t}),b=(0,t.computed)(()=>{let e=_.value?.props?.labelPosition;return e===`left`||e===`top`?e:o.labelPosition===`left`?`left`:`top`}),x=(0,t.computed)(()=>{let e=Number(_.value?.props?.labelWidth);if(Number.isFinite(e))return e;let t=Number(o.labelWidth);return Number.isFinite(t)?t:80}),S=(0,t.computed)(()=>{let e=o.formClass,t=[`[&_.formkit-label]:text-xs`,`[&_.formkit-label]:font-bold`].join(` `);return b.value===`left`?[e,t,`fk-label-left`,`[&_.formkit-wrapper]:flex`,`[&_.formkit-wrapper]:flex-row`,`[&_.formkit-wrapper]:items-start`,`[&_.formkit-wrapper]:gap-3`,`[&_.formkit-label]:mb-0`,`[&_.formkit-label]:w-[var(--fk-label-width)]`,`[&_.formkit-label]:shrink-0`,`[&_.formkit-label]:pt-1`,`[&_.formkit-inner]:flex-1`,`[&_.formkit-inner]:min-w-0`].join(` `):[e,t].join(` `)}),C=mH(v),w=(e,t,n=[])=>{for(let r=0;r<e.length;r++){let i=e[r];if(!i||typeof i!=`object`)continue;let a=[...n,r];if(i.__key===t)return{node:i,path:a};let o=i?.children;if(Array.isArray(o)){let e=w(o,t,[...a,-1]);if(e)return e}}return null},ee=e=>e.filter(e=>e!==-1),te=(e,t)=>{let n=ee(t);if(n.length===0)return null;if(n.length===1)return{parentArr:e,index:n[0],parentNode:null};let r=e[n[0]];for(let e=1;e<n.length-1;e++)r=r?.children?.[n[e]];let i=Array.isArray(r?.children)?r.children:null;return i?{parentArr:i,index:n[n.length-1],parentNode:r}:null},T=(e,t,n)=>{let r=ee(t);if(r.length===0)return e;let i=[...e],a=r[0];if(r.length===1)return i[a]=n,i;let o={...i[a]},s=o;for(let e=1;e<r.length-1;e++){let t=r[e],n=Array.isArray(s.children)?[...s.children]:[],i={...n[t]};n[t]=i,s.children=n,s=i}let c=r[r.length-1],l=Array.isArray(s.children)?[...s.children]:[];return l[c]=n,s.children=l,i[a]=o,i},ne=(e,t)=>{let n=te(e,t);if(!n)return e;let{parentArr:r,index:i,parentNode:a}=n,o=r.filter((e,t)=>t!==i);if(!a)return o;let s={...a,children:o};return T(e,t.slice(0,-1),s)},re=(e,t,n)=>{let r=te(e,t);if(!r)return e;let{parentArr:i,index:a,parentNode:o}=r,s=[...i];if(s.splice(a+1,0,n),!o)return s;let c={...o,children:s};return T(e,t.slice(0,-1),c)},ie=e=>{let t=Es(e);return t.match(/^(.*_\d+)_\d+$/)?.[1]||t},ae=e=>hH(e)?!0:[`group`].includes(String(e?.$formkit??``)),oe=(e,t)=>{if(!(!e||typeof e!=`object`)){if(!ae(e)&&e.$formkit!==`submit`){let n=ie(e.name||e.$formkit||e.$cmp||`field`);n&&t.add(n)}if(Array.isArray(e.children))for(let n of e.children)oe(n,t)}},se=(e,t,n)=>{if(!e||typeof e!=`object`)return e;let r=ws(),i={...e,__key:r},a=hH(e);if(e.$formkit!==`submit`){if(!ae(e)){let r=ie(e.name||e.$formkit||e.$cmp||`field`),a=n>0?`${r}_${n}`:r,o=1;for(;t.has(a);)a=`${r}_${n}_${o}`,o++;i.name=a,t.add(a),t.add(Es(a))}i.id=`field_${r}`}if(Array.isArray(e.children)&&(i.children=e.children.map(e=>se(e,t,n))),a){let t=typeof i.props==`object`&&i.props?i.props:{},n=As(e.$cmp??e.$formkit);n&&n.primitive===`cmp`?i.props={...t,[n.keyProp]:r,modelValue:Array.isArray(i.children)?i.children:[]}:i.props=t}return i},ce=(e,t)=>{for(let n of e){t(n);let e=n?.children;Array.isArray(e)&&ce(e,t)}},le=(e,t)=>{Ds(e,t),ce(e,e=>{let n=e?.name;typeof n!=`string`||!n||t.add(Es(n))})};(0,t.provide)(`previewListInteractive`,o.interactiveContainers),(0,t.provide)(`previewListDuplicate`,e=>{if(!o.interactiveContainers)return;let t=w(f.value,e);if(!t)return;let n=new Set;le(f.value,n);let r=new Set;oe(t.node,r);let i=(m.value[e]??0)+1,a=e=>{for(let t of r){let r=`${t}_${e}`;if(n.has(r)||n.has(Es(r)))return!1}return!0};for(;!a(i);)i++;m.value={...m.value,[e]:i};let s=se(d(t.node),n,i);f.value=re(f.value,t.path,s)}),(0,t.provide)(`previewListIsLast`,e=>{if(!o.interactiveContainers)return!0;let t=w(f.value,e);if(!t)return!0;let n=te(f.value,t.path);if(!n)return!0;let{parentArr:r}=n,i=[...r].reverse().find(e=>hH(e)===`list`&&e?.__preview_placeholder!==!0);return i?i.__key===e:!0}),(0,t.provide)(`previewListRemove`,e=>{if(!o.interactiveContainers)return;let t=w(f.value,e);if(t){if(!(()=>{let t=n=>{for(let r of n){if(!r||typeof r!=`object`)continue;if(hH(r)===`list`&&r.__key!==e&&r.__preview_placeholder!==!0)return!0;let n=r?.children;if(Array.isArray(n)&&t(n))return!0}return!1};return t(f.value)})()){let e={...t.node,__preview_placeholder:!0};f.value=T(f.value,t.path,e);return}f.value=ne(f.value,t.path)}}),(0,t.provide)(`previewListRestore`,e=>{if(!o.interactiveContainers)return;let t=w(f.value,e);if(!t)return;let n=t.node,{__preview_placeholder:r,...i}=n,a={...i,children:Array.isArray(n.children)?n.children:[]};f.value=T(f.value,t.path,a)}),(0,t.watchEffect)(()=>{let e=p.value,t=null;ce(f.value,n=>{if(!n||typeof n!=`object`)return;let r=n.props&&typeof n.props==`object`?n.props:{};if(!(r.useExpressionValue??n.useExpressionValue)||typeof n.name!=`string`||!n.name)return;let i=r.__raw__valueExpression??n.__raw__valueExpression??r.valueExpression??n.valueExpression;if(typeof i!=`string`||!i.trim())return;let a=WT(i,e);if(!a.ok)return;let o=a.value===null||a.value===void 0?``:String(a.value),s=qe(y.value?`${y.value}.${n.name}`:n.name)??qe(n.name);s?String(s.value??``)!==o&&s.input(o,!0):String(e[n.name]??``)!==o&&(t||={...e},t[n.name]=o)}),t&&(p.value=t)});let ue=(0,t.ref)(null),de=(0,t.computed)(()=>ue.value?.node??null),fe=()=>de.value?.submit?.(),pe=()=>de.value?.reset?.(),me=(0,t.ref)(!1),he=async e=>{delete e.slots;let t=o.definition?.settings?.submit;if(typeof t==`string`&&t.trim()){await Iy(t,void 0,{form:e},o.definition?.id,o.definition?.version);return}s(`submit`,e,o.definition?.id,o.definition?.version)};r({submit:fe,reset:pe,loading:me});let{t:ge}=k(),_e=(0,t.computed)(()=>o.submitLabel??ge(`elements.submit.label`)),ve=(0,t.computed)(()=>o.resetLabel??ge(`elements.reset.label`));return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(bH,{theme:o.theme,locale:l.value,"date-locale":u.value,"theme-overrides":e.themeOverrides,breakpoints:e.breakpoints,"cls-prefix":e.clsPrefix,"inline-theme-disabled":e.inlineThemeDisabled,"preflight-style-disabled":e.preflightStyleDisabled},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(a),{ref_key:`formKitRef`,ref:ue,type:`form`,name:y.value,actions:!1,modelValue:p.value,"onUpdate:modelValue":i[0]||=e=>p.value=e,onSubmit:he,"form-class":S.value,style:(0,t.normalizeStyle)({"--fk-label-width":`${x.value}px`})},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(pH,{schema:(0,t.unref)(C),data:p.value,library:g.value},null,8,[`schema`,`data`,`library`]),r.$slots.actions?(0,t.renderSlot)(r.$slots,`actions`,{key:0,submit:fe,reset:pe,loading:me.value}):e.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`col-span-12`,`flex`,`gap-3`,e.actionsJustify===`center`?`justify-center`:e.actionsJustify===`end`?`justify-end`:e.actionsJustify===`space-between`?`justify-between`:`justify-start`])},[(0,t.createVNode)((0,t.unref)(n.NButton),(0,t.mergeProps)({type:`primary`,"attr-type":`submit`},e.submitAttrs??{},{loading:me.value}),{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(_e.value),1)]),_:1},16,[`loading`]),(0,t.createVNode)((0,t.unref)(n.NButton),(0,t.mergeProps)(e.resetAttrs??{},{onClick:pe}),{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(ve.value),1)]),_:1},16)],2)):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`name`,`modelValue`,`form-class`,`style`])]),_:3},8,[`theme`,`locale`,`date-locale`,`theme-overrides`,`breakpoints`,`cls-prefix`,`inline-theme-disabled`,`preflight-style-disabled`]))}});al(),A(),Zl();var SH={class:`text-[11px] text-muted-foreground`},CH={class:`py-4 px-3`},wH={key:0,class:`mt-4 p-3 bg-muted/30 rounded border border-border/50`},TH={class:`text-[11px] font-medium mb-2 text-foreground/80`},EH={class:`text-[11px] text-muted-foreground`},DH=(0,t.defineComponent)({__name:`BuilderPreview`,props:{show:{type:Boolean},schema:{},title:{},description:{},showDataPanel:{type:Boolean,default:!0},initialData:{},view:{},actions:{type:Boolean,default:!1},formClass:{default:`w-full !grid !grid-cols-12 gap-x-4 gap-y-2`},interactiveContainers:{type:Boolean,default:!0},resetOnSubmit:{type:Boolean,default:!0}},emits:[`update:show`,`submit`],setup(e,{expose:r,emit:i}){let{t:a}=k(),{formDefinition:o,canvasView:s}=Jl(),c=e,l=i,u=(0,t.ref)(!1),d=(0,t.computed)({get:()=>c.show??u.value,set:e=>{c.show===void 0?u.value=e:l(`update:show`,e)}}),f=e=>{try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}},p=(0,t.ref)({}),m=(0,t.ref)([]),h=(0,t.computed)(()=>c.view??s.value),g=(0,t.computed)(()=>c.title??a(`builder.previewTitle`)),_=(0,t.computed)(()=>c.description??a(`builder.previewDescription`)),v=(0,t.computed)(()=>o.value?.name??`form`),y=(0,t.computed)(()=>o.value?.settings?.labelAlign===`left`?`left`:`top`),b=(0,t.computed)(()=>o.value?.settings?.labelWidth??80),x=(0,t.computed)(()=>JSON.stringify(p.value,(e,t)=>typeof t==`function`?`[Function]`:t,2)),S=()=>{m.value=f(c.schema??qc(o.value)),p.value=f(c.initialData??{})},C=()=>{p.value={},m.value=[]};(0,t.watch)(d,e=>{e?S():C()},{immediate:!0});let w=e=>{l(`submit`,e,o.value?.id,o.value?.version),c.resetOnSubmit&&(p.value={})};return r({open:()=>{d.value=!0},close:()=>{d.value=!1}}),(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NModal),{show:d.value,"onUpdate:show":r[1]||=e=>d.value=e,preset:`card`,class:(0,t.normalizeClass)([`max-h-[90vh] overflow-y-auto border-none transition-all duration-300`,h.value===`desktop`?`sm:max-w-[800px]`:``,h.value===`tablet`?`sm:max-w-[768px]`:``,h.value===`mobile`?`sm:max-w-[375px]`:``]),title:g.value,size:`small`},{"header-extra":(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,SH,(0,t.toDisplayString)(_.value),1)]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,CH,[(0,t.createVNode)(xH,{schema:m.value,modelValue:p.value,"onUpdate:modelValue":r[0]||=e=>p.value=e,actions:c.actions,"form-class":c.formClass,"form-name":v.value,"label-position":y.value,"label-width":b.value,"interactive-containers":c.interactiveContainers,onSubmit:w},null,8,[`schema`,`modelValue`,`actions`,`form-class`,`form-name`,`label-position`,`label-width`,`interactive-containers`]),c.showDataPanel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,wH,[(0,t.createElementVNode)(`h3`,TH,(0,t.toDisplayString)((0,t.unref)(a)(`builder.formDataTitle`)),1),(0,t.createElementVNode)(`pre`,EH,(0,t.toDisplayString)(x.value),1)])):(0,t.createCommentVNode)(``,!0)])]),_:1},8,[`show`,`class`,`title`]))}});function q(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}function J(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}var OH=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return OH=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),n=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^n()&15>>e/4).toString(16))};function kH(e){return typeof e==`object`&&!!e&&(`name`in e&&e.name===`AbortError`||`message`in e&&String(e.message).includes(`FetchRequestCanceledException`))}var AH=e=>{if(e instanceof Error)return e;if(typeof e==`object`&&e){try{if(Object.prototype.toString.call(e)===`[object Error]`){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)},Y=class extends Error{},jH=class e extends Y{constructor(t,n,r,i){super(`${e.makeMessage(t,n,r)}`),this.status=t,this.headers=i,this.requestID=i?.get(`x-request-id`),this.error=n;let a=n;this.code=a?.code,this.param=a?.param,this.type=a?.type}static makeMessage(e,t,n){let r=t?.message?typeof t.message==`string`?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||`(no status code or body)`}static generate(t,n,r,i){if(!t||!i)return new NH({message:r,cause:AH(n)});let a=n?.error;return t===400?new FH(t,a,r,i):t===401?new IH(t,a,r,i):t===403?new LH(t,a,r,i):t===404?new RH(t,a,r,i):t===409?new zH(t,a,r,i):t===422?new BH(t,a,r,i):t===429?new VH(t,a,r,i):t>=500?new HH(t,a,r,i):new e(t,a,r,i)}},MH=class extends jH{constructor({message:e}={}){super(void 0,void 0,e||`Request was aborted.`,void 0)}},NH=class extends jH{constructor({message:e,cause:t}){super(void 0,void 0,e||`Connection error.`,void 0),t&&(this.cause=t)}},PH=class extends NH{constructor({message:e}={}){super({message:e??`Request timed out.`})}},FH=class extends jH{},IH=class extends jH{},LH=class extends jH{},RH=class extends jH{},zH=class extends jH{},BH=class extends jH{},VH=class extends jH{},HH=class extends jH{},UH=class extends Y{constructor(){super(`Could not parse response content as the length limit was reached`)}},WH=class extends Y{constructor(){super(`Could not parse response content as the request was rejected by the content filter`)}},GH=class extends Error{constructor(e){super(e)}},KH=class extends jH{constructor(e,t,n){let r=`OAuth2 authentication error`,i;if(t&&typeof t==`object`){let e=t;i=e.error;let n=e.error_description;n&&typeof n==`string`?r=n:i&&(r=i)}super(e,t,r,n),this.error_code=i}},qH=class extends Y{constructor(e,t,n){super(e),this.provider=t,this.cause=n}},JH=/^[a-z][a-z0-9+.-]*:/i,YH=e=>JH.test(e),XH=e=>(XH=Array.isArray,XH(e)),ZH=XH;function QH(e){return typeof e==`object`?e??{}:{}}function $H(e){if(!e)return!0;for(let t in e)return!1;return!0}function eU(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tU(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var nU=(e,t)=>{if(typeof t!=`number`||!Number.isInteger(t))throw new Y(`${e} must be an integer`);if(t<0)throw new Y(`${e} must be a positive integer`);return t},rU=e=>{try{return JSON.parse(e)}catch{return}},iU=e=>new Promise(t=>setTimeout(t,e)),aU=`6.34.0`,oU=()=>typeof window<`u`&&window.document!==void 0&&typeof navigator<`u`;function sU(){return typeof Deno<`u`&&Deno.build!=null?`deno`:typeof EdgeRuntime<`u`?`edge`:Object.prototype.toString.call(globalThis.process===void 0?0:globalThis.process)===`[object process]`?`node`:`unknown`}var cU=()=>{let e=sU();if(e===`deno`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":aU,"X-Stainless-OS":dU(Deno.build.os),"X-Stainless-Arch":uU(Deno.build.arch),"X-Stainless-Runtime":`deno`,"X-Stainless-Runtime-Version":typeof Deno.version==`string`?Deno.version:Deno.version?.deno??`unknown`};if(typeof EdgeRuntime<`u`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":aU,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":`edge`,"X-Stainless-Runtime-Version":globalThis.process.version};if(e===`node`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":aU,"X-Stainless-OS":dU(globalThis.process.platform??`unknown`),"X-Stainless-Arch":uU(globalThis.process.arch??`unknown`),"X-Stainless-Runtime":`node`,"X-Stainless-Runtime-Version":globalThis.process.version??`unknown`};let t=lU();return t?{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":aU,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":aU,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`unknown`,"X-Stainless-Runtime-Version":`unknown`}};function lU(){if(typeof navigator>`u`||!navigator)return null;for(let{key:e,pattern:t}of[{key:`edge`,pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`ie`,pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`ie`,pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`chrome`,pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`firefox`,pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:`safari`,pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}]){let n=t.exec(navigator.userAgent);if(n)return{browser:e,version:`${n[1]||0}.${n[2]||0}.${n[3]||0}`}}return null}var uU=e=>e===`x32`?`x32`:e===`x86_64`||e===`x64`?`x64`:e===`arm`?`arm`:e===`aarch64`||e===`arm64`?`arm64`:e?`other:${e}`:`unknown`,dU=e=>(e=e.toLowerCase(),e.includes(`ios`)?`iOS`:e===`android`?`Android`:e===`darwin`?`MacOS`:e===`win32`?`Windows`:e===`freebsd`?`FreeBSD`:e===`openbsd`?`OpenBSD`:e===`linux`?`Linux`:e?`Other:${e}`:`Unknown`),fU,pU=()=>fU??=cU();function mU(){if(typeof fetch<`u`)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function hU(...e){let t=globalThis.ReadableStream;if(t===void 0)throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function gU(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return hU({start(){},async pull(e){let{done:n,value:r}=await t.next();n?e.close():e.enqueue(r)},async cancel(){await t.return?.()}})}function _U(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function vU(e){if(typeof e!=`object`||!e)return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),n=t.cancel();t.releaseLock(),await n}var yU=({headers:e,body:t})=>({bodyHeaders:{"content-type":`application/json`},body:JSON.stringify(t)}),bU=`RFC3986`,xU=e=>String(e),SU={RFC1738:e=>String(e).replace(/%20/g,`+`),RFC3986:xU},CU=(e,t)=>(CU=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),CU(e,t)),wU=(()=>{let e=[];for(let t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e})(),TU=1024,EU=(e,t,n,r,i)=>{if(e.length===0)return e;let a=e;if(typeof e==`symbol`?a=Symbol.prototype.toString.call(e):typeof e!=`string`&&(a=String(e)),n===`iso-8859-1`)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});let o=``;for(let e=0;e<a.length;e+=TU){let t=a.length>=TU?a.slice(e,e+TU):a,n=[];for(let e=0;e<t.length;++e){let r=t.charCodeAt(e);if(r===45||r===46||r===95||r===126||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||i===`RFC1738`&&(r===40||r===41)){n[n.length]=t.charAt(e);continue}if(r<128){n[n.length]=wU[r];continue}if(r<2048){n[n.length]=wU[192|r>>6]+wU[128|r&63];continue}if(r<55296||r>=57344){n[n.length]=wU[224|r>>12]+wU[128|r>>6&63]+wU[128|r&63];continue}e+=1,r=65536+((r&1023)<<10|t.charCodeAt(e)&1023),n[n.length]=wU[240|r>>18]+wU[128|r>>12&63]+wU[128|r>>6&63]+wU[128|r&63]}o+=n.join(``)}return o};function DU(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function OU(e,t){if(XH(e)){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)}var kU={brackets(e){return String(e)+`[]`},comma:`comma`,indices(e,t){return String(e)+`[`+t+`]`},repeat(e){return String(e)}},AU=function(e,t){Array.prototype.push.apply(e,XH(t)?t:[t])},jU,MU={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:EU,encodeValuesOnly:!1,format:bU,formatter:xU,indices:!1,serializeDate(e){return(jU??=Function.prototype.call.bind(Date.prototype.toISOString))(e)},skipNulls:!1,strictNullHandling:!1};function NU(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`}var PU={};function FU(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){let v=e,y=_,b=0,x=!1;for(;(y=y.get(PU))!==void 0&&!x;){let t=y.get(e);if(b+=1,t!==void 0){if(t===b)throw RangeError(`Cyclic object value`);x=!0}y.get(PU)===void 0&&(b=0)}if(typeof l==`function`?v=l(t,v):v instanceof Date?v=f?.(v):n===`comma`&&XH(v)&&(v=OU(v,function(e){return e instanceof Date?f?.(e):e})),v===null){if(a)return c&&!h?c(t,MU.encoder,g,`key`,p):t;v=``}if(NU(v)||DU(v)){if(c){let e=h?t:c(t,MU.encoder,g,`key`,p);return[m?.(e)+`=`+m?.(c(v,MU.encoder,g,`value`,p))]}return[m?.(t)+`=`+m?.(String(v))]}let S=[];if(v===void 0)return S;let C;if(n===`comma`&&XH(v))h&&c&&(v=OU(v,c)),C=[{value:v.length>0?v.join(`,`)||null:void 0}];else if(XH(l))C=l;else{let e=Object.keys(v);C=u?e.sort(u):e}let w=s?String(t).replace(/\./g,`%2E`):String(t),ee=r&&XH(v)&&v.length===1?w+`[]`:w;if(i&&XH(v)&&v.length===0)return ee+`[]`;for(let t=0;t<C.length;++t){let y=C[t],x=typeof y==`object`&&y.value!==void 0?y.value:v[y];if(o&&x===null)continue;let w=d&&s?y.replace(/\./g,`%2E`):y,te=XH(v)?typeof n==`function`?n(ee,w):ee:ee+(d?`.`+w:`[`+w+`]`);_.set(e,b);let T=new WeakMap;T.set(PU,_),AU(S,FU(x,te,n,r,i,a,o,s,n===`comma`&&h&&XH(v)?null:c,l,u,d,f,p,m,h,g,T))}return S}function IU(e=MU){if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);let t=e.charset||MU.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);let n=bU;if(e.format!==void 0){if(!CU(SU,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}let r=SU[n],i=MU.filter;(typeof e.filter==`function`||XH(e.filter))&&(i=e.filter);let a;if(a=e.arrayFormat&&e.arrayFormat in kU?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:MU.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");let o=e.allowDots===void 0?e.encodeDotInKeys?!0:MU.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:MU.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:MU.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:MU.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?MU.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:MU.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:MU.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:MU.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:MU.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:MU.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:MU.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:MU.strictNullHandling}}function LU(e,t={}){let n=e,r=IU(t),i,a;typeof r.filter==`function`?(a=r.filter,n=a(``,n)):XH(r.filter)&&(a=r.filter,i=a);let o=[];if(typeof n!=`object`||!n)return``;let s=kU[r.arrayFormat],c=s===`comma`&&r.commaRoundTrip;i||=Object.keys(n),r.sort&&i.sort(r.sort);let l=new WeakMap;for(let e=0;e<i.length;++e){let t=i[e];r.skipNulls&&n[t]===null||AU(o,FU(n[t],t,s,c,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}let u=o.join(r.delimiter),d=r.addQueryPrefix===!0?`?`:``;return r.charsetSentinel&&(r.charset===`iso-8859-1`?d+=`utf8=%26%2310003%3B&`:d+=`utf8=%E2%9C%93&`),u.length>0?d+u:``}function RU(e){return LU(e,{arrayFormat:`brackets`})}function zU(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}var BU;function VU(e){let t;return(BU??=(t=new globalThis.TextEncoder,t.encode.bind(t)))(e)}var HU;function UU(e){let t;return(HU??=(t=new globalThis.TextDecoder,t.decode.bind(t)))(e)}var WU,GU,KU=class{constructor(){WU.set(this,void 0),GU.set(this,void 0),q(this,WU,new Uint8Array,`f`),q(this,GU,null,`f`)}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e==`string`?VU(e):e;q(this,WU,zU([J(this,WU,`f`),t]),`f`);let n=[],r;for(;(r=qU(J(this,WU,`f`),J(this,GU,`f`)))!=null;){if(r.carriage&&J(this,GU,`f`)==null){q(this,GU,r.index,`f`);continue}if(J(this,GU,`f`)!=null&&(r.index!==J(this,GU,`f`)+1||r.carriage)){n.push(UU(J(this,WU,`f`).subarray(0,J(this,GU,`f`)-1))),q(this,WU,J(this,WU,`f`).subarray(J(this,GU,`f`)),`f`),q(this,GU,null,`f`);continue}let e=J(this,GU,`f`)===null?r.preceding:r.preceding-1,t=UU(J(this,WU,`f`).subarray(0,e));n.push(t),q(this,WU,J(this,WU,`f`).subarray(r.index),`f`),q(this,GU,null,`f`)}return n}flush(){return J(this,WU,`f`).length?this.decode(`
|
|
62
|
+
`):[]}};WU=new WeakMap,GU=new WeakMap,KU.NEWLINE_CHARS=new Set([`
|
|
63
|
+
`,`\r`]),KU.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function qU(e,t){for(let n=t??0;n<e.length;n++){if(e[n]===10)return{preceding:n,index:n+1,carriage:!1};if(e[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function JU(e){for(let t=0;t<e.length-1;t++){if(e[t]===10&&e[t+1]===10||e[t]===13&&e[t+1]===13)return t+2;if(e[t]===13&&e[t+1]===10&&t+3<e.length&&e[t+2]===13&&e[t+3]===10)return t+4}return-1}var YU={off:0,error:200,warn:300,info:400,debug:500},XU=(e,t,n)=>{if(e){if(eU(YU,e))return e;tW(n).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(YU))}`)}};function ZU(){}function QU(e,t,n){return!t||YU[e]>YU[n]?ZU:t[e].bind(t)}var $U={error:ZU,warn:ZU,info:ZU,debug:ZU},eW=new WeakMap;function tW(e){let t=e.logger,n=e.logLevel??`off`;if(!t)return $U;let r=eW.get(t);if(r&&r[0]===n)return r[1];let i={error:QU(`error`,t,n),warn:QU(`warn`,t,n),info:QU(`info`,t,n),debug:QU(`debug`,t,n)};return eW.set(t,[n,i]),i}var nW=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([e,t])=>[e,e.toLowerCase()===`authorization`||e.toLowerCase()===`cookie`||e.toLowerCase()===`set-cookie`?`***`:t])),`retryOfRequestLogID`in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e),rW,iW=class e{constructor(e,t,n){this.iterator=e,rW.set(this,void 0),this.controller=t,q(this,rW,n,`f`)}static fromSSEResponse(t,n,r,i){let a=!1,o=r?tW(r):console;async function*s(){if(a)throw new Y("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");a=!0;let e=!1;try{for await(let r of aW(t,n))if(!e){if(r.data.startsWith(`[DONE]`)){e=!0;continue}if(r.event===null||!r.event.startsWith(`thread.`)){let e;try{e=JSON.parse(r.data)}catch(e){throw o.error(`Could not parse message into JSON:`,r.data),o.error(`From chunk:`,r.raw),e}if(e&&e.error)throw new jH(void 0,e.error,void 0,t.headers);yield i?{event:r.event,data:e}:e}else{let e;try{e=JSON.parse(r.data)}catch(e){throw console.error(`Could not parse message into JSON:`,r.data),console.error(`From chunk:`,r.raw),e}if(r.event==`error`)throw new jH(void 0,e.error,e.message,void 0);yield{event:r.event,data:e}}}e=!0}catch(e){if(kH(e))return;throw e}finally{e||n.abort()}}return new e(s,n,r)}static fromReadableStream(t,n,r){let i=!1;async function*a(){let e=new KU,n=_U(t);for await(let t of n)for(let n of e.decode(t))yield n;for(let t of e.flush())yield t}async function*o(){if(i)throw new Y("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let e=!1;try{for await(let t of a())e||t&&(yield JSON.parse(t));e=!0}catch(e){if(kH(e))return;throw e}finally{e||n.abort()}}return new e(o,n,r)}[(rW=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],n=[],r=this.iterator(),i=e=>({next:()=>{if(e.length===0){let e=r.next();t.push(e),n.push(e)}return e.shift()}});return[new e(()=>i(t),this.controller,J(this,rW,`f`)),new e(()=>i(n),this.controller,J(this,rW,`f`))]}toReadableStream(){let e=this,t;return hU({async start(){t=e[Symbol.asyncIterator]()},async pull(e){try{let{value:n,done:r}=await t.next();if(r)return e.close();let i=VU(JSON.stringify(n)+`
|
|
64
|
+
`);e.enqueue(i)}catch(t){e.error(t)}},async cancel(){await t.return?.()}})}};async function*aW(e,t){if(!e.body)throw t.abort(),globalThis.navigator!==void 0&&globalThis.navigator.product===`ReactNative`?new Y(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`):new Y(`Attempted to iterate over a response with no body`);let n=new sW,r=new KU,i=_U(e.body);for await(let e of oW(i))for(let t of r.decode(e)){let e=n.decode(t);e&&(yield e)}for(let e of r.flush()){let t=n.decode(e);t&&(yield t)}}async function*oW(e){let t=new Uint8Array;for await(let n of e){if(n==null)continue;let e=n instanceof ArrayBuffer?new Uint8Array(n):typeof n==`string`?VU(n):n,r=new Uint8Array(t.length+e.length);r.set(t),r.set(e,t.length),t=r;let i;for(;(i=JU(t))!==-1;)yield t.slice(0,i),t=t.slice(i)}t.length>0&&(yield t)}var sW=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith(`\r`)&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join(`
|
|
65
|
+
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(`:`))return null;let[t,n,r]=cW(e,`:`);return r.startsWith(` `)&&(r=r.substring(1)),t===`event`?this.event=r:t===`data`&&this.data.push(r),null}};function cW(e,t){let n=e.indexOf(t);return n===-1?[e,``,``]:[e.substring(0,n),t,e.substring(n+t.length)]}async function lW(e,t){let{response:n,requestLogID:r,retryOfRequestLogID:i,startTime:a}=t,o=await(async()=>{if(t.options.stream)return tW(e).debug(`response`,n.status,n.url,n.headers,n.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(n,t.controller,e,t.options.__synthesizeEventData):iW.fromSSEResponse(n,t.controller,e,t.options.__synthesizeEventData);if(n.status===204)return null;if(t.options.__binaryResponse)return n;let r=n.headers.get(`content-type`)?.split(`;`)[0]?.trim();return r?.includes(`application/json`)||r?.endsWith(`+json`)?n.headers.get(`content-length`)===`0`?void 0:uW(await n.json(),n):await n.text()})();return tW(e).debug(`[${r}] response parsed`,nW({retryOfRequestLogID:i,url:n.url,status:n.status,body:o,durationMs:Date.now()-a})),o}function uW(e,t){return!e||typeof e!=`object`||Array.isArray(e)?e:Object.defineProperty(e,`_request_id`,{value:t.headers.get(`x-request-id`),enumerable:!1})}var dW,fW=class e extends Promise{constructor(e,t,n=lW){super(e=>{e(null)}),this.responsePromise=t,this.parseResponse=n,dW.set(this,void 0),q(this,dW,e,`f`)}_thenUnwrap(t){return new e(J(this,dW,`f`),this.responsePromise,async(e,n)=>uW(t(await this.parseResponse(e,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t,request_id:t.headers.get(`x-request-id`)}}parse(){return this.parsedPromise||=this.responsePromise.then(e=>this.parseResponse(J(this,dW,`f`),e)),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};dW=new WeakMap;var pW,mW=class{constructor(e,t,n,r){pW.set(this,void 0),q(this,pW,e,`f`),this.options=r,this.response=t,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new Y("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await J(this,pW,`f`).requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(pW=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let t of e.getPaginatedItems())yield t}},hW=class extends fW{constructor(e,t,n){super(e,t,async(e,t)=>new n(e,t.response,await lW(e,t),t.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let t of e)yield t}},gW=class extends mW{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[],this.object=n.object}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){return null}},_W=class extends mW{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[],this.has_more=n.has_more||!1}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.getPaginatedItems(),t=e[e.length-1]?.id;return t?{...this.options,query:{...QH(this.options.query),after:t}}:null}},vW=class extends mW{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[],this.has_more=n.has_more||!1,this.last_id=n.last_id||``}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.last_id;return e?{...this.options,query:{...QH(this.options.query),after:e}}:null}},yW={jwt:`urn:ietf:params:oauth:token-type:jwt`,id:`urn:ietf:params:oauth:token-type:id_token`},bW=`urn:ietf:params:oauth:grant-type:token-exchange`,xW=class{constructor(e,t){this.cachedToken=null,this.refreshPromise=null,this.tokenExchangeUrl=`https://auth.openai.com/oauth/token`,this.config=e,this.fetch=t??mU()}async getToken(){if(!this.cachedToken||this.isTokenExpired(this.cachedToken)){if(this.refreshPromise)return await this.refreshPromise;this.refreshPromise=this.refreshToken();try{return await this.refreshPromise}finally{this.refreshPromise=null}}return this.needsRefresh(this.cachedToken)&&!this.refreshPromise&&(this.refreshPromise=this.refreshToken().finally(()=>{this.refreshPromise=null})),this.cachedToken.token}async refreshToken(){let e=await this.config.provider.getToken(),t=await this.fetch(this.tokenExchangeUrl,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({grant_type:bW,client_id:this.config.clientId,subject_token:e,subject_token_type:yW[this.config.provider.tokenType],identity_provider_id:this.config.identityProviderId,service_account_id:this.config.serviceAccountId})});if(!t.ok){let e=await t.text(),n;try{n=JSON.parse(e)}catch{}throw t.status===400||t.status===401||t.status===403?new KH(t.status,n,t.headers):jH.generate(t.status,n,`Token exchange failed with status ${t.status}`,t.headers)}let n=await t.json(),r=n.expires_in||3600,i=Date.now()+r*1e3;return this.cachedToken={token:n.access_token,expiresAt:i},n.access_token}isTokenExpired(e){return Date.now()>=e.expiresAt}needsRefresh(e){let t=(this.config.refreshBufferSeconds??1200)*1e3;return Date.now()>=e.expiresAt-t}invalidateToken(){this.cachedToken=null,this.refreshPromise=null}},SW=()=>{if(typeof File>`u`){let{process:e}=globalThis,t=typeof e?.versions?.node==`string`&&parseInt(e.versions.node.split(`.`))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(t?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":``))}};function CW(e,t,n){return SW(),new File(e,t??`unknown_file`,n)}function wW(e){return(typeof e==`object`&&!!e&&(`name`in e&&e.name&&String(e.name)||`url`in e&&e.url&&String(e.url)||`filename`in e&&e.filename&&String(e.filename)||`path`in e&&e.path&&String(e.path))||``).split(/[\\/]/).pop()||void 0}var TW=e=>typeof e==`object`&&!!e&&typeof e[Symbol.asyncIterator]==`function`,EW=async(e,t)=>NW(e.body)?{...e,body:await AW(e.body,t)}:e,DW=async(e,t)=>({...e,body:await AW(e.body,t)}),OW=new WeakMap;function kW(e){let t=typeof e==`function`?e:e.fetch,n=OW.get(t);if(n)return n;let r=(async()=>{try{let e=`Response`in t?t.Response:(await t(`data:,`)).constructor,n=new FormData;return n.toString()!==await new e(n).text()}catch{return!0}})();return OW.set(t,r),r}var AW=async(e,t)=>{if(!await kW(t))throw TypeError(`The provided fetch function does not support file uploads with the current global FormData class.`);let n=new FormData;return await Promise.all(Object.entries(e||{}).map(([e,t])=>PW(n,e,t))),n},jW=e=>e instanceof Blob&&`name`in e,MW=e=>typeof e==`object`&&!!e&&(e instanceof Response||TW(e)||jW(e)),NW=e=>{if(MW(e))return!0;if(Array.isArray(e))return e.some(NW);if(e&&typeof e==`object`){for(let t in e)if(NW(e[t]))return!0}return!1},PW=async(e,t,n)=>{if(n!==void 0){if(n==null)throw TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if(typeof n==`string`||typeof n==`number`||typeof n==`boolean`)e.append(t,String(n));else if(n instanceof Response)e.append(t,CW([await n.blob()],wW(n)));else if(TW(n))e.append(t,CW([await new Response(gU(n)).blob()],wW(n)));else if(jW(n))e.append(t,n,wW(n));else if(Array.isArray(n))await Promise.all(n.map(n=>PW(e,t+`[]`,n)));else if(typeof n==`object`)await Promise.all(Object.entries(n).map(([n,r])=>PW(e,`${t}[${n}]`,r)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${n} instead`)}},FW=e=>typeof e==`object`&&!!e&&typeof e.size==`number`&&typeof e.type==`string`&&typeof e.text==`function`&&typeof e.slice==`function`&&typeof e.arrayBuffer==`function`,IW=e=>typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.lastModified==`number`&&FW(e),LW=e=>typeof e==`object`&&!!e&&typeof e.url==`string`&&typeof e.blob==`function`;async function RW(e,t,n){if(SW(),e=await e,IW(e))return e instanceof File?e:CW([await e.arrayBuffer()],e.name);if(LW(e)){let r=await e.blob();return t||=new URL(e.url).pathname.split(/[\\/]/).pop(),CW(await zW(r),t,n)}let r=await zW(e);if(t||=wW(e),!n?.type){let e=r.find(e=>typeof e==`object`&&`type`in e&&e.type);typeof e==`string`&&(n={...n,type:e})}return CW(r,t,n)}async function zW(e){let t=[];if(typeof e==`string`||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(FW(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else if(TW(e))for await(let n of e)t.push(...await zW(n));else{let t=e?.constructor?.name;throw Error(`Unexpected data type: ${typeof e}${t?`; constructor: ${t}`:``}${BW(e)}`)}return t}function BW(e){return typeof e!=`object`||!e?``:`; props: [${Object.getOwnPropertyNames(e).map(e=>`"${e}"`).join(`, `)}]`}var X=class{constructor(e){this._client=e}};function VW(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var HW=Object.freeze(Object.create(null)),Z=((e=VW)=>function(t,...n){if(t.length===1)return t[0];let r=!1,i=[],a=t.reduce((t,a,o)=>{/[?#]/.test(a)&&(r=!0);let s=n[o],c=(r?encodeURIComponent:e)(``+s);return o!==n.length&&(s==null||typeof s==`object`&&s.toString===Object.getPrototypeOf(Object.getPrototypeOf(s.hasOwnProperty??HW)??HW)?.toString)&&(c=s+``,i.push({start:t.length+a.length,length:c.length,error:`Value of type ${Object.prototype.toString.call(s).slice(8,-1)} is not a valid path parameter`})),t+a+(o===n.length?``:c)},``),o=a.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=s.exec(o))!==null;)i.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can\'t be safely passed as a path parameter`});if(i.sort((e,t)=>e.start-t.start),i.length>0){let e=0,t=i.reduce((t,n)=>{let r=` `.repeat(n.start-e),i=`^`.repeat(n.length);return e=n.start+n.length,t+r+i},``);throw new Y(`Path parameters result in path with invalid segments:\n${i.map(e=>e.error).join(`
|
|
66
|
+
`)}\n${a}\n${t}`)}return a})(VW),UW=class extends X{list(e,t={},n){return this._client.getAPIList(Z`/chat/completions/${e}/messages`,_W,{query:t,...n})}};function WW(e){return e!==void 0&&`function`in e&&e.function!==void 0}function GW(e){return e?.$brand===`auto-parseable-response-format`}function KW(e){return e?.$brand===`auto-parseable-tool`}function qW(e,t){return!t||!QW(t)?{...e,choices:e.choices.map(e=>($W(e.message.tool_calls),{...e,message:{...e.message,parsed:null,...e.message.tool_calls?{tool_calls:e.message.tool_calls}:void 0}}))}:JW(e,t)}function JW(e,t){let n=e.choices.map(e=>{if(e.finish_reason===`length`)throw new UH;if(e.finish_reason===`content_filter`)throw new WH;return $W(e.message.tool_calls),{...e,message:{...e.message,...e.message.tool_calls?{tool_calls:e.message.tool_calls?.map(e=>XW(t,e))??void 0}:void 0,parsed:e.message.content&&!e.message.refusal?YW(t,e.message.content):null}}});return{...e,choices:n}}function YW(e,t){return e.response_format?.type===`json_schema`&&e.response_format?.type===`json_schema`?`$parseRaw`in e.response_format?e.response_format.$parseRaw(t):JSON.parse(t):null}function XW(e,t){let n=e.tools?.find(e=>WW(e)&&e.function?.name===t.function.name);return{...t,function:{...t.function,parsed_arguments:KW(n)?n.$parseRaw(t.function.arguments):n?.function.strict?JSON.parse(t.function.arguments):null}}}function ZW(e,t){if(!e||!(`tools`in e)||!e.tools)return!1;let n=e.tools?.find(e=>WW(e)&&e.function?.name===t.function.name);return WW(n)&&(KW(n)||n?.function.strict||!1)}function QW(e){return GW(e.response_format)?!0:e.tools?.some(e=>KW(e)||e.type===`function`&&e.function.strict===!0)??!1}function $W(e){for(let t of e||[])if(t.type!==`function`)throw new Y(`Currently only \`function\` tool calls are supported; Received \`${t.type}\``)}function eG(e){for(let t of e??[]){if(t.type!==`function`)throw new Y(`Currently only \`function\` tool types support auto-parsing; Received \`${t.type}\``);if(t.function.strict!==!0)throw new Y(`The \`${t.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`)}}var tG=e=>e?.role===`assistant`,nG=e=>e?.role===`tool`,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG=class{constructor(){rG.add(this),this.controller=new AbortController,iG.set(this,void 0),aG.set(this,()=>{}),oG.set(this,()=>{}),sG.set(this,void 0),cG.set(this,()=>{}),lG.set(this,()=>{}),uG.set(this,{}),dG.set(this,!1),fG.set(this,!1),pG.set(this,!1),mG.set(this,!1),q(this,iG,new Promise((e,t)=>{q(this,aG,e,`f`),q(this,oG,t,`f`)}),`f`),q(this,sG,new Promise((e,t)=>{q(this,cG,e,`f`),q(this,lG,t,`f`)}),`f`),J(this,iG,`f`).catch(()=>{}),J(this,sG,`f`).catch(()=>{})}_run(e){setTimeout(()=>{e().then(()=>{this._emitFinal(),this._emit(`end`)},J(this,rG,`m`,hG).bind(this))},0)}_connected(){this.ended||(J(this,aG,`f`).call(this),this._emit(`connect`))}get ended(){return J(this,dG,`f`)}get errored(){return J(this,fG,`f`)}get aborted(){return J(this,pG,`f`)}abort(){this.controller.abort()}on(e,t){return(J(this,uG,`f`)[e]||(J(this,uG,`f`)[e]=[])).push({listener:t}),this}off(e,t){let n=J(this,uG,`f`)[e];if(!n)return this;let r=n.findIndex(e=>e.listener===t);return r>=0&&n.splice(r,1),this}once(e,t){return(J(this,uG,`f`)[e]||(J(this,uG,`f`)[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,n)=>{q(this,mG,!0,`f`),e!==`error`&&this.once(`error`,n),this.once(e,t)})}async done(){q(this,mG,!0,`f`),await J(this,sG,`f`)}_emit(e,...t){if(J(this,dG,`f`))return;e===`end`&&(q(this,dG,!0,`f`),J(this,cG,`f`).call(this));let n=J(this,uG,`f`)[e];if(n&&(J(this,uG,`f`)[e]=n.filter(e=>!e.once),n.forEach(({listener:e})=>e(...t))),e===`abort`){let e=t[0];!J(this,mG,`f`)&&!n?.length&&Promise.reject(e),J(this,oG,`f`).call(this,e),J(this,lG,`f`).call(this,e),this._emit(`end`);return}if(e===`error`){let e=t[0];!J(this,mG,`f`)&&!n?.length&&Promise.reject(e),J(this,oG,`f`).call(this,e),J(this,lG,`f`).call(this,e),this._emit(`end`)}}_emitFinal(){}};iG=new WeakMap,aG=new WeakMap,oG=new WeakMap,sG=new WeakMap,cG=new WeakMap,lG=new WeakMap,uG=new WeakMap,dG=new WeakMap,fG=new WeakMap,pG=new WeakMap,mG=new WeakMap,rG=new WeakSet,hG=function(e){if(q(this,fG,!0,`f`),e instanceof Error&&e.name===`AbortError`&&(e=new MH),e instanceof MH)return q(this,pG,!0,`f`),this._emit(`abort`,e);if(e instanceof Y)return this._emit(`error`,e);if(e instanceof Error){let t=new Y(e.message);return t.cause=e,this._emit(`error`,t)}return this._emit(`error`,new Y(String(e)))};function _G(e){return typeof e.parse==`function`}var vG,yG,bG,xG,SG,CG,wG,TG,EG=10,DG=class extends gG{constructor(){super(...arguments),vG.add(this),this._chatCompletions=[],this.messages=[]}_addChatCompletion(e){this._chatCompletions.push(e),this._emit(`chatCompletion`,e);let t=e.choices[0]?.message;return t&&this._addMessage(t),e}_addMessage(e,t=!0){if(`content`in e||(e.content=null),this.messages.push(e),t){if(this._emit(`message`,e),nG(e)&&e.content)this._emit(`functionToolCallResult`,e.content);else if(tG(e)&&e.tool_calls)for(let t of e.tool_calls)t.type===`function`&&this._emit(`functionToolCall`,t.function)}}async finalChatCompletion(){await this.done();let e=this._chatCompletions[this._chatCompletions.length-1];if(!e)throw new Y(`stream ended without producing a ChatCompletion`);return e}async finalContent(){return await this.done(),J(this,vG,`m`,yG).call(this)}async finalMessage(){return await this.done(),J(this,vG,`m`,bG).call(this)}async finalFunctionToolCall(){return await this.done(),J(this,vG,`m`,xG).call(this)}async finalFunctionToolCallResult(){return await this.done(),J(this,vG,`m`,SG).call(this)}async totalUsage(){return await this.done(),J(this,vG,`m`,CG).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emitFinal(){let e=this._chatCompletions[this._chatCompletions.length-1];e&&this._emit(`finalChatCompletion`,e);let t=J(this,vG,`m`,bG).call(this);t&&this._emit(`finalMessage`,t);let n=J(this,vG,`m`,yG).call(this);n&&this._emit(`finalContent`,n);let r=J(this,vG,`m`,xG).call(this);r&&this._emit(`finalFunctionToolCall`,r);let i=J(this,vG,`m`,SG).call(this);i!=null&&this._emit(`finalFunctionToolCallResult`,i),this._chatCompletions.some(e=>e.usage)&&this._emit(`totalUsage`,J(this,vG,`m`,CG).call(this))}async _createChatCompletion(e,t,n){let r=n?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener(`abort`,()=>this.controller.abort())),J(this,vG,`m`,wG).call(this,t);let i=await e.chat.completions.create({...t,stream:!1},{...n,signal:this.controller.signal});return this._connected(),this._addChatCompletion(JW(i,t))}async _runChatCompletion(e,t,n){for(let e of t.messages)this._addMessage(e,!1);return await this._createChatCompletion(e,t,n)}async _runTools(e,t,n){let r=`tool`,{tool_choice:i=`auto`,stream:a,...o}=t,s=typeof i!=`string`&&i.type===`function`&&i?.function?.name,{maxChatCompletions:c=EG}=n||{},l=t.tools.map(e=>{if(KW(e)){if(!e.$callback)throw new Y("Tool given to `.runTools()` that does not have an associated function");return{type:`function`,function:{function:e.$callback,name:e.function.name,description:e.function.description||``,parameters:e.function.parameters,parse:e.$parseRaw,strict:!0}}}return e}),u={};for(let e of l)e.type===`function`&&(u[e.function.name||e.function.function.name]=e.function);let d=`tools`in t?l.map(e=>e.type===`function`?{type:`function`,function:{name:e.function.name||e.function.function.name,parameters:e.function.parameters,description:e.function.description,strict:e.function.strict}}:e):void 0;for(let e of t.messages)this._addMessage(e,!1);for(let t=0;t<c;++t){let t=(await this._createChatCompletion(e,{...o,tool_choice:i,tools:d,messages:[...this.messages]},n)).choices[0]?.message;if(!t)throw new Y(`missing message in ChatCompletion response`);if(!t.tool_calls?.length)return;for(let e of t.tool_calls){if(e.type!==`function`)continue;let t=e.id,{name:n,arguments:i}=e.function,a=u[n];if(!a){let e=`Invalid tool_call: ${JSON.stringify(n)}. Available options are: ${Object.keys(u).map(e=>JSON.stringify(e)).join(`, `)}. Please try again`;this._addMessage({role:r,tool_call_id:t,content:e});continue}else if(s&&s!==n){let e=`Invalid tool_call: ${JSON.stringify(n)}. ${JSON.stringify(s)} requested. Please try again`;this._addMessage({role:r,tool_call_id:t,content:e});continue}let o;try{o=_G(a)?await a.parse(i):i}catch(e){let n=e instanceof Error?e.message:String(e);this._addMessage({role:r,tool_call_id:t,content:n});continue}let c=await a.function(o,this),l=J(this,vG,`m`,TG).call(this,c);if(this._addMessage({role:r,tool_call_id:t,content:l}),s)return}}}};vG=new WeakSet,yG=function(){return J(this,vG,`m`,bG).call(this).content??null},bG=function(){let e=this.messages.length;for(;e-- >0;){let t=this.messages[e];if(tG(t))return{...t,content:t.content??null,refusal:t.refusal??null}}throw new Y(`stream ended without producing a ChatCompletionMessage with role=assistant`)},xG=function(){for(let e=this.messages.length-1;e>=0;e--){let t=this.messages[e];if(tG(t)&&t?.tool_calls?.length)return t.tool_calls.filter(e=>e.type===`function`).at(-1)?.function}},SG=function(){for(let e=this.messages.length-1;e>=0;e--){let t=this.messages[e];if(nG(t)&&t.content!=null&&typeof t.content==`string`&&this.messages.some(e=>e.role===`assistant`&&e.tool_calls?.some(e=>e.type===`function`&&e.id===t.tool_call_id)))return t.content}},CG=function(){let e={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(let{usage:t}of this._chatCompletions)t&&(e.completion_tokens+=t.completion_tokens,e.prompt_tokens+=t.prompt_tokens,e.total_tokens+=t.total_tokens);return e},wG=function(e){if(e.n!=null&&e.n>1)throw new Y(`ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.`)},TG=function(e){return typeof e==`string`?e:e===void 0?`undefined`:JSON.stringify(e)};var OG=class e extends DG{static runTools(t,n,r){let i=new e,a={...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`runTools`}};return i._run(()=>i._runTools(t,n,a)),i}_addMessage(e,t=!0){super._addMessage(e,t),tG(e)&&e.content&&this._emit(`content`,e.content)}},kG=1,AG=2,jG=4,MG=8,NG=16,PG=32,FG=64,IG=128,LG=256,RG=IG|LG,zG=496,BG=AG|497,VG=jG|MG,HG={STR:kG,NUM:AG,ARR:jG,OBJ:MG,NULL:NG,BOOL:PG,NAN:FG,INFINITY:IG,MINUS_INFINITY:LG,INF:RG,SPECIAL:zG,ATOM:BG,COLLECTION:VG,ALL:BG|VG},UG=class extends Error{},WG=class extends Error{};function GG(e,t=HG.ALL){if(typeof e!=`string`)throw TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw Error(`${e} is empty`);return KG(e.trim(),t)}var KG=(e,t)=>{let n=e.length,r=0,i=e=>{throw new UG(`${e} at position ${r}`)},a=e=>{throw new WG(`${e} at position ${r}`)},o=()=>(d(),r>=n&&i(`Unexpected end of input`),e[r]===`"`?s():e[r]===`{`?c():e[r]===`[`?l():e.substring(r,r+4)===`null`||HG.NULL&t&&n-r<4&&`null`.startsWith(e.substring(r))?(r+=4,null):e.substring(r,r+4)===`true`||HG.BOOL&t&&n-r<4&&`true`.startsWith(e.substring(r))?(r+=4,!0):e.substring(r,r+5)===`false`||HG.BOOL&t&&n-r<5&&`false`.startsWith(e.substring(r))?(r+=5,!1):e.substring(r,r+8)===`Infinity`||HG.INFINITY&t&&n-r<8&&`Infinity`.startsWith(e.substring(r))?(r+=8,1/0):e.substring(r,r+9)===`-Infinity`||HG.MINUS_INFINITY&t&&1<n-r&&n-r<9&&`-Infinity`.startsWith(e.substring(r))?(r+=9,-1/0):e.substring(r,r+3)===`NaN`||HG.NAN&t&&n-r<3&&`NaN`.startsWith(e.substring(r))?(r+=3,NaN):u()),s=()=>{let o=r,s=!1;for(r++;r<n&&(e[r]!==`"`||s&&e[r-1]===`\\`);)s=e[r]===`\\`?!s:!1,r++;if(e.charAt(r)==`"`)try{return JSON.parse(e.substring(o,++r-Number(s)))}catch(e){a(String(e))}else if(HG.STR&t)try{return JSON.parse(e.substring(o,r-Number(s))+`"`)}catch{return JSON.parse(e.substring(o,e.lastIndexOf(`\\`))+`"`)}i(`Unterminated string literal`)},c=()=>{r++,d();let a={};try{for(;e[r]!==`}`;){if(d(),r>=n&&HG.OBJ&t)return a;let i=s();d(),r++;try{let e=o();Object.defineProperty(a,i,{value:e,writable:!0,enumerable:!0,configurable:!0})}catch(e){if(HG.OBJ&t)return a;throw e}d(),e[r]===`,`&&r++}}catch{if(HG.OBJ&t)return a;i(`Expected '}' at end of object`)}return r++,a},l=()=>{r++;let n=[];try{for(;e[r]!==`]`;)n.push(o()),d(),e[r]===`,`&&r++}catch{if(HG.ARR&t)return n;i(`Expected ']' at end of array`)}return r++,n},u=()=>{if(r===0){e===`-`&&HG.NUM&t&&i(`Not sure what '-' is`);try{return JSON.parse(e)}catch(n){if(HG.NUM&t)try{return e[e.length-1]===`.`?JSON.parse(e.substring(0,e.lastIndexOf(`.`))):JSON.parse(e.substring(0,e.lastIndexOf(`e`)))}catch{}a(String(n))}}let o=r;for(e[r]===`-`&&r++;e[r]&&!`,]}`.includes(e[r]);)r++;r==n&&!(HG.NUM&t)&&i(`Unterminated number literal`);try{return JSON.parse(e.substring(o,r))}catch{e.substring(o,r)===`-`&&HG.NUM&t&&i(`Not sure what '-' is`);try{return JSON.parse(e.substring(o,e.lastIndexOf(`e`)))}catch(e){a(String(e))}}},d=()=>{for(;r<n&&`
|
|
67
|
+
\r `.includes(e[r]);)r++};return o()},qG=e=>GG(e,HG.ALL^HG.NUM),JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK=class e extends DG{constructor(e){super(),JG.add(this),YG.set(this,void 0),XG.set(this,void 0),ZG.set(this,void 0),q(this,YG,e,`f`),q(this,XG,[],`f`)}get currentChatCompletionSnapshot(){return J(this,ZG,`f`)}static fromReadableStream(t){let n=new e(null);return n._run(()=>n._fromReadableStream(t)),n}static createChatCompletion(t,n,r){let i=new e(n);return i._run(()=>i._runChatCompletion(t,{...n,stream:!0},{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`stream`}})),i}async _createChatCompletion(e,t,n){super._createChatCompletion;let r=n?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener(`abort`,()=>this.controller.abort())),J(this,JG,`m`,QG).call(this);let i=await e.chat.completions.create({...t,stream:!0},{...n,signal:this.controller.signal});this._connected();for await(let e of i)J(this,JG,`m`,eK).call(this,e);if(i.controller.signal?.aborted)throw new MH;return this._addChatCompletion(J(this,JG,`m`,rK).call(this))}async _fromReadableStream(e,t){let n=t?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener(`abort`,()=>this.controller.abort())),J(this,JG,`m`,QG).call(this),this._connected();let r=iW.fromReadableStream(e,this.controller),i;for await(let e of r)i&&i!==e.id&&this._addChatCompletion(J(this,JG,`m`,rK).call(this)),J(this,JG,`m`,eK).call(this,e),i=e.id;if(r.controller.signal?.aborted)throw new MH;return this._addChatCompletion(J(this,JG,`m`,rK).call(this))}[(YG=new WeakMap,XG=new WeakMap,ZG=new WeakMap,JG=new WeakSet,QG=function(){this.ended||q(this,ZG,void 0,`f`)},$G=function(e){let t=J(this,XG,`f`)[e.index];return t||(t={content_done:!1,refusal_done:!1,logprobs_content_done:!1,logprobs_refusal_done:!1,done_tool_calls:new Set,current_tool_call_index:null},J(this,XG,`f`)[e.index]=t,t)},eK=function(e){if(this.ended)return;let t=J(this,JG,`m`,aK).call(this,e);this._emit(`chunk`,e,t);for(let n of e.choices){let e=t.choices[n.index];n.delta.content!=null&&e.message?.role===`assistant`&&e.message?.content&&(this._emit(`content`,n.delta.content,e.message.content),this._emit(`content.delta`,{delta:n.delta.content,snapshot:e.message.content,parsed:e.message.parsed})),n.delta.refusal!=null&&e.message?.role===`assistant`&&e.message?.refusal&&this._emit(`refusal.delta`,{delta:n.delta.refusal,snapshot:e.message.refusal}),n.logprobs?.content!=null&&e.message?.role===`assistant`&&this._emit(`logprobs.content.delta`,{content:n.logprobs?.content,snapshot:e.logprobs?.content??[]}),n.logprobs?.refusal!=null&&e.message?.role===`assistant`&&this._emit(`logprobs.refusal.delta`,{refusal:n.logprobs?.refusal,snapshot:e.logprobs?.refusal??[]});let r=J(this,JG,`m`,$G).call(this,e);e.finish_reason&&(J(this,JG,`m`,nK).call(this,e),r.current_tool_call_index!=null&&J(this,JG,`m`,tK).call(this,e,r.current_tool_call_index));for(let t of n.delta.tool_calls??[])r.current_tool_call_index!==t.index&&(J(this,JG,`m`,nK).call(this,e),r.current_tool_call_index!=null&&J(this,JG,`m`,tK).call(this,e,r.current_tool_call_index)),r.current_tool_call_index=t.index;for(let t of n.delta.tool_calls??[]){let n=e.message.tool_calls?.[t.index];n?.type&&(n?.type===`function`?this._emit(`tool_calls.function.arguments.delta`,{name:n.function?.name,index:t.index,arguments:n.function.arguments,parsed_arguments:n.function.parsed_arguments,arguments_delta:t.function?.arguments??``}):n?.type)}}},tK=function(e,t){if(J(this,JG,`m`,$G).call(this,e).done_tool_calls.has(t))return;let n=e.message.tool_calls?.[t];if(!n)throw Error(`no tool call snapshot`);if(!n.type)throw Error("tool call snapshot missing `type`");if(n.type===`function`){let e=J(this,YG,`f`)?.tools?.find(e=>WW(e)&&e.function.name===n.function.name);this._emit(`tool_calls.function.arguments.done`,{name:n.function.name,index:t,arguments:n.function.arguments,parsed_arguments:KW(e)?e.$parseRaw(n.function.arguments):e?.function.strict?JSON.parse(n.function.arguments):null})}else n.type},nK=function(e){let t=J(this,JG,`m`,$G).call(this,e);if(e.message.content&&!t.content_done){t.content_done=!0;let n=J(this,JG,`m`,iK).call(this);this._emit(`content.done`,{content:e.message.content,parsed:n?n.$parseRaw(e.message.content):null})}e.message.refusal&&!t.refusal_done&&(t.refusal_done=!0,this._emit(`refusal.done`,{refusal:e.message.refusal})),e.logprobs?.content&&!t.logprobs_content_done&&(t.logprobs_content_done=!0,this._emit(`logprobs.content.done`,{content:e.logprobs.content})),e.logprobs?.refusal&&!t.logprobs_refusal_done&&(t.logprobs_refusal_done=!0,this._emit(`logprobs.refusal.done`,{refusal:e.logprobs.refusal}))},rK=function(){if(this.ended)throw new Y(`stream has ended, this shouldn't happen`);let e=J(this,ZG,`f`);if(!e)throw new Y(`request ended without sending any chunks`);return q(this,ZG,void 0,`f`),q(this,XG,[],`f`),sK(e,J(this,YG,`f`))},iK=function(){let e=J(this,YG,`f`)?.response_format;return GW(e)?e:null},aK=function(e){var t,n,r,i;let a=J(this,ZG,`f`),{choices:o,...s}=e;a?Object.assign(a,s):a=q(this,ZG,{...s,choices:[]},`f`);for(let{delta:o,finish_reason:s,index:c,logprobs:l=null,...u}of e.choices){let e=a.choices[c];if(e||=a.choices[c]={finish_reason:s,index:c,message:{},logprobs:l,...u},l)if(!e.logprobs)e.logprobs=Object.assign({},l);else{let{content:r,refusal:i,...a}=l;Object.assign(e.logprobs,a),r&&((t=e.logprobs).content??(t.content=[]),e.logprobs.content.push(...r)),i&&((n=e.logprobs).refusal??(n.refusal=[]),e.logprobs.refusal.push(...i))}if(s&&(e.finish_reason=s,J(this,YG,`f`)&&QW(J(this,YG,`f`)))){if(s===`length`)throw new UH;if(s===`content_filter`)throw new WH}if(Object.assign(e,u),!o)continue;let{content:d,refusal:f,function_call:p,role:m,tool_calls:h,...g}=o;if(Object.assign(e.message,g),f&&(e.message.refusal=(e.message.refusal||``)+f),m&&(e.message.role=m),p&&(e.message.function_call?(p.name&&(e.message.function_call.name=p.name),p.arguments&&((r=e.message.function_call).arguments??(r.arguments=``),e.message.function_call.arguments+=p.arguments)):e.message.function_call=p),d&&(e.message.content=(e.message.content||``)+d,!e.message.refusal&&J(this,JG,`m`,iK).call(this)&&(e.message.parsed=qG(e.message.content))),h){e.message.tool_calls||(e.message.tool_calls=[]);for(let{index:t,id:n,type:r,function:a,...o}of h){let s=(i=e.message.tool_calls)[t]??(i[t]={});Object.assign(s,o),n&&(s.id=n),r&&(s.type=r),a&&(s.function??={name:a.name??``,arguments:``}),a?.name&&(s.function.name=a.name),a?.arguments&&(s.function.arguments+=a.arguments,ZW(J(this,YG,`f`),s)&&(s.function.parsed_arguments=qG(s.function.arguments)))}}}return a},Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on(`chunk`,n=>{let r=t.shift();r?r.resolve(n):e.push(n)}),this.on(`end`,()=>{n=!0;for(let e of t)e.resolve(void 0);t.length=0}),this.on(`abort`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),this.on(`error`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((e,n)=>t.push({resolve:e,reject:n})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new iW(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};function sK(e,t){let{id:n,choices:r,created:i,model:a,system_fingerprint:o,...s}=e;return qW({...s,id:n,choices:r.map(({message:t,finish_reason:n,index:r,logprobs:i,...a})=>{if(!n)throw new Y(`missing finish_reason for choice ${r}`);let{content:o=null,function_call:s,tool_calls:c,...l}=t,u=t.role;if(!u)throw new Y(`missing role for choice ${r}`);if(s){let{arguments:e,name:c}=s;if(e==null)throw new Y(`missing function_call.arguments for choice ${r}`);if(!c)throw new Y(`missing function_call.name for choice ${r}`);return{...a,message:{content:o,function_call:{arguments:e,name:c},role:u,refusal:t.refusal??null},finish_reason:n,index:r,logprobs:i}}return c?{...a,index:r,finish_reason:n,logprobs:i,message:{...l,role:u,content:o,refusal:t.refusal??null,tool_calls:c.map((t,n)=>{let{function:i,type:a,id:o,...s}=t,{arguments:c,name:l,...u}=i||{};if(o==null)throw new Y(`missing choices[${r}].tool_calls[${n}].id\n${cK(e)}`);if(a==null)throw new Y(`missing choices[${r}].tool_calls[${n}].type\n${cK(e)}`);if(l==null)throw new Y(`missing choices[${r}].tool_calls[${n}].function.name\n${cK(e)}`);if(c==null)throw new Y(`missing choices[${r}].tool_calls[${n}].function.arguments\n${cK(e)}`);return{...s,id:o,type:a,function:{...u,name:l,arguments:c}}})}}:{...a,message:{...l,content:o,role:u,refusal:t.refusal??null},finish_reason:n,index:r,logprobs:i}}),created:i,model:a,object:`chat.completion`,...o?{system_fingerprint:o}:{}},t)}function cK(e){return JSON.stringify(e)}var lK=class e extends oK{static fromReadableStream(t){let n=new e(null);return n._run(()=>n._fromReadableStream(t)),n}static runTools(t,n,r){let i=new e(n),a={...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`runTools`}};return i._run(()=>i._runTools(t,n,a)),i}},uK=class extends X{constructor(){super(...arguments),this.messages=new UW(this._client)}create(e,t){return this._client.post(`/chat/completions`,{body:e,...t,stream:e.stream??!1})}retrieve(e,t){return this._client.get(Z`/chat/completions/${e}`,t)}update(e,t,n){return this._client.post(Z`/chat/completions/${e}`,{body:t,...n})}list(e={},t){return this._client.getAPIList(`/chat/completions`,_W,{query:e,...t})}delete(e,t){return this._client.delete(Z`/chat/completions/${e}`,t)}parse(e,t){return eG(e.tools),this._client.chat.completions.create(e,{...t,headers:{...t?.headers,"X-Stainless-Helper-Method":`chat.completions.parse`}})._thenUnwrap(t=>JW(t,e))}runTools(e,t){return e.stream?lK.runTools(this._client,e,t):OG.runTools(this._client,e,t)}stream(e,t){return oK.createChatCompletion(this._client,e,t)}};uK.Messages=UW;var dK=class extends X{constructor(){super(...arguments),this.completions=new uK(this._client)}};dK.Completions=uK;var fK=Symbol(`brand.privateNullableHeaders`);function*pK(e){if(!e)return;if(fK in e){let{values:t,nulls:n}=e;yield*t.entries();for(let e of n)yield[e,null];return}let t=!1,n;e instanceof Headers?n=e.entries():ZH(e)?n=e:(t=!0,n=Object.entries(e??{}));for(let e of n){let n=e[0];if(typeof n!=`string`)throw TypeError(`expected header name to be a string`);let r=ZH(e[1])?e[1]:[e[1]],i=!1;for(let e of r)e!==void 0&&(t&&!i&&(i=!0,yield[n,null]),yield[n,e])}}var Q=e=>{let t=new Headers,n=new Set;for(let r of e){let e=new Set;for(let[i,a]of pK(r)){let r=i.toLowerCase();e.has(r)||(t.delete(i),e.add(r)),a===null?(t.delete(i),n.add(r)):(t.append(i,a),n.delete(r))}}return{[fK]:!0,values:t,nulls:n}},mK=class extends X{create(e,t){return this._client.post(`/audio/speech`,{body:e,...t,headers:Q([{Accept:`application/octet-stream`},t?.headers]),__binaryResponse:!0})}},hK=class extends X{create(e,t){return this._client.post(`/audio/transcriptions`,DW({body:e,...t,stream:e.stream??!1,__metadata:{model:e.model}},this._client))}},gK=class extends X{create(e,t){return this._client.post(`/audio/translations`,DW({body:e,...t,__metadata:{model:e.model}},this._client))}},_K=class extends X{constructor(){super(...arguments),this.transcriptions=new hK(this._client),this.translations=new gK(this._client),this.speech=new mK(this._client)}};_K.Transcriptions=hK,_K.Translations=gK,_K.Speech=mK;var vK=class extends X{create(e,t){return this._client.post(`/batches`,{body:e,...t})}retrieve(e,t){return this._client.get(Z`/batches/${e}`,t)}list(e={},t){return this._client.getAPIList(`/batches`,_W,{query:e,...t})}cancel(e,t){return this._client.post(Z`/batches/${e}/cancel`,t)}},yK=class extends X{create(e,t){return this._client.post(`/assistants`,{body:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}retrieve(e,t){return this._client.get(Z`/assistants/${e}`,{...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}update(e,t,n){return this._client.post(Z`/assistants/${e}`,{body:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}list(e={},t){return this._client.getAPIList(`/assistants`,_W,{query:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}delete(e,t){return this._client.delete(Z`/assistants/${e}`,{...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}},bK=class extends X{create(e,t){return this._client.post(`/realtime/sessions`,{body:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}},xK=class extends X{create(e,t){return this._client.post(`/realtime/transcription_sessions`,{body:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}},SK=class extends X{constructor(){super(...arguments),this.sessions=new bK(this._client),this.transcriptionSessions=new xK(this._client)}};SK.Sessions=bK,SK.TranscriptionSessions=xK;var CK=class extends X{create(e,t){return this._client.post(`/chatkit/sessions`,{body:e,...t,headers:Q([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers])})}cancel(e,t){return this._client.post(Z`/chatkit/sessions/${e}/cancel`,{...t,headers:Q([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers])})}},wK=class extends X{retrieve(e,t){return this._client.get(Z`/chatkit/threads/${e}`,{...t,headers:Q([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers])})}list(e={},t){return this._client.getAPIList(`/chatkit/threads`,vW,{query:e,...t,headers:Q([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers])})}delete(e,t){return this._client.delete(Z`/chatkit/threads/${e}`,{...t,headers:Q([{"OpenAI-Beta":`chatkit_beta=v1`},t?.headers])})}listItems(e,t={},n){return this._client.getAPIList(Z`/chatkit/threads/${e}/items`,vW,{query:t,...n,headers:Q([{"OpenAI-Beta":`chatkit_beta=v1`},n?.headers])})}},TK=class extends X{constructor(){super(...arguments),this.sessions=new CK(this._client),this.threads=new wK(this._client)}};TK.Sessions=CK,TK.Threads=wK;var EK=class extends X{create(e,t,n){return this._client.post(Z`/threads/${e}/messages`,{body:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}retrieve(e,t,n){let{thread_id:r}=t;return this._client.get(Z`/threads/${r}/messages/${e}`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}update(e,t,n){let{thread_id:r,...i}=t;return this._client.post(Z`/threads/${r}/messages/${e}`,{body:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}list(e,t={},n){return this._client.getAPIList(Z`/threads/${e}/messages`,_W,{query:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}delete(e,t,n){let{thread_id:r}=t;return this._client.delete(Z`/threads/${r}/messages/${e}`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}},DK=class extends X{retrieve(e,t,n){let{thread_id:r,run_id:i,...a}=t;return this._client.get(Z`/threads/${r}/runs/${i}/steps/${e}`,{query:a,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}list(e,t,n){let{thread_id:r,...i}=t;return this._client.getAPIList(Z`/threads/${r}/runs/${e}/steps`,_W,{query:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}},OK=e=>{if(typeof Buffer<`u`){let t=Buffer.from(e,`base64`);return Array.from(new Float32Array(t.buffer,t.byteOffset,t.length/Float32Array.BYTES_PER_ELEMENT))}else{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return Array.from(new Float32Array(r.buffer))}},kK=e=>{if(globalThis.process!==void 0)return globalThis.process.env?.[e]?.trim()??void 0;if(globalThis.Deno!==void 0)return globalThis.Deno.env?.get?.(e)?.trim()},AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K=class extends gG{constructor(){super(...arguments),AK.add(this),MK.set(this,[]),NK.set(this,{}),PK.set(this,{}),FK.set(this,void 0),IK.set(this,void 0),LK.set(this,void 0),RK.set(this,void 0),zK.set(this,void 0),BK.set(this,void 0),VK.set(this,void 0),HK.set(this,void 0),UK.set(this,void 0)}[(MK=new WeakMap,NK=new WeakMap,PK=new WeakMap,FK=new WeakMap,IK=new WeakMap,LK=new WeakMap,RK=new WeakMap,zK=new WeakMap,BK=new WeakMap,VK=new WeakMap,HK=new WeakMap,UK=new WeakMap,AK=new WeakSet,Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on(`event`,n=>{let r=t.shift();r?r.resolve(n):e.push(n)}),this.on(`end`,()=>{n=!0;for(let e of t)e.resolve(void 0);t.length=0}),this.on(`abort`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),this.on(`error`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((e,n)=>t.push({resolve:e,reject:n})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}static fromReadableStream(e){let t=new jK;return t._run(()=>t._fromReadableStream(e)),t}async _fromReadableStream(e,t){let n=t?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener(`abort`,()=>this.controller.abort())),this._connected();let r=iW.fromReadableStream(e,this.controller);for await(let e of r)J(this,AK,`m`,WK).call(this,e);if(r.controller.signal?.aborted)throw new MH;return this._addRun(J(this,AK,`m`,GK).call(this))}toReadableStream(){return new iW(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}static createToolAssistantStream(e,t,n,r){let i=new jK;return i._run(()=>i._runToolAssistantStream(e,t,n,{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`stream`}})),i}async _createToolAssistantStream(e,t,n,r){let i=r?.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener(`abort`,()=>this.controller.abort()));let a={...n,stream:!0},o=await e.submitToolOutputs(t,a,{...r,signal:this.controller.signal});this._connected();for await(let e of o)J(this,AK,`m`,WK).call(this,e);if(o.controller.signal?.aborted)throw new MH;return this._addRun(J(this,AK,`m`,GK).call(this))}static createThreadAssistantStream(e,t,n){let r=new jK;return r._run(()=>r._threadAssistantStream(e,t,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":`stream`}})),r}static createAssistantStream(e,t,n,r){let i=new jK;return i._run(()=>i._runAssistantStream(e,t,n,{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`stream`}})),i}currentEvent(){return J(this,VK,`f`)}currentRun(){return J(this,HK,`f`)}currentMessageSnapshot(){return J(this,FK,`f`)}currentRunStepSnapshot(){return J(this,UK,`f`)}async finalRunSteps(){return await this.done(),Object.values(J(this,NK,`f`))}async finalMessages(){return await this.done(),Object.values(J(this,PK,`f`))}async finalRun(){if(await this.done(),!J(this,IK,`f`))throw Error(`Final run was not received.`);return J(this,IK,`f`)}async _createThreadAssistantStream(e,t,n){let r=n?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener(`abort`,()=>this.controller.abort()));let i={...t,stream:!0},a=await e.createAndRun(i,{...n,signal:this.controller.signal});this._connected();for await(let e of a)J(this,AK,`m`,WK).call(this,e);if(a.controller.signal?.aborted)throw new MH;return this._addRun(J(this,AK,`m`,GK).call(this))}async _createAssistantStream(e,t,n,r){let i=r?.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener(`abort`,()=>this.controller.abort()));let a={...n,stream:!0},o=await e.create(t,a,{...r,signal:this.controller.signal});this._connected();for await(let e of o)J(this,AK,`m`,WK).call(this,e);if(o.controller.signal?.aborted)throw new MH;return this._addRun(J(this,AK,`m`,GK).call(this))}static accumulateDelta(e,t){for(let[n,r]of Object.entries(t)){if(!e.hasOwnProperty(n)){e[n]=r;continue}let t=e[n];if(t==null){e[n]=r;continue}if(n===`index`||n===`type`){e[n]=r;continue}if(typeof t==`string`&&typeof r==`string`)t+=r;else if(typeof t==`number`&&typeof r==`number`)t+=r;else if(tU(t)&&tU(r))t=this.accumulateDelta(t,r);else if(Array.isArray(t)&&Array.isArray(r)){if(t.every(e=>typeof e==`string`||typeof e==`number`)){t.push(...r);continue}for(let e of r){if(!tU(e))throw Error(`Expected array delta entry to be an object but got: ${e}`);let n=e.index;if(n==null)throw console.error(e),Error("Expected array delta entry to have an `index` property");if(typeof n!=`number`)throw Error(`Expected array delta entry \`index\` property to be a number but got ${n}`);let r=t[n];r==null?t.push(e):t[n]=this.accumulateDelta(r,e)}continue}else throw Error(`Unhandled record type: ${n}, deltaValue: ${r}, accValue: ${t}`);e[n]=t}return e}_addRun(e){return e}async _threadAssistantStream(e,t,n){return await this._createThreadAssistantStream(t,e,n)}async _runAssistantStream(e,t,n,r){return await this._createAssistantStream(t,e,n,r)}async _runToolAssistantStream(e,t,n,r){return await this._createToolAssistantStream(t,e,n,r)}};jK=$K,WK=function(e){if(!this.ended)switch(q(this,VK,e,`f`),J(this,AK,`m`,JK).call(this,e),e.event){case`thread.created`:break;case`thread.run.created`:case`thread.run.queued`:case`thread.run.in_progress`:case`thread.run.requires_action`:case`thread.run.completed`:case`thread.run.incomplete`:case`thread.run.failed`:case`thread.run.cancelling`:case`thread.run.cancelled`:case`thread.run.expired`:J(this,AK,`m`,QK).call(this,e);break;case`thread.run.step.created`:case`thread.run.step.in_progress`:case`thread.run.step.delta`:case`thread.run.step.completed`:case`thread.run.step.failed`:case`thread.run.step.cancelled`:case`thread.run.step.expired`:J(this,AK,`m`,qK).call(this,e);break;case`thread.message.created`:case`thread.message.in_progress`:case`thread.message.delta`:case`thread.message.completed`:case`thread.message.incomplete`:J(this,AK,`m`,KK).call(this,e);break;case`error`:throw Error(`Encountered an error event in event processing - errors should be processed earlier`);default:}},GK=function(){if(this.ended)throw new Y(`stream has ended, this shouldn't happen`);if(!J(this,IK,`f`))throw Error(`Final run has not been received`);return J(this,IK,`f`)},KK=function(e){let[t,n]=J(this,AK,`m`,XK).call(this,e,J(this,FK,`f`));q(this,FK,t,`f`),J(this,PK,`f`)[t.id]=t;for(let e of n){let n=t.content[e.index];n?.type==`text`&&this._emit(`textCreated`,n.text)}switch(e.event){case`thread.message.created`:this._emit(`messageCreated`,e.data);break;case`thread.message.in_progress`:break;case`thread.message.delta`:if(this._emit(`messageDelta`,e.data.delta,t),e.data.delta.content)for(let n of e.data.delta.content){if(n.type==`text`&&n.text){let e=n.text,r=t.content[n.index];if(r&&r.type==`text`)this._emit(`textDelta`,e,r.text);else throw Error(`The snapshot associated with this text delta is not text or missing`)}if(n.index!=J(this,LK,`f`)){if(J(this,RK,`f`))switch(J(this,RK,`f`).type){case`text`:this._emit(`textDone`,J(this,RK,`f`).text,J(this,FK,`f`));break;case`image_file`:this._emit(`imageFileDone`,J(this,RK,`f`).image_file,J(this,FK,`f`));break}q(this,LK,n.index,`f`)}q(this,RK,t.content[n.index],`f`)}break;case`thread.message.completed`:case`thread.message.incomplete`:if(J(this,LK,`f`)!==void 0){let t=e.data.content[J(this,LK,`f`)];if(t)switch(t.type){case`image_file`:this._emit(`imageFileDone`,t.image_file,J(this,FK,`f`));break;case`text`:this._emit(`textDone`,t.text,J(this,FK,`f`));break}}J(this,FK,`f`)&&this._emit(`messageDone`,e.data),q(this,FK,void 0,`f`)}},qK=function(e){let t=J(this,AK,`m`,YK).call(this,e);switch(q(this,UK,t,`f`),e.event){case`thread.run.step.created`:this._emit(`runStepCreated`,e.data);break;case`thread.run.step.delta`:let n=e.data.delta;if(n.step_details&&n.step_details.type==`tool_calls`&&n.step_details.tool_calls&&t.step_details.type==`tool_calls`)for(let e of n.step_details.tool_calls)e.index==J(this,zK,`f`)?this._emit(`toolCallDelta`,e,t.step_details.tool_calls[e.index]):(J(this,BK,`f`)&&this._emit(`toolCallDone`,J(this,BK,`f`)),q(this,zK,e.index,`f`),q(this,BK,t.step_details.tool_calls[e.index],`f`),J(this,BK,`f`)&&this._emit(`toolCallCreated`,J(this,BK,`f`)));this._emit(`runStepDelta`,e.data.delta,t);break;case`thread.run.step.completed`:case`thread.run.step.failed`:case`thread.run.step.cancelled`:case`thread.run.step.expired`:q(this,UK,void 0,`f`),e.data.step_details.type==`tool_calls`&&J(this,BK,`f`)&&(this._emit(`toolCallDone`,J(this,BK,`f`)),q(this,BK,void 0,`f`)),this._emit(`runStepDone`,e.data,t);break;case`thread.run.step.in_progress`:break}},JK=function(e){J(this,MK,`f`).push(e),this._emit(`event`,e)},YK=function(e){switch(e.event){case`thread.run.step.created`:return J(this,NK,`f`)[e.data.id]=e.data,e.data;case`thread.run.step.delta`:let t=J(this,NK,`f`)[e.data.id];if(!t)throw Error(`Received a RunStepDelta before creation of a snapshot`);let n=e.data;if(n.delta){let r=jK.accumulateDelta(t,n.delta);J(this,NK,`f`)[e.data.id]=r}return J(this,NK,`f`)[e.data.id];case`thread.run.step.completed`:case`thread.run.step.failed`:case`thread.run.step.cancelled`:case`thread.run.step.expired`:case`thread.run.step.in_progress`:J(this,NK,`f`)[e.data.id]=e.data;break}if(J(this,NK,`f`)[e.data.id])return J(this,NK,`f`)[e.data.id];throw Error(`No snapshot available`)},XK=function(e,t){let n=[];switch(e.event){case`thread.message.created`:return[e.data,n];case`thread.message.delta`:if(!t)throw Error(`Received a delta with no existing snapshot (there should be one from message creation)`);let r=e.data;if(r.delta.content)for(let e of r.delta.content)if(e.index in t.content){let n=t.content[e.index];t.content[e.index]=J(this,AK,`m`,ZK).call(this,e,n)}else t.content[e.index]=e,n.push(e);return[t,n];case`thread.message.in_progress`:case`thread.message.completed`:case`thread.message.incomplete`:if(t)return[t,n];throw Error(`Received thread message event with no existing snapshot`)}throw Error(`Tried to accumulate a non-message event`)},ZK=function(e,t){return jK.accumulateDelta(t,e)},QK=function(e){switch(q(this,HK,e.data,`f`),e.event){case`thread.run.created`:break;case`thread.run.queued`:break;case`thread.run.in_progress`:break;case`thread.run.requires_action`:case`thread.run.cancelled`:case`thread.run.failed`:case`thread.run.completed`:case`thread.run.expired`:case`thread.run.incomplete`:q(this,IK,e.data,`f`),J(this,BK,`f`)&&(this._emit(`toolCallDone`,J(this,BK,`f`)),q(this,BK,void 0,`f`));break;case`thread.run.cancelling`:break}};var eq=class extends X{constructor(){super(...arguments),this.steps=new DK(this._client)}create(e,t,n){let{include:r,...i}=t;return this._client.post(Z`/threads/${e}/runs`,{query:{include:r},body:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers]),stream:t.stream??!1,__synthesizeEventData:!0})}retrieve(e,t,n){let{thread_id:r}=t;return this._client.get(Z`/threads/${r}/runs/${e}`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}update(e,t,n){let{thread_id:r,...i}=t;return this._client.post(Z`/threads/${r}/runs/${e}`,{body:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}list(e,t={},n){return this._client.getAPIList(Z`/threads/${e}/runs`,_W,{query:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}cancel(e,t,n){let{thread_id:r}=t;return this._client.post(Z`/threads/${r}/runs/${e}/cancel`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}async createAndPoll(e,t,n){let r=await this.create(e,t,n);return await this.poll(r.id,{thread_id:e},n)}createAndStream(e,t,n){return $K.createAssistantStream(e,this._client.beta.threads.runs,t,n)}async poll(e,t,n){let r=Q([n?.headers,{"X-Stainless-Poll-Helper":`true`,"X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:i,response:a}=await this.retrieve(e,t,{...n,headers:{...n?.headers,...r}}).withResponse();switch(i.status){case`queued`:case`in_progress`:case`cancelling`:let e=5e3;if(n?.pollIntervalMs)e=n.pollIntervalMs;else{let t=a.headers.get(`openai-poll-after-ms`);if(t){let n=parseInt(t);isNaN(n)||(e=n)}}await iU(e);break;case`requires_action`:case`incomplete`:case`cancelled`:case`completed`:case`failed`:case`expired`:return i}}}stream(e,t,n){return $K.createAssistantStream(e,this._client.beta.threads.runs,t,n)}submitToolOutputs(e,t,n){let{thread_id:r,...i}=t;return this._client.post(Z`/threads/${r}/runs/${e}/submit_tool_outputs`,{body:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers]),stream:t.stream??!1,__synthesizeEventData:!0})}async submitToolOutputsAndPoll(e,t,n){let r=await this.submitToolOutputs(e,t,n);return await this.poll(r.id,t,n)}submitToolOutputsStream(e,t,n){return $K.createToolAssistantStream(e,this._client.beta.threads.runs,t,n)}};eq.Steps=DK;var tq=class extends X{constructor(){super(...arguments),this.runs=new eq(this._client),this.messages=new EK(this._client)}create(e={},t){return this._client.post(`/threads`,{body:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}retrieve(e,t){return this._client.get(Z`/threads/${e}`,{...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}update(e,t,n){return this._client.post(Z`/threads/${e}`,{body:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}delete(e,t){return this._client.delete(Z`/threads/${e}`,{...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}createAndRun(e,t){return this._client.post(`/threads/runs`,{body:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers]),stream:e.stream??!1,__synthesizeEventData:!0})}async createAndRunPoll(e,t){let n=await this.createAndRun(e,t);return await this.runs.poll(n.id,{thread_id:n.thread_id},t)}createAndRunStream(e,t){return $K.createThreadAssistantStream(e,this._client.beta.threads,t)}};tq.Runs=eq,tq.Messages=EK;var nq=class extends X{constructor(){super(...arguments),this.realtime=new SK(this._client),this.chatkit=new TK(this._client),this.assistants=new yK(this._client),this.threads=new tq(this._client)}};nq.Realtime=SK,nq.ChatKit=TK,nq.Assistants=yK,nq.Threads=tq;var rq=class extends X{create(e,t){return this._client.post(`/completions`,{body:e,...t,stream:e.stream??!1})}},iq=class extends X{retrieve(e,t,n){let{container_id:r}=t;return this._client.get(Z`/containers/${r}/files/${e}/content`,{...n,headers:Q([{Accept:`application/binary`},n?.headers]),__binaryResponse:!0})}},aq=class extends X{constructor(){super(...arguments),this.content=new iq(this._client)}create(e,t,n){return this._client.post(Z`/containers/${e}/files`,EW({body:t,...n},this._client))}retrieve(e,t,n){let{container_id:r}=t;return this._client.get(Z`/containers/${r}/files/${e}`,n)}list(e,t={},n){return this._client.getAPIList(Z`/containers/${e}/files`,_W,{query:t,...n})}delete(e,t,n){let{container_id:r}=t;return this._client.delete(Z`/containers/${r}/files/${e}`,{...n,headers:Q([{Accept:`*/*`},n?.headers])})}};aq.Content=iq;var oq=class extends X{constructor(){super(...arguments),this.files=new aq(this._client)}create(e,t){return this._client.post(`/containers`,{body:e,...t})}retrieve(e,t){return this._client.get(Z`/containers/${e}`,t)}list(e={},t){return this._client.getAPIList(`/containers`,_W,{query:e,...t})}delete(e,t){return this._client.delete(Z`/containers/${e}`,{...t,headers:Q([{Accept:`*/*`},t?.headers])})}};oq.Files=aq;var sq=class extends X{create(e,t,n){let{include:r,...i}=t;return this._client.post(Z`/conversations/${e}/items`,{query:{include:r},body:i,...n})}retrieve(e,t,n){let{conversation_id:r,...i}=t;return this._client.get(Z`/conversations/${r}/items/${e}`,{query:i,...n})}list(e,t={},n){return this._client.getAPIList(Z`/conversations/${e}/items`,vW,{query:t,...n})}delete(e,t,n){let{conversation_id:r}=t;return this._client.delete(Z`/conversations/${r}/items/${e}`,n)}},cq=class extends X{constructor(){super(...arguments),this.items=new sq(this._client)}create(e={},t){return this._client.post(`/conversations`,{body:e,...t})}retrieve(e,t){return this._client.get(Z`/conversations/${e}`,t)}update(e,t,n){return this._client.post(Z`/conversations/${e}`,{body:t,...n})}delete(e,t){return this._client.delete(Z`/conversations/${e}`,t)}};cq.Items=sq;var lq=class extends X{create(e,t){let n=!!e.encoding_format,r=n?e.encoding_format:`base64`;n&&tW(this._client).debug(`embeddings/user defined encoding_format:`,e.encoding_format);let i=this._client.post(`/embeddings`,{body:{...e,encoding_format:r},...t});return n?i:(tW(this._client).debug(`embeddings/decoding base64 embeddings from base64`),i._thenUnwrap(e=>(e&&e.data&&e.data.forEach(e=>{let t=e.embedding;e.embedding=OK(t)}),e)))}},uq=class extends X{retrieve(e,t,n){let{eval_id:r,run_id:i}=t;return this._client.get(Z`/evals/${r}/runs/${i}/output_items/${e}`,n)}list(e,t,n){let{eval_id:r,...i}=t;return this._client.getAPIList(Z`/evals/${r}/runs/${e}/output_items`,_W,{query:i,...n})}},dq=class extends X{constructor(){super(...arguments),this.outputItems=new uq(this._client)}create(e,t,n){return this._client.post(Z`/evals/${e}/runs`,{body:t,...n})}retrieve(e,t,n){let{eval_id:r}=t;return this._client.get(Z`/evals/${r}/runs/${e}`,n)}list(e,t={},n){return this._client.getAPIList(Z`/evals/${e}/runs`,_W,{query:t,...n})}delete(e,t,n){let{eval_id:r}=t;return this._client.delete(Z`/evals/${r}/runs/${e}`,n)}cancel(e,t,n){let{eval_id:r}=t;return this._client.post(Z`/evals/${r}/runs/${e}`,n)}};dq.OutputItems=uq;var fq=class extends X{constructor(){super(...arguments),this.runs=new dq(this._client)}create(e,t){return this._client.post(`/evals`,{body:e,...t})}retrieve(e,t){return this._client.get(Z`/evals/${e}`,t)}update(e,t,n){return this._client.post(Z`/evals/${e}`,{body:t,...n})}list(e={},t){return this._client.getAPIList(`/evals`,_W,{query:e,...t})}delete(e,t){return this._client.delete(Z`/evals/${e}`,t)}};fq.Runs=dq;var pq=class extends X{create(e,t){return this._client.post(`/files`,DW({body:e,...t},this._client))}retrieve(e,t){return this._client.get(Z`/files/${e}`,t)}list(e={},t){return this._client.getAPIList(`/files`,_W,{query:e,...t})}delete(e,t){return this._client.delete(Z`/files/${e}`,t)}content(e,t){return this._client.get(Z`/files/${e}/content`,{...t,headers:Q([{Accept:`application/binary`},t?.headers]),__binaryResponse:!0})}async waitForProcessing(e,{pollInterval:t=5e3,maxWait:n=1800*1e3}={}){let r=new Set([`processed`,`error`,`deleted`]),i=Date.now(),a=await this.retrieve(e);for(;!a.status||!r.has(a.status);)if(await iU(t),a=await this.retrieve(e),Date.now()-i>n)throw new PH({message:`Giving up on waiting for file ${e} to finish processing after ${n} milliseconds.`});return a}},mq=class extends X{},hq=class extends X{run(e,t){return this._client.post(`/fine_tuning/alpha/graders/run`,{body:e,...t})}validate(e,t){return this._client.post(`/fine_tuning/alpha/graders/validate`,{body:e,...t})}},gq=class extends X{constructor(){super(...arguments),this.graders=new hq(this._client)}};gq.Graders=hq;var _q=class extends X{create(e,t,n){return this._client.getAPIList(Z`/fine_tuning/checkpoints/${e}/permissions`,gW,{body:t,method:`post`,...n})}retrieve(e,t={},n){return this._client.get(Z`/fine_tuning/checkpoints/${e}/permissions`,{query:t,...n})}list(e,t={},n){return this._client.getAPIList(Z`/fine_tuning/checkpoints/${e}/permissions`,vW,{query:t,...n})}delete(e,t,n){let{fine_tuned_model_checkpoint:r}=t;return this._client.delete(Z`/fine_tuning/checkpoints/${r}/permissions/${e}`,n)}},vq=class extends X{constructor(){super(...arguments),this.permissions=new _q(this._client)}};vq.Permissions=_q;var yq=class extends X{list(e,t={},n){return this._client.getAPIList(Z`/fine_tuning/jobs/${e}/checkpoints`,_W,{query:t,...n})}},bq=class extends X{constructor(){super(...arguments),this.checkpoints=new yq(this._client)}create(e,t){return this._client.post(`/fine_tuning/jobs`,{body:e,...t})}retrieve(e,t){return this._client.get(Z`/fine_tuning/jobs/${e}`,t)}list(e={},t){return this._client.getAPIList(`/fine_tuning/jobs`,_W,{query:e,...t})}cancel(e,t){return this._client.post(Z`/fine_tuning/jobs/${e}/cancel`,t)}listEvents(e,t={},n){return this._client.getAPIList(Z`/fine_tuning/jobs/${e}/events`,_W,{query:t,...n})}pause(e,t){return this._client.post(Z`/fine_tuning/jobs/${e}/pause`,t)}resume(e,t){return this._client.post(Z`/fine_tuning/jobs/${e}/resume`,t)}};bq.Checkpoints=yq;var xq=class extends X{constructor(){super(...arguments),this.methods=new mq(this._client),this.jobs=new bq(this._client),this.checkpoints=new vq(this._client),this.alpha=new gq(this._client)}};xq.Methods=mq,xq.Jobs=bq,xq.Checkpoints=vq,xq.Alpha=gq;var Sq=class extends X{},Cq=class extends X{constructor(){super(...arguments),this.graderModels=new Sq(this._client)}};Cq.GraderModels=Sq;var wq=class extends X{createVariation(e,t){return this._client.post(`/images/variations`,DW({body:e,...t},this._client))}edit(e,t){return this._client.post(`/images/edits`,DW({body:e,...t,stream:e.stream??!1},this._client))}generate(e,t){return this._client.post(`/images/generations`,{body:e,...t,stream:e.stream??!1})}},Tq=class extends X{retrieve(e,t){return this._client.get(Z`/models/${e}`,t)}list(e){return this._client.getAPIList(`/models`,gW,e)}delete(e,t){return this._client.delete(Z`/models/${e}`,t)}},Eq=class extends X{create(e,t){return this._client.post(`/moderations`,{body:e,...t})}},Dq=class extends X{accept(e,t,n){return this._client.post(Z`/realtime/calls/${e}/accept`,{body:t,...n,headers:Q([{Accept:`*/*`},n?.headers])})}hangup(e,t){return this._client.post(Z`/realtime/calls/${e}/hangup`,{...t,headers:Q([{Accept:`*/*`},t?.headers])})}refer(e,t,n){return this._client.post(Z`/realtime/calls/${e}/refer`,{body:t,...n,headers:Q([{Accept:`*/*`},n?.headers])})}reject(e,t={},n){return this._client.post(Z`/realtime/calls/${e}/reject`,{body:t,...n,headers:Q([{Accept:`*/*`},n?.headers])})}},Oq=class extends X{create(e,t){return this._client.post(`/realtime/client_secrets`,{body:e,...t})}},kq=class extends X{constructor(){super(...arguments),this.clientSecrets=new Oq(this._client),this.calls=new Dq(this._client)}};kq.ClientSecrets=Oq,kq.Calls=Dq;function Aq(e,t){return!t||!Nq(t)?{...e,output_parsed:null,output:e.output.map(e=>e.type===`function_call`?{...e,parsed_arguments:null}:e.type===`message`?{...e,content:e.content.map(e=>({...e,parsed:null}))}:e)}:jq(e,t)}function jq(e,t){let n=e.output.map(e=>{if(e.type===`function_call`)return{...e,parsed_arguments:Iq(t,e)};if(e.type===`message`){let n=e.content.map(e=>e.type===`output_text`?{...e,parsed:Mq(t,e.text)}:e);return{...e,content:n}}return e}),r=Object.assign({},e,{output:n});return Object.getOwnPropertyDescriptor(e,`output_text`)||Lq(r),Object.defineProperty(r,`output_parsed`,{enumerable:!0,get(){for(let e of r.output)if(e.type===`message`){for(let t of e.content)if(t.type===`output_text`&&t.parsed!==null)return t.parsed}return null}}),r}function Mq(e,t){return e.text?.format?.type===`json_schema`?`$parseRaw`in e.text?.format?(e.text?.format).$parseRaw(t):JSON.parse(t):null}function Nq(e){return!!GW(e.text?.format)}function Pq(e){return e?.$brand===`auto-parseable-tool`}function Fq(e,t){return e.find(e=>e.type===`function`&&e.name===t)}function Iq(e,t){let n=Fq(e.tools??[],t.name);return{...t,...t,parsed_arguments:Pq(n)?n.$parseRaw(t.arguments):n?.strict?JSON.parse(t.arguments):null}}function Lq(e){let t=[];for(let n of e.output)if(n.type===`message`)for(let e of n.content)e.type===`output_text`&&t.push(e.text);e.output_text=t.join(``)}var Rq,zq,Bq,Vq,Hq,Uq,Wq,Gq,Kq=class e extends gG{constructor(e){super(),Rq.add(this),zq.set(this,void 0),Bq.set(this,void 0),Vq.set(this,void 0),q(this,zq,e,`f`)}static createResponse(t,n,r){let i=new e(n);return i._run(()=>i._createOrRetrieveResponse(t,n,{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`stream`}})),i}async _createOrRetrieveResponse(e,t,n){let r=n?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener(`abort`,()=>this.controller.abort())),J(this,Rq,`m`,Hq).call(this);let i,a=null;`response_id`in t?(i=await e.responses.retrieve(t.response_id,{stream:!0},{...n,signal:this.controller.signal,stream:!0}),a=t.starting_after??null):i=await e.responses.create({...t,stream:!0},{...n,signal:this.controller.signal}),this._connected();for await(let e of i)J(this,Rq,`m`,Uq).call(this,e,a);if(i.controller.signal?.aborted)throw new MH;return J(this,Rq,`m`,Wq).call(this)}[(zq=new WeakMap,Bq=new WeakMap,Vq=new WeakMap,Rq=new WeakSet,Hq=function(){this.ended||q(this,Bq,void 0,`f`)},Uq=function(e,t){if(this.ended)return;let n=(e,n)=>{(t==null||n.sequence_number>t)&&this._emit(e,n)},r=J(this,Rq,`m`,Gq).call(this,e);switch(n(`event`,e),e.type){case`response.output_text.delta`:{let t=r.output[e.output_index];if(!t)throw new Y(`missing output at index ${e.output_index}`);if(t.type===`message`){let r=t.content[e.content_index];if(!r)throw new Y(`missing content at index ${e.content_index}`);if(r.type!==`output_text`)throw new Y(`expected content to be 'output_text', got ${r.type}`);n(`response.output_text.delta`,{...e,snapshot:r.text})}break}case`response.function_call_arguments.delta`:{let t=r.output[e.output_index];if(!t)throw new Y(`missing output at index ${e.output_index}`);t.type===`function_call`&&n(`response.function_call_arguments.delta`,{...e,snapshot:t.arguments});break}default:n(e.type,e);break}},Wq=function(){if(this.ended)throw new Y(`stream has ended, this shouldn't happen`);let e=J(this,Bq,`f`);if(!e)throw new Y(`request ended without sending any events`);q(this,Bq,void 0,`f`);let t=qq(e,J(this,zq,`f`));return q(this,Vq,t,`f`),t},Gq=function(e){let t=J(this,Bq,`f`);if(!t){if(e.type!==`response.created`)throw new Y(`When snapshot hasn't been set yet, expected 'response.created' event, got ${e.type}`);return t=q(this,Bq,e.response,`f`),t}switch(e.type){case`response.output_item.added`:t.output.push(e.item);break;case`response.content_part.added`:{let n=t.output[e.output_index];if(!n)throw new Y(`missing output at index ${e.output_index}`);let r=n.type,i=e.part;r===`message`&&i.type!==`reasoning_text`?n.content.push(i):r===`reasoning`&&i.type===`reasoning_text`&&(n.content||=[],n.content.push(i));break}case`response.output_text.delta`:{let n=t.output[e.output_index];if(!n)throw new Y(`missing output at index ${e.output_index}`);if(n.type===`message`){let t=n.content[e.content_index];if(!t)throw new Y(`missing content at index ${e.content_index}`);if(t.type!==`output_text`)throw new Y(`expected content to be 'output_text', got ${t.type}`);t.text+=e.delta}break}case`response.function_call_arguments.delta`:{let n=t.output[e.output_index];if(!n)throw new Y(`missing output at index ${e.output_index}`);n.type===`function_call`&&(n.arguments+=e.delta);break}case`response.reasoning_text.delta`:{let n=t.output[e.output_index];if(!n)throw new Y(`missing output at index ${e.output_index}`);if(n.type===`reasoning`){let t=n.content?.[e.content_index];if(!t)throw new Y(`missing content at index ${e.content_index}`);if(t.type!==`reasoning_text`)throw new Y(`expected content to be 'reasoning_text', got ${t.type}`);t.text+=e.delta}break}case`response.completed`:q(this,Bq,e.response,`f`);break}return t},Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on(`event`,n=>{let r=t.shift();r?r.resolve(n):e.push(n)}),this.on(`end`,()=>{n=!0;for(let e of t)e.resolve(void 0);t.length=0}),this.on(`abort`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),this.on(`error`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((e,n)=>t.push({resolve:e,reject:n})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}async finalResponse(){await this.done();let e=J(this,Vq,`f`);if(!e)throw new Y(`stream ended without producing a ChatCompletion`);return e}};function qq(e,t){return Aq(e,t)}var Jq=class extends X{list(e,t={},n){return this._client.getAPIList(Z`/responses/${e}/input_items`,_W,{query:t,...n})}},Yq=class extends X{count(e={},t){return this._client.post(`/responses/input_tokens`,{body:e,...t})}},Xq=class extends X{constructor(){super(...arguments),this.inputItems=new Jq(this._client),this.inputTokens=new Yq(this._client)}create(e,t){return this._client.post(`/responses`,{body:e,...t,stream:e.stream??!1})._thenUnwrap(e=>(`object`in e&&e.object===`response`&&Lq(e),e))}retrieve(e,t={},n){return this._client.get(Z`/responses/${e}`,{query:t,...n,stream:t?.stream??!1})._thenUnwrap(e=>(`object`in e&&e.object===`response`&&Lq(e),e))}delete(e,t){return this._client.delete(Z`/responses/${e}`,{...t,headers:Q([{Accept:`*/*`},t?.headers])})}parse(e,t){return this._client.responses.create(e,t)._thenUnwrap(t=>jq(t,e))}stream(e,t){return Kq.createResponse(this._client,e,t)}cancel(e,t){return this._client.post(Z`/responses/${e}/cancel`,t)}compact(e,t){return this._client.post(`/responses/compact`,{body:e,...t})}};Xq.InputItems=Jq,Xq.InputTokens=Yq;var Zq=class extends X{retrieve(e,t){return this._client.get(Z`/skills/${e}/content`,{...t,headers:Q([{Accept:`application/binary`},t?.headers]),__binaryResponse:!0})}},Qq=class extends X{retrieve(e,t,n){let{skill_id:r}=t;return this._client.get(Z`/skills/${r}/versions/${e}/content`,{...n,headers:Q([{Accept:`application/binary`},n?.headers]),__binaryResponse:!0})}},$q=class extends X{constructor(){super(...arguments),this.content=new Qq(this._client)}create(e,t={},n){return this._client.post(Z`/skills/${e}/versions`,EW({body:t,...n},this._client))}retrieve(e,t,n){let{skill_id:r}=t;return this._client.get(Z`/skills/${r}/versions/${e}`,n)}list(e,t={},n){return this._client.getAPIList(Z`/skills/${e}/versions`,_W,{query:t,...n})}delete(e,t,n){let{skill_id:r}=t;return this._client.delete(Z`/skills/${r}/versions/${e}`,n)}};$q.Content=Qq;var eJ=class extends X{constructor(){super(...arguments),this.content=new Zq(this._client),this.versions=new $q(this._client)}create(e={},t){return this._client.post(`/skills`,EW({body:e,...t},this._client))}retrieve(e,t){return this._client.get(Z`/skills/${e}`,t)}update(e,t,n){return this._client.post(Z`/skills/${e}`,{body:t,...n})}list(e={},t){return this._client.getAPIList(`/skills`,_W,{query:e,...t})}delete(e,t){return this._client.delete(Z`/skills/${e}`,t)}};eJ.Content=Zq,eJ.Versions=$q;var tJ=class extends X{create(e,t,n){return this._client.post(Z`/uploads/${e}/parts`,DW({body:t,...n},this._client))}},nJ=class extends X{constructor(){super(...arguments),this.parts=new tJ(this._client)}create(e,t){return this._client.post(`/uploads`,{body:e,...t})}cancel(e,t){return this._client.post(Z`/uploads/${e}/cancel`,t)}complete(e,t,n){return this._client.post(Z`/uploads/${e}/complete`,{body:t,...n})}};nJ.Parts=tJ;var rJ=async e=>{let t=await Promise.allSettled(e),n=t.filter(e=>e.status===`rejected`);if(n.length){for(let e of n)console.error(e.reason);throw Error(`${n.length} promise(s) failed - see the above errors`)}let r=[];for(let e of t)e.status===`fulfilled`&&r.push(e.value);return r},iJ=class extends X{create(e,t,n){return this._client.post(Z`/vector_stores/${e}/file_batches`,{body:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}retrieve(e,t,n){let{vector_store_id:r}=t;return this._client.get(Z`/vector_stores/${r}/file_batches/${e}`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}cancel(e,t,n){let{vector_store_id:r}=t;return this._client.post(Z`/vector_stores/${r}/file_batches/${e}/cancel`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}async createAndPoll(e,t,n){let r=await this.create(e,t);return await this.poll(e,r.id,n)}listFiles(e,t,n){let{vector_store_id:r,...i}=t;return this._client.getAPIList(Z`/vector_stores/${r}/file_batches/${e}/files`,_W,{query:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}async poll(e,t,n){let r=Q([n?.headers,{"X-Stainless-Poll-Helper":`true`,"X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:i,response:a}=await this.retrieve(t,{vector_store_id:e},{...n,headers:r}).withResponse();switch(i.status){case`in_progress`:let e=5e3;if(n?.pollIntervalMs)e=n.pollIntervalMs;else{let t=a.headers.get(`openai-poll-after-ms`);if(t){let n=parseInt(t);isNaN(n)||(e=n)}}await iU(e);break;case`failed`:case`cancelled`:case`completed`:return i}}}async uploadAndPoll(e,{files:t,fileIds:n=[]},r){if(t==null||t.length==0)throw Error("No `files` provided to process. If you've already uploaded files you should use `.createAndPoll()` instead");let i=r?.maxConcurrency??5,a=Math.min(i,t.length),o=this._client,s=t.values(),c=[...n];async function l(e){for(let t of e){let e=await o.files.create({file:t,purpose:`assistants`},r);c.push(e.id)}}return await rJ(Array(a).fill(s).map(l)),await this.createAndPoll(e,{file_ids:c})}},aJ=class extends X{create(e,t,n){return this._client.post(Z`/vector_stores/${e}/files`,{body:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}retrieve(e,t,n){let{vector_store_id:r}=t;return this._client.get(Z`/vector_stores/${r}/files/${e}`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}update(e,t,n){let{vector_store_id:r,...i}=t;return this._client.post(Z`/vector_stores/${r}/files/${e}`,{body:i,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}list(e,t={},n){return this._client.getAPIList(Z`/vector_stores/${e}/files`,_W,{query:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}delete(e,t,n){let{vector_store_id:r}=t;return this._client.delete(Z`/vector_stores/${r}/files/${e}`,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}async createAndPoll(e,t,n){let r=await this.create(e,t,n);return await this.poll(e,r.id,n)}async poll(e,t,n){let r=Q([n?.headers,{"X-Stainless-Poll-Helper":`true`,"X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let i=await this.retrieve(t,{vector_store_id:e},{...n,headers:r}).withResponse(),a=i.data;switch(a.status){case`in_progress`:let e=5e3;if(n?.pollIntervalMs)e=n.pollIntervalMs;else{let t=i.response.headers.get(`openai-poll-after-ms`);if(t){let n=parseInt(t);isNaN(n)||(e=n)}}await iU(e);break;case`failed`:case`completed`:return a}}}async upload(e,t,n){let r=await this._client.files.create({file:t,purpose:`assistants`},n);return this.create(e,{file_id:r.id},n)}async uploadAndPoll(e,t,n){let r=await this.upload(e,t,n);return await this.poll(e,r.id,n)}content(e,t,n){let{vector_store_id:r}=t;return this._client.getAPIList(Z`/vector_stores/${r}/files/${e}/content`,gW,{...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}},oJ=class extends X{constructor(){super(...arguments),this.files=new aJ(this._client),this.fileBatches=new iJ(this._client)}create(e,t){return this._client.post(`/vector_stores`,{body:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}retrieve(e,t){return this._client.get(Z`/vector_stores/${e}`,{...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}update(e,t,n){return this._client.post(Z`/vector_stores/${e}`,{body:t,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}list(e={},t){return this._client.getAPIList(`/vector_stores`,_W,{query:e,...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}delete(e,t){return this._client.delete(Z`/vector_stores/${e}`,{...t,headers:Q([{"OpenAI-Beta":`assistants=v2`},t?.headers])})}search(e,t,n){return this._client.getAPIList(Z`/vector_stores/${e}/search`,gW,{body:t,method:`post`,...n,headers:Q([{"OpenAI-Beta":`assistants=v2`},n?.headers])})}};oJ.Files=aJ,oJ.FileBatches=iJ;var sJ=class extends X{create(e,t){return this._client.post(`/videos`,DW({body:e,...t},this._client))}retrieve(e,t){return this._client.get(Z`/videos/${e}`,t)}list(e={},t){return this._client.getAPIList(`/videos`,vW,{query:e,...t})}delete(e,t){return this._client.delete(Z`/videos/${e}`,t)}createCharacter(e,t){return this._client.post(`/videos/characters`,DW({body:e,...t},this._client))}downloadContent(e,t={},n){return this._client.get(Z`/videos/${e}/content`,{query:t,...n,headers:Q([{Accept:`application/binary`},n?.headers]),__binaryResponse:!0})}edit(e,t){return this._client.post(`/videos/edits`,DW({body:e,...t},this._client))}extend(e,t){return this._client.post(`/videos/extensions`,DW({body:e,...t},this._client))}getCharacter(e,t){return this._client.get(Z`/videos/characters/${e}`,t)}remix(e,t,n){return this._client.post(Z`/videos/${e}/remix`,EW({body:t,...n},this._client))}},cJ,lJ,uJ,dJ=class extends X{constructor(){super(...arguments),cJ.add(this)}async unwrap(e,t,n=this._client.webhookSecret,r=300){return await this.verifySignature(e,t,n,r),JSON.parse(e)}async verifySignature(e,t,n=this._client.webhookSecret,r=300){if(typeof crypto>`u`||typeof crypto.subtle.importKey!=`function`||typeof crypto.subtle.verify!=`function`)throw Error("Webhook signature verification is only supported when the `crypto` global is defined");J(this,cJ,`m`,lJ).call(this,n);let i=Q([t]).values,a=J(this,cJ,`m`,uJ).call(this,i,`webhook-signature`),o=J(this,cJ,`m`,uJ).call(this,i,`webhook-timestamp`),s=J(this,cJ,`m`,uJ).call(this,i,`webhook-id`),c=parseInt(o,10);if(isNaN(c))throw new GH(`Invalid webhook timestamp format`);let l=Math.floor(Date.now()/1e3);if(l-c>r)throw new GH(`Webhook timestamp is too old`);if(c>l+r)throw new GH(`Webhook timestamp is too new`);let u=a.split(` `).map(e=>e.startsWith(`v1,`)?e.substring(3):e),d=n.startsWith(`whsec_`)?Buffer.from(n.replace(`whsec_`,``),`base64`):Buffer.from(n,`utf-8`),f=s?`${s}.${o}.${e}`:`${o}.${e}`,p=await crypto.subtle.importKey(`raw`,d,{name:`HMAC`,hash:`SHA-256`},!1,[`verify`]);for(let e of u)try{let t=Buffer.from(e,`base64`);if(await crypto.subtle.verify(`HMAC`,p,t,new TextEncoder().encode(f)))return}catch{continue}throw new GH(`The given webhook signature does not match the expected signature`)}};cJ=new WeakSet,lJ=function(e){if(typeof e!=`string`||e.length===0)throw Error(`The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function`)},uJ=function(e,t){if(!e)throw Error(`Headers are required`);let n=e.get(t);if(n==null)throw Error(`Missing required header: ${t}`);return n};var fJ,pJ,mJ,hJ,gJ=`workload-identity-auth`,$=class{constructor({baseURL:e=kK(`OPENAI_BASE_URL`),apiKey:t=kK(`OPENAI_API_KEY`),organization:n=kK(`OPENAI_ORG_ID`)??null,project:r=kK(`OPENAI_PROJECT_ID`)??null,webhookSecret:i=kK(`OPENAI_WEBHOOK_SECRET`)??null,workloadIdentity:a,...o}={}){if(fJ.add(this),mJ.set(this,void 0),this.completions=new rq(this),this.chat=new dK(this),this.embeddings=new lq(this),this.files=new pq(this),this.images=new wq(this),this.audio=new _K(this),this.moderations=new Eq(this),this.models=new Tq(this),this.fineTuning=new xq(this),this.graders=new Cq(this),this.vectorStores=new oJ(this),this.webhooks=new dJ(this),this.beta=new nq(this),this.batches=new vK(this),this.uploads=new nJ(this),this.responses=new Xq(this),this.realtime=new kq(this),this.conversations=new cq(this),this.evals=new fq(this),this.containers=new oq(this),this.skills=new eJ(this),this.videos=new sJ(this),a){if(t&&t!==gJ)throw new Y("The `apiKey` and `workloadIdentity` arguments are mutually exclusive; only one can be passed at a time.");t=gJ}else if(t===void 0)throw new Y("Missing credentials. Please pass an `apiKey`, `workloadIdentity`, or set the `OPENAI_API_KEY` environment variable.");let s={apiKey:t,organization:n,project:r,webhookSecret:i,workloadIdentity:a,...o,baseURL:e||`https://api.openai.com/v1`};if(!s.dangerouslyAllowBrowser&&oU())throw new Y(`It looks like you're running in a browser-like environment.
|
|
68
|
+
|
|
69
|
+
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
70
|
+
If you understand the risks and have appropriate mitigations in place,
|
|
71
|
+
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
72
|
+
|
|
73
|
+
new OpenAI({ apiKey, dangerouslyAllowBrowser: true });
|
|
74
|
+
|
|
75
|
+
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
76
|
+
`);this.baseURL=s.baseURL,this.timeout=s.timeout??pJ.DEFAULT_TIMEOUT,this.logger=s.logger??console;let c=`warn`;this.logLevel=c,this.logLevel=XU(s.logLevel,`ClientOptions.logLevel`,this)??XU(kK(`OPENAI_LOG`),`process.env['OPENAI_LOG']`,this)??c,this.fetchOptions=s.fetchOptions,this.maxRetries=s.maxRetries??2,this.fetch=s.fetch??mU(),q(this,mJ,yU,`f`),this._options=s,a&&(this._workloadIdentityAuth=new xW(a,this.fetch)),this.apiKey=typeof t==`string`?t:`Missing Key`,this.organization=n,this.project=r,this.webhookSecret=i}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,workloadIdentity:this._options.workloadIdentity,organization:this.organization,project:this.project,webhookSecret:this.webhookSecret,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:t}){}async authHeaders(e){return Q([{Authorization:`Bearer ${this.apiKey}`}])}stringifyQuery(e){return RU(e)}getUserAgent(){return`${this.constructor.name}/JS ${aU}`}defaultIdempotencyKey(){return`stainless-node-retry-${OH()}`}makeStatusError(e,t,n,r){return jH.generate(e,t,n,r)}async _callApiKey(){let e=this._options.apiKey;if(typeof e!=`function`)return!1;let t;try{t=await e()}catch(e){throw e instanceof Y?e:new Y(`Failed to get token from 'apiKey' function: ${e.message}`,{cause:e})}if(typeof t!=`string`||!t)throw new Y(`Expected 'apiKey' function argument to return a string but it returned ${t}`);return this.apiKey=t,!0}buildURL(e,t,n){let r=!J(this,fJ,`m`,hJ).call(this)&&n||this.baseURL,i=YH(e)?new URL(e):new URL(r+(r.endsWith(`/`)&&e.startsWith(`/`)?e.slice(1):e)),a=this.defaultQuery(),o=Object.fromEntries(i.searchParams);return(!$H(a)||!$H(o))&&(t={...o,...a,...t}),typeof t==`object`&&t&&!Array.isArray(t)&&(i.search=this.stringifyQuery(t)),i.toString()}async prepareOptions(e){await this._callApiKey()}async prepareRequest(e,{url:t,options:n}){}get(e,t){return this.methodRequest(`get`,e,t)}post(e,t){return this.methodRequest(`post`,e,t)}patch(e,t){return this.methodRequest(`patch`,e,t)}put(e,t){return this.methodRequest(`put`,e,t)}delete(e,t){return this.methodRequest(`delete`,e,t)}methodRequest(e,t,n){return this.request(Promise.resolve(n).then(n=>({method:e,path:t,...n})))}request(e,t=null){return new fW(this,this.makeRequest(e,t,void 0))}async makeRequest(e,t,n){let r=await e,i=r.maxRetries??this.maxRetries;t??=i,await this.prepareOptions(r);let{req:a,url:o,timeout:s}=await this.buildRequest(r,{retryCount:i-t});await this.prepareRequest(a,{url:o,options:r});let c=`log_`+(Math.random()*(1<<24)|0).toString(16).padStart(6,`0`),l=n===void 0?``:`, retryOf: ${n}`,u=Date.now();if(tW(this).debug(`[${c}] sending request`,nW({retryOfRequestLogID:n,method:r.method,url:o,options:r,headers:a.headers})),r.signal?.aborted)throw new MH;let d=new AbortController,f=await this.fetchWithAuth(o,a,s,d).catch(AH),p=Date.now();if(f instanceof globalThis.Error){let e=`retrying, ${t} attempts remaining`;if(r.signal?.aborted)throw new MH;let i=kH(f)||/timed? ?out/i.test(String(f)+(`cause`in f?String(f.cause):``));if(t)return tW(this).info(`[${c}] connection ${i?`timed out`:`failed`} - ${e}`),tW(this).debug(`[${c}] connection ${i?`timed out`:`failed`} (${e})`,nW({retryOfRequestLogID:n,url:o,durationMs:p-u,message:f.message})),this.retryRequest(r,t,n??c);throw tW(this).info(`[${c}] connection ${i?`timed out`:`failed`} - error; no more retries left`),tW(this).debug(`[${c}] connection ${i?`timed out`:`failed`} (error; no more retries left)`,nW({retryOfRequestLogID:n,url:o,durationMs:p-u,message:f.message})),f instanceof KH||f instanceof qH?f:i?new PH:new NH({cause:f})}let m=`[${c}${l}${[...f.headers.entries()].filter(([e])=>e===`x-request-id`).map(([e,t])=>`, `+e+`: `+JSON.stringify(t)).join(``)}] ${a.method} ${o} ${f.ok?`succeeded`:`failed`} with status ${f.status} in ${p-u}ms`;if(!f.ok){if(f.status===401&&this._workloadIdentityAuth&&!r.__metadata?.hasStreamingBody&&!r.__metadata?.workloadIdentityTokenRefreshed)return await vU(f.body),this._workloadIdentityAuth.invalidateToken(),this.makeRequest({...r,__metadata:{...r.__metadata,workloadIdentityTokenRefreshed:!0}},t,n??c);let e=await this.shouldRetry(f);if(t&&e){let e=`retrying, ${t} attempts remaining`;return await vU(f.body),tW(this).info(`${m} - ${e}`),tW(this).debug(`[${c}] response error (${e})`,nW({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,durationMs:p-u})),this.retryRequest(r,t,n??c,f.headers)}let i=e?`error; no more retries left`:`error; not retryable`;tW(this).info(`${m} - ${i}`);let a=await f.text().catch(e=>AH(e).message),o=rU(a),s=o?void 0:a;throw tW(this).debug(`[${c}] response error (${i})`,nW({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,message:s,durationMs:Date.now()-u})),this.makeStatusError(f.status,o,s,f.headers)}return tW(this).info(m),tW(this).debug(`[${c}] response start`,nW({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,durationMs:p-u})),{response:f,options:r,controller:d,requestLogID:c,retryOfRequestLogID:n,startTime:u}}getAPIList(e,t,n){return this.requestAPIList(t,n&&`then`in n?n.then(t=>({method:`get`,path:e,...t})):{method:`get`,path:e,...n})}requestAPIList(e,t){let n=this.makeRequest(t,null,void 0);return new hW(this,n,e)}async fetchWithAuth(e,t,n,r){if(this._workloadIdentityAuth){let e=t.headers,n=e.get(`Authorization`);if(!n||n===`Bearer ${gJ}`){let t=await this._workloadIdentityAuth.getToken();e.set(`Authorization`,`Bearer ${t}`)}}return await this.fetchWithTimeout(e,t,n,r)}async fetchWithTimeout(e,t,n,r){let{signal:i,method:a,...o}=t||{},s=this._makeAbort(r);i&&i.addEventListener(`abort`,s,{once:!0});let c=setTimeout(s,n),l=globalThis.ReadableStream&&o.body instanceof globalThis.ReadableStream||typeof o.body==`object`&&o.body!==null&&Symbol.asyncIterator in o.body,u={signal:r.signal,...l?{duplex:`half`}:{},method:`GET`,...o};a&&(u.method=a.toUpperCase());try{return await this.fetch.call(void 0,e,u)}finally{clearTimeout(c)}}async shouldRetry(e){let t=e.headers.get(`x-should-retry`);return t===`true`?!0:t===`false`?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,t,n,r){let i,a=r?.get(`retry-after-ms`);if(a){let e=parseFloat(a);Number.isNaN(e)||(i=e)}let o=r?.get(`retry-after`);if(o&&!i){let e=parseFloat(o);i=Number.isNaN(e)?Date.parse(o)-Date.now():e*1e3}if(i===void 0){let n=e.maxRetries??this.maxRetries;i=this.calculateDefaultRetryTimeoutMillis(t,n)}return await iU(i),this.makeRequest(e,t-1,n)}calculateDefaultRetryTimeoutMillis(e,t){let n=t-e;return Math.min(.5*2**n,8)*(1-Math.random()*.25)*1e3}async buildRequest(e,{retryCount:t=0}={}){let n={...e},{method:r,path:i,query:a,defaultBaseURL:o}=n,s=this.buildURL(i,a,o);`timeout`in n&&nU(`timeout`,n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:c,body:l,isStreamingBody:u}=this.buildBody({options:n});return u&&(e.__metadata={...e.__metadata,hasStreamingBody:!0}),{req:{method:r,headers:await this.buildHeaders({options:e,method:r,bodyHeaders:c,retryCount:t}),...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:`half`},...l&&{body:l},...this.fetchOptions??{},...n.fetchOptions??{}},url:s,timeout:n.timeout}}async buildHeaders({options:e,method:t,bodyHeaders:n,retryCount:r}){let i={};this.idempotencyHeader&&t!==`get`&&(e.idempotencyKey||=this.defaultIdempotencyKey(),i[this.idempotencyHeader]=e.idempotencyKey);let a=Q([i,{Accept:`application/json`,"User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(r),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...pU(),"OpenAI-Organization":this.organization,"OpenAI-Project":this.project},await this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(a),a.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:t}}){if(!e)return{bodyHeaders:void 0,body:void 0,isStreamingBody:!1};let n=Q([t]),r=globalThis.ReadableStream!==void 0&&e instanceof globalThis.ReadableStream,i=!r&&(typeof e==`string`||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||globalThis.Blob!==void 0&&e instanceof globalThis.Blob||e instanceof URLSearchParams||e instanceof FormData);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e==`string`&&n.values.has(`content-type`)||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||r?{bodyHeaders:void 0,body:e,isStreamingBody:!i}:typeof e==`object`&&(Symbol.asyncIterator in e||Symbol.iterator in e&&`next`in e&&typeof e.next==`function`)?{bodyHeaders:void 0,body:gU(e),isStreamingBody:!0}:typeof e==`object`&&n.values.get(`content-type`)===`application/x-www-form-urlencoded`?{bodyHeaders:{"content-type":`application/x-www-form-urlencoded`},body:this.stringifyQuery(e),isStreamingBody:!1}:{...J(this,mJ,`f`).call(this,{body:e,headers:n}),isStreamingBody:!1}}};pJ=$,mJ=new WeakMap,fJ=new WeakSet,hJ=function(){return this.baseURL!==`https://api.openai.com/v1`},$.OpenAI=pJ,$.DEFAULT_TIMEOUT=6e5,$.OpenAIError=Y,$.APIError=jH,$.APIConnectionError=NH,$.APIConnectionTimeoutError=PH,$.APIUserAbortError=MH,$.NotFoundError=RH,$.ConflictError=zH,$.RateLimitError=VH,$.BadRequestError=FH,$.AuthenticationError=IH,$.InternalServerError=HH,$.PermissionDeniedError=LH,$.UnprocessableEntityError=BH,$.InvalidWebhookSignatureError=GH,$.toFile=RW,$.Completions=rq,$.Chat=dK,$.Embeddings=lq,$.Files=pq,$.Images=wq,$.Audio=_K,$.Moderations=Eq,$.Models=Tq,$.FineTuning=xq,$.Graders=Cq,$.VectorStores=oJ,$.Webhooks=dJ,$.Beta=nq,$.Batches=vK,$.Uploads=nJ,$.Responses=Xq,$.Realtime=kq,$.Conversations=cq,$.Evals=fq,$.Containers=oq,$.Skills=eJ,$.Videos=sJ,cu(),vd(),A(),Zl();var _J={class:`start-0 inset-y-0 flex items-center justify-center px-2`},vJ={class:`start-0 inset-y-0 flex items-center justify-center px-2`},yJ=(0,t.defineComponent)({__name:`AiPrompt`,setup(e){let{isLoading:i,commitSchema:a}=Jl(),o=(0,r.useMediaQuery)(`(max-width: 768px)`),s=hd(),{t:c}=k(),l=(0,t.ref)(``),u=(0,t.ref)(!1),d=(0,t.ref)(!1),f=e=>{try{return JSON.parse(e)}catch(e){return console.error(`Error parsing form schema JSON:`,e),[]}},p=async()=>{if(l.value===``){aH(c(`ai.emptyPrompt`),{description:c(`ai.emptyPromptDescription`),action:{label:c(`ai.close`)}});return}i.value=!0;let e=new $({apiKey:s.apiKey,dangerouslyAllowBrowser:!0});c(`ai.defaultInstructions`),a(f((await e.responses.create({model:`gpt-4.1-mini`,instructions:`# Identity
|
|
77
|
+
|
|
78
|
+
You are a form building assistant that will create a Formkit Schema object
|
|
79
|
+
based on the users requirements.
|
|
80
|
+
|
|
81
|
+
# Instructions
|
|
82
|
+
|
|
83
|
+
* In the examples section, you will see the default form elements
|
|
84
|
+
that the schema is built from.
|
|
85
|
+
|
|
86
|
+
* Each element the user asks for will follow the exact same format,
|
|
87
|
+
except for a random key that must be added
|
|
88
|
+
|
|
89
|
+
* Each element in the list must have a randomized __key element
|
|
90
|
+
|
|
91
|
+
* Do not change any of the fields or the value of the $formkit field,
|
|
92
|
+
however if the user asks you may change the values of anything else
|
|
93
|
+
as long as it follows the correct formatting
|
|
94
|
+
|
|
95
|
+
* Do not add anything to the response but the data structure, no markdown,
|
|
96
|
+
no styling, just purely the code the user has asked for.
|
|
97
|
+
|
|
98
|
+
* Only give the response in a valid JSON string so it can be parsed into
|
|
99
|
+
an array of objects
|
|
100
|
+
|
|
101
|
+
* Always default to col-span-2 unless the user specifies the elements are
|
|
102
|
+
to be next to each other in some way.
|
|
103
|
+
|
|
104
|
+
* Always add a submit button at the end of each form schema object
|
|
105
|
+
|
|
106
|
+
# Examples
|
|
107
|
+
|
|
108
|
+
<default_form_elements>
|
|
109
|
+
[
|
|
110
|
+
{
|
|
111
|
+
"$formkit": "text",
|
|
112
|
+
"name": "Text",
|
|
113
|
+
"label": "Client Name",
|
|
114
|
+
"outerClass": "col-span-2",
|
|
115
|
+
"id": "text_field",
|
|
116
|
+
"placeholder": "Enter your name",
|
|
117
|
+
"help": "This is help text",
|
|
118
|
+
"validation": "",
|
|
119
|
+
"validationVisibility": "live",
|
|
120
|
+
"description": "Single line text field"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"$formkit": "textarea",
|
|
124
|
+
"name": "Text Area",
|
|
125
|
+
"label": "Client Address",
|
|
126
|
+
"outerClass": "col-span-2",
|
|
127
|
+
"id": "textarea_field",
|
|
128
|
+
"placeholder": "Enter your address",
|
|
129
|
+
"help": "This is help text",
|
|
130
|
+
"validation": "",
|
|
131
|
+
"validationVisibility": "live",
|
|
132
|
+
"description": "Multi-line text field"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"$formkit": "email",
|
|
136
|
+
"name": "Email",
|
|
137
|
+
"label": "Client Email",
|
|
138
|
+
"outerClass": "col-span-2",
|
|
139
|
+
"id": "email_field",
|
|
140
|
+
"placeholder": "Enter your email",
|
|
141
|
+
"help": "This is help text",
|
|
142
|
+
"validation": "email",
|
|
143
|
+
"validationVisibility": "live",
|
|
144
|
+
"description": "Email field input"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"$formkit": "number",
|
|
148
|
+
"name": "Number",
|
|
149
|
+
"label": "Client Age",
|
|
150
|
+
"outerClass": "col-span-2",
|
|
151
|
+
"id": "number_field",
|
|
152
|
+
"placeholder": "Enter your age",
|
|
153
|
+
"number": "integer",
|
|
154
|
+
"help": "This is help text",
|
|
155
|
+
"validation": "number",
|
|
156
|
+
"validationVisibility": "live",
|
|
157
|
+
"description": "Single number input"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"$formkit": "url",
|
|
161
|
+
"label": "URL Field",
|
|
162
|
+
"help": "This is help text",
|
|
163
|
+
"outerClass": "col-span-2",
|
|
164
|
+
"placeholder": "www.example.com",
|
|
165
|
+
"name": "URL",
|
|
166
|
+
"id": "url_field",
|
|
167
|
+
"validation": "url",
|
|
168
|
+
"validationVisibility": "live",
|
|
169
|
+
"description": "URL field input"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"$formkit": "checkbox",
|
|
173
|
+
"label": "Label For Checkbox",
|
|
174
|
+
"help": "This is help text",
|
|
175
|
+
"outerClass": "col-span-2",
|
|
176
|
+
"name": "Checkbox",
|
|
177
|
+
"options": ["One"],
|
|
178
|
+
"id": "checkbox_field",
|
|
179
|
+
"validation": "",
|
|
180
|
+
"validationVisibility": "live",
|
|
181
|
+
"description": "Multiple choice checkbox"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"$formkit": "color",
|
|
185
|
+
"label": "Color Field",
|
|
186
|
+
"value": "#00ff00",
|
|
187
|
+
"help": "This is help text",
|
|
188
|
+
"outerClass": "col-span-2",
|
|
189
|
+
"name": "Color",
|
|
190
|
+
"id": "color_field",
|
|
191
|
+
"validation": "",
|
|
192
|
+
"validationVisibility": "live",
|
|
193
|
+
"description": "Color picker"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"$formkit": "date",
|
|
197
|
+
"label": "Date Field",
|
|
198
|
+
"help": "This is help text",
|
|
199
|
+
"outerClass": "col-span-2",
|
|
200
|
+
"name": "Date",
|
|
201
|
+
"id": "date_field",
|
|
202
|
+
"validation": "",
|
|
203
|
+
"validationVisibility": "live",
|
|
204
|
+
"description": "Date input picker"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"$formkit": "time",
|
|
208
|
+
"label": "Time Field",
|
|
209
|
+
"help": "This is help text",
|
|
210
|
+
"outerClass": "col-span-2",
|
|
211
|
+
"name": "Time",
|
|
212
|
+
"id": "time_field",
|
|
213
|
+
"validation": "",
|
|
214
|
+
"validationVisibility": "live",
|
|
215
|
+
"description": "Time input picker"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"$formkit": "datetime-local",
|
|
219
|
+
"label": "Date Time Local Field",
|
|
220
|
+
"help": "This is help text",
|
|
221
|
+
"outerClass": "col-span-2",
|
|
222
|
+
"name": "Date-Time",
|
|
223
|
+
"id": "datetime_local_field",
|
|
224
|
+
"validation": "",
|
|
225
|
+
"validationVisibility": "live",
|
|
226
|
+
"description": "Date and time input"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"$formkit": "file",
|
|
230
|
+
"label": "File Field",
|
|
231
|
+
"help": "Select as many files as you want",
|
|
232
|
+
"outerClass": "col-span-2",
|
|
233
|
+
"name": "File Picker",
|
|
234
|
+
"id": "file_field",
|
|
235
|
+
"validation": "",
|
|
236
|
+
"multiple": false,
|
|
237
|
+
"validationVisibility": "live",
|
|
238
|
+
"description": "One or more file uploads"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"$formkit": "password",
|
|
242
|
+
"label": "Password Field",
|
|
243
|
+
"placeholder": "Enter your password",
|
|
244
|
+
"outerClass": "col-span-2",
|
|
245
|
+
"help": "This is help text",
|
|
246
|
+
"name": "Password",
|
|
247
|
+
"id": "password_field",
|
|
248
|
+
"validation": "",
|
|
249
|
+
"validationVisibility": "live",
|
|
250
|
+
"description": "Password masked field"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"$formkit": "radio",
|
|
254
|
+
"options": ["one"],
|
|
255
|
+
"label": "Radio Field",
|
|
256
|
+
"help": "This is help text",
|
|
257
|
+
"outerClass": "col-span-2",
|
|
258
|
+
"name": "Radio",
|
|
259
|
+
"id": "radio_field",
|
|
260
|
+
"validation": "",
|
|
261
|
+
"validationVisibility": "live",
|
|
262
|
+
"description": "Single choice select"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"$formkit": "range",
|
|
266
|
+
"label": "Range Field",
|
|
267
|
+
"children": "$slots.default",
|
|
268
|
+
"help": "This is help text",
|
|
269
|
+
"outerClass": "col-span-2",
|
|
270
|
+
"value": "0",
|
|
271
|
+
"name": "Range",
|
|
272
|
+
"__raw__sectionsSchema": {
|
|
273
|
+
"prefix": {
|
|
274
|
+
"$el": "div",
|
|
275
|
+
"attrs": {
|
|
276
|
+
"class": " py-1 px-2 mr-1 text-sm flex items-center bg-muted mr-2 rounded-md"
|
|
277
|
+
},
|
|
278
|
+
"children": "$value"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"id": "range_field",
|
|
282
|
+
"min": 0,
|
|
283
|
+
"max": 10,
|
|
284
|
+
"validation": "",
|
|
285
|
+
"validationVisibility": "live",
|
|
286
|
+
"description": "Slider field input"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"$formkit": "select",
|
|
290
|
+
"label": "Select Field",
|
|
291
|
+
"help": "This is help text",
|
|
292
|
+
"outerClass": "col-span-2",
|
|
293
|
+
"name": "Dropdown Select",
|
|
294
|
+
"id": "select_field",
|
|
295
|
+
"validation": "",
|
|
296
|
+
"validationVisibility": "live",
|
|
297
|
+
"options": ["one"],
|
|
298
|
+
"description": "Selection dropdown"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"$formkit": "tel",
|
|
302
|
+
"label": "Tel Field",
|
|
303
|
+
"placeholder": "(+XX) XXXXXXXXXX",
|
|
304
|
+
"help": "This is help text",
|
|
305
|
+
"outerClass": "col-span-2",
|
|
306
|
+
"name": "Telephone Number",
|
|
307
|
+
"id": "tel_field",
|
|
308
|
+
"validation": "",
|
|
309
|
+
"validationVisibility": "live",
|
|
310
|
+
"description": "Telephone input field"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"$formkit": "submit",
|
|
314
|
+
"outerClass": "col-span-2 pt-2",
|
|
315
|
+
"type": "submit",
|
|
316
|
+
"name": "Submit Button",
|
|
317
|
+
"description": "Allows form submission",
|
|
318
|
+
"label": "Submit",
|
|
319
|
+
},
|
|
320
|
+
]
|
|
321
|
+
</default_form_elements>
|
|
322
|
+
|
|
323
|
+
<user_query>
|
|
324
|
+
Build me a form with two text inputs, one number input, one text area input, and one range input.
|
|
325
|
+
</user_query>
|
|
326
|
+
|
|
327
|
+
<assistant_response>
|
|
328
|
+
[
|
|
329
|
+
{
|
|
330
|
+
"$formkit": "text",
|
|
331
|
+
"name": "Text",
|
|
332
|
+
"label": "Client Name",
|
|
333
|
+
"id": "text_field",
|
|
334
|
+
"outerClass": "col-span-2",
|
|
335
|
+
"placeholder": "Enter your name",
|
|
336
|
+
"help": "This is help text",
|
|
337
|
+
"validation": "",
|
|
338
|
+
"validationVisibility": "live",
|
|
339
|
+
"description": "Single line text field"
|
|
340
|
+
"__key": "12k3l1l1l2KC234321"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"$formkit": "text",
|
|
344
|
+
"name": "Text",
|
|
345
|
+
"label": "Client Name",
|
|
346
|
+
"id": "text_field",
|
|
347
|
+
"outerClass": "col-span-2",
|
|
348
|
+
"placeholder": "Enter your name",
|
|
349
|
+
"help": "This is help text",
|
|
350
|
+
"validation": "",
|
|
351
|
+
"validationVisibility": "live",
|
|
352
|
+
"description": "Single line text field"
|
|
353
|
+
"__key": "FDS231000fmAS"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"$formkit": "number",
|
|
357
|
+
"name": "Number",
|
|
358
|
+
"label": "Client Age",
|
|
359
|
+
"id": "number_field",
|
|
360
|
+
"outerClass": "col-span-2",
|
|
361
|
+
"placeholder": "Enter your age",
|
|
362
|
+
"number": "integer",
|
|
363
|
+
"help": "This is help text",
|
|
364
|
+
"validation": "",
|
|
365
|
+
"validationVisibility": "live",
|
|
366
|
+
"description": "Single number input"
|
|
367
|
+
"__key": "ALOSKW20394kdFDs"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"$formkit": "textarea",
|
|
371
|
+
"name": "Text Area",
|
|
372
|
+
"label": "Client Address",
|
|
373
|
+
"id": "textarea_field",
|
|
374
|
+
"outerClass": "col-span-2",
|
|
375
|
+
"placeholder": "Enter your address",
|
|
376
|
+
"help": "This is help text",
|
|
377
|
+
"validation": "",
|
|
378
|
+
"validationVisibility": "live",
|
|
379
|
+
"description": "Multi-line text field"
|
|
380
|
+
"__key": "DJKQOQ39920323"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"$formkit": "range",
|
|
384
|
+
"label": "Range Field",
|
|
385
|
+
"children": "$slots.default",
|
|
386
|
+
"help": "This is help text",
|
|
387
|
+
"value": "0",
|
|
388
|
+
"outerClass": "col-span-2",
|
|
389
|
+
"name": "Range",
|
|
390
|
+
"__raw__sectionsSchema": {
|
|
391
|
+
"prefix": {
|
|
392
|
+
"$el": "div",
|
|
393
|
+
"attrs": {
|
|
394
|
+
"class": " py-1 px-2 mr-1 text-sm flex items-center bg-muted mr-2 rounded-md"
|
|
395
|
+
},
|
|
396
|
+
"children": "$value"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"id": "range_field",
|
|
400
|
+
"min": 0,
|
|
401
|
+
"max": 10,
|
|
402
|
+
"validation": "",
|
|
403
|
+
"validationVisibility": "live",
|
|
404
|
+
"description": "Slider field input"
|
|
405
|
+
"__key": "FDJSKLA3233nn22k12j"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"$formkit": "submit",
|
|
409
|
+
"outerClass": "col-span-2 pt-2",
|
|
410
|
+
"type": "submit",
|
|
411
|
+
"name": "Submit Button",
|
|
412
|
+
"description": "Allows form submission",
|
|
413
|
+
"label": "Submit",
|
|
414
|
+
},
|
|
415
|
+
]
|
|
416
|
+
</assistant_response>
|
|
417
|
+
|
|
418
|
+
<user_query>
|
|
419
|
+
Build me a form with two text inputs next to each other, one text area, and an email and date field side by side
|
|
420
|
+
</user_query>
|
|
421
|
+
|
|
422
|
+
<assistant_response>
|
|
423
|
+
[
|
|
424
|
+
{
|
|
425
|
+
"$formkit": "text",
|
|
426
|
+
"name": "Text",
|
|
427
|
+
"label": "Client Name",
|
|
428
|
+
"id": "text_field",
|
|
429
|
+
"outerClass": "col-span-1",
|
|
430
|
+
"placeholder": "Enter your name",
|
|
431
|
+
"help": "This is help text",
|
|
432
|
+
"validation": "",
|
|
433
|
+
"validationVisibility": "live",
|
|
434
|
+
"description": "Single line text field"
|
|
435
|
+
"__key": "12k3l1l1l2KC234321"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"$formkit": "text",
|
|
439
|
+
"name": "Text",
|
|
440
|
+
"label": "Client Name",
|
|
441
|
+
"id": "text_field",
|
|
442
|
+
"outerClass": "col-span-1",
|
|
443
|
+
"placeholder": "Enter your name",
|
|
444
|
+
"help": "This is help text",
|
|
445
|
+
"validation": "",
|
|
446
|
+
"validationVisibility": "live",
|
|
447
|
+
"description": "Single line text field"
|
|
448
|
+
"__key": "12k3l1l1l2KC234321"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"$formkit": "textarea",
|
|
452
|
+
"name": "Text Area",
|
|
453
|
+
"label": "Client Address",
|
|
454
|
+
"id": "textarea_field",
|
|
455
|
+
"outerClass": "col-span-2",
|
|
456
|
+
"placeholder": "Enter your address",
|
|
457
|
+
"help": "This is help text",
|
|
458
|
+
"validation": "",
|
|
459
|
+
"validationVisibility": "live",
|
|
460
|
+
"description": "Multi-line text field"
|
|
461
|
+
"__key": "DJKQOQ39920323"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"$formkit": "email",
|
|
465
|
+
"name": "Email",
|
|
466
|
+
"label": "Client Email",
|
|
467
|
+
"outerClass": "col-span-1",
|
|
468
|
+
"id": "email_field",
|
|
469
|
+
"placeholder": "Enter your email",
|
|
470
|
+
"help": "This is help text",
|
|
471
|
+
"validation": "",
|
|
472
|
+
"validationVisibility": "live",
|
|
473
|
+
"description": "Email field input"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"$formkit": "date",
|
|
477
|
+
"label": "Date Field",
|
|
478
|
+
"help": "This is help text",
|
|
479
|
+
"outerClass": "col-span-1",
|
|
480
|
+
"name": "Date",
|
|
481
|
+
"id": "date_field",
|
|
482
|
+
"validation": "",
|
|
483
|
+
"validationVisibility": "live",
|
|
484
|
+
"description": "Date input picker"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"$formkit": "submit",
|
|
488
|
+
"outerClass": "col-span-2 pt-2",
|
|
489
|
+
"type": "submit",
|
|
490
|
+
"name": "Submit Button",
|
|
491
|
+
"description": "Allows form submission",
|
|
492
|
+
"label": "Submit",
|
|
493
|
+
},
|
|
494
|
+
]
|
|
495
|
+
</assistant_response>
|
|
496
|
+
`,input:l.value})).output_text),{reason:`ai`}),i.value=!1,l.value=``},m=()=>{u.value=!u.value};return(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.unref)(o)?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)((0,t.unref)(nu)(`flex w-full min-w-0 rounded-lg card relative items-center justify-center`,`bg-gradient-to-br from-secondary to-emerald-100/80 dark:from-secondary dark:to-emerald-800/80 dark:border-ring/5`,u.value?`ring-2 ring-ring transition-all duration-300`:`border border-ring/20 dark:border-ring/10 transition-all duration-300`,(0,t.unref)(i)?`bg-primary/5 shadow-inner animate-pulse transition-colors duration-300`:``))},[(0,t.createElementVNode)(`span`,_J,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`i-lucide-bot-message-square size-6 text-muted-foreground`))},null,2)]),(0,t.createVNode)((0,t.unref)(n.NInput),{type:`textarea`,onFocus:m,onBlur:m,status:`warning`,class:`border-none shadow-none bg-transparent flex-1`,autosize:{minRows:1,maxRows:4},placeholder:(0,t.unref)(c)(`ai.placeholder`),value:l.value,"onUpdate:value":r[0]||=e=>l.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,size:`medium`,class:`hover:bg-green-500 dark:hover:bg-green-500/30 hover:text-white h-6 w-6 mr-2`,onClick:r[1]||=e=>p(),disabled:(0,t.unref)(i)},{icon:(0,t.withCtx)(()=>[...r[6]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-send-horizontal h-4 w-4`},null,-1)]]),_:1},8,[`disabled`])],2)),(0,t.unref)(o)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NPopover),{key:1,show:d.value,"onUpdate:show":r[5]||=e=>d.value=e,trigger:`click`,"show-arrow":!1,placement:`bottom`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NTooltip),{trigger:`hover`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{id:`form-dialog-portal`,secondary:``,circle:``,size:`small`,class:`h-5 w-5 !p-2`,onClick:r[2]||=e=>d.value=!d.value},{icon:(0,t.withCtx)(()=>[...r[7]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-bot-message-square h-4 w-4`},null,-1)]]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(c)(`ai.tooltip`)),1)]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`flex rounded-lg w-[80vw] max-w-[400px] card relative items-center justify-center`,`bg-gradient-to-br from-secondary to-emerald-100/50 dark:from-secondary dark:to-emerald-800/30`,u.value?`border ring ring-ring`:`border border-primary/10`,(0,t.unref)(i)?`bg-primary/5 shadow-inner animate-pulse transition-colors duration-300`:``))},[(0,t.createElementVNode)(`span`,vJ,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)((0,t.unref)(nu)(`i-lucide-bot-message-square size-6 text-muted-foreground`))},null,2)]),(0,t.createVNode)((0,t.unref)(n.NInput),{type:`textarea`,onFocus:m,onBlur:m,class:`border-none shadow-none bg-transparent flex-1`,autosize:{minRows:1,maxRows:4},placeholder:(0,t.unref)(c)(`ai.promptPlaceholder`),value:l.value,"onUpdate:value":r[3]||=e=>l.value=e},null,8,[`placeholder`,`value`]),(0,t.createVNode)((0,t.unref)(n.NButton),{quaternary:``,circle:``,size:`small`,class:`hover:bg-green-500 dark:hover:bg-green-500 hover:text-white dark:hover:text-black h-6 w-6 mr-2`,onClick:r[4]||=e=>p(),disabled:(0,t.unref)(i)},{icon:(0,t.withCtx)(()=>[...r[8]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-send-horizontal h-4 w-4`},null,-1)]]),_:1},8,[`disabled`])],2)]),_:1},8,[`show`])):(0,t.createCommentVNode)(``,!0)],64))}}),bJ=(0,t.defineComponent)({__name:`ThemeSwitcher`,setup(e){let i=(0,r.useColorMode)({disableTransition:!1}),a=[{label:`Light`,key:`light`},{label:`Dark`,key:`dark`},{label:`System`,key:`auto`}],o=e=>{i.value=e};return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NDropdown),{trigger:`click`,options:a,onSelect:o},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{secondary:``,circle:``,size:`small`,class:`h-5 w-5 !p-2`},{icon:(0,t.withCtx)(()=>[...r[0]||=[(0,t.createElementVNode)(`div`,{class:`relative flex items-center justify-center`},[(0,t.createElementVNode)(`span`,{class:`i-lucide-sun absolute h-3 w-3 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0 dark:text-green-200`}),(0,t.createElementVNode)(`span`,{class:`i-lucide-moon absolute h-3 w-3 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-green-200`})],-1)]]),_:1})]),_:1}))}});A(),Zl(),vd();var xJ={class:`sticky top-0 md:top-5 flex h-14 shrink-0 items-center rounded-2xl z-[1000] px-4`},SJ={class:`w-full grid grid-cols-3 items-center gap-3`},CJ={class:`flex items-center gap-2 justify-start`},wJ={class:`flex justify-center`},TJ={class:`w-full max-w-[560px]`},EJ={class:`flex items-center gap-2 justify-end`},DJ=(0,t.defineComponent)({__name:`BuilderHeader`,setup(e){let r=hd(),{canRedo:i,canUndo:a,commitSchema:o,redo:s,undo:c}=Jl(),{t:l}=k(),u=()=>{o([],{reason:`clear`})},d=(0,t.ref)(!1);return(e,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`header`,xJ,[(0,t.createElementVNode)(`div`,SJ,[(0,t.createElementVNode)(`div`,CJ,[(0,t.renderSlot)(e.$slots,`left`,{},()=>[(0,t.createVNode)((0,t.unref)(n.NPopconfirm),{onPositiveClick:u},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NTooltip),null,{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{secondary:``,circle:``,size:`small`,class:`h-5 w-5 !p-2`},{icon:(0,t.withCtx)(()=>[...o[2]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-trash-2 h-4 w-4 dark:text-green-200`},null,-1)]]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(l)(`builder.clearForm`)),1)]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(l)(`builder.clearConfirm`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NTooltip),null,{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{secondary:``,circle:``,size:`small`,onClick:o[0]||=e=>d.value=!0,class:`h-5 w-5 !p-2`},{icon:(0,t.withCtx)(()=>[...o[3]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-eye h-4 w-4 dark:text-green-200`},null,-1)]]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(l)(`builder.previewForm`)),1)]),_:1}),(0,t.createVNode)(DH,{show:d.value,"onUpdate:show":o[1]||=e=>d.value=e},null,8,[`show`])])]),(0,t.createElementVNode)(`div`,wJ,[(0,t.renderSlot)(e.$slots,`center`,{},()=>[(0,t.createElementVNode)(`div`,TJ,[(0,t.unref)(r).apiKey?((0,t.openBlock)(),(0,t.createBlock)(yJ,{key:0})):(0,t.createCommentVNode)(``,!0)])])]),(0,t.createElementVNode)(`div`,EJ,[(0,t.renderSlot)(e.$slots,`right`,{},()=>[(0,t.createVNode)((0,t.unref)(n.NButtonGroup),{class:`bg-card shadow-sm rounded-lg border border-border/50`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NTooltip),{placement:`bottom`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{secondary:``,circle:``,size:`small`,class:`h-5 w-5 !p-2`,disabled:!(0,t.unref)(a),onClick:(0,t.unref)(c)},{icon:(0,t.withCtx)(()=>[...o[4]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-undo-2 h-4 w-4 dark:text-green-200`},null,-1)]]),_:1},8,[`disabled`,`onClick`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(l)(`builder.undo`)),1)]),_:1}),(0,t.createVNode)((0,t.unref)(n.NTooltip),{placement:`bottom`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{secondary:``,circle:``,size:`small`,class:`h-5 w-5 !p-2`,disabled:!(0,t.unref)(i),onClick:(0,t.unref)(s)},{icon:(0,t.withCtx)(()=>[...o[5]||=[(0,t.createElementVNode)(`span`,{class:`i-lucide-redo-2 h-4 w-4 dark:text-green-200`},null,-1)]]),_:1},8,[`disabled`,`onClick`])]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(l)(`builder.redo`)),1)]),_:1})]),_:1}),(0,t.createVNode)(bJ)])])])]))}});Vc();function OJ(e){return t=>{let n=t;return!n||typeof n!=`object`?!1:n.$cmp===e||n.$formkit===e}}function kJ(e){let{type:t,overwrite:n}=e;if(Dc(Nc(e),n),e.component&&kb(t,{component:e.component,libraryName:e.schema.target??t}),e.category===`container`&&(e.canvas||e.preview)){let n=e.container??{dataShape:`none`,keyProp:`${t}Key`,primitive:`cmp`};Kw({id:t,match:OJ(t),canvas:e.canvas?{libraryKey:t,component:e.canvas}:void 0,preview:e.preview?{libraryKey:t,component:e.preview}:void 0,normalize:e.normalize??(e=>Lw(e,t,n)),formatPreview:e.formatPreview??((e,r)=>Zw(e,r,t,n))})}}function AJ(e){if(e?.length)for(let t of e)kJ({...t,overwrite:!0})}vd(),A(),Zl();var jJ={class:`p-4 flex flex-1 min-h-0 flex-col`},MJ=(0,t.defineComponent)({__name:`BuilderMain`,props:{modelValue:{},config:{},theme:{},abstract:{type:Boolean},bordered:{type:Boolean},clsPrefix:{},locale:{},dateLocale:{},namespace:{},rtl:{},tag:{},hljs:{},katex:{},themeOverrides:{},componentOptions:{},icons:{},breakpoints:{},preflightStyleDisabled:{type:Boolean},styleMountTarget:{},inlineThemeDisabled:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(e,{emit:r}){let i=e,a=r,o=ql(),{formDefinition:s,setFormDefinition:c}=o,l=hd();i.config&&(AJ(i.config.elements),md(i.config));let u=i.config??l,d=u?.availableLocales??[`zh-CN`,`en`],f=u?.localeFallback??`zh-CN`,p=$V({initialLocale:d.includes(u?.locale??``)?u.locale:f,availableLocales:d,localeFallback:f});(0,t.watch)(()=>p.locale.value,e=>{Wr(e===`zh-CN`?`zh`:e===`en`?`en`:e)},{immediate:!0}),vs({locale:(0,t.computed)(()=>p.locale.value),localeFallback:(0,t.computed)(()=>p.localeFallback.value),messages:(0,t.computed)(()=>u?.messages)});let m=!1,h=!1,g=e=>{try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}};(0,t.watch)(()=>i.modelValue,e=>{e&&(h||e!==s.value&&(m=!0,c(g(e),{resetHistory:!0}),(0,t.nextTick)(()=>{m=!1})))},{immediate:!0}),(0,t.watch)(s,e=>{m||(h=!0,a(`update:modelValue`,g(e)),(0,t.nextTick)(()=>{h=!1}))},{deep:!1});let _=e=>{let t=e.target;t&&(t.closest(`[data-canvas-item="true"]`)||t.closest(`button,a,input,textarea,select,option,[role="button"],[role="switch"],[contenteditable="true"]`)||t.closest(`.n-button,.n-input,.n-select,.n-switch,.n-dropdown,.n-popover`)||(o.selectedTarget.value=`form`,o.selectedKey.value=null))};return(r,a)=>((0,t.openBlock)(),(0,t.createBlock)(bH,{theme:i.theme,locale:(0,t.unref)(p).naiveLocale.value,"date-locale":(0,t.unref)(p).naiveDateLocale.value,"theme-overrides":e.themeOverrides,breakpoints:e.breakpoints,"cls-prefix":e.clsPrefix,"inline-theme-disabled":e.inlineThemeDisabled,"preflight-style-disabled":e.preflightStyleDisabled},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NLayout),{"has-sider":``,class:`h-screen w-full`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(cT),(0,t.createVNode)((0,t.unref)(n.NLayout),{"has-sider":``,"sider-placement":`right`,class:`flex-1`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NLayout),{class:`relative h-full`,"native-scrollbar":!1,onPointerdownCapture:_},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,jJ,[(0,t.renderSlot)(r.$slots,`header`,{},()=>[(0,t.createVNode)(DJ,null,(0,t.createSlots)({_:2},[r.$slots[`header-left`]?{name:`left`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`header-left`)]),key:`0`}:void 0,r.$slots[`header-center`]?{name:`center`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`header-center`)]),key:`1`}:void 0,r.$slots[`header-right`]?{name:`right`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`header-right`)]),key:`2`}:void 0]),1024)]),(0,t.createVNode)(fH,{class:`flex-1 min-h-0`},(0,t.createSlots)({_:2},[r.$slots.toolbar?{name:`toolbar`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`toolbar`)]),key:`0`}:void 0,r.$slots.empty?{name:`empty`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`empty`)]),key:`1`}:void 0]),1024)])]),_:3}),(0,t.createVNode)(FV)]),_:3})]),_:3})]),_:3},8,[`theme`,`locale`,`date-locale`,`theme-overrides`,`breakpoints`,`cls-prefix`,`inline-theme-disabled`,`preflight-style-disabled`]))}});vd(),A();var NJ={class:`form-builder-provider`},PJ=(0,t.defineComponent)({__name:`BuilderProvider`,props:{config:{},theme:{},themeOverrides:{},breakpoints:{},clsPrefix:{},inlineThemeDisabled:{type:Boolean},preflightStyleDisabled:{type:Boolean}},setup(e){let n=e;AJ(n.config.elements),md(n.config);let r=n.config.availableLocales??[`zh-CN`,`en`],i=n.config.localeFallback??`zh-CN`,a=$V({initialLocale:r.includes(n.config.locale??``)?n.config.locale:i,availableLocales:r,localeFallback:i});return(0,t.watch)(()=>n.config.locale,e=>{e&&r.includes(e)&&a.setLocale(e)},{immediate:!0}),vs({locale:(0,t.computed)(()=>a.locale.value),messages:(0,t.computed)(()=>n.config.messages)}),(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(bH,{theme:n.theme,locale:(0,t.unref)(a).naiveLocale.value,"date-locale":(0,t.unref)(a).naiveDateLocale.value,"theme-overrides":n.themeOverrides,breakpoints:n.breakpoints,"cls-prefix":n.clsPrefix,"inline-theme-disabled":n.inlineThemeDisabled,"preflight-style-disabled":n.preflightStyleDisabled},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,NJ,[(0,t.renderSlot)(e.$slots,`default`)])]),_:3},8,[`theme`,`locale`,`date-locale`,`theme-overrides`,`breakpoints`,`cls-prefix`,`inline-theme-disabled`,`preflight-style-disabled`]))}});function FJ(e,t){let n=`formkit-${e}`,r=t.props.family?`family:${t.props.family}__${e}`:``,i=t.props?.$formkit||t.props.type;if(t.props.family===`naive`)return e===`outer`||e===`wrapper`?{[n]:!0,"w-full":!0}:e===`inner`?{[n]:!0,"w-full":!0,"!p-0":!0,"!border-none":!0,"!bg-transparent":!0,"!shadow-none":!0}:e===`input`?{[n]:!0,"w-full":!0,"!p-0":!0,"!border-none":!0,"!bg-transparent":!0}:e===`label`?i===`submit`||i===`reset`||i===`naiveButton`?{[n]:!0,hidden:!0}:{[n]:!0,block:!0,"!text-xs":!0,"!font-bold":!0,"mb-1":!0,"text-neutral-700":!0,"dark:text-zinc-300":!0}:e===`help`?i===`submit`||i===`reset`||i===`naiveButton`?{[n]:!0,hidden:!0}:{[n]:!0,"text-[11px]":!0,"text-neutral-500":!0,"font-normal":!0,"mt-0.5":!0,"dark:text-zinc-400":!0}:e===`messages`?{[n]:!0,"mt-1":!0,"space-y-0.5":!0}:e===`message`?{[n]:!0,"text-red-500":!0,"text-[11px]":!0,"[line-height:1.2]":!0,"pl-1.5":!0,relative:!0,"before:content-['•']":!0,"before:absolute":!0,"before:left-0":!0,"before:top-0":!0,"dark:text-red-400":!0}:e===`messageLink`?{[n]:!0,"outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-offset-2":!0,"focus-visible:ring-red-500":!0}:{[n]:!0};let a=`${t.props.type}__${e}`;if(e===`label`&&(i===`submit`||i===`reset`||i===`naiveButton`))return{[n]:!0,hidden:!0};let o=`${a}__${r}`;if(!(o in IJ)){let t=IJ[a]??LJ[e]??{};t[n]=!0,r in IJ?IJ[o]={...IJ[r],...t}:IJ[o]=t}return IJ[o]??{[n]:!0}}var IJ={"family:button__wrapper":{"group-data-[disabled=true]:grayscale":!0},"family:button__input":{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"font-bold":!0,"rounded-xl":!0,"outline-none":!0,flex:!0,"!text-xs":!0,"px-6":!0,"py-3":!0,"items-center":!0,"mb-1.5":!0,"text-xs":!0,"ring-offset-2":!0,"ring-green-500":!0,"focus-visible:ring-2":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"group-data-[prefix-icon]:pl-4":!0,"group-data-[suffix-icon]:pr-4":!0,border:!0,"border-green-600":!0,"text-green-600":!0,"group-[]/repeater:shadow":!0,"group-[]/multistep:shadow":!0,"dark:border-amber-500":!0},"family:box__wrapper":{"inline-flex":!0,"items-center":!0,"mb-0.5":!0,"group-data-[multiple]:mb-0":!0},"family:box__legend":{block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"dark:text-zinc-300":!0,"mb-1.5":!0},"family:box__input":{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,peer:!0,"pointer-events-none":!0,absolute:!0,"h-0":!0,"w-0":!0,"overflow-hidden":!0,"opacity-0":!0},"family:box__decorator":{"mr-1.5":!0,"bg-white":!0,"ring-green-500":!0,"peer-checked:border-green-600":!0,relative:!0,block:!0,"text-base":!0,"w-[1em]":!0,"aspect-[1/1]":!0,border:!0,"border-neutral-400":!0,"text-transparent":!0,"peer-checked:bg-green-300":!0,"peer-checked:text-green-600":!0,"peer-focus-visible:ring-2":!0,"peer-focus-visible:ring-offset-1":!0,"select-none":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"peer-disabled:bg-neutral-100":!0,"group-data-[disabled]:grayscale":!0,"shadow-md":!0,"peer-disabled:cursor-not-allowed":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"dark:border-amber-800/60":!0,"dark:bg-transparent":!0,"dark:ring-offset-amber-500":!0,"dark:peer-focus-visible:ring-1":!0,"dark:peer-disabled:bg-zinc-600/50":!0,"dark:peer-checked:bg-amber-900":!0,"dark:peer-checked:text-amber-400":!0},"family:box__decoratorIcon":{absolute:!0,"left-1/2":!0,"top-1/2":!0,flex:!0,"h-full":!0,"w-full":!0,"-translate-x-1/2":!0,"-translate-y-1/2":!0},"family:box__option":{"mb-1":!0,"last:mb-0":!0,"data-[disabled]:opacity-50":!0,"data-[disabled]:select-none":!0,"group-data-[disabled]:data-[disabled]:opacity-100":!0},"family:box__label":{block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"mb-0.5":!0,"!mb-0":!0,"!font-normal":!0,"!text-sm":!0,"dark:text-zinc-300":!0},"family:box__optionHelp":{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"-mt-1":!0,"mb-1.5":!0,"ml-[min(2em,1.7rem)]":!0,relative:!0,"left-0":!0},"family:box__help":{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-zinc-400":!0,"mb-0.5":!0,"group-data-[multiple]:mb-1.5":!0,"group-data-[multiple]:-mt-1.5":!0},"family:text__wrapper":{flex:!0,"flex-col":!0,"items-start":!0,"justify-start":!0,"mb-1":!0,"last:mb-0":!0},"family:text__label":{block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"dark:text-zinc-300":!0,"!inline-flex":!0,"mb-1":!0},"family:text__inner":{"text-sm":!0,flex:!0,"items-center":!0,"w-full":!0,"py-1.5":!0,"px-2.5":!0,"rounded-xl":!0,border:!0,"border-neutral-400":!0,"bg-white":!0,"focus-within:ring-1":!0,"focus-within:!ring-green-500":!0,"focus-within:!border-green-500":!0,"group-data-[invalid]:border-red-500":!0,"group-data-[invalid]:ring-1":!0,"group-data-[invalid]:ring-red-500":!0,"group-data-[disabled]:bg-neutral-100":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"shadow-md":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"dark:bg-transparent":!0,"dark:border-amber-500/20":!0,"dark:group-data-[disabled]:bg-zinc-800/5":!0,"dark:group-data-[invalid]:border-red-500":!0,"dark:group-data-[invalid]:ring-red-500":!0},"family:text__input":{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"text-sm":!0,"text-neutral-700":!0,"min-w-0":!0,"min-h-[1.5em]":!0,grow:!0,"outline-none":!0,"bg-transparent":!0,"selection:bg-green-100":!0,"placeholder:text-neutral-400":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"dark:placeholder-zinc-400/50":!0,"dark:text-zinc-300":!0,"border-none":!0,"p-0":!0,"focus:ring-0":!0},"family:text__prefixIcon":{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},"family:text__suffixIcon":{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},"family:dropdown__wrapper":{"mb-1.5":!0},"family:dropdown__inner":{relative:!0,flex:!0,"items-center":!0,"bg-white":!0,border:!0,"border-neutral-400":!0,"rounded-xl":!0,"group-data-[is-multiline]:!rounded-xl":!0,"focus-within:ring-1":!0,"focus-within:!ring-green-500":!0,"focus-within:!border-green-500":!0,"group-data-[invalid]:border-red-500":!0,"group-data-[invalid]:ring-1":!0,"group-data-[invalid]:ring-red-500":!0,"group-data-[disabled]:bg-neutral-100":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"shadow-md":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"dark:bg-transparent":!0,"dark:border-amber-500/20":!0,"dark:group-data-[disabled]:bg-zinc-700/40":!0,"dark:group-data-[invalid]:border-red-500":!0,"dark:group-data-[invalid]:ring-red-500":!0},"family:dropdown__input":{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,grow:!0,"p-1.5":!0,"pr-0":!0,"pl-2.5":!0,"text-sm":!0,"text-neutral-700":!0,"text-ellipsis":!0,"min-w-0":!0,"outline-none":!0,"bg-transparent":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"group-data-[prefix-icon]:!pl-0":!0,"group-data-[suffix-icon]:!pr-0":!0,"placeholder:text-neutral-400":!0,"selection:bg-green-100":!0,"dark:placeholder:text-zinc-500":!0,"dark:text-zinc-300":!0,"border-none":!0,"focus:ring-0":!0,"bg-none":!0},"family:dropdown__listboxButton":{"w-[2.5em]":!0,"self-stretch":!0,"text-sm":!0,flex:!0,"items-center":!0,"text-neutral-700":!0,"z-10":!0,"dark:text-zinc-300":!0,"data-[disabled]:cursor-not-allowed":!0},"family:dropdown__removeSelection":{"w-[2.5em]":!0,"self-stretch":!0,"text-sm":!0,flex:!0,"items-center":!0,"text-neutral-700":!0,"hover:text-red-400":!0,"z-10":!0,"dark:text-zinc-300":!0},"family:dropdown__controlLabel":{absolute:!0,"opacity-0":!0,"pointer-events-none":!0,"text-[0px]":!0},"family:dropdown__selectIcon":{"text-sm":!0,"inline-flex":!0,"justify-center":!0,"w-[2.5em]":!0,relative:!0,"my-auto":!0,"[&>svg]:w-[1em]":!0,"[&>svg]:mx-auto":!0},"family:dropdown__closeIcon":{"text-sm":!0,"w-[0.75em]":!0,relative:!0,"m-auto":!0},"family:dropdown__prefixIcon":{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"!ml-1.5":!0,"!mr-0":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},"family:dropdown__suffixIcon":{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"!mr-1.5":!0,"!ml-0":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},"family:dropdown__dropdownWrapper":{"rounded-xl":!0,"shadow-xl":!0,"mt-0.5":!0,"overflow-clip":!0,"empty:hidden":!0,border:!0,"border-neutral-300":!0,"dark:border-zinc-700":!0,"group-data-[expanded]:opacity-100":!0,"group-data-[overscroll]:m-0":!0,"group-data-[overscroll]:shadow-none":!0,"group-data-[overscroll]:border-none":!0},"family:dropdown__listitemGroup":{"group/optgroup":!0,"last:pb-0":!0,"border-t":!0,"border-b":!0,"-mb-px":!0,"border-neutral-300":!0,"dark:border-zinc-700":!0},"family:dropdown__groupLabel":{block:!0,"pt-1":!0,"pb-0.5":!0,"px-2":!0,"font-bold":!0,"pointer-events-none":!0,"text-neutral-600":!0,"dark:text-zinc-500":!0},"family:dropdown__listbox":{"bg-white":!0,"rounded-xl":!0,"empty:hidden":!0,"dark:bg-zinc-800":!0,"group-data-[overscroll]:shadow-xl":!0,"group-data-[overscroll]:border":!0,"group-data-[overscroll]:border-neutral-300":!0,"group-data-[overscroll]:dark:border-neutral-700":!0},"family:dropdown__listitem":{relative:!0,flex:!0,"items-center":!0,"px-1.5":!0,"py-1":!0,"first:pt-1.5":!0,"last:pb-1.5":!0,"text-neutral-700":!0,"text-sm":!0,"data-[is-active]:bg-green-100":!0,"dark:text-zinc-200":!0,"dark:data-[is-active]:text-zinc-700":!0,"before:content-['']":!0,"before:absolute":!0,"before:inset-0":!0,"data-[is-active]:first:before:rounded-xl":!0,"data-[is-active]:first:before:rounded-b-none":!0,"data-[is-active]:last:before:rounded-xl":!0,"data-[is-active]:last:before:rounded-t-none":!0,"data-[is-active]:first:last:before:rounded-xl":!0,"data-[is-active]:before:ring-1":!0,"data-[is-active]:before:ring-green-500":!0,"data-[is-active]:before:ring-inset":!0,"data-[is-active]:before:ring-offset-green-100":!0,"group-[]/optgroup:first:before:!rounded-none":!0,"group-[]/optgroup:last:before:!rounded-none":!0},"family:dropdown__selectedIcon":{flex:!0,absolute:!0,"items-center":!0,"text-green-600":!0,"left-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0},"family:dropdown__option":{"ml-[1.5em]":!0},"family:dropdown__loadMore":{"data-[is-active]:bg-green-100":!0},"family:dropdown__loadMoreInner":{flex:!0,"text-xs":!0,"text-neutral-500":!0,"p-1.5":!0,"items-center":!0,"justify-center":!0,"[&>span]:mr-1.5":!0,"cursor-pointer":!0,"dark:text-zinc-200":!0,"dark:hover:text-amber-500":!0},"family:dropdown__selectionWrapper":{grow:!0,flex:!0,"items-center":!0,"text-neutral-700":!0},"family:dropdown__selection":{grow:!0,"text-neutral-700":!0,"group-data-[multiple]:p-1.5":!0,"dark:text-zinc-300":!0},"family:dropdown__tagsWrapper":{"w-full":!0},"family:dropdown__tagWrapper":{"group/tag":!0,rounded:!0,"mr-0.5":!0,"mb-0.5":!0,"outline-none":!0,"data-[active-selection=true]:ring-2":!0,"data-[active-selection=true]:ring-green-500":!0},"family:dropdown__tags":{"inline-flex":!0,"flex-wrap":!0,"items-center":!0,"w-full":!0,"-mb-0.5":!0,"empty:mb-0":!0},"family:dropdown__tag":{flex:!0,"items-center":!0,"cursor-default":!0,rounded:!0,"text-xs":!0,"px-1":!0,"py-0.5":!0,"bg-green-600":!0,"text-white":!0,"[&>[type=button]]:!w-[0.5em]":!0,"[&>[type=button]]:aspect-[1/1]":!0,"[&>[type=button]]:!text-inherit":!0,"[&>[type=button]]:cursor-pointer":!0,"group-data-[active-selection=true]/tag:bg-green-400":!0,"group-data-[active-selection=true]/tag:text-neutral-700":!0},"family:dropdown__emptyMessage":{flex:!0,"items-center":!0,"px-1.5":!0,"py-1":!0,"first:pt-1.5":!0,"last:pb-1.5":!0,"text-neutral-700":!0,"text-xs":!0,"aria-selected:text-white":!0,"aria-selected:bg-green-600":!0},button__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"bg-green-50":!0,"hover:bg-green-100":!0,"dark:text-amber-500":!0,"dark:bg-transparent":!0,"dark:hover:bg-amber-50/5":!0},checkbox__decorator:{rounded:!0},checkbox__decoratorIcon:{"max-w-[66.66%]":!0},color__inner:{"!w-auto":!0,"!p-1.5":!0,"!inline-flex":!0,"group-data-[prefix-icon]:border":!0,"group-data-[prefix-icon]:border-neutral-400":!0,"group-data-[suffix-icon]:border":!0,"group-data-[suffix-icon]:border-neutral-400":!0,"dark:group-data-[prefix-icon]:border-zinc-800":!0,"dark:group-data-[suffix-icon]:border-zinc-800":!0},color__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"!w-14":!0,"bg-transparent":!0,"cursor-pointer":!0,"rounded-xl":!0,"overflow-clip":!0,"[&::-webkit-color-swatch-wrapper]:p-0":!0,"[&::-webkit-color-swatch]:border-none":!0,"[&::-moz-color-swatch]:border-none":!0,"group-data-[prefix-icon]:mx-1.5":!0,"group-data-[suffix-icon]:mx-1.5":!0},color__prefixIcon:{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"group-data-[prefix-icon]:m-1.5":!0,"group-data-[prefix-icon]:mr-0":!0},color__suffixIcon:{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"group-data-[suffix-icon]:m-1.5":!0,"group-data-[prefix-icon]:ml-0":!0},date__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"focus:[&::-webkit-datetime-edit-day-field]:bg-green-100":!0,"focus:[&::-webkit-datetime-edit-month-field]:bg-green-100":!0,"focus:[&::-webkit-datetime-edit-year-field]:bg-green-100":!0},file__fileList:{"group/list":!0,peer:!0,"w-full":!0,"min-w-0":!0,"data-[has-multiple]:mb-[1.25em]":!0},file__fileItemIcon:{"h-[1em]":!0,"w-[1em]":!0,"mr-1.5":!0,"shrink-0":!0},file__fileItem:{flex:!0,"min-w-0":!0,"items-center":!0,"text-neutral-700":!0,"mb-1.5":!0,"last:mb-0":!0,"dark:text-zinc-300":!0},file__fileName:{truncate:!0,"min-w-0":!0,"w-full":!0,shrink:!0,"leading-5":!0,"group-data-[has-multiple]/list:text-xs":!0},file__fileRemove:{"right-1.5":!0,"ring-green-500":!0,"rounded-xl":!0,"z-20":!0,flex:!0,"appearance-none":!0,"items-center":!0,"text-[8px]":!0,"outline-none":!0,"hover:!text-red-500":!0,"focus-visible:ring-2":!0,"group-data-[disabled]:pointer-events-none":!0,"group-data-[disabled]:!text-neutral-500":!0,"peer-data-[has-multiple]:absolute":!0,"peer-data-[has-multiple]:bottom-[max(0.5em,8px)]":!0,"peer-data-[has-multiple]:left-2.5":!0,"peer-data-[has-multiple]:text-green-600":!0,"peer-data-[has-multiple]:text-[11px]":!0,"[line-height:1em]":!0,"peer-data-[has-multiple]:whitespace-nowrap":!0,"group-data-[prefix-icon]:peer-data-[has-multiple]:left-1.5":!0,"dark:hover:!text-red-400":!0},file__fileRemoveIcon:{block:!0,"text-base":!0,"w-[0.75em]":!0,relative:!0,"z-10":!0},file__inner:{relative:!0,"cursor-pointer":!0,"group-data-[has-multiple]:rounded-xl":!0},file__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"cursor-pointer":!0,"text-transparent":!0,absolute:!0,"inset-0":!0,"opacity-0":!0,"z-10":!0,"file:pointer-events-none":!0,"file:w-0":!0,"file:h-0":!0,"file:overflow-hidden":!0},file__noFiles:{flex:!0,"w-full":!0,"items-center":!0,"text-neutral-400":!0,"dark:text-zinc-500":!0},file__noFilesIcon:{"w-[1em]":!0,"mr-1.5":!0},form__form:{"group/form":!0},form__actions:{"":!0},form__summaryInner:{"group/summary":!0,border:!0,"border-neutral-400":!0,"bg-white":!0,"rounded-xl":!0,"py-1.5":!0,"px-2.5":!0,"shadow-md":!0,"dark:bg-transparent":!0,"dark:border-zinc-800":!0},form__summaryHeader:{"text-base":!0,"text-neutral-700":!0,"font-bold":!0,"mb-1.5":!0,"dark:text-zinc-300":!0},form__messages:{"":!0},form__message:{"text-red-600":!0,"mb-1.5":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-red-400":!0,"group-[]/summary:text-xs":!0},form__messageLink:{"group-[]/summary:outline-none":!0,"group-[]/summary:focus-visible:ring-2":!0,"group-[]/summary:ring-green-600":!0},month__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"focus:[&::-webkit-datetime-edit-month-field]:bg-green-100":!0,"focus:[&::-webkit-datetime-edit-year-field]:bg-green-100":!0},radio__decorator:{"rounded-full":!0},radio__decoratorIcon:{"max-w-[50%]":!0},range__inner:{relative:!0,"!border-none":!0,"!ring-0":!0,"!px-0":!0,"!bg-transparent":!0,"!shadow-none":!0},range__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"group/input":!0,"cursor-pointer":!0,"[&::-webkit-slider-runnable-track]:bg-neutral-400/50":!0,"[&::-webkit-slider-runnable-track]:h-[0.25em]":!0,"[&::-webkit-slider-runnable-track]:rounded-xl":!0,"dark:[&::-webkit-slider-runnable-track]:bg-zinc-600/50":!0,"[&::-webkit-slider-thumb]:appearance-none":!0,"[&::-webkit-slider-thumb]:w-[0.85em]":!0,"[&::-webkit-slider-thumb]:aspect-[1/1]":!0,"[&::-webkit-slider-thumb]:bg-green-600":!0,"[&::-webkit-slider-thumb]:rounded-full":!0,"[&::-webkit-slider-thumb]:relative":!0,"[&::-webkit-slider-thumb]:top-1/2":!0,"[&::-webkit-slider-thumb]:-translate-y-1/2":!0,"[&::-webkit-slider-thumb]:group-data-[disabled]:bg-neutral-500":!0,"[&::-webkit-slider-thumb]:group-data-[disabled]:!ring-neutral-300":!0,"[&::-webkit-slider-thumb]:focus-visible:ring-2":!0,"[&::-webkit-slider-thumb]:focus:!ring-green-500":!0,"[&::-webkit-slider-thumb]:focus:ring-offset-2":!0,"[&::-webkit-slider-thumb]:shadow-md":!0,"dark:[&::-webkit-slider-thumb]:group-data-[disabled]:!ring-zinc-700":!0,"dark:[&::-webkit-slider-thumb]:focus:ring-offset-zinc-700":!0,"[&::-moz-range-track]:bg-neutral-400/50":!0,"[&::-moz-range-track]:h-[0.25]":!0,"[&::-moz-range-track]:rounded-xl":!0,"dark:[&::-moz-range-track]:bg-zinc-600/50":!0,"[&::-moz-range-thumb]:appearance-none":!0,"[&::-moz-range-thumb]:border-none":!0,"[&::-moz-range-thumb]:w-[0.85em]":!0,"[&::-moz-range-thumb]:h-[0.85em]":!0,"[&::-moz-range-thumb]:bg-green-600":!0,"[&::-moz-range-thumb]:rounded-full":!0,"[&::-moz-range-thumb]:group-data-[disabled]:bg-neutral-500":!0,"[&::-moz-range-thumb]:group-data-[disabled]:!ring-neutral-300":!0,"[&::-moz-range-thumb]:focus-visible:ring-2":!0,"[&::-moz-range-thumb]:focus:!ring-green-500":!0,"[&::-moz-range-thumb]:focus:ring-offset-2":!0,"[&::-moz-range-thumb]:shadow-md":!0,"dark:[&::-moz-range-thumb]:group-data-[disabled]:!ring-zinc-500":!0,"dark:[&::-moz-range-thumb]:focus:ring-offset-zinc-700":!0},select__wrapper:{"mb-1.5":!0},select__inner:{relative:!0,flex:!0,"items-center":!0,"bg-white":!0,border:!0,"border-neutral-400":!0,"rounded-xl":!0,"focus-within:ring-1":!0,"focus-within:!ring-green-500":!0,"focus-within:!border-green-500":!0,"group-data-[invalid]:border-red-500":!0,"group-data-[invalid]:ring-1":!0,"group-data-[invalid]:ring-red-500":!0,"group-data-[disabled]:bg-neutral-100":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"shadow-md":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"group-data-[multiple]:rounded-xl":!0,"dark:bg-transparent":!0,"dark:border-amber-500/20":!0,"dark:group-data-[disabled]:bg-zinc-800/5":!0,"dark:group-data-[invalid]:border-red-500":!0,"dark:group-data-[invalid]:ring-red-500":!0},select__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,grow:!0,"p-1.5":!0,"py-1.5":!0,"px-2.5":!0,"pr-[2em]":!0,"text-sm":!0,"text-neutral-700":!0,"text-ellipsis":!0,"min-w-0":!0,"outline-none":!0,"bg-transparent":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"group-data-[prefix-icon]:!pl-0":!0,"group-data-[suffix-icon]:!pr-0":!0,"data-[placeholder]:text-neutral-400":!0,"group-data-[multiple]:!p-0":!0,"selection:bg-green-100":!0,"dark:data-[placeholder]:text-zinc-400/50":!0,"dark:text-zinc-300":!0,"border-none":!0,"focus:ring-0":!0,"bg-none":!0},select__selectIcon:{absolute:!0,"w-[1em]":!0,"text-neutral-700":!0,"pointer-events-none":!0,"right-1.5":!0,"group-data-[suffix-icon]:mr-[1.5em]":!0,"dark:text-zinc-300":!0},select__optGroup:{"bg-white":!0,"text-neutral-700":!0,"group/optgroup":!0,"group-data-[multiple]:px-1.5":!0,"pt-1.5":!0,"font-bold":!0,"text-xs":!0,"dark:bg-zinc-800":!0,"dark:text-zinc-300":!0},select__option:{"bg-white":!0,"text-neutral-700":!0,"group-data-[disabled]:opacity-50":!0,"group-data-[disabled]:select-none":!0,"group-data-[multiple]:checked:bg-green-100":!0,"group-data-[multiple]:focus:bg-green-100":!0,"group-data-[multiple]:text-xs":!0,"group-data-[multiple]:outline-none":!0,"group-data-[multiple]:border-none":!0,"group-data-[multiple]:py-1.5":!0,"group-data-[multiple]:px-1.5":!0,"dark:bg-zinc-800":!0,"dark:text-zinc-300":!0,"dark:group-data-[multiple]:focus:bg-amber-800":!0,"dark:group-data-[multiple]:checked:bg-amber-800":!0},select__prefixIcon:{flex:!0,"items-center":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"ml-1.5":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},select__suffixIcon:{flex:!0,"items-center":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"mr-1.5":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},submit__outer:{group:!0,"max-w-[24em]":!0,"min-w-0":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"text-sm":!0,"data-[disabled]:opacity-100":!0},submit__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"bg-green-600":!0,"!text-white":!0,"active:text-green-100":!0,"active:bg-green-700":!0,"hover:bg-green-700":!0,"disabled:border-neutral-400":!0,"disabled:bg-neutral-400":!0,"disabled:text-neutral-100":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"dark:disabled:border-zinc-100":!0,"dark:disabled:bg-zinc-500":!0,"dark:disabled:text-zinc-200":!0,"dark:text-white":!0,"dark:ring-offset-amber-500":!0,"before:transition-all":!0,"group-data-[loading=true]/form:before:content['']":!0,"group-data-[loading=true]/form:before:block":!0,"group-data-[loading=true]/form:before:animate-spin":!0,"group-data-[loading=true]/form:before:w-5":!0,"group-data-[loading=true]/form:before:h-5":!0,"group-data-[loading=true]/form:before:rounded-full":!0,"group-data-[loading=true]/form:before:mr-2.5":!0,"group-data-[loading=true]/form:before:-ml-1":!0,"group-data-[loading=true]/form:before:border-2":!0,"group-data-[loading=true]/form:before:border-solid":!0,"group-data-[loading=true]/form:before:border-white":!0,"group-data-[loading=true]/form:before:border-r-transparent":!0},submit__prefixIcon:{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"text-neutral-100":!0},submit__suffixIcon:{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"text-neutral-100":!0},textarea__inner:{flex:!0,"items-center":!0,"mb-1.5":!0,"bg-white":!0,border:!0,"border-neutral-400":!0,"rounded-xl":!0,"focus-within:ring-1":!0,"focus-within:!ring-green-500":!0,"focus-within:!border-green-500":!0,"group-data-[invalid]:border-red-500":!0,"group-data-[invalid]:ring-1":!0,"group-data-[invalid]:ring-red-500":!0,"group-data-[disabled]:bg-neutral-100":!0,"shadow-md":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"dark:border-amber-500/20":!0,"dark:group-data-[disabled]:bg-zinc-800/5":!0,"dark:group-data-[invalid]:border-red-500":!0,"dark:group-data-[invalid]:ring-red-500":!0,"dark:bg-transparent":!0},textarea__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"text-sm":!0,"h-20":!0,"text-neutral-700":!0,"min-w-0":!0,grow:!0,shrink:!0,"!py-1.5":!0,"!px-2.5":!0,"outline-none":!0,"bg-transparent":!0,"selection:bg-green-100":!0,"placeholder:text-neutral-400":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"dark:placeholder-zinc-400/50":!0,"dark:text-zinc-300":!0,"p-0":!0,"border-none":!0,"focus:ring-0":!0},textarea__prefixIcon:{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"!ml-1.5":!0,"!mr-0":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},textarea__suffixIcon:{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"!mr-1.5":!0,"!ml-0":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},time__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"focus:[&::-webkit-datetime-edit-hour-field]:bg-green-100":!0,"focus:[&::-webkit-datetime-edit-minute-field]:bg-green-100":!0,"focus:[&::-webkit-datetime-edit-ampm-field]:bg-green-100":!0},week__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"focus:[&::-webkit-datetime-edit-week-field]:bg-green-100":!0,"focus:[&::-webkit-datetime-edit-year-field]:bg-green-100":!0},autocomplete__selections:{flex:!0,absolute:!0,"inset-0":!0,"group-data-[multiple]:static":!0,"group-data-[multiple]:block":!0,"group-data-[empty]:hidden":!0,"group-data-[multiple]:mt-1":!0},autocomplete__selectionWrapper:{"bg-neutral-100":!0,"rounded-xl":!0,"group-data-[multiple]:border":!0,"group-data-[multiple]:border-neutral-300":!0,"group-data-[multiple]:mb-1":!0,"outline-none":!0,"data-[active-selection=true]:ring-2":!0,"data-[active-selection=true]:ring-green-500":!0,"dark:bg-zinc-600":!0,"dark:group-data-[multiple]:border-zinc-700":!0,"[&.formkit-dropZone]:opacity-25":!0,"[&.formkit-touchDropZone]:opacity-25":!0,"[&.formkit-touchDragging]:!flex":!0,"[&.formkit-longTouch]:opacity-25":!0},autocomplete__selection:{"rounded-xl":!0,just:!0,"pl-1.5":!0,"[&>*]:ml-0":!0,"dark:text-zinc-200":!0},colorpicker__outer:{group:!0,"max-w-[24em]":!0,"min-w-0":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"data-[disabled]:opacity-50":!0,"text-sm":!0,"data-[disabled]:cursor-not-allowed":!0,"data-[disabled]:pointer-events-none":!0},colorpicker__help:{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-zinc-400":!0,"group-data-[inline]:-mt-1":!0,"group-data-[inline]:mb-1.5":!0},colorpicker__inner:{relative:!0,"inline-flex":!0,"!w-auto":!0,"pl-1.5":!0,"group-data-[inline]:border-none":!0,"group-data-[inline]:shadow-none":!0,"group-data-[inline]:p-0":!0,"group-data-[inline]:bg-transparent":!0,"group-data-[inline]:outline-none":!0,"group-data-[inline]:!ring-0":!0,"group-data-[inline]:!w-full":!0,"group-data-[inline]:rounded-xl":!0},colorpicker__swatchPreview:{"w-full":!0,flex:!0,"justify-start":!0,"items-center":!0,"rounded-xl":!0,"text-sm":!0,"cursor-pointer":!0,"outline-none":!0},colorpicker__canvasSwatchPreviewWrapper:{relative:!0,"before:content-['']":!0,"before:absolute":!0,"before:inset-0":!0,"before:rounded-xl":!0,"before:shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)]":!0,"before:z-[2]":!0},colorpicker__canvasSwatchPreview:{"text-sm":!0,"rounded-xl":!0,"aspect-[1/1]":!0,"shrink-0":!0,grow:!0,"!w-[1.5em]":!0},colorpicker__valueString:{"text-sm":!0,"text-neutral-700":!0,"selection:bg-green-100":!0,"font-mono":!0,"inline-block":!0,"ml-1.5":!0,"mr-1.5":!0,"dark:text-zinc-300":!0,"dark:selection:text-zinc-700":!0},colorpicker__panel:{absolute:!0,"left-0":!0,"top-full":!0,"z-[99]":!0,flex:!0,"w-[100vw]":!0,"max-w-[18.5em]":!0,"touch-manipulation":!0,"flex-col":!0,"rounded-xl":!0,border:!0,"bg-white":!0,"p-1.5":!0,"shadow-lg":!0,"group-data-[inline]:static":!0,"group-data-[inline]:max-w-none":!0,"border-neutral-400":!0,"group-data-[inline]:z-auto":!0,"group-data-[inline]:w-full":!0,"group-data-[inline]:shadow-md":!0,"group-data-[inline]:group-data-[disabled]:!cursor-not-allowed":!0,"group-data-[inline]:group-data-[disabled]:!pointer-events-none":!0,"group-data-[inline]:[&:has([id^=swatches]:first-child:last-child)]:w-auto":!0,"group-data-[inline]:[&:has([id^=swatches]:first-child:last-child)_[id^=swatches]>div]:w-[1.5em]":!0,"dark:bg-zinc-800":!0,"dark:border-zinc-800":!0,"dark:group-data-[inline]:bg-transparent":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:!fixed":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:top-auto":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:max-w-none":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:bottom-0":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:left-0":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:rounded-none":!0},colorpicker__panelClose:{flex:!0,"justify-end":!0,"items-center":!0,"text-neutral-600":!0,"mb-1.5":!0,"-mt-1":!0,"border-none":!0,"bg-none":!0,"border-b":!0,"border-neutral-300":!0,"w-[calc(100%+1rem)]":!0,"-ml-2":!0,"pt-0":!0,"pr-1.5":!0,"pb-1.5":!0,"pl-1.5":!0,"dark:border-zinc-800":!0},colorpicker__closeIcon:{"w-[2rem]":!0,"aspect-[1/1]":!0,"p-1":!0,"rounded-xl":!0,border:!0,"[&>svg]:w-full":!0,"[&>svg]:aspect-[1/1]":!0,"[&>svg]:max-w-none":!0,"[&>svg]:max-h-none":!0},colorpicker__controlGroup:{grid:!0,"[grid-template-areas:'a_a_a'_'b_c_e'_'b_d_e']":!0,"mb-1.5":!0},colorpicker__LS:{"[grid-area:a]":!0,relative:!0,"mb-1.5":!0},colorpicker__canvas:{block:!0,"w-full":!0},colorpicker__canvasLS:{"aspect-[2/1]":!0,"cursor-pointer":!0,"rounded-lg":!0},colorpicker__canvasHue:{"rounded-lg":!0},colorpicker__canvasAlpha:{"rounded-lg":!0},colorpicker__preview:{"rounded-xl":!0,"after:rounded-xl":!0,relative:!0,"inline-flex":!0,"aspect-[1/1]":!0,"overflow-hidden":!0,"[grid-area:b]":!0,"mr-1.5":!0,"after:absolute":!0,"after:left-0":!0,"after:top-0":!0,"after:h-full":!0,"after:w-full":!0,"after:shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)]":!0,"after:content-['']":!0,"w-[2em]":!0,"dark:after:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.25)]":!0},colorpicker__hue:{"[grid-area:c]":!0,relative:!0,"inline-flex":!0,"h-3/4":!0},colorpicker__alpha:{"[grid-area:d]":!0,relative:!0,"inline-flex":!0,"h-3/4":!0},colorpicker__eyeDropper:{"[grid-area:e]":!0,"w-[2em]":!0,"ml-1.5":!0,"inline-flex":!0,"self-center":!0,"justify-center":!0,"justify-self-center":!0,"aspect-[1/1]":!0,"rounded-xl":!0,border:!0,"border-neutral-300":!0,"cursor-pointer":!0,"content-center":!0,"items-center":!0,"text-neutral-600":!0,"dark:border-zinc-800":!0},colorpicker__eyeDropperIcon:{"w-auto":!0,"[&>svg]:w-[1em]":!0,"dark:text-zinc-400":!0},colorpicker__control:{absolute:!0,"bg-white":!0,"shadow-[0_0_0_2px_rgba(255,255,255,1),0_0_0_3px_rgba(0,0,0,0.2)]":!0,"-translate-y-1/2":!0,"-translate-x-1/2":!0,"pointer-events-none":!0,"data-[prevent-focus-style]:shadow-[0_0_0_2px_rgba(255,255,255,1),0_0_0_3px_rgba(0,0,0,0.2)]":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-offset-2":!0,"focus-visible:ring-green-500":!0},colorpicker__controlLS:{"w-[10px]":!0,"h-[10px]":!0,"rounded-full":!0},colorpicker__controlHue:{"w-[4px]":!0,"h-[calc(100%-2px)]":!0,"top-1/2":!0,"rounded-xl":!0},colorpicker__controlAlpha:{"w-[4px]":!0,"h-[calc(100%-2px)]":!0,"top-1/2":!0,"rounded-xl":!0},colorpicker__formatField:{flex:!0,"items-center":!0,"justify-center":!0,grow:!0},colorpicker__colorField:{"bg-transparent":!0,"text-neutral-700":!0,border:!0,"border-neutral-300":!0,"dark:border-zinc-800":!0,"dark:text-zinc-300":!0,"dark:selection:text-zinc-700":!0},colorpicker__colorInputGroup:{flex:!0,"items-center":!0,"justify-center":!0,grow:!0},colorpicker__fieldGroup:{flex:!0,"flex-col":!0,"items-center":!0,"justify-center":!0,"w-full":!0,"mr-0.5":!0,"[&>input]:p-1":!0,"[&>input]:text-sm":!0,"[&>input]:text-neutral-700":!0,"[&>input]:selection:bg-green-100":!0,"[&>input]:m-0":!0,"[&>input]:grow":!0,"[&>input]:shrink":!0,"[&>input]:w-full":!0,"[&>input]:border":!0,"[&>input]:border-neutral-300":!0,"[&>input]:rounded-xl":!0,"[&>input]:text-center":!0,"[&>input]:appearance-none":!0,"[&>input::-webkit-outer-spin-button]:appearance-none":!0,"[&>input::-webkit-inner-spin-button]:appearance-none":!0,"[&>input::-webkit-inner-spin-button]:m-0":!0,"[&>input:focus]:outline-none":!0,"[&>input:focus]:ring-1":!0,"[&>input:focus]:ring-green-600":!0,"[&>input:focus]:border-green-600":!0,"max-[431px]:[&>input]:text-base":!0},colorpicker__fieldLabel:{"text-xs":!0,"text-neutral-500":!0,"mt-1.5":!0,"dark:text-zinc-400":!0},colorpicker__formatSwitcher:{flex:!0,"justify-end":!0,"self-start":!0,uppercase:!0,"shrink-0":!0,"p-1":!0,"mt-0.5":!0,"text-neutral-600":!0,rounded:!0,"select-none":!0,"dark:text-zinc-400":!0},colorpicker__switchIcon:{"[&>svg]:w-3":!0},colorpicker__swatches:{"inline-flex":!0,"flex-wrap":!0,"w-full":!0,"justify-self-center":!0,"min-w-0":!0,"mx-auto":!0,"px-[1px]":!0,"pt-1.5":!0,"pb-1.5":!0,"mt-1.5":!0,"-mb-1.5":!0,"border-t":!0,"border-neutral-300":!0,"overflow-auto":!0,"max-h-[200px]":!0,"select-none":!0,"first:-mt-[3px]":!0,"first:last:-mb-[3px]":!0,"first:last:pb-[2px]":!0,"first:pt-px":!0,"first:border-t-0":!0,"dark:border-zinc-800":!0},colorpicker__swatchGroup:{flex:!0,"flex-wrap":!0,"w-full":!0,"mb-1.5":!0,"last:mb-0":!0},colorpicker__swatchGroupLabel:{"ml-1":!0,block:!0,"w-full":!0,"text-xs":!0,"text-neutral-500":!0,"dark:text-zinc-400":!0},colorpicker__swatch:{relative:!0,"text-sm":!0,"w-[calc((100%/10)-0.5em)]":!0,"max-w-[22px]":!0,"m-[0.16em]":!0,"cursor-pointer":!0,"before:content-['']":!0,"before:absolute":!0,"before:inset-0":!0,"before:rounded":!0,"before:shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)]":!0,"before:pointer-events-none":!0,"before:z-[2]":!0,"dark:before:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.25)]":!0,"data-[active=true]:after:content-['']":!0,"data-[active=true]:after:block":!0,"data-[active=true]:after:absolute":!0,"data-[active=true]:after:w-1.5":!0,"data-[active=true]:after:h-1.5":!0,"data-[active=true]:after:top-1/2":!0,"data-[active=true]:after:left-1/2":!0,"data-[active=true]:after:pointer-events-none":!0,"data-[active=true]:after:rounded-full":!0,"data-[active=true]:after:-translate-x-1/2":!0,"data-[active=true]:after:-translate-y-1/2":!0,"data-[active=true]:after:bg-white":!0,"data-[active=true]:after:z-[2]":!0,"data-[active=true]:after:ring-1":!0,"data-[active=true]:after:ring-[rgba(0,0,0,0.33)]":!0,"[&>canvas]:block":!0,"[&>canvas]:w-full":!0,"[&>canvas]:aspect-[1/1]":!0,"[&>canvas]:rounded":!0,"[&>canvas:focus-visible]:outline-none":!0,"[&>canvas:focus-visible]:ring-2":!0,"[&>canvas:focus-visible]:ring-green-500":!0,"[&>canvas:focus-visible]:ring-offset-2":!0,"[&>canvas:focus-visible]:ring-offset-white":!0,"dark:[&>canvas:focus-visible]:ring-offset-zinc-700":!0},datepicker__inner:{relative:!0},datepicker__removeSelection:{"self-stretch":!0,"text-sm":!0,flex:!0,"items-center":!0,"ml-0.5":!0,"mr-1.5":!0,"text-neutral-700":!0,"hover:text-red-400":!0,"z-10":!0,"dark:text-zinc-300":!0},datepicker__clearIcon:{"[&>svg]:w-[0.75em]":!0},datepicker__panelWrapper:{"group/panel":!0,absolute:!0,"min-w-[20em]":!0,"top-[calc(100%_+_0.5em)]":!0,"left-0":!0,"shadow-[0_0_1.25em_rgba(0,0,0,.25)]":!0,"rounded-xl":!0,"p-3.5":!0,"bg-white":!0,"z-10":!0,"dark:bg-zinc-800":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:!fixed":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:top-auto":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:max-w-none":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:bottom-0":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:left-0":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:rounded-none":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:w-full":!0},datepicker__panelHeader:{grid:!0,"grid-cols-[2.5em_1fr_2.5em]":!0,"justify-center":!0,"items-center":!0,"border-b-2":!0,"border-neutral-300":!0,"mb-1.5":!0,"pb-2":!0,"dark:border-zinc-700":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:grid-cols-[2.5em_1fr_2.5em_2.5em]":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:group-data-[panel=time]/panel:grid-cols-[2.5em_1fr_2.5em]":!0,"[@media(max-width:431px)_and_(hover:none)]:group-[&:not([data-inline])]:group-data-[panel=month]/panel:grid-cols-[2.5em_1fr_2.5em]":!0},datepicker__panelClose:{"aspect-[1/1]":!0,border:!0,"border-neutral-300":!0,"rounded-xl":!0,flex:!0,"items-center":!0,"justify-center":!0,"text-neutral-700":!0,"[&_svg]:w-[1.25em]":!0,"dark:text-zinc-300":!0,"dark:border-zinc-800":!0,"[@media(max-width:431px)_and_(hover:none)]:group-data-[panel=time]/panel:col-start-3":!0,"[@media(max-width:431px)_and_(hover:none)]:group-data-[panel=month]/panel:col-start-3":!0},datepicker__panel:{flex:!0,"justify-center":!0},datepicker__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"placeholder:text-neutral-400":!0},datepicker__monthsHeader:{flex:!0,"items-center":!0,"justify-center":!0,"col-start-2":!0,"col-end-2":!0},datepicker__timeHeader:{flex:!0,"items-center":!0,"justify-center":!0,"col-start-2":!0,"col-end-2":!0},datepicker__months:{grid:!0,"grid-cols-3":!0,"w-full":!0},datepicker__month:{"m-1.5":!0,"p-1.5":!0,"text-center":!0,"text-neutral-700":!0,"rounded-xl":!0,"bg-neutral-200":!0,"aria-selected:!bg-green-600":!0,"aria-selected:!text-white":!0,"focus:outline":!0,"focus:outline-2":!0,"focus:outline-green-600":!0,"focus:outline-offset-2":!0,"focus:bg-white":!0,"focus:text-neutral-700":!0,"data-[is-extra=true]:opacity-25":!0,"group-data-[disabled=true]:opacity-50":!0,"group-data-[disabled=true]:cursor-default":!0,"group-data-[disabled=true]:pointer-events-none":!0,"dark:bg-zinc-700":!0,"dark:text-zinc-300":!0},datepicker__yearsHeader:{flex:!0,"items-center":!0,"justify-center":!0,"text-neutral-700":!0,"col-start-2":!0,"col-end-2":!0,"dark:text-zinc-300":!0},datepicker__years:{grid:!0,"grid-cols-5":!0,"w-full":!0},datepicker__year:{"text-sm":!0,"text-center":!0,"text-neutral-700":!0,"items-center":!0,"m-1.5":!0,"p-1.5":!0,"rounded-xl":!0,"bg-neutral-200":!0,"aria-selected:!bg-green-600":!0,"aria-selected:!text-white":!0,"focus:outline":!0,"focus:outline-2":!0,"focus:outline-green-600":!0,"focus:outline-offset-2":!0,"focus:bg-white":!0,"data-[is-extra=true]:opacity-25":!0,"group-data-[disabled=true]:opacity-50":!0,"group-data-[disabled=true]:cursor-default":!0,"group-data-[disabled=true]:pointer-events-none":!0,"dark:bg-zinc-700":!0,"dark:text-zinc-300":!0},datepicker__weekDays:{grid:!0,"grid-cols-7":!0},datepicker__weekDay:{"w-[2.25em]":!0,"text-neutral-700":!0,"m-1.5":!0,"rounded-xl":!0,"font-medium":!0,lowercase:!0,"dark:text-zinc-500":!0},datepicker__calendarWeeks:{"":!0},datepicker__week:{grid:!0,"grid-cols-7":!0,"group-data-[disabled=true]:opacity-50":!0,"group-data-[disabled=true]:cursor-default":!0,"group-data-[disabled=true]:pointer-events-none":!0},datepicker__dayCell:{flex:!0,"items-center":!0,"justify-center":!0,"text-center":!0,"text-neutral-700":!0,"w-[2.25em]":!0,"h-[2.25em]":!0,"m-1":!0,"p-1.5":!0,"rounded-xl":!0,"bg-neutral-200":!0,"aria-selected:bg-green-600":!0,"aria-selected:text-white":!0,"focus:outline":!0,"focus:outline-2":!0,"focus:outline-green-600":!0,"focus:outline-offset-2":!0,"focus:bg-white":!0,"data-[is-extra=true]:opacity-25":!0,"data-[disabled=true]:opacity-50":!0,"data-[disabled=true]:cursor-default":!0,"data-[disabled=true]:pointer-events-none":!0,"dark:bg-zinc-600":!0,"dark:text-zinc-300":!0,"dark:aria-selected:bg-amber-600":!0,"dark:aria-selected:text-white":!0,"dark:focus:outline-amber-600":!0,"dark:focus:bg-zinc-200":!0,"dark:focus:text-zinc-700":!0},datepicker__timeInput:{"w-full":!0,"border-2":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"text-neutral-700":!0,"border-neutral-300":!0,"rounded-xl":!0,"p-1.5":!0,"my-2":!0,"focus-visible:outline-green-600":!0,"dark:text-zinc-300":!0,"dark:bg-transparent":!0,"dark:border-zinc-700":!0},datepicker__daysHeader:{flex:!0,"items-center":!0,"justify-center":!0},datepicker__prev:{"mr-auto":!0,"px-2":!0,"py-px":!0,"hover:bg-neutral-100":!0,"rounded-xl":!0,"col-start-1":!0,"col-end-1":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-green-500":!0,"focus-visible:ring-offset-2":!0},datepicker__prevLabel:{hidden:!0},datepicker__prevIcon:{flex:!0,"w-[0.75em]":!0,"select-none":!0,"text-neutral-700":!0,"[&>svg]:w-full":!0,"dark:text-zinc-300":!0},datepicker__dayButton:{"appearance-none":!0,"text-neutral-700":!0,"cursor-pointer":!0,"px-2":!0,"py-px":!0,"border-2":!0,"border-neutral-300":!0,"rounded-xl":!0,"mx-1":!0,"hover:border-green-600":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-green-500":!0,"focus-visible:ring-offset-2":!0,"dark:text-zinc-300":!0,"dark:border-zinc-700":!0,"dark:hover:border-amber-500":!0},datepicker__monthButton:{"appearance-none":!0,"text-neutral-700":!0,"cursor-pointer":!0,"px-2":!0,"py-px":!0,"border-2":!0,"border-neutral-300":!0,"rounded-xl":!0,"mx-1":!0,"hover:border-green-600":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-green-500":!0,"focus-visible:ring-offset-2":!0,"dark:text-zinc-300":!0,"dark:border-zinc-700":!0,"dark:hover:border-amber-500":!0},datepicker__yearButton:{"appearance-none":!0,"text-neutral-700":!0,"cursor-pointer":!0,"px-2":!0,"py-px":!0,"border-2":!0,"border-neutral-300":!0,"rounded-xl":!0,"mx-1":!0,"hover:border-green-600":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-green-500":!0,"focus-visible:ring-offset-2":!0,"dark:text-zinc-300":!0,"dark:border-zinc-700":!0,"dark:hover:border-amber-500":!0},datepicker__next:{"ml-auto":!0,"px-2":!0,"py-px":!0,"rounded-xl":!0,"hover:bg-neutral-100":!0,"hover:rounded":!0,"col-start-3":!0,"col-end-3":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-green-500":!0,"focus-visible:ring-offset-2":!0},datepicker__nextLabel:{hidden:!0},datepicker__nextIcon:{flex:!0,"w-[0.75em]":!0,"select-none":!0,"text-neutral-700":!0,"[&>svg]:w-full":!0,"dark:text-zinc-300":!0},datepicker__openButton:{"appearance-none":!0,"border-0":!0,"bg-transparent":!0,flex:!0,"p-0":!0,"self-stretch":!0,"cursor-pointer":!0,"focus-visible:outline-none":!0,"focus-visible:ring-2":!0,"focus-visible:ring-green-500":!0,"focus-visible:ring-offset-2":!0,"focus-visible:rounded-xl":!0},datepicker__calendarIcon:{"text-neutral-600":!0,"focus-visible:text-green-600":!0,flex:!0,"w-[1em]":!0,"grow-0":!0,"shrink-0":!0,"self-stretch":!0,"select-none":!0,"[&>svg]:w-full":!0,"[&>svg]:m-auto":!0,"[&>svg]:max-h-[1em]":!0,"[&>svg]:max-w-[1em]":!0},dropdown__placeholder:{"text-neutral-400":!0,grow:!0,"dark:text-zinc-400/50":!0},dropdown__selector:{flex:!0,grow:!0,"justify-between":!0,"w-full":!0,"py-1.5":!0,"pl-2.5":!0,"pr-0":!0,"text-sm":!0,"text-neutral-700":!0,"text-left":!0,"group-data-[disabled]:!cursor-not-allowed":!0,"group-data-[prefix-icon]:!pl-0":!0,"group-data-[suffix-icon]:!pr-0":!0,"data-[placeholder]:text-neutral-400":!0,"selection:bg-green-100":!0,"dark:data-[placeholder]:text-zinc-400/50":!0,"dark:text-zinc-300":!0},dropdown__selectIcon:{"shrink-0":!0},dropdown__selectionsWrapper:{"w-[85%]":!0,"overflow-hidden":!0},dropdown__selection:{"[&>*]:ml-0":!0},dropdown__selections:{"inline-flex":!0,"items-center":!0},dropdown__selectionsItem:{"whitespace-nowrap":!0,"mr-1":!0},dropdown__tagWrapper:{"[&.formkit-dropZone_.formkit-tag]:opacity-25":!0,"[&.formkit-touchDropZone_.formkit-tag]:opacity-25":!0},dropdown__truncationCount:{flex:!0,"items-center":!0,"justify-center":!0,"h-[1.5em]":!0,"rounded-xl":!0,"bg-neutral-400":!0,"text-white":!0,"whitespace-nowrap":!0,"text-[11px]":!0,"[line-height:1em]":!0,"tracking-tighter":!0,"leading-0":!0,"py-1":!0,"px-1":!0,"shrink-0":!0,"my-auto":!0},mask__inner:{relative:!0},mask__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"group-data-[has-overlay]:!caret-neutral-700":!0,"dark:group-data-[has-overlay]:!caret-zinc-300":!0},rating__inner:{"text-neutral-300":!0},rating__itemsWrapper:{relative:!0,"inline-flex":!0,"focus:border-green-600":!0},rating__onItemRow:{"h-full":!0,"w-full":!0},rating__offItemRow:{"h-full":!0,"w-full":!0},rating__onItemWrapper:{"[&>*]:w-full":!0,"[&>*]:h-full":!0,"w-full":!0,"h-full":!0,"text-yellow-400":!0},rating__offItemWrapper:{"text-neutral-400":!0,"w-full":!0,"h-full":!0,"[&>*]:w-full":!0,"[&>*]:h-full":!0,"dark:text-zinc-600":!0},rating__ratingItem:{relative:!0,"focus-within:outline":!0,"focus-within:outline-green-600":!0,"w-[1.5em]":!0,"h-[1.5em]":!0},rating__itemLabelInner:{"h-px":!0,"w-px":!0,"overflow-hidden":!0,absolute:!0,"white-space-nowrap":!0},rating__itemLabel:{absolute:!0,"h-full":!0},rating__ratingIcon:{"w-[1.5em]":!0,"h-[1.5em]":!0,flex:!0},rating__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"outline-none":!0},rating__messages:{"mt-1.5":!0},repeater__outer:{"min-w-0":!0,grow:!0,"mb-3.5":!0,"text-sm":!0,"group/repeater":!0,"max-w-full":!0},repeater__fieldset:{"min-w-0":!0},repeater__legend:{block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"dark:text-zinc-300":!0,"mb-1.5":!0},repeater__content:{"min-w-0":!0,grow:!0,"p-4":!0,flex:!0,"flex-col":!0,"align-center":!0,"[&>div[data-type]]:max-w-none":!0,"[&>div[data-type]:last-child]:mb-0":!0},repeater__addButton:{"!mb-0":!0,"group-data-[disabled]/repeater:pointer-events-none":!0,"group-data-[disabled]/repeater:opacity-50":!0,"group-data-[disabled]/repeater:grayscale":!0},repeater__controlLabel:{absolute:!0,"opacity-0":!0,"pointer-events-none":!0,"text-[0px]":!0},repeater__controls:{flex:!0,"flex-col":!0,"items-center":!0,"justify-center":!0,"bg-neutral-50":!0,"p-1.5":!0,"[&>li]:aspect-[1/1]":!0,"dark:bg-zinc-800":!0,"rounded-xl":!0,"rounded-tl-none":!0,"rounded-bl-none":!0},repeater__downControl:{"w-[1.5em]":!0,"h-[1.5em]":!0,"my-1.5":!0,"mx-auto":!0,flex:!0,"items-center":!0,"appearance-none":!0,"justify-center":!0,"aspect-[1/1]":!0,"text-neutral-500":!0,"hover:text-green-600":!0,"disabled:hover:text-inherit":!0,"disabled:opacity-25":!0,"disabled:!text-neutral-500":!0,"dark:text-zinc-300":!0,"dark:disabled:!text-zinc-300":!0,"dark:hover:text-amber-500":!0},repeater__upControl:{"w-[1.5em]":!0,"h-[1.5em]":!0,"my-1.5":!0,"mx-auto":!0,flex:!0,"items-center":!0,"appearance-none":!0,"justify-center":!0,"aspect-[1/1]":!0,"text-neutral-500":!0,"hover:text-green-600":!0,"disabled:hover:text-inherit":!0,"disabled:opacity-25":!0,"disabled:!text-neutral-500":!0,"dark:text-zinc-300":!0,"dark:disabled:!text-zinc-300":!0,"dark:hover:text-amber-500":!0},repeater__removeControl:{"w-[1.5em]":!0,"h-[1.5em]":!0,"my-1.5":!0,"mx-auto":!0,flex:!0,"items-center":!0,"appearance-none":!0,"justify-center":!0,"aspect-[1/1]":!0,"text-neutral-500":!0,"hover:text-green-600":!0,"disabled:hover:text-inherit":!0,"disabled:opacity-25":!0,"disabled:!text-neutral-500":!0,"dark:text-zinc-300":!0,"dark:disabled:!text-zinc-300":!0,"dark:hover:text-amber-500":!0},repeater__insertControl:{"w-[1.5em]":!0,"h-[1.5em]":!0,"my-1.5":!0,"mx-auto":!0,flex:!0,"items-center":!0,"appearance-none":!0,"justify-center":!0,"aspect-[1/1]":!0,"text-neutral-500":!0,"hover:text-green-600":!0,"disabled:hover:text-inherit":!0,"disabled:opacity-25":!0,"disabled:!text-neutral-500":!0,"dark:text-zinc-300":!0,"dark:disabled:!text-zinc-300":!0,"dark:hover:text-amber-500":!0},repeater__help:{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-zinc-400":!0,"mb-1.5":!0,"-mt-1":!0},repeater__item:{flex:!0,relative:!0,"w-full":!0,"mb-1.5":!0,"bg-white":!0,border:!0,"border-neutral-300":!0,"rounded-xl":!0,"shadow-md":!0,"dark:border-zinc-700":!0,"dark:bg-transparent":!0,"[&.formkit-dropZone]:opacity-30":!0,"[&.formkit-dropZone]:blur-[2px]":!0},repeater__dragHandleWrapper:{relative:!0,"w-8":!0,"bg-neutral-50":!0,"rounded-xl":!0,"rounded-tr-none":!0,"rounded-br-none":!0,"dark:bg-zinc-800":!0},repeater__dragHandle:{"w-full":!0,"h-full":!0,flex:!0,absolute:!0,"top-0":!0,"left-0":!0,"cursor-grab":!0,"active:cursor-grabbing":!0},repeater__dragHandleIcon:{"w-2":!0,"m-auto":!0,"text-neutral-500":!0,"dark:text-zinc-700":!0,"[&>svg>path]:fill-current":!0},repeater__moveDownIcon:{block:!0,"w-[0.75em]":!0,"aspect-[1/1]":!0},repeater__moveUpIcon:{block:!0,"w-[0.75em]":!0,"aspect-[1/1]":!0},repeater__removeIcon:{block:!0,"w-[1.25em]":!0,"aspect-[1/1]":!0},repeater__addIcon:{block:!0,"w-[1.25em]":!0,"aspect-[1/1]":!0},slider__outer:{group:!0,"max-w-[24em]":!0,"min-w-0":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"data-[disabled]:opacity-50":!0,"text-sm":!0,"data-[disabled]:pointer-events-none":!0},slider__help:{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-zinc-400":!0,"-mt-0.5":!0,"mb-1.5":!0},slider__sliderInner:{flex:!0,"items-center":!0,"[&>[data-type=number]]:mb-0":!0,"[&>[data-type=number]]:ml-2.5":!0,"[&>[data-type=number]]:shrink":!0,"[&>[data-type=number]]:grow-0":!0,"[&[data-has-mark-labels=true]_[id^=track]]:mb-4":!0},slider__track:{grow:!0,relative:!0,"z-20":!0,"py-2":!0,"select-none":!0},slider__trackWrapper:{"px-[2px]":!0,"rounded-full":!0,"bg-neutral-300":!0,"dark:bg-zinc-500":!0},slider__trackInner:{"h-1":!0,"mx-0.5":!0,relative:!0},slider__prefixIcon:{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},slider__suffixIcon:{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0,"text-neutral-600":!0,"dark:text-zinc-300":!0},slider__fill:{"h-full":!0,"rounded-full":!0,absolute:!0,"top-0":!0,"-mx-1":!0,"bg-green-600":!0,"group-data-[disabled]:bg-neutral-500":!0},slider__marks:{absolute:!0,"pointer-events-none":!0,"inset-0":!0},slider__mark:{absolute:!0,"top-1/2":!0,"w-[3px]":!0,"h-[3px]":!0,"rounded-full":!0,"-translate-x-1/2":!0,"-translate-y-1/2":!0,"bg-neutral-400":!0,"data-[active=true]:bg-white":!0},slider__markLabel:{absolute:!0,"top-[calc(100%+0.5em)]":!0,"left-1/2":!0,"text-neutral-400":!0,"text-[11px]":!0,"[line-height:1em]":!0,"-translate-x-1/2":!0},slider__handles:{"m-0":!0,"p-0":!0,"list-none":!0},slider__handle:{group:!0,"select-none":!0,"w-4":!0,"h-4":!0,"rounded-full":!0,"bg-white":!0,absolute:!0,"top-1/2":!0,"left-0":!0,"z-30":!0,"-translate-x-1/2":!0,"-translate-y-1/2":!0,"shadow-[inset_0_0_0_1px_rgba(0,0,0,0.1),0_1px_2px_0_rgba(0,0,0,0.5)]":!0,"focus-visible:outline-0":!0,"focus-visible:ring-2":!0,"ring-green-600":!0,"data-[is-target=true]:z-20":!0,"dark:bg-zinc-200":!0},slider__tooltip:{absolute:!0,"bottom-full":!0,"left-1/2":!0,"-translate-x-1/2":!0,"-translate-y-[4px]":!0,"bg-green-600":!0,"text-white":!0,"py-1":!0,"px-1":!0,"text-xs":!0,"leading-none":!0,"whitespace-nowrap":!0,rounded:!0,"opacity-0":!0,"pointer-events-none":!0,"transition-opacity":!0,'after:content-[""]':!0,"after:absolute":!0,"after:top-full":!0,"after:left-1/2":!0,"after:-translate-x-1/2":!0,"after:-translate-y-[1px]":!0,"after:border-4":!0,"after:border-transparent":!0,"after:border-t-green-600":!0,"group-hover:opacity-100":!0,"group-focus-visible:opacity-100":!0,"group-data-[show-tooltip=true]:opacity-100":!0},slider__linkedValues:{flex:!0,"items-start":!0,"justify-between":!0},slider__minValue:{grow:!0,"!max-w-[45%]":!0,"mb-0":!0,"[&>div>div]:relative":!0,'[&>div>div::after]:content-[""]':!0,"[&>div>div::after]:absolute":!0,"[&>div>div::after]:top-1/2":!0,"[&>div>div::after]:left-[105.5%]":!0,"[&>div>div::after]:w-[12%]":!0,"[&>div>div::after]:h-[1px]":!0,"[&>div>div::after]:bg-neutral-400":!0,"dark:[&>div>div::after]:bg-zinc-800":!0},slider__maxValue:{grow:!0,"!max-w-[45%]":!0,"mb-0":!0,relative:!0},slider__chart:{relative:!0,"z-20":!0,"mb-2":!0,flex:!0,"justify-between":!0,"items-center":!0,"w-full":!0,"aspect-[3/1]":!0},slider__chartBar:{absolute:!0,"bottom-0":!0,"h-full":!0,"bg-neutral-400":!0,"data-[active=false]:bg-neutral-300":!0,"dark:bg-zinc-500":!0,"dark:data-[active=false]:bg-zinc-600":!0},taglist__inner:{"py-1.5":!0,"pr-0":!0,"pl-0":!0},taglist__tags:{"pl-2.5":!0},taglist__tagWrapper:{"[&.formkit-dropZone_.formkit-tag]:opacity-25":!0,"[&.formkit-touchDropZone_.formkit-tag]:opacity-25":!0},taglist__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"!p-0":!0,"!w-[0%]":!0,"min-w-[1em]":!0,"inline-block":!0,"-mt-0.5":!0,"first:mt-0":!0,"first:mb-0.5":!0},taglist__listboxButton:{"ml-auto":!0,"shrink-0":!0},toggle__outer:{group:!0,"min-w-0":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"data-[disabled]:opacity-50":!0,"text-sm":!0,"max-w-none":!0},toggle__altLabel:{block:!0,"w-full":!0,"mb-1.5":!0,"font-bold":!0,"text-[11px]":!0,"[line-height:1em]":!0,"text-neutral-700":!0,"dark:text-zinc-300":!0},toggle__inner:{peer:!0,"inline-block":!0,"mr-1.5":!0},toggle__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,peer:!0,absolute:!0,"opacity-0":!0,"w-0":!0,"h-0":!0},toggle__label:{block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"mb-0.5":!0,"dark:text-zinc-300":!0,"peer-first:font-normal":!0,"peer-first:mb-0":!0},toggle__innerLabel:{absolute:!0,"text-neutral-200":!0,"text-[10px]":!0,"font-bold":!0,"select-none":!0,"left-full":!0,"top-1/2":!0,"-translate-x-full":!0,"-translate-y-1/2":!0,"px-1":!0},toggle__thumb:{relative:!0,"p-0.5":!0,"left-0":!0,"aspect-[1/1]":!0,"rounded-full":!0,"transition-all":!0,"w-[1.25em]":!0,"bg-neutral-50":!0,"text-neutral-600":!0,"shadow-base":!0},toggle__track:{"p-0.5":!0,"min-w-[3em]":!0,relative:!0,"cursor-pointer":!0,"select-none":!0,"rounded-full":!0,"transition-all":!0,"bg-neutral-400":!0,"peer-checked:bg-green-600":!0,"peer-checked:[&>div:last-child]:left-full":!0,"peer-checked:[&>div:last-child]:-translate-x-full":!0,"peer-checked:[&>div:first-child:not(:last-child)]:left-0":!0,"peer-checked:[&>div:first-child:not(:last-child)]:translate-x-0":!0,shadow:!0,"peer-focus-visible:ring-2":!0,"peer-focus-visible:ring-green-500":!0,"peer-focus-visible:ring-offset-2":!0,"dark:bg-zinc-500":!0},toggle__valueLabel:{"font-bold":!0,"text-[11px]":!0,"[line-height:1em]":!0,"text-neutral-700":!0,"dark:text-zinc-300":!0},toggle__wrapper:{flex:!0,"flex-wrap":!0,"items-center":!0,"mb-1.5":!0},togglebuttons__wrapper:{"mb-1.5":!0},togglebuttons__options:{"group/options":!0,"inline-flex":!0,"data-[vertical=true]:flex-col":!0},togglebuttons__option:{"group/option":!0},togglebuttons__input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0,"!px-3.5":!0,"!mb-0":!0,relative:!0,"focus:z-10":!0,"group-data-[vertical=true]/options:w-full":!0,"justify-center":!0,"bg-green-50":!0,"disabled:opacity-50":!0,"disabled:cursor-not-allowed":!0,"group-data-[disabled]:disabled:opacity-100":!0,"dark:bg-transparent":!0,"dark:disabled:bg-transparent":!0,"dark:disabled:text-amber-500":!0,"dark:text-amber-500":!0,"aria-[pressed=true]:bg-green-600":!0,"aria-[pressed=true]:text-white":!0,"dark:aria-[pressed=true]:bg-amber-600":!0,"dark:aria-[pressed=true]:text-white":!0,"not-first:not-last:!rounded-none":!0,"group-data-[vertical=false]/options:group-first/option:!rounded-xl":!0,"group-data-[vertical=true]/options:group-first/option:!rounded-xl":!0,"group-data-[vertical=false]/options:group-first/option:!rounded-tr-none":!0,"group-data-[vertical=false]/options:group-first/option:!rounded-br-none":!0,"group-data-[vertical=true]/options:group-first/option:!rounded-bl-none":!0,"group-data-[vertical=true]/options:group-first/option:!rounded-br-none":!0,"group-data-[vertical=false]/options:group-last/option:!rounded-xl":!0,"group-data-[vertical=true]/options:group-last/option:!rounded-xl":!0,"group-data-[vertical=false]/options:group-last/option:!rounded-tl-none":!0,"group-data-[vertical=false]/options:group-last/option:!rounded-bl-none":!0,"group-data-[vertical=true]/options:group-last/option:!rounded-tl-none":!0,"group-data-[vertical=true]/options:group-last/option:!rounded-tr-none":!0,"group-data-[vertical=false]/options:not-first:not-last:!border-r-0":!0,"group-data-[vertical=false]/options:group-last/option:!border-r":!0,"group-data-[vertical=false]/options:not-first:not-last:aria-[pressed=true]:border-x-green-500":!0,"group-data-[vertical=false]/options:group-first/option:aria-[pressed=true]:border-l-green-600":!0,"group-data-[vertical=false]/options:group-last/option:aria-[pressed=true]:border-r-green-600":!0,"dark:group-data-[vertical=false]/options:not-first:not-last:aria-[pressed=true]:border-x-amber-600":!0,"dark:group-data-[vertical=false]/options:group-first/option:aria-[pressed=true]:border-l-amber-600":!0,"dark:group-data-[vertical=false]/options:group-last/option:aria-[pressed=true]:border-r-amber-600":!0,"group-data-[vertical=true]/options:not-first:not-last:aria-[pressed=true]:border-y-green-500":!0,"group-data-[vertical=true]/options:group-first/option:aria-[pressed=true]:border-t-green-600":!0,"group-data-[vertical=true]/options:group-last/option:aria-[pressed=true]:border-b-green-600":!0,"dark:group-data-[vertical=true]/options:not-first:not-last:aria-[pressed=true]:border-y-amber-600":!0,"dark:group-data-[vertical=true]/options:group-first/option:aria-[pressed=true]:border-t-amber-600":!0,"dark:group-data-[vertical=true]/options:group-last/option:aria-[pressed=true]:border-b-amber-600":!0},transferlist__outer:{group:!0,"min-w-0":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"data-[disabled]:opacity-50":!0,"text-sm":!0,"max-w-none":!0,"[&_.dnd-placeholder]:bg-green-600":!0,"[&_.dnd-placeholder]:text-white":!0},transferlist__wrapper:{flex:!0,"flex-col":!0,"sm:flex-row":!0,"justify-between":!0,"w-full":!0,"max-w-none":!0},transferlist__help:{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-zinc-400":!0,"pb-1.5":!0},transferlist__transferlist:{grow:!0,shrink:!0,"min-w-0":!0,"shadow-md":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"aspect-[4/5]":!0,flex:!0,"flex-col":!0,"h-[350px]":!0,border:!0,"border-neutral-300":!0,"rounded-xl":!0,"overflow-hidden":!0,"select-none":!0,"[&:has(:focus-visible)]:ring-1":!0,"[&:has(:focus-visible)]:ring-green-500":!0,"dark:border-zinc-800":!0,"dark:bg-zinc-900/50":!0},transferlist__transferlistHeader:{flex:!0,"bg-neutral-100":!0,"text-neutral-600":!0,"text-xs":!0,"justify-between":!0,"items-center":!0,"border-b":!0,"border-neutral-300":!0,"py-1.5":!0,"px-2":!0,"dark:bg-zinc-700":!0,"dark:border-zinc-800":!0,"dark:text-zinc-400":!0},transferlist__transferlistHeaderItemCount:{"ml-auto":!0,"text-xs":!0,"min-w-[1.5em]":!0,"[line-height:1.5em]":!0,"px-1.5":!0,"text-center":!0,"rounded-full":!0,"bg-neutral-200":!0,"text-neutral-700":!0,"dark:bg-zinc-500":!0,"dark:text-zinc-300":!0},transferlist__transferlistListItems:{"list-none":!0,"bg-white":!0,"h-full":!0,"overflow-x-hidden":!0,"overflow-y-auto":!0,"dark:bg-transparent":!0,"outline-none":!0},transferlist__transferlistListItem:{"py-1.5":!0,"px-1.5":!0,"text-neutral-700":!0,"ring-1":!0,"ring-neutral-200":!0,"aria-selected:bg-green-100":!0,"data-[is-active=true]:bg-green-100":!0,"data-[is-active=true]:ring-green-200":!0,"aria-selected:ring-green-200":!0,relative:!0,flex:!0,"cursor-pointer":!0,"items-center":!0,"bg-white":!0,"pl-[1.5em]":!0,"first:-mt-px":!0,"first:border-t":!0,"aria-selected:z-[2]":!0,"aria-selected:border-transparent":!0,"aria-selected:ring-1":!0,"data-[is-active=true]:z-[2]":!0,"data-[is-active=true]:border-transparent":!0,"data-[is-active=true]:ring-1":!0,"group-data-[is-max=true]:cursor-not-allowed":!0,"dark:bg-zinc-800":!0,"dark:text-zinc-300":!0,"dark:data-[is-active=true]:bg-amber-900":!0,"dark:aria-selected:bg-amber-900":!0,"dark:ring-zinc-700":!0,"dark:data-[is-active=true]:ring-amber-600":!0,"dark:aria-selected:ring-amber-600":!0,"[&.formkit-dropZone]:bg-green-100":!0,"[&.formkit-selectionDropZone]:bg-green-100":!0,"[&.formkit-touchDropZone]:bg-green-100":!0,"[&.formkit-touchSelectionDropZone]:bg-green-100":!0,"[&.formkit-longTouch]:bg-green-100":!0,"dark:[&.formkit-dropZone]:bg-amber-900":!0,"dark:[&.formkit-selectionDropZone]:bg-amber-900":!0,"dark:[&.formkit-touchDropZone]:bg-amber-900":!0,"dark:[&.formkit-touchSelectionDropZone]:bg-amber-900":!0,"dark:[&.formkit-longTouch]:bg-amber-900":!0},transferlist__transferlistOption:{"text-xs":!0},transferlist__transferControls:{"inline-flex":!0,"grow-0":!0,shrink:!0,border:!0,"border-neutral-300":!0,"flex-row":!0,"sm:flex-col":!0,"justify-center":!0,"my-1.5":!0,"sm:my-auto":!0,"mx-auto":!0,"sm:mx-1.5":!0,"rounded-xl":!0,"overflow-clip":!0,"shadow-sm":!0,"group-[]/repeater:shadow-none":!0,"group-[]/multistep:shadow-none":!0,"dark:border-zinc-800":!0},transferlist__sourceEmptyMessage:{"appearance-none":!0,"border-none":!0,"w-full":!0,"my-1.5":!0,"text-center":!0,"text-neutral-500":!0,italic:!0},transferlist__sourceListItems:{"group-data-[is-max=true]:opacity-50":!0},transferlist__targetEmptyMessage:{"appearance-none":!0,"border-none":!0,"w-full":!0,"my-1.5":!0,"text-center":!0,"text-neutral-500":!0,italic:!0},transferlist__emptyMessageInner:{flex:!0,"items-center":!0,"justify-center":!0,"p-1.5":!0,"text-sm":!0},transferlist__transferlistControls:{"bg-white":!0,"p-1.5":!0,"border-b":!0,"border-neutral-200":!0,"dark:bg-zinc-700":!0,"dark:border-zinc-700":!0},transferlist__transferlistSearch:{flex:!0,border:!0,"border-neutral-300":!0,"rounded-xl":!0,"items-center":!0,"text-neutral-700":!0,"selection:bg-green-100":!0,"dark:border-zinc-800":!0,"dark:text-zinc-300":!0,"dark:selection:bg-amber-100":!0,"dark:selection:text-zinc-700":!0,"dark:bg-zinc-800":!0},transferlist__transferlistSearchInput:{"border-none":!0,"px-1.5":!0,"py-1.5":!0,"w-full":!0,"bg-transparent":!0,"outline-none":!0,"text-xs":!0},transferlist__transferlistSearchClear:{flex:!0,"w-[0.75em]":!0,"mr-1.5":!0,"[&_svg]:w-full":!0},transferlist__controlLabel:{absolute:!0,"opacity-0":!0,"pointer-events-none":!0,"text-[0px]":!0},transferlist__selectedIcon:{"w-[0.75em]":!0,absolute:!0,"left-[0.5em]":!0,"select-none":!0,"text-green-600":!0,"dark:text-amber-500":!0},transferlist__transferlistButton:{"sm:w-5":!0,relative:!0,flex:!0,"justify-center":!0,"text-sm":!0,"shrink-0":!0,"box-content":!0,"text-neutral-700":!0,"disabled:bg-neutral-200":!0,"disabled:!text-neutral-400":!0,"bg-neutral-50":!0,"hover:text-green-600":!0,"cursor-pointer":!0,"appearance-none":!0,"border-none":!0,"p-2.5":!0,"hover:z-10":!0,"disabled:cursor-not-allowed":!0,"disabled:opacity-50":!0,"disabled:hover:text-current":!0,"disabled:hover:outline-none":!0,"focus-visible:ring-1":!0,"focus-visible:ring-green-500":!0,"focus-visible:z-10":!0,"dark:bg-zinc-800":!0,"dark:text-zinc-400":!0,"dark:disabled:!text-zinc-600":!0,"dark:disabled:bg-zinc-900":!0,"dark:disabled:hover:text-current":!0,"dark:disabled:hover:outline-none":!0,"dark:hover:text-amber-500":!0},transferlist__fastForwardIcon:{"w-4":!0,flex:!0,"select-none":!0,"[&>svg]:m-auto":!0,"[&>svg]:w-full":!0,"[&>svg]:max-w-[1rem]":!0,"[&>svg]:max-h-[1rem]":!0,"rotate-90":!0,"sm:rotate-0":!0},transferlist__moveRightIcon:{"w-4":!0,flex:!0,"select-none":!0,"[&>svg]:m-auto":!0,"[&>svg]:w-full":!0,"[&>svg]:max-w-[1rem]":!0,"[&>svg]:max-h-[1rem]":!0,"rotate-90":!0,"sm:rotate-0":!0},transferlist__moveLeftIcon:{"w-4":!0,flex:!0,"select-none":!0,"[&>svg]:m-auto":!0,"[&>svg]:w-full":!0,"[&>svg]:max-w-[1rem]":!0,"[&>svg]:max-h-[1rem]":!0,"rotate-90":!0,"sm:rotate-0":!0},transferlist__rewindIcon:{"w-4":!0,flex:!0,"select-none":!0,"[&>svg]:m-auto":!0,"[&>svg]:w-full":!0,"[&>svg]:max-w-[1rem]":!0,"[&>svg]:max-h-[1rem]":!0,"rotate-90":!0,"sm:rotate-0":!0},transferlist__messages:{"mt-1.5":!0},barcode__barcodeIcon:{"w-[1.5em]":!0,"text-neutral-700":!0,"cursor-pointer":!0,"dark:text-zinc-300":!0},barcode__dialog:{"border-none":!0,"outline-none":!0,"overflow-clip":!0,"p-0":!0,"bg-black":!0,"rounded-xl":!0,"w-[100%-2rem]":!0,"max-w-[30rem]":!0,"[&::backdrop]:bg-neutral-800/50":!0},barcode__video:{"w-full":!0,"aspect-[1/1]":!0,"object-cover":!0,block:!0,"pointer-events-none":!0},barcode__closeIcon:{"cursor-pointer":!0,absolute:!0,"bg-white":!0,"color-neutral-700":!0,"w-[1.5em]":!0,"h-[1.5em]":!0,"rounded-xl":!0,flex:!0,"top-1.5":!0,"right-1.5":!0,"z-20":!0,"[&>svg]:w-[1.25em]":!0,"[&>svg]:h-[1.25em]":!0,"[&>svg]:m-auto":!0},barcode__overlay:{"text-neutral-700":!0,"dark:text-zinc-300":!0,absolute:!0,"top-1/2":!0,"left-1/2":!0,"w-[min(20em,75%)]":!0,"aspect-[1/1]":!0,"-translate-x-1/2":!0,"-translate-y-1/2":!0,"rounded-xl":!0,"pointer-events-none":!0,"shadow-[0_0_0_999em_rgba(0,0,0,0.5)]":!0},barcode__overlayDecorators:{absolute:!0,"inset-0":!0,"z-10":!0},barcode__overlayDecoratorTopLeft:{absolute:!0,"w-[1.5rem]":!0,"h-[1.5rem]":!0,"rounded-xl":!0,"top-0":!0,"left-0":!0,"border-l-4":!0,"border-t-4":!0,"rounded-tr-none":!0,"rounded-bl-none":!0},barcode__overlayDecoratorTopRight:{absolute:!0,"w-[1.5rem]":!0,"h-[1.5rem]":!0,"rounded-xl":!0,"top-0":!0,"right-0":!0,"border-r-4":!0,"border-t-4":!0,"rounded-tl-none":!0,"rounded-br-none":!0},barcode__overlayDecoratorBottomRight:{absolute:!0,"w-[1.5rem]":!0,"h-[1.5rem]":!0,"rounded-xl":!0,"bottom-0":!0,"right-0":!0,"border-r-4":!0,"border-b-4":!0,"rounded-tr-none":!0,"rounded-bl-none":!0},barcode__overlayDecoratorBottomLeft:{absolute:!0,"w-[1.5rem]":!0,"h-[1.5rem]":!0,"rounded-xl":!0,"bottom-0":!0,"left-0":!0,"border-l-4":!0,"border-b-4":!0,"rounded-tl-none":!0,"rounded-tr-none":!0},"multi-step__outer":{group:!0,"min-w-0":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"data-[disabled]:opacity-50":!0,"text-sm":!0,"group/multistep":!0,"max-w-[32rem]":!0},"multi-step__wrapper":{"group/wrapper":!0,"data-[tab-style=tab]:shadow-md":!0,"data-[tab-style=tab]:rounded-xl":!0},"multi-step__tabs":{flex:!0,"items-center":!0,"group-data-[tab-style=tab]/wrapper:overflow-auto":!0,"group-data-[tab-style=tab]/wrapper:border":!0,"group-data-[tab-style=tab]/wrapper:border-b-0":!0,"group-data-[tab-style=tab]/wrapper:border-neutral-300":!0,"group-data-[tab-style=tab]/wrapper:rounded-xl":!0,"group-data-[tab-style=tab]/wrapper:rounded-bl-none":!0,"group-data-[tab-style=tab]/wrapper:rounded-br-none":!0,"dark:group-data-[tab-style=tab]/wrapper:border-zinc-800":!0,"group-data-[tab-style=progress]/wrapper:my-5":!0,"group-data-[tab-style=progress]/wrapper:justify-around":!0,"group-data-[tab-style=progress]/wrapper:overflow-visible":!0,"group-data-[tab-style=progress]/wrapper:group-data-[hide-labels=true]/wrapper:mb-3":!0},"multi-step__tab":{"group/tab":!0,"group-data-[tab-style=tab]/wrapper:relative":!0,"group-data-[tab-style=tab]/wrapper:flex":!0,"group-data-[tab-style=tab]/wrapper:grow":!0,"group-data-[tab-style=tab]/wrapper:text-xs":!0,"group-data-[tab-style=tab]/wrapper:items-center":!0,"group-data-[tab-style=tab]/wrapper:justify-center":!0,"group-data-[tab-style=tab]/wrapper:cursor-pointer":!0,"group-data-[tab-style=tab]/wrapper:text-neutral-700":!0,"group-data-[tab-style=tab]/wrapper:bg-neutral-100":!0,"group-data-[tab-style=tab]/wrapper:py-3":!0,"group-data-[tab-style=tab]/wrapper:px-3.5":!0,"group-data-[tab-style=tab]/wrapper:border-r":!0,"group-data-[tab-style=tab]/wrapper:border-b":!0,"group-data-[tab-style=tab]/wrapper:border-neutral-300":!0,"group-data-[tab-style=tab]/wrapper:last:border-r-0":!0,"group-data-[tab-style=tab]/wrapper:shadow-[inset_0_-0.5em_0.5em_-0.5em_rgba(0,0,0,0.1)]":!0,"group-data-[tab-style=tab]/wrapper:data-[active=true]:bg-white":!0,"group-data-[tab-style=tab]/wrapper:data-[active=true]:font-bold":!0,"group-data-[tab-style=tab]/wrapper:data-[active=true]:border-b-white":!0,"group-data-[tab-style=tab]/wrapper:data-[active=true]:z-10":!0,"group-data-[tab-style=tab]/wrapper:data-[active=true]:shadow-[0_0_0.5em_0_rgba(0,0,0,0.1)]":!0,"dark:group-data-[tab-style=tab]/wrapper:text-zinc-300":!0,"dark:group-data-[tab-style=tab]/wrapper:bg-zinc-950/20":!0,"dark:group-data-[tab-style=tab]/wrapper:data-[active=true]:bg-transparent":!0,"dark:group-data-[tab-style=tab]/wrapper:data-[active=true]:border-b-transparent":!0,"dark:group-data-[tab-style=tab]/wrapper:border-zinc-800":!0,"group-data-[tab-style=progress]/wrapper:flex":!0,"group-data-[tab-style=progress]/wrapper:flex-col":!0,"group-data-[tab-style=progress]/wrapper:items-center":!0,"group-data-[tab-style=progress]/wrapper:grow":!0,"group-data-[tab-style=progress]/wrapper:shrink-0":!0,"group-data-[tab-style=progress]/wrapper:relative":!0,"group-data-[tab-style=progress]/wrapper:before:block":!0,"group-data-[tab-style=progress]/wrapper:before:text-xs":!0,"group-data-[tab-style=progress]/wrapper:before:w-[1.25rem]":!0,"group-data-[tab-style=progress]/wrapper:before:h-[1.25rem]":!0,"group-data-[tab-style=progress]/wrapper:before:border-4":!0,"group-data-[tab-style=progress]/wrapper:before:border-neutral-300":!0,"group-data-[tab-style=progress]/wrapper:before:rounded-full":!0,"group-data-[tab-style=progress]/wrapper:before:bg-white":!0,"group-data-[tab-style=progress]/wrapper:before:z-10":!0,"dark:group-data-[tab-style=progress]/wrapper:before:border-zinc-800":!0,"dark:group-data-[tab-style=progress]/wrapper:before:bg-zinc-950":!0,"group-data-[tab-style=progress]/wrapper:after:block":!0,"group-data-[tab-style=progress]/wrapper:after:h-1":!0,"group-data-[tab-style=progress]/wrapper:after:w-full":!0,"group-data-[tab-style=progress]/wrapper:after:absolute":!0,"group-data-[tab-style=progress]/wrapper:after:top-[0.5em]":!0,"group-data-[tab-style=progress]/wrapper:after:left-[calc(50%+0.5em)]":!0,"group-data-[tab-style=progress]/wrapper:after:bg-neutral-300":!0,"group-data-[tab-style=progress]/wrapper:data-[valid=true]:data-[visited=true]:after:bg-green-600":!0,"group-data-[tab-style=progress]/wrapper:last:after:hidden":!0,"dark:group-data-[tab-style=progress]/wrapper:after:bg-zinc-800":!0,"dark:group-data-[tab-style=progress]/wrapper:data-[valid=true]:data-[visited=true]:after:bg-amber-600":!0},"multi-step__tabLabel":{"group-data-[tab-style=progress]/wrapper:absolute":!0,"group-data-[tab-style=progress]/wrapper:text-neutral-800":!0,"group-data-[tab-style=progress]/wrapper:top-full":!0,"group-data-[tab-style=progress]/wrapper:w-full":!0,"group-data-[tab-style=progress]/wrapper:whitespace-nowrap":!0,"group-data-[tab-style=progress]/wrapper:text-[11px]":!0,"[line-height:1em]":!0,"dark:group-data-[tab-style=progress]/wrapper:text-zinc-300":!0},"multi-step__badge":{"bg-red-600":!0,absolute:!0,"font-mono":!0,"font-bold":!0,flex:!0,"items-center":!0,"justify-center":!0,"aspect-[1/1]":!0,"[line-height:1.25rem]":!0,"text-white":!0,"rounded-full":!0,"group-data-[valid=true]/tab:bg-green-600":!0,"group-data-[tab-style=tab]/wrapper:text-[0.66rem]":!0,"group-data-[tab-style=tab]/wrapper:p-1.5":!0,"group-data-[tab-style=tab]/wrapper:w-5":!0,"group-data-[tab-style=tab]/wrapper:h-5":!0,"group-data-[tab-style=tab]/wrapper:top-1":!0,"group-data-[tab-style=tab]/wrapper:right-1":!0,"group-data-[tab-style=progress]/wrapper:w-[1.25rem]":!0,"group-data-[tab-style=progress]/wrapper:h-[1.25rem]":!0,"group-data-[tab-style=progress]/wrapper:p-1":!0,"group-data-[tab-style=progress]/wrapper:text-[10px]":!0,"group-data-[tab-style=progress]/wrapper:[line-height:0]":!0,"group-data-[tab-style=progress]/wrapper:z-10":!0},"multi-step__validStepIcon":{"w-full":!0,"h-full":!0,"mt-0.5":!0},"multi-step__steps":{"px-9":!0,"pt-7":!0,"pb-3.5":!0,"bg-white":!0,border:!0,"border-neutral-300":!0,"rounded-xl":!0,"dark:bg-transparent":!0,"dark:border-zinc-800":!0,"group-data-[tab-style=tab]/wrapper:border-t-0":!0,"group-data-[tab-style=tab]/wrapper:rounded-tl-none":!0,"group-data-[tab-style=tab]/wrapper:rounded-tr-none":!0,"group-data-[tab-style=progress]/wrapper:shadow-md":!0,"[&_[data-type]]:max-w-none":!0},step__stepActions:{flex:!0,"justify-between":!0,"[&>*]:grow-0":!0},step__stepPrevious:{"mr-1":!0},step__stepNext:{"ml-auto":!0}},LJ={outer:{group:!0,"max-w-full":!0,"min-w-full":!0,grow:!0,"mb-3.5":!0,"data-[disabled]:select-none":!0,"data-[disabled]:opacity-50":!0,"text-sm":!0},label:{"pointer-events-none":!0,block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"mb-0.5":!0,"dark:text-zinc-300":!0},legend:{block:!0,"text-neutral-700":!0,"text-xs":!0,"font-bold":!0,"dark:text-zinc-300":!0},input:{"appearance-none":!0,"[color-scheme:light]":!0,"dark:[color-scheme:dark]":!0,"selection:bg-green-100":!0,"selection:text-neutral-700":!0,"group-data-[has-overlay]:selection:!text-transparent":!0},prefixIcon:{flex:!0,"items-center":!0,"-ml-0.5":!0,"mr-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0},suffixIcon:{flex:!0,"items-center":!0,"-mr-0.5":!0,"ml-1.5":!0,"text-sm":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0},loaderIcon:{"animate-spin":!0,flex:!0,"items-center":!0,"my-auto":!0,"ml-1.5":!0,"text-sm":!0,"text-neutral-500":!0,"h-[1em]":!0,"w-[1em]":!0,"shrink-0":!0,"[&>svg]:w-full":!0},loadMoreInner:{flex:!0,"text-xs":!0,"text-neutral-500":!0,"p-1.5":!0,"items-center":!0,"justify-center":!0,"[&>span]:mr-1.5":!0},help:{"text-neutral-500":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-zinc-400":!0},message:{"text-red-600":!0,"mb-1.5":!0,"text-[11px]":!0,"[line-height:1em]":!0,"dark:text-red-400":!0},overlay:{"text-neutral-700":!0,"dark:text-zinc-300":!0},overlayPlaceholder:{"text-neutral-400":!0,"dark:text-zinc-400/50":!0},overlayLiteral:{"text-neutral-700":!0,"dark:text-zinc-300":!0},overlayChar:{"text-neutral-700":!0,"dark:text-zinc-300":!0},overlayEnum:{"text-neutral-700":!0,"dark:text-zinc-300":!0}};function RJ(e){return AJ(e),uo({plugins:[Hr({en:Rr,zh:zr})],locales:{en:Rr,zh:zr},locale:`zh`,config:{rootClasses:FJ},inputs:Mb()})}RJ(),vd(),vd(),Zl(),al(),e.BuilderPreview=DH,e.BuilderProvider=PJ,e.FormBuilderProvider=PJ,e.CanvasActionsBar=lH,e.FormBuilder=MJ,e.FormKitFormBuilder=MJ,e.FormBuilderPlugin={install(e,t){let n=t??{},r=n.config?.elements;AJ(r),pd(n.config),n.installFormKit!==!1&&e.use(Go,(n.formkitConfig??RJ)(r))}},e.FormRenderer=xH,e.FormSchemaRenderer=xH,e.buildElementSchemaLibrary=Fb,e.buildFormkitInputs=Mb,e.createFormBuilderState=Gl,e.dslToOutputSchema=Jc,e.dslToSchema=qc,e.formkitConfig=RJ,e.getElementCmpName=Pb,e.provideFormBuilderConfig=md,e.provideFormBuilderState=ql,e.registerElement=kJ,e.registerElements=AJ,e.schemaToDsl=Zc,e.setGlobalFormBuilderConfig=pd,e.useFormBuilderConfig=hd,e.useFormBuilderState=Jl});
|