form-schema-renderer 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ (function(Mt,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("naive-ui"),require("ajv")):typeof define=="function"&&define.amd?define(["exports","vue","naive-ui","ajv"],a):(Mt=typeof globalThis<"u"?globalThis:Mt||self,a(Mt.FormSchemaRenderer={},Mt.Vue,Mt.naive,Mt.Ajv))})(this,function(Mt,a,M,Yn){"use strict";const Jn={class:"array-items"},kn={key:0,class:"file-name"},Zn={key:2,class:"error-text"},Qn=a.defineComponent({__name:"SchemaField",props:{schema:{},uiSchema:{},modelValue:{},locale:{},path:{},rootSchema:{},rootValue:{},errors:{}},emits:["update:modelValue"],setup(r,{emit:n}){const e=r,s=n,o=I=>{var V,R;if(((V=e.schema)==null?void 0:V.type)==="integer"||((R=e.schema)==null?void 0:R.type)==="number"){if(I==="")return;if(typeof I=="string"){const j=e.schema.type==="integer"?parseInt(I,10):parseFloat(I);return Number.isNaN(j)?void 0:j}return I}return I},f=a.computed(()=>e.modelValue??y(e.schema)),t=a.computed(()=>e.rootValue??e.modelValue??{}),l=()=>e.rootValue??e.modelValue??{},i=a.computed(()=>Array.isArray(f.value)?f.value:[]),c=a.ref(o(f.value));a.watch(()=>e.modelValue,I=>{const V=o(I);V!==c.value&&(c.value=V)}),a.watch(c,I=>{const V=o(I);V!==e.modelValue&&s("update:modelValue",V)});const d=I=>{const V=String(I);return e.path?`${e.path}.${V}`:V},u=I=>e.path?`${e.path}.${I}`:String(I),v=I=>{if(!(!f.value||typeof f.value!="object"))return f.value[String(I)]},p=(I,V)=>{const R=typeof f.value=="object"&&f.value?f.value:{};s("update:modelValue",{...R,[String(I)]:V})},h=(I,V)=>{const R=Array.isArray(f.value)?[...f.value]:[];R[I]=V,s("update:modelValue",R)},m=I=>{const V=Array.isArray(f.value)?[...f.value]:[];V.splice(I,1),s("update:modelValue",V)},g=()=>{const I=Array.isArray(f.value)?[...f.value]:[];I.push(y(e.schema.items)),s("update:modelValue",I)};function y(I){if(I){if(I.type==="object")return{};if(I.type==="array")return[];if(I.type==="boolean")return!1;I.type==="integer"||I.type}}const b=(I,V)=>{const R=I==null?void 0:I[V];return R&&typeof R=="object"?R[e.locale]||R.zh||R.en||"":R||""},O=I=>I&&typeof I=="object"?I[e.locale]??I.zh??I.en??I:I,N=I=>{const V=l();if(!V)return;const R=String(I).split(".");let j=V;for(const J of R){if(j==null)return;j=j[J]}return j},D=I=>{if(!I)return!0;if(I.allOf)return Array.isArray(I.allOf)&&I.allOf.every(j=>D(j));if(I.anyOf)return Array.isArray(I.anyOf)&&I.anyOf.some(j=>D(j));const V=N(I.field),R=O(I.equals??I.notEquals??I.greaterThanOrEqual??I.lessThanOrEqual??I.greaterThan??I.lessThan??I.exists);return I.equals!==void 0?V===R:I.notEquals!==void 0?V!==R:I.exists!==void 0?I.exists?V!==void 0:V===void 0:I.greaterThan!==void 0?Number(V)>Number(R):I.greaterThanOrEqual!==void 0?Number(V)>=Number(R):I.lessThan!==void 0?Number(V)<Number(R):I.lessThanOrEqual!==void 0?Number(V)<=Number(R):!0},P=()=>{var I,V;return((V=(I=e.uiSchema)==null?void 0:I[e.path||""])==null?void 0:V.visibleIf)||e.schema.visibleIf},K=a.computed(()=>{const I=P();return I?D(I):!0}),U=a.computed(()=>{var V,R;return(((R=(V=e.uiSchema)==null?void 0:V[e.path||""])==null?void 0:R.widget)||e.schema.widget)==="file"}),S=a.computed(()=>{var V,R;const I=((R=(V=e.uiSchema)==null?void 0:V[e.path||""])==null?void 0:R.widget)||e.schema.widget;if(I==="file")return"file";if(e.schema.enum)return M.NSelect;if(I==="textarea"||I==="rich-text")return M.NInput;switch(e.schema.type){case"number":case"integer":return M.NInputNumber;case"boolean":return M.NCheckbox;case"string":return e.schema.format==="date"?M.NDatePicker:M.NInput;default:return M.NInput}}),T=a.computed(()=>{var j,J,st,lt;const I=((J=(j=e.uiSchema)==null?void 0:j[e.path||""])==null?void 0:J.widget)||e.schema.widget,V=((lt=(st=e.uiSchema)==null?void 0:st[e.path||""])==null?void 0:lt.props)||{},R=b(e.schema,"description");return e.schema.enum?{options:Y(e.schema.enum),...V}:I==="textarea"||I==="rich-text"?{type:"textarea",rows:I==="rich-text"?6:4,placeholder:R,...V}:e.schema.type==="string"?{placeholder:R,...V}:e.schema.type==="integer"||e.schema.type==="number"?{min:e.schema.minimum,max:e.schema.maximum,...V}:{...V}}),A=a.computed(()=>{var j,J;if(!e.path||!e.rootSchema)return!1;const I=e.path.split("."),V=I.pop();let R=e.rootSchema;for(const st of I){if(!R||R.type!=="object")return!1;R=(j=R.properties)==null?void 0:j[st]}return(J=R==null?void 0:R.required)==null?void 0:J.includes(V)}),W=a.computed(()=>String(b(e.schema,"title")||e.path||"")),w=a.computed(()=>{var I;return((I=e.errors)==null?void 0:I[e.path||""])||""}),L=I=>{var j;const R=(j=I.target.files)==null?void 0:j[0];R&&(c.value=R)},k=I=>I&&typeof I=="object"&&"name"in I?I.name:String(I||""),G=a.computed(()=>c.value),Y=I=>{if(Array.isArray(I))return I.map(V=>({label:String(V),value:V}));if(I&&typeof I=="object"){const V=I[e.locale]||I.zh||I.en||[];if(Array.isArray(V))return V.map(R=>({label:String(R),value:R}))}return[]};return(I,V)=>{var j,J;const R=a.resolveComponent("SchemaField",!0);return((j=r.schema)==null?void 0:j.type)==="object"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(r.schema.properties||{},(st,lt)=>(a.openBlock(),a.createBlock(R,{key:lt,schema:st,uiSchema:r.uiSchema,modelValue:v(lt),locale:r.locale,path:d(lt),rootSchema:r.rootSchema,rootValue:t.value,errors:r.errors,"onUpdate:modelValue":ft=>p(lt,ft)},null,8,["schema","uiSchema","modelValue","locale","path","rootSchema","rootValue","errors","onUpdate:modelValue"]))),128)):((J=r.schema)==null?void 0:J.type)==="array"?(a.openBlock(),a.createBlock(a.unref(M.NFormItem),{key:1,label:W.value,path:r.path,required:A.value},{default:a.withCtx(()=>[a.createElementVNode("div",Jn,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,(st,lt)=>(a.openBlock(),a.createElementBlock("div",{key:lt,class:"array-item"},[a.createVNode(R,{schema:r.schema.items,uiSchema:r.uiSchema,modelValue:i.value[lt],locale:r.locale,path:u(lt),rootSchema:r.rootSchema,rootValue:t.value,errors:r.errors,"onUpdate:modelValue":ft=>h(lt,ft)},null,8,["schema","uiSchema","modelValue","locale","path","rootSchema","rootValue","errors","onUpdate:modelValue"]),a.createVNode(a.unref(M.NButton),{size:"tiny",type:"error",onClick:ft=>m(lt)},{default:a.withCtx(()=>[...V[1]||(V[1]=[a.createTextVNode("Remove",-1)])]),_:1},8,["onClick"])]))),128)),a.createVNode(a.unref(M.NButton),{size:"tiny",type:"primary",onClick:g},{default:a.withCtx(()=>[...V[2]||(V[2]=[a.createTextVNode("Add Item",-1)])]),_:1})])]),_:1},8,["label","path","required"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[K.value?(a.openBlock(),a.createBlock(a.unref(M.NFormItem),{key:0,label:W.value,path:r.path,required:A.value},{default:a.withCtx(()=>[U.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("input",{type:"file",onChange:L},null,32),G.value?(a.openBlock(),a.createElementBlock("div",kn,a.toDisplayString(k(G.value)),1)):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(S.value),a.mergeProps({key:1,value:c.value,"onUpdate:value":V[0]||(V[0]=st=>c.value=st)},T.value),null,16,["value"])),w.value?(a.openBlock(),a.createElementBlock("div",Zn,a.toDisplayString(w.value),1)):a.createCommentVNode("",!0)]),_:1},8,["label","path","required"])):a.createCommentVNode("",!0)],64))}}}),ae=(r,n)=>{const e=r.__vccOpts||r;for(const[s,o]of n)e[s]=o;return e},qn=ae(Qn,[["__scopeId","data-v-b54d550e"]]);var $n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _n(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function to(r){if(r.__esModule)return r;var n=r.default;if(typeof n=="function"){var e=function s(){return this instanceof s?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};e.prototype=n.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var o=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:function(){return r[s]}})}),e}var Sn={exports:{}};/**!
2
+ * Sortable 1.14.0
3
+ * @author RubaXa <trash@rubaxa.org>
4
+ * @author owenm <owen23355@gmail.com>
5
+ * @license MIT
6
+ */function xn(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);n&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,s)}return e}function Ut(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?xn(Object(e),!0).forEach(function(s){eo(r,s,e[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):xn(Object(e)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(e,s))})}return r}function Fe(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(n){return typeof n}:Fe=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fe(r)}function eo(r,n,e){return n in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function Vt(){return Vt=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}return r},Vt.apply(this,arguments)}function no(r,n){if(r==null)return{};var e={},s=Object.keys(r),o,f;for(f=0;f<s.length;f++)o=s[f],!(n.indexOf(o)>=0)&&(e[o]=r[o]);return e}function oo(r,n){if(r==null)return{};var e=no(r,n),s,o;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);for(o=0;o<f.length;o++)s=f[o],!(n.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(r,s)&&(e[s]=r[s])}return e}function ro(r){return ao(r)||lo(r)||io(r)||so()}function ao(r){if(Array.isArray(r))return $e(r)}function lo(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function io(r,n){if(r){if(typeof r=="string")return $e(r,n);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return $e(r,n)}}function $e(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,s=new Array(n);e<n;e++)s[e]=r[e];return s}function so(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var co="1.14.0";function Xt(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Yt=Xt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ve=Xt(/Edge/i),En=Xt(/firefox/i),pe=Xt(/safari/i)&&!Xt(/chrome/i)&&!Xt(/android/i),On=Xt(/iP(ad|od|hone)/i),fo=Xt(/chrome/i)&&Xt(/android/i),Tn={capture:!1,passive:!1};function ot(r,n,e){r.addEventListener(n,e,!Yt&&Tn)}function nt(r,n,e){r.removeEventListener(n,e,!Yt&&Tn)}function Ve(r,n){if(n){if(n[0]===">"&&(n=n.substring(1)),r)try{if(r.matches)return r.matches(n);if(r.msMatchesSelector)return r.msMatchesSelector(n);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(n)}catch{return!1}return!1}}function uo(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Bt(r,n,e,s){if(r){e=e||document;do{if(n!=null&&(n[0]===">"?r.parentNode===e&&Ve(r,n):Ve(r,n))||s&&r===e)return r;if(r===e)break}while(r=uo(r))}return null}var In=/\s+/g;function pt(r,n,e){if(r&&n)if(r.classList)r.classList[e?"add":"remove"](n);else{var s=(" "+r.className+" ").replace(In," ").replace(" "+n+" "," ");r.className=(s+(e?" "+n:"")).replace(In," ")}}function H(r,n,e){var s=r&&r.style;if(s){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(e=r.currentStyle),n===void 0?e:e[n];!(n in s)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),s[n]=e+(typeof e=="string"?"":"px")}}function _t(r,n){var e="";if(typeof r=="string")e=r;else do{var s=H(r,"transform");s&&s!=="none"&&(e=s+" "+e)}while(!n&&(r=r.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function Nn(r,n,e){if(r){var s=r.getElementsByTagName(n),o=0,f=s.length;if(e)for(;o<f;o++)e(s[o],o);return s}return[]}function zt(){var r=document.scrollingElement;return r||document.documentElement}function ut(r,n,e,s,o){if(!(!r.getBoundingClientRect&&r!==window)){var f,t,l,i,c,d,u;if(r!==window&&r.parentNode&&r!==zt()?(f=r.getBoundingClientRect(),t=f.top,l=f.left,i=f.bottom,c=f.right,d=f.height,u=f.width):(t=0,l=0,i=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(n||e)&&r!==window&&(o=o||r.parentNode,!Yt))do if(o&&o.getBoundingClientRect&&(H(o,"transform")!=="none"||e&&H(o,"position")!=="static")){var v=o.getBoundingClientRect();t-=v.top+parseInt(H(o,"border-top-width")),l-=v.left+parseInt(H(o,"border-left-width")),i=t+f.height,c=l+f.width;break}while(o=o.parentNode);if(s&&r!==window){var p=_t(o||r),h=p&&p.a,m=p&&p.d;p&&(t/=m,l/=h,u/=h,d/=m,i=t+d,c=l+u)}return{top:t,left:l,bottom:i,right:c,width:u,height:d}}}function Cn(r,n,e){for(var s=Jt(r,!0),o=ut(r)[n];s;){var f=ut(s)[e],t=void 0;if(t=o>=f,!t)return s;if(s===zt())break;s=Jt(s,!1)}return!1}function le(r,n,e,s){for(var o=0,f=0,t=r.children;f<t.length;){if(t[f].style.display!=="none"&&t[f]!==Q.ghost&&(s||t[f]!==Q.dragged)&&Bt(t[f],e.draggable,r,!1)){if(o===n)return t[f];o++}f++}return null}function _e(r,n){for(var e=r.lastElementChild;e&&(e===Q.ghost||H(e,"display")==="none"||n&&!Ve(e,n));)e=e.previousElementSibling;return e||null}function mt(r,n){var e=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==Q.clone&&(!n||Ve(r,n))&&e++;return e}function Dn(r){var n=0,e=0,s=zt();if(r)do{var o=_t(r),f=o.a,t=o.d;n+=r.scrollLeft*f,e+=r.scrollTop*t}while(r!==s&&(r=r.parentNode));return[n,e]}function vo(r,n){for(var e in r)if(r.hasOwnProperty(e)){for(var s in n)if(n.hasOwnProperty(s)&&n[s]===r[e][s])return Number(e)}return-1}function Jt(r,n){if(!r||!r.getBoundingClientRect)return zt();var e=r,s=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=H(e);if(e.clientWidth<e.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return zt();if(s||n)return e;s=!0}}while(e=e.parentNode);return zt()}function po(r,n){if(r&&n)for(var e in n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r}function tn(r,n){return Math.round(r.top)===Math.round(n.top)&&Math.round(r.left)===Math.round(n.left)&&Math.round(r.height)===Math.round(n.height)&&Math.round(r.width)===Math.round(n.width)}var he;function Pn(r,n){return function(){if(!he){var e=arguments,s=this;e.length===1?r.call(s,e[0]):r.apply(s,e),he=setTimeout(function(){he=void 0},n)}}}function ho(){clearTimeout(he),he=void 0}function An(r,n,e){r.scrollLeft+=n,r.scrollTop+=e}function en(r){var n=window.Polymer,e=window.jQuery||window.Zepto;return n&&n.dom?n.dom(r).cloneNode(!0):e?e(r).clone(!0)[0]:r.cloneNode(!0)}function wn(r,n){H(r,"position","absolute"),H(r,"top",n.top),H(r,"left",n.left),H(r,"width",n.width),H(r,"height",n.height)}function nn(r){H(r,"position",""),H(r,"top",""),H(r,"left",""),H(r,"width",""),H(r,"height","")}var Tt="Sortable"+new Date().getTime();function mo(){var r=[],n;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var s=[].slice.call(this.el.children);s.forEach(function(o){if(!(H(o,"display")==="none"||o===Q.ghost)){r.push({target:o,rect:ut(o)});var f=Ut({},r[r.length-1].rect);if(o.thisAnimationDuration){var t=_t(o,!0);t&&(f.top-=t.f,f.left-=t.e)}o.fromRect=f}})}},addAnimationState:function(s){r.push(s)},removeAnimationState:function(s){r.splice(vo(r,{target:s}),1)},animateAll:function(s){var o=this;if(!this.options.animation){clearTimeout(n),typeof s=="function"&&s();return}var f=!1,t=0;r.forEach(function(l){var i=0,c=l.target,d=c.fromRect,u=ut(c),v=c.prevFromRect,p=c.prevToRect,h=l.rect,m=_t(c,!0);m&&(u.top-=m.f,u.left-=m.e),c.toRect=u,c.thisAnimationDuration&&tn(v,u)&&!tn(d,u)&&(h.top-u.top)/(h.left-u.left)===(d.top-u.top)/(d.left-u.left)&&(i=yo(h,v,p,o.options)),tn(u,d)||(c.prevFromRect=d,c.prevToRect=u,i||(i=o.options.animation),o.animate(c,h,u,i)),i&&(f=!0,t=Math.max(t,i),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},i),c.thisAnimationDuration=i)}),clearTimeout(n),f?n=setTimeout(function(){typeof s=="function"&&s()},t):typeof s=="function"&&s(),r=[]},animate:function(s,o,f,t){if(t){H(s,"transition",""),H(s,"transform","");var l=_t(this.el),i=l&&l.a,c=l&&l.d,d=(o.left-f.left)/(i||1),u=(o.top-f.top)/(c||1);s.animatingX=!!d,s.animatingY=!!u,H(s,"transform","translate3d("+d+"px,"+u+"px,0)"),this.forRepaintDummy=go(s),H(s,"transition","transform "+t+"ms"+(this.options.easing?" "+this.options.easing:"")),H(s,"transform","translate3d(0,0,0)"),typeof s.animated=="number"&&clearTimeout(s.animated),s.animated=setTimeout(function(){H(s,"transition",""),H(s,"transform",""),s.animated=!1,s.animatingX=!1,s.animatingY=!1},t)}}}}function go(r){return r.offsetWidth}function yo(r,n,e,s){return Math.sqrt(Math.pow(n.top-r.top,2)+Math.pow(n.left-r.left,2))/Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))*s.animation}var ie=[],on={initializeByDefault:!0},me={mount:function(n){for(var e in on)on.hasOwnProperty(e)&&!(e in n)&&(n[e]=on[e]);ie.forEach(function(s){if(s.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),ie.push(n)},pluginEvent:function(n,e,s){var o=this;this.eventCanceled=!1,s.cancel=function(){o.eventCanceled=!0};var f=n+"Global";ie.forEach(function(t){e[t.pluginName]&&(e[t.pluginName][f]&&e[t.pluginName][f](Ut({sortable:e},s)),e.options[t.pluginName]&&e[t.pluginName][n]&&e[t.pluginName][n](Ut({sortable:e},s)))})},initializePlugins:function(n,e,s,o){ie.forEach(function(l){var i=l.pluginName;if(!(!n.options[i]&&!l.initializeByDefault)){var c=new l(n,e,n.options);c.sortable=n,c.options=n.options,n[i]=c,Vt(s,c.defaults)}});for(var f in n.options)if(n.options.hasOwnProperty(f)){var t=this.modifyOption(n,f,n.options[f]);typeof t<"u"&&(n.options[f]=t)}},getEventProperties:function(n,e){var s={};return ie.forEach(function(o){typeof o.eventProperties=="function"&&Vt(s,o.eventProperties.call(e[o.pluginName],n))}),s},modifyOption:function(n,e,s){var o;return ie.forEach(function(f){n[f.pluginName]&&f.optionListeners&&typeof f.optionListeners[e]=="function"&&(o=f.optionListeners[e].call(n[f.pluginName],s))}),o}};function ge(r){var n=r.sortable,e=r.rootEl,s=r.name,o=r.targetEl,f=r.cloneEl,t=r.toEl,l=r.fromEl,i=r.oldIndex,c=r.newIndex,d=r.oldDraggableIndex,u=r.newDraggableIndex,v=r.originalEvent,p=r.putSortable,h=r.extraEventProperties;if(n=n||e&&e[Tt],!!n){var m,g=n.options,y="on"+s.charAt(0).toUpperCase()+s.substr(1);window.CustomEvent&&!Yt&&!ve?m=new CustomEvent(s,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(s,!0,!0)),m.to=t||e,m.from=l||e,m.item=o||e,m.clone=f,m.oldIndex=i,m.newIndex=c,m.oldDraggableIndex=d,m.newDraggableIndex=u,m.originalEvent=v,m.pullMode=p?p.lastPutMode:void 0;var b=Ut(Ut({},h),me.getEventProperties(s,n));for(var O in b)m[O]=b[O];e&&e.dispatchEvent(m),g[y]&&g[y].call(n,m)}}var bo=["evt"],Dt=function(n,e){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=s.evt,f=oo(s,bo);me.pluginEvent.bind(Q)(n,e,Ut({dragEl:B,parentEl:gt,ghostEl:tt,rootEl:dt,nextEl:te,lastDownEl:je,cloneEl:yt,cloneHidden:kt,dragStarted:be,putSortable:xt,activeSortable:Q.active,originalEvent:o,oldIndex:se,oldDraggableIndex:ye,newIndex:wt,newDraggableIndex:Zt,hideGhostForTarget:Ln,unhideGhostForTarget:Gn,cloneNowHidden:function(){kt=!0},cloneNowShown:function(){kt=!1},dispatchSortableEvent:function(l){Nt({sortable:e,name:l,originalEvent:o})}},f))};function Nt(r){ge(Ut({putSortable:xt,cloneEl:yt,targetEl:B,rootEl:dt,oldIndex:se,oldDraggableIndex:ye,newIndex:wt,newDraggableIndex:Zt},r))}var B,gt,tt,dt,te,je,yt,kt,se,wt,ye,Zt,Me,xt,ce=!1,Be=!1,Le=[],ee,Lt,rn,an,Rn,Fn,be,fe,Se,xe=!1,Ge=!1,Ke,It,ln=[],sn=!1,Ue=[],ze=typeof document<"u",He=On,Vn=ve||Yt?"cssFloat":"float",So=ze&&!fo&&!On&&"draggable"in document.createElement("div"),jn=function(){if(ze){if(Yt)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Mn=function(n,e){var s=H(n),o=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),f=le(n,0,e),t=le(n,1,e),l=f&&H(f),i=t&&H(t),c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ut(f).width,d=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+ut(t).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(f&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return t&&(i.clear==="both"||i.clear===u)?"vertical":"horizontal"}return f&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||c>=o&&s[Vn]==="none"||t&&s[Vn]==="none"&&c+d>o)?"vertical":"horizontal"},xo=function(n,e,s){var o=s?n.left:n.top,f=s?n.right:n.bottom,t=s?n.width:n.height,l=s?e.left:e.top,i=s?e.right:e.bottom,c=s?e.width:e.height;return o===l||f===i||o+t/2===l+c/2},Eo=function(n,e){var s;return Le.some(function(o){var f=o[Tt].options.emptyInsertThreshold;if(!(!f||_e(o))){var t=ut(o),l=n>=t.left-f&&n<=t.right+f,i=e>=t.top-f&&e<=t.bottom+f;if(l&&i)return s=o}}),s},Bn=function(n){function e(f,t){return function(l,i,c,d){var u=l.options.group.name&&i.options.group.name&&l.options.group.name===i.options.group.name;if(f==null&&(t||u))return!0;if(f==null||f===!1)return!1;if(t&&f==="clone")return f;if(typeof f=="function")return e(f(l,i,c,d),t)(l,i,c,d);var v=(t?l:i).options.group.name;return f===!0||typeof f=="string"&&f===v||f.join&&f.indexOf(v)>-1}}var s={},o=n.group;(!o||Fe(o)!="object")&&(o={name:o}),s.name=o.name,s.checkPull=e(o.pull,!0),s.checkPut=e(o.put),s.revertClone=o.revertClone,n.group=s},Ln=function(){!jn&&tt&&H(tt,"display","none")},Gn=function(){!jn&&tt&&H(tt,"display","")};ze&&document.addEventListener("click",function(r){if(Be)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),Be=!1,!1},!0);var ne=function(n){if(B){n=n.touches?n.touches[0]:n;var e=Eo(n.clientX,n.clientY);if(e){var s={};for(var o in n)n.hasOwnProperty(o)&&(s[o]=n[o]);s.target=s.rootEl=e,s.preventDefault=void 0,s.stopPropagation=void 0,e[Tt]._onDragOver(s)}}},Oo=function(n){B&&B.parentNode[Tt]._isOutsideThisEl(n.target)};function Q(r,n){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=n=Vt({},n),r[Tt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Mn(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,l){t.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Q.supportPointer!==!1&&"PointerEvent"in window&&!pe,emptyInsertThreshold:5};me.initializePlugins(this,r,e);for(var s in e)!(s in n)&&(n[s]=e[s]);Bn(n);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=n.forceFallback?!1:So,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?ot(r,"pointerdown",this._onTapStart):(ot(r,"mousedown",this._onTapStart),ot(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(ot(r,"dragover",this),ot(r,"dragenter",this)),Le.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Vt(this,mo())}Q.prototype={constructor:Q,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(fe=null)},_getDirection:function(n,e){return typeof this.options.direction=="function"?this.options.direction.call(this,n,e,B):this.options.direction},_onTapStart:function(n){if(n.cancelable){var e=this,s=this.el,o=this.options,f=o.preventOnFilter,t=n.type,l=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,i=(l||n).target,c=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||i,d=o.filter;if(wo(s),!B&&!(/mousedown|pointerdown/.test(t)&&n.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&pe&&i&&i.tagName.toUpperCase()==="SELECT")&&(i=Bt(i,o.draggable,s,!1),!(i&&i.animated)&&je!==i)){if(se=mt(i),ye=mt(i,o.draggable),typeof d=="function"){if(d.call(this,n,i,this)){Nt({sortable:e,rootEl:c,name:"filter",targetEl:i,toEl:s,fromEl:s}),Dt("filter",e,{evt:n}),f&&n.cancelable&&n.preventDefault();return}}else if(d&&(d=d.split(",").some(function(u){if(u=Bt(c,u.trim(),s,!1),u)return Nt({sortable:e,rootEl:u,name:"filter",targetEl:i,fromEl:s,toEl:s}),Dt("filter",e,{evt:n}),!0}),d)){f&&n.cancelable&&n.preventDefault();return}o.handle&&!Bt(c,o.handle,s,!1)||this._prepareDragStart(n,l,i)}}},_prepareDragStart:function(n,e,s){var o=this,f=o.el,t=o.options,l=f.ownerDocument,i;if(s&&!B&&s.parentNode===f){var c=ut(s);if(dt=f,B=s,gt=B.parentNode,te=B.nextSibling,je=s,Me=t.group,Q.dragged=B,ee={target:B,clientX:(e||n).clientX,clientY:(e||n).clientY},Rn=ee.clientX-c.left,Fn=ee.clientY-c.top,this._lastX=(e||n).clientX,this._lastY=(e||n).clientY,B.style["will-change"]="all",i=function(){if(Dt("delayEnded",o,{evt:n}),Q.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!En&&o.nativeDraggable&&(B.draggable=!0),o._triggerDragStart(n,e),Nt({sortable:o,name:"choose",originalEvent:n}),pt(B,t.chosenClass,!0)},t.ignore.split(",").forEach(function(d){Nn(B,d.trim(),cn)}),ot(l,"dragover",ne),ot(l,"mousemove",ne),ot(l,"touchmove",ne),ot(l,"mouseup",o._onDrop),ot(l,"touchend",o._onDrop),ot(l,"touchcancel",o._onDrop),En&&this.nativeDraggable&&(this.options.touchStartThreshold=4,B.draggable=!0),Dt("delayStart",this,{evt:n}),t.delay&&(!t.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(ve||Yt))){if(Q.eventCanceled){this._onDrop();return}ot(l,"mouseup",o._disableDelayedDrag),ot(l,"touchend",o._disableDelayedDrag),ot(l,"touchcancel",o._disableDelayedDrag),ot(l,"mousemove",o._delayedDragTouchMoveHandler),ot(l,"touchmove",o._delayedDragTouchMoveHandler),t.supportPointer&&ot(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,t.delay)}else i()}},_delayedDragTouchMoveHandler:function(n){var e=n.touches?n.touches[0]:n;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){B&&cn(B),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;nt(n,"mouseup",this._disableDelayedDrag),nt(n,"touchend",this._disableDelayedDrag),nt(n,"touchcancel",this._disableDelayedDrag),nt(n,"mousemove",this._delayedDragTouchMoveHandler),nt(n,"touchmove",this._delayedDragTouchMoveHandler),nt(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,e){e=e||n.pointerType=="touch"&&n,!this.nativeDraggable||e?this.options.supportPointer?ot(document,"pointermove",this._onTouchMove):e?ot(document,"touchmove",this._onTouchMove):ot(document,"mousemove",this._onTouchMove):(ot(B,"dragend",this),ot(dt,"dragstart",this._onDragStart));try{document.selection?Xe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,e){if(ce=!1,dt&&B){Dt("dragStarted",this,{evt:e}),this.nativeDraggable&&ot(document,"dragover",Oo);var s=this.options;!n&&pt(B,s.dragClass,!1),pt(B,s.ghostClass,!0),Q.active=this,n&&this._appendGhost(),Nt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Lt){this._lastX=Lt.clientX,this._lastY=Lt.clientY,Ln();for(var n=document.elementFromPoint(Lt.clientX,Lt.clientY),e=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Lt.clientX,Lt.clientY),n!==e);)e=n;if(B.parentNode[Tt]._isOutsideThisEl(n),e)do{if(e[Tt]){var s=void 0;if(s=e[Tt]._onDragOver({clientX:Lt.clientX,clientY:Lt.clientY,target:n,rootEl:e}),s&&!this.options.dragoverBubble)break}n=e}while(e=e.parentNode);Gn()}},_onTouchMove:function(n){if(ee){var e=this.options,s=e.fallbackTolerance,o=e.fallbackOffset,f=n.touches?n.touches[0]:n,t=tt&&_t(tt,!0),l=tt&&t&&t.a,i=tt&&t&&t.d,c=He&&It&&Dn(It),d=(f.clientX-ee.clientX+o.x)/(l||1)+(c?c[0]-ln[0]:0)/(l||1),u=(f.clientY-ee.clientY+o.y)/(i||1)+(c?c[1]-ln[1]:0)/(i||1);if(!Q.active&&!ce){if(s&&Math.max(Math.abs(f.clientX-this._lastX),Math.abs(f.clientY-this._lastY))<s)return;this._onDragStart(n,!0)}if(tt){t?(t.e+=d-(rn||0),t.f+=u-(an||0)):t={a:1,b:0,c:0,d:1,e:d,f:u};var v="matrix(".concat(t.a,",").concat(t.b,",").concat(t.c,",").concat(t.d,",").concat(t.e,",").concat(t.f,")");H(tt,"webkitTransform",v),H(tt,"mozTransform",v),H(tt,"msTransform",v),H(tt,"transform",v),rn=d,an=u,Lt=f}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!tt){var n=this.options.fallbackOnBody?document.body:dt,e=ut(B,!0,He,!0,n),s=this.options;if(He){for(It=n;H(It,"position")==="static"&&H(It,"transform")==="none"&&It!==document;)It=It.parentNode;It!==document.body&&It!==document.documentElement?(It===document&&(It=zt()),e.top+=It.scrollTop,e.left+=It.scrollLeft):It=zt(),ln=Dn(It)}tt=B.cloneNode(!0),pt(tt,s.ghostClass,!1),pt(tt,s.fallbackClass,!0),pt(tt,s.dragClass,!0),H(tt,"transition",""),H(tt,"transform",""),H(tt,"box-sizing","border-box"),H(tt,"margin",0),H(tt,"top",e.top),H(tt,"left",e.left),H(tt,"width",e.width),H(tt,"height",e.height),H(tt,"opacity","0.8"),H(tt,"position",He?"absolute":"fixed"),H(tt,"zIndex","100000"),H(tt,"pointerEvents","none"),Q.ghost=tt,n.appendChild(tt),H(tt,"transform-origin",Rn/parseInt(tt.style.width)*100+"% "+Fn/parseInt(tt.style.height)*100+"%")}},_onDragStart:function(n,e){var s=this,o=n.dataTransfer,f=s.options;if(Dt("dragStart",this,{evt:n}),Q.eventCanceled){this._onDrop();return}Dt("setupClone",this),Q.eventCanceled||(yt=en(B),yt.draggable=!1,yt.style["will-change"]="",this._hideClone(),pt(yt,this.options.chosenClass,!1),Q.clone=yt),s.cloneId=Xe(function(){Dt("clone",s),!Q.eventCanceled&&(s.options.removeCloneOnHide||dt.insertBefore(yt,B),s._hideClone(),Nt({sortable:s,name:"clone"}))}),!e&&pt(B,f.dragClass,!0),e?(Be=!0,s._loopId=setInterval(s._emulateDragOver,50)):(nt(document,"mouseup",s._onDrop),nt(document,"touchend",s._onDrop),nt(document,"touchcancel",s._onDrop),o&&(o.effectAllowed="move",f.setData&&f.setData.call(s,o,B)),ot(document,"drop",s),H(B,"transform","translateZ(0)")),ce=!0,s._dragStartId=Xe(s._dragStarted.bind(s,e,n)),ot(document,"selectstart",s),be=!0,pe&&H(document.body,"user-select","none")},_onDragOver:function(n){var e=this.el,s=n.target,o,f,t,l=this.options,i=l.group,c=Q.active,d=Me===i,u=l.sort,v=xt||c,p,h=this,m=!1;if(sn)return;function g(I,V){Dt(I,h,Ut({evt:n,isOwner:d,axis:p?"vertical":"horizontal",revert:t,dragRect:o,targetRect:f,canSort:u,fromSortable:v,target:s,completed:b,onMove:function(j,J){return We(dt,e,B,o,j,ut(j),n,J)},changed:O},V))}function y(){g("dragOverAnimationCapture"),h.captureAnimationState(),h!==v&&v.captureAnimationState()}function b(I){return g("dragOverCompleted",{insertion:I}),I&&(d?c._hideClone():c._showClone(h),h!==v&&(pt(B,xt?xt.options.ghostClass:c.options.ghostClass,!1),pt(B,l.ghostClass,!0)),xt!==h&&h!==Q.active?xt=h:h===Q.active&&xt&&(xt=null),v===h&&(h._ignoreWhileAnimating=s),h.animateAll(function(){g("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(s===B&&!B.animated||s===e&&!s.animated)&&(fe=null),!l.dragoverBubble&&!n.rootEl&&s!==document&&(B.parentNode[Tt]._isOutsideThisEl(n.target),!I&&ne(n)),!l.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),m=!0}function O(){wt=mt(B),Zt=mt(B,l.draggable),Nt({sortable:h,name:"change",toEl:e,newIndex:wt,newDraggableIndex:Zt,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),s=Bt(s,l.draggable,e,!0),g("dragOver"),Q.eventCanceled)return m;if(B.contains(n.target)||s.animated&&s.animatingX&&s.animatingY||h._ignoreWhileAnimating===s)return b(!1);if(Be=!1,c&&!l.disabled&&(d?u||(t=gt!==dt):xt===this||(this.lastPutMode=Me.checkPull(this,c,B,n))&&i.checkPut(this,c,B,n))){if(p=this._getDirection(n,s)==="vertical",o=ut(B),g("dragOverValid"),Q.eventCanceled)return m;if(t)return gt=dt,y(),this._hideClone(),g("revert"),Q.eventCanceled||(te?dt.insertBefore(B,te):dt.appendChild(B)),b(!0);var N=_e(e,l.draggable);if(!N||Co(n,p,this)&&!N.animated){if(N===B)return b(!1);if(N&&e===n.target&&(s=N),s&&(f=ut(s)),We(dt,e,B,o,s,f,n,!!s)!==!1)return y(),e.appendChild(B),gt=e,O(),b(!0)}else if(N&&No(n,p,this)){var D=le(e,0,l,!0);if(D===B)return b(!1);if(s=D,f=ut(s),We(dt,e,B,o,s,f,n,!1)!==!1)return y(),e.insertBefore(B,D),gt=e,O(),b(!0)}else if(s.parentNode===e){f=ut(s);var P=0,K,U=B.parentNode!==e,S=!xo(B.animated&&B.toRect||o,s.animated&&s.toRect||f,p),T=p?"top":"left",A=Cn(s,"top","top")||Cn(B,"top","top"),W=A?A.scrollTop:void 0;fe!==s&&(K=f[T],xe=!1,Ge=!S&&l.invertSwap||U),P=Do(n,s,f,p,S?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ge,fe===s);var w;if(P!==0){var L=mt(B);do L-=P,w=gt.children[L];while(w&&(H(w,"display")==="none"||w===tt))}if(P===0||w===s)return b(!1);fe=s,Se=P;var k=s.nextElementSibling,G=!1;G=P===1;var Y=We(dt,e,B,o,s,f,n,G);if(Y!==!1)return(Y===1||Y===-1)&&(G=Y===1),sn=!0,setTimeout(Io,30),y(),G&&!k?e.appendChild(B):s.parentNode.insertBefore(B,G?k:s),A&&An(A,0,W-A.scrollTop),gt=B.parentNode,K!==void 0&&!Ge&&(Ke=Math.abs(K-ut(s)[T])),O(),b(!0)}if(e.contains(B))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){nt(document,"mousemove",this._onTouchMove),nt(document,"touchmove",this._onTouchMove),nt(document,"pointermove",this._onTouchMove),nt(document,"dragover",ne),nt(document,"mousemove",ne),nt(document,"touchmove",ne)},_offUpEvents:function(){var n=this.el.ownerDocument;nt(n,"mouseup",this._onDrop),nt(n,"touchend",this._onDrop),nt(n,"pointerup",this._onDrop),nt(n,"touchcancel",this._onDrop),nt(document,"selectstart",this)},_onDrop:function(n){var e=this.el,s=this.options;if(wt=mt(B),Zt=mt(B,s.draggable),Dt("drop",this,{evt:n}),gt=B&&B.parentNode,wt=mt(B),Zt=mt(B,s.draggable),Q.eventCanceled){this._nulling();return}ce=!1,Ge=!1,xe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),fn(this.cloneId),fn(this._dragStartId),this.nativeDraggable&&(nt(document,"drop",this),nt(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),pe&&H(document.body,"user-select",""),H(B,"transform",""),n&&(be&&(n.cancelable&&n.preventDefault(),!s.dropBubble&&n.stopPropagation()),tt&&tt.parentNode&&tt.parentNode.removeChild(tt),(dt===gt||xt&&xt.lastPutMode!=="clone")&&yt&&yt.parentNode&&yt.parentNode.removeChild(yt),B&&(this.nativeDraggable&&nt(B,"dragend",this),cn(B),B.style["will-change"]="",be&&!ce&&pt(B,xt?xt.options.ghostClass:this.options.ghostClass,!1),pt(B,this.options.chosenClass,!1),Nt({sortable:this,name:"unchoose",toEl:gt,newIndex:null,newDraggableIndex:null,originalEvent:n}),dt!==gt?(wt>=0&&(Nt({rootEl:gt,name:"add",toEl:gt,fromEl:dt,originalEvent:n}),Nt({sortable:this,name:"remove",toEl:gt,originalEvent:n}),Nt({rootEl:gt,name:"sort",toEl:gt,fromEl:dt,originalEvent:n}),Nt({sortable:this,name:"sort",toEl:gt,originalEvent:n})),xt&&xt.save()):wt!==se&&wt>=0&&(Nt({sortable:this,name:"update",toEl:gt,originalEvent:n}),Nt({sortable:this,name:"sort",toEl:gt,originalEvent:n})),Q.active&&((wt==null||wt===-1)&&(wt=se,Zt=ye),Nt({sortable:this,name:"end",toEl:gt,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){Dt("nulling",this),dt=B=gt=tt=te=yt=je=kt=ee=Lt=be=wt=Zt=se=ye=fe=Se=xt=Me=Q.dragged=Q.ghost=Q.clone=Q.active=null,Ue.forEach(function(n){n.checked=!0}),Ue.length=rn=an=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":B&&(this._onDragOver(n),To(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],e,s=this.el.children,o=0,f=s.length,t=this.options;o<f;o++)e=s[o],Bt(e,t.draggable,this.el,!1)&&n.push(e.getAttribute(t.dataIdAttr)||Ao(e));return n},sort:function(n,e){var s={},o=this.el;this.toArray().forEach(function(f,t){var l=o.children[t];Bt(l,this.options.draggable,o,!1)&&(s[f]=l)},this),e&&this.captureAnimationState(),n.forEach(function(f){s[f]&&(o.removeChild(s[f]),o.appendChild(s[f]))}),e&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,e){return Bt(n,e||this.options.draggable,this.el,!1)},option:function(n,e){var s=this.options;if(e===void 0)return s[n];var o=me.modifyOption(this,n,e);typeof o<"u"?s[n]=o:s[n]=e,n==="group"&&Bn(s)},destroy:function(){Dt("destroy",this);var n=this.el;n[Tt]=null,nt(n,"mousedown",this._onTapStart),nt(n,"touchstart",this._onTapStart),nt(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(nt(n,"dragover",this),nt(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Le.splice(Le.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!kt){if(Dt("hideClone",this),Q.eventCanceled)return;H(yt,"display","none"),this.options.removeCloneOnHide&&yt.parentNode&&yt.parentNode.removeChild(yt),kt=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(kt){if(Dt("showClone",this),Q.eventCanceled)return;B.parentNode==dt&&!this.options.group.revertClone?dt.insertBefore(yt,B):te?dt.insertBefore(yt,te):dt.appendChild(yt),this.options.group.revertClone&&this.animate(B,yt),H(yt,"display",""),kt=!1}}};function To(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function We(r,n,e,s,o,f,t,l){var i,c=r[Tt],d=c.options.onMove,u;return window.CustomEvent&&!Yt&&!ve?i=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(i=document.createEvent("Event"),i.initEvent("move",!0,!0)),i.to=n,i.from=r,i.dragged=e,i.draggedRect=s,i.related=o||n,i.relatedRect=f||ut(n),i.willInsertAfter=l,i.originalEvent=t,r.dispatchEvent(i),d&&(u=d.call(c,i,t)),u}function cn(r){r.draggable=!1}function Io(){sn=!1}function No(r,n,e){var s=ut(le(e.el,0,e.options,!0)),o=10;return n?r.clientX<s.left-o||r.clientY<s.top&&r.clientX<s.right:r.clientY<s.top-o||r.clientY<s.bottom&&r.clientX<s.left}function Co(r,n,e){var s=ut(_e(e.el,e.options.draggable)),o=10;return n?r.clientX>s.right+o||r.clientX<=s.right&&r.clientY>s.bottom&&r.clientX>=s.left:r.clientX>s.right&&r.clientY>s.top||r.clientX<=s.right&&r.clientY>s.bottom+o}function Do(r,n,e,s,o,f,t,l){var i=s?r.clientY:r.clientX,c=s?e.height:e.width,d=s?e.top:e.left,u=s?e.bottom:e.right,v=!1;if(!t){if(l&&Ke<c*o){if(!xe&&(Se===1?i>d+c*f/2:i<u-c*f/2)&&(xe=!0),xe)v=!0;else if(Se===1?i<d+Ke:i>u-Ke)return-Se}else if(i>d+c*(1-o)/2&&i<u-c*(1-o)/2)return Po(n)}return v=v||t,v&&(i<d+c*f/2||i>u-c*f/2)?i>d+c/2?1:-1:0}function Po(r){return mt(B)<mt(r)?1:-1}function Ao(r){for(var n=r.tagName+r.className+r.src+r.href+r.textContent,e=n.length,s=0;e--;)s+=n.charCodeAt(e);return s.toString(36)}function wo(r){Ue.length=0;for(var n=r.getElementsByTagName("input"),e=n.length;e--;){var s=n[e];s.checked&&Ue.push(s)}}function Xe(r){return setTimeout(r,0)}function fn(r){return clearTimeout(r)}ze&&ot(document,"touchmove",function(r){(Q.active||ce)&&r.cancelable&&r.preventDefault()}),Q.utils={on:ot,off:nt,css:H,find:Nn,is:function(n,e){return!!Bt(n,e,n,!1)},extend:po,throttle:Pn,closest:Bt,toggleClass:pt,clone:en,index:mt,nextTick:Xe,cancelNextTick:fn,detectDirection:Mn,getChild:le},Q.get=function(r){return r[Tt]},Q.mount=function(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];n[0].constructor===Array&&(n=n[0]),n.forEach(function(s){if(!s.prototype||!s.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(s));s.utils&&(Q.utils=Ut(Ut({},Q.utils),s.utils)),me.mount(s)})},Q.create=function(r,n){return new Q(r,n)},Q.version=co;var St=[],Ee,un,dn=!1,vn,pn,Ye,Oe;function Ro(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return r.prototype={dragStarted:function(e){var s=e.originalEvent;this.sortable.nativeDraggable?ot(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ot(document,"pointermove",this._handleFallbackAutoScroll):s.touches?ot(document,"touchmove",this._handleFallbackAutoScroll):ot(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var s=e.originalEvent;!this.options.dragOverBubble&&!s.rootEl&&this._handleAutoScroll(s)},drop:function(){this.sortable.nativeDraggable?nt(document,"dragover",this._handleAutoScroll):(nt(document,"pointermove",this._handleFallbackAutoScroll),nt(document,"touchmove",this._handleFallbackAutoScroll),nt(document,"mousemove",this._handleFallbackAutoScroll)),Kn(),Je(),ho()},nulling:function(){Ye=un=Ee=dn=Oe=vn=pn=null,St.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,s){var o=this,f=(e.touches?e.touches[0]:e).clientX,t=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(f,t);if(Ye=e,s||this.options.forceAutoScrollFallback||ve||Yt||pe){hn(e,this.options,l,s);var i=Jt(l,!0);dn&&(!Oe||f!==vn||t!==pn)&&(Oe&&Kn(),Oe=setInterval(function(){var c=Jt(document.elementFromPoint(f,t),!0);c!==i&&(i=c,Je()),hn(e,o.options,c,s)},10),vn=f,pn=t)}else{if(!this.options.bubbleScroll||Jt(l,!0)===zt()){Je();return}hn(e,this.options,Jt(l,!1),!1)}}},Vt(r,{pluginName:"scroll",initializeByDefault:!0})}function Je(){St.forEach(function(r){clearInterval(r.pid)}),St=[]}function Kn(){clearInterval(Oe)}var hn=Pn(function(r,n,e,s){if(n.scroll){var o=(r.touches?r.touches[0]:r).clientX,f=(r.touches?r.touches[0]:r).clientY,t=n.scrollSensitivity,l=n.scrollSpeed,i=zt(),c=!1,d;un!==e&&(un=e,Je(),Ee=n.scroll,d=n.scrollFn,Ee===!0&&(Ee=Jt(e,!0)));var u=0,v=Ee;do{var p=v,h=ut(p),m=h.top,g=h.bottom,y=h.left,b=h.right,O=h.width,N=h.height,D=void 0,P=void 0,K=p.scrollWidth,U=p.scrollHeight,S=H(p),T=p.scrollLeft,A=p.scrollTop;p===i?(D=O<K&&(S.overflowX==="auto"||S.overflowX==="scroll"||S.overflowX==="visible"),P=N<U&&(S.overflowY==="auto"||S.overflowY==="scroll"||S.overflowY==="visible")):(D=O<K&&(S.overflowX==="auto"||S.overflowX==="scroll"),P=N<U&&(S.overflowY==="auto"||S.overflowY==="scroll"));var W=D&&(Math.abs(b-o)<=t&&T+O<K)-(Math.abs(y-o)<=t&&!!T),w=P&&(Math.abs(g-f)<=t&&A+N<U)-(Math.abs(m-f)<=t&&!!A);if(!St[u])for(var L=0;L<=u;L++)St[L]||(St[L]={});(St[u].vx!=W||St[u].vy!=w||St[u].el!==p)&&(St[u].el=p,St[u].vx=W,St[u].vy=w,clearInterval(St[u].pid),(W!=0||w!=0)&&(c=!0,St[u].pid=setInterval((function(){s&&this.layer===0&&Q.active._onTouchMove(Ye);var k=St[this.layer].vy?St[this.layer].vy*l:0,G=St[this.layer].vx?St[this.layer].vx*l:0;typeof d=="function"&&d.call(Q.dragged.parentNode[Tt],G,k,r,Ye,St[this.layer].el)!=="continue"||An(St[this.layer].el,G,k)}).bind({layer:u}),24))),u++}while(n.bubbleScroll&&v!==i&&(v=Jt(v,!1)));dn=c}},30),Un=function(n){var e=n.originalEvent,s=n.putSortable,o=n.dragEl,f=n.activeSortable,t=n.dispatchSortableEvent,l=n.hideGhostForTarget,i=n.unhideGhostForTarget;if(e){var c=s||f;l();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(d.clientX,d.clientY);i(),c&&!c.el.contains(u)&&(t("spill"),this.onSpill({dragEl:o,putSortable:s}))}};function mn(){}mn.prototype={startIndex:null,dragStart:function(n){var e=n.oldDraggableIndex;this.startIndex=e},onSpill:function(n){var e=n.dragEl,s=n.putSortable;this.sortable.captureAnimationState(),s&&s.captureAnimationState();var o=le(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),s&&s.animateAll()},drop:Un},Vt(mn,{pluginName:"revertOnSpill"});function gn(){}gn.prototype={onSpill:function(n){var e=n.dragEl,s=n.putSortable,o=s||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:Un},Vt(gn,{pluginName:"removeOnSpill"});var jt;function Fo(){function r(){this.defaults={swapClass:"sortable-swap-highlight"}}return r.prototype={dragStart:function(e){var s=e.dragEl;jt=s},dragOverValid:function(e){var s=e.completed,o=e.target,f=e.onMove,t=e.activeSortable,l=e.changed,i=e.cancel;if(t.options.swap){var c=this.sortable.el,d=this.options;if(o&&o!==c){var u=jt;f(o)!==!1?(pt(o,d.swapClass,!0),jt=o):jt=null,u&&u!==jt&&pt(u,d.swapClass,!1)}l(),s(!0),i()}},drop:function(e){var s=e.activeSortable,o=e.putSortable,f=e.dragEl,t=o||this.sortable,l=this.options;jt&&pt(jt,l.swapClass,!1),jt&&(l.swap||o&&o.options.swap)&&f!==jt&&(t.captureAnimationState(),t!==s&&s.captureAnimationState(),Vo(f,jt),t.animateAll(),t!==s&&s.animateAll())},nulling:function(){jt=null}},Vt(r,{pluginName:"swap",eventProperties:function(){return{swapItem:jt}}})}function Vo(r,n){var e=r.parentNode,s=n.parentNode,o,f;!e||!s||e.isEqualNode(n)||s.isEqualNode(r)||(o=mt(r),f=mt(n),e.isEqualNode(s)&&o<f&&f++,e.insertBefore(n,e.children[o]),s.insertBefore(r,s.children[f]))}var _=[],Rt=[],Te,Gt,Ie=!1,Pt=!1,ue=!1,ct,Ne,ke;function jo(){function r(n){for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this));n.options.supportPointer?ot(document,"pointerup",this._deselectMultiDrag):(ot(document,"mouseup",this._deselectMultiDrag),ot(document,"touchend",this._deselectMultiDrag)),ot(document,"keydown",this._checkKeyDown),ot(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(o,f){var t="";_.length&&Gt===n?_.forEach(function(l,i){t+=(i?", ":"")+l.textContent}):t=f.textContent,o.setData("Text",t)}}}return r.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var s=e.dragEl;ct=s},delayEnded:function(){this.isMultiDrag=~_.indexOf(ct)},setupClone:function(e){var s=e.sortable,o=e.cancel;if(this.isMultiDrag){for(var f=0;f<_.length;f++)Rt.push(en(_[f])),Rt[f].sortableIndex=_[f].sortableIndex,Rt[f].draggable=!1,Rt[f].style["will-change"]="",pt(Rt[f],this.options.selectedClass,!1),_[f]===ct&&pt(Rt[f],this.options.chosenClass,!1);s._hideClone(),o()}},clone:function(e){var s=e.sortable,o=e.rootEl,f=e.dispatchSortableEvent,t=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||_.length&&Gt===s&&(zn(!0,o),f("clone"),t()))},showClone:function(e){var s=e.cloneNowShown,o=e.rootEl,f=e.cancel;this.isMultiDrag&&(zn(!1,o),Rt.forEach(function(t){H(t,"display","")}),s(),ke=!1,f())},hideClone:function(e){var s=this;e.sortable;var o=e.cloneNowHidden,f=e.cancel;this.isMultiDrag&&(Rt.forEach(function(t){H(t,"display","none"),s.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),o(),ke=!0,f())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&Gt&&Gt.multiDrag._deselectMultiDrag(),_.forEach(function(s){s.sortableIndex=mt(s)}),_=_.sort(function(s,o){return s.sortableIndex-o.sortableIndex}),ue=!0},dragStarted:function(e){var s=this,o=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){_.forEach(function(t){t!==ct&&H(t,"position","absolute")});var f=ut(ct,!1,!0,!0);_.forEach(function(t){t!==ct&&wn(t,f)}),Pt=!0,Ie=!0}o.animateAll(function(){Pt=!1,Ie=!1,s.options.animation&&_.forEach(function(t){nn(t)}),s.options.sort&&Ze()})}},dragOver:function(e){var s=e.target,o=e.completed,f=e.cancel;Pt&&~_.indexOf(s)&&(o(!1),f())},revert:function(e){var s=e.fromSortable,o=e.rootEl,f=e.sortable,t=e.dragRect;_.length>1&&(_.forEach(function(l){f.addAnimationState({target:l,rect:Pt?ut(l):t}),nn(l),l.fromRect=t,s.removeAnimationState(l)}),Pt=!1,Mo(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(e){var s=e.sortable,o=e.isOwner,f=e.insertion,t=e.activeSortable,l=e.parentEl,i=e.putSortable,c=this.options;if(f){if(o&&t._hideClone(),Ie=!1,c.animation&&_.length>1&&(Pt||!o&&!t.options.sort&&!i)){var d=ut(ct,!1,!0,!0);_.forEach(function(v){v!==ct&&(wn(v,d),l.appendChild(v))}),Pt=!0}if(!o)if(Pt||Ze(),_.length>1){var u=ke;t._showClone(s),t.options.animation&&!ke&&u&&Rt.forEach(function(v){t.addAnimationState({target:v,rect:Ne}),v.fromRect=Ne,v.thisAnimationDuration=null})}else t._showClone(s)}},dragOverAnimationCapture:function(e){var s=e.dragRect,o=e.isOwner,f=e.activeSortable;if(_.forEach(function(l){l.thisAnimationDuration=null}),f.options.animation&&!o&&f.multiDrag.isMultiDrag){Ne=Vt({},s);var t=_t(ct,!0);Ne.top-=t.f,Ne.left-=t.e}},dragOverAnimationComplete:function(){Pt&&(Pt=!1,Ze())},drop:function(e){var s=e.originalEvent,o=e.rootEl,f=e.parentEl,t=e.sortable,l=e.dispatchSortableEvent,i=e.oldIndex,c=e.putSortable,d=c||this.sortable;if(s){var u=this.options,v=f.children;if(!ue)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),pt(ct,u.selectedClass,!~_.indexOf(ct)),~_.indexOf(ct))_.splice(_.indexOf(ct),1),Te=null,ge({sortable:t,rootEl:o,name:"deselect",targetEl:ct});else{if(_.push(ct),ge({sortable:t,rootEl:o,name:"select",targetEl:ct}),s.shiftKey&&Te&&t.el.contains(Te)){var p=mt(Te),h=mt(ct);if(~p&&~h&&p!==h){var m,g;for(h>p?(g=p,m=h):(g=h,m=p+1);g<m;g++)~_.indexOf(v[g])||(pt(v[g],u.selectedClass,!0),_.push(v[g]),ge({sortable:t,rootEl:o,name:"select",targetEl:v[g]}))}}else Te=ct;Gt=d}if(ue&&this.isMultiDrag){if(Pt=!1,(f[Tt].options.sort||f!==o)&&_.length>1){var y=ut(ct),b=mt(ct,":not(."+this.options.selectedClass+")");if(!Ie&&u.animation&&(ct.thisAnimationDuration=null),d.captureAnimationState(),!Ie&&(u.animation&&(ct.fromRect=y,_.forEach(function(N){if(N.thisAnimationDuration=null,N!==ct){var D=Pt?ut(N):y;N.fromRect=D,d.addAnimationState({target:N,rect:D})}})),Ze(),_.forEach(function(N){v[b]?f.insertBefore(N,v[b]):f.appendChild(N),b++}),i===mt(ct))){var O=!1;_.forEach(function(N){if(N.sortableIndex!==mt(N)){O=!0;return}}),O&&l("update")}_.forEach(function(N){nn(N)}),d.animateAll()}Gt=d}(o===f||c&&c.lastPutMode!=="clone")&&Rt.forEach(function(N){N.parentNode&&N.parentNode.removeChild(N)})}},nullingGlobal:function(){this.isMultiDrag=ue=!1,Rt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),nt(document,"pointerup",this._deselectMultiDrag),nt(document,"mouseup",this._deselectMultiDrag),nt(document,"touchend",this._deselectMultiDrag),nt(document,"keydown",this._checkKeyDown),nt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(typeof ue<"u"&&ue)&&Gt===this.sortable&&!(e&&Bt(e.target,this.options.draggable,this.sortable.el,!1))&&!(e&&e.button!==0))for(;_.length;){var s=_[0];pt(s,this.options.selectedClass,!1),_.shift(),ge({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Vt(r,{pluginName:"multiDrag",utils:{select:function(e){var s=e.parentNode[Tt];!s||!s.options.multiDrag||~_.indexOf(e)||(Gt&&Gt!==s&&(Gt.multiDrag._deselectMultiDrag(),Gt=s),pt(e,s.options.selectedClass,!0),_.push(e))},deselect:function(e){var s=e.parentNode[Tt],o=_.indexOf(e);!s||!s.options.multiDrag||!~o||(pt(e,s.options.selectedClass,!1),_.splice(o,1))}},eventProperties:function(){var e=this,s=[],o=[];return _.forEach(function(f){s.push({multiDragElement:f,index:f.sortableIndex});var t;Pt&&f!==ct?t=-1:Pt?t=mt(f,":not(."+e.options.selectedClass+")"):t=mt(f),o.push({multiDragElement:f,index:t})}),{items:ro(_),clones:[].concat(Rt),oldIndicies:s,newIndicies:o}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),e==="ctrl"?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Mo(r,n){_.forEach(function(e,s){var o=n.children[e.sortableIndex+(r?Number(s):0)];o?n.insertBefore(e,o):n.appendChild(e)})}function zn(r,n){Rt.forEach(function(e,s){var o=n.children[e.sortableIndex+(r?Number(s):0)];o?n.insertBefore(e,o):n.appendChild(e)})}function Ze(){_.forEach(function(r){r!==ct&&r.parentNode&&r.parentNode.removeChild(r)})}Q.mount(new Ro),Q.mount(gn,mn);const Bo=to(Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:jo,Sortable:Q,Swap:Fo,default:Q},Symbol.toStringTag,{value:"Module"})));(function(r,n){(function(s,o){r.exports=o(a,Bo)})(typeof self<"u"?self:$n,function(e,s){return function(o){var f={};function t(l){if(f[l])return f[l].exports;var i=f[l]={i:l,l:!1,exports:{}};return o[l].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=o,t.c=f,t.d=function(l,i,c){t.o(l,i)||Object.defineProperty(l,i,{enumerable:!0,get:c})},t.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},t.t=function(l,i){if(i&1&&(l=t(l)),i&8||i&4&&typeof l=="object"&&l&&l.__esModule)return l;var c=Object.create(null);if(t.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:l}),i&2&&typeof l!="string")for(var d in l)t.d(c,d,(function(u){return l[u]}).bind(null,d));return c},t.n=function(l){var i=l&&l.__esModule?function(){return l.default}:function(){return l};return t.d(i,"a",i),i},t.o=function(l,i){return Object.prototype.hasOwnProperty.call(l,i)},t.p="",t(t.s="fb15")}({"00ee":function(o,f,t){var l=t("b622"),i=l("toStringTag"),c={};c[i]="z",o.exports=String(c)==="[object z]"},"0366":function(o,f,t){var l=t("1c0b");o.exports=function(i,c,d){if(l(i),c===void 0)return i;switch(d){case 0:return function(){return i.call(c)};case 1:return function(u){return i.call(c,u)};case 2:return function(u,v){return i.call(c,u,v)};case 3:return function(u,v,p){return i.call(c,u,v,p)}}return function(){return i.apply(c,arguments)}}},"057f":function(o,f,t){var l=t("fc6a"),i=t("241c").f,c={}.toString,d=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(v){try{return i(v)}catch{return d.slice()}};o.exports.f=function(p){return d&&c.call(p)=="[object Window]"?u(p):i(l(p))}},"06cf":function(o,f,t){var l=t("83ab"),i=t("d1e7"),c=t("5c6c"),d=t("fc6a"),u=t("c04e"),v=t("5135"),p=t("0cfb"),h=Object.getOwnPropertyDescriptor;f.f=l?h:function(g,y){if(g=d(g),y=u(y,!0),p)try{return h(g,y)}catch{}if(v(g,y))return c(!i.f.call(g,y),g[y])}},"0cfb":function(o,f,t){var l=t("83ab"),i=t("d039"),c=t("cc12");o.exports=!l&&!i(function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(o,f,t){var l=t("23e7"),i=t("d58f").left,c=t("a640"),d=t("ae40"),u=c("reduce"),v=d("reduce",{1:0});l({target:"Array",proto:!0,forced:!u||!v},{reduce:function(h){return i(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(o,f,t){var l=t("c6b6"),i=t("9263");o.exports=function(c,d){var u=c.exec;if(typeof u=="function"){var v=u.call(c,d);if(typeof v!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return v}if(l(c)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return i.call(c,d)}},"159b":function(o,f,t){var l=t("da84"),i=t("fdbc"),c=t("17c2"),d=t("9112");for(var u in i){var v=l[u],p=v&&v.prototype;if(p&&p.forEach!==c)try{d(p,"forEach",c)}catch{p.forEach=c}}},"17c2":function(o,f,t){var l=t("b727").forEach,i=t("a640"),c=t("ae40"),d=i("forEach"),u=c("forEach");o.exports=!d||!u?function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(o,f,t){var l=t("d066");o.exports=l("document","documentElement")},"1c0b":function(o,f){o.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(o,f,t){var l=t("b622"),i=l("iterator"),c=!1;try{var d=0,u={next:function(){return{done:!!d++}},return:function(){c=!0}};u[i]=function(){return this},Array.from(u,function(){throw 2})}catch{}o.exports=function(v,p){if(!p&&!c)return!1;var h=!1;try{var m={};m[i]=function(){return{next:function(){return{done:h=!0}}}},v(m)}catch{}return h}},"1d80":function(o,f){o.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(o,f,t){var l=t("d039"),i=t("b622"),c=t("2d00"),d=i("species");o.exports=function(u){return c>=51||!l(function(){var v=[],p=v.constructor={};return p[d]=function(){return{foo:1}},v[u](Boolean).foo!==1})}},"23cb":function(o,f,t){var l=t("a691"),i=Math.max,c=Math.min;o.exports=function(d,u){var v=l(d);return v<0?i(v+u,0):c(v,u)}},"23e7":function(o,f,t){var l=t("da84"),i=t("06cf").f,c=t("9112"),d=t("6eeb"),u=t("ce4e"),v=t("e893"),p=t("94ca");o.exports=function(h,m){var g=h.target,y=h.global,b=h.stat,O,N,D,P,K,U;if(y?N=l:b?N=l[g]||u(g,{}):N=(l[g]||{}).prototype,N)for(D in m){if(K=m[D],h.noTargetGet?(U=i(N,D),P=U&&U.value):P=N[D],O=p(y?D:g+(b?".":"#")+D,h.forced),!O&&P!==void 0){if(typeof K==typeof P)continue;v(K,P)}(h.sham||P&&P.sham)&&c(K,"sham",!0),d(N,D,K,h)}}},"241c":function(o,f,t){var l=t("ca84"),i=t("7839"),c=i.concat("length","prototype");f.f=Object.getOwnPropertyNames||function(u){return l(u,c)}},"25f0":function(o,f,t){var l=t("6eeb"),i=t("825a"),c=t("d039"),d=t("ad6d"),u="toString",v=RegExp.prototype,p=v[u],h=c(function(){return p.call({source:"a",flags:"b"})!="/a/b"}),m=p.name!=u;(h||m)&&l(RegExp.prototype,u,function(){var y=i(this),b=String(y.source),O=y.flags,N=String(O===void 0&&y instanceof RegExp&&!("flags"in v)?d.call(y):O);return"/"+b+"/"+N},{unsafe:!0})},"2ca0":function(o,f,t){var l=t("23e7"),i=t("06cf").f,c=t("50c4"),d=t("5a34"),u=t("1d80"),v=t("ab13"),p=t("c430"),h="".startsWith,m=Math.min,g=v("startsWith"),y=!p&&!g&&!!function(){var b=i(String.prototype,"startsWith");return b&&!b.writable}();l({target:"String",proto:!0,forced:!y&&!g},{startsWith:function(O){var N=String(u(this));d(O);var D=c(m(arguments.length>1?arguments[1]:void 0,N.length)),P=String(O);return h?h.call(N,P,D):N.slice(D,D+P.length)===P}})},"2d00":function(o,f,t){var l=t("da84"),i=t("342f"),c=l.process,d=c&&c.versions,u=d&&d.v8,v,p;u?(v=u.split("."),p=v[0]+v[1]):i&&(v=i.match(/Edge\/(\d+)/),(!v||v[1]>=74)&&(v=i.match(/Chrome\/(\d+)/),v&&(p=v[1]))),o.exports=p&&+p},"342f":function(o,f,t){var l=t("d066");o.exports=l("navigator","userAgent")||""},"35a1":function(o,f,t){var l=t("f5df"),i=t("3f8c"),c=t("b622"),d=c("iterator");o.exports=function(u){if(u!=null)return u[d]||u["@@iterator"]||i[l(u)]}},"37e8":function(o,f,t){var l=t("83ab"),i=t("9bf2"),c=t("825a"),d=t("df75");o.exports=l?Object.defineProperties:function(v,p){c(v);for(var h=d(p),m=h.length,g=0,y;m>g;)i.f(v,y=h[g++],p[y]);return v}},"3bbe":function(o,f,t){var l=t("861d");o.exports=function(i){if(!l(i)&&i!==null)throw TypeError("Can't set "+String(i)+" as a prototype");return i}},"3ca3":function(o,f,t){var l=t("6547").charAt,i=t("69f3"),c=t("7dd0"),d="String Iterator",u=i.set,v=i.getterFor(d);c(String,"String",function(p){u(this,{type:d,string:String(p),index:0})},function(){var h=v(this),m=h.string,g=h.index,y;return g>=m.length?{value:void 0,done:!0}:(y=l(m,g),h.index+=y.length,{value:y,done:!1})})},"3f8c":function(o,f){o.exports={}},4160:function(o,f,t){var l=t("23e7"),i=t("17c2");l({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(o,f,t){var l=t("da84");o.exports=l},"44ad":function(o,f,t){var l=t("d039"),i=t("c6b6"),c="".split;o.exports=l(function(){return!Object("z").propertyIsEnumerable(0)})?function(d){return i(d)=="String"?c.call(d,""):Object(d)}:Object},"44d2":function(o,f,t){var l=t("b622"),i=t("7c73"),c=t("9bf2"),d=l("unscopables"),u=Array.prototype;u[d]==null&&c.f(u,d,{configurable:!0,value:i(null)}),o.exports=function(v){u[d][v]=!0}},"44e7":function(o,f,t){var l=t("861d"),i=t("c6b6"),c=t("b622"),d=c("match");o.exports=function(u){var v;return l(u)&&((v=u[d])!==void 0?!!v:i(u)=="RegExp")}},4930:function(o,f,t){var l=t("d039");o.exports=!!Object.getOwnPropertySymbols&&!l(function(){return!String(Symbol())})},"4d64":function(o,f,t){var l=t("fc6a"),i=t("50c4"),c=t("23cb"),d=function(u){return function(v,p,h){var m=l(v),g=i(m.length),y=c(h,g),b;if(u&&p!=p){for(;g>y;)if(b=m[y++],b!=b)return!0}else for(;g>y;y++)if((u||y in m)&&m[y]===p)return u||y||0;return!u&&-1}};o.exports={includes:d(!0),indexOf:d(!1)}},"4de4":function(o,f,t){var l=t("23e7"),i=t("b727").filter,c=t("1dde"),d=t("ae40"),u=c("filter"),v=d("filter");l({target:"Array",proto:!0,forced:!u||!v},{filter:function(h){return i(this,h,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(o,f,t){var l=t("0366"),i=t("7b0b"),c=t("9bdd"),d=t("e95a"),u=t("50c4"),v=t("8418"),p=t("35a1");o.exports=function(m){var g=i(m),y=typeof this=="function"?this:Array,b=arguments.length,O=b>1?arguments[1]:void 0,N=O!==void 0,D=p(g),P=0,K,U,S,T,A,W;if(N&&(O=l(O,b>2?arguments[2]:void 0,2)),D!=null&&!(y==Array&&d(D)))for(T=D.call(g),A=T.next,U=new y;!(S=A.call(T)).done;P++)W=N?c(T,O,[S.value,P],!0):S.value,v(U,P,W);else for(K=u(g.length),U=new y(K);K>P;P++)W=N?O(g[P],P):g[P],v(U,P,W);return U.length=P,U}},"4fad":function(o,f,t){var l=t("23e7"),i=t("6f53").entries;l({target:"Object",stat:!0},{entries:function(d){return i(d)}})},"50c4":function(o,f,t){var l=t("a691"),i=Math.min;o.exports=function(c){return c>0?i(l(c),9007199254740991):0}},5135:function(o,f){var t={}.hasOwnProperty;o.exports=function(l,i){return t.call(l,i)}},5319:function(o,f,t){var l=t("d784"),i=t("825a"),c=t("7b0b"),d=t("50c4"),u=t("a691"),v=t("1d80"),p=t("8aa5"),h=t("14c3"),m=Math.max,g=Math.min,y=Math.floor,b=/\$([$&'`]|\d\d?|<[^>]*>)/g,O=/\$([$&'`]|\d\d?)/g,N=function(D){return D===void 0?D:String(D)};l("replace",2,function(D,P,K,U){var S=U.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,T=U.REPLACE_KEEPS_$0,A=S?"$":"$0";return[function(L,k){var G=v(this),Y=L==null?void 0:L[D];return Y!==void 0?Y.call(L,G,k):P.call(String(G),L,k)},function(w,L){if(!S&&T||typeof L=="string"&&L.indexOf(A)===-1){var k=K(P,w,this,L);if(k.done)return k.value}var G=i(w),Y=String(this),I=typeof L=="function";I||(L=String(L));var V=G.global;if(V){var R=G.unicode;G.lastIndex=0}for(var j=[];;){var J=h(G,Y);if(J===null||(j.push(J),!V))break;var st=String(J[0]);st===""&&(G.lastIndex=p(Y,d(G.lastIndex),R))}for(var lt="",ft=0,vt=0;vt<j.length;vt++){J=j[vt];for(var ht=String(J[0]),Ft=m(g(u(J.index),Y.length),0),Ct=[],Qt=1;Qt<J.length;Qt++)Ct.push(N(J[Qt]));var oe=J.groups;if(I){var qt=[ht].concat(Ct,Ft,Y);oe!==void 0&&qt.push(oe);var Et=String(L.apply(void 0,qt))}else Et=W(ht,Y,Ft,Ct,oe,L);Ft>=ft&&(lt+=Y.slice(ft,Ft)+Et,ft=Ft+ht.length)}return lt+Y.slice(ft)}];function W(w,L,k,G,Y,I){var V=k+w.length,R=G.length,j=O;return Y!==void 0&&(Y=c(Y),j=b),P.call(I,j,function(J,st){var lt;switch(st.charAt(0)){case"$":return"$";case"&":return w;case"`":return L.slice(0,k);case"'":return L.slice(V);case"<":lt=Y[st.slice(1,-1)];break;default:var ft=+st;if(ft===0)return J;if(ft>R){var vt=y(ft/10);return vt===0?J:vt<=R?G[vt-1]===void 0?st.charAt(1):G[vt-1]+st.charAt(1):J}lt=G[ft-1]}return lt===void 0?"":lt})}})},5692:function(o,f,t){var l=t("c430"),i=t("c6cd");(o.exports=function(c,d){return i[c]||(i[c]=d!==void 0?d:{})})("versions",[]).push({version:"3.6.5",mode:l?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(o,f,t){var l=t("d066"),i=t("241c"),c=t("7418"),d=t("825a");o.exports=l("Reflect","ownKeys")||function(v){var p=i.f(d(v)),h=c.f;return h?p.concat(h(v)):p}},"5a34":function(o,f,t){var l=t("44e7");o.exports=function(i){if(l(i))throw TypeError("The method doesn't accept regular expressions");return i}},"5c6c":function(o,f){o.exports=function(t,l){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:l}}},"5db7":function(o,f,t){var l=t("23e7"),i=t("a2bf"),c=t("7b0b"),d=t("50c4"),u=t("1c0b"),v=t("65f0");l({target:"Array",proto:!0},{flatMap:function(h){var m=c(this),g=d(m.length),y;return u(h),y=v(m,0),y.length=i(y,m,m,g,0,1,h,arguments.length>1?arguments[1]:void 0),y}})},6547:function(o,f,t){var l=t("a691"),i=t("1d80"),c=function(d){return function(u,v){var p=String(i(u)),h=l(v),m=p.length,g,y;return h<0||h>=m?d?"":void 0:(g=p.charCodeAt(h),g<55296||g>56319||h+1===m||(y=p.charCodeAt(h+1))<56320||y>57343?d?p.charAt(h):g:d?p.slice(h,h+2):(g-55296<<10)+(y-56320)+65536)}};o.exports={codeAt:c(!1),charAt:c(!0)}},"65f0":function(o,f,t){var l=t("861d"),i=t("e8b5"),c=t("b622"),d=c("species");o.exports=function(u,v){var p;return i(u)&&(p=u.constructor,typeof p=="function"&&(p===Array||i(p.prototype))?p=void 0:l(p)&&(p=p[d],p===null&&(p=void 0))),new(p===void 0?Array:p)(v===0?0:v)}},"69f3":function(o,f,t){var l=t("7f9a"),i=t("da84"),c=t("861d"),d=t("9112"),u=t("5135"),v=t("f772"),p=t("d012"),h=i.WeakMap,m,g,y,b=function(S){return y(S)?g(S):m(S,{})},O=function(S){return function(T){var A;if(!c(T)||(A=g(T)).type!==S)throw TypeError("Incompatible receiver, "+S+" required");return A}};if(l){var N=new h,D=N.get,P=N.has,K=N.set;m=function(S,T){return K.call(N,S,T),T},g=function(S){return D.call(N,S)||{}},y=function(S){return P.call(N,S)}}else{var U=v("state");p[U]=!0,m=function(S,T){return d(S,U,T),T},g=function(S){return u(S,U)?S[U]:{}},y=function(S){return u(S,U)}}o.exports={set:m,get:g,has:y,enforce:b,getterFor:O}},"6eeb":function(o,f,t){var l=t("da84"),i=t("9112"),c=t("5135"),d=t("ce4e"),u=t("8925"),v=t("69f3"),p=v.get,h=v.enforce,m=String(String).split("String");(o.exports=function(g,y,b,O){var N=O?!!O.unsafe:!1,D=O?!!O.enumerable:!1,P=O?!!O.noTargetGet:!1;if(typeof b=="function"&&(typeof y=="string"&&!c(b,"name")&&i(b,"name",y),h(b).source=m.join(typeof y=="string"?y:"")),g===l){D?g[y]=b:d(y,b);return}else N?!P&&g[y]&&(D=!0):delete g[y];D?g[y]=b:i(g,y,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&p(this).source||u(this)})},"6f53":function(o,f,t){var l=t("83ab"),i=t("df75"),c=t("fc6a"),d=t("d1e7").f,u=function(v){return function(p){for(var h=c(p),m=i(h),g=m.length,y=0,b=[],O;g>y;)O=m[y++],(!l||d.call(h,O))&&b.push(v?[O,h[O]]:h[O]);return b}};o.exports={entries:u(!0),values:u(!1)}},"73d9":function(o,f,t){var l=t("44d2");l("flatMap")},7418:function(o,f){f.f=Object.getOwnPropertySymbols},"746f":function(o,f,t){var l=t("428f"),i=t("5135"),c=t("e538"),d=t("9bf2").f;o.exports=function(u){var v=l.Symbol||(l.Symbol={});i(v,u)||d(v,u,{value:c.f(u)})}},7839:function(o,f){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(o,f,t){var l=t("1d80");o.exports=function(i){return Object(l(i))}},"7c73":function(o,f,t){var l=t("825a"),i=t("37e8"),c=t("7839"),d=t("d012"),u=t("1be4"),v=t("cc12"),p=t("f772"),h=">",m="<",g="prototype",y="script",b=p("IE_PROTO"),O=function(){},N=function(S){return m+y+h+S+m+"/"+y+h},D=function(S){S.write(N("")),S.close();var T=S.parentWindow.Object;return S=null,T},P=function(){var S=v("iframe"),T="java"+y+":",A;return S.style.display="none",u.appendChild(S),S.src=String(T),A=S.contentWindow.document,A.open(),A.write(N("document.F=Object")),A.close(),A.F},K,U=function(){try{K=document.domain&&new ActiveXObject("htmlfile")}catch{}U=K?D(K):P();for(var S=c.length;S--;)delete U[g][c[S]];return U()};d[b]=!0,o.exports=Object.create||function(T,A){var W;return T!==null?(O[g]=l(T),W=new O,O[g]=null,W[b]=T):W=U(),A===void 0?W:i(W,A)}},"7dd0":function(o,f,t){var l=t("23e7"),i=t("9ed3"),c=t("e163"),d=t("d2bb"),u=t("d44e"),v=t("9112"),p=t("6eeb"),h=t("b622"),m=t("c430"),g=t("3f8c"),y=t("ae93"),b=y.IteratorPrototype,O=y.BUGGY_SAFARI_ITERATORS,N=h("iterator"),D="keys",P="values",K="entries",U=function(){return this};o.exports=function(S,T,A,W,w,L,k){i(A,T,W);var G=function(vt){if(vt===w&&j)return j;if(!O&&vt in V)return V[vt];switch(vt){case D:return function(){return new A(this,vt)};case P:return function(){return new A(this,vt)};case K:return function(){return new A(this,vt)}}return function(){return new A(this)}},Y=T+" Iterator",I=!1,V=S.prototype,R=V[N]||V["@@iterator"]||w&&V[w],j=!O&&R||G(w),J=T=="Array"&&V.entries||R,st,lt,ft;if(J&&(st=c(J.call(new S)),b!==Object.prototype&&st.next&&(!m&&c(st)!==b&&(d?d(st,b):typeof st[N]!="function"&&v(st,N,U)),u(st,Y,!0,!0),m&&(g[Y]=U))),w==P&&R&&R.name!==P&&(I=!0,j=function(){return R.call(this)}),(!m||k)&&V[N]!==j&&v(V,N,j),g[T]=j,w)if(lt={values:G(P),keys:L?j:G(D),entries:G(K)},k)for(ft in lt)(O||I||!(ft in V))&&p(V,ft,lt[ft]);else l({target:T,proto:!0,forced:O||I},lt);return lt}},"7f9a":function(o,f,t){var l=t("da84"),i=t("8925"),c=l.WeakMap;o.exports=typeof c=="function"&&/native code/.test(i(c))},"825a":function(o,f,t){var l=t("861d");o.exports=function(i){if(!l(i))throw TypeError(String(i)+" is not an object");return i}},"83ab":function(o,f,t){var l=t("d039");o.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(o,f,t){var l=t("c04e"),i=t("9bf2"),c=t("5c6c");o.exports=function(d,u,v){var p=l(u);p in d?i.f(d,p,c(0,v)):d[p]=v}},"861d":function(o,f){o.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(o,f,t){var l,i,c;(function(d,u){i=[],l=u,c=typeof l=="function"?l.apply(f,i):l,c!==void 0&&(o.exports=c)})(typeof self<"u"?self:this,function(){function d(){var u=Object.getOwnPropertyDescriptor(document,"currentScript");if(!u&&"currentScript"in document&&document.currentScript||u&&u.get!==d&&document.currentScript)return document.currentScript;try{throw new Error}catch(K){var v=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,p=/@([^@]*):(\d+):(\d+)\s*$/ig,h=v.exec(K.stack)||p.exec(K.stack),m=h&&h[1]||!1,g=h&&h[2]||!1,y=document.location.href.replace(document.location.hash,""),b,O,N,D=document.getElementsByTagName("script");m===y&&(b=document.documentElement.outerHTML,O=new RegExp("(?:[^\\n]+?\\n){0,"+(g-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),N=b.replace(O,"$1").trim());for(var P=0;P<D.length;P++)if(D[P].readyState==="interactive"||D[P].src===m||m===y&&D[P].innerHTML&&D[P].innerHTML.trim()===N)return D[P];return null}}return d})},8925:function(o,f,t){var l=t("c6cd"),i=Function.toString;typeof l.inspectSource!="function"&&(l.inspectSource=function(c){return i.call(c)}),o.exports=l.inspectSource},"8aa5":function(o,f,t){var l=t("6547").charAt;o.exports=function(i,c,d){return c+(d?l(i,c).length:1)}},"8bbf":function(o,f){o.exports=e},"90e3":function(o,f){var t=0,l=Math.random();o.exports=function(i){return"Symbol("+String(i===void 0?"":i)+")_"+(++t+l).toString(36)}},9112:function(o,f,t){var l=t("83ab"),i=t("9bf2"),c=t("5c6c");o.exports=l?function(d,u,v){return i.f(d,u,c(1,v))}:function(d,u,v){return d[u]=v,d}},9263:function(o,f,t){var l=t("ad6d"),i=t("9f7f"),c=RegExp.prototype.exec,d=String.prototype.replace,u=c,v=function(){var g=/a/,y=/b*/g;return c.call(g,"a"),c.call(y,"a"),g.lastIndex!==0||y.lastIndex!==0}(),p=i.UNSUPPORTED_Y||i.BROKEN_CARET,h=/()??/.exec("")[1]!==void 0,m=v||h||p;m&&(u=function(y){var b=this,O,N,D,P,K=p&&b.sticky,U=l.call(b),S=b.source,T=0,A=y;return K&&(U=U.replace("y",""),U.indexOf("g")===-1&&(U+="g"),A=String(y).slice(b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&y[b.lastIndex-1]!==`
8
+ `)&&(S="(?: "+S+")",A=" "+A,T++),N=new RegExp("^(?:"+S+")",U)),h&&(N=new RegExp("^"+S+"$(?!\\s)",U)),v&&(O=b.lastIndex),D=c.call(K?N:b,A),K?D?(D.input=D.input.slice(T),D[0]=D[0].slice(T),D.index=b.lastIndex,b.lastIndex+=D[0].length):b.lastIndex=0:v&&D&&(b.lastIndex=b.global?D.index+D[0].length:O),h&&D&&D.length>1&&d.call(D[0],N,function(){for(P=1;P<arguments.length-2;P++)arguments[P]===void 0&&(D[P]=void 0)}),D}),o.exports=u},"94ca":function(o,f,t){var l=t("d039"),i=/#|\.prototype\./,c=function(h,m){var g=u[d(h)];return g==p?!0:g==v?!1:typeof m=="function"?l(m):!!m},d=c.normalize=function(h){return String(h).replace(i,".").toLowerCase()},u=c.data={},v=c.NATIVE="N",p=c.POLYFILL="P";o.exports=c},"99af":function(o,f,t){var l=t("23e7"),i=t("d039"),c=t("e8b5"),d=t("861d"),u=t("7b0b"),v=t("50c4"),p=t("8418"),h=t("65f0"),m=t("1dde"),g=t("b622"),y=t("2d00"),b=g("isConcatSpreadable"),O=9007199254740991,N="Maximum allowed index exceeded",D=y>=51||!i(function(){var S=[];return S[b]=!1,S.concat()[0]!==S}),P=m("concat"),K=function(S){if(!d(S))return!1;var T=S[b];return T!==void 0?!!T:c(S)},U=!D||!P;l({target:"Array",proto:!0,forced:U},{concat:function(T){var A=u(this),W=h(A,0),w=0,L,k,G,Y,I;for(L=-1,G=arguments.length;L<G;L++)if(I=L===-1?A:arguments[L],K(I)){if(Y=v(I.length),w+Y>O)throw TypeError(N);for(k=0;k<Y;k++,w++)k in I&&p(W,w,I[k])}else{if(w>=O)throw TypeError(N);p(W,w++,I)}return W.length=w,W}})},"9bdd":function(o,f,t){var l=t("825a");o.exports=function(i,c,d,u){try{return u?c(l(d)[0],d[1]):c(d)}catch(p){var v=i.return;throw v!==void 0&&l(v.call(i)),p}}},"9bf2":function(o,f,t){var l=t("83ab"),i=t("0cfb"),c=t("825a"),d=t("c04e"),u=Object.defineProperty;f.f=l?u:function(p,h,m){if(c(p),h=d(h,!0),c(m),i)try{return u(p,h,m)}catch{}if("get"in m||"set"in m)throw TypeError("Accessors not supported");return"value"in m&&(p[h]=m.value),p}},"9ed3":function(o,f,t){var l=t("ae93").IteratorPrototype,i=t("7c73"),c=t("5c6c"),d=t("d44e"),u=t("3f8c"),v=function(){return this};o.exports=function(p,h,m){var g=h+" Iterator";return p.prototype=i(l,{next:c(1,m)}),d(p,g,!1,!0),u[g]=v,p}},"9f7f":function(o,f,t){var l=t("d039");function i(c,d){return RegExp(c,d)}f.UNSUPPORTED_Y=l(function(){var c=i("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),f.BROKEN_CARET=l(function(){var c=i("^r","gy");return c.lastIndex=2,c.exec("str")!=null})},a2bf:function(o,f,t){var l=t("e8b5"),i=t("50c4"),c=t("0366"),d=function(u,v,p,h,m,g,y,b){for(var O=m,N=0,D=y?c(y,b,3):!1,P;N<h;){if(N in p){if(P=D?D(p[N],N,v):p[N],g>0&&l(P))O=d(u,v,P,i(P.length),O,g-1)-1;else{if(O>=9007199254740991)throw TypeError("Exceed the acceptable array length");u[O]=P}O++}N++}return O};o.exports=d},a352:function(o,f){o.exports=s},a434:function(o,f,t){var l=t("23e7"),i=t("23cb"),c=t("a691"),d=t("50c4"),u=t("7b0b"),v=t("65f0"),p=t("8418"),h=t("1dde"),m=t("ae40"),g=h("splice"),y=m("splice",{ACCESSORS:!0,0:0,1:2}),b=Math.max,O=Math.min,N=9007199254740991,D="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!g||!y},{splice:function(K,U){var S=u(this),T=d(S.length),A=i(K,T),W=arguments.length,w,L,k,G,Y,I;if(W===0?w=L=0:W===1?(w=0,L=T-A):(w=W-2,L=O(b(c(U),0),T-A)),T+w-L>N)throw TypeError(D);for(k=v(S,L),G=0;G<L;G++)Y=A+G,Y in S&&p(k,G,S[Y]);if(k.length=L,w<L){for(G=A;G<T-L;G++)Y=G+L,I=G+w,Y in S?S[I]=S[Y]:delete S[I];for(G=T;G>T-L+w;G--)delete S[G-1]}else if(w>L)for(G=T-L;G>A;G--)Y=G+L-1,I=G+w-1,Y in S?S[I]=S[Y]:delete S[I];for(G=0;G<w;G++)S[G+A]=arguments[G+2];return S.length=T-L+w,k}})},a4d3:function(o,f,t){var l=t("23e7"),i=t("da84"),c=t("d066"),d=t("c430"),u=t("83ab"),v=t("4930"),p=t("fdbf"),h=t("d039"),m=t("5135"),g=t("e8b5"),y=t("861d"),b=t("825a"),O=t("7b0b"),N=t("fc6a"),D=t("c04e"),P=t("5c6c"),K=t("7c73"),U=t("df75"),S=t("241c"),T=t("057f"),A=t("7418"),W=t("06cf"),w=t("9bf2"),L=t("d1e7"),k=t("9112"),G=t("6eeb"),Y=t("5692"),I=t("f772"),V=t("d012"),R=t("90e3"),j=t("b622"),J=t("e538"),st=t("746f"),lt=t("d44e"),ft=t("69f3"),vt=t("b727").forEach,ht=I("hidden"),Ft="Symbol",Ct="prototype",Qt=j("toPrimitive"),oe=ft.set,qt=ft.getterFor(Ft),Et=Object[Ct],Ot=i.Symbol,re=c("JSON","stringify"),Ht=W.f,Wt=w.f,Qe=T.f,yn=L.f,Kt=Y("symbols"),$t=Y("op-symbols"),de=Y("string-to-symbol-registry"),Ce=Y("symbol-to-string-registry"),De=Y("wks"),Pe=i.QObject,Ae=!Pe||!Pe[Ct]||!Pe[Ct].findChild,we=u&&h(function(){return K(Wt({},"a",{get:function(){return Wt(this,"a",{value:7}).a}})).a!=7})?function($,X,Z){var rt=Ht(Et,X);rt&&delete Et[X],Wt($,X,Z),rt&&$!==Et&&Wt(Et,X,rt)}:Wt,Re=function($,X){var Z=Kt[$]=K(Ot[Ct]);return oe(Z,{type:Ft,tag:$,description:X}),u||(Z.description=X),Z},E=p?function($){return typeof $=="symbol"}:function($){return Object($)instanceof Ot},x=function(X,Z,rt){X===Et&&x($t,Z,rt),b(X);var at=D(Z,!0);return b(rt),m(Kt,at)?(rt.enumerable?(m(X,ht)&&X[ht][at]&&(X[ht][at]=!1),rt=K(rt,{enumerable:P(0,!1)})):(m(X,ht)||Wt(X,ht,P(1,{})),X[ht][at]=!0),we(X,at,rt)):Wt(X,at,rt)},C=function(X,Z){b(X);var rt=N(Z),at=U(rt).concat(it(rt));return vt(at,function(At){(!u||z.call(rt,At))&&x(X,At,rt[At])}),X},F=function(X,Z){return Z===void 0?K(X):C(K(X),Z)},z=function(X){var Z=D(X,!0),rt=yn.call(this,Z);return this===Et&&m(Kt,Z)&&!m($t,Z)?!1:rt||!m(this,Z)||!m(Kt,Z)||m(this,ht)&&this[ht][Z]?rt:!0},q=function(X,Z){var rt=N(X),at=D(Z,!0);if(!(rt===Et&&m(Kt,at)&&!m($t,at))){var At=Ht(rt,at);return At&&m(Kt,at)&&!(m(rt,ht)&&rt[ht][at])&&(At.enumerable=!0),At}},et=function(X){var Z=Qe(N(X)),rt=[];return vt(Z,function(at){!m(Kt,at)&&!m(V,at)&&rt.push(at)}),rt},it=function(X){var Z=X===Et,rt=Qe(Z?$t:N(X)),at=[];return vt(rt,function(At){m(Kt,At)&&(!Z||m(Et,At))&&at.push(Kt[At])}),at};if(v||(Ot=function(){if(this instanceof Ot)throw TypeError("Symbol is not a constructor");var X=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Z=R(X),rt=function(at){this===Et&&rt.call($t,at),m(this,ht)&&m(this[ht],Z)&&(this[ht][Z]=!1),we(this,Z,P(1,at))};return u&&Ae&&we(Et,Z,{configurable:!0,set:rt}),Re(Z,X)},G(Ot[Ct],"toString",function(){return qt(this).tag}),G(Ot,"withoutSetter",function($){return Re(R($),$)}),L.f=z,w.f=x,W.f=q,S.f=T.f=et,A.f=it,J.f=function($){return Re(j($),$)},u&&(Wt(Ot[Ct],"description",{configurable:!0,get:function(){return qt(this).description}}),d||G(Et,"propertyIsEnumerable",z,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!v,sham:!v},{Symbol:Ot}),vt(U(De),function($){st($)}),l({target:Ft,stat:!0,forced:!v},{for:function($){var X=String($);if(m(de,X))return de[X];var Z=Ot(X);return de[X]=Z,Ce[Z]=X,Z},keyFor:function(X){if(!E(X))throw TypeError(X+" is not a symbol");if(m(Ce,X))return Ce[X]},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),l({target:"Object",stat:!0,forced:!v,sham:!u},{create:F,defineProperty:x,defineProperties:C,getOwnPropertyDescriptor:q}),l({target:"Object",stat:!0,forced:!v},{getOwnPropertyNames:et,getOwnPropertySymbols:it}),l({target:"Object",stat:!0,forced:h(function(){A.f(1)})},{getOwnPropertySymbols:function(X){return A.f(O(X))}}),re){var bt=!v||h(function(){var $=Ot();return re([$])!="[null]"||re({a:$})!="{}"||re(Object($))!="{}"});l({target:"JSON",stat:!0,forced:bt},{stringify:function(X,Z,rt){for(var at=[X],At=1,bn;arguments.length>At;)at.push(arguments[At++]);if(bn=Z,!(!y(Z)&&X===void 0||E(X)))return g(Z)||(Z=function(mr,qe){if(typeof bn=="function"&&(qe=bn.call(this,mr,qe)),!E(qe))return qe}),at[1]=Z,re.apply(null,at)}})}Ot[Ct][Qt]||k(Ot[Ct],Qt,Ot[Ct].valueOf),lt(Ot,Ft),V[ht]=!0},a630:function(o,f,t){var l=t("23e7"),i=t("4df4"),c=t("1c7e"),d=!c(function(u){Array.from(u)});l({target:"Array",stat:!0,forced:d},{from:i})},a640:function(o,f,t){var l=t("d039");o.exports=function(i,c){var d=[][i];return!!d&&l(function(){d.call(null,c||function(){throw 1},1)})}},a691:function(o,f){var t=Math.ceil,l=Math.floor;o.exports=function(i){return isNaN(i=+i)?0:(i>0?l:t)(i)}},ab13:function(o,f,t){var l=t("b622"),i=l("match");o.exports=function(c){var d=/./;try{"/./"[c](d)}catch{try{return d[i]=!1,"/./"[c](d)}catch{}}return!1}},ac1f:function(o,f,t){var l=t("23e7"),i=t("9263");l({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(o,f,t){var l=t("825a");o.exports=function(){var i=l(this),c="";return i.global&&(c+="g"),i.ignoreCase&&(c+="i"),i.multiline&&(c+="m"),i.dotAll&&(c+="s"),i.unicode&&(c+="u"),i.sticky&&(c+="y"),c}},ae40:function(o,f,t){var l=t("83ab"),i=t("d039"),c=t("5135"),d=Object.defineProperty,u={},v=function(p){throw p};o.exports=function(p,h){if(c(u,p))return u[p];h||(h={});var m=[][p],g=c(h,"ACCESSORS")?h.ACCESSORS:!1,y=c(h,0)?h[0]:v,b=c(h,1)?h[1]:void 0;return u[p]=!!m&&!i(function(){if(g&&!l)return!0;var O={length:-1};g?d(O,1,{enumerable:!0,get:v}):O[1]=1,m.call(O,y,b)})}},ae93:function(o,f,t){var l=t("e163"),i=t("9112"),c=t("5135"),d=t("b622"),u=t("c430"),v=d("iterator"),p=!1,h=function(){return this},m,g,y;[].keys&&(y=[].keys(),"next"in y?(g=l(l(y)),g!==Object.prototype&&(m=g)):p=!0),m==null&&(m={}),!u&&!c(m,v)&&i(m,v,h),o.exports={IteratorPrototype:m,BUGGY_SAFARI_ITERATORS:p}},b041:function(o,f,t){var l=t("00ee"),i=t("f5df");o.exports=l?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(o,f,t){var l=t("83ab"),i=t("9bf2").f,c=Function.prototype,d=c.toString,u=/^\s*function ([^ (]*)/,v="name";l&&!(v in c)&&i(c,v,{configurable:!0,get:function(){try{return d.call(this).match(u)[1]}catch{return""}}})},b622:function(o,f,t){var l=t("da84"),i=t("5692"),c=t("5135"),d=t("90e3"),u=t("4930"),v=t("fdbf"),p=i("wks"),h=l.Symbol,m=v?h:h&&h.withoutSetter||d;o.exports=function(g){return c(p,g)||(u&&c(h,g)?p[g]=h[g]:p[g]=m("Symbol."+g)),p[g]}},b64b:function(o,f,t){var l=t("23e7"),i=t("7b0b"),c=t("df75"),d=t("d039"),u=d(function(){c(1)});l({target:"Object",stat:!0,forced:u},{keys:function(p){return c(i(p))}})},b727:function(o,f,t){var l=t("0366"),i=t("44ad"),c=t("7b0b"),d=t("50c4"),u=t("65f0"),v=[].push,p=function(h){var m=h==1,g=h==2,y=h==3,b=h==4,O=h==6,N=h==5||O;return function(D,P,K,U){for(var S=c(D),T=i(S),A=l(P,K,3),W=d(T.length),w=0,L=U||u,k=m?L(D,W):g?L(D,0):void 0,G,Y;W>w;w++)if((N||w in T)&&(G=T[w],Y=A(G,w,S),h)){if(m)k[w]=Y;else if(Y)switch(h){case 3:return!0;case 5:return G;case 6:return w;case 2:v.call(k,G)}else if(b)return!1}return O?-1:y||b?b:k}};o.exports={forEach:p(0),map:p(1),filter:p(2),some:p(3),every:p(4),find:p(5),findIndex:p(6)}},c04e:function(o,f,t){var l=t("861d");o.exports=function(i,c){if(!l(i))return i;var d,u;if(c&&typeof(d=i.toString)=="function"&&!l(u=d.call(i))||typeof(d=i.valueOf)=="function"&&!l(u=d.call(i))||!c&&typeof(d=i.toString)=="function"&&!l(u=d.call(i)))return u;throw TypeError("Can't convert object to primitive value")}},c430:function(o,f){o.exports=!1},c6b6:function(o,f){var t={}.toString;o.exports=function(l){return t.call(l).slice(8,-1)}},c6cd:function(o,f,t){var l=t("da84"),i=t("ce4e"),c="__core-js_shared__",d=l[c]||i(c,{});o.exports=d},c740:function(o,f,t){var l=t("23e7"),i=t("b727").findIndex,c=t("44d2"),d=t("ae40"),u="findIndex",v=!0,p=d(u);u in[]&&Array(1)[u](function(){v=!1}),l({target:"Array",proto:!0,forced:v||!p},{findIndex:function(m){return i(this,m,arguments.length>1?arguments[1]:void 0)}}),c(u)},c8ba:function(o,f){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch{typeof window=="object"&&(t=window)}o.exports=t},c975:function(o,f,t){var l=t("23e7"),i=t("4d64").indexOf,c=t("a640"),d=t("ae40"),u=[].indexOf,v=!!u&&1/[1].indexOf(1,-0)<0,p=c("indexOf"),h=d("indexOf",{ACCESSORS:!0,1:0});l({target:"Array",proto:!0,forced:v||!p||!h},{indexOf:function(g){return v?u.apply(this,arguments)||0:i(this,g,arguments.length>1?arguments[1]:void 0)}})},ca84:function(o,f,t){var l=t("5135"),i=t("fc6a"),c=t("4d64").indexOf,d=t("d012");o.exports=function(u,v){var p=i(u),h=0,m=[],g;for(g in p)!l(d,g)&&l(p,g)&&m.push(g);for(;v.length>h;)l(p,g=v[h++])&&(~c(m,g)||m.push(g));return m}},caad:function(o,f,t){var l=t("23e7"),i=t("4d64").includes,c=t("44d2"),d=t("ae40"),u=d("indexOf",{ACCESSORS:!0,1:0});l({target:"Array",proto:!0,forced:!u},{includes:function(p){return i(this,p,arguments.length>1?arguments[1]:void 0)}}),c("includes")},cc12:function(o,f,t){var l=t("da84"),i=t("861d"),c=l.document,d=i(c)&&i(c.createElement);o.exports=function(u){return d?c.createElement(u):{}}},ce4e:function(o,f,t){var l=t("da84"),i=t("9112");o.exports=function(c,d){try{i(l,c,d)}catch{l[c]=d}return d}},d012:function(o,f){o.exports={}},d039:function(o,f){o.exports=function(t){try{return!!t()}catch{return!0}}},d066:function(o,f,t){var l=t("428f"),i=t("da84"),c=function(d){return typeof d=="function"?d:void 0};o.exports=function(d,u){return arguments.length<2?c(l[d])||c(i[d]):l[d]&&l[d][u]||i[d]&&i[d][u]}},d1e7:function(o,f,t){var l={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,c=i&&!l.call({1:2},1);f.f=c?function(u){var v=i(this,u);return!!v&&v.enumerable}:l},d28b:function(o,f,t){var l=t("746f");l("iterator")},d2bb:function(o,f,t){var l=t("825a"),i=t("3bbe");o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var c=!1,d={},u;try{u=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,u.call(d,[]),c=d instanceof Array}catch{}return function(p,h){return l(p),i(h),c?u.call(p,h):p.__proto__=h,p}}():void 0)},d3b7:function(o,f,t){var l=t("00ee"),i=t("6eeb"),c=t("b041");l||i(Object.prototype,"toString",c,{unsafe:!0})},d44e:function(o,f,t){var l=t("9bf2").f,i=t("5135"),c=t("b622"),d=c("toStringTag");o.exports=function(u,v,p){u&&!i(u=p?u:u.prototype,d)&&l(u,d,{configurable:!0,value:v})}},d58f:function(o,f,t){var l=t("1c0b"),i=t("7b0b"),c=t("44ad"),d=t("50c4"),u=function(v){return function(p,h,m,g){l(h);var y=i(p),b=c(y),O=d(y.length),N=v?O-1:0,D=v?-1:1;if(m<2)for(;;){if(N in b){g=b[N],N+=D;break}if(N+=D,v?N<0:O<=N)throw TypeError("Reduce of empty array with no initial value")}for(;v?N>=0:O>N;N+=D)N in b&&(g=h(g,b[N],N,y));return g}};o.exports={left:u(!1),right:u(!0)}},d784:function(o,f,t){t("ac1f");var l=t("6eeb"),i=t("d039"),c=t("b622"),d=t("9263"),u=t("9112"),v=c("species"),p=!i(function(){var b=/./;return b.exec=function(){var O=[];return O.groups={a:"7"},O},"".replace(b,"$<a>")!=="7"}),h=function(){return"a".replace(/./,"$0")==="$0"}(),m=c("replace"),g=function(){return/./[m]?/./[m]("a","$0")==="":!1}(),y=!i(function(){var b=/(?:)/,O=b.exec;b.exec=function(){return O.apply(this,arguments)};var N="ab".split(b);return N.length!==2||N[0]!=="a"||N[1]!=="b"});o.exports=function(b,O,N,D){var P=c(b),K=!i(function(){var w={};return w[P]=function(){return 7},""[b](w)!=7}),U=K&&!i(function(){var w=!1,L=/a/;return b==="split"&&(L={},L.constructor={},L.constructor[v]=function(){return L},L.flags="",L[P]=/./[P]),L.exec=function(){return w=!0,null},L[P](""),!w});if(!K||!U||b==="replace"&&!(p&&h&&!g)||b==="split"&&!y){var S=/./[P],T=N(P,""[b],function(w,L,k,G,Y){return L.exec===d?K&&!Y?{done:!0,value:S.call(L,k,G)}:{done:!0,value:w.call(k,L,G)}:{done:!1}},{REPLACE_KEEPS_$0:h,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:g}),A=T[0],W=T[1];l(String.prototype,b,A),l(RegExp.prototype,P,O==2?function(w,L){return W.call(w,this,L)}:function(w){return W.call(w,this)})}D&&u(RegExp.prototype[P],"sham",!0)}},d81d:function(o,f,t){var l=t("23e7"),i=t("b727").map,c=t("1dde"),d=t("ae40"),u=c("map"),v=d("map");l({target:"Array",proto:!0,forced:!u||!v},{map:function(h){return i(this,h,arguments.length>1?arguments[1]:void 0)}})},da84:function(o,f,t){(function(l){var i=function(c){return c&&c.Math==Math&&c};o.exports=i(typeof globalThis=="object"&&globalThis)||i(typeof window=="object"&&window)||i(typeof self=="object"&&self)||i(typeof l=="object"&&l)||Function("return this")()}).call(this,t("c8ba"))},dbb4:function(o,f,t){var l=t("23e7"),i=t("83ab"),c=t("56ef"),d=t("fc6a"),u=t("06cf"),v=t("8418");l({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(h){for(var m=d(h),g=u.f,y=c(m),b={},O=0,N,D;y.length>O;)D=g(m,N=y[O++]),D!==void 0&&v(b,N,D);return b}})},dbf1:function(o,f,t){(function(l){t.d(f,"a",function(){return c});function i(){return typeof window<"u"?window.console:l.console}var c=i()}).call(this,t("c8ba"))},ddb0:function(o,f,t){var l=t("da84"),i=t("fdbc"),c=t("e260"),d=t("9112"),u=t("b622"),v=u("iterator"),p=u("toStringTag"),h=c.values;for(var m in i){var g=l[m],y=g&&g.prototype;if(y){if(y[v]!==h)try{d(y,v,h)}catch{y[v]=h}if(y[p]||d(y,p,m),i[m]){for(var b in c)if(y[b]!==c[b])try{d(y,b,c[b])}catch{y[b]=c[b]}}}}},df75:function(o,f,t){var l=t("ca84"),i=t("7839");o.exports=Object.keys||function(d){return l(d,i)}},e01a:function(o,f,t){var l=t("23e7"),i=t("83ab"),c=t("da84"),d=t("5135"),u=t("861d"),v=t("9bf2").f,p=t("e893"),h=c.Symbol;if(i&&typeof h=="function"&&(!("description"in h.prototype)||h().description!==void 0)){var m={},g=function(){var P=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),K=this instanceof g?new h(P):P===void 0?h():h(P);return P===""&&(m[K]=!0),K};p(g,h);var y=g.prototype=h.prototype;y.constructor=g;var b=y.toString,O=String(h("test"))=="Symbol(test)",N=/^Symbol\((.*)\)[^)]+$/;v(y,"description",{configurable:!0,get:function(){var P=u(this)?this.valueOf():this,K=b.call(P);if(d(m,P))return"";var U=O?K.slice(7,-1):K.replace(N,"$1");return U===""?void 0:U}}),l({global:!0,forced:!0},{Symbol:g})}},e163:function(o,f,t){var l=t("5135"),i=t("7b0b"),c=t("f772"),d=t("e177"),u=c("IE_PROTO"),v=Object.prototype;o.exports=d?Object.getPrototypeOf:function(p){return p=i(p),l(p,u)?p[u]:typeof p.constructor=="function"&&p instanceof p.constructor?p.constructor.prototype:p instanceof Object?v:null}},e177:function(o,f,t){var l=t("d039");o.exports=!l(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype})},e260:function(o,f,t){var l=t("fc6a"),i=t("44d2"),c=t("3f8c"),d=t("69f3"),u=t("7dd0"),v="Array Iterator",p=d.set,h=d.getterFor(v);o.exports=u(Array,"Array",function(m,g){p(this,{type:v,target:l(m),index:0,kind:g})},function(){var m=h(this),g=m.target,y=m.kind,b=m.index++;return!g||b>=g.length?(m.target=void 0,{value:void 0,done:!0}):y=="keys"?{value:b,done:!1}:y=="values"?{value:g[b],done:!1}:{value:[b,g[b]],done:!1}},"values"),c.Arguments=c.Array,i("keys"),i("values"),i("entries")},e439:function(o,f,t){var l=t("23e7"),i=t("d039"),c=t("fc6a"),d=t("06cf").f,u=t("83ab"),v=i(function(){d(1)}),p=!u||v;l({target:"Object",stat:!0,forced:p,sham:!u},{getOwnPropertyDescriptor:function(m,g){return d(c(m),g)}})},e538:function(o,f,t){var l=t("b622");f.f=l},e893:function(o,f,t){var l=t("5135"),i=t("56ef"),c=t("06cf"),d=t("9bf2");o.exports=function(u,v){for(var p=i(v),h=d.f,m=c.f,g=0;g<p.length;g++){var y=p[g];l(u,y)||h(u,y,m(v,y))}}},e8b5:function(o,f,t){var l=t("c6b6");o.exports=Array.isArray||function(c){return l(c)=="Array"}},e95a:function(o,f,t){var l=t("b622"),i=t("3f8c"),c=l("iterator"),d=Array.prototype;o.exports=function(u){return u!==void 0&&(i.Array===u||d[c]===u)}},f5df:function(o,f,t){var l=t("00ee"),i=t("c6b6"),c=t("b622"),d=c("toStringTag"),u=i(function(){return arguments}())=="Arguments",v=function(p,h){try{return p[h]}catch{}};o.exports=l?i:function(p){var h,m,g;return p===void 0?"Undefined":p===null?"Null":typeof(m=v(h=Object(p),d))=="string"?m:u?i(h):(g=i(h))=="Object"&&typeof h.callee=="function"?"Arguments":g}},f772:function(o,f,t){var l=t("5692"),i=t("90e3"),c=l("keys");o.exports=function(d){return c[d]||(c[d]=i(d))}},fb15:function(o,f,t){if(t.r(f),typeof window<"u"){var l=window.document.currentScript;{var i=t("8875");l=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i})}var c=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(t.p=c[1])}t("99af"),t("4de4"),t("4160"),t("c975"),t("d81d"),t("a434"),t("159b"),t("a4d3"),t("e439"),t("dbb4"),t("b64b");function d(E,x,C){return x in E?Object.defineProperty(E,x,{value:C,enumerable:!0,configurable:!0,writable:!0}):E[x]=C,E}function u(E,x){var C=Object.keys(E);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(E);x&&(F=F.filter(function(z){return Object.getOwnPropertyDescriptor(E,z).enumerable})),C.push.apply(C,F)}return C}function v(E){for(var x=1;x<arguments.length;x++){var C=arguments[x]!=null?arguments[x]:{};x%2?u(Object(C),!0).forEach(function(F){d(E,F,C[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(C)):u(Object(C)).forEach(function(F){Object.defineProperty(E,F,Object.getOwnPropertyDescriptor(C,F))})}return E}function p(E){if(Array.isArray(E))return E}t("e01a"),t("d28b"),t("e260"),t("d3b7"),t("3ca3"),t("ddb0");function h(E,x){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(E)))){var C=[],F=!0,z=!1,q=void 0;try{for(var et=E[Symbol.iterator](),it;!(F=(it=et.next()).done)&&(C.push(it.value),!(x&&C.length===x));F=!0);}catch(bt){z=!0,q=bt}finally{try{!F&&et.return!=null&&et.return()}finally{if(z)throw q}}return C}}t("a630"),t("fb6a"),t("b0c0"),t("25f0");function m(E,x){(x==null||x>E.length)&&(x=E.length);for(var C=0,F=new Array(x);C<x;C++)F[C]=E[C];return F}function g(E,x){if(E){if(typeof E=="string")return m(E,x);var C=Object.prototype.toString.call(E).slice(8,-1);if(C==="Object"&&E.constructor&&(C=E.constructor.name),C==="Map"||C==="Set")return Array.from(E);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return m(E,x)}}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(E,x){return p(E)||h(E,x)||g(E,x)||y()}function O(E){if(Array.isArray(E))return m(E)}function N(E){if(typeof Symbol<"u"&&Symbol.iterator in Object(E))return Array.from(E)}function D(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
10
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(E){return O(E)||N(E)||g(E)||D()}var K=t("a352"),U=t.n(K);function S(E){E.parentElement!==null&&E.parentElement.removeChild(E)}function T(E,x,C){var F=C===0?E.children[0]:E.children[C-1].nextSibling;E.insertBefore(x,F)}var A=t("dbf1");t("13d5"),t("4fad"),t("ac1f"),t("5319");function W(E){var x=Object.create(null);return function(F){var z=x[F];return z||(x[F]=E(F))}}var w=/-(\w)/g,L=W(function(E){return E.replace(w,function(x,C){return C.toUpperCase()})});t("5db7"),t("73d9");var k=["Start","Add","Remove","Update","End"],G=["Choose","Unchoose","Sort","Filter","Clone"],Y=["Move"],I=[Y,k,G].flatMap(function(E){return E}).map(function(E){return"on".concat(E)}),V={manage:Y,manageAndEmit:k,emit:G};function R(E){return I.indexOf(E)!==-1}t("caad"),t("2ca0");var j=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function J(E){return j.includes(E)}function st(E){return["transition-group","TransitionGroup"].includes(E)}function lt(E){return["id","class","role","style"].includes(E)||E.startsWith("data-")||E.startsWith("aria-")||E.startsWith("on")}function ft(E){return E.reduce(function(x,C){var F=b(C,2),z=F[0],q=F[1];return x[z]=q,x},{})}function vt(E){var x=E.$attrs,C=E.componentData,F=C===void 0?{}:C,z=ft(Object.entries(x).filter(function(q){var et=b(q,2),it=et[0];return et[1],lt(it)}));return v(v({},z),F)}function ht(E){var x=E.$attrs,C=E.callBackBuilder,F=ft(Ft(x));Object.entries(C).forEach(function(q){var et=b(q,2),it=et[0],bt=et[1];V[it].forEach(function($){F["on".concat($)]=bt($)})});var z="[data-draggable]".concat(F.draggable||"");return v(v({},F),{},{draggable:z})}function Ft(E){return Object.entries(E).filter(function(x){var C=b(x,2),F=C[0];return C[1],!lt(F)}).map(function(x){var C=b(x,2),F=C[0],z=C[1];return[L(F),z]}).filter(function(x){var C=b(x,2),F=C[0];return C[1],!R(F)})}t("c740");function Ct(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}function Qt(E,x){for(var C=0;C<x.length;C++){var F=x[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(E,F.key,F)}}function oe(E,x,C){return x&&Qt(E.prototype,x),E}var qt=function(x){var C=x.el;return C},Et=function(x,C){return x.__draggable_context=C},Ot=function(x){return x.__draggable_context},re=function(){function E(x){var C=x.nodes,F=C.header,z=C.default,q=C.footer,et=x.root,it=x.realList;Ct(this,E),this.defaultNodes=z,this.children=[].concat(P(F),P(z),P(q)),this.externalComponent=et.externalComponent,this.rootTransition=et.transition,this.tag=et.tag,this.realList=it}return oe(E,[{key:"render",value:function(C,F){var z=this.tag,q=this.children,et=this._isRootComponent,it=et?{default:function(){return q}}:q;return C(z,F,it)}},{key:"updated",value:function(){var C=this.defaultNodes,F=this.realList;C.forEach(function(z,q){Et(qt(z),{element:F[q],index:q})})}},{key:"getUnderlyingVm",value:function(C){return Ot(C)}},{key:"getVmIndexFromDomIndex",value:function(C,F){var z=this.defaultNodes,q=z.length,et=F.children,it=et.item(C);if(it===null)return q;var bt=Ot(it);if(bt)return bt.index;if(q===0)return 0;var $=qt(z[0]),X=P(et).findIndex(function(Z){return Z===$});return C<X?0:q}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),E}(),Ht=t("8bbf");function Wt(E,x){var C=E[x];return C?C():[]}function Qe(E){var x=E.$slots,C=E.realList,F=E.getKey,z=C||[],q=["header","footer"].map(function(Z){return Wt(x,Z)}),et=b(q,2),it=et[0],bt=et[1],$=x.item;if(!$)throw new Error("draggable element must have an item slot");var X=z.flatMap(function(Z,rt){return $({element:Z,index:rt}).map(function(at){return at.key=F(Z),at.props=v(v({},at.props||{}),{},{"data-draggable":!0}),at})});if(X.length!==z.length)throw new Error("Item slot must have only one child");return{header:it,footer:bt,default:X}}function yn(E){var x=st(E),C=!J(E)&&!x;return{transition:x,externalComponent:C,tag:C?Object(Ht.resolveComponent)(E):x?Ht.TransitionGroup:E}}function Kt(E){var x=E.$slots,C=E.tag,F=E.realList,z=E.getKey,q=Qe({$slots:x,realList:F,getKey:z}),et=yn(C);return new re({nodes:q,root:et,realList:F})}function $t(E,x){var C=this;Object(Ht.nextTick)(function(){return C.$emit(E.toLowerCase(),x)})}function de(E){var x=this;return function(C,F){if(x.realList!==null)return x["onDrag".concat(E)](C,F)}}function Ce(E){var x=this,C=de.call(this,E);return function(F,z){C.call(x,F,z),$t.call(x,E,F)}}var De=null,Pe={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(x){return x}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Ae=["update:modelValue","change"].concat(P([].concat(P(V.manageAndEmit),P(V.emit)).map(function(E){return E.toLowerCase()}))),we=Object(Ht.defineComponent)({name:"draggable",inheritAttrs:!1,props:Pe,emits:Ae,data:function(){return{error:!1}},render:function(){try{this.error=!1;var x=this.$slots,C=this.$attrs,F=this.tag,z=this.componentData,q=this.realList,et=this.getKey,it=Kt({$slots:x,tag:F,realList:q,getKey:et});this.componentStructure=it;var bt=vt({$attrs:C,componentData:z});return it.render(Ht.h,bt)}catch($){return this.error=!0,Object(Ht.h)("pre",{style:{color:"red"}},$.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&A.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var x=this;if(!this.error){var C=this.$attrs,F=this.$el,z=this.componentStructure;z.updated();var q=ht({$attrs:C,callBackBuilder:{manageAndEmit:function(bt){return Ce.call(x,bt)},emit:function(bt){return $t.bind(x,bt)},manage:function(bt){return de.call(x,bt)}}}),et=F.nodeType===1?F:F.parentElement;this._sortable=new U.a(et,q),this.targetDomElement=et,et.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var x=this.list;return x||this.modelValue},getKey:function(){var x=this.itemKey;return typeof x=="function"?x:function(C){return C[x]}}},watch:{$attrs:{handler:function(x){var C=this._sortable;C&&Ft(x).forEach(function(F){var z=b(F,2),q=z[0],et=z[1];C.option(q,et)})},deep:!0}},methods:{getUnderlyingVm:function(x){return this.componentStructure.getUnderlyingVm(x)||null},getUnderlyingPotencialDraggableComponent:function(x){return x.__draggable_component__},emitChanges:function(x){var C=this;Object(Ht.nextTick)(function(){return C.$emit("change",x)})},alterList:function(x){if(this.list){x(this.list);return}var C=P(this.modelValue);x(C),this.$emit("update:modelValue",C)},spliceList:function(){var x=arguments,C=function(z){return z.splice.apply(z,P(x))};this.alterList(C)},updatePosition:function(x,C){var F=function(q){return q.splice(C,0,q.splice(x,1)[0])};this.alterList(F)},getRelatedContextFromMoveEvent:function(x){var C=x.to,F=x.related,z=this.getUnderlyingPotencialDraggableComponent(C);if(!z)return{component:z};var q=z.realList,et={list:q,component:z};if(C!==F&&q){var it=z.getUnderlyingVm(F)||{};return v(v({},it),et)}return et},getVmIndexFromDomIndex:function(x){return this.componentStructure.getVmIndexFromDomIndex(x,this.targetDomElement)},onDragStart:function(x){this.context=this.getUnderlyingVm(x.item),x.item._underlying_vm_=this.clone(this.context.element),De=x.item},onDragAdd:function(x){var C=x.item._underlying_vm_;if(C!==void 0){S(x.item);var F=this.getVmIndexFromDomIndex(x.newIndex);this.spliceList(F,0,C);var z={element:C,newIndex:F};this.emitChanges({added:z})}},onDragRemove:function(x){if(T(this.$el,x.item,x.oldIndex),x.pullMode==="clone"){S(x.clone);return}var C=this.context,F=C.index,z=C.element;this.spliceList(F,1);var q={element:z,oldIndex:F};this.emitChanges({removed:q})},onDragUpdate:function(x){S(x.item),T(x.from,x.item,x.oldIndex);var C=this.context.index,F=this.getVmIndexFromDomIndex(x.newIndex);this.updatePosition(C,F);var z={element:this.context.element,oldIndex:C,newIndex:F};this.emitChanges({moved:z})},computeFutureIndex:function(x,C){if(!x.element)return 0;var F=P(C.to.children).filter(function(it){return it.style.display!=="none"}),z=F.indexOf(C.related),q=x.component.getVmIndexFromDomIndex(z),et=F.indexOf(De)!==-1;return et||!C.willInsertAfter?q:q+1},onDragMove:function(x,C){var F=this.move,z=this.realList;if(!F||!z)return!0;var q=this.getRelatedContextFromMoveEvent(x),et=this.computeFutureIndex(q,x),it=v(v({},this.context),{},{futureIndex:et}),bt=v(v({},x),{},{relatedContext:q,draggedContext:it});return F(bt,C)},onDragEnd:function(){De=null}}}),Re=we;f.default=Re},fb6a:function(o,f,t){var l=t("23e7"),i=t("861d"),c=t("e8b5"),d=t("23cb"),u=t("50c4"),v=t("fc6a"),p=t("8418"),h=t("b622"),m=t("1dde"),g=t("ae40"),y=m("slice"),b=g("slice",{ACCESSORS:!0,0:0,1:2}),O=h("species"),N=[].slice,D=Math.max;l({target:"Array",proto:!0,forced:!y||!b},{slice:function(K,U){var S=v(this),T=u(S.length),A=d(K,T),W=d(U===void 0?T:U,T),w,L,k;if(c(S)&&(w=S.constructor,typeof w=="function"&&(w===Array||c(w.prototype))?w=void 0:i(w)&&(w=w[O],w===null&&(w=void 0)),w===Array||w===void 0))return N.call(S,A,W);for(L=new(w===void 0?Array:w)(D(W-A,0)),k=0;A<W;A++,k++)A in S&&p(L,k,S[A]);return L.length=k,L}})},fc6a:function(o,f,t){var l=t("44ad"),i=t("1d80");o.exports=function(c){return l(i(c))}},fdbc:function(o,f){o.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(o,f,t){var l=t("4930");o.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}).default})})(Sn);var Lo=Sn.exports;const Go=_n(Lo),Ko={class:"field-grid"},Uo=["onClick"],zo={class:"field-icon"},Ho={class:"field-label"},Wo=ae(a.defineComponent({__name:"AddFieldDialog",props:{show:{type:Boolean}},emits:["update:show","select"],setup(r,{emit:n}){const e=n,s=[{type:"input",label:"输入框",icon:"Aa"},{type:"textarea",label:"文本域",icon:"¶"},{type:"number",label:"数字输入",icon:"#"},{type:"select",label:"下拉选择",icon:"▾"},{type:"checkbox",label:"复选框",icon:"☑"},{type:"date",label:"日期选择",icon:"📅"},{type:"file",label:"文件上传",icon:"📎"},{type:"rich-text",label:"富文本",icon:"✎"}],o=t=>{e("update:show",t)},f=t=>{e("select",t),e("update:show",!1)};return(t,l)=>(a.openBlock(),a.createBlock(a.unref(M.NModal),{show:r.show,"onUpdate:show":o,preset:"card",title:"添加表单字段",style:{width:"480px"},"mask-closable":!0},{default:a.withCtx(()=>[a.createElementVNode("div",Ko,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(s,i=>a.createElementVNode("div",{key:i.type,class:"field-card type-card",onClick:c=>f(i.type)},[a.createElementVNode("span",zo,a.toDisplayString(i.icon),1),a.createElementVNode("span",Ho,a.toDisplayString(i.label),1)],8,Uo)),64))])]),_:1},8,["show"]))}}),[["__scopeId","data-v-76073c74"]]),Xo={key:0,class:"empty-state"},Yo={key:1,class:"canvas-container"},Jo=["onClick"],ko={key:0,class:"drag-handle",title:"拖拽排序"},Zo=ae(a.defineComponent({__name:"FieldCanvas",props:{fields:{},selectedKey:{},isEditing:{type:Boolean,default:!0}},emits:["update:fields","update:selectedKey","select-field"],setup(r,{emit:n}){const e=r,s=n,o={input:"输入框",textarea:"文本域",number:"数字输入",select:"下拉选择",checkbox:"复选框",date:"日期选择",file:"文件上传","rich-text":"富文本"},f=a.ref(!1),t=a.ref([...e.fields]);let l=!1;a.watch(()=>e.fields,y=>{l||JSON.stringify(y)!==JSON.stringify(t.value)&&(t.value=[...y])},{deep:!0});function i(y){return y.label?typeof y.label=="string"?y.label:y.label.zh||y.label.en||y.key:y.key}function c(y){return y.options?y.options.map(b=>({label:typeof b.label=="string"?b.label:b.label.zh||b.label.en||"",value:b.value})):[]}function d(y){return o[y]||y}function u(){l=!0,s("update:fields",[...t.value]),setTimeout(()=>{l=!1},0)}function v(y){s("select-field",y)}function p(){s("update:selectedKey",null)}function h(y){const b=t.value.findIndex(D=>D.key===y.key);if(b===-1)return;const O=JSON.parse(JSON.stringify(y));O.key=`${y.key}_copy`;const N=[...t.value];N.splice(b+1,0,O),t.value=N,l=!0,s("update:fields",N),s("select-field",O.key),setTimeout(()=>{l=!1},0)}function m(y){const b=t.value.filter(O=>O.key!==y);t.value=b,l=!0,s("update:fields",b),setTimeout(()=>{l=!1},0),e.selectedKey===y&&s("update:selectedKey",null)}function g(y){const b={key:`field_${Date.now()}`,type:y,label:d(y),required:!1},O=[...t.value,b];t.value=O,l=!0,s("update:fields",O),s("select-field",b.key),setTimeout(()=>{l=!1},0)}return(y,b)=>(a.openBlock(),a.createElementBlock("div",{class:"field-canvas",onClick:p},[r.fields.length===0?(a.openBlock(),a.createElementBlock("div",Xo,[...b[4]||(b[4]=[a.createElementVNode("span",{class:"empty-icon"},"+",-1),a.createElementVNode("p",{class:"empty-text"},"点击下方按钮添加第一个表单字段",-1)])])):(a.openBlock(),a.createElementBlock("div",Yo,[a.createVNode(a.unref(M.NForm),{"label-placement":"top","show-feedback":!1},{default:a.withCtx(()=>[a.createVNode(a.unref(Go),{list:t.value,"item-key":"key",animation:200,"ghost-class":"ghost",handle:".drag-handle",onEnd:u},{item:a.withCtx(({element:O})=>{var N,D;return[a.createElementVNode("div",{class:a.normalizeClass(["field-wrapper",{selected:r.isEditing&&O.key===r.selectedKey,"edit-mode":r.isEditing}]),onClick:a.withModifiers(P=>r.isEditing&&v(O.key),["stop"])},[r.isEditing&&O.key===r.selectedKey?(a.openBlock(),a.createElementBlock("span",ko,"⋮⋮")):a.createCommentVNode("",!0),r.isEditing?(a.openBlock(),a.createElementBlock("div",{key:1,class:"field-actions",onClick:b[0]||(b[0]=a.withModifiers(()=>{},["stop"])),onMousedown:b[1]||(b[1]=a.withModifiers(()=>{},["stop"]))},[a.createVNode(a.unref(M.NButton),{size:"tiny",quaternary:"",onClick:P=>h(O)},{default:a.withCtx(()=>[...b[5]||(b[5]=[a.createTextVNode("复制",-1)])]),_:1},8,["onClick"]),a.createVNode(a.unref(M.NButton),{size:"tiny",quaternary:"",type:"error",onClick:P=>m(O.key)},{default:a.withCtx(()=>[...b[6]||(b[6]=[a.createTextVNode("删除",-1)])]),_:1},8,["onClick"])],32)):a.createCommentVNode("",!0),(D=(N=O.visibleIf)==null?void 0:N.conditions)!=null&&D.length?(a.openBlock(),a.createBlock(a.unref(M.NTag),{key:2,size:"tiny",type:"info",class:"visible-if-tag"},{default:a.withCtx(()=>[...b[7]||(b[7]=[a.createTextVNode(" 条件显示 ",-1)])]),_:1})):a.createCommentVNode("",!0),a.createVNode(a.unref(M.NFormItem),{label:i(O),required:O.required},{default:a.withCtx(()=>[O.type==="input"?(a.openBlock(),a.createBlock(a.unref(M.NInput),{key:0,placeholder:O.placeholder||"请输入"},null,8,["placeholder"])):O.type==="textarea"?(a.openBlock(),a.createBlock(a.unref(M.NInput),{key:1,type:"textarea",placeholder:O.placeholder||"请输入",rows:3},null,8,["placeholder"])):O.type==="number"?(a.openBlock(),a.createBlock(a.unref(M.NInputNumber),{key:2,placeholder:O.placeholder||"请输入数字",style:{width:"100%"}},null,8,["placeholder"])):O.type==="select"?(a.openBlock(),a.createBlock(a.unref(M.NSelect),{key:3,options:c(O),placeholder:O.placeholder||"请选择"},null,8,["options","placeholder"])):O.type==="checkbox"?(a.openBlock(),a.createBlock(a.unref(M.NCheckbox),{key:4},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i(O)),1)]),_:2},1024)):O.type==="date"?(a.openBlock(),a.createBlock(a.unref(M.NDatePicker),{key:5,type:"date",style:{width:"100%"}})):O.type==="file"?(a.openBlock(),a.createBlock(a.unref(M.NUpload),{key:6,max:1},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NButton),{size:"small"},{default:a.withCtx(()=>[...b[8]||(b[8]=[a.createTextVNode("选择文件",-1)])]),_:1})]),_:1})):O.type==="rich-text"?(a.openBlock(),a.createBlock(a.unref(M.NInput),{key:7,type:"textarea",rows:4,placeholder:"富文本内容"})):a.createCommentVNode("",!0)]),_:2},1032,["label","required"])],10,Jo)]}),_:1},8,["list"])]),_:1})])),r.isEditing?(a.openBlock(),a.createBlock(a.unref(M.NButton),{key:2,dashed:"",block:"",class:"add-btn",onClick:b[2]||(b[2]=O=>f.value=!0)},{default:a.withCtx(()=>[...b[9]||(b[9]=[a.createTextVNode(" + 添加字段 ",-1)])]),_:1})):a.createCommentVNode("",!0),a.createVNode(Wo,{show:f.value,"onUpdate:show":b[3]||(b[3]=O=>f.value=O),onSelect:g},null,8,["show"])]))}}),[["__scopeId","data-v-999ad99e"]]),Qo={class:"field-config-panel config-panel"},qo={key:0,class:"empty-state"},$o={class:"config-section"},_o={class:"config-section"},tr={class:"options-list"},er={class:"config-section"},nr={class:"config-section"},or={class:"conditions-list"},rr=ae(a.defineComponent({__name:"FieldConfigPanel",props:{field:{},allFields:{}},emits:["update:field"],setup(r,{emit:n}){const e=r,s=n;function o(){return{}}function f(S){return S?{...S,validation:{...o(),...S.validation},options:S.options?S.options.map(T=>({...T})):[]}:null}const t=a.ref(null);let l=!1,i="";a.watch(()=>e.field,S=>{const T=f(S);if(!T){t.value=null,i="";return}const A=JSON.stringify(T);A!==i&&(l=!0,t.value=T,i=A,a.nextTick(()=>{l=!1}))},{immediate:!0}),a.watch(t,S=>{if(l||!S)return;const T={...S,validation:Object.keys(S.validation).length>0?{...S.validation}:void 0,options:S.type==="select"&&S.options.length>0?S.options.map(W=>({...W})):void 0,required:S.required||void 0,placeholder:S.placeholder||void 0,description:S.description||void 0},A=JSON.stringify(T);A!==i&&(i=A,s("update:field",JSON.parse(A)))},{deep:!0});function c(S){return S?typeof S=="string"?S:S.zh||S.en||"":""}const d=a.computed(()=>{var S;return c((S=t.value)==null?void 0:S.label)}),u=a.computed(()=>{var S;return c((S=t.value)==null?void 0:S.description)});function v(S){if(!t.value)return;const T=t.value.label;typeof T=="object"&&T!==null?t.value.label={...T,zh:S}:t.value.label=S}function p(S){if(!t.value)return;const T=t.value.description;typeof T=="object"&&T!==null?t.value.description={...T,zh:S}:t.value.description=S}function h(S){return typeof S=="string"?S:S.zh||S.en||""}const m=a.computed(()=>t.value?["input","textarea","number","select"].includes(t.value.type):!1),g=a.computed(()=>t.value?["input","textarea"].includes(t.value.type):!1),y=a.computed({get(){var S,T;return((T=(S=t.value)==null?void 0:S.visibleIf)==null?void 0:T.conditions)||[]},set(S){t.value&&(t.value.visibleIf||(t.value.visibleIf={}),t.value.visibleIf.conditions=S)}}),b=a.computed({get(){var S,T;return((T=(S=t.value)==null?void 0:S.visibleIf)==null?void 0:T.logic)||"allOf"},set(S){t.value&&(t.value.visibleIf||(t.value.visibleIf={}),t.value.visibleIf.logic=S)}}),O=a.computed(()=>{var T;const S=(T=t.value)==null?void 0:T.key;return e.allFields.filter(A=>A.key!==S).map(A=>{var W;return{label:typeof A.label=="string"?A.label:((W=A.label)==null?void 0:W.zh)||A.key,value:A.key}})}),N=[{label:"等于 (equals)",value:"equals"},{label:"不等于 (notEquals)",value:"notEquals"},{label:"存在 (exists)",value:"exists"},{label:"大于 (greaterThan)",value:"greaterThan"},{label:"小于 (lessThan)",value:"lessThan"},{label:"大于等于 (greaterThanOrEqual)",value:"greaterThanOrEqual"},{label:"小于等于 (lessThanOrEqual)",value:"lessThanOrEqual"}];function D(){t.value&&(t.value.visibleIf||(t.value.visibleIf={conditions:[],logic:"allOf"}),t.value.visibleIf.conditions||(t.value.visibleIf.conditions=[]),t.value.visibleIf.conditions.push({field:"",operator:"equals",value:""}))}function P(S){var T,A;(A=(T=t.value)==null?void 0:T.visibleIf)!=null&&A.conditions&&t.value.visibleIf.conditions.splice(S,1)}function K(){t.value&&t.value.options.push({label:"",value:""})}function U(S){t.value&&t.value.options.splice(S,1)}return(S,T)=>(a.openBlock(),a.createElementBlock("div",Qo,[t.value?(a.openBlock(),a.createBlock(a.unref(M.NForm),{key:1,"label-placement":"top","label-width":"auto"},{default:a.withCtx(()=>[a.createElementVNode("div",$o,[T[10]||(T[10]=a.createElementVNode("div",{class:"section-title"},"基本信息",-1)),a.createVNode(a.unref(M.NFormItem),{label:"字段标识 (key)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:t.value.key,"onUpdate:value":T[0]||(T[0]=A=>t.value.key=A),placeholder:"字段唯一标识"},null,8,["value"])]),_:1}),a.createVNode(a.unref(M.NFormItem),{label:"标签 (label)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:d.value,"onUpdate:value":v,placeholder:"字段显示名称"},null,8,["value"])]),_:1}),a.createVNode(a.unref(M.NFormItem),{label:"描述 (description)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:u.value,"onUpdate:value":p,placeholder:"字段描述文字"},null,8,["value"])]),_:1}),m.value?(a.openBlock(),a.createBlock(a.unref(M.NFormItem),{key:0,label:"占位提示 (placeholder)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:t.value.placeholder,"onUpdate:value":T[1]||(T[1]=A=>t.value.placeholder=A),placeholder:"输入框占位提示"},null,8,["value"])]),_:1})):a.createCommentVNode("",!0)]),a.createVNode(a.unref(M.NDivider)),a.createElementVNode("div",_o,[T[13]||(T[13]=a.createElementVNode("div",{class:"section-title"},"类型配置",-1)),t.value.type==="select"?(a.openBlock(),a.createBlock(a.unref(M.NFormItem),{key:0,label:"选项列表"},{default:a.withCtx(()=>[a.createElementVNode("div",tr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value.options,(A,W)=>(a.openBlock(),a.createElementBlock("div",{key:W,class:"option-row"},[a.createVNode(a.unref(M.NInput),{value:h(A.label),"onUpdate:value":w=>A.label=w,placeholder:"显示名称",size:"small",class:"option-input"},null,8,["value","onUpdate:value"]),a.createVNode(a.unref(M.NInput),{value:String(A.value??""),"onUpdate:value":w=>A.value=w,placeholder:"值",size:"small",class:"option-input"},null,8,["value","onUpdate:value"]),a.createVNode(a.unref(M.NButton),{size:"small",type:"error",quaternary:"",onClick:w=>U(W)},{default:a.withCtx(()=>[...T[11]||(T[11]=[a.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])]))),128)),a.createVNode(a.unref(M.NButton),{size:"small",dashed:"",type:"primary",onClick:K},{default:a.withCtx(()=>[...T[12]||(T[12]=[a.createTextVNode(" + 添加选项 ",-1)])]),_:1})])]),_:1})):a.createCommentVNode("",!0),t.value.type==="number"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(a.unref(M.NFormItem),{label:"最小值 (min)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInputNumber),{value:t.value.validation.min,"onUpdate:value":T[2]||(T[2]=A=>t.value.validation.min=A),placeholder:"不限制",clearable:"",style:{width:"100%"}},null,8,["value"])]),_:1}),a.createVNode(a.unref(M.NFormItem),{label:"最大值 (max)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInputNumber),{value:t.value.validation.max,"onUpdate:value":T[3]||(T[3]=A=>t.value.validation.max=A),placeholder:"不限制",clearable:"",style:{width:"100%"}},null,8,["value"])]),_:1})],64)):a.createCommentVNode("",!0)]),a.createVNode(a.unref(M.NDivider)),a.createElementVNode("div",er,[T[14]||(T[14]=a.createElementVNode("div",{class:"section-title"},"验证规则",-1)),a.createVNode(a.unref(M.NFormItem),{label:"必填 (required)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NSwitch),{value:t.value.required,"onUpdate:value":T[4]||(T[4]=A=>t.value.required=A)},null,8,["value"])]),_:1}),g.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(a.unref(M.NFormItem),{label:"最小长度 (minLength)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInputNumber),{value:t.value.validation.minLength,"onUpdate:value":T[5]||(T[5]=A=>t.value.validation.minLength=A),min:0,placeholder:"不限制",clearable:"",style:{width:"100%"}},null,8,["value"])]),_:1}),a.createVNode(a.unref(M.NFormItem),{label:"最大长度 (maxLength)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInputNumber),{value:t.value.validation.maxLength,"onUpdate:value":T[6]||(T[6]=A=>t.value.validation.maxLength=A),min:0,placeholder:"不限制",clearable:"",style:{width:"100%"}},null,8,["value"])]),_:1}),a.createVNode(a.unref(M.NFormItem),{label:"正则 (pattern)"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:t.value.validation.pattern,"onUpdate:value":T[7]||(T[7]=A=>t.value.validation.pattern=A),placeholder:"如: ^[a-zA-Z]+$"},null,8,["value"])]),_:1})],64)):a.createCommentVNode("",!0)]),a.createVNode(a.unref(M.NDivider)),a.createElementVNode("div",nr,[T[19]||(T[19]=a.createElementVNode("div",{class:"section-title"},"条件显示规则",-1)),a.createVNode(a.unref(M.NFormItem),{label:"逻辑关系"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NRadioGroup),{value:b.value,"onUpdate:value":T[8]||(T[8]=A=>b.value=A)},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NRadio),{value:"allOf"},{default:a.withCtx(()=>[...T[15]||(T[15]=[a.createTextVNode("全部满足 (AND)",-1)])]),_:1}),a.createVNode(a.unref(M.NRadio),{value:"anyOf"},{default:a.withCtx(()=>[...T[16]||(T[16]=[a.createTextVNode("任一满足 (OR)",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),a.createVNode(a.unref(M.NFormItem),{label:"条件列表"},{default:a.withCtx(()=>[a.createElementVNode("div",or,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(A,W)=>(a.openBlock(),a.createElementBlock("div",{key:W,class:"condition-row"},[a.createVNode(a.unref(M.NSelect),{value:A.field,"onUpdate:value":w=>A.field=w,options:O.value,placeholder:"目标字段",size:"small",class:"condition-select",clearable:""},null,8,["value","onUpdate:value","options"]),a.createVNode(a.unref(M.NSelect),{value:A.operator,"onUpdate:value":w=>A.operator=w,options:N,placeholder:"操作符",size:"small",class:"condition-select"},null,8,["value","onUpdate:value"]),A.operator!=="exists"?(a.openBlock(),a.createBlock(a.unref(M.NInput),{key:0,value:A.value,"onUpdate:value":w=>A.value=w,placeholder:"比较值",size:"small",class:"condition-input"},null,8,["value","onUpdate:value"])):a.createCommentVNode("",!0),a.createVNode(a.unref(M.NButton),{size:"small",type:"error",quaternary:"",onClick:w=>P(W)},{default:a.withCtx(()=>[...T[17]||(T[17]=[a.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])]))),128)),a.createVNode(a.unref(M.NButton),{size:"small",dashed:"",type:"primary",onClick:D},{default:a.withCtx(()=>[...T[18]||(T[18]=[a.createTextVNode(" + 添加条件 ",-1)])]),_:1})])]),_:1})])]),_:1})):(a.openBlock(),a.createElementBlock("div",qo,[...T[9]||(T[9]=[a.createElementVNode("span",null,"请选择一个字段进行配置",-1)])]))]))}}),[["__scopeId","data-v-c42c1631"]]);function Hn(r){const n={},e={},s=[];for(const f of r.fields){const{schemaProp:t,uiFieldSchema:l}=ar(f);n[f.key]=t,Object.keys(l).length>0&&(e[f.key]=l),f.required&&s.push(f.key)}const o={type:"object",properties:n};return s.length>0&&(o.required=s),{schema:o,uiSchema:e}}function ar(r){const n={},e={};switch(r.type){case"input":n.type="string";break;case"textarea":n.type="string",e.widget="textarea";break;case"number":n.type="number";break;case"select":n.type="string",r.options&&r.options.length>0&&(n.enum=r.options.map(o=>o.value),n.enumNames=r.options.map(o=>typeof o.label=="object"?o.label:String(o.label)));break;case"checkbox":n.type="boolean";break;case"date":n.type="string",n.format="date";break;case"file":n.type="string",e.widget="file";break;case"rich-text":n.type="string",e.widget="rich-text";break}r.label!==void 0&&(n.title=r.label),r.description!==void 0&&(n.description=r.description),r.validation&&(r.validation.min!==void 0&&(n.minimum=r.validation.min),r.validation.max!==void 0&&(n.maximum=r.validation.max),r.validation.minLength!==void 0&&(n.minLength=r.validation.minLength),r.validation.maxLength!==void 0&&(n.maxLength=r.validation.maxLength),r.validation.pattern!==void 0&&(n.pattern=r.validation.pattern)),r.visibleIf&&(n.visibleIf=lr(r.visibleIf));const s={};return r.placeholder&&(s.placeholder=r.placeholder),r.props&&Object.keys(r.props).length>0&&Object.assign(s,r.props),Object.keys(s).length>0&&(e.props=s),{schemaProp:n,uiFieldSchema:e}}function lr(r){const n=r.conditions||[],e=r.logic||"allOf",s=n.map(o=>ir(o));return s.length===0?{}:s.length===1?s[0]:{[e]:s}}function ir(r){const n={field:r.field};switch(r.operator){case"equals":n.equals=r.value;break;case"notEquals":n.notEquals=r.value;break;case"exists":n.exists=r.value!==void 0?!!r.value:!0;break;case"greaterThan":n.greaterThan=r.value;break;case"lessThan":n.lessThan=r.value;break;case"greaterThanOrEqual":n.greaterThanOrEqual=r.value;break;case"lessThanOrEqual":n.lessThanOrEqual=r.value;break}return n}const sr={class:"form-designer"},cr={class:"designer-toolbar"},fr={class:"designer-body"},ur={key:"preview",class:"preview-container"},dr={class:"preview-header"},vr={key:"edit",class:"designer-edit"},pr={key:0,class:"save-area"},Wn=ae(a.defineComponent({__name:"FormDesigner",props:{modelValue:{},locale:{default:"zh"}},emits:["update:modelValue"],setup(r,{emit:n}){const e=r,s=n,{message:o,dialog:f}=M.createDiscreteApi(["message","dialog"]),t=a.ref([...e.modelValue.fields||[]]),l=a.ref(null),i=a.ref(!0),c=a.ref(!1),d=a.ref(!1),u=a.ref(!1),v=a.ref("");let p=!1;a.watch(()=>e.modelValue.fields,R=>{if(p)return;const j=JSON.stringify(R||[]),J=JSON.stringify(t.value);j!==J&&(t.value=[...R||[]])},{deep:!0});const h=a.computed(()=>t.value.find(R=>R.key===l.value)??null),m=a.computed(()=>({title:e.modelValue.title,fields:t.value})),g=a.computed(()=>Hn({title:e.modelValue.title,fields:t.value})),y=a.computed(()=>g.value.schema),b=a.computed(()=>g.value.uiSchema),O=a.ref({});function N(){c.value=!c.value,c.value&&(O.value={})}function D(){p=!0,s("update:modelValue",{...e.modelValue,fields:[...t.value]}),a.nextTick(()=>{p=!1})}function P(R){t.value=R,D()}function K(R){i.value&&(l.value=R)}function U(R){i.value&&(l.value=R)}const S=a.computed({get:()=>l.value!==null,set:R=>{R||(l.value=null)}}),T=a.computed(()=>{if(!h.value)return"字段配置";const R=h.value.label;return typeof R=="string"?`编辑: ${R}`:`编辑: ${(R==null?void 0:R.zh)||(R==null?void 0:R.en)||h.value.key}`});function A(){l.value=null}function W(){l.value=null,i.value=!1,D()}function w(){i.value=!0}function L(R){const j=t.value.findIndex(J=>J.key===R.key);if(j!==-1){const J=[...t.value];J[j]={...R},t.value=J,D()}}const k=a.computed(()=>JSON.stringify(m.value,null,2));function G(){u.value=!0}async function Y(){try{await navigator.clipboard.writeText(k.value),o.success("已复制到剪贴板")}catch{o.error("复制失败,请手动复制")}}function I(){try{const R=JSON.parse(v.value);if(!R||!Array.isArray(R.fields)){o.error("JSON 格式无效:缺少 fields 数组");return}t.value=R.fields,D(),d.value=!1,v.value="",o.success("导入成功")}catch{o.error("JSON 解析失败,请检查格式")}}function V(){f.warning({title:"确认清空",content:"确定要清空所有字段吗?此操作不可撤销。",positiveText:"确认清空",negativeText:"取消",onPositiveClick:()=>{t.value=[],l.value=null,D(),o.success("已清空")}})}return(R,j)=>(a.openBlock(),a.createElementBlock("div",sr,[a.createElementVNode("div",cr,[i.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(a.unref(M.NButton),{size:"small",type:c.value?"primary":"default",onClick:N},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(c.value?"返回编辑":"预览"),1)]),_:1},8,["type"]),a.createVNode(a.unref(M.NButton),{size:"small",onClick:G},{default:a.withCtx(()=>[...j[8]||(j[8]=[a.createTextVNode("导出JSON",-1)])]),_:1}),a.createVNode(a.unref(M.NButton),{size:"small",onClick:j[0]||(j[0]=J=>d.value=!0)},{default:a.withCtx(()=>[...j[9]||(j[9]=[a.createTextVNode("导入JSON",-1)])]),_:1}),a.createVNode(a.unref(M.NButton),{size:"small",type:"error",onClick:V},{default:a.withCtx(()=>[...j[10]||(j[10]=[a.createTextVNode("清空",-1)])]),_:1})],64)):(a.openBlock(),a.createBlock(a.unref(M.NButton),{key:1,size:"small",type:"primary",ghost:"",onClick:w},{default:a.withCtx(()=>[...j[11]||(j[11]=[a.createTextVNode("编辑表单",-1)])]),_:1}))]),a.createElementVNode("div",fr,[a.createVNode(a.Transition,{name:"preview",mode:"out-in"},{default:a.withCtx(()=>[c.value?(a.openBlock(),a.createElementBlock("div",ur,[a.createElementVNode("div",dr,[a.createVNode(a.unref(M.NTag),{type:"warning",size:"small"},{default:a.withCtx(()=>[...j[12]||(j[12]=[a.createTextVNode("预览模式",-1)])]),_:1})]),a.createVNode(Xn,{schema:y.value,uiSchema:b.value,modelValue:O.value,"onUpdate:modelValue":j[1]||(j[1]=J=>O.value=J),locale:r.locale},null,8,["schema","uiSchema","modelValue","locale"])])):(a.openBlock(),a.createElementBlock("div",vr,[a.createVNode(Zo,{fields:t.value,selectedKey:l.value,isEditing:i.value,"onUpdate:fields":P,onSelectField:K,"onUpdate:selectedKey":U},null,8,["fields","selectedKey","isEditing"]),i.value&&t.value.length>0?(a.openBlock(),a.createElementBlock("div",pr,[a.createVNode(a.unref(M.NButton),{type:"primary",size:"large",block:"",onClick:W},{default:a.withCtx(()=>[...j[13]||(j[13]=[a.createTextVNode(" 保存表单 ",-1)])]),_:1})])):a.createCommentVNode("",!0)]))]),_:1})]),a.createVNode(a.unref(M.NDrawer),{show:S.value,"onUpdate:show":j[2]||(j[2]=J=>S.value=J),placement:"right",width:400},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NDrawerContent),{title:T.value},{footer:a.withCtx(()=>[a.createVNode(a.unref(M.NButton),{type:"primary",block:"",onClick:A},{default:a.withCtx(()=>[...j[14]||(j[14]=[a.createTextVNode("确定",-1)])]),_:1})]),default:a.withCtx(()=>[a.createVNode(rr,{field:h.value,allFields:t.value,"onUpdate:field":L},null,8,["field","allFields"])]),_:1},8,["title"])]),_:1},8,["show"]),a.createVNode(a.unref(M.NModal),{show:d.value,"onUpdate:show":j[5]||(j[5]=J=>d.value=J),preset:"card",title:"导入JSON配置",style:{width:"600px"},"mask-closable":!0},{action:a.withCtx(()=>[a.createVNode(a.unref(M.NSpace),{justify:"end"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NButton),{size:"small",onClick:j[4]||(j[4]=J=>d.value=!1)},{default:a.withCtx(()=>[...j[15]||(j[15]=[a.createTextVNode("取消",-1)])]),_:1}),a.createVNode(a.unref(M.NButton),{size:"small",type:"primary",onClick:I},{default:a.withCtx(()=>[...j[16]||(j[16]=[a.createTextVNode("确认导入",-1)])]),_:1})]),_:1})]),default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:v.value,"onUpdate:value":j[3]||(j[3]=J=>v.value=J),type:"textarea",placeholder:"请粘贴 JSON 配置",rows:12},null,8,["value"])]),_:1},8,["show"]),a.createVNode(a.unref(M.NModal),{show:u.value,"onUpdate:show":j[7]||(j[7]=J=>u.value=J),preset:"card",title:"导出JSON配置",style:{width:"600px"},"mask-closable":!0},{action:a.withCtx(()=>[a.createVNode(a.unref(M.NSpace),{justify:"end"},{default:a.withCtx(()=>[a.createVNode(a.unref(M.NButton),{size:"small",onClick:j[6]||(j[6]=J=>u.value=!1)},{default:a.withCtx(()=>[...j[17]||(j[17]=[a.createTextVNode("关闭",-1)])]),_:1}),a.createVNode(a.unref(M.NButton),{size:"small",type:"primary",onClick:Y},{default:a.withCtx(()=>[...j[18]||(j[18]=[a.createTextVNode("复制到剪贴板",-1)])]),_:1})]),_:1})]),default:a.withCtx(()=>[a.createVNode(a.unref(M.NInput),{value:k.value,type:"textarea",rows:12,readonly:""},null,8,["value"])]),_:1},8,["show"])]))}}),[["__scopeId","data-v-74078ebc"]]),hr="top",Xn=ae(a.defineComponent({__name:"FormRenderer",props:{schema:{default:()=>({type:"object",properties:{}})},uiSchema:{},modelValue:{default:()=>({})},locale:{default:"zh"},mode:{},designConfig:{}},emits:["update:modelValue","validate","update:designConfig"],setup(r,{emit:n}){const e=r,s=n,o=a.computed(()=>e.mode||"design"),f=a.computed(()=>e.designConfig||{fields:[]}),t=a.ref(),l=a.computed(()=>e.modelValue||{});a.computed(()=>e.modelValue||{});const i=a.ref({}),c=new Yn({allErrors:!0,strict:!1});c.addFormat("date",/^\d{4}-\d{2}-\d{2}$/);const d=()=>c.compile(e.schema||{}),u=h=>{const m={};for(const g in h){const y=h[g];m[g]=y instanceof File?y.name:y}return m};function v(h=e.modelValue){i.value={};const m=d(),g=m(u(h||{}));!g&&m.errors&&m.errors.forEach(y=>{var O;const b=y.instancePath.replace(/\//g,"")||((O=y.params)==null?void 0:O.missingProperty)||"";b&&(i.value[b]=y.message||"")}),s("validate",g,i.value)}const p=h=>{s("update:modelValue",h),v(h)};return a.watch(()=>e.modelValue,()=>{v()},{deep:!0,immediate:!0}),(h,m)=>o.value==="design"?(a.openBlock(),a.createBlock(Wn,{key:0,modelValue:f.value,"onUpdate:modelValue":m[0]||(m[0]=g=>h.$emit("update:designConfig",g)),locale:r.locale},null,8,["modelValue","locale"])):(a.openBlock(),a.createBlock(a.unref(M.NForm),{key:1,model:l.value,labelPlacement:hr,ref_key:"formRef",ref:t},{default:a.withCtx(()=>[a.createVNode(qn,{schema:r.schema,uiSchema:r.uiSchema,modelValue:l.value,locale:r.locale,path:"",rootSchema:r.schema,errors:i.value,"onUpdate:modelValue":p},null,8,["schema","uiSchema","modelValue","locale","rootSchema","errors"])]),_:1},8,["model"]))}}),[["__scopeId","data-v-712e5ea2"]]);Mt.FormDesigner=Wn,Mt.FormRenderer=Xn,Mt.configToSchema=Hn,Object.defineProperty(Mt,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .array-items[data-v-b54d550e]{display:flex;flex-direction:column;gap:12px}.array-item[data-v-b54d550e]{display:flex;align-items:flex-start;gap:12px}.error-text[data-v-b54d550e]{color:#d93025;margin-top:4px;font-size:12px}.file-name[data-v-b54d550e]{color:#555;margin-top:6px}.field-grid[data-v-76073c74]{--designer-primary: #18a058;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:4px 0}.field-card[data-v-76073c74]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px 12px;background:var(--n-color, #f7f8fa);border-radius:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.type-card[data-v-76073c74]{transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.type-card[data-v-76073c74]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(circle at center,rgba(24,160,88,.08) 0%,transparent 70%);opacity:0;transition:opacity .3s}.type-card[data-v-76073c74]:hover{transform:scale(1.05);box-shadow:0 4px 12px #0000001f}.type-card[data-v-76073c74]:hover:after{opacity:1}.type-card[data-v-76073c74]:active{transform:scale(.97)}.field-icon[data-v-76073c74]{font-size:30px;line-height:1}.field-label[data-v-76073c74]{font-size:13px;color:#333}.field-canvas[data-v-999ad99e]{--designer-primary: #18a058;display:flex;flex-direction:column;gap:0}.empty-state[data-v-999ad99e]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#999}.empty-icon[data-v-999ad99e]{font-size:48px;font-weight:300;line-height:1;margin-bottom:12px;color:#ccc}.empty-text[data-v-999ad99e]{font-size:14px;margin:0}.canvas-container[data-v-999ad99e]{padding:4px 0}.field-wrapper[data-v-999ad99e]{position:relative;padding:8px 12px;margin-bottom:0;border:none;border-left:3px solid transparent;border-radius:0;transition:all .15s ease;cursor:default}.field-wrapper.edit-mode[data-v-999ad99e]:hover{background:#fafbfc}.field-wrapper[data-v-999ad99e]:not(.edit-mode){cursor:default}.field-wrapper.selected[data-v-999ad99e]{border-left-color:var(--designer-primary, #18a058);background:#f8fdf9}.drag-handle[data-v-999ad99e]{display:none}.field-wrapper.selected .drag-handle[data-v-999ad99e]{display:block;position:absolute;left:-4px;top:50%;transform:translateY(-50%);color:#bbb;cursor:grab;font-size:12px;letter-spacing:-1px;-webkit-user-select:none;user-select:none;line-height:1;z-index:2}.drag-handle[data-v-999ad99e]:active{cursor:grabbing}.drag-handle[data-v-999ad99e]:hover{color:var(--designer-primary, #18a058)}.field-actions[data-v-999ad99e]{display:flex;position:absolute;top:4px;right:8px;gap:4px}.field-wrapper.selected .field-actions[data-v-999ad99e]{z-index:1}.visible-if-tag[data-v-999ad99e]{display:none}.field-wrapper.selected .visible-if-tag[data-v-999ad99e]{display:inline-block;position:absolute;top:6px;right:120px}.ghost[data-v-999ad99e]{opacity:.4;background:#e8f5e9;border:2px dashed var(--designer-primary, #18a058);border-radius:4px}.add-btn[data-v-999ad99e]{margin-top:16px;border-style:dashed;color:#999}.field-wrapper[data-v-999ad99e] .n-form-item{margin-bottom:0}.field-config-panel[data-v-c42c1631]{--designer-primary: #18a058;--designer-border: #e8e8e8;border-left:1px solid var(--n-border-color, #e0e0e6);padding:16px 20px;height:100%;overflow-y:auto;box-sizing:border-box}.config-panel[data-v-c42c1631]{transition:opacity .2s ease}.config-section[data-v-c42c1631]{transition:all .2s ease}[data-v-c42c1631] .n-input:focus-within{box-shadow:0 0 0 2px #18a0581a}.empty-state[data-v-c42c1631]{display:flex;align-items:center;justify-content:center;height:100%;color:#999;font-size:14px}.section-title[data-v-c42c1631]{font-weight:600;font-size:14px;margin-bottom:12px;color:var(--designer-primary, #18a058)}.options-list[data-v-c42c1631]{width:100%;display:flex;flex-direction:column;gap:8px}.option-row[data-v-c42c1631]{display:flex;align-items:center;gap:8px}.option-input[data-v-c42c1631]{flex:1}.conditions-list[data-v-c42c1631]{width:100%;display:flex;flex-direction:column;gap:8px}.condition-row[data-v-c42c1631]{display:flex;align-items:center;gap:8px}.condition-select[data-v-c42c1631],.condition-input[data-v-c42c1631]{flex:1;min-width:0}.form-designer[data-v-74078ebc]{--designer-primary: #18a058;--designer-border: #e8e8e8;height:100%;display:flex;flex-direction:column;overflow:hidden}.designer-toolbar[data-v-74078ebc]{padding:12px 16px;background:#fafafa;border-bottom:1px solid #eee;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:flex;flex-direction:row;gap:8px;align-items:center;flex-shrink:0}.designer-body[data-v-74078ebc]{flex:1;overflow:hidden;position:relative}.designer-edit[data-v-74078ebc]{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:16px 24px}.save-area[data-v-74078ebc]{margin-top:24px;padding:0 0 16px}.preview-container[data-v-74078ebc]{flex:1;overflow-y:auto;padding:24px}.preview-header[data-v-74078ebc]{margin-bottom:16px}.preview-enter-active[data-v-74078ebc],.preview-leave-active[data-v-74078ebc]{transition:opacity .3s ease}.preview-enter-from[data-v-74078ebc],.preview-leave-to[data-v-74078ebc]{opacity:0}.error-text[data-v-712e5ea2]{color:#d93025;margin-top:4px;font-size:12px}
@@ -0,0 +1,24 @@
1
+ import type { FormDesignConfig } from '../types/designer';
2
+ type __VLS_Props = {
3
+ schema?: Record<string, any>;
4
+ uiSchema?: Record<string, any>;
5
+ modelValue?: Record<string, any>;
6
+ locale?: string;
7
+ mode?: 'render' | 'design';
8
+ designConfig?: FormDesignConfig;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
+ "update:modelValue": (value: Record<string, any>) => any;
12
+ validate: (valid: boolean, errors: Record<string, string>) => any;
13
+ "update:designConfig": (value: FormDesignConfig) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
16
+ onValidate?: ((valid: boolean, errors: Record<string, string>) => any) | undefined;
17
+ "onUpdate:designConfig"?: ((value: FormDesignConfig) => any) | undefined;
18
+ }>, {
19
+ schema: Record<string, any>;
20
+ modelValue: Record<string, any>;
21
+ locale: string;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ schema: Record<string, any>;
3
+ uiSchema?: Record<string, any>;
4
+ modelValue: any;
5
+ locale: string;
6
+ path?: string;
7
+ rootSchema?: Record<string, any>;
8
+ rootValue?: any;
9
+ errors?: Record<string, string>;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "update:modelValue": (value: any) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ show: boolean;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
+ select: (type: string) => any;
6
+ "update:show": (value: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onSelect?: ((type: string) => any) | undefined;
9
+ "onUpdate:show"?: ((value: boolean) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { FormFieldConfig } from '../../types/designer';
2
+ type __VLS_Props = {
3
+ fields: FormFieldConfig[];
4
+ selectedKey: string | null;
5
+ isEditing?: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ "update:fields": (value: FormFieldConfig[]) => any;
9
+ "update:selectedKey": (value: string | null) => any;
10
+ "select-field": (key: string) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onUpdate:fields"?: ((value: FormFieldConfig[]) => any) | undefined;
13
+ "onUpdate:selectedKey"?: ((value: string | null) => any) | undefined;
14
+ "onSelect-field"?: ((key: string) => any) | undefined;
15
+ }>, {
16
+ isEditing: boolean;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { FormFieldConfig } from '../../types/designer';
2
+ type __VLS_Props = {
3
+ field: FormFieldConfig | null;
4
+ allFields: FormFieldConfig[];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "update:field": (value: FormFieldConfig) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:field"?: ((value: FormFieldConfig) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { FormDesignConfig } from '../../types/designer';
2
+ type __VLS_Props = {
3
+ modelValue: FormDesignConfig;
4
+ locale?: string;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "update:modelValue": (value: FormDesignConfig) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: FormDesignConfig) => any) | undefined;
10
+ }>, {
11
+ locale: string;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as FormRenderer } from './components/FormRenderer.vue';
2
+ export { default as FormDesigner } from './components/designer/FormDesigner.vue';
3
+ export { configToSchema } from './utils/config-to-schema';
4
+ export type { FormDesignConfig, FormFieldConfig, FieldOption, VisibleIfCondition, VisibleIfRule, SchemaConvertResult } from './types/designer';
@@ -0,0 +1,51 @@
1
+ export interface FieldOption {
2
+ label: string | {
3
+ zh: string;
4
+ en: string;
5
+ };
6
+ value: string | number;
7
+ }
8
+ export interface VisibleIfCondition {
9
+ field: string;
10
+ operator: 'equals' | 'notEquals' | 'exists' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual';
11
+ value?: any;
12
+ }
13
+ export interface VisibleIfRule {
14
+ conditions?: VisibleIfCondition[];
15
+ logic?: 'allOf' | 'anyOf';
16
+ }
17
+ export interface FormFieldConfig {
18
+ key: string;
19
+ type: 'input' | 'textarea' | 'number' | 'select' | 'checkbox' | 'date' | 'file' | 'rich-text';
20
+ label: string | {
21
+ zh: string;
22
+ en: string;
23
+ };
24
+ description?: string | {
25
+ zh: string;
26
+ en: string;
27
+ };
28
+ required?: boolean;
29
+ placeholder?: string;
30
+ options?: FieldOption[];
31
+ props?: Record<string, any>;
32
+ visibleIf?: VisibleIfRule;
33
+ validation?: {
34
+ min?: number;
35
+ max?: number;
36
+ minLength?: number;
37
+ maxLength?: number;
38
+ pattern?: string;
39
+ };
40
+ }
41
+ export interface FormDesignConfig {
42
+ title?: string | {
43
+ zh: string;
44
+ en: string;
45
+ };
46
+ fields: FormFieldConfig[];
47
+ }
48
+ export interface SchemaConvertResult {
49
+ schema: Record<string, any>;
50
+ uiSchema: Record<string, any>;
51
+ }
@@ -0,0 +1,5 @@
1
+ import type { FormDesignConfig, SchemaConvertResult } from '../types/designer';
2
+ /**
3
+ * 将设计器配置转换为 FormRenderer 支持的 JSON Schema + uiSchema 格式
4
+ */
5
+ export declare function configToSchema(config: FormDesignConfig): SchemaConvertResult;