@farris/ui-vue 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/package.json +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/index.esm.js +1362 -1361
- package/components/border-editor/index.umd.cjs +6 -6
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +22 -21
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +1370 -1369
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +180 -179
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/package.json +1 -1
- package/components/data-grid/index.esm.js +22 -21
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +22 -21
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +52071 -0
- package/components/designer-canvas/index.umd.cjs +20 -0
- package/components/designer-canvas/package.json +8 -0
- package/components/designer-canvas/style.css +1 -0
- package/components/designer-outline/index.esm.js +22 -21
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +180 -179
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +3661 -3660
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.esm.js +1365 -1364
- package/components/external-container/index.umd.cjs +7 -7
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.esm.js +182 -181
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/index.esm.js +182 -181
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +22 -21
- package/components/flow-canvas/index.umd.cjs +7 -7
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +183 -182
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.esm.js +185 -184
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.esm.js +181 -180
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +182 -181
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/plugin/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +2810 -2810
- package/components/property-editor/index.umd.cjs +7 -7
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +180 -179
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/index.esm.js +182 -181
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.esm.js +22 -21
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/index.esm.js +22 -21
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.esm.js +939 -938
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +183 -182
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/tree-grid/index.esm.js +22 -21
- package/components/tree-grid/index.umd.cjs +7 -7
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +186 -185
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +26 -26
- package/farris.all.umd.cjs +2 -2
- package/package.json +1 -1
- package/types/property-editor/src/composition/use-initialized-value.d.ts +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(function(dt,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("bignumber.js"),require("@vueuse/core"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","bignumber.js","@vueuse/core","echarts"],e):(dt=typeof globalThis<"u"?globalThis:dt||self,e(dt["designer-canvas"]={},dt.Vue,dt.LodashES,dt.BigNumber,dt.VueUseCore,dt.echarts))})(this,function(dt,e,qe,Ae,Yn,Kp){"use strict";var YV=Object.defineProperty;var KV=(dt,e,qe)=>e in dt?YV(dt,e,{enumerable:!0,configurable:!0,writable:!0,value:qe}):dt[e]=qe;var P=(dt,e,qe)=>KV(dt,typeof e!="symbol"?e+"":e,qe);function Xp(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const sn=Xp(Kp),Rt=e.ref(0);function Qp(t,n){const o=n.getBoundingClientRect(),a=t.getBoundingClientRect(),r=a.top>=o.top,i=a.top<=o.bottom;return r&&i}function qo(t){if(!t)return;let n;if(t.className.includes("dgComponentSelected")?n=t:n=t.querySelector(".dgComponentSelected"),!n)return;const o=n.getBoundingClientRect();if(o.width===0&&o.height===0)return;const a=n.querySelector(".component-btn-group");if(a){if(!Qp(n,t)){a.style.display="none";return}a.style.display="";const i=a.getBoundingClientRect(),l=a.querySelector("div");if(l){const s=l.getBoundingClientRect();l.style.top=i.top+"px",l.style.left=i.left-s.width+"px"}}}const Ms={modelValue:{type:Object,default:{}}};var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Zp(t){if(t.__esModule)return t;var n=t.default;if(typeof n=="function"){var o=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};o.prototype=n.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,r.get?r:{enumerable:!0,get:function(){return t[a]}})}),o}function wn(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ps={exports:{}};(function(t,n){(function(o){t.exports=o()})(function(){return function(){function o(a,r,i){function l(c,d){if(!r[c]){if(!a[c]){var u=typeof wn=="function"&&wn;if(!d&&u)return u(c,!0);if(s)return s(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var g=r[c]={exports:{}};a[c][0].call(g.exports,function(m){var h=a[c][1][m];return l(h||m)},g,g.exports,o,a,r,i)}return r[c].exports}for(var s=typeof wn=="function"&&wn,p=0;p<i.length;p++)l(i[p]);return l}return o}()({1:[function(o,a,r){var i={},l="(?:^|\\s)",s="(?:\\s|$)";function p(u){var f=i[u];return f?f.lastIndex=0:i[u]=f=new RegExp(l+u+s,"g"),f}function c(u,f){var g=u.className;g.length?p(f).test(g)||(u.className+=" "+f):u.className=f}function d(u,f){u.className=u.className.replace(p(f)," ").trim()}a.exports={add:c,rm:d}},{}],2:[function(o,a,r){(function(i){var l=o("contra/emitter"),s=o("crossvent"),p=o("./classes"),c=document,d=c.documentElement;function u($,T){var S=arguments.length;S===1&&Array.isArray($)===!1&&(T=$,$=[]);var F,A,E,I,R,O,G,M,j,H=null,_,W,K=!1,z=0,q,L=T||{};L.moves===void 0&&(L.moves=v),L.accepts===void 0&&(L.accepts=v),L.invalid===void 0&&(L.invalid=Le),L.containers===void 0&&(L.containers=$||[]),L.isContainer===void 0&&(L.isContainer=b),L.copy===void 0&&(L.copy=!1),L.copySortSource===void 0&&(L.copySortSource=!1),L.revertOnSpill===void 0&&(L.revertOnSpill=!1),L.removeOnSpill===void 0&&(L.removeOnSpill=!1),L.direction===void 0&&(L.direction="vertical"),L.ignoreInputTextSelection===void 0&&(L.ignoreInputTextSelection=!0),L.mirrorContainer===void 0&&(L.mirrorContainer=c.body);var X=l({containers:L.containers,start:Me,end:Ce,cancel:se,remove:Ge,destroy:ge,canMove:fe,dragging:!1});return L.removeOnSpill===!0&&X.on("over",Ue).on("out",be),Z(),X;function U(Y){return X.containers.indexOf(Y)!==-1||L.isContainer(Y)}function Z(Y){var ne=Y?"remove":"add";m(d,ne,"mousedown",te),m(d,ne,"mouseup",he)}function re(Y){var ne=Y?"remove":"add";m(d,ne,"mousemove",J)}function de(Y){var ne=Y?"remove":"add";s[ne](d,"selectstart",ie),s[ne](d,"click",ie)}function ge(){Z(!0),he({})}function ie(Y){_&&Y.preventDefault()}function te(Y){I=Y.clientX,R=Y.clientY;var ne=h(Y)!==1||Y.metaKey||Y.ctrlKey;if(!ne){var ce=Y.target,ue=le(ce);ue&&(_=ue,re(),Y.type==="mousedown"&&(N(ce)?ce.focus():Y.preventDefault()))}}function J(Y){if(_){if(h(Y)===0){he({});return}if(!(Y.clientX!==void 0&&Math.abs(Y.clientX-I)<=(L.slideFactorX||0)&&Y.clientY!==void 0&&Math.abs(Y.clientY-R)<=(L.slideFactorY||0))){if(L.ignoreInputTextSelection){var ne=B("clientX",Y)||0,ce=B("clientY",Y)||0,ue=c.elementFromPoint(ne,ce);if(N(ue))return}var Te=_;re(!0),de(),Ce(),Ie(Te),p.add(M||E,"gu-transit"),st(),Xe(),z=0,Ye(Y)}}}function le(Y){if(!(X.dragging&&F)&&!U(Y)){for(var ne=Y;w(Y)&&U(w(Y))===!1;)if(L.invalid(Y,ne)||(Y=w(Y),!Y))return;var ce=w(Y);if(ce&&!L.invalid(Y,ne)){var ue=L.moves(Y,ce,ne,D(Y));if(ue)return{item:Y,source:ce}}}}function fe(Y){return!!le(Y)}function Me(Y){var ne=le(Y);ne&&Ie(ne)}function Ie(Y){oe(Y.item,Y.source)&&(M=Y.item.cloneNode(!0),X.emit("cloned",M,Y.item,"copy")),A=Y.source,E=Y.item,O=G=D(Y.item),X.dragging=!0,X.emit("drag",E,A)}function Le(){return!1}function Ce(){if(X.dragging){var Y=M||E;De(Y,w(Y))}}function pe(){_=!1,re(!0),de(!0)}function he(Y){if(pe(),!!X.dragging){var ne=M||E,ce=B("clientX",Y)||0,ue=B("clientY",Y)||0,Te=y(F,ce,ue),Oe=Pe(Te,ce,ue);Oe&&(M&&L.copySortSource||!M||Oe!==A)?De(ne,Oe):L.removeOnSpill?Ge():se()}}function De(Y,ne){var ce=w(Y);M&&L.copySortSource&&ne===A&&ce.removeChild(E),Ve(ne)?X.emit("cancel",Y,A):X.emit("drop",Y,ne,A,G),ye()}function Ge(){if(X.dragging){var Y=M||E,ne=w(Y);ne&&ne.removeChild(Y),X.emit(M?"cancel":"remove",Y,ne,A),ye()}}function se(Y){if(X.dragging){var ne=arguments.length>0?Y:L.revertOnSpill,ce=M||E,ue=w(ce),Te=Ve(ue);Te===!1&&ne&&(M?ue&&ue.removeChild(M):A.insertBefore(ce,O)),Te||ne?X.emit("cancel",ce,A,A):X.emit("drop",ce,ue,A,G),ye()}}function ye(){var Y=M||E;pe(),bt(),lt(),Y&&p.rm(Y,"gu-transit"),j&&clearTimeout(j),X.dragging=!1,H&&X.emit("out",Y,H,A),X.emit("dragend",Y,z),A=E=M=O=G=j=H=null}function Ve(Y,ne){var ce;return ne!==void 0?ce=ne:F?ce=G:ce=D(M||E),Y===A&&ce===O}function Pe(Y,ne,ce){for(var ue=Y;ue&&!Te();)ue=w(ue);return ue;function Te(){var Oe=U(ue);if(Oe===!1)return!1;var Je=ct(ue,Y),ft=Ke(ue,Je,ne,ce),Nt=Ve(ue,ft);return Nt?!0:L.accepts(E,ue,A,ft)}}function Ye(Y){if(!F)return;Y.preventDefault();var ne=B("clientX",Y)||0,ce=B("clientY",Y)||0;F.style.left=ne-2+"px",F.style.top=ce-2+"px";var ue=M||E,Te=y(F,ne,ce),Oe=Pe(Te,ne,ce),Je=Oe!==null&&Oe!==H;(Je||Oe===null)&&(St(),H=Oe,Pt()),Tt(Te,ce);var ft=w(ue);if(Oe===A&&M&&!L.copySortSource){ft&&ft.removeChild(ue);return}var Nt,Vt=ct(Oe,Te);if(K=$t(Vt,Oe),Vt!==null)Nt=Ke(Oe,Vt,ne,ce);else if(L.revertOnSpill===!0&&!M)Nt=O,Oe=A;else{M&&ft&&ft.removeChild(ue),M&&W&&(W.style.display="none");return}W.style.display="block",Ze(Nt,ue,Je),Nt?We(Vt,Nt):Dt(Oe);function pt(vt){X.emit(vt,ue,H,A)}function Pt(){Je&&pt("over")}function St(){H&&pt("out")}}function Ze(Y,ne,ce){(Y===ne||Y===D(ne))&&(G=D(ne)),(Y===null&&ce||Y!==ne&&Y!==D(ne))&&(G=Y)}function Ue(Y){p.rm(Y,"gu-hide")}function be(Y){X.dragging&&p.add(Y,"gu-hide")}function Xe(){F||(F=document.createElement("div"),F.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",F.innerHTML=L.getMirrorText&&L.getMirrorText(E)||"控件",p.add(F,"gu-mirror"),L.mirrorContainer.appendChild(F),m(d,"add","mousemove",Ye),p.add(L.mirrorContainer,"gu-unselectable"),X.emit("cloned",F,E,"mirror"))}function st(){if(W=document.createElement("div"),p.add(W,"gu-insertion"),E){var Y=E.getBoundingClientRect();W.style.left=Y.left+"px",W.style.top=Y.top+"px"}K=!1,L.mirrorContainer.appendChild(W)}function bt(){F&&(p.rm(L.mirrorContainer,"gu-unselectable"),m(d,"remove","mousemove",Ye),w(F).removeChild(F),F=null)}function lt(){W&&(w(W).removeChild(W),W=null)}function ct(Y,ne){for(var ce=ne;ce!==Y&&w(ce)!==Y;)ce=w(ce);return ce===d?null:ce}function $t(Y,ne){if(!ne)return K;var ce=Y||ne&&ne.lastElementChild;if(!ce)return!0;var ue=getComputedStyle(Y),Te=/^inline/.test(ue.getPropertyValue("display"))||/^(left|right)$/.test(ue.getPropertyValue("float"));if(Te)return!0;if(ne){var Oe=getComputedStyle(ne),Je=Oe.getPropertyValue("display");if(/flex$/.test(Je)){var ft=Oe.getPropertyValue("flex-direction")||"row";if(ft==="row"||ft==="row-reverse")return!wt(ne)}return!1}return!0}function wt(Y){if(!Y.children||!Y.children.length)return!1;for(const ne of Array.from(Y.children)){const ue=(ne.className&&ne.className.split(" ")||[]).filter(Te=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Te));if(!ue.length)return!1;for(const Te of ue){const Oe=Te.slice(Te.lastIndexOf("-")+1);if(parseInt(Oe,10)!==12)return!1}}return!0}function We(Y,ne){const ce=ne.getBoundingClientRect();if(W.style.left=ce.left+"px",W.style.top=ce.top+"px",K){if(W.style.height=ce.height+"px",W.style.width="4px",Y){const ue=Y.getBoundingClientRect();ue.top!==ce.top&&(W.style.left=ue.right+"px",W.style.top=ue.top+"px",W.style.height=ue.height+"px")}}else if(W.style.height="4px",W.style.width=ce.width+"px",q){const ue=q.getBoundingClientRect();ce.top<ue.top&&(W.style.display="none")}ne===E&&E&&(W.style.display="none")}function Dt(Y){G=null;var ne=Y.lastElementChild;if(ne){var ce=ne.getBoundingClientRect();K?(W.style.left=ce.right+"px",W.style.top=ce.top+"px",W.style.height=ce.height+"px",W.style.width="4px"):(W.style.left=ce.left+"px",W.style.top=ce.bottom+"px",W.style.height="4px",W.style.width=ce.width+"px"),ne===E&&E&&(W.style.display="none")}else W.style.display="none"}function Tt(Y,ne){if(!L.mirrorContainer.contains(Y)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(q=f(Y),!q||!q.contains(Y)))return;const ce=document.querySelector(".dgComponentSelected"),ue=q.getBoundingClientRect();if(ne-30<ue.top&&q.scrollTop>0){let Te=q.scrollTop<10?q.scrollTop:10;q.scrollBy(0,-1*Te),ce&&q.contains(ce)&&(z=z+-1*Te)}if(ne+30>ue.bottom&&q.scrollTop<q.scrollHeight-q.clientHeight){const Te=q.scrollHeight-q.clientHeight-q.scrollTop;let Oe=Te<10?Te:10;q.scrollBy(0,Oe),ce&&q.contains(ce)&&(z=z+Oe)}}function Ke(Y,ne,ce,ue){var Te=L.direction==="horizontal",Oe=L.direction==="mixed",Je=ne!==Y?Nt():ft();return Je;function ft(){var pt=Y.children.length,Pt,St,vt;for(Pt=0;Pt<pt;Pt++)if(St=Y.children[Pt],vt=St.getBoundingClientRect(),Te&&vt.left+vt.width/2>ce||!Oe&&!Te&&vt.top+vt.height/2>ue||Oe&&vt.left+vt.width>ce&&vt.top+vt.height>ue)return St;return null}function Nt(){var pt=ne.getBoundingClientRect();if(Oe){var Pt=ue-pt.top,St=ce-pt.left,vt=pt.bottom-ue,Lo=pt.right-ce,Wo=Math.min(St,Lo,Pt,vt),Un;return K?Un=Lo<St:Un=vt===Wo||Lo===Wo||St===Wo,Vt(Un)}return Vt(Te?ce>pt.left+x(pt)/2:ue>pt.top+C(pt)/2)}function Vt(pt){return pt?D(ne):ne}}function oe(Y,ne){return typeof L.copy=="boolean"?L.copy:L.copy(Y,ne)}}function f($){const T=Array.from(window.scrollContainerList);if(T.length===1){const F=Array.from(window.scrollContainerList)[0];return document.getElementById(F)}const S=g(T);for(const F of S)if(F.contains($))return F;return null}function g($){const T=[];return $.forEach(S=>{const F=document.getElementById(S);F&&T.push(F)}),T.sort((S,F)=>S.contains(F)?1:F.contains(S)?-1:0),T}function m($,T,S,F){var A={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},E={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},I={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};i.navigator.pointerEnabled?s[T]($,E[S],F):i.navigator.msPointerEnabled?s[T]($,I[S],F):(s[T]($,A[S],F),s[T]($,S,F))}function h($){if($.touches!==void 0)return $.touches.length;if($.which!==void 0&&$.which!==0)return $.which;if($.buttons!==void 0)return $.buttons;var T=$.button;if(T!==void 0)return T&1?1:T&2?3:T&4?2:0}function y($,T,S){$=$||{};var F=$.className||"",A;return $.className+=" gu-hide",A=c.elementFromPoint(T,S),$.className=F,A}function b(){return!1}function v(){return!0}function x($){return $.width||$.right-$.left}function C($){return $.height||$.bottom-$.top}function w($){return $.parentNode===c?null:$.parentNode}function N($){return $.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.tagName==="SELECT"||V($)}function V($){return!$||$.contentEditable==="false"?!1:$.contentEditable==="true"?!0:V(w($))}function D($){return $.nextElementSibling||T();function T(){var S=$;do S=S.nextSibling;while(S&&S.nodeType!==1);return S}}function k($){return $.targetTouches&&$.targetTouches.length?$.targetTouches[0]:$.changedTouches&&$.changedTouches.length?$.changedTouches[0]:$}function B($,T){var S=k(T),F={pageX:"clientX",pageY:"clientY"};return $ in F&&!($ in S)&&F[$]in S&&($=F[$]),S[$]}a.exports=u}).call(this,typeof Fe<"u"?Fe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,a,r){a.exports=function(l,s){return Array.prototype.slice.call(l,s)}},{}],4:[function(o,a,r){var i=o("ticky");a.exports=function(s,p,c){s&&i(function(){s.apply(c||null,p||[])})}},{ticky:10}],5:[function(o,a,r){var i=o("atoa"),l=o("./debounce");a.exports=function(p,c){var d=c||{},u={};return p===void 0&&(p={}),p.on=function(f,g){return u[f]?u[f].push(g):u[f]=[g],p},p.once=function(f,g){return g._once=!0,p.on(f,g),p},p.off=function(f,g){var m=arguments.length;if(m===1)delete u[f];else if(m===0)u={};else{var h=u[f];if(!h)return p;h.splice(h.indexOf(g),1)}return p},p.emit=function(){var f=i(arguments);return p.emitterSnapshot(f.shift()).apply(this,f)},p.emitterSnapshot=function(f){var g=(u[f]||[]).slice(0);return function(){var m=i(arguments),h=this||p;if(f==="error"&&d.throws!==!1&&!g.length)throw m.length===1?m[0]:m;return g.forEach(function(b){d.async?l(b,m,h):b.apply(h,m),b._once&&p.off(f,b)}),p}},p}},{"./debounce":4,atoa:3}],6:[function(o,a,r){(function(i){var l=o("custom-event"),s=o("./eventmap"),p=i.document,c=f,d=m,u=[];i.addEventListener||(c=g,d=h),a.exports={add:c,remove:d,fabricate:y};function f(w,N,V,D){return w.addEventListener(N,V,D)}function g(w,N,V){return w.attachEvent("on"+N,v(w,N,V))}function m(w,N,V,D){return w.removeEventListener(N,V,D)}function h(w,N,V){var D=x(w,N,V);if(D)return w.detachEvent("on"+N,D)}function y(w,N,V){var D=s.indexOf(N)===-1?B():k();w.dispatchEvent?w.dispatchEvent(D):w.fireEvent("on"+N,D);function k(){var $;return p.createEvent?($=p.createEvent("Event"),$.initEvent(N,!0,!0)):p.createEventObject&&($=p.createEventObject()),$}function B(){return new l(N,{detail:V})}}function b(w,N,V){return function(k){var B=k||i.event;B.target=B.target||B.srcElement,B.preventDefault=B.preventDefault||function(){B.returnValue=!1},B.stopPropagation=B.stopPropagation||function(){B.cancelBubble=!0},B.which=B.which||B.keyCode,V.call(w,B)}}function v(w,N,V){var D=x(w,N,V)||b(w,N,V);return u.push({wrapper:D,element:w,type:N,fn:V}),D}function x(w,N,V){var D=C(w,N,V);if(D){var k=u[D].wrapper;return u.splice(D,1),k}}function C(w,N,V){var D,k;for(D=0;D<u.length;D++)if(k=u[D],k.element===w&&k.type===N&&k.fn===V)return D}}).call(this,typeof Fe<"u"?Fe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,a,r){(function(i){var l=[],s="",p=/^on/;for(s in i)p.test(s)&&l.push(s.slice(2));a.exports=l}).call(this,typeof Fe<"u"?Fe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,a,r){(function(i){var l=i.CustomEvent;function s(){try{var p=new l("cat",{detail:{foo:"bar"}});return p.type==="cat"&&p.detail.foo==="bar"}catch{}return!1}a.exports=s()?l:typeof document<"u"&&typeof document.createEvent=="function"?function(c,d){var u=document.createEvent("CustomEvent");return d?u.initCustomEvent(c,d.bubbles,d.cancelable,d.detail):u.initCustomEvent(c,!1,!1,void 0),u}:function(c,d){var u=document.createEventObject();return u.type=c,d?(u.bubbles=!!d.bubbles,u.cancelable=!!d.cancelable,u.detail=d.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof Fe<"u"?Fe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,a,r){var i=a.exports={},l,s;function p(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?l=setTimeout:l=p}catch{l=p}try{typeof clearTimeout=="function"?s=clearTimeout:s=c}catch{s=c}})();function d(C){if(l===setTimeout)return setTimeout(C,0);if((l===p||!l)&&setTimeout)return l=setTimeout,setTimeout(C,0);try{return l(C,0)}catch{try{return l.call(null,C,0)}catch{return l.call(this,C,0)}}}function u(C){if(s===clearTimeout)return clearTimeout(C);if((s===c||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(C);try{return s(C)}catch{try{return s.call(null,C)}catch{return s.call(this,C)}}}var f=[],g=!1,m,h=-1;function y(){!g||!m||(g=!1,m.length?f=m.concat(f):h=-1,f.length&&b())}function b(){if(!g){var C=d(y);g=!0;for(var w=f.length;w;){for(m=f,f=[];++h<w;)m&&m[h].run();h=-1,w=f.length}m=null,g=!1,u(C)}}i.nextTick=function(C){var w=new Array(arguments.length-1);if(arguments.length>1)for(var N=1;N<arguments.length;N++)w[N-1]=arguments[N];f.push(new v(C,w)),f.length===1&&!g&&d(b)};function v(C,w){this.fun=C,this.array=w}v.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function x(){}i.on=x,i.addListener=x,i.once=x,i.off=x,i.removeListener=x,i.removeAllListeners=x,i.emit=x,i.prependListener=x,i.prependOnceListener=x,i.listeners=function(C){return[]},i.binding=function(C){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(C){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],10:[function(o,a,r){(function(i){var l=typeof i=="function",s;l?s=function(p){i(p)}:s=function(p){setTimeout(p,0)},a.exports=s}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,a,r){(function(i,l){var s=o("process/browser.js").nextTick,p=Function.prototype.apply,c=Array.prototype.slice,d={},u=0;r.setTimeout=function(){return new f(p.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new f(p.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(g){g.close()};function f(g,m){this._id=g,this._clearFn=m}f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(g,m){clearTimeout(g._idleTimeoutId),g._idleTimeout=m},r.unenroll=function(g){clearTimeout(g._idleTimeoutId),g._idleTimeout=-1},r._unrefActive=r.active=function(g){clearTimeout(g._idleTimeoutId);var m=g._idleTimeout;m>=0&&(g._idleTimeoutId=setTimeout(function(){g._onTimeout&&g._onTimeout()},m))},r.setImmediate=typeof i=="function"?i:function(g){var m=u++,h=arguments.length<2?!1:c.call(arguments,1);return d[m]=!0,s(function(){d[m]&&(h?g.apply(null,h):g.call(null),r.clearImmediate(m))}),m},r.clearImmediate=typeof l=="function"?l:function(g){delete d[g]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Ps);var Jp=Ps.exports;const Os=zo(Jp);function em(){let t;function n(g,m,h){const y={};return y.sourceElement=g,y.sourceContainer=h,y.targetContainer=m,y.sourceType=g.getAttribute("data-sourceType")||"move",y.controlType=g.getAttribute("data-controlType"),y.controlTypeName=g.getAttribute("data-controlTypeName"),y.controlCategory=g.getAttribute("data-category"),y.controlFeature=g.getAttribute("data-feature"),y.parentComponentInstance=m.componentInstance,y.controlCategory==="input"?y.bindingType="field":y.controlCategory==="dataCollection"&&(y.bindingType="entity"),g.componentInstance&&(y.controlType=g.componentInstance.value.schema.type,y.controlCategory=g.componentInstance.value.schema.category),y}function o(g,m,h){if(g.contains(m)||m.classList.contains("no-drop"))return!1;const y=!0;if(g.componentInstance&&g.componentInstance.value.getDragScopeElement){const b=g.componentInstance.value.getDragScopeElement();if(b&&!b.contains(m))return!1}if(m.componentInstance&&m.componentInstance.value.canAccepts){const b=n(g,m,h);return m.componentInstance.value.canAccepts(b)}return y}function a(g,m){const h=m.getBoundingClientRect(),y=g.getBoundingClientRect(),b=y.top>=h.top,v=y.top<h.bottom;return b&&v}function r(g,m){const h=g.querySelector(".dgComponentSelected");if(!(!h||m===0)&&a(h,g)){const y=h.querySelector(".component-btn-group");if(y){const b=y.querySelector("div");if(b&&b.style.top){const v=Number.parseFloat(b.style.top);b.style.top=v-m+"px"}}}}function i(g,m,h){g.componentInstance;let y=-1;if(!m)return-1;if(g.componentInstance.value.contents){if(h&&h.componentInstance){if(h.getAttribute("data-noattach"))y=Number(h.getAttribute("data-position"));else{const b=h.componentInstance.value.schema;let v={id:b.id};b.type==="Component"&&(v={component:b.id}),y=qe.findIndex(g.componentInstance.value.contents,v),y=y===-1?0:y}y!==-1&&g.componentInstance.value.contents.splice(y,0,m)}else g.componentInstance.value.contents.push(m);g.componentInstance.value.updateDragAndDropRules()}return y}function l(g,m){if(!g.componentInstance.value.contents)return-1;if(g.componentInstance.value.contents.length===0)return 0;if(!m||!m.componentInstance)return g.componentInstance.value.contents.length;if(m.getAttribute("data-noattach"))return Number(m.getAttribute("data-position"));const h=m.componentInstance.value.schema;let y;h.type==="Component"?y={component:h.id}:y={id:h.id};let b=qe.findIndex(g.componentInstance.value.contents,y);return b=b===-1?0:b,b}function s(g,m,h,y){if(m.componentInstance.value.addNewChildComponentSchema){const b=l(m,y),v=String(g.getAttribute("data-controltype")),x=g.getAttribute("data-feature"),C=String(g.innerText),w=m.componentInstance.value,N={componentType:v,label:C,parentComponentInstance:w,targetPosition:b},V=x?JSON.parse(x):{},D=Object.assign(N,V),k=m.componentInstance.value.addNewChildComponentSchema(D);i(m,k,y)}m.contains(g)&&m.removeChild(g)}function p(g,m,h,y){let b,v=-1;if(g.componentInstance&&g.componentInstance.value.triggerBelongedComponentToMoveWhenMoved){const w=g.componentInstance.value.getBelongedComponentInstance(g.componentInstance);w&&(g=e.ref(w.elementRef).value.parentElement,h=g.parentElement)}const x=g.componentInstance&&g.componentInstance.value.schema,C={id:x&&x.id};v=qe.findIndex(h.componentInstance.value.contents,C),v!==-1&&h.componentInstance.value.contents&&(b=h.componentInstance.value.contents.splice(v,1),b=b[0]),i(m,b,y),h.componentInstance&&h.componentInstance.value.onChildElementMovedOut&&h.componentInstance.value.onChildElementMovedOut(g),m.componentInstance&&m.componentInstance.value.onAcceptMovedChildElement&&m.componentInstance.value.onAcceptMovedChildElement(g,h)}function c(g,m,h,y){if(!m||g.contains(m))return;switch(g.getAttribute("data-sourceType")){case"control":case"field":case"entity":{s(g,m,h,y);break}default:h.componentInstance.value.contents?p(g,m,h,y):m.contains(g)&&m.removeChild(g)}Rt.value++}function d(g){t&&t.destroy(),Os&&(t=Os([],{mirrorContainer:g,direction:"mixed",revertOnSpill:!0,moves(m,h,y){let b=!0;return m.classList.contains("no-drag")&&(b=!1),m.componentInstance&&(b=!!y.getAttribute("data-dragging-icon")),b},copy(m){return m.classList.contains("drag-copy")},getMirrorText(m){return m.componentInstance&&m.componentInstance.value.getDraggingDisplayText?m.componentInstance.value.getDraggingDisplayText():m.innerText||"控件"},accepts(m,h,y){const b=o(m,h,y),v=g.lastElementChild;return b?v.className=v.className.replace("undroppable",""):v.className.includes("undroppable")||(v.className+=" undroppable"),b}}).on("over",(m,h)=>{h.className+=" drag-over"}).on("out",(m,h)=>{h.className=h.className.replace("drag-over","").replace(" ","")}).on("drop",(m,h,y,b)=>{c(m,h,y,b)}).on("dragend",(m,h)=>{r(m,h)}))}function u(g,m){if(!g)return;if(m.noDragDrop)return g;const h=g.querySelector(`[data-dragref='${m.id}-container']`)||g;t&&h&&t.containers.push(h)}function f(){if(!t)return;const g=document.getElementsByClassName("controlCategory");g&&(t.containers=t.containers.filter(m=>!m.className.includes("controlCategory")),Array.from(g).forEach(m=>{t.containers.push(m)}))}return{attachComponents:u,attachToolbox:f,initializeDragula:d}}const Rs={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},Kn={},js={};function Go(t){const{properties:n,title:o}=t,a=Object.keys(n).reduce((r,i)=>(r[i]=n[i].type==="object"&&n[i].properties?Go(n[i]):qe.cloneDeep(n[i].default),r),{});return a.id=`${o}-${Date.now()}`,a}function mt(t,n={}){const o=Kn[t];if(o){let a=Go(o);const r=js[t];return a=r?r({getSchemaByType:mt},a,n):a,a}return null}function _s(t,n){const o=Go(n);return Object.keys(t).reduce((a,r)=>(a[r]=t[r],a),o),o}function tm(t,n){return Object.keys(t).filter(a=>t[a]!=null).reduce((a,r)=>{if(n.has(r)){const i=n.get(r);if(typeof i=="string")a[i]=t[r];else{const l=i(r,t[r],t);Object.assign(a,l)}}else a[r]=t[r];return a},{})}function nm(t,n,o=new Map){const a=_s(t,n);return tm(a,o)}function Hs(t){const n=t.type;if(n){const o=Kn[n];return _s(t,o)}return t}function om(t={}){function n(c,d,u,f){if(typeof u=="number")return f[c].length===u;if(typeof u=="object"){const g=Object.keys(u)[0],m=u[g];if(g==="not")return Number(f[c].length)!==Number(m);if(g==="moreThan")return Number(f[c].length)>=Number(m);if(g==="lessThan")return Number(f[c].length)<=Number(m)}return!1}function o(c,d,u,f){return f[c]&&f[c].propertyValue&&String(f[c].propertyValue.value)===String(u)}const a=new Map([["length",n],["getProperty",o]]);Object.keys(t).reduce((c,d)=>(c.set(d,t[d]),c),a);function r(c,d){const u=c;return typeof d=="number"?[{target:u,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:u,operator:"getProperty",param:c,value:!!d}]:typeof d=="object"?Object.keys(d).map(f=>{if(f==="length")return{target:u,operator:"length",param:null,value:d[f]};const g=f,m=d[f];return{target:u,operator:"getProperty",param:g,value:m}}):[]}function i(c){return Object.keys(c).reduce((u,f)=>{const g=r(f,c[f]);return u.push(...g),u},[])}function l(c,d){if(a.has(c.operator)){const u=a.get(c.operator);return u&&u(c.target,c.param,c.value,d)||!1}return!1}function s(c,d){return i(c).reduce((g,m)=>g&&l(m,d),!0)}function p(c,d){const u=Object.keys(c),f=u.includes("allOf"),g=u.includes("anyOf"),m=f||g,b=(m?c[m?f?"allOf":"anyOf":"allOf"]:[c]).map(x=>s(x,d));return f?!b.includes(!1):b.includes(!0)}return{parseValueSchema:p}}const am={convertTo:(t,n,o,a)=>{t.appearance&&(t.appearance[n]=o)},convertFrom:(t,n,o)=>t.appearance?t.appearance[n]:t[n]},rm={convertFrom:(t,n,o)=>t.buttons&&t.buttons.length?`共 ${t.buttons.length} 项`:"无"},im={convertTo:(t,n,o,a)=>{t.editor&&(t.editor[n]=o)},convertFrom:(t,n,o)=>t.editor?t.editor[n]:t[n]};class sm{constructor(){P(this,"label","");P(this,"id","");P(this,"columnInSM",12);P(this,"columnInMD",6);P(this,"columnInLG",3);P(this,"columnInEL",2);P(this,"displayWidthInSM",1);P(this,"displayWidthInMD",1);P(this,"displayWidthInLG",1);P(this,"displayWidthInEL",1);P(this,"displayColumnCountAtBreakPoint","md");P(this,"tagRow",0);P(this,"showTopBorder",0);P(this,"group",1);P(this,"isSupportedClass",!0);P(this,"fieldSetId","")}}function lm(){let t,n;const o=new Map;let a=[];function r(p,c){const u=p.split(" ").filter(y=>y.startsWith("col-"));if(u.length===0){c.isSupportedClass=!1;return}let f=u.find(y=>/^col-([1-9]|10|11|12)$/.test(y)),g=u.find(y=>/^col-md-([1-9]|10|11|12)$/.test(y)),m=u.find(y=>/^col-xl-([1-9]|10|11|12)$/.test(y)),h=u.find(y=>/^col-el-([1-9]|10|11|12)$/.test(y));f=f||"col-12",c.columnInSM=parseInt(f.replace("col-",""),10),c.displayWidthInSM=c.columnInSM/12,c.displayWidthInSM!==1&&(c.isSupportedClass=!1),g=g||"col-md-"+c.columnInSM,c.columnInMD=parseInt(g.replace("col-md-",""),10),c.displayWidthInMD=c.columnInMD/6,[1,2].includes(c.displayWidthInMD)||(c.isSupportedClass=!1),m=m||"col-xl-"+c.columnInMD,c.columnInLG=parseInt(m.replace("col-xl-",""),10),c.displayWidthInLG=c.columnInLG/3,[1,2,3,4].includes(c.displayWidthInLG)||(c.isSupportedClass=!1),h=h||"col-el-"+c.columnInLG,c.columnInEL=parseInt(h.replace("col-el-",""),10),c.displayWidthInEL=c.columnInEL/2,[1,2,3,4,5,6].includes(c.displayWidthInEL)||(c.isSupportedClass=!1)}function i(p,c,d,u=!1){let f=!1;p.contents.forEach(g=>{if(g.type==="FieldSet"){d+=1,i(g,c,d,!0),f=!0;return}f&&(d+=1,f=!1);const m=g.appearance&&g.appearance.class,h=new sm;m?r(m,h):h.isSupportedClass=!1,h.label=g.label||g.id,h.id=g.id,h.group=d,u&&(h.fieldSetId=p.id),n===g.id&&(t=d),o.set(g.id,g),c.push(h)})}function l(p,c,d){const u=p.id,f=d.closest(u,"response-form");if(!f)return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};if(!f||!f.contents||f.contents.length===0)return{result:!1,message:"Form区域内没有控件,请先添加控件"};n=p.id,a=[],o.clear();const g=f.contents[0].type==="FieldSet"?0:1;i(f,a,g);const m=a.find(y=>!y.isSupportedClass);return{defaultState:{defaultGroupNumber:t||1,model:m?"customize":"standard"},importData:a}}function s(p,c,d,u){const f=p.id,g=u.closest(f,"response-form");if(!g)return;const m=[];return d.forEach(h=>{var v;const y=o.get(h.id),b=y.appearance&&y.appearance.class;if(b){const C=b.split(" ").filter(B=>!B.startsWith("col-")),w="col-"+h.columnInSM,N="col-md-"+h.columnInMD,V="col-xl-"+h.columnInLG,D="col-el-"+h.columnInEL,k=[w,N,V,D].concat(C);y.appearance.class=k.join(" ")}if(h.fieldSetId){const x=g.contents.find(w=>w.id===h.fieldSetId),C=m.find(w=>w.id===h.fieldSetId);C?(v=C.contents)==null||v.push(y):(m.push(x),x.contents=[y])}else m.push(y)}),g.contents=m,g.id}return{convertFrom:l,convertTo:s}}const Ls=lm(),cm={convertTo:(t,n,o,a)=>Ls.convertTo(t,n,o,a),convertFrom:(t,n,o)=>Ls.convertFrom(t,n,o)},Xn={},Ws=new Map([["/converter/appearance.converter",am],["/converter/buttons.converter",rm],["/converter/property-editor.converter",im],["/converter/response-form-layout.converter",cm]]),dm={},um=new Map([["string",{type:"input-group",enableClear:!1}],["boolean",{type:"combo-list",textField:"name",valueField:"value",maxHeight:64,data:[{value:!0,name:"是"},{value:!1,name:"否"}]}],["enum",{type:"combo-list",maxHeight:128,enableClear:!1}],["array",{type:"button-edit"}],["number",{type:"number-spinner"}]]),fm=om();function qs(t,n){return()=>fm.parseValueSchema(t,n)}function pm(t,n,o){return t.includes("visible")?typeof n.visible=="boolean"?()=>!!n.visible:qs(n.visible,o):()=>!0}function mm(t,n,o){return t.includes("readonly")?typeof n.visible=="boolean"?()=>!!n.visible:qs(n.readonly,o):()=>!1}function hm(t){const{$converter:n}=t;return n&&Ws.has(n)&&Ws.get(n)||null}function Uo(t,n,o,a,r){return Object.keys(t).map(l=>{const s=e.ref(1),p=l,c=t[l],d=Object.keys(c),u=c.title,f=c.type,g=um.get(f)||{type:"input-group",enableClear:!1},m=c.editor?Object.assign({},g,c.editor):g,h=pm(d,c,n),y=mm(d,c,n),b=c.type==="cascade"?Uo(c.properties,n,o,a,r):[],v=!0,x=hm(c),C=e.computed({get(){return s.value?x&&x.convertFrom?x.convertFrom(o,l,r):o[l]:null},set(N){s.value+=1,x&&x.convertTo?(x.convertTo(a,l,N,r),x.convertTo(o,l,N,r)):(a[l]=N,o[l]=N)}}),w={propertyID:p,propertyName:u,propertyType:f,propertyValue:C,editor:m,visible:h,readonly:y,cascadeConfig:b,hideCascadeTitle:v};return n[p]=w,w})}function gm(t,n,o,a){const r=n.$ref.schema,i=n.$ref.converter,l=o[r],s=l.type,p=Hs(l),c={},d=Xn[s];if(d&&d.categories){const u=d.categories[t],f=u==null?void 0:u.title;i&&Object.keys(u.properties).forEach(h=>{u.properties[h].$converter=i});const g=(u==null?void 0:u.properties)||{},m=Uo(g,c,p,l,a);return{categoryId:t,categoryName:f,properties:m}}return{categoryId:t,categoryName:"",properties:[]}}function zs(t,n,o){const a=t.type,r=Hs(t),i={},l=o||Xn[a];return l&&l.categories?Object.keys(l.categories).map(p=>{const c=l.categories[p];if(c.$ref)return gm(p,c,t,n);const d=c==null?void 0:c.title,u=Uo(c.properties||{},i,r,t,n);return{categoryId:p,categoryName:d,properties:u}}).filter(p=>!!p):[]}function me(t,n,o=new Map,a=(l,s,p)=>s,r={},i=l=>l){return Kn[n.title]=n,js[n.title]=a,Xn[n.title]=r,dm[n.title]=i,(l={})=>{const s=nm(l,n,o),p=Object.keys(t).reduce((c,d)=>(c[d]=t[d].default,c),{});return Object.assign(p,s)}}function xe(t,n){return{customClass:n.class}}function ym(t,n){return{buttons:n.buttons}}const Gs=new Map([["appearance",xe],["size",(t,n)=>{const o={};return n.width&&(o.width=Number(n.width)),n.height&&(o.height=Number(n.height)),o}]]),bm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion.schema.json",title:"accordion",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion",type:"string"},type:{description:"The type string of Accordion component",type:"string",default:"accordion"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},customClass:{description:"",type:"string",default:""},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},enableFold:{description:"",type:"boolean",default:!0},expanded:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]};function vm(t,n,o){return n}const xm={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Yo={customClass:{type:String,default:""},height:{type:Number},width:{type:Number},enableFold:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1}},Us=me(Yo,bm,Gs,vm,xm),Ko=e.defineComponent({name:"FAccordion",props:Yo,emits:[],setup(t,n){const o=e.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""})),a=e.computed(()=>{const r=t.customClass.split(" "),i={"farris-panel":!0,accordion:!0};return r.reduce((l,s)=>(l[s]=!0,l),i),i});return()=>e.createVNode("div",{class:a.value,style:o.value},[n.slots.default&&n.slots.default()])}}),Cm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion-item.schema.json",title:"AccordionItem",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion Item",type:"string"},type:{description:"The type string of Accordion Item component",type:"string"},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},title:{description:"",type:"string",default:""},disable:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]},Xo={width:{type:Number},height:{type:Number,default:100},title:{type:String,default:""},disable:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},Ys=me(Xo,Cm,Gs),Qo=e.defineComponent({name:"FAccordionItem",props:Xo,emits:[],setup(t,n){const o=e.ref(t.title),a=e.ref(t.active),r=e.ref(t.disable);function i(){a.value=!a.value}function l(u){i()}const s=e.computed(()=>({"f-state-disabled":r.value,card:!0,"farris-panel-item":!0,"f-state-selected":a.value})),p=e.computed(()=>!0),c=e.computed(()=>({"f-icon":!0,"f-accordion-collapse":!a.value,"f-accordion-expand":a.value})),d=e.computed(()=>{const u={transition:"height 0.36s ease 0s",height:a.value?`${t.height}px`:0};return a.value||(u.overflow="hidden"),u});return()=>e.createVNode("div",{class:s.value},[e.createVNode("div",{class:"card-header",onClick:l},[e.createVNode("div",{class:"panel-item-title"},[p.value&&e.createVNode("span",null,[o.value]),n.slots.head&&n.slots.head(),e.createVNode("span",{class:c.value},null)]),e.createVNode("div",{class:"panel-item-tool"},[n.slots.toolbar&&n.slots.toolbar()]),e.createVNode("div",{class:"panel-item-clear"},null)]),e.createVNode("div",{style:d.value},[e.createVNode("div",{class:"card-body"},[n.slots.default&&n.slots.default()])])])}});function ve(t,n,o){var w;function a(){o!=null&&o.resolveComponentContext&&o.resolveComponentContext()}a();const r=o&&o.getStyles&&o.getStyles()||"",i=o&&o.getDesignerClass&&o.getDesignerClass()||"",l=e.ref();function s(){return(n==null?void 0:n.schema.componentType)==="frame"?!1:o&&o.checkCanMoveComponent?o.checkCanMoveComponent():!0}function p(){return!1}function c(){return(n==null?void 0:n.schema.componentType)==="frame"?!1:o&&o.checkCanDeleteComponent?o.checkCanDeleteComponent():!0}function d(){return(n==null?void 0:n.schema.componentType)==="frame"?!0:o&&o.hideNestedPaddingInDesginerView?o.hideNestedPaddingInDesginerView():!1}function u(N){if(!N||!N.value)return null;if(N.value.schema&&N.value.schema.type==="component")return N.value;const V=e.ref(N==null?void 0:N.value.parent),D=u(V);return D||null}function f(N=n){const{componentInstance:V,designerItemElementRef:D}=N;return!V||!V.value?null:V.value.canMove?D:f(N.parent)}function g(N){return!!o&&o.canAccepts(N)}function m(){return(n==null?void 0:n.schema.label)||(n==null?void 0:n.schema.title)||(n==null?void 0:n.schema.name)}function h(){}function y(N,V){V&&o!=null&&o.onAcceptMovedChildElement&&o.onAcceptMovedChildElement(V)}function b(N){const{componentType:V}=N;let D=mt(V,N);o&&o.onResolveNewComponentSchema&&(D=o.onResolveNewComponentSchema(N,D));const k=V.toLowerCase().replace("-","_");return D&&!D.id&&D.type===V&&(D.id=`${k}_${Math.random().toString().slice(2,6)}`),D}function v(N,V){const D=String(N.getAttribute("data-controltype")),k=N.getAttribute("data-feature"),B=k?JSON.parse(k):{};B.parentComponentInstance=l.value;let $=mt(D,B);o&&o.onAcceptNewChildElement&&($=o.onAcceptNewChildElement(N,V,$));const T=D.toLowerCase().replace("-","_");return $&&!$.id&&$.type===D&&($.id=`${T}_${Math.random().toString().slice(2,6)}`),$}function x(N){}function C(){return o&&o.getPropsConfig?o.getPropsConfig():[]}return l.value={canMove:s(),canSelectParent:p(),canDelete:c(),canNested:!d(),contents:n==null?void 0:n.schema.contents,elementRef:t,parent:(w=n==null?void 0:n.parent)==null?void 0:w.componentInstance,schema:n==null?void 0:n.schema,styles:r,designerClass:i,canAccepts:g,getBelongedComponentInstance:u,getDraggableDesignItemElement:f,getDraggingDisplayText:m,getPropConfig:C,getDragScopeElement:h,onAcceptMovedChildElement:y,onAcceptNewChildElement:v,onChildElementMovedOut:x,addNewChildComponentSchema:b,updateDragAndDropRules:a,triggerBelongedComponentToMoveWhenMoved:!!o&&o.triggerBelongedComponentToMoveWhenMoved||e.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!o&&o.triggerBelongedComponentToDeleteWhenDeleted||e.ref(!1)},l}const wm=e.defineComponent({name:"FAccordionDesign",props:Yo,emits:[],setup(t,n){const o=e.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""})),a=e.computed(()=>{const s=t.customClass.split(" "),p={"farris-panel":!0,accordion:!0};return s.reduce((c,d)=>(c[d]=!0,c),p),p}),r=e.ref(),i=e.inject("design-item-context"),l=ve(r,i);return e.onMounted(()=>{r.value.componentInstance=l}),n.expose(l.value),()=>e.createVNode("div",{ref:r,class:a.value,style:o.value},[n.slots.default&&n.slots.default()])}}),Nm=e.defineComponent({name:"FAccordionItemDesign",props:Xo,emits:[],setup(t,n){const o=e.ref(t.title),a=e.ref(!1),r=e.ref(!1);function i(){a.value=!a.value}function l(h){i()}const s=e.computed(()=>({"f-state-disable":r.value,card:!0,"farris-panel-item":!0,"f-state-selected":a.value})),p=e.computed(()=>!0),c=e.computed(()=>!1),d=e.computed(()=>({"f-icon":!0,"f-accordion-collapse":!a.value,"f-accordion-expand":a.value})),u=e.computed(()=>{const h={transition:"height 0.36s ease 0s",height:a.value?`${t.height}px`:0};return a.value||(h.overflow="hidden"),h});function f(){return!0}function g(){return!1}function m(){return!0}return n.expose({canMove:f(),canSelectParent:g(),canDelete:m(),canNested:!0}),()=>e.createVNode("div",{class:s.value},[e.createVNode("div",{class:"card-header",onClick:l},[e.createVNode("div",{class:"panel-item-title"},[p.value&&e.createVNode("span",null,[o.value]),c.value&&n.slots.head&&n.slots.head(),e.createVNode("span",{class:d.value},null)]),e.createVNode("div",{class:"panel-item-tool"},[n.slots.toolbar&&n.slots.toolbar()]),e.createVNode("div",{class:"panel-item-clear"},null)]),e.createVNode("div",{style:u.value},[e.createVNode("div",{class:"card-body drag-container"},[n.slots.default&&n.slots.default()])])])}}),Ks={install(t){t.component(Ko.name,Ko),t.component(Qo.name,Qo)},register(t,n,o){t.accordion=Ko,t["accordion-item"]=Qo,n.accordion=Us,n["accordion-item"]=Ys},registerDesigner(t,n,o){t.accordion=wm,t["accordion-item"]=Nm,n.accordion=Us,n["accordion-item"]=Ys}};function Vm(t,n,o){return n}const Sm=new Map([["appearance",xe]]),$m={title:"avatar",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Dm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/avatar.schema.json",title:"avatar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for avatar",type:"string"},type:{description:"The type string of avatar",type:"string",default:"avatar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Zo={avatarWidth:{type:Number,default:100},avatarHeight:{type:Number,default:100},cover:{type:String},readonly:{type:Boolean,default:!1},shape:{type:String,default:"circle"},maxSize:{type:Number,default:1},modelValue:{type:String,default:""},title:{type:String,default:""},imageType:{type:Array,default:["jpeg"]}},Xs=me(Zo,Dm,Sm,Vm,$m);function Qs(t,n,o,a){const r="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIAAAC6AguhoCCl3TW2TzugIHx4S788Z6wmWN4ZY3ysoA1pu+qAgpYCAAaIoDIoCaJZvVAQ03LUBlGqWAzYmimn3vAaRYA1IkWASKKACgirIgAsgBoBdJNbZNN9t3aeIHNw2vSccbZhPxLN27dJ68/Rx222u1/LjbNn8vi/ieHPm58N03SKN5bfa58c7jOzHd78XOyXfd98bqoCaScp8jSdk+SgLjlljdccssfK12w6TlN2cmXjN1/iuAD34Z47Sa43XTjLus82nz5bjl8WNss4WPXsNtNpNLuzk3zlZ2wHUsBBF5CAFgAhouiUGRUBErSAyffFamgKqKCqkUBYcgBpADiuhoAKeYA8fStp8WX4WPCfq8b2eT1bXObPZZZ8bJrJ23lHz5rpvutu+3tvOqAAAAAAAACy3HKZY3Sy6yoA+hs85tMJlN2vGdlaeTomem0+C/9pu849SAKlARQERrkgJUWoCUVKDIqb/ugqxFBVRQFFBFABRAUAHn6bl+XDGc7bfT/ANeV26XddvJ2Yz3tcVAAAAAAAAAAFxy+HKZTjLq+l+z5j6Gzuuywt54z9jRoEQAARSoCCoCIqAIJQaCLzBZxCAKC8wIAChOIAADxdL/+i/6z6uTt0yabfXtxnta4qAAAAAAAAAAD37H/AAbP/WPBwfQ2c02WE7MYaNAIIoAhzCggHMEqaNIDNPviHoAsRqcAFSKC8iIoHNUAUAAAHl6ZPzbPLtln1ed7el467DXu2X0+68SgAAAAAAAAABpru7bo+npy7Po8HR8fi2+M46XW+Ue4ABAAAQAQUvAEvBL6BQS8U3feqpv7fcFnBUUBUUBScQFRUBQAAATKTLG43nLL6vnaWWy8ZdL5x9J4ulY/DtrZwymvrzUcgAAAAAAAANdwPT0LH9Wd8MZ+9elnY4fh7HHG8prfOtIAABQAQAKi1AE5KlBD09hPl7gKjUAVFBeYTiAqKgKAAAA5dKw+PY2ya5Y/mn19nVQfMG9th+HtbjOF3zyrCgAAAAAA6dHw+PbSWfln5r6Ob29Gw+DZS2fmy33y5T6g7cbreaAgAAAAgqAcgqfIBOapQSnr7lPS/IEaScAFVFgKIoKioCgAABgADj0nZ/HstZvyx3zxnN4+T6b52ePw7TLGcJbIoyAAAAADex2f4m1mN1+Gb75Tl9H0PbweboeOmGWXO3T0n/r0AAIAAAACKgHJFpyBEpyARFT74gKnNQVeaRQF5IoKTiigCKAAACZWY4/FlZMZxt3SAvnuna+dnlM8885wyts8nXb9I/Elw2e7G7rleN8J4ePNxUAAAAAAeroeUuFx7LrPKvQ+djlcMpljdLHs2W3x2k0/Tl2W8fLtB1C8ewQAAEUBDmt4oBeJeCAIUARFvBN3gByVAFUIChzWcAOSpGdpnjs5rnlMdeHbfKcwb58x5c+l23TZ7P1y3e0+rldvtcuO0snZjJFHvtmM1ysnjbpHHLpOyx3TK5eGM1eKyW63W3tt1UHfPpeV3YYTGduW+/JwyuWd1zyuVnDXhPKcgAAAAAAAAAAB0w2+0w3TKZTsy3+7tj0vG/rxyxvbN8eUB9DDa7PP9OeNvZrpfdu8OD5mkvGNY55Y/pzyx8ruIPePJj0nazj8OU8ZpfZ1w6Ts8rJlrhfHfPmg7FKgAF4AgVARPW/NanoAsZaBVlZUFVF4g57fbfhY7pLld0l/e+EeO23K5ZW5ZXjb97o1tcvj22WXHS/DPKMqAAAAAAAAAAAAAAAAAAAAAAOux212d0ttwvGdnjHr3ceMfPevo2XxbLTu3T0B1TmHJAZVOYF4p98xPviBFScQGlRZxBdS3TG3slvsibS/8WX+t/YHhx/TPGaqk4TyVQAAAAAAAAAAAAAAAAAAAAAAd+iX82c7ZL9/Nwdui/5b/rfoD00vARAQqAhfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z",i=e.ref(t.readonly);function l(g){return g.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/)!=null}function s(g){return g.indexOf("data:image/")>-1}function p(g){return g?"data:image/jpeg;base64,"+g:""}const c=e.computed(()=>{var m;if(!t.imageType||!t.imageType.length)return"";const g=(m=t.imageType)==null?void 0:m.map(h=>(h==="jpg"&&(h="jpeg"),`image/${h}`));return!g||!g.length?"image/*":g.join(",")}),d=e.computed(()=>{const g=a.value||t.cover||r;return l(g)||s(g)?g:p(g)}),u=e.computed(()=>i.value?"":t.title);function f(){i.value||o&&o.value&&o.value.click()}return{acceptTypes:c,imageSource:d,imageTitle:u,onClickImage:f}}const Jo=e.defineComponent({name:"FAvatar",props:Zo,emits:["change","update:modelValue"],setup(t,n){const o=e.computed(()=>({"f-avatar":!0,"f-avatar-readonly":t.readonly,"f-avatar-circle":t.shape==="circle","f-avatar-square":t.shape==="square"})),a=e.ref(t.modelValue),r=e.computed(()=>({width:t.avatarWidth+"px",height:t.avatarHeight+"px"})),i=!1;function l(){return""}function s(){}const p=e.ref(null),{acceptTypes:c,imageSource:d,onClickImage:u}=Qs(t,n,p,a);return()=>e.createVNode("div",{class:o.value,style:r.value,onClick:u},[i,e.createVNode("img",{title:t.title,class:"f-avatar-image",src:d.value,onError:l},null),!t.readonly&&e.createVNode("div",{class:"f-avatar-icon"},[e.createVNode("span",{class:"f-icon f-icon-camera"},null)]),e.createVNode("input",{ref:"file",name:"file-input",type:"file",class:"f-avatar-upload",accept:c.value,onChange:s,style:"display: none;"},null)])}}),km=e.defineComponent({name:"FAvatarDesign",props:Zo,emits:["change","update:modelValue"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value);const i=e.computed(()=>({"f-avatar":!0,"f-avatar-readonly":t.readonly,"f-avatar-circle":t.shape==="circle","f-avatar-square":t.shape==="square"})),l=e.ref(t.modelValue),s=e.computed(()=>({width:t.avatarWidth+"px",height:t.avatarHeight+"px"})),p=!1;function c(){return""}function d(){}const u=e.ref(null),{acceptTypes:f,imageSource:g,onClickImage:m}=Qs(t,n,u,l);return()=>e.createVNode("div",{ref:o,class:i.value,style:s.value,onClick:m},[p,e.createVNode("img",{title:t.title,class:"f-avatar-image",src:g.value,onError:c},null),!t.readonly&&e.createVNode("div",{class:"f-avatar-icon"},[e.createVNode("span",{class:"f-icon f-icon-camera"},null)]),e.createVNode("input",{ref:"file",name:"file-input",type:"file",class:"f-avatar-upload",accept:f.value,onChange:d,style:"display: none;"},null)])}}),Zs={install(t){t.component(Jo.name,Jo)},register(t,n,o){t.avatar=Jo,n.avatar=Xs},registerDesigner(t,n,o){t.avatar=km,n.avatar=Xs}},Bm=new Map([["appearance",xe]]);function Tm(t,n,o){return n}const Fm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/button-edit.schema.json",title:"button-edit",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"button-edit"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""},autoComplete:{description:"",type:"boolean",default:!1},buttonContent:{description:"",type:"string",default:""},enableClear:{description:"",type:"boolean",default:!0},inputType:{description:"",type:"string",enum:["text","tag"],default:"text"},multiSelect:{description:"",type:"boolean",default:!1},popup:{description:"",type:"object",properties:{footerButtons:{type:"array",default:[]},height:{type:"number",default:600},dataMapping:{type:"object"},contents:{type:"array",default:[]},showMaxButton:{type:"boolean",default:!0},showCloseButton:{type:"boolean",default:!0},showFooter:{type:"boolean",default:!0},title:{type:"string",default:""},width:{type:"number",default:800}}},separator:{type:"string",default:","},showButtonWhenDisabled:{description:"",type:"boolean",default:!1},wrapText:{type:"boolean",default:!1},onClear:{description:"",type:"string",default:""}},required:["id","type"]},Am={title:"buttonEdit",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},ea={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},buttonBehavior:{type:String,default:"Popup"},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number,popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},popupOnInput:{type:Boolean,default:!1},popupOnFocus:{type:Boolean,default:!1},popupMinWidth:{type:Number,default:160},modalOptions:{type:Object,default:{}},wrapText:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},textAlign:{type:String,default:"left"},beforeClickButton:{type:Function,default:null},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},beforeOpen:{type:Function,default:null}},Js=me(ea,Fm,Bm,Tm,Am),Im={popupContentPosition:{type:Object,default:{left:0,top:0}},host:{type:Object},backgroundColor:{type:String,default:""}},Em=e.defineComponent({name:"FOverlay",props:Im,emits:["click"],setup(t,n){const o=e.ref(t.popupContentPosition),a=e.ref(t.host),r=e.computed(()=>({backgroundColor:t.backgroundColor||"",pointerEvents:"auto"}));function i(s){n.emit("click"),s.preventDefault(),s.stopPropagation()}e.computed(()=>{const s=a.value;if(s){const p=s.getBoundingClientRect(),{left:c,top:d,height:u}=p;return{left:c,top:d+u}}return o.value});const l=e.computed(()=>({}));return()=>e.createVNode(e.Teleport,{to:"body"},{default:()=>{var s,p;return[e.createVNode("div",{class:"overlay-container",onClick:c=>i(c),style:r.value},[e.createVNode("div",{style:l.value},[(p=(s=n.slots).default)==null?void 0:p.call(s)])])]}})}});function Mm(t){if(t.content&&t.content.render)return t.content.render;if(t.render&&typeof t.render=="function")return t.render}function Pm(t){const n=document.createElement("div");n.style.display="contents";let o;const a=t.onClickCallback||(()=>{}),r=()=>{a(),o&&o.unmount()};return o=e.createApp({setup(){e.onUnmounted(()=>{document.body.removeChild(n)});const i=Mm(t);return()=>e.createVNode(Em,{"popup-content-position":t.popupPosition,host:t.host,onClick:r,backgroundColor:t.backgroundColor},{default:()=>[i&&i()]})}}),document.body.appendChild(n),o.mount(n),o}class Om{static show(n){return Pm(n)}}const Rm={class:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showFloatingClose:{type:Boolean,default:!1}},el=e.defineComponent({name:"FModal",props:Rm,emits:["update:modelValue","accept","cancel","closed"],setup(t,n){const o=e.ref(t.width),a=e.ref(t.height),r=e.ref(t.modelValue),i=e.ref(""),l=e.ref(t.class),s=e.ref(t.fitContent),p=e.ref(t.showHeader),c=e.ref(""),d=e.ref(!0),u=e.ref(!1),f=e.ref(!1),g=e.ref(""),m=e.ref(""),h=e.ref(""),y=e.ref(t.showButtons),b=e.ref(t.title);function v(H,_){r.value=!1,n.emit("update:modelValue",!1),_!=null&&n.emit(_?"accept":"cancel"),n.emit("closed",H)}const x=[{name:"cancel",text:"取消",class:"btn btn-light",handle:H=>{v(H,!1)}},{name:"accept",text:"确定",class:"btn btn-primary",handle:H=>{v(H,!0)}}],C=e.ref(t.buttons&&t.buttons.length?t.buttons:x),w=e.computed(()=>!!c.value),N=e.computed(()=>!!y.value&&!!C.value);e.ref(),e.ref(),e.watch(()=>t.modelValue,()=>{r.value=t.modelValue});const V=e.ref(!1),D=e.computed(()=>r.value),k=e.computed(()=>{const H={modal:!0,"farris-modal":!0,"fe-cmp-page-modal":t.showFloatingClose};return H["f-modal-fitContent"]=s.value,H}),B=e.computed(()=>({display:D.value?"block":"none !important"})),$=e.computed(()=>{const H={"modal-dialog":!0};return l.value.split(" ").reduce((W,K)=>(W[K]=!0,W),H),H}),T=e.computed(()=>({position:"absolute",top:"50%",left:"50%",width:`${o.value}px`,height:s.value?"auto":`${a.value}px`,"margin-left":`${0-o.value/2}px`,"margin-top":s.value?"auto":`${0-a.value/2}px`})),S=e.computed(()=>({"modal-content":!0,"modal-content-has-header":p.value})),F=e.computed(()=>({display:p.value?"":"none"})),A=e.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:V.value})),E=e.computed(()=>({height:"10px","z-index":1,display:p.value?"none":""})),I=e.computed(()=>({"modal-body":!0,"f-utils-flex-column":g.value==="iframe"}));function R(){return{}}const O=e.computed(()=>{const H={textAlgin:h.value},_=R();return Object.assign(H,_)});function G(H){}async function M(H,_){if(H.handle){const W=await H.handle(_,H);W&&v(_,W)}}function j(){return e.createVNode("div",{class:"action-wrapper",onClick:H=>v(H,!1)},[e.createVNode("span",{class:"close-icon"},[e.createVNode("i",{class:"f-icon f-icon-close"},null)])])}return()=>e.createVNode(e.Teleport,{to:"body"},{default:()=>{var H,_;return[e.createVNode("div",{class:k.value,style:B.value},[e.createVNode("div",{id:i.value,class:$.value,style:T.value},[t.showFloatingClose&&j(),e.createVNode("div",{class:S.value},[e.createVNode("div",{ref:"modalHeaderRef",class:"modal-header",style:F.value},[e.createVNode("div",{class:"modal-title"},[w.value&&e.createVNode("span",{class:c.value,style:"margin-right: 8px"},null),e.createVNode("span",{class:"modal-title-label"},[b.value])]),e.createVNode("div",{class:"actions"},[e.createVNode("ul",null,[f.value&&e.createVNode("li",{class:"f-btn-icon f-bare"},[e.createVNode("span",{class:"f-icon modal_minimize"},null)]),u.value&&e.createVNode("li",{onClick:G,class:"f-btn-icon f-bare"},[e.createVNode("span",{class:A.value},null)]),d.value&&e.createVNode("li",{class:"f-btn-icon f-bare",onClick:W=>v(W,!1)},[e.createVNode("span",{class:"f-icon modal_close"},null)])])])]),e.createVNode("div",{ref:"dragableElementRef",class:"f-utils-absolute-all",style:E.value},null),e.createVNode("div",{class:I.value},[(_=(H=n.slots).default)==null?void 0:_.call(H),g.value==="iframe"&&e.createVNode("iframe",{title:i.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:m.value},null)]),N.value&&e.createVNode("div",{class:"modal-footer",style:O.value},[C.value&&C.value.map(W=>e.createVNode("button",{name:W.name,type:"button",class:W.class+(W.iconClass?" btn-icontext":""),onClick:K=>{M(W,K)}},[!!W.iconClass&&e.createVNode("i",{class:W.iconClass},null),W.text]))])])])])]}})}}),ta={install(t){}};function tl(t){if(t.content&&t.content.render)return t.content.render;if(t.render&&typeof t.render=="function")return t.render}function jm(t){const n=document.createElement("div");n.style.display="contents";const o=e.createApp({setup(){e.onUnmounted(()=>{document.body.removeChild(n)});const a=e.ref(),r=e.ref(t.class||""),i=e.ref(!!t.showButtons),l=e.ref(!!t.showHeader),s=e.ref(!!t.showFloatingClose),p=e.ref(!0),c=e.ref(t.title||""),d=t.acceptCallback||(()=>{}),u=t.rejectCallback||(()=>{}),f=t.closedCallback||(h=>{}),g=tl(t),m=h=>{p.value=!1,o.unmount(),f(h)};return e.onMounted(()=>{}),()=>e.createVNode(el,{ref:a,class:r.value,modelValue:p.value,"onUpdate:modelValue":h=>p.value=h,title:c.value,width:t.width,height:t.height,buttons:t.buttons,"show-header":l.value,"show-buttons":i.value,showFloatingClose:s.value,onAccept:d,onCancel:u,fitContent:t.fitContent,onClosed:m},{default:()=>[g&&g(o)]})}});return document.body.appendChild(n),ta&&ta.install&&o.use(ta),o.mount(n),o}class ln{static show(n){const o=Object.assign({title:"",showButtons:!0,showHeader:!0},n);return jm(o)}renderModal(n,o,a){const r=e.h(el,o,a);return e.render(r,n),r}renderNull(n){setTimeout(()=>{e.render(null,n)},500)}open(n){const o=document.createElement("div");o.style.display="contents";const a=Object.assign({title:"",showButtons:!0,showHeader:!0},n),r=e.ref(a.class||""),i=e.ref(!!a.showButtons),l=e.ref(!!a.showHeader),s=e.ref(!!a.showFloatingClose),p=e.ref(!0),c=e.ref(a.title||""),d=a.acceptCallback||(()=>{}),u=a.rejectCallback||(()=>{}),f=a.closedCallback||(y=>{});tl(a);const g=y=>{p.value=!1,f(y)};function m(y){p.value=y}const h={class:r.value,modelValue:p.value,title:c.value,width:a.width,height:a.height,buttons:a.buttons,showHeader:l.value,showButtons:i.value,showFloatingClose:s.value,onAccept:d,onCancel:u,fitContent:a.fitContent,onClosed:g};this.renderModal(o,{...h,"onUpdate:modelValue":m})}}function nl(t,n){function o(){const a=t.beforeOpen||t.beforeClickButton||null;let r=Promise.resolve(!0);if(a){const i=a(n.value);if(typeof i>"u")return r;typeof i=="boolean"?r=Promise.resolve(i):r=i}return r}return{judgeCanOpen:o}}function ol(t,n,o,a,r){const i=e.ref(t.buttonBehavior),l=e.ref(t.popupOnInput),s=e.computed(()=>({"input-group-append":!0,"append-force-show":t.showButtonWhenDisabled&&(t.readonly||t.disable)})),{judgeCanOpen:p}=nl(t,r),c=e.computed(()=>t.showButtonWhenDisabled||(!t.editable||!t.readonly)&&!t.disable);async function d(g){if(await p()){if(c.value){const m=!!n.slots.default;if(i.value==="Modal"){const h=t.modalOptions;ln.show({...h,render:()=>n.slots.default&&n.slots.default()})}i.value==="Overlay"&&Om.show({host:document.body,backgroundColor:"rgba(0,0,0,.15)",render:()=>n.slots.default&&n.slots.default()}),m&&i.value==="Popup"&&a.togglePopup(!0),m&&l.value&&a.hidePopup(),n.emit("clickButton",{origin:g,value:t.modelValue})}g.stopPropagation()}}function u(g){n.emit("mouseEnterIcon",g)}function f(g){n.emit("mouseLeaveIcon",g)}return{buttonGroupClass:s,onClickButton:d,onMouseEnterButton:u,onMouseLeaveButton:f}}function al(t,n,o,a,r,i){const l=e.ref(!1),s=e.computed(()=>t.enableClear&&!t.readonly&&!t.disable),{changeTextBoxValue:p}=i;function c(g){l.value=g}e.watch(r,()=>{c(!!r.value)});function d(g){const m=!t.readonly&&!t.disable&&t.editable,h=!t.editable;g.stopPropagation(),(m||h)&&(p("",!1),c(!l.value),n.emit("clear"))}function u(g){if(s.value){if(!o.value){c(!1);return}!t.disable&&!t.readonly&&c(!0)}}function f(g){s.value&&c(!1)}return{enableClearButton:s,showClearButton:l,onClearValue:d,onMouseEnterTextBox:u,onMouseLeaveTextBox:f}}function rl(t,n,o,a,r){const i=e.ref(t.popupOnInput),l=e.ref(t.popupOnFocus),{shouldPopupContent:s}=r,p=e.computed(()=>t.enableTitle?o.value:""),c=e.computed(()=>(t.disable||t.readonly)&&!t.forcePlaceholder?"":t.placeholder),d=e.computed(()=>t.readonly||!t.editable),u=e.ref(!1),f=e.computed(()=>!t.disable&&u.value),g=e.computed(()=>({"text-left":t.textAlign==="left","text-center":t.textAlign==="center","text-right":t.textAlign==="right","form-control":!0,"f-utils-fill":!0})),m=e.computed(()=>({"input-group":!0,"f-state-disable":t.disable,"f-state-editable":t.editable&&!t.disable&&!t.readonly,"f-state-readonly":t.readonly&&!t.disable,"f-state-focus":f.value}));function h(k,B=!0){o.value!==k&&(o.value=k,B&&n.emit("change",k),n.emit("update:modelValue",k))}function y(k){s.value=!1,h(k,!0)}e.watch(()=>t.modelValue,k=>{o.value=k});function b(k){u.value=!1,n.emit("blur",k),k.stopPropagation()}function v(k){n.emit("click",k)}function x(k){t.disable||(u.value=!0,d.value||(n.emit("focus",k),l.value&&!s.value&&r.popup()))}function C(k){n.emit("input",k.target.value);const B=k.target.value;a.value=B,o.value!==B&&h(B,!1),i.value&&!s.value&&r.popup()}function w(k){k.target.tagName!=="INPUT"&&k.preventDefault(),k.stopPropagation()}function N(k){n.emit("keydown",k)}function V(k){k.key==="Enter"&&(i.value||l.value)&&r.hidePopup(),n.emit("keyup",k)}function D(k){const B=k.target.value;k.stopPropagation(),h(B)}return{hasFocusedTextBox:f,isTextBoxReadonly:d,textBoxClass:g,textBoxPlaceholder:c,textBoxTitle:p,inputGroupClass:m,changeTextBoxValue:h,commitValue:y,onBlurTextBox:b,onClickTextBox:v,onFocusTextBox:x,onInput:C,onKeyDownTextBox:N,onKeyUpTextBox:V,onMouseDownTextBox:w,onTextBoxValueChange:D}}function il(t,n,o,a){const r=e.ref(),i=e.ref(!1),{judgeCanOpen:l}=nl(t,a);function s(){const u=r.value;u&&u.show(o.value)}async function p(u=!1){if(!!n.slots.default){if(!u&&!i.value&&!await l())return;i.value=!i.value,await e.nextTick(),s()}}async function c(u=!1){if(!!n.slots.default){if(!u&&!await l())return;i.value=!0,await e.nextTick(),s()}}function d(){i.value=!1}return{hidePopup:d,popup:c,shouldPopupContent:i,togglePopup:p,popoverRef:r}}function sl(t,n,o){const a=e.ref(),{isTextBoxReadonly:r,textBoxClass:i,textBoxPlaceholder:l,textBoxTitle:s,onBlurTextBox:p,onClickTextBox:c,onFocusTextBox:d,onInput:u,onKeyDownTextBox:f,onKeyUpTextBox:g,onMouseDownTextBox:m,onTextBoxValueChange:h}=o;return e.onMounted(()=>{t.selectOnCreated&&a.value.select(),t.focusOnCreated&&a.value.focus()}),()=>e.createVNode("input",{ref:a,name:"input-group-value",autocomplete:t.autoComplete?"on":"off",class:i.value,disabled:t.disable,maxlength:t.maxLength,minlength:t.minLength,placeholder:l.value,readonly:r.value,tabindex:t.tabIndex,title:s.value,type:t.inputType,value:n.value,onBlur:p,onChange:h,onClick:c,onFocus:d,onInput:u,onKeydown:f,onKeyup:g,onMousedown:m},null)}function _m(t,n,o){return n}const Hm=new Map([["appearance",xe]]),Lm={title:"tags",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Wm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tags.schema.json",title:"tags",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for tags",type:"string"},type:{description:"The type string of tags",type:"string",default:"tags"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},na={activeTag:{type:String,default:""},addButtonText:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},data:{type:Array,default:[{name:"示例1"}]},enableAddButton:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showColor:{type:Boolean,default:!1},tagType:{type:String,default:""},tagStyle:{type:String,default:""},wrapText:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1}},ll=me(na,Wm,Hm,_m,Lm);function cl(t,n,o,a){const r=e.ref(-1),i=e.ref(!1);function l(d,u,f){d.stopPropagation(),u&&setTimeout(()=>{r.value=f,i.value=!0,u.moving=!0})}function s(d,u){if(d.preventDefault(),r.value!==u){const f=a.value[r.value],g=a.value;g.splice(r.value,1),g.splice(u,0,f),r.value=u}}function p(d,u){d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move")}function c(d,u){u&&(u.moving=!1),o.value=a.value.filter(f=>f.type==="Tag").map(f=>f.payload),i.value=!1,n.emit("change",o.value)}return{dragstart:l,dragenter:s,dragover:p,dragend:c,isDragging:i}}const Qn=e.defineComponent({name:"FTags",props:na,emits:["remove","selectionChange","change"],setup(t,n){const o=e.ref(t.selectable),a=e.ref(t.customClass),r=e.ref(t.data),i=e.ref(t.tagType),l=e.ref(t.tagStyle),s=e.ref(t.showColor),p=e.ref(t.customStyle),c=e.ref(t.activeTag),d=e.ref(t.showClose),u=e.ref(t.addButtonText),f=e.ref(),g=e.ref(t.wrapText),m=e.ref();e.ref(t.disable);const h=e.ref(!1);function y(){const L=r.value.map(X=>({type:"Tag",payload:X}));return t.showAddButton&&L.push({type:"AddButton"}),L}const b=e.ref(y());function v(L){r.value=L,b.value=y()}const x=e.computed(()=>b.value.findIndex(L=>L.type==="Input")),C=cl(t,n,r,b),{dragstart:w,dragenter:N,dragover:V,dragend:D}=C;e.watch(()=>t.data,L=>v(L)),e.watch(()=>t.showAddButton,()=>{b.value=y()}),e.watch(()=>t.disable,L=>{b.value=y()}),e.watch(()=>t.activeTag,L=>{c.value=L}),e.watch(h,L=>{const X=[...b.value];L?X.length>0&&X[X.length-1].type!=="Input"&&(X.splice(X.length-1,1),X.splice(X.length,0,{type:"Input"}),b.value=X,e.nextTick(()=>{m.value&&m.value.focus()})):X.length>0&&X[X.length-1].type!=="AddButton"&&(X.splice(X.length-1,1),X.splice(X.length,0,{type:"AddButton"}),b.value=X)});const k=e.computed(()=>{const L={"farris-tags":!0,"farris-tags-checkable":o.value,"farris-tags-nowrap":!g.value};return a.value.split(" ").reduce((X,U)=>(X[U]=!0,X),L),L});function B(L){const X={"farris-tag-item":!0,"farris-tag-item-checked":o.value&&L.checked,"farris-tag-item-checkable":o.value,"farris-tag-item-has-color":s.value,"farris-tag-item-actived":c.value===L.name};if(i.value){const U=`farris-tag-item-${i.value}`;X[U]=!0}return X}const $=e.computed(()=>{const L={};return p.value&&p.value.split(";").reduce((X,U)=>{const Z=U.split(":");return X[Z[0]]=Z[1],X},L),L});function T(L,X){!t.disable&&o.value&&(!X.hasOwnProperty("selectable")||X.selectable)&&(X.checked=!X.checked,c.value=X.checked?X.name:"",X.checked&&r.value.filter(U=>U.name!==X.name).forEach(U=>{U.checked=!X.checked}),n.emit("change",r.value),n.emit("selectionChange",X))}function S(L,X){let U;switch(L.key){case"Backspace":r.value=r.value.filter(Z=>Z.name!==X.name),n.emit("change",r.value);break;case"ArrowLeft":U=Math.max(f.value.scrollLeft+20,0),f.value.scrollLeft=U;break;case"ArrowRight":U=Math.max(f.value.scrollLeft-20,0),f.value.scrollLeft=U}}function F(L,X){const U=r.value.findIndex(Z=>Z.name===X.name);if(U>-1){const[Z]=r.value.splice(U,1);b.value=y(),n.emit("change",r.value),n.emit("remove",{tags:r.value,remove:Z})}L.stopPropagation()}const A=e.computed(()=>({"farris-tag-item":!0,"farris-tag-add-button":!0,"farris-tag-add-button-disabled":!t.enableAddButton}));function E(L){L.stopPropagation(),h.value=!0}function I(){return!t.disable&&e.createVNode("li",{class:A.value,onClick:L=>E(L)},[e.createVNode("span",{class:"f-icon f-icon-amplification"},null),u.value&&e.createVNode("span",{class:"farris-tag-add-text"},[u.value])])}function R(L,X,U){L>-1&&(r.value.splice(L,0,{name:X,value:U,selectable:o.value}),b.value=y(),h.value=!1,n.emit("change",r.value))}function O(L){if(L&&L.value){const X=L.value,U=x.value;R(U,X,X),L.innerText=""}else h.value=!1}function G(L){const X=L.target;X&&X.value?O(X):h.value=!1}function M(L){L.key==="Enter"&&O(L.target)}function j(){return!t.disable&&e.createVNode("li",{class:"farris-tag-input-box"},[e.createVNode("input",{title:"farris-tag-input-box",ref:m,class:"form-control",onKeyup:M,onBlur:G},null)])}function H(L,X){return e.createVNode("li",{class:B(L),style:$.value,tabindex:0,id:L.name,key:L.name,onClick:U=>T(U,L),onKeydown:U=>S(U,L),draggable:"true",onDragstart:U=>w(U,L,X),onDragenter:U=>N(U,X),onDragend:U=>D(U,L),onDragover:U=>V(U,X)},[e.createVNode("span",{title:L.name,class:"tag-box"},[L.name]),!t.disable&&d.value&&e.createVNode("span",{class:"tag-delete"},[e.createVNode("i",{class:"f-icon f-icon-close",onClick:U=>F(U,L)},null)])])}function _(){return b.value.map((L,X)=>{switch(L.type){case"Tag":return H(L.payload,X);case"AddButton":return I();case"Input":return j()}})}const W=e.computed(()=>({"farris-tags-item-container":!0,"farris-tag-item-capsule":l.value==="capsule"}));function K(L){const X=Math.max(f.value.scrollLeft-L.deltaX,0);f.value.scrollLeft=X}function z(L){var U;L.preventDefault(),L.stopPropagation();const X=(U=L.dataTransfer)==null?void 0:U.getData("Text");if(X){const Z=X.split(":"),re=Z[0],de=Z[1];[...r.value].findIndex(te=>(console.log(`${te.value} === ${de} is ${te.value===de}`),te.value===de))>-1||R(r.value.length,re,de)}}function q(L){L.preventDefault()}return()=>e.createVNode("div",{class:k.value,onDrop:z,onDragover:q},[e.createVNode("ul",{ref:f,class:W.value,onWheel:L=>K(L)},[_()])])}});function dl(t,n,o){const a=e.ref(t.separator),{changeTextBoxValue:r}=o,i=e.computed(()=>n.value?n.value.split(a.value).map(s=>({name:s,selectable:!0})):[]);function l(s){r(s.map(p=>p.name).join(a.value),!0)}return()=>e.createVNode(Qn,{id:`${t.id}-tag-editor`,class:"form-control",data:i.value,showClose:!0,showInput:!0,onChange:l},null)}function ul(t,n,o){const{buttonGroupClass:a,onClickButton:r,onMouseEnterButton:i,onMouseLeaveButton:l}=n,{enableClearButton:s,showClearButton:p,onClearValue:c}=o;return()=>e.createVNode("div",{id:`${t.id}-button-group`,class:a.value},[s.value&&e.withDirectives(e.createVNode("span",{class:"input-group-text input-group-clear",onClick:c},[e.createVNode("i",{class:"f-icon modal_close"},null)]),[[e.vShow,p.value]]),t.buttonContent&&e.createVNode("span",{class:"input-group-text input-group-append-button",innerHTML:t.buttonContent,onClick:r,onMouseenter:i,onMouseleave:l},null)])}const qm={id:{type:String},title:{type:String},placement:{type:String,default:"bottom"},reference:{type:Object},host:{type:Object},leftBoundary:{type:Object},rightBoundary:{type:Object},visible:{type:Boolean,default:!1},class:{type:String},offsetX:{type:Object,default:e.ref(0)},zIndex:{type:Number,default:-1},keepWidthWithReference:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},minWidth:{type:Number,default:-1}};function zm(t){const n=t.host?t.host:"body",o=e.computed(()=>n==="body"?0:n?n.getBoundingClientRect().top:0),a=e.computed(()=>n==="body"?0:n?n.getBoundingClientRect().left:0),r=e.computed(()=>n==="body"?document.body.getBoundingClientRect().width:n?n.getBoundingClientRect().width-(t.rightBoundary?t.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),i=e.computed(()=>n==="body"?document.body.getBoundingClientRect().height:n?n.getBoundingClientRect().height:document.body.getBoundingClientRect().height);return{host:n,hostLeft:a,hostTop:o,hostWidth:r,hostHeight:i}}function Gm(t,n,o,a){var E;const r=e.ref(0),i=e.ref(((E=t.offsetX)==null?void 0:E.value)||0),l=e.ref(t.minWidth),s=e.ref(-1),p=e.ref(-1),c=e.ref(t.placement),d=e.ref(0),u=e.ref(0),f=e.ref(0),g=e.ref(document.documentElement.scrollLeft),m=e.ref(document.documentElement.scrollTop),{hostLeft:h,hostTop:y,hostWidth:b,hostHeight:v}=a;e.watch(t.offsetX,I=>{r.value=I-i.value});const x=e.computed(()=>{const I={left:`${u.value}px`,top:`${f.value}px`,transform:`translateX(${r.value}px)`};return t.zIndex!==-1&&(I["z-index"]=t.zIndex),l.value!==-1&&(I.width=`${l.value}px`),I}),C=e.computed(()=>({left:`${d.value}px`}));function w(I){if(I&&t.keepWidthWithReference){const R=I.getBoundingClientRect();l.value=Math.max(t.minWidth,R.width)}}function N(I,R){const O=b.value-I.width-4;return O>0?O:R}function V(I,R){const O=v.value-I.height-4;return O>0?O:R}function D(I,R,O){const G=d.value,M=R.left-h.value+R.width/2+g.value,j=R.top-y.value-(I.height+O.height)+m.value;return{popoverLeft:M,popoverTop:j,arrowLeft:G}}function k(I,R,O){const G=R.top-y.value+(R.height+O.height)+m.value,M=V(I,G);return Math.min(G,M)}function B(I,R){const O=N(R,I),G=I<=O?d.value:I-O;return{popoverLeft:Math.min(I,O),arrowLeft:G}}function $(I,R,O){const G=R.left-h.value+R.width/2-(O.width/2-(I.left-h.value))+g.value,{arrowLeft:M,popoverLeft:j}=B(G,I),H=k(I,R,O);return{popoverLeft:j,popoverTop:H,arrowLeft:M}}function T(I,R,O){const G=R.left-h.value+g.value,{arrowLeft:M,popoverLeft:j}=B(G,I),H=k(I,R,O);return{popoverLeft:j,popoverTop:H,arrowLeft:M}}const S=new Map([["top",D],["bottom",$],["bottom-left",T]]);function F(I){var j,H;const R=I.getBoundingClientRect();s.value=R.top,p.value=R.left;const O=(j=n.value)==null?void 0:j.getBoundingClientRect(),G=(H=o.value)==null?void 0:H.getBoundingClientRect(),M=S.get(c.value);if(M){const{arrowLeft:_,popoverLeft:W,popoverTop:K}=M(G,R,O);d.value=_,u.value=W,f.value=K}t.keepWidthWithReference&&w(I)}function A(I){if(I){const R=I.getBoundingClientRect();(R.left!==p.value||R.top!==s.value)&&F(I)}}return{arrowStyle:C,popoverStyle:x,position:c,popoverWidth:l,fitToReference:w,followToReferencePosition:A,locateToReference:F}}function Um(t,n,o,a,r,i,l){const s=e.ref(t.visible),p=e.computed(()=>s.value),{fitToReference:c,locateToReference:d}=l;let u;function f(){s.value=!1,document.body.removeEventListener("click",u),n.emit("hidden")}u=m=>{if(!r.value.contains(m.target)){const h=r.value.closest(".popover");h&&h.removeEventListener("click",u),f()}};async function g(m){if(a.value&&o.value&&m){s.value=!0,r.value=m,i.value&&c(m),await e.nextTick(),d(m),document.body.addEventListener("click",u);const h=m.closest(".popover");h&&h.addEventListener("click",u),n.emit("shown")}}return n.expose({hide:f,show:g,shown:p}),{showPopover:s,hidePopverOnClickBodyHandler:u}}function Ym(t,n,o,a,r){const{popoverWidth:i,fitToReference:l,followToReferencePosition:s}=r;function p(){if(o.value){s(o.value);const c=o.value.getBoundingClientRect();a.value&&c.width!==i.value&&l(o.value)}}return{onResize:p}}const fl=e.defineComponent({name:"FPopover",props:qm,emits:["shown","hidden"],setup(t,n){const o=e.ref(),a=e.ref(),r=e.ref(t.reference),i=e.ref(t.keepWidthWithReference),l=e.computed(()=>!!t.title),s=zm(t),{host:p}=s,c=Gm(t,o,a,s),{position:d,arrowStyle:u,popoverStyle:f,fitToReference:g,locateToReference:m}=c,{showPopover:h,hidePopverOnClickBodyHandler:y}=Um(t,n,o,a,r,i,c),{onResize:b}=Ym(t,n,r,i,c),v=e.computed(()=>{const C=`popover in popover-${d.value}`,w=`bs-popover-${d.value}`,N={"popover-fitcontent":t.fitContent};return N[C]=!0,N[w]=!0,(t.class||"").split(" ").reduce((D,k)=>(D[k]=!0,D),N),N}),x=e.computed(()=>({"popover-content":!0,"popover-body":!0}));return e.onMounted(()=>{t.reference&&m(r.value),i.value&&g(r.value),window.addEventListener("resize",b)}),e.onUnmounted(()=>{document.body.removeEventListener("click",y),window.removeEventListener("resize",b)}),()=>e.createVNode(e.Teleport,{to:p},{default:()=>{var C;return[e.withDirectives(e.createVNode("div",{ref:a,class:v.value,style:f.value,onClick:w=>{w.stopPropagation()}},[e.createVNode("div",{ref:o,class:"popover-arrow arrow",style:u.value},null),l.value&&e.createVNode("h3",{class:"popover-title popover-header"},[t.title]),e.createVNode("div",{class:x.value},[n.slots.default&&((C=n.slots)==null?void 0:C.default())])]),[[e.vShow,h.value]])]}})}});function Km(t,n,o){const a=e.ref(t.popupMinWidth),{hidePopup:r,popoverRef:i}=o;return()=>e.createVNode(fl,{id:`${t.id}-popover`,ref:i,visible:!0,placement:"bottom-left",host:t.popupHost,"keep-width-with-reference":!0,fitContent:!0,"right-boundary":t.popupRightBoundary,minWidth:a.value,offsetX:t.popupOffsetX,onHidden:r},{default:()=>{var l,s;return[(s=(l=n.slots).default)==null?void 0:s.call(l)]}})}const yt=e.defineComponent({name:"FButtonEdit",props:ea,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(t,n){const o=e.ref(),a=e.ref(t.customClass),r=e.ref(t.modelValue),i=il(t,n,o,r),{shouldPopupContent:l,hidePopup:s,togglePopup:p}=i,c=ol(t,n,o,i,r),d=e.ref(""),u=rl(t,n,r,d,i),{hasFocusedTextBox:f,commitValue:g,inputGroupClass:m}=u,h=al(t,n,r,f,d,u),{onMouseEnterTextBox:y,onMouseLeaveTextBox:b}=h,v=e.computed(()=>{const D={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!t.wrapText};return a.value&&a.value.split(" ").reduce((k,B)=>(k[B]=!0,k),D),D});function x(){return t.multiSelect&&t.inputType==="tag"?dl(t,r,u):sl(t,r,u)}let C=x();e.watch([()=>t.multiSelect,()=>t.inputType],()=>{C=x()});const w=ul(t,c,h),N=Km(t,n,i),V={commitValue:g,elementRef:o,hidePopup:s,shouldPopupContent:l,togglePopup:p};return e.onMounted(()=>{o.value.componentInstance=V,window.onresize=()=>{document.body.click()}}),n.expose(V),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",e.mergeProps(n.attrs,{ref:o,class:v.value,id:t.id}),[e.createVNode("div",{id:`${t.id}-input-group`,class:m.value,onMouseenter:y,onMouseleave:b},[C(),w()])]),l.value&&N()])}}),Xm=e.defineComponent({name:"FButtonEdit",props:ea,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a),i=e.ref(t.customClass),l=e.ref(t.modelValue),s=il(t,n,o,l),p=ol(t,n,o,s,l),c=e.ref(""),d=rl(t,n,l,c,s),{hasFocusedTextBox:u,inputGroupClass:f}=d,g=al(t,n,l,u,c,d);e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value);const m=e.computed(()=>{const v={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!t.wrapText};return i.value&&i.value.split(" ").reduce((x,C)=>(x[C]=!0,x),v),v});function h(){return t.multiSelect&&t.inputType==="tag"?dl(t,l,d):sl(t,l,d)}let y=h();e.watch([()=>t.multiSelect,()=>t.inputType],()=>{y=h()});const b=ul(t,p,g);return()=>e.createVNode("div",e.mergeProps(n.attrs,{ref:o,class:m.value,id:t.id}),[e.createVNode("div",{class:f.value},[y(),b()])])}}),pl={install(t){t.component(yt.name,yt)},register(t,n,o){t["button-edit"]=yt,n["button-edit"]=Js},registerDesigner(t,n,o){t["button-edit"]=Xm,n["button-edit"]=Js}},Qm={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/button-group.schema.json",title:"button-group",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for button-group",type:"string"},type:{description:"The type string of button-group",type:"string",default:"button-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function Zm(t,n,o){return n}const Jm=new Map([["appearance",xe]]),eh={title:"button-group",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},oa={id:String,data:{type:Array,default:[]},count:{type:Number,default:2},size:{type:String,default:"middle"},type:{type:String,default:"primary"},placement:{type:String,default:"bottom-right"}},ml=me(oa,Qm,Jm,Zm,eh);function th(t,n,o){const a=e.ref(),r=e.ref(!1);function i(){const u=a.value;u&&u.show(o.value)}async function l(){r.value=!r.value,await e.nextTick(),i()}function s(){r.value=!1,n.emit("changeState",r.value)}function p(u){u.stopPropagation(),l(),n.emit("changeState",r.value)}function c(u,f){u.stopPropagation(),!f.disabled&&(r.value=!1,n.emit("change",f.id),n.emit("click",f))}function d(){r.value&&setTimeout(()=>{s()},1e3)}return{hidePopup:s,onClickDropdownButton:p,onClickDropdownMenuItem:c,onMouseleaveDropdownButton:d,popoverRef:a,shouldPopupContent:r,togglePopup:l}}function nh(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}function oh(t,n,o){const{hidePopup:a,onClickDropdownMenuItem:r,popoverRef:i}=o;function l(p){return e.createVNode(e.Fragment,null,[p.divider&&e.createVNode("div",{class:"dropdown-divider"},null),e.createVNode("div",{id:p.id,class:"dropdown-item"+(p.disabled?" disabled":""),onClick:c=>r(c,p)},[p.icon&&e.createVNode("i",{class:"f-icon dropdown-item-icon"+p.icon},null),e.createVNode("span",null,[p.text])])])}function s(p){let c;return e.createVNode(fl,{id:`${t.id}-popover`,ref:i,visible:!0,placement:"bottom-left",host:n.value,fitContent:!0,onHidden:a,minWidth:120},nh(c=p.map(d=>l(d)))?c:{default:()=>[c]})}return{renderDropdownMenu:s}}function hl(t,n){const o=e.ref(),a=e.ref(),r=th(t,n,a),{onMouseleaveDropdownButton:i,onClickDropdownButton:l,shouldPopupContent:s}=r,{renderDropdownMenu:p}=oh(t,o,r);function c(d){return e.createVNode("div",{class:"btn-group f-btn-group-dropdown",ref:o,onMouseleave:i},[e.createVNode("button",{title:"button",ref:a,type:"button",class:"f-btn-dropdown",onClick:l},[e.createVNode("span",{class:"f-icon f-icon-lookup"},null)]),s.value&&p(d)])}return{renderDropdownButton:c}}const aa=e.defineComponent({name:"FButtonGroup",props:oa,emits:["click","change","changeState"],setup(t,n){const o=e.ref(),a=t.data&&t.data.slice(0,t.count)||[],r=t.data&&t.data.slice(t.count)||[],i=function(d){const u={btn:!0,"f-btn-ml":d.type&&d.type!=="link"||t.type!="link","btn-link":!d.type&&!t.type||t.type=="link"||d.type=="link","btn-icontext":!!d.icon,disabled:d.disabled},f=d.type?d.type:t.type&&t.type!="link"?t.type:"";return f&&(u[`btn-${f}`]=!0),u},l=function(){return{"btn-group":!0,"f-btn-group-links":t.type=="link","btn-group-lg":t.size==="large","btn-group-sm":t.size==="small"}};function s(d,u){d.stopPropagation(),!u.disabled&&(n.emit("change",u.id),n.emit("click",u))}function p(d){return e.createVNode("button",{type:"button",id:d.id,title:d.id,class:i(d),onClick:u=>s(u,d)},[d.icon&&e.createVNode("i",{class:`f-icon ${d.icon}`},null),!d.icon&&d.text])}const{renderDropdownButton:c}=hl(t,n);return()=>e.createVNode("div",{class:"f-btn-group",style:"position:relative;",ref:o},[e.createVNode("div",{class:l()},[a.map(d=>p(d))]),!!r.length&&c(r)])}}),ah=e.defineComponent({name:"FButtonGroupDesign",props:oa,emits:["click","changeState","change","clickMenuOut"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value);const i=t.data&&t.data.slice(0,t.count)||[],l=t.data&&t.data.slice(t.count)||[],s=function(d){const u={btn:!0,"f-btn-ml":d.type&&d.type!=="link","btn-link":!!d.icon||!d.type,"btn-icontext":!!d.icon,disabled:d.disabled};return d.type&&(u[`btn-${d.type}`]=!0),u};function p(d){return e.createVNode("div",null,[e.createVNode("button",{type:"button",id:d.id,title:d.id,class:s(d)},[d.icon&&e.createVNode("i",{class:`f-icon ${d.icon}`},null),!d.icon&&d.text])])}const{renderDropdownButton:c}=hl(t,n);return()=>e.createVNode("div",{class:"f-btn-group",style:"position:relative;",ref:o},[e.createVNode("div",{class:(t.size==="large"?"btn-group-lg":"btn-group-sm")+" btn-group f-btn-group-links"},[i.map(d=>p(d))]),!!l.length&&c(l)])}}),gl={install(t){t.component(aa.name,aa)},register(t,n,o){t["button-group"]=aa,n["button-group"]=ml},registerDesigner(t,n,o){t["button-group"]=ah,n["button-group"]=ml}},rh=new Map([["appearance",xe]]);function ih(t,n,o){return n}const sh={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/calendar.schema.json",title:"calendar",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for calendar",type:"string"},type:{description:"The type string of calendar",type:"string",default:"calendar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}}},required:["id","type"]},lh={title:"calendar",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},ra={events:{Type:Array,default:[]},firstDayOfTheWeek:{type:String,default:"Sun."}},yl=me(ra,sh,rh,ih,lh),cn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var Ot=(t=>(t[t.previous=1]="previous",t[t.current=2]="current",t[t.next=3]="next",t))(Ot||{});function Zn(){function t(){return{year:0,month:0,day:0}}function n(c){return new Date(c.year||0,c.month?c.month-1:0,c.day||0,c.hour?c.hour:0,c.minute?c.minute:0,c.second?c.second:0,0)}function o(c){const d=new Date;return c.year||(c.year=d.getFullYear()),c.month||(c.month=d.getMonth()+1),c.day||(c.day=1),new Date(c.year,c.month-1,c.day,c.hour?c.hour:0,c.minute?c.minute:0,c.second?c.second:0,0)}function a(c){return new Date(c.year||1,(c.month||1)-1,c.day,c.hour?c.hour:0,c.minute?c.minute:0,c.second?c.second:0,0).getDay()}function r(c){return cn.indexOf(c)}function i(c){return n(c).getTime()}function l(c){return Math.round(i(c)/1e3)}function s(c,d,u){const f=i(d),g=i(u),m=i(c);return g-m>m-f?d:u}function p(){const c=new Date;return{year:c.getFullYear(),month:c.getMonth()+1,day:c.getDate(),hour:c.getHours(),minute:c.getMinutes(),second:c.getSeconds()}}return{emptyDate:t,getDate:n,getDate2:o,getDayNumber:a,getEpocTime:l,getNearDate:s,getWeekdayIndex:r,getTimeInMilliseconds:i,getToday:p}}function ch(){function t(i,l){return new Date(l,i,0).getDate()}function n(i,l,s){return new Date(i,l-1,s,0,0,0,0)}function o(i,l){const s=n(l,i,1);return s.setMonth(s.getMonth()-1),t(s.getMonth()+1,s.getFullYear())}function a(i,l){const s={year:i===12?l+1:l},p=i===12?1:i+1;return s.month=p,s}function r(i,l){const s={year:i===1?l-1:l},p=i===1?12:i-1;return s.month=p,s}return{daysInMonth:t,daysInPreMonth:o,getNextMonth:a,getPreviousMonth:r}}function bl(){const{getToday:t,getDayNumber:n}=Zn(),{daysInMonth:o,daysInPreMonth:a,getNextMonth:r,getPreviousMonth:i}=ch();function l(h){const y=cn.indexOf(h);return y>0?7-y:0}function s(h){const{day:y,month:b,year:v}=h;if(y===void 0||b===void 0||v===void 0)throw new Error("invalided date.");const x=y===1,C=x?a(b,v):y-1,w=x?b-1:b,N=w<1,V=N?12:w;return{year:N?v-1:v,month:V,day:C}}function p(h){const{day:y,month:b,year:v}=h;if(y===void 0||b===void 0||v===void 0)throw new Error("invalided date.");const x=o(b,v),C=y===x,w=C?1:y+1,N=C?b+1:b,V=N>12,D=V?1:N;return{year:V?v+1:v,month:D,day:w}}function c(h){const y=i(h.month||1,h.year||1),b=o(y.month||1,y.year||1);return{day:(h.day||1)<=b?h.day:b,month:y.month,year:y.year}}function d(h){const y=r(h.month||1,h.year||1),b=o(y.month||1,y.year||1);return{day:(h.day||1)<=b?h.day:b,month:y.month,year:y.year}}function u(h){const b=(h.day||1)-7,v=b<1,x=v?o(h.month||1,h.year||1)+b:b,C=v?i(h.month||1,h.year||1):h;return{day:x,month:C.month,year:C.year}}function f(h){const b=(h.day||1)+7,v=o(h.month||1,h.year||1),x=b>v,C=x?b-v:b,w=x?r(h.month||1,h.year||1):h;return{day:C,month:w.month,year:w.year}}function g(h,y,b,v){const x={day:h,month:y,year:b},w=l(v)===0?1:0,N=n(x)+w,V=t();let D=s(x);const k=[];for(let F=N-1;F>=1;F--){const A=D.month!==x.month?Ot.previous:Ot.current,E=D.month===y&&D.day===V.day&&D.month===V.month&&D.year===V.year;k.push({date:D,monthTag:A,isCurrent:E}),F>1&&(D=s(D))}let B=p(x);const $=[];for(let F=N+1;F<=7;F++){const A=D.month!==x.month?Ot.next:Ot.current,E=B.day===V.day&&B.month===V.month&&B.year===V.year;$.push({date:B,monthTag:A,isCurrent:E}),F<7&&(B=p(B))}const T=h===V.day&&y===V.month&&b===V.year;return{days:[...k.reverse(),{date:x,monthTag:Ot.current,isCurrent:T},...$],weekNumber:0,year:b}}function m(h,y,b){const v=[],x=o(h,y);for(let C=1;C<=x;C+=7){const w=g(C,h,y,b);v.push(w)}return v}return{getMonthlyCalendar:m,getWeeklyCalendar:g,getPreviousDay:s,getNextDay:p,getDayInPreviousWeek:u,getDayInNextWeek:f,getDayInPreviousMonth:c,getDayInNextMonth:d}}function Nn(){const{getTimeInMilliseconds:t}=Zn();function n(g){return g&&g.year!==0&&g.month!==0&&g.day!==0}function o(g){return g&&g.year!==0&&g.month!==0}function a(g){return g&&g.year!==0}function r(g,m){return t(g)<t(m)}function i(g,m){return t(g)<=t(m)}function l(g,m){return t(g)===t(m)}function s(g,m){const h=t(m);return t(g.from)===h||t(g.to)===h}function p(g,m){return!m||!n(m.to)||!n(m.from)?!1:i(m.from,g)&&i(g,m.to)}function c(g,m){return n(m)&&t(g)>=t(m)}function d(g,m){return n(m)&&t(g)<=t(m)}function u(g,m){return t({year:g.year,month:g.month,day:g.day})===t({year:m.year,month:m.month,day:m.day})}function f(g,m){return t({hour:g.hour,minute:g.minute,second:g.second})===t({hour:m.hour,minute:m.minute,second:m.second})}return{isDateEarlier:r,equal:l,inPeriod:p,isPoint:s,equalOrEarlier:i,isInitializedDate:n,isInitializedMonth:o,isInitializedYear:a,isMonthDisabledByDisableSince:c,isMonthDisabledByDisableUntil:d,sameTime:f,sameDay:u}}const ia={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},dh={activeView:{Type:Number,default:3},title:{Type:String,default:""},dailyViewTitle:{Type:String,default:"Day"},weeklyViewTitle:{Type:String,default:"Week"},monthlyViewTitle:{Type:String,default:"Month"}},Jn=e.defineComponent({name:"FCalendarHeader",props:dh,emits:["ViewChange","Previous","Next","ResetToToday"],setup(t,n){const o=e.ref(t.title),a=e.ref(t.dailyViewTitle),r=e.ref(t.weeklyViewTitle),i=e.ref(t.monthlyViewTitle),l=2,s=62,p=e.ref(t.activeView),c=e.ref("Today");e.watch(()=>t.title,()=>{o.value=t.title});const d=e.computed(()=>({top:`${l}px`,left:`${p.value*(l+1)+(p.value-1)*(s+1)}px`})),u=e.computed(()=>p.value===1?a.value:p.value===2?r.value:i.value);function f(){p.value=1,n.emit("ViewChange",1)}function g(){p.value=2,n.emit("ViewChange",2)}function m(){p.value=3,n.emit("ViewChange",3)}function h(){n.emit("Previous",p.value)}function y(){n.emit("Next",p.value)}function b(){n.emit("ResetToToday")}return()=>e.createVNode("div",{class:"f-calendar-header"},[e.createVNode("div",{class:"f-calendar-title"},[o.value]),e.createVNode("div",{class:"f-calendar-navigator"},[e.createVNode("div",{class:"f-calendar-navigator-today btn btn-default",onClick:()=>b()},[c.value]),e.createVNode("div",{class:"f-calendar-navigator-button-group"},[e.createVNode("div",{class:"f-calendar-navigator-previous btn btn-default",onClick:()=>h()},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-left"},null)]),e.createVNode("div",{class:"f-calendar-navigator-next btn btn-default",onClick:()=>y()},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right"},null)])])]),e.createVNode("div",{class:"f-calendar-view-switch"},[e.createVNode("div",{class:"f-calendar-view-switch-panel"},[e.createVNode("span",{class:"f-calendar-view-switch-daily",onClick:v=>f()},[a.value]),e.createVNode("span",{class:"f-calendar-view-switch-weekly",onClick:v=>g()},[r.value]),e.createVNode("span",{class:"f-calendar-view-switch-monthly",onClick:v=>m()},[i.value])]),e.createVNode("div",{class:"f-calendar-view-switch-active-view",style:d.value},[u.value])])])}}),uh={dates:{Type:Array,default:[]},daysInWeek:{Type:Array,default:cn},enableKeyboadNavigate:{Type:Boolean,default:!0},enableMarkCurrent:{Type:Boolean,default:!0},events:{Type:Array,default:[]},activeDay:{Type:Object,default:null}};var eo=(t=>(t[t.enter=13]="enter",t[t.esc=27]="esc",t[t.space=32]="space",t[t.leftArrow=37]="leftArrow",t[t.upArrow=38]="upArrow",t[t.rightArrow=39]="rightArrow",t[t.downArrow=40]="downArrow",t[t.tab=9]="tab",t[t.shift=16]="shift",t))(eo||{});function fh(){function t(n){const o=n.key||n.keyCode;return o==="Enter"||o===13?13:o==="Escape"||o===27?27:o===" "||o===32?32:o==="ArrowLeft"||o===37?37:o==="ArrowUp"||o===38?38:o==="ArrowRight"||o===39?39:o==="ArrowDown"||o===40?40:o==="Tab"||o===9?9:o==="Shift"||o===16?16:-1}return{getKeyCodeFromEvent:t}}const to=e.defineComponent({name:"FCalendarMonthView",props:uh,emits:["click","keyDown"],setup(t,n){const o=e.ref(t.daysInWeek),a=e.ref(t.enableKeyboadNavigate),r=e.ref(t.enableMarkCurrent),i=e.ref(t.activeDay),l=e.ref(t.events),{equal:s,sameDay:p}=Nn(),{getKeyCodeFromEvent:c}=fh();function d(b,v){return b.forEach(x=>{x.days.forEach(C=>{const w=v.filter(N=>p(N.starts,C.date));w&&w.length&&(C.events=[...w])})}),b}const u=e.ref(d(t.dates,l.value));e.watch(()=>t.dates,()=>{u.value=d(t.dates,l.value)}),e.watch(()=>t.activeDay,()=>{i.value=t.activeDay}),e.watch(()=>t.events,()=>{l.value=t.events});function f(b){return!!i.value&&s({year:i.value.year,month:i.value.month,day:i.value.day},b)}const g=(b,v,x)=>{const w={"f-datepicker-no-currmonth":b.monthTag===Ot.previous||b.monthTag===Ot.next},N=`d_${v}_${x}`;return w[N]=!0,w},m=b=>{const v=b.monthTag===Ot.current&&f(b.date),x=b.isCurrent&&r.value;return{"f-calendar-month-view-date":!0,"f-calendar-month-view-selected":v,"f-calendar-month-view-current":x}};function h(b,v){b.stopPropagation(),n.emit("click",v.date)}function y(b,v){const x=c(b);x!==eo.tab&&(b.preventDefault(),x===eo.enter||x===eo.space?h(b,v):a.value&&n.emit("keyDown",v.date))}return()=>e.createVNode("div",{class:"f-calendar-month-view"},[e.createVNode("table",{class:"f-datepicker-table",cellpadding:"0"},[e.createVNode("thead",null,[e.createVNode("tr",null,[o.value&&o.value.map(b=>e.createVNode("th",{scope:"col",style:"padding: 4px 4px 8px"},[b]))])]),e.createVNode("tbody",null,[u.value&&u.value.map((b,v)=>e.createVNode("tr",null,[b.days&&b.days.map((x,C)=>e.createVNode("td",{id:`d_${v}_${C}`,tabindex:"0",class:g(x,v,C),onClick:w=>h(w,x),onKeydown:w=>y(w,x)},[e.createVNode("div",{class:"f-calendar-month-view-title"},[e.createVNode("div",{class:m(x)},[x.date.day]),e.createVNode("div",{class:"f-calendar-month-view-date-month"},[x.date.day===1?ia[x.date.month||1]:""])]),x.events&&x.events.length&&x.events.map(w=>e.createVNode("div",{class:"f-calendar-month-view-event-item"},[w.title]))]))]))])])])}}),ph={daysInWeek:{Type:Array,default:cn},enableMarkCurrent:{Type:Boolean,default:!0},events:{Type:Array,default:[]},week:{Type:Object,default:{days:[],weekNumber:0,year:0}}},no=e.defineComponent({name:"FCalendarWeekView",props:ph,emits:[],setup(t){const n=e.ref(),o=e.ref(),a=e.ref(t.daysInWeek),r=e.ref(t.week),i=e.ref(t.enableMarkCurrent),l=e.ref(t.events),s=e.ref([]),{equal:p}=Nn();function c(v){return r.value.days.map(C=>{const w={year:C.date.year,month:C.date.month,day:C.date.day,hour:v.hour,minute:v.minute,second:v.second},N=l.value.filter(V=>p(V.starts,w));return{day:w,events:N}})}function d(){const v=[];for(let x=0;x<24;x++){const C={hour:x,minute:0,second:0},w={hour:x,minute:30,second:0},N=c(C),V=c(w);v.push({time:C,events:N,title:x>0?`${x}:00`:"",part:"upper"}),v.push({time:w,events:V,title:`${x}:30`,part:"lower"})}s.value=v}d(),e.watch(()=>t.week,()=>{r.value=t.week,d()}),e.watch(()=>t.events,()=>{l.value=t.events,d()});const u=v=>({"f-calendar-week-view-date":!0,"f-calendar-week-view-current":v.isCurrent&&i.value});function f(){return e.createVNode("div",{class:"f-calendar-week-view-header"},[e.createVNode("div",{class:"f-calendar-week-view-header-corner"},null),e.createVNode("div",{class:"f-calendar-week-view-header-primary"},[e.createVNode("div",{class:"f-calendar-week-view-header-columns"},[a.value.map((v,x)=>e.createVNode("div",{class:"f-calendar-week-view-header-cell"},[e.createVNode("div",{class:u(r.value.days[x])},[r.value.days[x].date.day]),e.createVNode("span",null,[v])]))])])])}function g(){return e.createVNode("div",{class:"f-calendar-week-view-content-side"},[e.createVNode("div",{class:"f-calendar-side"},[s.value.map(v=>e.createVNode("div",{class:"f-calendar-side-row"},[e.createVNode("div",{class:"f-calendar-side-row-number"},[v.part==="upper"?v.title:""])]))])])}function m(v){return{"f-calendar-week-view-item":!0,"f-calendar-week-view-item-upper":v.part==="upper","f-calendar-week-view-item-lower":v.part==="lower"}}function h(v){const D=(v.starts.hour||0)+(v.starts.minute||0)/60;return{height:`${44*((v.ends.hour||0)+(v.ends.minute||0)/60-D)-2-2-1-1}px`}}function y(){return s.value.map(v=>e.createVNode("div",{class:m(v)},[v.events.map(x=>e.createVNode("div",{class:"f-calendar-week-view-item-cell"},[x.events.length>0&&x.events.map(C=>e.createVNode("div",{class:"f-calendar-event",style:h(C)},[C.title]))]))]))}function b(){return e.createVNode("div",{ref:o,class:"f-calendar-content-primary"},[e.createVNode("div",{class:"f-calendar-content-data"},[y()])])}return e.onMounted(()=>{n.value&&n.value.scrollTo(0,250)}),()=>e.createVNode("div",{class:"f-calendar-week-view"},[f(),e.createVNode("div",{class:"f-calendar-week-view-content",ref:n},[g(),b()])])}}),mh={day:{Type:Object,default:{}},dayInWeek:{Type:String,default:""},enableMarkCurrent:{Type:Boolean,default:!0},events:{Type:Array,default:[]}},oo=e.defineComponent({name:"FCalendarDayView",props:mh,emits:[],setup(t){const n=e.ref(),o=e.ref(),a=e.ref(t.dayInWeek),r=e.ref(t.day),i=e.ref(t.enableMarkCurrent),l=e.ref(t.events),s=e.ref([]),{equal:p}=Nn();function c(v){const x={year:r.value.date.year,month:r.value.date.month,day:r.value.date.day,hour:v.hour,minute:v.minute,second:v.second},C=l.value.filter(w=>p(w.starts,x));return[{day:x,events:C}]}function d(){const v=[];for(let x=0;x<24;x++){const C={hour:x,minute:0,second:0},w={hour:x,minute:30,second:0},N=c(C),V=c(w);v.push({time:C,events:N,title:x>0?`${x}:00`:"",part:"upper"}),v.push({time:w,events:V,title:`${x}:30`,part:"lower"})}s.value=v}d(),e.watch(()=>t.day,()=>{r.value=t.day,d()}),e.watch(()=>t.events,()=>{l.value=t.events,d()});const u=v=>({"f-calendar-day-view-date":!0,"f-calendar-day-view-current":v.isCurrent&&i.value});function f(){return e.createVNode("div",{class:"f-calendar-day-view-header"},[e.createVNode("div",{class:"f-calendar-day-view-header-corner"},null),e.createVNode("div",{class:"f-calendar-day-view-header-primary"},[e.createVNode("div",{class:"f-calendar-day-view-header-columns"},[e.createVNode("div",{class:"f-calendar-day-view-header-cell"},[e.createVNode("div",{class:u(r.value)},[r.value.date.day]),e.createVNode("span",null,[a.value])])])])])}function g(){return e.createVNode("div",{class:"f-calendar-day-view-content-side"},[e.createVNode("div",{class:"f-calendar-side"},[s.value.map(v=>e.createVNode("div",{class:"f-calendar-side-row"},[e.createVNode("div",{class:"f-calendar-side-row-number"},[v.part==="upper"?v.title:""])]))])])}function m(v){return{"f-calendar-day-view-item":!0,"f-calendar-day-view-item-upper":v.part==="upper","f-calendar-day-view-item-lower":v.part==="lower"}}function h(v){const D=(v.starts.hour||0)+(v.starts.minute||0)/60;return{height:`${44*((v.ends.hour||0)+(v.ends.minute||0)/60-D)-2-2-1-1}px`}}function y(){return s.value.map(v=>e.createVNode("div",{class:m(v)},[v.events.map(x=>e.createVNode("div",{class:"f-calendar-day-view-item-cell"},[x.events.length>0&&x.events.map(C=>e.createVNode("div",{class:"f-calendar-event",style:h(C)},[C.title]))]))]))}function b(){return e.createVNode("div",{ref:o,class:"f-calendar-content-primary"},[e.createVNode("div",{class:"f-calendar-content-data"},[y()])])}return e.onMounted(()=>{n.value&&n.value.scrollTo(0,250)}),()=>e.createVNode("div",{class:"f-calendar-day-view"},[f(),e.createVNode("div",{class:"f-calendar-day-view-content",ref:n},[g(),b()])])}}),sa=e.defineComponent({name:"FCalendar",props:ra,emits:[],setup(t){const{sameDay:n}=Nn(),{getToday:o}=Zn(),a=e.ref(t.firstDayOfTheWeek),r=e.ref(t.events),i=o(),l=e.ref({year:i.year||1,month:i.month||1,day:i.day||1}),s=e.ref(3),{getMonthlyCalendar:p,getWeeklyCalendar:c,getPreviousDay:d,getNextDay:u,getDayInPreviousWeek:f,getDayInNextWeek:g,getDayInPreviousMonth:m,getDayInNextMonth:h}=bl(),y=e.computed(()=>`${ia[l.value.month||1]} ${l.value.year}`),b=e.computed(()=>p(l.value.month||1,l.value.year||1,a.value)),v=e.computed(()=>c(l.value.day||1,l.value.month||1,l.value.year||1,a.value)),x=e.computed(()=>v.value.days.find(T=>n(T.date,l.value))||v.value.days[1]),C=e.computed(()=>{const T=v.value.days.findIndex(F=>n(F.date,l.value)),S=T>-1?T:1;return cn[S]}),w=e.computed(()=>s.value===3),N=e.computed(()=>s.value===2),V=e.computed(()=>s.value===1);function D(T){s.value=T}function k(T){T===1&&(l.value=d(l.value)),T===2&&(l.value=f(l.value)),T===3&&(l.value=m(l.value))}function B(T){T===1&&(l.value=u(l.value)),T===2&&(l.value=g(l.value)),T===3&&(l.value=h(l.value))}function $(){l.value={year:i.year||1,month:i.month||1,day:i.day||1}}return()=>e.createVNode("div",{class:"f-calendar"},[e.createVNode(Jn,{activeView:s.value,title:y.value,onViewChange:T=>D(T),onPrevious:T=>k(T),onNext:T=>B(T),onResetToToday:()=>$()},null),e.createVNode("div",null,[V.value&&e.createVNode(oo,{day:x.value,dayInWeek:C.value,events:r.value},null),N.value&&e.createVNode(no,{week:v.value,events:r.value},null),w.value&&e.createVNode(to,{activeDay:l.value,dates:b.value,events:r.value},null)])])}}),hh=e.defineComponent({name:"FCalendarDesign",props:ra,emits:[],setup(t,n){const{sameDay:o}=Nn(),{getToday:a}=Zn(),r=e.ref(t.firstDayOfTheWeek),i=e.ref(t.events),l=a(),s=e.ref({year:l.year||1,month:l.month||1,day:l.day||1}),p=e.ref(3),c=e.ref(),d=e.inject("design-item-context"),u=ve(c,d);e.onMounted(()=>{c.value.componentInstance=u}),n.expose(u.value);const{getMonthlyCalendar:f,getWeeklyCalendar:g,getPreviousDay:m,getNextDay:h,getDayInPreviousWeek:y,getDayInNextWeek:b,getDayInPreviousMonth:v,getDayInNextMonth:x}=bl(),C=e.computed(()=>`${ia[s.value.month||1]} ${s.value.year}`),w=e.computed(()=>f(s.value.month||1,s.value.year||1,r.value)),N=e.computed(()=>g(s.value.day||1,s.value.month||1,s.value.year||1,r.value)),V=e.computed(()=>N.value.days.find(E=>o(E.date,s.value))||N.value.days[1]),D=e.computed(()=>{const E=N.value.days.findIndex(R=>o(R.date,s.value)),I=E>-1?E:1;return cn[I]}),k=e.computed(()=>p.value===3),B=e.computed(()=>p.value===2),$=e.computed(()=>p.value===1);function T(E){p.value=E}function S(E){E===1&&(s.value=m(s.value)),E===2&&(s.value=y(s.value)),E===3&&(s.value=v(s.value))}function F(E){E===1&&(s.value=h(s.value)),E===2&&(s.value=b(s.value)),E===3&&(s.value=x(s.value))}function A(){s.value={year:l.year||1,month:l.month||1,day:l.day||1}}return()=>e.createVNode("div",{ref:c,class:"f-calendar"},[e.createVNode(Jn,{activeView:p.value,title:C.value,onViewChange:E=>T(E),onPrevious:E=>S(E),onNext:E=>F(E),onResetToToday:()=>A()},null),e.createVNode("div",null,[$.value&&e.createVNode(oo,{day:V.value,dayInWeek:D.value,events:i.value},null),B.value&&e.createVNode(no,{week:N.value,events:i.value},null),k.value&&e.createVNode(to,{activeDay:s.value,dates:w.value,events:i.value},null)])])}}),vl={install(t){t.component(sa.name,sa).component(oo.name,oo).component(Jn.name,Jn).component(to.name,to).component(no.name,no)},register(t,n,o){t.calendar=sa,n.calendar=yl},registerDesigner(t,n,o){t.calendar=hh,n.calendar=yl}},gh={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/capsule.schema.json",title:"capsule",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a capsule",type:"string"},type:{description:"The type string of capsule component",type:"string",default:"capsule"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},yh=new Map([["appearance",xe]]);function bh(t,n,o){return n}const vh={title:"capsule",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},la={items:{Type:Array,default:[{name:"升序",value:"asc",icon:"f-icon f-icon-col-ascendingorder"},{name:"降序",value:"desc",icon:"f-icon f-icon-col-descendingorder"}]},modelValue:{type:String,default:""},type:{type:String,default:"primary"}},xh={name:{type:String,default:""},value:{type:String,default:""},isActive:{type:Boolean,default:!1},icon:{type:String,default:""},index:{type:Number,default:0}},xl=me(la,gh,yh,bh,vh),Cl=e.defineComponent({name:"FCapsuleItem",props:xh,emits:["mounted","active"],setup(t,n){const o=e.ref(),a=e.ref(t.isActive);e.watch(()=>t.isActive,l=>{a.value=l});const r=e.computed(()=>({"f-capsule-item":!0,"f-capsule-active-item":a.value}));e.onMounted(()=>{n.emit("mounted",o,t.value)});function i(l){n.emit("active",l,{name:t.name,value:t.value})}return()=>e.createVNode("div",{ref:o,class:r.value,onClick:l=>i(l)},[t.icon&&e.createVNode("i",{class:t.icon},null),t.name])}}),Vn=e.defineComponent({name:"FCapsule",props:la,emits:["change","update:modelValue"],setup(t,n){const o=e.ref(t.items),a=e.ref(),r=2,i=e.ref(t.modelValue),l=e.ref("none"),s=e.ref(t.type),p=e.computed(()=>{const V={"f-capsule-container":!0};return s.value&&(V[s.value]=!0),V}),c=e.computed(()=>({})),d=e.computed(()=>({"f-capsule":!0})),u=e.ref(r),f=e.ref(0),g=e.ref(0),m=e.computed(()=>({left:`${u.value}px`,width:`${f.value}px`,transition:l.value})),h=e.computed(()=>({width:`${g.value}px`})),y=new Map;function b(V){var D;if(y.has(V.value)){const k=(D=y.get(V.value))==null?void 0:D.value;if(k){const B=k.getBoundingClientRect(),$=a.value.getBoundingClientRect();u.value=B.left-$.left+r+a.value.scrollLeft,f.value=B.width-2*r}}}function v(V,D){const k=V.value;i.value=k,n.emit("update:modelValue",k),b(V),D&&n.emit("change",k)}function x(V){const D=o.value.findIndex(k=>k.value===V);D>-1&&v(o.value[D],!1)}e.watch(()=>t.modelValue,V=>{i.value=V,x(i.value)}),e.watch(()=>t.items,async V=>{o.value=V,await e.nextTick(),x(i.value),g.value=Array.from(y.values()).reduce((D,k)=>(D+=k.value.clientWidth,D),0)}),e.onMounted(async()=>{x(i.value),await e.nextTick(),l.value="0.1s ease-out all",g.value=Array.from(y.values()).reduce((V,D)=>(V+=D.value.clientWidth,V),0)});function C(V,D){v(D,!0)}function w(V,D){y.set(D,V)}function N(V,D){return e.createVNode(Cl,{name:V.name,value:V.value,isActive:V.value===i.value,index:D,onMounted:w,onActive:C},null)}return()=>e.createVNode("span",{ref:a,class:p.value,style:c.value},[e.createVNode("span",{class:"f-capsule-pane"},[o.value.map((V,D)=>N(V,D))]),e.createVNode("small",{class:d.value,style:m.value},null),e.createVNode("div",{class:"f-capsule-board",style:h.value},null)])}}),Ch=e.defineComponent({name:"FCapsuleDesign",props:la,emits:["change","update:modelValue"],setup(t,n){const o=e.ref(t.items),a=e.ref(),r=2,i=e.ref(t.modelValue),l=e.ref("none"),s=e.ref(t.type),p=e.inject("design-item-context"),c=ve(a,p);e.onMounted(()=>{a.value.componentInstance=c}),n.expose(c.value);const d=e.computed(()=>{const k={"f-capsule-container":!0};return s.value&&(k[s.value]=!0),k}),u=e.computed(()=>({})),f=e.computed(()=>({"f-capsule":!0})),g=e.ref(r),m=e.ref(0),h=e.ref(0),y=e.computed(()=>({left:`${g.value}px`,width:`${m.value}px`,transition:l.value})),b=e.computed(()=>({width:`${h.value}px`})),v=new Map;function x(k){var B;if(v.has(k.value)){const $=(B=v.get(k.value))==null?void 0:B.value;if($){const T=$.getBoundingClientRect(),S=a.value.getBoundingClientRect();g.value=T.left-S.left+r+a.value.scrollLeft,m.value=T.width-2*r}}}function C(k,B){const $=k.value;i.value=$,n.emit("update:modelValue",$),x(k),B&&n.emit("change",$)}function w(k){const B=o.value.findIndex($=>$.value===k);B>-1&&C(o.value[B],!1)}e.watch(()=>t.modelValue,k=>{i.value=k,w(i.value)}),e.watch(()=>t.items,async k=>{o.value=k,await e.nextTick(),w(i.value),h.value=Array.from(v.values()).reduce((B,$)=>(B+=$.value.clientWidth,B),0)}),e.onMounted(async()=>{w(i.value),await e.nextTick(),l.value="0.1s ease-out all",h.value=Array.from(v.values()).reduce((k,B)=>(k+=B.value.clientWidth,k),0)});function N(k,B){C(B,!0)}function V(k,B){v.set(B,k)}function D(k,B){return e.createVNode(Cl,{name:k.name,value:k.value,isActive:k.value===i.value,index:B,onMounted:V,onActive:N},null)}return()=>e.createVNode("span",{ref:a,class:d.value,style:u.value},[e.createVNode("span",{class:"f-capsule-pane"},[o.value.map((k,B)=>D(k,B))]),e.createVNode("small",{class:f.value,style:y.value},null),e.createVNode("div",{class:"f-capsule-board",style:b.value},null)])}}),wl={install(t){t.component(Vn.name,Vn)},register(t,n,o){t.capsule=Vn,n.capsule=xl},registerDesigner(t,n,o){t.capsule=Ch,n.capsule=xl}},Nl={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/check-box.schema.json",title:"checkbox",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a check box",type:"string"},type:{description:"The type string of check box component",type:"string",default:"checkbox"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Vl={title:"checkbox",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Sl=new Map([["appearance",xe]]);function $l(t,n,o){return n}const Dl={id:{Type:String,default:""},customClass:{Type:String,default:""},disable:{Type:Boolean,default:!1},indeterminate:{Type:Boolean,default:!1},modelValue:{Type:Boolean,default:!1},focusOnCreated:{type:Boolean,default:!1}},wh=me(Dl,Nl,Sl,$l,Vl),dn=e.defineComponent({name:"FCheckBox",props:Dl,emits:["change","changeValue","update:modelValue"],setup(t,n){const o=e.ref(),a=e.ref(t.id),r=e.ref(t.customClass),i=e.ref(t.disable),l=e.ref(t.modelValue),s=e.ref(t.indeterminate),p=e.computed(()=>{const d={"custom-control":!0,"custom-checkbox":!0};return r.value&&r.value.split(" ").reduce((u,f)=>(u[f]=!0,u),d),d});function c(d){d.stopPropagation(),d.preventDefault(),i.value||(l.value=!l.value,n.emit("changeValue",l.value),n.emit("update:modelValue",l.value),n.emit("change",{originalEvent:d,checked:l.value}))}return e.watch(()=>t.modelValue,d=>{l.value=d}),e.watch(()=>t.indeterminate,d=>{s.value=d}),e.onMounted(()=>{t.focusOnCreated&&o.value.focus()}),()=>e.createVNode("div",{class:p.value},[e.withDirectives(e.createVNode("input",{ref:o,id:a.value,title:a.value,type:"checkbox",class:"custom-control-input","onUpdate:modelValue":d=>l.value=d,indeterminate:s.value},null),[[e.vModelCheckbox,l.value]]),e.createVNode("label",{for:a.value,class:"custom-control-label",onClick:c},null)])}}),ca={id:String,disable:{type:Boolean,default:!1},enumData:{type:Array,default:[{name:"示例1",value:"example1"},{name:"示例2",value:"example2"}]},horizontal:{type:Boolean,default:!1},isStringValue:{type:Boolean,default:!0},loadData:{type:Function},modelValue:[String,Array],name:{type:String,default:""},separator:{type:String,default:","},tabIndex:{type:Number,default:0},textField:{type:String,default:"name"},valueField:{type:String,default:"value"}},da=me(ca,Nl,Sl,$l,Vl);function kl(t,n,o){const a=e.computed(()=>!t.disable),r=e.ref(t.enumData);function i(u){return u[t.valueField]}function l(u){return u[t.textField]}function s(u){return u?t.isStringValue?u.split(t.separator):u:[]}function p(u){const g=r.value.map(m=>i(m)).filter(m=>u.some(h=>h===String(m)));return t.isStringValue?g.join(t.separator):g}function c(u){const f=String(i(u));return s(o.value).some(m=>m===f)}function d(u,f){if(a.value){let g=s(o.value)||[];const m=String(i(u));!g||!g.length?g.push(m):g.some(h=>h===m)?g=g.filter(h=>h!==m):g.push(m),o.value=p(g),n.emit("changeValue",o.value),n.emit("update:modelValue",o.value)}f.stopPropagation()}return{enumData:r,getValue:i,getText:l,checked:c,onClickCheckbox:d}}const ua=e.defineComponent({name:"FCheckGroup",props:ca,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.horizontal),r=e.ref(t.tabIndex),i=e.ref(t.name),l=e.ref(t.disable),{enumData:s,onClickCheckbox:p,getValue:c,getText:d,checked:u}=kl(t,n,o),f=e.computed(()=>({"farris-checkradio-hor":a.value}));return e.watch(()=>t.modelValue,g=>{o.value=g}),()=>e.createVNode("div",{class:["farris-input-wrap",f.value]},[s.value.map((g,m)=>{const h="checkbox_"+i.value+m;return e.createVNode("div",{class:"custom-control custom-checkbox"},[e.createVNode("input",{type:"checkbox",class:"custom-control-input",name:i.value,id:h,value:c(g),checked:u(g),disabled:l.value,tabindex:r.value,onClick:y=>p(g,y)},null),e.createVNode("label",{class:"custom-control-label",for:h,title:d(g)},[d(g)])])})])}}),Bl=e.defineComponent({name:"FCheckboxGroupDesign",props:ca,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.horizontal),r=e.ref(t.tabIndex),i=e.ref(t.name),l=e.ref(t.disable),s=e.computed(()=>({"farris-checkradio-hor":a.value})),{enumData:p,onClickCheckbox:c,getValue:d,getText:u,checked:f}=kl(t,n,o),g=e.ref(),m=e.inject("design-item-context"),h=ve(g,m);return e.onMounted(()=>{g.value.componentInstance=h}),n.expose(h.value),e.watch(()=>t.modelValue,y=>{o.value=y,n.emit("changeValue",o.value)}),()=>e.createVNode("div",{ref:g,class:["farris-input-wrap",s.value]},[p.value.map((y,b)=>{const v="checkbox_"+i.value+b;return e.createVNode("div",{class:"custom-control custom-checkbox"},[e.createVNode("input",{type:"checkbox",class:"custom-control-input",name:i.value,id:v,value:d(y),checked:f(y),disabled:l.value,tabindex:r.value,onClick:x=>c(y,x)},null),e.createVNode("label",{class:"custom-control-label",for:v,title:u(y)},[u(y)])])})])}}),Tl={install(t){t.component(ua.name,ua)},register(t,n,o){t["check-box"]=dn,n["check-box"]=wh,t["check-group"]=ua,n["check-group"]=da},registerDesigner(t,n,o){t["check-box"]=Bl,n["check-box"]=da,t["check-group"]=Bl,n["check-group"]=da}},Nh={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/color-picker.schema.json",title:"color-picker",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for color picker",type:"string"},type:{description:"The type string of color picker",type:"string",default:"color-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function Vh(t,n,o){return n}const Sh=new Map([["appearance",xe]]),$h={title:"color-picker",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},fa={color:{type:String,default:"#e1e2e3"},disabled:{type:Boolean,default:!1},presets:{type:Array,default:[]},allowColorNull:{type:Boolean,default:!1},onValueChanged:{type:Function,default:()=>{}}},Fl=me(fa,Nh,Sh,Vh,$h);class ao{}class pa extends ao{constructor(n,o,a,r){super(),this.cyan=n,this.magenta=o,this.yellow=a,this.black=r}toString(){return`cmyk(${this.getCyan()}%, ${this.getMagenta()}%, ${this.getYellow()}%, ${this.getBlack()}%)`}getCyan(){return Math.round(this.cyan)}getMagenta(){return Math.round(this.magenta)}getYellow(){return Math.round(this.yellow)}getBlack(){return Math.round(this.black)}}class Sn extends ao{constructor(n,o,a,r){super(),this.hue=n,this.saturation=o,this.lightness=a,this.alpha=r}toString(n=!0){return n?`hsla(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%, ${this.getAlpha()})`:`hsl(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%)`}getHue(){return Math.round(this.hue)}getSaturation(){return Math.round(this.saturation)}getLightness(){return Math.round(this.lightness)}getAlpha(){return Math.round(this.alpha*100)/100}}class $n extends ao{constructor(n,o,a,r){super(),this.hue=n,this.saturation=o,this.value=a,this.alpha=r}toString(n=!0){return n?`hsva(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%, ${this.getAlpha()})`:`hsv(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%)`}getHue(){return Math.round(this.hue)}getSaturation(){return Math.round(this.saturation)}getValue(){return Math.round(this.value)}getAlpha(){return Math.round(this.alpha*100)/100}}class ee extends ao{constructor(n,o,a,r){super(),this.red=n,this.green=o,this.blue=a,this.alpha=r}toString(n=!0){return n?`rgba(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()}, ${this.getAlpha()})`:`rgb(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()})`}getRed(){return Math.round(this.red)}getGreen(){return Math.round(this.green)}getBlue(){return Math.round(this.blue)}getAlpha(){return Math.round(this.alpha*100)/100}}const Q=class Q{};P(Q,"transparent",new ee(0,0,0,0)),P(Q,"aliceblue",new ee(240,248,255,1)),P(Q,"antiquewhite",new ee(250,235,215,1)),P(Q,"aqua",new ee(0,255,255,1)),P(Q,"aquamarine",new ee(127,255,212,1)),P(Q,"azure",new ee(240,255,255,1)),P(Q,"beige",new ee(245,245,220,1)),P(Q,"bisque",new ee(255,228,196,1)),P(Q,"black",new ee(0,0,0,1)),P(Q,"blanchedalmond",new ee(255,235,205,1)),P(Q,"blue",new ee(0,0,255,1)),P(Q,"blueviolet",new ee(138,43,226,1)),P(Q,"brown",new ee(165,42,42,1)),P(Q,"burlywood",new ee(222,184,135,1)),P(Q,"cadetblue",new ee(95,158,160,1)),P(Q,"chartreuse",new ee(127,255,0,1)),P(Q,"chocolate",new ee(210,105,30,1)),P(Q,"coral",new ee(255,127,80,1)),P(Q,"cornflowerblue",new ee(100,149,237,1)),P(Q,"cornsilk",new ee(255,248,220,1)),P(Q,"crimson",new ee(220,20,60,1)),P(Q,"cyan",new ee(0,255,255,1)),P(Q,"darkblue",new ee(0,0,139,1)),P(Q,"darkcyan",new ee(0,139,139,1)),P(Q,"darkgoldenrod",new ee(184,134,11,1)),P(Q,"darkgray",new ee(169,169,169,1)),P(Q,"darkgreen",new ee(0,100,0,1)),P(Q,"darkgrey",Q.darkgray),P(Q,"darkkhaki",new ee(189,183,107,1)),P(Q,"darkmagenta",new ee(139,0,139,1)),P(Q,"darkolivegreen",new ee(85,107,47,1)),P(Q,"darkorange",new ee(255,140,0,1)),P(Q,"darkorchid",new ee(153,50,204,1)),P(Q,"darkred",new ee(139,0,0,1)),P(Q,"darksalmon",new ee(233,150,122,1)),P(Q,"darkseagreen",new ee(143,188,143,1)),P(Q,"darkslateblue",new ee(72,61,139,1)),P(Q,"darkslategray",new ee(47,79,79,1)),P(Q,"darkslategrey",Q.darkslategray),P(Q,"darkturquoise",new ee(0,206,209,1)),P(Q,"darkviolet",new ee(148,0,211,1)),P(Q,"deeppink",new ee(255,20,147,1)),P(Q,"deepskyblue",new ee(0,191,255,1)),P(Q,"dimgray",new ee(105,105,105,1)),P(Q,"dimgrey",Q.dimgray),P(Q,"dodgerblue",new ee(30,144,255,1)),P(Q,"firebrick",new ee(178,34,34,1)),P(Q,"floralwhite",new ee(255,250,240,1)),P(Q,"forestgreen",new ee(34,139,34,1)),P(Q,"fuchsia",new ee(255,0,255,1)),P(Q,"gainsboro",new ee(220,220,220,1)),P(Q,"ghostwhite",new ee(248,248,255,1)),P(Q,"gold",new ee(255,215,0,1)),P(Q,"goldenrod",new ee(218,165,32,1)),P(Q,"gray",new ee(128,128,128,1)),P(Q,"grey",Q.gray),P(Q,"green",new ee(0,128,0,1)),P(Q,"greenyellow",new ee(173,255,47,1)),P(Q,"honeydew",new ee(240,255,240,1)),P(Q,"hotpink",new ee(255,105,180,1)),P(Q,"indianred",new ee(205,92,92,1)),P(Q,"indigo",new ee(75,0,130,1)),P(Q,"ivory",new ee(255,255,240,1)),P(Q,"khaki",new ee(240,230,140,1)),P(Q,"lavender",new ee(230,230,250,1)),P(Q,"lavenderblush",new ee(255,240,245,1)),P(Q,"lawngreen",new ee(124,252,0,1)),P(Q,"lemonchiffon",new ee(255,250,205,1)),P(Q,"lightblue",new ee(173,216,230,1)),P(Q,"lightcoral",new ee(240,128,128,1)),P(Q,"lightcyan",new ee(224,255,255,1)),P(Q,"lightgoldenrodyellow",new ee(250,250,210,1)),P(Q,"lightgray",new ee(211,211,211,1)),P(Q,"lightgreen",new ee(144,238,144,1)),P(Q,"lightgrey",Q.lightgray),P(Q,"lightpink",new ee(255,182,193,1)),P(Q,"lightsalmon",new ee(255,160,122,1)),P(Q,"lightseagreen",new ee(32,178,170,1)),P(Q,"lightskyblue",new ee(135,206,250,1)),P(Q,"lightslategray",new ee(119,136,153,1)),P(Q,"lightslategrey",Q.lightslategray),P(Q,"lightsteelblue",new ee(176,196,222,1)),P(Q,"lightyellow",new ee(255,255,224,1)),P(Q,"lime",new ee(0,255,0,1)),P(Q,"limegreen",new ee(50,205,50,1)),P(Q,"linen",new ee(250,240,230,1)),P(Q,"magenta",new ee(255,0,255,1)),P(Q,"maroon",new ee(128,0,0,1)),P(Q,"mediumaquamarine",new ee(102,205,170,1)),P(Q,"mediumblue",new ee(0,0,205,1)),P(Q,"mediumorchid",new ee(186,85,211,1)),P(Q,"mediumpurple",new ee(147,112,219,1)),P(Q,"mediumseagreen",new ee(60,179,113,1)),P(Q,"mediumslateblue",new ee(123,104,238,1)),P(Q,"mediumspringgreen",new ee(0,250,154,1)),P(Q,"mediumturquoise",new ee(72,209,204,1)),P(Q,"mediumvioletred",new ee(199,21,133,1)),P(Q,"midnightblue",new ee(25,25,112,1)),P(Q,"mintcream",new ee(245,255,250,1)),P(Q,"mistyrose",new ee(255,228,225,1)),P(Q,"moccasin",new ee(255,228,181,1)),P(Q,"navajowhite",new ee(255,222,173,1)),P(Q,"navy",new ee(0,0,128,1)),P(Q,"oldlace",new ee(253,245,230,1)),P(Q,"olive",new ee(128,128,0,1)),P(Q,"olivedrab",new ee(107,142,35,1)),P(Q,"orange",new ee(255,165,0,1)),P(Q,"orangered",new ee(255,69,0,1)),P(Q,"orchid",new ee(218,112,214,1)),P(Q,"palegoldenrod",new ee(238,232,170,1)),P(Q,"palegreen",new ee(152,251,152,1)),P(Q,"paleturquoise",new ee(175,238,238,1)),P(Q,"palevioletred",new ee(219,112,147,1)),P(Q,"papayawhip",new ee(255,239,213,1)),P(Q,"peachpuff",new ee(255,218,185,1)),P(Q,"peru",new ee(205,133,63,1)),P(Q,"pink",new ee(255,192,203,1)),P(Q,"plum",new ee(221,160,221,1)),P(Q,"powderblue",new ee(176,224,230,1)),P(Q,"purple",new ee(128,0,128,1)),P(Q,"red",new ee(255,0,0,1)),P(Q,"rosybrown",new ee(188,143,143,1)),P(Q,"royalblue",new ee(65,105,225,1)),P(Q,"saddlebrown",new ee(139,69,19,1)),P(Q,"salmon",new ee(250,128,114,1)),P(Q,"sandybrown",new ee(244,164,96,1)),P(Q,"seagreen",new ee(46,139,87,1)),P(Q,"seashell",new ee(255,245,238,1)),P(Q,"sienna",new ee(160,82,45,1)),P(Q,"silver",new ee(192,192,192,1)),P(Q,"skyblue",new ee(135,206,235,1)),P(Q,"slateblue",new ee(106,90,205,1)),P(Q,"slategray",new ee(112,128,144,1)),P(Q,"slategrey",Q.slategray),P(Q,"snow",new ee(255,250,250,1)),P(Q,"springgreen",new ee(0,255,127,1)),P(Q,"steelblue",new ee(70,130,180,1)),P(Q,"tan",new ee(210,180,140,1)),P(Q,"teal",new ee(0,128,128,1)),P(Q,"thistle",new ee(216,191,216,1)),P(Q,"tomato",new ee(255,99,71,1)),P(Q,"turquoise",new ee(64,224,208,1)),P(Q,"violet",new ee(238,130,238,1)),P(Q,"wheat",new ee(245,222,179,1)),P(Q,"white",new ee(255,255,255,1)),P(Q,"whitesmoke",new ee(245,245,245,1)),P(Q,"yellow",new ee(255,255,0,1)),P(Q,"yellowgreen",new ee(154,205,50,1));let ma=Q;class je{constructor(n){P(this,"hsva",new $n(0,1,1,1));P(this,"rgba",new ee(255,0,0,1));n&&this.stringToColor(n)}static from(n){return typeof n=="string"?new je(n):n instanceof je?n.clone():n instanceof ee?new je().setRgba(n.red,n.green,n.blue,n.alpha):n instanceof $n?new je().setHsva(n.hue,n.saturation,n.value,n.alpha):n instanceof Sn?new je().setHsla(n.hue,n.saturation,n.lightness,n.alpha):new je(n)}clone(){return je.from(this.getRgba())}setFromString(n){return this.stringToColor(n)}setHsva(n,o=100,a=100,r=1){return n!=null&&(this.hsva.hue=n),o!=null&&(this.hsva.saturation=o),a!=null&&(this.hsva.value=a),r!=null&&(r=r>1?1:r<0?0:r,this.hsva.alpha=r),this.rgba=this.hsvaToRgba(this.hsva),this}setRgba(n,o,a,r=1){return n!=null&&(this.rgba.red=n),o!=null&&(this.rgba.green=o),a!=null&&(this.rgba.blue=a),r!=null&&(r=r>1?1:r<0?0:r,this.rgba.alpha=r),this.hsva=this.rgbaToHsva(this.rgba),this}setHsla(n,o,a,r=1){r!=null&&(r=r>1?1:r<0?0:r,this.rgba.alpha=r);const i=new Sn(n,o,a,r);return this.rgba=this.hslaToRgba(i),this.hsva=this.rgbaToHsva(this.rgba),this}toHexString(n=!1){let o="#"+(16777216|this.rgba.getRed()<<16|this.rgba.getGreen()<<8|this.rgba.getBlue()).toString(16).substr(1);return n&&(o+=(256|Math.round(this.rgba.alpha*255)).toString(16).substr(1)),o.toUpperCase()}toRgbaString(){return this.rgba.toString()}toRgbString(){return this.rgba.toString(!1)}toHslaString(){return this.getHsla().toString()}toHslString(){return this.getHsla().toString(!1)}toHsvaString(){return this.hsva.toString()}toHsvString(){return this.hsva.toString(!1)}toCmykString(){return this.getCmyk().toString()}getHsva(){return new $n(this.hsva.hue,this.hsva.saturation,this.hsva.value,this.hsva.alpha)}getRgba(){return new ee(this.rgba.red,this.rgba.green,this.rgba.blue,this.rgba.alpha)}getHsla(){return this.rgbaToHsla(this.rgba)}getCmyk(){return this.rgbaToCmyk(this.rgba)}hsvaToHsla(n){const{hue:o}=n,a=n.saturation/100,r=n.value/100,i=(2-a)*n.value/2,l=a*r/(i<=1?i:2-i)||0;return new Sn(o,i*100,l*100,n.alpha)}hslaToHsva(n){const{hue:o}=n,a=n.lightness/100*2,r=n.saturation/100*(a<=1?a:2-a),i=(a+r)/2,l=2*r/(a+r)||0;return new $n(o,l,i,n.alpha)}rgbaToHsva(n){const o=n.red/255,a=n.green/255,r=n.blue/255,{alpha:i}=n,l=Math.max(o,a,r),s=Math.min(o,a,r),p=l-s;let c=0,d=l===0?0:p/l,u=l;if(l!==s){switch(l){case o:c=(a-r)/p+(a<r?6:0);break;case a:c=2+(r-o)/p;break;case r:c=4+(o-a)/p;break}c/=6}return c*=360,d*=100,u*=100,new $n(c,d,u,i)}hsvaToRgba(n){let o=1,a=0,r=0;const i=n.saturation/100,l=n.value/100,{alpha:s}=n,p=n.hue/60,c=Math.floor(p),d=p-c,u=(1-i)*l,f=(1-i*d)*l,g=(1-i*(1-d))*l;switch(c){case 6:case 0:o=l,a=g,r=u;break;case 1:o=f,a=l,r=u;break;case 2:o=u,a=l,r=g;break;case 3:o=u,a=f,r=l;break;case 4:o=g,a=u,r=l;break;case 5:o=l,a=u,r=f;break}return o*=255,a*=255,r*=255,new ee(o,a,r,s)}rgbaToHsla(n){const o=n.red/255,a=n.green/255,r=n.blue/255,{alpha:i}=n,l=Math.max(o,a,r),s=Math.min(o,a,r);let p=0,c=0,d=(l+s)/2;const u=l-s;if(l!==s){switch(c=d>.5?u/(2-l-s):u/(l+s),l){case o:p=(a-r)/u+(a<r?6:0);break;case a:p=(r-o)/u+2;break;case r:p=(o-a)/u+4;break}p/=6}return p*=360,c*=100,d*=100,new Sn(p,c,d,i)}hslaToRgba(n){const o=n.hue/360,a=n.saturation/100,r=n.lightness/100,{alpha:i}=n;let l=r,s=r,p=r;if(a!==0){const c=r<.5?r*(1+a):r+a-r*a,d=2*r-c;l=this.hueToRgb(d,c,o+1/3),s=this.hueToRgb(d,c,o),p=this.hueToRgb(d,c,o-1/3)}return l*=255,s*=255,p*=255,new ee(l,s,p,i)}hueToRgb(n,o,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?n+(o-n)*6*a:a<1/2?o:a<2/3?n+(o-n)*(2/3-a)*6:n}cmykToRgba(n){const o=n.black/100,a=n.cyan/100,r=n.magenta/100,i=n.yellow/100;let l=Math.min(1,(1-a)*(1-o)),s=Math.min(1,(1-r)*(1-o)),p=Math.min(1,(1-i)*(1-o));return l*=255,s*=255,p*=255,new ee(l,s,p,1)}rgbaToCmyk(n){const o=n.red/255,a=n.green/255,r=n.blue/255;let i=1-o,l=1-a,s=1-r,p=Math.min(i,l,s);return p===1?new pa(0,0,0,1):(i=(i-p)/(1-p),l=(l-p)/(1-p),s=(s-p)/(1-p),p*=100,i*=100,l*=100,s*=100,new pa(i,l,s,p))}roundNumber(n){return Math.round(n*100)/100}stringToColor(n){const o=n.replace(/ /g,"").toLowerCase();let a=ma[n]||null;if(o[0]==="#"){let l=o.substr(1);const{length:s}=l;let p=1,c;if(s===3)c=l.split("").map(d=>d+d);else if(s===6)c=l.match(/.{2}/g);else if(s===8){const d=l.substr(-2);l=l.substr(0,s-2),p=this.roundNumber(parseInt(d||"FF",16)/255),c=l.match(/.{2}/g)}c&&c.length===3&&(a=new ee(parseInt(c[0],16),parseInt(c[1],16),parseInt(c[2],16),p))}const r=o.indexOf("("),i=o.indexOf(")");if(r!==-1&&i+1===o.length){const l=o.substr(0,r),s=o.substr(r+1,i-(r+1)).split(",");let p=1,c,d;switch(l){case"rgba":p=parseFloat(s.pop());case"rgb":a=new ee(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10),p);break;case"hsla":p=parseFloat(s.pop());break;case"hsl":c=new Sn(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10),p),a=this.hslaToRgba(c);break;case"cmyk":d=new pa(parseInt(s[0],10),parseInt(s[1],10),parseInt(s[2],10),parseInt(s[3],10)),a=this.cmykToRgba(d);break}}return a&&(this.rgba=a,this.hsva=this.rgbaToHsva(a)),this}}var ha=function(t,n){return ha=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(o[r]=a[r])},ha(t,n)};function un(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");ha(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}function ga(t){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&t[n],a=0;if(o)return o.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function ya(t,n){var o=typeof Symbol=="function"&&t[Symbol.iterator];if(!o)return t;var a=o.call(t),r,i=[],l;try{for(;(n===void 0||n-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){l={error:s}}finally{try{r&&!r.done&&(o=a.return)&&o.call(a)}finally{if(l)throw l.error}}return i}function ba(t,n,o){if(o||arguments.length===2)for(var a=0,r=n.length,i;a<r;a++)(i||!(a in n))&&(i||(i=Array.prototype.slice.call(n,0,a)),i[a]=n[a]);return t.concat(i||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;function Ft(t){return typeof t=="function"}function Al(t){var n=function(a){Error.call(a),a.stack=new Error().stack},o=t(n);return o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o}var va=Al(function(t){return function(o){t(this),this.message=o?o.length+` errors occurred during unsubscription:
|
|
2
|
+
`+o.map(function(a,r){return r+1+") "+a.toString()}).join(`
|
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=o}});function xa(t,n){if(t){var o=t.indexOf(n);0<=o&&t.splice(o,1)}}var ro=function(){function t(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var n,o,a,r,i;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var s=ga(l),p=s.next();!p.done;p=s.next()){var c=p.value;c.remove(this)}}catch(h){n={error:h}}finally{try{p&&!p.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}else l.remove(this);var d=this.initialTeardown;if(Ft(d))try{d()}catch(h){i=h instanceof va?h.errors:[h]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var f=ga(u),g=f.next();!g.done;g=f.next()){var m=g.value;try{Ml(m)}catch(h){i=i??[],h instanceof va?i=ba(ba([],ya(i)),ya(h.errors)):i.push(h)}}}catch(h){a={error:h}}finally{try{g&&!g.done&&(r=f.return)&&r.call(f)}finally{if(a)throw a.error}}}if(i)throw new va(i)}},t.prototype.add=function(n){var o;if(n&&n!==this)if(this.closed)Ml(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(o=this._finalizers)!==null&&o!==void 0?o:[]).push(n)}},t.prototype._hasParent=function(n){var o=this._parentage;return o===n||Array.isArray(o)&&o.includes(n)},t.prototype._addParent=function(n){var o=this._parentage;this._parentage=Array.isArray(o)?(o.push(n),o):o?[o,n]:n},t.prototype._removeParent=function(n){var o=this._parentage;o===n?this._parentage=null:Array.isArray(o)&&xa(o,n)},t.prototype.remove=function(n){var o=this._finalizers;o&&xa(o,n),n instanceof t&&n._removeParent(this)},t.EMPTY=function(){var n=new t;return n.closed=!0,n}(),t}(),Il=ro.EMPTY;function El(t){return t instanceof ro||t&&"closed"in t&&Ft(t.remove)&&Ft(t.add)&&Ft(t.unsubscribe)}function Ml(t){Ft(t)?t():t.unsubscribe()}var Pl={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ol={setTimeout:function(t,n){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];return setTimeout.apply(void 0,ba([t,n],ya(o)))},clearTimeout:function(t){var n=Ol.delegate;return((n==null?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Dh(t){Ol.setTimeout(function(){throw t})}function Rl(){}function io(t){t()}var Ca=function(t){un(n,t);function n(o){var a=t.call(this)||this;return a.isStopped=!1,o?(a.destination=o,El(o)&&o.add(a)):a.destination=Fh,a}return n.create=function(o,a,r){return new Na(o,a,r)},n.prototype.next=function(o){this.isStopped||this._next(o)},n.prototype.error=function(o){this.isStopped||(this.isStopped=!0,this._error(o))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(o){this.destination.next(o)},n.prototype._error=function(o){try{this.destination.error(o)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(ro),kh=Function.prototype.bind;function wa(t,n){return kh.call(t,n)}var Bh=function(){function t(n){this.partialObserver=n}return t.prototype.next=function(n){var o=this.partialObserver;if(o.next)try{o.next(n)}catch(a){so(a)}},t.prototype.error=function(n){var o=this.partialObserver;if(o.error)try{o.error(n)}catch(a){so(a)}else so(n)},t.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(o){so(o)}},t}(),Na=function(t){un(n,t);function n(o,a,r){var i=t.call(this)||this,l;if(Ft(o)||!o)l={next:o??void 0,error:a??void 0,complete:r??void 0};else{var s;i&&Pl.useDeprecatedNextContext?(s=Object.create(o),s.unsubscribe=function(){return i.unsubscribe()},l={next:o.next&&wa(o.next,s),error:o.error&&wa(o.error,s),complete:o.complete&&wa(o.complete,s)}):l=o}return i.destination=new Bh(l),i}return n}(Ca);function so(t){Dh(t)}function Th(t){throw t}var Fh={closed:!0,next:Rl,error:Th,complete:Rl},Ah=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function jl(t){return t}function Ih(t){return t.length===0?jl:t.length===1?t[0]:function(o){return t.reduce(function(a,r){return r(a)},o)}}var Va=function(){function t(n){n&&(this._subscribe=n)}return t.prototype.lift=function(n){var o=new t;return o.source=this,o.operator=n,o},t.prototype.subscribe=function(n,o,a){var r=this,i=Mh(n)?n:new Na(n,o,a);return io(function(){var l=r,s=l.operator,p=l.source;i.add(s?s.call(i,p):p?r._subscribe(i):r._trySubscribe(i))}),i},t.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(o){n.error(o)}},t.prototype.forEach=function(n,o){var a=this;return o=_l(o),new o(function(r,i){var l=new Na({next:function(s){try{n(s)}catch(p){i(p),l.unsubscribe()}},error:i,complete:r});a.subscribe(l)})},t.prototype._subscribe=function(n){var o;return(o=this.source)===null||o===void 0?void 0:o.subscribe(n)},t.prototype[Ah]=function(){return this},t.prototype.pipe=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return Ih(n)(this)},t.prototype.toPromise=function(n){var o=this;return n=_l(n),new n(function(a,r){var i;o.subscribe(function(l){return i=l},function(l){return r(l)},function(){return a(i)})})},t.create=function(n){return new t(n)},t}();function _l(t){var n;return(n=t??Pl.Promise)!==null&&n!==void 0?n:Promise}function Eh(t){return t&&Ft(t.next)&&Ft(t.error)&&Ft(t.complete)}function Mh(t){return t&&t instanceof Ca||Eh(t)&&El(t)}function Ph(t){return Ft(t==null?void 0:t.lift)}function Oh(t){return function(n){if(Ph(n))return n.lift(function(o){try{return t(o,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function Rh(t,n,o,a,r){return new jh(t,n,o,a,r)}var jh=function(t){un(n,t);function n(o,a,r,i,l,s){var p=t.call(this,o)||this;return p.onFinalize=l,p.shouldUnsubscribe=s,p._next=a?function(c){try{a(c)}catch(d){o.error(d)}}:t.prototype._next,p._error=i?function(c){try{i(c)}catch(d){o.error(d)}finally{this.unsubscribe()}}:t.prototype._error,p._complete=r?function(){try{r()}catch(c){o.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,p}return n.prototype.unsubscribe=function(){var o;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;t.prototype.unsubscribe.call(this),!a&&((o=this.onFinalize)===null||o===void 0||o.call(this))}},n}(Ca),_h=Al(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Sa=function(t){un(n,t);function n(){var o=t.call(this)||this;return o.closed=!1,o.currentObservers=null,o.observers=[],o.isStopped=!1,o.hasError=!1,o.thrownError=null,o}return n.prototype.lift=function(o){var a=new Hl(this,this);return a.operator=o,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new _h},n.prototype.next=function(o){var a=this;io(function(){var r,i;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var l=ga(a.currentObservers),s=l.next();!s.done;s=l.next()){var p=s.value;p.next(o)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}})},n.prototype.error=function(o){var a=this;io(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=o;for(var r=a.observers;r.length;)r.shift().error(o)}})},n.prototype.complete=function(){var o=this;io(function(){if(o._throwIfClosed(),!o.isStopped){o.isStopped=!0;for(var a=o.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var o;return((o=this.observers)===null||o===void 0?void 0:o.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(o){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,o)},n.prototype._subscribe=function(o){return this._throwIfClosed(),this._checkFinalizedStatuses(o),this._innerSubscribe(o)},n.prototype._innerSubscribe=function(o){var a=this,r=this,i=r.hasError,l=r.isStopped,s=r.observers;return i||l?Il:(this.currentObservers=null,s.push(o),new ro(function(){a.currentObservers=null,xa(s,o)}))},n.prototype._checkFinalizedStatuses=function(o){var a=this,r=a.hasError,i=a.thrownError,l=a.isStopped;r?o.error(i):l&&o.complete()},n.prototype.asObservable=function(){var o=new Va;return o.source=this,o},n.create=function(o,a){return new Hl(o,a)},n}(Va),Hl=function(t){un(n,t);function n(o,a){var r=t.call(this)||this;return r.destination=o,r.source=a,r}return n.prototype.next=function(o){var a,r;(r=(a=this.destination)===null||a===void 0?void 0:a.next)===null||r===void 0||r.call(a,o)},n.prototype.error=function(o){var a,r;(r=(a=this.destination)===null||a===void 0?void 0:a.error)===null||r===void 0||r.call(a,o)},n.prototype.complete=function(){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.complete)===null||a===void 0||a.call(o)},n.prototype._subscribe=function(o){var a,r;return(r=(a=this.source)===null||a===void 0?void 0:a.subscribe(o))!==null&&r!==void 0?r:Il},n}(Sa),Ll=function(t){un(n,t);function n(o){var a=t.call(this)||this;return a._value=o,a}return Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(o){var a=t.prototype._subscribe.call(this,o);return!a.closed&&o.next(this._value),a},n.prototype.getValue=function(){var o=this,a=o.hasError,r=o.thrownError,i=o._value;if(a)throw r;return this._throwIfClosed(),i},n.prototype.next=function(o){t.prototype.next.call(this,this._value=o)},n}(Sa);function Hh(t,n){return n===void 0&&(n=jl),t=t??Lh,Oh(function(o,a){var r,i=!0;o.subscribe(Rh(a,function(l){var s=n(l);(i||!t(r,s))&&(i=!1,r=s,a.next(l))}))})}function Lh(t,n){return t===n}var et=(t=>(t.hex="hex",t.hexa="hexa",t.rgba="rgba",t.rgb="rgb",t.hsla="hsla",t.hsl="hsl",t.cmyk="cmyk",t))(et||{});class $a{constructor(n){P(this,"modelValue",null);P(this,"hueValue",null);P(this,"initValue",null);P(this,"valueChanged",new Sa);P(this,"presetsVisibilityChanges",new Ll(!0));P(this,"initType",null);P(this,"alphaChannelVisibilityChanges",new Ll(!0));P(this,"valueChanges",this.valueChanged.asObservable().pipe(Hh((n,o)=>n.toRgbaString()===o.toRgbaString())));P(this,"colorPresets",[]);const o=n[0],a=je.from(o);this.setValue(a),this.setHueColor(a)}setValueFrom(n,o,a){const r=je.from(n);return this.initValue||(this.initValue=je.from(n)),typeof n=="string"&&this.finOutInputType(n),this.setHueColor(r),this.setValue(r),this}setHueColor(n){(this.hueValue&&n.getHsva().hue>0||!this.hueValue)&&(this.hueValue=new je().setHsva(n.getHsva().hue))}get hue(){return this.hueValue}set hue(n){this.hueValue=n}setValue(n){return this.modelValue=n,this.valueChanged.next(n),this}get value(){return this.modelValue}set value(n){this.setValue(n)}reset(){let n;return this.initValue?(n=this.initValue.clone(),this.setHueColor(n)):(n=je.from(new ee(255,0,0,1)),this.hueValue=new je().setHsva(n.getHsva().hue)),this.setValue(n),this}showAlphaChannel(){return this.alphaChannelVisibilityChanges.next(!0),this}finOutInputType(n){const o=n.replace(/ /g,"").toLowerCase();o[0]==="#"&&(this.initType="hex",o.length>7&&(this.initType="hexa"));const a=o.indexOf("(");switch(o.substr(0,a)){case"rgba":this.initType="rgba";break;case"rgb":this.initType="rgb";break;case"hsla":this.initType="hsla";break;case"hsl":this.initType="hsl";break;case"cmyk":this.initType="cmyk";break}}setColorPresets(n){return this.colorPresets=this.setPresets(n),this}setPresets(n){const o=[];return n.map(a=>{Array.isArray(a)?o.push(this.setPresets(a)):o.push(new je(a))}),o}get presets(){return this.colorPresets}hasPresets(){return this.colorPresets.length>0}}P($a,"finOutInputType");function xt(t,n){switch(n){case et.hex:return t.toHexString();case et.hexa:return t.toHexString(!0);case et.rgb:return t.toRgbString();case et.rgba:return t.toRgbaString();case et.hsl:return t.toHslString();case et.hsla:return t.toHslaString();default:return t.toRgbaString()}}const Wh={color:{type:Object,default:""},hue:{type:Object,default:""},randomId:{type:String,default:""},allowColorNull:{type:Boolean,default:!1}},Wl=e.defineComponent({name:"SvPanel",props:Wh,emits:["update:color"],setup(t,n){const o=e.ref(null),a=e.ref(null),r=e.ref(t.randomId),i=e.ref(t.allowColorNull);function l(){return t.hue?t.hue.toRgbaString():"#3f51b5"}function s(u,f){var g,m;u=Math.max(0,Math.min(u,100)),f=Math.max(0,Math.min(f,100)),o.value&&((g=o.value.style)==null||g.setProperty("top",`${100-f}%`),(m=o.value.style)==null||m.setProperty("left",`${u}%`))}function p(){const u=document.getElementById(`farris-color-picker-plus-sure-${r.value}`);u.className="btn btn-secondary";const f=document.getElementById(`farris-color-picker-plus-input-${r.value}`);f.style.borderColor="#dcdfe6"}function c({x:u,y:f,height:g,width:m}){const h=u*100/m,y=-(f*100/g)+100;s(h,y);const b=t.color==null?"transparent":t.color,v=je.from(b);if(p(),v!=null){const x=t.hue.getHsva(),C=v.getHsva(),w=new je().setHsva(x.hue,h,y,C.alpha);n.emit("update:color",w)}!v&&i.value&&n.emit("update:color",null)}function d(u){if(a.value){const{width:f,height:g,top:m,left:h}=a.value.getBoundingClientRect(),{pageX:y,pageY:b}="touches"in u?u.touches[0]:u,v=Math.max(0,Math.min(y-(h+window.pageXOffset),f)),x=Math.max(0,Math.min(b-(m+window.pageYOffset),g));c({x:v,y:x,height:g,width:f})}}return e.onMounted(()=>{const u=t.color.getHsva();s(u.saturation,u.value)}),e.watch(()=>t.color,u=>{u.getHsva()}),e.watch(()=>t.color,u=>{const f=u.getHsva();s(f.saturation,f.value)}),()=>e.createVNode("div",{class:"f-sv-panel-component",ref:a,style:{backgroundColor:l()},onMousedown:e.withModifiers(u=>d(u),["prevent"]),onTouchstart:e.withModifiers(u=>d(u),["prevent"])},[e.createVNode("div",{class:"color-svpanel__white"},null),e.createVNode("div",{class:"color-svpanel__black"},null),e.createVNode("div",{class:"color-svpanel__cursor",ref:o},[e.createVNode("div",null,null)])])}}),qh={color:{type:Object,default:""},hue:{type:Object,default:""},allowColorNull:{type:Boolean,default:!1},onChange:{type:Function}},ql=e.defineComponent({name:"Hue",props:qh,emits:["update:color","update:hue"],setup(t,n){const o=e.ref(t.hue),a=e.ref(t.allowColorNull),r=[];function i(m){m.preventDefault(),s(m)}const l=e.ref(null);function s(m){if(l.value){const{width:h,height:y,top:b,left:v}=l.value.getBoundingClientRect(),{pageX:x,pageY:C}="touches"in m?m.touches[0]:m,w=Math.max(0,Math.min(x-(v+window.pageXOffset),h)),N=Math.max(0,Math.min(C-(b+window.pageYOffset),y));g({x:w,y:N,height:y,width:h})}}function p(){r.forEach(m=>m()),r.length=0}function c(m){i(m),document.addEventListener("mouseup",p),document.addEventListener("touchend",p),document.addEventListener("touchmove",i)}const d=m=>{c(m),m.stopPropagation()};e.onMounted(()=>{document.querySelectorAll(".f-hue-component").forEach(y=>{y.addEventListener("mousedown",d),y.addEventListener("touchstart",d)});const h=t.color.getHsva();f(h.hue)});const u=e.ref(null);function f(m){var b;const h=Math.max(0,Math.min(m/360*100,100));u.value&&((b=u.value.style)==null||b.setProperty("top",`${h}%`))}function g({x:m,y:h,height:y,width:b}){const v=h/y*360;f(v);const x=t.color.getHsva(),C=new je().setHsva(v,x.saturation,x.value,x.alpha),w=new je().setHsva(v,100,100,x.alpha);(t.color!=null||t.color==null&&a.value)&&(n.emit("update:hue",w),n.emit("update:color",C))}return e.watch(o,m=>{const h=m.getHsva();f(h.hue)}),e.watch(()=>t.color,m=>{const h=m.getHsva();f(h.hue)}),()=>e.createVNode("div",{class:"f-hue-component",ref:l,onMousedown:e.withModifiers(m=>s(m),["prevent"]),onTouchstart:e.withModifiers(m=>s(m),["prevent"])},[e.createVNode("div",{class:"color-hue-slider__bar"},null),e.createVNode("div",{class:"color-hue-slider__thumb",ref:u},null)])}}),zh={color:{type:Object,default:""},randomId:{type:String,default:""},allowColorNull:{type:Boolean,default:!1}},zl=e.defineComponent({name:"Alpha",props:zh,emits:["update:color"],setup(t,n){const o=e.ref(null),a=e.ref(null),r=e.ref(t.randomId),i=e.ref(t.allowColorNull),l=d=>{var g;const u=Math.max(0,Math.min(d*100,100));a.value&&((g=a.value.style)==null||g.setProperty("left",`${u}%`))};function s(d){if(o.value){const{width:u,height:f,top:g,left:m}=o.value.getBoundingClientRect(),{pageX:h,pageY:y}="touches"in d?d.touches[0]:d,b=Math.max(0,Math.min(h-(m+window.pageXOffset),u)),v=Math.max(0,Math.min(y-(g+window.pageYOffset),f));c({x:b,y:v,height:f,width:u})}}function p(){const d=document.getElementById(`farris-color-picker-plus-sure-${r.value}`);d.className="btn btn-secondary";const u=document.getElementById(`farris-color-picker-plus-input-${r.value}`);u.style.borderColor="#dcdfe6"}const c=({x:d,width:u})=>{const f=d/u;l(f),p();const g=t.color.getHsva(),m=new je().setHsva(g.hue,g.saturation,g.value,f);t.color!=null?n.emit("update:color",m):t.color==null&&i.value&&n.emit("update:color",null)};return e.onMounted(()=>{const d=t.color.getHsva();l(d.alpha)}),e.watch(()=>t.color,d=>{const u=d.getHsva();l(u.alpha)}),()=>e.createVNode("div",{class:"f-alpha-component",ref:o,onMousedown:e.withModifiers(d=>s(d),["prevent"]),onTouchstart:e.withModifiers(d=>s(d),["prevent"])},[e.createVNode("div",{class:"color-alpha-slider__bar"},[e.createTextVNode(" ")]),e.createVNode("div",{class:"color-alpha-slider__thumb",ref:a},null)])}}),Gh={color:{type:Object,default:""},hue:{type:Object,default:""},colorPresets:{type:Object,default:""},randomId:{type:String,default:""}},Gl=e.defineComponent({name:"Preset",props:Gh,emits:["update:hue","update:color"],setup(t,n){const o=e.ref(new je),a=e.ref(t.colorPresets),r=e.ref(t.randomId);function i(){const c=document.getElementById(`farris-color-picker-plus-sure-${r.value}`);c.className="btn btn-secondary";const d=document.getElementById(`farris-color-picker-plus-input-${r.value}`);d.style.borderColor="#dcdfe6"}function l(c){i();const d=c.getRgba(),u=c.getHsva(),f=new je().setRgba(d.red,d.green,d.blue,d.alpha),g=new je().setHsva(u.hue);o.value=c,n.emit("update:hue",g),n.emit("update:color",f)}function s(c){const d=o.value.getRgba().toString(),u=o.value.getHsva().toString(),f=c.getRgba().toString()===d&&c.getHsva().toString()===u;return{"color-preset__color-selector":f,selected:f}}function p(c,d){return e.createVNode("div",{class:"color-preset__color-selector"},[e.createVNode("div",{key:d,class:s(c),style:{backgroundColor:c.toRgbString()},onClick:()=>l(c)},null)])}return()=>e.createVNode("div",{class:"f-preset-component"},[e.createVNode("div",{class:"color-preset__colors"},[a.value.map((c,d)=>p(c,d))])])}}),Da=e.defineComponent({name:"FColorPicker",props:fa,emits:["valueChanged","activeChange","update:color","update:hue"],setup(t,n){const o=e.ref(new je(t.color)),a=e.ref(t.color),r=e.ref(t.disabled),i=e.ref(t.color),l=e.ref(t.allowColorNull),s=e.ref(t.presets),p=e.ref(!1),c=e.ref(!1),d=e.ref(!1),u=e.ref("HEX"),f=Math.floor(Math.random()*1e3).toString();let g=-1,m,h=new $a("#000000");const y=e.ref(t.color);let b,v;const x=e.ref(null),C=e.ref(null),w=e.ref(null);let N=e.computed(()=>!m&&h&&h.initType?h.initType:m);const V=e.computed({get(){return m&&a.value!==null?(K(m),xt(new je(a.value),et[m])):a.value},set(q){q!==null&&(H(q),M(q))}}),D=e.ref(V.value),k=e.computed(()=>g>-1),B=e.computed(()=>s.value.length>0),$=e.computed(()=>({"background-color":i.value})),T=e.computed(()=>c.value&&p.value?"display:flex":"display:none"),S=[{text:"HEX",type:et.hex},{text:"RGBA",type:et.rgba}];function F(){const q=document.getElementById("farris-color-picker-panel");q.id=`farris-color-picker-panel-${f}`;const L=document.getElementById("farris-color-picker-plus-sure");L.id=`farris-color-picker-plus-sure-${f}`;const X=document.getElementById("farris-color-picker-plus-input");X.id=`farris-color-picker-plus-input-${f}`,v=document.getElementById(`farris-color-picker-plus-sure-${f}`),b=document.getElementById(`farris-color-picker-panel-${f}`),b.className="color-picker-panel disabled"}function A(){if(!l.value&&!a.value){document.getElementById(`farris-color-picker-plus-sure-${f}`).classList.toggle("disabled");const L=document.getElementById(`farris-color-picker-plus-input-${f}`);L.style.borderColor="red"}}function E(){a.value&&(H(a.value),!a.value&&l.value||(a.value=xt(new je(a.value),et[N.value])),D.value=V.value),O(K(h.initType))}function I(){a.value&&H(a.value),h.hasPresets()||h.setColorPresets(s.value),a.value?i.value=xt(new je(a.value),et[N.value]):!a.value&&l.value&&(i.value=null)}function R(){h.valueChanges.subscribe(q=>{const L=xt(q,et[m||h.initType]);a.value=L})}function O(q){u.value=S[q].text}function G(){var q;c.value=!!(m!=null&&m.includes("a")||(q=h.initType)!=null&&q.includes("a"))}e.onBeforeMount(()=>{h.setColorPresets(s.value||["#eaecf3"])}),e.onMounted(()=>{F(),A(),E(),I()}),e.watch(u,()=>{R(),V.value=xt(new je(a.value),et[m||h.initType]),o.value=new je(V.value),G()}),e.watch(a,q=>{xt(h.value,h.initType)!==q&&q!==null&&H(q),O(K(h.initType))}),e.watch(o,q=>{a.value=xt(q,et[m||h.initType]),H(a.value),V.value=a.value});function M(q){const L=document.getElementById(`farris-color-picker-plus-input-${f}`);(q==""||q==null||q==null)&&!l.value?(a.value=null,L.style.borderColor="red",v.className="btn btn-secondary disabled"):(L.style.borderColor="#dcdfe6",v.className="btn btn-secondary")}function j(q){var L,X;if(q==null||q.stopPropagation(),l.value){i.value=(a==null?void 0:a.value)??null;const U={elementValue:i};n.emit("valueChanged",U),W()}if(!l.value&&!(V.value==null||V.value==null||V.value=="")){(X=(L=x.value)==null?void 0:L.style)==null||X.setProperty("background",a.value),d.value=!0,i.value=a.value;const U={elementValue:i};n.emit("valueChanged",U),W()}!y.value&&!a.value&&!d.value&&l&&W(),M(a.value),V.value=a.value,v.classList.contains("disabled")||(D.value=a.value,p.value=!1)}function H(q){h==null||h.setValueFrom(q,f,l.value)}function _(q){b=document.getElementById(`farris-color-picker-panel-${f}`);const L=b.className=="color-picker-panel";r.value||L||(p.value=!0,b.classList.toggle("disabled"),A(),H(a.value),q.stopPropagation())}function W(){b=document.getElementById(`farris-color-picker-panel-${f}`),b.className="color-picker-panel disabled"}function K(q){const L=S.findIndex(X=>X.type===q);return g=L,L}function z(q){if(!v.classList.contains("disabled")){const L=S.length;g=(L+g+(q==="up"?1:-1))%L,m=S[g].type,O(g),H(a.value)}}return()=>e.createVNode("div",{class:"f-color-picker-component",ref:C},[e.createVNode("div",{class:["color-picker-panel",{disabled:r.value}],id:"farris-color-picker-panel",ref:w,onClick:q=>q.stopPropagation(),style:"top:30px"},[e.createVNode("div",{class:"color-picker-main"},[e.createVNode(ql,{hue:h.hue,"onUpdate:hue":q=>h.hue=q,allowColorNull:l.value,color:o.value,"onUpdate:color":q=>o.value=q},null),e.createVNode(Wl,{randomId:f,hue:h.hue,"onUpdate:hue":q=>h.hue=q,allowColorNull:l.value,color:o.value,"onUpdate:color":q=>o.value=q},null)]),e.createVNode(zl,{style:T.value,randomId:f,allowColorNull:l.value,color:o.value,"onUpdate:color":q=>o.value=q},null),e.createVNode("div",{class:"input-btn",style:"display:flex;align-items: center;"},[e.withDirectives(e.createVNode("span",{style:"width:40px;margin-right:10px;"},[u.value]),[[e.vShow,B]]),e.withDirectives(e.createVNode("input",{type:"text",title:"color-picker-plus",id:"farris-color-picker-plus-input","onUpdate:modelValue":q=>V.value=q,style:"float:none"},null),[[e.vModelText,V.value]]),e.withDirectives(e.createVNode("div",{class:"type-icon-btn-wrapper",style:"cursor:pointer"},[e.createVNode("span",{class:"f-icon f-icon-arrow-60-up type-icon-btn",onClick:()=>z("up")},null),e.createVNode("span",{class:"f-icon f-icon-arrow-60-down type-icon-btn",onClick:()=>z("down")},null)]),[[e.vShow,B]]),e.createVNode("div",{class:"input-btn"},[e.createVNode("button",{id:"farris-color-picker-plus-sure",class:"btn btn-secondary",onClick:q=>j(q)},[e.createTextVNode("确定")])])]),e.withDirectives(e.createVNode(Gl,{color:o.value,"onUpdate:color":q=>o.value=q,hue:h.hue,"onUpdate:hue":q=>h.hue=q,randomId:f,colorPresets:h.presets},null),[[e.vShow,k]])]),e.createVNode("div",{class:"color-picker-wrapper"},[e.createVNode("input",{title:"color-picker-input",type:"text",class:"color-picker-input form-control",value:D.value,readonly:r.value,onClick:q=>q.stopPropagation()},null),e.createVNode("div",{class:"color-picker-trigger",onClick:_},[e.createVNode("div",{class:"color-picker-trigger-inner"},[e.createVNode("div",{style:$.value},null)])])])])}}),Uh=e.defineComponent({name:"FColorPickerDesign",props:fa,emits:["valueChanged","activeChange","update:color","update:hue"],setup(t,n){const o=e.ref(new je(t.color)),a=e.ref(t.color),r=e.ref(t.disabled),i=e.ref(t.color),l=e.ref(t.allowColorNull),s=e.ref(t.presets),p=e.ref(!1),c=e.ref(!1),d=e.ref(!1),u=e.ref("HEX"),f=Math.floor(Math.random()*1e3).toString();let g=-1,m,h=new $a("#000000");const y=e.ref(t.color);let b,v;const x=e.ref(null),C=e.ref(null),w=e.ref(),N=e.inject("design-item-context"),V=ve(w,N);e.onMounted(()=>{w.value.componentInstance=V}),n.expose(V.value);let D=e.computed(()=>!m&&h&&h.initType?h.initType:m);const k=e.computed({get(){return m&&a.value!==null?(z(m),xt(new je(a.value),et[m])):a.value},set(L){L!==null&&(W(L),H(L))}}),B=e.ref(k.value),$=e.computed(()=>g>-1),T=e.computed(()=>s.value.length>0),S=e.computed(()=>({"background-color":i.value})),F=e.computed(()=>c.value&&p.value?"display:flex":"display:none"),A=[{text:"HEX",type:et.hex},{text:"RGBA",type:et.rgba}];function E(){const L=document.getElementById("farris-color-picker-panel");L.id=`farris-color-picker-panel-${f}`;const X=document.getElementById("farris-color-picker-plus-sure");X.id=`farris-color-picker-plus-sure-${f}`;const U=document.getElementById("farris-color-picker-plus-input");U.id=`farris-color-picker-plus-input-${f}`,v=document.getElementById(`farris-color-picker-plus-sure-${f}`),b=document.getElementById(`farris-color-picker-panel-${f}`),b.className="color-picker-panel disabled"}function I(){if(!l.value&&!a.value){document.getElementById(`farris-color-picker-plus-sure-${f}`).classList.toggle("disabled");const X=document.getElementById(`farris-color-picker-plus-input-${f}`);X.style.borderColor="red"}}function R(){a.value&&(W(a.value),!a.value&&l.value||(a.value=xt(new je(a.value),et[D.value])),B.value=k.value),M(z(h.initType))}function O(){a.value&&W(a.value),h.hasPresets()||h.setColorPresets(s.value),a.value?i.value=xt(new je(a.value),et[D.value]):!a.value&&l.value&&(i.value=null)}function G(){h.valueChanges.subscribe(L=>{const X=xt(L,et[m||h.initType]);a.value=X})}function M(L){u.value=A[L].text}function j(){var L;c.value=!!(m!=null&&m.includes("a")||(L=h.initType)!=null&&L.includes("a"))}e.onBeforeMount(()=>{h.setColorPresets(s.value||["#eaecf3"])}),e.onMounted(()=>{E(),I(),R(),O()}),e.watch(u,()=>{G(),k.value=xt(new je(a.value),et[m||h.initType]),o.value=new je(k.value),j()}),e.watch(a,L=>{xt(h.value,h.initType)!==L&&L!==null&&W(L),M(z(h.initType))}),e.watch(o,L=>{a.value=xt(L,et[m||h.initType]),W(a.value),k.value=a.value});function H(L){const X=document.getElementById(`farris-color-picker-plus-input-${f}`);(L==""||L==null||L==null)&&!l.value?(a.value=null,X.style.borderColor="red",v.className="btn btn-secondary disabled"):(X.style.borderColor="#dcdfe6",v.className="btn btn-secondary")}function _(){var L,X;if(l.value){i.value=(a==null?void 0:a.value)??null;const U={elementValue:i};n.emit("valueChanged",U),b.classList.toggle("disabled")}if(!l.value&&!(k.value==null||k.value==null||k.value=="")){(X=(L=x.value)==null?void 0:L.style)==null||X.setProperty("background",a.value),d.value=!0,i.value=a.value;const U={elementValue:i};n.emit("valueChanged",U),b.classList.toggle("disabled")}!y.value&&!a.value&&!d.value&&l&&b.classList.toggle("disabled"),H(a.value),k.value=a.value,v.classList.contains("disabled")||(B.value=a.value,p.value=!1)}function W(L){h==null||h.setValueFrom(L,f,l.value)}function K(L){r.value||(p.value=!0,b.classList.toggle("disabled"),I(),W(a.value))}function z(L){const X=A.findIndex(U=>U.type===L);return g=X,X}function q(L){if(!v.classList.contains("disabled")){const X=A.length;g=(X+g+(L==="up"?1:-1))%X,m=A[g].type,M(g),W(a.value)}}return()=>e.createVNode("div",{class:"f-color-picker-component",ref:w},[e.createVNode("div",{class:["color-picker-panel",{disabled:r.value}],id:"farris-color-picker-panel",ref:C,onClick:L=>L.stopPropagation,style:"top:30px"},[e.createVNode("div",{class:"color-picker-main"},[e.createVNode(ql,{hue:h.hue,"onUpdate:hue":L=>h.hue=L,allowColorNull:l.value,color:o.value,"onUpdate:color":L=>o.value=L},null),e.createVNode(Wl,{randomId:f,hue:h.hue,"onUpdate:hue":L=>h.hue=L,allowColorNull:l.value,color:o.value,"onUpdate:color":L=>o.value=L},null)]),e.createVNode(zl,{style:F.value,randomId:f,allowColorNull:l.value,color:o.value,"onUpdate:color":L=>o.value=L},null),e.createVNode("div",{class:"input-btn",style:"display:flex;align-items: center;"},[e.withDirectives(e.createVNode("span",{style:"width:40px;margin-right:10px;"},[u.value]),[[e.vShow,T]]),e.withDirectives(e.createVNode("input",{type:"text",id:"farris-color-picker-plus-input","onUpdate:modelValue":L=>k.value=L,style:"float:none"},null),[[e.vModelText,k.value]]),e.withDirectives(e.createVNode("div",{class:"type-icon-btn-wrapper",style:"cursor:pointer"},[e.createVNode("span",{class:"f-icon f-icon-arrow-60-up type-icon-btn",onClick:()=>q("up")},null),e.createVNode("span",{class:"f-icon f-icon-arrow-60-down type-icon-btn",onClick:()=>q("down")},null)]),[[e.vShow,T]]),e.createVNode("div",{class:"input-btn"},[e.createVNode("button",{id:"farris-color-picker-plus-sure",class:"btn btn-secondary",onClick:_},[e.createTextVNode("确定")])])]),e.withDirectives(e.createVNode(Gl,{color:o.value,"onUpdate:color":L=>o.value=L,colorPresets:h.presets,hue:h.hue,"onUpdate:hue":L=>h.hue=L,randomId:f},null),[[e.vShow,$]])]),e.createVNode("div",{class:"color-picker-wrapper"},[e.createVNode("input",{type:"text",class:"color-picker-input form-control",value:B.value,readonly:r.value,onClick:L=>L.stopPropagation()},null),e.createVNode("div",{class:"color-picker-trigger",onClick:K},[e.createVNode("div",{class:"color-picker-trigger-inner"},[e.createVNode("div",{style:S.value},null)])])])])}}),Ul={install(t){t.component(Da.name,Da)},register(t,n,o){t["color-picker"]=Da,n["color-picker"]=Fl},registerDesigner(t,n,o){t["color-picker"]=Uh,n["color-picker"]=Fl}},Yh=new Map([["appearance",xe]]),Kh={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/combo-list.schema.json",title:"combo-list",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"combo-list"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function Xh(t,n,o){return n}const Qh={title:"combo-list",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},ka={id:{type:String},data:{type:Array,default:[]},displayText:{type:String,default:""},disabled:{default:!1,type:Boolean},dropDownIcon:{type:String,default:'<span class="f-icon f-icon-arrow-60-down"></span>'},editable:{default:!1,type:Boolean},enableClear:{default:!0,type:Boolean},enableSearch:{type:Boolean,default:!1},enableTitle:{default:!0,type:Boolean},fitEditor:{default:!1,type:Boolean},forcePlaceholder:{default:!1,type:Boolean},hidePanelOnClear:{default:!0,type:Boolean},idField:{default:"id",type:String},mapFields:{type:Object},maxHeight:{default:350,type:Number},maxLength:{type:Number},multiSelect:{default:!1,type:Boolean},modelValue:{},placeholder:{type:String},placement:{type:String,default:"auto"},readonly:{default:!1,type:Boolean},remote:{default:null,type:Object},remoteSearch:{default:!1,type:Boolean},separator:{default:",",type:String},tabIndex:{type:Number,default:-1},textField:{default:"name",type:String},titleField:{default:"name",type:String},valueField:{default:"id",type:String},viewType:{default:"text",type:String},change:{type:Function,default:()=>{}},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!0},beforeOpen:{type:Function,default:null}},Yl=me(ka,Kh,Yh,Xh,Qh),Zh={dataSource:{type:Array,default:[]},enableSearch:{type:Boolean,default:!1},idField:{type:String,default:"id"},multiSelect:{default:!1,type:Boolean},selectedValues:{type:String,default:""},separator:{type:String,default:","},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},width:{type:Number},maxHeight:{type:Number},valueField:{type:String,default:"id"},onSelectionChange:{type:Function,default:()=>{}}},Kl=new Map([["appearance",xe]]);function Xl(t,n,o){return n}const Jh={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/list-view.schema.json",title:"list-view",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for list-view",type:"string"},type:{description:"The type string of list-view",type:"string",default:"list-view"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},e0={title:"list-view",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},lo={columns:{type:Array,default:[{field:"name",title:"",dataType:"string"}]},data:{type:Array,default:[]},draggable:{type:Boolean,default:!1},multiSelect:{Type:Boolean,default:!1},multiSelectMode:{Type:String,default:"OnCheck"},idField:{Type:String,default:"id"},valueField:{Type:String,default:"id"},textField:{Type:String,default:"name"},titleField:{Type:String,default:"name"},view:{Type:String,default:"ContentView"},size:{Type:String,default:"default"},placeholder:{type:String,default:""},header:{Type:String,default:"ContentHeader"},headerClass:{Type:String,default:""},itemClass:{Type:String,default:""},selectionValues:{type:Array,default:[]},group:{type:Object},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},keepOrder:{type:Boolean,default:!1},disableField:{type:String,default:"disabled"}},Ql=me(lo,Jh,Kl,Xl,e0);function Zl(t,n){function o(i){const l=[];let s=i.nextNode();for(;s;)l.push(s),s=i.nextNode();return l}function a(i,l){const s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT);return o(s).map(u=>({textNode:u,text:(u.textContent||"").toLocaleLowerCase()})).map(({textNode:u,text:f})=>{const g=[];let m=0;for(;m<f.length;){const h=f.indexOf(l,m);if(h===-1)break;g.push(h),m=h+l.length}return g.map(h=>{const y=new Range;return y.setStart(u,h),y.setEnd(u,h+l.length),y})}).flat()}function r(i){if(!CSS.highlights||(CSS.highlights.clear(),!i||!n))return;const l=a(n.value,i.toLocaleLowerCase()),s=new Highlight(...l);CSS.highlights.set("search-result",s)}return{search:r}}var ht=(t=>(t[t.readonly=0]="readonly",t[t.editable=1]="editable",t[t.editing=2]="editing",t))(ht||{}),fn=(t=>(t[t.initial=0]="initial",t[t.editing=1]="editing",t))(fn||{}),Wt=(t=>(t[t.data=0]="data",t[t.group=1]="group",t[t.summary=2]="summary",t))(Wt||{}),ae=(t=>(t[t.none=0]="none",t[t.filterable=1]="filterable",t[t.sortable=2]="sortable",t[t.filtered=4]="filtered",t[t.sorted=8]="sorted",t[t.ascending=16]="ascending",t[t.descending=32]="descending",t))(ae||{});function t0(t,n,o,a,r,i,l){const s=[{name:"升序",value:"asc",icon:"f-icon f-icon-col-ascendingorder"},{name:"无",value:"none"},{name:"降序",value:"desc",icon:"f-icon f-icon-col-descendingorder"}];function p(b){const v=b.status,x=(v&ae.sorted)===ae.sorted,C=(v&ae.ascending)===ae.ascending,w=(v&ae.descending)===ae.descending;let N=x?v^ae.sorted:v;return N=C?N^ae.ascending:N,N=w?N^ae.descending:N,N}function c(b){b.sortType="none",b.status=p(b);const v=b.column;v&&(v.sort="none",v.sortOrder=0,t.applyColumnSorter(n,i))}function d(b,v){v.filterValue=null,n.removeFilter(`field_filter_${v.field}`),c(v)}function u(b){const v=p(b),x=b.sortType==="none"?v:b.sortType==="asc"?v|ae.sorted|ae.ascending:v|ae.sorted|ae.descending;b.status=x;const C=b.column;C&&(C.sort=b.sortType,C.sortOrder=b.sortType!=="none"?C.sortOrder:0,b.status=x,t.applyColumnSorter(n,i))}function f(b){const v=(b.status&ae.filtered)===ae.filtered;b.status=v?b.status^ae.filtered:b.status|ae.filtered;const x=b.filterValue!=null&&b.filterValue!==""&&b.filter;n.refresh()}function g(b,v){v.showPopover=!1,v.filterHistory=void 0,r.updateFilterHistory(v,v.filterValue),f(v),u(v),l.reCalculateVisualDataRows()}function m(b){const v=b.status,x=(v&ae.sorted)===ae.sorted,C=x&&(v&ae.ascending)===ae.ascending;b.sortType=x?C?"asc":"desc":"none",i.updateSorter(b,n)}function h(b,v){v.showPopover=!1,v.filterHistory=void 0,m(v)}function y(b){return e.createVNode("div",{class:"fv-column-sort-filter-container"},[e.createVNode("div",{class:"fv-column-sort-section"},[e.createVNode(e.resolveComponent("f-capsule"),{items:s,modelValue:b.sortType,"onUpdate:modelValue":v=>b.sortType=v,type:"secondary"},null)]),e.createVNode("div",{class:"fv-column-filter-section"},[e.createVNode("div",{class:"fv-column-filter-section-title"},[e.createTextVNode("筛选")]),e.createVNode("div",{class:"fv-column-filter-section-editor"},[o.getFilterEditor(b)])]),e.createVNode("div",{class:"fv-column-sort-filter-footer"},[e.createVNode("div",{class:"fv-column-clear-section"},[e.createVNode(e.resolveComponent("f-button"),{style:"margin: 5px 0;padding-left: 0;",type:"link",onClick:v=>d(v,b)},{default:()=>[e.createTextVNode("清空")]})]),e.createVNode("div",{class:"fv-column-confirm-section"},[e.createVNode(e.resolveComponent("f-button"),{style:"margin: 5px;width: 48px;",onClick:v=>g(v,b)},{default:()=>[e.createTextVNode("确定")]}),e.createVNode(e.resolveComponent("f-button"),{style:"margin: 5px;width: 48px;",type:"secondary",onClick:v=>h(v,b)},{default:()=>[e.createTextVNode("取消")]})])])])}return{renderFilterContainer:y}}function n0(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}function o0(t,n,o,a,r,i,l,s,p,c,d){function u(S){const F=S.status;return{"fv-column-handler":!0,"fv-column-handler-active":(F&ae.filtered)===ae.filtered||(F&ae.sorted)===ae.sorted||S.showPopover}}function f(S){return(S.status&ae.sortable)===ae.sortable&&(S.status&ae.filterable)===ae.none&&(S.status&ae.sorted)===ae.none}function g(S){return(S.status&ae.sortable)===ae.sortable&&(S.status&ae.filterable)===ae.none&&(S.status&ae.sorted)===ae.sorted&&(S.status&ae.ascending)===ae.ascending}function m(S){return(S.status&ae.sortable)===ae.sortable&&(S.status&ae.filterable)===ae.none&&(S.status&ae.sorted)===ae.sorted&&(S.status&ae.descending)===ae.descending}function h(S){return(S.status&ae.sortable)===ae.none&&(S.status&ae.filterable)===ae.filterable&&(S.status&ae.sorted)===ae.none}function y(S){return(S.status&ae.sortable)===ae.sortable&&(S.status&ae.filterable)===ae.filterable&&(S.status&ae.sorted)===ae.none}function b(S){return(S.status&ae.sortable)===ae.sortable&&(S.status&ae.filterable)===ae.filterable&&(S.status&ae.sorted)===ae.sorted&&(S.status&ae.ascending)===ae.ascending}function v(S){return(S.status&ae.sortable)===ae.sortable&&(S.status&ae.filterable)===ae.filterable&&(S.status&ae.sorted)===ae.sorted&&(S.status&ae.descending)===ae.descending}const x=function(S){return{"f-icon":!0,"f-icon-col-defaultsort":f(S),"f-icon-col-ascending":g(S),"f-icon-col-descending":m(S),"f-icon-col-filter":h(S),"f-icon-col-defaultfilterandsort":y(S),"f-icon-col-filterandascending":b(S),"f-icon-col-filteranddescending":v(S)}},C=new Map([[ae.sortable,ae.sortable|ae.sorted|ae.ascending],[ae.sortable|ae.sorted|ae.ascending,ae.sortable|ae.sorted|ae.descending],[ae.sortable|ae.sorted|ae.descending,ae.sortable]]),{renderFilterContainer:w}=t0(r,i,l,s,p,c,d),N=e.ref();function V(S,F){F.filter(A=>A!==S&&A.showPopover).forEach(A=>{A.showPopover=!1})}function D(S){let F;return e.createVNode(e.resolveComponent("f-popover"),{ref:N,class:"fv-column-handler-popover",host:n.value,"z-index":0,"right-boundary":a.value,offsetX:d.offsetX,visible:!0,onHidden:()=>{S.showPopover=!1}},n0(F=w(S))?F:{default:()=>[F]})}async function k(S,F){F.showPopover=!F.showPopover,await e.nextTick();const A=N.value;A&&A.show(S.target)}function B(S){const F=S.status;if((F&ae.sortable)===ae.sortable&&(F&ae.filterable)===ae.none&&C.has(F)){const I=C.get(F),R=(I&ae.sorted)===ae.sorted,O=(I&ae.ascending)===ae.ascending,G=(I&ae.descending)===ae.descending,M=S.column;M&&(M.sort=O?"asc":G?"desc":"none",M.sortOrder=R?M.sortOrder:0,S.status=I,r.applyColumnSorter(i,c),d.reCalculateVisualDataRows())}}function $(S,F,A){B(F),V(F,A),(F.status&ae.filterable)===ae.filterable&&k(S,F)}function T(S,F,A){return[e.createVNode("span",{class:u(S),onClick:I=>$(I,S,A)},[e.createVNode("i",{class:x(S)},null),S&&S.column&&S.sortType!=="none"&&(S.column.sortOrder||""),S.showPopover&&D(S)])]}return{renderHeaderCellHandler:T}}const a0=new Map([["appearance",xe]]);function r0(t,n,o){return n}const i0={title:"transfer",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},s0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/transfer.schema.json",title:"transfer",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for transfer",type:"string"},type:{description:"The type string of transfer",type:"string",default:"transfer"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Ba={dataSource:{type:Array,default:[]},displayType:{type:String,default:"List"},enableSearch:{type:Boolean,default:!0},identifyField:{type:String,default:"id"},textField:{type:String,default:"name"},placeholder:{type:String,default:""},selections:{type:Array,default:[]},selectionValues:{type:Array,default:[]}},Jl=me(Ba,s0,a0,r0,i0),Dn=e.defineComponent({name:"FTransfer",props:Ba,emits:["change","activeChange"],setup(t,n){const o=e.ref(t.identifyField),a=e.ref("已选:"),r=e.ref("项数据"),i=e.ref(t.displayType),l=e.ref(!1),s=e.ref(t.dataSource),p=e.ref(t.selections||[]),c=e.computed(()=>p.value.map(D=>D[o.value])),d=new Map;function u(){const D=new Map,k=t.selectionValues||[];k.length&&k.reduce(($,T)=>($.set(T,!0),$),D);const B=t.selections||[];B.length&&(D.clear(),B.reduce(($,T)=>($.set(T[o.value],!0),$),D)),p.value.length||(p.value=s.value.filter($=>D.has($[o.value])).map($=>Object.assign({},$))),s.value.forEach($=>{const T=$[o.value],S=D.has(T);$.checked=S,S&&d.set(T,$)})}u();const f=e.computed(()=>i.value==="List"),g=e.computed(()=>i.value==="Tree");function m(D){}function h(){return e.createVNode(kt,{class:"f-utils-fill",data:s.value,"multi-select":!0,draggable:!1,header:"Search",headerClass:"transfer-search-box","selection-values":c.value,onSelectionChange:m},{default:()=>[e.createTextVNode(" ")]})}function y(){return e.createVNode(e.Fragment,null,null)}function b(){return e.createVNode("div",{class:"f-utils-fill option-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column option-pane-content f-utils-fill"},[e.createVNode("div",{class:"container columns-box d-flex f-utils-fill"},[f.value&&h(),g.value&&y()])])])}function v(D){const k=D[o.value];if(k!==null||k!==void 0){p.value=p.value.filter($=>$[o.value]!==k);const B=d.get(k);B&&(B.checked=!1,d.delete(k)),n.emit("change",p.value)}}function x(D){const k=new Map;p.value.reduce((B,$)=>(B.set($[o.value],$),B),k),p.value=D.map(B=>k.get(B[o.value])),n.emit("change",p.value)}function C(D){n.emit("activeChange",D)}function w(){return e.createVNode(kt,{style:"flex:1",data:p.value,draggable:!0,view:"DraggableView","keep-order":!0,onChange:x,onRemoveItem:v,onActiveChange:C},{default:()=>[e.createTextVNode(" ")]})}function N(){return e.createVNode("div",{class:"f-utils-fill selection-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column selection-pane-content f-utils-fill"},[e.createVNode("div",{class:"selection-pane-title"},[e.createVNode("span",{class:"selection-title"},[a.value]),e.createVNode("span",{class:"selection-count"},[p.value&&p.value.length]),e.createVNode("span",{class:"selection-item-title"},[r.value])]),e.createVNode("div",{class:"container columns-box f-utils-fill d-flex"},[w()])])])}const V=e.computed(()=>({transfer:!0,row:!0,"f-utils-fill":l.value}));return()=>e.createVNode("div",{class:V.value,style:"height:480px"},[b(),N()])}}),l0=new Map([["appearance",xe]]);function c0(t,n,o){const a=t.getSchemaByType("tab-page");return n.contents=[a],n}const d0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tabs.schema.json",title:"tabs",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Tabs",type:"string"},type:{description:"The type string of Tabs component",type:"string",default:"tabs"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]}},required:["id","type","contents"]},u0={title:"tabs",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}},title:{title:"标题",type:"string",description:"标题"}}},appearance:{description:"",title:"外观",properties:{size:{description:"",type:"cascade",title:"尺寸",properties:{width:{description:"组件的宽度",title:"宽度(px)",type:"number",min:0,decimals:0},height:{description:"组件的高度",title:"高度(px)",type:"number",min:0,decimals:0}}},titleWidth:{description:"标题区域宽度占页面比",type:"number",title:"标题区域宽度(%)",min:0,decimals:0,max:100},autoTitleWidth:{description:"开启,则显示全部字符;关闭,最多显示7个字符",type:"select",title:"标题自适应宽度",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]},defaultValue:!1},contentFill:{description:"flex布局下,填充满剩余部分",type:"select",title:"填充",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]},defaultValue:!1}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},Ta={tabType:{type:String,default:"default"},autoTitleWidth:{type:Boolean,default:!1},titleLength:{type:Number,default:7},position:{type:String,default:"top"},showDropdown:{type:Boolean,default:!0},scrollStep:{type:Number,default:10},autoResize:{type:Boolean,default:!1},selectedTab:{type:String,default:""},width:{type:Number},height:{type:Number},searchBoxVisible:{type:Boolean,default:!0},titleWidth:{type:Number,default:0},customClass:{type:String,default:""},activeId:{type:String},fill:{type:Boolean,default:!1},justifyContent:{type:String,default:"left"}},ec=me(Ta,d0,l0,c0,u0);function f0(t,n,o){const a=e.ref([]),r=e.ref(t.activeId||""),i=e.ref(!0),l=e.ref([]);function s(h){const y=h.value.findIndex(b=>b.props.show!==!1&&!r.value&&!b.props.disabled);!r.value&&y!==-1&&(r.value=h.value[y].props.id)}function p(h){var b;if(t.autoTitleWidth)return;const y=(b=h.value)==null?void 0:b.querySelectorAll(".st-tab-text");if(y)for(let v=0;v<y.length;v++){const x=y[v].parentNode;y[v].scrollWidth>x.offsetWidth?y[v].classList.contains("farris-title-text-custom")||y[v].classList.add("farris-title-text-custom"):y[v].classList.remove("farris-title-text-custom")}}const c=h=>{h.preventDefault(),h.stopPropagation()};function d(h,y,b=!1){const v=a.value.findIndex(x=>x.props.id===y);a.value=a.value.filter(x=>x.props.id!==y),r.value===y&&(r.value="",s(a)),c(h),e.nextTick(()=>{p(o),b&&(i.value=!0),n.emit("tabRemove",{removeIndex:v,removeId:y,activeId:r.value})})}function u(h){const y=r.value;r.value=h;const b=a.value.find(v=>v.props.id===h);l.value=[],b&&b.props.toolbar&&b.props.toolbar.contents&&b.props.toolbar.contents.length&&(l.value=[...b.props.toolbar.contents]),n.emit("tabChange",{prevId:y,nextId:r.value})}function f(h){u(h)}function g(h){a.value.findIndex(b=>b.props.id===h.props.id)===-1&&a.value.push(h)}function m(h){a.value.findIndex(b=>b.props.id===h.props.id)!==-1&&(a.value.forEach(b=>{b.props.id===h.props.id&&(b=h)}),e.nextTick(()=>{p(o)}))}return{activeId:r,addTab:g,changeTitleStyle:p,removeTab:d,selectTab:f,selectTabByTabId:u,tabPages:a,updateTab:m,toolbarItems:l}}function p0(t,n,o,a,r){const{activeId:i,removeTab:l,selectTab:s}=r,p=e.computed(()=>({"st-tab-text":!0,"farris-title-auto":t.autoTitleWidth})),c=e.computed(()=>({"nav-item":!0,"d-none":n.show!==void 0?!n.show:!1,"f-state-active":n.id===i.value,"f-state-disable":n.disabled})),d=e.computed(()=>({width:`${n.tabWidth}px`})),u=e.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:n.id===i.value,disabled:n.disabled}));function f(v){return e.createVNode("span",{class:p.value,title:v.title},[v.title])}function g(v){return v.slots.title?v.slots.title:f}const m=g(o),h=e.ref(n.removeable);function y(){return e.createVNode("span",{class:"st-drop-close",onClick:v=>l(v,n.id)},[e.createVNode("i",{class:"f-icon f-icon-close"},null)])}function b(v){s(n.id),t.tabType==="one-page"&&a.scrollToByPaggId(n.id)}return e.createVNode("li",{class:c.value,style:d.value},[e.createVNode("a",{class:u.value,onClick:b},[m(n),h.value&&y()])])}function m0(t,n,o,a,r){const{shouldShowNavigationButtons:i}=o,{tabPages:l}=r,s=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":i.value})),p=e.computed(()=>({width:"100%","justify-content":t.justifyContent})),c=e.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":t.fill||t.tabType==="fill","nav-pills":t.tabType==="pills","flex-row":t.position==="top"||t.position==="bottom","flex-column":t.position==="left"||t.position==="right"}));return()=>e.createVNode("div",{class:s.value,style:p.value},[e.createVNode("ul",{class:c.value,ref:n},[l.value.map(d=>p0(t,d.props,d,a,r))])])}function tc(t,n,o,a,r){const i=e.ref(),{shouldShowNavigationButtons:l}=o,{activeId:s,tabPages:p}=r,c=e.computed(()=>p.value.map(g=>({name:g.props.title,value:g.props.id}))),d=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":l.value})),u=e.computed(()=>({width:"100%",display:"flex","justify-content":t.justifyContent}));e.onMounted(()=>{i.value&&(n.value=i.value.$el)});function f(){}return()=>e.createVNode("div",{class:d.value,style:u.value},[e.createVNode(Vn,{items:c.value,modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,onChange:f,ref:i},null)])}function h0(t,n,o,a){const{activeId:r,removeTab:i,tabPages:l}=a,{selectAndScrollToTab:s}=o,{hideDropDown:p,searchTabText:c}=n,d=e.ref("auto"),u=e.computed(()=>{var v,x;let b=[];return t.searchBoxVisible?b=(v=l.value)==null?void 0:v.filter(C=>C.props.title.includes(c.value)):b=(x=l.value)==null?void 0:x.slice(),b}),f=e.computed(()=>({"dropdown-menu":!0,"tabs-pt28":t.searchBoxVisible,show:!p.value}));function g(b){return{"dropdown-item":!0,"text-truncate":!0,"px-2":!0,disabled:b.props.disabled,active:b.props.id===r.value,"d-none":b.props.show!==!0}}function m(b){b.preventDefault(),b.stopPropagation()}const h=()=>({width:d.value});function y(){return e.createVNode("div",{class:f.value},[t.searchBoxVisible&&e.createVNode("div",{onClick:b=>m(b),class:"pb-1 tabs-li-absolute"},[e.withDirectives(e.createVNode("input",{title:"search-box",type:"text",class:"form-control k-textbox","onUpdate:modelValue":b=>c.value=b},null),[[e.vModelText,c.value]]),e.createVNode("span",{class:"f-icon f-icon-page-title-query tabs-icon-search"},null)]),u.value.length?e.createVNode("ul",{class:"tab-dropdown-menu--items",style:h()},[u.value.map(b=>e.createVNode("li",{class:g(b),onClick:v=>s(v,b.props)},[b.props.removeable&&e.createVNode("span",{class:"float-right st-drop-close",onClick:v=>i(v,b.props.id,!0)},[e.createVNode("i",{class:"f-icon f-icon-close"},null)]),e.createVNode("a",{class:"dropdown-title"},[b.props.title])]))]):e.createVNode("div",{class:"dropdown-no-data"},[e.createTextVNode("没有相关数据")])])}return{renderDropdownMenu:y}}function nc(t,n,o,a){const{hideDropDown:r}=n,{renderDropdownMenu:i}=h0(t,n,o,a),l=e.ref(t.showDropdown);function s(){return l.value&&e.createVNode(e.Fragment,null,[e.createVNode("button",{title:"toggle-button",class:"btn dropdown-toggle-split dropdown-toggle",onClick:()=>{r.value=!1}},null),i()])}return{renderMorePagesButtton:s}}function oc(t,n,o,a){const r=e.ref(!1),{selectTabByTabId:i,tabPages:l}=a,s=4;function p(){var b;const h=n.value,y=(b=n.value)==null?void 0:b.parentElement;r.value=y&&h&&y.offsetWidth<h.scrollWidth-s}const c=e.computed(()=>({btn:!0,"sc-nav-btn":!0,"px-1":!0,"sc-nav-lr":!0,"d-none":!r.value})),d=e.computed(()=>({"btn-group":!0,"sc-nav-btn":!0,dropdown:!0,"d-none":!r.value})),u=e.computed(()=>({btn:!0,"sc-nav-rg":!0,"d-none":!r.value}));function f(h,y){if(!n.value)return;const b=n.value.scrollLeft,v=n.value.scrollWidth-n.value.offsetWidth;if(y>0){if(n.value.scrollLeft>=v)return;n.value.scrollLeft=b+t.scrollStep+h}else if(y<0){if(n.value.scrollLeft<=0)return;n.value.scrollLeft=b-t.scrollStep-h}}function g(h){if(!r.value||!n.value)return;const y=t.tabType==="pills"?".f-capsule-item":".nav-item",b=n.value.querySelectorAll(y),{parentElement:v}=n.value,x=b[h];if(x&&v){const C=v.getBoundingClientRect().left,w=v.getBoundingClientRect().right,N=x.getBoundingClientRect().left,V=x.getBoundingClientRect().right;N<C?f(C-N,-1):w<V&&f(V-w,1),t.tabType==="one-page"&&o.scrollTo(h)}}function m(h,y){if(y.disabled)return;i(y.id);const b=l.value.findIndex(v=>v.props.id===y.id);e.nextTick(()=>{g(b)})}return{previousButtonClass:c,nextButtonGroupClass:d,nextButtonClass:u,scrollTab:f,selectAndScrollToTab:m,shouldShowNavigationButtons:r,updateNavigationLayout:p}}function ac(t,n){const{tabPages:o}=n,a=e.ref(""),r=e.ref(!0),i=e.computed(()=>t.searchBoxVisible),l=e.computed(()=>i.value?o.value.filter(p=>p.props.title.includes(a.value)):o.value.slice());return{searchTabText:a,hideDropDown:r,shouldShowSearchBox:i,tabsInDropdownMenu:l}}function rc(t,n,o){const a=".farris-tab-page",{tabPages:r}=o;function i(s){const p=n.value;if(p){const c=n.value.querySelectorAll(a);if(c.length>0){const d=c[s],{offsetTop:u}=d,f=u-32>0?u-32:0;p.scrollTop=f}}}function l(s){const p=r.value.findIndex(c=>c.props.id===s);p>-1&&i(p)}return{scrollTo:i,scrollToByPaggId:l}}const g0=new Map([["buttons","items"]]);function y0(t,n,o){return n}const b0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-toolbar.schema.json",title:"response-toolbar",description:"A Farris Toolbar Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},alignment:{description:"The alignment of Response Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Response Toolbar.",type:"array",default:[]}},required:["id","type","buttons"]},ic={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-toolbar-item.schema.json",title:"response-toolbar-item",description:"A Farris Toolbar Item Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},text:{description:"The items of Response Toolbar.",type:"string",default:""},icon:{description:"The icon of response toolbar item.",type:"string",default:""}},required:["id","type","text"]},v0={title:"response-toolbar",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{title:"类型",type:"enum",description:"The type of a component.",editor:{type:"combo-list",data:[]}}}},behavior:{title:"行为",description:"",properties:{alignment:{title:"对齐方式",description:"The alignment of Response Toolbar Button.",type:"enum",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"right",name:"右对齐"},{value:"left",name:"左对齐"}]}},buttons:{title:"按钮",description:"The items of Response Toolbar.",type:"array",default:[],$converter:"/converter/buttons.converter"}}}}},sc={title:"response-toolbar-item",description:"A Farris Container Component",type:"object",categories:{basic:{title:"基本信息",description:"Basic Infomation",properties:{id:{title:"标识",type:"string",description:"The identifier of a component.",readonly:!0},type:{title:"类型",type:"enum",description:"The type of a component.",editor:{type:"combo-list",data:[]}},text:{title:"文本",type:"string",description:""},icon:{title:"图标",type:"string",description:""}}}}},Fa={customClass:{type:String,default:""},alignment:{Type:String,default:"right"},items:{Type:Array,default:[]}};Kn[ic.title]=ic,Xn[sc.title]=sc;const Aa=me(Fa,b0,g0,y0,v0);class lc{constructor(n){P(this,"id","");P(this,"class","btn-secondary");P(this,"icon","");P(this,"groupId","");P(this,"order",-1);P(this,"asDropDownTop",!1);P(this,"text","");P(this,"visible",!0);P(this,"responsed",!1);P(this,"tipsEnable",!1);P(this,"tipsText","");P(this,"width",0);P(this,"onClick",()=>{});P(this,"options");this.options=n;const o=["id","class","icon","groupId","order","asDropDownTop","text","isDP","visible","responsed","width","tipsEnable","tipsText","onClick"];Object.keys(n).filter(a=>o.indexOf(a)>-1).forEach(a=>{this[a]=n[a]})}get enable(){return Object.keys(this.options).indexOf("enable")>-1?this.options.enable:e.computed(()=>!0)}setWidth(n){this.width=parseInt(n,10)}getWidth(){return this.visible?this.width:!1}}class x0 extends lc{constructor(n){super(n)}}function Ia(){function t(n){const o=[];return n.reduce((a,r)=>(r.children&&r.children.length>0?a.push(new kn(r)):a.push(new x0(r)),a),o),o}return{buildResponseToolbarItems:t}}const{buildResponseToolbarItems:C0}=Ia();class kn extends lc{constructor(o){super(o);P(this,"placement","");P(this,"dropdownClass","");P(this,"menuClass","");P(this,"split",!1);P(this,"children",[]);P(this,"expanded",!1);const a=["isDP","class","dropdownClass","menuClass","placement","split","expanded"];Object.keys(o).filter(r=>a.indexOf(r)>-1).forEach(r=>{this[r]=o[r]}),o.children&&o.children.length&&(this.children=C0(o.children))}}function cc(){function t(o){const a={"f-icon":!0};if(o.icon){const r=o.icon.trim().split(" ");r&&r.length&&r.reduce((i,l)=>(i[l]=!0,i),a)}return a}function n(o){return!!(o.icon&&o.icon.trim())}return{iconClass:t,shouldShowIcon:n}}function w0(t){function n(u){const f={"dropdown-menu":!0};if(u.class){const g=u.menuClass.split(" ");g&&g.length&&g.reduce((m,h)=>(m[h]=!0,m),f)}return f}function o(u){const f={disabled:!u.enable,"dropdown-submenu":!0,"f-rt-dropdown":!0},g=u.dropdownClass.split(" ");return g&&g.length&&g.reduce((m,h)=>(m[h]=!0,m),f),f}function a(u){const f={disabled:!u.enable,"dropdown-item":!0,"f-rt-btn":!0},g=u.class.split(" ");return g&&g.length&&g.reduce((m,h)=>(m[h]=!0,m),f),f}let r;const i=new Map;function l(u,f,g){var h;((h=u.target)==null?void 0:h.id)===f.id&&u.stopPropagation();const m=g?g.id:"__top_item__";if(f.children&&f.children.length&&(f.expanded=!f.expanded,f.expanded?i.set(m,f):i.delete(m)),i.has(m)&&i.get(m)!==f){const y=i.get(m);y&&(y.expanded=!1)}}function s(u,f){document.body.click(),f.enable&&f.onClick(u,f.id)}function p(u){return u.children.map(f=>f.children&&f.children.length?e.createVNode("li",{class:o(f),id:f.id,onClick:g=>f.enable&&l(g,f,u)},[e.createVNode("span",{id:f.id,class:a(f),onMouseover:g=>f.enable&&l(g,f,u)},[f.text,e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right",style:"display: inline-block;float: right;line-height: 1.25rem;"},null)]),r(f,f)]):e.createVNode("li",{class:a(f),id:f.id,onClick:g=>s(g,f),onMouseover:g=>f.enable&&l(g,f,u)},[t.shouldShowIcon(f)&&e.createVNode("i",{class:t.iconClass(f)},null),f.text]))}function c(u,f,g){const m={display:u.expanded?"block":"none",position:"fixed",maxWidth:"300px",width:"auto",minWidth:"120px"},h=document.getElementsByTagName("body")[0].getClientRects()[0].width,y=f,b=y==null?void 0:y.getClientRects();if(y&&b&&b.length){const{top:v,width:x,left:C,right:w,height:N}=b[0],V=Math.ceil(N+v);m.top=`${V}px`,m.left=`${C}px`;const D=u.id+"_menu",k=f?f.querySelector("#"+D):null;if(k){m.display==="block"&&(k.style.display="block");const B=k.getBoundingClientRect();if(g){m.top=`${v-6}px`;const $=Math.ceil(x+C);m.left=`${$}px`}h-C-x<B.width&&(m.left=`${(g?C:w)-B.width}px`)}}return m}r=function(u,f){var y,b;const g=e.getCurrentInstance(),m=f?f.id:u.id,h=(b=(y=g==null?void 0:g.exposed)==null?void 0:y.elementRef.value)==null?void 0:b.querySelector("#"+m);return e.createVNode("ul",{class:n(u),style:c(u,h,f),id:u.id+"_menu"},[p(u)])};function d(){i.forEach(u=>{u.expanded=!1}),i.clear()}return{renderDropdownMenu:r,clearAllDropDownMenu:d}}function N0(t,n){const o=e.ref(t.alignment),{renderDropdownMenu:a,clearAllDropDownMenu:r}=w0(n);function i(d){const u={"btn-group":!0,"f-rt-dropdown":!0,"f-btn-ml":o.value==="right","f-btn-mr":o.value==="left"},f=d.dropdownClass.split(" ");return f&&f.length&&f.reduce((g,m)=>(g[m]=!0,g),u),u}function l(d){const u={btn:!0,disabled:!d.enable,"f-rt-btn":!0,"btn-icontext":!!(d.icon&&d.icon.trim())};if(d.class){const f=d.class.split(" ");f&&f.length&&f.reduce((g,m)=>(g[m]=!0,g),u)}return u}function s(d,u){d.stopPropagation();const f=u.expanded;document.body.click(),u.expanded=!f}function p(d){return e.createVNode("div",{id:d.id,class:i(d)},[e.createVNode("div",{class:l(d),style:"display: flex;padding-right: 0.1rem;",onClick:u=>d.enable&&s(u,d)},[n.shouldShowIcon(d)&&e.createVNode("i",{class:n.iconClass(d)},null),e.createVNode("span",null,[d.text]),e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-down",style:"display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"},null)]),a(d)])}function c(){r()}return{renderToolbarDropdown:p,clearAllDropDown:c}}const{buildResponseToolbarItems:dc}=Ia(),pn=e.defineComponent({name:"FResponseToolbar",props:Fa,emits:[],setup(t,n){const o=e.ref(dc(t.items)),a=e.ref(),r=e.ref(),i=e.ref(),l=e.ref(t.alignment),s={id:"__more_buttons__",text:"更多"},p=e.ref(new kn(s)),c=cc(),d=e.computed(()=>p.value.children.length>0),u=e.computed(()=>{const V={"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0};if(t.customClass){const D=t.customClass.split(" ");D&&D.length&&D.reduce((k,B)=>(k[B]=!0,k),V)}return V}),f=e.computed(()=>({"d-flex":!0,"flex-nowrap":!0,"justify-content-end":l.value==="right","justify-content-start":l.value==="left"})),{renderToolbarDropdown:g,clearAllDropDown:m}=N0(t,c);function h(){o.value.filter(V=>V.children&&V.children.length>0).forEach(V=>{V.expanded=!1}),p.value.expanded=!1,m()}function y(V){const D={btn:!0,"f-rt-btn":!0,"f-btn-ml":l.value==="right","f-btn-mr":l.value==="left","btn-icontext":!!(V.icon&&V.icon.trim())};if(V.class){const k=V.class.split(" ");k&&k.length&&k.reduce((B,$)=>(B[$]=!0,B),D)}return D}function b(V,D){document.body.click(),D.onClick(V,D.id)}function v(V){return e.createVNode("button",{type:"button",class:y(V),id:V.id,disabled:!V.enable,onClick:D=>b(D,V)},[c.shouldShowIcon(V)&&e.createVNode("i",{class:c.iconClass(V)},null),V.text])}const x=new Map,C=[];function w(V){const D=i.value;let k=V;const B=Array.from(D.children),$=B[B.length-1].id==="__more_buttons__"?B[B.length-1]:null;if($){const E=$.computedStyleMap().get("margin-left"),I=$.computedStyleMap().get("margin-right"),R=(E?E.value:0)+$.getBoundingClientRect().width+(I?I.value:0);k-=R}const T=B.filter(E=>E.id!=="__more_buttons__");for(const E of T){const I=E.computedStyleMap().get("margin-left"),R=E.computedStyleMap().get("margin-right"),O=(I?I.value:0)+E.getBoundingClientRect().width+(R?R.value:0);k<O?(x.set(E.id,!0),C.push({id:E.id,width:O})):k-=O}if(C.length)for(let E=C.length-1;E>=0;E--){const I=C[E].width;if(k>=I)k-=I,x.delete(C[E].id),C.pop();else break}const S=Object.assign({},p.value);S.children=[];const F=new kn(S),A=o.value.reduce((E,I)=>(x.has(I.id)&&F.children.push(I),I.visible=!x.has(I.id),E.push(I),E),[]);p.value=F,o.value=A}const N=new ResizeObserver(V=>{if(V.length){const k=V[0].contentRect.width,$=i.value.getBoundingClientRect().width;(k<$||C.length)&&(w(k),h())}});return e.onMounted(()=>{const V=r.value;N.observe(V),document.body.addEventListener("click",h),document.body.addEventListener("wheel",h)}),e.onUnmounted(()=>{N.disconnect(),document.body.removeEventListener("click",h),document.body.removeEventListener("wheel",h)}),e.watch(()=>t.items,()=>{o.value=dc(t.items)}),n.expose({elementRef:a}),()=>e.createVNode("div",{class:u.value,ref:a},[e.createVNode("div",{ref:r,class:f.value},[e.createVNode("div",{ref:i,class:"d-inline-block f-response-content",style:"white-space: nowrap;"},[o.value.filter(V=>V.visible).map(V=>V.children&&V.children.length>0?g(V):v(V)),d.value&&g(p.value)])])])}}),co=e.defineComponent({name:"FTabs",props:Ta,emits:["tabChange","tabRemove"],setup(t,n){const o=e.ref(t.tabType),a=e.shallowRef(),r=e.ref(t.customClass),i=e.shallowRef(),l=e.shallowRef(),s=f0(t,n,i),{activeId:p,changeTitleStyle:c,tabPages:d,addTab:u,updateTab:f,selectTabByTabId:g,toolbarItems:m}=s,h=rc(t,l,s),y=oc(t,i,h,s),{previousButtonClass:b,nextButtonClass:v,nextButtonGroupClass:x,scrollTab:C,updateNavigationLayout:w}=y,N=ac(t,s),{hideDropDown:V}=N,D=m0(t,i,y,h,s),k=D,B=tc(t,i,y,h,s),$=new Map([["default",D],["one-page",k],["pills",B]]);e.computed(()=>{const z=d.value.find(q=>q.props.id===p.value);return z==null?void 0:z.slots});const T=e.computed(()=>{const z=d.value.find(L=>L.props.id===p.value);return(z==null?void 0:z.props.toolbarPosition)==="inHead"}),S=e.computed(()=>t.fill||t.tabType==="fill");e.provide("tabs",{activeId:p,addTab:u,updateTab:f,tabPages:d,tabType:o,shouldFillParentContaner:S});const F=e.computed(()=>t.tabType==="pills"),A=e.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":T.value,"farris-tabs-inContent":!T.value,"farris-tabs-nav-fill":S.value,"farris-tabs-nav-pills":F.value})),E=e.computed(()=>({width:T.value&&t.titleWidth?`${t.titleWidth}%`:""})),I=e.computed(()=>{const z={"farris-tabs":!0,"f-utils-fill-flex-column":S.value,"flex-column":t.position==="top","flex-column-reverse":t.position==="bottom","flex-row":t.position==="left","flex-row-reverse":t.position==="right","one-page":t.tabType==="one-page"};return r.value&&r.value.split(" ").reduce((q,L)=>(q[L]=!0,q),z),z});e.onMounted(()=>{d.value.length&&(p.value=t.activeId||d.value[0].props.id,g(p.value)),e.nextTick(()=>{w()}),c(i),window.addEventListener("click",z=>{var q;V.value||(q=a.value)!=null&&q.contains(z.target)||(V.value=!0)}),window.addEventListener("resize",()=>{w()})});function R(){return e.createVNode("button",{title:"left-arrow-button",type:"button",class:b.value,onClick:()=>{C(0,-1)}},null)}function O(){return e.createVNode("button",{title:"right-arrow-button",type:"button",class:v.value,onClick:()=>{C(0,1)}},null)}const{renderMorePagesButtton:G}=nc(t,N,y,s),M=z=>{n.emit("Click",z)};function j(){return m.value.length?e.createVNode(pn,{items:m.value,onClick:M},null):null}const H=$.get(t.tabType)||$.get("default");function _(){var z,q,L,X;return e.createVNode("div",{class:A.value},[e.createVNode("div",{class:"farris-tabs-header-pre"},[(q=(z=n.slots).headerPrefix)==null?void 0:q.call(z)]),e.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:E.value},[R(),H&&H(),e.createVNode("div",{class:x.value},[O(),G()])]),j(),e.createVNode("div",{class:"farris-tabs-header-post"},[(X=(L=n.slots).headerSuffix)==null?void 0:X.call(L)])])}const W=e.computed(()=>({"farris-tabs-content":!0,"f-utils-fill-flex-column":S.value}));function K(){var z,q;return e.createVNode("div",{class:W.value,ref:l},[(q=(z=n.slots).default)==null?void 0:q.call(z)])}return()=>e.createVNode("div",{class:I.value,ref:a},[_(),K()])}}),V0=new Map([["appearance",xe],["toolbar",S0]]);function S0(t,n,o){return n&&n.contents&&n.contents.length&&n.contents.forEach(a=>{a.title&&(a.text=a.title)}),{toolbar:n}}const $0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-page.schema.json",title:"tab-page",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a tab-page Item",type:"string"},type:{description:"The type string of tab-page Item component",type:"string",default:"tab-page"},contents:{description:"",type:"array",default:[]},title:{description:"",type:"string",default:"标题"},toolbar:{description:"",type:"object"}},required:["id","type","contents"]},D0={title:"tab-page",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"工具栏按钮的标识",title:"标识",type:"string",readonly:!0},title:{description:"工具栏按钮的标识",title:"标题",type:"string"}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"},style:{description:"组件的内容样式",title:"style样式",type:"modal",showClearButton:!0},height:{description:"组件的高度",title:"高度(px)",type:"number",min:0,decimals:0}}},size:{description:"",type:"cascade",title:"尺寸",properties:{width:{description:"组件的宽度",title:"宽度(px)",type:"number",min:0,decimals:0},height:{description:"组件的高度",title:"高度(px)",type:"number",min:0,decimals:0}}}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}},removeable:{description:"是否可移除",type:"boolean",title:"是否可移除",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}},headerTemplate:{description:"标签页模板",type:"modal",title:"标签页模板",editor:{type:"code-editor"},editorParams:{language:"html"}}}}}},Ea={tabWidth:{type:Number,default:-1},id:{type:String,default:""},customTitleClass:{type:String,default:""},titleOverflow:{type:Boolean,default:!1},title:{type:String,default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removeable:{type:Boolean,default:!1},show:{type:Boolean,default:!0},toolbar:{type:Object,default:{}},toolbarPosition:{type:String,default:"inHead"}},uc=me(Ea,$0,V0,void 0,D0);function k0(t,n,o){return n?{enableAccordion:o.accordionMode}:{enableAccordion:""}}function B0(t,n){return n&&n.contents&&n.contents.length&&n.contents.forEach(o=>{o.title&&(o.text=o.title)}),{buttons:n.contents,buttonPosition:n.position}}const T0=new Map([["appearance",xe],["expanded","expandStatus"],["enableAccordion",k0],["toolbar",B0]]);function F0(t,n,o){return n}const A0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/section.schema.json",title:"section",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"section"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contentClass:{description:"",type:"string",default:""},contents:{description:"",type:"array",default:[]},enableAccordion:{description:"",type:"boolean",default:!1},accordionMode:{description:"",type:"string",default:"default"},enableMaximize:{description:"",type:"boolean",default:!1},expanded:{description:"",type:"boolean",default:!0},fill:{description:"",type:"boolean",default:!1},headerClass:{description:"",type:"string",default:""},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},showHeader:{description:"",type:"string",default:!0},mainTitle:{description:"",type:"string",default:""},subTitle:{description:"",type:"string",default:""},headerContentClass:{description:"",type:"string",default:""},extendClass:{description:"",type:"string",default:""},visible:{description:"",type:"boolean",default:!0},toolbar:{description:"",type:"object",properties:{type:{type:"string",default:"SectionToolbar"},position:{type:"string",default:"inHead"},contents:{type:"array",default:[]}},default:null}},required:["id","type","contents"]},I0={title:"section",description:"A Farris Container Component",type:"object",categories:{basic:{title:"基本信息",description:"Basic Infomation",properties:{id:{title:"标识",type:"string",description:"The identifier of a component.",readonly:!0},type:{title:"类型",type:"enum",description:"The type of a component.",editor:{type:"combo-list",data:[]}},mainTitle:{title:"主标题",type:"string",description:""},subTitle:{title:"副标题",type:"string",description:""}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{title:"行为",description:"",properties:{visible:{title:"可见",type:"boolean",description:""},fill:{title:"填充",type:"boolean",description:"To fill the space of parent container in flex layout."},showHeader:{title:"显示标题区域",type:"boolean",description:""},enableMaximize:{title:"显示最大化",type:"boolean",description:"",visible:{showHeader:!0}},enableCollapse:{title:"显示收折",type:"boolean",description:"",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:!0,name:"是"},{value:!1,name:"否"}]},visible:{showHeader:!0}},expanded:{title:"展开",type:"boolean",description:"",readonly:{enableCollapse:!1},editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:!0,name:"是"},{value:!1,name:"否"}]},visible:{showHeader:!0}},enableAccordion:{title:"允许收折",type:"boolean",description:"",visible:{showHeader:!0}},accordionMode:{title:"收折模式",type:"enum",description:"",readonly:{enableAccordion:!1},visible:{showHeader:!0},editor:{type:"combo-list",data:[{value:"default",name:"默认"}]}}}},toolbar:{title:"工具栏",description:"",properties:{buttonSize:{title:"按钮尺寸",type:"enum",description:"",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"default",name:"标准"},{value:"large",name:"大尺寸"}]}},popupDirection:{title:"弹出方向",type:"enum",description:"",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"default",name:"自适应"},{value:"top",name:"向上"},{value:"bottom",name:"向下"}]}}}},extends:{title:"扩展样式",description:"",properties:{headerClass:{title:"标题区",type:"string",description:""},titleClass:{title:"主标题",type:"string",description:""},contentClass:{title:"内容区",type:"string",description:""},toolbarClass:{type:"string",title:"工具栏",description:""}}}}},Ma={contentClass:{type:String,default:""},customClass:{type:String,default:""},enableAccordion:{type:String,default:""},expandStatus:{type:Boolean,default:!0},mainTitle:{type:String,default:""},showHeader:{type:Boolean,default:!0},subTitle:{type:String,default:""},expandLabel:{type:String,default:"展开"},collapseLabel:{type:String,default:"收起"},headerClass:{type:String,default:""},enableMaximize:{type:Boolean,default:!1},headerContentClass:{type:String,default:""},extendClass:{type:String,default:""},buttons:{type:Array,default:[]},buttonPosition:{type:String,default:"inHead"},fill:{type:Boolean,default:!1}},fc=me(Ma,A0,T0,F0,I0);function E0(t,n,o){let a;function r(){!t||!n.value||(o.value=!o.value,o.value?i():l())}function i(){a=t.value.nextElementSibling;const p=document&&document.querySelector("body");p&&(p.appendChild(t.value),t.value.style.zIndex=s())}function l(){a?n.value.insertBefore(t.value,a):n.value.appendChild(t.value),t.value.style.zIndex=null}function s(p=1){const c=["body>.f-datagrid-settings-simple-host","body>div","body>farris-dialog>.farris-modal.show","body>.farris-modal.show","body>farris-filter-panel>.f-filter-panel-wrapper","body .f-sidebar-show>.f-sidebar-main","body>.popover.show","body>filter-row-panel>.f-datagrid-filter-panel","body>.f-section-maximize"],d=Array.from(document.body.querySelectorAll(c.join(","))).filter(f=>f).map(f=>{const{display:g,zIndex:m}=window.getComputedStyle(f);return g==="none"?0:parseInt(m,10)}).filter(f=>f);let u=Math.max(...d);return u<1040&&(u=1040),u+p}return{onClickMaxMinIcon:r}}function Pa(t,n){const o=e.ref(t.buttons),a=e.computed(()=>t.buttonPosition==="inHead"?"right":"left"),r=e.computed(()=>"f-section-toolbar"+(t.buttonPosition==="inHead"?" f-section-header--toolbar":" f-section-content--toolbar")),i=e.computed(()=>{t.buttons&&t.buttons.length>0&&t.buttonPosition});function l(s){n.emit("Click",s)}return()=>i&&e.createVNode(pn,{customClass:r.value,items:o.value,onClick:l,alignment:a.value},null)}function pc(t,n,o,a,r,i){const l=e.ref(t.mainTitle),s=e.ref(t.subTitle),p=e.computed(()=>t.buttonPosition),c=Pa(t,n),{onClickMaxMinIcon:d}=E0(a,r,i),u=e.computed(()=>!!t.subTitle),f=e.computed(()=>t.enableMaximize),g=e.computed(()=>t.enableAccordion!=""),m=e.computed(()=>{const w={"f-section-header":!0};return n.slots.header&&t.headerClass.split(" ").reduce((V,D)=>(V[D]=!0,V),w),w});function h(w){w.stopPropagation(),t.enableAccordion!==""&&(o.value=!o.value)}function y(){const w=e.computed(()=>({btn:!0,"f-btn-collapse-expand":!0,"f-btn-mx":!0,"f-state-expand":o.value})),N=e.computed(()=>({"f-icon":!0,"f-icon-maximize":!i.value,"f-icon-minimize":i.value}));return e.createVNode("div",{class:"f-max-accordion"},[f.value?e.createVNode("span",{class:N.value,onClick:d},null):"",g.value?e.createVNode("button",{class:w.value,onClick:h},[e.createVNode("span",null,[o.value?t.collapseLabel:t.expandLabel])]):""])}function b(){return n.slots.header?e.createVNode("div",{class:m.value},[n.slots.header()]):""}function v(){return e.createVNode("div",{class:"f-title",onClick:h},[e.createVNode("h4",{class:"f-title-text"},[l.value]),u.value&&e.createVNode("span",null,[s.value])])}function x(){const w=e.computed(()=>{const N={"f-content":!0};return t.headerContentClass&&t.headerContentClass.split(" ").reduce((D,k)=>(D[k]=!0,D),N),N});return n.slots.headerContent?e.createVNode("div",{class:w.value},[n.slots.headerContent()]):""}function C(){return e.createVNode("div",{class:m.value},[n.slots.headerTitle?n.slots.headerTitle():v(),x(),p.value==="inHead"&&c(),(f.value||g.value)&&y()])}return()=>t.showHeader&&(n.slots.header?b():C())}const Bn=e.defineComponent({name:"FSection",props:Ma,emits:[],setup(t,n){const o=e.ref();let a=e.ref();const r=e.ref(t.customClass),i=e.computed(()=>t.enableAccordion),l=e.ref(t.expandStatus),s=e.computed(()=>t.buttonPosition),p=e.ref(!1),c=pc(t,n,l,o,a,p),d=Pa(t,n),u=e.computed(()=>{const y={"f-section":!0,"f-section-accordion":i.value==="default","f-state-collapse":(i.value==="default"||i.value==="custom")&&!l.value,"f-section-custom-accordion":i.value==="custom","f-section-fill":t.fill,"f-section-maximize":p.value};return r.value&&r.value.split(" ").reduce((b,v)=>(b[v]=!0,b),y),y}),f=e.computed(()=>{const y=t.contentClass.split(" "),b={"f-section-content":!0};return y.reduce((v,x)=>(v[x]=!0,v),b),b}),g=e.computed(()=>{const y=t.extendClass.split(" "),b={"f-section-extend":!0};return y.reduce((v,x)=>(v[x]=!0,v),b),b});function m(){return n.slots.extend&&e.createVNode("div",{class:g.value},[n.slots.extend()])}function h(){return e.createVNode("div",{class:f.value},[s.value==="inContent"&&d(),n.slots.default&&n.slots.default()])}return e.onMounted(()=>{o&&o.value&&(a.value=o.value.parentElement)}),()=>e.createVNode("div",{class:u.value,ref:o},[c(),m(),h()])}});function M0(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const mn=e.defineComponent({name:"FTabPage",props:Ea,emits:[],setup(t,n){const o=e.inject("tabs"),a=e.ref(t.show),r={slots:n.slots,props:t},i=e.ref((o==null?void 0:o.tabType.value)||"default");e.onMounted(()=>{const g=o==null?void 0:o.tabPages.value.findIndex(m=>m.props.id===t.id);!g||g===-1?o==null||o.addTab(r):g>-1&&(a.value=!1,console.warn(`已经存在id为${t.id}的页签啦`))}),e.onUnmounted(()=>{});const l=e.computed(()=>(t==null?void 0:t.id)===(o==null?void 0:o.activeId.value)),s=e.computed(()=>({display:l.value?"":"none"}));e.watch(()=>t,g=>{o==null||o.updateTab({props:g,slots:n.slots})},{immediate:!0,deep:!0});function p(){var m,h;const g=(h=(m=n.slots).default)==null?void 0:h.call(m);return e.createVNode(Bn,{"main-title":t.title,class:"farris-tab-page"},M0(g)?g:{default:()=>[g]})}const c=e.computed(()=>{var m;return{"farris-tab-page":!0,"f-utils-fill-flex-column":l.value&&o&&((m=o.shouldFillParentContaner)==null?void 0:m.value)}});function d(){var m,h;const g=(h=(m=n.slots).default)==null?void 0:h.call(m);return e.createVNode("div",{class:c.value,style:s.value},[g])}const f=new Map([["default",d],["one-page",p]]).get(i.value)||d;return()=>a.value?f():null}}),P0=new Map([["appearance",xe]]),O0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/order.schema.json",title:"order",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a order",type:"string"},type:{description:"The type string of order component",type:"string",default:"order"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function R0(t,n,o){return n}const j0={title:"order",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Oa={dataSource:{type:Array,default:[{id:"1",name:"发票类型"},{id:"2",name:"发票代码"},{id:"3",name:"开票日期"},{id:"4",name:"票价(燃油附加费)"},{id:"5",name:"税收分类编号"}]},items:{type:Array,default:[{id:"1",name:"发票类型",order:"asc"},{id:"2",name:"发票代码",order:"desc"},{id:"3",name:"开票日期",order:"asc"}]}},mc=me(Oa,O0,P0,R0,j0),_0={id:String,type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String}};function H0(t,n){function o(a){a.stopPropagation(),t.disabled||n.emit("click",a)}return{onClickButton:o}}function L0(t){const n=e.computed(()=>{const a={"f-icon":!0};if(t.icon){const r=t.icon.trim().split(" ");r&&r.length&&r.reduce((i,l)=>(i[l]=!0,i),a)}return a}),o=e.computed(()=>!!(t.icon&&t.icon.trim()));return{iconClass:n,shouldShowIcon:o}}const hc=e.defineComponent({name:"FButton",props:_0,emits:["click"],setup(t,n){const{onClickButton:o}=H0(t,n),{iconClass:a,shouldShowIcon:r}=L0(t),i=e.ref(t.size),l=e.ref(t.type),s=e.ref(t.disabled),p=e.computed(()=>{const c={btn:!0,"btn-lg":i.value==="large","btn-sm":i.value!=="large"};return c[`btn-${l.value}`]=!0,c});return()=>e.createVNode("button",{class:p.value,disabled:s.value,onClick:c=>o(c)},[r.value&&e.createVNode("i",{class:a.value},null),n.slots.default&&n.slots.default()])}}),uo=e.defineComponent({name:"FOrder",props:Oa,emits:["change"],setup(t,n){const o=e.ref(t.items),a=e.ref("排序列"),r=e.ref("排序方式"),i=e.ref("添加排序列"),l=[{id:"asc",name:"升序"},{id:"desc",name:"降序"}],s=e.ref(new Map);function p(){const y=o.value.map(b=>[b.id,!0]);s.value=new Map(y)}p();const c=e.computed(()=>t.dataSource.map(y=>(y.disabled=s.value.has(y.id),y))),d=e.computed(()=>({"f-order":!0}));function u(y){o.value=o.value.filter(b=>b.id!==y.id),p(),n.emit("change",o.value)}function f(){o.value=[...o.value,{id:Date.now().toString(),name:"",order:"asc"}],p(),n.emit("change",o.value)}function g(y){if(y&&y.length===1){const b=y[0],v=o.value.find(x=>x.id===b.id);v&&(v.name=b.name)}p(),n.emit("change",o.value)}function m(y){if(y&&y.length){const b=new Map;y.reduce((v,x)=>(v.set(x.id,x),v),b),o.value=y.map(v=>b.get(v.id)),n.emit("change",o.value)}}function h(){return e.createVNode(kt,{style:"flex:1",data:o.value,draggable:!0,view:"DraggableView","keep-order":!0,itemClass:"f-order-item",onRemoveItem:u,onChange:m},{header:()=>e.createVNode("div",{class:"f-order-header"},[e.createVNode("span",{class:"f-order-header-order-field"},[a.value]),e.createVNode("span",{class:"f-order-header-order-type"},[r.value])]),itemContent:y=>e.createVNode("div",{class:"f-order-item-content"},[e.createVNode(Bt,{class:"f-order-item-content-order-field",data:c.value,valueField:"id",textField:"name",idField:"id",modelValue:y.id,"onUpdate:modelValue":b=>y.id=b,onChange:g,onClear:g},null),e.createVNode(Bt,{class:"f-order-item-content-order-type",data:l,valueField:"id",textField:"name",idField:"id",modelValue:y.order,"onUpdate:modelValue":b=>y.order=b,onChange:g},null)]),footer:()=>e.createVNode("div",{class:"f-order-footer"},[e.createVNode(hc,{type:"link",class:"f-order-add-button",onClick:f},{default:()=>e.createVNode(e.Fragment,null,[e.createVNode("span",{class:"f-order-add-icon"},[e.createVNode("i",{class:"f-icon f-icon-add"},null)]),i.value])})])})}return()=>e.createVNode("div",{class:d.value},[h()])}}),gc={conditions:{type:Array,default:[]},fields:{type:Array,default:[]},key:{type:String,default:""},isControlInline:{type:Boolean,default:!0}},Ra=new Map([["appearance",xe]]);function W0(t,n,o,a){const r=t.getSchemaByType("section");return r.id=`${a}-section`,r.appearance={class:"f-section-form f-section-in-main"},r.mainTitle="标题",r.contents=[n],r}function q0(t,n,o,a){const r=t.getSchemaByType("component");return r.id=`${a}-component`,r.componentType="form-col-1",r.appearance={class:"f-struct-form f-struct-wrapper"},r.contents=[n],r}function z0(t,n,o){n.appearance={class:"f-form-layout farris-form farris-form-controls-inline"};const a=W0(t,n,o,n.id);return q0(t,a,o,n.id)}const G0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]}},required:["id","type"]},U0={title:"response-form",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},yc={customClass:{type:String,default:""}},bc=me(yc,G0,Ra,z0,U0),ja=e.defineComponent({name:"FResponseForm",props:yc,emits:[],setup(t,n){const o=e.ref(),a=e.computed(()=>{const r=t.customClass.split(" "),i={"drag-container":!0};return r.reduce((l,s)=>(l[s]=!0,l),i),i});return()=>e.createVNode("div",{ref:o,class:a.value},[n.slots.default&&n.slots.default()])}}),vc={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/form-group.schema.json",title:"form-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"form-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},enableLinkLabel:{description:"",type:"boolean",default:!1},editor:{description:"",type:"obejct"},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"}},required:["id","type"]},xc={title:"form-group",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"类型",type:"enum",editor:{type:"combo-list",data:[]},$converter:"/converter/property-editor.converter"},label:{title:"标签",type:"string",description:""},enableLinkLabel:{title:"超链接标签",type:"boolean",description:""}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:"",$converter:"/converter/appearance.converter"},style:{title:"style",type:"string",description:"",$converter:"/converter/appearance.converter"},responseLayout:{description:"响应式列宽",title:"响应式列宽",type:"boolean",editor:{type:"response-layout-editor-setting"},$converter:"/converter/response-form-layout.converter"}}},behavior:{$ref:{schema:"editor"}}}},fo={id:{type:String,default:""},customClass:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number],default:""},showLabel:{type:Boolean,default:!0},type:{type:String,default:"input-group"}},Cc=me(fo,vc,Ra,void 0,xc);function qt(){function t(n){var r,i;if(!n)return!1;const o=((r=n.targetContainer)==null?void 0:r.componentInstance)&&n.targetContainer.componentInstance.value;if(!o)return!1;const a=(i=o.schema.appearance)==null?void 0:i.class;if(n.controlCategory==="input"||n.controlType==="form-group"){const l=o.schema.type,s=(l==="response-form"||l==="content-container")&&a&&a.includes("farris-form");if(o.schema.type!=="response-layout-item"&&!s)return!1}return n.controlType!=="field-set"}return{basalDragulaRuleForContainer:t}}const Y0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}},required:[]},_a=new Map;function zt(){function t(m,h,y,b){var v;if(typeof y=="number")return((v=b[m])==null?void 0:v.length)===y;if(typeof y=="object"){const x=Object.keys(y)[0],C=y[x];if(x==="not")return Number(b[m].length)!==Number(C);if(x==="moreThan")return Number(b[m].length)>=Number(C);if(x==="lessThan")return Number(b[m].length)<=Number(C)}return!1}function n(m,h,y,b){return typeof y=="boolean"?b.childrenClassList.includes(h)===!!y:!1}function o(m,h,y,b){return typeof y=="boolean"?b.parentClassList.includes(h)===!!y:!1}function a(m,h,y,b){return typeof y=="boolean"?b.parentClassList.includes(h)===!!y:!1}const r=new Map([["length",t],["hasChildren",n],["hasSibling",a],["hasParent",o]]);function i(m,h){const y=m;return typeof h=="number"?[{target:y,operator:"length",param:null,value:Number(h)}]:typeof h=="object"?Object.keys(h).map(b=>{if(b==="length")return{target:y,operator:"length",param:null,value:h[b]};const v=b,x=h[b];return{target:y,operator:m==="children"?"hasChildren":m==="parent"?"hasParent":"hasSibling",param:v,value:x}}):[]}function l(m,h){if(r.has(m.operator)){const y=r.get(m.operator);return y&&y(m.target,m.param,m.value,h)||!1}return!1}function s(m,h){return Object.keys(m).reduce((x,C)=>{const w=i(C,m[C]);return x.push(...w),x},[]).reduce((x,C)=>x&&l(C,h),!0)}function p(m,h){const y=Object.keys(m),b=y.includes("allOf"),v=y.includes("anyOf"),x=b||v,N=(x?m[x?b?"allOf":"anyOf":"allOf"]:[m]).map(D=>s(D,h));return b?!N.includes(!1):N.includes(!0)}function c(m,h){const y=m.const;return y?typeof y=="boolean"?y:typeof y=="object"?p(y,h):!1:!1}function d(m){return h=>{const y={canAccept:!0,fixed:!1,hidePadding:!1};return m&&m.properties&&Object.keys(m.properties).reduce((b,v)=>{const x=m.properties[v];return b[v]=c(x,h),b},y),y}}function u(m,h,y){if(h.type==="object"&&h.properties){const{rules:b,contents:v}=h.properties;y.set(m,d(b)),v&&Object.keys(v.properties).forEach(x=>u(x,v.properties[x],y))}}function f(){const{properties:m}=Y0;Object.keys(m).forEach(h=>{u(h,m[h],_a)})}function g(m,h){const y={canAccept:!0,fixed:!1,hidePadding:!0};return _a.has(m)?_a.get(m)(h):y}return f(),{getRuleValue:g}}function hn(t,n){const o=zt(),a=e.ref(!1),r=e.ref(!1);let i=!0,l=!1,s,p=!1;function c(x){return s&&s.componentClassList&&s.componentClassList.includes("f-form-layout")&&s.componentClassList.includes("farris-form")?x.sourceType==="control"&&x.controlCategory==="input"||x.sourceType==="move"&&x.controlType==="form-group":!0}function d(x){return!(!qt().basalDragulaRuleForContainer(x)||!i||!c(x))}function u(){a.value=!1,r.value=!1;const x=t,C=x.appearance&&x.appearance.class||"",w=C.split(" "),N=x.contents||[],V=N.length?N[0]:null,D=V&&V.appearance?V.appearance.class:"",k=D?D.split(" "):[],B=N.length?N.reduce((I,R)=>{const O=R&&R.appearance?R.appearance.class:"",G=O?O.split(" "):[];return I.push(...G),I},[]):[],$=n,T=$&&$.appearance&&$.appearance.class||"",S=T?T.split(" "):[];s={componentClass:C,componentClassList:w,childContents:N,firstChildContent:V,firstChildClass:D,firstChildClassList:k,parent:$,parentClass:T,parentClassList:S,children:N,childrenClassList:B};const{canAccept:F,fixed:A,hidePadding:E}=o.getRuleValue(w[0],s);return i=F,l=E,p=A,!0}function f(x){e.nextTick()}function g(){return t.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function m(x,C){const w=t;if((w.appearance&&w.appearance.class||"").split(" ").includes("f-form-layout")){const{label:D}=x,k=mt("form-group");return k.editor=C,k.label=D,k}return C}function h(x,C,w){const N=t;if((N.appearance&&N.appearance.class||"").split(" ").includes("f-form-layout")){const k=String(x.innerText),B=mt("form-group");return B.editor=w,B.label=k,B}return w}function y(){return!p}function b(){return!p}function v(){return l}return{canAccepts:d,checkCanDeleteComponent:b,checkCanMoveComponent:y,getStyles:g,hideNestedPaddingInDesginerView:v,onAcceptNewChildElement:h,onAcceptMovedChildElement:f,resolveComponentContext:u,onResolveNewComponentSchema:m,triggerBelongedComponentToMoveWhenMoved:a,triggerBelongedComponentToDeleteWhenDeleted:r}}const K0=e.defineComponent({name:"FResponseFormDesign",props:fo,emits:[],setup(t,n){var s;const o=e.ref(),a=e.inject("design-item-context"),r=hn(a.schema,(s=a.parent)==null?void 0:s.schema),i=ve(o,a,r);e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const l=e.computed(()=>{const p=t.customClass.split(" "),c={"drag-container":!0};return p.reduce((d,u)=>(d[u]=!0,d),c),c});return()=>e.createVNode("div",{ref:o,class:l.value,"data-dragref":`${a.schema.id}-container`,"data-associate":`${a.schema.id}-component`},[n.slots.default&&n.slots.default()])}}),X0={id:{type:String},required:{type:Boolean,default:!1},text:{type:String,default:""},title:{type:String}},Q0=e.defineComponent({name:"FDynamicFormLabel",props:X0,emits:[],setup(t,n){const o=e.ref(t.title||t.text),a=e.ref(t.required),r=e.ref(t.text);return e.watch(()=>t.text,()=>{r.value=t.text}),()=>e.createVNode("label",{class:"col-form-label",title:o.value},[a.value&&e.createVNode("span",{class:"farris-label-info text-danger"},[e.createTextVNode("*")]),e.createVNode("span",{class:"farris-label-text"},[r.value])])}}),Z0=new Map([["appearance",xe]]);function J0(t,n,o){return n}const eg={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/input-group.schema.json",title:"input-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"input-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},labelWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""},addonDisabled:{description:"",type:"boolean",default:!1},addonContent:{description:"",type:"string",default:""},autoHeight:{description:"",type:"boolean",default:!1},enableAddon:{description:"",type:"boolean",default:!1},addonType:{description:"",type:"string",enum:["button","static"],default:"button"},enableClear:{description:"",type:"boolean",default:!0},enableViewPassword:{description:"",type:"boolean",default:!1},inputType:{description:"",type:"string",enum:["input","password","text"],default:"input"},maxHeight:{description:"",type:"number",default:500},popUp:{description:"",type:"object",properties:{footerButtons:{type:"array",default:[]},height:{type:"number",default:600},dataMapping:{type:"object"},contents:{type:"array",default:[]},showMaxButton:{type:"boolean",default:!0},showCloseButton:{type:"boolean",default:!0},showFooter:{type:"boolean",default:!0},title:{type:"string",default:""},width:{type:"number",default:800}}},showButtonWhenDisabled:{description:"",type:"boolean",default:!1},onClear:{description:"",type:"string",default:""}},required:["id","type"]},tg={title:"input-group",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabIndex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Ha={autocomplete:{Type:String,default:"off"},customClass:{Type:String,default:""},disable:{Type:Boolean,default:!1},editable:{Type:Boolean,default:!0},enableClear:{Type:Boolean,default:!0},enableTitle:{Type:Boolean,default:!0},enableViewPassword:{Type:Boolean,default:!0},forcePlaceholder:{Type:Boolean,default:!1},groupText:{Type:String,default:""},isPassword:{Type:Boolean,default:!1},maxLength:{Type:Number||void 0,default:void 0},minLength:{Type:Number||void 0,default:void 0},modelValue:{Type:String||Boolean,default:""},noborder:{Type:Boolean,default:!1},placeholder:{Type:String,default:""},readonly:{Type:Boolean,default:!1},showButtonWhenDisabled:{Type:Boolean,default:!1},tabIndex:{Type:Number||void 0,default:void 0},textAlign:{Type:String,default:"left"},useExtendInfo:{Type:Boolean,default:!1},extendInfo:{Type:String,default:""},value:{Type:String,default:""},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},wc=me(Ha,eg,Z0,J0,tg);function Nc(t,n){const o=e.ref(t.groupText),a=e.computed(()=>t.showButtonWhenDisabled&&(t.readonly||t.disabled)),r=e.computed(()=>t.enableClear||!!t.groupText);return{appendedButtonClass:e.computed(()=>({"input-group-append":!0,"append-force-show":a.value})),appendedContent:o,shouldShowAppendedButton:r}}function Vc(t,n,o,a){const{appendedContent:r}=a,i=e.ref(t.enableViewPassword),l=e.ref(t.isPassword),s='<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>',p='<span class="f-icon f-icon-eye"></span>',c=e.ref(!1);e.watch(()=>[t.readonly,t.disabled],([f,g])=>{l.value&&(o.value=f||g?"password":o.value,r.value=f||g?p:r.value)});function d(){return c.value=!c.value,o.value=c.value?"text":"password",r.value=c.value?s:p,!1}function u(){o.value=l.value?"password":"text",r.value=l.value?i.value?p:"":r.value}return u(),{isPassword:l,onClickAppendedButton:d}}function Sc(t,n,o,a){const r=e.ref(t.disable),i=e.ref(!1),l=e.ref("text"),s=e.ref(t.noborder),p=e.ref(t.textAlign),c=e.computed(()=>t.editable||!t.readonly),d=e.computed(()=>t.editable&&!t.disable&&!t.readonly),u=e.computed(()=>!t.disable&&i.value),f=e.computed(()=>o.value===""||o.value===null||o.value===void 0),g=e.computed(()=>(t.disable||t.readonly)&&!t.forcePlaceholder?"":t.placeholder),m=e.computed(()=>t.readonly||!t.editable),h=e.computed(()=>t.enableTitle?o.value:""),y=e.computed(()=>({"form-control":!0,"f-utils-fill":!0,"text-left":p.value==="left","text-center":p.value==="center","text-right":p.value==="right"})),b=e.computed(()=>{const T={"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disable":r.value,"f-state-editable":d.value,"f-state-readonly":m.value,"f-state-focus":u.value};return(t.customClass||"").split(" ").reduce((F,A)=>(F[A]=!0,F),T),T}),v=e.computed(()=>s.value?"border-width : 0 ":"");function x(T,S=!0){o.value!==T&&(o.value=T,a.value!==T&&(a.value=T),S&&n.emit("change",T),n.emit("update:modelValue",T),n.emit("update:value",T))}e.watch(()=>t.modelValue,T=>{o.value!==t.modelValue&&(o.value=T,a.value=T)});function C(T){return i.value=!1,n.emit("blur",T),T.stopPropagation(),!1}function w(T){n.emit("click",T)}function N(T){t.disable||(s.value||(i.value=!0),c.value&&n.emit("focus",T))}function V(T){n.emit("input",T.target.value);const S=T.target.value;a.value=S}function D(T){n.emit("keydown",T)}function k(T){n.emit("keyup",T)}function B(T){T.target.tagName!=="INPUT"&&T.preventDefault(),T.stopPropagation()}function $(T){const S=T.target.value;T.stopPropagation(),x(S)}return{changeTextBoxValue:x,disable:r,displayText:a,editable:d,hasFocused:u,inputGroupClass:b,inputType:l,isEmpty:f,modelValue:o,readonly:m,onBlur:C,onClick:w,onFocus:N,onInput:V,onKeydown:D,onKeyup:k,onMousedown:B,onTextBoxValueChange:$,placeholder:g,textBoxClass:y,textBoxTitle:h,inputGroupStyle:v}}function $c(t,n,o){const a=e.ref(!1),r=e.computed(()=>t.enableClear&&!t.readonly&&!t.disable),{changeTextBoxValue:i,displayText:l,hasFocused:s,isEmpty:p}=o;function c(h){a.value=h}e.watch(l,()=>{s.value?c(!!l.value):c(!1)});const d=e.computed(()=>({"input-group-text":!0,"input-group-clear":!0})),u=e.computed(()=>({width:"24px",display:a.value?"flex":"none"}));function f(h){h.stopPropagation(),r.value&&(i("",!0),c(!a.value),n.emit("clear"))}function g(h){r.value&&!p.value&&c(!0)}function m(h){r.value&&c(!1)}return{clearButtonClass:d,clearButtonStyle:u,hasShownClearButton:a,onClearValue:f,onMouseEnter:g,onMouseLeave:m,shouldShowClearButton:r}}const ng={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},og={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};class Dc{constructor(){P(this,"regexes",{YEAR:"[1-9]\\d{3}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",MONTHNAME:"jan|january|feb|february|mar|march|apr|april|may|jun|june|jul|july|aug|august|sep|september|oct|october|nov|november|dec|december",DAYNAME:"mon|monday|tue|tuesday|wed|wednesday|thu|thursday|fri|friday|sat|saturday|sun|sunday",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",TIMEZONE:"[+-][01]\\d\\:?[0-5]\\d",H24:"[01]\\d|2[0-3]",MIN:"[0-5]\\d",SEC:"[0-5]\\d",MS:"\\d{3,}",H12:"0?[1-9]|1[012]",AMPM:"am|pm",UNIT:"year|month|week|day|hour|minute|second|millisecond"});P(this,"patterns",[["iso_8601",this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"),"$2/$3/$1"],["us",this.makePattern("^(_MONTH_)([\\/-])(_DAY_)\\2(_YEAR_)$"),"$1/$3/$4"],["world",this.makePattern("^(_DAY_)([\\/\\.])(_MONTH_)\\2(_YEAR_)$"),"$3/$1/$4"],["chicago",this.makePattern("^(?:(?:_DAYNAME_),? )?(_DAY_)([ -])(_MONTHNAME_)\\2(_YEAR_)$"),"$3 $1, $4"],["conversational",this.makePattern("^(?:(?:_DAYNAME_),? )?(_MONTHNAME_) (_DAY_),? (_YEAR_)$"),"$1 $2, $3"],["month_day_time_year",this.makePattern("^(?:_DAYNAME_) (_MONTHNAME_) (_DAY_) ((?:_H24_)\\:(?:_MIN_)(?:\\:_SEC_)?) (_TIMEZONE_) (_YEAR_)$"),n=>{const o=(""+this.getMonthByName(n[1])).padStart(2,"0"),a=(""+n[2]).padStart(2,"0"),r=n[5],i=n[3],l=n[4],s=r+"-"+o+"-"+a+"T"+i+l;return isNaN(s)?!1:s}],["unix",/^@(-?\d+)$/,n=>this.create(parseInt(n[1],10)*1e3)],["24_hour",this.makePattern("^(?:(.+?)(?: |T))?(_H24_)\\:(_MIN_)(?:\\:(_SEC_)(?:\\.(_MS_))?)? ?(?:GMT)?(_TIMEZONE_)?(?: \\([A-Z]+\\))?$"),n=>{let o;const a=n[1];if(a){if(o=this.create(a),isNaN(o))return!1}else o=new Date,o.setMilliseconds(0);const r=n[2],i=n[3],l=n[4],s=n[5];return o.setHours(parseFloat(r),parseFloat(i),parseFloat(l||0)),s&&o.setMilliseconds(+String(s).slice(0,3)),o}],["12_hour",this.makePattern("^(?:(.+) )?(_H12_)(?:\\:(_MIN_)(?:\\:(_SEC_))?)? ?(_AMPM_)$"),n=>{let o;const a=n[1];if(a){if(o=this.create(a),isNaN(o))return!1}else o=new Date,o.setMilliseconds(0);let r=parseFloat(n[2]);r=n[5].toLowerCase()==="am"?r===12?0:r:r===12?12:r+12;const i=n[3],l=n[4];return o.setHours(r,parseFloat(i||0),parseFloat(l||0)),o}]])}makePattern(n){return n=n.replace(/_([A-Z][A-Z0-9]+)_/g,(o,a)=>this.regexes[a]),new RegExp(n,"i")}getMonthByName(n){return ng[String(n).slice(0,3).toLowerCase()]}getWeekdayByName(n){return og[String(n).slice(0,3).toLowerCase()]}parse(n){if(!isNaN(Number(n)))return new Date(n);if(n=String(n).replace(/^\s*(.*)\s*$/,"$1"),n=n.replace(/\s{2,}/g," "),n==="")return Date.now();let o=0;for(;o<this.patterns.length;){const a=this.patterns[o];let r,i;typeof a[0]=="string"?(i=a[1],r=a[2]):(i=a[0],r=a[1]);const l=n.match(i);if(!l){o++;continue}if(typeof r=="function"){const s=r(l);if(s instanceof Date)return s}else{const s=Date.parse(n.replace(i,r));if(!isNaN(s))return new Date(s)}o++}return NaN}create(n){return n==null?Date.now():n instanceof Date?n:this.parse(n)}}function ut(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}function nt(t,n){return t instanceof Date?new t.constructor(n):new Date(n)}function kc(t,n){const o=ut(t);return isNaN(n)?nt(t,NaN):(n&&o.setDate(o.getDate()+n),o)}const Bc=6048e5,ag=864e5,La=6e4,Wa=36e5,rg=1e3;let ig={};function gn(){return ig}function jt(t,n){var s,p,c,d;const o=gn(),a=(n==null?void 0:n.weekStartsOn)??((p=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:p.weekStartsOn)??o.weekStartsOn??((d=(c=o.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,r=ut(t),i=r.getDay(),l=(i<a?7:0)+i-a;return r.setDate(r.getDate()-l),r.setHours(0,0,0,0),r}function yn(t){return jt(t,{weekStartsOn:1})}function Tc(t){const n=ut(t),o=n.getFullYear(),a=nt(t,0);a.setFullYear(o+1,0,4),a.setHours(0,0,0,0);const r=yn(a),i=nt(t,0);i.setFullYear(o,0,4),i.setHours(0,0,0,0);const l=yn(i);return n.getTime()>=r.getTime()?o+1:n.getTime()>=l.getTime()?o:o-1}function Fc(t){const n=ut(t);return n.setHours(0,0,0,0),n}function po(t){const n=ut(t),o=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return o.setUTCFullYear(n.getFullYear()),+t-+o}function sg(t,n){const o=Fc(t),a=Fc(n),r=+o-po(o),i=+a-po(a);return Math.round((r-i)/ag)}function lg(t){const n=Tc(t),o=nt(t,0);return o.setFullYear(n,0,4),o.setHours(0,0,0,0),yn(o)}function cg(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function qa(t){if(!cg(t)&&typeof t!="number")return!1;const n=ut(t);return!isNaN(Number(n))}function dg(t){const n=ut(t),o=nt(t,0);return o.setFullYear(n.getFullYear(),0,1),o.setHours(0,0,0,0),o}const ug={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},fg=(t,n,o)=>{let a;const r=ug[t];return typeof r=="string"?a=r:n===1?a=r.one:a=r.other.replace("{{count}}",n.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+a:a+" ago":a};function za(t){return(n={})=>{const o=n.width?String(n.width):t.defaultWidth;return t.formats[o]||t.formats[t.defaultWidth]}}const pg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gg={date:za({formats:pg,defaultWidth:"full"}),time:za({formats:mg,defaultWidth:"full"}),dateTime:za({formats:hg,defaultWidth:"full"})},yg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bg=(t,n,o,a)=>yg[t];function Tn(t){return(n,o)=>{const a=o!=null&&o.context?String(o.context):"standalone";let r;if(a==="formatting"&&t.formattingValues){const l=t.defaultFormattingWidth||t.defaultWidth,s=o!=null&&o.width?String(o.width):l;r=t.formattingValues[s]||t.formattingValues[l]}else{const l=t.defaultWidth,s=o!=null&&o.width?String(o.width):t.defaultWidth;r=t.values[s]||t.values[l]}const i=t.argumentCallback?t.argumentCallback(n):n;return r[i]}}const vg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Cg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ng={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Vg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Sg={ordinalNumber:(t,n)=>{const o=Number(t),a=o%100;if(a>20||a<10)switch(a%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},era:Tn({values:vg,defaultWidth:"wide"}),quarter:Tn({values:xg,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Tn({values:Cg,defaultWidth:"wide"}),day:Tn({values:wg,defaultWidth:"wide"}),dayPeriod:Tn({values:Ng,defaultWidth:"wide",formattingValues:Vg,defaultFormattingWidth:"wide"})};function Fn(t){return(n,o={})=>{const a=o.width,r=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],i=n.match(r);if(!i)return null;const l=i[0],s=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],p=Array.isArray(s)?Dg(s,u=>u.test(l)):$g(s,u=>u.test(l));let c;c=t.valueCallback?t.valueCallback(p):p,c=o.valueCallback?o.valueCallback(c):c;const d=n.slice(l.length);return{value:c,rest:d}}}function $g(t,n){for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&n(t[o]))return o}function Dg(t,n){for(let o=0;o<t.length;o++)if(n(t[o]))return o}function kg(t){return(n,o={})=>{const a=n.match(t.matchPattern);if(!a)return null;const r=a[0],i=n.match(t.parsePattern);if(!i)return null;let l=t.valueCallback?t.valueCallback(i[0]):i[0];l=o.valueCallback?o.valueCallback(l):l;const s=n.slice(r.length);return{value:l,rest:s}}}const Bg=/^(\d+)(th|st|nd|rd)?/i,Tg=/\d+/i,Fg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ag={any:[/^b/i,/^(a|c)/i]},Ig={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Eg={any:[/1/i,/2/i,/3/i,/4/i]},Mg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Pg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Og={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Rg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hg={ordinalNumber:kg({matchPattern:Bg,parsePattern:Tg,valueCallback:t=>parseInt(t,10)}),era:Fn({matchPatterns:Fg,defaultMatchWidth:"wide",parsePatterns:Ag,defaultParseWidth:"any"}),quarter:Fn({matchPatterns:Ig,defaultMatchWidth:"wide",parsePatterns:Eg,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Fn({matchPatterns:Mg,defaultMatchWidth:"wide",parsePatterns:Pg,defaultParseWidth:"any"}),day:Fn({matchPatterns:Og,defaultMatchWidth:"wide",parsePatterns:Rg,defaultParseWidth:"any"}),dayPeriod:Fn({matchPatterns:jg,defaultMatchWidth:"any",parsePatterns:_g,defaultParseWidth:"any"})},Ac={code:"en-US",formatDistance:fg,formatLong:gg,formatRelative:bg,localize:Sg,match:Hg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lg(t){const n=ut(t);return sg(n,dg(n))+1}function Ic(t){const n=ut(t),o=+yn(n)-+lg(n);return Math.round(o/Bc)+1}function Ga(t,n){var d,u,f,g;const o=ut(t),a=o.getFullYear(),r=gn(),i=(n==null?void 0:n.firstWeekContainsDate)??((u=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,l=nt(t,0);l.setFullYear(a+1,0,i),l.setHours(0,0,0,0);const s=jt(l,n),p=nt(t,0);p.setFullYear(a,0,i),p.setHours(0,0,0,0);const c=jt(p,n);return o.getTime()>=s.getTime()?a+1:o.getTime()>=c.getTime()?a:a-1}function Wg(t,n){var s,p,c,d;const o=gn(),a=(n==null?void 0:n.firstWeekContainsDate)??((p=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(c=o.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,r=Ga(t,n),i=nt(t,0);return i.setFullYear(r,0,a),i.setHours(0,0,0,0),jt(i,n)}function Ec(t,n){const o=ut(t),a=+jt(o,n)-+Wg(o,n);return Math.round(a/Bc)+1}function ze(t,n){const o=t<0?"-":"",a=Math.abs(t).toString().padStart(n,"0");return o+a}const _t={y(t,n){const o=t.getFullYear(),a=o>0?o:1-o;return ze(n==="yy"?a%100:a,n.length)},M(t,n){const o=t.getMonth();return n==="M"?String(o+1):ze(o+1,2)},d(t,n){return ze(t.getDate(),n.length)},a(t,n){const o=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(t,n){return ze(t.getHours()%12||12,n.length)},H(t,n){return ze(t.getHours(),n.length)},m(t,n){return ze(t.getMinutes(),n.length)},s(t,n){return ze(t.getSeconds(),n.length)},S(t,n){const o=n.length,a=t.getMilliseconds(),r=Math.trunc(a*Math.pow(10,o-3));return ze(r,n.length)}},bn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mc={G:function(t,n,o){const a=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return o.era(a,{width:"abbreviated"});case"GGGGG":return o.era(a,{width:"narrow"});case"GGGG":default:return o.era(a,{width:"wide"})}},y:function(t,n,o){if(n==="yo"){const a=t.getFullYear(),r=a>0?a:1-a;return o.ordinalNumber(r,{unit:"year"})}return _t.y(t,n)},Y:function(t,n,o,a){const r=Ga(t,a),i=r>0?r:1-r;if(n==="YY"){const l=i%100;return ze(l,2)}return n==="Yo"?o.ordinalNumber(i,{unit:"year"}):ze(i,n.length)},R:function(t,n){const o=Tc(t);return ze(o,n.length)},u:function(t,n){const o=t.getFullYear();return ze(o,n.length)},Q:function(t,n,o){const a=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return ze(a,2);case"Qo":return o.ordinalNumber(a,{unit:"quarter"});case"QQQ":return o.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,n,o){const a=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return ze(a,2);case"qo":return o.ordinalNumber(a,{unit:"quarter"});case"qqq":return o.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,n,o){const a=t.getMonth();switch(n){case"M":case"MM":return _t.M(t,n);case"Mo":return o.ordinalNumber(a+1,{unit:"month"});case"MMM":return o.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(a,{width:"wide",context:"formatting"})}},L:function(t,n,o){const a=t.getMonth();switch(n){case"L":return String(a+1);case"LL":return ze(a+1,2);case"Lo":return o.ordinalNumber(a+1,{unit:"month"});case"LLL":return o.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(a,{width:"wide",context:"standalone"})}},w:function(t,n,o,a){const r=Ec(t,a);return n==="wo"?o.ordinalNumber(r,{unit:"week"}):ze(r,n.length)},I:function(t,n,o){const a=Ic(t);return n==="Io"?o.ordinalNumber(a,{unit:"week"}):ze(a,n.length)},d:function(t,n,o){return n==="do"?o.ordinalNumber(t.getDate(),{unit:"date"}):_t.d(t,n)},D:function(t,n,o){const a=Lg(t);return n==="Do"?o.ordinalNumber(a,{unit:"dayOfYear"}):ze(a,n.length)},E:function(t,n,o){const a=t.getDay();switch(n){case"E":case"EE":case"EEE":return o.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(a,{width:"short",context:"formatting"});case"EEEE":default:return o.day(a,{width:"wide",context:"formatting"})}},e:function(t,n,o,a){const r=t.getDay(),i=(r-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(i);case"ee":return ze(i,2);case"eo":return o.ordinalNumber(i,{unit:"day"});case"eee":return o.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})}},c:function(t,n,o,a){const r=t.getDay(),i=(r-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(i);case"cc":return ze(i,n.length);case"co":return o.ordinalNumber(i,{unit:"day"});case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})}},i:function(t,n,o){const a=t.getDay(),r=a===0?7:a;switch(n){case"i":return String(r);case"ii":return ze(r,n.length);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return o.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(a,{width:"short",context:"formatting"});case"iiii":default:return o.day(a,{width:"wide",context:"formatting"})}},a:function(t,n,o){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,o){const a=t.getHours();let r;switch(a===12?r=bn.noon:a===0?r=bn.midnight:r=a/12>=1?"pm":"am",n){case"b":case"bb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,n,o){const a=t.getHours();let r;switch(a>=17?r=bn.evening:a>=12?r=bn.afternoon:a>=4?r=bn.morning:r=bn.night,n){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,n,o){if(n==="ho"){let a=t.getHours()%12;return a===0&&(a=12),o.ordinalNumber(a,{unit:"hour"})}return _t.h(t,n)},H:function(t,n,o){return n==="Ho"?o.ordinalNumber(t.getHours(),{unit:"hour"}):_t.H(t,n)},K:function(t,n,o){const a=t.getHours()%12;return n==="Ko"?o.ordinalNumber(a,{unit:"hour"}):ze(a,n.length)},k:function(t,n,o){let a=t.getHours();return a===0&&(a=24),n==="ko"?o.ordinalNumber(a,{unit:"hour"}):ze(a,n.length)},m:function(t,n,o){return n==="mo"?o.ordinalNumber(t.getMinutes(),{unit:"minute"}):_t.m(t,n)},s:function(t,n,o){return n==="so"?o.ordinalNumber(t.getSeconds(),{unit:"second"}):_t.s(t,n)},S:function(t,n){return _t.S(t,n)},X:function(t,n,o){const a=t.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return Oc(a);case"XXXX":case"XX":return Gt(a);case"XXXXX":case"XXX":default:return Gt(a,":")}},x:function(t,n,o){const a=t.getTimezoneOffset();switch(n){case"x":return Oc(a);case"xxxx":case"xx":return Gt(a);case"xxxxx":case"xxx":default:return Gt(a,":")}},O:function(t,n,o){const a=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Pc(a,":");case"OOOO":default:return"GMT"+Gt(a,":")}},z:function(t,n,o){const a=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Pc(a,":");case"zzzz":default:return"GMT"+Gt(a,":")}},t:function(t,n,o){const a=Math.trunc(t.getTime()/1e3);return ze(a,n.length)},T:function(t,n,o){const a=t.getTime();return ze(a,n.length)}};function Pc(t,n=""){const o=t>0?"-":"+",a=Math.abs(t),r=Math.trunc(a/60),i=a%60;return i===0?o+String(r):o+String(r)+n+ze(i,2)}function Oc(t,n){return t%60===0?(t>0?"-":"+")+ze(Math.abs(t)/60,2):Gt(t,n)}function Gt(t,n=""){const o=t>0?"-":"+",a=Math.abs(t),r=ze(Math.trunc(a/60),2),i=ze(a%60,2);return o+r+n+i}const Rc=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},jc=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Ua={p:jc,P:(t,n)=>{const o=t.match(/(P+)(p+)?/)||[],a=o[1],r=o[2];if(!r)return Rc(t,n);let i;switch(a){case"P":i=n.dateTime({width:"short"});break;case"PP":i=n.dateTime({width:"medium"});break;case"PPP":i=n.dateTime({width:"long"});break;case"PPPP":default:i=n.dateTime({width:"full"});break}return i.replace("{{date}}",Rc(a,n)).replace("{{time}}",jc(r,n))}},qg=/^D+$/,zg=/^Y+$/,Gg=["D","DD","YY","YYYY"];function _c(t){return qg.test(t)}function Hc(t){return zg.test(t)}function Ya(t,n,o){const a=Ug(t,n,o);if(console.warn(a),Gg.includes(t))throw new RangeError(a)}function Ug(t,n,o){const a=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${a} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Yg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xg=/^'([^]*?)'?$/,Qg=/''/g,Zg=/[a-zA-Z]/;function vn(t,n,o){var d,u,f,g;const a=gn(),r=a.locale??Ac,i=a.firstWeekContainsDate??((u=(d=a.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,l=a.weekStartsOn??((g=(f=a.locale)==null?void 0:f.options)==null?void 0:g.weekStartsOn)??0,s=ut(t);if(!qa(s))throw new RangeError("Invalid time value");let p=n.match(Kg).map(m=>{const h=m[0];if(h==="p"||h==="P"){const y=Ua[h];return y(m,r.formatLong)}return m}).join("").match(Yg).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:Jg(m)};if(Mc[h])return{isToken:!0,value:m};if(h.match(Zg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});r.localize.preprocessor&&(p=r.localize.preprocessor(s,p));const c={firstWeekContainsDate:i,weekStartsOn:l,locale:r};return p.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Hc(h)||_c(h))&&Ya(h,n,String(t));const y=Mc[h[0]];return y(s,h,r.localize,c)}).join("")}function Jg(t){const n=t.match(Xg);return n?n[1].replace(Qg,"'"):t}function ey(){return Object.assign({},gn())}function ty(t){let o=ut(t).getDay();return o===0&&(o=7),o}function ny(t,n){const o=n instanceof Date?nt(n,0):new n(0);return o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),o}const oy=10;class Lc{constructor(){P(this,"subPriority",0)}validate(n,o){return!0}}class ay extends Lc{constructor(n,o,a,r,i){super(),this.value=n,this.validateValue=o,this.setValue=a,this.priority=r,i&&(this.subPriority=i)}validate(n,o){return this.validateValue(n,this.value,o)}set(n,o,a){return this.setValue(n,o,this.value,a)}}class ry extends Lc{constructor(){super(...arguments);P(this,"priority",oy);P(this,"subPriority",-1)}set(o,a){return a.timestampIsSet?o:nt(o,ny(o,Date))}}class He{run(n,o,a,r){const i=this.parse(n,o,a,r);return i?{setter:new ay(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(n,o,a){return!0}}class iy extends He{constructor(){super(...arguments);P(this,"priority",140);P(this,"incompatibleTokens",["R","u","t","T"])}parse(o,a,r){switch(a){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"})||r.era(o,{width:"narrow"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})||r.era(o,{width:"abbreviated"})||r.era(o,{width:"narrow"})}}set(o,a,r){return a.era=r,o.setFullYear(r,0,1),o.setHours(0,0,0,0),o}}const rt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},At={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function it(t,n){return t&&{value:n(t.value),rest:t.rest}}function tt(t,n){const o=n.match(t);return o?{value:parseInt(o[0],10),rest:n.slice(o[0].length)}:null}function It(t,n){const o=n.match(t);if(!o)return null;if(o[0]==="Z")return{value:0,rest:n.slice(1)};const a=o[1]==="+"?1:-1,r=o[2]?parseInt(o[2],10):0,i=o[3]?parseInt(o[3],10):0,l=o[5]?parseInt(o[5],10):0;return{value:a*(r*Wa+i*La+l*rg),rest:n.slice(o[0].length)}}function Wc(t){return tt(rt.anyDigitsSigned,t)}function ot(t,n){switch(t){case 1:return tt(rt.singleDigit,n);case 2:return tt(rt.twoDigits,n);case 3:return tt(rt.threeDigits,n);case 4:return tt(rt.fourDigits,n);default:return tt(new RegExp("^\\d{1,"+t+"}"),n)}}function mo(t,n){switch(t){case 1:return tt(rt.singleDigitSigned,n);case 2:return tt(rt.twoDigitsSigned,n);case 3:return tt(rt.threeDigitsSigned,n);case 4:return tt(rt.fourDigitsSigned,n);default:return tt(new RegExp("^-?\\d{1,"+t+"}"),n)}}function Ka(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qc(t,n){const o=n>0,a=o?n:1-n;let r;if(a<=50)r=t||100;else{const i=a+50,l=Math.trunc(i/100)*100,s=t>=i%100;r=t+l-(s?100:0)}return o?r:1-r}function zc(t){return t%400===0||t%4===0&&t%100!==0}class sy extends He{constructor(){super(...arguments);P(this,"priority",130);P(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(o,a,r){const i=l=>({year:l,isTwoDigitYear:a==="yy"});switch(a){case"y":return it(ot(4,o),i);case"yo":return it(r.ordinalNumber(o,{unit:"year"}),i);default:return it(ot(a.length,o),i)}}validate(o,a){return a.isTwoDigitYear||a.year>0}set(o,a,r){const i=o.getFullYear();if(r.isTwoDigitYear){const s=qc(r.year,i);return o.setFullYear(s,0,1),o.setHours(0,0,0,0),o}const l=!("era"in a)||a.era===1?r.year:1-r.year;return o.setFullYear(l,0,1),o.setHours(0,0,0,0),o}}class ly extends He{constructor(){super(...arguments);P(this,"priority",130);P(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(o,a,r){const i=l=>({year:l,isTwoDigitYear:a==="YY"});switch(a){case"Y":return it(ot(4,o),i);case"Yo":return it(r.ordinalNumber(o,{unit:"year"}),i);default:return it(ot(a.length,o),i)}}validate(o,a){return a.isTwoDigitYear||a.year>0}set(o,a,r,i){const l=Ga(o,i);if(r.isTwoDigitYear){const p=qc(r.year,l);return o.setFullYear(p,0,i.firstWeekContainsDate),o.setHours(0,0,0,0),jt(o,i)}const s=!("era"in a)||a.era===1?r.year:1-r.year;return o.setFullYear(s,0,i.firstWeekContainsDate),o.setHours(0,0,0,0),jt(o,i)}}class cy extends He{constructor(){super(...arguments);P(this,"priority",130);P(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(o,a){return mo(a==="R"?4:a.length,o)}set(o,a,r){const i=nt(o,0);return i.setFullYear(r,0,4),i.setHours(0,0,0,0),yn(i)}}class dy extends He{constructor(){super(...arguments);P(this,"priority",130);P(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(o,a){return mo(a==="u"?4:a.length,o)}set(o,a,r){return o.setFullYear(r,0,1),o.setHours(0,0,0,0),o}}class uy extends He{constructor(){super(...arguments);P(this,"priority",120);P(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(o,a,r){switch(a){case"Q":case"QQ":return ot(a.length,o);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"})||r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})||r.quarter(o,{width:"abbreviated",context:"formatting"})||r.quarter(o,{width:"narrow",context:"formatting"})}}validate(o,a){return a>=1&&a<=4}set(o,a,r){return o.setMonth((r-1)*3,1),o.setHours(0,0,0,0),o}}class fy extends He{constructor(){super(...arguments);P(this,"priority",120);P(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(o,a,r){switch(a){case"q":case"qq":return ot(a.length,o);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"})||r.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})||r.quarter(o,{width:"abbreviated",context:"standalone"})||r.quarter(o,{width:"narrow",context:"standalone"})}}validate(o,a){return a>=1&&a<=4}set(o,a,r){return o.setMonth((r-1)*3,1),o.setHours(0,0,0,0),o}}class py extends He{constructor(){super(...arguments);P(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);P(this,"priority",110)}parse(o,a,r){const i=l=>l-1;switch(a){case"M":return it(tt(rt.month,o),i);case"MM":return it(ot(2,o),i);case"Mo":return it(r.ordinalNumber(o,{unit:"month"}),i);case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"})||r.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})||r.month(o,{width:"abbreviated",context:"formatting"})||r.month(o,{width:"narrow",context:"formatting"})}}validate(o,a){return a>=0&&a<=11}set(o,a,r){return o.setMonth(r,1),o.setHours(0,0,0,0),o}}class my extends He{constructor(){super(...arguments);P(this,"priority",110);P(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(o,a,r){const i=l=>l-1;switch(a){case"L":return it(tt(rt.month,o),i);case"LL":return it(ot(2,o),i);case"Lo":return it(r.ordinalNumber(o,{unit:"month"}),i);case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"})||r.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})||r.month(o,{width:"abbreviated",context:"standalone"})||r.month(o,{width:"narrow",context:"standalone"})}}validate(o,a){return a>=0&&a<=11}set(o,a,r){return o.setMonth(r,1),o.setHours(0,0,0,0),o}}function hy(t,n,o){const a=ut(t),r=Ec(a,o)-n;return a.setDate(a.getDate()-r*7),a}class gy extends He{constructor(){super(...arguments);P(this,"priority",100);P(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(o,a,r){switch(a){case"w":return tt(rt.week,o);case"wo":return r.ordinalNumber(o,{unit:"week"});default:return ot(a.length,o)}}validate(o,a){return a>=1&&a<=53}set(o,a,r,i){return jt(hy(o,r,i),i)}}function yy(t,n){const o=ut(t),a=Ic(o)-n;return o.setDate(o.getDate()-a*7),o}class by extends He{constructor(){super(...arguments);P(this,"priority",100);P(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(o,a,r){switch(a){case"I":return tt(rt.week,o);case"Io":return r.ordinalNumber(o,{unit:"week"});default:return ot(a.length,o)}}validate(o,a){return a>=1&&a<=53}set(o,a,r){return yn(yy(o,r))}}const vy=[31,28,31,30,31,30,31,31,30,31,30,31],xy=[31,29,31,30,31,30,31,31,30,31,30,31];class Cy extends He{constructor(){super(...arguments);P(this,"priority",90);P(this,"subPriority",1);P(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(o,a,r){switch(a){case"d":return tt(rt.date,o);case"do":return r.ordinalNumber(o,{unit:"date"});default:return ot(a.length,o)}}validate(o,a){const r=o.getFullYear(),i=zc(r),l=o.getMonth();return i?a>=1&&a<=xy[l]:a>=1&&a<=vy[l]}set(o,a,r){return o.setDate(r),o.setHours(0,0,0,0),o}}class wy extends He{constructor(){super(...arguments);P(this,"priority",90);P(this,"subpriority",1);P(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(o,a,r){switch(a){case"D":case"DD":return tt(rt.dayOfYear,o);case"Do":return r.ordinalNumber(o,{unit:"date"});default:return ot(a.length,o)}}validate(o,a){const r=o.getFullYear();return zc(r)?a>=1&&a<=366:a>=1&&a<=365}set(o,a,r){return o.setMonth(0,r),o.setHours(0,0,0,0),o}}function Xa(t,n,o){var u,f,g,m;const a=gn(),r=(o==null?void 0:o.weekStartsOn)??((f=(u=o==null?void 0:o.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??a.weekStartsOn??((m=(g=a.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=ut(t),l=i.getDay(),p=(n%7+7)%7,c=7-r,d=n<0||n>6?n-(l+c)%7:(p+c)%7-(l+c)%7;return kc(i,d)}class Ny extends He{constructor(){super(...arguments);P(this,"priority",90);P(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(o,a,r){switch(a){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"})||r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})||r.day(o,{width:"abbreviated",context:"formatting"})||r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"})}}validate(o,a){return a>=0&&a<=6}set(o,a,r,i){return o=Xa(o,r,i),o.setHours(0,0,0,0),o}}class Vy extends He{constructor(){super(...arguments);P(this,"priority",90);P(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(o,a,r,i){const l=s=>{const p=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+p};switch(a){case"e":case"ee":return it(ot(a.length,o),l);case"eo":return it(r.ordinalNumber(o,{unit:"day"}),l);case"eee":return r.day(o,{width:"abbreviated",context:"formatting"})||r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})||r.day(o,{width:"abbreviated",context:"formatting"})||r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"})}}validate(o,a){return a>=0&&a<=6}set(o,a,r,i){return o=Xa(o,r,i),o.setHours(0,0,0,0),o}}class Sy extends He{constructor(){super(...arguments);P(this,"priority",90);P(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(o,a,r,i){const l=s=>{const p=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+p};switch(a){case"c":case"cc":return it(ot(a.length,o),l);case"co":return it(r.ordinalNumber(o,{unit:"day"}),l);case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"})||r.day(o,{width:"short",context:"standalone"})||r.day(o,{width:"narrow",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"})||r.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})||r.day(o,{width:"abbreviated",context:"standalone"})||r.day(o,{width:"short",context:"standalone"})||r.day(o,{width:"narrow",context:"standalone"})}}validate(o,a){return a>=0&&a<=6}set(o,a,r,i){return o=Xa(o,r,i),o.setHours(0,0,0,0),o}}function $y(t,n){const o=ut(t),a=ty(o),r=n-a;return kc(o,r)}class Dy extends He{constructor(){super(...arguments);P(this,"priority",90);P(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(o,a,r){const i=l=>l===0?7:l;switch(a){case"i":case"ii":return ot(a.length,o);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return it(r.day(o,{width:"abbreviated",context:"formatting"})||r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"}),i);case"iiiii":return it(r.day(o,{width:"narrow",context:"formatting"}),i);case"iiiiii":return it(r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"}),i);case"iiii":default:return it(r.day(o,{width:"wide",context:"formatting"})||r.day(o,{width:"abbreviated",context:"formatting"})||r.day(o,{width:"short",context:"formatting"})||r.day(o,{width:"narrow",context:"formatting"}),i)}}validate(o,a){return a>=1&&a<=7}set(o,a,r){return o=$y(o,r),o.setHours(0,0,0,0),o}}class ky extends He{constructor(){super(...arguments);P(this,"priority",80);P(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(o,a,r){switch(a){case"a":case"aa":case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"})||r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})||r.dayPeriod(o,{width:"abbreviated",context:"formatting"})||r.dayPeriod(o,{width:"narrow",context:"formatting"})}}set(o,a,r){return o.setHours(Ka(r),0,0,0),o}}class By extends He{constructor(){super(...arguments);P(this,"priority",80);P(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(o,a,r){switch(a){case"b":case"bb":case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"})||r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})||r.dayPeriod(o,{width:"abbreviated",context:"formatting"})||r.dayPeriod(o,{width:"narrow",context:"formatting"})}}set(o,a,r){return o.setHours(Ka(r),0,0,0),o}}class Ty extends He{constructor(){super(...arguments);P(this,"priority",80);P(this,"incompatibleTokens",["a","b","t","T"])}parse(o,a,r){switch(a){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"})||r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})||r.dayPeriod(o,{width:"abbreviated",context:"formatting"})||r.dayPeriod(o,{width:"narrow",context:"formatting"})}}set(o,a,r){return o.setHours(Ka(r),0,0,0),o}}class Fy extends He{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["H","K","k","t","T"])}parse(o,a,r){switch(a){case"h":return tt(rt.hour12h,o);case"ho":return r.ordinalNumber(o,{unit:"hour"});default:return ot(a.length,o)}}validate(o,a){return a>=1&&a<=12}set(o,a,r){const i=o.getHours()>=12;return i&&r<12?o.setHours(r+12,0,0,0):!i&&r===12?o.setHours(0,0,0,0):o.setHours(r,0,0,0),o}}class Ay extends He{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(o,a,r){switch(a){case"H":return tt(rt.hour23h,o);case"Ho":return r.ordinalNumber(o,{unit:"hour"});default:return ot(a.length,o)}}validate(o,a){return a>=0&&a<=23}set(o,a,r){return o.setHours(r,0,0,0),o}}class Iy extends He{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["h","H","k","t","T"])}parse(o,a,r){switch(a){case"K":return tt(rt.hour11h,o);case"Ko":return r.ordinalNumber(o,{unit:"hour"});default:return ot(a.length,o)}}validate(o,a){return a>=0&&a<=11}set(o,a,r){return o.getHours()>=12&&r<12?o.setHours(r+12,0,0,0):o.setHours(r,0,0,0),o}}class Ey extends He{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(o,a,r){switch(a){case"k":return tt(rt.hour24h,o);case"ko":return r.ordinalNumber(o,{unit:"hour"});default:return ot(a.length,o)}}validate(o,a){return a>=1&&a<=24}set(o,a,r){const i=r<=24?r%24:r;return o.setHours(i,0,0,0),o}}class My extends He{constructor(){super(...arguments);P(this,"priority",60);P(this,"incompatibleTokens",["t","T"])}parse(o,a,r){switch(a){case"m":return tt(rt.minute,o);case"mo":return r.ordinalNumber(o,{unit:"minute"});default:return ot(a.length,o)}}validate(o,a){return a>=0&&a<=59}set(o,a,r){return o.setMinutes(r,0,0),o}}class Py extends He{constructor(){super(...arguments);P(this,"priority",50);P(this,"incompatibleTokens",["t","T"])}parse(o,a,r){switch(a){case"s":return tt(rt.second,o);case"so":return r.ordinalNumber(o,{unit:"second"});default:return ot(a.length,o)}}validate(o,a){return a>=0&&a<=59}set(o,a,r){return o.setSeconds(r,0),o}}class Oy extends He{constructor(){super(...arguments);P(this,"priority",30);P(this,"incompatibleTokens",["t","T"])}parse(o,a){const r=i=>Math.trunc(i*Math.pow(10,-a.length+3));return it(ot(a.length,o),r)}set(o,a,r){return o.setMilliseconds(r),o}}class Ry extends He{constructor(){super(...arguments);P(this,"priority",10);P(this,"incompatibleTokens",["t","T","x"])}parse(o,a){switch(a){case"X":return It(At.basicOptionalMinutes,o);case"XX":return It(At.basic,o);case"XXXX":return It(At.basicOptionalSeconds,o);case"XXXXX":return It(At.extendedOptionalSeconds,o);case"XXX":default:return It(At.extended,o)}}set(o,a,r){return a.timestampIsSet?o:nt(o,o.getTime()-po(o)-r)}}class jy extends He{constructor(){super(...arguments);P(this,"priority",10);P(this,"incompatibleTokens",["t","T","X"])}parse(o,a){switch(a){case"x":return It(At.basicOptionalMinutes,o);case"xx":return It(At.basic,o);case"xxxx":return It(At.basicOptionalSeconds,o);case"xxxxx":return It(At.extendedOptionalSeconds,o);case"xxx":default:return It(At.extended,o)}}set(o,a,r){return a.timestampIsSet?o:nt(o,o.getTime()-po(o)-r)}}class _y extends He{constructor(){super(...arguments);P(this,"priority",40);P(this,"incompatibleTokens","*")}parse(o){return Wc(o)}set(o,a,r){return[nt(o,r*1e3),{timestampIsSet:!0}]}}class Hy extends He{constructor(){super(...arguments);P(this,"priority",20);P(this,"incompatibleTokens","*")}parse(o){return Wc(o)}set(o,a,r){return[nt(o,r),{timestampIsSet:!0}]}}const Ly={G:new iy,y:new sy,Y:new ly,R:new cy,u:new dy,Q:new uy,q:new fy,M:new py,L:new my,w:new gy,I:new by,d:new Cy,D:new wy,E:new Ny,e:new Vy,c:new Sy,i:new Dy,a:new ky,b:new By,B:new Ty,h:new Fy,H:new Ay,K:new Iy,k:new Ey,m:new My,s:new Py,S:new Oy,X:new Ry,x:new jy,t:new _y,T:new Hy},Wy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qy=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zy=/^'([^]*?)'?$/,Gy=/''/g,Uy=/\S/,Yy=/[a-zA-Z]/;function Gc(t,n,o,a){var h,y,b,v;const r=ey(),i=r.locale??Ac,l=r.firstWeekContainsDate??((y=(h=r.locale)==null?void 0:h.options)==null?void 0:y.firstWeekContainsDate)??1,s=r.weekStartsOn??((v=(b=r.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0;if(n==="")return t===""?ut(o):nt(o,NaN);const p={firstWeekContainsDate:l,weekStartsOn:s,locale:i},c=[new ry],d=n.match(qy).map(x=>{const C=x[0];if(C in Ua){const w=Ua[C];return w(x,i.formatLong)}return x}).join("").match(Wy),u=[];for(let x of d){Hc(x)&&Ya(x,n,t),_c(x)&&Ya(x,n,t);const C=x[0],w=Ly[C];if(w){const{incompatibleTokens:N}=w;if(Array.isArray(N)){const D=u.find(k=>N.includes(k.token)||k.token===C);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${x}\` at the same time`)}else if(w.incompatibleTokens==="*"&&u.length>0)throw new RangeError(`The format string mustn't contain \`${x}\` and any other token at the same time`);u.push({token:C,fullToken:x});const V=w.run(t,x,i.match,p);if(!V)return nt(o,NaN);c.push(V.setter),t=V.rest}else{if(C.match(Yy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(x==="''"?x="'":C==="'"&&(x=Ky(x)),t.indexOf(x)===0)t=t.slice(x.length);else return nt(o,NaN)}}if(t.length>0&&Uy.test(t))return nt(o,NaN);const f=c.map(x=>x.priority).sort((x,C)=>C-x).filter((x,C,w)=>w.indexOf(x)===C).map(x=>c.filter(C=>C.priority===x).sort((C,w)=>w.subPriority-C.subPriority)).map(x=>x[0]);let g=ut(o);if(isNaN(g.getTime()))return nt(o,NaN);const m={};for(const x of f){if(!x.validate(g,p))return nt(o,NaN);const C=x.set(g,m,p);Array.isArray(C)?(g=C[0],Object.assign(m,C[1])):g=C}return nt(o,g)}function Ky(t){return t.match(zy)[1].replace(Gy,"'")}function Qa(t,n){const a=Jy(t);let r;if(a.date){const p=eb(a.date,2);r=tb(p.restDateString,p.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const i=r.getTime();let l=0,s;if(a.time&&(l=nb(a.time),isNaN(l)))return new Date(NaN);if(a.timezone){if(s=ob(a.timezone),isNaN(s))return new Date(NaN)}else{const p=new Date(i+l),c=new Date(0);return c.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),c.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),c}return new Date(i+l+s)}const ho={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Xy=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Qy=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Zy=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Jy(t){const n={},o=t.split(ho.dateTimeDelimiter);let a;if(o.length>2)return n;if(/:/.test(o[0])?a=o[0]:(n.date=o[0],a=o[1],ho.timeZoneDelimiter.test(n.date)&&(n.date=t.split(ho.timeZoneDelimiter)[0],a=t.substr(n.date.length,t.length))),a){const r=ho.timezone.exec(a);r?(n.time=a.replace(r[1],""),n.timezone=r[1]):n.time=a}return n}function eb(t,n){const o=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),a=t.match(o);if(!a)return{year:NaN,restDateString:""};const r=a[1]?parseInt(a[1]):null,i=a[2]?parseInt(a[2]):null;return{year:i===null?r:i*100,restDateString:t.slice((a[1]||a[2]).length)}}function tb(t,n){if(n===null)return new Date(NaN);const o=t.match(Xy);if(!o)return new Date(NaN);const a=!!o[4],r=An(o[1]),i=An(o[2])-1,l=An(o[3]),s=An(o[4]),p=An(o[5])-1;if(a)return lb(n,s,p)?ab(n,s,p):new Date(NaN);{const c=new Date(0);return!ib(n,i,l)||!sb(n,r)?new Date(NaN):(c.setUTCFullYear(n,i,Math.max(r,l)),c)}}function An(t){return t?parseInt(t):1}function nb(t){const n=t.match(Qy);if(!n)return NaN;const o=Za(n[1]),a=Za(n[2]),r=Za(n[3]);return cb(o,a,r)?o*Wa+a*La+r*1e3:NaN}function Za(t){return t&&parseFloat(t.replace(",","."))||0}function ob(t){if(t==="Z")return 0;const n=t.match(Zy);if(!n)return 0;const o=n[1]==="+"?-1:1,a=parseInt(n[2]),r=n[3]&&parseInt(n[3])||0;return db(a,r)?o*(a*Wa+r*La):NaN}function ab(t,n,o){const a=new Date(0);a.setUTCFullYear(t,0,4);const r=a.getUTCDay()||7,i=(n-1)*7+o+1-r;return a.setUTCDate(a.getUTCDate()+i),a}const rb=[31,null,31,30,31,30,31,31,30,31,30,31];function Uc(t){return t%400===0||t%4===0&&t%100!==0}function ib(t,n,o){return n>=0&&n<=11&&o>=1&&o<=(rb[n]||(Uc(t)?29:28))}function sb(t,n){return n>=1&&n<=(Uc(t)?366:365)}function lb(t,n,o){return n>=1&&n<=53&&o>=0&&o<=6}function cb(t,n,o){return t===24?n===0&&o===0:o>=0&&o<60&&n>=0&&n<60&&t>=0&&t<25}function db(t,n){return n>=0&&n<=59}function Ja(){const t=new Dc;function n(o,a){var i;if(!o||typeof o=="string"&&o.indexOf("0001")===0)return"";if(o instanceof Date)return vn(o,a);let r=Qa(o);if(r=="Invalid Date"&&(r=t.create(o)||new Date(o)),qa(r))return r=Qa(vn(r,"yyyy-MM-dd HH:mm:ss")),vn(r,a);if(a.indexOf("HH")===0||a.indexOf("hh")===0){const l=(i=o.match(/\d*/g))==null?void 0:i.filter(p=>p!=="").join(":");(a==="HH"||a==="hh")&&(a+=":mm");const s=Qa("2024-06-05 "+l);return vn(s,a)}return""}return{formatTo:n}}function ub(){function t(h,y=null){return Array.isArray(h)?Ae.max.apply(null,h).toFixed():h&&y?Ae.maximum(h,y).toFixed():(console.error("请提供比较的值firstValue、secondValue."),"")}function n(h,y=null){return Array.isArray(h)?Ae.min.apply(null,h).toFixed():h&&y?Ae.minimum(h,y).toFixed():(console.error("请提供比较的值firstValue、secondValue."),"")}function o(h){return Ae.sum.apply(null,h).toFixed()}function a(h,y){return new Ae(h).div(y).toFixed()}function r(h,y){return new Ae(h).plus(y).toFixed()}function i(h,y){return new Ae(h).times(y).toFixed()}function l(h,y){return new Ae(h).minus(y).toFixed()}function s(h,y){return new Ae(h).eq(y)}function p(h,y){return new Ae(h).lt(y)}function c(h,y){return new Ae(h).gt(y)}function d(h){return new Ae(h).toNumber()}function u(h,y=0){return new Ae(h).toFixed(y)}function f(h){const y=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),b=new Array("","拾","佰","仟"),v=new Array("","万","亿","兆"),x=new Array("角","分","毫","厘"),C="整",w="元",N=1e15;let V,D,k="",B;if(h=="")return"";const $=parseFloat(h);if($>=N)return"";if($===0)return k=y[0]+w+C,k;if(h=$.toString(),h.indexOf(".")===-1?(V=h,D=""):(B=h.split("."),V=B[0],D=B[1].substr(0,4)),parseInt(V,10)>0){let T=0;const S=V.length;for(let F=0;F<S;F++){const A=V.substr(F,1),E=S-F-1,I=E/4,R=E%4;A=="0"?T++:(T>0&&(k+=y[0]),T=0,k+=y[parseInt(A,10)]+b[R]),R==0&&T<4&&(k+=v[I])}k+=w}if(D!==""){const T=D.length;for(let S=0;S<T;S++){let F=D.substr(S,1);F!=="0"&&(k+=y[Number(F)]+x[S])}}return k===""?k+=y[0]+w+C:D===""&&(k+=C),k}function g(h,y){var b=h==null||typeof h=="number"&&isNaN(h)?"":String(h);return y&&(y.prefix&&(b=b.replace(new RegExp(y.prefix,"g"),"")),y.suffix&&(b=b.replace(new RegExp(y.suffix,"g"),"")),b=b.replace(/\,/g,"")),b}function m(h,y){const b=new Ae(h),v={prefix:y.prefix||"",suffix:y.suffix||"",decimalSeparator:y.decimalSeparator||".",groupSeparator:y.groupSeparator||"",groupSize:3};if(b.isNaN())return"";let x=y.precision||0;return x=Number(x),b.toFormat(x,v)}return{formatTo:m,removeFormat:g,convertCurrency:f,toFixed:u,toNumber:d,greaterThan:c,lessThan:p,equal:s,minus:l,multiplied:i,plus:r,average:a,sum:o,min:n,max:t}}const fb=["秒","分钟","小时","天","周","个月","年"],er=[60,60,24,7,365/7/12,12];function pb(){const t=new Dc;function n(l,s){if(s===0)return["刚刚","片刻后"];const p=fb[~~(s/2)];return[`${l} ${p}前`,`${l} ${p}后`]}function o(l){if(typeof l=="object")return l;{let s=t.create(l);return typeof s=="object"?s:new Date}}function a(l,s){return(+(s?o(s):new Date)-+o(l))/1e3}function r(l){const s=l<0?1:0;l=Math.abs(l);let p=0;for(;l>=er[p]&&p<er.length;p++)l/=er[p];return l=Math.floor(l),p*=2,l>(p===0?9:1)&&(p+=1),n(l,p)[s].replace("%s",l.toString())}function i(l,s){const p=a(l,s&&s.relativeDate);return r(p)}return{formatTo:i}}const mb=["moz","ms","webkit"];function hb(){let t=0;return n=>{const o=new Date().getTime(),a=Math.max(0,16-(o-t)),r=setTimeout(()=>{n(o+a)},a);return t=o+a,r}}function gb(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const t=mb.filter(n=>`${n}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:hb()}const yb=gb();function Yc(t,n,o,a){const r=e.ref(),i=e.ref(t.autocomplete),l=e.ref(t.enableTitle),{isPassword:s}=o,p=e.ref(t.minLength),c=e.ref(t.maxLength),d=e.ref(t.tabIndex),{disable:u,displayText:f,inputType:g,onBlur:m,onFocus:h,onInput:y,onClick:b,onKeydown:v,onKeyup:x,onMousedown:C,onTextBoxValueChange:w,readonly:N,placeholder:V,textBoxClass:D,textBoxTitle:k}=a;return e.onMounted(()=>{t.selectOnCreated&&r.value.select(),t.focusOnCreated&&r.value.focus()}),()=>e.createVNode("input",{ref:r,name:"input-group-value",autocomplete:i.value,class:D.value,disabled:u.value,maxlength:c.value,minlength:p.value,placeholder:V.value,readonly:N.value,tabindex:d.value,title:l.value&&!s.value?k.value:"",type:g.value,value:f.value,onBlur:m,onClick:b,onChange:w,onFocus:h,onInput:y,onKeydown:v,onKeyup:x,onMousedown:C},null)}function Kc(t,n,o,a,r){const{appendedButtonClass:i,appendedContent:l}=o,s=e.computed(()=>t.showButtonWhenDisabled&&(!t.editable||!t.readonly)&&!t.disabled),p=e.computed(()=>l.value&&!n.slots.groupTextTemplate),c=e.computed(()=>!!n.slots.groupTextTemplate),{clearButtonClass:d,clearButtonStyle:u,onClearValue:f,shouldShowClearButton:g}=a;function m(){return e.createVNode("span",{id:"clearIcon",class:d.value,style:u.value,onClick:V=>f(V)},[e.createVNode("i",{class:"f-icon modal_close"},null)])}function h(V){n.emit("iconMouseEnter",V)}function y(V){n.emit("iconMouseLeave",V)}function b(V){s.value&&n.emit("clickHandle",{originalEvent:V}),V.stopPropagation()}const v=t.isPassword?r.onClickAppendedButton:b;function x(){return e.createVNode("span",{class:"input-group-text",onMouseenter:V=>h(V),onMouseleave:V=>y(V),innerHTML:l.value,onClick:V=>v(V)},null)}function C(){return n.slots.groupTextTemplate&&n.slots.groupTextTemplate()}function w(){return p.value?x:c.value?C:""}const N=w();return()=>e.createVNode("div",{class:i.value},[g.value&&m(),N&&N()])}function bb(t,n){const o=e.computed(()=>t.useExtendInfo&&!!t.extendInfo),a=e.reactive({content:t.extendInfo});function r(){n.emit("updateExtendInfo")}return()=>o.value&&e.withDirectives(e.createVNode("span",{class:"input-group-before-tips",onMouseenter:r},[e.createVNode("i",{class:"f-icon f-icon-info-circle"},null),e.createVNode("b",{class:"tips-arrow"},null)]),[[e.resolveDirective("tooltip"),a]])}const go=e.defineComponent({name:"FInputGroup",props:Ha,emits:["clear","change","blur","click","clickHandle","focus","input","keydown","keyup","iconMouseEnter","iconMouseLeave","update:modelValue","update:value","updateExtendInfo"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.modelValue),r=Sc(t,n,o,a),{inputGroupClass:i,inputType:l,inputGroupStyle:s}=r,p=Nc(t),{shouldShowAppendedButton:c}=p,d=$c(t,n,r),{onMouseEnter:u,onMouseLeave:f}=d,g=Vc(t,n,l,p),m=Yc(t,n,g,r),h=Kc(t,n,p,d,g),y=bb(t,n);return e.watch(()=>[t.value],([b])=>{o.value=b,a.value=b}),e.onMounted(()=>{t.value&&(o.value=t.value,a.value=t.value)}),()=>e.createVNode("div",{id:"inputGroup",class:i.value,style:s.value,onMouseenter:u,onMouseleave:f},[y(),m(),c.value&&h()])}}),vb=new Map([["appearance",xe]]),xb={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/component.schema.json",title:"component",description:"A Farris Visual Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"component"},componentType:{description:"The type string of Section component",type:"string"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]};function Cb(t,n,o){return n}const wb={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},tr={customClass:{type:String,default:""},componentType:{type:String,default:""}},Xc=me(tr,xb,vb,Cb,wb),nr=e.defineComponent({name:"FComponent",props:tr,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}});function Qc(t,n){const o=zt();let a=!1,r,i=!1;const l=!1;function s(){return!1}function p(){return l||!i}function c(){return!i}function d(){i=!1;const f=t,g=f.appearance&&f.appearance.class||"",m=g.split(" "),h=f.contents||[],y=h.length?h[0]:null,b=y&&y.appearance?y.appearance.class:"",v=b?b.split(" "):[],x=h.length?h.reduce((B,$)=>{const T=$&&$.appearance?$.appearance.class:"",S=T?T.split(" "):[];return B.push(...S),B},[]):[],C=n,w=C&&C.appearance&&C.appearance.class||"",N=w?w.split(" "):[];r={componentClass:g,componentClassList:m,childContents:h,firstChildContent:y,firstChildClass:b,firstChildClassList:v,parent:C,parentClass:w,parentClassList:N,children:h,childrenClassList:x};const{canAccept:V,fixed:D,hidePadding:k}=o.getRuleValue(m[0],r);return a=k,i=D,!0}function u(){return a}return{canAccepts:s,checkCanDeleteComponent:p,checkCanMoveComponent:c,resolveComponentContext:d,hideNestedPaddingInDesginerView:u}}const Nb=e.defineComponent({name:"FComponetDesign",props:tr,emits:[],setup(t,n){var l;const o=e.ref(),a=e.inject("design-item-context"),r=Qc(a.schema,(l=a.parent)==null?void 0:l.schema),i=ve(o,a,r);return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{ref:o,class:"drag-container","data-dragref":`${a.schema.id}-container`},[n.slots.default&&n.slots.default()])}}),Zc={install(t){t.component(nr.name,nr)},register(t,n){t.component=nr,n.component=Xc},registerDesigner(t,n){t.component=Nb,n.component=Xc}},Vb=new Map([["appearance",xe]]),Sb={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/content-container.schema.json",title:"content-container",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"content-container"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},$b={title:"content-container",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"container",enum:[]}}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}},isScrollspyContainer:{description:"是否为被监听页面滚动的容器",title:"被监听滚动的容器",type:"boolean",defaultValue:!1},scrollOffset:{description:"滚动时每个节点的偏移量",title:"节点偏移量(px)",type:"number",visible:!0,decimals:0,min:0,defaultValue:0},isScrollCollapsibleArea:{description:"是否为滚动收折父容器",title:"滚动收折父容器",type:"boolean",defaultValue:!1,readonly:!1},isScrollArea:{description:"是否为滚动收折父容器下的滚动区域",title:"滚动收折父容器下的滚动区域",type:"boolean",default:!1,readonly:!0}}}}};function Db(t,n,o){return n}const or={customClass:{type:String,default:""}},Jc=me(or,Sb,Vb,Db,$b),ar=e.defineComponent({name:"FContentContainer",props:or,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}});function kb(t,n){const o=zt(),a=e.ref(!1),r=e.ref(!1);let i=!0,l=!1,s,p=!1;function c(x){return s&&s.componentClassList&&s.componentClassList.includes("f-form-layout")&&s.componentClassList.includes("farris-form")?x.sourceType==="control"&&x.controlCategory==="input"||x.sourceType==="move"&&x.controlType==="form-group":!0}function d(x){return!(!qt().basalDragulaRuleForContainer(x)||!i||!c(x))}function u(){a.value=!1,r.value=!1;const x=t,C=x.appearance&&x.appearance.class||"",w=C.split(" "),N=x.contents||[],V=N.length?N[0]:null,D=V&&V.appearance?V.appearance.class:"",k=D?D.split(" "):[],B=N.length?N.reduce((I,R)=>{const O=R&&R.appearance?R.appearance.class:"",G=O?O.split(" "):[];return I.push(...G),I},[]):[],$=n,T=$&&$.appearance&&$.appearance.class||"",S=T?T.split(" "):[];s={componentClass:C,componentClassList:w,childContents:N,firstChildContent:V,firstChildClass:D,firstChildClassList:k,parent:$,parentClass:T,parentClassList:S,children:N,childrenClassList:B};const{canAccept:F,fixed:A,hidePadding:E}=o.getRuleValue(w[0],s);return i=F,l=E,p=A,!0}function f(x){e.nextTick()}function g(){return t.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function m(x,C){const w=t;if((w.appearance&&w.appearance.class||"").split(" ").includes("f-form-layout")){const{label:D}=x,k=mt("form-group");return k.editor=C,k.label=D,k}return C}function h(x,C,w){const N=t;if((N.appearance&&N.appearance.class||"").split(" ").includes("f-form-layout")){const k=String(x.innerText),B=mt("form-group");return B.editor=w,B.label=k,B}return w}function y(){return!p}function b(){return!p}function v(){return l}return{canAccepts:d,resolveComponentContext:u,getStyles:g,onAcceptNewChildElement:h,onAcceptMovedChildElement:f,onResolveNewComponentSchema:m,triggerBelongedComponentToMoveWhenMoved:a,triggerBelongedComponentToDeleteWhenDeleted:r,checkCanMoveComponent:y,checkCanDeleteComponent:b,hideNestedPaddingInDesginerView:v}}const Bb=e.defineComponent({name:"FContentContainerDesign",props:or,emits:[],setup(t,n){var l;const o=e.ref(),a=e.inject("design-item-context"),r=kb(a.schema,(l=a.parent)==null?void 0:l.schema),i=ve(o,a,r);return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{ref:o,class:"drag-container","data-dragref":`${a.schema.id}-container`},[n.slots.default&&n.slots.default()])}}),ed={install(t){t.component(ar.name,ar)},register(t,n,o){t["content-container"]=ar,n["content-container"]=Jc},registerDesigner(t,n,o){t["content-container"]=Bb,n["content-container"]=Jc}},yo=["日","一","二","三","四","五","六"];var Ct=(t=>(t[t.previous=1]="previous",t[t.current=2]="current",t[t.next=3]="next",t))(Ct||{});const Tb={dates:{Type:Array,default:[]},daysInWeek:{Type:Array,default:yo},enableKeyboadNavigate:{Type:Boolean,default:!0},enableMarkCurrent:{Type:Boolean,default:!0},enablePeriod:{Type:Boolean,default:!1},firstDayOfTheWeek:{Type:Boolean,default:"Sun."},selected:{Type:Object,default:null},selectedPeriod:{Type:Object,default:null},selectedWeek:{Type:Object,default:null},selectMode:{Type:String,default:"day"},showWeekNumber:{Type:Boolean,default:!1},weekTitle:{Type:String,default:"Week"}};var Et=(t=>(t[t.enter=13]="enter",t[t.esc=27]="esc",t[t.space=32]="space",t[t.leftArrow=37]="leftArrow",t[t.upArrow=38]="upArrow",t[t.rightArrow=39]="rightArrow",t[t.downArrow=40]="downArrow",t[t.tab=9]="tab",t[t.shift=16]="shift",t))(Et||{});function rr(){function t(n){const o=n.key||n.keyCode;return o==="Enter"||o===13?13:o==="Escape"||o===27?27:o===" "||o===32?32:o==="ArrowLeft"||o===37?37:o==="ArrowUp"||o===38?38:o==="ArrowRight"||o===39?39:o==="ArrowDown"||o===40?40:o==="Tab"||o===9?9:o==="Shift"||o===16?16:-1}return{getKeyCodeFromEvent:t}}function Ut(){function t(){return{year:0,month:0,day:0}}function n(d){return new Date(d.year||0,d.month?d.month-1:0,d.day||0,d.hour?d.hour:0,d.minute?d.minute:0,d.second?d.second:0,0)}function o(d){const u=new Date;return d.year||(d.year=u.getFullYear()),d.month||(d.month=u.getMonth()+1),d.day||(d.day=1),new Date(d.year,d.month-1,d.day,d.hour?d.hour:0,d.minute?d.minute:0,d.second?d.second:0,0)}function a(d){return new Date(d.year||1,(d.month||1)-1,d.day,d.hour?d.hour:0,d.minute?d.minute:0,d.second?d.second:0,0).getDay()}function r(d){return yo.indexOf(d)}function i(d){return n(d).getTime()}function l(d){return Math.round(i(d)/1e3)}function s(d,u,f){const g=i(u),m=i(f),h=i(d);return m-h>h-g?u:f}function p(){const d=new Date;return{year:d.getFullYear(),month:d.getMonth()+1,day:d.getDate(),hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds()}}function c(d,u){const f=u.match(/[^(DdMmYy)]{1,}/g),g={};if(f){let m=f[0];f[0]!==f[1]&&(m=f[0]+f[1],f[2]&&f[1]!==f[2]&&(m+=f[2]));const h=new RegExp("["+m+"]"),y=d.split(h),b=u.split(h);for(let v=0;v<b.length;v++)b[v].indexOf("yyyy")!==-1&&(g.year=Number(y[v])),b[v].indexOf("M")!==-1&&(g.month=Number(y[v]||"1")),b[v].indexOf("d")!==-1&&(g.day=Number(y[v]||"1"))}else{const m=(u+"").indexOf("yyyy"),h=(u+"").indexOf("MM"),y=(u+"").indexOf("dd");if(m>=0){const b=d.substring(m,m+4);g.year=Number(b)}h>=0&&(g.month=Number(d.substring(h,h+2)||"1")),y>=0&&(g.day=Number(d.substring(y,y+2)||"01"))}return g}return{emptyDate:t,getDate:n,getDate2:o,getDayNumber:a,getEpocTime:l,getNearDate:s,getWeekdayIndex:r,getTimeInMilliseconds:i,getToday:p,getDateObject:c}}function In(){const{getTimeInMilliseconds:t}=Ut();function n(u){return u&&u.year!==0&&u.month!==0&&u.day!==0}function o(u){return u&&u.year!==0&&u.month!==0}function a(u){return u&&u.year!==0}function r(u,f){return t(u)<t(f)}function i(u,f){return t(u)<=t(f)}function l(u,f){return t(u)===t(f)}function s(u,f){const g=t(f);return t(u.from)===g||t(u.to)===g}function p(u,f){return!f||!n(f.to)||!n(f.from)?!1:i(f.from,u)&&i(u,f.to)}function c(u,f){return n(f)&&t(u)>=t(f)}function d(u,f){return n(f)&&t(u)<=t(f)}return{isDateEarlier:r,equal:l,inPeriod:p,isPoint:s,equalOrEarlier:i,isInitializedDate:n,isInitializedMonth:o,isInitializedYear:a,isMonthDisabledByDisableSince:c,isMonthDisabledByDisableUntil:d}}const ir=e.defineComponent({name:"FDatePickerCalendarView",props:Tb,emits:["click","clickWeek","keyDown","mouseEnter","mouseLeave"],setup(t,n){const o=e.ref(t.dates),a=e.ref(t.daysInWeek),r=e.ref(t.enableKeyboadNavigate),i=e.ref(t.enableMarkCurrent),l=e.ref(t.enablePeriod),s=e.ref(t.firstDayOfTheWeek),p=e.ref(t.selected),c=e.ref(t.selectedPeriod),d=e.ref(t.selectedWeek),u=e.ref(t.selectMode),f=e.ref(t.showWeekNumber),g=e.ref(t.weekTitle),m=e.computed(()=>f.value&&s.value==="Mon");e.watch(()=>t.dates,()=>{o.value=t.dates}),e.watch(()=>t.selected,()=>{p.value=t.selected});const{equal:h,inPeriod:y,isInitializedDate:b,equalOrEarlier:v,isPoint:x}=In(),{getKeyCodeFromEvent:C}=rr(),w=I=>{const R=!!d.value&&I.numberInTheYear===d.value.numberInTheYear&&I.year===d.value.year;return{"f-datepicker-selectWeek":u.value==="week","f-datepicker-selectedWeek":u.value==="week"&&R}},N=e.computed(()=>f.value&&s.value==="Mon");function V(I){return y(I,c.value)}function D(I){return!!c.value&&x(c.value,I)}function k(I){return!!p.value&&h({year:p.value.year,month:p.value.month,day:p.value.day},I)}const B=(I,R,O)=>{const G=u.value!=="week"&&I.tag===Ct.current&&(l.value&&V(I.date)&&!D(I.date)||I.range),M=I.tag===Ct.previous||I.tag===Ct.next,j={"f-datepicker-range":G,"f-datepicker-no-currmonth":M,"f-datepicker-disabled":I.disable,"f-datepicker-singledate":!I.disable},H=`d_${R}_${O}`;return j[H]=!0,j},$=I=>{const R=u.value!=="week"&&I.tag===Ct.current&&(!l.value&&k(I.date)||l.value&&D(I.date)),O=I.isCurrent&&i.value,G=I.highlight&&(I.tag===Ct.previous||I.tag===Ct.next||I.disable);return{"f-datepicker-date":!0,"f-datepicker-selected":R,"f-datepicker-current":O,"f-datepicker-opacity":G,"f-datepicker-highlight":I.highlight,"f-datepicker-disabled":I.disable}};function T(I,R){R.disable||u.value==="week"||(I.stopPropagation(),n.emit("click",R.date))}function S(I,R){u.value==="week"&&(I.stopPropagation(),n.emit("clickWeek",R))}function F(I,R){const O=C(I);O!==Et.tab&&(I.preventDefault(),O===Et.enter||O===Et.space?T(I,R):r.value&&n.emit("keyDown",R.date))}function A(I){c.value&&b(c.value.from)&&!b(c.value.to)&&(o.value.forEach(R=>{R.days.forEach(O=>{O.range=!!c.value&&(v(c.value.from,O.date)&&v(O.date,I.date)||v(O.date,c.value.from)&&v(I.date,O.date))})}),n.emit("mouseEnter",I.date))}function E(){o.value.forEach(I=>{I.days.forEach(R=>{R.range=!1})}),n.emit("mouseLeave")}return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-datepicker-table-wrapper"},[e.createVNode("table",{class:"f-datepicker-table",cellpadding:"0"},[e.createVNode("thead",null,[e.createVNode("tr",null,[m.value&&e.createVNode("th",{class:"f-datepicker-weeknbr-title"},[g.value]),a.value&&a.value.map(I=>e.createVNode("th",{scope:"col",style:"padding-bottom: 8px;padding-top: 4px"},[I]))])]),e.createVNode("tbody",null,[o.value&&o.value.map((I,R)=>e.createVNode("tr",{class:w(I),onClick:O=>S(O,I)},[N.value&&e.createVNode("td",{class:"f-datepicker-weeknbr"},[e.createVNode("div",{class:"f-datepicker-date"},[I.numberInTheYear])]),I.days&&I.days.map((O,G)=>e.createVNode("td",{id:`d_${R}_${G}`,tabindex:"0",class:B(O,R,G),onClick:M=>T(M,O),onKeydown:M=>F(M,O),onMouseenter:()=>A(O),onMouseleave:()=>E()},[O.marked&&O.marked.marked&&e.createVNode("span",{class:"f-datepicker-markdate",style:{"background-color":O.marked.color}},null),e.createVNode("div",{class:$(O)},[O.date.day])]))]))])])])])}}),Fb={activeMonth:{type:Object,require:!0},ariaLabelPrevMonth:{type:String,default:""},ariaLabelNextMonth:{type:String,default:""},dateFormat:{type:String,default:"yyyy-MM-dd"},disablePrePage:{type:Boolean,default:!1},disablePreRecord:{type:Boolean,default:!1},disableNextRecord:{type:Boolean,default:!1},disableNextPage:{type:Boolean,default:!1},years:{type:Array,default:[[{}]]},selectingMonth:{type:Boolean,default:!1},selectingYear:{type:Boolean,default:!1},selectMode:{type:String,default:"day"}},sr=e.defineComponent({name:"FDatePickerCalendarNavbar",props:Fb,emits:["clickMonth","clickYear","prePage","preRecord","nextRecord","nextPage"],setup(t,n){return()=>{const o=e.ref(t.ariaLabelPrevMonth),a=e.ref(t.ariaLabelNextMonth),r=e.ref(t.dateFormat),i=e.ref(t.disablePrePage),l=e.ref(t.disablePreRecord),s=e.ref(t.disableNextRecord),p=e.ref(t.disableNextPage),c=e.ref(t.activeMonth),d=e.ref(t.years),u=e.ref(t.selectingMonth),f=e.ref(t.selectingYear),g=e.ref(t.selectMode),m=e.ref(!0),h=e.ref(!0);e.watch(()=>t.activeMonth,()=>{var I,R,O,G;c.value={month:(I=t.activeMonth)==null?void 0:I.month,year:(R=t.activeMonth)==null?void 0:R.year,displayTextOfMonth:(O=t.activeMonth)==null?void 0:O.displayTextOfMonth,displayTextOfYear:(G=t.activeMonth)==null?void 0:G.displayTextOfMonth}});const y=e.computed(()=>({"f-datepicker-header":!0,monthYearSelBarBorder:u.value||f.value})),b=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":i.value})),v=e.computed(()=>!u.value&&!f.value),x=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":l.value})),C=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":s.value})),w=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":p.value})),N=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-yearLabel":m.value,"f-datepicker-labelBtnNotEdit":!m.value})),V=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-monthLabel":h.value,"f-datepicker-labelBtnNotEdit":!h.value})),D=e.computed(()=>{const I=r.value?r.value.indexOf("yyyy"):0,R=r.value?r.value.indexOf("MM"):0;return I>R?"MM-yyyy":"yyyy-MM"});function k(I){I.stopPropagation(),n.emit("prePage")}function B(I){I.stopPropagation(),n.emit("preRecord")}function $(I){I.stopPropagation(),n.emit("clickYear")}function T(I){I.stopPropagation(),n.emit("clickMonth")}function S(I){I.stopPropagation(),n.emit("nextRecord")}function F(I){I.stopPropagation(),n.emit("nextPage")}function A(){return e.createVNode("button",{type:"button",class:N.value,onClick:I=>{m.value&&$(I)},tabindex:m.value?"0":"-1",disabled:g.value==="year"},[f.value?d.value.length>3?d.value[0][1].year+" - "+d.value[3][1].year:"":c.value.displayTextOfYear])}function E(){return!f.value&&g.value!=="month"&&e.createVNode("button",{type:"button",class:V.value,onClick:I=>{h.value&&T(I)},tabindex:h.value?"0":"-1"},[c.value.displayTextOfMonth])}return e.createVNode("div",{class:y.value},[e.createVNode("div",{class:"f-datepicker-prev-btn"},[e.createVNode("button",{type:"button",class:b.value,onClick:k},[e.createVNode("i",{class:"f-icon f-icon-arrow-double-60-left"},null)]),v.value&&e.createVNode("button",{type:"button","aria-label":o.value,class:x.value,onClick:B},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-left"},null)])]),e.createVNode("div",{class:"f-datepicker-monthYearText"},[D.value==="yyyy-MM"?[A(),E()]:[E(),A()]]),e.createVNode("div",{class:"f-datepicker-next-btn"},[v.value&&e.createVNode("button",{type:"button","aria-label":a.value,class:C.value,onClick:S},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right"},null)]),e.createVNode("button",{type:"button",class:w.value,onClick:F},[e.createVNode("i",{class:"f-icon f-icon-arrow-double-60-right"},null)])])])}}}),td={1:"一月",2:"二月",3:"三月",4:"四月",5:"五月",6:"六月",7:"七月",8:"八月",9:"九月",10:"十月",11:"十一月",12:"十二月"},nd=new Map([["appearance",xe]]);function od(t,n,o){return n}const Ab={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/date-view.schema.json",title:"date-view",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for date picker",type:"string"},type:{description:"The type string of date picker",type:"string",default:"date-view"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},disable:{type:"string",default:!1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Ib={title:"date-view",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{visible:{description:"",title:"可见",type:"boolean"}}}}},ad={top:{type:Number,default:0},left:{type:Number,default:0},position:{type:String,default:"bottom"},enablePeriod:{type:Boolean,default:!1},dateFormat:{type:String,default:"yyyy-MM-dd"},valueFormat:{type:String,default:"yyyy-MM-dd"},dates:{type:Array,default:[]},daysInWeek:{type:Array,default:yo},disableDates:{Type:Array,default:[]},disablePeriod:{Type:Array,default:[]},disableSince:{Type:Object,default:{year:0,month:0,day:0}},disableWeekdays:{Type:Array,default:[]},disableWeekends:{Type:Boolean,default:!1},disableUntil:{Type:Object,default:{year:0,month:0,day:0}},enableKeyboadNavigate:{type:Boolean,default:!0},enableMarkCurrent:{type:Boolean,default:!0},firstDayOfTheWeek:{type:String,default:"Sun."},highlightDates:{Type:Array,default:[]},highlightSaturday:{Type:Boolean,default:!1},highlightSunday:{Type:Boolean,default:!1},maxYear:{Type:Number,default:2500},minYear:{Type:Number,default:1},mode:{Type:String,default:"Embedded"},months:{type:Array,default:[[]]},nameOfMonths:{Type:Object,default:td},secondaryDates:{type:Array,default:[]},secondaryMonths:{type:Array,default:[[]]},selectedDate:{type:Object,default:null},selectedMonth:{type:Object,default:null},selectedPeriod:{type:Object,default:null},selectedWeek:{type:Object,default:null},selectMode:{type:String,default:"day"},showWeekNumber:{type:Boolean,default:!1},weekTitle:{type:String,default:"Week"},years:{Type:Array,default:[[]]},value:{type:String,default:null}},rd=me(ad,Ab,nd,od,Ib),Eb={months:{Type:Array,default:[[]]},enableMarkCurrent:{Type:Boolean,default:!1},enableKeyboadNavigate:{Type:Boolean,default:!0},enablePeriod:{Type:Boolean,default:!1},selected:{Type:Object,default:null},selectedPeriod:{Type:Object,default:null}},lr=e.defineComponent({name:"FDatePickerMonthView",props:Eb,emits:["click","keyDown","mouseEnter","mouseLeave"],setup(t,n){const o=e.ref(t.months),a=e.ref(t.enableMarkCurrent),r=e.ref(t.enableKeyboadNavigate),i=e.ref(t.enablePeriod),l=e.ref(t.selected),s=e.ref(t.selectedPeriod),{equal:p,inPeriod:c,isInitializedDate:d,equalOrEarlier:u}=In(),{getKeyCodeFromEvent:f}=rr();e.watch(()=>t.months,()=>{o.value=t.months}),e.watch(()=>t.selected,()=>{l.value=t.selected});function g(w,N){w.stopPropagation(),!N.disable&&n.emit("click",N)}function m(w,N){const V=f(w);V!==Et.tab&&(w.preventDefault(),V===Et.enter||V===Et.space?g(w,N):r.value&&n.emit("keyDown",N))}function h(w){s.value&&d(s.value.from)&&!d(s.value.to)&&(o.value.forEach(N=>{N.forEach(V=>{V.range=!!s.value&&(u(s.value.from,V.date)&&u(V.date,w.date)||u(V.date,s.value.from)&&u(w.date,V.date))})}),n.emit("mouseEnter",w))}function y(){o.value.forEach(w=>{w.forEach(N=>{N.range=!1})}),n.emit("mouseLeave")}function b(w){return!!l.value&&p({year:l.value.year,month:l.value.month},{year:w.year,month:w.month})}function v(w){return!!s.value&&(p({year:s.value.from.month},w)||p({year:s.value.to.month},w))}function x(w){return c(w,s.value)}const C=w=>({"f-datepicker-month-cell":!0,"f-datepicker-current":w.isCurrent&&a.value,"f-datepicker-selected":!i.value&&b(w.date)||i.value&&v(w.date),"f-datepicker-disabled":w.disable,"f-datepicker-range":x(w.date)||w.range});return()=>e.createVNode("div",{class:"f-datepicker-table-wrapper"},[e.createVNode("table",{class:"f-datepicker-table"},[e.createVNode("tbody",null,[o.value&&o.value.map((w,N)=>e.createVNode("tr",null,[w.map((V,D)=>e.createVNode("td",{id:`m_${N}_${D}`,class:`m_${N}_${D}`,onClick:k=>g(k,V),onKeydown:k=>m(k,V),onMouseenter:()=>h(V),onMouseleave:()=>y(),tabindex:"0",style:"width: 33.3%"},[e.createVNode("div",{class:"f-datepicker-month"},[e.createVNode("span",{class:C(V)},[V.displayText])])]))]))])])])}}),Mb={years:{Type:Array,default:[[]]},enableKeyboadNavigate:{Type:Boolean,default:!0},enableMarkCurrent:{Type:Boolean,default:!0},enablePeriod:{Type:Boolean,default:!1},selected:{Type:Object,default:null},selectedPeriod:{Type:Object,default:null}},cr=e.defineComponent({name:"FDatePickerYearView",props:Mb,emits:["click","keyDown","mouseEnter","mouseLeave"],setup(t,n){const o=e.ref(t.years),a=e.ref(t.enableMarkCurrent),r=e.ref(t.enableKeyboadNavigate),i=e.ref(t.enablePeriod),l=e.ref(t.selected),s=e.ref(t.selectedPeriod),{equal:p,inPeriod:c,isInitializedDate:d,equalOrEarlier:u}=In(),{getKeyCodeFromEvent:f}=rr();e.watch(()=>t.years,()=>{o.value=t.years}),e.watch(()=>t.selected,()=>{l.value=t.selected});const g=(N,V)=>{const D=`y_${N}_${V}`,k={"f-datepicker-no-currmonth":N===0&&V===0||N===3&&V===2};return k[D]=!0,k};function m(N){return c(N,s.value)}function h(N){return!!l.value&&p({year:l.value.year},N)}function y(N){return!!s.value&&(p({year:s.value.from.year},N)||p({year:s.value.to.year},N))}const b=N=>({"f-datepicker-year-cell":!0,"f-datepicker-current":N.isCurrent&&a.value,"f-datepicker-selected":!s.value&&h(N.date)||i.value&&y(N.date),"f-datepicker-disabled":N.disable,"f-datepicker-range":m(N.date)||N.range});function v(N,V){N.stopPropagation(),!V.disable&&n.emit("click",V)}function x(N,V){const D=f(N);D!==Et.tab&&(N.preventDefault(),D===Et.enter||D===Et.space?v(N,V):r.value&&n.emit("keyDown",V))}function C(N){s.value&&d(s.value.from)&&!d(s.value.to)&&(o.value.forEach(V=>{V.forEach(D=>{D.range=!!s.value&&(u(s.value.from,D.date)&&u(D.date,N.date)||u(D.date,s.value.from)&&u(N.date,D.date))})}),n.emit("mouseEnter",N))}function w(){o.value.forEach(N=>{N.forEach(V=>{V.range=!1})}),n.emit("mouseLeave")}return()=>e.createVNode("table",{class:"f-datepicker-table-wrapper"},[e.createVNode("tbody",{class:"f-datepicker-table"},[o.value&&o.value.map((N,V)=>e.createVNode("tr",null,[N.map((D,k)=>e.createVNode("td",{id:"y_{yi}_{i}",class:g(V,k),onClick:B=>v(B,D),onKeydown:B=>x(B,D),onMouseenter:()=>C(D),onMouseleave:()=>w(),tabindex:"0"},[e.createVNode("div",{class:"f-datepicker-year"},[e.createVNode("span",{class:b(D)},[D.year])])]))]))])])}});function dr(){function t(r){return new Date(r.year||0,(r.month||1)-1,r.day,r.hour?r.hour:0,r.minute?r.minute:0,r.second?r.second:0,0).getDay()}function n(r){if(!r)return 1;if(!/^\d+$/.test(r.value))return-1;let i=Number(r.value);return(r.format.length===1&&r.value.length!==1&&i<10||r.format.length===1&&r.value.length!==2&&i>=10||r.format.length===2&&r.value.length>2)&&(i=-1),i}function o(r,i){if(r.value){for(let l=1;l<=12;l++)if(r.value.toLowerCase()===i[l].toLowerCase())return l}return-1}function a(r){const i=new Date(r.year||0,(r.month||1)-1,r.day,0,0,0,0);return i.setDate(i.getDate()+(i.getDay()===0?-3:4-i.getDay())),Math.round((i.getTime()-new Date(i.getFullYear(),0,4).getTime())/864e5/7)+1}return{getNumberByValue:n,getDayNumber:t,getMonthNumberByMonthName:o,getWeekNumber:a}}function Pb(t,n,o,a,r,i,l,s){const{getTimeInMilliseconds:p,getWeekdayIndex:c}=Ut(),{isInitializedDate:d}=In(),{getDayNumber:u}=dr();function f(g){if(g.year&&g.year<t&&g.month===12||g.year&&g.year>n&&g.month===1)return!0;const m=p(g);if(d(a)&&m+24*60*60*1e3-1<p(a)||d(o)&&m>p(o))return!0;if(l){const y=u(g);if(y===0||y===6)return!0}const h=u(g);return!!(s.length>0&&s.find(b=>c(b)===h)||r.length>0&&r.find(b=>(b.year===0||b.year===g.year)&&(b.month===0||b.month===g.month)&&b.day===g.day)||i.length>0&&i.find(b=>d(b.from)&&d(b.to)&&m>=p(b.from)&&m<=p(b.to)))}return{isDisabledDate:f}}function Ob(){const{getDayNumber:t}=dr();function n(a,r,i){let l=[];l=r.reduce((p,c)=>{const d=c.dates.map(u=>({date:u,color:c.color}));return[...p,...d]},l);const s=l.find(p=>(p.date.year===0||p.date.year===a.year)&&(p.date.month===0||p.date.month===a.month)&&p.date.day===a.day);if(s)return{marked:!0,color:s.color};if(i&&i.marked){const p=t(a);if(p===0||p===6)return{marked:!0,color:i.color}}return{marked:!1,color:""}}function o(a,r,i,l){const s=t(a);return r&&s===0||i&&s===6?!0:!!l.find(c=>(c.year===0||c.year===a.year)&&(c.month===0||c.month===a.month)&&c.day===a.day)}return{isHighlightedDate:o,isMarkedDate:n}}function id(){const{getTimeInMilliseconds:t}=Ut(),{isInitializedDate:n}=In();function o(r,i){return n(i)&&t(r)<=t(i)}function a(r,i){return n(i)&&t(r)>=t(i)}return{isMonthDisabledByDisableSince:a,isMonthDisabledByDisableUntil:o}}function ur(){const{getToday:t}=Ut(),{isMonthDisabledByDisableSince:n,isMonthDisabledByDisableUntil:o}=id();function a(d){const u={displayTextOfMonth:"",month:0,year:0,displayTextOfYear:""};if(d){const f=d.match(/[^0-9]/),g=f&&f.length?f[0]:"",m=d.split(g);u.month=m[0].length===2?Number(m[0]):Number(m[1]),u.year=m[0].length===2?Number(m[1]):Number(m[0])}return u}function r(d,u){return new Date(u,d,0).getDate()}function i(d,u,f){return new Date(d,u-1,f,0,0,0,0)}function l(d,u){const f=i(u,d,1);return f.setMonth(f.getMonth()-1),r(f.getMonth()+1,f.getFullYear())}function s(d,u,f,g){const m=t(),h=[],{year:y}=u,b=3;for(let v=1;v<=12;v+=b){const x=[];for(let C=v;C<v+b;C++){const w=n({year:y,month:C,day:1},f)||o({year:y,month:C,day:r(C,y||0)},g);x.push({month:C,displayText:d[C],isCurrent:C===m.month&&y===m.year,disable:w,date:{year:y,month:C}})}h.push(x)}return h}function p(d,u){const f={year:d===12?u+1:u},g=d===12?1:d+1;return f.month=g,f}function c(d,u){const f={year:d===1?u-1:u},g=d===1?12:d-1;return f.month=g,f}return{daysInMonth:r,daysInPreMonth:l,generateMonths:s,parseDefaultMonth:a,getNextMonth:p,getPreviousMonth:c}}function Rb({isDisabledDate:t}){const{getToday:n}=Ut(),{daysInMonth:o,daysInPreMonth:a,getNextMonth:r,getPreviousMonth:i}=ur(),{isHighlightedDate:l,isMarkedDate:s}=Ob(),{getWeekNumber:p}=dr();function c(g){const m=yo.indexOf(g);return m>0?7-m:0}function d(g,m,h){const y=new Date;y.setDate(1),y.setMonth(m-1),y.setFullYear(g);const b=y.getDay()+h;return b>=7?b-7:b}function u(g,m,h,y,b){return g===b.day&&m===b.month&&h===b.year&&y===Ct.current}function f(g,m,h,y,b,v,x,C,w){const N=[],V=n(),D=d(m,g,c(h)),k=o(g,m),B=a(g,m);let $=1,T=Ct.previous;for(let S=1;S<7;S++){const F=[];if(S===1){const E=B-D+1;for(let R=E;R<=B;R++){const O={year:g===1?m-1:m,month:g===1?12:g-1,day:R},G=u(R,g,m,T,V),M=t(O),j=s(O,y,b),H=l(O,C,x,v);F.push({date:O,tag:T,isCurrent:G,disable:M,marked:j,highlight:H})}T=Ct.current;const I=7-F.length;for(let R=0;R<I;R++){const O={year:m,month:g,day:$},G=u($,g,m,T,V),M=t(O),j=s(O,y,b),H=l(O,C,x,v);F.push({date:O,tag:T,isCurrent:G,disable:M,marked:j,highlight:H}),$++}}else for(let E=1;E<=7;E++){$>k&&($=1,T=Ct.next);const I={year:T===Ct.next&&g===12?m+1:m,month:T===Ct.current?g:T===Ct.next&&g<12?g+1:1,day:$},R=u($,g,m,T,V),O=t(I),G=s(I,y,b),M=l(I,C,x,v);F.push({date:I,tag:T,isCurrent:R,disable:O,marked:G,highlight:M}),$++}const A=w&&h==="Mon."?p(F[0].date):0;N.push({days:F,numberInTheYear:A,year:m})}return N}return{generateCalendar:f}}function jb(){const{getToday:t}=Ut(),{daysInMonth:n}=ur(),{isMonthDisabledByDisableSince:o,isMonthDisabledByDisableUntil:a}=id();function r(i,l,s,p,c,d){const u=[],f=i-i%10,{year:g,month:m}=l,h=t(),y=3,b=f+10;for(let v=f-1;v<b;v+=y){const x=[];for(let C=v;C<v+y;C++){const w=o({year:C,month:m,day:1},c)||a({year:C,month:m,day:n(m||0,C)},d),N=C<s||C>p;x.push({year:C,isCurrent:C===h.year,selected:C===g,disable:w||N,date:{year:C}})}u.push(x)}return u}return{generateYears:r}}const En=e.defineComponent({name:"FDateView",props:ad,emits:["datePicked"],setup(t,n){const o=e.ref(t.mode),a=e.ref(t.top),r=e.ref(t.left),i=e.ref(t.position),l=e.ref(t.enablePeriod),s=e.ref(t.selectMode),p=e.ref(t.dateFormat),c=e.ref(t.nameOfMonths),d=e.ref(t.valueFormat),u=e.ref([]),f=e.ref(!1),g=e.ref(""),m=e.ref(!1),h=e.ref(""),y=e.ref(),b=e.ref(!1),v=e.ref(!1),x=e.ref(!1),C=e.ref(!1),w=e.ref(!1),N=e.ref(!1),V=e.ref(!1),D=e.ref(!1),k=e.ref(t.secondaryDates),B=e.ref(t.daysInWeek),$=e.ref(t.enableKeyboadNavigate),T=e.ref(t.enableMarkCurrent),S=e.ref(t.firstDayOfTheWeek),F=e.ref(t.showWeekNumber),A=e.ref(t.selectedDate),E=e.ref(t.value),I=e.ref(t.selectedWeek),R=e.ref(t.selectedPeriod),O=e.ref(t.weekTitle),G=e.ref(t.secondaryMonths),M=e.ref(t.selectedMonth),j=e.ref(t.minYear),H=e.ref(t.maxYear),_=e.ref(t.disableSince),W=e.ref(t.disableUntil),K=e.ref(t.disableDates),z=e.ref(t.disablePeriod),q=e.ref(t.disableWeekdays),L=e.ref(t.disableWeekends),X=Pb(j.value,H.value,_.value,W.value,K.value,z.value,L.value,q.value),{generateCalendar:U}=Rb(X),{getToday:Z,getDateObject:re}=Ut(),{generateMonths:de,getNextMonth:ge,getPreviousMonth:ie}=ur(),{generateYears:te}=jb(),J=Z(),le=e.computed(()=>E.value?re(E.value,d.value):J);A.value=le.value;const fe=e.ref({year:le.value.year||1,month:le.value.month||1,displayTextOfMonth:c.value[le.value.month||"1"],displayTextOfYear:`${le.value.year}`}),Me=J.month===12?(J.year||1)+1:J.year,Ie=(J.month||1)<12?(J.month||1)+1:1,Le=e.ref({year:Me,month:Ie,displayTextOfMonth:c.value[J.month||"1"],displayTextOfYear:`${Me}`}),Ce=e.computed(()=>U(fe.value.month,fe.value.year,S.value,[],{marked:!0,color:""},t.highlightDates,t.highlightSaturday,t.highlightSunday,F.value)),pe=e.computed(()=>de(c.value,{year:fe.value.year,month:fe.value.month},_.value,W.value)),he=e.computed(()=>te(fe.value.year,{year:fe.value.year,month:fe.value.month},j.value,H.value,_.value,W.value)),De=e.computed(()=>{const Ee={"f-datepicker-container":!0},at=`container-position-${i.value}`;return Ee[at]=!0,Ee});function Ge(){return l.value?"":"287px"}const se=e.computed(()=>({top:`${a.value}px`,left:`${r.value}px`,width:Ge(),position:o.value==="Embedded"?"relative":"absolute","z-index":o.value==="Embedded"?0:9999}));function ye(Ee){}function Ve(Ee){Ee.stopPropagation()}function Pe(Ee,at){const Re=fe.value.year-(m.value?10:1),rn={year:Re,month:fe.value.month,displayTextOfMonth:c.value[fe.value.month||"1"],displayTextOfYear:`${Re}`};fe.value=rn}function Ye(Ee,at){const Re=ie(fe.value.month,fe.value.year),rn={year:Re.year||1,month:Re.month||1,displayTextOfMonth:c.value[Re.month||"1"],displayTextOfYear:`${Re.year}`};fe.value=rn}function Ze(Ee,at){const Re=ge(fe.value.month,fe.value.year),rn={year:Re.year||1,month:Re.month||1,displayTextOfMonth:c.value[Re.month||"1"],displayTextOfYear:`${Re.year}`};fe.value=rn}function Ue(Ee,at){let Re=fe.value.year+1;m.value&&(Re=he.value[3][0].year+2);const rn={year:Re,month:fe.value.month,displayTextOfMonth:c.value[fe.value.month||"1"],displayTextOfYear:`${Re}`};fe.value=rn}function be(Ee){f.value=!f.value,m.value=!1}function Xe(Ee){f.value=!1,m.value=!m.value}const st=e.computed(()=>({"active-month":fe.value,"date-format":p.value,"disable-pre-page":b.value,"disable-pre-record":v.value,"disable-next-record":x.value,"disable-next-page":C.value,years:he.value,"selecting-month":f.value,"selecting-year":m.value,"select-mode":s.value})),bt=e.computed(()=>({"active-month":Le.value,"date-format":p.value,"disable-pre-page":w.value,"disable-pre-record":N.value,"disable-next-record":V.value,"disable-next-page":D.value,years:u.value,"selecting-month":g.value,"selecting-year":h.value,"select-mode":s.value}));function lt(Ee,at){return e.createVNode(sr,e.mergeProps(at,{onPrePage:Re=>Pe(),onPreRecord:Re=>Ye(),onNextRecord:Re=>Ze(),onNextPage:Re=>Ue(),onClickMonth:Re=>be(),onClickYear:Re=>Xe()}),null)}const ct=e.computed(()=>!f.value&&!m.value&&!y.value||l.value&&s.value!=="week"&&!g.value&&!h.value&&!y.value),$t=e.computed(()=>f.value&&!m.value),wt=e.computed(()=>m.value&&!f.value),We=e.computed(()=>({dates:Ce.value,daysInWeek:B.value,enableKeyboadNavigate:$.value,enableMarkCurrent:T.value,enablePeriod:l.value,firstDayOfTheWeek:S.value,selected:A.value,selectedPeriod:R.value,selectedWeek:I.value,selectMode:s.value,showWeekNumber:F.value,weekTitle:O.value})),Dt=e.computed(()=>({dates:k,daysInWeek:B.value,enableKeyboadNavigate:$.value,enableMarkCurrent:T.value,enablePeriod:l.value,firstDayOfTheWeek:S.value,selected:A.value,selectedPeriod:R.value,selectMode:s.value,showWeekNumber:F.value,weekTitle:O.value}));function Tt(Ee,at){A.value=Ee,n.emit("datePicked",Ee)}function Ke(Ee){}function oe(Ee){}function Y(Ee,at){}function ne(Ee,at){}function ce(Ee,at){return ct.value&&e.createVNode(ir,e.mergeProps(at,{onClick:Re=>Tt(Re),onClickWeek:Re=>void 0,onKeyDown:Re=>void 0,onMouseEnter:Re=>void 0,onMouseLeave:Re=>void 0}),null)}const ue=e.computed(()=>({months:pe.value,enableMarkCurrent:T.value,enableKeyboadNavigate:$.value,enablePeriod:l.value,selected:M.value,selectedPeriod:R.value})),Te=e.computed(()=>({months:G.value,enableMarkCurrent:T.value,enableKeyboadNavigate:$.value,enablePeriod:l.value,selected:M.value,selectedPeriod:R.value}));function Oe(Ee,at){f.value=!1,m.value=!1,M.value=Ee,fe.value={month:Ee.month||1,displayTextOfMonth:c.value[fe.value.month||"1"],year:fe.value.year||1,displayTextOfYear:`${fe.value.displayTextOfYear}`}}function Je(Ee){}function ft(Ee,at){}function Nt(Ee,at){}function Vt(Ee,at){return e.createVNode(lr,e.mergeProps(at,{onClick:Re=>Oe(Re),onKeyDownMonthView:Re=>void 0,onMouseEnterMonthView:Re=>void 0,onMouseLeaveMonthView:Re=>void 0}),null)}const pt=e.computed(()=>({years:he.value,enableKeyboadNavigate:$.value,enableMarkCurrent:T.value,enablePeriod:l.value,selected:A.value,selectedPeriod:R.value})),Pt=e.computed(()=>({years:u.value,enableKeyboadNavigate:$.value,enableMarkCurrent:T.value,enablePeriod:l.value,selected:A.value,selectedPeriod:R.value}));function St(Ee,at){f.value=!0,m.value=!1,fe.value={month:fe.value.month,displayTextOfMonth:fe.value.displayTextOfMonth,year:Ee.year||1,displayTextOfYear:`${Ee.year}`}}function vt(Ee){}function Lo(Ee,at){}function Wo(Ee,at){}function Un(Ee){fe.value={year:J.year||1,month:J.month||1,displayTextOfMonth:c.value[J.month||"1"],displayTextOfYear:`${J.year}`},A.value=J}function zV(Ee){fe.value={year:J.year||1,month:J.month||1,displayTextOfMonth:c.value[J.month||"1"],displayTextOfYear:`${J.year}`},A.value=J,M.value={year:J.year,month:J.month}}function GV(Ee){fe.value={year:J.year||1,month:J.month||1,displayTextOfMonth:c.value[J.month||"1"],displayTextOfYear:`${J.year}`},A.value=J}const UV=e.computed(()=>l.value&&s.value!=="week");function Yp(Ee,at){return e.createVNode(cr,e.mergeProps(at,{onClick:Re=>St(Re),onKeyDownYearView:Re=>void 0,onClickPreRecord:Re=>Ye(),onClickNextRecord:Re=>Ze(),onMouseEnterYearView:Re=>void 0,onMouseLeaveYearView:Re=>void 0}),null)}return()=>e.createVNode("div",{class:De.value,style:se.value,tabindex:"0",onKeyup:Ee=>void 0,onClick:Ee=>Ve(Ee)},[e.createVNode("div",{class:"f-datepicker-content"},[lt(!1,st.value),ce(!1,We.value),f.value&&Vt(!1,ue.value),m.value&&Yp(!1,pt.value),e.createVNode("div",{class:"f-datepicker-footer"},[e.createVNode("div",{class:"f-datepicker-redirect"},[ct.value&&e.createVNode("button",{class:"btn btn-link",onClick:Un},[e.createTextVNode("今天")]),$t.value&&e.createVNode("button",{class:"btn btn-link",onClick:zV},[e.createTextVNode("本月")]),wt.value&&e.createVNode("button",{class:"btn btn-link",onClick:GV},[e.createTextVNode("今年")])])])]),UV.value&&e.createVNode("div",{class:"f-datepicker-content"},[lt(!0,bt.value),ce(!0,Dt.value),g.value&&Vt(!0,Te.value),h.value&&Yp(!0,Pt.value)])])}}),_b={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/date-picker.schema.json",title:"date-picker",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for date picker",type:"string"},type:{description:"The type string of date picker",type:"string",default:"date-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Hb={title:"date-picker",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},bo={disableDates:{Type:Array,default:[]},disablePeriod:{Type:Array,default:[]},disableSince:{Type:Object,default:{year:0,month:0,day:0}},disableWeekdays:{Type:Array,default:[]},disableWeekends:{Type:Boolean,default:!1},disableUntil:{Type:Object,default:{year:0,month:0,day:0}},displayTime:{Type:Boolean,default:!1},highlightDates:{Type:Array,default:[]},highlightSaturday:{Type:Boolean,default:!1},highlightSunday:{Type:Boolean,default:!1},maxYear:{Type:Number,default:2500},minYear:{Type:Number,default:1},modelValue:{type:String,default:""},nameOfMonths:{Type:Object,default:td},selectMode:{Type:String,default:"day"},valueFormat:{Type:String,default:"yyyy-MM-dd"},displayFormat:{Type:String,default:"yyyy-MM-dd"},enablePeriod:{type:Boolean,default:!1},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},sd=me(bo,_b,nd,od,Hb),fr=e.defineComponent({name:"FDatePicker",props:bo,emits:["update:modelValue","datePicked"],setup(t,n){const o='<span class="f-icon f-icon-date"></span>',a=e.ref(t.modelValue),r=e.ref(null),i=e.ref(t.maxYear),l=e.ref(t.minYear),s=e.ref(t.enablePeriod),p=e.ref(a.value),c=e.ref(t.highlightSaturday),d=e.ref(t.highlightSunday),u=e.ref(t.nameOfMonths),f=e.ref(t.highlightDates),g=e.ref(t.showWeekNumber),m=e.ref(t.selectMode),h=e.ref(t.displayTime),y=e.ref(t.disableWeekends),b=e.ref(t.disableWeekdays);e.ref([t.disableSince]);const v=e.ref([t.disableUntil]),{formatTo:x}=Ja();function C(){}const w=e.computed(()=>x(p.value,t.displayFormat));function N(B,$=!0){const T=x(B,t.valueFormat);a.value=T,p.value=T,$&&n.emit("update:modelValue",T)}function V(){document.body.click()}function D(B){const $=`${B.year}-${B.month}-${B.day}`;N($),n.emit("datePicked",p.value),V()}function k(){N(""),n.emit("datePicked",p.value)}return e.watch(()=>t.modelValue,(B,$)=>{B!==$&&N(B)}),e.onMounted(()=>{a.value&&N(a.value)}),()=>e.createVNode(yt,{ref:r,modelValue:w.value,buttonContent:o,enableClear:!0,onClear:k,onClickButton:C,focusOnCreated:t.focusOnCreated,selectOnCreated:t.selectOnCreated},{default:()=>[e.createVNode(En,{mode:"Popup",value:p.value,valueFormat:t.valueFormat,minYear:l.value,maxYear:i.value,enablePeriod:s.value,highlightSunday:d.value,highlightSaturday:c.value,nameOfMonths:u.value,highlightDates:f.value,showWeekNumber:g.value,selectMode:m.value,displayTime:h.value,disableWeekends:y.value,disableWeekdays:b.value,disableUntil:v.value,onDatePicked:B=>D(B)},null)]})}}),Lb=e.defineComponent({name:"FDatePickerDesign",props:bo,emits:["update:modelValue","datePicked"],setup(t,n){const o='<span class="f-icon f-icon-date"></span>',a=e.ref(t.modelValue),r=e.ref(),i=e.inject("design-item-context"),l=ve(r,i);return e.onMounted(()=>{r.value.componentInstance=l}),n.expose(l.value),()=>e.createVNode(yt,{ref:r,modelValue:a.value,"onUpdate:modelValue":s=>a.value=s,buttonContent:o,enableClear:!0},null)}}),Wb=e.defineComponent({name:"FDateViewDesign",props:bo,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(En,{ref:o},null)}}),ld={install(t){t.component(ir.name,ir).component(sr.name,sr).component(En.name,En).component(lr.name,lr).component(cr.name,cr).component(fr.name,fr)},register(t,n,o){t["date-picker"]=fr,t["date-view"]=En,n["date-picker"]=sd,n["date-view"]=rd},registerDesigner(t,n,o){t["date-picker"]=Lb,t["date-view"]=Wb,n["date-picker"]=sd,n["date-view"]=rd}};function qb(t,n,o){return!n||!n.length?{columns:[]}:(n.forEach(a=>{a.title=a.caption?a.caption:a.title,a.field=a.binding?a.binding.path:a.field}),{columns:n})}const zb=new Map([["appearance",xe],["column","columnOption"],["fields",qb]]);function Gb(t,n,o){var u;const a=o.parentComponentInstance,r=a.schema.type,i=String(((u=a.schema.appearance)==null?void 0:u.class)||"").split(" "),l=r==="section"||r==="tab-page",s=i.includes("f-page-content-nav"),p=i.includes("f-page-main"),c=t.getSchemaByType("component");c.id=`${n.id}-component`,c.componentType="data-grid";let d="";return d+=l?"f-struct-data-grid-in-card f-struct-is-subgrid":"",d+=s?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",d+=p?"f-struct-data-grid f-struct-wrapper":"",c.appearance={class:d},c.contents=[n],c}function Ub(t,n,o){const a=o.parentComponentInstance,r=String(a.schema.appearance.class||"").split(" "),i=r.includes("f-page-content-nav"),l=r.includes("f-page-main"),s=t.getSchemaByType("section");s.id=`${n.id}-section`;let p="";return p+=i?"f-section-in-nav ":"",p+=l?"f-section-in-managelist ":"",p+="f-section-grid",s.appearance={class:p},s.contents=[n],s}function Yb(t,n,o){const a=t.getSchemaByType("content-container");return a.id=`${n.id}-layout`,a.appearance={class:"f-grid-is-sub f-utils-flex-column"},a.contents=[n],a}function Kb(t,n,o){const r=o.parentComponentInstance.schema.type,i=r==="section"||r==="tab-page";n.appearance={class:"f-component-grid"};const s=(i?Yb:Ub)(t,n,o);return Gb(t,s,o)}const Xb={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/data-grid.schema.json",title:"data-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"data-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disable:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}}},required:["id","type"]},Qb={title:"data-grid",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},pr={columns:{type:Array,default:[]},columnOption:{type:Object},data:{type:Array,default:[]},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},filter:{type:Object},fit:{type:Boolean,default:!1},focusOnEditingCell:{type:Boolean,default:!0},selectOnEditingCell:{type:Boolean,default:!1},group:{type:Object},header:{type:Object},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},mergeCell:{type:Boolean,default:!1},pagination:{type:Object,default:{enable:!1,size:20}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},sort:{type:Object},summary:{type:Object,default:{enable:!0,groupFields:["numericField1","numericField2"]}},virtualized:{type:Boolean,default:!1},width:{type:Number,default:-1},newDataItem:{type:Function,default:()=>{}},enableCommands:{type:Boolean,default:!1},commandOption:{type:Object,default:{enable:!1,commands:[]}},appendOnEnterAtLastCell:{type:Boolean,default:!1}},cd=me(pr,Xb,zb,Kb,Qb);function dd(t,n,o,a,r,i,l,s,p,c,d,u,f,g){const{calculateCellPositionInRow:m,cellKey:h,cellPosition:y,rowKey:b,rowPosition:v,rowSpanCellPosition:x,groupCellPosition:C,summaryCellPosition:w}=i,{collpaseGroupIconClass:N}=p,{gridRowClass:V,onClickRow:D,onMouseoverRow:k,onMouseoutRow:B}=d,{onClickCell:$}=s,{toggleGroupRow:T}=u,{columnContext:S,hasLeftFixedColumn:F,hasRightFixedColumn:A}=l,{navigateOnKeyUp:E}=c,{gridDataStyle:I,gridMergedDataStyle:R,leftFixedGridDataStyle:O,leftFixedGridMergedDataStyle:G,rightFixedGridDataStyle:M,rightFixedGridMergedDataStyle:j}=f;function H(ie,te){te.collapse=!te.collapse,g.value=T(te.collapse?"collapse":"expand",te,g.value)}function _(ie,te){const J=[];if(ie.groupField&&te[ie.groupField]){for(let fe=0;fe<=ie.layer;fe++)J.push(e.createVNode("div",{class:"fv-grid-group-row-icon",onClick:Me=>H(Me,ie)},[e.createVNode("span",{class:N(ie)},null)]));const le=ie.data[ie.groupField];J.push(e.createVNode("div",{ref:le.setRef,key:h(ie,ie.layer+1),class:"fv-grid-cell",style:C(le,te,ie.layer)},[le.data])),Object.values(ie.data).filter(fe=>fe.field!==ie.groupField&&fe.colSpan!==0).forEach(fe=>{J.push(e.createVNode("div",{ref:fe.setRef,key:h(ie,fe.index),class:"fv-grid-cell",style:y(fe,te)},[fe.data]))})}return J}function W(ie,te){return ie.layer>-1&&e.createVNode("div",{ref:ie.setRef,key:b(ie),class:V(ie),style:v(ie),onClick:J=>D(J,ie),onMouseover:J=>k(J,ie)},[_(ie,te)])}function K(ie,te){const J=[];if(ie.groupField&&te[ie.groupField]){const le=ie.data[ie.groupField];J.push(e.createVNode("div",{ref:le.setRef,key:h(ie,ie.layer+1),class:"fv-grid-cell",style:w(le,te,ie.layer)},[le.data]))}return J}function z(ie,te){return ie.layer>-1&&e.createVNode("div",{ref:ie.setRef,key:b(ie),class:V(ie),style:v(ie),onClick:J=>D(J,ie),onMouseover:J=>k(J,ie)},[K(ie,te)])}function q(ie,te){return e.createVNode("div",{ref:ie.setRef,key:b(ie),class:V(ie),style:v(ie),onClick:J=>D(J,ie),onMouseover:J=>k(J,ie),onMouseout:J=>B(J,ie)},[Object.values(ie.data).filter(J=>te[J.field]&&J.rowSpan===1).map(J=>e.createVNode("div",{ref:J.setRef,key:h(ie,J.index),class:"fv-grid-cell",style:y(J,te),onClick:le=>$(le,J),onKeyup:le=>E(le,J)},[J.mode===ht.editing?J.getEditor(J):J.formatter?J.formatter(J,ie):J.data!=null?J.data.toString():J.data]))])}const L=[q,W,z];function X(ie,te){const J=m(ie);return g.value.map(le=>L[le.type](le,J))}function U(ie){const te=m(ie);return g.value.map(J=>Object.values(J.data).filter(le=>te[le.field]&&le.rowSpan>1).map(le=>e.createVNode("div",{key:h(J,le.index),class:"fv-grid-cell fv-grid-merged-cell",style:x(J,le,te)},[le.data])))}function Z(){return e.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:O.value},[X(S.value.leftColumns.filter(ie=>ie.visible))]),e.createVNode("div",{class:"fv-grid-merge-date",style:G.value},[U(S.value.leftColumns.filter(ie=>ie.visible))])])}function re(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:I.value},[X(S.value.primaryColumns.filter(ie=>ie.visible))]),e.createVNode("div",{class:"fv-grid-merge-date",style:R.value},[U(S.value.primaryColumns.filter(ie=>ie.visible))])])}function de(){return e.createVNode("div",{ref:r,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:M.value},[X(S.value.rightColumns.filter(ie=>ie.visible))]),e.createVNode("div",{class:"fv-grid-merge-date",style:j.value},[U(S.value.rightColumns.filter(ie=>ie.visible))])])}function ge(){const ie=[];return F.value&&ie.push(Z()),ie.push(re()),A.value&&ie.push(de()),ie}return{renderDataArea:ge}}const Mn=e.defineComponent({name:"FDataGrid",props:pr,emits:["ClickRow","DoubleClickRow","selectionChange","enterUpInLastCell","pageIndexChanged","pageSizeChanged"],setup(t,n){var wt;const o=e.ref(t.columns),a=20,r=on(t),i=0,l=e.ref(),s=e.ref(),p=e.ref(),c=e.ref(),d=e.ref(),u=e.ref(t.showStripe),f=e.ref([]),g=e.ref(!1),m=e.ref(((wt=t.rowOption)==null?void 0:wt.wrapContent)||!1),h=Cn(t,r),y=jo(),b=Zt(t),v=Qt(t,new Map,b,r),x=an(t,v,r,f,n),C=e.computed(()=>t.disable),w=e.computed(()=>v.totalItems.value<a?v.totalItems.value:a),{containerStyleObject:N}=Ln(t),V=$s(t),{applyCommands:D}=V;D(o);const k=Wn(t),B=As(),{applyColumnSorter:$,columnContext:T,updateColumnRenderContext:S}=k;$(v,B);const F=Bs(t,T),A=nn(t,r),E=Lt(),I=en(t,A,E),R=tn(t,A,b,r,E,I),O=_o(t,r,I,R),G=Ho(t,r,I,R),M=Jt(t,o,v,w,i,R,O,G),{getVisualData:j}=M,H=xn(t,T),_=Fs(t,x),{sidebarWidth:W}=_;f.value=j(0,w.value+i-1);const K=qn(t,v,f,T,M,w,i,W),{onWheel:z,dataGridWidth:q,viewPortHeight:L,viewPortWidth:X,resetScroll:U}=K,Z=ks(t,T,s,X,F),{calculateColumnsSize:re}=Z,de=Ts(),ge=Ss(s,d,v,de,K),ie=zn(t,n,x,r),te=Ds(t,n,k,v,F,h,K),J=e.computed(()=>({"fv-grid":!0,"fv-datagrid-strip":u.value})),le=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":g.value,"fv-grid-wrap-content":m.value})),{renderGridHeader:fe,renderGridColumnResizeOverlay:Me}=xs(t,s,c,d,k,v,te,ge,y,de,Z,F,x,_,B,K,X,f),{renderDataGridPagination:Ie}=Wp(t,n,v,K),{renderDataGridSidebar:Le}=Ns(t,ie,x,_,K),{renderDisableMask:Ce}=Cs(),{renderDataGridSummery:pe}=qp(t,v,k),{renderHorizontalScrollbar:he}=ws(t,s,K),{renderVerticalScrollbar:De}=Vs(t,s,K),{renderFilterPanel:Ge}=_p(t,k,v,y,K),{renderGroupPanel:se}=Hp(t,v,te,h,K);function ye(){var We,Dt;L.value=((We=p.value)==null?void 0:We.clientHeight)||0,q.value=((Dt=s.value)==null?void 0:Dt.clientWidth)||0,re()}e.onMounted(()=>{s.value&&(Yn.useResizeObserver(s.value,ye),re(),e.nextTick(()=>{s.value&&(q.value=s.value.clientWidth),p.value&&(X.value=p.value.clientWidth,L.value=p.value.clientHeight)}))}),e.onUnmounted(()=>{}),e.watch(X,()=>{s.value&&re()});function Ve(){v.insertNewDataItem(),U()}function Pe(){v.insertNewDataItem(f.value.length),U()}function Ye(We){A.onEditingRow(We)}function Ze(We){v.removeDataItem(We),U()}function Ue(We){v.removeDataItemById(We),U()}function be(We){A.acceptEditingRow(We)}function Xe(We){A.cancelEditingRow(We)}function st(We){We&&(o.value=We,D(o),S(o.value),$(v,B),re())}function bt(We){We&&(v.load(We),f.value=j(0,w.value+i-1))}const lt={addNewDataItem:Ve,addNewDataItemAtLast:Pe,removeDataItem:Ze,removeDataItemById:Ue,editDataItem:Ye,acceptDataItem:be,cancelDataItem:Xe,updateColumns:st,updateDataSource:bt};n.expose(lt);const ct=zp(t,n,lt,k,A,f),{renderDataArea:$t}=dd(t,n,p,c,d,H,k,A,h,ct,ie,M,K,f);return()=>e.createVNode("div",{ref:l,class:J.value,style:N.value,onWheel:z},[Ge(),se(),fe(),e.createVNode("div",{ref:s,class:le.value,onMouseover:()=>{g.value=!0},onMouseleave:()=>{g.value=!1}},[Le(f),$t(),he(),De()]),pe(),Ie(),Me(),C.value&&Ce()])}});function Zb(t){t.schema;const n=e.ref(!0),o=e.ref(!0);function a(c){return c&&c.sourceType==="control"?c.controlCategory==="input":!1}function r(){return!1}function i(){return!1}function l(){return!0}function s(c){}function p(){}return{canAccepts:a,checkCanDeleteComponent:r,checkCanMoveComponent:i,hideNestedPaddingInDesginerView:l,onAcceptMovedChildElement:s,resolveComponentContext:p,triggerBelongedComponentToMoveWhenMoved:n,triggerBelongedComponentToDeleteWhenDeleted:o}}const mr=e.defineComponent({name:"FDataGridDesign",props:pr,emits:["ClickRow","DoubleClickRow","selectionChange","enterUpInLastCell","pageIndexChanged","pageSizeChanged"],setup(t,n){var Tt;const o=e.ref(),a=e.inject("design-item-context"),r=Zb(a),i=ve(o,a,r);i.value.styles="display:flex;flex:1;",e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const l=e.ref(t.columns),s=20,p=on(t),c=0,d=e.ref(),u=e.ref(),f=e.ref(),g=e.ref(),m=e.ref(t.showStripe),h=e.ref([]),y=e.ref(!1),b=e.ref(((Tt=t.rowOption)==null?void 0:Tt.wrapContent)||!1),v=Cn(t,p),x=jo(),C=Zt(t),w=Qt(t,new Map,C,p),N=an(t,w,p,h,n),V=e.computed(()=>t.disable),D=e.computed(()=>w.totalItems.value<s?w.totalItems.value:s),{containerStyleObject:k}=Ln(t),B=$s(t),{applyCommands:$}=B;$(l);const T=Wn(t),S=As(),{applyColumnSorter:F,columnContext:A,updateColumnRenderContext:E}=T;F(w,S);const I=Bs(t,A),R=nn(t,p),O=Lt(),G=en(t,R,O),M=tn(t,R,C,p,O,G),j=_o(t,p,G,M),H=Ho(t,p,G,M),_=Jt(t,l,w,D,c,M,j,H),{getVisualData:W}=_,K=xn(t,A),z=Fs(t,N),{sidebarWidth:q}=z;h.value=W(0,D.value+c-1);const L=qn(t,w,h,A,_,D,c,q),{onWheel:X,dataGridWidth:U,viewPortHeight:Z,viewPortWidth:re,resetScroll:de}=L,ge=ks(t,A,d,re,I),{calculateColumnsSize:ie}=ge,te=Ts(),J=Ss(d,g,w,te,L),le=zn(t,n,N,p),fe=Ds(t,n,T,w,I,v,L),Me=e.computed(()=>({"fv-grid":!0,"fv-datagrid-strip":m.value})),Ie=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":y.value,"fv-grid-wrap-content":b.value})),{renderGridHeader:Le,renderGridColumnResizeOverlay:Ce}=xs(t,d,f,g,T,w,fe,J,x,te,ge,I,N,z,S,L,re,h),{renderDataGridPagination:pe}=Wp(t,n,w,L),{renderDataGridSidebar:he}=Ns(t,le,N,z,L),{renderDisableMask:De}=Cs(),{renderDataGridSummery:Ge}=qp(t,w,T),{renderHorizontalScrollbar:se}=ws(t,d,L),{renderVerticalScrollbar:ye}=Vs(t,d,L),{renderFilterPanel:Ve}=_p(t,T,w,x,L),{renderGroupPanel:Pe}=Hp(t,w,fe,v,L);function Ye(){var Ke,oe;Z.value=((Ke=u.value)==null?void 0:Ke.clientHeight)||0,U.value=((oe=d.value)==null?void 0:oe.clientWidth)||0,ie()}e.onMounted(()=>{d.value&&(Yn.useResizeObserver(d.value,Ye),ie(),e.nextTick(()=>{d.value&&(U.value=d.value.clientWidth),u.value&&(re.value=u.value.clientWidth,Z.value=u.value.clientHeight)}))}),e.onUnmounted(()=>{}),e.watch(re,()=>{d.value&&ie()});function Ze(){w.insertNewDataItem(),de()}function Ue(){w.insertNewDataItem(h.value.length),de()}function be(Ke){R.onEditingRow(Ke)}function Xe(Ke){w.removeDataItem(Ke),de()}function st(Ke){w.removeDataItemById(Ke),de()}function bt(Ke){R.acceptEditingRow(Ke)}function lt(Ke){R.cancelEditingRow(Ke)}function ct(Ke){Ke&&(l.value=Ke,$(l),E(l.value),F(w,S),ie())}function $t(Ke){Ke&&(w.load(Ke),h.value=W(0,D.value+c-1))}const We=zp(t,n,{addNewDataItem:Ze,addNewDataItemAtLast:Ue,removeDataItem:Xe,removeDataItemById:st,editDataItem:be,acceptDataItem:bt,cancelDataItem:lt,updateColumns:ct,updateDataSource:$t},T,R,h),{renderDataArea:Dt}=dd(t,n,u,f,g,K,T,R,v,We,le,_,L,h);return()=>e.createVNode("div",{ref:o,class:Me.value,style:k.value,onWheel:X},[Ve(),Pe(),Le(),e.createVNode("div",{ref:d,class:Ie.value,onMouseover:()=>{y.value=!0},onMouseleave:()=>{y.value=!1}},[he(h),Dt(),se(),ye()]),Ge(),pe(),Ce(),V.value&&De()])}}),ud={install(t){t.component(Mn.name,Mn),t.component(mr.name,mr)},register(t,n,o){t["data-grid"]=Mn,n["data-grid"]=cd},registerDesigner(t,n,o){t["data-grid"]=mr,n["data-grid"]=cd}};function Jb(t,n,o){return n}const ev=new Map([["appearance",xe]]),tv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dropdown.schema.json",title:"dropdown",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for dropdown",type:"string"},type:{description:"The type string of dropdown",type:"string",default:"dropdown"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},nv={title:"dropdown",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},hr={show:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},title:{type:String,default:"下拉示例"},size:{type:String,default:""},type:{type:String,default:"primary"},iconClass:{type:String,default:""},active:{type:Boolean,default:!1},splitButton:{type:Boolean,default:!1},position:{type:String,default:"bottom"},model:{type:Array,default:[{label:"项目一",value:"XM1"},{label:"项目二",value:"XM2"},{label:"项目三",value:"XM3"}]},onSelect:{type:Function,default:()=>{}}},fd=me(hr,tv,ev,Jb,nv);function pd(t,n){let o;const a=e.ref(t.show),r=e.ref(),i=e.ref(),l=e.ref(),s=10;e.onMounted(()=>{o=i.value});const p=(b=1)=>{const v=["body>.f-datagrid-settings-simple-host","body>div","body>farris-dialog>.farris-modal.show","body>.farris-modal.show","body>farris-filter-panel>.f-filter-panel-wrapper","body .f-sidebar-show>.f-sidebar-main","body>.popover.show","body>filter-row-panel>.f-datagrid-filter-panel","body>.f-section-maximize"],x=Array.from(document.body.querySelectorAll(v.join(","))).filter(w=>w).map(w=>{const{display:N,zIndex:V}=window.getComputedStyle(w);return N==="none"?0:parseInt(V,10)}).filter(w=>w);let C=Math.max(...x);return C<1040&&(C=1040),C+b},c=(b,v)=>{const{height:x,left:C,top:w,width:N}=b.getBoundingClientRect(),{width:V,height:D,top:k}=v.getBoundingClientRect();if(b.className.indexOf("dropdown-submenu")>-1||b.closest(".dropdown-submenu")||b.classList.contains("dropright")){const $=window.innerWidth-C-b.offsetWidth,T=window.innerHeight-w,{position:S}=getComputedStyle(v);if(S==="fixed"){let F=C+b.offsetWidth;v.offsetWidth>$&&C>$&&(F=C-V),v.style.left=F+"px",v.style.right="auto",window.innerHeight-2*s<v.offsetHeight?(v.style.top=s+"px",v.style.bottom=s+"px",v.style.maxHeight=window.innerHeight-2*s+"px",v.style.overflowY="auto",v.className+=" dropdown-menu-maxheight"):T<v.offsetHeight?(v.style.top="auto",v.style.bottom=s+"px"):(v.style.top=w+"px",v.style.bottom="auto")}else{if(v.offsetWidth>$){const F=-V;v.style.left=F+"px"}window.innerHeight-2*s<v.offsetHeight?(v.style.top=-1*(w-s)+"px",v.style.bottom="auto",v.style.maxHeight=window.innerHeight-2*s+"px",v.style.overflowY="auto",v.className+=" dropdown-menu-maxheight"):T<v.offsetHeight&&(v.style.top=T-v.offsetHeight-s+"px",v.style.bottom="auto")}}else{const{marginTop:$,marginBottom:T}=getComputedStyle(v);let S=0;const F=Math.ceil(parseFloat($))+Math.ceil(parseFloat(T));let A=w+x,E=C;window.innerHeight-A-F<D&&(A=w-D,A<0&&(window.innerHeight-w-x>w?(A=w+x,S=window.innerHeight-A-F-s):(A=s,S=w-A-F))),window.innerWidth-C<V&&window.innerWidth-C<C+N&&(E=C-V+N),document.body.append(v),v.style.cssText=`position:fixed;bottom:unset;left:${E}px
|
|
4
|
+
!important;top:${A}px !important;right: unset;${S?"max-height:"+S+"px;overflow-y:auto;":""}`,S&&(v.className+=" dropdown-menu-maxheight"),v.style.zIndex=p().toString()}},d=()=>{c(r.value,i.value)},u=()=>{t.hover||(a.value=!1,document.removeEventListener("click",u),o.removeEventListener("click",u),document.removeEventListener("scroll",u),o.removeEventListener("scroll",u))};return{show:a,dropdownRef:r,dropdownMenuRef:i,clickEventRef:l,showDropMenu:b=>{t.hover||t.disabled||(b==null||b.stopPropagation(),a.value||setTimeout(()=>{d()}),a.value=!a.value,document.addEventListener("click",u),document.addEventListener("scroll",u),t.hideOnClick||(o.addEventListener("click",v=>{v.stopPropagation()}),o.addEventListener("scroll",v=>{v.stopPropagation()})))},hoverDropdown:b=>{t.hover&&(a.value||setTimeout(()=>{}),a.value=!a.value)},leftButtonClick:()=>{},closeDropMenu:u,selectItem:b=>{n.emit("select",b)},resolveSize:b=>{const v=/px|em|rem|pt|%/;return v.test(b)?`${parseInt(b,10)}${b.match(v)[0]}`:`${b}px`}}}const ov={label:{type:String,default:"XM1"},value:{type:String||Number,default:"项目一"},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},divide:{type:Boolean,default:!1},onSelect:{type:Function,default:()=>{}}},md=e.defineComponent({name:"FDropdownItem",props:ov,emits:["select"],setup(t,n){const o=e.ref(t.value),a=e.ref(t.label),r=e.ref(t.disabled),i=e.ref(t.active),l=e.ref(t.divide),s=()=>{r.value||n.emit("select",t)};return()=>e.createVNode("div",null,[e.withDirectives(e.createVNode("div",{class:"dropdown-divider"},null),[[e.vShow,l.value]]),e.createVNode("li",{class:`dropdown-item${i.value?" active":""} ${r.value?" disabled":""}`,onClick:s,title:o.value.toString()},[a.value])])}}),gr=e.defineComponent({name:"FDropdown",props:hr,emits:["select"],setup(t,n){const o=e.ref(t.model),{show:a,dropdownMenuRef:r,dropdownRef:i,clickEventRef:l,showDropMenu:s,hoverDropdown:p,leftButtonClick:c,closeDropMenu:d,selectItem:u,resolveSize:f}=pd(t,n);function g(m){console.log(m),n.emit("select",m)}return()=>e.createVNode("div",{ref:i},[e.createVNode("div",{class:["farris-dropdown","btn-group",{dropup:t.position==="top"},{dropdown:t.position==="bottom"},{dropleft:t.position==="left"},{dropright:t.position==="right"}]},[t.splitButton&&e.createVNode("span",{class:["btn",{"dropdown-item":t.nest},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"}],style:"width:100%",onClick:c},[t.title]),e.createVNode("span",{ref:l,class:["dropdown-toggle",{btn:!t.nest},{"dropdown-item":t.nest},{"dropdown-toggle-split":t.splitButton},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"},{"btn-secondary":t.type==="secondary"},{"btn-link":t.type==="link"},{disabled:t.disabled}],style:"width:100%",onClick:s,onMouseenter:p,onMouseleave:p},[e.withDirectives(e.createVNode("span",{class:"sr-only"},null),[[e.vShow,t.splitButton]]),t.splitButton?"":t.title,e.withDirectives(e.createVNode("span",{class:`f-icon ${t.iconClass.toString()}`},null),[[e.vShow,t.iconClass]])]),e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode("div",{ref:r,class:`dropdown-menu${a.value?" show":""}`},[e.createVNode(e.Fragment,null,[o.value.map(({label:m,value:h,disabled:y,active:b,divide:v})=>e.createVNode(md,{value:h.toString(),label:m,disabled:y,active:b,divide:v,onSelect:x=>g(x)},null))])])]})])])}}),av=e.defineComponent({name:"FDropdownDesign",props:hr,emits:["select"],setup(t,n){const o=e.ref(t.model),{show:a,showDropMenu:r,hoverDropdown:i,leftButtonClick:l,closeDropMenu:s,selectItem:p,resolveSize:c}=pd(t,n);function d(m){console.log(m),n.emit("select",m)}const u=e.ref(),f=e.inject("design-item-context"),g=ve(u,f);return e.onMounted(()=>{u.value.componentInstance=g}),n.expose(g.value),()=>e.createVNode("div",{ref:u},[e.createVNode("div",{class:["farris-dropdown","btn-group",{dropup:t.position==="top"},{dropdown:t.position==="bottom"},{dropleft:t.position==="left"},{dropright:t.position==="right"}],style:{width:t.width}},[t.splitButton&&e.createVNode("span",{class:["btn",{"dropdown-item":t.nest},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"}],style:"width:100%",onClick:l},[t.title]),e.createVNode("span",{class:["dropdown-toggle",{btn:!t.nest},{"dropdown-item":t.nest},{"dropdown-toggle-split":t.splitButton},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"},{"btn-secondary":t.type==="secondary"},{"btn-link":t.type==="link"},{disabled:t.disabled}],style:"width:100%",onClick:r,onMouseenter:i,onMouseleave:i},[e.withDirectives(e.createVNode("span",{class:"sr-only"},null),[[e.vShow,t.splitButton]]),t.splitButton?"":t.title,e.withDirectives(e.createVNode("span",{class:`f-icon ${t.iconClass.toString()}`},null),[[e.vShow,t.iconClass]])]),e.createVNode("div",{class:`dropdown-menu${a.value?" show":""}`},[e.createVNode(e.Fragment,null,[o.value.map(({label:m,value:h,disabled:y,active:b,divide:v})=>e.createVNode(md,{value:h.toString(),label:m,disabled:y,active:b,divide:v,onSelect:x=>d(x)},null))])])])])}}),hd={install(t){t.component(gr.name,gr)},register(t,n,o){t.dropdown=gr,n.dropdown=fd},registerDesigner(t,n,o){t.dropdown=av,n.dropdown=fd}},rv=new Map([["appearance",xe]]);function iv(t,n,o){return n}const sv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/filter-bar.schema.json",title:"filter-bar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for filter-bar",type:"string"},type:{description:"The type string of filter-bar",type:"string",default:"filter-bar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},lv={title:"filter-bar",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}},controlSource:{description:"筛选方式",title:"筛选方式",type:"select",editor:{type:"combo-list",data:[{value:"normal",name:"常规筛选"},{value:"light",name:"轻量筛选"}],valueField:"value",textField:"name",idField:"value"}}}},appearance:{description:"",title:"外观",properties:{showReminder:{description:"启用提示",type:"boolean",title:"启用提示",visible:{anyOf:[{controlSource:{equal:"light"}}]}},showExtendInSidebar:{description:"启用侧边栏收折",type:"boolean",title:"启用侧边栏收折",visible:{anyOf:[{controlSource:{equal:"light"}}]}},clearSelectedText:{description:"按钮“清空已选”的文本",type:"string",title:"按钮“清空已选”的文本",visible:{anyOf:[{controlSource:{equal:"light"}}]}},alLeft:{description:"表单左对齐",type:"boolean",title:"表单左对齐",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},autoWidth:{description:"自动列宽",type:"boolean",title:"自动列宽",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},filterClass:{description:"筛选样式",type:"string",title:"筛选样式",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},autoLabel:{description:"自适应标签宽度",type:"string",title:"自适应标签宽度",visible:{anyOf:[{controlSource:{equal:"normal"}}]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{visible:{description:"是否可见",type:"boolean",title:"是否可见"},disable:{description:"是否禁用",type:"boolean",title:"是否禁用"},fields:{description:"筛选条字段设置",title:"筛选条字段",type:"",$converter:"",editor:{type:"filter-bar-config",source:"filter-bar"}},liveSearch:{description:"实时搜索",type:"boolean",title:"实时搜索",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},defaultEmptyValueSearch:{description:"默认值为空时是否过滤数据",type:"boolean",title:"默认值为空时是否过滤数据"}}}}},yr={data:{type:Array,default:[{id:"name",fieldCode:"name",fieldName:"名称",compareType:"0",valueType:0,value:"示例1",relation:"1"}]},fields:{type:Array,default:[{id:"name",code:"name",labelCode:"name",name:"名称",editor:{type:"text"}}]},mode:{type:String,default:"editable"},resetText:{type:String,default:"清空已选"},showReset:{type:Boolean,default:!1}},gd=me(yr,sv,rv,iv,lv);class cv{constructor(n={value:[]}){P(this,"editorType","check-box");P(this,"value");P(this,"valueType","boolean");this.value=n.value}clear(){this.value=[]}setValue(n){this.value=n}getValue(){return this.value}isEmpty(){return this.value.length===0}}class dv{constructor(n={textValue:"",value:"",valueField:""}){P(this,"editorType","combo-lookup");P(this,"textValue");P(this,"value");P(this,"valueField");P(this,"valueType","text");this.textValue=n.textValue,this.value=n.value,this.valueField=n.valueField}clear(){this.value="",this.valueField="",this.textValue=""}getPropValue(n,o){if(o.length>1){const a=o.shift();return n[a]?this.getPropValue(n[a],o):null}return n[o[0]]}getTextValue(n){const o=n.split("."),a=this.value.split(",").map(r=>this.getPropValue(r,qe.cloneDeep(o)));return a&&a.length?a.join(","):""}getValue(){const n=this.valueField.split("."),o=this.value.split(",").map(a=>this.getPropValue(a,qe.cloneDeep(n)));return o&&o.length?o.join(","):""}setValue(n){throw new Error("Method not implemented.")}isEmpty(){return!this.valueField}}class uv{constructor(n={value:""}){P(this,"editorType","date-picker");P(this,"value");P(this,"valueType","datetime");this.value=n.value}setValue(n){this.value=n.formatted}getValue(){return this.value}isEmpty(){return!this.value}clear(){this.value=void 0}}class yd{constructor(n={begin:"",end:""}){P(this,"editorType","date-range");P(this,"begin","");P(this,"end","");P(this,"valueType","datetime");this.begin=n.begin,this.end=n.end}clear(){this.begin="",this.end=""}getValue(){return!this.begin||!this.end?"":`${this.begin}~${this.end}`}setValue(n){n.dataRange?(this.begin=n.dataRange.split(n.delimiter)[0],this.end=n.dataRange.split(n.delimiter)[1]):this.clear()}isEmpty(){return!this.begin||!this.end}}class fv{constructor(n={value:""}){P(this,"editorType","datetime-picker");P(this,"value");P(this,"valueType","datetime");this.value=n.value}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=n.formatted}isEmpty(){return!this.value}}class pv{constructor(n={value:"",dispalyText:""}){P(this,"editorType","combo-list");P(this,"value");P(this,"valueType","enum");P(this,"displayText");this.displayText=n.dispalyText,this.value=n.value}clear(){this.value="",this.displayText=""}getValue(){return this.displayText}setValue(n){this.displayText=n.dispalyText,this.value=n.value}isEmpty(){return!this.displayText}}class mv{constructor(n={value:[],displayText:"",displayField:"",isInputText:!1}){P(this,"editorType","input-group");P(this,"value");P(this,"valueType","text");P(this,"displayText");P(this,"valueField");P(this,"isInputText");this.value=n.value,this.displayText=n.displayText,this.valueField=n.displayField,this.isInputText=n.isInputText}clear(){this.value=[],this.displayText="",this.valueField=""}getPropValue(n,o){if(o.length>1){const a=o.shift();return n[a]?this.getPropValue(n[a],o):""}return n[o[0]]}getTextValue(n){const o=n.split("."),a=this.value.map(r=>this.getPropValue(r,qe.cloneDeep(o)));return a&&a.length?a.join(","):""}getValue(){const n=this.valueField.split(".")||[],o=this.value.map(a=>this.getPropValue(a,qe.cloneDeep(n)));return o&&o.length?o.join(","):""}setValue(n){throw new Error("Method not implemented.")}isEmpty(){return!this.displayText}}class hv{constructor(n={textValue:"",value:[],valueField:"",isInputText:!1}){P(this,"editorType","lookup");P(this,"textValue");P(this,"value");P(this,"valueField");P(this,"valueType","text");P(this,"isInputText");this.value=n.value,this.valueField=n.valueField,this.textValue=n.textValue,this.isInputText=n.isInputText}clear(){this.value=[],this.valueField="",this.textValue=""}getPropValue(n,o){if(o.length>1){const a=o.shift();return n[a]?this.getPropValue(n[a],o):null}return n[o[0]]}getTextValue(n){const o=n.split("."),a=this.value.map(r=>this.getPropValue(r,o));return a&&a.length?a.join(","):""}getValue(){const n=this.valueField.split("."),o=this.value.map(a=>this.getPropValue(a,n));return o&&o.length?o.join(","):""}setValue(n){throw new Error("Method not implemented.")}isEmpty(){return!this.value.length}}class gv{constructor(n={value:""}){P(this,"editorType","month-picker");P(this,"value");P(this,"valueType","datetime");this.value=n.value}setValue(n){this.value=n.formatted}getValue(){return this.value}clear(){this.value=void 0}isEmpty(){return!this.value}}class yv{constructor(n={begin:"",end:""}){P(this,"editorType","month-range");P(this,"begin");P(this,"end");P(this,"valueType","datetime");this.begin=n.begin,this.end=n.end}clear(){this.begin="",this.end=""}getValue(){return!this.begin||!this.end?"":`${this.begin}~${this.end}`}setValue(n){n.dataRange?(this.begin=n.dataRange.split(n.delimiter)[0],this.end=n.dataRange.split(n.delimiter)[1]):this.clear()}isEmpty(){return!this.begin||!this.end}}class bv{constructor(n={begin:null,end:null}){P(this,"editorType","number-range");P(this,"begin");P(this,"end");P(this,"valueType","number");this.begin=n.begin==null?null:parseFloat(n.begin),this.end=n.end==null?null:parseFloat(n.end)}clear(){this.begin=null,this.end=null}getValue(){return{begin:this.begin,end:this.end}}setValue(n){this.begin=n.begin==null?null:parseFloat(n.begin),this.end=n.end==null?null:parseFloat(n.end)}isEmpty(){return this.begin==null&&this.end==null}}class vv{constructor(n={value:""}){P(this,"editorType","number-spinner");P(this,"value");P(this,"valueType","number");this.value=n.value==null?null:parseFloat(n.value)}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=isNaN(parseFloat(n))?null:n}isEmpty(){return this.value==null}}class xv{constructor(n={value:null}){P(this,"editorType","radio-group");P(this,"value");P(this,"valueType","enum");this.value=n.value}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=n}isEmpty(){return!this.value}}class bd{constructor(n={value:""}){P(this,"editorType","text");P(this,"value");P(this,"valueType","text");this.value=n.value}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=n}isEmpty(){return!this.value}}function br(){function t(n,o){switch(n){case"check-box":return new cv(o);case"combo-list":return new pv(o);case"combo-lookup":return new dv(o);case"input-group":return new mv(o);case"date-picker":return new uv(o);case"date-range":return new yd(o);case"datetime-picker":return new fv(o);case"datetime-range":return new yd(o);case"lookup":return new hv(o);case"month-picker":return new gv(o);case"month-range":return new yv(o);case"number-range":return new bv(o);case"number-spinner":return new vv(o);case"radio-group":return new xv(o);default:return new bd(o)}}return{createConditionValue:t}}function vd(t,n){const o=e.ref([]),a=e.ref([]),r=e.ref([]),i=e.ref(""),l=e.ref(!1),s=e.ref(t.mode),p=new Map,c=br();function d(x){return!l.value&&s.value==="display-only"&&!!x.hasValue&&!!x.displayText}function u(x){a.value=x,a.value.reduce((C,w)=>(C.set(w.labelCode,w),C),p)}function f(x){o.value=x.map((C,w)=>{var N;if(typeof C.value=="string"){const V=((N=p.get(C.fieldCode))==null?void 0:N.editor.type)||"text";C.value=c.createConditionValue(V,{value:C.value})}return C.conditionId=w,C})}function g(){const x=a.value.map(C=>({id:C.id,fieldCode:C.code,fieldName:C.name,editor:C.editor}));return o.value.reduce((C,w,N)=>{const V=C.find(D=>D.fieldCode===w.fieldCode);return V&&(V.displayText=w.value.getValue(),V.hasValue=!0),C},x),x}function m(x,C){u(t.fields),f(t.data),r.value=g()}function h(x){r.value=r.value.filter(C=>C.id!==x.id),o.value=o.value.filter(C=>C.fieldCode!==x.fieldCode),a.value=a.value.filter(C=>C.id!==x.id),n.emit("Remove",x.fieldCode)}function y(x){x.displayText="",x.hasValue=!1,o.value=o.value.filter(C=>C.fieldCode!==x.fieldCode),n.emit("Clear",x.fieldCode)}function b(){r.value=[],o.value=[],a.value=[],n.emit("Reset")}function v(){r.value.forEach(x=>{x.displayText="",x.hasValue=!1}),o.value=[],n.emit("Reset")}return m(t.fields,t.data),{clearAll:b,clearFilterItem:y,currentFilterId:i,filterFields:a,filterItems:r,loadFilterItems:m,removeFilterItem:h,reset:v,shouldShowClearButtonInFilterItem:d}}function xd(t,n){function o(){}return()=>e.createVNode("div",{class:"f-filter-list-ellipsis",onClick:a=>void 0},[e.createTextVNode("...")])}function Cd(t,n,o){const{clearFilterItem:a,currentFilterId:r,filterItems:i,removeFilterItem:l,shouldShowClearButtonInFilterItem:s}=o,p=e.ref(!1),c=function(g,m){return{"f-filter-item":!0,"f-filter-item-actived":g.hasValue,"f-filter-item-last":m===i.value.length-1,"f-filter-item-edit":g.id===r.value}},d=e.computed(()=>!p.value&&t.mode==="editable");function u(g,m){t.mode==="display-only"?l(m):a(m)}function f(g,m,h){}return(g,m)=>e.createVNode("div",{id:g.id,class:c(g,m),onClick:h=>void 0},[e.createVNode("div",{class:"f-filter-item-inner"},[g.editor.required&&e.createVNode("span",{class:"f-filter-item-required text-danger"},[e.createTextVNode("*")]),e.createVNode("span",{class:"f-filter-item-text"},[g.fieldName]),g.hasValue&&g.displayText&&e.createVNode("span",{class:"f-filter-item-tip"},[e.createTextVNode(":")]),g.hasValue&&g.displayText&&e.createVNode("span",{class:"f-filter-item-content"},[g.displayText]),d.value&&e.createVNode("span",{class:"f-filter-item-arrow f-icon f-icon-arrow-chevron-down"},null)]),s(g)&&e.createVNode("span",{class:"f-filter-item-clear",onClick:h=>u(h,g)},[e.createVNode("span",{class:"f-icon f-icon-close-circle"},null)])])}function wd(t,n,o){const a=e.ref([]),r=e.ref(!1),i=e.ref(""),l=e.ref(t.resetText),s=e.ref(t.showReset),{clearAll:p,reset:c}=o,d=e.computed(()=>r.value&&a.value&&a.value.length>0),u=e.computed(()=>s.value);function f(m){}function g(m){t.mode==="display-only"?p():c()}return()=>e.createVNode("div",{class:"f-filter-toolbars"},[d.value&&e.createVNode("button",{class:"btn btn-link",onClick:m=>void 0},[i.value]),u.value&&e.createVNode("button",{class:"btn btn-link",onClick:m=>g()},[l.value])])}const vo=e.defineComponent({name:"FFilterBar",props:yr,emits:["Clear","Remove","Reset"],setup(t,n){const o=e.ref(!1),a=e.ref(!1),r=e.ref(!1),i=e.ref(!1),l=vd(t,n),{filterFields:s,filterItems:p,loadFilterItems:c}=l,d=e.computed(()=>({display:s.value&&s.value.length?"":"none"}));e.watch([()=>t.data,()=>t.fields],([C,w])=>{c(w,C)});const u=e.computed(()=>a.value&&o.value),f=e.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":u.value})),g=e.computed(()=>p.value.length>0),m=Cd(t,n,l);function h(){return e.createVNode("div",{class:f.value},[p.value.map((C,w)=>m(C,w))])}const y=e.computed(()=>r.value&&!a.value&&i.value),b=xd(),v=e.computed(()=>!a.value),x=wd(t,n,l);return()=>e.createVNode("div",{class:"f-filter-wrapper",style:d.value},[e.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[e.createVNode("div",{class:"f-filter-main f-utils-fill"},[e.createVNode("div",{class:"f-filter-list-wrapper"},[g.value&&h(),y.value&&b(),v.value&&x()])])])])}}),Cv=e.defineComponent({name:"FFilterBarDesign",props:yr,emits:["Clear","Remove","Reset"],setup(t,n){const o=e.ref(!1),a=e.ref(!1),r=e.ref(!1),i=e.ref(!1),l=vd(t,n),{filterFields:s,filterItems:p,loadFilterItems:c}=l,d=e.computed(()=>({display:s.value&&s.value.length?"":"none"})),u=e.ref(),f=e.inject("design-item-context"),g=ve(u,f);e.onMounted(()=>{u.value.componentInstance=g}),n.expose(g.value),e.watch([()=>t.data,()=>t.fields],([V,D])=>{c(D,V)});const m=e.computed(()=>a.value&&o.value),h=e.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":m.value})),y=e.computed(()=>p.value.length>0),b=Cd(t,n,l);function v(){return e.createVNode("div",{class:h.value},[p.value.map((V,D)=>b(V,D))])}const x=e.computed(()=>r.value&&!a.value&&i.value),C=xd(),w=e.computed(()=>!a.value),N=wd(t,n,l);return()=>e.createVNode("div",{ref:u,class:"f-filter-wrapper",style:d.value},[e.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[e.createVNode("div",{class:"f-filter-main f-utils-fill"},[e.createVNode("div",{class:"f-filter-list-wrapper"},[y.value&&v(),x.value&&C(),w.value&&N()])])])])}}),wv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution-config.schema.json",title:"query-solution-config",description:"A Farris Container Component",properties:{fields:{description:"The unique identifier for a query solution",type:"array"}}},vr={title:"query-solution-config",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标识",title:"标识",type:"string",readonly:!0},code:{description:"编号",title:"控件编号",type:"string",readonly:!0},labelCode:{description:"标签",title:"标签",type:"string",readonly:!0},name:{description:"控件名称",title:"控件名称",type:"string"},controlType:{description:"控件类型",title:"控件类型",type:"select",editor:{type:"combo-list",data:[{value:"text",name:"文本"},{value:"single-number",name:"数值"},{value:"number",name:"数值区间"},{value:"dropdown",name:"下拉面板"},{value:"help",name:"弹出帮助"},{value:"combolist-help",name:"下拉帮助"},{value:"date",name:"日期区间"},{value:"radio",name:"单选"},{value:"input-group'",name:"富文本"}],valueField:"value",textField:"name",idField:"value"}}}},control:{description:"",title:"控件",properties:{}}}},Nv=new Map([["appearance",xe]]);function Vv(t,n,o){return n}const Nd={fields:{type:Array,default:[]},modelValue:{type:Array,default:[]},source:{type:String,default:"query-solution"}},Sv=me(Nd,wv,Nv,Vv,vr),$v={width:{type:String,default:"300px"},height:{type:Number,default:10},isWidePanel:{type:Boolean,default:!1},enableSearch:{type:Boolean,default:!0},mode:{type:String,default:"panel"},isPersitOpenState:{type:Boolean,default:!1},isShowPanel:{type:Boolean,default:!1},propertyName:{type:String,default:""},propertyConfig:{type:Array},propertyData:{type:Object,default:{}},showCloseBtn:{type:Boolean,default:!1},selectedTabId:{type:String,default:""},isWhiteTheme:{type:Boolean,default:!0},schema:{type:Object,default:{}}},Dv={category:{type:Object,default:{}},categoryKey:{type:String},propertyData:{type:Object,default:{}},valueChanged:{type:Function},triggerRefreshPanel:{type:Function}},kv={elementConfig:{type:Object,default:{}},category:{type:Object,default:{}}},Bv=e.defineComponent({name:"FPropertyPanelItem",props:kv,emits:["PropertyChange"],setup(t,n){var c;const o=e.ref((c=t.category)==null?void 0:c.categoryId),a=e.ref(t.elementConfig.propertyID),r=e.ref(t.elementConfig.propertyName),i=e.ref(t.elementConfig.editor),l=e.ref(t.elementConfig.propertyValue),s=e.computed(()=>({"farris-group-wrap":!0,"property-item":!0,"d-none":!t.elementConfig.visible()}));e.watch(()=>{var d;return(d=t.elementConfig)==null?void 0:d.propertyValue},d=>{l.value=d});function p(d){t.elementConfig.propertyValue=d,n.emit("PropertyChange",t.elementConfig.propertyID,d)}return()=>e.createVNode("div",{class:s.value},[e.createVNode(Xt,{id:a.value,customClass:`${o.value}-${a.value}`,label:r.value,editor:i.value,modelValue:l.value,onChange:p},null)])}}),Tv=e.defineComponent({name:"FPropertyPanelItemList",props:Dv,emits:["valueChanged","submitModal","triggerRefreshPanel"],setup(t,n){const o=e.ref(t.category);function a(u){if(!u.hideCascadeTitle)return e.createVNode("div",{class:"farris-input-wrap"},[e.createVNode("input",{title:"summary",type:"input",class:"form-control form-control-sm",value:u.cascadeSummary,readonly:!0},null)])}function r(u,f){f.isExpand=!f.isExpand}function i(u){return e.createVNode("div",{class:"landscape"},[e.createVNode("button",{title:"expand-button",class:["btn f-btn-collapse-expand f-btn-mx px-1",{"f-state-expand":u.isExpand}],onClick:f=>r(f,u)},[e.createVNode("span",null,null)])])}function l(u){return e.createVNode("div",{class:"f-section-formgroup-legend"},[e.createVNode("div",{class:"f-header px-0 my-0 col-form-label",style:"font-size: inherit;"},[e.createVNode("div",{class:"wrap"},[e.createVNode("span",{class:["f-icon mr-1",{"f-icon-arrow-60-right":!u.isExpand,"f-icon-arrow-60-down":u.isExpand}]},null),e.createVNode("span",{class:"farris-label-text"},[u.propertyName])])])])}function s(u){return`${t.categoryKey}_${u.propertyID}`}function p(u){return e.createVNode("div",{class:"px-2 mb-2"},[e.createVNode(Bv,{key:s(u),elementConfig:u,category:o.value},null)])}function c(u){var f;return e.createVNode("div",{class:"propertyCascadeItem farris-panel px-2 mb-2"},[e.createVNode("div",{class:["farris-panel-item card",{hidden:!u.isExpand}]},[e.createVNode("div",{class:"card-header",onClick:g=>r(g,u)},[e.createVNode("div",{class:"panel-item-title"},[e.createVNode("div",{class:"form-group farris-form-group line-item"},[l(u),a(u),i(u)])])]),e.createVNode("div",{class:["card-body",{hidden:!u.isExpand}]},[(f=u.cascadeConfig)==null?void 0:f.map(g=>p(g))])])])}e.watch(()=>t.category,()=>{o.value=t.category});function d(u){return u.propertyType==="cascade"?c:p}return()=>e.createVNode(e.Fragment,null,[o.value.properties.map(u=>d(u)(u))])}}),Fv=e.defineComponent({name:"FPropertyPanel",props:$v,emits:[],setup(t,n){const o=e.ref(t.width),a=e.ref(t.isWidePanel),r=e.ref(t.enableSearch),i=e.ref(t.mode),l=e.ref(t.isPersitOpenState),s=e.ref(t.isShowPanel),p=e.ref(),c=e.ref(),d=e.ref(t.showCloseBtn),u=e.ref(t.selectedTabId),f=e.ref(!0),g=e.ref(t.isWhiteTheme);let m=[],h=[];const y=e.ref(""),b=e.ref(),v=e.ref(),x=e.inject("SchemaService");let C=[],w;function N(){h=[],w&&w.categoryList&&Array.isArray(w.categoryList)&&w.categoryList.length>0&&w.categoryList.forEach(Z=>{if(Z.properties.forEach(re=>re.categoryId=Z.categoryId),Z.properties&&Array.isArray(Z.properties)&&Z.properties.length>0){const re=Z.properties.map(de=>(de.category=Z,de));h=h.concat(re)}})}function V(U){let Z=U.offsetTop,re=U.offsetParent;for(;re!==null;)Z+=re.offsetTop,re=re.offsetParent;return Z}function D(U,Z){U&&Z&&Object.keys(Z).length>0&&Object.keys(Z).forEach(re=>{var ge;const de=Z[re];(ge=U.style)==null||ge.setProperty(re,de)})}function k(){return h.filter(Z=>Z.visible?!!(Z.propertyID&&Z.propertyID.startsWith(y.value)||Z.propertyName&&(Z.propertyName.startsWith(y.value)||Z.propertyName.includes(y.value))):!1)}function B(U,Z,re){if(U===0){const de=V(Z),ie=V(re)-de-5;Z==null||Z.scroll({top:ie,behavior:"smooth"})}}function $(U){C&&C.length>0&&(C.forEach(re=>{re.style.cssText=""}),C=[]),y.value=U||y.value;const Z=document.querySelector(".panel-body");if(!y.value)b.value&&Z&&(Z.scrollTop=0);else if(N(),h&&h.length>0){const re=k();re&&re.length>0&&(re[0].category.status==="closed"&&(re[0].category.status="open"),setTimeout(()=>{re.forEach((de,ge)=>{const ie=de.propertyType==="cascade"?`.${de.categoryId}-${de.propertyID} div.col-form-label`:`.property-item .${de.categoryId}-${de.propertyID} label.col-form-label`,te=document.querySelector(ie);te&&(B(ge,Z,te),D(te,{color:"#5B89FE"}),C.push(te))})},50))}}function T(U){$(U)}function S(U){const{value:Z}=U.target;U.key==="Enter"&&T(Z)}function F(U){const{value:Z}=U.target;T(Z)}function A(){l.value||(f.value=!1),n.emit("closePropertyPanel")}function E(U){y.value="",$()}function I(U){!U.status||U.status==="open"?U.status="closed":U.status="open"}function R(){var U;if(m=[],!p.value||p.value.length===0){m=[{tabId:"default",tabName:"属性",categoryList:[]}],w=null;return}if((U=p==null?void 0:p.value)==null||U.forEach(Z=>{if(Z.tabId){const re=m.find(de=>de.tabId===Z.tabId);re?(re.categoryList.push(Z),re.hide&&(re.hide=Z.hide||Z.properties.length===0)):m.push({tabId:Z.tabId,tabName:Z.tabName,categoryList:[Z],hide:Z.hide||Z.properties.length===0})}else{const re=m.find(de=>de.tabId==="default");re?re.categoryList.push(Z):m.push({tabId:"default",tabName:"属性",categoryList:[Z]})}}),u.value){let Z=m==null?void 0:m.find(re=>re.tabId===u.value&&!re.hide);Z=Z||m[0]}else w=m[0];u.value=w==null?void 0:w.tabId}e.watch(()=>[t.schema,t.isShowPanel],()=>{c.value=t.schema,p.value=zs(c.value,x),R(),E(y.value)}),e.onMounted(()=>{R()});function O(U,Z){(!c.value||Z)&&(c.value=Z||t.schema),p.value=zs(c.value,x,U),R(),E(y.value)}function G(){i.value=i.value==="panel"?"sidebar":"panel",i.value==="panel"?(setTimeout(()=>{T()},100),o.value="300px"):o.value="41px"}function M(){if(d.value)return e.createVNode("div",{class:"title-actions"},[e.createVNode("div",{class:"monaco-toolbar"},[e.createVNode("div",{class:"monaco-action-bar animated"},[e.createVNode("ul",{class:"actions-container",role:"toolbar"},[e.createVNode("li",{class:"action-item",onClick:A},[e.createVNode("span",{class:"f-icon f-icon-close"},null)])])])])])}function j(){R()}function H(){if(r.value)return e.createVNode("div",{class:"search"},[e.createVNode("div",{class:"input-group f-state-editable border-left-0 border-right-0"},[e.createVNode("input",{class:"form-control f-utils-fill text-left pt-3 pb-3 textbox",type:"text",placeholder:"输入属性名称或编号快速定位",autocomplete:"off",onKeyup:U=>S(U),value:y.value},null),e.createVNode("div",{class:"input-group-append",style:"margin-left: 0px;"},[e.createVNode("span",{class:"input-group-text input-group-clear",style:[{display:y.value&&y.value.length>0?"":"none"}],onClick:U=>E()},[e.createVNode("i",{class:"f-icon modal_close"},null)]),e.createVNode("span",{class:"input-group-text input-group-clear",onClick:U=>F(U)},[e.createVNode("i",{class:"f-icon f-icon-search"},null)])])])])}function _(U){return`${t.propertyName}_${U.categoryId}`}function W(){var U;return e.createVNode("div",{class:"panel-body",ref:v},[e.createVNode("ul",{class:["property-grid",{"wide-panel":a.value}]},[(U=p.value)==null?void 0:U.map(Z=>e.createVNode("li",{key:_(Z)},[!Z.hide&&!Z.hideTitle&&e.createVNode("span",{class:"group-label",onClick:()=>I(Z)},[e.createVNode("span",{class:["f-icon mr-2",{"f-legend-show":Z.status==="closed"},{"f-legend-collapse":Z.status==="open"||Z.status===void 0}]},null),Z.categoryName]),e.createVNode("div",{hidden:Z.status==="closed"},[e.createVNode(Tv,{category:Z,propertyData:c.value,triggerRefreshPanel:j},null)])]))])])}function K(){if(i.value==="sidebar")return e.createVNode("div",{class:"side-panel h-100",onClick:G},[e.createVNode("i",{class:"f-icon f-icon-engineering w-100 icon"},null),e.createVNode("span",null,[e.createTextVNode("属性")])])}function z(){return{display:f.value?"block":"none",width:o.value}}function q(){return e.createVNode("div",{class:"switcher"},[e.createVNode("i",{class:"f-icon f-icon-exhale-discount",style:[{transform:i.value==="sidebar"?"none":"rotate(180deg)"}],onClick:G},null)])}function L(U){w=U,u.value=w.tabId,y.value=""}function X(){return m.map(U=>e.createVNode("div",{class:["title-label",{active:w&&w.tabId===U.tabId},{hidden:U.hide}],onClick:Z=>L(Z)},[e.createVNode("span",null,[U.tabName])]))}return e.onMounted(()=>{T(y.value)}),e.onBeforeMount(()=>{l.value&&(f.value=s.value),R(),T(y.value)}),n.expose({updatePropertyConfig:O}),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{ref:b,class:["property-panel",{"white-theme":g.value}],style:z()},[e.createVNode("div",{class:"propertyPanel panel flex-column",hidden:i.value!=="panel"},[e.createVNode("div",{class:["title d-flex",{"p-right":d.value},{only:m.length===1}]},[X(),M()]),H(),W()]),q(),K()])])}}),Vd={text:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"}},"single-number":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},maxValue:{description:"最大值",title:"最大值",type:"number"},minValue:{description:"最小值",title:"最小值",type:"number"}},number:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},maxValue:{description:"最大值",title:"最大值",type:"number"},minValue:{description:"最小值",title:"最小值",type:"number"}},dropdown:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},uri:{description:"uri",title:"uri",type:"string"},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"},valueType:{description:"值类型",title:"值类型",type:"select",editor:{type:"combo-list",data:[{value:"int",name:"整型"},{value:"string",name:"字符串"},{value:"boolean",name:"布尔"}]}},enumValue:{description:"枚举项",title:"枚举项",type:"string"}},help:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},helpId:{description:"帮助元数据",title:"帮助元数据",type:"string"},uri:{description:"uri",title:"uri",type:"string"},textField:{description:"文本字段",title:"文本字段",type:"string"},valueField:{description:"值字段",title:"值字段",type:"string"},idField:{description:"标识字段",title:"标识字段",type:"string"},mapFields:{description:"映射",title:"映射",type:"string"},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"},panelWidth:{description:"面板宽度",title:"面板宽度",type:"number"},panelHeight:{description:"面板高度",title:"面板宽度",type:"number"}},"combolist-help":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},helpId:{description:"帮助元数据",title:"帮助元数据",type:"string"},uri:{description:"uri",title:"uri",type:"string"},textField:{description:"文本字段",title:"文本字段",type:"string"},valueField:{description:"值字段",title:"值字段",type:"string"},idField:{description:"标识字段",title:"标识字段",type:"string"},mapFields:{description:"映射",title:"映射",type:"string"},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"},editable:{description:"允许编辑",title:"允许编辑",type:"boolean"},nosearch:{description:"任意输入",title:"任意输入",type:"boolean"},displayFields:{description:"展示字段",title:"展示字段",type:"string"},clearFields:{description:"值变化时清空字段",title:"值变化时清空字段",type:"string"},dialogTitle:{description:"面板标题",title:"面板标题",type:"string"},panelWidth:{description:"面板宽度",title:"面板高度",type:"number"},panelHeight:{description:"面板高度",title:"面板宽度",type:"number"},enableMultiFieldSearch:{description:"多字段查询",title:"多字段查询",type:"boolean"}},date:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"single-date":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"date-time":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"single-date-time":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},month:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"single-year":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},radio:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},horizontal:{description:"是否水平布局",title:"是否水平布局",type:"boolean"},showLabel:{description:"是否显示标签",title:"是否显示标签",type:"boolean"}},"input-group":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"}}};function Av(t,n,o,a){const r=e.ref(),i=e.ref("query-solution-config"),l=e.ref({}),s=e.ref(),p=e.ref(null);e.watch(o,m=>{if(m&&m.controlType){const h={...vr},{controlType:y}=m;h.categories.control.properties=Vd[y],p.value=a.value[m.id],r.value.updatePropertyConfig(h,p.value)}});function c(m){return{id:m.id,code:m.code||m.id,labelCode:m.name,name:m.name,controlType:m.controlType}}function d(m){const h={className:"",require:!1};let y={};switch(m){case"text":break;case"number":case"single-number":y={precision:2,maxValue:null,minValue:null};break;case"dropdown":y={uri:"",valueType:"string",enumValue:[],multiSelect:!1};break;case"help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"combolist-help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,editable:!1,nosearch:!1,clearFields:"",dialogTitle:"",panelWidth:null,panelHeight:null,enableMultiFieldSearch:!1};break;case"date":case"single-date":case"date-time":case"single-date-time":case"month":case"single-year":y={format:"yyyy-MM-dd",returnFormat:"yyyy-MM-dd"};break;case"radio":y={horizontal:!1,showLabel:!1};break}return{...h,...y}}function u(m){const h={className:"",require:!1,isExtend:!1};let y={};switch(m){case"text":break;case"number":case"single-number":y={precision:2,maxValue:null,minValue:null};break;case"dropdown":y={uri:"",valueType:"string",enumValue:[],multiSelect:!1};break;case"help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"combolist-help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,editable:!1,nosearch:!1,clearFields:"",dialogTitle:"",panelWidth:null,panelHeight:null,enableMultiFieldSearch:!1};break;case"date":case"single-date":case"date-time":case"single-date-time":case"month":case"single-year":y={format:"yyyy-MM-dd",returnFormat:"yyyy-MM-dd"};break;case"radio":y={horizontal:!1,showLabel:!1};break}return{...h,...y}}function f(m){return t.source==="query-solution"?d(m):u(m)}e.watch(()=>{var m;return(m=p.value)==null?void 0:m.controlType},m=>{const h=c(o.value);h.controlType=m,p.value={...h,...f(m)},a.value[o.value.id]=p.value;const y={...vr};y.categories.control.properties=Vd[m],r.value.updatePropertyConfig(y,p.value)});function g(){return e.createVNode(e.Fragment,null,[e.createVNode(Fv,{propertyConfig:s.value,ref:r,propertyName:i.value,schema:l.value},{default:()=>[e.createTextVNode(" ")]})])}return{renderPanel:g,PropertyPanelInstance:r,getExtendSchemaProerty:f,getBasicSchemaProerty:c}}const Iv=[{id:"text",name:"文本",controlType:"text"},{id:"single-number",name:"数值",controlType:"single-number"},{id:"number",name:"数值区间",controlType:"number"},{id:"dropdown",name:"下拉面板",controlType:"dropdown"},{id:"help",name:"弹出帮助",controlType:"help"},{id:"combolist-help",name:"下拉帮助",controlType:"combolist-help"},{id:"date",name:"日期区间",controlType:"date"},{id:"single-date",name:"单日期",controlType:"single-date"},{id:"date-time",name:"日期时间区间",controlType:"date-time"},{id:"single-date-time",name:"单日期时间",controlType:"single-date-time"},{id:"month",name:"月份",controlType:"month"},{id:"single-year",name:"年份",controlType:"single-year"},{id:"radio",name:"单选",controlType:"radio"},{id:"input-group",name:"富文本",controlType:"input-group"}];function Ev(t,n,o,a,r){const i=e.ref(!1),l=e.ref(),s=e.ref([]),p=e.ref([]),c=e.ref([]),{getExtendSchemaProerty:d,getBasicSchemaProerty:u}=r;function f(x){o.value=x.length?x[0]:null}function g(x){p.value=x}function m(){return Iv}function h(){c.value=m();const x={},C=qe.cloneDeep(t.modelValue)||[];p.value=[],c.value.forEach(w=>{const N=C.find(V=>V.id===w.id);N?(x[w.id]={id:N.id,code:N.code,labelCode:N.labelCode,name:N.name,controlType:N.editor.type,...N.editor},delete x[w.id].type,p.value.push(x[w.id])):x[w.id]={...u(w),...d(w.controlType)}}),a.value=x,i.value=!0,l.value=qe.cloneDeep(x),s.value=qe.cloneDeep(p.value)}function y(){const x=[];p.value.forEach(C=>{const w=a.value[C.id];if(w){const{id:N,code:V,labelCode:D,name:k,...B}=w;B.type=B.controlType,delete B.controlType;const $={id:N,code:V,labelCode:D,name:k,editor:B};x.push($)}}),n.emit("update:modelValue",x),s.value=qe.cloneDeep(p.value)}function b(){p.value=qe.cloneDeep(s.value)}function v(){return i.value?e.createVNode(Dn,{selections:p.value,"data-source":c.value,class:"query-solution-config-transfer",onActiveChange:f,onChange:g},null):null}return{renderTransfer:v,initData:h,selectPanels:p,confirm:y,cancel:b}}const xo=e.defineComponent({name:"FQuerySolutionConfig",props:Nd,emits:["update:modelValue"],setup(t,n){const o=e.ref(null),a=e.computed(()=>"共"+t.modelValue.length+"项"),r=e.ref(),i=Av(t,n,o,r),{renderPanel:l}=i,{renderTransfer:s,initData:p,confirm:c,cancel:d,selectPanels:u}=Ev(t,n,o,r,i),f={fitContent:!1,width:900,height:600,title:"筛选方案配置",acceptCallback:g,rejectCallback:m};function g(){c()}function m(){d()}function h(){return e.createVNode(e.Fragment,null,[s(),l()])}return e.onMounted(()=>{p()}),()=>e.createVNode(yt,{id:t.id,"button-behavior":"Modal","modal-options":f,modelValue:a.value,"onUpdate:modelValue":y=>a.value=y},{default:()=>[e.createVNode("div",{class:"query-solution-config d-flex f-utils-absolute-all"},[h()])]})}}),Mv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/filter-bar-config.schema.json",title:"filter-bar-config",description:"A Farris Container Component",properties:{fields:{description:"The unique identifier for a query solution",type:"array"}}},Pv={title:"filter-bar-config",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标识",title:"标识",type:"string",readonly:!0},code:{description:"编号",title:"控件编号",type:"string",readonly:!0},labelCode:{description:"标签",title:"标签",type:"string",readonly:!0},name:{description:"控件名称",title:"控件名称",type:"string"},controlType:{description:"控件类型",title:"控件类型",type:"select",editor:{type:"combo-list",data:[{value:"text",name:"文本"},{value:"single-number",name:"数值"},{value:"number",name:"数值区间"},{value:"dropdown",name:"下拉面板"},{value:"help",name:"弹出帮助"},{value:"combolist-help",name:"下拉帮助"},{value:"date",name:"日期区间"},{value:"radio",name:"单选"},{value:"input-group'",name:"富文本"}],valueField:"value",textField:"name",idField:"value"}}}},control:{description:"",title:"控件",properties:{}}}},Ov=new Map([["appearance",xe]]);function Rv(t,n,o){return n}const jv=me({fields:{type:Array,default:[]},modelValue:{type:Array,default:[]}},Mv,Ov,Rv,Pv),Sd={install(t){t.component(vo.name,vo)},register(t,n,o){t["filter-bar"]=vo,n["filter-bar"]=gd,t["filter-bar-config"]=xo,n["filter-bar-config"]=jv},registerDesigner(t,n,o){t["filter-bar"]=Cv,n["filter-bar"]=gd}},_v={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/field-selector.schema.json",title:"field-selector",description:"A Farris Input Component",type:"object",properties:{}},xr={disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},bindingType:{type:Object,default:{enable:!0,data:[{value:"Form",text:"绑定字段"},{value:"LocaleVariable",text:"绑定组件变量"},{value:"RemoteVariable",text:"绑定表单变量"}],value:"Form",textField:"text",valueField:"value"}},data:{type:Array,default:[]},idField:{type:String,default:"id"},columns:{type:Array,default:[{field:"code",title:"绑定字段"},{field:"name",title:"名称"},{field:"fieldType",title:"字段类型"}]},title:{type:String,default:"字段选择器"},modalWidth:{type:Number,default:600},modalHeight:{type:Number,default:500},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},bindingData:{type:Array,default:[]},textField:{type:String,default:"code"}},Hv=me(xr,_v),Lv=new Map([["appearance",xe],["column","columnOption"]]);function Wv(t,n,o){var u;const a=o.parentComponentInstance,r=a.schema.type,i=String(((u=a.schema.appearance)==null?void 0:u.class)||"").split(" "),l=r==="section"||r==="tab-page",s=i.includes("f-page-content-nav"),p=i.includes("f-page-main"),c=t.getSchemaByType("component");c.id=`${n.id}-component`,c.componentType="data-grid";let d="";return d+=l?"f-struct-data-grid-in-card f-struct-is-subgrid":"",d+=s?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",d+=p?"f-struct-data-grid f-struct-wrapper":"",c.appearance={class:d},c.contents=[n],c}function qv(t,n,o){const a=o.parentComponentInstance,r=String(a.schema.appearance.class||"").split(" "),i=r.includes("f-page-content-nav"),l=r.includes("f-page-main"),s=t.getSchemaByType("section");s.id=`${n.id}-section`;let p="";return p+=i?"f-section-in-nav ":"",p+=l?"f-section-in-managelist ":"",p+="f-section-grid",s.appearance={class:p},s.contents=[n],s}function zv(t,n,o){const a=t.getSchemaByType("content-container");return a.id=`${n.id}-layout`,a.appearance={class:"f-grid-is-sub f-utils-flex-column"},a.contents=[n],a}function Gv(t,n,o){const r=o.parentComponentInstance.schema.type,i=r==="section"||r==="tab-page";n.appearance={class:"f-component-grid"};const s=(i?zv:qv)(t,n,o);return Wv(t,s,o)}const Uv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-grid.schema.json",title:"tree-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"data-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disable:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}}},required:["id","type"]},Yv={title:"tree-grid",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},$d={columns:{type:Array,default:[]},displayField:{type:String,default:"name"},showLines:{type:Boolean,default:!1},columnOption:{type:Object},data:{type:Array,default:[]},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},pagination:{type:Object,default:{enable:!0,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},newDataItem:{type:Function,default:()=>{}},commandOption:{type:Object,default:{enable:!1,commands:[]}},hierarchy:{type:Object,default:{cascadeOption:{autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},autoCheckChildren:{type:Boolean,default:!1},showSetting:{type:Boolean,default:!1}};me($d,Uv,Lv,Gv,Yv);function Kv(t,n,o,a,r,i,l,s,p,c,d,u,f,g,m,h){const{calculateCellPositionInRow:y}=i,{columnContext:b,hasLeftFixedColumn:v,hasRightFixedColumn:x}=l,{gridDataStyle:C,leftFixedGridDataStyle:w,rightFixedGridDataStyle:N}=g,{renderDataRow:V}=Lp(t,n,b,h,s,p,c,d,u,f),D=[V];function k(F,A){const E=y(F);return h.value.filter(I=>I.visible!==!1).map(I=>D[I.type](I,E,A))}function B(){return e.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:w.value},[k(b.value.leftColumns.filter(F=>F.visible),"left")])])}function $(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:C.value},[k(b.value.primaryColumns.filter(F=>F.visible),"primary")])])}function T(){return e.createVNode("div",{ref:r,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:N.value},[k(b.value.rightColumns.filter(F=>F.visible),"right")])])}function S(){const F=[];return v.value&&F.push(B()),F.push($()),x.value&&F.push(T()),F}return{renderDataArea:S}}const Dd=e.defineComponent({name:"FTreeGrid",props:$d,emits:["selectionChange"],setup(t,n){var Ue;const a=e.ref(),r=e.ref(),i=e.ref(),l=e.ref(),s=e.ref(),p=e.ref([]),c=e.ref(!1),d=e.ref(((Ue=t.rowOption)==null?void 0:Ue.wrapContent)||!1),u=on(t),f=Cn(t,u),g=jo(),m=Zt(t),h=Qt(t,new Map,m,u),y=an(t,h,u,p,n),b=Si(t,p,u,y,n),v=e.computed(()=>t.disable),x=e.computed(()=>h.dataView.value.length),{containerStyleObject:C}=Ln(t),w=$s(t),N=e.ref(t.columns),{applyCommands:V}=w;V(N);const D=Wn(t),k=As(),{applyColumnSorter:B,columnContext:$,updateColumnRenderContext:T}=D;B(h,k);const S=Bs(t,$),F=nn(t,u),A=Lt(),E=en(t,F,A),I=tn(t,F,m,u,A,E),R=Jt(t,N,h,x,0,I),{getVisualData:O}=R,G=xn(t,$),M=Fs(t,y),{sidebarWidth:j}=M;p.value=O(0,x.value+0-1);const H=qn(t,h,p,$,R,x,0,j),{onWheel:_,dataGridWidth:W,viewPortHeight:K,viewPortWidth:z}=H,q=ks(t,$,r,z,S),{calculateColumnsSize:L}=q,X=Ts(),U=Ss(r,s,h,X,H),Z=zn(t,n,y,u),re=Ds(t,n,D,h,S,f,H),de=e.computed(()=>({"fv-grid":!0,"fv-grid-bordered":t.showBorder,"fv-datagrid-strip":t.showStripe})),ge=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":c.value,"fv-grid-wrap-content":d.value})),{renderDataArea:ie}=Kv(t,n,i,l,s,G,D,h,F,m,Z,y,b,H,R,p),{renderGridHeader:te,renderGridColumnResizeOverlay:J}=xs(t,r,l,s,D,h,re,U,g,X,q,S,y,M,k,H,z,p),{renderDataGridSidebar:le}=Ns(t,Z,y,M,H),{renderDisableMask:fe}=Cs(),{renderHorizontalScrollbar:Me}=ws(t,r,H),{renderVerticalScrollbar:Ie}=Vs(t,r,H);function Le(){var be,Xe;K.value=((be=i.value)==null?void 0:be.clientHeight)||0,W.value=((Xe=r.value)==null?void 0:Xe.clientWidth)||0,L()}e.onMounted(()=>{r.value&&(Yn.useResizeObserver(r.value,Le),L(),e.nextTick(()=>{r.value&&(W.value=r.value.clientWidth),i.value&&(z.value=i.value.clientWidth,K.value=i.value.clientHeight)}))}),e.onUnmounted(()=>{}),e.watch(z,()=>{r.value&&L()});function Ce(){const be=y.getSelectionRow();return be?be.dataIndex-1:-1}function pe(){const be=Ce();h.insertNewDataItem(be),p.value=O(0,x.value+0-1)}function he(){const be=Ce();h.insertNewChildDataItem(be),p.value=O(0,x.value+0-1)}function De(){const be=Ce(),Xe=b.getNextSelectableHierarchyItemId(be);h.removeHierarchyDataItem(be),p.value=O(0,x.value+0-1),Xe&&y.selectItemById(Xe)}function Ge(be){F.onEditingRow(be)}function se(be){F.acceptEditingRow(be)}function ye(be){F.cancelEditingRow(be)}function Ve(be){be&&(N.value=be,V(N),T(N.value),B(h,k),L())}function Pe(be){be&&(h.load(be),p.value=O(0,x.value+0-1))}function Ye(be){y.selectItemById(be)}function Ze(){return y.getSelectedItems()}return n.expose({addNewDataItem:pe,addNewChildDataItem:he,removeDataItem:De,editDataItem:Ge,acceptDataItem:se,cancelDataItem:ye,updateColumns:Ve,updateDataSource:Pe,selectItemById:Ye,getSelectedItems:Ze}),()=>e.createVNode("div",{ref:a,class:de.value,style:C.value,onWheel:_},[te(),e.createVNode("div",{ref:r,class:ge.value,onMouseover:()=>{c.value=!0},onMouseleave:()=>{c.value=!1}},[le(p),ie(),Me(),Ie()]),J(),v.value&&fe()])}});function Xv(t,n,o){return n}const Qv=new Map([["appearance",xe]]),Zv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-group.schema.json",title:"radio-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a radio-group",type:"string"},type:{description:"The type string of radio-group component",type:"string",default:"radio-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Jv={title:"radio-group",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Cr={id:String,disabled:{type:Boolean,default:!1},enumData:{type:Array,default:[{value:"example",name:"example1"}]},horizontal:{type:Boolean,default:!1},modelValue:{type:String,default:""},name:{type:String,default:""},tabIndex:Number,textField:{type:String,default:"name"},valueField:{type:String,default:"value"}},kd=me(Cr,Zv,Qv,Xv,Jv);function Bd(t,n,o){const a=e.computed(()=>!t.disabled),r=e.computed(()=>t.enumData||[]);function i(p){return p[t.valueField]}function l(p){return p[t.textField]}function s(p,c){if(a.value){const d=i(p);o.value!==d&&(o.value=d,n.emit("changeValue",d),n.emit("update:modelValue",d))}c.stopPropagation()}return{enumData:r,getValue:i,getText:l,onClickRadio:s}}const Co=e.defineComponent({name:"FRadioGroup",props:Cr,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),{enumData:a,onClickRadio:r,getValue:i,getText:l}=Bd(t,n,o),s=e.computed(()=>({"farris-checkradio-hor":t.horizontal}));return()=>e.createVNode("div",{class:["farris-input-wrap",s.value]},[a.value.map((p,c)=>{const d="radio_"+t.name+c;return e.createVNode("div",{class:"custom-control custom-radio"},[e.createVNode("input",{type:"radio",class:"custom-control-input",name:t.name,id:d,value:i(p),checked:i(p)===o.value,disabled:t.disabled,tabindex:t.tabIndex,onClick:u=>r(p,u)},null),e.createVNode("label",{class:"custom-control-label",for:d},[l(p)])])})])}}),wr=e.defineComponent({name:"FFieldSelectorContainer",props:xr,emits:["selected","bindingTypeChange"],setup(t,n){var g,m;const o=e.ref(t.data),a=e.ref(t.bindingType),r=e.ref(t.bindingData),i=e.ref(),l=e.computed(()=>a.value.data),s=e.computed(()=>{var h;return(h=r.value)==null?void 0:h.map(y=>y[t.idField])});e.watch(()=>t.data,h=>{o.value=h,i.value.updateDataSource(h)});const p={"f-utils-fill":!0,"p-2":(g=t.bindingType)==null?void 0:g.enable,"px-2":!((m=t.bindingType)!=null&&m.enable)};function c(h){n.emit("bindingTypeChange",h)}function d(h){r.value=h,n.emit("selected",h)}function u(){return e.createVNode("div",{class:"px-3"},[e.createVNode(Co,{name:"bindingType",textField:a.value.textField,valueField:a.value.valueField,enumData:l.value,modelValue:a.value.value,"onUpdate:modelValue":h=>a.value.value=h,horizontal:!0,onChangeValue:c},null)])}function f(){return e.createVNode(Dd,{ref:i,fit:!0,data:o.value,idField:t.idField,columns:t.columns,rowNumber:{enable:!1},columnOption:{fitColumns:!0},"selection-values":s.value,onSelectionChange:d},null)}return()=>e.createVNode("div",{class:"h-100 d-flex flex-column"},[a.value.enable&&u(),e.createVNode("div",{class:p,style:"position:relative"},[f()])])}}),Nr=e.defineComponent({name:"FFieldSelector",props:xr,emits:["selected","bindingTypeChanged"],setup(t,n){const o='<i class="f-icon f-icon-lookup"></i>',a=e.ref(t.bindingData),r=e.ref(t.columns),i=e.ref(t.data);e.watch(()=>t.data,f=>{i.value=f});const l=e.ref("");function s(f){a.value=f}function p(f){n.emit("bindingTypeChanged",f)}function c(){var g;let f="";if(a.value){const m=a.value.map(h=>h[t.textField]).join(t.separator);(g=t.bindingType)!=null&&g.enable?f=`${t.bindingType.value}:${m}`:f=m}l.value=f}function d(){return e.createVNode(wr,{data:i.value,bindingType:t.bindingType,columns:r.value,onSelected:s,bindingData:a.value,onBindingTypeChange:p},null)}e.onMounted(()=>{c()});const u={title:t.title,fitContent:!1,height:t.modalHeight,width:t.modalWidth,acceptCallback:()=>{n.emit("selected",a.value),c()},rejectCallback:()=>{}};return()=>e.createVNode(yt,{modelValue:l.value,"onUpdate:modelValue":f=>l.value=f,editable:!1,disabled:t.disabled,readonly:t.readonly,inputType:"text",enableClear:!1,buttonContent:o,buttonBehavior:"Modal",modalOptions:u},{default:()=>[e.createVNode("div",{class:"h-100 d-flex flex-column"},[d()])]})}}),ex={install(t){t.component(Nr.name,Nr),t.component(wr.name,wr)},register(t,n,o){t["field-selector"]=Nr,n["field-selector"]=Hv}};function tx(t,n,o){return n}const nx=new Map([["appearance",xe]]),ox={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/image-cropper.schema.json",title:"image-cropper",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for image-cropper",type:"string"},type:{description:"The type string of image-cropper",type:"string",default:"image-cropper"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},ax={title:"image-cropper",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},Vr={format:{type:String,default:"png"},maintainAspectRatio:{type:Boolean,default:!0},transform:{type:Object,default:{scale:0,rotate:0,flipH:!1,flipV:!1}},aspectRatio:{type:Number,default:1},resizeToWidth:{type:Number,default:0},resizeToHeight:{type:Number,default:0},cropperMinWidth:{type:Number,default:0},cropperMinHeight:{type:Number,default:0},canvasRotation:{type:Number,default:0},roundCropper:{type:Boolean,default:!0},onlyScaleDown:{type:Boolean,default:!1},imageQuality:{type:Number,default:92},autoCrop:{type:Boolean,default:!0},backgroundColor:{type:String,default:""},containWithinAspectRatio:{type:Boolean,default:!1},hideResizeSquares:{type:Boolean,default:!1},loadImageErrorText:{type:String,default:"图片加载错误"},alignImage:{type:String,default:"center"},disabled:{type:Boolean,default:!1},imageURL:{type:String,default:"./src/assets/image01.png"},imageChangedEvent:{type:Object,default:null},imageBase64:{type:String,default:""},imageFile:{type:Object,default:null},cropper:{type:Object,default:{x1:-100,y1:-100,x2:1e4,y2:1e4}}},Td=me(Vr,ox,nx,tx,ax);var wo=(t=>(t.Move="move",t.Resize="resize",t))(wo||{});function rx(){function t(r){switch(typeof r=="string"&&(r=n(r)),r){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}function n(r){const i=new DataView(o(r));if(i.getUint16(0,!1)!==65496)return-2;const l=i.byteLength;let s=2;for(;s<l;){if(i.getUint16(s+2,!1)<=8)return-1;const p=i.getUint16(s,!1);if(s+=2,p===65505){if(i.getUint32(s+=2,!1)!==1165519206)return-1;const c=i.getUint16(s+=6,!1)===18761;s+=i.getUint32(s+4,c);const d=i.getUint16(s,c);s+=2;for(let u=0;u<d;u++)if(i.getUint16(s+u*12,c)===274)return i.getUint16(s+u*12+8,c)}else{if((p&65280)!==65280)break;s+=i.getUint16(s,!1)}}return-1}function o(r){r=r.replace(/^data:([^;]+);base64,/gmi,"");const i=atob(r),l=i.length,s=new Uint8Array(l);for(let p=0;p<l;p++)s[p]=i.charCodeAt(p);return s.buffer}function a(r,i,l){const s=r.width,p=r.height;i=Math.round(i),l=Math.round(l);const c=s/i,d=p/l,u=Math.ceil(c/2),f=Math.ceil(d/2),g=r.getContext("2d");if(g){const m=g.getImageData(0,0,s,p),h=g.createImageData(i,l),{data:y}=m,b=h.data;for(let v=0;v<l;v++)for(let x=0;x<i;x++){const C=(x+v*i)*4,w=v*d;let N=0,V=0,D=0,k=0,B=0,$=0,T=0;const S=Math.floor(x*c),F=Math.floor(v*d);let A=Math.ceil((x+1)*c),E=Math.ceil((v+1)*d);A=Math.min(A,s),E=Math.min(E,p);for(let I=F;I<E;I++){const R=Math.abs(w-I)/f,O=x*c,G=R*R;for(let M=S;M<A;M++){const j=Math.abs(O-M)/u,H=Math.sqrt(G+j*j);if(H>=1)continue;N=2*H*H*H-3*H*H+1;const _=4*(M+I*s);T+=N*y[_+3],D+=N,y[_+3]<255&&(N=N*y[_+3]/250),k+=N*y[_],B+=N*y[_+1],$+=N*y[_+2],V+=N}}b[C]=k/V,b[C+1]=B/V,b[C+2]=$/V,b[C+3]=T/D}r.width=i,r.height=l,g.putImageData(h,0,0)}}return{resizeCanvas:a,getTransformationsFromExifData:t}}function ix(t,n,o,a){function r(f,g){t.value.x2=t.value.x1+(t.value.y2-t.value.y1)*o.value,f=Math.max(t.value.x2-n.value.width,0),g=Math.max(0-t.value.y1,0),(f>0||g>0)&&(t.value.x2-=g*o.value>f?g*o.value:f,t.value.y1+=g*o.value>f?g:f/o.value)}function i(f,g){t.value.x2=t.value.x1+(t.value.y2-t.value.y1)*o.value,f=Math.max(t.value.x2-n.value.width,0),g=Math.max(t.value.y2-n.value.height,0),(f>0||g>0)&&(t.value.x2-=g*o.value>f?g*o.value:f,t.value.y2-=g*o.value>f?g:f/o.value)}function l(f,g){t.value.y1=t.value.y2-(t.value.x2-t.value.x1)/o.value,f=Math.max(0-t.value.x1,0),g=Math.max(0-t.value.y1,0),(f>0||g>0)&&(t.value.x1+=g*o.value>f?g*o.value:f,t.value.y1+=g*o.value>f?g:f/o.value)}function s(f,g){t.value.y1=t.value.y2-(t.value.x2-t.value.x1)/o.value,f=Math.max(t.value.x2-n.value.width,0),g=Math.max(0-t.value.y1,0),(f>0||g>0)&&(t.value.x2-=g*o.value>f?g*o.value:f,t.value.y1+=g*o.value>f?g:f/o.value)}function p(f,g){t.value.y2=t.value.y1+(t.value.x2-t.value.x1)/o.value,f=Math.max(t.value.x2-n.value.width,0),g=Math.max(t.value.y2-n.value.height,0),(f>0||g>0)&&(t.value.x2-=g*o.value>f?g*o.value:f,t.value.y2-=g*o.value>f?g:f/o.value)}function c(f,g){t.value.y2=t.value.y1+(t.value.x2-t.value.x1)/o.value,f=Math.max(0-t.value.x1,0),g=Math.max(t.value.y2-n.value.height,0),(f>0||g>0)&&(t.value.x1+=g*o.value>f?g*o.value:f,t.value.y2-=g*o.value>f?g:f/o.value)}function d(){t.value.x2=t.value.x1+(t.value.y2-t.value.y1)*o.value,t.value.y2=t.value.y1+(t.value.x2-t.value.x1)/o.value;const f=Math.max(0-t.value.x1,0),g=Math.max(t.value.x2-n.value.width,0),m=Math.max(t.value.y2-n.value.height,0),h=Math.max(0-t.value.y1,0);(f>0||g>0||m>0||h>0)&&(t.value.x1+=m*o.value>f?m*o.value:f,t.value.x2-=h*o.value>g?h*o.value:g,t.value.y1+=h*o.value>g?h:g/o.value,t.value.y2-=m*o.value>f?m:f/o.value)}function u(){if(n.value.width&&n.value.height)switch(a.position){case"top":r(0,0);break;case"bottom":i(0,0);break;case"topleft":l(0,0);break;case"topright":s(0,0);break;case"right":case"bottomright":p(0,0);break;case"left":case"bottomleft":c(0,0);break;case"center":d();break}}return{checkAspectRatio:u}}function Fd(t,n){const{resizeCanvas:o,getTransformationsFromExifData:a}=rx(),r=e.inject("NotifyService"),i=e.ref(t.cropper),l=e.ref(t.transform),s=e.ref(t.cropperMinWidth),p=e.ref(t.maintainAspectRatio),c=e.ref(t.aspectRatio),d=e.ref(t.autoCrop),u=e.ref(t.backgroundColor),f=e.ref(t.resizeToWidth),g=e.ref(t.onlyScaleDown),m=e.ref(t.containWithinAspectRatio),h=e.ref(t.canvasRotation),y=e.ref(t.format),b=e.ref(t.imageQuality),v=e.ref(t.resizeToHeight),x=e.ref(t.cropperMinHeight),C=e.ref(""),w=e.ref(!0),N=e.ref(!0);let V,D,k=0,B,$,T;const S=e.ref(null),F=e.ref(""),A=e.ref(""),E=e.ref("0px"),I=e.ref(),R=e.ref({width:100,height:100}),O=wo;let G,M=20,j=20,H=!1,_={rotate:0,flip:!1},W={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0};const K=e.ref(t.imageChangedEvent),z=e.ref(t.imageURL),q=e.ref(t.imageBase64),L=e.ref(t.imageFile);function X(){A.value="scaleX("+(l.value.scale||1)*(l.value.flipH?-1:1)+")scaleY("+(l.value.scale||1)*(l.value.flipV?-1:1)+")rotate("+(l.value.rotate||0)+"deg)"}function U(){N.value=!1,I.value=null,C.value="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",W={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},R.value={width:0,height:0},V={width:0,height:0},D={width:0,height:0},i.value.x1=-100,i.value.y1=-100,i.value.x2=1e4,i.value.y2=1e4}function Z(oe){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(oe)}function re(){if(h.value+=_.rotate,m.value&&V.width&&V.height){if(h.value%2){const ne=V.width*c.value,ce=V.height/c.value;return{width:Math.max(V.height,ne),height:Math.max(V.width,ce)}}const oe=V.height*c.value,Y=V.width/c.value;return{width:Math.max(V.width,oe),height:Math.max(V.height,Y)}}return h.value%2?{height:V.width,width:V.height}:{width:V.width,height:V.height}}function de(){h.value+=_.rotate;const oe=re(),Y=document.createElement("canvas");oe.width&&oe.height&&(Y.width=oe.width,Y.height=oe.height);const ne=Y.getContext("2d");return V.width&&V.height&&T&&(ne==null||ne.setTransform(_.flip?-1:1,0,0,1,Y.width/2,Y.height/2),ne==null||ne.rotate(Math.PI*(h.value/2)),ne==null||ne.drawImage(T,-V.width/2,-V.height/2)),Y.toDataURL()}function ge(oe){return new Promise(Y=>{G=oe,C.value=oe,I.value=new Image,I.value.onload=()=>{var ne,ce;D.width=(ne=I.value)==null?void 0:ne.naturalWidth,D.height=(ce=I.value)==null?void 0:ce.naturalHeight,Y()},I.value.src=G})}function ie(){if(!T||!T.complete||!_)return Promise.reject(new Error("No image loaded"));const oe=de();return ge(oe)}function te(oe){const Y=ne=>{r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片上传错误,请重试"}]}),w.value=!1,H=!0,n.emit("loadImageFailed"),T=null,F.value=""};T=new Image,T.onload=()=>{F.value=oe,_=a(oe),V.width=T==null?void 0:T.naturalWidth,V.height=T==null?void 0:T.naturalHeight,ie().then(()=>{H=!1}).catch(Y)},T.onerror=Y,T.src=oe}function J(oe,Y){Z(Y)?(H=!1,te(oe)):(r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片类型不正确,请重试"}]}),w.value=!1,H=!0,n.emit("loadImageFailed"))}function le(oe){const Y=new FileReader;Y.onload=ne=>J(ne.target.result,oe.type),Y.readAsDataURL(oe)}function fe(oe){const Y=new Image;Y.onerror=()=>{r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片加载错误,请重试"}]}),w.value=!1,H=!0,n.emit("loadImageFailed")},Y.onload=()=>{H=!1;const ne=document.createElement("canvas"),ce=ne.getContext("2d");ne.width=Y.width,ne.height=Y.height,ce==null||ce.drawImage(Y,0,0),te(ne.toDataURL())},Y.crossOrigin="anonymous",Y.src=oe}function Me(){return S.value&&S.value&&S.value.offsetWidth>0}function Ie(){if(S.value){const oe=S.value;R.value.width=oe.offsetWidth,R.value.height=oe.offsetHeight,E.value="calc(50% - "+R.value.width/2+"px)"}}function Le(){I.value&&R.value.width&&(M=s.value>0?Math.max(20,s.value/I.value.width*R.value.width):20)}function Ce(){p.value?j=Math.max(20,M/c.value):x.value>0&&I.value&&R.value.height?j=Math.max(20,x.value/I.value.height*R.value.height):j=20}function pe(){I.value?(Le(),Ce()):(M=20,j=20)}function he(){const oe=S.value,Y=e.ref({x1:0,x2:0,y1:0,y2:0});if(oe&&D.width&&D.height){const ne=D.width/oe.offsetWidth;Y.value={x1:Math.round(i.value.x1*ne),y1:Math.round(i.value.y1*ne),x2:Math.round(i.value.x2*ne),y2:Math.round(i.value.y2*ne)},m.value||(Y.value.x1=Math.max(Y.value.x1,0),Y.value.y1=Math.max(Y.value.y1,0),Y.value.x2=Math.min(Y.value.x2,D.width),Y.value.y2=Math.min(Y.value.y2,D.height))}return Y.value}function De(){h.value+=_.rotate;const oe=S.value,Y=e.ref({x1:0,x2:0,y1:0,y2:0});if(oe&&D.height&&D.width&&V.height&&V.width){const ne=D.width/oe.offsetWidth;let ce,ue;h.value%2?(ce=(D.width-V.height)/2,ue=(D.height-V.width)/2):(ce=(D.width-V.width)/2,ue=(D.height-V.height)/2),Y.value={x1:Math.round(i.value.x1*ne)-ce,y1:Math.round(i.value.y1*ne)-ue,x2:Math.round(i.value.x2*ne)-ce,y2:Math.round(i.value.y2*ne)-ue},m.value||(Y.value.x1=Math.max(Y.value.x1,0),Y.value.y1=Math.max(Y.value.y1,0),Y.value.x2=Math.min(Y.value.x2,D.width),Y.value.y2=Math.min(Y.value.y2,D.height))}return Y.value}function Ge(oe,Y){if(f.value>0){if(!g.value||oe>f.value)return f.value/oe}else if(v.value>0&&(!g.value||Y>v.value))return v.value/Y;return 1}function se(){return Math.min(1,Math.max(0,b.value/100))}function ye(oe){return oe.toDataURL("image/"+y.value,se())}function Ve(){if(S.value&&S.value&&I.value!=null){const oe=he(),Y=oe.x2-oe.x1,ne=oe.y2-oe.y1,ce=document.createElement("canvas");ce.width=Y,ce.height=ne;const ue=ce.getContext("2d");if(ue){u.value!=null&&(ue.fillStyle=u.value,ue.fillRect(0,0,Y,ne));const Te=(l.value.scale||1)*(l.value.flipH?-1:1),Oe=(l.value.scale||1)*(l.value.flipV?-1:1);D.width&&D.height&&(ue.setTransform(Te,0,0,Oe,D.width/2,D.height/2),ue.translate(-oe.x1/Te,-oe.y1/Oe),ue.rotate((l.value.rotate||0)*Math.PI/180),ue.drawImage(I.value,-D.width/2,-D.height/2));const Je={width:Y,height:ne,imagePosition:oe,cropperPosition:{...i.value}};m.value&&(Je.offsetImagePosition=De());const ft=Ge(Y,ne);return ft!==1&&(Je.width=Math.round(Y*ft),Je.height=p.value?Math.round(Je.width/c.value):Math.round(ne*ft),o(ce,Je.width,Je.height)),Je.base64=ye(ce),n.emit("imageCropped",Je),Je}}return null}function Pe(){d.value&&Ve()}function Ye(){const oe=S.value;if(oe){if(!p.value)i.value.x1=0,i.value.x2=oe.offsetWidth,i.value.y1=0,i.value.y2=oe.offsetHeight;else if(oe.offsetWidth/c.value<oe.offsetHeight){i.value.x1=0,i.value.x2=oe.offsetWidth;const Y=oe.offsetWidth/c.value;i.value.y1=(oe.offsetHeight-Y)/2,i.value.y2=i.value.y1+Y}else{i.value.y1=0,i.value.y2=oe.offsetHeight;const Y=oe.offsetHeight*c.value;i.value.x1=(oe.offsetWidth-Y)/2,i.value.x2=i.value.x1+Y}Pe(),N.value=!0}}function Ze(){k>40?(r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片加载超时,请重试"}]}),H=!0,w.value=!1,n.emit("loadImageFailed")):Me()?(H=!1,Ie(),pe(),Ye(),n.emit("cropperReady",{...R.value})):(k++,setTimeout(()=>Ze(),50))}function Ue(){I.value!=null&&(w.value=!1,n.emit("imageLoaded"),k=0,setTimeout(()=>Ze()))}function be(){const oe=S.value;(R.value.width!==(oe==null?void 0:oe.offsetWidth)||R.value.height!==(oe==null?void 0:oe.offsetHeight))&&R.value.width&&R.value.height&&oe&&(i.value.x1=i.value.x1*oe.offsetWidth/R.value.width,i.value.x2=i.value.x2*oe.offsetWidth/R.value.width,i.value.y1=i.value.y1*oe.offsetHeight/R.value.height,i.value.y2=i.value.y2*oe.offsetHeight/R.value.height)}const Xe=()=>{be(),Ie(),pe()},st=()=>{clearTimeout($),$=setTimeout(Xe,300)};e.onMounted(()=>{window.addEventListener("resize",st),z.value&&(U(),w.value=!0,fe(z.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",st)});function bt(){W.active&&(W.active=!1,Pe())}function lt(oe){return(oe.touches&&oe.touches[0]?oe.touches[0].clientX:oe.clientX)||0}function ct(oe){return(oe.touches&&oe.touches[0]?oe.touches[0].clientY:oe.clientY)||0}function $t(oe,Y,ne=null){W&&W.active||(oe.preventDefault&&oe.preventDefault(),W={active:!0,type:Y,position:ne,clientX:lt(oe),clientY:ct(oe),...i.value})}function wt(oe=!1){i.value.x1<0&&(i.value.x2-=oe?i.value.x1:0,i.value.x1=0),i.value.y1<0&&(i.value.y2-=oe?i.value.y1:0,i.value.y1=0),i.value.x2>R.value.width&&(i.value.x1-=oe?i.value.x2-R.value.width:0,i.value.x2=R.value.width),i.value.y2>R.value.height&&(i.value.y1-=oe?i.value.y2-R.value.height:0,i.value.y2=R.value.height)}function We(oe){const Y=lt(oe)-W.clientX,ne=ct(oe)-W.clientY;i.value.x1=W.x1+Y,i.value.y1=W.y1+ne,i.value.x2=W.x2+Y,i.value.y2=W.y2+ne}const{checkAspectRatio:Dt}=ix(i,R,c,W);function Tt(oe){const Y=lt(oe)-W.clientX,ne=ct(oe)-W.clientY;switch(W.position){case"left":i.value.x1=Math.min(W.x1+Y,i.value.x2-M);break;case"topleft":i.value.x1=Math.min(W.x1+Y,i.value.x2-M),i.value.y1=Math.min(W.y1+ne,i.value.y2-j);break;case"top":i.value.y1=Math.min(W.y1+ne,i.value.y2-j);break;case"topright":i.value.x2=Math.max(W.x2+Y,i.value.x1+M),i.value.y1=Math.min(W.y1+ne,i.value.y2-j);break;case"right":i.value.x2=Math.max(W.x2+Y,i.value.x1+M);break;case"bottomright":i.value.x2=Math.max(W.x2+Y,i.value.x1+M),i.value.y2=Math.max(W.y2+ne,i.value.y1+j);break;case"bottom":i.value.y2=Math.max(W.y2+ne,i.value.y1+j);break;case"bottomleft":i.value.x1=Math.min(W.x1+Y,i.value.x2-M),i.value.y2=Math.max(W.y2+ne,i.value.y1+j);break;case"center":const{scale:ce}=oe,ue=Math.abs(W.x2-W.x1)*ce,Te=Math.abs(W.y2-W.y1)*ce,{x1:Oe}=i.value,{y1:Je}=i.value;i.value.x1=Math.min(W.clientX-ue/2,i.value.x2-M),i.value.y1=Math.min(W.clientY-Te/2,i.value.y2-j),i.value.x2=Math.max(W.clientX+ue/2,Oe+M),i.value.y2=Math.max(W.clientY+Te/2,Je+j);break}p.value&&Dt()}function Ke(oe){W&&W.active&&(oe.stopPropagation&&oe.stopPropagation(),oe.preventDefault&&oe.preventDefault(),clearTimeout(B),B=setTimeout(()=>{W.type===wo.Move?(We(oe),wt(!0)):W.type===wo.Resize&&(Tt(oe),wt(!1))},300))}return e.watch(K,oe=>{U(),oe&&oe.target&&oe.target.files&&oe.target.files.length>0&&(w.value=!0,le(oe.target.files[0]))}),e.watch(z,oe=>{oe?(U(),w.value=!0,fe(oe)):(r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片路径为空"}]}),w.value=!1,H=!0)}),e.watch(q,oe=>{U(),w.value=!0,te(oe)}),e.watch(L,oe=>{U(),oe&&(w.value=!0,le(oe))}),e.watch(()=>[t.containWithinAspectRatio,t.canvasRotation,t.cropper,t.aspectRatio,t.transform,t.imageChangedEvent],([oe,Y,ne,ce,ue,Te],[Oe,Je,ft,Nt,Vt,pt])=>{T&&T.complete&&_&&(oe!==Oe||Y!==Je)&&ie(),ne!==ft&&(Ie(),pe(),wt(!1),Pe()),ce!==Nt&&N.value&&Ye(),ue!==Vt&&(X(),Pe()),Te!==pt&&(K.value=Te)}),{uploadError:H,imageVisible:N,backgroundColor:u,sourceImage:S,safeImgDataUrl:C,safeTransformStyle:A,maxSize:R,cropper:i,marginLeft:E,moveTypes:O,isLoading:w,startMove:$t,imageLoadedInView:Ue,moveStop:bt,moveImg:Ke}}const Sr=e.defineComponent({name:"FImageCropper",props:Vr,emits:["imageCropped","imageLoaded","cropperReady","loadImageFailed"],setup(t,n){const o=e.ref(t.alignImage),a=e.ref(t.roundCropper),r=e.ref(t.hideResizeSquares),i=e.ref(t.loadImageErrorText),l=e.ref(t.disabled),s=e.ref(null),{uploadError:p,imageVisible:c,backgroundColor:d,sourceImage:u,safeImgDataUrl:f,safeTransformStyle:g,maxSize:m,cropper:h,marginLeft:y,moveTypes:b,isLoading:v,startMove:x,imageLoadedInView:C,moveStop:w,moveImg:N}=Fd(t,n);function V($){return e.createVNode("span",{class:`farris-image-cropper-resize-bar ${$}`,onMousedown:e.withModifiers(T=>x(T,b.Resize,$),["prevent"])},null)}function D($){return e.createVNode("div",null,[e.createVNode("span",{class:`farris-image-cropper-resize-bar ${$}`,onMousedown:e.withModifiers(T=>x(T,b.Resize,$),["prevent"])},[e.createVNode("span",{class:"farris-image-cropper-square"},null)]),e.createVNode("span",{class:"farris-image-cropper-resize top"},[e.createVNode("span",{class:"farris-image-cropper-square"},null)])])}const k=["top","right","bottom","left"].map($=>V($)),B=["topleft","topright","bottomright","bottomleft"].map($=>D($));return()=>e.createVNode("div",{class:["farris-image-cropper-frame",{"farris-image-cropper-disabled":l.value}],style:{"text-align":o.value},onMousemove:e.withModifiers($=>N($),["prevent"]),onTouchmove:e.withModifiers($=>N($),["prevent"]),onMouseup:e.withModifiers(()=>w(),["prevent"]),onTouchend:e.withModifiers(()=>w(),["prevent"])},[!p&&e.createVNode("div",{ref:s,class:"farris-image-cropper",style:[{background:c.value?d.value:""}]},[f.value&&e.createVNode("img",{title:"farris-source-image",ref:u,class:"farris-source-image",style:[{visibility:c.value?"visible":"hidden"},{transform:g.value}],src:f.value,onLoad:()=>C()},null),m.value&&e.createVNode("div",{class:"farris-image-overlay",style:[{width:`${m.value.width||0}px`},{height:`${m.value.height||0}px`},{"margin-left":o.value==="center"?y.value:""}]},null),c.value&&e.createVNode("div",{class:["farris-image-cropper-wrapper",{"farris-image-cropper-rounded":a.value}],style:[{top:`${h.value.y1}px`},{left:`${h.value.x1}px`},{width:`${h.value.x2-h.value.x1}px`},{height:`${h.value.y2-h.value.y1}px`},{visibility:c.value?"visible":"hidden"},{"margin-left":o.value==="center"?y.value:""}],tabindex:"0"},[e.createVNode("div",{class:"farris-image-cropper-move",onMousedown:e.withModifiers($=>x($,b.Move,"topleft"),["prevent"])},null),!r.value&&e.createVNode("div",null,[B,k])])]),v.value&&e.createVNode("div",{class:"farris-image-cropper-loading"},[e.createVNode("div",{class:"farris-image-cropper-loading-spinner"},null)]),p&&e.createVNode("div",{class:"farris-image-cropper-error"},[i.value])])}}),sx=e.defineComponent({name:"FImageCropperDesign",props:Vr,emits:["imageCropped","imageLoaded","cropperReady","loadImageFailed"],setup(t,n){const o=e.ref(t.alignImage),a=e.ref(t.roundCropper),r=e.ref(t.hideResizeSquares),i=e.ref(t.loadImageErrorText),l=e.ref(t.disabled),s=e.ref(null),{uploadError:p,imageVisible:c,backgroundColor:d,sourceImage:u,safeImgDataUrl:f,safeTransformStyle:g,maxSize:m,cropper:h,marginLeft:y,moveTypes:b,isLoading:v,startMove:x,imageLoadedInView:C,moveStop:w,moveImg:N}=Fd(t,n),V=e.ref(),D=e.inject("design-item-context"),k=ve(V,D);e.onMounted(()=>{V.value.componentInstance=k}),n.expose(k.value);function B(F){return e.createVNode("span",{class:`farris-image-cropper-resize-bar ${F}`,onMousedown:e.withModifiers(A=>x(A,b.Resize,F),["prevent"])},null)}function $(F){return e.createVNode("div",null,[e.createVNode("span",{class:`farris-image-cropper-resize-bar ${F}`,onMousedown:e.withModifiers(A=>x(A,b.Resize,F),["prevent"])},[e.createVNode("span",{class:"farris-image-cropper-square"},null)]),e.createVNode("span",{class:"farris-image-cropper-resize top"},[e.createVNode("span",{class:"farris-image-cropper-square"},null)])])}const T=["top","right","bottom","left"].map(F=>B(F)),S=["topleft","topright","bottomright","bottomleft"].map(F=>$(F));return()=>e.createVNode("div",{ref:V,class:["farris-image-cropper-frame",{"farris-image-cropper-disabled":l.value}],style:{"text-align":o.value},onMousemove:e.withModifiers(F=>N(F),["prevent"]),onTouchmove:e.withModifiers(F=>N(F),["prevent"]),onMouseup:e.withModifiers(()=>w(),["prevent"]),onTouchend:e.withModifiers(()=>w(),["prevent"])},[!p&&e.createVNode("div",{ref:s,class:"farris-image-cropper",style:[{background:c.value?d.value:""}]},[f.value&&e.createVNode("img",{title:"farris-source-image",ref:u,class:"farris-source-image",style:[{visibility:c.value?"visible":"hidden"},{transform:g.value}],src:f.value,onLoad:()=>C()},null),m.value&&e.createVNode("div",{class:"farris-image-overlay",style:[{width:`${m.value.width||0}px`},{height:`${m.value.height||0}px`},{"margin-left":o.value==="center"?y.value:""}]},null),c.value&&e.createVNode("div",{class:["farris-image-cropper-wrapper",{"farris-image-cropper-rounded":a.value}],style:[{top:`${h.value.y1}px`},{left:`${h.value.x1}px`},{width:`${h.value.x2-h.value.x1}px`},{height:`${h.value.y2-h.value.y1}px`},{visibility:c.value?"visible":"hidden"},{"margin-left":o.value==="center"?y.value:""}],tabindex:"0"},[e.createVNode("div",{class:"farris-image-cropper-move",onMousedown:e.withModifiers(F=>x(F,b.Move,"topleft"),["prevent"])},null),!r.value&&e.createVNode("div",null,[S,T])])]),v.value&&e.createVNode("div",{class:"farris-image-cropper-loading"},[e.createVNode("div",{class:"farris-image-cropper-loading-spinner"},null)]),p&&e.createVNode("div",{class:"farris-image-cropper-error"},[i.value])])}}),Ad={install(t){t.component(Sr.name,Sr)},register(t,n,o){t["image-cropper"]=Sr,n["image-cropper"]=Td},registerDesigner(t,n,o){t["image-cropper"]=sx,n["image-cropper"]=Td}},lx=e.defineComponent({name:"FInputGroupDesign",props:Ha,emits:["updateExtendInfo","clear","valueChange","clickHandle","blurHandle","focusHandle","enterHandle","iconMouseEnter","iconMouseLeave","keyupHandle","keydownHandle","inputClick"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.modelValue),r=Sc(t,n,o,a),{inputGroupClass:i,inputType:l,inputGroupStyle:s}=r,p=Nc(t),{shouldShowAppendedButton:c}=p,d=$c(t,n,r),{onMouseEnter:u,onMouseLeave:f}=d,g=Vc(t,n,l,p),m=Yc(t,n,g,r),h=Kc(t,n,p,d,g);return()=>e.createVNode("div",{id:"inputGroup",class:i.value,style:s.value,onMouseenter:u,onMouseleave:f},[m(),c.value&&h()])}}),Id={install(t){t.component(go.name,go)},register(t,n,o){t["input-group"]=go,n["input-group"]=wc},registerDesigner(t,n,o){t["input-group"]=lx,n["input-group"]=wc}},Ed=new Map([["appearance",xe]]);function Md(t,n,o){return n}const cx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/layout.schema.json",title:"layout",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for layout component",type:"string"},type:{description:"The type string of layout component",type:"string",default:"layout"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},collapsable:{description:"",type:"boolean",default:!1},resizable:{description:"",type:"boolean",default:!0},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},dx={title:"layout",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}},behavior:{description:"Basic Infomation",title:"行为",properties:{collapsable:{description:"",title:"可收折",type:"boolean"},resizable:{description:"",title:"可调整尺寸",type:"boolean"}}}}},$r={customClass:{type:String,defaut:""}},Pd=me($r,cx,Ed,Md,dx);function Od(t){const n=e.ref(-1),o=e.ref(-1),a=e.ref(0),r=e.ref(0),i=e.ref(!1),l=e.ref(!1),s=e.computed(()=>({display:i.value?"block":"none",left:`${a.value}px`,cursor:"e-resize"})),p=e.computed(()=>({display:l.value?"block":"none",top:`${r.value}px`,cursor:"n-resize"})),c=e.computed(()=>({display:l.value||i.value?"block":"none"}));function d(y,b,v,x){const C=t.value;if(C){const{left:w,right:N,width:V}=C.getBoundingClientRect();let D=y.clientX-w;x==="right"&&(D=N-y.clientX),D>b&&(D=b),D<v&&(D=v),x==="right"&&(D=V-D),a.value=D}}function u(y,b,v,x){const C=t.value;if(C){const{top:w,bottom:N,height:V}=C.getBoundingClientRect();let D=y.clientY-w;x==="bottom"&&(D=N-y.clientY),D>b&&(D=b),D<v&&(D=v),x==="bottom"&&(D=V-D),r.value=D}}function f(){const y=t.value;if(y){const{width:b,height:v}=y.getBoundingClientRect();return{width:b,height:v}}return null}function g(){const y=t.value;return y?Array.from(y.querySelectorAll("[data-position]")).reduce((b,v)=>{const x=v.getAttribute("data-position");return b=Object.assign(b,{[x]:v}),b},{}):null}function m(y,b){const v=f(),x=g();if(v&&x){const C=x==null?void 0:x.right,w=x==null?void 0:x.left;if(y==="left"&&w)return C?v.width-C.clientWidth-b:v.width-b;if(y==="right"&&C)return w?v.width-w.clientWidth-b:v.width-b}}function h(y,b){const v=f(),x=g();if(v&&x){const C=x==null?void 0:x.bottom,w=x==null?void 0:x.top;if(y==="top"&&w)return C?v.height-C.clientHeight-b:v.height-b;if(y==="bottom"&&C)return w?v.height-w.clientHeight-b:v.height-b}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:p,resizeOverlayStyle:c,showHorizontalResizeHandle:i,showVerticalResizeHandle:l,horizontalResizeBarPosition:n,verticalResizeBarPosition:o,verticalResizeHandleOffset:r,horizontalResizeHandleOffset:a,draggingHorizontalResizeHandle:d,draggingVerticalResizeHandle:u,getPanelMaxHeight:h,getPanelMaxWidth:m}}const Dr=e.defineComponent({name:"FLayout",props:$r,emits:[],setup(t,n){const o=e.ref(),a=Od(o),{horizontalResizeHandleStyle:r,verticalResizeHandleStyle:i,resizeOverlayStyle:l}=a;return e.provide("layout",{useResizeHandleComposition:a}),()=>e.createVNode("div",{class:"f-layout",ref:o},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-layout-resize-overlay",style:l.value},null),e.createVNode("div",{class:"f-layout-horizontal-resize-proxy",style:r.value},null),e.createVNode("div",{class:"f-layout-vertical-resize-proxy",style:i.value},null)])}}),ux={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/layout-pane.schema.json",title:"layout-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a layout pane",type:"string"},type:{description:"The type string of layout paney",type:"string",default:"layout-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},height:{description:"",type:"number"},position:{description:"",type:"string",default:"left",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},width:{description:"",type:"number"},visible:{description:"",type:"number",default:!0}}},fx={title:"layout-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"enum"},width:{description:"",type:"number",title:"宽度"},height:{description:"",type:"number",title:"高度"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{collapsable:{description:"",type:"boolean",title:"允许收折"},position:{description:"",type:"enum",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}},resizeable:{description:"",type:"boolean",title:"允许调整尺寸"},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},kr={customClass:{type:String,defaut:""},width:{type:Number,default:-1},height:{type:Number,default:-1},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100}},Rd=me(kr,ux,Ed,Md,fx);function jd(t,n,o,a,r){const{horizontalResizeBarPosition:i,horizontalResizeHandleOffset:l,showHorizontalResizeHandle:s,showVerticalResizeHandle:p,verticalResizeBarPosition:c,verticalResizeHandleOffset:d,draggingHorizontalResizeHandle:u,draggingVerticalResizeHandle:f,getPanelMaxHeight:g,getPanelMaxWidth:m}=r;let h="",y,b,v;function x(N){if((h==="left"||h==="right")&&b){const{left:V}=b.getBoundingClientRect(),{width:D}=y.getBoundingClientRect(),k=N.clientX-V;let B=h==="left"?(D||0)+(k-i.value):(D||0)-(k-i.value);B=o.value>0?Math.max(o.value,B):B;const $=m(h,o.value);$!=null&&(B=$>B?B:$),t.value=B}if((h==="top"||h==="bottom")&&b){const{top:V}=b.getBoundingClientRect(),{height:D}=y.getBoundingClientRect(),k=N.clientY-V;let B=h==="top"?(D||0)+(k-c.value):(D||0)-(k-c.value);B=a.value>0?Math.max(a.value,B):B;const $=g(h,a.value);$!=null&&(B=$>B?B:$),n.value=B}l.value=0,d.value=0,i.value=-1,c.value=-1,s.value=!1,p.value=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",x),document.body.style.userSelect="",h="",y=null,b=null}function C(N,V,D){if(h=V,y=D,s.value=!0,b=N.composedPath().find(B=>(B.className||"").split(" ")[0]==="f-layout"),b){const{left:B}=b.getBoundingClientRect(),$=N.clientX-B;l.value=$,i.value=$;const T=m(h,o.value)||0;v=S=>u(S,T,o.value,h),document.addEventListener("mousemove",v),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}function w(N,V,D){if(h=V,y=D,p.value=!0,b=N.composedPath().find(B=>(B.className||"").split(" ")[0]==="f-layout"),b){const{top:B}=b.getBoundingClientRect();d.value=N.clientY-B,c.value=N.clientY-B;const $=g(h,a.value)||0;v=T=>f(T,$,a.value,h),document.addEventListener("mousemove",v),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}return{onClickHorizontalResizeBar:C,onClickVerticalResizeBar:w}}const Br=e.defineComponent({name:"FLayoutPane",props:kr,emits:[],setup(t,n){const o=e.ref(t.minHeight<=0?100:t.minHeight),a=e.ref(t.minWidth<=0?100:t.minWidth),r=e.ref(t.width<=0?100:t.width),i=e.ref(t.height<=100?100:t.height),l=e.ref(Math.max(o.value,i.value)),s=e.ref(Math.max(a.value,r.value)),p=e.ref(),c=e.ref(t.position),d=e.ref(t.resizable);e.watch(()=>t.resizable,w=>{d.value=w});const u=e.inject("layout"),{useResizeHandleComposition:f}=u,g=jd(s,l,a,o,f),{onClickHorizontalResizeBar:m,onClickVerticalResizeBar:h}=g,y=e.computed(()=>({"f-layout-resize-bar":!0,"f-layout-resize-bar-e":c.value==="left","f-layout-resize-bar-n":c.value==="bottom","f-layout-resize-bar-s":c.value==="top","f-layout-resize-bar-w":c.value==="right"})),b=e.computed(()=>c.value!=="center"&&d.value);function v(w,N){(N==="left"||N==="right")&&m(w,N,p.value),(N==="top"||N==="bottom")&&h(w,N,p.value)}const x=e.computed(()=>{const w={"f-layout-pane":!0,"f-page-content-nav":c.value==="left"||c.value==="right","f-page-content-main":c.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((N,V)=>(N[V]=!0,N),w),w}),C=e.computed(()=>{const w={};return(s.value&&c.value==="left"||c.value==="right")&&(w.width=`${s.value}px`),(l.value&&c.value==="bottom"||c.value==="top")&&(w.height=`${l.value}px`),t.visible||(w.display="none"),w});return()=>e.createVNode("div",{ref:p,class:x.value,style:C.value,"data-position":c.value},[n.slots.default&&n.slots.default(),b.value&&e.createVNode("span",{class:y.value,onMousedown:w=>v(w,c.value)},null)])}});function px(t,n){function o(){return!1}return{canAccepts:o}}const mx=e.defineComponent({name:"FLayoutDesign",props:$r,emits:[],setup(t,n){var d;const o=e.ref(),a=e.inject("design-item-context"),r=px(a.schema,(d=a.parent)==null?void 0:d.schema),i=ve(o,a,r);i.value.canNested=!1;const l=Od(o),{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:p,resizeOverlayStyle:c}=l;return e.provide("layout",{useResizeHandleComposition:l}),e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{class:"f-layout f-page-content",ref:o},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-layout-resize-overlay",style:c.value},null),e.createVNode("div",{class:"f-layout-horizontal-resize-proxy",style:s.value},null),e.createVNode("div",{class:"f-layout-vertical-resize-proxy",style:p.value},null)])}});function hx(t,n){function o(i){return!!qt().basalDragulaRuleForContainer(i)}function a(i,l,s){return s}function r(){const i=["f-layout-pane"];return(t.position==="left"||t.position==="right")&&i.push("f-page-content-nav"),t.position==="center"&&i.push("f-page-content-main"),i.join(" ")}return{canAccepts:o,getDesignerClass:r,onAcceptNewChildElement:a}}const gx=e.defineComponent({name:"FLayoutPaneDesign",props:kr,emits:[],setup(t,n){var w;const o=e.ref(),a=e.ref(),r=e.inject("design-item-context"),i=hx(r.schema,(w=r.parent)==null?void 0:w.schema),l=ve(a,r,i);l.value.canNested=!1,l.value.canMove=!1,l.value.canDelete=!1,e.onMounted(()=>{a.value.componentInstance=l}),n.expose(l.value);const s=e.ref(Math.max(t.minHeight,t.height)),p=e.ref(Math.max(t.minWidth,t.width)),c=e.ref(t.minHeight),d=e.ref(t.minWidth),u=e.ref(t.position),f=e.inject("layout"),{useResizeHandleComposition:g}=f,m=jd(p,s,d,c,g),{onClickHorizontalResizeBar:h,onClickVerticalResizeBar:y}=m,b=e.computed(()=>({"f-layout-resize-bar":!0,"f-layout-resize-bar-e":u.value==="left","f-layout-resize-bar-n":u.value==="bottom","f-layout-resize-bar-s":u.value==="top","f-layout-resize-bar-w":u.value==="right"}));function v(N,V){(V==="left"||V==="right")&&h(N,V,o.value),(V==="top"||V==="bottom")&&y(N,V,o.value)}const x=e.computed(()=>{const N={"f-layout-pane":!0,"f-page-content-nav":u.value==="left"||u.value==="right","f-page-content-main":u.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((V,D)=>(V[D]=!0,V),N),N}),C=e.computed(()=>{const N={flex:"1"};return(p.value&&u.value==="left"||u.value==="right")&&(N.width=`${p.value}px`),(s.value&&u.value==="bottom"||u.value==="top")&&(N.height=`${s.value}px`),N});return()=>e.createVNode("div",{ref:o,class:x.value,style:C.value},[e.createVNode("div",{ref:a,class:"drag-container","data-dragref":`${r.schema.id}-container`},[n.slots.default&&n.slots.default()]),e.createVNode("span",{class:b.value,onMousedown:N=>v(N,u.value)},null)])}}),_d={install(t){t.component(Dr.name,Dr),t.component(Br.name,Br)},register(t,n,o){t.layout=Dr,n.layout=Pd,t["layout-pane"]=Br,n["layout-pane"]=Rd},registerDesigner(t,n,o){t.layout=mx,n.layout=Pd,t["layout-pane"]=gx,n["layout-pane"]=Rd}},yx=new Map([["appearance",xe]]);function bx(t,n,o){return n}const vx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/list-nav.schema.json",title:"list-nav",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a list-nav",type:"string"},type:{description:"The type string of list-nav component",type:"string",default:"list-nav"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},xx={title:"list-nav",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}}}},Tr={position:{Type:String,default:"left"},title:{Type:String,default:"业务支付申请来源1"},width:{Type:Number,default:200},height:{Type:Number,default:320}},Hd=me(Tr,vx,yx,bx,xx),Fr=e.defineComponent({name:"FListNav",props:Tr,emits:[],setup(t,n){let o=!1;const a=e.ref(t.position),r=e.ref(t.width),i=e.ref(t.title),l=e.computed({set(d){d!=null&&o!==d&&(o=d)},get(){return o}}),s=e.ref(t.height),p=e.computed(()=>l.value?"0px":`${r.value}px`),c=e.computed(()=>l.value?"0px":`${s.value}px`);return()=>e.createVNode("div",{class:`f-list-nav f-list-nav-${a.value}`},[e.createVNode("div",{class:"f-list-nav-in",style:[{width:p.value},{height:c.value}]},[e.createVNode("div",null,[e.createVNode("div",{class:"f-list-nav-main"},[n.slots.navHeader&&e.createVNode("div",{class:"f-list-nav-header"},[n.slots.navHeader()]),!n.slots.navHeader&&i.value&&e.createVNode("div",{class:"f-list-nav-header"},[e.createVNode("div",{class:"f-list-nav-title"},[i.value])])]),n.slots.navContent&&e.createVNode("div",{class:"f-list-nav-content"},[n.slots.navContent()]),n.slots.navFooter&&e.createVNode("div",{class:"f-list-nav-footer"},[n.slots.navFooter()])])])])}});function Cx(t,n){const o=zt(),a=e.ref(!1),r=e.ref(!1);let i=!0,l=!1,s,p=!1;function c(x){return s&&s.componentClassList&&s.componentClassList.includes("f-form-layout")&&s.componentClassList.includes("farris-form")?x.sourceType==="control"&&x.controlCategory==="input"||x.sourceType==="move"&&x.controlType==="form-group":!0}function d(x){return!(!qt().basalDragulaRuleForContainer(x)||!i||!c(x))}function u(){a.value=!1,r.value=!1;const x=t,C=x.appearance&&x.appearance.class||"",w=C.split(" "),N=x.contents||[],V=N.length?N[0]:null,D=V&&V.appearance?V.appearance.class:"",k=D?D.split(" "):[],B=N.length?N.reduce((I,R)=>{const O=R&&R.appearance?R.appearance.class:"",G=O?O.split(" "):[];return I.push(...G),I},[]):[],$=n,T=$&&$.appearance&&$.appearance.class||"",S=T?T.split(" "):[];s={componentClass:C,componentClassList:w,childContents:N,firstChildContent:V,firstChildClass:D,firstChildClassList:k,parent:$,parentClass:T,parentClassList:S,children:N,childrenClassList:B};const{canAccept:F,fixed:A,hidePadding:E}=o.getRuleValue(w[0],s);return i=F,l=E,p=A,!0}function f(x){e.nextTick()}function g(){return t.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function m(x,C){const w=t;if((w.appearance&&w.appearance.class||"").split(" ").includes("f-form-layout")){const{label:D}=x,k=mt("form-group");return k.editor=C,k.label=D,k}return C}function h(x,C,w){const N=t;if((N.appearance&&N.appearance.class||"").split(" ").includes("f-form-layout")){const k=String(x.innerText),B=mt("form-group");return B.editor=w,B.label=k,B}return w}function y(){return!p}function b(){return!p}function v(){return l}return{canAccepts:d,resolveComponentContext:u,getStyles:g,onAcceptNewChildElement:h,onAcceptMovedChildElement:f,onResolveNewComponentSchema:m,triggerBelongedComponentToMoveWhenMoved:a,triggerBelongedComponentToDeleteWhenDeleted:r,checkCanMoveComponent:y,checkCanDeleteComponent:b,hideNestedPaddingInDesginerView:v}}const wx=e.defineComponent({name:"FListNavDesign",props:Tr,emits:[],setup(t,n){var m;const o=e.ref(),a=e.inject("design-item-context"),r=Cx(a.schema,(m=a.parent)==null?void 0:m.schema),i=ve(o,a,r);i.value.canMove=!1,i.value.canNested=!1;let l=!1;const s=e.ref(t.position),p=e.ref(t.listNavWidth),c=e.ref(t.title),d=e.computed({set(h){h!=null&&l!==h&&(l=h)},get(){return l}}),u=e.ref(t.height),f=e.computed(()=>d.value?"0px":`${p.value}px`),g=e.computed(()=>d.value?"0px":`${u.value}px`);return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{ref:o,class:`f-list-nav f-list-nav-${s.value}`},[e.createVNode("div",{class:"f-list-nav-in",style:[{width:f.value},{height:g.value}]},[e.createVNode("div",null,[e.createVNode("div",{class:"f-list-nav-main"},[n.slots.navHeader&&e.createVNode("div",{class:"f-list-nav-header"},[n.slots.navHeader()]),!n.slots.navHeader&&c.value&&e.createVNode("div",{class:"f-list-nav-header"},[e.createVNode("div",{class:"f-list-nav-title"},[c.value])])]),n.slots.navContent&&e.createVNode("div",{class:"f-list-nav-content"},[n.slots.navContent()]),n.slots.navFooter&&e.createVNode("div",{class:"f-list-nav-footer"},[n.slots.navFooter()])])])])}}),Ld={install(t){t.component(Fr.name,Fr)},register(t,n,o){t["list-nav"]=Fr,n["list-nav"]=Hd},registerDesigner(t,n,o){t["list-nav"]=wx,n["list-nav"]=Hd}};function Wd(t,n,o,a,r,i,l,s,p,c){const d=e.ref(t.size),u=e.ref(t.textField),f=e.ref(t.titleField),g=e.ref(t.multiSelect),m=e.ref(t.disableField),{onMouseenterItem:h,onMouseoverItem:y,onMouseoutItem:b}=i,{getKey:v,listViewItemClass:x,onCheckItem:C,onClickItem:w}=l,N=e.computed(()=>({margin:d.value==="small"?"0.25rem 0":"10px 0"}));function V(D,k,B){return D.checked=s.findIndexInSelectedItems(D)>-1,e.createVNode("li",{class:x(D,k),id:v(D,k),key:v(D,k),onClick:$=>w($,D,k),onMouseenter:$=>h($,D,k),onMouseover:$=>y($,D,k),onMouseout:$=>b($,D,k)},[g.value&&e.createVNode("div",{class:"f-list-select",onClick:$=>$.stopPropagation()},[e.createVNode(dn,{id:"list-"+v(D,k),customClass:"listview-checkbox",disable:D[m.value]||!D.checked,modelValue:D.checked,"onUpdate:modelValue":$=>D.checked=$,onChange:$=>C(D,k)},null)]),e.createVNode("div",{class:"f-list-content"},[e.createVNode("div",{style:N.value,title:D.raw[f.value]||D.raw[u.value]},[D.raw[u.value]])])])}return{renderItem:V}}function Nx(t,n,o,a,r,i,l,s,p,c){const d=e.ref(t.multiSelect),u=e.ref(t.disableField),{onMouseenterItem:f,onMouseoverItem:g,onMouseoutItem:m}=i,{getKey:h,listViewItemClass:y,onCheckItem:b,onClickItem:v}=l;function x(w,N,V){return n.slots.content?e.createVNode(e.Fragment,null,[n.slots.content&&n.slots.content({item:w.raw,index:N,selectedItem:V})]):e.createVNode("div",{style:"margin: 10px 0;"},[w.raw.name])}function C(w,N,V){return e.createVNode("li",{class:y(w,N),id:h(w,N),key:h(w,N),onClick:D=>v(D,w,N),onMouseenter:D=>f(D,w,N),onMouseover:D=>g(D,w,N),onMouseout:D=>m(D,w,N)},[d.value&&e.createVNode("div",{class:"f-list-select",onClick:D=>D.stopPropagation()},[e.createVNode(dn,{id:"list-"+h(w,N),customClass:"listview-checkbox",disable:w[u.value]||!w.checked,modelValue:w.checked,"onUpdate:modelValue":D=>w.checked=D,onChange:D=>b(w,N)},null)]),e.createVNode("div",{class:"f-list-content"},[x(w,N,V)])])}return{renderItem:C}}function Vx(t,n,o,a,r,i,l,s,p,c){const d=e.ref(t.multiSelect),u=e.ref(t.disableField),{onMouseenterItem:f,onMouseoverItem:g,onMouseoutItem:m}=i,{getKey:h,listViewItemClass:y,onCheckItem:b,onClickItem:v}=l,{dragstart:x,dragenter:C,dragover:w,dragend:N}=a,{removeItem:V}=p,D=e.computed(()=>({margin:d.value?"10px 0":"10px 0px 10px 14px"}));function k(S){return e.createVNode("div",{style:D.value},[S.raw.name])}function B(){return n.slots.itemContent?n.slots.itemContent:k}const $=B();function T(S,F,A){return e.createVNode("li",{class:y(S,F),id:h(S,F),key:h(S,F),onClick:E=>v(E,S,F),onMouseenter:E=>f(E,S,F),onMouseover:E=>g(E,S,F),onMouseout:E=>m(E,S,F),draggable:"true",onDragstart:E=>x(E,S,F),onDragenter:E=>C(E,F),onDragend:E=>N(E,S),onDragover:E=>w(E,F)},[d.value&&e.createVNode("div",{class:"f-list-select",onClick:E=>E.stopPropagation()},[e.createVNode(dn,{id:"list-"+h(S,F),customClass:"listview-checkbox",disable:S[u.value]||!S.checked,modelValue:S.checked,"onUpdate:modelValue":E=>S.checked=E,onChange:E=>b(S,F)},null)]),e.createVNode("div",{class:"f-list-content"},[$(S)]),e.createVNode("div",{class:"f-list-remove",onClick:E=>V(F)},[e.createVNode("div",{class:"f-list-remove-icon"},[e.createVNode("i",{class:"f-icon f-icon-remove_face"},null)])]),e.createVNode("div",{class:"f-list-handle"},[e.createVNode("div",null,[e.createVNode("i",{class:"f-icon f-icon-drag-vertical"},null)])])])}return{renderItem:T}}function Sx(t,n,o,a,r,i,l,s,p,c){var h;const d=e.ref(((h=t.group)==null?void 0:h.groupFields)||[]),{collpaseGroupIconClass:u}=r,{toggleGroupRow:f}=c;function g(y,b){b.collapse=!b.collapse,o.value=f(b.collapse?"collapse":"expand",b,o.value)}function m(y,b,v){return y.layer>-1&&e.createVNode("div",{class:"f-navlookup-recentHeader"},[e.createVNode("div",{class:"fv-grid-group-row-icon",onClick:x=>g(x,y)},[e.createVNode("span",{class:u(y)},null)]),e.createVNode("div",{class:"f-navlookup-recommandLabel"},[y.raw[d.value[y.layer]]])])}return{renderItem:m}}function $x(){const t=e.ref(-1),n=e.ref(""),o=e.ref(-1),a=e.ref(!1);function r(c,d,u){o.value=u}function i(c,d,u){a.value||(o.value=u)}function l(c,d,u){o.value=-1}function s(){a.value=!0}function p(){a.value=!1}return{activeIndex:t,focusedItemId:n,hoverIndex:o,onMouseenterItem:r,onMouseoverItem:i,onMouseoutItem:l,resumeHover:p,suspendHover:s}}function Dx(t,n,o,a){const r=e.ref(t.idField),{dataView:i}=o,l=e.ref(-1),s=e.ref(!1),{activeIndex:p,focusedItemId:c,hoverIndex:d,resumeHover:u,suspendHover:f}=a;function g(b,v,x){b.stopPropagation(),f(),v&&setTimeout(()=>{l.value=x,s.value=!0,v.moving=!0})}function m(b,v){if(b.preventDefault(),l.value!==v){const x=i.value[l.value],C=i.value;C.splice(l.value,1),C.splice(v,0,x),l.value=v}}function h(b,v){b.preventDefault(),b.dataTransfer&&(b.dataTransfer.dropEffect="move")}function y(b,v){v&&(v.moving=!1),i.value.forEach((x,C)=>{x.__fv_index__=C}),s.value=!1,u(),d.value=v.raw.__fv_index__,p.value=v.raw.__fv_index__,c.value=v.raw[r.value],n.emit("change",i.value),n.emit("activeChange",v)}return{dragstart:g,dragenter:m,dragover:h,dragend:y,isDragging:s}}function kx(t,n,o){const{dataView:a}=o;function r(i){if(i>-1&&i<a.value.length){const l=a.value.splice(i,1);n.emit("removeItem",l[0])}}return{removeItem:r}}function Bx(t,n,o,a,r,i){const l=e.ref(t.idField),s=e.ref(t.disableField),p=e.ref(t.draggable),c=e.ref(t.itemClass),d=e.ref(t.selection.multiSelect??!1),u=e.ref(t.selection.multiSelectMode);e.ref(!0);const{isDragging:f}=a,{activeIndex:g,focusedItemId:m,hoverIndex:h}=r,{clearSelection:y,getSelectedItems:b,toggleSelectItem:v}=i,x=e.ref(b());function C($,T){const S={"f-list-view-group-item":!0,"f-list-view-draggable-item":p.value,"f-un-click":!$.checked,"f-un-select":!!$.raw[s.value],"f-listview-active":$.raw.__fv_index__===g.value,"f-listview-hover":!f.value&&T===h.value,moving:!!$.moving};return c.value.split(" ").reduce((A,E)=>(A[E]=!0,A),S),S}function w($,T){return $.raw[l.value]||""}const N=e.computed(()=>!d.value);function V($,T){!$.checked||$.raw[s.value]||(N.value&&(m.value=$.raw[l.value]),v($))}const D=e.computed(()=>d.value&&u.value==="OnCheckClearByClick"),k=e.computed(()=>!d.value||d.value&&(u.value==="OnCheckAndClick"||u.value==="OnClick"));function B($,T,S){if(T.raw[s.value]){$.preventDefault(),$.stopPropagation();return}m.value=T.raw[l.value],g.value=S,D.value&&y(o.value),k.value&&v(T),n.emit("clickItem",{data:x.value,index:S}),n.emit("activeChange",x.value)}return{getKey:w,listViewItemClass:C,onCheckItem:V,onClickItem:B}}function qd(t,n,o,a,r,i,l){const s=e.ref(t.view),p=e.ref(t.view==="CardView"),c=e.ref({}),d=e.ref("暂无数据"),u=$x(),f=Dx(t,n,a,u),g=kx(t,n,a),m=Bx(t,n,o,f,u,i),h=e.computed(()=>({"f-list-view-group":!0,"d-flex":p.value,"flex-wrap":p.value})),y=e.computed(()=>!!o.value&&o.value.length>0),b=e.computed(()=>o.value.length===0),v=e.computed(()=>b.value&&!n.slots.empty);function x(){return s.value==="SingleView"?Wd:s.value==="DraggableView"?Vx:(s.value==="ContentView"||s.value==="CardView")&&n.slots.content?Nx:Wd}const C=x(),{renderItem:w}=C(t,n,o,f,r,u,m,i,g,l),{renderItem:N}=Sx(t,n,o,f,r,u,m,i,g,l),V=[w,N];function D(){return o.value.filter($=>$.visible!==!1).map(($,T)=>V[$.type]($,T,c))}function k(){return e.createVNode("div",{class:"f-list-view-emptydata"},[e.createVNode("p",{class:"f-empty-title"},[d.value])])}function B(){return e.createVNode("ul",{class:h.value,style:"list-style: none;"},[y.value&&D(),v.value&&k(),n.slots.empty&&n.slots.empty()])}return{renderListArea:B}}function zd(t,n,o){function a(){return n.slots.header&&e.createVNode("div",{class:"f-list-view-header"},[n.slots.header()])}return{renderHeader:a}}function No(t,n,o){const a=e.ref(t.headerClass),r=e.ref(t.placeholder),i=e.ref(""),l=e.computed(()=>!i.value),s=e.computed(()=>!!i.value);function p(f){i.value=""}e.watch(i,f=>{o.search(f)});const c=e.computed(()=>{const f={"form-group":!0,"farris-form-group":!0};return a.value&&a.value.split(" ").reduce((m,h)=>(m[h]=!0,m),f),f});function d(f){}function u(){return e.createVNode("div",{class:"f-list-view-header",onClick:e.withModifiers(()=>d,["prevent","stop"])},[e.createVNode("div",{class:c.value},[e.createVNode("div",{class:"farris-input-wrap"},[e.createVNode("div",{class:"f-cmp-inputgroup"},[e.createVNode("div",{class:"input-group f-state-editable"},[e.withDirectives(e.createVNode("input",{class:"form-control f-utils-fill text-left","onUpdate:modelValue":f=>i.value=f,name:"input-group-value",type:"text",placeholder:r.value,autocomplete:"off"},null),[[e.vModelText,i.value]]),e.createVNode("div",{class:"input-group-append"},[s.value&&e.createVNode("span",{class:"input-group-text input-group-clear",onClick:f=>p()},[e.createVNode("i",{class:"f-icon f-icon-close-circle"},null)]),l.value&&e.createVNode("span",{class:"input-group-text"},[e.createVNode("span",{class:"f-icon f-icon-search"},null)])])])])])])])}return{renderHeader:u}}const Tx=e.defineComponent({name:"FListViewDesign",props:lo,emits:["checkValuesChange","clickItem","selectionChange","removeItem","change"],setup(t,n){const o=e.ref(),a=e.ref(!0),r=e.ref(!1),i=e.ref([]),l=0,s=e.ref(t.columns),p=on(t),c=Zt(t),d=Cn(t,p),u=Qt(t,new Map,c,p),f=an(t,u,p,i,n),g=Zl(t,o),m=e.ref(),h=e.inject("design-item-context"),y=ve(m,h),b=e.computed(()=>u.dataView.value.length),v=nn(t,p),x=Lt(),C=en(t,{},x),w=tn(t,v,c,p,x,C),N=_o(t,p,C,w),V=Ho(t,p,C,w),D=Jt(t,s,u,b,l,w,N,V),{getVisualData:k}=D;i.value=k(0,b.value+l-1),e.onMounted(()=>{m.value.componentInstance=y}),n.expose(y.value);const B=e.computed(()=>{const I={"f-list-view":!0,"f-list-view-multiple":t.multiSelect};return t.size!=="default"&&(I[`${t.size}-item`]=!0),I}),$=e.computed(()=>!!n.slots.footer||a.value);function T(){return t.header==="SearchBar"?No:t.header==="ContentHeader"?zd:No}const S=T(),{renderHeader:F}=S(t,n,g),{renderListArea:A}=qd(t,n,i,u,d,f,D);function E(I){t.multiSelect&&(I.preventDefault(),I.stopPropagation())}return()=>e.createVNode("div",{class:B.value,onClick:E},[F(),e.createVNode("div",{ref:o,class:"f-list-view-content",onMouseover:()=>{r.value=!0},onMouseleave:()=>{r.value=!1}},[A()]),$.value&&e.createVNode("div",{class:"f-list-view-footer"},[n.slots.footer&&n.slots.footer()])])}}),Ar=e.defineComponent({name:"FListViewTable",props:lo,emits:["outputValue","currentEvent","selectionChanged"],setup(t,n){const o=[{name:"任芳",code:"1.PO20198989001",date:"2024-02-19",desc:"导游1",amount:63.85,avatar:"./assets/avatar1.png"},{name:"戴秀兰",code:"2.PO20198989002",date:"2024-03-17",desc:"导游2",amount:60.13,avatar:"./assets/avatar2.png"},{name:"尹磊",code:"3.PO20198989003",date:"2024-04-09",desc:"导游3",amount:36.54,avatar:"./assets/avatar3.png"},{name:"赵明",code:"4.PO20198989004",date:"2024-03-27",desc:"导游4",amount:52.76,avatar:"./assets/avatar4.png"},{name:"吕洋",code:"5.PO20198989005",date:"2024-11-17",desc:"导游5",amount:84.13,avatar:"./assets/avatar5.png"}],a=e.computed(()=>t.data.length>0?t.data:o);return()=>{var r;return e.createVNode(e.Fragment,null,[(r=a.value)==null?void 0:r.map(i=>e.createVNode("div",{class:"f-template-listview-row"},[e.createVNode("div",{class:"list-view-item-title"},[e.createVNode("div",{class:"item-title-img"},[e.createVNode("img",{src:i.avatar,alt:"",style:"width: 44px;"},null)]),e.createVNode("div",{class:"item-title"},[e.createVNode("p",{class:"item-title-heading"},[i.code]),e.createVNode("p",{class:"item-title-text"},[i.desc])])]),e.createVNode("div",{class:"list-view-item-content"},[e.createVNode("div",{class:"content-message"},[e.createVNode("div",{class:"ower"},[e.createVNode("p",null,[e.createTextVNode("创建人")]),e.createVNode("p",{class:"con"},[i.name])]),e.createVNode("div",{class:"date"},[e.createVNode("p",null,[e.createTextVNode("创建时间")]),e.createVNode("p",{class:"con"},[i.date])])])])]))])}}}),Fx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/list-view-table.schema.json",title:"list-view-table",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for list-view-table",type:"string"},type:{description:"The type string of list-view-table",type:"string",default:"list-view-table"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Ax={title:"list-view-table",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Gd={data:{type:Array,default:[]}},Ud=me(Gd,Fx,Kl,Xl,Ax),Ix=e.defineComponent({name:"FListViewTableDesign",props:Gd,emits:["outputValue","currentEvent","selectionChanged"],setup(t,n){const o=[{name:"任芳",code:"1.山东大学",date:"2024-02-19",desc:"山东济南",amount:63.85,avatar:"./assets/avatar1.png"},{name:"戴秀兰",code:"2.山东建筑大学",date:"2024-03-17",desc:"山东济南",amount:60.13,avatar:"./assets/avatar2.png"},{name:"尹磊",code:"3.山东财经大学",date:"2024-04-09",desc:"山东济南",amount:36.54,avatar:"./assets/avatar3.png"},{name:"赵明",code:"4.北京大学",date:"2024-03-27",desc:"北京市",amount:52.76,avatar:"./assets/avatar4.png"},{name:"吕洋",code:"5.南京大学",date:"2024-11-17",desc:"江苏南京",amount:84.13,avatar:"./assets/avatar5.png"},{name:"吕娥",code:"6.清华大学",date:"2024-03-17",desc:"北京市",amount:52.76,avatar:"./assets/avatar6.png"},{name:"赵强",code:"7.浙江大学",date:"2024-08-01",desc:"浙江杭州",amount:84.13,avatar:"./assets/avatar7.png"}],a=e.computed(()=>t.data.length>0?t.data:o),r=e.ref(),i=e.inject("design-item-context"),l=ve(r,i);return e.onMounted(()=>{r.value.componentInstance=l}),n.expose(l.value),()=>{var s;return e.createVNode("div",{ref:r},[(s=a.value)==null?void 0:s.map(p=>e.createVNode("div",{class:"f-template-listview-row"},[e.createVNode("div",{class:"list-view-item-title"},[e.createVNode("div",{class:"item-title-img"},[e.createVNode("img",{src:p.avatar,alt:"",style:"width: 44px;"},null)]),e.createVNode("div",{class:"item-title"},[e.createVNode("p",{class:"item-title-heading"},[p.code]),e.createVNode("p",{class:"item-title-text"},[p.desc])])]),e.createVNode("div",{class:"list-view-item-content"},[e.createVNode("div",{class:"content-message"},[e.createVNode("div",{class:"ower"},[e.createVNode("p",null,[e.createTextVNode("负责人")]),e.createVNode("p",{class:"con"},[p.name])]),e.createVNode("div",{class:"date"},[e.createVNode("p",null,[e.createTextVNode("预约时间")]),e.createVNode("p",{class:"con"},[p.date])])])]),e.createVNode("div",{class:"list-view-item-operate"},null)]))])}}}),Yd={install(t){t.component(kt.name,kt),t.component(Ar.name,Ar)},register(t,n,o){t["list-view"]=kt,n["list-view"]=Ql,t["list-view-table"]=Ar,n["list-view-table"]=Ud},registerDesigner(t,n,o){t["list-view"]=Tx,n["list-view"]=Ql,t["list-view-table"]=Ix,n["list-view-table"]=Ud}},Ex={title:"lookup",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"lookup",editor:{type:"waiting for modification",enum:[]}},label:{title:"标签",type:"string"}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},bindField:{description:"帮助绑定字段",title:"绑定字段",type:"string",editor:{type:"field-selector"}},textField:{description:"帮助显示文本字段",title:"文本字段",type:"string",editor:{type:"field-selector",bindingType:{enable:!1}}},mappingFields:{description:"帮助字段映射",title:"字段映射",type:"string",editor:{type:"mapping-editor",modalWidth:800,modalHeight:600}}}},lookup:{description:"Basic Infomation",title:"帮助",properties:{textField:{description:"帮助显示文本字段",title:"文本字段",type:"string",editor:{type:"field-selector"}}}}}},Mx=new Map([["appearance",xe]]),Px={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/lookup.schema.json",title:"lookup",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"lookup"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:"帮助"},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},textField:{description:"帮助显示文本字段",type:"string",default:""},mappingFields:{description:"帮助字段映射",type:"object",default:{}}},required:["id","type"]};function Ox(t,n,o){return n}const Vo={id:{type:String,require:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},fitColumns:{type:Boolean,default:!0},columns:{type:Array,default:[]},idField:{type:String,default:"id"},textField:{type:String,defalut:"name"},data:{type:Array,default:[]},displayType:{type:String,default:"list"},dialog:{type:Object,default:{width:800,height:600,title:"选择"}},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},enableSearch:{type:Boolean,default:!1},pagination:{type:Object,default:{enable:!1,list:[10,20,50,100,200,500,1e3],size:20,index:1}},enableClear:{type:Boolean,default:!0},inputType:{type:String,default:"text"},idValue:{type:String,default:""},beforeOpenDialog:{type:Function,default:null},beforeSubmit:{type:Function,default:null},dialogClosed:{type:Function,default:null},enableSearchBar:{type:Boolean,default:!0},searchFields:{type:Array,default:[]},showAllSearchColumns:{type:Boolean,default:!0}},Kd=me(Vo,Px,Mx,Ox,Ex),Rx=e.defineComponent({name:"FLookupDesign",props:Vo,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{class:"f-lookup-design"},[e.createVNode(yt,{ref:o,id:t.id,disable:!1,readonly:!1,editable:!1,inputType:"text"},null)])}});function Xd(t){function n(){const r={enable:!1,list:[10,20,50,100,200,500,1e3],size:20,index:1};return t.pagination?Object.assign({},r,t.pagination):r}function o(){return{enableSelectRow:!0,multiSelect:t.multiSelect,showCheckbox:t.multiSelect,multiSelectMode:"DependOnCheck"}}function a(){return{fitColumns:t.fitColumns,fitMode:"percentage"}}return{checkPaination:n,checkMultiSelect:o,checkColumnOptions:a}}function jx(t,n){const{checkPaination:o,checkMultiSelect:a,checkColumnOptions:r}=Xd(t),i=o(),l=a(),s=r(),p=e.ref(),c=e.ref([]),d=e.ref([]),u=e.ref(t.data||[]);e.watch(()=>t.data,m=>{var h;u.value=m,(h=p.value)==null||h.updateDataSource(u.value)}),e.watch(()=>t.idValue,m=>{c.value=m.split(t.separator)}),e.watch(()=>d.value,m=>{n.emit("selectionsChanged",m),n.emit("update:modelValue",m)});function f(m){d.value=m}function g(){return e.createVNode(Mn,{ref:p,pagination:i,summary:{enable:!1},columnOption:s,idField:t.idField,rowNumber:{enable:!1},showBorder:!0,fit:!0,columns:t.columns,data:u.value,selection:l,selectionValues:c.value,onSelectionChange:f},null)}return{datagridRef:p,selectedItems:d,selectionValues:c,renderDataGrid:g}}function _x(t,n){const{checkMultiSelect:o,checkColumnOptions:a}=Xd(t),r=o(),i=a(),l=e.ref(),s=e.ref([]),p=e.ref([]);e.watch(()=>p.value,u=>{n.emit("selectionsChanged",u),n.emit("update:modelValue",u)});function c(u){p.value=u}function d(){return e.createVNode(Dd,{ref:l,fit:!0,data:t.data,idField:t.idField,columns:t.columns,rowNumber:{enable:!1},columnOption:i,selection:r,showBorder:!0,onSelectionChange:c},null)}return{treegridRef:l,selectedTreeNodes:p,selectionTreeValues:s,renderTreeGrid:d}}const Hx={fields:{type:Array,default:()=>[]},showAllColumns:{type:Boolean,default:!0}},Lx=e.defineComponent({name:"FLookupSearchBar",props:Hx,emits:["search"],setup(t,n){const o=e.ref(t.fields||[]),a=e.ref(""),r=e.ref("");function i(){if(!o.value.length)return;let c="";t.showAllColumns&&(c="*"),c=o.value[0].value;const d=o.value.find(u=>!!u.isDefault);d&&(c=d.value),a.value=c}function l(){r.value="",n.emit("search",{field:a.value,value:r.value})}function s(){n.emit("search",{field:a.value,value:r.value})}function p(c){c.key==="Enter"&&s()}return e.onMounted(()=>{t.showAllColumns&&(o.value=[{label:"所有列",value:"*"},...o.value]),i()}),()=>e.createVNode("div",{class:"fv-lookup-search-bar d-flex flex-row"},[e.createVNode("div",{style:"width: 160px;"},[e.createVNode(Bt,{data:o.value,textField:"label",valueField:"value",idField:"value",modelValue:a.value,"onUpdate:modelValue":c=>a.value=c,enableClear:!1},null)]),e.createVNode("div",{class:"f-utils-fill ml-2"},[e.createVNode(yt,{buttonContent:'<i class="f-icon f-icon-search"></i>',modelValue:r.value,"onUpdate:modelValue":c=>r.value=c,onClickButton:s,enableClear:!0,onClear:l,onKeyup:p},null)])])}});function Wx(t,n){function o(r){n.emit("search",r)}function a(){if(t.enableSearchBar&&t.searchFields&&t.searchFields.length>0)return e.createVNode("div",{class:"px-2"},[e.createVNode(Lx,{fields:t.searchFields,showAllColumns:t.showAllSearchColumns,onSearch:o},null)])}return{renderSearchBar:a}}const qx=e.defineComponent({name:"LookupContainer",props:Vo,emits:["search","selectionsChanged","update:modelValue"],setup(t,n){const{renderDataGrid:o}=jx(t,n),{renderTreeGrid:a}=_x(t,n),{renderSearchBar:r}=Wx(t,n);function i(){return t.displayType==="tree"?a():o()}return()=>e.createVNode("div",{class:"h-100 d-flex flex-column mx-2"},[r(),e.createVNode("div",{class:"f-utils-fill p-2",style:"position: relative;"},[i()])])}}),zx={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object}},Gx={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Ux=e.defineComponent({name:"Toast",props:Gx,emits:["close","click"],setup:(t,n)=>{const o=e.ref(t.animate),a="fadeOut",r=e.computed(()=>t.options),i=e.ref(!1),l=e.computed(()=>{const b={animated:i.value,toast:!0};return b[t.animate]=!1,b[a]=i.value,b[r.value.type]=!0,r.value.theme&&(b[r.value.theme]=!0),b}),s=e.computed(()=>{const x=`f-icon-${r.value&&r.value.type?r.value.type.replace("toasty-type-",""):"default"}`,C={"f-icon":!0};return C[x]=!0,C}),p=e.computed(()=>r.value.title||r.value.message),c=e.computed(()=>r.value.title&&r.value.message),d=e.computed(()=>!r.value.title&&r.value.message),u=e.computed(()=>t.showCloseButton),f=e.computed(()=>!!r.value.buttons||!!n.slots.default);function g(b){b.stopPropagation(),b.preventDefault(),i.value=!1,setTimeout(()=>{n.emit("close",r.value)},200)}function m(b,v){}function h(b){return`f-preten-link ${b.customClass?b.customClass:""}`}e.watch(o,()=>{o.value});const y=()=>{var b;return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((b=r.value.buttons)==null?void 0:b.map(v=>e.createVNode("span",{class:h(v),onClick:x=>void 0},[v.text]))),n.slots.default&&n.slots.default()])])};return()=>e.createVNode("div",{class:l.value},[u.value&&e.createVNode("button",{title:"close",class:"toast-close f-btn-icon f-bare",onClick:g},[e.createVNode("span",{class:"f-icon modal_close"},null)]),p.value&&e.createVNode("section",{class:"modal-tips"},[e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:s.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[c.value&&e.createVNode(e.Fragment,null,[e.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:r.value.title},null),e.createVNode("p",{class:"toast-msg",innerHTML:r.value.message},null),f.value&&y()]),d.value&&(r.value.buttons?e.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null),e.createVNode("div",{class:"after-toast-title text-right ml-auto"},[y()])]):e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null))])])])}}),Yx=e.defineComponent({name:"Notify",props:zx,emits:["close","empty"],setup(t,n){const o=e.computed(()=>({"farris-notify":!0})),a={left:12,right:12,top:20,bottom:12},r=e.ref(),i=e.ref(t.options),l=e.ref(t.showCloseButton),s=e.computed(()=>t.position||"bottom-right"),p=e.computed(()=>t.timeout!=null?t.timeout:3e3),c=e.computed(()=>{const f=t.bottom?t.bottom:a.bottom,g=t.top?t.top:a.top,m={transition:"all 0.2s ease",left:s.value.indexOf("left")>-1?`${t.left?t.left:a.left}px`:"",right:s.value.indexOf("right")>-1?`${t.right?t.right:a.right}px`:"",top:s.value.indexOf("top")>-1?`${g}px`:"",bottom:s.value.indexOf("bottom")>-1?`${f}px`:""};return s.value.indexOf("center")>-1&&(m.left="50%",m.marginLeft="calc(-24rem / 2)",s.value==="center-center"&&(m.top="50%",m.transform="translate(-50%, -50%)")),m});function d(f){n.emit("close")}p.value&&setTimeout(()=>{d()},p.value),n.expose({closeToast:d,container:r,notifyPosition:s});function u(f,g){d()}return()=>e.createVNode("div",{class:o.value,style:c.value,ref:r},[e.createVNode(Ux,{options:i.value,showCloseButton:l.value,animate:t.animate,onClose:f=>u(f,i.value)},null)])}});class Ir{constructor(){P(this,"notifyRefs",[]);P(this,"globalConfig",e.reactive({}))}createNotifyInstance(n){const o=this,r=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0},this.globalConfig,{...n}),i=document.createElement("div");i.style.display="contents";const l=e.createApp({setup(){const s=e.ref();function p(){s.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(r,s),l.unmount()},220)}if(r.position.indexOf("top")>-1){const c=o.getNotifyInstances(r.position),d=c[c.length-1];if(d){const u=d.value.container.getBoundingClientRect();r.top=u.bottom}}return e.onUnmounted(()=>{document.body.removeChild(i)}),e.onMounted(()=>{o.updateNotifyPositionForCreate(r,s)}),()=>e.createVNode(Yx,e.mergeProps({ref:s},r,{onClose:p}),null)}});return l.provide("NotifyService",this),document.body.appendChild(i),l.mount(i),l}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const a=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(r=>{const i=r.value.container.getBoundingClientRect();r.value.container.style.bottom=i.height+a-i.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const a=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const r=this.getNotifyInstances(n.position),i=r.indexOf(o);r.slice(i+1).forEach(l=>{l.value.container.style.top=l.value.container.offsetTop-l.value.container.offsetHeight+"px"})}a>-1&&this.notifyRefs.splice(a,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let a="",r="",i,l,s;typeof o=="string"?a=o:o&&(a=o.message||"",r=o.title||"",l=o.position||null,s=o.showCloseButton!=null?o.showCloseButton:null,i=o.timeout!=null?o.timeout:null);const c={options:{type:n,message:a,title:r}};return l!=null&&(c.position=l),s!=null&&(c.showCloseButton=s),i!=null&&(c.timeout=i),c}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}function Kx(t,n,o){var c,d,u;const a=new Ir,r=e.ref(t.dialog);function i(){if(o.value.length===0){a.warning({message:"请选择数据!",position:"top-center"});return}const f=o.value.map(m=>m[t.textField]).join(t.separator),g=o.value.map(m=>m[t.idField]).join(t.separator);n.emit("update:modelValue",f),n.emit("update:idValue",g)}async function l(){let f=!0,g="";if(t.beforeSubmit&&typeof t.beforeSubmit=="function"){const m=await t.beforeSubmit({selectedItems:o.value});typeof m=="boolean"&&(f=m),typeof m=="object"&&(f=m.continue,g=m.message||"")}return f?(i(),!0):(g&&a.warning({message:g,position:"top-center"}),!1)}async function s(f){let g=!0;if(t.beforeOpenDialog&&typeof t.beforeOpenDialog=="function"){const m=await t.beforeOpenDialog(f);typeof m=="boolean"&&!m&&(g=!1),typeof m=="object"&&(m.continue||(g=!1,m.message&&a.error({message:m.message,position:"top-center"})))}return g}return{modalOptions:{title:(c=r.value)==null?void 0:c.title,fitContent:!1,height:((d=r.value)==null?void 0:d.height)||800,width:((u=r.value)==null?void 0:u.width)||600,closedCallback:f=>{t.dialogClosed&&typeof t.dialogClosed=="function"&&t.dialogClosed({button:f.target,selectedItems:o.value})},buttons:[{name:"cancel",text:"取消",class:"btn btn-light",handle:f=>!0},{name:"accept",text:"确定",class:"btn btn-primary",handle:f=>l()}]},beforeOpenDialog:s}}const Er=e.defineComponent({name:"FLookup",props:Vo,emits:["update:modelValue","update:idValue","pageSizeChanged","search","pageChanged"],setup(t,n){const o='<i class="f-icon f-icon-lookup"></i>',a=e.ref(),r=e.ref(),i=e.ref([]),{modalOptions:l,beforeOpenDialog:s}=Kx(t,n,i);e.onMounted(()=>{});function p(){i.value=[],n.emit("update:modelValue",""),n.emit("update:idValue","")}function c(d){return n.emit("search",d)}return()=>e.createVNode(yt,{ref:a,id:t.id,disable:t.disable,readonly:t.readonly,editable:t.editable,inputType:"text",enableClear:t.enableClear,buttonContent:o,buttonBehavior:"Modal",modalOptions:l,onClear:p,beforeOpen:s},{default:()=>[e.createVNode(qx,e.mergeProps({ref:r},t,{modelValue:i.value,"onUpdate:modelValue":d=>i.value=d,onSearch:c}),null)]})}}),Qd={install(t){t.component(Er.name,Er)},register(t,n,o){t.lookup=Er,n.lookup=Kd},registerDesigner(t,n,o){t.lookup=Rx,n.lookup=Kd}},Xx={type:{Type:String,default:"info"},title:{Type:String,default:""},detail:{Type:String,default:""},okButtonText:{Type:String,default:"确定"},cancelButtonText:{Type:String,default:"取消"},exceptionInfo:{Type:Object,default:null},promptEditorType:{Type:String,default:"text-area"}};function Mr(){return new DOMException("The request is not allowed","NotAllowedError")}async function Qx(t){if(!navigator.clipboard)throw Mr();return navigator.clipboard.writeText(t)}async function Zx(t){const n=document.createElement("span");n.textContent=t,n.style.whiteSpace="pre",n.style.webkitUserSelect="auto",n.style.userSelect="all",document.body.appendChild(n);const o=window.getSelection(),a=window.document.createRange();o==null||o.removeAllRanges(),a.selectNode(n),o==null||o.addRange(a);let r=!1;try{r=window.document.execCommand("copy")}finally{o==null||o.removeAllRanges(),window.document.body.removeChild(n)}if(!r)throw Mr()}async function Jx(t){try{await Qx(t)}catch(n){try{await Zx(t)}catch(o){throw o||n||Mr()}}}function eC(){async function t(n){await Jx(n)}return{onCopy:t}}function tC(t,n,o,a){const r=e.ref(14),i=e.ref(140),l=e.ref(""),s=e.ref(a.value.length),p=e.computed(()=>a.value),c=e.computed(()=>({"font-size":`${r.value}px`,height:"100%"}));function d(u){if(u.currentTarget){const f=u.currentTarget.value||"";s.value=f.length}}return()=>e.createVNode(e.Fragment,null,[e.createVNode("textarea",{title:"promptMessage",name:"promptMessage",class:"form-control",style:c.value,rows:"4",maxlength:i.value,onInput:u=>d(u)},[p.value]),e.createVNode("span",{class:"textarea-wordcount",title:l.value,style:"position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"},[s.value+" / "+i.value])])}function nC(t,n,o,a){const r=tC(t,n,o,a),i=new Map([["text-area",r]]);function l(s){return i.get(s)||null}return{getEditorRender:l}}function oC(){const t=e.ref(!1),n=e.ref("复制成功");return{feedbackStyle:e.computed(()=>{const a={position:"absolute",left:"50%",top:"50%",width:"100px",height:"40px",background:"#303C53","line-height":"40px","text-align":"center","margin-left":"-30px","margin-top":"-50px","border-radius":"10px","box-shadow":"0px 2px 8px 0px",color:"#fff",transition:"all .3s ease"};return a.opacity=t.value?"0.8":"0",a.display=t.value?"":"none",a}),feedbackMessage:n,toShowFeedback:t}}function aC(t,n){const o=n.getEditorRender(t.promptEditorType);return()=>o&&o()}function rC(t){const n=e.ref(3),o=e.ref(480),a=e.computed(()=>!!t.value&&!!t.value.date),r=e.computed(()=>`发生时间 : ${t.value&&t.value.date||""}`),i=e.computed(()=>!!t.value&&!!t.value.detail),l=e.computed(()=>{const y=`${o.value}px`;return{overflow:"hidden","text-overflow":"ellipsis",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":n.value,"max-height":y}}),s=e.computed(()=>t.value&&t.value.detail||""),p=e.computed(()=>!0),c=e.ref(!1),d=e.ref("展开"),u=e.ref("收起"),f=e.computed(()=>{const y={display:"block",color:"#2A87FF"};return y["text-align"]=c.value?"":"right",y});function g(y,b){c.value=!c.value,n.value=c.value?20:3}function m(y){return g()}function h(y){return g()}return()=>e.createVNode("div",{class:"toast-msg-detail"},[a.value&&e.createVNode("div",null,[r.value]),i.value&&e.createVNode("div",{id:"exception_error_msg",ref:"exceptionMessageRef",style:l.value},[e.createTextVNode("详细信息 : "),e.createVNode("span",{innerHTML:s.value},null)]),p.value&&e.createVNode("span",{style:f.value},[c.value&&e.createVNode("span",{onClick:m,style:"cursor: pointer;"},[u.value]),!c.value&&e.createVNode("span",{onClick:h,style:"cursor: pointer;"},[d.value])])])}function iC(t){return()=>e.createVNode("p",{class:"toast-msg-detail",innerHTML:t.value},null)}function sC(t,n,o,a){const r=e.ref(t.exceptionInfo),i=e.computed(()=>{const f={"f-icon":!0},g=`f-icon-${n.value}`;return f[g]=!0,f}),l=e.computed(()=>o.value||r.value&&r.value.message),s=e.computed(()=>a.value),p=e.computed(()=>!!a.value),c=e.computed(()=>!!r.value);function d(){return c.value?rC(r):p.value?iC(s):()=>null}const u=d();return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:i.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[e.createVNode("p",{class:"toast-msg-title",innerHTML:l.value},null),u()])])}function lC(t,n,o){const{onCopy:a}=n,{toShowFeedback:r}=o,i=e.ref("复制成功"),l=e.ref("复制详细信息"),s=e.ref(t.exceptionInfo||{date:"",message:"",detail:""}),p=e.computed(()=>s.value&&s.value.detail||"");function c(d){a(p.value).catch(u=>{i.value="复制失败"}).finally(()=>{r.value=!0,setTimeout(()=>{r.value=!1},700)})}return()=>e.createVNode("span",{style:"width: 100%;color: #2A87FF;padding-left: 37px;"},[e.createVNode("span",{onClick:c,style:"cursor: pointer;"},[l.value])])}function cC(t,n,o,a){const r=e.ref(t.type),i=e.ref([]),l=e.ref(t.exceptionInfo),s=e.ref(t.okButtonText),p=e.ref(t.cancelButtonText),c=e.ref(!0),d=e.ref(!0),u=e.computed(()=>!!(i.value&&i.value.length)),f=e.computed(()=>l.value&&l.value.date&&l.value.message&&l.value.detail),g=e.computed(()=>!(i.value&&i.value.length)&&(s.value||p.value)),m=e.computed(()=>d.value&&s.value),h=e.computed(()=>c.value&&p.value),y=lC(t,o,a);function b(x){r.value==="question"&&n.emit("reject"),n.emit("close")}function v(x){r.value==="question"&&n.emit("accept"),n.emit("close")}return()=>e.createVNode("div",{class:"modal-footer"},[f.value&&y(),g.value&&h.value&&e.createVNode("button",{type:"button",class:"btn btn-secondary btn-lg",onClick:b},[p.value]),g.value&&m.value&&e.createVNode("button",{type:"button",class:"btn btn-primary btn-lg",onClick:v},[s.value]),u.value&&i.value.length&&i.value.map(x=>e.createVNode("button",{type:"button",onClick:x.handle,class:x.class},[x.iconClass&&e.createVNode("span",{class:x.iconClass},null),x.text]))])}const dC=e.defineComponent({name:"FMessageBox",props:Xx,emits:["accept","reject","close"],setup(t,n){const o=e.ref(t.type),a=e.ref(t.title),r=e.ref(t.detail),i=e.computed(()=>{const y={"modal-tips":!0,"d-flex":!0,"flex-row":!0},b=`messager-type-${o.value}`;return y[b]=!0,y}),l=e.computed(()=>{const y={};return o.value==="prompt"?y.padding="0.5rem 0.5rem 1rem 1.5rem":o.value==="error"&&(y.padding="0.5rem 1.5rem 1rem 1.5rem"),y}),s=eC(),p=nC(t,o,a,r),c=oC(),{feedbackStyle:d,feedbackMessage:u}=c;function f(){return e.createVNode("div",{style:d.value},[u.value])}function g(){switch(o.value){case"prompt":return aC(t,p);default:return sC(t,o,a,r)}}const m=g(),h=cC(t,n,s,c);return()=>e.createVNode("div",{class:"farris-messager"},[e.createVNode("section",{class:i.value,style:l.value},[m()]),h(),f()])}});class Pr{static show(n){const o=e.reactive({...n}),a=!1,r=o.type==="error"||o.type==="prompt",i=o.type==="error"?"错误提示":o.type==="prompt"&&o.title||"",l=o.acceptCallback||(()=>{}),s=o.rejectCallback||(()=>{});let p;const c=()=>{p&&p.unmount()};p=ln.show({class:"modal-message modal-message-type-info",title:i,showButtons:a,showHeader:r,render:()=>e.createVNode(dC,e.mergeProps(o,{onAccept:l,onReject:s,onClose:c}),null)})}static info(n,o){const a=e.reactive({type:"info",title:n,detail:o,okButtonText:"知道了",cancelButtonText:""});this.show(a)}static warning(n,o){const a=e.reactive({type:"warning",title:n,detail:o,okButtonText:"知道了",cancelButtonText:""});this.show(a)}static success(n,o){const a=e.reactive({type:"success",title:n,detail:o,okButtonText:"关闭",cancelButtonText:""});this.show(a)}static error(n,o,a){const r=e.reactive({type:"error",okButtonText:"关闭",cancelButtonText:"",exceptionInfo:{date:a,message:n,detail:o}});this.show(r)}static prompt(n,o){const a=e.reactive({type:"prompt",title:n,detail:o,okButtonText:"确定",cancelButtonText:"取消"});this.show(a)}static question(n,o,a,r){const i=e.reactive({type:"question",title:n,detail:o,okButtonText:"确定",cancelButtonText:"取消",acceptCallback:a,rejectCallback:r});this.show(i)}}const uC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/mapping-editor.schema.json",title:"field-selector",description:"A Farris Input Component",type:"object",properties:{}},Zd={disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},title:{type:String,default:"字段映射编辑器"},modalWidth:{type:Number,default:600},modalHeight:{type:Number,default:500},modelValue:{type:Object,default:{}}},fC=me(Zd,uC),Or=e.defineComponent({name:"FMappingEditor",props:Zd,emits:["submitModal","update:modelValue"],setup(t,n){const o='<i class="f-icon f-icon-lookup"></i>',a=e.ref(),r=e.ref(t.modelValue||{}),i=e.ref(),l=[{field:"sourceField",title:"数据源字段",dataType:"string"},{field:"targetField",title:"目标字段",dataType:"string"}];function s(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}const p=e.computed(()=>Object.keys(r.value).map(b=>({id:s(),sourceField:b,targetField:r.value[b]}))),c=e.computed(()=>{var b;return`共 ${((b=p.value)==null?void 0:b.length)||0} 项`});function d(){var b;(b=a.value)==null||b.addNewDataItem()}function u(){return{sourceField:"",targetField:"",id:s()}}function f(){if(i!=null&&i.value.length){const b=p.value.findIndex(v=>v.id===(i==null?void 0:i.value[0].id));a==null||a.value.removeDataItem(b)}}function g(){Pr.question("确定要清空所有映射关系吗?","",()=>{var b;r.value={},(b=a.value)==null||b.updateDataSource([])},()=>{})}function m(){const b={};return p.value.forEach(v=>{b[v.sourceField]=v.targetField}),b}e.watch(()=>t.modelValue,b=>{r.value=b});const h={title:t.title,fitContent:!1,height:t.modalHeight,width:t.modalWidth,acceptCallback:()=>{const b=m();r.value=b,n.emit("submitModal",b),n.emit("update:modelValue",b)},rejectCallback:()=>{}};function y(b){i.value=b}return()=>e.createVNode(yt,{modelValue:c.value,"onUpdate:modelValue":b=>c.value=b,editable:!1,disabled:t.disabled,readonly:t.readonly,inputType:"text",enableClear:!1,buttonContent:o,buttonBehavior:"Modal",modalOptions:h},{default:()=>[e.createVNode("div",{class:"h-100 d-flex flex-column"},[e.createVNode("div",{class:"px-2"},[e.createVNode("button",{class:"btn btn-primary",onClick:d},[e.createTextVNode("新增")]),e.createVNode("button",{class:"btn btn-secondary ml-2",onClick:f},[e.createTextVNode("删除")]),e.createVNode("button",{class:"btn btn-secondary ml-3",onClick:g},[e.createTextVNode("清空")])]),e.createVNode("div",{class:" f-utils-fill p-2"},[e.createVNode(Mn,{ref:a,pagination:{enable:!1},summary:{enable:!1},columnOption:{fitColumns:!0},editOption:{editMode:"cell"},rowNumber:!1,showBorder:!0,editable:"true",fit:!0,columns:l,data:p.value,newDataItem:u,onSelectionChange:y},null)])])]})}}),pC={install(t){t.component(Or.name,Or)},register(t,n,o){t["mapping-editor"]=Or,n["mapping-editor"]=fC}},mC=new Map([["appearance",xe]]),hC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/nav.schema.json",title:"nav",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a nav",type:"string"},type:{description:"The type string of nav component",type:"string",default:"nav"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function gC(t,n,o){return n}const yC={title:"nav",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Rr={maxNum:{Type:Number,default:99},navData:{Type:Array,default:[{id:"1",text:"全部"},{id:"2",text:"已回复",disable:!0},{id:"3",text:"待回复",num:200},{id:"4",text:"@我",num:33}]},horizontal:{Type:Boolean,default:!0},activeNavId:{Type:String,default:"1"},navPicking:{Type:Function,default:t=>Va}},Jd=me(Rr,hC,mC,gC,yC),jr=e.defineComponent({name:"FNav",props:Rr,emits:["nav"],setup(t,n){const o=e.ref(t.activeNavId),a=e.ref(t.navData),r=e.ref(t.horizontal);e.ref(t.navPicking);const i=e.computed({get(){return a.value},set(d){a.value=d,p()}}),l=e.computed({get(){return o.value},set(d){if(o.value=d,o.value&&i&&i.value.length){const u=i.value.find(f=>f.id===o.value);u&&n.emit("nav",u)}}}),s=e.computed({set(d){r.value=d},get(){return r.value}});function p(){if(i.value&&i.value.length&&!o.value){const d=i.value.find(u=>!u.disable);d&&(o.value=d.id)}}function c(d){d.disable||d.id===o.value||(o.value=d.id,n.emit("nav",d))}return()=>{var d;return e.createVNode("div",{class:["farris-nav",{"farris-nav-vertical":!s.value}]},[(d=i.value)==null?void 0:d.map(u=>e.createVNode("div",{class:["farris-nav-item",{active:u.id===l.value},{disabled:u.disable}],onClick:()=>c(u)},[e.createVNode("div",{class:"farris-nav-item-link"},[e.createVNode("span",{class:"farris-nav-item-link-text"},[u.text,u.num&&e.createVNode("div",{class:"farris-nav-item-tag"},[u.num<=t.maxNum&&e.createVNode("span",{class:"tag-text"},[u.num]),u.num>t.maxNum&&e.createVNode("span",{class:"tag-text"},[t.maxNum,e.createTextVNode("+")])])])])]))])}}}),bC=e.defineComponent({name:"FNavDesign",props:Rr,emits:["nav"],setup(t,n){var m;const o=e.ref(t.activeNavId),a=e.ref(t.navData),r=e.ref(t.horizontal);e.ref(t.navPicking);const i=e.ref(),l=e.inject("design-item-context"),s=hn(l.schema,(m=l.parent)==null?void 0:m.schema),p=ve(i,l,s);e.onMounted(()=>{i.value.componentInstance=p}),n.expose(p.value);const c=e.computed({get(){return a.value},set(h){a.value=h,f()}}),d=e.computed({get(){return o.value},set(h){if(o.value=h,o.value&&c&&c.value.length){const y=c.value.find(b=>b.id===o.value);y&&n.emit("nav",y)}}}),u=e.computed({set(h){r.value=h},get(){return r.value}});function f(){if(c.value&&c.value.length&&!o.value){const h=c.value.find(y=>!y.disable);h&&(o.value=h.id)}}function g(h){h.disable||h.id===o.value||(o.value=h.id,n.emit("nav",h))}return()=>{var h;return e.createVNode("div",{ref:i,class:["farris-nav",{"farris-nav-vertical":!u.value}]},[(h=c.value)==null?void 0:h.map(y=>e.createVNode("div",{class:["farris-nav-item",{active:y.id===d.value},{disabled:y.disable}],onClick:()=>g(y)},[e.createVNode("div",{class:"farris-nav-item-link"},[e.createVNode("span",{class:"farris-nav-item-link-text"},[y.text,y.num&&e.createVNode("div",{class:"farris-nav-item-tag"},[y.num<=t.maxNum&&e.createVNode("span",{class:"tag-text"},[y.num]),y.num>t.maxNum&&e.createVNode("span",{class:"tag-text"},[t.maxNum,e.createTextVNode("+")])])])])]))])}}}),eu={install(t){t.component(jr.name,jr)},register(t,n,o){t.nav=jr,n.nav=Jd},registerDesigner(t,n,o){t.nav=bC,n.nav=Jd}};function vC(t,n,o){return n}const xC=new Map([["appearance",xe]]),CC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/number-range.schema.json",title:"number-range",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a number-range",type:"string"},type:{description:"The type string of number-range component",type:"string",default:"number-range"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},wC={title:"number-range",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},_r={id:String,autoDecimal:{type:Boolean,default:!0},beginPlaceHolder:{type:String,default:"请输入开始数字"},beginValue:{type:[Number,String],default:"0"},bigNumber:{type:Boolean,default:!1},canNull:{type:Boolean,default:!1},decimalSeparator:{type:String,default:"."},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},endPlaceHolder:{type:String,default:"请输入结束数字"},endValue:{type:[Number,String],default:"0"},formatter:{type:Function},groupSeparator:{type:String,default:","},groupSize:{type:Number,default:3},max:{type:[Number,String]},min:{type:[Number,String]},parser:{type:Function},placeholder:{type:String,default:"请输入数字"},precision:{type:Number,default:0},prefix:{type:String,default:""},readonly:{type:Boolean,default:!1},separator:{type:String,default:"~"},showButton:{type:Boolean,default:!0},showZero:{type:Boolean,default:!0},step:{type:Number,default:1},suffix:{type:String,default:""},textAlign:{type:String,default:"left"},useThousands:{type:Boolean,default:!0}},tu=me(_r,CC,xC,vC,wC);function nu(t,n){const o=e.computed(()=>Number(t.precision)||0);function a(p){return p.toFixed(o.value)}function r(p){return isNaN(p)||p===null||p===void 0||p===""}function i(p){const c=r(t.max)?null:new Ae(String(t.max),10),d=r(t.min)?null:new Ae(String(t.min),10);return c&&p.gt(c)?c:d&&p.lt(d)?d:p}function l(p,c,d,u){const f=new Ae(p,10),g=r(d&&d.value)?null:new Ae(String(d.value),10),m=r(c&&c.value)?null:new Ae(String(c.value),10);let h;return u?h=g&&f.gt(g)?g:f:h=m&&f.lt(m)?m:f,h.toString()}function s(p){if(t.parser)return isNaN(Number(p))?t.parser(p):p;let c=i(new Ae(p,10));if(c.isNaN()){if(t.canNull)return null;const u=new Ae(""+t.min,10),f=new Ae(""+t.max,10);if(!u.isNaN())c=u;else if(!f.isNaN())c=f;else return 0}return a(c)}return{getRealValue:s,isEmpty:r,precision:o,getValidNumberObject:i,getValidNumberInRange:l}}function ou(t,n,o){const a=e.computed(()=>({prefix:t.prefix,suffix:t.suffix,decimalSeparator:t.decimalSeparator,groupSeparator:t.useThousands?t.groupSeparator:"",groupSize:t.groupSize})),{getValidNumberObject:r,precision:i}=o;function l(c){return c=c==null||c===""?"":String(c),c=c.replace(new RegExp(t.prefix,"g"),"").replace(new RegExp(t.suffix,"g"),"").replace(/,/g,""),t.groupSeparator&&t.groupSeparator!==","&&(c=c.replace(new RegExp(`\\${t.groupSeparator}`,"g"),"")),t.decimalSeparator&&t.decimalSeparator!=="."&&(c=c.replace(new RegExp(`\\${t.decimalSeparator}`,"g"),".")),c}function s(c,d){return t.precision!==null&&t.precision!==void 0?c.toFormat(i.value,d):c.toFormat(d)}function p(c){const d=l(c),u=new Ae(d,10),f=r(u);return f.valueOf()==="0"&&!t.showZero||f.isNaN()?"":t.formatter?t.formatter(f.toNumber()):s(f,a.value)}return{cleanFormat:l,format:p}}function So(t,n,o,a,r,i,l,s,p,c){const{format:d}=r,{getRealValue:u,getValidNumberInRange:f}=i;function g(){const C=new Ae(a.value||0);return!(t.max&&!new Ae(t.max).isNaN()&&C.gte(new Ae(t.max)))}function m(){const C=new Ae(a.value||0);return!(t.min&&!new Ae(t.min).isNaN()&&C.lte(new Ae(t.min)))}function h(C){if(t.readonly||t.disabled)return;const w=C==="up"?g:m,N=C==="up"?"plus":"minus";if(w()){let k=new Ae(a.value||0)[N](Number(t.step)).toFixed();k=f(k,s,p,c),o.value=d(k),a.value=u(k),l(a.value)}}function y(){h("up")}function b(){h("down")}function v(C){y(),C.stopPropagation()}function x(C){b(),C.stopPropagation()}return{canDownward:m,canUpward:g,downward:b,onClickDownButton:x,onClickUpButton:v,upward:y}}function $o(t,n,o,a,r,i,l,s,p,c,d){const{cleanFormat:u,format:f}=r,{getRealValue:g,isEmpty:m,getValidNumberInRange:h}=i,{downward:y,upward:b}=l,v=e.computed(()=>o.value),x=e.ref(!1);function C(D){var $;if(D.stopPropagation(),t.readonly||t.disabled)return;x.value=!1;let k=($=D.target)==null?void 0:$.value;t.canNull||(k=k||0);let B=u(k);B=h(B,p,c,d),o.value=f(B),a.value=g(B),s(a.value),n.emit("blur",{event:D,formatted:o.value,value:a.value})}function w(D){D.stopPropagation(),!(t.readonly||t.disabled)&&(x.value=!0,o.value=m(a.value)||!t.showZero&&a.value==="0"?"":String(a.value),n.emit("focus",{event:D,formatted:o.value,value:a.value}))}function N(D){var $;D.stopPropagation();let k=($=D.target)==null?void 0:$.value;t.canNull||(k=k||0);const B=u(k);o.value=B,a.value=g(B),s(a.value)}function V(D){D.key==="ArrowDown"&&(D.preventDefault(),y()),D.key==="ArrowUp"&&(D.preventDefault(),b()),D.stopPropagation()}return{textBoxValue:v,onBlurTextBox:C,onFocusTextBox:w,onInput:N,onKeyDown:V,isTextBoxFocused:x}}function Do(t,n,o,a){const{onBlurTextBox:r,onFocusTextBox:i,onInput:l,onKeyDown:s,textBoxValue:p}=o,c=e.computed(()=>t.disabled||t.readonly||!t.editable?"":a?t.beginPlaceHolder:t.endPlaceHolder),d=e.computed(()=>({"form-control":!0,"sub-input":!0})),u=e.computed(()=>({"text-align":t.textAlign}));function f(g){g.stopPropagation()}return()=>e.createVNode("input",{class:d.value,style:u.value,type:"text",value:p.value,disabled:t.disabled,readonly:t.readonly||!t.editable,placeholder:c.value,onBlur:r,onChange:f,onFocus:i,onInput:l,onKeydown:s},null)}function ko(t,n,o){const{canDownward:a,canUpward:r,onClickDownButton:i,onClickUpButton:l}=o,s=e.computed(()=>({"input-group-append":!0,"btn-group":!0,"btn-group-number":!0,"sub-btn-group":!0})),p=e.computed(()=>({btn:!0,"btn-secondary":!0,"btn-number-flag":!0})),c=e.computed(()=>({cursor:r()?"pointer":"not-allowed","margin-left":0})),d=e.computed(()=>({cursor:a()?"pointer":"not-allowed","margin-left":0}));return()=>e.createVNode("div",{class:s.value},[e.createVNode("button",{title:"upButton",class:p.value,style:c.value,onClick:l,disabled:!r()},[e.createVNode("span",{class:"f-icon f-icon-arrow-chevron-up number-arrow-chevron"},null)]),e.createVNode("button",{title:"downButton",class:p.value,style:d.value,onClick:i,disabled:!a()},[e.createVNode("span",{class:"f-icon f-icon-arrow-chevron-down number-arrow-chevron"},null)])])}const Hr=e.defineComponent({name:"FNumberRange",props:_r,emits:["valueChange","blur","focus","click","input","beginValueChange","endValueChange"],setup(t,n){const o=e.ref(t.beginValue),a=e.ref(""),r=e.ref(t.endValue),i=e.ref(""),l=nu(t),s=ou(t,n,l),p=w=>{n.emit("beginValueChange",w)},c=So(t,n,a,o,s,l,p,o,r,!0),d=$o(t,n,a,o,s,l,c,p,o,r,!0),u=ko(t,n,c),f=Do(t,n,d,!0),g=w=>{n.emit("endValueChange",w)},m=So(t,n,i,r,s,l,g,o,r,!1),h=$o(t,n,i,r,s,l,m,g,o,r,!1),y=ko(t,n,m),b=Do(t,n,h,!1),{getRealValue:v}=l,{format:x}=s,C=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton);return e.onMounted(()=>{const w=v(t.beginValue),N=v(t.endValue);a.value=x(w),i.value=x(N)}),e.watch(()=>[t.beginValue],([w])=>{if(!d.isTextBoxFocused.value){const N=v(w);a.value=x(N)}}),e.watch(()=>[t.endValue],([w])=>{if(!h.isTextBoxFocused.value){const N=v(w);i.value=x(N)}}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{a.value=x(o.value),i.value=x(r.value)}),()=>e.createVNode("div",{class:"input-group number-range f-cmp-number-spinner"},[e.createVNode("div",{class:"form-control input-container"},[e.createVNode("div",{class:"sub-input-group"},[f(),C.value&&u()]),e.createVNode("span",{class:"spliter"},[e.createTextVNode("~")]),e.createVNode("div",{class:"sub-input-group"},[b(),C.value&&y()])])])}}),NC=e.defineComponent({name:"FNumberRangeDesign",props:_r,emits:["valueChange","blur","focus","click","input","beginValueChange","endValueChange"],setup(t,n){var k;const o=e.ref(t.beginValue),a=e.ref(""),r=e.ref(t.endValue),i=e.ref(""),l=nu(t),s=ou(t,n,l),p=B=>{n.emit("beginValueChange",B)},c=e.ref(),d=e.inject("design-item-context"),u=hn(d.schema,(k=d.parent)==null?void 0:k.schema),f=ve(c,d,u);e.onMounted(()=>{c.value.componentInstance=f}),n.expose(f.value);const g=So(t,n,a,o,s,l,p,o,r,!0),m=$o(t,n,a,o,s,l,g,p,o,r,!0),h=ko(t,n,g),y=Do(t,n,m,!0),b=B=>{n.emit("endValueChange",B)},v=So(t,n,i,r,s,l,b,o,r,!1),x=$o(t,n,i,r,s,l,v,b,o,r,!1),C=ko(t,n,v),w=Do(t,n,x,!1),{getRealValue:N}=l,{format:V}=s,D=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton);return e.onMounted(()=>{const B=N(t.beginValue),$=N(t.endValue);a.value=V(B),i.value=V($)}),e.watch(()=>[t.beginValue],([B])=>{const $=N(B);a.value=V($)}),e.watch(()=>[t.endValue],([B])=>{const $=N(B);i.value=V($)}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{a.value=V(o.value),i.value=V(r.value)}),()=>e.createVNode("div",{ref:c,class:"input-group number-range f-cmp-number-spinner"},[e.createVNode("div",{class:"form-control input-container"},[e.createVNode("div",{class:"sub-input-group"},[y(),D.value&&h()]),e.createVNode("span",{class:"spliter"},[e.createTextVNode("~")]),e.createVNode("div",{class:"sub-input-group"},[w(),D.value&&C()])])])}}),au={install(t){t.component(Hr.name,Hr)},register(t,n,o){t["number-range"]=Hr,n["number-range"]=tu},registerDesigner(t,n,o){t["number-range"]=NC,n["number-range"]=tu}},VC=new Map([["appearance",xe]]),SC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/number-spinner.schema.json",title:"number-spinner",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a number spinner",type:"string"},type:{description:"The type string of number spinner component",type:"string",default:"number-spinner"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function $C(t,n,o){return n}const DC={title:"number-spinner",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Lr={id:String,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},formatter:{type:Function},parser:{type:Function},placeholder:{type:String,default:"请输入数字"},step:{type:Number,default:1},max:{type:[Number,String]},min:{type:[Number,String]},showButton:{type:Boolean,default:!0},useThousands:{type:Boolean,default:!0},textAlign:{type:String,default:"left"},autoDecimal:{type:Boolean,default:!0},canNull:{type:Boolean,default:!1},precision:{type:Number,default:0},prefix:{type:String,default:""},suffix:{type:String,default:""},decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},groupSize:{type:Number,default:3},value:{type:[Number,String],default:""},showZero:{type:Boolean,default:!0},modelValue:{type:[Number,String],default:""},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},ru=me(Lr,SC,VC,$C,DC);function iu(t,n,o,a){const{format:r}=o,{displayValue:i,getRealValue:l,modelValue:s,onNumberValueChanged:p}=a;function c(){const y=new Ae(s.value||0);return!(t.max&&!new Ae(t.max).isNaN()&&y.gte(new Ae(t.max)))}function d(){const y=new Ae(s.value||0);return!(t.min&&!new Ae(t.min).isNaN()&&y.lte(new Ae(t.min)))}function u(y){if(t.readonly||t.disabled)return;const b=y==="up"?c:d,v=y==="up"?"plus":"minus";if(b()){const C=new Ae(s.value||0)[v](Number(t.step)),w=C.toFixed();i.value=r(w),p(l(C))}}function f(){u("up")}function g(){u("down")}function m(y){f(),y.stopPropagation()}function h(y){g(),y.stopPropagation()}return{canDownward:d,canUpward:c,downward:g,onClickDownButton:h,onClickUpButton:m,upward:f}}function su(t,n,o){const a=e.computed(()=>({prefix:t.prefix,suffix:t.suffix,decimalSeparator:t.decimalSeparator,groupSeparator:t.useThousands?t.groupSeparator:"",groupSize:t.groupSize})),{getValidNumberObject:r,precision:i}=o;function l(c){return c=c==null||c===""?"":String(c),c=c.replace(new RegExp(t.prefix,"g"),"").replace(new RegExp(t.suffix,"g"),"").replace(/,/g,""),t.groupSeparator&&t.groupSeparator!==","&&(c=c.replace(new RegExp(`\\${t.groupSeparator}`,"g"),"")),t.decimalSeparator&&t.decimalSeparator!=="."&&(c=c.replace(new RegExp(`\\${t.decimalSeparator}`,"g"),".")),c}function s(c,d){return t.precision!==null&&t.precision!==void 0?c.toFormat(i.value,d):c.toFormat(d)}function p(c){const d=l(c),u=new Ae(d,10),f=r(u);return f.valueOf()==="0"&&!t.showZero||f.isNaN()?"":t.formatter?t.formatter(f.toNumber()):s(f,a.value)}return{cleanFormat:l,format:p}}function lu(t,n){const o=e.ref(""),a=e.ref(t.modelValue),r=e.computed(()=>Number(t.precision)||0);function i(d){return d.toFixed(r.value)}function l(d){return isNaN(d)||d===null||d===void 0||d===""}function s(d){const u=l(t.max)?null:new Ae(String(t.max),10),f=l(t.min)?null:new Ae(String(t.min),10);return u&&d.gt(u)?u:f&&d.lt(f)?f:d}function p(d){if(t.parser)return isNaN(Number(d))?t.parser(d):d;let u=s(new Ae(d,10));if(u.isNaN()){if(t.canNull)return null;const g=new Ae(""+t.min,10),m=new Ae(""+t.max,10);if(!g.isNaN())u=g;else if(!m.isNaN())u=m;else return 0}return i(u)}function c(d){const u=Number(d);a.value=u,n.emit("update:modelValue",u),n.emit("valueChange",u),n.emit("change",u)}return{displayValue:o,getRealValue:p,modelValue:a,isEmpty:l,onNumberValueChanged:c,precision:r,getValidNumberObject:s}}function cu(t,n,o,a,r){const{cleanFormat:i,format:l}=o,{displayValue:s,getRealValue:p,modelValue:c,isEmpty:d,onNumberValueChanged:u}=a,{downward:f,upward:g}=r,m=e.ref(!1),h=e.computed(()=>s.value);function y(C){var V;if(C.stopPropagation(),m.value=!1,t.readonly||t.disabled)return;let w=(V=C.target)==null?void 0:V.value;t.canNull||(w=w||0);const N=i(w);s.value=l(N),u(p(N)),n.emit("blur",{event:C,formatted:s.value,value:c.value})}function b(C){C.stopPropagation(),m.value=!0,!(t.readonly||t.disabled)&&(s.value=d(c.value)||!t.showZero&&c.value==="0"?"":String(c.value),n.emit("focus",{event:C,formatted:s.value,value:c.value}))}function v(C){var V;C.stopPropagation();let w=(V=C.target)==null?void 0:V.value;t.canNull||(w=w||0);const N=i(w);s.value=N,u(p(N))}function x(C){C.key==="ArrowDown"&&(C.preventDefault(),f()),C.key==="ArrowUp"&&(C.preventDefault(),g()),C.stopPropagation()}return{textBoxValue:h,onBlurTextBox:y,onFocusTextBox:b,onInput:v,onKeyDown:x,isFocus:m}}function du(t,n,o){const{canDownward:a,canUpward:r,onClickDownButton:i,onClickUpButton:l}=o,s=e.computed(()=>({"input-group-append":!0,"btn-group":!0,"btn-group-number":!0})),p=e.computed(()=>({btn:!0,"btn-secondary":!0,"btn-number-flag":!0})),c=e.computed(()=>({cursor:r()?"pointer":"not-allowed","margin-left":0})),d=e.computed(()=>({cursor:a()?"pointer":"not-allowed","margin-left":0}));return()=>e.createVNode("div",{class:s.value},[e.createVNode("button",{title:"upButton",class:p.value,style:c.value,onClick:l,disabled:!r()},[e.createVNode("span",{class:"f-icon f-icon-arrow-chevron-up number-arrow-chevron"},null)]),e.createVNode("button",{title:"downButton",class:p.value,style:d.value,onClick:i,disabled:!a()},[e.createVNode("span",{class:"f-icon f-icon-arrow-chevron-down number-arrow-chevron"},null)])])}function uu(t,n,o){const a=e.ref(),{onBlurTextBox:r,onFocusTextBox:i,onInput:l,onKeyDown:s,textBoxValue:p}=o,c=e.computed(()=>t.disabled||t.readonly||!t.editable?"":t.placeholder),d=e.computed(()=>({"form-control":!0,"f-utils-fill":!0})),u=e.computed(()=>({"text-align":t.textAlign}));function f(h){h.stopPropagation()}function g(){t.selectOnCreated&&a.value.select(),t.focusOnCreated&&a.value.focus()}async function m(h){i(h),await e.nextTick,g()}return e.onMounted(async()=>{await e.nextTick,g()}),()=>e.createVNode("input",{ref:a,class:d.value,style:u.value,type:"text",value:p.value,disabled:t.disabled,readonly:t.readonly||!t.editable,placeholder:c.value,onBlur:r,onChange:f,onFocus:m,onInput:l,onKeydown:s},null)}const Wr=e.defineComponent({name:"FNumberSpinner",props:Lr,emits:["update:modelValue","valueChange","change","blur","focus","click","input"],setup(t,n){const o=lu(t,n),a=su(t,n,o),r=iu(t,n,a,o),i=cu(t,n,a,o,r),l=du(t,n,r),{displayValue:s,modelValue:p,getRealValue:c}=o,d=uu(t,n,i),{format:u}=a,{isFocus:f}=i,g=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton);return e.onMounted(()=>{const m=c(t.modelValue);s.value=u(m)}),e.watch(()=>[t.value],([m])=>{const h=c(m);p.value=h,s.value=u(h)}),e.watch(()=>[t.modelValue],([m])=>{m!==p.value&&(p.value=m,!f.value&&(s.value=u(c(m))))}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{s.value=u(p.value)}),()=>e.createVNode("div",{class:"input-group f-state-hover flex-row f-cmp-number-spinner"},[d(),g.value&&l()])}});function kC(t,n){function a(){return!0}function r(l,s){return{categoryId:"basic",categoryName:"基本信息",properties:[{propertyID:"id",propertyName:"标识",propertyType:"string",propertyValue:e.ref(""),description:"组件的id",readonly:()=>!0,visible:()=>!0,editor:{type:"input-group"}}]}}function i(l){const s=[],p=r();return s.push(p),s}return{canAccepts:a,getPropConfig:i}}const BC=e.defineComponent({name:"FNumberSpinnerDesign",props:Lr,emits:["update:modelValue","valueChange","change","blur","focus","click","input"],setup(t,n){var b;const o=lu(t,n),a=su(t,n,o),r=iu(t,n,a,o),i=cu(t,n,a,o,r),l=du(t,n,r),s=uu(t,n,i),{displayValue:p,modelValue:c,getRealValue:d}=o,{format:u}=a,f=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton),g=e.ref(),m=e.inject("design-item-context"),h=kC(m.schema,(b=m.parent)==null?void 0:b.schema),y=ve(g,m,h);return e.onMounted(()=>{g.value.componentInstance=y}),n.expose(y.value),e.onMounted(()=>{const v=d(t.modelValue);p.value=u(v)}),e.watch(()=>[t.value],([v])=>{const x=d(v);c.value=x,p.value=u(x)}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{p.value=u(c.value)}),()=>e.createVNode("div",{ref:g,class:"input-group f-state-hover flex-row f-cmp-number-spinner"},[s(),f.value&&l()])}}),fu={install(t){t.component(Wr.name,Wr)},register(t,n,o){t["number-spinner"]=Wr,n["number-spinner"]=ru},registerDesigner(t,n,o){t["number-spinner"]=BC,n["number-spinner"]=ru}},TC=e.defineComponent({name:"FOrderDesign",props:Oa,emits:["change"],setup(t,n){var C;const o=e.ref(t.items),a=e.ref("排序列"),r=e.ref("排序方式"),i=e.ref("添加排序列"),l=[{id:"asc",name:"升序"},{id:"desc",name:"降序"}],s=e.ref(new Map),p=e.ref(),c=e.inject("design-item-context"),d=hn(c.schema,(C=c.parent)==null?void 0:C.schema),u=ve(p,c,d);e.onMounted(()=>{p.value.componentInstance=u}),n.expose(u.value);function f(){const w=o.value.map(N=>[N.id,!0]);s.value=new Map(w)}f();const g=e.computed(()=>t.dataSource.map(w=>(w.disabled=s.value.has(w.id),w))),m=e.computed(()=>({"f-order":!0}));function h(w){o.value=o.value.filter(N=>N.id!==w.id),f(),n.emit("change",o.value)}function y(){o.value=[...o.value,{id:Date.now().toString(),name:"",order:"asc"}],f(),n.emit("change",o.value)}function b(w){f(),n.emit("change",o.value)}function v(w){if(w&&w.length){const N=new Map;w.reduce((V,D)=>(V.set(D.id,D),V),N),o.value=w.map(V=>N.get(V.id)),n.emit("change",o.value)}}function x(){return e.createVNode(kt,{style:"flex:1",data:o.value,draggable:!0,view:"DraggableView","keep-order":!0,itemClass:"f-order-item",onRemoveItem:h,onChange:v},{header:()=>e.createVNode("div",{class:"f-order-header"},[e.createVNode("span",{class:"f-order-header-order-field"},[a.value]),e.createVNode("span",{class:"f-order-header-order-type"},[r.value])]),itemContent:w=>e.createVNode("div",{class:"f-order-item-content"},[e.createVNode(Bt,{class:"f-order-item-content-order-field",data:g.value,valueField:"id",textField:"name",idField:"id",modelValue:w.id,"onUpdate:modelValue":N=>w.id=N,onChange:b,onClear:b},null),e.createVNode(Bt,{class:"f-order-item-content-order-type",data:l,valueField:"id",textField:"name",idField:"id",modelValue:w.order,"onUpdate:modelValue":N=>w.order=N,onChange:b},null)]),footer:()=>e.createVNode("div",{class:"f-order-footer"},[e.createVNode(hc,{type:"link",class:"f-order-add-button",onClick:y},{default:()=>e.createVNode(e.Fragment,null,[e.createVNode("span",{class:"f-order-add-icon"},[e.createVNode("i",{class:"f-icon f-icon-add"},null)]),i.value])})])})}return()=>e.createVNode("div",{ref:p,class:m.value},[x()])}}),pu={install(t){t.component(uo.name,uo)},register(t,n,o){t.order=uo,n.order=mc},registerDesigner(t,n,o){t.order=TC,n.order=mc}},FC=new Map([["appearance",xe],["toolbar",ym]]),AC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/page-header.schema.json",title:"page-header",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Page Header",type:"string"},type:{description:"The type string of Page Header component",type:"string",default:"page-header"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},showIcon:{description:"",type:"boolean",default:!0},icon:{description:"",type:"string",default:"f-icon-page-title-record"},iconClass:{description:"",type:"string",default:"f-text-orna-bill"},title:{description:"",type:"string",default:""},subTitle:{description:"",type:"string",default:""},toolbar:{description:"",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar"},alignment:{description:"The alignment of Response Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Response Toolbar.",type:"array",default:[]}}},buttonClass:{description:"",type:"string",default:""},titleContentClass:{description:"",type:"string",default:""},contentClass:{description:"",type:"string",default:""},downContentClass:{description:"",type:"string",default:""},showPagination:{description:"",type:"boolean",default:!1},prePaginationDisabled:{description:"",type:"boolean",default:!0},nextPaginationDisabled:{description:"",type:"boolean",default:!1}}},IC={title:"page-header",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{title:"类型",type:"enum",description:"The type of a component.",editor:{type:"combo-list",data:[]}},icon:{title:"图标",type:"string",description:"图标"},title:{title:"标题",type:"string",description:"标题"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}}}};function EC(t,n,o){return n.title="标题",n}const qr={customClass:{type:String,default:""},showIcon:{type:Boolean,default:!0},icon:{type:String,default:"f-icon-page-title-record"},iconClass:{type:String,default:"f-text-orna-bill"},title:{type:String,default:""},subTitle:{type:String,default:""},buttonClass:{type:String,default:"col-6"},buttons:{type:Array,default:[]},titleContentClass:{type:String,default:""},contentClass:{type:String,default:""},downContentClass:{type:String,default:""},showPagination:{type:Boolean,default:!1},prePaginationDisabled:{type:Boolean,default:!0},nextPaginationDisabled:{type:Boolean,default:!1}},mu=me(qr,AC,FC,EC,IC),zr=e.defineComponent({name:"FPageHeader",props:qr,emits:["Click","PrePaginationClick","NextPaginationClick"],setup(t,n){const o=e.ref(t.buttons),a=x=>{n.emit("Click",x)};function r(x,C){x&&C&&C.split(" ").reduce((N,V)=>(N[V]=!0,N),x)}const i=e.computed(()=>{const x={"f-page-header":!0};return r(x,t.customClass),x}),l=e.computed(()=>{const x={"f-title-icon":!0};return r(x,t.iconClass),x}),s=e.computed(()=>{const x={"f-icon":!0};return r(x,t.icon),x}),p=e.computed(()=>{const x={"f-title":!0};return r(x,t.titleContentClass),x}),c=e.computed(()=>{const x={"f-content":!0};return r(x,t.contentClass),x}),d=e.computed(()=>{const x={"f-content":!0};return r(x,t.downContentClass),x}),u=e.computed(()=>({"f-icon f-icon-arrow-w":!0,"f-state-disabled":t.prePaginationDisabled})),f=e.computed(()=>({"f-icon f-icon-arrow-e":!0,"f-state-disabled":t.nextPaginationDisabled}));function g(x){t.prePaginationDisabled||n.emit("PrePaginationClick",x)}function m(x){t.nextPaginationDisabled||n.emit("NextPaginationClick",x)}function h(){return n.slots.titleContent?e.createVNode("div",{class:p.value},[e.createTextVNode(" "),n.slots.titleContent()]):e.createVNode("div",{class:"f-title"},[t.showIcon&&t.icon?e.createVNode("span",{class:l.value},[e.createVNode("i",{class:s.value},null)]):"",e.createVNode("h4",{class:"f-title-text"},[t.title]),t.subTitle?e.createVNode("h5",{class:"f-title-subtitle"},[t.subTitle]):"",t.showPagination?e.createVNode("div",{class:"f-title-pagination"},[e.createVNode("span",{class:u.value,onClick:g},null),e.createVNode("span",{class:f.value,onClick:m},null)]):""])}function y(){return n.slots.content?e.createVNode("div",{class:c.value},[e.createTextVNode(" "),n.slots.content()]):""}function b(){if(t.buttons&&t.buttons.length>0)return e.createVNode(pn,{customClass:t.buttonClass,items:o.value,onClick:a},null)}function v(){return n.slots.downContent?e.createVNode("div",{class:d.value},[e.createTextVNode(" "),n.slots.downContent()]):""}return()=>e.createVNode("div",{class:i.value},[e.createVNode("nav",{class:"f-page-header-base"},[h(),y(),b()]),v()])}});function MC(t,n){function o(r){return!1}function a(){return!0}return{canAccepts:o,hideNestedPaddingInDesginerView:a}}function PC(t,n){const o=e.inject("design-item-context"),a=e.inject("toolbar-item-handler",()=>{});function r(){a&&a()}function i($){const T={"dropdown-menu":!0};if($.class){const S=$.menuClass.split(" ");S&&S.length&&S.reduce((F,A)=>(F[A]=!0,F),T)}return T}function l($){const T={disabled:!$.enable,"dropdown-submenu":!0,"f-rt-dropdown":!0},S=$.dropdownClass.split(" ");return S&&S.length&&S.reduce((F,A)=>(F[A]=!0,F),T),T}function s($){const T={disabled:!$.enable,"dropdown-item":!0,"f-rt-btn":!0,"position-relative":!0,"farris-component":!0},S=$.class.split(" ");return S&&S.length&&S.reduce((F,A)=>(F[A]=!0,F),T),T}let p;const c=new Map;function d($,T,S){var A;((A=$.target)==null?void 0:A.id)===T.id&&$.stopPropagation();const F=S?S.id:"__top_item__";if(T.children&&T.children.length&&(T.expanded=!T.expanded,T.expanded?c.set(F,T):c.delete(F)),c.has(F)&&c.get(F)!==T){const E=c.get(F);E&&(E.expanded=!1)}}function u($){$&&($.stopPropagation(),$.preventDefault())}function f(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(T=>T.classList.remove("dgComponentFocused"));const $=document.getElementsByClassName("dgComponentSelected");Array.from($).forEach(T=>T.classList.remove("dgComponentSelected"))}function g($){$.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function m($){const{buttons:T=[]}=o.schema;let S=[];T.forEach(E=>{S=S.concat(E.children||[])});const F=S.findIndex(E=>E.id===$),A=F===-1?null:S[F];return{index:F,item:A}}function h($){const{buttons:T=[]}=o.schema,S=T.findIndex(A=>A.id===$),F=S===-1?null:T[S];return{index:S,item:F}}function y($){var F;o.schema;const{index:T,item:S}=m($);(F=o==null?void 0:o.setupContext)==null||F.emit("selectionChange",S==null?void 0:S.type,S)}const b=function($){const{componentType:T}=$,S=mt(T,$),F=T.toLowerCase().replace("-","_");return S&&!S.id&&S.type===T&&(S.id=`${F}_${Math.random().toString().slice(2,6)}`),S},v=function(){const $={componentType:"response-toolbar-item",parentComponentInstance:n.value,targetPosition:-1};return b($)};function x($,T){u($),f(),g($),y(T.id)}function C($,T,S){u($);const F=T.id,A=S&&S.id,{buttons:E=[]}=o.schema;if(!A)return;const{index:I}=h(A);if(I===-1)return;const{index:R}=m(F);R!==-1&&(E[I].children.splice(R,1),r())}function w($,T,S){u($);const F=S&&S.id,{buttons:A=[]}=o.schema;if(!F)return;const{index:E}=h(F);if(E===-1)return;const I=v(),R=Object.assign({},I,{text:T.text});A[E].children.push(R),r()}function N($,T,S){u($);const F=S&&S.id,{buttons:A=[]}=o.schema;if(!F)return;const{index:E}=h(F);if(E===-1)return;const I=v(),R=Object.assign({},I,{text:"按钮"});A[E].children.push(R),r()}function V($,T){return e.createVNode("div",{class:"component-btn-group"},[e.createVNode("div",null,[e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeButton",style:"position:static;",onClick:S=>C(S,$,T)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"复制",ref:"copyButton",style:"position:static;",onClick:S=>w(S,$,T)},[e.createVNode("i",{class:"f-icon f-icon-yxs_copy"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增同级",ref:"appendSame",style:"width:85px!important;padding:0 5px;position:static;",onClick:S=>N(S,$,T)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle text-white mr-1"},null),e.createVNode("span",{style:"font-size:13px;margin:auto"},[e.createTextVNode("新增同级")])])])])}function D($){return $.children.map(T=>T.children&&T.children.length?e.createVNode("li",{class:l(T),id:T.id,onClick:S=>T.enable&&d(S,T,$)},[e.createVNode("span",{id:T.id,class:s(T),onMouseover:S=>T.enable&&d(S,T,$)},[T.text,e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right",style:"display: inline-block;float: right;line-height: 1.25rem;"},null)]),p(T,T)]):e.createVNode("li",{class:s(T),id:T.id,onClick:S=>x(S,T)},[V(T,$),t.shouldShowIcon(T)&&e.createVNode("i",{class:t.iconClass(T)},null),T.text]))}function k($,T,S){const F={display:$.expanded?"block":"none",position:"fixed",maxWidth:"300px",width:"auto",minWidth:"120px"},A=document.getElementsByTagName("body")[0].getClientRects()[0].width,E=T,I=E==null?void 0:E.getClientRects();if(E&&I&&I.length){const{top:R,width:O,left:G,right:M,height:j}=I[0],H=Math.ceil(j+R);F.top=`${H}px`,F.left=`${G}px`;const _=$.id+"_menu",W=T?T.querySelector("#"+_):null;if(W){F.display==="block"&&(W.style.display="block");const K=W.getBoundingClientRect();if(S){F.top=`${R-6}px`;const z=Math.ceil(O+G);F.left=`${z}px`}A-G-O<K.width&&(F.left=`${(S?G:M)-K.width}px`)}}return F}p=function($,T){var E,I;const S=e.getCurrentInstance(),F=T?T.id:$.id,A=(I=(E=S==null?void 0:S.exposed)==null?void 0:E.elementRef.value)==null?void 0:I.querySelector("#"+F);return e.createVNode("ul",{class:i($),style:k($,A,T),id:$.id+"_menu"},[D($)])};function B(){c.forEach($=>{$.expanded=!1}),c.clear()}return{renderDropdownMenu:p,clearAllDropDownMenu:B}}function OC(t,n,o){const a=e.ref(t.alignment),{renderDropdownMenu:r,clearAllDropDownMenu:i}=PC(n,o),l=e.inject("design-item-context"),s=e.inject("toolbar-item-handler",()=>{});function p(){s&&s()}function c(B){const $={"btn-group":!0,"f-rt-dropdown":!0,"f-btn-ml":a.value==="right","f-btn-mr":a.value==="left"},T=B.dropdownClass.split(" ");return T&&T.length&&T.reduce((S,F)=>(S[F]=!0,S),$),$}function d(B){const $={btn:!0,disabled:!B.enable,"position-relative":!0,"farris-component":!0,"f-rt-btn":!0,"btn-icontext":!!(B.icon&&B.icon.trim())};if(B.class){const T=B.class.split(" ");T&&T.length&&T.reduce((S,F)=>(S[F]=!0,S),$)}return $}function u(B){B&&(B.stopPropagation(),B.preventDefault())}function f(B,$){u(B);const T=$.expanded;document.body.click(),$.expanded=!T}const g=function(B){const{componentType:$}=B,T=mt($,B),S=$.toLowerCase().replace("-","_");return T&&!T.id&&T.type===$&&(T.id=`${S}_${Math.random().toString().slice(2,6)}`),T},m=function(){const B={componentType:"response-toolbar-item",parentComponentInstance:o.value,targetPosition:-1};return g(B)};function h(B){const $=l.schema.buttons||l.schema.contents,T=$==null?void 0:$.findIndex(F=>F.id===B),S=T===-1?null:$[T];return{index:T,toolbarItem:S}}function y(B,$){var I;const{index:T,toolbarItem:S}=h($);if(T===-1)return;const F=S.text||"按钮",A=m(),E=Object.assign({},A,{text:F});(I=l.schema.buttons)==null||I.push(E),p()}function b(B,$){const{index:T,toolbarItem:S}=h($);if(T===-1)return;const F=S.text||"按钮",A=m(),E=Object.assign({},A,{text:F}),I=l.schema.buttons[T].children||[];I.push(E),l.schema.buttons[T].children=I,p()}function v(B,$){const T=l.schema.buttons||l.schema.contents,S=T==null?void 0:T.findIndex(F=>F.id===$);S!==-1&&(T.splice(S,1),p())}function x(B){return e.createVNode("div",{class:"component-btn-group"},[e.createVNode("div",null,[e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeButton",style:"position:static;",onClick:$=>v($,B)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"复制",ref:"copyButton",style:"position:static;",onClick:$=>y($,B)},[e.createVNode("i",{class:"f-icon f-icon-yxs_copy"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增子级",ref:"appendChildButton",style:"width:85px!important;padding:0 5px;position:static;",onClick:$=>b($,B)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle text-white mr-1"},null),e.createVNode("span",{style:"font-size:13px;margin:auto"},[e.createTextVNode("新增子级")])])])])}function C(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach($=>$.classList.remove("dgComponentFocused"));const B=document.getElementsByClassName("dgComponentSelected");Array.from(B).forEach($=>$.classList.remove("dgComponentSelected"))}function w(B){B.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function N(B){var F;const $=l.schema.buttons||l.schema.contents,T=$==null?void 0:$.findIndex(A=>A.id===B);if(T===-1)return;const S=$[T];(F=l==null?void 0:l.setupContext)==null||F.emit("selectionChange","response-toolbar-item",S)}function V(B,$){u(B),C(),w(B),u(B),f(B,$),N($.id)}function D(B){return e.createVNode("div",{id:B.id,class:c(B)},[e.createVNode("div",{class:d(B),style:"display: flex;padding-right: 0.1rem;",onClick:$=>B.enable&&V($,B)},[x(B.id),n.shouldShowIcon(B)&&e.createVNode("i",{class:n.iconClass(B)},null),e.createVNode("span",null,[B.text]),e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-down",style:"display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"},null)]),r(B)])}function k(){i()}return{renderToolbarDropdown:D,clearAllDropDown:k}}const{buildResponseToolbarItems:hu}=Ia(),Gr=e.defineComponent({name:"FResponseToolbarDesign",props:Fa,emits:["Click"],setup(t,n){const o=e.ref(hu(t.items)),a=e.ref(),r=e.ref(),i=e.ref(t.alignment),l={id:"__more_buttons__",text:"More"},s=e.ref(new kn(l)),p=cc(),c=e.computed(()=>s.value.children.length>0),d=e.ref(),u=e.inject("design-item-context"),f=ve(d,u),g=e.inject("toolbar-item-handler",()=>{});e.onMounted(()=>{d.value.componentInstance=f}),n.expose(f.value);function m(){g&&g()}const h=e.computed(()=>({"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0})),y=e.computed(()=>({"d-flex":!0,"flex-nowrap":!0,"justify-content-end":i.value==="right","justify-content-start":i.value==="left"})),{renderToolbarDropdown:b,clearAllDropDown:v}=OC(t,p,f);function x(){o.value.filter(_=>_.children&&_.children.length>0).forEach(_=>{_.expanded=!1}),s.value.expanded=!1,v()}function C(_){const W={"f-icon":!0};if(_.icon){const K=_.icon.trim().split(" ");K&&K.length&&K.reduce((z,q)=>(z[q]=!0,z),W)}return W}function w(_){return!!(_.icon&&_.icon.trim())}function N(_){const W={btn:!0,"f-rt-btn":!0,"f-btn-ml":i.value==="right","f-btn-mr":i.value==="left","btn-icontext":!!(_.icon&&_.icon.trim())};if(_.class){const K=_.class.split(" ");K&&K.length&&K.reduce((z,q)=>(z[q]=!0,z),W)}return W}function V(_){_&&(_.stopPropagation(),_.preventDefault())}function D(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(W=>W.classList.remove("dgComponentFocused"));const _=document.getElementsByClassName("dgComponentSelected");Array.from(_).forEach(W=>W.classList.remove("dgComponentSelected"))}function k(_){_.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function B(_){var q;const W=u.schema.buttons||u.schema.contents,K=W==null?void 0:W.findIndex(L=>L.id===_);if(K===-1)return;const z=W[K];(q=u==null?void 0:u.setupContext)==null||q.emit("selectionChange","response-toolbar-item",z)}const $=function(_){const{componentType:W}=_,K=mt(W,_),z=W.toLowerCase().replace("-","_");return K&&!K.id&&K.type===W&&(K.id=`${z}_${Math.random().toString().slice(2,6)}`),K},T=function(){const _={componentType:"response-toolbar-item",parentComponentInstance:f.value,targetPosition:-1};return $(_)};function S(_,W){D(),k(_),V(_),B(W)}function F(_,W){const K=u.schema.buttons||u.schema.contents,z=K==null?void 0:K.findIndex(q=>q.id===W);z!==-1&&(K.splice(z,1),m())}function A(_){const W=u.schema.buttons||u.schema.contents,K=W==null?void 0:W.findIndex(q=>q.id===_),z=K===-1?null:W[K];return{index:K,toolbarItem:z}}function E(_,W){var U;const{index:K,toolbarItem:z}=A(W);if(K===-1)return;const q=z.text||"按钮",L=T(),X=Object.assign({},L,{text:q});(U=u.schema.buttons)==null||U.push(X),m()}function I(_,W){const{index:K,toolbarItem:z}=A(W);if(K===-1)return;const q=z.text||"按钮",L=T(),X=Object.assign({},L,{text:q}),U=u.schema.buttons[K].items||[];U.push(X),u.schema.buttons[K].children=U,m()}function R(_){return e.createVNode("div",{class:"component-btn-group"},[e.createVNode("div",null,[e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeButton",style:"position:static;",onClick:W=>F(W,_)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"复制",ref:"copyButton",style:"position:static;",onClick:W=>E(W,_)},[e.createVNode("i",{class:"f-icon f-icon-yxs_copy"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增子级",ref:"appendChildButton",style:"width:85px!important;padding:0 5px;position:static;",onClick:W=>I(W,_)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle text-white mr-1"},null),e.createVNode("span",{style:"font-size:13px;margin:auto"},[e.createTextVNode("新增子级")])])])])}function O(_){return e.createVNode("div",{class:"farris-component position-relative",style:"display:inline-block!important;",onClick:W=>S(W,_.id)},[R(_.id),e.createVNode("button",{type:"button",class:N(_),id:_.id,disabled:!_.enable},[w(_)&&e.createVNode("i",{class:C(_)},null),_.text])])}const G=new Map,M=[];function j(_){const W=r.value;let K=_;const z=Array.from(W.children),q=z[z.length-1].id==="__more_buttons__"?z[z.length-1]:null;if(q){const re=q.computedStyleMap().get("margin-left"),de=q.computedStyleMap().get("margin-right"),ge=(re?re.value:0)+q.getBoundingClientRect().width+(de?de.value:0);K-=ge}const L=z.filter(re=>re.id!=="__more_buttons__");for(const re of L){const de=re.computedStyleMap().get("margin-left"),ge=re.computedStyleMap().get("margin-right"),ie=(de?de.value:0)+re.getBoundingClientRect().width+(ge?ge.value:0);K<ie?(G.set(re.id,!0),M.push({id:re.id,width:ie})):K-=ie}if(M.length)for(let re=M.length-1;re>=0;re--){const de=M[re].width;if(K>=de)K-=de,G.delete(M[re].id),M.pop();else break}const X=Object.assign({},s.value);X.children=[];const U=new kn(X),Z=o.value.reduce((re,de)=>(G.has(de.id)&&U.children.push(de),de.visible=!G.has(de.id),re.push(de),re),[]);s.value=U,o.value=Z}const H=new ResizeObserver(_=>{if(_.length){const K=_[0].contentRect.width,q=r.value.getBoundingClientRect().width;(K<q||M.length)&&j(K)}});return e.onMounted(()=>{const _=a.value;H.observe(_),document.body.addEventListener("click",x)}),e.onUnmounted(()=>{H.disconnect(),document.body.removeEventListener("click",x)}),e.watch(()=>t.items,()=>{o.value=hu(t.items)}),()=>e.createVNode("div",{ref:d,class:h.value},[e.createVNode("div",{ref:a,class:y.value},[e.createVNode("div",{ref:r,class:"d-inline-block f-response-content",style:"white-space: nowrap;"},[o.value.filter(_=>_.visible).map(_=>_.children&&_.children.length>0?b(_):O(_)),c.value&&b(s.value)])])])}}),gu=Aa,yu={install(t){t.component(pn.name,pn)},register(t,n,o){t["response-toolbar"]=pn,n["response-toolbar"]=Aa},registerDesigner(t,n,o){t["response-toolbar"]=Gr,n["response-toolbar"]=Aa}},RC={id:{type:String,default:""},canAdd:{type:Boolean,default:!1},canDelete:{type:Boolean,default:!1},canMove:{type:Boolean,default:!1},contentKey:{type:String,default:"contents"},childLabel:{type:String,default:""},childType:{type:String,default:""},modelValue:{type:Object}};function jC(t,n,o){var C;function a(){}const r="",i=e.ref();function l(){return!0}function s(){return!1}function p(){return!0}function c(){return!0}function d(w){if(!w||!w.value)return null;const N=e.ref(w==null?void 0:w.value.parent),V=d(N);return V||null}function u(w=n){const{componentInstance:N,designerItemElementRef:V}=w;return!N||!N.value?null:N.value.canMove?V:u(w.parent)}function f(w){return!!o}function g(){return(n==null?void 0:n.schema.label)||(n==null?void 0:n.schema.title)||(n==null?void 0:n.schema.name)}function m(){}function h(w,N){}function y(w){const{componentType:N}=w;let V=mt(N,w);const D=N.toLowerCase().replace("-","_");return V&&!V.id&&V.type===N&&(V.id=`${D}_${Math.random().toString().slice(2,6)}`),V}function b(w,N){const V=String(w.getAttribute("data-controltype")),D=w.getAttribute("data-feature"),k=D?JSON.parse(D):{};k.parentComponentInstance=i.value;let B=mt(V,k);const $=V.toLowerCase().replace("-","_");return B&&!B.id&&B.type===V&&(B.id=`${$}_${Math.random().toString().slice(2,6)}`),B}function v(w){}function x(){return[]}return i.value={canMove:l(),canSelectParent:s(),canDelete:p(),canNested:!c(),contents:[],elementRef:t,parent:(C=n.parent)==null?void 0:C.componentInstance,schema:n.schema,styles:r,canAccepts:f,getBelongedComponentInstance:d,getDraggableDesignItemElement:u,getDraggingDisplayText:g,getPropConfig:x,getDragScopeElement:m,onAcceptMovedChildElement:h,onAcceptNewChildElement:b,onChildElementMovedOut:v,addNewChildComponentSchema:y,updateDragAndDropRules:a,triggerBelongedComponentToMoveWhenMoved:e.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:e.ref(!1)},i}const bu=e.defineComponent({name:"FDesignerInnerItem",props:RC,emits:["selectionChange","addComponent"],setup(t,n){const o=e.ref(t.canMove),a=e.ref(t.canAdd),r=e.ref(t.canDelete),i=e.ref(!1),l=e.ref(t.contentKey),s=e.ref(t.childType),p=e.ref(t.childLabel),c=e.ref(t.modelValue),d=e.ref(""),u=e.ref(),f=e.inject("canvas-dragula"),g=e.ref(),m=e.inject("design-item-context"),h={designerItemElementRef:u,componentInstance:g,schema:c.value,parent:m,setupContext:n};e.provide("design-item-context",h);const y=e.computed(()=>({"farris-component":!0,"position-relative":o.value&&r.value,"farris-nested":i.value,"can-move":o.value,"d-none":u.value&&u.value.classList.contains("d-none")})),b=e.computed(()=>{const $={};return d.value&&d.value.split(";").reduce((T,S)=>{const[F,A]=S.split(":");return F&&(T[F]=A),T},$),$});function v($,T){if(m&&m.schema[l.value]){const S=m.schema[l.value].findIndex(F=>F.id===T.id);m.schema[l.value].splice(S,1),m.componentInstance.value.updateDragAndDropRules()}}function x($){if(g.value.addNewChildComponentSchema){const T={componentType:s.value,label:p.value,parentComponentInstance:g.value,targetPosition:-1},S=g.value.addNewChildComponentSchema(T);c.value[l.value].push(S),n.emit("addComponent")}}function C(){return a.value&&e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增",ref:"removeComponent",onClick:$=>{x()}},[e.createVNode("i",{class:"f-icon f-icon-plus-circle"},null)])}function w($){return r.value&&e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:T=>{v(T,$)}},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function N($){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[C(),w($)])])}e.watch(()=>t.modelValue,$=>{c.value=$,h.schema=$});function V($){const T=$.target;qo(T)}function D(){var $,T;(T=($=c.value)==null?void 0:$.contents)!=null&&T.length&&u.value&&u.value.addEventListener("scroll",V)}function k(){const $=u.value,T=e.ref($.children[1]);return jC(T,h).value}e.onMounted(()=>{if(u.value){const $=u.value.querySelector(`[data-dragref='${c.value.id}-container']`);g.value=$&&$.componentInstance?$.componentInstance.value:k(),f&&$&&f.attachComponents($,c.value),i.value=g.value.canNested!==void 0?g.value.canNested:i.value,o.value=g.value.canMove!==void 0?g.value.canMove:o.value,d.value=g.value.styles||"",u.value&&(u.value.componentInstance=g,u.value.designItemContext=h)}D(),Rt.value++}),e.onBeforeUnmount(()=>{u.value&&u.value.removeEventListener("scroll",V)});function B($){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(S=>S.classList.remove("dgComponentFocused")),$&&($.preventDefault(),$.stopPropagation());const T=u.value;if(T){const S=document.getElementsByClassName("dgComponentSelected");if(!(S&&S.length===1&&S[0]===u.value)){Array.from(S).forEach(E=>E.classList.remove("dgComponentSelected")),T.classList.add("dgComponentFocused"),n.emit("selectionChange",c.value.type,c.value);const A=g.value.getDraggableDesignItemElement(h);A&&A.value&&A.value.classList.add("dgComponentSelected")}}Rt.value++}return()=>e.createVNode("div",{id:`${t.id}-design-item`,ref:u,class:y.value,style:b.value,onClick:B},[N(c.value),n.slots.default&&n.slots.default()])}}),vu=e.defineComponent({name:"FDesignerTemplateItem",props:Rs,emits:["selectionChange"],setup(t,n){const o=e.ref(),a=e.computed(()=>({"farris-component":!0}));function r(i){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(s=>s.classList.remove("dgComponentFocused")),i&&(i.preventDefault(),i.stopPropagation());const l=o.value;if(l){const s=document.getElementsByClassName("dgComponentSelected");s&&s.length===1&&s[0]===o.value||(Array.from(s).forEach(c=>c.classList.remove("dgComponentSelected")),l.classList.add("dgComponentFocused"))}Rt.value++}return()=>e.createVNode("div",{id:`${t.id}-design-item`,ref:o,class:a.value,onClick:r},[n.slots.default&&n.slots.default()])}}),_C=e.defineComponent({name:"FPageHeaderDesign",props:qr,emits:["Click"],setup(t,n){var d;const o=e.ref(),a=e.inject("design-item-context"),r=MC(a.schema,(d=a.parent)==null?void 0:d.schema),i=ve(o,a,r),l=e.ref(a.schema.toolbar||{type:"response-toolbar",buttons:[]}),s=e.ref(gu(l.value));e.onMounted(()=>{o.value.componentInstance=i}),e.watch(()=>a.schema.toolbar,()=>{l.value=a.schema.toolbar||{type:"response-toolbar",buttons:[]},s.value=gu(l.value)},{deep:!0});const p=e.computed(()=>[...s.value.items]);function c(u,f){a&&a.setupContext&&a.setupContext.emit("selectionChange",u,f)}return n.expose(i.value),()=>e.createVNode("div",{ref:o},[e.createVNode("nav",{class:"f-page-header-base"},[e.createVNode("div",{class:"f-title"},[e.createVNode(vu,null,{default:()=>[e.createVNode("span",{class:"f-title-icon f-text-orna-manage"},[e.createVNode("i",{class:t.icon},null)])]}),e.createVNode(vu,null,{default:()=>[e.createVNode("h4",{class:"f-title-text"},[t.title])]})]),e.createVNode(bu,{class:"col-5",modelValue:l.value,"onUpdate:modelValue":u=>l.value=u,canAdd:!0,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",onSelectionChange:c},{default:()=>[e.createVNode(Gr,{items:p.value},null)]})])])}}),xu={install(t){t.component(zr.name,zr)},register(t,n,o){t["page-header"]=zr,n["page-header"]=mu},registerDesigner(t,n,o){t["page-header"]=_C,n["page-header"]=mu}},HC=new Map([["appearance",xe]]),LC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/page-footer.schema.json",title:"page-footer",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a page-footer",type:"string"},type:{description:"The type string of page-footer component",type:"string",default:"page-footer"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function WC(t,n,o){return n}const qC={title:"page-footer",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Ur={customClass:{type:String,default:""},enableCollapse:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!0},collapsedText:{type:String,default:"More"},expandedText:{type:String,default:"More"},contentClass:{type:String,default:""},headerClass:{type:String,default:""},headerContentClass:{type:String,default:""},headerToolbarClass:{type:String,default:""},showHeader:{type:String,default:!1}},Cu=me(Ur,LC,HC,WC,qC),Yr=e.defineComponent({name:"FPageFooter",props:Ur,emits:[],setup(t,n){const o=e.ref(t.collapsed),a=e.computed(()=>t.collapsedText),r=e.ref(t.contentClass),i=e.computed(()=>t.enableCollapse),l=e.computed(()=>t.expandedText),s=e.ref(t.headerClass),p=e.ref(t.headerContentClass),c=e.ref(t.headerToolbarClass),d=e.computed(()=>t.showHeader),u=e.ref(t.customClass);function f(N){N&&N.stopImmediatePropagation(),o.value=!o.value}function g(){return i.value&&e.createVNode("div",{class:"toolbar--collapse",onClick:N=>f(N)},[e.createVNode("span",{class:"toobar--collapse-text"},[o.value?l.value:a.value]),e.createVNode("i",{class:"f-icon toolbar--collapse-icon"},null)])}const m=e.computed(()=>{const N={"f-toolbar":!0};return c.value.split(" ").reduce((D,k)=>(D[k]=!0,D),N),N});function h(){return e.createVNode("div",{class:m.value},[n.slots.headerToolbar&&n.slots.headerToolbar(),!n.slots.headerToolbar&&g()])}const y=e.computed(()=>{const N={"f-content":!0};return p.value.split(" ").reduce((D,k)=>(D[k]=!0,D),N),N});function b(){return e.createVNode(e.Fragment,null,[n.slots.headerContent&&e.createVNode("div",{class:y.value},[n.slots.headerContent()]),h()])}const v=e.computed(()=>{const N={"f-cmp-footer-header":!0};return s.value.split(" ").reduce((D,k)=>(D[k]=!0,D),N),N});function x(){return e.createVNode("header",{class:v.value},[n.slots.header&&n.slots.header(),!n.slots.header&&b()])}const C=e.computed(()=>{const N={"f-cmp-footer":!0,"f-state-collapse":i.value&&o.value,"f-cmp-footer-accordion":i.value};return u.value.split(" ").reduce((D,k)=>(D[k]=!0,D),N),N}),w=e.computed(()=>{const N={"f-cmp-footer-content":!0};return r.value.split(" ").reduce((D,k)=>(D[k]=!0,D),N),N});return()=>e.createVNode("div",{class:C.value},[e.createVNode("footer",{class:"f-cmp-footer-container"},[d.value&&x(),e.createVNode("div",{class:w.value},[n.slots.default&&n.slots.default()])])])}}),zC=e.defineComponent({name:"FPageFooterDesign",props:Ur,emits:[],setup(t,n){var k;const o=e.ref(t.collapsed),a=e.ref(t.collapsedText),r=e.ref(t.contentClass),i=e.ref(t.enableCollapse),l=e.ref(t.expandedText),s=e.ref(t.headerClass),p=e.ref(t.headerContentClass),c=e.ref(t.headerToolbarClass),d=e.ref(t.showHeader),u=e.ref(),f=e.inject("design-item-context"),g=hn(f.schema,(k=f.parent)==null?void 0:k.schema),m=ve(u,f,g);e.onMounted(()=>{u.value.componentInstance=m}),n.expose(m.value);function h(B){B&&B.stopImmediatePropagation(),o.value=!o.value}function y(){return i.value&&e.createVNode("div",{class:"toolbar--collapse",onClick:B=>h(B)},[e.createVNode("span",{class:"toobar--collapse-text"},[o.value?l.value:a.value]),e.createVNode("i",{class:"f-icon toolbar--collapse-icon"},null)])}const b=e.computed(()=>{const B={"f-toolbar":!0};return c.value.split(" ").reduce((T,S)=>(T[S]=!0,T),B),B});function v(){return e.createVNode("div",{class:b.value},[n.slots.headerToolbar&&n.slots.headerToolbar(),!n.slots.headerToolbar&&y()])}const x=e.computed(()=>{const B={"f-content":!0};return p.value.split(" ").reduce((T,S)=>(T[S]=!0,T),B),B});function C(){return e.createVNode(e.Fragment,null,[n.slots.headerContent&&e.createVNode("div",{class:x.value},[n.slots.headerContent()]),v()])}const w=e.computed(()=>{const B={"f-cmp-footer-header":!0};return s.value.split(" ").reduce((T,S)=>(T[S]=!0,T),B),B});function N(){return e.createVNode("header",{class:w.value},[n.slots.header&&n.slots.header(),!n.slots.header&&C()])}const V=e.computed(()=>{const B={"f-cmp-footer":!0,"f-state-collapse":i.value&&o.value,"f-cmp-footer-accordion":i.value};return s.value.split(" ").reduce((T,S)=>(T[S]=!0,T),B),B}),D=e.computed(()=>{const B={"f-cmp-footer-content":!0};return r.value.split(" ").reduce((T,S)=>(T[S]=!0,T),B),B});return()=>e.createVNode("div",{ref:u,class:V.value},[e.createVNode("footer",{class:"f-cmp-footer-container"},[d.value&&N(),e.createVNode("div",{class:D.value},[n.slots.default&&n.slots.default()])])])}}),wu={install(t){t.component(Yr.name,Yr)},register(t,n,o){t["page-footer"]=Yr,n["page-footer"]=Cu},registerDesigner(t,n,o){t["page-footer"]=zC,n["page-footer"]=Cu}},GC=new Map([["appearance",xe]]),UC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/pagination.schema.json",title:"pagination",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a pagination",type:"string"},type:{description:"The type string of pagination component",type:"string",default:"pagination"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]},YC={title:"pagination",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}};function KC(t,n,o){return n}const Kr={currentPage:{type:Number,default:1},mode:{type:String,default:"default"},pageSize:{type:Number,default:20},totalItems:{type:Number,default:0},showPageList:{type:Boolean,default:!0},showPageNumbers:{type:Boolean,default:!0},showRedirection:{type:Boolean,default:!0}},Nu=me(Kr,UC,GC,KC,YC);function Vu(t,n){const o=e.ref("跳转至"),a=e.ref(""),r=e.ref(t.value);e.watch(r,(p,c)=>{p>=1&&p<=n.value?t.value=p:r.value=c}),e.watch(t,p=>{r.value!==p&&(r.value=p)});function i(p){r.value=p.target.valueAsNumber}function l(p){p.key==="Enter"&&(r.value=p.target.valueAsNumber)}function s(){return e.createVNode("li",{class:"page-goto-input d-flex flex-row",style:"padding-left: 10px; white-space: nowrap;"},[e.createVNode("span",{class:"pg-message-text"},[o.value]),e.createVNode("input",{type:"number",class:"form-control farris-gotopagenumber",value:r.value,min:"1",max:n.value,style:"display: inline-block;margin-left:3px;",onBlur:p=>i(p),onKeyup:p=>l(p)},null),a.value])}return{renderGotoButton:s}}function Su(t,n,o){const a=e.computed(()=>({"page-item":!0,disabled:n.value}));function r(p){t.value=t.value<o.value?t.value+1:o.value}function i(p){t.value=o.value}function l(){return e.createVNode("li",{class:a.value},[!n.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:p=>r()},[e.createVNode("span",{class:"f-icon f-page-next"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-next"},null)])])}function s(){return e.createVNode("li",{class:a.value},[!n.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:p=>i()},[e.createVNode("span",{class:"f-icon f-page-last"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-last"},null)])])}return{renderLastPage:s,renderNextPage:l}}function $u(t,n){const o=e.ref("共"),a=e.ref("条"),r=e.computed(()=>({"pagination-message":!0,"text-truncate":!0,"d-flex":!0,"ml-auto":t.value==="right","flex-fill":t.value==="right"}));function i(){return e.createVNode("li",{class:r.value},[e.createVNode("div",{class:"text-truncate",style:"line-height: 26px"},[e.createVNode("span",{class:"pg-message-text"},[o.value]),e.createVNode("b",{class:"pg-message-total"},[n.value]),e.createVNode("span",{class:"pg-message-text"},[a.value])])])}return{renderPageInfo:i}}function Du(t,n,o,a){const r=e.ref(!1),i=e.ref("显示"),l=e.ref("条"),s=e.computed(()=>({dropup:!0,"dropdown-right":!0,"pg-pagelist":!0,"pagelist-disabled":a.value===0,show:r.value})),p=e.computed(()=>({"dropdown-menu":!0,show:r.value})),c=h=>({"dropdown-item":!0,active:n.value===h});function d(h){r.value=!0}function u(h){r.value=!1}function f(h,y,b){const x=h*y-y+1;return Math.ceil(x/b)}function g(h,y){t.value=f(t.value,n.value,y),n.value=y,r.value=!1}function m(){return e.createVNode("li",{class:"pagination-pagelist"},[e.createVNode("div",{class:s.value,onMouseenter:h=>d(),onMouseleave:h=>u()},[e.createVNode("div",{class:"pg-pagelist-info"},[e.createVNode("span",{class:"pagelist-text"},[i.value]),e.createVNode("b",{class:"cur-pagesize"},[n.value]),e.createVNode("span",{class:"pagelist-text"},[l.value]),e.createVNode("i",{class:"f-icon f-icon-dropdown"},null)]),e.createVNode("div",{class:p.value,style:"margin-bottom: -1px;"},[o.value.map(h=>e.createVNode("li",{class:c(h),onClick:y=>g(y,h)},[e.createVNode("span",null,[h])]))])])])}return{renderPageList:m}}function ku(t,n){const o=l=>({"page-item":!0,current:t.value===l.value,ellipsis:l.label==="..."}),a=l=>({"f-icon":!0,"f-icon-arrow-seek-left":l.value<t.value,"f-icon-arrow-seek-right":l.value>t.value});function r(l,s){t.value=s}function i(){return n.value.map(l=>e.createVNode("li",{class:o(l)},[t.value!==l.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:s=>r(s,l.value)},[e.createVNode("span",{class:"page-link-label"},[l.label]),l.label==="..."&&e.createVNode("i",{class:a(l)},null)]),t.value===l.value&&e.createVNode("span",{class:"page-link"},[l.label])]))}return{renderPageNumbers:i}}function Bu(t,n,o){const a=e.computed(()=>({"page-item":!0,disabled:n.value}));function r(p){t.value=1}function i(p){t.value=t.value>2?t.value-1:1}function l(){return e.createVNode("li",{class:a.value},[o.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:p=>r()},[e.createVNode("span",{class:"f-icon f-page-first"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-first"},null)])])}function s(){return e.createVNode("li",{class:a.value},[o.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:p=>i()},[e.createVNode("span",{class:"f-icon f-page-pre"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-pre"},null)])])}return{renderFirstPage:l,renderPreviousPage:s}}function Tu(t){const n=e.ref([]);function o(r,i,l,s){const p=Math.ceil(l/2);return r===l?s:r===1?r:l<s?s-p<i?s-l+r:p<i?i-p+r:r:r}function a(r,i,l,s){const p=[],c=Math.ceil(l/i),d=Math.ceil(s/2),u=r<=d,f=c-d<r,g=!u&&!f,m=s<c;let h=1;for(;h<=c&&h<=s;){const y=o(h,r,s,c),b=h===2&&(g||f),v=h===s-1&&(g||u),x=m&&(b||v)?"...":""+y;p.push({label:x,value:y}),h++}n.value=p}return{pages:n,updatePages:a}}const Bo=e.defineComponent({name:"FPagination",props:Kr,emits:["pageIndexChanged","pageSizeChanged"],setup(t,n){const o=e.ref(!1),a=e.ref(t.mode),r=e.ref(""),i=e.ref(!1),l=e.ref(t.pageSize),s=e.ref(t.currentPage),p=e.ref(t.totalItems),{pages:c,updatePages:d}=Tu(),u=e.computed(()=>s.value===1),f=e.computed(()=>[20,50,100]),g=e.computed(()=>Math.ceil(p.value/l.value)),m=e.computed(()=>s.value===g.value),h=e.computed(()=>t.showGoButton),y=e.computed(()=>s.value>1),b=e.computed(()=>!(i.value&&c.value.length<=1)),v=e.computed(()=>!0),x=e.computed(()=>t.showPageList),C=e.computed(()=>t.showPageNumbers),w=e.computed(()=>!0),{renderFirstPage:N,renderPreviousPage:V}=Bu(s,u,y),{renderLastPage:D,renderNextPage:k}=Su(s,m,g),{renderPageInfo:B}=$u(r,p),{renderPageList:$}=Du(s,l,f,p),{renderPageNumbers:T}=ku(s,c),{renderGotoButton:S}=Vu(s,g);d(s.value,l.value,p.value,7),e.watch([s,l],()=>{d(s.value,l.value,p.value,7)}),e.watch(s,()=>{n.emit("pageIndexChanged",s.value)}),e.watch(l,()=>{n.emit("pageSizeChanged",l.value)});const F=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:o.value,"pager-viewmode-default":a.value==="default","pager-viewmode-simple":a.value==="simple"})),A=e.computed(()=>({position:"relative","justify-content":r.value==="center"?"center":"start"}));function E(){return e.createVNode(e.Fragment,null,[v.value&&B(),x.value&&$(),w.value&&N(),w.value&&V(),C.value&&T(),w.value&&k(),w.value&&D(),h.value&&S()])}function I(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),w.value&&N(),w.value&&V(),S(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),g.value])]),w.value&&k(),w.value&&D()])}return()=>e.createVNode("div",{class:"pagination-container"},[b.value&&e.createVNode("ul",{role:"navigation",class:F.value,style:A.value},[a.value==="default"?E():I()])])}}),XC=e.defineComponent({name:"FPagination",props:Kr,emits:["pageIndexChanged","pageSizeChanged"],setup(t,n){var j;const o=e.ref(!1),a=e.ref(t.mode),r=e.ref(""),i=e.ref(!1),l=e.ref(t.pageSize),s=e.ref(t.currentPage),p=e.ref(t.totalItems),c=e.ref(),d=e.inject("design-item-context"),u=hn(d.schema,(j=d.parent)==null?void 0:j.schema),f=ve(c,d,u);e.onMounted(()=>{c.value.componentInstance=f}),n.expose(f.value);const{pages:g,updatePages:m}=Tu(),h=e.computed(()=>s.value===1),y=e.computed(()=>[20,50,100]),b=e.computed(()=>Math.ceil(p.value/l.value)),v=e.computed(()=>s.value===b.value),x=e.computed(()=>!0),C=e.computed(()=>s.value>1),w=e.computed(()=>!(i.value&&g.value.length<=1)),N=e.computed(()=>!0),V=e.computed(()=>!0),D=e.computed(()=>!0),k=e.computed(()=>!0),{renderFirstPage:B,renderPreviousPage:$}=Bu(s,h,C),{renderLastPage:T,renderNextPage:S}=Su(s,v,b),{renderPageInfo:F}=$u(r,p),{renderPageList:A}=Du(s,l,y,p),{renderPageNumbers:E}=ku(s,g),{renderGotoButton:I}=Vu(s,b);m(s.value,l.value,p.value,7),e.watch([s,l],()=>{m(s.value,l.value,p.value,7)}),e.watch(s,()=>{n.emit("pageIndexChanged",s.value)}),e.watch(l,()=>{n.emit("pageSizeChanged",l.value)});const R=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:o.value,"pager-viewmode-default":a.value==="default","pager-viewmode-simple":a.value==="simple"})),O=e.computed(()=>({position:"relative","justify-content":r.value==="center"?"center":"start"}));function G(){return e.createVNode(e.Fragment,null,[N.value&&F(),V.value&&A(),k.value&&B(),k.value&&$(),D.value&&E(),k.value&&S(),k.value&&T(),x.value&&I()])}function M(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),k.value&&B(),k.value&&$(),I(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),b.value])]),k.value&&S(),k.value&&T()])}return()=>e.createVNode("div",{ref:c,class:"pagination-container"},[w.value&&e.createVNode("ul",{role:"navigation",class:R.value,style:O.value},[a.value==="default"?G():M()])])}}),Fu={install(t){t.component(Bo.name,Bo)},register(t,n,o){t.pagination=Bo,n.pagination=Nu},registerDesigner(t,n,o){t.pagination=XC,n.pagination=Nu}},QC=new Map([["appearance",xe]]);function ZC(t,n,o){return n}const JC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/progress.schema.json",title:"progress",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for progress",type:"string"},type:{description:"The type string of progress",type:"string",default:"progress"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},e1={title:"progress",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Xr={progressType:{type:String,default:"line"},strokeWidth:{type:Number,default:0},size:{type:String,default:"default"},showInfo:{type:Boolean,default:!0},progressStatus:{type:String,default:"default"},successPercent:{type:Number,default:0},strokeColor:{type:String,default:""},strokeLinecap:{type:String,default:"round"},width:{type:Number,default:100},percent:{type:Number,default:20},enableBackgroundImg:{type:Boolean,default:!1},backgroundImg:{type:String,default:""},gapPosition:{type:String},gapDegree:{type:Number,default:0},format:{type:Function,default:(t,n)=>`${t}%`}},Au=me(Xr,JC,QC,ZC,e1);function t1(t){function n(l){return+l.replace("%","")}function o(l){let s=[];return Object.keys(l).forEach(p=>{const c=l[p],d=n(p);isNaN(d)||s.push({key:d,value:c})}),s=s.sort((p,c)=>p.key-c.key),s}const a=e.computed(()=>!!t.strokeColor&&typeof t.strokeColor!="string"),r=e.computed(()=>{const{from:l="#59a1ff",to:s="#59a1ff",direction:p="to right",...c}=t.strokeColor;if(Object.keys(c).length!==0){const d=o(c).map(({key:u,value:f})=>`${f} ${u}%`).join(", ");return`linear-gradient(${p}, ${d})`}return`linear-gradient(${p}, ${l}, ${s})`}),i=e.computed(()=>o(t.strokeColor).map(({key:l,value:s})=>({offset:`${l}%`,color:s})));return{isGradient:a,linearGradient:r,circleGradient:i}}function n1(t){return{strokeWidth:e.computed(()=>t.strokeWidth||(t.progressType==="line"&&t.size!=="small"?8:6))}}function o1(t){return{formatPercentageText:e.computed(()=>t.format(t.percent,t.successPercent))}}function a1(t,n,o,a){const{isCircleStyle:r}=n,{isGradient:i,linearGradient:l}=o,{strokeWidth:s}=a,p=e.computed(()=>{const b={"f-progress":!0,"f-progress-line":t.progressType==="line","ant-progress-small":t.size==="small","f-progress-show-info":t.showInfo,"f-progress-circle":r.value},v=`f-progress-status-${t.progressStatus}`;return b[v]=!0,b}),c=e.computed(()=>({width:`${t.width}px`,height:`${t.width}px`,"font-size":`${t.width*.15+6}px`,"f-progress-circle-gradient":i.value})),d=e.computed(()=>({"f-progress-inner":!0,"f-progress-circle-gradient":i.value})),u=0,f=e.computed(()=>u+1),g=e.computed(()=>{const b=50-s.value/2,v=t.gapPosition||(t.progressType==="circle"?"top":"bottom");let x=0,C=-b,w=0,N=b*-2;switch(v){case"left":x=-b,C=0,w=b*2,N=0;break;case"right":x=b,C=0,w=b*-2,N=0;break;case"bottom":C=b,N=b*2;break}return`M 50,50 m ${x},${C}
|
|
5
|
+
a ${b},${b} 0 1 1 ${w},${-N}
|
|
6
|
+
a ${b},${b} 0 1 1 ${-w},${N}`}),m=e.computed(()=>{const b=50-s.value/2,v=Math.PI*2*b,x=t.gapDegree||(t.progressType==="circle"?0:75);return{strokeDasharray:`${v-x}px ${v}px`,strokeDashoffset:`-${x/2}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"}}),h=e.computed(()=>{const b=50-s.value/2,v=Math.PI*2*b,x=t.gapDegree||(t.progressType==="circle"?0:75),C=t.successPercent!==void 0&&t.successPercent!==null?[t.successPercent,t.percent]:[t.percent];return C.map((w,N)=>{const V=C.length===2&&N===0;return{stroke:i.value&&!V?`url(#gradient-${f.value})`:null,strokePathStyle:{stroke:i.value?null:V?"default":t.strokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(w||0)/100*(v-x)}px ${v}px`,strokeDashoffset:`-${x/2}px`}}}).reverse()}),y=e.computed(()=>({width:`${t.percent}%`,"border-radius":t.strokeLinecap==="round"?"100px":"0",background:i.value?null:t.strokeColor,"background-image":i.value?l.value:null,height:`${s.value}px`}));return{progressClass:p,inCircleProgressBarStyle:c,inCircleProgressBarClass:d,pathString:g,trailPathStyle:m,progressCirclePaths:h,gradientId:f,inlineProgressBackgroundStyle:y}}function r1(t){return{isCircleStyle:e.computed(()=>t.progressType==="circle"||t.progressType==="dashboard")}}function i1(t){const n=e.computed(()=>{const r={"f-progress-text-icon":!0,"f-icon":!0},i=`f-icon-${t.progressStatus}`;return r[i]=!0,r}),o=e.computed(()=>{const r={"f-progress-text-icon":!0,"f-icon":!0},i=t.progressStatus==="success"?"f-icon-checkmark":"f-icon-x";return r[i]=!0,r}),a=e.computed(()=>t.progressStatus==="error"||t.progressStatus==="success");return{inlineProgrssStatusClass:n,circleProgrssStatusClass:o,shouldShowStatus:a}}function s1(t){const n=e.computed(()=>({width:`${t.successPercent}%`,"border-radius":t.strokeLinecap==="round"?"100px":"0",height:`${t.strokeWidth}px`,"background-image":t.enableBackgroundImg?`url(${t.backgroundImg})`:null})),o=e.computed(()=>t.successPercent||t.successPercent===0);return{inlineProgressSuccessBackgroundStyle:n,shouldShowSuccessInlineProgressBackground:o}}const Pn=e.defineComponent({name:"FProgress",props:Xr,emits:[],setup(t){const n=e.ref(t.progressType),o=e.ref(t.showInfo),a=e.ref(t.percent),r=e.ref(t.strokeLinecap),i=t1(t),{isGradient:l,circleGradient:s}=i,p=n1(t),{strokeWidth:c}=p,{formatPercentageText:d}=o1(t),u=r1(t),{isCircleStyle:f}=u,{progressClass:g,inCircleProgressBarStyle:m,inCircleProgressBarClass:h,pathString:y,trailPathStyle:b,progressCirclePaths:v,gradientId:x,inlineProgressBackgroundStyle:C}=a1(t,u,i,p),{inlineProgrssStatusClass:w,circleProgrssStatusClass:N,shouldShowStatus:V}=i1(t),{inlineProgressSuccessBackgroundStyle:D,shouldShowSuccessInlineProgressBackground:k}=s1(t);e.watch(()=>t.percent,S=>{a.value=S||0});function B(){return o.value&&e.createVNode("span",{class:"f-progress-text"},[V.value?e.createVNode("span",{class:f.value?N.value:w.value},null):d.value])}function $(){return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-progress-outer"},[e.createVNode("div",{class:"f-progress-inner"},[e.createVNode("div",{class:"f-progress-bg",style:C.value},null),k.value&&e.createVNode("div",{class:"f-progress-success-bg",style:D.value},null)])]),B()])}function T(){return e.createVNode("div",{class:h.value,style:m.value},[e.createVNode("svg",{class:"f-progress-circle",viewBox:"0 0 100 100"},[l.value&&e.createVNode("defs",null,[e.createVNode("linearGradient",{id:"gradient-"+x.value,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[s.value.map(S=>e.createVNode("stop",{offset:S.offset,"stop-color":S.color},null))])]),e.createVNode("path",{class:"f-progress-circle-trail",stroke:"#efefef","fill-opacity":"0","stroke-width":c.value,d:y.value,style:b.value},null),v.value.map(S=>e.createVNode("path",{class:"f-progress-circle-path","fill-opacity":"0",d:y.value,"stroke-linecap":r.value,stroke:S.stroke,"stroke-width":a.value?c.value:0,style:S.strokePathStyle},null))]),B()])}return()=>e.createVNode("div",{class:g.value},[n.value==="line"&&$(),f.value&&T()])}}),l1=e.defineComponent({name:"FProgressDesign",props:Xr,emits:[],setup(t,n){const o=e.ref(t.progressStatus),a=e.ref(t.progressType),r=e.ref(t.size),i=e.ref(t.showInfo),l=e.ref(t.strokeWidth),s=e.ref(t.percent),p=e.ref(t.strokeLinecap),c=e.ref(!1),d=e.ref(t.strokeColor),u=e.ref(null),f=e.ref(0),g=e.ref(t.width),m=e.ref(""),h=e.ref([]),y=e.ref(""),b=e.ref([]),v=e.ref(t.enableBackgroundImg),x=e.ref(t.backgroundImg),C=e.ref(),w=e.inject("design-item-context"),N=ve(C,w);e.onMounted(()=>{C.value.componentInstance=N}),n.expose(N.value),e.watch(()=>t.percent,I=>{s.value=I||0});const V=e.computed(()=>l.value||(a.value==="line"&&r.value!=="small"?8:6)),D=e.computed(()=>a.value==="circle"||a.value==="dashboard"),k=e.computed(()=>{const I={"f-progress":!0,"f-progress-line":a.value==="line","ant-progress-small":r.value==="small","f-progress-show-info":i.value,".f-progress-circle":D.value},R=`f-progress-status-${o.value}`;return I[R]=!0,I}),B=e.computed(()=>({width:`${s.value}%`,"border-radius":p.value==="round"?"100px":"0",backgroud:c.value?null:d.value,"background-image":c.value?u.value:null,height:`${V.value}px`})),$=e.computed(()=>({width:`${s.value}%`,"border-radius":p.value==="round"?"100px":"0",height:`${V.value}px`,"background-image":v.value?x.value:null})),T=e.computed(()=>f.value||f.value===0);function S(){return e.createVNode("div",{class:"f-progress-outer"},[e.createVNode("div",{class:"f-progress-inner"},[e.createVNode("div",{class:"f-progress-bg",style:B.value},null),T.value&&e.createVNode("div",{class:"f-progress-success-bg",style:$.value},null)])])}const F=e.computed(()=>({width:`${g.value}px`,height:`${g.value}px`,"font-size":`${g.value*.15+6}px`,"f-progress-circle-gradient":c.value})),A=e.computed(()=>({}));function E(){return e.createVNode("div",{class:"f-progress-inner",style:F.value},[e.createVNode("svg",{class:"f-progress-circle",viewBox:"0 0 100 100"},[c.value&&e.createVNode("defs",null,[e.createVNode("linearGradient",{id:"gradient-"+m.value,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[h.value.map(I=>e.createVNode("stop",{offset:I.offset,"stop-color":I.color},null))])]),e.createVNode("path",{class:"f-progress-circle-trail",stroke:"#efefef","fill-opacity":"0","stroke-width":V.value,d:y.value,style:A.value},null),b.value.map(I=>e.createVNode("path",{class:"f-progress-circle-path","fill-opacity":"0",d:y.value,"stroke-linecap":p.value,stroke:I.stroke,"stroke-width":s.value?V.value:0,style:I.strokePathStyle},null))])])}return()=>e.createVNode("div",{ref:C,class:k.value},[a.value==="line"&&S(),D.value&&E()])}}),Iu={install(t){t.component(Pn.name,Pn)},register(t,n,o){t.progress=Pn,n.progress=Au},registerDesigner(t,n,o){t.progress=l1,n.progress=Au}};var Qr=(t=>(t.Equal="0",t.NotEqual="1",t.Greater="2",t.GreaterOrEqual="3",t.Less="4",t.LessOrEqual="5",t.Like="6",t.LikeStartWith="7",t.LikeEndWith="8",t))(Qr||{});const c1=[{value:"0",name:"等于"},{value:"1",name:"不等于"},{value:"2",name:"大于"},{value:"3",name:"大于等于"},{value:"4",name:"小于"},{value:"5",name:"小于等于"},{value:"6",name:"包含"},{value:"7",name:"开始是"},{value:"8",name:"结束是"}],d1={"button-edit":["0","1"," 6","7","8"],"check-box":["0"],"combo-list":["0","1"],"combo-lookup":["0","1"," 6","7","8"],"date-picker":["0","1","2","3","4","5"],"date-range":[],"datetime-picker":["0","1","2","3","4","5"],"datetime-range":[],"month-picker":["0","1","2","3","4","5"],"month-range":[],"year-picker":["0","1","2","3","4","5"],"year-range":[],"input-group":["0","1","6","7","8"],lookup:["0","1"],"number-range":[],"number-spinner":["0"," 1","2","3","4","5"],"radio-group":["0"],text:["0","1"," 6","7","8"]};function u1(t,n,o){const{fieldMap:a}=o;function r(i){const l=a.get(i.fieldCode);if(!l)return[];const s=l.editor.type,p=new Set(d1[s]);return c1.filter(d=>p.has(d.value))}return{getCompareOperators:r}}function Eu(t,n){const o=e.ref(t.fields),a=e.ref([]),r=new Map,{createConditionValue:i}=br();function l(d){switch(d.editor?d.editor.type:"input-group"){case"date-range":d.editor.type="date-picker";break;case"datetime-range":d.editor.type="datetime-picker";break;case"number-range":d.editor.type="number-spinner";break}return d.editor}function s(d){return d.map(f=>Object.assign({},f)).map(f=>(f.editor=l(f),f))}function p(d=!0){o.value.reduce((u,f)=>(d||(f.editor=l(f)),u.set(f.labelCode,f),u),r)}function c(d){return d.forEach(u=>{if(u&&typeof u.valueConfig=="object"){const f=r.get(u.fieldCode);u.value=i(f.editor.type,u.valueConfig.content)}}),d}return{convertToSingleControl:s,fields:o,fieldMap:r,fieldConditions:a,loadFieldConfigs:p,initialConditionValue:c}}function f1(t,n,o){const a=e.ref(null),r=e.ref(o),i=e.ref(0),l=e.computed(()=>c(i.value));function s(){r.value&&(a.value=new ResizeObserver(p(d=>{const u=d[0];i.value=u.contentRect.width})),a.value.observe(r.value))}function p(d,u){let f=null;return function(){const g=arguments;f||(f=setTimeout(()=>{f=null},500),d(...g))}}function c(d){let f="col-12";return d>250*6?f="col-2":d>250*4?f="col-3":d>250*3?f="col-4":d>250*2&&(f="col-6"),f}return e.watch([o],([d])=>{r.value=d,s()}),{conditionClass:l,resizeObserver:a}}const Zr=e.defineComponent({name:"FConditionFields",props:gc,emits:["valueChange","blur","focus","click","input"],setup(t,n){const o=e.ref(),a=e.ref(t.key),r=e.ref(t.isControlInline),i=e.ref(t.conditions),l=Eu(t),{initialConditionValue:s,fieldMap:p,loadFieldConfigs:c}=l,d=f1(t,n,o),{conditionClass:u,resizeObserver:f}=d;c(!0),s(i.value),e.onBeforeUnmount(()=>{var b;(b=f.value)==null||b.unobserve(o.value)}),e.watch(()=>t.conditions,()=>{i.value=t.conditions});const g=e.computed(()=>({"f-utils-flex-row-wrap":!0,"farris-form":!0,"farris-form-controls-inline":r.value})),m=e.computed(()=>u.value);function h(b,v){n.emit("valueChange",b,v)}function y(){return i.value.map(b=>{var v;return e.createVNode(Xt,{customClass:m.value,label:b.fieldName,editor:(v=p.get(b.fieldCode))==null?void 0:v.editor,modelValue:b.value.value,"onUpdate:modelValue":x=>b.value.value=x,onChange:x=>{h(x,b)}},null)})}return()=>e.createVNode("div",{class:g.value,key:a.value,ref:o},[y()])}});var Jr=(t=>(t[t.Value=0]="Value",t[t.SmartHelp=1]="SmartHelp",t[t.Enum=2]="Enum",t[t.Express=3]="Express",t))(Jr||{});function Mu(){const t=e.ref({relation:0,items:[],children:[],path:[],groupId:0,level:0}),n=new Map,o=new Map;let a=0;function r(){return{id:"",fieldCode:"",fieldName:"",compareType:Qr.Equal,valueType:Jr.Value,value:new bd,relation:0,conditionId:Date.now()}}function i(k,B){return{relation:k,items:[],children:[],path:[],groupId:++a,level:B}}function l(){const k=Object.assign({},t.value);o.forEach((B,$)=>{B.groupId===k.groupId&&o.set($,k)}),n.forEach((B,$)=>{B.groupId===k.groupId&&n.set($,k)}),t.value=k}function s(k){const B=new Map;let $=0;return k.forEach((T,S)=>{var F,A;if($+=((F=T.lBracket)==null?void 0:F.length)||0,B.set(S,$),$-=((A=T.rBracket)==null?void 0:A.length)||0,$<0)throw new Error("The right bracket is out of range.")}),B}function p(k,B,$,T,S){for(let F=0;F<B;F++){const A=k+(F+1),E=i(S,A);$.children.push(E),o.set(E.groupId,$),$=$.children[$.children.length-1],T.push($)}return $}function c(k,B,$,T,S){for(let I=B;I<=0;I++)T.pop();const F=T[T.length-1];if(!F)throw new Error("The group path is out of range");const A=k+B,E=i(S,A);return F.children.push(E),o.set(E.groupId,F),$=F.children[F.children.length-1],T.push($),$}function d(k,B,$,T){$.pop();const S=$[$.length-1],F=i(T,k);return S.children.push(F),o.set(F.groupId,S),B=S.children[S.children.length-1],$.push(B),B}function u(k,B,$,T,S,F){let A=k[k.length-1];if(!A)throw new Error("The group path is out of range");const E=B.get(T)||0,I=B.get($)||0;if($<0||$===T)return k[k.length-1];const R=E-I,O=S&&S.relation!==void 0?S.relation:1;return A=R>0?p(I,R,A,k,O):A,A=R<0?c(I,R,A,k,O):A,A=R===0&&I>0&&E>0&&S&&F&&!!S.rBracket&&!!F.lBracket?d(I,A,k,O):A,A}function f(k){const $={relation:k.length&&k[0].relation!==void 0?k[0].relation:1,items:[],children:[],path:[],groupId:0,level:0},T=[$],S=s(k);return k.forEach((F,A)=>{const E=A-1,I=k[E],R=u(T,S,E,A,I,F);R.items.push(F),n.set(F.conditionId,R)}),t.value=$,$}function g(){const k=r();n.set(k.conditionId,t.value),t.value.items.push(k)}function m(k){if(!k)return;const B=n.get(k.conditionId);if(B){const $=B.items.findIndex(S=>S.conditionId===k.conditionId)+1,T=r();n.set(T.conditionId,B),B.items.splice($,0,T),l()}}function h(k){const B=n.get(k.conditionId);B&&(B.items=B.items.filter($=>$.conditionId!==k.conditionId),n.delete(k.conditionId),D(),l())}function y(k,B,$,T){k.reduce((S,F)=>{const A=F.conditionId!==void 0,E=F.groupId!==void 0;if(A){const I=F;$.push(I),S.items.set(I.conditionId,I)}if(E){const I=F;T.push(I),S.groups.set(I.groupId,I)}return S},B)}function b(k,B,$,T,S){k&&(k.items=B.length?k.items.filter(F=>!$.has(F.conditionId)):k.items,k.children=T.length?k.children.filter(F=>!S.has(F.groupId)):k.children)}function v(k,B,$){B.forEach(T=>{k.items.push(T),n.set(T.conditionId,k)}),$.forEach(T=>{k.children.push(T),o.set(T.groupId,k)})}function x(k){const B=k[0],$=B.conditionId!==void 0?n.get(B.conditionId):o.get(B.groupId),T={items:new Map,groups:new Map},S=[],F=[];if($){y(k,T,S,F),b($,S,T.items,F,T.groups);const A=i($.relation,$.level+1);v(A,S,F),$.children.push(A),o.set(A.groupId,$),l()}}function C(k){const B=[...k.items],$=[...k.children],T=o.get(k.groupId);T&&(T.children=T.children.filter(S=>S.groupId!==k.groupId),o.delete(k.groupId),B.forEach(S=>{T.items.push(S),n.set(S.conditionId,T)}),$.forEach(S=>{T.children.push(S),o.set(S.groupId,T)}),l())}function w(k){k.relation=k.relation===1?2:1,l()}let N;function V(k){const{relation:B}=k;return(k.children&&k.children.length?k.children.map((T,S,F)=>{const A=N(T);return A[0].lBracket=(A[0].lBracket||"")+"(",A[A.length-1].rBracket=(A[A.length-1].rBracket||"")+")",A[A.length-1].relation=S<F.length-1?B:0,A}):[]).flat()}N=(k=t.value)=>{const{relation:B}=k,$=k.items.map((S,F,A)=>(S.lBracket=F===0?"(":"",S.rBracket=F===A.length-1?")":"",S.relation=F<A.length-1?B||1:0,S)),T=V(k);return[...$,...T]};function D(k){const B=k||t.value;if(B.children.length&&B.children.forEach($=>{D($)}),B.level===0&&!B.items.length&&B.children.length===1){const $=B.children[0];t.value.relation=$.relation,C($)}else B.items.length===0&&B.children.length<=1&&C(B)}return{addCondition:g,changeGroupRelation:w,conditionGroupMap:n,getConditions:N,group:x,groupParentMap:o,insertConditionTo:m,loadConditionGroup:f,refresh:l,removeCondition:h,rootGroup:t,unGroup:C}}function p1(t,n){return{solutions:[{id:"default",code:"default",name:"默认筛选方案",conditions:n.map((r,i)=>{const{id:l,labelCode:s,name:p}=r,c=Qr.Equal,d=Jr.Value;return{id:l,fieldCode:s,fieldName:p,compareType:c,valueType:d,value:{},conditionId:i}}),isPreset:!0,isDefault:!0,type:"",mode:"1"}]}}const m1=new Map([["appearance",xe],["preset",p1]]),h1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution.schema.json",title:"query-solution",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a query solution",type:"string"},type:{description:"The type string of query solution component",type:"string",default:"query-solution"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},fields:{description:"",type:"array",default:[]},preset:{description:"",type:"array"},solutions:{description:"",type:"array"}}};function g1(t,n,o){return n}const y1={title:"query-solution",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"},style:{description:"组件的内容样式",title:"style样式",type:"modal",showClearButton:!0},height:{description:"组件的高度",title:"高度(px)",type:"number",min:0,decimals:0}}},isControlInline:{description:"空间标签独占一行",type:"boolean",title:"空间标签独占一行"},filterText:{description:"筛选按钮文本",type:"string",title:"筛选按钮文本"},expanded:{description:"展开",type:"boolean",title:"展开",visible:{anyOf:[{isControlInline:{equal:!0}}]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{fields:{description:"筛选方案字段设置",title:"筛选方案字段",type:"",$converter:"",editor:{type:"query-solution-config"}}}}}},ei={fields:{type:Array,default:[{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",labelCode:"id",code:"id",name:"标识",placeHolder:"",editor:{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",labelCode:"Version",code:"Version",name:"版本",placeHolder:"",editor:{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",type:"date-picker",require:!1,format:"yyyy-MM-dd",weekSelect:!1,startFieldCode:"Version",endFieldCode:"Version"}},{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",labelCode:"EmployeeID.EmployeeID",code:"EmployeeID",name:"创建人",placeHolder:"",editor:{type:"lookup",require:!1,uri:"",textField:"name",valueField:"id",idField:"id",helpId:"915a0b20-975a-4df1-8cfd-888c3dda0009",displayType:"List",loadTreeDataType:"default",enableFullTree:!1,editable:!1,mapFields:{code:"employeeID.employeeID_code",name:"employeeID.employeeID_name"},singleSelect:!0,pageSize:20,pageList:"10,20,30,50",expandLevel:-1,context:{enableExtendLoadMethod:!0}}},{id:"387679f1-4f61-40f3-8286-b3b55219a7aa",labelCode:"EmployeeID.EmployeeID_code",code:"code",name:"创建人工号",placeHolder:"",editor:{id:"387679f1-4f61-40f3-8286-b3b55219a7aa",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"f2878e6d-99a2-45e7-8678-3635b1e0ec2a",labelCode:"EmployeeID.EmployeeID_name",code:"name",name:"创建人",placeHolder:"",editor:{id:"f2878e6d-99a2-45e7-8678-3635b1e0ec2a",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",labelCode:"DomainID.DomainID",code:"DomainID",name:"业务部门",placeHolder:"",editor:{type:"lookup",require:!1,uri:"",textField:"name",valueField:"id",idField:"id",helpId:"b524a702-7323-4d46-998e-5ba0c6abcd49",displayType:"TreeList",loadTreeDataType:"default",enableFullTree:!1,editable:!1,dialogTitle:"",singleSelect:!0,enableCascade:!1,cascadeStatus:"enable",pageSize:20,pageList:"10,20,30,50",nosearch:!1,expandLevel:-1,context:{enableExtendLoadMethod:!0},quickSelect:{enable:!1,showMore:!0,showItemsCount:10}}},{id:"138082d4-9b07-4da2-9858-73861e0ac127",labelCode:"DomainID.DomainID_code",code:"code",name:"部门编号",placeHolder:"",editor:{id:"138082d4-9b07-4da2-9858-73861e0ac127",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"99587da0-8c9d-4efb-a196-f5762ba6000e",labelCode:"DomainID.DomainID_name",code:"name",name:"业务部门",placeHolder:"",editor:{id:"99587da0-8c9d-4efb-a196-f5762ba6000e",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",labelCode:"BillCode",code:"BillCode",name:"单据编号",placeHolder:"",editor:{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",tpye:"input-group",require:!1,editable:!0,groupText:"",usageMode:"text",modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]},groupTextUseLang:!0}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",labelCode:"TotalSum",code:"TotalSum",name:"订单金额",placeHolder:"",editor:{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",type:"number-spinner",require:!1,textAlign:"left",precision:2,isBigNumber:!1,maxValue:1e5,minValue:-1e5}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",labelCode:"BillType",code:"BillType",name:"订单类型",placeHolder:"",editor:{type:"combo-list",require:!1,valueType:"1",multiSelect:!0,data:[{value:"1",name:"1"},{value:"2",name:"2"},{value:"3",name:"3"}]}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",labelCode:"BillDate",code:"BillDate",name:"创建日期",placeHolder:"",editor:{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",type:"date-picker",require:!1,format:"yyyy-MM-dd",weekSelect:!1,startFieldCode:"BillDate",endFieldCode:"BillDate"}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",labelCode:"SecID",code:"SecID",name:"密级",placeHolder:"",editor:{type:"combo-list",require:!1,valueType:"1",multiSelect:!1,data:[{value:"a",name:"a"},{value:"b",name:"b"},{value:"c",name:"c"},{value:"d",name:"d"},{value:"e",name:"e"}]}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",labelCode:"SecLevel",code:"SecLevel",name:"密级",placeHolder:"",editor:{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",type:"number-range",require:!1,textAlign:"left",precision:0,isBigNumber:!1}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",labelCode:"ProjectID",code:"ProjectID",name:"所属项目",placeHolder:"",editor:{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",labelCode:"ProjectMrg",code:"ProjectMrg",name:"项目经理",placeHolder:"",editor:{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",labelCode:"AuditStatus",code:"AuditStatus",name:"订单状态",placeHolder:"",editor:{type:"radio-group",require:!1,valueType:"1",horizontal:!0,showLabel:!1,enumData:[{value:"1",name:"1"},{value:"2",name:"2"}]}}]},solutions:{type:Array,default:[{id:"c5df9edf-0e74-04b2-efb5-54572e1ab2e9",code:"Default",name:"默认筛选条件",mode:"1",type:"preset",conditions:[{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"EmployeeID.EmployeeID",fieldName:"制单人",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:13,content:{valueField:"id",value:[{id:"05701277-d0cf-bae1-a056-1d5ebe8ea9fa",code:"Sagi",name:"Sagi",userGroup:"0",sysOrgId:"001",tenantId:1e4,secLevel:"0",userType:0,note:null}],textValue:"Sagi"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:2,content:{value:[{id:"c4427472-95c6-e2c5-c3aa-ef6d537a1b33",code:"Inspur",name:"浪潮集团",treeinfo:{parentElement:"",sequence:2,layer:1,isDetail:!1}}],valueField:"id",textValue:"浪潮集团",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:15,content:{value:[],textValue:"",isInputText:!0}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[{value:"2",name:"2"}],key:"2"}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:1,content:{dateValue:"2023-09-01"}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[{value:"a",name:"a"},{value:"b",name:"b"}],key:"a,b"}}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",fieldCode:"SecLevel",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:123,endValue:213}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"订单状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:14,content:{value:"2"}}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",fieldCode:"ProjectID",fieldName:"所属项目",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{value:"dsfd "}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:6,content:{numValue:21333}}},{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",fieldCode:"ProjectMrg",fieldName:"项目经理",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{}}},{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",fieldCode:"Version",fieldName:"版本",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:4,content:{startTime:"2023-09-01",endTime:"2023-09-15"}}}],isPreset:!0,isDefault:!0,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"},{id:"3a491eb1-018e-e03e-d430-f05fccd894f3",code:"Order of The Month",name:"本月订单",mode:"1",type:"public",conditions:[{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"制单人",fieldName:"",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:13,content:{valueField:"",value:[],textValue:"help-text-value-null"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:2,content:{value:[],valueField:"",textValue:"help-text-value-null",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:15,content:{value:[],textValue:""}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:null,endValue:null}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[]}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:1,content:{dateValue:""}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[]}}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",fieldCode:"SecLevel",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:null,endValue:null}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"订单状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:14,content:{}}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",fieldCode:"ProjectID",fieldName:"所属项目",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{value:""}}}],isPreset:!1,isDefault:!1,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"},{id:"2120021b-df0c-0eef-d1d5-feaa78b01d7e",code:"Pending Orders of The Month",name:"本月待支付订单",mode:"2",type:"private",conditions:[{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",fieldCode:"id",fieldName:"标识",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:9,compareType:"0",relation:1,value:{type:0,content:{value:"123"}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"单据状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:6,compareType:"0",relation:1,lBracket:"(",value:{type:14,content:{value:"2"}}},{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"EmployeeID.EmployeeID",fieldName:"创建人",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:1,compareType:"0",relation:1,lBracket:"((",value:{type:13,content:{valueField:"id",value:[{id:"9e35953a-40fd-4a9a-922f-b9f59bf2a517",code:"sagi",name:"sagi",userGroup:"0",sysOrgId:"001",tenantId:1e4,secLevel:"PUBLIC",userType:3,note:null}],textValue:"sagi"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:2,compareType:"0",relation:1,rBracket:")",value:{type:2,content:{value:[{id:"1640d027-7531-2388-e5eb-6fe0ae8c9734",code:"SCM",name:"采购部",treeinfo:{parentElement:"001",sequence:2,layer:2,isDetail:!0}},{id:"001",code:"001",name:"销售部",treeinfo:{parentElement:"",sequence:1,layer:1,isDetail:!1}}],valueField:"id",textValue:"采购部,销售部",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:7,compareType:"0",relation:1,lBracket:"(",value:{type:15,content:{value:[],textValue:"123",isInputText:!0}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:8,compareType:"0",relation:1,rBracket:")))",value:{type:6,content:{numValue:5}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:3,compareType:"0",relation:1,lBracket:"(",value:{type:3,content:{value:[{value:"1",name:"1"}],key:"1"}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:4,compareType:"0",relation:1,lBracket:"(",value:{type:1,content:{dateValue:"2023-09-01"}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:5,compareType:"0",relation:1,rBracket:"))",value:{type:3,content:{value:[{value:"a",name:"a"},{value:"b",name:"b"},{value:"c",name:"c"}],key:"a,b,c"}}}],isPreset:!1,isDefault:!1,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"}]},isControlInline:{type:Boolean,default:!0},filterText:{type:String,default:"筛选"},expanded:{type:Boolean,default:!0}},Pu=me(ei,h1,m1,g1,y1);function b1(t,n){function o(a,r){return r.map(l=>(l.conditions=l.conditions.filter(s=>a.find(p=>p.labelCode===s.fieldCode)),l))}return{filterCondition:o}}const ti=e.defineComponent({name:"FQuerySolution",props:ei,emits:["save","saveAs","delete","change","conditionChange"],setup(t,n){const o=e.ref(t.fields),a=e.ref(t.isControlInline),r=e.ref([]),i=b1(),{filterCondition:l}=i,s=e.ref(null);e.onMounted(()=>{r.value=l(t.fields,t.solutions),s.value=qe.cloneDeep(r.value[0])});const p=e.computed(()=>s.value?s.value.mode:"1"),c={1:Zr,2:jp},d=e.computed(()=>s.value?s.value.name:""),u=e.computed(()=>!s.value||s.value.mode!=="2"),f=e.ref(!1),g=e.computed(()=>({"dropdown-menu":!0,show:f.value})),m=e.computed(()=>({"farris-panel":!0,"position-relative":!0,"query-solution":!0})),h=e.computed(()=>({border:"none"}));function y(S){s.value=S}function b(){if(!s.value){console.warn("no querysolution");return}s.value.conditions.forEach(S=>{S.value.clear()})}function v(){n.emit("save",s.value)}function x(){n.emit("saveAs",s.value)}function C(S,F){n.emit("change",S,F)}function w(S){n.emit("change",S)}function N(S,F){n.emit("change",S,F)}function V(){const S=r.value.map(F=>e.createVNode("li",{class:"dropdown-item",onClick:()=>y(F)},[F.name]));return S.push(e.createVNode("li",{class:"solution-header-title-btns"},[e.createVNode("span",{class:"dropdown-item-btn ",onClick:v},[e.createTextVNode("保存")]),e.createVNode("span",{class:"dropdown-item-btn ml-2 mr-2",onClick:x},[e.createTextVNode("另存为")])])),e.createVNode("ul",{class:g.value},[S])}function D(){f.value=!f.value}function k(){return e.createVNode("div",null,null)}function B(){return e.createVNode("div",{class:"solution-action"},[e.createVNode("div",{class:"btn-group"},[e.createVNode("button",{type:"button",class:"btn btn-primary "},[e.createTextVNode("查询")])]),u.value&&e.createVNode("div",{class:"icon-group ml-2"},[e.createVNode("span",{class:"icon-group-remove",onClick:b,title:"清空"},[e.createVNode("span",{class:"f-icon f-icon-remove"},null)])])])}function $(){return e.createVNode("div",{class:"solution-header"},[e.createVNode("div",{class:"btn-group mr-3",onClick:D},[e.createVNode("div",{class:"solution-header-title"},[d.value,e.createVNode("span",{class:"f-icon f-accordion-expand"},null)]),V()]),k(),B()])}function T(){const S=c[p.value]||Zr;return s.value&&e.createVNode(S,{key:s.value.id,fields:o.value,conditions:s.value.conditions,isControlInline:a.value,onValueChange:(F,A)=>C(F,A),onLabelCodeChange:F=>w(F),onCompareTypeChange:(F,A)=>N(F,A)},null)}return()=>e.createVNode("div",{class:m.value,tabindex:"1",style:h.value},[$(),T()])}}),v1=e.defineComponent({name:"FQuerySolutionDesign",props:ei,emits:["save","saveAs"],setup(t,n){const o=e.ref(t.fields),a=e.ref(t.solutions[0]),r=e.ref(),i=e.inject("design-item-context"),l=ve(r,i);e.onMounted(()=>{r.value.componentInstance=l}),n.expose(l.value);const s=e.computed(()=>a.value.name||""),p=e.computed(()=>a.value.mode!=="2"),c=e.computed(()=>({"farris-panel":!0,"position-relative":!0,"query-solution":!0})),d=e.computed(()=>({border:"none"}));function u(){return e.createVNode("div",{class:"solution-action"},[e.createVNode("div",{class:"btn-group"},[e.createVNode("button",{type:"button",class:"btn btn-primary "},[e.createTextVNode("查询")])]),p.value&&e.createVNode("div",{class:"icon-group ml-2"},[e.createVNode("span",{class:"icon-group-remove",title:"清空"},[e.createVNode("span",{class:"f-icon f-icon-remove"},null)])])])}function f(){return e.createVNode("div",{class:"solution-header"},[e.createVNode("div",{class:"btn-group mr-3"},[e.createVNode("div",{class:"solution-header-title"},[s.value,e.createVNode("span",{class:"f-icon f-accordion-expand"},null)])]),u()])}function g(){const m=Zr;return e.createVNode(m,{fields:o.value,conditions:a.value.conditions},null)}return()=>e.createVNode("div",{ref:r,class:c.value,tabindex:"1",style:d.value},[f(),g()])}}),Ou={install(t){t.component(ti.name,ti),t.component(xo.name,xo)},register(t,n,o){t["query-solution"]=ti,t["query-solution-config"]=xo,n["query-solution"]=Pu,n["query-solution-config"]=Sv},registerDesigner(t,n,o){t["query-solution"]=v1,n["query-solution"]=Pu}},x1=e.defineComponent({name:"FRadioGroupDesign",props:Cr,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),{enumData:a,onClickRadio:r,getValue:i,getText:l}=Bd(t,n,o),s=e.computed(()=>({"farris-checkradio-hor":t.horizontal})),p=e.ref(),c=e.inject("design-item-context"),d=ve(p,c);return e.onMounted(()=>{p.value.componentInstance=d}),n.expose(d.value),()=>e.createVNode("div",{class:["farris-input-wrap",s.value],ref:p},[a.value.map((u,f)=>{const g="radio_"+t.name+f;return e.createVNode("div",{class:"custom-control custom-radio"},[e.createVNode("input",{type:"radio",class:"custom-control-input",name:t.name,id:g,value:i(u),checked:i(u)===o.value,disabled:t.disabled,tabindex:t.tabIndex,onClick:m=>r(u,m)},null),e.createVNode("label",{class:"custom-control-label",for:g},[l(u)])])})])}}),Ru={install(t){t.component(Co.name,Co)},register(t,n,o){t["radio-group"]=Co,n["radio-group"]=kd},registerDesigner(t,n,o){t["radio-group"]=x1,n["radio-group"]=kd}},C1=new Map([["appearance",xe]]);function w1(t,n,o){return n}const N1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/rate.schema.json",title:"rate",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for rate",type:"string"},type:{description:"The type string of rate",type:"string",default:"rate"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},V1={title:"rate",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},ni={size:{type:String,default:"large"},enableHalf:{type:Boolean,default:!1},enableClear:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},pointSystem:{type:Number,default:5},lightColor:{type:String,default:""},darkColor:{type:String,default:""},iconClass:{type:String,default:"f-icon-star"},numOfStar:{type:Number,default:5},toolTipDisabled:{type:Boolean,default:!0},toolTipContents:{type:Array,default:["很不满意","不满意","一般","满意","非常满意"]},enableScore:{type:Boolean,default:!0},enableSatisfaction:{type:Boolean,default:!1},value:{type:Number,default:0},modelValue:{type:Number,default:0}},ju=me(ni,N1,C1,w1,V1),To=e.defineComponent({name:"FRate",props:ni,emits:["selectedValue","update:modelValue"],setup(t,n){const o=e.ref(t.size),a=e.ref(t.enableHalf),r=e.ref(t.enableClear),i=e.ref(t.disabled),l=e.ref(t.pointSystem),s=e.ref(t.lightColor),p=e.ref(t.darkColor),c=e.ref(t.iconClass),d=e.ref(t.numOfStar),u=e.ref(t.toolTipDisabled),f=e.ref(t.toolTipContents),g=e.ref(t.enableScore),m=e.ref(t.enableSatisfaction);let h;const y=e.ref(0),b=e.ref(0),v=e.ref(0),x=e.ref(t.modelValue);let C=1,w,N,V;const D=4;e.onMounted(()=>{});function k(){const O=d.value;V=[];for(let G=1;G<=O;G++)V.push({id:G})}function B(){let O;a.value?O=Math.ceil(x.value/C):O=x.value,b.value=(h*x.value+Math.floor(x.value)*D)/C,w=f.value[O-1]}function $(){switch(o.value){case"small":h=14;break;case"middle":h=16;break;case"large":h=18;break;case"extraLarge":h=24;break}k(),d.value&&(C=l.value/d.value),x.value&&B()}$();function T(O){return O.className.indexOf("f-icon")!==-1}function S(){return y.value===b.value&&r.value&&b.value!==0?(b.value=0,x.value=0,N=null,y.value=0,v.value=0,n.emit("selectedValue",x.value),n.emit("update:modelValue",x.value),!0):!1}function F(O,G,M){if(O.movementX||O.movementY){if(i.value)return;m.value&&(w=f.value[G-1]),O.offsetX<h/2&&a.value===!0?(y.value=h*G-h/2+D*(G-1),v.value=C*G-C/2):(y.value=h*G+D*(G-1),v.value=C*G)}if(M===!0){if(S())return;x.value=v.value,b.value=y.value,N=w,n.emit("update:modelValue",x.value),n.emit("selectedValue",x.value)}}function A(O,G){var M;if(T(O.target)&&O.target){const j=parseInt((M=O.target)==null?void 0:M.id);F(O,j,G)}}const E=e.computed(()=>v.value?v.value+"分":x.value+"分"),I=e.computed(()=>({width:(y.value||b.value)+"px"}));function R(){y.value=0}return e.watch(()=>t.modelValue,O=>{x.value=O,B()}),()=>e.createVNode("div",{class:"farris-star-rating",onMouseover:e.withModifiers(O=>A(O,!1),["prevent"]),onMousemove:e.withModifiers(O=>A(O,!1),["prevent"]),onMouseleave:e.withModifiers(O=>R(),["prevent"]),onClick:e.withModifiers(O=>A(O,!0),["prevent"])},[e.createVNode("div",{class:"star-light-area",style:I.value},[V.map(O=>e.createVNode("span",{class:["f-icon default-light-color ",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"},{disabled:u.value}],id:O.id,style:{color:s.value}},null))]),e.createVNode("div",{class:["star-dark-area",{small:o.value==="small"},{middle:o.value==="middle"},{large:o.value==="large"}]},[V.map(O=>e.createVNode("span",{class:["f-icon default-dark-color",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"}],id:O.id,style:{color:p.value}},null))]),e.createVNode("div",{class:["f-utils-fill",{"font-small":o.value==="small"},{"font-middle":o.value==="middle"},{"font-large":o.value==="large"},{"font-exlarge":o.value==="extraLarge"}]},[g.value&&e.createVNode("span",null,[e.createTextVNode(" "),E.value,e.createTextVNode(" ")]),m.value&&(N||w)&&e.createVNode("span",null,[e.createTextVNode(" "),w||N])])])}}),S1=e.defineComponent({name:"FRateDesign",props:ni,emits:["selectedValue"],setup(t,n){const o=e.ref(t.size),a=e.ref(t.enableHalf),r=e.ref(t.enableClear),i=e.ref(t.disabled),l=e.ref(t.pointSystem),s=e.ref(t.lightColor),p=e.ref(t.darkColor),c=e.ref(t.iconClass),d=e.ref(t.numOfStar),u=e.ref(t.toolTipDisabled),f=e.ref(t.toolTipContents),g=e.ref(t.enableScore),m=e.ref(t.enableSatisfaction);let h;const y=e.ref(1);let b=0;const v=e.ref(0),x=e.ref(0);let C=1,w,N,V;const D=4,k=e.ref(),B=e.inject("design-item-context"),$=ve(k,B);e.onMounted(()=>{k.value.componentInstance=$}),n.expose($.value),e.onMounted(()=>{});function T(){const M=d.value;V=[];for(let j=1;j<=M;j++)V.push({id:j})}function S(){let M;a.value?M=Math.ceil(x.value/C):M=x.value,b=(h*x.value+Math.floor(x.value)*D)/C,w=f.value[M-1]}function F(){switch(o.value){case"small":h=14;break;case"middle":h=16;break;case"large":h=18;break;case"extraLarge":h=24;break}T(),d.value&&(C=l.value/d.value),x.value&&S()}F();function A(M){return M.className.indexOf("f-icon")!==-1}function E(){return y.value===b&&r&&b!==0?(b=0,x.value=0,N=null,y.value=0,v.value=0,n.emit("selectedValue",x.value),!0):!1}function I(M,j,H){if(M.movementX||M.movementY){if(i.value)return;m.value&&(w=f.value[j-1]),M.offsetX<h/2&&a.value===!0?(y.value=h*j-h/2+D*(j-1),v.value=C*j-C/2):(y.value=h*j+D*(j-1),v.value=C*j)}if(H===!0){if(E())return;x.value=v.value,b=y.value,N=w,n.emit("selectedValue",x.value)}}function R(M,j){if(A(M.target)&&M.target){const H=parseInt(M.target.id);I(M,H,j)}}const O=e.computed(()=>v.value?v.value+"分":x.value+"分"),G=e.computed(()=>({width:(y.value||b)+"px"}));return()=>e.createVNode("div",{class:"farris-star-rating",ref:k,onMouseover:e.withModifiers(M=>R(M,!1),["prevent"]),onMousemove:e.withModifiers(M=>R(M,!1),["prevent"]),onMouseout:e.withModifiers(M=>R(M,!1),["prevent"]),onClick:e.withModifiers(M=>R(M,!0),["prevent"])},[e.createVNode("div",{class:"star-light-area",style:G.value},[V.map(M=>e.createVNode("span",{class:["f-icon default-light-color ",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"},{disabled:u.value}],id:M.id,style:{color:s.value}},null))]),e.createVNode("div",{class:["star-dark-area",{small:o.value==="small"},{middle:o.value==="middle"},{large:o.value==="large"}]},[V.map(M=>e.createVNode("span",{class:["f-icon default-dark-color",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"}],id:M.id,style:{color:p.value}},null))]),e.createVNode("div",{class:["f-utils-fill",{"font-small":o.value==="small"},{"font-middle":o.value==="middle"},{"font-large":o.value==="large"},{"font-exlarge":o.value==="extraLarge"}]},[g.value&&e.createVNode("span",null,[e.createTextVNode(" "),O.value,e.createTextVNode(" ")]),m.value&&(N||w)&&e.createVNode("span",null,[e.createTextVNode(" "),w||N])])])}}),_u={install(t){t.component(To.name,To)},register(t,n,o){t.rate=To,n.rate=ju},registerDesigner(t,n,o){t.rate=S1,n.rate=ju}},Hu=new Map([["appearance",xe]]);function $1(t,n,o){return o.splitter&&(n.contents=String(o.splitter).split(":").map(a=>{const r=t.getSchemaByType("response-layout-item");return r.appearance={class:`h-100 col-${a} px-0`},r})),n}const D1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout.schema.json",title:"response-layout",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout",type:"string"},type:{description:"The type string of Respnse Layout component",type:"string",default:"response-layout"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},k1={title:"responseLayout",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"ResponseLayout",enum:[]}}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"外联样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"}}},appearanceStyle:{description:"样式",type:"cascade",title:"内联样式",properties:{inlineStyle:{description:"",title:"inlineStyle",type:"custom"}}}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}},layout:{description:"",title:"布局",properties:{layout:{description:"配置布局容器内区块个数及比例",type:"custom",title:"是否可见",editor:{},editorParams:{layout:[]}}}}}},oi={customClass:{type:String,default:""}},Lu=me(oi,D1,Hu,$1,k1),ai=e.defineComponent({name:"FResponseLayout",props:oi,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}}),B1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-item.schema.json",title:"response-layout-item",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout Item",type:"string"},type:{description:"The type string of Respnse Layout Item component",type:"string",default:"response-layout-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},ri={customClass:{type:String,default:""}},Wu=me(ri,B1,Hu),Fo=e.defineComponent({name:"FResponseLayoutItem",props:ri,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}}),T1=e.defineComponent({name:"FResponseLayoutDesign",props:oi,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return r.value.canNested=!1,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{ref:o,class:"d-flex response-layout"},[n.slots.default&&n.slots.default()])}}),F1=e.defineComponent({name:"FResponseLayoutItemDesign",props:ri,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return r.value.canNested=!1,r.value.canMove=!1,r.value.canDelete=!1,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(Fo,{ref:o},{default:()=>[n.slots.default&&n.slots.default()]})}}),qu={install(t){t.component(ai.name,ai).component(Fo.name,Fo)},register(t,n,o){t["response-layout"]=ai,t["response-layout-item"]=Fo,n["response-layout"]=Lu,n["response-layout-item"]=Wu},registerDesigner(t,n,o){t["response-layout"]=T1,t["response-layout-item"]=F1,n["response-layout"]=Lu,n["response-layout-item"]=Wu}},zu={defaultState:{defaultGroupNumber:3,mode:"standard"},importData:[{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:2,label:"编号",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"标签",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"收件方",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:12,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:1,displayWidthInEL:6,label:"送达方",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"人员",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"邮寄地址",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"电话号码",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"负责人",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"邮箱",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"发件日期",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"收件日期",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"件数",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:6,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:2,displayWidthInEL:2,label:"售达方",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:12,columnInLG:6,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:2,displayWidthInEL:3,label:"本位币",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:2,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:1,label:"收款本币金额长标题",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:3,label:"汇率",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:1,label:"现金流项目",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:1,label:"摘要",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:1,label:"制单人",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:2,label:"结算方式",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:6,columnInLG:6,columnInEL:6,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:2,displayWidthInEL:3,label:"当前汇率",componentRow:0,showTopBorder:0,group:4},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:3,label:"本国汇率",componentRow:0,showTopBorder:0,group:4},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:3,label:"他国汇率",componentRow:0,showTopBorder:0,group:4}]},A1={initialState:{type:Object,default:zu},height:{type:Number,default:700},width:{type:Number,default:750}},I1={defaultStates:{type:Object,default:{mode:""}},onSwitchInStandardModeChanged:{type:Function,default:()=>{}},onCurrentScreenResolutionChanged:{type:Function,default:()=>{}},onScreenNameChanged:{type:Function,default:()=>{}}},E1=new Map([["appearance",xe]]),M1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/switch.schema.json",title:"switch",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a switch",type:"string"},type:{description:"The type string of switch component",type:"string",default:"switch"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function P1(t,n,o){return n}const O1={title:"switch",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},ii={modelValue:{type:Boolean,default:!1},disable:{type:Boolean},onBackground:{type:String},offBackground:{type:String},onColor:{type:String},offColor:{type:String},onLabel:{type:String},offLabel:{type:String},size:{type:String,default:"medium"},onModelValueChanged:{type:Function,default:()=>{}}},Gu=me(ii,M1,E1,P1,O1),Ao=e.defineComponent({name:"FSwitch",props:ii,emits:["update:modelValue","modelValueChanged"],setup(t,n){const{disable:o,size:a,onLabel:r,offLabel:i,onBackground:l,offBackground:s,onColor:p,offColor:c}=e.toRefs(t),d=e.ref(t.modelValue),u=e.computed(()=>({switch:!0,"f-cmp-switch":!0,checked:d.value,disabled:o.value,"switch-large":a.value==="large","switch-medium":a.value==="medium","switch-small":a.value==="small"})),f=e.computed(()=>d.value?{outline:"none",background:l.value}:{outline:"none",backgroundColor:s.value}),g=e.computed(()=>d.value?{background:p.value}:{backgroundColor:c.value}),m=e.computed(()=>(r==null?void 0:r.value)||(i==null?void 0:i.value));function h(){o.value||(d.value=!d.value,n.emit("update:modelValue",d.value))}return e.watch(d,(y,b)=>{y!==b&&n.emit("modelValueChanged",y)}),()=>e.createVNode("span",{tabindex:"0",role:"button",class:u.value,style:f.value,onClick:h},[m.value&&e.createVNode("span",{class:"switch-pane"},[e.createVNode("span",{class:"switch-label-checked"},[r==null?void 0:r.value]),e.createVNode("span",{class:"switch-label-unchecked"},[i==null?void 0:i.value])]),e.createVNode("small",{style:g.value},[n.slots.default&&n.slots.default()])])}}),R1=e.defineComponent({name:"FScreenResolutionSelector",props:I1,emits:["screenNameChanged","currentScreenResolutionChanged","switchInStandardModeChanged"],setup(t,n){const o=e.ref([{name:"小屏幕",code:"SM",value:"SM",active:!1},{name:"中等屏幕",code:"MD",value:"MD",active:!0},{name:"大屏幕",code:"LG",value:"LG",active:!1},{name:"极大屏幕",code:"EL",value:"EL",active:!1}]),a=e.ref(t.defaultStates),r=e.ref("MD"),i=e.ref("中等屏幕"),l=e.ref(!1);function s(d){o.value.forEach(u=>{u.active=u.code===d,u.active&&(r.value=u.code,i.value=u.name,n.emit("screenNameChanged",i.value),n.emit("currentScreenResolutionChanged",r.value))})}function p(){n.emit("switchInStandardModeChanged",l.value)}e.onBeforeMount(()=>{a.value.mode==="standard"?(l.value=!0,p()):l.value=!1});function c(){return e.createVNode(Vn,{class:"f-layout-editor-screen-resolution-selector-frame",items:o.value,modelValue:r.value,"onUpdate:modelValue":d=>r.value=d,onChange:s},null)}return()=>e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-header"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-form"},[e.createTextVNode("表单布局配置")])]),c(),e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-switch"},[e.createVNode(Ao,{class:"f-layout-editor-show-switch",modelValue:l.value,"onUpdate:modelValue":d=>l.value=d,onModelValueChanged:p},null),l.value?e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("标准模式")]):e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("自定义模式")])])])}}),j1={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},currentArea:{type:Object,default:[]},twoDimensionalArray:{type:Array,default:[]}},_1={item:{type:Object,default:{}},currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1}},H1=e.defineComponent({name:"FColumnWidthView",props:_1,emits:[],setup(t,n){const o=e.ref(t.item),a=e.ref(t.currentScreenResolution),r=e.computed(()=>`col-${o.value[`columnIn${a.value}`]}`);return e.watch([()=>t.item,()=>t.currentScreenResolution],([i,l],[s,p])=>{i!==s&&(o.value=i),l!==p&&(a.value=l)}),()=>e.createVNode("div",{class:r.value},[e.createVNode("div",{class:"f-layout-editor-column-width-view",title:o.value.label},[e.createVNode("div",{class:"f-layout-editor-column-width-view-label"},[o.value.label])])])}}),L1=e.defineComponent({name:"FPreview",props:j1,emits:["update:twoDimensionalArray"],setup(t,n){const o=e.ref(t.currentScreenResolution),a=e.ref(t.switchInStandardMode),r=e.ref(t.currentArea),i=e.ref(t.twoDimensionalArray),l=e.ref([]);e.watch([()=>t.currentArea,()=>t.switchInStandardMode,()=>t.currentScreenResolution],([u,f,g],[m,h,y])=>{u!==m&&(r.value=u),f!==h&&(a.value=f),g!==y&&(o.value=g)}),e.watch(()=>t.twoDimensionalArray,()=>{i.value=t.twoDimensionalArray,s()}),e.onMounted(()=>{s()});function s(){l.value=qe.cloneDeep(i.value),l.value=p()}function p(){const u=[];let f=1;return l.value.forEach(g=>{const m=c(g,f);f+=m.length,u.push(m)}),u}function c(u,f){const g=[];let m=[];return u.forEach(h=>{f!==h.componentRow&&(f+=1,g.push(m),m=[]),m.push(h)}),g.push(m),g}function d(){if(a.value)return"";const u=Array.from({length:12},()=>e.createVNode("div",{class:"col-1"},[e.createVNode("div",{class:"f-layout-editor-preview-customize-single-background"},[e.createTextVNode(" ")])]));return e.createVNode("div",{class:"f-layout-editor-preview-customize-whole-background"},[u])}return()=>e.createVNode("div",{class:"f-layout-editor-preview f-utils-fill-flex-column"},[e.createVNode("div",{class:"f-layout-editor-preview-header"},[e.createTextVNode("预览区")]),d(),e.createVNode("div",{class:"f-layout-editor-preview-view f-utils-overflow-xhya"},[e.createVNode("div",{class:"f-layout-editor-preview-row-group"},[l.value.map(u=>{var f,g;return((f=u[0][0])==null?void 0:f.group.toString())===((g=r.value[0])==null?void 0:g.id)&&u.map(m=>e.createVNode("div",{class:"f-layout-editor-row"},[m.map(h=>e.createVNode(H1,{item:h,"onUpdate:item":y=>h=y,currentScreenResolution:o.value,switchInStandardMode:a.value},null))]))})])])])}}),W1={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},originalData:{type:Array,default:[]},originalDataCopy:{type:Array,default:[]},defaultStates:{type:Object,default:{}},onTwoDimensionalArrayChanged:{type:Function,default:()=>{}},onOriginalDataChanged:{type:Function,default:()=>{}}};function q1(t,n){const o=e.ref(-1),a=e.ref(!1);function r(u){if(u.target.offsetParent){const f=u.target.offsetParent,g=f.offsetWidth-u.target.offsetWidth/2-4,m=f.offsetHeight/2;u.dataTransfer&&u.dataTransfer.setDragImage(f,g,m)}}function i(u){if(u){const f=t.value.findIndex(g=>g.label===u.label);setTimeout(()=>{o.value=f,a.value=!0,u.moving=!0})}}function l(u,f){u.stopPropagation(),r(u),i(f)}function s(u){const f=t.value.findIndex(g=>g.label===u.label);if(o.value!==f){const g=t.value[o.value],m=t.value;m.splice(o.value,1),m.splice(f,0,g),o.value=f,n&&n()}}function p(u,f){u.preventDefault(),s(f)}function c(u){u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="move")}function d(u,f){f&&(f.moving=!1),a.value=!1}return{dragstart:l,dragenter:p,dragover:c,dragend:d,isDragging:a}}const z1={currentScreenResolution:{type:String,default:""},field:{type:Object,default:{}},switchInStandardMode:{type:Boolean,default:!1},fieldChanged:{type:Function,default:()=>{}}},G1=new Map([["appearance",xe]]);function U1(t,n,o){return n}const Y1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-button.schema.json",title:"radio-button",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for radio-button",type:"string"},type:{description:"The type string of radio-button",type:"string",default:"radio-button"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},K1={title:"radio-button",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Uu={enumData:{type:Array,default:[{text:"1",active:!0}]},suffixValue:{type:String,default:""},onSelectedValueChanged:{type:Function,default:()=>{}}};me(Uu,Y1,G1,U1,K1);const X1=e.defineComponent({name:"FRadioButton",props:Uu,emits:["selectedValueChanged"],setup(t,n){const o=e.ref(t.enumData);function a(i,l){if(i.currentTarget.classList.value="btn btn-secondary active",i.currentTarget.tagName.toLowerCase()==="label"){const{currentTarget:s}=i,p=s.parentElement;Array.from(p.querySelectorAll("label")).filter(d=>d!==s).forEach(d=>d.classList.remove("active"))}n.emit("selectedValueChanged",l)}function r(i){return`${i.text}${t.suffixValue}`}return e.watch(()=>t.enumData,(i,l)=>{i!==l&&(o.value=t.enumData)}),()=>e.createVNode("div",{class:"f-radio-button"},[e.createVNode("div",{class:["farris-input-wrap"]},[o.value.map((i,l)=>e.createVNode(e.Fragment,null,[e.createVNode("label",{class:i.active?"btn btn-secondary active":"btn btn-secondary",onClick:s=>a(s,i)},[e.createVNode("span",{class:"f-radio-button-text"},[r(i)])])]))])])}}),Q1=e.defineComponent({name:"FColumnWidthEditor",props:z1,emits:["fieldChanged"],setup(t,n){const o={SM:["1"],MD:["1","2"],LG:["1","2","3","4"],EL:["1","2","3","4","5","6"]},a=e.ref(t.currentScreenResolution),r=e.ref(t.field),i=e.ref(t.switchInStandardMode),l=e.ref(),s=e.ref(""),p=e.ref(),c=e.ref("customize"),d=e.ref(),u=e.inject("ResponseLayoutEditorDraggableComposition"),{dragstart:f,dragenter:g,dragover:m,dragend:h}=u;function y(){l.value=o==null?void 0:o[a.value],i.value?(s.value=`displayWidthIn${a.value}`,c.value=`${r.value[s.value]}`):(s.value=`columnIn${a.value}`,d.value=r.value[s.value])}function b(k){if(i.value===!0){const B=Number(k==null?void 0:k.text);p.value=B;const $=r.value[`columnIn${a.value}`]/r.value[`displayWidthIn${a.value}`];r.value[`columnIn${a.value}`]=B*$,r.value[`displayWidthIn${a.value}`]=Number(B),n.emit("fieldChanged",r.value)}}function v(k){d.value=k;const B=r.value[`columnIn${a.value}`]/r.value[`displayWidthIn${a.value}`];r.value[`columnIn${a.value}`]=d.value,r.value[`displayWidthIn${a.value}`]=d.value/B,n.emit("fieldChanged",r.value)}function x(){return e.createVNode(To,{enableHalf:!0,size:"extraLarge",pointSystem:12,numOfStar:6,lightColor:"#5D89FE",darkColor:"#e7e9f3",iconClass:"f-icon-column-rectangle",modelValue:d.value,"onUpdate:modelValue":k=>d.value=k,enableScore:!1,onSelectedValue:()=>v(d.value)},null)}function C(){const k=[];l.value=o==null?void 0:o[a.value];const B=r.value[`displayWidthIn${a.value}`];return l.value.forEach($=>{const T={text:$,active:B.toString()===$};k.push(T)}),k}function w(){const k=C();return e.createVNode(X1,{enumData:k,suffixValue:"列",onSelectedValueChanged:b},{default:()=>[e.createTextVNode(" ")]})}function N(){var k;if(((k=r==null?void 0:r.value)==null?void 0:k.showTopBorder)===1)return e.createVNode("div",{class:"f-layout-editor-column-width-editor-row"},[e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-left"},null),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-middle"},[e.createTextVNode("第"),r.value.componentRow,e.createTextVNode("行")]),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-right"},null)])}function V(){return i.value?e.createVNode("div",{class:"f-column-width-editor-switch-standard"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-click-button"},[w()])]):e.createVNode("div",{class:"f-column-width-editor-switch-customize",onDragenter:k=>g(k,r.value),onDragend:k=>h(k,r.value),onDragover:k=>m(k)},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-rectangle"},[x(),e.createVNode("div",{class:"f-layout-editor-rate-show-column"},[d.value,e.createTextVNode("列")]),e.createVNode("span",{class:"f-layout-editor-drag-handler f-icon f-icon-drag-vertical",draggable:"true",onDragstart:k=>f(k,r.value)},null)])])}function D(){var k;return e.createVNode("div",{class:"f-layout-editor-column-width-editor-component"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-label"},[(k=r==null?void 0:r.value)==null?void 0:k.label]),V()])}return e.watch(()=>[t.field,t.switchInStandardMode,t.currentScreenResolution],([k,B,$],[T,S,F])=>{$!==F&&(a.value=$,l.value=o[a.value],y()),B!==S&&(i.value=B),i.value===!1&&y(),k!==T&&(r.value=k)}),e.onMounted(()=>{y()}),()=>e.createVNode("div",{class:"f-layout-editor-column-width-editor"},[N(),D()])}}),Z1=e.defineComponent({name:"FFieldList",props:W1,emits:["update:currentArea","twoDimensionalArrayChanged","originalDataChanged"],setup(t,n){const o=e.ref(t.currentScreenResolution),a=e.ref(t.switchInStandardMode),r=e.ref(t.originalData),i=e.ref(t.originalDataCopy),l=e.ref(t.defaultStates),s=e.ref(""),p=e.ref([]),c=e.ref(t.currentArea),d=e.ref(0),u=e.ref(),f=e.ref(0),g=e.ref("1"),m=e.ref([]);function h(){var A;let F=y();for(let E=0;E<F.length;E++){const I={id:(A=F[E])==null?void 0:A.toString(),label:"区域"+F[E]};p.value.push(I)}b()}function y(){let F=[];return r.value.forEach(A=>{F.indexOf(A.group)===-1&&F.push(A.group)}),F}function b(){g.value=l.value.defaultGroupNumber.toString(),s.value=`区域${g.value}`,c.value=[p.value[Number(g.value)-1]],n.emit("update:currentArea",c.value)}function v(){let F=[];u.value=[];let A=1;r.value.forEach(E=>{E.group===A||(A+=1,u.value.push(F),F=[]),F.push(E)}),u.value.push(F)}function x(){u.value[c.value[0].id-1]=qe.cloneDeep(m.value);let F=[];f.value=0,u.value.forEach(A=>{let E=w(A,f.value);F.push(E),f.value=E[E.length-1].componentRow}),N(F)}function C(){v();let F=[];return f.value=0,u.value.forEach(A=>{let E=w(A,f.value);F.push(E),f.value=E[E.length-1].componentRow}),n.emit("twoDimensionalArrayChanged",u.value),N(F),r.value}function w(F,A){let I=12;return d.value=1+A,F.forEach(R=>{R.showTopBorder=0;let O=R[`columnIn${o.value}`];I>=O?(R.componentRow=d.value,I-=O):(d.value+=1,R.componentRow=d.value,I=12-O,R.showTopBorder=1)}),F[0].showTopBorder=1,F}function N(F){let A=[];for(let E of F)A=A.concat(E);r.value=qe.cloneDeep(A),f.value=0}function V(){return e.createVNode("div",{class:"f-layout-editor-field-list-top"},[e.createVNode("div",{class:"f-layout-editor-field-list-header"},[e.createTextVNode("组件列表")]),e.createVNode("div",{class:"f-layout-editor-choose-group"},[e.createVNode(Bt,{modelValue:g.value,"onUpdate:modelValue":F=>g.value=F,placeholder:"当前可编辑组",enableClear:!1,"id-field":"id","text-field":"label",data:p.value,editable:!1,onChange:T},null)])])}function D(){return e.createVNode("div",{class:"f-layout-editor-field-list-content f-utils-overflow-xhya"},[m.value.map(F=>e.createVNode(Q1,{key:F.label,currentScreenResolution:o.value,field:F,"onUpdate:field":A=>F=A,switchInStandardMode:a.value,"onUpdate:switchInStandardMode":A=>a.value=A,onFieldChanged:k},null))])}function k(F){m.value.forEach(A=>{A.label==F.label&&Object.assign(A,F)}),x(),$(),B()}function B(){m.value=[],r.value.forEach(F=>{F.group===Number(c.value[0].id)&&m.value.push(F)})}function $(){r.value=qe.cloneDeep(C()),n.emit("originalDataChanged",r.value)}function T(F){for(let A=0;A<F.length;A++)c.value=[{id:F[A].id,label:F[A].label}];n.emit("update:currentArea",c.value),B(),x()}const S=q1(m,()=>{x(),$(),B()});return e.provide("ResponseLayoutEditorDraggableComposition",S),e.watch(()=>t.currentArea,(F,A)=>{F!==A&&(c.value=t.currentArea,B())}),e.watch(c,(F,A)=>{F!==A&&B()}),e.watch(()=>t.currentGroup,(F,A)=>{F!==A&&(s.value=t.currentGroup)}),e.watch(()=>t.currentScreenResolution,(F,A)=>{F!==A&&(o.value=t.currentScreenResolution,$(),v(),c.value[0]&&(m.value=qe.cloneDeep(u.value[Number(c.value[0].id)-1])))}),e.watch(()=>t.switchInStandardMode,(F,A)=>{F!==A&&(a.value=t.switchInStandardMode,r.value=qe.cloneDeep(i.value))}),e.watch(l,(F,A)=>{F!==A&&$()}),e.onBeforeMount(()=>{h(),C(),B()}),()=>e.createVNode("div",{class:"f-layout-editor-field-list f-utils-fill-flex-column"},[a.value?e.createVNode("div",{class:"f-layout-editor-field-list-standard f-utils-fill-flex-column"},[V(),D()]):e.createVNode("div",{class:"f-layout-editor-field-list-customize f-utils-fill-flex-column"},[V(),D()])])}}),Io=e.defineComponent({name:"FResponseLayoutEditor",props:A1,emits:["close","submit"],setup(t,n){const o=e.ref(t.initialState),a=e.ref(),r=e.ref(),i=e.ref(""),l=e.ref(""),s=e.ref(!1),p=e.ref([{id:"1",label:"区域1"}]),c=e.ref([]),d=e.ref(),u=e.ref(t.width),f=e.ref(t.height);e.watch(()=>t.initialState,k=>{o.value=k}),e.watch([()=>t.currentArea,()=>t.switchInStandardMode],([k,B],[$,T])=>{k!==$&&(p.value=k),B!==T&&(s.value=B)});function g(k){i.value=k}function m(k){l.value=k}function h(k){s.value=k}function y(k){p.value=[].concat(k)}function b(k){a.value=qe.cloneDeep(k),console.log(a.value)}function v(k){c.value=k}function x(){n.emit("close")}function C(){n.emit("submit",a.value)}function w(){return e.createVNode(Z1,{class:"f-utils-fill-flex-column",defaultStates:r.value,originalDataCopy:d.value,currentScreenResolution:l.value,"onUpdate:currentScreenResolution":k=>l.value=k,originalData:a.value,"onUpdate:originalData":k=>a.value=k,switchInStandardMode:s.value,"onUpdate:switchInStandardMode":k=>s.value=k,currentArea:p.value,"onUpdate:currentArea":k=>p.value=k,onCurrentAreaChanged:y,onTwoDimensionalArrayChanged:v,onOriginalDataChanged:b},null)}function N(){return e.createVNode(L1,{class:"f-utils-fill-flex-column",currentArea:p.value,"onUpdate:currentArea":k=>p.value=k,currentScreenResolution:l.value,"onUpdate:currentScreenResolution":k=>l.value=k,switchInStandardMode:s.value,twoDimensionalArray:c.value,"onUpdate:twoDimensionalArray":k=>c.value=k},null)}const V=e.computed(()=>s.value?"f-layout-editor-left-standard f-utils-fill-flex-column":"f-layout-editor-left-customize f-utils-fill-flex-column"),D=e.computed(()=>s.value?"f-layout-editor-right-standard f-utils-fill-flex-column":"f-layout-editor-right-customize f-utils-fill-flex-column");return e.onBeforeMount(()=>{a.value=qe.cloneDeep(o.value.importData),d.value=qe.cloneDeep(o.value.importData),r.value=o.value.defaultState,i.value="中等屏幕",l.value="MD"}),k=>e.createVNode("div",{class:"f-layout-editor f-utils-flex-column",style:"height:"+f.value+"px;width:"+u.value+"px;"},[e.createVNode("div",{class:"f-layout-editor-top"},[e.createVNode(R1,{defaultStates:r.value,onScreenNameChanged:g,onCurrentScreenResolutionChanged:m,onSwitchInStandardModeChanged:h},null)]),e.createVNode("div",{class:"f-layout-editor-content f-utils-fill"},[e.createVNode("div",{class:"f-layout-editor-left f-utils-fill-flex-column"},[e.createVNode("div",{class:V.value},[w()])]),e.createVNode("div",{class:"f-layout-editor-right f-utils-fill-flex-column"},[e.createVNode("div",{class:D.value},[N()])])]),e.createVNode("div",{class:"f-layout-editor-bottom"},[e.createVNode("div",{class:"f-layout-editor-button"},[e.createVNode("div",{class:"f-layout-editor-cancel-btn",onClick:x},[e.createVNode("span",{class:"f-layout-editor-text-cancel"},[e.createTextVNode("取消")])]),e.createVNode("div",{class:"f-layout-editor-sure-btn",onClick:C},[e.createVNode("span",{class:"f-layout-editor-text-sure"},[e.createTextVNode("确认")])])])])])}}),J1=new Map([["appearance",xe]]);function ew(t,n,o,a){const r=t.getSchemaByType("section");return r.id=`${a}-section`,r.appearance={class:"f-section-form f-section-in-main"},r.mainTitle="标题",r.contents=[n],r}function tw(t,n,o,a){const r=t.getSchemaByType("component");return r.id=`${a}-component`,r.componentType="form-col-1",r.appearance={class:"f-struct-form f-struct-wrapper"},r.contents=[n],r}function nw(t,n,o){n.appearance={class:"f-form-layout farris-form farris-form-controls-inline"};const a=ew(t,n,o,n.id);return tw(t,a,o,n.id)}const ow={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-editor-setting.schema.json",title:"response-layout-editor-setting",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for response layout editor",type:"string"},type:{description:"The type string of response layout editor component",type:"string",default:"response-layout-editor-setting"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]}},required:["id","type"]},aw={title:"response-form",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},si={initialState:{type:Object,default:zu},height:{type:Number,default:700},width:{type:Number,default:750},modelValue:{type:Object}},Yu=me(si,ow,J1,nw,aw),rw=e.defineComponent({name:"FResponseLayoutEditorSettingDesign",props:si,emits:[],setup(t,n){const o=e.ref(t.initialState),a=e.ref(t.width),r=e.ref(t.height),i=e.ref(),l=e.inject("design-item-context"),s=ve(i,l);e.onMounted(()=>{i.value.componentInstance=s}),n.expose(s.value);function p(){const c=ln.show({render:()=>e.createVNode(Io,{initialState:o,width:a,height:r},null),width:900,height:500,buttons:[{class:"btn btn-primary",text:"确定",iconClass:"f-icon f-icon-check",handle:()=>{c.unmount()}},{class:"btn btn-light",text:"取消",iconClass:"f-icon f-icon-close",handle:()=>{c.unmount()}}]})}return()=>e.createVNode("div",{ref:i,class:"f-column-width-setting-button",onClick:p},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),li=e.defineComponent({name:"FResponseLayoutEditorSetting",props:si,emits:["change"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.width),r=e.ref(t.height);e.watch(()=>t.modelValue,p=>{o.value=p});function i(p,c){n.emit("change",c),p&&p.unmount()}function l(p){p&&p.unmount()}function s(){if(!o.value.defaultState||!o.value.importData){const p=o.value.message||"只可以在响应式表单组件中调整响应式布局配置";Pr.info(p,"");return}ln.show({render:p=>e.createVNode(Io,{initialState:o,width:a.value,height:r.value,onClose:()=>l(p),onSubmit:c=>i(p,c)},null),width:900,height:500,showButtons:!1,showHeader:!1,showFloatingClose:!0})}return()=>e.createVNode("div",{class:"f-column-width-setting-button",onClick:s},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),Ku={install(t){t.component(Io.name,Io),t.component(li.name,li)},register(t,n,o){t["response-layout-editor-setting"]=li,n["response-layout-editor-setting"]=Yu},registerDesigner(t,n,o){t["response-layout-editor-setting"]=rw,n["response-layout-editor-setting"]=Yu}},iw=new Map([["appearance",xe]]),sw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/search-box.schema.json",title:"search-box",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a search-box",type:"string"},type:{description:"The type string of search-box component",type:"string",default:"search-box"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function lw(t,n,o){return n}const cw={title:"search-box",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},ci={customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},data:{type:Array,default:[]},onChange:{type:Function,default:()=>{}},onModelValue:{type:Function,default:()=>{}},onSelectedValue:{type:Function,default:()=>{}},placeholder:{type:String,default:"请输入关键词"}},Xu=me(ci,sw,iw,lw,cw),dw={data:{type:Array,default:[]},onConfirmResult:{type:Function,default:()=>{}},onSearchedValue:{type:Function,default:()=>{}}},Qu=e.defineComponent({name:"FSearchBoxContainer",props:dw,emits:["confirmResult","searchedValue"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.computed(()=>({"search-box-container":!0}));function i(s){var p;(p=a.value)==null||p.search(s)}function l(s){s.length&&(n.emit("confirmResult",s[0].name),n.emit("searchedValue",s))}return n.expose({search:i}),()=>e.createVNode("div",{class:r.value},[e.createVNode(e.resolveComponent("f-list-view"),{ref:a,data:o.value,view:"SingleView",onClickItem:s=>l(s.data)},{default:()=>[e.createTextVNode(" ")]})])}}),di=e.defineComponent({name:"FSearchBox",props:ci,emits:["update:modelValue","change","selectedValue"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.ref(),i=e.ref(t.placeholder),l=e.ref('<i class="f-icon f-icon-search"></i>'),s=e.ref(t.modelValue);e.watch(s,u=>{var f;(f=r.value)==null||f.search(u),n.emit("update:modelValue",u)}),e.watch(()=>t.modelValue,u=>{s.value=u});function p(u){a.value.commitValue(u)}function c(u){n.emit("change",u)}function d(u){n.emit("selectedValue",u)}return()=>e.createVNode("div",null,[e.createVNode(yt,{ref:a,"button-content":l.value,"custom-class":t.customClass,placeholder:i.value,onChange:u=>c(u),"enable-clear":!0,"button-behavior":"Execute",modelValue:s.value,"onUpdate:modelValue":u=>s.value=u,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[e.createVNode(Qu,{ref:r,data:o.value,onConfirmResult:p,onSearchedValue:u=>d(u)},null)]})])}}),uw=e.defineComponent({name:"FSearchBoxDesign",props:ci,emits:["update:modelValue","change"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.ref(),i=e.ref("请输入关键词"),l=e.ref('<i class="f-icon f-icon-search"></i>'),s=e.ref(t.modelValue),p=e.ref(),c=e.inject("design-item-context"),d=ve(p,c);e.onMounted(()=>{p.value.componentInstance=d}),n.expose(d.value),e.watch(s,g=>{var m;(m=r.value)==null||m.search(g),n.emit("update:modelValue",g)}),e.watch(()=>t.modelValue,g=>{s.value=g});function u(g){a.value.commitValue(g)}function f(g){n.emit("change",g)}return()=>e.createVNode("div",{ref:p},[e.createVNode(e.resolveComponent("f-button-edit"),{ref:a,"button-content":l.value,placeholder:i.value,onChange:f,"enable-clear":!0,"button-behavior":"Execute",modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[e.createVNode(Qu,{ref:r,data:o.value,onConfirmResult:u},null)]})])}}),Zu={install(t){t.component(di.name,di)},register(t,n,o){t["search-box"]=di,n["search-box"]=Xu},registerDesigner(t,n,o){t["search-box"]=uw,n["search-box"]=Xu}};function fw(t,n){const o=e.ref(!1),a=e.ref(!1),r=zt();let i=!0,l=!1,s,p=!1;function c(h){return!(!qt().basalDragulaRuleForContainer(h)||!i)}function d(){return!p}function u(){return!p}function f(){return l}function g(h){}function m(){o.value=!1,a.value=!1,p=!1,i=!0;const h=t,y=h.appearance&&h.appearance.class||"",b=y?y.split(" "):[],v=h.contents||[],x=v.length?v[0]:null,C=x&&x.appearance&&x.appearance.class||"",w=C?C.split(" "):[],N=v.length?v.reduce((S,F)=>{const A=F&&F.appearance?F.appearance.class:"",E=A?A.split(" "):[];return S.push(...E),S},[]):[],V=n,D=V&&V.appearance&&V.appearance.class||"",k=D?D.split(" "):[];s={componentClass:y,componentClassList:b,childContents:v,firstChildContent:x,firstChildClass:C,firstChildClassList:w,parent:V,parentClass:D,parentClassList:k,children:v,childrenClassList:N};const{canAccept:B,fixed:$,hidePadding:T}=r.getRuleValue(b[0],s);return i=B,l=T,p=$,!0}return{canAccepts:c,checkCanDeleteComponent:d,checkCanMoveComponent:u,hideNestedPaddingInDesginerView:f,onAcceptMovedChildElement:g,resolveComponentContext:m,triggerBelongedComponentToMoveWhenMoved:o,triggerBelongedComponentToDeleteWhenDeleted:a}}const pw=e.defineComponent({name:"FSectionDesign",props:Ma,emits:[],setup(t,n){var C;const o=e.ref(),a=e.ref();let r=e.ref();const i=e.inject("design-item-context"),l=fw(i.schema,(C=i.parent)==null?void 0:C.schema),s=ve(o,i,l);s.value.styles="display: inherit;",e.onMounted(()=>{o.value.componentInstance=s}),n.expose(s.value);const p=e.ref(t.customClass),c=e.computed(()=>t.enableAccordion),d=e.ref(t.expandStatus),u=e.computed(()=>t.buttonPosition),f=e.ref(!1),g=pc(t,n,d,a,r,f),m=Pa(t,n),h=e.computed(()=>{const w={"f-section":!0,"f-section-accordion":c.value==="default","f-state-collapse":(c.value==="default"||c.value==="custom")&&!d.value,"f-section-custom-accordion":c.value==="custom","f-section-fill":t.fill,"f-section-maximize":f.value,"f-utils-fill":!0,"p-0":!0};return p.value&&p.value.split(" ").reduce((N,V)=>(N[V]=!0,N),w),w}),y=e.computed(()=>{const w=t.contentClass.split(" "),N={"f-section-content":!0,"drag-container":!0};return w.reduce((V,D)=>(V[D]=!0,V),N),N}),b=e.computed(()=>{const w=t.extendClass.split(" "),N={"f-section-extend":!0};return w.reduce((V,D)=>(V[D]=!0,V),N),N});function v(){return n.slots.extend&&e.createVNode("div",{class:b.value},[n.slots.extend()])}function x(){return e.createVNode("div",{class:y.value,ref:o,"data-dragref":`${i.schema.id}-container`},[u.value==="inContent"&&m(),n.slots.default&&n.slots.default()])}return()=>e.createVNode("div",{class:h.value,ref:a},[g(),v(),x()])}}),Ju={install(t){t.component(Bn.name,Bn)},register(t,n,o){t.section=Bn,n.section=fc},registerDesigner(t,n,o){t.section=pw,n.section=fc}},mw=new Map([["appearance",xe]]);function hw(t,n,o){return n}const gw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/smoke-detector.schema.json",title:"smoke-detector",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for smoke-detector",type:"string"},type:{description:"The type string of smoke-detector",type:"string",default:"smoke-detector"},voltageA:{description:"A相电压",type:"number",default:-1},voltageB:{description:"B相电压",type:"number",default:-1},voltageC:{description:"C相电压",type:"number",default:-1},forwardActiveTotalPower:{description:"正向有功总电量",type:"number",default:-1},totalPositiveReactivePower:{description:"正向无功总电量",type:"number",default:-1},reverseTotalActivePower:{description:"反向有功总电量",type:"number",default:-1},reverseTotalReactivePower:{description:"反向无功总电量",type:"number",default:-1},toDeliverData:{description:"下发数据",type:"string"}},required:["id","type"]},yw={title:"smoke-detector",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},bussinessProperties:{description:"",title:"业务属性",properties:{voltageA:{description:"A相电压",type:"number",title:"A相电压",default:-1},voltageB:{description:"B相电压",type:"number",title:"B相电压",default:-1},voltageC:{description:"C相电压",type:"number",title:"C相电压",default:-1},forwardActiveTotalPower:{description:"正向有功总电量",type:"number",title:"正向有功总电量",default:-1},totalPositiveReactivePower:{description:"正向无功总电量",type:"number",title:"正向无功总电量",default:-1},reverseTotalActivePower:{description:"反向有功总电量",type:"number",title:"反向有功总电量",default:-1},reverseTotalReactivePower:{description:"反向无功总电量",type:"number",title:"反向无功总电量",default:-1},toDeliverData:{description:"下发数据",type:"string",title:"下发数据"}}}}},ui={},ef=me(ui,gw,mw,hw,yw),fi=e.defineComponent({name:"FSmokeDetector",props:ui,emits:[""],setup(t){return()=>e.createVNode("div",{class:"f-smoke-detector"},[e.createVNode("img",{title:"smoke-detector",src:"./image/smoke-detector-2.png"},null)])}}),bw=e.defineComponent({name:"FSmokeDetectorDesign",props:ui,emits:[""],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{ref:o,class:"f-smoke-detector"},[e.createVNode("img",{title:"smoke-detector",src:"../image/smoke-detector-2.png"},null)])}}),tf={install(t){t.component(fi.name,fi)},register(t,n,o){t["smoke-detector"]=fi,n["smoke-detector"]=ef},registerDesigner(t,n,o){t["smoke-detector"]=bw,n["smoke-detector"]=ef}},vw=new Map([["appearance",xe]]);function xw(t,n,o){const a=t.getSchemaByType("splitter-pane");return a.appearance={class:"f-col-w6 f-page-content-nav"},a.position="left",n.contents.unshift(a),n}function Cw(t,n,o){const a=t.getSchemaByType("splitter-pane");return a.appearance={class:"f-page-content-main"},a.position="main",n.contents.push(a),n}function ww(t,n,o){const a=o.parentComponentInstance;return String(a.schema.appearance.class||"").split(" ").includes("f-page-main")&&(n.appearance={class:"f-page-content"}),xw(t,n),Cw(t,n),n}const Nw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter.schema.json",title:"splitter",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},direction:{description:"",type:"string",default:"column",enum:["column","row"]}}},Vw={title:"splitter",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},pi={direction:{Type:String,default:"column"}},nf=me(pi,Nw,vw,ww,Vw);function of(t){const n=e.ref(-1),o=e.ref(-1),a=e.ref(0),r=e.ref(0),i=e.ref(!1),l=e.ref(!1),s=e.computed(()=>({display:i.value?"block":"none",left:`${a.value}px`})),p=e.computed(()=>({display:l.value?"block":"none",top:`${r.value}px`})),c=e.computed(()=>({display:l.value||i.value?"block":"none"}));function d(f){const g=t.value;if(g){const{left:m}=g.getBoundingClientRect();a.value=f.clientX-m}}function u(f){const g=t.value;if(g){const{top:m}=g.getBoundingClientRect();r.value=f.clientY-m}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:p,resizeOverlayStyle:c,showHorizontalResizeHandle:i,showVerticalResizeHandle:l,horizontalResizeBarPosition:n,verticalResizeBarPosition:o,verticalResizeHandleOffset:r,horizontalResizeHandleOffset:a,draggingHorizontalResizeHandle:d,draggingVerticalResizeHandle:u}}const mi=e.defineComponent({name:"FSplitter",props:pi,emits:[],setup(t,n){const o=e.ref(),a=of(o),{horizontalResizeHandleStyle:r,verticalResizeHandleStyle:i,resizeOverlayStyle:l}=a;e.provide("splitter",{useResizeHandleComposition:a});const s=e.computed(()=>({"flex-direction":t.direction==="row"?"column":"row"}));return()=>e.createVNode("div",{class:"f-splitter",ref:o,style:s.value},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-splitter-resize-overlay",style:l.value},null),e.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:r.value},null),e.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:i.value},null)])}}),Sw=new Map([["appearance",xe]]),$w={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter-pane.schema.json",title:"splitter-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},height:{description:"",type:"number"},position:{description:"",type:"string",default:"",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},width:{description:"",type:"number"},visible:{description:"",type:"number",default:!0}}},Dw={title:"splitter-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}},width:{description:"",type:"number",title:"宽度"},height:{description:"",type:"number",title:"高度"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{collapsable:{description:"",type:"boolean",title:"允许收折"},position:{description:"",type:"enum",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}},resizeable:{description:"",type:"boolean",title:"允许调整尺寸"},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},hi={customClass:{type:String,defaut:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:200},minHeight:{type:Number,default:200}},af=me(hi,$w,Sw,void 0,Dw);function rf(t,n){const o=e.ref(t.width),a=e.ref(t.height),{horizontalResizeBarPosition:r,horizontalResizeHandleOffset:i,showHorizontalResizeHandle:l,showVerticalResizeHandle:s,verticalResizeBarPosition:p,verticalResizeHandleOffset:c,draggingHorizontalResizeHandle:d,draggingVerticalResizeHandle:u}=n;let f="",g,m;function h(v){if((f==="left"||f==="right")&&m){const{left:x}=m.getBoundingClientRect(),{width:C}=g.getBoundingClientRect(),w=v.clientX-x,N=f==="left"?(C||0)+(w-r.value):(C||0)-(w-r.value);o.value=t.minWidth>0?Math.max(t.minWidth,N):N}if((f==="top"||f==="bottom")&&m){const{top:x}=m.getBoundingClientRect(),{height:C}=g.getBoundingClientRect(),w=v.clientY-x,N=f==="top"?(C||0)+(w-p.value):(C||0)-(w-p.value);a.value=t.minHeight>0?Math.max(t.minHeight,N):N}i.value=0,c.value=0,r.value=-1,p.value=-1,l.value=!1,s.value=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",h),document.body.style.userSelect="",f="",g=null,m=null}function y(v,x,C){if(f=x,g=C,l.value=!0,m=v.composedPath().find(N=>N.className.split(" ")[0]==="f-splitter"),m){const{left:N}=m.getBoundingClientRect();i.value=v.clientX-N,r.value=v.clientX-N,document.addEventListener("mousemove",d),document.addEventListener("mouseup",h),document.body.style.userSelect="none"}}function b(v,x,C){if(f=x,g=C,s.value=!0,m=v.composedPath().find(N=>N.className.split(" ")[0]==="f-splitter"),m){const{top:N}=m.getBoundingClientRect();c.value=v.clientY-N,p.value=v.clientY-N,document.addEventListener("mousemove",u),document.addEventListener("mouseup",h),document.body.style.userSelect="none"}}return{actualWidth:o,actualHeight:a,onClickSplitterHorizontalResizeBar:y,onClickSplitterVerticalResizeBar:b}}const gi=e.defineComponent({name:"FSplitterPane",props:hi,emits:[],setup(t,n){const o=e.ref(),a=e.inject("splitter"),{useResizeHandleComposition:r}=a,i=rf(t,r),{actualHeight:l,actualWidth:s,onClickSplitterHorizontalResizeBar:p,onClickSplitterVerticalResizeBar:c}=i,d=e.ref(t.position),u=e.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-column":d.value==="left"||d.value==="right","f-splitter-pane-row":d.value==="bottom"||d.value==="top","f-splitter-pane-main":d.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((y,b)=>(y[b]=!0,y),h),h}),f=e.computed(()=>{const h={};return(s.value&&d.value==="left"||d.value==="right")&&(h.width=`${s.value}px`),(l.value&&d.value==="bottom"||d.value==="top")&&(h.height=`${l.value}px`),h}),g=e.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":d.value==="left","f-splitter-resize-bar-n":d.value==="bottom","f-splitter-resize-bar-s":d.value==="top","f-splitter-resize-bar-w":d.value==="right"}));function m(h,y){(y==="left"||y==="right")&&p(h,y,o.value),(y==="top"||y==="bottom")&&c(h,y,o.value)}return()=>e.createVNode("div",{ref:o,class:u.value,style:f.value},[n.slots.default&&n.slots.default(),e.createVNode("span",{class:g.value,onMousedown:h=>m(h,d.value)},null)])}});function kw(t,n){function o(){return!1}return{canAccepts:o}}const Bw=e.defineComponent({name:"FSplitterDesign",props:pi,emits:[],setup(t,n){var u;const o=e.ref(),a=e.inject("design-item-context"),r=kw(a.schema,(u=a.parent)==null?void 0:u.schema),i=ve(o,a,r);i.value.canNested=!1;const l=of(o),{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:p,resizeOverlayStyle:c}=l;e.provide("splitter",{useResizeHandleComposition:l});const d=e.computed(()=>({"flex-direction":t.direction==="row"?"column":"row"}));return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{class:"f-splitter",ref:o,style:d.value},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-splitter-resize-overlay",style:c.value},null),e.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:s.value},null),e.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:p.value},null)])}});function Tw(t,n){function o(r){var p;if(!qt().basalDragulaRuleForContainer(r))return!1;if(((((p=t.appearance)==null?void 0:p.class)||"").split(" ")||[]).includes("f-page-content-nav")){const c=t.contents&&t.contents[0];return!(c&&c.type==="component")}return!0}function a(r,i,l){const s=t,c=(s.appearance&&s.appearance.class||"").split(" ");if(s.position==="main"&&c.includes("f-page-content-main")){if(l.type==="tabs"){const d=l.appearance&&l.appearance.class?String(l.appearance.class).split(" "):[];d.unshift("f-tabs-in-card"),l.appearance={class:d.join(" ")};const u=mt("section");u.id=`${l.id}-section`,u.appearance={class:"f-section-tabs f-section-in-mainsubcard"},u.contents=[l];const f=mt("content-container");return f.id=`${l.id}-struct-wrapper`,f.appearance={class:"f-struct-wrapper"},f.contents=[u],f}if(l.type==="section"){const d=l.appearance&&l.appearance.class?String(l.appearance.class).split(" "):[];d.unshift("f-section-in-main"),l.appearance={class:d.join(" ")},l.title=String(r.innerText);const u=mt("content-container");return u.id=`${l.id}-struct-wrapper`,u.appearance={class:"f-struct-wrapper"},u.contents=[l],u}}return l}return{canAccepts:o,onAcceptNewChildElement:a}}const Fw=e.defineComponent({name:"FSplitterPaneDesign",props:hi,emits:[],setup(t,n){var m;const o=e.ref(),a=e.inject("design-item-context"),r=Tw(a.schema,(m=a.parent)==null?void 0:m.schema),i=ve(o,a,r);i.value.styles="padding:0;box-shadow:none;",i.value.canNested=!1,i.value.canMove=!1,i.value.canDelete=!1,e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const l=e.inject("splitter"),{useResizeHandleComposition:s}=l,p=rf(t,s),{actualHeight:c,actualWidth:d}=p,u=e.ref(t.position),f=e.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-column":u.value==="left"||u.value==="right","f-splitter-pane-row":u.value==="bottom"||u.value==="top","f-splitter-pane-main":u.value==="center","f-component-splitter-pane":!0,"drag-container":!0};return t.customClass&&String(t.customClass).split(" ").reduce((y,b)=>(y[b]=!0,y),h),h}),g=e.computed(()=>{const h={};return(d.value&&u.value==="left"||u.value==="right")&&(h.width=`${d.value}px`),(c.value&&u.value==="bottom"||u.value==="top")&&(h.height=`${c.value}px`),h});return()=>e.createVNode("div",{ref:o,"data-dragref":`${a.schema.id}-container`,class:f.value,style:g.value},[n.slots.default&&n.slots.default()])}}),sf={install(t){t.component(mi.name,mi),t.component(gi.name,gi)},register(t,n,o){t.splitter=mi,n.splitter=nf,t["splitter-pane"]=gi,n["splitter-pane"]=af},registerDesigner(t,n,o){t.splitter=Bw,n.splitter=nf,t["splitter-pane"]=Fw,n["splitter-pane"]=af}},Aw=new Map([["appearance",xe]]);function Iw(t,n,o){return n}const Ew={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Mw={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},yi={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},lf=me(yi,Ew,Aw,Iw,Mw),bi=e.defineComponent({name:"FStep",props:yi,emits:["click"],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),r=e.ref(t.height),i=e.ref(t.steps),l=e.ref(t.clickable),s=e.ref(0),p=e.ref(t.activeIndex),c=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),d=e.computed(()=>({height:o.value==="vertical"?`${r.value}px`:""}));function u(N,V){const D={step:!0,active:V===p.value,clickable:l.value,current:V===p.value};return V<p.value&&(D.finish=!0),D}function f(N,V){const D={step:N,stepIndex:V};n.emit("click",D)}function g(N,V){const D={"f-progressstep-row":!0,"step-active":V===p.value,"step-current":V===p.value};return V<p.value&&(D["step-finish"]=!0),D}function m(N,V){return{"step-icon":!0,"step-success":V,"f-icon":V,"f-icon-check":V}}function h(N,V){const D=[];return V>=p.value||V===s.value?D.push(e.createVNode("span",{class:"step-icon"},[V+1])):D.push(e.createVNode("span",{class:m(N,!0)},null)),D}function y(N,V){return{"step-name":!0,"step-name-success":V<p.value}}function b(N,V){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:y(N,V)},[N.title])])}function v(N,V){return{"f-progress-step-line":!0,"f-progress-step-line-success":V===p.value}}function x(N,V){return V!==i.value.length-1}const C=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function w(){return i.value.map((N,V)=>e.createVNode("li",{class:u(N,V),onClick:D=>f(N,V)},[e.createVNode("div",{class:g(N,V)},[e.createVNode("div",{class:"f-progress-step-content"},[h(N,V),b(N,V)]),x(N,V)&&e.createVNode("div",{class:v(N,V)},[e.createVNode("span",{class:C.value},null)])])]))}return e.watch(()=>t.activeIndex,()=>{t.activeIndex>-1&&t.activeIndex<=i.value.length&&(p.value=t.activeIndex,w())}),()=>e.createVNode("div",{class:"f-progress-step"},[e.createVNode("ul",{class:c.value,style:d.value},[w()])])}}),Pw=e.defineComponent({name:"FStepDesign",props:yi,emits:[],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),r=e.ref(t.height),i=e.ref(t.steps),l=e.ref(0),s=e.ref(t.clickable),p=e.ref(0),c=e.ref(),d=e.inject("design-item-context"),u=ve(c,d);e.onMounted(()=>{c.value.componentInstance=u}),n.expose(u.value);const f=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),g=e.computed(()=>({height:o.value==="vertical"?`${r.value}px`:""}));function m(k,B){const $={step:!0,active:B===l.value,clickable:s.value,"click-disable":k.disable,current:B===l.value};return B<l.value&&($.finish=!0),k.status&&($[k.status]=!0),k.hasOwnProperty("class")&&k.class.split(" ").reduce((T,S)=>(T[S]=!0,T),$),$}function h(k,B){}function y(k,B){const $={"f-progressstep-row":!0,"step-active":B===l.value,"step-current":B===l.value};return B<l.value&&($["step-finish"]=!0),k.status&&($["step-"+k.status]=!0),$}function b(k,B){const $={"step-icon":!0,"step-success":B,"k-icon":B,"k-i-check":B};return k.hasOwnProperty("icon")&&k.class.split(" ").reduce((T,S)=>(T[S]=!0,T),$),$}function v(k,B){const $=[];return k.icon?$.push(e.createVNode("span",{class:b(k,!1)},null)):B>=l.value||B===p.value?$.push(e.createVNode("span",{class:"step-icon"},[B+1])):$.push(e.createVNode("span",{class:b(k,!0)},null)),$}function x(k,B){return{"step-name":!0,"step-name-success":B<l.value}}function C(k,B){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:x(k,B)},[k.title])])}function w(k,B){return{"f-progress-step-line":!0,"f-progress-step-line-success":B===l.value}}function N(k,B){return B!==i.value.length-1}const V=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function D(){return i.value.map((k,B)=>e.createVNode("li",{class:m(k,B),onClick:$=>void 0},[e.createVNode("div",{class:y(k,B)},[e.createVNode("div",{class:"f-progress-step-content"},[v(k,B),C(k,B)]),N(k,B)&&e.createVNode("div",{class:w(k,B)},[e.createVNode("span",{class:V.value},null)])])]))}return()=>e.createVNode("div",{ref:c,class:"f-progress-step"},[e.createVNode("ul",{class:f.value,style:g.value},[D()])])}}),cf={install(t){t.component(bi.name,bi)},register(t,n,o){t.step=bi,n.step=lf},registerDesigner(t,n,o){t.step=Pw,n.step=lf}},Ow=e.defineComponent({name:"FSwitchDesign",props:ii,emits:["update:modelValue"],setup(t,n){const{disable:o,size:a,onLabel:r,offLabel:i}=e.toRefs(t),l=e.ref(t.modelValue),s=e.ref(),p=e.inject("design-item-context"),c=ve(s,p);e.onMounted(()=>{s.value.componentInstance=c}),n.expose(c.value);function d(){return""}function u(){return""}function f(){return""}const g=e.computed(()=>({switch:!0,"f-cmp-switch":!0,checked:l.value,disabled:o.value,"switch-large":a.value==="large","switch-medium":a.value==="medium","switch-small":a.value==="small"})),m=e.computed(()=>({outline:"none","backgroud-color":d(),"border-color":u()})),h=e.computed(()=>({background:f()})),y=e.computed(()=>(r==null?void 0:r.value)||(i==null?void 0:i.value));function b(x,C=!0){o.value||(l.value=!l.value,n.emit("update:modelValue",l.value))}function v(x){b()}return()=>e.createVNode("span",{ref:s,tabindex:"0",role:"button",class:g.value,style:m.value,onClick:v},[y.value&&e.createVNode("span",{class:"switch-pane"},[e.createVNode("span",{class:"switch-label-checked"},[r==null?void 0:r.value]),e.createVNode("span",{class:"switch-label-unchecked"},[i==null?void 0:i.value])]),e.createVNode("small",{style:h.value},[n.slots.default&&n.slots.default()])])}}),df={install(t){t.component(Ao.name,Ao)},register(t,n,o){t.switch=Ao,n.switch=Gu},registerDesigner(t,n,o){t.switch=Ow,n.switch=Gu}};function Rw(t,n,o,a,r){const{activeId:i,removeTab:l,selectTab:s,removeDesignTab:p,selectDesignTab:c}=r,d=e.computed(()=>({"st-tab-text":!0,"farris-title-auto":t.autoTitleWidth})),u=e.computed(()=>{const D={"farris-component":!0,"nav-item":!0,"d-none":n.show!==void 0?!n.show:!1,"f-state-active":n.id===i.value,"f-state-disable":n.disabled};return D[`${n.id}-design-item`]=!0,D}),f=e.computed(()=>({width:`${n.tabWidth}px`})),g=e.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:n.id===i.value,disabled:n.disabled}));function m(D){return e.createVNode("span",{class:d.value,title:D.title},[D.title])}function h(D){return D.slots.title?D.slots.title:m}const y=h(o),b=e.ref(n.removeable);function v(){return e.createVNode("span",{class:"st-drop-close",onClick:D=>l(D,n.id)},[e.createVNode("i",{class:"f-icon f-icon-close"},null)])}function x(D){s(n.id),t.tabType==="one-page"&&a.scrollToByPaggId(n.id)}function C(D){c(D,n.id)}function w(D){Pr.question(`确定删除标签页【${o.props.title}】?`,"",()=>p(D,n.id),()=>{})}function N(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:D=>w(D)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function V(){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[N()])])}return e.createVNode("li",{onClick:D=>C(D),class:u.value,style:f.value,id:`${n.id}-design-item`},[V(),e.createVNode("a",{class:g.value,onClick:x},[y(n),b.value&&v()])])}function jw(t,n,o,a,r,i,l){const{shouldShowNavigationButtons:s}=o,{tabPages:p}=r,c=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":s.value})),d=e.computed(()=>({width:"100%","justify-content":t.justifyContent})),u=e.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":t.fill||t.tabType==="fill","nav-pills":t.tabType==="pills","flex-row":t.position==="top"||t.position==="bottom","flex-column":t.position==="left"||t.position==="right"})),f=e.computed(()=>({overflow:"auto"}));function g(h){const{componentType:y}=h;let b=mt(y,h);l&&l.onResolveNewComponentSchema&&(b=l.onResolveNewComponentSchema(h,b));const v=y.toLowerCase().replace("-","_");return b&&!b.id&&b.type===y&&(b.id=`${v}_${Math.random().toString().slice(2,6)}`),b}const m=function(h){var x;const y={componentType:"tab-page",label:"Tab1",parentComponentInstance:i.value,targetPosition:-1},b=g(y);(x=i.value.schema.contents)==null||x.push(b);const{selectTabByTabId:v}=r;v(b.id)};return()=>e.createVNode("div",{class:c.value,style:d.value},[e.createVNode("ul",{class:u.value,style:f.value,ref:n},[p.value.map(h=>Rw(t,h.props,h,a,r)),e.createVNode("li",{class:"nav-item"},[e.createVNode("a",{class:"nav-link tabs-text-truncate",title:"添加页签",onClick:h=>m()},[e.createVNode("i",{class:"f-icon f-icon-plus",style:"font-size: 20px;margin: 0 auto;line-height: 24px;"},null)])])])])}function _w(t,n){const o=zt();let a=!1,r,i=!1;function l(u){return!1}function s(){return!i}function p(){return!i}function c(){return a}function d(){const u=t,f=u.appearance&&u.appearance.class||"",g=f?f.split(" "):[],m=n==null?void 0:n.schema,h=m&&m.appearance&&m.appearance.class||"",y=h?h.split(" "):[],b=u.contents||[],v=b.length?b[0]:null,x=v&&v.appearance&&v.appearance.class||"",C=x?x.split(" "):[],w=b.length?b.reduce(($,T)=>{const S=T&&T.appearance?T.appearance.class:"",F=S?S.split(" "):[];return $.push(...F),$},[]):[],N=(n==null?void 0:n.parent)&&n.parent.schema,V=N&&N.appearance&&N.appearance.class||"";V&&V.split(" "),r={componentClass:f,componentClassList:g,childContents:b,firstChildContent:v,firstChildClass:x,firstChildClassList:C,parent,parentClass:h,parentClassList:y,children:b,childrenClassList:w};const{canAccept:D,fixed:k,hidePadding:B}=o.getRuleValue(g[0],r);return a=B,i=k,!0}return{canAccepts:l,checkCanDeleteComponent:s,checkCanMoveComponent:p,hideNestedPaddingInDesginerView:c,resolveComponentContext:d}}function Hw(t,n,o,a){const r=e.ref([]),i=e.ref(t.activeId||""),l=e.ref(!0),s=e.ref(),p=e.ref([]);function c(S){const F=S.value.findIndex(A=>A.props.show!==!1&&!i.value&&!A.props.disabled);!i.value&&F!==-1&&(i.value=S.value[F].props.id)}function d(S,F){S.classList.contains(F)||S.classList.add(F)}function u(S,F){S.classList.remove(F)}function f(S){const{parentElement:F}=S;F&&(S.scrollWidth>F.offsetWidth?d(S,"farris-title-text-custom"):u(S,"farris-title-text-custom"))}function g(S){var A;if(t.autoTitleWidth)return;const F=(A=S.value)==null?void 0:A.querySelectorAll(".st-tab-text");F&&F.forEach(E=>f(E))}const m=S=>{S.preventDefault(),S.stopPropagation()};function h(S){r.value=r.value.filter(F=>F.props.id!==S),i.value===S&&(i.value="",c(r))}function y(S,F,A=!1){const E=r.value.findIndex(I=>I.props.id===F);h(F),m(S),e.nextTick(()=>{g(o),A&&(l.value=!0),n.emit("tabRemove",{removeIndex:E,removeId:F,activeId:i.value})})}function b(){const S=r.value.find(E=>E.props.id===i.value);p.value=[],S&&S.props.toolbar&&S.props.toolbar.buttons&&S.props.toolbar.buttons.length&&(p.value=[...S.props.toolbar.buttons]);const F=a.schema.contents,A=F==null?void 0:F.find(E=>E.id===i.value);s.value=A==null?void 0:A.toolbar}function v(S){const F=i.value;i.value=S,b(),n.emit("tabChange",{prevId:F,nextId:i.value})}function x(S){v(S)}function C(S){r.value.findIndex(A=>A.props.id===S.props.id)===-1&&r.value.push(S)}function w(S){r.value.findIndex(A=>A.props.id===S.props.id)!==-1&&(r.value.forEach(A=>{A.props.id===S.props.id&&(A=S)}),e.nextTick(()=>{g(o)}))}function N(S){S&&(S.stopPropagation(),S.preventDefault())}function V(S,F){N(S);const A=a.schema.contents,E=A==null?void 0:A.findIndex(I=>I.id===F);E===-1||E===void 0||(A==null||A.splice(E,1),h(F))}function D(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(F=>F.classList.remove("dgComponentFocused"));const S=document.getElementsByClassName("dgComponentSelected");Array.from(S).forEach(F=>F.classList.remove("dgComponentSelected"))}function k(S){S.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function B(S){var I;const{contents:F=[]}=a.schema,A=F==null?void 0:F.findIndex(R=>R.id===S),E=F[A];(I=a==null?void 0:a.setupContext)==null||I.emit("selectionChange",E.type,E)}function $(S,F){D(),N(S),k(S),B(F)}function T(S,F){D(),N(S),k(S)}return{activeId:i,addTab:C,changeTitleStyle:g,removeTab:y,selectTab:x,selectTabByTabId:v,tabPages:r,updateTab:w,toolbarItems:p,removeDesignTab:V,selectDesignTab:$,selectDesignTabToolbar:T,toolbarSchema:s}}function Lw(t,n,o,a){const{toolbarItems:r,toolbarSchema:i}=t,l=p=>{};function s(p,c){var d;(d=a.setupContext)==null||d.emit("selectionChange",p,c)}return e.createVNode("div",{class:"farris-tabs-toolbar"},[e.createVNode("div",{class:"farris-tabs-inline-flex"},[e.createVNode(bu,{modelValue:i.value,"onUpdate:modelValue":p=>i.value=p,canAdd:!0,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",onSelectionChange:s},{default:()=>[e.createVNode(Gr,{items:r.value,onClick:l},null)]})])])}const Ww=e.defineComponent({name:"FTabsDesign",props:Ta,emits:["tabChange","tabRemove"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=_w(a.schema,a.parent),i=ve(o,a,r),l=e.ref(t.tabType),s=e.shallowRef(),p=e.shallowRef(),c=Hw(t,n,s,a),{activeId:d,changeTitleStyle:u,tabPages:f,addTab:g,updateTab:m,selectTabByTabId:h,toolbarItems:y}=c,b=rc(t,p,c),v=oc(t,s,b,c),{previousButtonClass:x,nextButtonClass:C,nextButtonGroupClass:w,scrollTab:N,updateNavigationLayout:V}=v,D=ac(t,c),{hideDropDown:k}=D,B=jw(t,s,v,b,c,i,r),$=B,T=tc(t,s,v,b,c),S=new Map([["default",B],["one-page",$],["pills",T]]);e.computed(()=>{const L=f.value.find(X=>X.props.id===d.value);return L==null?void 0:L.slots});const F=e.computed(()=>{const L=f.value.find(U=>U.props.id===d.value);return(L==null?void 0:L.props.toolbarPosition)==="inHead"});e.provide("tabs",{activeId:d,addTab:g,updateTab:m,tabPages:f,tabType:l});function A(){const L=i.value.schema.contents||[];return L.length<1?null:L.find(U=>U.id===d.value)}function E(){var X;const L=A();y.value=[...(X=L==null?void 0:L.toolbar)==null?void 0:X.buttons]}e.provide("toolbar-item-handler",E);const I=e.computed(()=>t.fill||t.tabType==="fill"),R=e.computed(()=>t.tabType==="pills"),O=e.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":F.value,"farris-tabs-inContent":!F.value,"farris-tabs-nav-fill":I.value,"farris-tabs-nav-pills":R.value})),G=e.computed(()=>({width:F.value&&t.titleWidth?`${t.titleWidth}%`:""})),M=e.computed(()=>({"farris-tabs":!0,"flex-column":t.position==="top","flex-column-reverse":t.position==="bottom","flex-row":t.position==="left","flex-row-reverse":t.position==="right","one-page":t.tabType==="one-page"}));e.onMounted(()=>{f.value.length&&(d.value=t.activeId||f.value[0].props.id,h(d.value)),e.nextTick(()=>{V()}),u(s),window.addEventListener("click",L=>{var X;k.value||(X=o.value)!=null&&X.contains(L.target)||(k.value=!0)}),window.addEventListener("resize",()=>{V()}),o.value.componentInstance=i});function j(){return e.createVNode("button",{title:"left-arrow-button",type:"button",class:x.value,onClick:()=>{N(0,-1)}},null)}function H(){return e.createVNode("button",{title:"right-arrow-button",type:"button",class:C.value,onClick:()=>{N(0,1)}},null)}const{renderMorePagesButtton:_}=nc(t,D,v,c);function W(){return!!y.value.length&&Lw(c,i,r,a)}const K=S.get(t.tabType)||S.get("default");function z(){var L,X,U,Z;return e.createVNode("div",{class:O.value},[e.createVNode("div",{class:"farris-tabs-header-pre"},[(X=(L=n.slots).headerPrefix)==null?void 0:X.call(L)]),e.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:G.value},[j(),K&&K(),e.createVNode("div",{class:w.value},[H(),_()])]),W(),e.createVNode("div",{class:"farris-tabs-header-post"},[(Z=(U=n.slots).headerSuffix)==null?void 0:Z.call(U)])])}function q(){var L,X;return e.createVNode("div",{class:"farris-tabs-content",ref:p},[(X=(L=n.slots).default)==null?void 0:X.call(L)])}return n.expose(i.value),()=>e.createVNode("div",{class:M.value,ref:o},[z(),q()])}});function qw(t,n){function o(r){return!!qt().basalDragulaRuleForContainer(r)}function a(r){}return{canAccepts:o,onAcceptMovedChildElement:a}}function zw(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const Gw=e.defineComponent({name:"FTabPageDesign",props:Ea,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=qw(a.schema,a.parent),i=ve(o,a,r);i.value.canNested=!1,i.value.canDelete=!1,i.value.canMove=!1,n.expose(i.value);const l=e.inject("tabs"),s=e.ref(!0),p={slots:n.slots,props:t},c=e.ref((l==null?void 0:l.tabType.value)||"default");e.onMounted(()=>{o.value.componentInstance=i;const b=l.tabPages.value.findIndex(v=>v.props.id===t.id);!b||b===-1?l==null||l.addTab(p):b>-1&&(s.value=!1,console.warn(`已经存在id为${t.id}的页签啦`))}),e.onUnmounted(()=>{});const d=e.computed(()=>(t==null?void 0:t.id)===(l==null?void 0:l.activeId.value)),u=e.computed(()=>({display:d.value?"":"none"}));e.watch(()=>t,b=>{l==null||l.updateTab({props:b,slots:n.slots})},{immediate:!0,deep:!0});function f(){var v,x;const b=(x=(v=n.slots).default)==null?void 0:x.call(v);return e.createVNode(Bn,{"main-title":t.title,class:"farris-tab-page"},zw(b)?b:{default:()=>[b]})}const g=e.computed(()=>({"farris-tab-page":!0,"drag-container":!0}));function m(){var v,x;const b=(x=(v=n.slots).default)==null?void 0:x.call(v);return e.createVNode("div",{ref:o,class:g.value,"data-dragref":`${a.schema.id}-container`,style:u.value},[b])}const y=new Map([["default",m],["one-page",f]]).get(c.value)||m;return()=>s.value?y():null}}),uf={install(t){t.component(co.name,co),t.component(mn.name,mn)},register(t,n,o){t.tabs=co,t["tab-page"]=mn,n.tabs=ec,n["tab-page"]=uc},registerDesigner(t,n,o){t.tabs=Ww,t["tab-page"]=Gw,n.tabs=ec,n["tab-page"]=uc}},Uw=e.defineComponent({name:"FTagsDesign",props:na,emits:["remove","selectionChange","change"],setup(t,n){const o=e.ref(t.selectable),a=e.ref(t.customClass),r=e.ref(t.data),i=e.ref(t.tagType),l=e.ref(t.tagStyle),s=e.ref(t.showColor),p=e.ref(t.activeTag),c=e.ref(t.customStyle),d=e.ref(t.showClose),u=e.ref(t.showAddButton),f=e.ref(t.showInput),g=e.ref(t.addButtonText),m=e.ref(t.enableAddButton);e.ref(t.placeholder),e.ref(""),e.ref();const h=e.ref(),y=e.ref(t.wrapText),b=e.ref(),v=e.ref(),x=e.inject("design-item-context"),C=ve(v,x);e.onMounted(()=>{v.value.componentInstance=C}),n.expose(C.value);function w(){const te=r.value.map(J=>({type:"Tag",payload:J}));return u.value&&te.push({type:"AddButton"}),te}const N=e.ref(w());function V(te){r.value=te,N.value=w()}const D=e.computed(()=>N.value.findIndex(te=>te.type==="Input")),k=cl(t,n,r,N),{dragstart:B,dragenter:$,dragover:T,dragend:S}=k;e.watch(()=>t.data,te=>V(te));const F=e.computed(()=>{const te={"farris-tags":!0,"farris-tags-checkable":o.value,"farris-tags-nowrap":!y.value};return a.value.split(" ").reduce((J,le)=>(J[le]=!0,J),te),te});function A(te){const J={"farris-tag-item":!0,"farris-tag-item-checked":o.value&&te.checked,"farris-tag-item-checkable":o.value,"farris-tag-item-has-color":s.value,"farris-tag-item-actived":p.value===te.name};if(i.value){const le=`farris-tag-item-${i.value}`;J[le]=!0}return J}const E=e.computed(()=>{const te={};return c.value&&c.value.split(";").reduce((J,le)=>{const fe=le.split(":");return J[fe[0]]=fe[1],J},te),te});function I(te,J){o.value&&J.selectable&&(J.checked=!J.checked,p.value=J.checked?J.name:"",J.checked&&r.value.filter(le=>le.name!==J.name).forEach(le=>{le.checked=!J.checked}),n.emit("change",r.value),n.emit("selectionChange",J))}function R(te,J){let le;switch(te.key){case"Backspace":r.value=r.value.filter(fe=>fe.name!==J.name),n.emit("change",r.value);break;case"ArrowLeft":le=Math.max(h.value.scrollLeft+20,0),h.value.scrollLeft=le;break;case"ArrowRight":le=Math.max(h.value.scrollLeft-20,0),h.value.scrollLeft=le}}function O(te,J){const le=r.value.findIndex(fe=>fe.name===J.name);if(le>-1){const[fe]=r.value.splice(le,1);N.value=w(),n.emit("change",r.value),n.emit("remove",r.value,fe,le)}te.stopPropagation()}const G=e.computed(()=>({"farris-tag-item":!0,"farris-tag-add-button":!0,"farris-tag-add-button-disabled":!m.value}));function M(te){}function j(){return e.createVNode("li",{class:G.value,onClick:te=>void 0},[e.createVNode("span",{class:"f-icon f-icon-amplification"},null),e.createVNode("span",{class:"farris-tag-add-text"},[g.value])])}function H(te){if(te&&!te.innerText){const J=D.value;if(J>0){const[le]=r.value.splice(J-1,1);N.value.splice(J-1,1),n.emit("remove",r.value,le,J-1)}}}function _(te,J,le){te>-1&&(r.value.splice(te,0,{name:J,value:le,selectable:o.value}),N.value=w(),n.emit("change",r.value))}function W(te){if(te&&te.innerText){const J=te.innerText,le=D.value;_(le,J,J),te.innerText=""}}function K(te){const J=te.target;J&&(J.innerText?W(J):n.emit("change",r.value))}function z(te){te.key==="Enter"&&W(te.target),te.key==="Backspace"&&(H(te.target),e.nextTick(()=>{b.value&&b.value.focus()}))}function q(){return e.createVNode("li",{class:"farris-tag-input-box"},[e.createVNode("div",{ref:b,class:"form-control",contenteditable:"true",onKeyup:z,onBlur:K},null)])}function L(te,J){return e.createVNode("li",{class:A(te),style:E.value,tabindex:0,id:te.name,key:te.name,onClick:le=>I(le,te),onKeydown:le=>R(le,te),draggable:"true",onDragstart:le=>B(le,te,J),onDragenter:le=>$(le,J),onDragend:le=>S(le,te),onDragover:le=>T(le,J)},[e.createVNode("div",{title:te.name,class:"tag-box"},[te.name]),d.value&&e.createVNode("span",{class:"tag-delete"},[e.createVNode("i",{class:"f-icon f-icon-close",onClick:le=>O(le,te)},null)])])}function X(){return N.value.map((te,J)=>{switch(te.type){case"Tag":return L(te.payload,J);case"AddButton":return j();case"Input":return q()}})}const U=e.computed(()=>({"farris-tags-item-container":!0,"farris-tag-item-capsule":l.value==="capsule"}));function Z(te){const J=Math.max(h.value.scrollLeft-te.deltaX,0);h.value.scrollLeft=J}function re(te){const J=h.value,le=r.value.length-1;if(J){const fe=Array.from(J.children).filter(Me=>Me.className.indexOf("farris-tag-item")>-1).findIndex(Me=>{const Ie=Me.getBoundingClientRect(),Le=window.getComputedStyle(Me),Ce=parseInt(Le["margin-left"],10)+Ie.width+parseInt(Le["margin-right"],10);return Ie.left+Ce>te});if(fe>-1)return fe}return le}function de(te){if(f.value){const le=re(te.clientX)+1,Me=N.value.filter(Ie=>Ie.type!=="Input");Me.splice(le,0,{type:"Input"}),N.value=Me,e.nextTick(()=>{b.value&&b.value.focus()})}}function ge(te){var le;te.preventDefault(),te.stopPropagation();const J=(le=te.dataTransfer)==null?void 0:le.getData("Text");if(J){const fe=J.split(":"),Me=fe[0],Ie=fe[1];[...r.value].findIndex(pe=>(console.log(`${pe.value} === ${Ie} is ${pe.value===Ie}`),pe.value===Ie))>-1||_(r.value.length,Me,Ie)}}function ie(te){te.preventDefault()}return()=>e.createVNode("div",{ref:v,class:F.value,onClick:de,onDrop:ge,onDragover:ie},[e.createVNode("ul",{ref:h,class:U.value,onWheel:te=>Z(te)},[X()])])}}),ff={install(t){t.component(Qn.name,Qn)},register(t,n,o){t.tags=Qn,n.tags=ll},registerDesigner(t,n,o){t.tags=Uw,n.tags=ll}},Yw=new Map([["appearance",xe]]);function Kw(t,n,o){return n}const Xw={title:"text",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Qw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/text.schema.json",title:"text",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for text",type:"string"},type:{description:"The type string of text",type:"string",default:"text"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},vi={modelValue:{type:[String,Number,Boolean],default:""},password:{type:Boolean,default:!1},textarea:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1},dateRange:{type:Boolean,default:!1},maxHeight:{type:Number,default:0},height:{type:Number,default:0},type:{type:String,default:"string"},format:{type:String,default:""},enumConvertedDatas:{default:void 0},groupSeparator:{type:String,default:","},decimalSeparator:{type:String,default:"."},decimalFilledSymbol:{type:String,default:"0"},numberOptions:{type:Object,default:void 0},amountExpression:{type:String,default:"%s%v"},textField:{type:String,default:"name"},valueField:{type:String,default:"value"},textAlign:{type:String,default:""},dateRangeDelimiter:{type:String,default:"~"},enumDelimiter:{type:String,default:","}},pf=me(vi,Qw,Yw,Kw,Xw);function Zw(t){let n;return/Y/g.test(t)===!0?n=t.replace(/Y/g,"y"):n=t,/D/g.test(n)===!0&&(n=n.replace(/D/g,"d")),n}function Jw(t,n,o,a,r){if(t==null||t==="")return"";if(n&&n.length){const i=(""+t).split(o),l=[];for(let s=0;s<i.length;s++){const p=n.find(c=>c[r]===i[s]);p?l.push(p[a]):l.push(i[s])}return l.length>0?l.join(o):""}return t}function mf(t,n){let o;return n||(n="YYYY-MM-DD"),n==="timeago"?pb().formatTo(t):(n==="hh:mm:ss"||n==="HH:mm:ss"?o=t:o=Ja().formatTo(t,Zw(n)),o)}function eN(t,n){return!t&&!n||n&&n.type&&n.type==="number"&&(n.formatter||(n.useThousands?n.precision!==void 0?t="n"+n.precision:t="n2":n.precision!==void 0?t="f"+n.precision:t="f2")),t}function tN(t){return t.replace(/[a-z]+/g,n=>n.toUpperCase())}function nN(t,n,o){return t.toString().indexOf(".")>-1?(console.warn("十进制转换仅限整型类型"),""):(Array(n).join(o)+t).slice(-n)}function oN(t,n){return Number(t*100).toFixed(Number(n))+"%"}function aN(t,n,o,a,r,i,l){if(!n&&!o)return t.toString();if(o&&o.type&&o.type==="number"&&o.formatter)return o.formatter(t);const s=tN(n.substring(0,1)),p=Number(n.substring(1)),c={};let d;if(!/C|D|F|N|P/g.test(s)){console.log(`不支持format为 ${n} 类型的数字格式化`);return}a&&Object.assign(c,{groupSeparator:a}),r&&Object.assign(c,{decimalSeparator:r}),i&&Object.assign(c,{format:i});const{formatTo:u}=ub();switch(s){case"C":Object.assign(c,{prefix:"¥",precision:p}),d=u(t,c);break;case"D":d=nN(t,p,l);break;case"F":Object.assign(c,{prefix:"",groupSeparator:"",precision:p}),d=u(t,c);break;case"N":Object.assign(c,{prefix:"",precision:p}),d=u(t,c);break;case"P":d=oN(t,p);break}return d}function rN(t){return t===!0?"是":t===!1||t==null||t===""||typeof t>"u"?"否":t}const xi=e.defineComponent({name:"FText",props:vi,emits:["update:modelValue","valueChange"],setup(t,n){const o=e.ref(t.textarea),a=e.ref(t.password),r=e.ref(t.autoSize),i=e.ref(t.dateRange),l=e.ref(t.type),s=e.ref(t.format),p=e.ref(),c=e.ref(),d=e.ref(""),u=e.computed(()=>({"f-form-control-text":!o.value,"f-form-context-textarea":o,"f-component-text-auto-size":r.value})),f=e.computed(()=>({"text-align":t.textAlign,height:!r.value&&t.height>0?`${t.height}px`:"","min-height":r.value&&t.height>0?`${t.height}px`:"","max-height":r.value&&t.maxHeight>0?`${t.maxHeight}px`:""}));e.onMounted(()=>{if(o.value){const y=c.value.parentElement.className;c.value.parentElement.className=y+" f-cmp-text-is-textarea"}});const g=e.computed(()=>{let y=m(t.modelValue);return p.value!=y&&(n.emit("valueChange",y),p.value=y),y});function m(y){if(a.value)return y?"******":"";if(l.value!=="boolean"&&(y==null||typeof y>"u"))return"";let b="";switch(l.value){case"string":b=y;break;case"date":case"datetime":if(!i.value)b=mf(y,s.value);else{let v=t.dateRangeDelimiter;const x=y.split(v);let C=[];x&&x.length&&x.forEach(w=>{C.push(mf(w,s.value))}),b=C.join(v)}break;case"number":s.value=eN(s.value,t.numberOptions),b=aN(y,s.value,t.numberOptions,t.groupSeparator,t.decimalSeparator,t.amountExpression,t.decimalFilledSymbol);break;case"enum":b=Jw(y,t.enumConvertedDatas,t.enumDelimiter,t.textField,t.valueField);break;case"boolean":b=rN(y);break}return b}function h(){const y=c.value;Math.abs(y.scrollWidth-y.clientWidth)>2||Math.abs(y.scrollHeight-y.clientHeight)>2?d.value=g.value:d.value=""}return e.watch(()=>t.modelValue,(y,b)=>{y!==b&&n.emit("update:modelValue",y)}),()=>e.createVNode("span",{class:u.value,style:f.value,ref:c,onMouseenter:()=>h(),title:d.value},[g.value])}}),iN=e.defineComponent({name:"FTextDesign",props:vi,emits:["update:modelValue"],setup(t,n){const o=e.ref(!0),a=e.ref(!0),r=e.ref(""),i=e.ref(0),l=e.ref(0),s=e.ref(t.modelValue),p=e.computed(()=>({"f-form-control-text":!o.value,"f-form-context-textarea":o,"f-component-text-auto-size":a.value})),c=e.computed(()=>({textalign:r.value,height:!a.value&&i.value>0?`${i.value}px`:"","min-height":!a.value&&i.value>0?`${i.value}px`:"","max-height":!a.value&&l.value>0?`${l.value}px`:""}));e.computed(()=>"");const d=e.ref(),u=e.inject("design-item-context"),f=ve(d,u);return e.onMounted(()=>{d.value.componentInstance=f}),n.expose(f.value),()=>e.createVNode("span",{ref:d,class:p.value,style:c.value},[s.value])}}),hf={install(t){t.component(xi.name,xi)},register(t,n,o){t.text=xi,n.text=pf},registerDesigner(t,n,o){t.text=iN,n.text=pf}},sN=new Map([["appearance",xe]]),lN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/time-picker.schema.json",title:"time-picker",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a time picker",type:"string"},type:{description:"The type string of time picker component",type:"string",default:"time-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function cN(t,n,o){return n}const dN={title:"time-picker",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Ci={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},popupClassName:{type:String,default:""},placeholder:{type:String,default:""},defaultOpenValue:{type:Date,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},hideDisabledElements:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0}},gf=me(Ci,lN,sN,cN,dN),uN={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},defaultOpenValue:{type:Date,default:null},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},hideDisabledElements:{type:Boolean,default:!1}};function Qe(t){return typeof t<"u"&&t!==null}function yf(t,n="hh:mm:ss"){if(!(!t||!n))return n.indexOf("ss")===-1&&t.split(":").length===3&&(n=n+":ss"),n.indexOf("A")>-1?(n=n.replace(/A/g,"a"),Gc(t.toLowerCase(),n,new Date)):Gc(t,n,new Date)}function bf(t,n="hh:mm:ss",o="AM"){return!t||isNaN(t.getTime())?"":n.indexOf("A")>-1?(n=n.replace(/A/g,"a"),vn(t,n).toUpperCase()):vn(t,n)}function vf(t,n){let o=t||"hh:mm:ss";return n?(o=o?o.replace(/H/g,"h"):"hh:mm:ss a",o.indexOf("a")===-1&&o.indexOf("A")===-1&&(o=o+" a")):o=o?o.replace(/h/g,"H"):"HH:mm:ss",o}class fN{constructor(){P(this,"hourStep",1);P(this,"minuteStep",1);P(this,"secondStep",1);P(this,"use12Hours",!1);P(this,"changedValue",e.ref({text:"",value:void 0}));P(this,"format","HH:mm:ss");P(this,"temporaryHours");P(this,"temporaryMinutes");P(this,"temporarySeconds");P(this,"temporaryText","");P(this,"temporaryValue");P(this,"temporarySelected12Hours");P(this,"temporaryDefaultOpenValue",new Date)}get hours(){return this.temporaryHours}set hours(n){n!==this.temporaryHours&&(this.use12Hours?this.selected12Hours==="PM"&&n!==12?this.temporaryHours=n+12:this.selected12Hours==="AM"&&n===12?this.temporaryHours=0:this.temporaryHours=n:this.temporaryHours=n,this.update())}get realHours(){return this.temporaryHours}get viewHours(){return this.use12Hours&&Qe(this.temporaryHours)?this.calculateViewHour(this.temporaryHours):this.temporaryHours}get minutes(){return this.temporaryMinutes}set minutes(n){n!==this.temporaryMinutes&&(this.temporaryMinutes=n,this.update())}get seconds(){return this.temporarySeconds}set seconds(n){n!==this.temporarySeconds&&(this.temporarySeconds=n,this.update())}get defaultHours(){return this.defaultOpenValue.getHours()}get defaultViewHours(){const n=this.defaultOpenValue.getHours();return this.use12Hours&&Qe(n)?this.calculateViewHour(n):n}get defaultRealHours(){return this.defaultOpenValue.getHours()}get defaultMinutes(){return this.defaultOpenValue.getMinutes()}get defaultSeconds(){return this.defaultOpenValue.getSeconds()}get default12Hours(){return this.defaultOpenValue.getHours()>=12?"PM":"AM"}get text(){return this.temporaryText}set text(n){n!==this.temporaryText&&(this.temporaryText=n)}get value(){return this.temporaryValue}set value(n){n!==this.temporaryValue&&(this.temporaryValue=n,Qe(this.temporaryValue)&&qa(this.temporaryValue)?(this.temporaryHours=this.temporaryValue.getHours(),this.temporaryMinutes=this.temporaryValue.getMinutes(),this.temporarySeconds=this.temporaryValue.getSeconds(),this.use12Hours&&Qe(this.temporaryHours)&&(this.temporarySelected12Hours=this.temporaryHours>=12?"PM":"AM")):this.clearTimeValue())}get selected12Hours(){return this.temporarySelected12Hours}set selected12Hours(n){n.toUpperCase()!==this.temporarySelected12Hours&&(this.temporarySelected12Hours=n.toUpperCase(),this.update())}get defaultOpenValue(){return this.temporaryDefaultOpenValue.setHours(this.setValueByStep(this.temporaryDefaultOpenValue.getHours(),this.hourStep)),this.temporaryDefaultOpenValue.setMinutes(this.setValueByStep(this.temporaryDefaultOpenValue.getMinutes(),this.minuteStep)),this.temporaryDefaultOpenValue.setSeconds(this.setValueByStep(this.temporaryDefaultOpenValue.getSeconds(),this.secondStep)),this.temporaryDefaultOpenValue}set defaultOpenValue(n){this.temporaryDefaultOpenValue!==n&&(this.temporaryDefaultOpenValue=n,this.update())}get isEmpty(){return!(Qe(this.temporaryHours)||Qe(this.temporaryMinutes)||Qe(this.temporarySeconds))}setFormat(n){this.format=n}setHours(n,o){return o?this:(this.setDefaultValueIfNil(),this.hours=n,this)}setUse12Hours(n){return this.use12Hours=n,this}setMinutes(n,o){return o?this:(this.setDefaultValueIfNil(),this.minutes=n,this)}setSeconds(n,o){return o?this:(this.setDefaultValueIfNil(),this.seconds=n,this)}setValue(n,o){return Qe(o)&&(this.use12Hours=o),this.value=n,this}setValueByStep(n,o){let a=Math.floor(n/o);const r=n%o,i=o/2;return a=r>i?a+1:a,o*a}setDefaultOpenValue(n){return this.defaultOpenValue=n,this}setDefaultValueIfNil(){Qe(this.temporaryValue)||(this.temporaryValue=new Date(this.defaultOpenValue))}update(){this.isEmpty?this.temporaryValue=void 0:(Qe(this.temporaryHours)?this.temporaryValue.setHours(this.hours):this.temporaryHours=this.defaultHours,Qe(this.temporaryMinutes)?this.temporaryValue.setMinutes(this.minutes):this.temporaryMinutes=this.defaultMinutes,Qe(this.temporarySeconds)?this.temporaryValue.setSeconds(this.seconds):this.temporarySeconds=this.defaultSeconds,this.use12Hours&&(Qe(this.temporarySelected12Hours)||(this.temporarySelected12Hours=this.default12Hours),this.selected12Hours==="PM"&&this.temporaryHours<12&&(this.temporaryHours+=12,this.temporaryValue.setHours(this.temporaryHours)),this.selected12Hours==="AM"&&this.temporaryHours>=12&&(this.temporaryHours-=12,this.temporaryValue.setHours(this.temporaryHours))),this.temporaryValue=new Date(this.temporaryValue),this.text=bf(this.temporaryValue,this.format,this.selected12Hours),this.changedValue.value={text:this.text,value:this.temporaryValue})}clearTimeValue(){this.temporaryHours=void 0,this.temporaryMinutes=void 0,this.temporarySeconds=void 0,this.temporarySelected12Hours=void 0,this.temporaryValue=void 0}clear(){this.clearTimeValue(),this.update()}calculateViewHour(n){const o=this.temporarySelected12Hours||this.default12Hours;return o==="PM"&&n>12?n-12:o==="AM"&&n===0?12:n}}function pN(t,n,o,a,r,i){function l(d,u,f=0,g,m){const h=s(u,g,m),y=d.children[0].children[h]||d.children[0].children[0];p(d,y.offsetTop,f)}function s(d,u,f){if(u==="hour"){const g=t.disabledHours&&t.disabledHours();return c(g,o.value.map(m=>m.index).indexOf(d))}if(u==="minute"){const g=t.disabledMinutes&&t.disabledMinutes(f.hours);return c(g,a.value.map(m=>m.index).indexOf(d))}if(u==="second"){const g=t.disabledSeconds&&t.disabledSeconds(f.hours,f.minutes);return c(g,r.value.map(m=>m.index).indexOf(d))}return c([],i.value.map(g=>g.index).indexOf(d))}function p(d,u,f){if(f<=0){d.scrollTop=u;return}const m=(u-d.scrollTop)/f*10;yb(()=>{d.scrollTop+=m,d.scrollTop!==u&&p(d,u,f-10)})}function c(d,u){return d&&d.length&&t.hideDisabledElements?u-d.reduce((f,g)=>f+(g<u?1:0),0):u}return{scrollToSelected:l}}function mN(t,n){function o(s){return s.index===t.viewHours||!Qe(t.viewHours)&&s.index===t.defaultViewHours}function a(s){return s.index===t.minutes||!Qe(t.minutes)&&s.index===t.defaultMinutes}function r(s){return s.index===t.seconds||!Qe(t.seconds)&&s.index===t.defaultSeconds}function i(s){return s.value.toUpperCase()===t.selected12Hours||!Qe(t.selected12Hours)&&s.value.toUpperCase()===t.default12Hours}function l(s,p){let c="";const d=` ${n}-select-option-selected `,u=` ${n}-select-option-disabled `;let f=!1;return p==="hour"?f=o(s):p==="minute"?f=a(s):p==="second"?f=r(s):f=i(s),f&&(c+=d),p==="12-hour"||s.disabled&&(c+=u),c}return{getSelectedClass:l}}const wi=e.defineComponent({name:"FTimePickerTimeView",props:uN,emits:["valueChange","formatedValueChange"],setup(t,n){const o="time-picker-panel",a=e.ref(0),r=e.ref([]),i=e.ref([]),l=e.ref([]),s=e.ref([]),p=e.ref(),c=e.ref(),d=e.ref(),u=e.ref(),f=new fN,{scrollToSelected:g}=pN(t,n,r,i,l,s),{getSelectedClass:m}=mN(f,o),h=e.ref(t.hourStep),y=e.ref(t.minuteStep),b=e.ref(t.secondStep),v=e.ref(),x=e.ref(""),C=e.ref(),w=e.ref(t.hideDisabledElements),N=e.ref(0);e.watch(()=>t.defaultOpenValue,z=>{Qe(z)&&(v.value=z)}),e.watch(v,z=>{Qe(z)&&f.setDefaultOpenValue(z)}),v.value=t.defaultOpenValue,e.watch(f.changedValue,z=>{n.emit("valueChange",z)}),e.watch(()=>t.modelValue,z=>{V(z)}),e.watch(()=>t.format,z=>{Qe(z)?x.value=z:x.value="HH:mm:ss"}),e.watch(x,z=>{Qe(z)&&(f.setFormat(x.value),N.value=0,T.value&&N.value++,S.value&&N.value++,F.value&&N.value++,C.value&&(N.value++,G()),a.value=N.value*66)}),e.watch(()=>t.use12Hours,z=>{C.value=z}),e.watch(C,z=>{x.value=vf(x.value,z),f.setUse12Hours(z)}),e.watch(()=>t.disabledHours,()=>{I()}),e.watch(()=>t.disabledMinutes,()=>{R()}),e.watch(()=>t.disabledSeconds,()=>{O()});function V(z){if(Qe(z)){f.text=z;const q=yf(f.text,x.value);f.setValue(q,C.value),W()}else f.setUse12Hours(C.value)}function D(){let z=[];return t.disabledHours&&(z=t.disabledHours(),C.value&&(f.selected12Hours==="PM"?z=z.filter(q=>q>=12).map(q=>q>12?q-12:q):z=z.filter(q=>q<12||q===24).map(q=>q===24||q===0?12:q))),z}function k(z="hour"){return x.value?x.value.indexOf(z[0].toUpperCase())>-1||x.value.indexOf(z[0].toLowerCase())>-1:!1}const B=e.computed(()=>({"time-picker-panel":!0,"time-picker-panel-column-3":!0,"time-picker-panel-placement-bottomLeft":!0,"f-area-show":!0})),$=e.computed(()=>({width:C.value?`${a.value}px`:"100%"})),T=e.computed(()=>k("hour")),S=e.computed(()=>k("minute")),F=e.computed(()=>k("second"));function A(z,q=1,L=0){return q=Math.ceil(q),new Array(Math.ceil(z/q)).fill(0).map((X,U)=>(U+L)*q)}function E(){if(T.value&&p.value&&g(p.value,Qe(f.viewHours)?f.viewHours:f.defaultViewHours,0,"hour",f),S.value&&c.value&&g(c.value,Qe(f.minutes)?f.minutes:f.defaultMinutes,0,"minute",f),F.value&&d.value&&g(d.value,Qe(f.seconds)?f.seconds:f.defaultSeconds,0,"second",f),C.value&&u.value){const q=(Qe(f.selected12Hours)?f.selected12Hours:f.default12Hours)==="AM"?0:1;g(u.value,q,0,"12-hour",f)}}function I(){let z=24,q=0;C.value&&(z=12,q=1);const L=D();if(r.value=A(z,h.value,q).map(X=>({index:X,disabled:L.length>0&&L.indexOf(X)!==-1})),C.value&&r.value[r.value.length-1].index===12){const X=[...r.value];X.unshift(X[X.length-1]),X.splice(X.length-1,1),r.value=X}r.value=r.value.filter(X=>!(w.value&&X.disabled))}function R(){i.value=A(60,y.value).map(z=>({index:z,disabled:!!t.disabledMinutes&&t.disabledMinutes(f.hours).indexOf(z)!==-1})),i.value=i.value.filter(z=>!(w.value&&z.disabled))}function O(){l.value=A(60,b.value).map(z=>({index:z,disabled:!!t.disabledSeconds&&t.disabledSeconds(f.hours,f.minutes).indexOf(z)!==-1})),l.value=l.value.filter(z=>!(w.value&&z.disabled))}function G(){const z=x.value.includes("A");s.value=[{index:0,value:z?"AM":"am"},{index:1,value:z?"PM":"pm"}],s.value=s.value.filter(()=>!w.value)}function M(z,q){if(z.stopPropagation(),f.setHours(q.index,q.disabled),!q.disabled){if(g(p.value,q.index,120,"hour",f),t.disabledMinutes!==null){R();const L=i.value.filter(X=>!X.disabled);if(!L.find(X=>X.index===f.minutes)){const{index:X,disabled:U}=L[0];f.setMinutes(X,U)}}(t.disabledSeconds!==null||t.disabledMinutes!==null)&&O()}}function j(z,q){z.stopPropagation(),f.selected12Hours=q.value,I(),R(),O(),g(u.value,q.index,120,"12-hour",f)}function H(z,q){if(z.stopPropagation(),f.setMinutes(q.index,q.disabled),!q.disabled&&(g(c.value,q.index,120,"minute",f),t.disabledSeconds!==null)){O();const L=l.value.filter(X=>!X.disabled);if(!L.find(X=>X.index===f.seconds)){const{index:X,disabled:U}=L[0];f.setSeconds(X,U)}}}function _(z,q){z.stopPropagation(),f.setSeconds(q.index,q.disabled),!q.disabled&&g(d.value,q.index,120,"second",f)}function W(){I(),R(),O(),G()}e.onMounted(()=>{x.value=t.format,C.value=t.use12Hours,V(t.modelValue),W(),setTimeout(()=>{E()},10)});function K(){return t.showHeader?e.createVNode("div",{class:o+"-combobox time-picker-panel-header",style:$.value},[T.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"+S.value?"time-header-split":""},[e.createTextVNode("时")])])]),S.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"+F.value?"time-header-split":""},[e.createTextVNode("分")])])]),F.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"},[e.createTextVNode("秒")])])]),t.use12Hours&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"},null)])])]):null}return()=>e.createVNode("div",{class:B.value},[e.createVNode("div",{class:"farris-timer-picker"},[e.createVNode("div",{class:o+"-inner"},[K(),e.createVNode("div",{class:o+"-combobox",style:$.value},[T.value&&e.createVNode("div",{class:o+"-select",ref:p},[e.createVNode("ul",null,[r.value.map(z=>e.createVNode("li",{class:m(z,"hour"),onClick:q=>M(q,z)},[`${z.index}`]))])]),S.value&&e.createVNode("div",{class:o+"-select",ref:c},[e.createVNode("ul",null,[i.value.map(z=>e.createVNode("li",{class:m(z,"minute"),onClick:q=>H(q,z)},[`${z.index}`]))])]),F.value&&e.createVNode("div",{class:o+"-select",ref:d},[e.createVNode("ul",null,[l.value.map(z=>e.createVNode("li",{class:m(z,"second"),onClick:q=>_(q,z)},[`${z.index}`]))])]),C.value&&e.createVNode("div",{class:o+"-select",ref:u},[e.createVNode("ul",null,[s.value.map(z=>e.createVNode("li",{class:m(z,"12-hour"),onClick:q=>j(q,z)},[`${z.value}`]))])])])])])])}}),Ni=e.defineComponent({name:"FTimePicker",props:Ci,emits:["update:modelValue","valueChange","clear"],setup(t,n){const o='<span class="f-icon f-icon-timepicker"></span>',a=e.ref(t.modelValue),r=e.ref(null),i=e.ref(),l=e.computed(()=>vf(t.format,t.use12Hours));function s(){a.value="",n.emit("clear")}function p(){if(a.value){const u=yf(a.value,l.value);a.value=bf(u,l.value)}}function c(){p()}function d(u){a.value=u.text}return p(),e.watch(()=>t.modelValue,u=>{a.value=u}),e.watch(a,u=>{n.emit("valueChange",u)}),()=>e.createVNode(yt,{ref:r,modelValue:a.value,"onUpdate:modelValue":u=>a.value=u,disable:t.disable,readonly:t.readonly,editable:t.editable,buttonContent:o,placeholder:t.placeholder,enableClear:!0,onClear:s,onBlur:c},{default:()=>[e.createVNode(wi,e.mergeProps({ref:i},t,{onValueChange:d}),null)]})}}),hN=e.defineComponent({name:"FTimePickerDesign",props:Ci,emits:["datePicked","update:modelValue"],setup(t,n){const o='<span class="f-icon f-icon-timepicker"></span>',a=e.ref(t.modelValue),r=e.ref(),i=e.ref(),l=e.inject("design-item-context"),s=ve(i,l);e.onMounted(()=>{i.value.componentInstance=s}),n.expose(s.value);function p(){}return()=>e.createVNode("div",{ref:i},[e.createVNode(yt,{ref:r,modelValue:a.value,"onUpdate:modelValue":c=>a.value=c,buttonContent:o,enableClear:!0,onClickButton:()=>void 0},{default:()=>[e.createVNode(e.resolveComponent("f-time-picker-time-view"),null,null)]})])}}),xf={install(t){t.component(Ni.name,Ni).component(wi.name,wi)},register(t,n,o){t["time-picker"]=Ni,n["time-picker"]=gf},registerDesigner(t,n,o){t["time-picker"]=hN,n["time-picker"]=gf}},gN=e.defineComponent({name:"FTransferDesign",props:Ba,emits:["change"],setup(t,n){const o=e.ref(t.identifyField),a=e.ref("已选:"),r=e.ref("项数据"),i=e.ref(t.displayType),l=e.ref(!1),s=e.ref(t.dataSource),p=e.ref(t.selections||[]),c=e.computed(()=>p.value.map(B=>B[o.value])),d=new Map;function u(){const B=new Map,$=t.selectionValues||[];$.length&&$.reduce((S,F)=>(S.set(F,!0),S),B);const T=t.selections||[];T.length&&(B.clear(),T.reduce((S,F)=>(S.set(F[o.value],!0),S),B)),p.value.length||(p.value=s.value.filter(S=>B.has(S[o.value])).map(S=>Object.assign({},S))),s.value.forEach(S=>{const F=S[o.value],A=B.has(F);S.checked=A,A&&d.set(F,S)})}u();const f=e.computed(()=>i.value==="List"),g=e.computed(()=>i.value==="Tree");function m(B){p.value=B.map($=>Object.assign({},$)),n.emit("change",p.value)}function h(){return e.createVNode(kt,{class:"f-utils-fill",data:s.value,"multi-select":!0,draggable:!1,header:"Search",headerClass:"transfer-search-box","selection-values":c.value,onSelectionChange:m},{default:()=>[e.createTextVNode(" ")]})}function y(){return e.createVNode(e.Fragment,null,null)}function b(){return e.createVNode("div",{class:"f-utils-fill option-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column option-pane-content f-utils-fill"},[e.createVNode("div",{class:"container columns-box d-flex f-utils-fill"},[f.value&&h(),g.value&&y()])])])}function v(B){const $=B[o.value];if($!==null||$!==void 0){p.value=p.value.filter(S=>S[o.value]!==$);const T=d.get($);T&&(T.checked=!1,d.delete($)),n.emit("change",p.value)}}function x(B){const $=new Map;p.value.reduce((T,S)=>(T.set(S[o.value],S),T),$),p.value=B.map(T=>$.get(T[o.value])),n.emit("change",p.value)}function C(){return e.createVNode(kt,{style:"flex:1",data:p.value,draggable:!0,view:"DraggableView","keep-order":!0,onChange:x,onRemoveItem:v},{default:()=>[e.createTextVNode(" ")]})}function w(){return e.createVNode("div",{class:"f-utils-fill selection-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column selection-pane-content f-utils-fill"},[e.createVNode("div",{class:"selection-pane-title"},[e.createVNode("span",{class:"selection-title"},[a.value]),e.createVNode("span",{class:"selection-count"},[p.value&&p.value.length]),e.createVNode("span",{class:"selection-item-title"},[r.value])]),e.createVNode("div",{class:"container columns-box f-utils-fill d-flex"},[C()])])])}const N=e.computed(()=>({transfer:!0,row:!0,"f-utils-fill":l.value})),V=e.ref(),D=e.inject("design-item-context"),k=ve(V,D);return e.onMounted(()=>{V.value.componentInstance=k}),n.expose(k.value),()=>e.createVNode("div",{ref:V,class:N.value,style:"height:480px"},[b(),w()])}}),Cf={install(t){t.component(Dn.name,Dn)},register(t,n,o){t.transfer=Dn,n.transfer=Jl},registerDesigner(t,n,o){t.transfer=gN,n.transfer=Jl}},yN=new Map([["appearance",xe]]);function bN(t,n,o){return n}const vN={title:"tree-view",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},xN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-view.schema.json",title:"tree-view",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for tree-view",type:"string"},type:{description:"The type string of tree-view",type:"string",default:"tree-view"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Vi={columns:{type:Array,default:[{field:"name",title:"",dataType:"string"}]},displayField:{type:String,default:"name",require:!0},showLines:{type:Boolean,default:!1},data:{type:Object,default:[]},disable:{type:Boolean,default:!1},fit:{type:Boolean,default:!1},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},pagination:{type:Object,default:{enable:!0,size:-1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showTreeNodeIcons:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},iconField:{type:String,default:""},width:{type:Number,default:-1},newDataItem:{type:[Function,Object],default:()=>{}},lineColor:{type:String,default:"#9399a0"},cellHeight:{type:Number,default:28},onOutputValue:{type:Function,default:()=>{}},onCurrentEvent:{type:Function,default:()=>{}},hierarchy:{type:Object,default:{cascadeOption:{autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},rowOption:{type:Object}},wf=me(Vi,xN,yN,bN,vN);function Nf(t,n,o,a,r,i,l,s,p,c,d,u,f){const{calculateCellPositionInRow:g}=a,{columnContext:m}=r,{gridDataStyle:h}=f,{renderDataRow:y}=Lp(t,n,m,o,i,l,s,p,c,d);function b(){const x=g(m.value.primaryColumns);return o.value.filter(C=>C.visible!==!1).map(C=>y(C,x))}function v(){return e.createVNode("div",{class:"fv-tree-data",style:h.value},[b()])}return{renderTreeArea:v}}function CN(t,n,o,a){var h,y,b,v,x,C;const{idField:r}=o,i=e.ref(((y=(h=t.hierarchy)==null?void 0:h.cascadeOption)==null?void 0:y.autoCheckChildren)||!1),l=e.ref(((v=(b=t.hierarchy)==null?void 0:b.cascadeOption)==null?void 0:v.autoCheckParent)||!1),s=e.ref(((C=(x=t.hierarchy)==null?void 0:x.cascadeOption)==null?void 0:C.selectionRange)||"All");e.watch(()=>{var w;return(w=t.hierarchy)==null?void 0:w.cascadeOption},w=>{i.value=w?!!w.autoCheckChildren:!1,l.value=w?!!w.autoCheckParent:!1,s.value=w?w.selectionRange:"All"});function p(w,N){for(let V=0;V<N.length;V++)if(!w.includes(N[V]))return!1;return!0}function c(w,N){return w.filter(D=>N.indexOf(D)===-1)}const d=e.computed(()=>s.value==="OnlyParent"),u=e.computed(()=>s.value==="OnlyChildren");function f(w,N){let V=w;const D=n.value[N],k=D.raw[r.value],B=Array.from(D.raw.__fv_descendant_index__).map(E=>n.value[E]),$=B.map(E=>E.raw[r.value]),T=p(w,$),S=p(w,[k]);return S&&T&&d.value&&(V=c(w,$),B.forEach(E=>{E.disable=!0})),S&&T&&u.value&&(V=c(w,[k]),B.forEach(E=>{E.disable=!0})),V}function g(w,N){let V=w;const D=N[r.value],k=Array.from(N.__fv_children_index__).map(A=>n.value[A]),B=k.map(A=>A.raw[r.value]),$=p(w,B),T=p(w,[N[r.value]]);return T&&$&&d.value&&(V=c(w,B),k.forEach(A=>{A.disable=!0})),T&&$&&u.value&&(V=c(w,[D]),k.forEach(A=>{A.disable=!0})),V}function m(w,N){let V=w.map($=>$[r.value]);return N.__fv_parent_index__>0&&(V=f(V,N.__fv_parent_index__)),N.__fv_children_index__.length>0&&(V=g(V,N)),w.filter($=>V.includes($[r.value]))}return{autoCheckChildren:i,autoCheckParent:l,interactAfterCheckHierarchyItem:m}}function Si(t,n,o,a,r){const{select:i,unSelect:l,indeterminate:s,getSelectedItems:p}=a,{autoCheckChildren:c,autoCheckParent:d,interactAfterCheckHierarchyItem:u}=CN(t,n,o),{idField:f}=o;function g(){return n.value.filter(N=>!!N.checked).map(N=>N.raw.__fv_index__)}function m(N,V){return N.filter(k=>V.indexOf(k)===-1)}function h(N){const V=g();N.raw.__fv_children_index__.some(k=>V.includes(k))&&!!N.checked!==!0&&s(N)}function y(N){let V=N.raw.__fv_parent_index__;for(;V!==void 0;){const D=g(),k=n.value[V],B=m(k.raw.__fv_children_index__,D);B.length===k.raw.__fv_children_index__.length&&B.length!==0?l(k):B.length===0?d.value&&i(k):B.length<k.raw.__fv_children_index__.length&&k.checked!==!0&&s(k),V=k.raw.__fv_parent_index__}}function b(N){const V=!!N.checked;c.value&&N.raw.__fv_children_index__.map(D=>n.value[D]).forEach(D=>{V?i(D):l(D)})}function v(N){b(N),y(N);const V=N.raw;let D=p();D=u(D,V),h(N),r.emit("selectionChange",D)}function x(N,V){let D=-1;if(N.raw.__fv_parent_index__>-1){const T=n.value[N.raw.__fv_parent_index__].raw.__fv_descendant_index__,S=T.length>1,F=T.findIndex(E=>E===V),A=F===T.length-1;D=S?A?T[F-1]:T[F+1]:-1}return D>-1?n.value[D]:null}function C(N){return N.raw.__fv_parent_index__>-1?n.value[N.raw.__fv_parent_index__]:null}function w(N){const V=n.value[N];if(!V)return null;const D=x(V,N),B=D!==null?D:C(V);return B?B.raw[f.value]:null}return{getNextSelectableHierarchyItemId:w,toggleSelectHierarchyItem:v}}const $i=e.defineComponent({name:"FTreeView",props:Vi,emits:["outputValue","currentEvent","selectionChange"],setup(t,n){const o=e.ref(),a=e.ref(!1),r=e.ref([]),i=on(t),l=Zt(t),s=Qt(t,new Map,l,i),p=an(t,s,i,r,n),c=Si(t,r,i,p,n),d=e.computed(()=>({"fv-tree":!0})),u=e.computed(()=>({"fv-tree-content":!0})),{containerStyleObject:f}=Ln(t);function g(_){}function m(){return[]}function h(){return[]}const y=e.ref(t.columns),b=Wn(t),{columnContext:v}=b,x=0,C=e.computed(()=>s.dataView.value.length),w=nn(t,i),N=Lt(),V=en(t,{},N),D=tn(t,w,l,i,N,V),k=Jt(t,y,s,C,x,D),{getVisualData:B}=k,$=xn(t,v);r.value=B(0,C.value+x-1);const T=zn(t,n,p,i),S=qn(t,s,r,v,k,C,x,e.ref(0)),{renderTreeArea:F}=Nf(t,n,r,$,b,s,w,l,T,p,c,k,S);function A(){const _=p.getSelectionRow();return _?_.dataIndex-1:-1}function E(){const _=A();s.insertNewDataItem(_),r.value=B(0,C.value+x-1)}function I(){const _=A();s.insertNewChildDataItem(_),r.value=B(0,C.value+x-1)}function R(){const _=A(),W=c.getNextSelectableHierarchyItemId(_);s.removeHierarchyDataItem(_),r.value=B(0,C.value+x-1),W&&p.selectItemById(W)}function O(_,W){s.editDataItem(_,W),r.value=B(0,C.value+x-1)}function G(){}function M(){}function j(_){if(_>-1){const W=r.value[_];p.selectItem(W)}}function H(_){if(_){const W=p.getSelectionRow();if(s.load(_),r.value=B(0,C.value+x-1),W&&W.raw&&W.raw.originalId){const K=_.findIndex(z=>z.originalId===W.raw.originalId);K>-1&&j(K)}}}return n.expose({addNewDataItem:E,addNewChildDataItem:I,removeDataItem:R,editDataItem:O,acceptDataItem:G,cancelDataItem:M,selectItem:j,updateDataSource:H}),e.watch(()=>[t.data],([_])=>{const W=p.getSelectionRow();if(s.load(_),r.value=B(0,C.value+x-1),W&&W.raw&&W.raw.originalId){const K=_.findIndex(z=>z.originalId===W.raw.originalId);K>-1&&j(K)}}),()=>e.createVNode("div",{class:d.value,style:f.value,onWheel:g},[e.createVNode("div",{ref:o,class:u.value,onMouseover:()=>{a.value=!0},onMouseleave:()=>{a.value=!1}},[F(),m(),h()])])}}),wN=e.defineComponent({name:"FTreeViewDesign",props:Vi,emits:["outputValue","currentEvent","selectionChange"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);e.ref(t.idField);const i=e.ref(),l=e.ref(!1),s=e.ref([]),p=Zt(t),c=on(t),d=Qt(t,new Map,p,c),u=an(t,d,c,s,n),f=Si(t,s,c,u,n),g=e.computed(()=>({"fv-tree":!0})),m=e.computed(()=>({"fv-tree-content":!0})),{containerStyleObject:h}=Ln(t);function y(R){}function b(){return[]}function v(){return[]}const x=e.ref(t.columns),C=Wn(t),{columnContext:w}=C,N=0,V=e.computed(()=>d.dataView.value.length),D=nn(t,c),k=Lt(),B=en(t,{},k),$=tn(t,D,p,c,k,B),T=Jt(t,x,d,V,N,$),{getVisualData:S}=T,F=xn(t,w);s.value=S(0,V.value+N-1);const A=zn(t,n,u,c),E=qn(t,d,s,w,T,V,N,e.ref(0)),{renderTreeArea:I}=Nf(t,n,s,F,C,d,D,p,A,u,f,T,E);return n.expose(r.value),()=>e.createVNode("div",{class:g.value,style:h.value,onWheel:y},[e.createVNode("div",{ref:i,class:m.value,onMouseover:()=>{l.value=!0},onMouseleave:()=>{l.value=!1}},[I(),b(),v()])])}}),Vf={install(t){t.component($i.name,$i)},register(t,n,o){t["tree-view"]=$i,n["tree-view"]=wf},registerDesigner(t,n,o){t["tree-view"]=wN,n["tree-view"]=wf}},NN={checked:{type:Boolean,default:!1},id:{type:String,default:""},disabled:{type:Boolean,default:!1}},VN={showInfo:{type:Boolean,default:!0},status:{type:String,default:"normal"},percent:{type:Number,default:0},maxWidth:{type:Number,default:0}},SN={selectText:{type:String,default:"选择文件"},disabled:{type:Boolean,default:!1},enableMulti:{type:Boolean,default:!0},accept:{type:String,default:"*"},options:{type:Object,default:{}},uploadedCount:{type:Number,default:0},extendConfig:{type:Object,default:{}},uploadServerToken:{type:String,default:""}},$N=e.defineComponent({name:"FUploadProgress",props:VN,setup(t,n){const{showInfo:o,status:a,maxWidth:r,percent:i}=e.toRefs(t);return()=>e.createVNode("div",{class:["f-progress upload-progress","upload-progress-status-"+a.value,"f-progress-status-"+a.value,"upload-progress-line",o.value?"upload-progress-show-info":""]},[e.createVNode("div",{class:"upload-progress-outer",style:{"max-width":r.value>0?r.value+"px":"auto"}},[e.createVNode("div",{class:"upload-progress-inner"},[e.createVNode("div",{class:"upload-progress-bg f-progress-bg",style:{width:i.value+"%"}},null)])]),o.value?e.createVNode("span",{class:"upload-progress-text"},[a.value==="error"||a.value==="success"?e.createVNode("span",{class:["upload-progress-text-icon f-icon","f-icon-"+a.value]},null):e.createVNode(e.Fragment,null,[i.value,e.createTextVNode("%")])]):""])}}),Sf=e.defineComponent({name:"FPreviewCheckbox",props:NN,emits:["checkedChange"],setup(t,n){const{disabled:o}=e.toRefs(t),a=e.ref(t.checked),r=i=>{i.stopPropagation(),o.value||(a.value=!a.value,n.emit("checkedChange",{checked:a.value,id:t.id}))};return e.watch(()=>t.checked,i=>{a.value=i}),()=>e.createVNode("div",{class:"preview-checkbox d-inline-flex align-middle"},[e.createVNode("div",{class:"custom-control custom-checkbox f-checkradio-single m-0"},[e.createVNode("input",{title:"custom-control-input",class:"custom-control-input",type:"checkbox",disabled:o.value,checked:a.value},null),e.createVNode("label",{class:"custom-control-label",onClick:i=>r(i),onMousedown:i=>i.stopPropagation()},null)])])}});var Mt=(t=>(t[t.Queue=0]="Queue",t[t.Uploading=1]="Uploading",t[t.Done=2]="Done",t[t.Cancelled=3]="Cancelled",t[t.Remove=4]="Remove",t[t.Error=5]="Error",t))(Mt||{});class DN{constructor(n={},o={}){P(this,"uploadConfig");P(this,"removeConfig");const a={type:"config",url:"",timeout:0,headers:null,data:{}};this.uploadConfig=Object.assign({},a,n),this.removeConfig=Object.assign({},a,o)}}function Di(t,n){const{formatTo:o}=Ja();return o(t,n)}function $f(t,n){if(!n)return"";let o="";return t.indexOf(".")===-1&&n.hasOwnProperty(t)?o=n[t]:o=t.split(".").reduce((a,r)=>a?a[r]:null,n),o}function kN(t){return(n,o)=>{if(!n.hasOwnProperty(t)||n[t]===void 0||n[t]===null)return 1;if(!o.hasOwnProperty(t)||o[t]===void 0||o[t]===null)return-1;if(t!=="createTime"){let i="",l="";return t.indexOf(".")>-1?(i=$f(t,n),l=$f(t,o)):(i=n[t],l=o[t]),i>l?1:-1}const a=new Date(n[t]),r=new Date(o[t]);return a.getTime()>r.getTime()?-1:1}}function Df(t){return(t||[]).findIndex(o=>o==="*")===-1}function kf(t){return t!=="0 Byte"}function On(t){if(t===0)return"0 Byte";const n=1024,o=["Bytes","KB","MB","GB","TB","PB"],a=Math.floor(Math.log(t)/Math.log(n));return parseFloat((t/n**a).toFixed(2))+" "+o[a]}function Bf(t,n){return t&&(t.hasOwnProperty("allowedContentTypes")&&(n.allowedContentTypes=t.allowedContentTypes||["*"],n.allowedContentTypes=n.allowedContentTypes&&n.allowedContentTypes.length>0?n.allowedContentTypes:["*"]),t.hasOwnProperty("maxUploads")&&(n.maxUploads=t.maxUploads||0),t.hasOwnProperty("maxFileSize")&&(n.maxFileSize=On(1024*1024*(parseInt(String(t.maxFileSize),10)||1)))),n}function Tf(t){let n="ffilepreview--filetype";if(!t)return n+"-any";const o=t.lastIndexOf(".");let a="";switch(o>-1&&(a=t.substring(o+1).toLocaleLowerCase()),a){case"pdf":n+="-pdf";break;case"jpeg":case"jpg":case"gif":case"svg":case"png":case"bmp":n+="-img";break;case"ppt":case"pptx":n+="-ppt";break;case"doc":case"docx":n+="-doc";break;case"xls":case"xlsx":n+="-xls";break;case"txt":n+="-txt";break;case"zip":n+="-zip";break;case"wps":n+="-wps";break;case"wpt":n+="-wpt";break;default:n+="-any"}return n}function Ff(t){var n;if(t.type==="done")return 100;if(t.file&&t.file.progress){if(t.file.progress.status===Mt.Uploading){const o=((n=t.file.progress.data)==null?void 0:n.percentage)||5;return o>5?o:5}return 5}return 5}function BN(t){let n=t;return t?(typeof t=="string"&&(n=parseInt(t,10)),On(n)):"0 Byte"}const TN=()=>Math.random().toString(36).substring(7);function Af(t,n){return{fileIndex:n,id:TN(),name:t.name,size:t.size,type:t.type,form:new FormData,progress:{status:Mt.Queue,data:{percentage:0,speed:0,speedHuman:`${On(0)}/s`,startTime:null,endTime:null,eta:null,etaHuman:null}},lastModifiedDate:Di(new Date(t.lastModified),"yyyy-MM-dd HH:mm:ss"),nativeFile:t}}function FN(t){const n=[];return t.forEach(o=>{const a={id:"",name:"",size:0,type:"",extend:null,extendHeaders:null,createTime:""};for(const r in a){const i=r.replace("extend","response").replace("createTime","lastModifiedDate");o.hasOwnProperty(i)&&(i==="lastModifiedDate"?a[r]=Di(o[i],"yyyy-MM-dd HH:mm:ss"):a[r]=o[i])}n.push(a)}),n}function AN(t,n){return t?n<=t*1024*1024:!0}function IN(t){return t.find(n=>n==="*")!==void 0}function EN(t,n){if(!t||t.length===0||IN(t))return!0;if(n.lastIndexOf(".")<0)return!1;const o=n.substr(n.lastIndexOf("."));return t.findIndex(a=>a.toLowerCase()===o.toLowerCase())>-1}function MN(t){if(t)return t.split(`
|
|
7
|
+
`).map(n=>n.split(/: */,2)).filter(n=>n[0]).reduce((n,o)=>(n[o[0]]=o[1],n),{})}function If(t){return new Date(t*1e3).toISOString().substr(11,8)}class PN extends DN{upload(n,o,a,r){const i=n[0];return new Promise((l,s)=>{var b,v;const p=o.url||a.url||"",c=o.method||"POST",d=o.data||{},u=o.headers||{},f=new XMLHttpRequest,g=new Date().getTime();let m=((b=i.progress)==null?void 0:b.data)&&i.progress.data.startTime||g,h=0,y=null;f.upload.addEventListener("progress",x=>{var C;if(x.lengthComputable){const w=Math.round(x.loaded*100/x.total),N=new Date().getTime()-g;h=Math.round(x.loaded/N*1e3),m=((C=i.progress)==null?void 0:C.data)&&i.progress.data.startTime||new Date().getTime(),y=Math.ceil((x.total-x.loaded)/h),i.progress={status:Mt.Uploading,data:{percentage:w,speed:h,speedHuman:`${On(h)}/s`,startTime:m,endTime:null,eta:y,etaHuman:If(y)}},r({type:"uploading",files:[i]})}},!1),f.upload.addEventListener("error",x=>{s(x)}),f.onreadystatechange=()=>{if(f.readyState===XMLHttpRequest.DONE){const x=Math.round(i.size/(new Date().getTime()-m)*1e3);i.progress={status:Mt.Done,data:{percentage:100,speed:x,speedHuman:`${On(x)}/s`,startTime:m,endTime:new Date().getTime(),eta:y,etaHuman:If(y||0)}},i.responseStatus=f.status;try{i.response=JSON.parse(f.response)}catch{i.response=f.response}i.responseHeaders=MN(f.getAllResponseHeaders()),l({type:"done",files:[i]})}},f.open(c,p,!0),f.withCredentials=!!o.withCredentials;try{const x=i.nativeFile;Object.keys(u).forEach(w=>f.setRequestHeader(w,u[w]));let C;o.includeWebKitFormBoundary!==!1?(Object.keys(d).forEach(w=>{var N;return(N=i.form)==null?void 0:N.append(w,d[w])}),(v=i.form)==null||v.append(o.fieldName||"file",x,x.name),C=i.form):C=x,f.send(C)}catch(x){s(x)}return()=>{f.abort()}})}remove(n,o,a,r){return new Promise((i,l)=>{i({type:"removed",files:n})})}}const Ef={getNotify:(t="")=>{let n;return t&&e.inject(t,null)&&(n=e.inject(t)),n||(n=new Ir),n},getServerAPI:(t="")=>{let n;if(t&&e.inject(t,null)){const o=e.inject(t);o&&o()&&(n=o())}return n||(n=new PN),n}};class ON{constructor(n,o){P(this,"queue");P(this,"uploadOpts",{allowedContentTypes:["*"],maxUploads:0,maxFileSize:12,concurrency:Number.POSITIVE_INFINITY,uploadedCount:0});P(this,"extendServerConfig",null);P(this,"uploadServerSer");this.context=n,this.serverToken=o,this.queue=[],this.uploadServerSer=Ef.getServerAPI(this.serverToken)}handleResultFromServer(n){n.type==="removed"&&(this.queue=this.queue.filter(o=>{var a;return((a=o.progress)==null?void 0:a.status)!==Mt.Remove}),n.hasOwnProperty("message")||(n.message="被删除")),n.type==="error"&&(this.queue=this.queue.filter(o=>n.files&&n.files.findIndex(a=>o.id===a.id)<0)),this.context.emit("stateChange",n)}setOptions(n){n&&(this.uploadOpts=Object.assign(this.uploadOpts,n))}handleFiles(n){const o=Array.from(n).reduce((a,r,i)=>{const l=a.length+this.queue.length+1,s=this.rejectedReason(r.name,l,r.size);if(s.allowed)a=a.concat(r);else{const p=Af(r,i);this.context.emit("stateChange",{type:"rejected",file:p,message:s.message})}return a},[]);[].map.call(o,(a,r)=>{const i=Af(a,r);this.queue.push(i),this.context.emit("stateChange",{type:"addedToQueue",file:i})}),this.context.emit("stateChange",{type:"allAddedToQueue"})}rejectedReason(n,o,a){let r=!1,i="";return this.queue.findIndex(s=>s.name===n)>-1?i="上传失败:已存在同名文件":this.uploadOpts.allowedContentTypes&&!EN(this.uploadOpts.allowedContentTypes,n)?i=`上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档`:this.exceedMaxUpload(o)?i=`上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制`:AN(this.uploadOpts.maxFileSize,a)?a===0?i="上传失败:不允许文件为空":r=!0:i=`上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`,{allowed:r,message:i}}exceedMaxUpload(n=0){if(!this.uploadOpts||!this.uploadOpts.maxUploads)return!1;const o=this.uploadOpts.uploadedCount||0;return this.uploadOpts.maxUploads>0&&(this.uploadOpts.maxUploads<=o||n+o>this.uploadOpts.maxUploads)}handleUploadEvent(n){switch(n.type){case"upload":const o=this.queue.findIndex(i=>i===n.file);o!==-1&&n.file&&this.serverMethod({files:[this.queue[o]],event:n});break;case"remove":if(!n.id)return;const a=this.queue.findIndex(i=>i.id===n.id);if(a!==-1&&this.queue[a]&&this.queue[a].progress){const{progress:i}=this.queue[a];i&&(i.status=Mt.Remove)}break;case"removeAll":const r=this.queue.filter(i=>{var l;return((l=i==null?void 0:i.progress)==null?void 0:l.status)===Mt.Queue});r.length&&(this.context.emit("stateChange",{type:"cancelled",files:r,message:"删除附件成功"}),this.queue=this.queue.filter(i=>{var l;return((l=i==null?void 0:i.progress)==null?void 0:l.status)!==Mt.Queue})),this.queue.length&&(n.type="remove",this.queue.forEach(i=>{i.progress&&(i.progress.status=Mt.Remove)}),this.serverMethod({files:this.queue,event:n}));break}}setExtendServerConfig(n){this.extendServerConfig=n}serverMethod(n){let o;switch(n.event.type){case"upload":o=this.upload(n.files,n.event,a=>this.handleResultFromServer(a));break;case"removeAll":case"remove":o=this.remove(n.files,n.event,a=>this.handleResultFromServer(a));break;default:o=null}o&&o.then(a=>{this.handleResultFromServer(a)}).catch(a=>{this.handleResultFromServer(a)})}upload(n,o,a){return this.context.emit("stateChange",{type:"start",files:n}),this.uploadServerSer.upload(n,o,this.extendServerConfig,a)}remove(n,o,a){return this.uploadServerSer.remove(n,o,this.extendServerConfig,a)}reset(){this.queue=[]}destroyed(){this.reset()}}const Mf=e.defineComponent({name:"FFileSelect",props:SN,emits:["change","stateChange"],setup(t,n){const o=new ON(n,t.uploadServerToken),a=e.getCurrentInstance(),r=e.ref("*");let i;const l=()=>{i.files&&(n.emit("change",i.files),o.handleFiles(i.files),i.value=null)};function s(){i.value=null,o.reset()}e.watch(()=>t.disabled,()=>{s()}),e.watch(()=>t.uploadedCount,d=>{o.setOptions({uploadedCount:d})}),e.watch(()=>t.extendConfig,d=>{o.setExtendServerConfig(d)});function p(d){d&&d.stopPropagation(),i.click()}function c(d){o.handleUploadEvent(d)}return e.onMounted(()=>{var d,u;i=(d=a==null?void 0:a.proxy)==null?void 0:d.$refs.uploadInput,s(),o.setOptions(t.options),o.setExtendServerConfig(t.extendConfig),r.value=(((u=t.options)==null?void 0:u.allowedContentTypes)||["*"]).join(",")}),e.onUnmounted(()=>{}),n.expose({handleUploadEvent:c}),()=>e.createVNode(e.Fragment,null,[e.createVNode("input",{ref:"uploadInput",type:"file",class:"ffileupload--browser",disabled:t.disabled,multiple:t.enableMulti,accept:r.value,onChange:()=>l(),style:"width: 10px",title:"uploadInput"},null),e.createVNode("div",{class:["upload-container",t.disabled?"f-state-disabled":""],onClick:d=>p(d),title:t.selectText},[e.createVNode("i",{class:"f-icon f-icon-upload upload-icon",style:"top: 2px;position: relative;"},null),t.selectText])])}}),RN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/uploader.schema.json",title:"uploader",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for uploader",type:"string"},type:{description:"The type string of uploader",type:"string",default:"uploader"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"boolean",default:!1},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},jN=new Map([["appearance",xe]]);function _N(t,n,o){return n}const HN={title:"uploader",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},ki={contentFill:{type:Boolean,default:!1},orderField:{type:String,default:"createTime"},previewColumns:{type:Array,default:[{field:"name",width:200,title:"文件名",checkbox:!0},{field:"size",width:100,title:"大小"},{field:"createTime",width:100,title:"日期"},{field:"state",width:100,title:"状态"},{field:"action",width:100,title:"操作"}]},previewVisible:{type:Boolean,default:!0},previewEnableMulti:{type:Boolean,default:!0},previewDefaultRename:{type:String,default:""},uploadDisabled:{type:Boolean,default:!1},uploadVisible:{type:Boolean,default:!0},uploadSelectText:{type:String,default:"选择文件"},uploadEnableMulti:{type:Boolean,default:!0},uploadedCount:{type:Number,default:0},disabled:{type:Boolean,default:!1},downloadButtonDisable:{type:Boolean,default:!1},previewButtonDisable:{type:Boolean,default:!1},deleteButtonDisable:{type:Boolean,default:!1},customInfo:{type:String,default:""},fileInfos:{type:Array,default:[]},uploadOptions:{type:Object,default:null},extendConfig:{type:Object,default:{}},uploadServerToken:{type:String,default:""},notifyServiceToken:{type:String,default:""}},Pf=me(ki,RN,jN,_N,HN);function Of(t,n,o){const a=Ef.getNotify(t.notifyServiceToken),r=e.ref(t.fileInfos),{disabled:i,uploadVisible:l,uploadDisabled:s,previewVisible:p,orderField:c,previewEnableMulti:d,downloadButtonDisable:u,previewColumns:f,uploadEnableMulti:g,previewButtonDisable:m}=e.toRefs(t),h=e.ref(!1),y=e.ref([]),b=e.computed(()=>y.value.length),v=e.ref([]),x=e.ref(""),C=e.computed(()=>{(!r.value.length||y.value.length!==r.value.length)&&(h.value=!1);const j=r.value.map(H=>(H.hasOwnProperty("size")||(H.size=void 0),H.hasOwnProperty("createTime")||(H.createTime=void 0),H));if(j.sort(kN(c.value)),d.value){const H=j.map(_=>(_.checked=!!y.value.find(W=>W.id===_.id)||h.value,_));return y.value=[...H].filter(_=>_.checked),H}return j}),w=(j,H)=>{j.stopImmediatePropagation(),n.emit("fileDownloadEvent",{fileInfos:[H],name:""})},N=(j,H)=>{j.stopImmediatePropagation(),!m.value&&n.emit("filePreviewEvent",H)},V=(j,H)=>{H.checked&&(y.value=y.value.filter(_=>_.id!==H.id)),n.emit("fileRemoveEvent",H)},D=(j,H="preview")=>H==="preview"?["state","name","action","size","createTime"].findIndex(W=>W===j.field)>-1:H==="upload"?["state","name","size"].findIndex(W=>W===j.field)>-1:!1,k=j=>!(j.field==="state"&&(s.value||!l.value)),B=j=>j.lastIndexOf(".")>0?j.substring(0,j.lastIndexOf(".")):"",$=j=>{if(j.stopImmediatePropagation(),b.value>1){let H="";H=B(y.value[0].name),n.emit("fileDownloadEvent",{fileInfos:y.value,name:H})}},T=j=>{j.stopImmediatePropagation(),n.emit("fileRemoveEvent",y.value)},S=j=>{const H=C.value;j.checked?(H.forEach(_=>{_.checked=!0}),y.value=[...C.value],h.value=!0):(y.value=[],H.forEach(_=>{_.checked=!1}),h.value=!1),n.emit("previewMultiSelectedEvent",y.value)},F=(j,H)=>{j&&(j.stopImmediatePropagation(),j.stopPropagation()),(!x.value||H.id!==x.value)&&(x.value=H.id,n.emit("selectedEvent",H))},A=j=>{const H=y.value.findIndex(K=>K.id===j.id),_=H>-1,W=C.value.find(K=>K.id===j.id);W&&(W.checked=j.checked),j.checked&&!_&&W&&y.value.push(W),!j.checked&&_&&y.value.splice(H,1),C.value.length>0&&(y.value.length===C.value.length?h.value=!0:h.value=!1),F(null,W),n.emit("previewMultiSelectedEvent",y.value)},E=j=>{var H;(H=o==null?void 0:o.value)==null||H.handleUploadEvent(j)},I=j=>{E({type:"upload",file:j})},R=(j,H)=>{let _=[];j.files&&j.files.length>0?_=j.files:typeof j.file<"u"&&(_=[j.file]),H=H||j.type,_.map(W=>{const K=v.value.findIndex(z=>{var q;return typeof W<"u"&&((q=z==null?void 0:z.file)==null?void 0:q.id)===W.id});K>-1&&(v.value[K]={type:H,file:W})})},O=j=>{if(j.files){const H=j.files.map(_=>_.id);v.value=v.value.filter(_=>!(H.findIndex(K=>{var z;return K===((z=_==null?void 0:_.file)==null?void 0:z.id)})>-1)),E({type:"hide",id:H.join(",")})}},G=j=>{let H="warning";(j.type==="cancelled"||j.type==="removed")&&(H="success");const _=j.hasOwnProperty("message")?j.message:"";a.show({options:{type:H,message:_},position:"top-center"})},M=j=>{if(j.type==="addedToQueue"&&typeof j.file<"u")v.value.push({type:j.type,file:j.file}),I(j.file);else if(j.type==="start")R(j,"start");else if(j.type==="done"){R(j,"done");const H=(j.files||[]).map(_=>({checked:!1,id:_.id,name:_.name,size:_.size,createTime:Di(new Date,"yyyy-MM-dd HH:mm:ss")}));r.value=[...H,...C.value],O(j),n.emit("fUploadDoneEvent",FN(j.files||[]))}else j.type==="cancelled"||j.type==="removed"||j.type==="error"?(v.value=v.value.filter(H=>j.files&&j.files.findIndex(_=>{var W;return((W=H==null?void 0:H.file)==null?void 0:W.id)===_.id})<0),G(j)):j.type==="rejected"&&typeof j.file<"u"&&G(j)};return e.onUnmounted(()=>{}),{disabled:i,uploadVisible:l,uploadDisabled:s,downloadButtonDisable:u,previewVisible:p,previewColumns:f,uploadFiles:v,innerFileInfos:C,previewEnableMulti:d,previewMultiSelectedLength:b,previewSelectAllBtnChecked:h,uploadEnableMulti:g,previewCurrentId:x,multiFileRemoveHandler:T,previewMultiSelectChangeHandler:A,fileMultiDownloadHandler:$,selectOrCancelAllHandler:S,hasColumnHtmlFunc:D,showPreviewStateColumn:k,rowSelectedHandler:F,fileDownloadHandler:w,filePreviewHandler:N,fileRemoveHandler:V,handleStateChange:M}}const Bi=e.defineComponent({name:"FUploader",components:{"f-upload-progress":$N,"f-preview-checkbox":Sf,"f-file-select":Mf},props:ki,emits:["filePreviewEvent","fileDownloadEvent","previewMultiSelectedEvent","selectedEvent","fileRemoveEvent","fUploadDoneEvent","fUploadRemovedEvent"],setup(t,n){const o=e.ref(t.customInfo),a=Bf(t.uploadOptions,{allowedContentTypes:["*"],maxUploads:0,maxFileSize:"12MB"}),r=e.ref(null),{disabled:i,uploadVisible:l,uploadDisabled:s,downloadButtonDisable:p,previewVisible:c,previewColumns:d,uploadFiles:u,innerFileInfos:f,previewEnableMulti:g,previewMultiSelectedLength:m,previewSelectAllBtnChecked:h,uploadEnableMulti:y,previewCurrentId:b,multiFileRemoveHandler:v,previewMultiSelectChangeHandler:x,fileMultiDownloadHandler:C,selectOrCancelAllHandler:w,rowSelectedHandler:N,hasColumnHtmlFunc:V,showPreviewStateColumn:D,fileDownloadHandler:k,filePreviewHandler:B,fileRemoveHandler:$,handleStateChange:T}=Of(t,n,r),S=e.computed(()=>f.value.length>0);function F(){var U;return Df((a==null?void 0:a.allowedContentTypes)||[])?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("支持类型:")]),e.createVNode("span",{class:"support-info--item-detail",style:"margin-right:4px;"},[(U=a.allowedContentTypes)==null?void 0:U.join(""),e.createTextVNode(",")])]):""}function A(){return kf((a==null?void 0:a.maxFileSize)||"")?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("单个文件限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxFileSize,e.createTextVNode(", ")])]):""}function E(){return((a==null?void 0:a.maxUploads)||0)>0&&e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("文件总数限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxUploads,e.createTextVNode("个")])])}function I(){return l.value&&!s.value&&!i.value?e.createVNode("div",{class:"ffileupload--support-info"},[o.value?e.createVNode("ul",{class:"support-info--wrapper"},[e.createVNode("li",null,[e.createVNode("span",{class:"support-info--item-detail",innerHTML:o.value},null)])]):e.createVNode("ul",{class:"support-info--wrapper"},[F(),A(),E()])]):null}function R(U){var Z,re,de;return e.createVNode("div",{class:"uploadAndpreview--title-container"},[e.createVNode("div",{class:"ffilepreview--item-icon"},[e.createVNode("span",{class:["ffilepreview--filetype-icon",Tf(((Z=U.file)==null?void 0:Z.name)||"")]},null)]),e.createVNode("div",{class:"uploadAndpreview--right"},[e.createVNode("a",{class:"item-content--title",title:(re=U.file)==null?void 0:re.name},[((de=U.file)==null?void 0:de.name)||"无名称"]),e.createVNode(e.resolveComponent("f-upload-progress"),{status:U.type==="done"?"success":"active",percent:Ff(U),maxWidth:300},null)])])}function O(U){return e.createVNode("div",{class:"uploadAndpreview--title-container"},[e.createVNode("div",{class:"ffilepreview--item-icon"},[e.createVNode("span",{class:["ffilepreview--filetype-icon",Tf(U.name)]},null)]),e.createVNode("div",{class:"uploadAndpreview--right"},[e.createVNode("a",{class:["item-content--title","previewButtonDisable.value?'no-preview':''"],title:U.name,onClick:Z=>B(Z,U)},[U.name])])])}function G(U,Z,re){return e.createVNode("div",{class:"uploadAndpreview--filesize-container"},[U==="preview"&&re?e.createVNode("span",null,[BN(re.size)]):null,U==="upload"&&Z?e.createVNode("span",null,[Ff(Z)]):null])}function M(U,Z){return e.createVNode("div",{class:"uploadAndpreview--state-container"},[U==="upload"?Z&&Z.type!=="done"?e.createVNode("p",{class:"upload-state--uploading"},[e.createVNode("i",{class:"f-icon f-icon-clock text-warning"},null),e.createVNode("span",null,[e.createTextVNode("正在上传...")])]):e.createVNode("p",{class:"upload-state--uploaded"},[e.createVNode("i",{class:"f-icon f-icon-success text-success"},null),e.createVNode("span",null,[e.createTextVNode("上传成功")])]):U==="preview"?e.createVNode("p",{class:"upload-state--uploaded"},[e.createVNode("i",{class:"f-icon f-icon-success text-success"},null),e.createVNode("span",null,[e.createTextVNode("已上传")])]):""])}function j(U){return e.createVNode("div",{class:"uploadAndpreview--action-container"},[p.value?"":e.createVNode("button",{class:"btn preview-btn",title:"下载",onClick:Z=>k(Z,U)},[e.createVNode("span",{class:"f-icon f-icon-enclosure_download"},null)]),t.previewButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"预览",onClick:Z=>B(Z,U)},[e.createVNode("span",{class:"f-icon f-icon-enclosure_browse"},null)]),t.deleteButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"删除",onClick:Z=>$(Z,U)},[e.createVNode("span",{class:"f-icon f-icon-enclosure_delete",style:"top: -1px"},null)])])}function H(U){return e.createVNode("div",{class:"uploadAndpreview--date-container"},[U.createTime||""])}function _(U,Z,re,de){let ge;if(U=U||"preview",U==="preview"&&re)switch(de.field){case"state":ge=M("preview",null);break;case"name":ge=O(re);break;case"action":ge=j(re);break;case"size":ge=G(U,Z,re);break;case"createTime":ge=H(re);break;default:ge=`<div>${re[de.field]||""} </div>`}if(U==="upload"&&Z)switch(de.field){case"state":ge=M("upload",Z);break;case"name":ge=R(Z);break;case"size":ge=G(U,Z,re);break;default:ge=""}return ge}function W(){return l.value?e.createVNode("div",{class:"header--left-container"},[e.createVNode(e.resolveComponent("f-file-select"),{ref:r,disabled:s.value,selectText:t.selectText,uploadedCount:t.uploadedCount,uploadServerToken:t.uploadServerToken,enableMulti:y.value,options:t.uploadOptions,extendConfig:t.extendConfig,onStateChange:U=>T(U)},null)]):null}function K(){return!l.value&&c.value&&S.value?e.createVNode("div",{class:"header--left-container header--countInfo"},[e.createVNode("p",{class:"m-0"},[e.createTextVNode("共"),e.createVNode("span",{class:"count"},[u.value.length+f.value.length]),e.createTextVNode("个附件"),m.value>0?e.createVNode(e.Fragment,null,[e.createTextVNode("(已选"),e.createVNode("span",{class:"count-selected"},[m.value]),e.createTextVNode("个)")]):""])]):null}function z(){return(!p.value||!t.deleteButtonDisable)&&c.value&&S.value?e.createVNode("div",{class:"header--right-container"},[p.value?null:e.createVNode("button",{class:"btn btn-primary f-btn-ml",disabled:m.value===0,onClick:re=>C(re)},[e.createTextVNode("下载")]),t.deleteButtonDisable.value?null:e.createVNode("button",{class:"btn btn-secondary f-btn-ml",disabled:m.value===0,onClick:re=>v(re)},[e.createTextVNode("删除")])]):null}function q(){return d.value.map(U=>D(U)?e.createVNode("th",{style:{width:U.width?U.width+"px":"auto"},class:[!i.value&&U.checkbox&&U.checkbox?"td--hascheckbox":""]},[!i.value&&g.value&&U.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{class:"preview-checkbox",id:"previewMultiBtn",checked:h.value,onCheckedChange:Z=>w(Z)},null):null,U.title]):null)}function L(){return u.value.map(U=>{var Z;return e.createVNode("tr",{class:"uploadAndpreview--upload-item",id:"uploadAndpreview--upload-item"+(((Z=U==null?void 0:U.file)==null?void 0:Z.id)||"")},[d.value.map(re=>{var de;return e.createVNode("td",{class:[!i.value&&re.checkbox&&re.checkbox?"td--hascheckbox":""]},[g.value&&re.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{id:(de=U==null?void 0:U.file)==null?void 0:de.id,checked:U.checked,disabled:U.type!=="done",class:"preview-checkbox",onCheckedChange:ge=>x(ge)},null):null,V(re,"upload")?_("upload",U,null,re):null])})])})}function X(){return f.value.map(U=>e.createVNode("tr",{class:["uploadAndpreview--preview-item",b.value===U.id?"uploadAndpreview--currentfile":""],id:"uploadAndpreview--preview-item"+U.id,onClick:Z=>N(Z,U)},[d.value.map(Z=>D(Z)?e.createVNode("td",{class:[!i.value&&Z.checkbox&&Z.checkbox?"td--hascheckbox":""]},[!i.value&&g.value&&Z.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{id:U.id,checked:U.checked,class:"preview-checkbox",onCheckedChange:re=>x(re)},null):null,V(Z,"preview")?_("preview",null,U,Z):e.createVNode("div",{class:"text-truncate",innerHTML:_("preview",null,U,Z)},null)]):null)]))}return()=>i.value?e.createVNode("div",{class:"fv-upload-and-preview"},[S.value?null:I(),c.value?e.createVNode("div",{class:"uploadAndpreview--content"},[S.value?e.createVNode("table",{class:"table table-bordered uploadAndpreview--table"},[e.createVNode("thead",null,[q()]),e.createVNode("tbody",null,[X()])]):e.createVNode("p",{class:"uploadAndpreview--nodata"},[e.createTextVNode("无附件信息")])]):null,S.value?I():null]):e.createVNode("div",{class:"fv-upload-and-preview"},[e.createVNode("div",{class:"uploadAndpreview--header"},[W(),K(),z()]),S.value?null:I(),c.value||l.value?e.createVNode("div",{class:"uploadAndpreview--content"},[(p.value||!l.value)&&u.value.length===0&&!S.value?e.createVNode("p",{class:"uploadAndpreview--nodata"},[e.createTextVNode("无附件信息")]):"",u.value.length>0||S?e.createVNode("table",{class:"table table-bordered uploadAndpreview--table"},[e.createVNode("thead",null,[q()]),e.createVNode("tbody",null,[L(),X()])]):null]):null,S.value?I():null])}}),LN=e.defineComponent({name:"FUploaderDesign",components:{"f-preview-checkbox":Sf,"f-file-select":Mf},props:ki,emits:["filePreviewEvent","fileDownloadEvent","fPreviewMultiSelectedEvent","fSelectedEvent","fileRemoveEvent","fUploadDoneEvent","fUploadRemovedEvent"],setup(t,n){const o=e.ref(t.customInfo),a=Bf(t.uploadOptions,{allowedContentTypes:["*"],maxUploads:0,maxFileSize:"12MB"}),r=e.ref(null),i=[{id:"attach01",name:""},{id:"attach02",name:""}],{disabled:l,uploadVisible:s,uploadDisabled:p,downloadButtonDisable:c,previewVisible:d,previewColumns:u,previewEnableMulti:f,previewCurrentId:g,showPreviewStateColumn:m}=Of(t,n,r);function h(){var E;return Df((a==null?void 0:a.allowedContentTypes)||[])?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("支持类型:")]),e.createVNode("span",{class:"support-info--item-detail",style:"margin-right:4px;"},[(E=a.allowedContentTypes)==null?void 0:E.join(""),e.createTextVNode(",")])]):null}function y(){return kf((a==null?void 0:a.maxFileSize)||"")?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("单个文件限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxFileSize,e.createTextVNode(", ")])]):null}function b(){return((a==null?void 0:a.maxUploads)||0)>0?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("文件总数限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxUploads,e.createTextVNode("个")])]):null}function v(){return s.value&&!p.value&&!l.value?e.createVNode("div",{class:"ffileupload--support-info"},[o.value?e.createVNode("ul",{class:"support-info--wrapper"},[e.createVNode("li",null,[e.createVNode("span",{class:"support-info--item-detail",innerHTML:o.value},null)])]):e.createVNode("ul",{class:"support-info--wrapper"},[h(),y(),b()])]):null}function x(E){return e.createVNode("div",{class:"uploadAndpreview--title-container"},[e.createVNode("div",{class:"ffilepreview--item-icon"},[e.createVNode("span",{class:"ffilepreview--filetype-icon"},null)]),e.createVNode("div",{class:"uploadAndpreview--right"},[e.createVNode("span",{class:"ffilepreview--preview-block"},null)])])}function C(E){return e.createVNode("div",{class:"uploadAndpreview--filesize-container"},[e.createVNode("span",{class:"ffilepreview--preview-block"},null)])}function w(){return e.createVNode("div",{class:"uploadAndpreview--state-container"},[e.createVNode("p",{class:"upload-state--uploaded"},[e.createVNode("i",{class:"f-icon f-icon-success text-success"},null),e.createVNode("span",null,[e.createTextVNode("已上传")])])])}function N(E){return e.createVNode("div",{class:"uploadAndpreview--action-container"},[c.value?"":e.createVNode("button",{class:"btn preview-btn",title:"下载"},[e.createVNode("span",{class:"f-icon f-icon-enclosure_download"},null)]),t.previewButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"预览"},[e.createVNode("span",{class:"f-icon f-icon-enclosure_browse"},null)]),t.deleteButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"删除"},[e.createVNode("span",{class:"f-icon f-icon-enclosure_delete",style:"top: -1px"},null)])])}function V(E){return e.createVNode("div",{class:"uploadAndpreview--date-container"},[e.createTextVNode(" "),e.createVNode("span",{class:"ffilepreview--preview-block"},null)])}function D(E,I,R){let O=null;if(E=E||"preview",E==="preview"&&I)switch(R.field){case"state":O=w();break;case"name":O=x();break;case"action":O=N();break;case"size":O=C();break;case"createTime":O=V();break;default:O=e.createVNode("span",{class:"ffilepreview--preview-block"},null)}return O}function k(){return s.value?e.createVNode("div",{class:"header--left-container"},[e.createVNode(e.resolveComponent("f-file-select"),{ref:r,disabled:p.value,selectText:t.selectText},null)]):null}function B(){return(!c.value||!t.deleteButtonDisable)&&d.value?e.createVNode("div",{class:"header--right-container"},[c.value?null:e.createVNode("button",{class:"btn btn-primary f-btn-ml",disabled:!0},[e.createTextVNode("下载")]),t.deleteButtonDisable.value?null:e.createVNode("button",{class:"btn btn-secondary f-btn-ml",disabled:!0},[e.createTextVNode("删除")])]):null}function $(){return u.value.map(E=>m(E)?e.createVNode("th",{style:{width:E.width?E.width+"px":"auto"},class:[!l.value&&E.checkbox&&E.checkbox?"td--hascheckbox":""]},[!l.value&&f.value&&E.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{class:"preview-checkbox",id:"previewMultiBtn"},null):null,E.title]):null)}function T(){return i.map(E=>e.createVNode("tr",{class:["uploadAndpreview--preview-item",g.value===E.id?"uploadAndpreview--currentfile":""],id:"uploadAndpreview--preview-item"+E.id},[u.value.map(I=>m(I)?e.createVNode("td",{class:[!l.value&&I.checkbox&&I.checkbox?"td--hascheckbox":""]},[!l.value&&f.value&&I.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{class:"preview-checkbox"},null):null,D("preview",E,I)]):null)]))}e.onBeforeMount(()=>{});const S=e.ref(),F=e.inject("design-item-context"),A=ve(S,F);return e.onMounted(()=>{S.value.componentInstance=A}),n.expose(A.value),()=>e.createVNode("div",{class:"fv-upload-and-preview",ref:S},[d.value||s.value?e.createVNode(e.Fragment,null,[l.value?null:e.createVNode("div",{class:"uploadAndpreview--header"},[k(),B()]),e.createVNode("div",{class:"uploadAndpreview--content"},[e.createVNode("table",{class:"table table-bordered uploadAndpreview--table"},[e.createVNode("thead",null,[$()]),e.createVNode("tbody",null,[T()])])]),v()]):null])}}),Rf={install(t){t.component(Bi.name,Bi)},register(t,n,o){t.uploader=Bi,n.uploader=Pf},registerDesigner(t,n,o){t.uploader=LN,n.uploader=Pf}},WN=new Map([["appearance",xe]]);function qN(t,n,o){return n}const zN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/verify-detail.schema.json",title:"verify-detail",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for verify-detail",type:"string"},type:{description:"The type string of verify-detail",type:"string",default:"verify-detail"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},GN={title:"verify-detail",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Ti={showType:{type:String,default:""},showList:{type:Boolean,default:!1},verifyList:{type:Array,default:[{id:"111",title:"单据信息[销售组织]",msg:"字段值不能为空",type:"empty"},{id:"222",title:"单据信息[销售组织]",msg:"字段值不能为空",type:"empty"}]},verifyType:{type:Array,default:[{id:"vertifyType1",type:"all",title:"全部"},{id:"vertifyType3",type:"empty",title:"值为空"}]},customClass:{type:String,default:""},maxHeight:{type:Number,default:200}},jf=me(Ti,zN,WN,qN,GN),Eo=e.defineComponent({name:"FVerifyDetail",props:Ti,emits:["validatorClick","listshow"],setup(t,n){let o=[];const a=e.ref(t.showList),r=e.ref(t.maxHeight),i=e.ref(t.verifyList),l=e.ref(t.showType),s=e.ref(t.verifyType),p=e.ref(t.customClass);function c(){a.value=!a.value,n.emit("listshow",a.value)}function d(N){var V;!N&&s.value&&s.value.length>0&&(N=s.value[0].type),(V=s.value)==null||V.forEach(D=>{D.active=D.type===N})}function u(N){N=N||o[0].type,o.forEach(V=>{V.show=V.type===N})}function f(N){N.length<=0||(d(N.type),u(N.type))}function g(){a.value=!1,n.emit("listshow",!1)}function m(N){n.emit("validatorClick",N)}function h(N){return e.createVNode("li",{class:"f-verify-list",onClick:()=>m(N)},[e.createVNode("span",{class:["f-icon f-icon-close-outline list-icon list-error",{"list-warning":N.type==="warn"}]},null),e.createVNode("div",{class:"list-con"},[e.createVNode("p",{class:"list-title",title:N.title},[N.title]),e.createVNode("p",{class:"list-msg",title:N.msg},[N.msg])])])}function y(){return o.map(N=>e.createVNode("ul",{class:["f-verify-list-content",{active:N.show}]},[N.list&&N.list.map(V=>h(V))]))}const b=e.computed(()=>{var N;return((N=i.value)==null?void 0:N.length)>0});function v(N){return{btn:!0,"verify-title-btn":!0,"f-state-selected":N.active,disabled:N.length<=0}}const x=e.computed(()=>{var N;return(N=s.value)==null?void 0:N.map(V=>e.createVNode("button",{class:v(V),onClick:()=>f(V)},[V.title,e.createVNode("span",null,[V.length])]))}),C=e.computed(()=>{var N;return e.createVNode("div",{class:"f-verify-nums",onClick:c},[e.createVNode("span",{class:"nums-icon f-icon f-icon-warning"},null),e.createVNode("span",{class:"nums-count"},[(N=i.value)==null?void 0:N.length])])});function w(){var V;const N=[];s.value&&((V=s.value)!=null&&V.length)&&(s.value.map(D=>{const k={list:D.type==="all"?i.value:[],show:!1,type:D.type};N.push(k)}),N.map((D,k)=>{const B=i.value.filter($=>$.type===D.type);N[k].list=k!==0?B:N[k].list}),s.value.map((D,k)=>{D.length=N[k].list.length})),o=N}return e.onBeforeMount(()=>{w(),u(l.value),d(l.value)}),()=>e.createVNode("div",{class:b?`f-verify-detail ${p.value}`:""},[b.value?e.createVNode("div",{class:"f-verify-detail-content"},[C.value,e.createVNode("div",{class:"f-verify-form-main",hidden:!a.value},[e.createVNode("div",{class:"f-verify-form-content"},[e.createVNode("div",{class:"f-verify-form-content-arrow"},null),e.createVNode("div",{class:"f-verify-form-content-list"},[e.createVNode("div",{class:"f-verify-forms-title"},[e.createVNode("div",{class:"btn-group"},[x.value]),e.createVNode("div",{class:"f-verify-close",onClick:g},[e.createVNode("span",{class:"f-icon f-icon-close"},null)])]),e.createVNode("div",{class:"f-verify-forms-list",style:{maxHeight:r.value+"px"}},[y()])])])])]):null])}});function UN(t,n,o){e.createApp({setup(){return e.onUnmounted(()=>{n&&n()}),()=>e.createVNode(Eo,t,null)}}).mount(o)}class _f{static show(n,o){this.clear();let a=0;this.verifyContainer=document.createElement("div"),o?(a=o.offsetHeight-110,o.appendChild(this.verifyContainer)):(a=document.documentElement.clientHeight-110,document.body.appendChild(this.verifyContainer)),n.maxHeight=n.maxHeight?n.maxHeight:a,UN(n,this.clear,this.verifyContainer)}static clear(){let n=this.verifyContainer;n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}P(_f,"verifyContainer",null);const YN=e.defineComponent({name:"FVerifyDetailDesign",props:Ti,emits:["validatorClick","listshow"],setup(t,n){let o=[];const a=e.ref(t.showList),r=e.ref(t.maxHeight),i=e.ref(t.verifyList),l=e.ref(t.showType),s=e.ref(t.verifyType),p=e.ref(),c=e.inject("design-item-context"),d=ve(p,c);e.onMounted(()=>{p.value.componentInstance=d}),n.expose(d.value);function u(){a.value=!a.value,n.emit("listshow",a.value)}function f(D){var k;(k=s.value)==null||k.forEach(B=>{B.active=B.type===D})}function g(D){o.forEach(k=>{k.show=k.type===D})}function m(D){D.length<=0||(f(D.type),g(D.type))}function h(){a.value=!1,n.emit("listshow",!1)}function y(D){n.emit("validatorClick",D)}function b(D){return e.createVNode("li",{class:"f-verify-list",onClick:()=>y(D)},[e.createVNode("span",{class:["f-icon f-icon-close-outline list-icon list-error",{"list-warning":D.type==="warn"}]},null),e.createVNode("div",{class:"list-con"},[e.createVNode("p",{class:"list-title",title:D.title},[D.title]),e.createVNode("p",{class:"list-msg",title:D.msg},[D.msg])])])}function v(){return o.map(D=>e.createVNode("ul",{class:["f-verify-list-content",{active:D.show}]},[D.list&&D.list.map(k=>b(k))]))}const x=e.computed(()=>{var D;return((D=i.value)==null?void 0:D.length)>0});function C(D){return{"btn btn-secondary":!0,active:D.active,disabled:D.length<=0}}const w=e.computed(()=>{var D;return(D=s.value)==null?void 0:D.map(k=>e.createVNode("button",{class:C(k),onClick:()=>m(k)},[k.title,e.createVNode("span",null,[k.length])]))}),N=e.computed(()=>{var D;return e.createVNode("div",{class:"f-verify-nums",onClick:u},[e.createVNode("span",{class:"nums-icon f-icon f-icon-warning"},null),e.createVNode("span",{class:"nums-count"},[(D=i.value)==null?void 0:D.length])])});function V(){var k;const D=[];s.value&&((k=s.value)!=null&&k.length)&&(s.value.map(B=>{const $={list:B.type==="all"?i.value:[],show:!1,type:B.type};D.push($)}),D.map((B,$)=>{const T=i.value.filter(S=>S.type===B.type);D[$].list=$!==0?T:D[$].list}),s.value.map((B,$)=>{B.length=D[$].list.length})),o=D}return e.onBeforeMount(()=>{V(),g(l.value),f(l.value)}),()=>e.createVNode("div",{ref:p},[x.value?e.createVNode("div",{class:"f-verify-detail"},[e.createVNode("div",{class:"f-verify-detail-content"},[N.value,e.createVNode("div",{class:"f-verify-form-main",hidden:!a.value},[e.createVNode("div",{class:"f-verify-form-content"},[e.createVNode("div",{class:"f-verify-form-content-arrow"},null),e.createVNode("div",{class:"f-verify-form-content-list"},[e.createVNode("div",{class:"f-verify-forms-title"},[e.createVNode("div",{class:"btn-group"},[w.value]),e.createVNode("div",{class:"f-verify-close",onClick:h},[e.createVNode("span",{class:"f-icon f-icon-close"},null)])]),e.createVNode("div",{class:"f-verify-forms-list",style:{maxHeight:r.value+"px"}},[v()])])])])])]):null])}}),Hf={install(t){t.component(Eo.name,Eo),t.provide("FVerifyDetailService",_f)},register(t,n,o){t["verify-detail"]=Eo,n["verify-detail"]=jf},registerDesigner(t,n,o){t["verify-detail"]=YN,n["verify-detail"]=jf}},KN=new Map([["appearance",xe]]);function XN(t,n,o){return n}const QN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/weather.schema.json",title:"weather",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a weather",type:"string"},type:{description:"The type string of weather component",type:"string",default:"weather"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}}},required:["id","type"]},ZN={title:"weather",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},JN={cityItems:{type:Array,default:[{province:"北京",city:["北京"]},{province:"山东",city:["济南","青岛"]},{province:"黑龙江",city:["牡丹江","齐齐哈尔"]}]},themeItems:{type:Array,default:[{title:"school",adviceItems:["clothes","sports","sunscreen"]},{title:"office",adviceItems:["clothes","traffic","umbrella"]},{title:"construction",adviceItems:["clothes","chill","heatstroke"]},{title:"tourism",adviceItems:["clothes","sunscreen","tourism"]}]},data:{type:Object,default:{sunriseTime:e.ref(new Date),sunsetTime:e.ref(new Date),temperature:e.ref(0),max:e.ref(0),min:e.ref(0),weather:e.ref("阴"),air:e.ref(0),adviceItems:[{key:"clothes",value:{name:"穿衣",info:"毛衣",detail:"建议穿长袖毛衣等服装。"}},{key:"sports",value:{name:"运动",info:"适宜",detail:"各项气象条件都很好,很适合户外运动。"}},{key:"sunscreen",value:{name:"防晒",info:"强",detail:"建议涂抹SPF在15-20之间,PA++的防晒护肤品。"}},{key:"traffic",value:{name:"交通",info:"良好",detail:"天气较好,路面干燥,交通气象条件良好,车辆可以正常行驶。"}},{key:"umbrella",value:{name:"雨伞",info:"不带伞",detail:"天气较好,您在出门的时候无须带雨伞。"}},{key:"chill",value:{name:"风寒",info:"无",detail:"温度未达到风寒所需的低温,稍作防寒准备即可。"}},{key:"heatstroke",value:{name:"中暑",info:"无中暑风险",detail:"天气不热,在炎炎夏日中十分难得,可以告别暑气漫漫啦~"}},{key:"tourism",value:{name:"旅游",info:"适宜",detail:"天气较好,温度适宜,是个好天气哦。这样的天气适宜旅游,您可以尽情地享受大自然的风光。"}}],proindexItemsSet:[[{title:"紫外线",icon:"UV",value:"中等",info:"16:00前注意防晒",explain:"紫外线指数(UVI)测量紫外线辐射。UVI越高,潜在伤害就越大,造成伤害的速度也越快。"},{title:"降水量",icon:"rainfall",value:"0mm",info:"过去24小时",explain:"降水量,是指12或24小时内降雨(雪)量的总和。"}],[{title:"湿度",icon:"humidity",value:"31%",info:"露点温度为4°",explain:"空气中含水量与空气可容纳水量的比值。气温越高,空气可容纳的水量就越多。湿度高意味着可能结露或起雾。"},{title:"体感温度",icon:"apparentTemp",value:"14°",info:"风较大,体感更凉",explain:"体感温度传达身体感觉有多暖或多冷,可能与实际温度不同。体感温度受湿度和风影响。"}],[{title:"气压",icon:"pressure",value:"1010mpa",info:"当前气压较稳定",explain:"气压的显著急剧变化用于预测天气变化。例如,气压降低表示雨雪即将来临,升高则表示天气将好转。"},{title:"能见度",icon:"visibility",value:"19km",info:"目前非常好",explain:"能见度会告诉你可以清晰地看到多远以外的物体。能见度测量大气透明度,不考虑光照强度或障碍物。"}]],dayItemsSet:[[{icon:"sunny",temp:15},{icon:"sunny",temp:16},{icon:"sunny",temp:20},{icon:"sunny",temp:22},{icon:"sunny",temp:24},{icon:"cloudy",temp:23},{icon:"cloudy",temp:20},{icon:"cloudy",temp:19},{icon:"cloudy",temp:19},{icon:"cloudy",temp:18},{icon:"rainy1",temp:18},{icon:"rainy1",temp:17},{icon:"rainy1",temp:15},{icon:"rainy1",temp:15},{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:18},{icon:"sunny",temp:19},{icon:"sunny",temp:19},{icon:"sunny",temp:20},{icon:"sunny",temp:20}],[{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:18},{icon:"sunny",temp:19},{icon:"sunny",temp:19},{icon:"sunny",temp:20},{icon:"sunny",temp:20},{icon:"rainy2",temp:21},{icon:"rainy2",temp:21},{icon:"rainy2",temp:21},{icon:"sunny",temp:21},{icon:"sunny",temp:22},{icon:"sunny",temp:24},{icon:"sunny",temp:24},{icon:"sunny",temp:23},{icon:"sunny",temp:20},{icon:"sunny",temp:20},{icon:"sunny",temp:19},{icon:"sunny",temp:19},{icon:"sunny",temp:15},{icon:"sunny",temp:15}]],weekItems:[{icon:"rainy1",max:24,min:15},{icon:"rainy2",max:24,min:15},{icon:"foggy",max:26,min:11},{icon:"cloudy",max:22,min:7},{icon:"snowy1",max:10,min:3},{icon:"sunny",max:19,min:5},{icon:"snowy2",max:10,min:4}]}}},Fi={data:{type:Object,default:JN},theme:{type:Number,default:1}},Lf=me(Fi,QN,KN,XN,ZN);function Wf(t,n){function o(a){return a<10?"0"+a:a}return{addZero:o}}function Mo(t,n){const o=e.ref(t.data.data);return{colorTheme:e.computed(()=>new Date().getTime()-o.value.default.sunriseTime.getTime()<0||o.value.default.sunsetTime.getTime()-new Date().getTime()<0?["#151276","#7939e0","#332396","#814ca7"]:new Date().getTime()-o.value.default.sunriseTime.getTime()<36e5?["#49417b","#f1b655","#b1785b","#d99877"]:o.value.default.sunsetTime.getTime()-new Date().getTime()<36e5?["#9e2e2e","#f59b0b","#c15334","#ff7361"]:["#0273D7","#76BAFF","#388FFF","#75C6FE"])}}function Ai(t,n){const o=e.ref(t.data.data),a=Mo(t);function r(){let c=sn.getInstanceByDom(document.getElementById("sunset"));c||(c=sn.init(document.getElementById("sunset"),null,{height:170,width:380})),c.setOption({series:[{data:[{value:new Date().getTime()-o.value.default.sunriseTime.getTime(),itemStyle:{borderRadius:10,color:{type:"linear",x:1,y:0,x2:0,y2:0,colorStops:[{offset:1,color:a.colorTheme.value?a.colorTheme.value[3]:"white"},{offset:0,color:"white"}]}}},{value:o.value.default.sunsetTime.getTime()-new Date().getTime(),itemStyle:{opacity:0}}],type:"pie",center:["50%","100%"],radius:["200%","190%"],startAngle:180,endAngle:360,label:{show:!1},emphasis:{scale:!1},emptyCircleStyle:{borderType:"dashed"}},{type:"gauge",center:["50%","100%"],radius:"220%",startAngle:180,endAngle:360,axisTick:{show:!1},axisLabel:{show:!1},axisLine:{show:!1},splitNumber:20,splitLine:{length:3,lineStyle:{width:10,color:"white"}}}]})}function i(c){let d=sn.getInstanceByDom(document.getElementById("chart24h"));d||(d=sn.init(document.getElementById("chart24h"),null,{width:1885,height:75})),d.setOption({xAxis:{type:"category",show:!1},yAxis:{type:"value",show:!1},series:[{data:o.value.default.dayItemsSet[c].map(u=>u.temp),type:"line",itemStyle:{color:"white"}}]})}function l(){const c=document.getElementById("background");if(c){const d=c.getBoundingClientRect().width,u=Math.max(d,400)*1.11;let f=sn.getInstanceByDom(document.getElementById("chart7d"));f?f.resize({width:u,height:90}):f=sn.init(document.getElementById("chart7d"),null,{width:u,height:90}),f.setOption({grid:{left:0},xAxis:{type:"category",show:!1},yAxis:{type:"value",show:!1},series:[{data:o.value.default.weekItems.map(g=>g.min),type:"line",itemStyle:{color:"#5C90F9"}},{data:o.value.default.weekItems.map(g=>g.max),type:"line",itemStyle:{color:"#FC9657"}}]})}}function s(){const c=document.getElementById("airPoint"),d=document.getElementById("background");c&&d&&(c.style.marginLeft=o.value.default.air/500*(d.getBoundingClientRect().width-50)-5+"px")}function p(c){r(),i(c),l(),s()}return{renderChart24h:i,renderChart7d:l,renderCharts:p}}function e2(t,n){const o=e.ref(),a=e.ref(t.data.data),r=e.ref(0),i=Wf(),l=Ai(t);function s(y){r.value=y}function p(y){switch(y){case 0:return"今天";case 1:return"明天";default:const b=new Date(new Date().getTime()+24*60*60*1e3*y).getDay(),v="周";switch(b){case 0:return v+"日";case 1:return v+"一";case 2:return v+"二";case 3:return v+"三";case 4:return v+"四";case 5:return v+"五";case 6:return v+"六"}break}}function c(y){const b=new Date(new Date().getTime()+864e5*y);return i.addZero(b.getMonth()+1)+"/"+i.addZero(b.getDate())}function d(){const b=o.value.getBoundingClientRect().width-120,v=document.getElementById("f-weather-24h-content");v&&(v.offsetLeft+b>-32?v.style.marginLeft="-32px":v.style.marginLeft=v.offsetLeft+b+"px")}function u(){const y=o.value.getBoundingClientRect().width,b=y-120,v=document.getElementById("f-weather-24h-content");if(v){const x=v.scrollWidth-y-130;v.offsetLeft-b<-x?v.style.marginLeft="-"+x+"px":v.style.marginLeft=v.offsetLeft-b+"px"}}function f(y,b){if(y===0){const v=new Date;return b===0?"现在":i.addZero((v.getHours()+b)%24)}else return i.addZero(b)}e.watch(r,()=>{const y=document.getElementById("f-weather-24h-content");y.style.marginLeft="-32px",l.renderChart24h(r.value)});function g(){return e.createVNode("div",{class:"f-weather-24h-container"},[e.createVNode("div",{class:"f-weather-24h-title"},[e.createTextVNode("24小时天气预报")]),e.createVNode("div",{class:"f-weather-lrbutton-container"},[e.createVNode("img",{src:"/components/weather/src/image/arrow-left.png",class:"f-weather-lrbutton-l",onClick:d},null),e.createVNode("img",{src:"/components/weather/src/image/arrow-right.png",class:"f-weather-lrbutton-r",onClick:u},null)]),e.createVNode("div",{class:"f-weather-24h-content-scroll"},[e.createVNode("div",{id:"f-weather-24h-content"},[a.value.default.dayItemsSet.map((y,b)=>b===r.value?e.createVNode("div",null,[e.createVNode("tr",{id:"report"+b,class:"f-weather-24h-tr"},[y.map((v,x)=>e.createVNode("td",{class:"f-weather-24h-td"},[e.createVNode("div",null,[f(b,x)]),e.createVNode("img",{src:"http://mat1.gtimg.com/pingjs/ext2020/weather/pc/icon/weather/day/"+v.icon+".png",class:"f-weather-24h-img"},null),e.createVNode("div",null,[v.temp+"°"])]))])]):""),e.createVNode("div",{id:"chart24h",class:"f-weather-chart24h"},null)])])])}function m(){return e.createVNode("div",{class:"f-weather-7d-container"},[e.createVNode("div",{class:"f-weather-7d-title"},[e.createTextVNode("七日天气预报")]),e.createVNode("tr",{class:"f-weather-7d-tr"},[a.value.default.weekItems.map((y,b)=>e.createVNode("td",{id:"day"+b,class:"f-weather-7d-td",style:"background-color: "+(b===r.value?"rgba(0, 0, 0, 0.05)":"none"),onClick:()=>s(b)},[e.createVNode("div",{class:"f-weather-7d-td-title"},[p(b)]),e.createVNode("div",{class:"f-weather-7d-td-date"},[c(b)]),e.createVNode("img",{src:"http://mat1.gtimg.com/pingjs/ext2020/weather/pc/icon/weather/day/"+y.icon+".png",class:"f-weather-7d-td-img"},null),e.createVNode("div",{class:"f-weather-7d-td-margin"},[y.max+"°"]),e.createVNode("div",null,[y.min+"°"])]))]),e.createVNode("div",{id:"chart7d",class:"f-weather-chart7d"},null)])}function h(){return e.createVNode("div",{ref:o},[g(),m()])}return{renderWeatherReport:h}}function t2(t,n){const o=e.ref(t.data.data);function a(){return e.createVNode("div",null,[o.value.default.proindexItemsSet.map(r=>e.createVNode("tr",{class:"f-weather-proindex-tr"},[r.map(i=>e.createVNode("td",{class:"f-weather-proindex-td"},[e.createVNode("div",{class:"f-weather-proindex-content-scroll"},[e.createVNode("div",{class:"f-weather-proindex-content"},[e.createVNode("img",{src:"/components/weather/src/image/proindexImage/"+i.icon+".png",class:"f-weather-proindex-icon"},null),e.createVNode("div",{class:"f-weather-proindex-text"},[e.createVNode("div",{class:"f-weather-proindex-title"},[i.title]),e.createVNode("div",{class:"f-weather-proindex-value"},[i.value])]),e.createVNode("div",{class:"f-weather-proindex-line"},null),e.createVNode("br",null,null),e.createVNode("div",{class:"f-weather-proindex-info"},[i.info]),e.createVNode("br",null,null),e.createVNode("div",null,[i.explain])])])]))]))])}return{renderWeatherProindex:a}}function n2(t,n){const o=e.ref(!0),a=Mo(t),{renderWeatherReport:r}=e2(t),{renderWeatherProindex:i}=t2(t),l=e.computed(()=>({"background-color":o.value?a.colorTheme.value[2]:"",color:o.value?"white":""})),s=e.computed(()=>({"background-color":o.value?"":a.colorTheme.value[2],color:o.value?"":"white"})),p=e.computed(()=>({display:o.value?"block":"none"})),c=e.computed(()=>({display:o.value?"none":"block"}));function d(){o.value=!0}function u(){o.value=!1}function f(){return e.createVNode("div",{class:"f-weather-container f-weather-detail"},[e.createVNode("div",{style:"display:flex"},[e.createVNode("button",{class:"f-weather-button f-weather-button-report",style:l.value,onClick:d},[e.createTextVNode("天气预报")]),e.createVNode("button",{class:"f-weather-button f-weather-button-proindex",style:s.value,onClick:u},[e.createTextVNode("其它参数")])]),e.createVNode("div",{style:p.value},[r()]),e.createVNode("div",{style:c.value},[i()])])}return{renderWeatherDetail:f}}var Ii={exports:{}},Ei={exports:{}},Rn=1e3,jn=Rn*60,_n=jn*60,Hn=_n*24,o2=Hn*365.25,a2=function(t,n){n=n||{};var o=typeof t;if(o==="string"&&t.length>0)return r2(t);if(o==="number"&&isNaN(t)===!1)return n.long?s2(t):i2(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function r2(t){if(t=String(t),!(t.length>100)){var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(n){var o=parseFloat(n[1]),a=(n[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return o*o2;case"days":case"day":case"d":return o*Hn;case"hours":case"hour":case"hrs":case"hr":case"h":return o*_n;case"minutes":case"minute":case"mins":case"min":case"m":return o*jn;case"seconds":case"second":case"secs":case"sec":case"s":return o*Rn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function i2(t){return t>=Hn?Math.round(t/Hn)+"d":t>=_n?Math.round(t/_n)+"h":t>=jn?Math.round(t/jn)+"m":t>=Rn?Math.round(t/Rn)+"s":t+"ms"}function s2(t){return Po(t,Hn,"day")||Po(t,_n,"hour")||Po(t,jn,"minute")||Po(t,Rn,"second")||t+" ms"}function Po(t,n,o){if(!(t<n))return t<n*1.5?Math.floor(t/n)+" "+o:Math.ceil(t/n)+" "+o+"s"}(function(t,n){n=t.exports=r.debug=r.default=r,n.coerce=p,n.disable=l,n.enable=i,n.enabled=s,n.humanize=a2,n.names=[],n.skips=[],n.formatters={};var o;function a(c){var d=0,u;for(u in c)d=(d<<5)-d+c.charCodeAt(u),d|=0;return n.colors[Math.abs(d)%n.colors.length]}function r(c){function d(){if(d.enabled){var u=d,f=+new Date,g=f-(o||f);u.diff=g,u.prev=o,u.curr=f,o=f;for(var m=new Array(arguments.length),h=0;h<m.length;h++)m[h]=arguments[h];m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");var y=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,function(v,x){if(v==="%%")return v;y++;var C=n.formatters[x];if(typeof C=="function"){var w=m[y];v=C.call(u,w),m.splice(y,1),y--}return v}),n.formatArgs.call(u,m);var b=d.log||n.log||console.log.bind(console);b.apply(u,m)}}return d.namespace=c,d.enabled=n.enabled(c),d.useColors=n.useColors(),d.color=a(c),typeof n.init=="function"&&n.init(d),d}function i(c){n.save(c),n.names=[],n.skips=[];for(var d=(typeof c=="string"?c:"").split(/[\s,]+/),u=d.length,f=0;f<u;f++)d[f]&&(c=d[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.substr(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function l(){n.enable("")}function s(c){var d,u;for(d=0,u=n.skips.length;d<u;d++)if(n.skips[d].test(c))return!1;for(d=0,u=n.names.length;d<u;d++)if(n.names[d].test(c))return!0;return!1}function p(c){return c instanceof Error?c.stack||c.message:c}})(Ei,Ei.exports);var l2=Ei.exports;(function(t,n){n=t.exports=l2,n.log=r,n.formatArgs=a,n.save=i,n.load=l,n.useColors=o,n.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:s(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}n.formatters.j=function(p){try{return JSON.stringify(p)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function a(p){var c=this.useColors;if(p[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+p[0]+(c?"%c ":" ")+"+"+n.humanize(this.diff),!!c){var d="color: "+this.color;p.splice(1,0,d,"color: inherit");var u=0,f=0;p[0].replace(/%[a-zA-Z%]/g,function(g){g!=="%%"&&(u++,g==="%c"&&(f=u))}),p.splice(f,0,d)}}function r(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(p){try{p==null?n.storage.removeItem("debug"):n.storage.debug=p}catch{}}function l(){var p;try{p=n.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p=process.env.DEBUG),p}n.enable(l());function s(){try{return window.localStorage}catch{}}})(Ii,Ii.exports);var c2=Ii.exports,qf=c2("jsonp"),d2=p2,u2=0;function f2(){}function p2(t,n,o){typeof n=="function"&&(o=n,n={}),n||(n={});var a=n.prefix||"__jp",r=n.name||a+u2++,i=n.param||"callback",l=n.timeout!=null?n.timeout:6e4,s=encodeURIComponent,p=document.getElementsByTagName("script")[0]||document.head,c,d;l&&(d=setTimeout(function(){u(),o&&o(new Error("Timeout"))},l));function u(){c.parentNode&&c.parentNode.removeChild(c),window[r]=f2,d&&clearTimeout(d)}function f(){window[r]&&u()}return window[r]=function(g){qf("jsonp got",g),u(),o&&o(null,g)},t+=(~t.indexOf("?")?"&":"?")+i+"="+s(r),t=t.replace("?&","?"),qf('jsonp req "%s"',t),c=document.createElement("script"),c.src=t,p.parentNode.insertBefore(c,p),f}const m2=zo(d2);var zf={exports:{}},Mi={exports:{}};const h2=Zp(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Gf;function _e(){return Gf||(Gf=1,function(t,n){(function(o,a){t.exports=a()})(Fe,function(){var o=o||function(a,r){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof Fe<"u"&&Fe.crypto&&(i=Fe.crypto),!i&&typeof wn=="function")try{i=h2}catch{}var l=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function v(){}return function(x){var C;return v.prototype=x,C=new v,v.prototype=null,C}}(),p={},c=p.lib={},d=c.Base=function(){return{extend:function(v){var x=s(this);return v&&x.mixIn(v),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var x in v)v.hasOwnProperty(x)&&(this[x]=v[x]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=c.WordArray=d.extend({init:function(v,x){v=this.words=v||[],x!=r?this.sigBytes=x:this.sigBytes=v.length*4},toString:function(v){return(v||g).stringify(this)},concat:function(v){var x=this.words,C=v.words,w=this.sigBytes,N=v.sigBytes;if(this.clamp(),w%4)for(var V=0;V<N;V++){var D=C[V>>>2]>>>24-V%4*8&255;x[w+V>>>2]|=D<<24-(w+V)%4*8}else for(var k=0;k<N;k+=4)x[w+k>>>2]=C[k>>>2];return this.sigBytes+=N,this},clamp:function(){var v=this.words,x=this.sigBytes;v[x>>>2]&=4294967295<<32-x%4*8,v.length=a.ceil(x/4)},clone:function(){var v=d.clone.call(this);return v.words=this.words.slice(0),v},random:function(v){for(var x=[],C=0;C<v;C+=4)x.push(l());return new u.init(x,v)}}),f=p.enc={},g=f.Hex={stringify:function(v){for(var x=v.words,C=v.sigBytes,w=[],N=0;N<C;N++){var V=x[N>>>2]>>>24-N%4*8&255;w.push((V>>>4).toString(16)),w.push((V&15).toString(16))}return w.join("")},parse:function(v){for(var x=v.length,C=[],w=0;w<x;w+=2)C[w>>>3]|=parseInt(v.substr(w,2),16)<<24-w%8*4;return new u.init(C,x/2)}},m=f.Latin1={stringify:function(v){for(var x=v.words,C=v.sigBytes,w=[],N=0;N<C;N++){var V=x[N>>>2]>>>24-N%4*8&255;w.push(String.fromCharCode(V))}return w.join("")},parse:function(v){for(var x=v.length,C=[],w=0;w<x;w++)C[w>>>2]|=(v.charCodeAt(w)&255)<<24-w%4*8;return new u.init(C,x)}},h=f.Utf8={stringify:function(v){try{return decodeURIComponent(escape(m.stringify(v)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(v){return m.parse(unescape(encodeURIComponent(v)))}},y=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(v){typeof v=="string"&&(v=h.parse(v)),this._data.concat(v),this._nDataBytes+=v.sigBytes},_process:function(v){var x,C=this._data,w=C.words,N=C.sigBytes,V=this.blockSize,D=V*4,k=N/D;v?k=a.ceil(k):k=a.max((k|0)-this._minBufferSize,0);var B=k*V,$=a.min(B*4,N);if(B){for(var T=0;T<B;T+=V)this._doProcessBlock(w,T);x=w.splice(0,B),C.sigBytes-=$}return new u.init(x,$)},clone:function(){var v=d.clone.call(this);return v._data=this._data.clone(),v},_minBufferSize:0});c.Hasher=y.extend({cfg:d.extend(),init:function(v){this.cfg=this.cfg.extend(v),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(v){return this._append(v),this._process(),this},finalize:function(v){v&&this._append(v);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(v){return function(x,C){return new v.init(C).finalize(x)}},_createHmacHelper:function(v){return function(x,C){return new b.HMAC.init(v,C).finalize(x)}}});var b=p.algo={};return p}(Math);return o})}(Mi)),Mi.exports}var Pi={exports:{}},Uf;function Oo(){return Uf||(Uf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(a){var r=o,i=r.lib,l=i.Base,s=i.WordArray,p=r.x64={};p.Word=l.extend({init:function(c,d){this.high=c,this.low=d}}),p.WordArray=l.extend({init:function(c,d){c=this.words=c||[],d!=a?this.sigBytes=d:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,d=c.length,u=[],f=0;f<d;f++){var g=c[f];u.push(g.high),u.push(g.low)}return s.create(u,this.sigBytes)},clone:function(){for(var c=l.clone.call(this),d=c.words=this.words.slice(0),u=d.length,f=0;f<u;f++)d[f]=d[f].clone();return c}})}(),o})}(Pi)),Pi.exports}var Oi={exports:{}},Yf;function g2(){return Yf||(Yf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(){if(typeof ArrayBuffer=="function"){var a=o,r=a.lib,i=r.WordArray,l=i.init,s=i.init=function(p){if(p instanceof ArrayBuffer&&(p=new Uint8Array(p)),(p instanceof Int8Array||typeof Uint8ClampedArray<"u"&&p instanceof Uint8ClampedArray||p instanceof Int16Array||p instanceof Uint16Array||p instanceof Int32Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array)&&(p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength)),p instanceof Uint8Array){for(var c=p.byteLength,d=[],u=0;u<c;u++)d[u>>>2]|=p[u]<<24-u%4*8;l.call(this,d,c)}else l.apply(this,arguments)};s.prototype=i}}(),o.lib.WordArray})}(Oi)),Oi.exports}var Ri={exports:{}},Kf;function y2(){return Kf||(Kf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,l=a.enc;l.Utf16=l.Utf16BE={stringify:function(p){for(var c=p.words,d=p.sigBytes,u=[],f=0;f<d;f+=2){var g=c[f>>>2]>>>16-f%4*8&65535;u.push(String.fromCharCode(g))}return u.join("")},parse:function(p){for(var c=p.length,d=[],u=0;u<c;u++)d[u>>>1]|=p.charCodeAt(u)<<16-u%2*16;return i.create(d,c*2)}},l.Utf16LE={stringify:function(p){for(var c=p.words,d=p.sigBytes,u=[],f=0;f<d;f+=2){var g=s(c[f>>>2]>>>16-f%4*8&65535);u.push(String.fromCharCode(g))}return u.join("")},parse:function(p){for(var c=p.length,d=[],u=0;u<c;u++)d[u>>>1]|=s(p.charCodeAt(u)<<16-u%2*16);return i.create(d,c*2)}};function s(p){return p<<8&4278255360|p>>>8&16711935}}(),o.enc.Utf16})}(Ri)),Ri.exports}var ji={exports:{}},Xf;function Yt(){return Xf||(Xf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,l=a.enc;l.Base64={stringify:function(p){var c=p.words,d=p.sigBytes,u=this._map;p.clamp();for(var f=[],g=0;g<d;g+=3)for(var m=c[g>>>2]>>>24-g%4*8&255,h=c[g+1>>>2]>>>24-(g+1)%4*8&255,y=c[g+2>>>2]>>>24-(g+2)%4*8&255,b=m<<16|h<<8|y,v=0;v<4&&g+v*.75<d;v++)f.push(u.charAt(b>>>6*(3-v)&63));var x=u.charAt(64);if(x)for(;f.length%4;)f.push(x);return f.join("")},parse:function(p){var c=p.length,d=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var f=0;f<d.length;f++)u[d.charCodeAt(f)]=f}var g=d.charAt(64);if(g){var m=p.indexOf(g);m!==-1&&(c=m)}return s(p,c,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(p,c,d){for(var u=[],f=0,g=0;g<c;g++)if(g%4){var m=d[p.charCodeAt(g-1)]<<g%4*2,h=d[p.charCodeAt(g)]>>>6-g%4*2,y=m|h;u[f>>>2]|=y<<24-f%4*8,f++}return i.create(u,f)}}(),o.enc.Base64})}(ji)),ji.exports}var _i={exports:{}},Qf;function b2(){return Qf||(Qf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,l=a.enc;l.Base64url={stringify:function(p,c){c===void 0&&(c=!0);var d=p.words,u=p.sigBytes,f=c?this._safe_map:this._map;p.clamp();for(var g=[],m=0;m<u;m+=3)for(var h=d[m>>>2]>>>24-m%4*8&255,y=d[m+1>>>2]>>>24-(m+1)%4*8&255,b=d[m+2>>>2]>>>24-(m+2)%4*8&255,v=h<<16|y<<8|b,x=0;x<4&&m+x*.75<u;x++)g.push(f.charAt(v>>>6*(3-x)&63));var C=f.charAt(64);if(C)for(;g.length%4;)g.push(C);return g.join("")},parse:function(p,c){c===void 0&&(c=!0);var d=p.length,u=c?this._safe_map:this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var g=0;g<u.length;g++)f[u.charCodeAt(g)]=g}var m=u.charAt(64);if(m){var h=p.indexOf(m);h!==-1&&(d=h)}return s(p,d,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(p,c,d){for(var u=[],f=0,g=0;g<c;g++)if(g%4){var m=d[p.charCodeAt(g-1)]<<g%4*2,h=d[p.charCodeAt(g)]>>>6-g%4*2,y=m|h;u[f>>>2]|=y<<24-f%4*8,f++}return i.create(u,f)}}(),o.enc.Base64url})}(_i)),_i.exports}var Hi={exports:{}},Zf;function Kt(){return Zf||(Zf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(a){var r=o,i=r.lib,l=i.WordArray,s=i.Hasher,p=r.algo,c=[];(function(){for(var h=0;h<64;h++)c[h]=a.abs(a.sin(h+1))*4294967296|0})();var d=p.MD5=s.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,y){for(var b=0;b<16;b++){var v=y+b,x=h[v];h[v]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var C=this._hash.words,w=h[y+0],N=h[y+1],V=h[y+2],D=h[y+3],k=h[y+4],B=h[y+5],$=h[y+6],T=h[y+7],S=h[y+8],F=h[y+9],A=h[y+10],E=h[y+11],I=h[y+12],R=h[y+13],O=h[y+14],G=h[y+15],M=C[0],j=C[1],H=C[2],_=C[3];M=u(M,j,H,_,w,7,c[0]),_=u(_,M,j,H,N,12,c[1]),H=u(H,_,M,j,V,17,c[2]),j=u(j,H,_,M,D,22,c[3]),M=u(M,j,H,_,k,7,c[4]),_=u(_,M,j,H,B,12,c[5]),H=u(H,_,M,j,$,17,c[6]),j=u(j,H,_,M,T,22,c[7]),M=u(M,j,H,_,S,7,c[8]),_=u(_,M,j,H,F,12,c[9]),H=u(H,_,M,j,A,17,c[10]),j=u(j,H,_,M,E,22,c[11]),M=u(M,j,H,_,I,7,c[12]),_=u(_,M,j,H,R,12,c[13]),H=u(H,_,M,j,O,17,c[14]),j=u(j,H,_,M,G,22,c[15]),M=f(M,j,H,_,N,5,c[16]),_=f(_,M,j,H,$,9,c[17]),H=f(H,_,M,j,E,14,c[18]),j=f(j,H,_,M,w,20,c[19]),M=f(M,j,H,_,B,5,c[20]),_=f(_,M,j,H,A,9,c[21]),H=f(H,_,M,j,G,14,c[22]),j=f(j,H,_,M,k,20,c[23]),M=f(M,j,H,_,F,5,c[24]),_=f(_,M,j,H,O,9,c[25]),H=f(H,_,M,j,D,14,c[26]),j=f(j,H,_,M,S,20,c[27]),M=f(M,j,H,_,R,5,c[28]),_=f(_,M,j,H,V,9,c[29]),H=f(H,_,M,j,T,14,c[30]),j=f(j,H,_,M,I,20,c[31]),M=g(M,j,H,_,B,4,c[32]),_=g(_,M,j,H,S,11,c[33]),H=g(H,_,M,j,E,16,c[34]),j=g(j,H,_,M,O,23,c[35]),M=g(M,j,H,_,N,4,c[36]),_=g(_,M,j,H,k,11,c[37]),H=g(H,_,M,j,T,16,c[38]),j=g(j,H,_,M,A,23,c[39]),M=g(M,j,H,_,R,4,c[40]),_=g(_,M,j,H,w,11,c[41]),H=g(H,_,M,j,D,16,c[42]),j=g(j,H,_,M,$,23,c[43]),M=g(M,j,H,_,F,4,c[44]),_=g(_,M,j,H,I,11,c[45]),H=g(H,_,M,j,G,16,c[46]),j=g(j,H,_,M,V,23,c[47]),M=m(M,j,H,_,w,6,c[48]),_=m(_,M,j,H,T,10,c[49]),H=m(H,_,M,j,O,15,c[50]),j=m(j,H,_,M,B,21,c[51]),M=m(M,j,H,_,I,6,c[52]),_=m(_,M,j,H,D,10,c[53]),H=m(H,_,M,j,A,15,c[54]),j=m(j,H,_,M,N,21,c[55]),M=m(M,j,H,_,S,6,c[56]),_=m(_,M,j,H,G,10,c[57]),H=m(H,_,M,j,$,15,c[58]),j=m(j,H,_,M,R,21,c[59]),M=m(M,j,H,_,k,6,c[60]),_=m(_,M,j,H,E,10,c[61]),H=m(H,_,M,j,V,15,c[62]),j=m(j,H,_,M,F,21,c[63]),C[0]=C[0]+M|0,C[1]=C[1]+j|0,C[2]=C[2]+H|0,C[3]=C[3]+_|0},_doFinalize:function(){var h=this._data,y=h.words,b=this._nDataBytes*8,v=h.sigBytes*8;y[v>>>5]|=128<<24-v%32;var x=a.floor(b/4294967296),C=b;y[(v+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,y[(v+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,h.sigBytes=(y.length+1)*4,this._process();for(var w=this._hash,N=w.words,V=0;V<4;V++){var D=N[V];N[V]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return w},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});function u(h,y,b,v,x,C,w){var N=h+(y&b|~y&v)+x+w;return(N<<C|N>>>32-C)+y}function f(h,y,b,v,x,C,w){var N=h+(y&v|b&~v)+x+w;return(N<<C|N>>>32-C)+y}function g(h,y,b,v,x,C,w){var N=h+(y^b^v)+x+w;return(N<<C|N>>>32-C)+y}function m(h,y,b,v,x,C,w){var N=h+(b^(y|~v))+x+w;return(N<<C|N>>>32-C)+y}r.MD5=s._createHelper(d),r.HmacMD5=s._createHmacHelper(d)}(Math),o.MD5})}(Hi)),Hi.exports}var Li={exports:{}},Jf;function ep(){return Jf||(Jf=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,l=r.Hasher,s=a.algo,p=[],c=s.SHA1=l.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,u){for(var f=this._hash.words,g=f[0],m=f[1],h=f[2],y=f[3],b=f[4],v=0;v<80;v++){if(v<16)p[v]=d[u+v]|0;else{var x=p[v-3]^p[v-8]^p[v-14]^p[v-16];p[v]=x<<1|x>>>31}var C=(g<<5|g>>>27)+b+p[v];v<20?C+=(m&h|~m&y)+1518500249:v<40?C+=(m^h^y)+1859775393:v<60?C+=(m&h|m&y|h&y)-1894007588:C+=(m^h^y)-899497514,b=y,y=h,h=m<<30|m>>>2,m=g,g=C}f[0]=f[0]+g|0,f[1]=f[1]+m|0,f[2]=f[2]+h|0,f[3]=f[3]+y|0,f[4]=f[4]+b|0},_doFinalize:function(){var d=this._data,u=d.words,f=this._nDataBytes*8,g=d.sigBytes*8;return u[g>>>5]|=128<<24-g%32,u[(g+64>>>9<<4)+14]=Math.floor(f/4294967296),u[(g+64>>>9<<4)+15]=f,d.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var d=l.clone.call(this);return d._hash=this._hash.clone(),d}});a.SHA1=l._createHelper(c),a.HmacSHA1=l._createHmacHelper(c)}(),o.SHA1})}(Li)),Li.exports}var Wi={exports:{}},tp;function qi(){return tp||(tp=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){return function(a){var r=o,i=r.lib,l=i.WordArray,s=i.Hasher,p=r.algo,c=[],d=[];(function(){function g(b){for(var v=a.sqrt(b),x=2;x<=v;x++)if(!(b%x))return!1;return!0}function m(b){return(b-(b|0))*4294967296|0}for(var h=2,y=0;y<64;)g(h)&&(y<8&&(c[y]=m(a.pow(h,1/2))),d[y]=m(a.pow(h,1/3)),y++),h++})();var u=[],f=p.SHA256=s.extend({_doReset:function(){this._hash=new l.init(c.slice(0))},_doProcessBlock:function(g,m){for(var h=this._hash.words,y=h[0],b=h[1],v=h[2],x=h[3],C=h[4],w=h[5],N=h[6],V=h[7],D=0;D<64;D++){if(D<16)u[D]=g[m+D]|0;else{var k=u[D-15],B=(k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3,$=u[D-2],T=($<<15|$>>>17)^($<<13|$>>>19)^$>>>10;u[D]=B+u[D-7]+T+u[D-16]}var S=C&w^~C&N,F=y&b^y&v^b&v,A=(y<<30|y>>>2)^(y<<19|y>>>13)^(y<<10|y>>>22),E=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),I=V+E+S+d[D]+u[D],R=A+F;V=N,N=w,w=C,C=x+I|0,x=v,v=b,b=y,y=I+R|0}h[0]=h[0]+y|0,h[1]=h[1]+b|0,h[2]=h[2]+v|0,h[3]=h[3]+x|0,h[4]=h[4]+C|0,h[5]=h[5]+w|0,h[6]=h[6]+N|0,h[7]=h[7]+V|0},_doFinalize:function(){var g=this._data,m=g.words,h=this._nDataBytes*8,y=g.sigBytes*8;return m[y>>>5]|=128<<24-y%32,m[(y+64>>>9<<4)+14]=a.floor(h/4294967296),m[(y+64>>>9<<4)+15]=h,g.sigBytes=m.length*4,this._process(),this._hash},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});r.SHA256=s._createHelper(f),r.HmacSHA256=s._createHmacHelper(f)}(Math),o.SHA256})}(Wi)),Wi.exports}var zi={exports:{}},np;function v2(){return np||(np=1,function(t,n){(function(o,a,r){t.exports=a(_e(),qi())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,l=a.algo,s=l.SHA256,p=l.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=s._doFinalize.call(this);return c.sigBytes-=4,c}});a.SHA224=s._createHelper(p),a.HmacSHA224=s._createHmacHelper(p)}(),o.SHA224})}(zi)),zi.exports}var Gi={exports:{}},op;function ap(){return op||(op=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Oo())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.Hasher,l=a.x64,s=l.Word,p=l.WordArray,c=a.algo;function d(){return s.create.apply(s,arguments)}var u=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],f=[];(function(){for(var m=0;m<80;m++)f[m]=d()})();var g=c.SHA512=i.extend({_doReset:function(){this._hash=new p.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(m,h){for(var y=this._hash.words,b=y[0],v=y[1],x=y[2],C=y[3],w=y[4],N=y[5],V=y[6],D=y[7],k=b.high,B=b.low,$=v.high,T=v.low,S=x.high,F=x.low,A=C.high,E=C.low,I=w.high,R=w.low,O=N.high,G=N.low,M=V.high,j=V.low,H=D.high,_=D.low,W=k,K=B,z=$,q=T,L=S,X=F,U=A,Z=E,re=I,de=R,ge=O,ie=G,te=M,J=j,le=H,fe=_,Me=0;Me<80;Me++){var Ie,Le,Ce=f[Me];if(Me<16)Le=Ce.high=m[h+Me*2]|0,Ie=Ce.low=m[h+Me*2+1]|0;else{var pe=f[Me-15],he=pe.high,De=pe.low,Ge=(he>>>1|De<<31)^(he>>>8|De<<24)^he>>>7,se=(De>>>1|he<<31)^(De>>>8|he<<24)^(De>>>7|he<<25),ye=f[Me-2],Ve=ye.high,Pe=ye.low,Ye=(Ve>>>19|Pe<<13)^(Ve<<3|Pe>>>29)^Ve>>>6,Ze=(Pe>>>19|Ve<<13)^(Pe<<3|Ve>>>29)^(Pe>>>6|Ve<<26),Ue=f[Me-7],be=Ue.high,Xe=Ue.low,st=f[Me-16],bt=st.high,lt=st.low;Ie=se+Xe,Le=Ge+be+(Ie>>>0<se>>>0?1:0),Ie=Ie+Ze,Le=Le+Ye+(Ie>>>0<Ze>>>0?1:0),Ie=Ie+lt,Le=Le+bt+(Ie>>>0<lt>>>0?1:0),Ce.high=Le,Ce.low=Ie}var ct=re&ge^~re&te,$t=de&ie^~de&J,wt=W&z^W&L^z&L,We=K&q^K&X^q&X,Dt=(W>>>28|K<<4)^(W<<30|K>>>2)^(W<<25|K>>>7),Tt=(K>>>28|W<<4)^(K<<30|W>>>2)^(K<<25|W>>>7),Ke=(re>>>14|de<<18)^(re>>>18|de<<14)^(re<<23|de>>>9),oe=(de>>>14|re<<18)^(de>>>18|re<<14)^(de<<23|re>>>9),Y=u[Me],ne=Y.high,ce=Y.low,ue=fe+oe,Te=le+Ke+(ue>>>0<fe>>>0?1:0),ue=ue+$t,Te=Te+ct+(ue>>>0<$t>>>0?1:0),ue=ue+ce,Te=Te+ne+(ue>>>0<ce>>>0?1:0),ue=ue+Ie,Te=Te+Le+(ue>>>0<Ie>>>0?1:0),Oe=Tt+We,Je=Dt+wt+(Oe>>>0<Tt>>>0?1:0);le=te,fe=J,te=ge,J=ie,ge=re,ie=de,de=Z+ue|0,re=U+Te+(de>>>0<Z>>>0?1:0)|0,U=L,Z=X,L=z,X=q,z=W,q=K,K=ue+Oe|0,W=Te+Je+(K>>>0<ue>>>0?1:0)|0}B=b.low=B+K,b.high=k+W+(B>>>0<K>>>0?1:0),T=v.low=T+q,v.high=$+z+(T>>>0<q>>>0?1:0),F=x.low=F+X,x.high=S+L+(F>>>0<X>>>0?1:0),E=C.low=E+Z,C.high=A+U+(E>>>0<Z>>>0?1:0),R=w.low=R+de,w.high=I+re+(R>>>0<de>>>0?1:0),G=N.low=G+ie,N.high=O+ge+(G>>>0<ie>>>0?1:0),j=V.low=j+J,V.high=M+te+(j>>>0<J>>>0?1:0),_=D.low=_+fe,D.high=H+le+(_>>>0<fe>>>0?1:0)},_doFinalize:function(){var m=this._data,h=m.words,y=this._nDataBytes*8,b=m.sigBytes*8;h[b>>>5]|=128<<24-b%32,h[(b+128>>>10<<5)+30]=Math.floor(y/4294967296),h[(b+128>>>10<<5)+31]=y,m.sigBytes=h.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var m=i.clone.call(this);return m._hash=this._hash.clone(),m},blockSize:1024/32});a.SHA512=i._createHelper(g),a.HmacSHA512=i._createHmacHelper(g)}(),o.SHA512})}(Gi)),Gi.exports}var Ui={exports:{}},rp;function x2(){return rp||(rp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Oo(),ap())})(Fe,function(o){return function(){var a=o,r=a.x64,i=r.Word,l=r.WordArray,s=a.algo,p=s.SHA512,c=s.SHA384=p.extend({_doReset:function(){this._hash=new l.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var d=p._doFinalize.call(this);return d.sigBytes-=16,d}});a.SHA384=p._createHelper(c),a.HmacSHA384=p._createHmacHelper(c)}(),o.SHA384})}(Ui)),Ui.exports}var Yi={exports:{}},ip;function C2(){return ip||(ip=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Oo())})(Fe,function(o){return function(a){var r=o,i=r.lib,l=i.WordArray,s=i.Hasher,p=r.x64,c=p.Word,d=r.algo,u=[],f=[],g=[];(function(){for(var y=1,b=0,v=0;v<24;v++){u[y+5*b]=(v+1)*(v+2)/2%64;var x=b%5,C=(2*y+3*b)%5;y=x,b=C}for(var y=0;y<5;y++)for(var b=0;b<5;b++)f[y+5*b]=b+(2*y+3*b)%5*5;for(var w=1,N=0;N<24;N++){for(var V=0,D=0,k=0;k<7;k++){if(w&1){var B=(1<<k)-1;B<32?D^=1<<B:V^=1<<B-32}w&128?w=w<<1^113:w<<=1}g[N]=c.create(V,D)}})();var m=[];(function(){for(var y=0;y<25;y++)m[y]=c.create()})();var h=d.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var y=this._state=[],b=0;b<25;b++)y[b]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(y,b){for(var v=this._state,x=this.blockSize/2,C=0;C<x;C++){var w=y[b+2*C],N=y[b+2*C+1];w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,N=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360;var V=v[C];V.high^=N,V.low^=w}for(var D=0;D<24;D++){for(var k=0;k<5;k++){for(var B=0,$=0,T=0;T<5;T++){var V=v[k+5*T];B^=V.high,$^=V.low}var S=m[k];S.high=B,S.low=$}for(var k=0;k<5;k++)for(var F=m[(k+4)%5],A=m[(k+1)%5],E=A.high,I=A.low,B=F.high^(E<<1|I>>>31),$=F.low^(I<<1|E>>>31),T=0;T<5;T++){var V=v[k+5*T];V.high^=B,V.low^=$}for(var R=1;R<25;R++){var B,$,V=v[R],O=V.high,G=V.low,M=u[R];M<32?(B=O<<M|G>>>32-M,$=G<<M|O>>>32-M):(B=G<<M-32|O>>>64-M,$=O<<M-32|G>>>64-M);var j=m[f[R]];j.high=B,j.low=$}var H=m[0],_=v[0];H.high=_.high,H.low=_.low;for(var k=0;k<5;k++)for(var T=0;T<5;T++){var R=k+5*T,V=v[R],W=m[R],K=m[(k+1)%5+5*T],z=m[(k+2)%5+5*T];V.high=W.high^~K.high&z.high,V.low=W.low^~K.low&z.low}var V=v[0],q=g[D];V.high^=q.high,V.low^=q.low}},_doFinalize:function(){var y=this._data,b=y.words;this._nDataBytes*8;var v=y.sigBytes*8,x=this.blockSize*32;b[v>>>5]|=1<<24-v%32,b[(a.ceil((v+1)/x)*x>>>5)-1]|=128,y.sigBytes=b.length*4,this._process();for(var C=this._state,w=this.cfg.outputLength/8,N=w/8,V=[],D=0;D<N;D++){var k=C[D],B=k.high,$=k.low;B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,$=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360,V.push($),V.push(B)}return new l.init(V,w)},clone:function(){for(var y=s.clone.call(this),b=y._state=this._state.slice(0),v=0;v<25;v++)b[v]=b[v].clone();return y}});r.SHA3=s._createHelper(h),r.HmacSHA3=s._createHmacHelper(h)}(Math),o.SHA3})}(Yi)),Yi.exports}var Ki={exports:{}},sp;function w2(){return sp||(sp=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){/** @preserve
|
|
8
|
+
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
9
|
+
|
|
10
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
11
|
+
|
|
12
|
+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
13
|
+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
16
|
+
*/return function(a){var r=o,i=r.lib,l=i.WordArray,s=i.Hasher,p=r.algo,c=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),g=l.create([0,1518500249,1859775393,2400959708,2840853838]),m=l.create([1352829926,1548603684,1836072691,2053994217,0]),h=p.RIPEMD160=s.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(N,V){for(var D=0;D<16;D++){var k=V+D,B=N[k];N[k]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}var $=this._hash.words,T=g.words,S=m.words,F=c.words,A=d.words,E=u.words,I=f.words,R,O,G,M,j,H,_,W,K,z;H=R=$[0],_=O=$[1],W=G=$[2],K=M=$[3],z=j=$[4];for(var q,D=0;D<80;D+=1)q=R+N[V+F[D]]|0,D<16?q+=y(O,G,M)+T[0]:D<32?q+=b(O,G,M)+T[1]:D<48?q+=v(O,G,M)+T[2]:D<64?q+=x(O,G,M)+T[3]:q+=C(O,G,M)+T[4],q=q|0,q=w(q,E[D]),q=q+j|0,R=j,j=M,M=w(G,10),G=O,O=q,q=H+N[V+A[D]]|0,D<16?q+=C(_,W,K)+S[0]:D<32?q+=x(_,W,K)+S[1]:D<48?q+=v(_,W,K)+S[2]:D<64?q+=b(_,W,K)+S[3]:q+=y(_,W,K)+S[4],q=q|0,q=w(q,I[D]),q=q+z|0,H=z,z=K,K=w(W,10),W=_,_=q;q=$[1]+G+K|0,$[1]=$[2]+M+z|0,$[2]=$[3]+j+H|0,$[3]=$[4]+R+_|0,$[4]=$[0]+O+W|0,$[0]=q},_doFinalize:function(){var N=this._data,V=N.words,D=this._nDataBytes*8,k=N.sigBytes*8;V[k>>>5]|=128<<24-k%32,V[(k+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,N.sigBytes=(V.length+1)*4,this._process();for(var B=this._hash,$=B.words,T=0;T<5;T++){var S=$[T];$[T]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return B},clone:function(){var N=s.clone.call(this);return N._hash=this._hash.clone(),N}});function y(N,V,D){return N^V^D}function b(N,V,D){return N&V|~N&D}function v(N,V,D){return(N|~V)^D}function x(N,V,D){return N&D|V&~D}function C(N,V,D){return N^(V|~D)}function w(N,V){return N<<V|N>>>32-V}r.RIPEMD160=s._createHelper(h),r.HmacRIPEMD160=s._createHmacHelper(h)}(),o.RIPEMD160})}(Ki)),Ki.exports}var Xi={exports:{}},lp;function Qi(){return lp||(lp=1,function(t,n){(function(o,a){t.exports=a(_e())})(Fe,function(o){(function(){var a=o,r=a.lib,i=r.Base,l=a.enc,s=l.Utf8,p=a.algo;p.HMAC=i.extend({init:function(c,d){c=this._hasher=new c.init,typeof d=="string"&&(d=s.parse(d));var u=c.blockSize,f=u*4;d.sigBytes>f&&(d=c.finalize(d)),d.clamp();for(var g=this._oKey=d.clone(),m=this._iKey=d.clone(),h=g.words,y=m.words,b=0;b<u;b++)h[b]^=1549556828,y[b]^=909522486;g.sigBytes=m.sigBytes=f,this.reset()},reset:function(){var c=this._hasher;c.reset(),c.update(this._iKey)},update:function(c){return this._hasher.update(c),this},finalize:function(c){var d=this._hasher,u=d.finalize(c);d.reset();var f=d.finalize(this._oKey.clone().concat(u));return f}})})()})}(Xi)),Xi.exports}var Zi={exports:{}},cp;function N2(){return cp||(cp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),qi(),Qi())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.Base,l=r.WordArray,s=a.algo,p=s.SHA256,c=s.HMAC,d=s.PBKDF2=i.extend({cfg:i.extend({keySize:128/32,hasher:p,iterations:25e4}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,f){for(var g=this.cfg,m=c.create(g.hasher,u),h=l.create(),y=l.create([1]),b=h.words,v=y.words,x=g.keySize,C=g.iterations;b.length<x;){var w=m.update(f).finalize(y);m.reset();for(var N=w.words,V=N.length,D=w,k=1;k<C;k++){D=m.finalize(D),m.reset();for(var B=D.words,$=0;$<V;$++)N[$]^=B[$]}h.concat(w),v[0]++}return h.sigBytes=x*4,h}});a.PBKDF2=function(u,f,g){return d.create(g).compute(u,f)}}(),o.PBKDF2})}(Zi)),Zi.exports}var Ji={exports:{}},dp;function Ht(){return dp||(dp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),ep(),Qi())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.Base,l=r.WordArray,s=a.algo,p=s.MD5,c=s.EvpKDF=i.extend({cfg:i.extend({keySize:128/32,hasher:p,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,u){for(var f,g=this.cfg,m=g.hasher.create(),h=l.create(),y=h.words,b=g.keySize,v=g.iterations;y.length<b;){f&&m.update(f),f=m.update(d).finalize(u),m.reset();for(var x=1;x<v;x++)f=m.finalize(f),m.reset();h.concat(f)}return h.sigBytes=b*4,h}});a.EvpKDF=function(d,u,f){return c.create(f).compute(d,u)}}(),o.EvpKDF})}(Ji)),Ji.exports}var es={exports:{}},up;function gt(){return up||(up=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Ht())})(Fe,function(o){o.lib.Cipher||function(a){var r=o,i=r.lib,l=i.Base,s=i.WordArray,p=i.BufferedBlockAlgorithm,c=r.enc;c.Utf8;var d=c.Base64,u=r.algo,f=u.EvpKDF,g=i.Cipher=p.extend({cfg:l.extend(),createEncryptor:function(B,$){return this.create(this._ENC_XFORM_MODE,B,$)},createDecryptor:function(B,$){return this.create(this._DEC_XFORM_MODE,B,$)},init:function(B,$,T){this.cfg=this.cfg.extend(T),this._xformMode=B,this._key=$,this.reset()},reset:function(){p.reset.call(this),this._doReset()},process:function(B){return this._append(B),this._process()},finalize:function(B){B&&this._append(B);var $=this._doFinalize();return $},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function B($){return typeof $=="string"?k:N}return function($){return{encrypt:function(T,S,F){return B(S).encrypt($,T,S,F)},decrypt:function(T,S,F){return B(S).decrypt($,T,S,F)}}}}()});i.StreamCipher=g.extend({_doFinalize:function(){var B=this._process(!0);return B},blockSize:1});var m=r.mode={},h=i.BlockCipherMode=l.extend({createEncryptor:function(B,$){return this.Encryptor.create(B,$)},createDecryptor:function(B,$){return this.Decryptor.create(B,$)},init:function(B,$){this._cipher=B,this._iv=$}}),y=m.CBC=function(){var B=h.extend();B.Encryptor=B.extend({processBlock:function(T,S){var F=this._cipher,A=F.blockSize;$.call(this,T,S,A),F.encryptBlock(T,S),this._prevBlock=T.slice(S,S+A)}}),B.Decryptor=B.extend({processBlock:function(T,S){var F=this._cipher,A=F.blockSize,E=T.slice(S,S+A);F.decryptBlock(T,S),$.call(this,T,S,A),this._prevBlock=E}});function $(T,S,F){var A,E=this._iv;E?(A=E,this._iv=a):A=this._prevBlock;for(var I=0;I<F;I++)T[S+I]^=A[I]}return B}(),b=r.pad={},v=b.Pkcs7={pad:function(B,$){for(var T=$*4,S=T-B.sigBytes%T,F=S<<24|S<<16|S<<8|S,A=[],E=0;E<S;E+=4)A.push(F);var I=s.create(A,S);B.concat(I)},unpad:function(B){var $=B.words[B.sigBytes-1>>>2]&255;B.sigBytes-=$}};i.BlockCipher=g.extend({cfg:g.cfg.extend({mode:y,padding:v}),reset:function(){var B;g.reset.call(this);var $=this.cfg,T=$.iv,S=$.mode;this._xformMode==this._ENC_XFORM_MODE?B=S.createEncryptor:(B=S.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==B?this._mode.init(this,T&&T.words):(this._mode=B.call(S,this,T&&T.words),this._mode.__creator=B)},_doProcessBlock:function(B,$){this._mode.processBlock(B,$)},_doFinalize:function(){var B,$=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?($.pad(this._data,this.blockSize),B=this._process(!0)):(B=this._process(!0),$.unpad(B)),B},blockSize:128/32});var x=i.CipherParams=l.extend({init:function(B){this.mixIn(B)},toString:function(B){return(B||this.formatter).stringify(this)}}),C=r.format={},w=C.OpenSSL={stringify:function(B){var $,T=B.ciphertext,S=B.salt;return S?$=s.create([1398893684,1701076831]).concat(S).concat(T):$=T,$.toString(d)},parse:function(B){var $,T=d.parse(B),S=T.words;return S[0]==1398893684&&S[1]==1701076831&&($=s.create(S.slice(2,4)),S.splice(0,4),T.sigBytes-=16),x.create({ciphertext:T,salt:$})}},N=i.SerializableCipher=l.extend({cfg:l.extend({format:w}),encrypt:function(B,$,T,S){S=this.cfg.extend(S);var F=B.createEncryptor(T,S),A=F.finalize($),E=F.cfg;return x.create({ciphertext:A,key:T,iv:E.iv,algorithm:B,mode:E.mode,padding:E.padding,blockSize:B.blockSize,formatter:S.format})},decrypt:function(B,$,T,S){S=this.cfg.extend(S),$=this._parse($,S.format);var F=B.createDecryptor(T,S).finalize($.ciphertext);return F},_parse:function(B,$){return typeof B=="string"?$.parse(B,this):B}}),V=r.kdf={},D=V.OpenSSL={execute:function(B,$,T,S,F){if(S||(S=s.random(64/8)),F)var A=f.create({keySize:$+T,hasher:F}).compute(B,S);else var A=f.create({keySize:$+T}).compute(B,S);var E=s.create(A.words.slice($),T*4);return A.sigBytes=$*4,x.create({key:A,iv:E,salt:S})}},k=i.PasswordBasedCipher=N.extend({cfg:N.cfg.extend({kdf:D}),encrypt:function(B,$,T,S){S=this.cfg.extend(S);var F=S.kdf.execute(T,B.keySize,B.ivSize,S.salt,S.hasher);S.iv=F.iv;var A=N.encrypt.call(this,B,$,F.key,S);return A.mixIn(F),A},decrypt:function(B,$,T,S){S=this.cfg.extend(S),$=this._parse($,S.format);var F=S.kdf.execute(T,B.keySize,B.ivSize,$.salt,S.hasher);S.iv=F.iv;var A=N.decrypt.call(this,B,$,F.key,S);return A}})}()})}(es)),es.exports}var ts={exports:{}},fp;function V2(){return fp||(fp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.mode.CFB=function(){var a=o.lib.BlockCipherMode.extend();a.Encryptor=a.extend({processBlock:function(i,l){var s=this._cipher,p=s.blockSize;r.call(this,i,l,p,s),this._prevBlock=i.slice(l,l+p)}}),a.Decryptor=a.extend({processBlock:function(i,l){var s=this._cipher,p=s.blockSize,c=i.slice(l,l+p);r.call(this,i,l,p,s),this._prevBlock=c}});function r(i,l,s,p){var c,d=this._iv;d?(c=d.slice(0),this._iv=void 0):c=this._prevBlock,p.encryptBlock(c,0);for(var u=0;u<s;u++)i[l+u]^=c[u]}return a}(),o.mode.CFB})}(ts)),ts.exports}var ns={exports:{}},pp;function S2(){return pp||(pp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.mode.CTR=function(){var a=o.lib.BlockCipherMode.extend(),r=a.Encryptor=a.extend({processBlock:function(i,l){var s=this._cipher,p=s.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);var u=d.slice(0);s.encryptBlock(u,0),d[p-1]=d[p-1]+1|0;for(var f=0;f<p;f++)i[l+f]^=u[f]}});return a.Decryptor=r,a}(),o.mode.CTR})}(ns)),ns.exports}var os={exports:{}},mp;function $2(){return mp||(mp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){/** @preserve
|
|
17
|
+
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
18
|
+
* derived from CryptoJS.mode.CTR
|
|
19
|
+
* Jan Hruby jhruby.web@gmail.com
|
|
20
|
+
*/return o.mode.CTRGladman=function(){var a=o.lib.BlockCipherMode.extend();function r(s){if((s>>24&255)===255){var p=s>>16&255,c=s>>8&255,d=s&255;p===255?(p=0,c===255?(c=0,d===255?d=0:++d):++c):++p,s=0,s+=p<<16,s+=c<<8,s+=d}else s+=1<<24;return s}function i(s){return(s[0]=r(s[0]))===0&&(s[1]=r(s[1])),s}var l=a.Encryptor=a.extend({processBlock:function(s,p){var c=this._cipher,d=c.blockSize,u=this._iv,f=this._counter;u&&(f=this._counter=u.slice(0),this._iv=void 0),i(f);var g=f.slice(0);c.encryptBlock(g,0);for(var m=0;m<d;m++)s[p+m]^=g[m]}});return a.Decryptor=l,a}(),o.mode.CTRGladman})}(os)),os.exports}var as={exports:{}},hp;function D2(){return hp||(hp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.mode.OFB=function(){var a=o.lib.BlockCipherMode.extend(),r=a.Encryptor=a.extend({processBlock:function(i,l){var s=this._cipher,p=s.blockSize,c=this._iv,d=this._keystream;c&&(d=this._keystream=c.slice(0),this._iv=void 0),s.encryptBlock(d,0);for(var u=0;u<p;u++)i[l+u]^=d[u]}});return a.Decryptor=r,a}(),o.mode.OFB})}(as)),as.exports}var rs={exports:{}},gp;function k2(){return gp||(gp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.mode.ECB=function(){var a=o.lib.BlockCipherMode.extend();return a.Encryptor=a.extend({processBlock:function(r,i){this._cipher.encryptBlock(r,i)}}),a.Decryptor=a.extend({processBlock:function(r,i){this._cipher.decryptBlock(r,i)}}),a}(),o.mode.ECB})}(rs)),rs.exports}var is={exports:{}},yp;function B2(){return yp||(yp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.pad.AnsiX923={pad:function(a,r){var i=a.sigBytes,l=r*4,s=l-i%l,p=i+s-1;a.clamp(),a.words[p>>>2]|=s<<24-p%4*8,a.sigBytes+=s},unpad:function(a){var r=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=r}},o.pad.Ansix923})}(is)),is.exports}var ss={exports:{}},bp;function T2(){return bp||(bp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.pad.Iso10126={pad:function(a,r){var i=r*4,l=i-a.sigBytes%i;a.concat(o.lib.WordArray.random(l-1)).concat(o.lib.WordArray.create([l<<24],1))},unpad:function(a){var r=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=r}},o.pad.Iso10126})}(ss)),ss.exports}var ls={exports:{}},vp;function F2(){return vp||(vp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.pad.Iso97971={pad:function(a,r){a.concat(o.lib.WordArray.create([2147483648],1)),o.pad.ZeroPadding.pad(a,r)},unpad:function(a){o.pad.ZeroPadding.unpad(a),a.sigBytes--}},o.pad.Iso97971})}(ls)),ls.exports}var cs={exports:{}},xp;function A2(){return xp||(xp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.pad.ZeroPadding={pad:function(a,r){var i=r*4;a.clamp(),a.sigBytes+=i-(a.sigBytes%i||i)},unpad:function(a){for(var r=a.words,i=a.sigBytes-1,i=a.sigBytes-1;i>=0;i--)if(r[i>>>2]>>>24-i%4*8&255){a.sigBytes=i+1;break}}},o.pad.ZeroPadding})}(cs)),cs.exports}var ds={exports:{}},Cp;function I2(){return Cp||(Cp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return o.pad.NoPadding={pad:function(){},unpad:function(){}},o.pad.NoPadding})}(ds)),ds.exports}var us={exports:{}},wp;function E2(){return wp||(wp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),gt())})(Fe,function(o){return function(a){var r=o,i=r.lib,l=i.CipherParams,s=r.enc,p=s.Hex,c=r.format;c.Hex={stringify:function(d){return d.ciphertext.toString(p)},parse:function(d){var u=p.parse(d);return l.create({ciphertext:u})}}}(),o.format.Hex})}(us)),us.exports}var fs={exports:{}},Np;function M2(){return Np||(Np=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Yt(),Kt(),Ht(),gt())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.BlockCipher,l=a.algo,s=[],p=[],c=[],d=[],u=[],f=[],g=[],m=[],h=[],y=[];(function(){for(var x=[],C=0;C<256;C++)C<128?x[C]=C<<1:x[C]=C<<1^283;for(var w=0,N=0,C=0;C<256;C++){var V=N^N<<1^N<<2^N<<3^N<<4;V=V>>>8^V&255^99,s[w]=V,p[V]=w;var D=x[w],k=x[D],B=x[k],$=x[V]*257^V*16843008;c[w]=$<<24|$>>>8,d[w]=$<<16|$>>>16,u[w]=$<<8|$>>>24,f[w]=$;var $=B*16843009^k*65537^D*257^w*16843008;g[V]=$<<24|$>>>8,m[V]=$<<16|$>>>16,h[V]=$<<8|$>>>24,y[V]=$,w?(w=D^x[x[x[B^D]]],N^=x[x[N]]):w=N=1}})();var b=[0,1,2,4,8,16,32,64,128,27,54],v=l.AES=i.extend({_doReset:function(){var x;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var C=this._keyPriorReset=this._key,w=C.words,N=C.sigBytes/4,V=this._nRounds=N+6,D=(V+1)*4,k=this._keySchedule=[],B=0;B<D;B++)B<N?k[B]=w[B]:(x=k[B-1],B%N?N>6&&B%N==4&&(x=s[x>>>24]<<24|s[x>>>16&255]<<16|s[x>>>8&255]<<8|s[x&255]):(x=x<<8|x>>>24,x=s[x>>>24]<<24|s[x>>>16&255]<<16|s[x>>>8&255]<<8|s[x&255],x^=b[B/N|0]<<24),k[B]=k[B-N]^x);for(var $=this._invKeySchedule=[],T=0;T<D;T++){var B=D-T;if(T%4)var x=k[B];else var x=k[B-4];T<4||B<=4?$[T]=x:$[T]=g[s[x>>>24]]^m[s[x>>>16&255]]^h[s[x>>>8&255]]^y[s[x&255]]}}},encryptBlock:function(x,C){this._doCryptBlock(x,C,this._keySchedule,c,d,u,f,s)},decryptBlock:function(x,C){var w=x[C+1];x[C+1]=x[C+3],x[C+3]=w,this._doCryptBlock(x,C,this._invKeySchedule,g,m,h,y,p);var w=x[C+1];x[C+1]=x[C+3],x[C+3]=w},_doCryptBlock:function(x,C,w,N,V,D,k,B){for(var $=this._nRounds,T=x[C]^w[0],S=x[C+1]^w[1],F=x[C+2]^w[2],A=x[C+3]^w[3],E=4,I=1;I<$;I++){var R=N[T>>>24]^V[S>>>16&255]^D[F>>>8&255]^k[A&255]^w[E++],O=N[S>>>24]^V[F>>>16&255]^D[A>>>8&255]^k[T&255]^w[E++],G=N[F>>>24]^V[A>>>16&255]^D[T>>>8&255]^k[S&255]^w[E++],M=N[A>>>24]^V[T>>>16&255]^D[S>>>8&255]^k[F&255]^w[E++];T=R,S=O,F=G,A=M}var R=(B[T>>>24]<<24|B[S>>>16&255]<<16|B[F>>>8&255]<<8|B[A&255])^w[E++],O=(B[S>>>24]<<24|B[F>>>16&255]<<16|B[A>>>8&255]<<8|B[T&255])^w[E++],G=(B[F>>>24]<<24|B[A>>>16&255]<<16|B[T>>>8&255]<<8|B[S&255])^w[E++],M=(B[A>>>24]<<24|B[T>>>16&255]<<16|B[S>>>8&255]<<8|B[F&255])^w[E++];x[C]=R,x[C+1]=O,x[C+2]=G,x[C+3]=M},keySize:256/32});a.AES=i._createHelper(v)}(),o.AES})}(fs)),fs.exports}var ps={exports:{}},Vp;function P2(){return Vp||(Vp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Yt(),Kt(),Ht(),gt())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,l=r.BlockCipher,s=a.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=s.DES=l.extend({_doReset:function(){for(var b=this._key,v=b.words,x=[],C=0;C<56;C++){var w=p[C]-1;x[C]=v[w>>>5]>>>31-w%32&1}for(var N=this._subKeys=[],V=0;V<16;V++){for(var D=N[V]=[],k=d[V],C=0;C<24;C++)D[C/6|0]|=x[(c[C]-1+k)%28]<<31-C%6,D[4+(C/6|0)]|=x[28+(c[C+24]-1+k)%28]<<31-C%6;D[0]=D[0]<<1|D[0]>>>31;for(var C=1;C<7;C++)D[C]=D[C]>>>(C-1)*4+3;D[7]=D[7]<<5|D[7]>>>27}for(var B=this._invSubKeys=[],C=0;C<16;C++)B[C]=N[15-C]},encryptBlock:function(b,v){this._doCryptBlock(b,v,this._subKeys)},decryptBlock:function(b,v){this._doCryptBlock(b,v,this._invSubKeys)},_doCryptBlock:function(b,v,x){this._lBlock=b[v],this._rBlock=b[v+1],m.call(this,4,252645135),m.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),m.call(this,1,1431655765);for(var C=0;C<16;C++){for(var w=x[C],N=this._lBlock,V=this._rBlock,D=0,k=0;k<8;k++)D|=u[k][((V^w[k])&f[k])>>>0];this._lBlock=V,this._rBlock=N^D}var B=this._lBlock;this._lBlock=this._rBlock,this._rBlock=B,m.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),m.call(this,16,65535),m.call(this,4,252645135),b[v]=this._lBlock,b[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function m(b,v){var x=(this._lBlock>>>b^this._rBlock)&v;this._rBlock^=x,this._lBlock^=x<<b}function h(b,v){var x=(this._rBlock>>>b^this._lBlock)&v;this._lBlock^=x,this._rBlock^=x<<b}a.DES=l._createHelper(g);var y=s.TripleDES=l.extend({_doReset:function(){var b=this._key,v=b.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var x=v.slice(0,2),C=v.length<4?v.slice(0,2):v.slice(2,4),w=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=g.createEncryptor(i.create(x)),this._des2=g.createEncryptor(i.create(C)),this._des3=g.createEncryptor(i.create(w))},encryptBlock:function(b,v){this._des1.encryptBlock(b,v),this._des2.decryptBlock(b,v),this._des3.encryptBlock(b,v)},decryptBlock:function(b,v){this._des3.decryptBlock(b,v),this._des2.encryptBlock(b,v),this._des1.decryptBlock(b,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});a.TripleDES=l._createHelper(y)}(),o.TripleDES})}(ps)),ps.exports}var ms={exports:{}},Sp;function O2(){return Sp||(Sp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Yt(),Kt(),Ht(),gt())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.StreamCipher,l=a.algo,s=l.RC4=i.extend({_doReset:function(){for(var d=this._key,u=d.words,f=d.sigBytes,g=this._S=[],m=0;m<256;m++)g[m]=m;for(var m=0,h=0;m<256;m++){var y=m%f,b=u[y>>>2]>>>24-y%4*8&255;h=(h+g[m]+b)%256;var v=g[m];g[m]=g[h],g[h]=v}this._i=this._j=0},_doProcessBlock:function(d,u){d[u]^=p.call(this)},keySize:256/32,ivSize:0});function p(){for(var d=this._S,u=this._i,f=this._j,g=0,m=0;m<4;m++){u=(u+1)%256,f=(f+d[u])%256;var h=d[u];d[u]=d[f],d[f]=h,g|=d[(d[u]+d[f])%256]<<24-m*8}return this._i=u,this._j=f,g}a.RC4=i._createHelper(s);var c=l.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)p.call(this)}});a.RC4Drop=i._createHelper(c)}(),o.RC4})}(ms)),ms.exports}var hs={exports:{}},$p;function R2(){return $p||($p=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Yt(),Kt(),Ht(),gt())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.StreamCipher,l=a.algo,s=[],p=[],c=[],d=l.Rabbit=i.extend({_doReset:function(){for(var f=this._key.words,g=this.cfg.iv,m=0;m<4;m++)f[m]=(f[m]<<8|f[m]>>>24)&16711935|(f[m]<<24|f[m]>>>8)&4278255360;var h=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],y=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var m=0;m<4;m++)u.call(this);for(var m=0;m<8;m++)y[m]^=h[m+4&7];if(g){var b=g.words,v=b[0],x=b[1],C=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,w=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,N=C>>>16|w&4294901760,V=w<<16|C&65535;y[0]^=C,y[1]^=N,y[2]^=w,y[3]^=V,y[4]^=C,y[5]^=N,y[6]^=w,y[7]^=V;for(var m=0;m<4;m++)u.call(this)}},_doProcessBlock:function(f,g){var m=this._X;u.call(this),s[0]=m[0]^m[5]>>>16^m[3]<<16,s[1]=m[2]^m[7]>>>16^m[5]<<16,s[2]=m[4]^m[1]>>>16^m[7]<<16,s[3]=m[6]^m[3]>>>16^m[1]<<16;for(var h=0;h<4;h++)s[h]=(s[h]<<8|s[h]>>>24)&16711935|(s[h]<<24|s[h]>>>8)&4278255360,f[g+h]^=s[h]},blockSize:128/32,ivSize:64/32});function u(){for(var f=this._X,g=this._C,m=0;m<8;m++)p[m]=g[m];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<p[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<p[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<p[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<p[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<p[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<p[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<p[6]>>>0?1:0)|0,this._b=g[7]>>>0<p[7]>>>0?1:0;for(var m=0;m<8;m++){var h=f[m]+g[m],y=h&65535,b=h>>>16,v=((y*y>>>17)+y*b>>>15)+b*b,x=((h&4294901760)*h|0)+((h&65535)*h|0);c[m]=v^x}f[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,f[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,f[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,f[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,f[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,f[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,f[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,f[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}a.Rabbit=i._createHelper(d)}(),o.Rabbit})}(hs)),hs.exports}var gs={exports:{}},Dp;function j2(){return Dp||(Dp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Yt(),Kt(),Ht(),gt())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.StreamCipher,l=a.algo,s=[],p=[],c=[],d=l.RabbitLegacy=i.extend({_doReset:function(){var f=this._key.words,g=this.cfg.iv,m=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],h=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var y=0;y<4;y++)u.call(this);for(var y=0;y<8;y++)h[y]^=m[y+4&7];if(g){var b=g.words,v=b[0],x=b[1],C=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,w=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,N=C>>>16|w&4294901760,V=w<<16|C&65535;h[0]^=C,h[1]^=N,h[2]^=w,h[3]^=V,h[4]^=C,h[5]^=N,h[6]^=w,h[7]^=V;for(var y=0;y<4;y++)u.call(this)}},_doProcessBlock:function(f,g){var m=this._X;u.call(this),s[0]=m[0]^m[5]>>>16^m[3]<<16,s[1]=m[2]^m[7]>>>16^m[5]<<16,s[2]=m[4]^m[1]>>>16^m[7]<<16,s[3]=m[6]^m[3]>>>16^m[1]<<16;for(var h=0;h<4;h++)s[h]=(s[h]<<8|s[h]>>>24)&16711935|(s[h]<<24|s[h]>>>8)&4278255360,f[g+h]^=s[h]},blockSize:128/32,ivSize:64/32});function u(){for(var f=this._X,g=this._C,m=0;m<8;m++)p[m]=g[m];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<p[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<p[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<p[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<p[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<p[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<p[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<p[6]>>>0?1:0)|0,this._b=g[7]>>>0<p[7]>>>0?1:0;for(var m=0;m<8;m++){var h=f[m]+g[m],y=h&65535,b=h>>>16,v=((y*y>>>17)+y*b>>>15)+b*b,x=((h&4294901760)*h|0)+((h&65535)*h|0);c[m]=v^x}f[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,f[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,f[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,f[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,f[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,f[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,f[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,f[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}a.RabbitLegacy=i._createHelper(d)}(),o.RabbitLegacy})}(gs)),gs.exports}var ys={exports:{}},kp;function _2(){return kp||(kp=1,function(t,n){(function(o,a,r){t.exports=a(_e(),Yt(),Kt(),Ht(),gt())})(Fe,function(o){return function(){var a=o,r=a.lib,i=r.BlockCipher,l=a.algo;const s=16,p=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var d={pbox:[],sbox:[]};function u(y,b){let v=b>>24&255,x=b>>16&255,C=b>>8&255,w=b&255,N=y.sbox[0][v]+y.sbox[1][x];return N=N^y.sbox[2][C],N=N+y.sbox[3][w],N}function f(y,b,v){let x=b,C=v,w;for(let N=0;N<s;++N)x=x^y.pbox[N],C=u(y,x)^C,w=x,x=C,C=w;return w=x,x=C,C=w,C=C^y.pbox[s],x=x^y.pbox[s+1],{left:x,right:C}}function g(y,b,v){let x=b,C=v,w;for(let N=s+1;N>1;--N)x=x^y.pbox[N],C=u(y,x)^C,w=x,x=C,C=w;return w=x,x=C,C=w,C=C^y.pbox[1],x=x^y.pbox[0],{left:x,right:C}}function m(y,b,v){for(let V=0;V<4;V++){y.sbox[V]=[];for(let D=0;D<256;D++)y.sbox[V][D]=c[V][D]}let x=0;for(let V=0;V<s+2;V++)y.pbox[V]=p[V]^b[x],x++,x>=v&&(x=0);let C=0,w=0,N=0;for(let V=0;V<s+2;V+=2)N=f(y,C,w),C=N.left,w=N.right,y.pbox[V]=C,y.pbox[V+1]=w;for(let V=0;V<4;V++)for(let D=0;D<256;D+=2)N=f(y,C,w),C=N.left,w=N.right,y.sbox[V][D]=C,y.sbox[V][D+1]=w;return!0}var h=l.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var y=this._keyPriorReset=this._key,b=y.words,v=y.sigBytes/4;m(d,b,v)}},encryptBlock:function(y,b){var v=f(d,y[b],y[b+1]);y[b]=v.left,y[b+1]=v.right},decryptBlock:function(y,b){var v=g(d,y[b],y[b+1]);y[b]=v.left,y[b+1]=v.right},blockSize:64/32,keySize:128/32,ivSize:64/32});a.Blowfish=i._createHelper(h)}(),o.Blowfish})}(ys)),ys.exports}(function(t,n){(function(o,a,r){t.exports=a(_e(),Oo(),g2(),y2(),Yt(),b2(),Kt(),ep(),qi(),v2(),ap(),x2(),C2(),w2(),Qi(),N2(),Ht(),gt(),V2(),S2(),$2(),D2(),k2(),B2(),T2(),F2(),A2(),I2(),E2(),M2(),P2(),O2(),R2(),j2(),_2())})(Fe,function(o){return o})})(zf);var H2=zf.exports;const Bp=zo(H2);function Tp(t,n){const o=t.data.cityItems.default,a=e.ref(t.data.data),r=Ai(t);function i(l,s){const p="https://wis.qq.com/weather/common?source=pc&weather_type=observe|forecast_1h|forecast_24h|index|rise|air&province="+o[l].province+"&city="+o[l].city[s];m2(p,(h,y)=>{if(h)console.error("Error fetching data:",h);else{const b=y.data;a.value.default.temperature=b.observe.degree,a.value.default.max=b.forecast_24h[1].max_degree,a.value.default.min=b.forecast_24h[1].min_degree,a.value.default.weather=b.observe.weather,a.value.default.air=b.air.aqi,a.value.default.sunriseTime=new Date,a.value.default.sunsetTime=new Date,a.value.default.sunriseTime.setHours(Number(b.rise[0].sunrise.split(":")[0])),a.value.default.sunriseTime.setMinutes(Number(b.rise[0].sunrise.split(":")[1])),a.value.default.sunriseTime.setSeconds(0),a.value.default.sunriseTime.setMilliseconds(0),a.value.default.sunsetTime.setHours(Number(b.rise[0].sunset.split(":")[0])),a.value.default.sunsetTime.setMinutes(Number(b.rise[0].sunset.split(":")[1])),a.value.default.sunriseTime.setSeconds(0),a.value.default.sunriseTime.setMilliseconds(0),a.value.default.adviceItems.forEach(x=>{x.value=b.index[x.key]}),a.value.default.proindexItemsSet[0][0].value=b.index.ultraviolet.info,a.value.default.proindexItemsSet[0][1].value=b.observe.precipitation+"mm";let v;for(v=1;v<8;v++)a.value.default.weekItems[v-1].icon=b.forecast_24h[v].day_weather_code,a.value.default.weekItems[v-1].max=b.forecast_24h[v].max_degree,a.value.default.weekItems[v-1].min=b.forecast_24h[v].min_degree;for(v=0;v<24;v++)a.value.default.dayItemsSet[0][v].icon=b.forecast_1h[v].weather_code,a.value.default.dayItemsSet[0][v].temp=b.forecast_1h[v].degree;for(v=0;v<24&&!(b.forecast_1h[v].update_time.endsWith("000000")&&v!==0);v++);v--;for(let x=0;x<24;v++,x++)a.value.default.dayItemsSet[1][x].icon=b.forecast_1h[v].weather_code,a.value.default.dayItemsSet[1][x].temp=b.forecast_1h[v].degree}});const c=new Headers;c.append("User-Agent","Win64");const d="location="+o[l].city[l]+"&public_key=P2yFGyRckTUNG9rFt&ts="+new Date().getTime()+"&ttl=3000",f=Bp.HmacSHA1(d,"Sh3s--_vh1BWqUb_w"),g=encodeURIComponent(f.toString(Bp.enc.Base64)),m="https://api.seniverse.com/v3/weather/now.json?"+d+"&sig="+g;fetch(m,{method:"GET",headers:c}).then(h=>{if(!h.ok)throw new Error("Network response was not ok");return h.json()}).then(h=>{const y=h.results[0].now;a.value.default.proindexItemsSet[1][0].value=y.humidity+"%",a.value.default.proindexItemsSet[1][1].value=y.feels_like+"°",a.value.default.proindexItemsSet[2][0].value=y.pressure+"mpa",a.value.default.proindexItemsSet[2][1].value=Math.round(Number(y.visibility))+"km"}).catch(h=>{console.error("Error fetching data:",h)}),setTimeout(()=>{r.renderCharts(0)},500)}return{fetchData:i}}function L2(t,n){const o=t.data.cityItems.default,a=e.ref(!1),r=e.ref(0),i=e.ref(0),l=e.ref(0),s=Tp(t),p=Mo(t),c=e.computed(()=>({"background-color":p.colorTheme.value[2]}));function d(){a.value=!a.value,r.value=0}function u(){const h=document.getElementById("provinceSelect");r.value=h.selectedIndex}function f(){const h=document.getElementById("provinceSelect"),y=document.getElementById("citySelect");i.value=h.selectedIndex,l.value=y.selectedIndex;const b=document.getElementById("f-weather-24h-content");b.style.marginLeft="-32px",s.fetchData(i.value,l.value),a.value=!1,r.value=0}function g(){return a.value?e.createVNode("div",{class:"f-weather-city-select"},[e.createVNode("select",{id:"provinceSelect",onChange:u},[o.map(h=>e.createVNode("option",null,[h.province]))]),e.createVNode("select",{id:"citySelect"},[o[r.value].city.map(h=>e.createVNode("option",null,[h]))]),e.createVNode("button",{class:"f-weather-button f-weather-button-city",style:c.value,onClick:f},[e.createTextVNode("确定")])]):""}function m(){return e.createVNode("div",{class:"f-weather-city"},[e.createVNode("span",{class:"f-weather-city-title"},[o[i.value].city[l.value]+"市"]),e.createVNode("img",{src:"/components/weather/src/image/choose.png",class:"f-weather-city-icon",onClick:d},null),g()])}return{renderWeatherCity:m}}function W2(t,n){const o=e.ref(t.data.data),a=Wf();function r(){return e.createVNode("div",null,[e.createVNode("div",{id:"sunset",class:"f-weather-sunset-progress"},null),e.createVNode("div",{class:"f-weather-sunset-container"},[e.createVNode("img",{src:"/components/weather/src/image/sunrise.png",class:"f-weather-sunrise-img"},null),e.createVNode("img",{src:"/components/weather/src/image/sunset.png",class:"f-weather-sunset-img"},null),e.createVNode("div",null,[e.createVNode("span",{class:"f-weather-sunrise-text"},[a.addZero(o.value.default.sunriseTime.getHours())+":"+a.addZero(o.value.default.sunriseTime.getMinutes())]),e.createVNode("span",{class:"f-weather-sunset-text"},[a.addZero(o.value.default.sunsetTime.getHours())+":"+a.addZero(o.value.default.sunsetTime.getMinutes())])])])])}return{renderWeatherSunset:r}}function q2(t,n){const o=t.data.themeItems.default,a=e.ref(t.theme),r=e.ref(t.data.data),i=e.computed(()=>({"animation-name":"icon","animation-duration":"0.8s","animation-iteration-count":"infinite"})),l=e.computed(()=>r.value.default.air<=50?"优":r.value.default.air<=100?"良":r.value.default.air<=150?"轻度污染":r.value.default.air<=200?"中度污染":r.value.default.air<=300?"重度污染":"严重污染"),s=e.computed(()=>r.value.default.air>300?{type:"smog",color:"red",title:"雾霾红色预警"}:r.value.default.air>200?{type:"smog",color:"orange",title:"雾霾橙色预警"}:r.value.default.air>150?{type:"smog",color:"yellow",title:"雾霾黄色预警"}:Math.max(...r.value.default.dayItemsSet[0].map(f=>f.temp))>40?{type:"highTemp",color:"red",title:"高温红色预警"}:Math.max(...r.value.default.dayItemsSet[0].map(f=>f.temp))>37?{type:"highTemp",color:"orange",title:"高温橙色预警"}:r.value.default.weekItems[0].max>35&&r.value.default.weekItems[1].max>35&&r.value.default.weekItems[2].max>35?{type:"highTemp",color:"yellow",title:"高温黄色预警"}:Math.max(...r.value.default.dayItemsSet[0].map(f=>f.temp))<=0&&r.value.default.dayItemsSet[0][0].temp>16?{type:"lowTemp",color:"red",title:"低温红色预警"}:Math.max(...r.value.default.dayItemsSet[0].map(f=>f.temp))<=0&&r.value.default.dayItemsSet[0][0].temp>12?{type:"lowTemp",color:"orange",title:"低温橙色预警"}:Math.max(...r.value.default.dayItemsSet[0].map(f=>f.temp))<=4&&r.value.default.dayItemsSet[0][0].temp>14?{type:"lowTemp",color:"yellow",title:"低温黄色预警"}:null);function p(){return s.value?e.createVNode("span",{class:"f-weather-warning-container"},[e.createVNode("span",{class:"f-weather-warning"},[e.createVNode("img",{src:"/components/weather/src/image/warningImage/"+(s.value.type+"-"+s.value.color)+".png",class:"f-weather-warning-icon",style:s.value?i.value:""},null),e.createVNode("span",{class:"f-weather-warning-text"},[e.createTextVNode(" "),s.value.title])])]):""}function c(){return e.createVNode("div",{class:"f-weather-information-text f-weather-advice-container"},[r.value.default.adviceItems.map(f=>o[a.value].adviceItems.includes(f.key)?e.createVNode("span",{class:"f-weather-advice"},[e.createVNode("span",null,[f.value.name,e.createTextVNode(":"),f.value.info]),o[a.value].adviceItems.indexOf(f.key)!==2?e.createVNode("span",{class:"f-weather-advice-line"},null):"",e.createVNode("span",{class:"f-weather-advice-text"},[f.value.detail])]):"")])}function d(){return e.createVNode("div",{class:"f-weather-air"},[e.createVNode("div",{class:"f-weather-air-title"},[e.createTextVNode("空气质量:"),r.value.default.air+" - "+l.value]),e.createVNode("div",{class:"f-weather-air-progress"},[e.createVNode(e.resolveComponent("f-progress"),{percent:100,enableBackgroundImg:!0,backgroundImg:"linear-gradient(90deg, #01C84C 0%, #F7FF01 26%, #FF0000 53%, #800080 78%, #A52A2A 100%)"},null),e.createVNode("img",{src:"/components/weather/src/image/point.png",id:"airPoint",class:"f-weather-air-point"},null)])])}function u(){return e.createVNode("div",{class:"f-weather-information-container"},[e.createVNode("div",{class:"f-weather-information"},[e.createVNode("div",{class:"f-weather-information-row1"},[e.createVNode("span",{class:"f-weather-temperature"},[r.value.default.temperature+" °"]),e.createVNode("span",{class:"f-weather-weather"},[r.value.default.weather])]),e.createVNode("div",{class:"f-weather-information-row2"},[p()])]),e.createVNode("div",{class:"f-weather-information-text f-weather-maxmin"},[r.value.default.min+"° ~ "+r.value.default.max+"°"]),c(),d()])}return{renderWeatherInformation:u}}function z2(t,n){const o=e.ref(!1),{renderWeatherDetail:a}=n2(t),{renderWeatherCity:r}=L2(t),{renderWeatherSunset:i}=W2(t),{renderWeatherInformation:l}=q2(t),s=e.computed(()=>({"border-bottom-left-radius":o.value?"0px":null,"border-bottom-right-radius":o.value?"0px":null})),p=e.computed(()=>({display:o.value?"block":"none"}));function c(){o.value=!o.value}function d(){return e.createVNode("div",{class:"f-weather-header"},[r(),e.createVNode("button",{class:"f-weather-button f-weather-button-detail",onClick:c},[o.value?e.createVNode("div",null,[e.createTextVNode("隐藏详细信息")]):e.createVNode("div",null,[e.createTextVNode("显示详细信息")])])])}function u(){return e.createVNode("div",null,[e.createVNode("div",{class:"f-weather-container",style:s.value},[d(),i(),l()]),e.createVNode("div",{style:p.value},[a()])])}return{renderWeatherHome:u}}const Ro=e.defineComponent({name:"FWeather",components:{"f-progress":Pn},props:Fi,emits:[],setup(t,n){const o=e.ref(),a=e.ref(t.data.data),r=Mo(t),i=Ai(t),l=Tp(t),{renderWeatherHome:s}=z2(t),p=e.computed(()=>({"background-image":"linear-gradient(132deg, "+r.colorTheme.value[0]+" 0%, "+r.colorTheme.value[1]+" 100%)"}));function c(){const d=o.value.getBoundingClientRect().width,u=document.getElementById("airPoint"),f=Math.max(o.value.getBoundingClientRect().width,400);u&&(u.style.marginLeft=a.value.default.air/500*(f-50)-5+"px");const g=document.getElementById("f-weather-24h-content");if(g){const m=g.scrollWidth-d-130;g.offsetLeft<-m&&(g.style.marginLeft="-"+Math.max(m,32)+"px")}i.renderChart7d()}return e.onMounted(()=>{Yn.useResizeObserver(o.value,c),l.fetchData(0,0)}),()=>e.createVNode("div",{ref:o,id:"background",class:"f-weather-background",style:p.value},[s()])}}),G2=e.defineComponent({name:"FWeatherDesign",components:{"f-progress":Pn},props:Fi,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(Ro,{ref:o},null)}}),Fp={install(t){t.component(Ro.name,Ro)},register(t,n,o){t.weather=Ro,n.weather=Lf},registerDesigner(t,n,o){t.weather=G2,n.weather=Lf}},U2={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/video.schema.json",title:"video",description:"A Farris Video Component",type:"object",properties:{id:{description:"The unique identifier for a Video",type:"string"},type:{description:"The type string of Video component",type:"string",default:"video"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Y2=new Map([["appearance",xe]]);function K2(t,n,o){return n}const X2={title:"verify-detail",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},bs={src:{type:String,required:!0,default:""},autoplay:{type:Boolean,default:!0},controls:{type:Boolean,default:!0},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},preload:{type:String,default:"none"},poster:{type:String},width:{type:[String,Number],default:300},height:{type:[String,Number],default:168}},Ap=me(bs,U2,Y2,K2,X2);function Q2(t,n){function o(y){y.stopPropagation(),n.emit("abort")}function a(y){y.stopPropagation(),n.emit("play")}function r(y){y.stopPropagation(),n.emit("pause")}function i(y){y.stopPropagation(),n.emit("ended")}function l(y){y.stopPropagation(),n.emit("durationchange")}function s(y){y.stopPropagation(),n.emit("error")}function p(y){y.stopPropagation(),n.emit("loadeddata")}function c(y){y.stopPropagation(),n.emit("loadedmetadata")}function d(y){y.stopPropagation(),n.emit("loadstart")}function u(y){y.stopPropagation(),n.emit("playing")}function f(y){y.stopPropagation(),n.emit("progress")}function g(y){y.stopPropagation(),n.emit("timeupdate")}function m(y){y.stopPropagation(),n.emit("volumechange")}function h(y){y.stopPropagation(),n.emit("canplay")}return{onAbort:o,onPlay:a,onPause:r,onEnded:i,onDurationchange:l,onError:s,onLoadeddata:p,onLoadedmetadata:c,onLoadstart:d,onPlaying:u,onProgress:f,onTimeupdate:g,onVolumechange:m,onCanplay:h}}const vs=e.defineComponent({name:"FVideo",props:bs,emits:["abort","play","pause","ended","durationchange","canplay","error","loadeddata","loadedmetadata","loadstart","playing","progress","timeupdate","volumechange"],setup(t,n){const o=e.ref(),{onAbort:a,onPlay:r,onPause:i,onEnded:l,onDurationchange:s,onError:p,onLoadeddata:c,onLoadedmetadata:d,onLoadstart:u,onPlaying:f,onProgress:g,onTimeupdate:m,onVolumechange:h,onCanplay:y}=Q2(t,n);return e.onUnmounted(()=>{}),()=>e.createVNode("video",{ref:o,src:t.src,autoplay:t.autoplay,controls:t.controls,loop:t.loop,muted:t.muted,width:t.width,height:t.height,poster:t.poster,onAbort:b=>a(b),onPlay:b=>r(b),onPause:b=>i(b),onEnded:b=>l(b),onDurationchange:b=>s(b),onError:b=>p(b),onLoadeddata:b=>c(b),onLoadedmetadata:b=>d(b),onLoadstart:b=>u(b),onPlaying:b=>f(b),onProgress:b=>g(b),onTimeupdate:b=>m(b),onVolumechange:b=>h(b),onCanplay:b=>y(b)},[e.createTextVNode("Your browser does not support the video tag.")])}});function Z2(t,n){const o=e.ref(t.width),a=e.ref(t.height);let r;e.watch(n,l=>{l&&(o.value=l.clientWidth,r=new ResizeObserver(s=>{if(!s||s.length<1)return;const c=s[0].contentRect;c&&(o.value=c.width)}),r.observe(l))});function i(){r&&r.disconnect()}return{destory:i,width:o,height:a}}const J2=e.defineComponent({name:"FVideoDesign",props:bs,setup(t,n){var c;const o=e.ref(),a=e.inject("design-item-context"),r=Qc(a.schema,(c=a.parent)==null?void 0:c.schema),i=ve(o,a,r),{width:l,height:s,destory:p}=Z2(t,o);return e.onMounted(()=>{o.value.componentInstance=i}),e.onUnmounted(()=>{p()}),n.expose(i.value),()=>e.createVNode("div",{ref:o,class:"drag-container","data-dragref":`${a.schema.id}-container`},[e.createVNode("video",{src:t.src,autoplay:t.autoplay,controls:t.controls,loop:t.loop,muted:t.muted,width:l.value,height:s.value},[e.createTextVNode("Your browser does not support the video tag.")])])}}),Ip={install(t){t.component(vs.name,vs)},register(t,n,o){t.video=vs,n.video=Ap},registerDesigner(t,n,o){t.video=J2,n.video=Ap}},we={},Ne={},ke={};let Ep=!1;function eV(){Ep||(Ep=!0,Zs.register(we,Ne,ke),Ks.register(we,Ne,ke),pl.register(we,Ne,ke),gl.registerDesigner(we,Ne,ke),vl.register(we,Ne,ke),wl.register(we,Ne,ke),Tl.register(we,Ne,ke),Gp.register(we,Ne,ke),Zc.register(we,Ne),ed.register(we,Ne,ke),Ul.registerDesigner(we,Ne,ke),ld.register(we,Ne,ke),ud.register(we,Ne,ke),hd.register(we,Ne,ke),Rp.register(we,Ne,ke),Sd.register(we,Ne,ke),ex.register(we,Ne,ke),Ad.register(we,Ne,ke),Id.register(we,Ne,ke),_d.register(we,Ne,ke),Yd.register(we,Ne,ke),Ld.registerDesigner(we,Ne,ke),Qd.register(we,Ne,ke),pC.register(we,Ne,ke),eu.register(we,Ne,ke),au.register(we,Ne,ke),fu.register(we,Ne,ke),pu.register(we,Ne,ke),xu.register(we,Ne,ke),wu.register(we,Ne,ke),Fu.register(we,Ne,ke),Iu.register(we,Ne,ke),Ou.register(we,Ne,ke),Ru.register(we,Ne,ke),_u.register(we,Ne,ke),qu.register(we,Ne,ke),Ku.register(we,Ne,ke),yu.register(we,Ne,ke),Zu.register(we,Ne,ke),Ju.register(we,Ne,ke),tf.register(we,Ne,ke),sf.register(we,Ne,ke),cf.register(we,Ne,ke),df.register(we,Ne,ke),uf.register(we,Ne,ke),ff.register(we,Ne,ke),hf.register(we,Ne,ke),xf.register(we,Ne,ke),Cf.register(we,Ne,ke),Vf.register(we,Ne,ke),Hf.register(we,Ne,ke),Rf.register(we,Ne,ke),Fp.register(we,Ne,ke),Ip.register(we,Ne,ke))}function Mp(){eV();function t(a,r){const i=Ne[a];return i?i(r):{}}function n(a){return we[a]||go}function o(a){switch(a){case"check-box":return"onChangeValue";case"check-group":return"onChangeValue";case"combo-list":return"onChange";case"combo-lookup":return"";case"date-picker":return"onDatePicked";case"date-range":return"";case"datetime-picker":return"";case"datetime-range":return"";case"month-picker":return"";case"month-range":return"";case"year-picker":return"";case"year-range":return"";case"input-group":return"onChange";case"lookup":return"";case"number-range":return"onValueChange";case"number-spinner":return"onValueChange";case"radio-group":return"onChangeValue";case"text":return"";case"response-layout-editor-setting":return"onChange"}}return{resolveEditorProps:t,resolveEditorType:n,getChangeFunctionName:o}}const Xt=e.defineComponent({name:"FDynamicFormGroup",props:fo,emits:["change","update:modelValue"],setup(t,n){const o=e.ref(t.id),a=e.ref(t.customClass),r=e.ref(t.editor),i=e.ref(t.label),l=e.ref(t.modelValue),s=e.ref(t.readonly),p=e.ref(t.required),c=e.ref(t.showLabel);e.ref(t.type);const{resolveEditorProps:d,resolveEditorType:u,getChangeFunctionName:f}=Mp(),g=e.computed(()=>({"form-group":!0,"farris-form-group":!0,"common-group":!0,"q-state-readonly":s.value}));function m(y,b){l.value=b!==void 0?b:y,n.emit("update:modelValue",l.value),n.emit("change",l.value)}const h=e.computed(()=>{const y=u(r.value.type),b=d(r.value.type,r.value),v=f(r.value.type);return b[v]=m,()=>e.createVNode(y,e.mergeProps(b,{modelValue:l.value,"onUpdate:modelValue":x=>l.value=x}),null)});return e.watch([()=>t.id,()=>t.customClass,()=>t.editor,()=>t.label,()=>t.modelValue,()=>t.readonly,()=>t.required,()=>t.showLabel],([y,b,v,x,C,w,N,V])=>{o.value=y,a.value=b,r.value=v,i.value=x,l.value=C,s.value=w,p.value=N,c.value=V}),()=>e.createVNode("div",{id:`${o.value}-input-group`,class:a.value},[e.createVNode("div",{class:"farris-group-wrap"},[e.createVNode("div",{class:g.value},[c.value&&e.createVNode(Q0,{id:`${o.value}-lable`,required:p.value,text:i.value,title:i.value},null),e.createVNode("div",{class:"farris-input-wrap"},[h.value()])])])])}}),tV=e.defineComponent({name:"FFormGroupDesign",props:fo,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return r.value.canNested=!1,r.value.canMove=!0,r.value.canDelete=!0,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(Xt,e.mergeProps(t,{ref:o}),null)}}),Pp={id:{type:String,default:""},editor:{type:Object,default:{}},modelValue:{type:[String,Boolean,Array,Number],default:""},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},nV=me(Pp,vc,Ra,void 0,xc),Op=e.defineComponent({name:"FDynamicFormInput",props:Pp,emits:["change","update:modelValue"],setup(t,n){const o=e.ref(t.id),a=e.ref(t.editor),r=e.ref(t.modelValue),{resolveEditorProps:i,resolveEditorType:l,getChangeFunctionName:s}=Mp();function p(d,u){r.value=u!==void 0?u:d,n.emit("update:modelValue",r.value),n.emit("change",r.value)}const c=e.computed(()=>{const d=l(a.value.type),u=i(a.value.type,a.value);u.focusOnCreated=t.focusOnCreated,u.selectOnCreated=t.selectOnCreated;const f=s(a.value.type);return u[f]=p,()=>e.createVNode(d,e.mergeProps(u,{modelValue:r.value,"onUpdate:modelValue":g=>r.value=g}),null)});return e.watch([()=>t.id,()=>t.editor,()=>t.modelValue],([d,u,f])=>{o.value=d,a.value=u,r.value=f}),()=>c.value()}}),Rp={install(t){t.component(ja.name,ja).component(Xt.name,Xt)},register(t,n,o){t["form-group"]=Xt,n["form-group"]=Cc,t["response-form"]=ja,n["response-form"]=bc,t["form-input"]=Op,n["form-input"]=nV},registerDesigner(t,n,o){t["form-group"]=tV,n["form-group"]=Cc,t["response-form"]=K0,n["response-form"]=bc}};function oV(t,n,o){const a=e.ref(new Set),r=e.ref(new Set),{conditionGroupMap:i,groupParentMap:l}=o;let s,p;function c(b){let v=s.level<=b.level?s:b,x=s.level>b.level?s:b;const C=[];for(;x&&v&&x!==v;)x.level>v.level?(C.push(x),x=l.get(x.groupId)):x.level===v.level&&(v=l.get(v.groupId),v&&C.unshift(v));return C}function d(b){r.value.add(b.groupId),b.items.forEach(v=>a.value.add(v.conditionId)),b.children.forEach(v=>d(v))}function u(b){const{conditionId:v}=b;a.value.add(v),s=a.value.size===0?i.get(v):s;const x=i.get(b.conditionId);c(x).forEach(w=>d(w))}const f=e.computed(()=>a.value.size===0&&r.value.size===1),g=function(b){r.value.delete(b.groupId),b.items.forEach(x=>p(x)),b.children.forEach(x=>!f.value&&g(x));const v=l.get(b.groupId);v&&r.value.has(v.groupId)&&g(v)};p=function(b){const{conditionId:v}=b;if(a.value.has(v)&&a.value.delete(v),r.value.size>0){const x=i.get(v);x&&r.value.has(x.groupId)&&g(x)}};function m(b){const{conditionId:v}=b;a.value.size===0&&(s=i.get(v)),a.value.has(v)?p(b):u(b)}function h(){const b=[];return s&&(s.items.filter(v=>a.value.has(v.conditionId)).forEach(v=>b.push(v)),s.children.filter(v=>r.value.has(v.groupId)).forEach(v=>b.push(v))),b}function y(){a.value.clear(),r.value.clear()}return{clear:y,getSelectedGroupItem:h,selectedItems:a,toggleSelect:m}}const jp=e.defineComponent({name:"FConditionList",props:gc,emits:["valueChange","labelCodeChange","compareTypeChange"],setup(t,n){const o=e.ref(t.key),a=e.ref(t.conditions),r=Eu(t),{convertToSingleControl:i,fields:l,fieldMap:s,loadFieldConfigs:p}=r,c=Mu(),{addCondition:d,changeGroupRelation:u,getConditions:f,group:g,insertConditionTo:m,loadConditionGroup:h,refresh:y,removeCondition:b,rootGroup:v,unGroup:x}=c,{createConditionValue:C}=br(),w=oV(t,n,c),{selectedItems:N,toggleSelect:V}=w,{getCompareOperators:D}=u1(t,n,r);p(!1),l.value=i(l.value),h(a.value);function k(R){var G;const O=((G=s.get(R.fieldCode))==null?void 0:G.editor)||{type:"text"};R.value=C(O.type,void 0),n.emit("labelCodeChange",R)}function B(R,O){n.emit("compareTypeChange",O)}function $(){}n.expose({getConditions:f});function T(R,O){n.emit("valueChange",R,O)}function S(R){return R.items.map(O=>{var G;return e.createVNode("div",{class:"condition-list-item",key:O.conditionId},[e.createVNode("div",{class:"condition-list-item-type mr-3"},[e.createVNode(Bt,{"value-field":"labelCode","text-field":"name","id-field":"id",data:l.value,modelValue:O.fieldCode,"onUpdate:modelValue":M=>O.fieldCode=M,onChange:M=>k(O)},null)]),e.createVNode("div",{class:"condition-list-item-compare mr-3"},[e.createVNode(Bt,{"value-field":"value","text-field":"name","id-field":"id",data:D(O),modelValue:O.compareType,"onUpdate:modelValue":M=>O.compareType=M,onChange:M=>B(M,O)},null)]),e.createVNode("div",{class:"condition-list-item-control mr-3"},[e.createVNode(Xt,{editor:(G=s.get(O.fieldCode))==null?void 0:G.editor,showLabel:!1,modelValue:O.value.value,"onUpdate:modelValue":M=>O.value.value=M,onChange:M=>{T(M,O)}},null)]),e.createVNode("div",{class:"condition-list-item-extend"},[e.createVNode("span",{class:"f-icon f-icon-plus-sm mr-2",onClick:()=>m(O)},null),e.createVNode("span",{class:"f-icon f-icon-minus-sm",onClick:()=>b(O)},null)]),e.createVNode("div",{class:"custom-control custom-checkbox"},[e.createVNode("input",{title:"selection",class:"custom-control-input",type:"checkbox",checked:N.value.has(O.conditionId)},null),e.createVNode("label",{class:"custom-control-label",onClick:()=>V(O)},null)])])})}function F(R){return e.createVNode("div",{class:"condition-list-relation"},[e.createVNode("span",{class:"condition-list-relation-close f-icon-filter-cancel btn-link",onClick:()=>x(R)},null),e.createVNode("span",{class:"condition-list-relation-text btn-link",onClick:()=>u(R)},[R.relation===1?"与":"或"])])}function A(R){return e.createVNode("div",{class:"condition-list-content"},[e.createVNode("div",{class:"condition-list-content-group"},[S(R),R.children&&R.children.map(O=>A(O))]),F(R)])}function E(){g(w.getSelectedGroupItem()),w.clear()}function I(){return e.createVNode("div",{class:"condition-list-bottom"},[e.createVNode("div",{class:"add-condition-btn mb-1 mr-3",onClick:d},[e.createVNode("span",{class:"f-icon f-icon-filter-add"},null),e.createVNode("span",{class:"ml-1"},[e.createTextVNode("添加条件")])]),e.createVNode("div",{class:"add-condition-btn mb-1",onClick:E},[e.createVNode("span",{class:"f-icon f-icon-filter-grouping"},null),e.createVNode("span",{class:"ml-1"},[e.createTextVNode("生成条件组")])]),e.createVNode("div",{class:"condition-list-reset add-condition-btn",onClick:$},[e.createTextVNode("重置")])])}return()=>e.createVNode("div",{class:"condition-list",key:o.value},[e.createVNode("div",{class:"condition-list-body"},[A(v.value)]),I()])}});function aV(t,n,o,a,r,i,l,s,p){const c="id",d=e.ref(),{applySortableColumns:u,collectionFilterableColumns:f,collectionSortableColumns:g,columnContext:m,updateColumnSettingIcon:h}=a,{conditions:y}=i,{calculateColumnsSize:b}=l,{fitHorizontalScroll:v}=p,x=e.ref([]),C=e.computed(()=>!!x.value.length),w=e.computed(()=>m.value.primaryColumns.map(M=>({id:M.field,name:M.title}))),N=e.computed(()=>m.value.primaryColumns.filter(M=>M.visible).map(M=>({id:M.field,name:M.title}))),V=e.computed(()=>g().map(M=>({id:M.field,name:M.title,order:M.sort}))),D=e.computed(()=>f().map(M=>({id:M.field,code:M.field,labelCode:M.field,name:M.title,editor:M.editor,value:{},visible:!0})));function k(M){M&&M.unmount()}function B(){const M=new Map;return m.value.primaryColumns.reduce((j,H)=>(H.visible=!1,j.set(H.field,H),j),M),M}function $(M,j){return M.map(({id:_})=>{const W=j.get(_);return W.visible=!0,j.delete(_),W})}function T(M){const j=B(),H=$(M,j);m.value.primaryColumns=[...H,...Array.from(j.values())],h(),b(),e.nextTick(()=>{v()})}function S(M){x.value=M}function F(M){return e.createVNode("div",{class:"fv-grid-settings"},[e.createVNode(co,{"tab-type":"pills","justify-content":"center"},{headerPrefix:()=>e.createVNode("div",{class:"modal-title"},[e.createVNode("span",{class:"modal-title-label"},[e.createTextVNode("列配置")])]),default:()=>[e.createVNode(mn,{id:"display-columns",title:"显示列",class:"container"},{default:()=>[e.createVNode(Dn,{style:"height: 480px","identify-field":c,"data-source":w.value,selections:N.value,onChange:T},null)]}),e.createVNode(mn,{id:"column-order",title:"列排序",class:"container"},{default:()=>[e.createVNode(uo,{style:"height: 480px","data-source":w.value,items:V.value,onChange:S},null)]}),e.createVNode(mn,{id:"column-filter",title:"筛选",class:"container"},{default:()=>[e.createVNode(jp,{ref:d,style:"height: 480px",fields:D.value,conditions:y.value},null)]})],headerSuffix:()=>e.createVNode("div",{class:"f-btn-icon f-bare",onClick:j=>k(M)},[e.createVNode("span",{class:"f-icon modal_close"},null)])})])}function A(){const M=new Map;return g().reduce((j,H)=>(H.sort="none",H.sortOrder=0,j.set(H.field,H),j),M),M}function E(M){return x.value.filter(H=>H.id&&H.order).map((H,_)=>{const W=_+1,K=M.get(H.id);return K&&(K.sort=H.order,K.sortOrder=W),K})}function I(){if(C.value){const M=A(),j=E(M);u(j,r,s),p.reCalculateVisualDataRows(),b()}}function R(){d.value&&(y.value=d.value.getConditions(),r.refresh(),p.reCalculateVisualDataRows())}function O(){I(),R()}function G(){}return{acceptCallback:O,rejectCallback:G,renderSettingsPanel:F}}function rV(t,n,o,a,r,i,l,s,p){function c(u){const f="Settings",{acceptCallback:y,rejectCallback:b,renderSettingsPanel:v}=aV(t,n,o,a,r,i,l,s,p);ln.show({title:f,width:800,showButtons:!0,showHeader:!1,render:v,acceptCallback:y,rejectCallback:b})}function d(){return e.createVNode("span",{class:"fv-grid-settings-icon",onClick:c},[e.createVNode("i",{class:"f-icon f-icon-home-setup"},null)])}return{renderGridSettingsIcon:d}}function iV(t,n,o,a){const r=e.ref(-1),i=e.ref(0),l=e.ref(!1);let s="";const p=e.computed(()=>({display:l.value?"block":"none",left:`${i.value}px`})),c=e.computed(()=>({display:l.value?"block":"none"}));function d(g){const{left:m}=g.target.parentElement.getBoundingClientRect();i.value=g.clientX-m}function u(g){const m=n.value.primaryColumns.filter(h=>h.visible).find(h=>h.field===s)||n.value.leftColumns.filter(h=>h.visible).find(h=>h.field===s)||n.value.rightColumns.filter(h=>h.visible).find(h=>h.field===s);if(m){const{left:h}=g.target.parentElement.getBoundingClientRect(),y=g.clientX-h;m.actualWidth=(m.actualWidth||0)+(y-r.value),o.calculateColumnHeaders(n),o.calculateColumnsWidth(n)}i.value=0,l.value=!1,a.reCalculateVisualDataRows(),document.removeEventListener("mousemove",d),document.body.style.userSelect="",s=""}function f(g,m){s=m,l.value=!0;const y=g.composedPath().find(b=>b.className.split(" ")[0]==="fv-grid");if(y){const{left:b}=y.getBoundingClientRect();i.value=g.clientX-b,r.value=g.clientX-b,document.addEventListener("mousemove",d),document.addEventListener("mouseup",u),document.body.style.userSelect="none"}}return{onClickColumnResizeBar:f,resizeHandleStyle:p,resizeOverlayStyle:c}}function xs(t,n,o,a,r,i,l,s,p,c,d,u,f,g,m,h,y,b){const{showSelectAll:v,selectAll:x,unSelectAll:C,selectedValues:w}=f,{showRowNumer:N,showSidebarCheckBox:V,sidebarTitle:D,sidebarCornerCellStyle:k}=g,{columnContext:B,hasLeftFixedColumn:$,hasRightFixedColumn:T}=r,{onClickColumnResizeBar:S,resizeHandleStyle:F,resizeOverlayStyle:A}=iV(t,B,d,h),{gridHeaderColumnsStyle:E,leftFixedGridHeaderColumnsStyle:I,rightFixedGridHeaderColumnsStyle:R}=h,{dragstart:O,dragenter:G,dragover:M,dragend:j}=l,H=e.computed(()=>v.value||V.value||N.value),_=B.value.defaultColumnWidth,W=32,K=new Map([[0,0]]);function z(Ce,pe){const he=K.get(pe)||0,De={height:`${Ce.depth*W}px`,left:`${Ce.left}px`,top:`${(Ce.layer-1)*W}px`,width:`${Ce.actualWidth}px`};return B.value.headerDepth>1&&(De["line-height"]=`${Ce.depth*W}px`),K.set(pe+1,he+(Ce.actualWidth||_)),De}const q=e.computed(()=>({"fv-grid-header":!0,"fv-grid-header-group-columns":B.value.headerDepth>1})),L=e.computed(()=>({height:`${B.value.headerDepth*W}px`})),X=function(Ce){return(Ce.status&ae.sortable)===ae.sortable||(Ce.status&ae.filterable)===ae.filterable},{renderHeaderCellHandler:U}=o0(t,n,o,a,r,i,s,p,c,m,h),Z=function(Ce){return t.showSetting&&!!Ce.showSetting},{renderGridSettingsIcon:re}=rV(t,n,y,r,i,p,d,m,h);function de(Ce,pe,he){return e.createVNode("div",{class:"fv-grid-header-cell",style:z(Ce,he),draggable:"true",onDragstart:De=>O(De,Ce,he),onDragenter:De=>G(De,he),onDragend:De=>j(De,Ce),onDragover:De=>M(De,he)},[e.createVNode("span",{class:"fv-column-title"},[Ce.title]),X(Ce)&&U(Ce,he,pe),Z(Ce)&&re(),Ce.resizable&&e.createVNode("span",{class:"fv-column-resize-bar",onMousedown:De=>S(De,Ce.field)},null)])}function ge(Ce){return Ce.map((pe,he)=>{const De=[];if(De.push(de(pe,Ce,he)),pe.children&&pe.children.length){const Ge=ge(pe.children);De.push(...Ge)}return De})}function ie(){return e.createVNode("div",{class:"fv-grid-header-left-fixed"},[e.createVNode("div",{class:"fv-grid-header-columns",style:I.value},[ge(B.value.leftHeaderColumns)])])}function te(){return e.createVNode("div",{class:"fv-grid-header-right-fixed"},[e.createVNode("div",{class:"fv-grid-header-columns",style:R.value},[ge(B.value.rightHeaderColumns)])])}const J=e.ref(b.value.length===w.value.length);function le(Ce){J.value?x():C()}const fe=e.computed(()=>w.value.length>0&&b.value.length!==w.value.length);function Me(){return e.createVNode("div",{class:"fv-grid-header-corner",style:k.value},[v.value&&e.createVNode(dn,{id:"checkbox_for_select_all",indeterminate:fe.value,modelValue:J.value,"onUpdate:modelValue":Ce=>J.value=Ce,onChange:le},null),N.value&&D.value])}function Ie(){return e.createVNode("div",{class:q.value,style:L.value},[H.value&&Me(),$.value&&ie(),e.createVNode("div",{class:"fv-grid-header-primary"},[e.createVNode("div",{class:"fv-grid-header-columns",style:E.value},[ge(B.value.primaryHeaderColumns)])]),T.value&&te()])}function Le(){return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"fv-datagrid-resize-overlay",style:A.value},null),e.createVNode("div",{class:"fv-datagrid-resize-proxy",style:F.value},null)])}return{renderGridHeader:Ie,renderGridColumnResizeOverlay:Le}}function Cs(){function t(){return e.createVNode("div",{class:"fv-grid-disable"},null)}return{renderDisableMask:t}}function _p(t,n,o,a,r){const{columnContext:i}=n,{conditions:l,clearCondition:s,removeCondition:p}=a,c=e.ref([]);function d(){const m=[];Array.from(l.value).forEach((h,y)=>{const b={id:h.id,code:h.fieldCode,labelCode:h.fieldCode,name:h.fieldName,editor:{type:h.value.editorType}};m.push(b)}),c.value=m}e.watch(l,()=>d());function u(m){p(`field_filter_${m}`);const h=i.value.primaryHeaderColumns.find(y=>y.field===m);if(h){h.filterValue=null;let y=h.status;y=(y&ae.filtered)===ae.filtered?y^ae.filtered:y,h.status=y}o.refresh(),r.reCalculateVisualDataRows()}function f(){s(),i.value.primaryHeaderColumns.forEach(m=>{m.filterValue=null;let h=m.status;h=(h&ae.filtered)===ae.filtered?h^ae.filtered:h,m.status=h}),o.refresh(),r.reCalculateVisualDataRows()}function g(){return e.createVNode("div",{class:"fv-grid-filter-panel"},[e.createVNode(vo,{data:l.value,fields:c.value,mode:"display-only","show-reset":!0,onRemove:u,onReset:f},null)])}return{renderFilterPanel:g}}function Hp(t,n,o,a,r){const{dropOnGroupPanel:i,groupColumnItems:l}=o,{groupFields:s,shouldGroupingData:p}=a,c=e.ref();function d(g){s.value=g.map(m=>m.value),n.updateDataView(),r.reCalculateVisualDataRows()}function u(g){g.preventDefault()}function f(){return p.value&&e.createVNode("div",{class:"fv-grid-group-panel",onDrop:i,onDragover:u},[l.value&&e.createVNode(e.resolveComponent("f-tags"),{ref:c,style:"margin:0.375rem","tag-type":"default",data:l.value,"tag-style":"capsule","show-close":!0,onChange:d},null)])}return{renderGroupPanel:f}}function xn(t,n){var g;const o=String(Date.now()),a=((g=t.rowOption)==null?void 0:g.height)||28,r=e.ref(n.value.primaryColumnsWidth);function i(m){const h={};return m.reduce((y,b,v)=>{const x=v<m.length-1?m[v+1]:null;return v===0&&(y[b.field]={left:0}),b.actualWidth!==void 0&&(y[b.field].width=b.actualWidth),x&&(y[x.field]={left:y[b.field].left+(b.actualWidth||0)}),y},h),h}function l(m,h,y){const b=a*(y+1),x=h[m.field].left-b+(h[m.field].width||0),C=m.parent.height?`${m.parent.height}px`:"";return{left:`${b}px`,width:`${x}px`,height:`${C}`}}function s(m,h,y){return{right:"0px",height:`${m.parent.height?`${m.parent.height}px`:""}`}}function p(m,h){const y=m.parent.height?`${m.parent.height}px`:"";return{left:`${h[m.field].left}px`,height:`${y}`,width:isNaN(Number(h[m.field].width))?"100%":`${h[m.field].width}px`}}function c(m,h,y){const v=(h.spanned||[]).reduce((C,w)=>C+(w.parent.height||0),0)+(m.height||0);return{top:`${m.top}px`,left:`${y[h.field].left}px`,width:`${y[h.field].width}px`,height:`${v}px`,padding:`calc(${v/2}px - 1rem) 0`}}function d(m,h){return`${o}_${m.type}_r_${m.index}_c_${h}_${m.refreshKey||""}`}function u(m){return`${o}_${m.type}_r_${m.index}_${m.refreshKey||""}`}function f(m){const h=m.height?`${m.height}px`:"";return{top:`${m.top}px`,width:isNaN(r.value)?"100%":`${r.value}px`,height:`${h}`}}return e.watch(n,()=>{r.value=n.value.primaryColumnsWidth}),{calculateCellPositionInRow:i,cellKey:d,cellPosition:p,groupCellPosition:l,rowKey:u,rowPosition:f,rowSpanCellPosition:c,summaryCellPosition:s}}function sV(t,n,o){const{hasChildrenField:a}=o,r=e.ref("#9399a0"),i=e.ref(28);function l(){return[].concat(...n.value.filter(f=>f.raw.__fv_descendant_index__.length!==0).map(f=>[...f.raw.__fv_descendant_index__.slice(-1)]).flat()).sort((f,g)=>Number(f)-Number(g))}function s(d){const u=new Array(n.value.length).fill(0);if(t.showLines){const f=l();n.value.forEach((g,m)=>{const h=f.includes(m),y=g.raw[a.value];u[m]=`repeating-linear-gradient(90deg, ${r.value} 0 1px, transparent 0px 2px) ${y?"-10px":"0px"} ${i.value/2}px/20px 1px no-repeat,repeating-linear-gradient(${r.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${h?"50%":"100%"} no-repeat`}),u[0]=""}return u[d]}function p(d,u,f){return f[d].parents.set(d,!0).forEach(m=>{f[m].childsLength=f[m].childWithLines.filter(h=>u[h].visible).length}),u}function c(d){const g=d.raw.__fv_parent_index__===void 0||d.raw.__fv_parent_index__===-1?0:8,m=0,h=d.raw[a.value],y=d.visible?{left:`${d.layer*10+d.layer*g+m}px`,background:s(d.index),display:"flex",width:"100%",position:"relative",paddingLeft:"0.75rem"}:{display:"none"};return h||(y.paddingLeft="1.5rem"),y}return{hierarchyCellContentStyle:c,handleCollapsedPaddingBottom:p}}function lV(t,n,o){const a=e.ref(t.iconField);function r(i,l){if(a.value)return i.raw[t.iconField];let s="";return i.raw[o.value]!==!0?s=n.value.leafnodes:s=i.collapse?n.value.fold:n.value.unfold,s}return{treeNodeIconsClass:r}}function Lt(){function t(o,a){const r=o.pre;if(r){const i=o.visible?(r.__fv_data_position__||0)+(r.__fv_data_height__||0):r.__fv_data_position__;o.top=i,a.__fv_data_position__=i}else o.top=0,a.__fv_data_position__=0}function n(o,a,r){if(o){const i=a.parent;a.cellHeight!==o.offsetHeight&&(a.cellHeight=o.offsetHeight),a.cellHeight&&a.cellHeight>(i.height||0)&&(i.height=a.cellHeight,r.__fv_data_height__=i.height),t(i,r)}}return{updateRowPosition:t,updateVisualInfomation:n}}function cV(t,n,o,a,r,i){const{dataView:l,fold:s,hasRealChildren:p,unFold:c}=a,{collapseField:d,hasChildrenField:u}=r,{updateRowPosition:f}=Lt();function g(y,b){const v=b[y].layer;let x=y+1;for(;x<b.length&&b[x].layer>v;)x++;return x-1}function m(y,b){o.value[y].collapse=!o.value[y].collapse,o.value[y].raw[d.value]=o.value[y].collapse,o.value[y].raw[u.value]=p(o.value[y].raw);const v=o.value[y].collapse;let x=!1,C=y;for(;C<o.value.length;){const N=o.value[C];if((typeof N.raw.__fv_parent_index__=="number"?Number(N.raw.__fv_parent_index__):-1)>b)N.visible=!v,N.raw.__fv_visible__=N.visible,N.collapse&&(C=g(C,o.value)),x=!0;else if(x){C++;break}C++}let w=y;for(;w<o.value.length;){const N=o.value[w];f(N,N.raw),w++}}function h(y){if(y.raw[u.value]){const v=typeof y.raw.__fv_parent_index__=="number"?Number(y.raw.__fv_parent_index__):-1;m(Number(y.raw.__fv_index__),v)}}return{toggleTreeNode:h}}function Lp(t,n,o,a,r,i,l,s,p,c,d){const{onClickCell:u}=i,{gridRowClass:f,onClickRow:g,onMouseoverRow:m,onMouseoutRow:h}=s,{select:y,unSelect:b,indeterminate:v}=p;e.ref(t.cellHeight);const x=e.ref(t.treeNodeIconsData||{}),{hasChildrenField:C,shouldShowCheckBox:w,shouldShowIcon:N}=l,{toggleTreeNode:V}=cV(t,n,a,r,l),{toggleSelectHierarchyItem:D}=c,{cellKey:k,cellPosition:B,rowKey:$,rowPosition:T}=xn(t,o),{hierarchyCellContentStyle:S}=sV(t,a,l),{treeNodeIconsClass:F}=lV(t,x,C);function A(K,z){const q=K.raw[C.value];return{"fv-tree-node-toggle":q&&K.collapse,"fv-tree-node-toggle-minus":q&&!K.collapse}}function E(K,z){K.stopPropagation(),V(z)}function I(K,z){return e.createVNode("div",{class:A(K),onClick:q=>E(q,K)},null)}function R(K,z){return N.value&&e.createVNode("div",{id:"treeNodeIcons",class:F(K,z)},null)}function O(K){K.checked?y(K):b(K),D(K)}function G(K,z){return w.value&&e.createVNode(dn,{id:"checkbox_for_"+k(K,z.index),indeterminate:K.indeterminate,modelValue:K.checked,"onUpdate:modelValue":q=>K.checked=q,onChange:()=>O(K)},null)}function M(K,z){return e.createVNode("span",{title:z.data},[z.mode===ht.editing?z.getEditor(z):z.data])}function j(K,z,q){return e.createVNode("div",{ref:z.setRef,key:k(K,z.index),class:"fv-grid-hierarchy-cell",style:B(z,q)},[e.createVNode("div",{style:S(K)},[I(K),R(K,z),G(K,z),M(K,z)])])}function H(K,z,q){return e.createVNode("div",{ref:z.setRef,key:k(K,z.index),class:"fv-grid-cell",style:B(z,q),onClick:L=>u(L,z)},[z.mode===ht.editing?z.getEditor(z):z.formatter?z.formatter(z,K):z.data!=null?z.data.toString():z.data])}function _(K,z){return z==="left"&&o.value.leftColumns.length>0&&o.value.leftColumns[0].field===K.field||z==="primary"&&o.value.primaryColumns.length>0&&o.value.primaryColumns[0].field===K.field}function W(K,z,q="primary"){return e.createVNode("div",{ref:K.setRef,key:$(K),class:f(K),style:T(K),onMouseover:L=>m(L,K),onMouseout:L=>h(L,K),onClick:L=>g(L,K)},[Object.values(K.data).filter(L=>z[L.field]&&L.rowSpan===1).map((L,X)=>_(L,q)?j(K,L,z):H(K,L,z))])}return{renderDataRow:W}}function ws(t,n,o){const{horizontalScrollThumbStyle:a,onMouseDownScrollThumb:r,shouldShowHorizontalScrollbar:i}=o;function l(){return i.value&&e.createVNode("div",{class:"fv-grid-horizontal-scroll"},[e.createVNode("div",{class:"fv-grid-horizontal-scroll-thumb",style:a.value,onMousedown:s=>r(s,n,"horizontal")},null)])}return{renderHorizontalScrollbar:l}}function Wp(t,n,o,a){const r=e.ref(t.pagination),i=e.computed(()=>t.data.length);function l(c){o.navigatePageTo(c),a.resetScroll(),n.emit("pageIndexChanged",c)}function s(c){o.changePageSizeTo(c),a.resetScroll(),n.emit("pageSizeChanged",c)}function p(){var c;return((c=r.value)==null?void 0:c.enable)&&e.createVNode("div",{class:"fv-datagrid-pagination"},[e.createVNode(Bo,{mode:"default",pageSize:r.value.size,totalItems:i.value,onPageIndexChanged:l,onPageSizeChanged:s},null)])}return{renderDataGridPagination:p}}function Ns(t,n,o,a,r){const{isSelectingHirarchyItem:i,multiSelectOnClickRow:l,multiSelectOnlyOnCheck:s,selectItem:p,toggleSelectItem:c}=o,{onMouseoverRow:d,sidebarRowClass:u}=n,{showRowNumer:f,showSidebarCheckBox:g,sidebarCellPosition:m,rowKey:h,cellKey:y}=a,{gridSideStyle:b}=r;function v(D){D.stopPropagation()}function x(D){return e.createVNode("div",{class:"custom-control custom-checkbox f-checkradio-single fv-grid-sidebar-row-checkbox"},[e.withDirectives(e.createVNode("input",{id:y(D),title:y(D),type:"checkbox","onUpdate:modelValue":k=>D.checked=k,class:"custom-control-input"},null),[[e.vModelCheckbox,D.checked]]),e.createVNode("label",{class:"custom-control-label",for:y(D),onClick:v},null)])}function C(D){return e.createVNode("div",{class:"fv-grid-sidebar-row-number",onMouseover:k=>d(k,D)},[D.dataIndex])}function w(D,k,B){i.value?l.value?c(B):p(B):s.value||l.value?c(B):p(B)}function N(D){return(g.value||f.value)&&D.value.map(k=>e.createVNode("div",{key:h(k),class:u(k),style:m(k),onClick:B=>w(B,D,k)},[g.value&&x(k),f.value&&C(k)]))}function V(D){return e.createVNode("div",{class:"fv-grid-content-side"},[e.createVNode("div",{class:"fv-grid-side",style:b.value},[N(D)])])}return{renderDataGridSidebar:V}}function qp(t,n,o){const{columnContext:a}=o,r=e.ref(t.summary),i=e.computed(()=>{const s=r.value;return s&&s.enable&&s.groupFields&&s.groupFields.length>0});function l(){return i.value&&e.createVNode("div",{class:"fv-datagrid-summary"},[e.createVNode("div",{class:"fv-datagird-summary-panel"},[e.createVNode("span",{class:"fv-datagrid-summary-title"},[e.createTextVNode("当页合计")]),e.createVNode("div",{class:"fv-datagrid-summary-content"},[a.value.summaryColumns.map(s=>e.createVNode("div",{class:"fv-datagrid-summary-field"},[e.createVNode("span",{class:"fv-datagrid-summary-field-title"},[`${s.title}:`]),e.createVNode("span",{class:"fv-datagrid-summary-field-value"},[n.summaries.get(s.field)])]))])])])}return{renderDataGridSummery:l}}function Vs(t,n,o){const{verticalScrollThumbStyle:a,onMouseDownScrollThumb:r,shouldShowVirticalScrollbar:i}=o;function l(){return i.value&&e.createVNode("div",{class:"fv-grid-vertical-scroll"},[e.createVNode("div",{class:"fv-grid-vertical-scroll-thumb",style:a.value,onMousedown:s=>r(s,n,"vertical")},null)])}return{renderVerticalScrollbar:l}}function Ln(t){const n=e.ref(t.minHeight),o=e.ref(t.minWidth),a=e.ref(t.height),r=e.ref(t.width),i=e.computed(()=>a.value<=0?0:Math.max(a.value,n.value)),l=e.computed(()=>r.value<=0?0:Math.max(r.value,o.value));return e.watch([()=>t.height,()=>t.width,()=>t.minHeight,()=>t.minWidth],([p,c,d,u])=>{n.value=Number(d),o.value=Number(u),a.value=Number(p),r.value=Number(c)}),{containerStyleObject:e.computed(()=>({height:i.value>0?`${i.value}px`:t.fit?"100%":"",width:l.value>0?`${l.value}px`:t.fit?"100%":""}))}}function Wn(t){const o={defaultColumnWidth:120,headerDepth:1,leftColumns:[],leftColumnsMap:new Map,leftColumnsWidth:0,leftHeaderColumns:[],primaryColumns:[],primaryColumnsMap:new Map,primaryColumnsWidth:0,primaryHeaderColumns:[],rightColumns:[],rightColumnsMap:new Map,rightColumnsWidth:0,rightHeaderColumns:[],summaryColumns:[]},a=e.ref(o);function r(){a.value={defaultColumnWidth:120,headerDepth:1,leftColumns:[],leftColumnsMap:new Map,leftColumnsWidth:0,leftHeaderColumns:[],primaryColumns:[],primaryColumnsMap:new Map,primaryColumnsWidth:0,primaryHeaderColumns:[],rightColumns:[],rightColumnsMap:new Map,rightColumnsWidth:0,rightHeaderColumns:[],summaryColumns:[]}}const i=e.ref(t.summary),l=e.computed(()=>{const x=i.value;return(x==null?void 0:x.groupFields)||[]});function s(){a.value.rightColumns.forEach(w=>{w.showSetting=!1}),a.value.primaryColumns.forEach(w=>{w.showSetting=!1});const x=a.value.rightColumns.filter(w=>w.visible),C=a.value.primaryColumns.filter(w=>w.visible);x.length>0?x[x.length-1].showSetting=!0:C.length>0&&(C[C.length-1].showSetting=!0)}function p(x){r();const C=new Map;return l.value&&l.value.reduce((w,N)=>(w.set(N,!0),w),C),x.reduce((w,N)=>(N.visible=N.visible!==!1,N.fixed==="left"?(a.value.leftColumns.push(N),a.value.leftColumnsMap.set(N.field,N),a.value.leftColumnsWidth+=N.actualWidth):N.fixed==="right"?(a.value.rightColumns.push(N),a.value.rightColumnsMap.set(N.field,N),a.value.rightColumnsWidth+=N.actualWidth):(a.value.primaryColumns.push(N),a.value.primaryColumnsMap.set(N.field,N),a.value.primaryColumnsWidth+=N.actualWidth),C.has(N.field)&&a.value.summaryColumns.push(N),w),a),s(),a}p(t.columns);const c=e.computed(()=>a.value.leftColumns.length>0),d=e.computed(()=>a.value.rightColumns.length>0);function u(x,C){return C.sortable&&C.sort&&C.sort!=="none"&&x.push(C),x}function f(x,C){return x.sortOrder=x.sortOrder||0,C.sortOrder=C.sortOrder||0,x.sortOrder===C.sortOrder?0:x.sortOrder<C.sortOrder?-1:1}function g(x,C){return x.sortOrder=x.sortOrder||0,C.sortOrder=C.sortOrder||0,x.sortOrder===C.sortOrder?0:x.sortOrder<C.sortOrder?1:-1}function m(x,C){return C.filterable&&x.push(C),x}function h(){const x=[];return a.value.leftColumns.reduce(m,x),a.value.primaryColumns.reduce(m,x),a.value.rightColumns.reduce(m,x),x}function y(){const x=[];a.value.leftColumns.reduce(u,x),a.value.primaryColumns.reduce(u,x),a.value.rightColumns.reduce(u,x);const C=Math.max(...x.map(w=>w.sortOrder||0));return x.sort(g).map(w=>{const N=w.sortOrder||C+1;return w.sortOrder=N,w}).sort(f).map((w,N)=>{const V=N+1;return w.sortOrder=V,w})}function b(x,C,w){const N=x.map(V=>{const D=w.getSorterByColumn(V),k=V.sort==="asc",B=V.sort==="desc",$=k?D.ascend:B?D.decend:void 0;return{field:V.field,compare:$}});C.setSorters(N)}function v(x,C){const w=y();b(w,x,C)}return{applyColumnSorter:v,collectionFilterableColumns:h,applySortableColumns:b,collectionSortableColumns:y,columnContext:a,hasLeftFixedColumn:c,hasRightFixedColumn:d,updateColumnRenderContext:p,updateColumnSettingIcon:s}}const dV=[{name:"是",value:!0},{name:"否",value:!1}];function uV(t){return t.filter=t.filter||function(n){return String(t.filterValue).split(",").includes(String(n[t.field]))},e.createVNode("div",null,[e.createVNode(e.resolveComponent("f-checkbox-group"),{modelValue:t.filterValue,"onUpdate:modelValue":n=>t.filterValue=n,"enum-data":dV},null)])}const fV=e.ref([{name:"七天",selectable:!0},{name:"一个月",selectable:!0},{name:"三个月",selectable:!0},{name:"半年",selectable:!0}]);function pV(t){const n=e.ref(!1);return t.filter=t.filter||function(o){const a=new Date(new Date(t.filterValue).toLocaleDateString()).valueOf();return new Date(new Date(o[t.field]).toLocaleDateString()).valueOf()===a},e.createVNode("div",{style:"display:flex;flex-direction:column;"},[e.createVNode("div",{style:"display:flex;margin-bottom:6px;"},[e.createVNode("label",{style:"margin-right:8px"},[e.createTextVNode("按区间筛选")]),e.createVNode(e.resolveComponent("f-switch"),{modelValue:n.value,"onUpdate:modelValue":o=>n.value=o,size:"small"},null)]),e.createVNode(e.resolveComponent("f-date-picker"),{modelValue:t.filterValue,"onUpdate:modelValue":o=>t.filterValue=o},null),e.createVNode(e.resolveComponent("f-tags"),{style:"margin-top:10px",data:fV.value,selectable:!0,"tag-style":"capsule"},null)])}function mV(t){t.filter=t.filter||function(o){const a=Number.parseFloat(t.filterValue),r=Number.parseFloat(o[t.field]);return isNaN(a)?isNaN(r):a===r};function n(o){t.filterValue=o}return e.createVNode("div",null,[e.createVNode(e.resolveComponent("f-number-spinner"),{"can-null":!0,precision:"2",value:t.filterValue,onValueChange:n},null)])}function hV(t,n,o,a,r,i){t.filterHistory=t.filterHistory||r.getFilterHistory(t),t.filter=t.filter||function(f){return(f[t.field]||"").startsWith(t.filterValue)};function l(f,g){r.removeFilterHistory(t,f.name),t.filterHistory=r.getFilterHistory(t)}function s(f){t.filterValue=f.name}function p(f){t.filterHistory=f}const c=a.rawView.value.reduce((f,g,m)=>(f.push(g[t.field]),f),[]),u=[...new Set(c)].map((f,g)=>({id:g,name:f}));return e.createVNode("div",{style:"display:flex;flex-direction:column;"},[e.createVNode(e.resolveComponent("f-search-box"),{modelValue:t.filterValue,"onUpdate:modelValue":f=>t.filterValue=f,"popup-host":n.value,"popup-right-boundary":o.value,"popup-offset-x":i.offsetX,"recommended-data":u},null),e.createVNode(e.resolveComponent("f-tags"),{style:"margin-top:10px","tag-type":"default",data:t.filterHistory,"show-close":!0,selectable:!0,onRemove:l,onSelectionChange:s,onChange:p},null)])}function gV(t,n,o,a,r,i){t.filter=t.filter||function(g){return String(t.filterValue).split(",").includes(String(g[t.field]))};const l=",",s=a.rawView.value.reduce((g,m,h)=>(g.push(m[t.field]),g),[]),c=[...new Set(s)].map((g,m)=>({id:m,name:g}));function d(g){return(g==null?void 0:g.split(l))||[]}function u(g){return g.map(h=>h.name).join(l)}function f(g){t.filterValue=u(g)}return e.createVNode(e.resolveComponent("f-list-view"),{data:c,"multi-select":!0,"multi-select-mode":"OnCheckAndClick","id-field":"name",view:"SingleView",header:"Search",size:"Small","selection-values":d(t.filterValue),onSelectChange:g=>f(g)},{default:()=>[e.createTextVNode(" ")]})}function yV(t){e.ref("请输入关键词"),e.ref('<i class="f-icon f-icon-search"></i>');const n=[{name:"发票类型",checked:!1},{name:"发票代码",checked:!1},{name:"开票日期",checked:!1},{name:"票价(燃油附加费)",checked:!1},{name:"税收分类编号",checked:!1},{name:"不含税单价",checked:!1},{name:"往来单位",checked:!1},{name:"商品服务描述",checked:!1},{name:"项目负责人",checked:!1},{name:"所属单位",checked:!1}];return e.createVNode(e.resolveComponent("f-list-view"),{data:n,"multi-select":!0,view:"SingleView",size:"Small"},{default:()=>[e.createTextVNode(" ")]})}function Ss(t,n,o,a,r){const i=new Map([["boolean","boolean-filter"],["date","date-filter"],["datetime","date-filter"],["number","numeric-filter"],["string","text-filter"],["text","text-filter"],["enum","enum-filter"],["reference","list-filter"]]),l=new Map([["boolean-filter",uV],["date-filter",pV],["enum-filter",gV],["list-filter",yV],["numeric-filter",mV],["text-filter",hV]]);function s(p){var f,g;const c=((f=p.column)==null?void 0:f.dataType)||"string",d=((g=p.column)==null?void 0:g.filter)||i.get(c)||"text-editor",u=l.get(d);if(u)return u(p,t,n,o,a,r)}return{getFilterEditor:s}}function $s(t){const o=e.ref(t.commandOption.enable||!1),a=e.ref(t.commandOption.commands||[]);function r(i){if(o.value&&!(i.value.findIndex(s=>s.dataType==="commands")>-1)){const s={field:"__commands__",title:"操作",width:120,fixed:"right",dataType:"commands",commands:a.value,visible:!0};i.value.push(s)}}return{applyCommands:r}}function Ds(t,n,o,a,r,i,l){const{columnContext:s}=o,{getGridHeaderCells:p}=r,{groupFields:c}=i,d=e.ref(-1),u=e.ref(!1),f=e.computed(()=>c.value&&c.value.map(v=>{var x;return{name:((x=s.value.primaryColumnsMap.get(v))==null?void 0:x.title)||v,value:v}}));function g(v,x,C){var w,N,V;if(v.stopPropagation(),x){const D=`${(w=x.column)==null?void 0:w.title}:${(N=x.column)==null?void 0:N.field}`;(V=v.dataTransfer)==null||V.setData("Text",D),setTimeout(()=>{d.value=C,u.value=!0})}}function m(v,x){if(v.preventDefault(),d.value!==x){const{primaryColumns:C}=s.value,w=C[d.value],N=C;N.splice(d.value,1),N.splice(x,0,w),s.value.primaryHeaderColumns=Array.from(p(N).values()),d.value=x}}function h(v,x){v.preventDefault(),v.dataTransfer&&(v.dataTransfer.dropEffect="move")}function y(v,x){u.value=!1,a.updateDataView(),l.reCalculateVisualDataRows()}function b(v){var C;v.preventDefault(),v.stopPropagation();const x=(C=v.dataTransfer)==null?void 0:C.getData("Text");if(x){const w=x.split(":");w[0];const N=w[1];i.groupFields.value.push(N)}a.updateDataView(),l.reCalculateVisualDataRows()}return{dragstart:g,dragenter:m,dragover:h,dragend:y,dropOnGroupPanel:b,isDragging:u,groupColumnItems:f}}function ks(t,n,o,a,r){var D,k,B,$,T;const{getGridHeaderCells:i}=r,l=120,s=32,p=e.ref(((D=t.rowNumber)==null?void 0:D.enable)||!1),c=e.ref(((k=t.selection)==null?void 0:k.multiSelect)||!1),d=e.ref(0+(p.value&&((B=t.rowNumber)==null?void 0:B.width)||0)+(c.value?s:0)),u=e.ref((($=t.columnOption)==null?void 0:$.fitColumns)||!1),f=e.ref(u.value&&((T=t.columnOption)==null?void 0:T.fitMode)||"average");function g(S,F,A){const E=parseInt(S.width,10)/100;return A*E}function m(S,F,A){return typeof S.width=="string"?g(S,F,A):S.width||l}function h(S,F){const A=[],E=[];let I=0;S.value.primaryColumns.filter(G=>G.visible).forEach(G=>{typeof G.width=="string"?E.push(G):(G.width=G.width||l,I+=G.width,A.push(G))});const R=F*(A.length/S.value.primaryColumns.filter(G=>G.visible).length);A.forEach(G=>{const M=R*(G.width/I);G.actualWidth=M,S.value.primaryColumnsWidth+=G.actualWidth});const O=F-R;E.forEach(G=>{const M=g(G,S.value,O);G.actualWidth=M,S.value.primaryColumnsWidth+=G.actualWidth})}function y(S,F){const A=F/(S.value.primaryColumns.filter(E=>E.visible).length||1);S.value.primaryColumns.filter(E=>E.visible).forEach(E=>{E.actualWidth=A,S.value.primaryColumnsWidth+=E.actualWidth})}function b(S,F){const A=[],E=[],I=new WeakMap;let R=0,O=0;if(S.value.primaryColumns.filter(M=>M.visible).forEach(M=>{if(typeof M.width=="string"){const j=g(M,S.value,F);I.set(M,j),R+=j,E.push(M)}else M.width=M.width||l,O+=M.width,A.push(M)}),F-R>O){const M=F-R;E.forEach(j=>{j.actualWidth=I.get(j)||l,S.value.primaryColumnsWidth+=j.actualWidth}),A.forEach(j=>{j.actualWidth=M*(j.width/O),S.value.primaryColumnsWidth+=j.actualWidth})}else h(S,F)}function v(S,F){S.value.primaryColumns.filter(A=>A.visible).forEach(A=>{A.actualWidth=m(A,S.value,F),S.value.primaryColumnsWidth+=A.actualWidth})}const x={average:y,expand:b,none:v,percentage:h};function C(S){S.value.leftHeaderColumns=Array.from(i(S.value.leftColumns.filter(F=>F.visible)).values()),S.value.primaryHeaderColumns=Array.from(i(S.value.primaryColumns.filter(F=>F.visible)).values()),S.value.rightHeaderColumns=Array.from(i(S.value.rightColumns.filter(F=>F.visible)).values())}function w(S){S.value.leftColumnsWidth=0,S.value.primaryColumnsWidth=0,S.value.rightColumnsWidth=0,S.value.leftColumns.filter(F=>F.visible).forEach(F=>{S.value.leftColumnsWidth+=F.actualWidth||0}),S.value.primaryColumns.filter(F=>F.visible).forEach(F=>{S.value.primaryColumnsWidth+=F.actualWidth||0}),S.value.rightColumns.filter(F=>F.visible).forEach(F=>{S.value.rightColumnsWidth+=F.actualWidth||0}),S.value=Object.assign({},S.value)}function N(S,F,A){var j;let E=0;const I=S.value.primaryColumns,R=S.value.rightColumns;S.value.rightColumns.filter(H=>H.visible).forEach(H=>{H.actualWidth=m(H,S.value,F),E+=H.actualWidth});const O=A-E,G=x[f.value];if(G&&G(S,O),S.value.primaryColumnsWidth+E<=A)return S.value.primaryColumns=[...I,...R],S.value.primaryColumnsWidth+=E,S.value.rightColumns=[],S.value.rightColumnsWidth=0,!0;const M=new Map;return M.set("primary",[]),M.set("right",[]),S.value.primaryColumns.reduce((H,_)=>{var W,K;return _.fixed==="right"?(W=H.get("right"))==null||W.push(_):(K=H.get("primary"))==null||K.push(_),H},M),(j=M.get("right"))!=null&&j.length&&(S.value.primaryColumns=[...M.get("primary")||[]],S.value.rightColumns=[...M.get("right")||[]]),S.value.primaryColumnsWidth=0,S.value.rightColumnsWidth=0,!1}function V(){if(o.value){n.value.leftColumnsWidth=0,n.value.primaryColumnsWidth=0,n.value.rightColumnsWidth=0;const S=o.value.clientWidth-d.value;n.value.leftColumns.filter(A=>A.visible).forEach(A=>{A.actualWidth=m(A,n.value,S),n.value.leftColumnsWidth+=A.actualWidth});const F=S-n.value.leftColumnsWidth;if(N(n,S,F))a.value=F;else{n.value.rightColumns.filter(I=>I.visible).forEach(I=>{I.actualWidth=m(I,n.value,S),n.value.rightColumnsWidth+=I.actualWidth});const A=S-n.value.leftColumnsWidth-n.value.rightColumnsWidth,E=x[f.value];E&&E(n,A),a.value=A}C(n),n.value=Object.assign({},n.value)}}return e.watch([()=>{var S;return(S=t.columnOption)==null?void 0:S.fitMode},()=>{var S;return(S=t.columnOption)==null?void 0:S.fitColumns}],([S,F])=>{f.value=S,u.value=F,u.value&&V()}),{calculateColumnHeaders:C,calculateColumnsSize:V,calculateColumnsWidth:w}}function Bs(t,n){var c;const o=e.ref((c=t.columnOption)==null?void 0:c.groups);function a(d,u,f,g,m){const h={actualWidth:0,children:[],depth:1,field:d.field,layer:1,left:0,parent:f,resizable:!1,title:d.title||"",status:ae.none,popoverRef:e.ref(),showPopover:!1,column:null,filterValue:null,sortType:"none"},y=g||h;if(d.group){let b=1;d.group.reduce((v,x)=>{if(typeof x=="string"){const C=u.get(x);C&&(m.fieldToRootMap.set(x,y),v.actualWidth+=C.actualWidth,v.children.push(C))}else{const C=a(x,u,v,y,m);b=Math.max(b,C.depth),v.actualWidth+=C.actualWidth,v.children.push(C)}return v},h),h.depth+=b}return n.value.headerDepth=Math.max(n.value.headerDepth,h.depth),h}function r(d){const u={groupedCells:new Map,fieldToRootMap:new Map};return o.value&&o.value.reduce((f,g)=>{const m=a(g,d,null,null,u);return f.groupedCells.set(g.field,m),f},u),u}function i(d){if(!d||d.length===0)return 0;const u=d[0];return u.children&&u.children.length>0&&(u.left=i(u.children)),u.left}function l(d,u){const f=n.value.headerDepth;d.forEach(g=>{g.layer=u?u.layer+1:1;const m=g.children&&g.children.length===0;g.depth=m?f-(g.layer-1):1,g.left=m?g.left:i(g.children),g.children&&l(g.children,g)})}function s(d,u){const f=new Map;return d.forEach(g=>{const m=u.fieldToRootMap.get(g.field),h=m!=null;h&&!f.has(m.field)&&f.set(m.field,m),h||f.set(g.field,g)}),l(Array.from(f.values())),f}function p(d){let u=new Map,f=0;if(d.reduce((g,m)=>{let h=ae.none;return h=m.sortable?h|ae.sortable:h,h=m.filterable?h|ae.filterable:h,h=m.sort&&m.sort!=="none"?h|ae.sorted|(m.sort==="asc"?ae.ascending:ae.descending):h,g.set(m.field,{actualWidth:m.actualWidth||0,children:[],depth:1,layer:1,left:f,field:m.field,parent:null,resizable:m.resizable||!1,title:m.title,status:h,popoverRef:e.ref(),showPopover:!1,column:m,filterValue:null,sortType:m.sort||"none",showSetting:m.showSetting}),f+=m.actualWidth||0,g},u),o.value){const g=r(u);u=s(u,g)}return u}return{getGridHeaderCells:p}}const bV=["equal","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","contain","startWidth","endWidth"],vV={equal:(t,n,o)=>t&&t[n]===o,notEqual:(t,n,o)=>t&&t[n]!==o,contain:(t,n,o)=>t?(t[n]||"").indexOf(o)>-1:!1,startWidth:(t,n,o)=>t?(t[n]||"").startsWith(o):!1,endWidth:(t,n,o)=>t?(t[n]||"").endsWith(o):!1},xV={equal:(t,n,o)=>t&&t[n]===o,notEqual:(t,n,o)=>t&&t[n]!==o},CV={equal:(t,n,o)=>{if(t){const a=new Date(new Date(o).toLocaleDateString()).valueOf();return new Date(new Date(t[n]).toLocaleDateString()).valueOf()===a}return!1},notEqual:(t,n,o)=>{if(t){const a=new Date(new Date(o).toLocaleDateString()).valueOf();return new Date(new Date(t[n]).toLocaleDateString()).valueOf()!==a}return!1},greaterThan:(t,n,o)=>{if(t){const a=new Date(new Date(o).toLocaleDateString()).valueOf();return new Date(new Date(t[n]).toLocaleDateString()).valueOf()>a}return!1},greaterThanOrEqual:(t,n,o)=>{if(t){const a=new Date(new Date(o).toLocaleDateString()).valueOf();return new Date(new Date(t[n]).toLocaleDateString()).valueOf()>=a}return!1},lessThan:(t,n,o)=>{if(t){const a=new Date(new Date(o).toLocaleDateString()).valueOf();return new Date(new Date(t[n]).toLocaleDateString()).valueOf()<a}return!1},lessThanOrEqual:(t,n,o)=>{if(t){const a=new Date(new Date(o).toLocaleDateString()).valueOf();return new Date(new Date(t[n]).toLocaleDateString()).valueOf()<=a}return!1}},wV={equal:(t,n,o)=>t?String(o).split(",").includes(String(t[n])):!1,notEqual:(t,n,o)=>t?String(o).split(",").findIndex(r=>r===String(t[n]))===-1:!1},NV={equal:(t,n,o)=>{if(t){const a=Number.parseFloat(String(o)),r=Number.parseFloat(String(t[n]));return isNaN(a)?isNaN(r):a===r}return!1},notEqual:(t,n,o)=>{if(t){const a=Number.parseFloat(String(o)),r=Number.parseFloat(String(t[n]));return isNaN(a)?!0:a!==r}return!1},greaterThan:(t,n,o)=>{if(t){const a=Number.parseFloat(String(o)),r=Number.parseFloat(String(t[n]));return isNaN(a)?isNaN(r):r>a}return!1},greaterThanOrEqual:(t,n,o)=>{if(t){const a=Number.parseFloat(String(o)),r=Number.parseFloat(String(t[n]));return isNaN(a)?isNaN(r):r>=a}return!1},lessThan:(t,n,o)=>{if(t){const a=Number.parseFloat(String(o)),r=Number.parseFloat(String(t[n]));return isNaN(a)?isNaN(r):r<a}return!1},lessThanOrEqual:(t,n,o)=>{if(t){const a=Number.parseFloat(String(o)),r=Number.parseFloat(String(t[n]));return isNaN(a)?isNaN(r):r<=a}return!1}};function jo(){const t=e.ref([]),n=new Map,{loadConditionGroup:o}=Mu(),a=new Map([["boolean",xV],["datetime",CV],["enum",wV],["number",NV],["text",vV]]);function r(u){n.delete(u),t.value=Array.from(n.values())}function i(){n.clear(),t.value=[]}function l(u){const{valueType:f}=u.value,g=u.compareType||"0",m=bV[Number(g)];return a.get(f)[m]}function s(u){const f=u.relation===2?0:1,g=u.items.map(h=>{const y=l(h);return v=>y(v,h.fieldCode,h.value.getValue())}),m=u.children&&u.children.length?u.children.map(h=>s(h)):[];return{relation:f,filterFunctions:g,children:m}}function p(){const u=o(t.value);return s(u)}function c(u,f){const g=f.filterFunctions.map(h=>h(u)),m=f.children.map(h=>c(u,h));return f.relation===1?g.every(h=>h)&&m.every(h=>h):g.includes(!0)||m.includes(!0)}function d(u){const f=p();return c(u,f)}return{apply:d,clearCondition:i,conditions:t,removeCondition:r}}function Cn(t,n){var y,b;const{idField:o}=n,a=e.ref(t.summary),r=e.ref(t.group),i=e.ref(((y=t.group)==null?void 0:y.groupFields)||[]),l=e.ref(((b=t.group)==null?void 0:b.enable)||!1),s=e.computed(()=>{const v=a.value;return(v==null?void 0:v.groupFields)||[]}),p=e.computed(()=>{const v=r.value;return v&&v.showSummary}),c=new Map;let d=[],u="";function f(v,x,C,w,N){const V=w[C];V&&(x.reduce((D,k,B)=>{var S;const $=k[V];let T=D.get($);if(!T){const F=s.value.reduce((A,E)=>(A.set(E,0),A),new Map);T={field:V,title:((S=N.get(V))==null?void 0:S.title)||V,value:$,layer:C,details:[],groupSummaries:F},D.set($,T)}return s.value&&s.value.forEach(F=>{if(T){const A=T.groupSummaries.get(F)||0;T.groupSummaries.set(F,A+k[F])}}),T.details.push(k),D},v),C<w.length-1&&v.forEach((D,k)=>{D.nestGroup=new Map,f(D.nestGroup,D.details,C+1,w,N),D.details=[]}))}function g(v){const x=[];return v.forEach(C=>{const w={__fv_data_grid_group_collapse__:!1,__fv_data_grid_group_field__:C.field,__fv_data_grid_group_layer__:C.layer,__fv_data_grid_group_row__:!0,__fv_data_grid_group_value__:C.value};let N=0;if(x.push(w),C.nestGroup){const V=g(C.nestGroup);x.push(...V),N+=V.length}if(C.details&&C.details.length&&(x.push(...C.details),N+=C.details.length),p.value){const V={__fv_data_grid_group_field__:C.field,__fv_data_grid_group_layer__:C.layer,__fv_data_grid_group_summary__:!0};V[o.value]=`summary_of_${C.field}_${C.value}`,V[C.field]=Array.from(C.groupSummaries.entries()).reduce((D,[k,B])=>`${D} ${k} total:${B} `,""),x.push(V)}C.groupSummaries&&C.groupSummaries.size&&C.groupSummaries.forEach((V,D)=>{w[D]=V}),w[o.value]=`group_of_${C.field}_${C.value}`,w[C.field]=`${C.title}:${C.value} (${N})`}),x.forEach((C,w)=>{C.__fv_data_index__=w}),x}function m(v,x,C){if(!v||v.length===0)return x;const w=v.join(",");return w!==u&&(c.clear(),d=[],u=w,f(c,x,0,v,C),d=g(c)),d}function h(v){return{"f-icon":!0,"f-icon-arrow-chevron-down":!0,"fv-grid-group-row-icon-collapse":v.collapse}}return{collpaseGroupIconClass:h,generateGroupData:m,groupFields:i,shouldGroupingData:l}}function VV(t,n,o,a){const r=e.ref(!!t.hierarchy||!0),{idField:i}=a,{collapseField:l,hasChildrenField:s,parentIdField:p}=o,c=new Map;function d(T,S){const F=new Map;return T.reduce((A,E)=>{const I=E[p.value]!==void 0?E[p.value]:"";if(I&&S.has(I)){const O=S.get(I);E.__fv_parent_index__=O.__fv_index__,O.__fv_hasChildren__=!0}const R=A.has(I)?A.get(I):[];return R.push(E),A.set(I,R),A},F),F}function u(T){const S=new Map;return T.reduce((F,A)=>{const E=A[i.value];return F.set(E,A),F},S),S}function f(T){T.forEach(S=>{const F=S[i.value];S.__fv_children_index__.map(E=>T[E]).forEach(E=>{E.__fv_parents__=new Map([...S.__fv_parents__.entries(),[F,!0]])})})}function g(T){T.forEach(S=>{const F=new Set(S.__fv_children_index__);S.__fv_children_index__=[...F].sort((A,E)=>A-E)})}function m(T,S){T.forEach(F=>{const A=F.__fv_parents__;Array.from(A.keys()).map(E=>S.get(E)).forEach(E=>{E.__fv_children_index__.push(F.__fv_index__)})}),g(T)}function h(T){T.forEach(S=>{S.__fv_child_with_lines__=[],S.__fv_child_length__=S.__fv_descendant_index__.length,S.__fv_descendant_index__.map(F=>T[F]).reduce((F,A)=>(F.__fv_child_length__+=A.__fv_children_index__.length,F.__fv_child_with_lines__.push(...A.__fv_children_index__,A.__fv_index__),F),S)})}function y(T,S){return{id:T,index:S,parentId:"",parentIndex:-1,parents:new Map,children:new Map,descendant:new Map}}function b(T,S){Array.from(S.keys()).forEach(F=>{S.get(F).reduce((E,I)=>{const R=I[i.value],O=T.get(I[i.value]),G=T.get(F);return G&&(G.children.set(R,O),G.children.set(R,O),O.parentId=F,O.parentIndex=G.index,O.parents.set(F,G)),E},T)})}function v(T){T.children.forEach(F=>{F.parents=new Map([...T.parents.entries(),[T.id,T]]),v(F)})}function x(T,S){T.filter(F=>F[p.value]===void 0||F[p.value]==="").forEach(F=>{const A=F[i.value],E=S.get(A);v(E)})}function C(T){Array.from(T.values()).forEach(S=>{Array.from(S.parents.values()).forEach(F=>{F.descendant.set(S.id,S)})})}function w(T){c.clear(),T.forEach((A,E)=>{const I=A[i.value];c.set(I,y(I,E))});const S=u(T),F=d(T,S);return b(c,F),x(T,c),C(c),c}function N(T){const S=T[i.value],F=c.get(S);return F&&F.children.size>0}function V(T){return T[s.value]&&!N(T)}function D(T){w(n.value);const S=u(T),F=d(T,S);return T.forEach((A,E)=>{var G;const I=A[i.value],R=F.has(I)?(G=F.get(I))==null?void 0:G.map(M=>M.__fv_index__):[],O=y(I,E);A.__fv_graph_node__=O,A.__fv_children_index__=R,A.__fv_descendant_index__=[...R],A.__fv_parents__=new Map,V(A)&&(A[l.value]=!0)}),f(T),m(T,S),t.showLines&&h(T),T}function k(T,S,F){const E=F.value[T][i.value],I=c.get(E);if(I){const R=c.get(I.parentId);let O=F.value.length-1;if(R){const G=Array.from(R.children.keys()).indexOf(I.id);if(G===R.children.size-1){const j=Array.from(R.descendant.values())[R.descendant.size-1];O=F.value.findIndex(_=>_[i.value]===j.id)+1}else{const j=Array.from(R.children.values())[G+1];O=F.value.findIndex(_=>_[i.value]===j.id)}S[s.value]=!1,S[p.value]=R.id,F.value.splice(O,0,S)}}}function B(T,S,F){const A=F.value[T],E=A[i.value];if(c.get(E)){const O=F.value.findIndex(G=>G[i.value]===E)+1;A[s.value]=!0,A[l.value]=!1,S[s.value]=!1,S[p.value]=E,F.value.splice(O,0,S)}}function $(T,S){const F=T[i.value],A=c.get(F),E=Array.from(A.descendant.keys());E.unshift(F);const I=c.get(A.parentId);if(I&&(I.children.delete(F),I.children.size===0)){const O=S.find(G=>G[i.value]===A.parentId);O[s.value]=!1,O[l.value]=!1}return S.filter(O=>E.indexOf(O.id)===-1)}return{generateHierarchyData:D,hasRealChildren:N,insertSibling:k,insertChild:B,shouldStratifyData:r,trimmedOriginalData:$}}function Qt(t,n,o,a){const r=new Map,i=new Map,l=new Map,s=new Map,p=new Map,c=e.ref([]),d=e.ref([]),u=jo(),f=Cn(t,a),{generateGroupData:g,groupFields:m,shouldGroupingData:h}=f,y=e.ref(t.data),b=VV(t,y,o,a),{generateHierarchyData:v,hasRealChildren:x,insertSibling:C,insertChild:w,shouldStratifyData:N,trimmedOriginalData:V}=b,{idField:D,reviseIdentifyField:k}=a,B=e.ref(t.newDataItem),$=e.ref(t.data),T=e.ref(t.data),S=e.ref(t.summary),F=e.computed(()=>{const se=S.value;return(se==null?void 0:se.groupFields)||[]}),A=F.value.reduce((se,ye)=>(se.set(ye,0),se),new Map),E=e.computed(()=>$.value.length),I=e.ref(t.pagination),R=e.computed(()=>{var se;return(se=I.value)!=null&&se.size&&I.value.size>0?I.value.size:$.value.length}),O=e.ref(1),G=new Ir;function M(){$.value=y.value,h.value&&($.value=g(m.value,y.value,n));const se=(O.value-1)*R.value,ye=Math.min(se+R.value,E.value);let Ve=0;const Pe=[];if($.value.length){k($.value);const Ye=D.value!==t.idField;for(let Ze=se;Ze<ye;Ze++){const Ue=$.value[Ze];Ue.__fv_data_grid_group_row__?(Ve=0,Ue.__fv_data_index__=""):Ue.__fv_data_grid_group_summary__?Ue.__fv_data_index__="":(Ve++,Ue.__fv_data_index__=Ve),Ue.__fv_index__=Ze,Ye&&(Ue[D.value]=Ze),F.value.forEach(be=>{const Xe=A.get(be)||0;A.set(be,Xe+Ue[be])}),Pe.push(Ue)}}return N.value&&v(Pe),T.value=[...Pe],Pe}const j=e.ref(M());function H(se,ye,Ve=!1){const Ye=(Ve?M():[...T.value]).filter(be=>u.apply(be)),Ze=se&&se.length?Ye.filter(be=>se.reduce((Xe,st)=>Xe&&st.filter(be),!0)):Ye,Ue=ye&&ye.length?Ze.sort((be,Xe)=>{const st=[...ye],bt=st.shift();let lt=bt.compare(be[bt.field],Xe[bt.field]);for(;lt===0&&st.length!==0;){const ct=st.shift();ct&&(lt=ct.compare(be[ct.field],Xe[ct.field]))}return lt}):Ze;return j.value=Ue.map((be,Xe)=>{if(be.__fv_data_grid_group_row__){const st=`group_of_${be.__fv_data_grid_group_field__}_${be.__fv_data_grid_group_value__}`;be.__fv_data_grid_group_collapse__=!!r.get(st)}return be.__fv_index__=Xe,be}),j.value}function _(se){return p.clear(),d.value=se,d.value.reduce((ye,Ve)=>(ye.set(Ve.field,Ve),ye),p),H([],d.value)}function W(se,ye){return p.set(se,ye),d.value=Array.from(p.values()),H([],d.value)}function K(se){return p.delete(se),d.value=Array.from(p.values()),H([],d.value)}function z(se,ye){return i.set(se,ye),c.value=Array.from(i.values()),H([],Array.from(p.values()))}function q(se){return i.delete(se),c.value=Array.from(i.values()),H([],Array.from(p.values()),!0)}function L(){return i.clear(),c.value=[],H([],Array.from(p.values()),!0)}function X(se,ye){const Ve=`group_of_${se}_${ye}`;r.set(Ve,!0);const Pe=Ye=>Ye[se]!==ye;return l.set(`collapse_${se}_${ye}`,{field:se,fieldName:se,fieldType:"string",filterValue:ye,filter:Pe}),H(Array.from(l.values()),Array.from(p.values()))}function U(se,ye){const Ve=`group_of_${se}_${ye}`;return r.set(Ve,!1),l.delete(`collapse_${se}_${ye}`),H(Array.from(l.values()),Array.from(p.values()),!0)}function Z(se){const ye=se.raw[D.value],Ve=Pe=>!Pe.__fv_parents__.has(ye);s.set(`fold_${ye}`,{field:"id",fieldName:"id",fieldType:"string",filterValue:String(ye),filter:Ve}),H(Array.from(s.values()),Array.from(p.values())),v(j.value)}function re(se){const ye=se[D.value];s.delete(`fold_${ye}`)}function de(se){re(se.raw),H(Array.from(s.values()),Array.from(p.values()),!0),v(j.value)}function ge(){const se=M();j.value=se,t.hierarchy&&(H(Array.from(s.values()),Array.from(p.values())),v(j.value))}function ie(se){y.value=se,$.value=se,T.value=se,ge()}function te(se,ye,Ve){return(se&&se.length?j.value.filter((Ye,Ze)=>se.reduce((Ue,be)=>Ue&&be.filter(Ye),!0)):j.value).slice(ye,Ve)}function J(se){se*R.value<=E.value&&(O.value=se,ge())}function le(se){y.value.push(qe.cloneDeep(se)),j.value=M()}function fe(se=0){if(!(se>-1))return!1;const Ve=B.value();t.hierarchy?C(se,Ve,y):y.value.splice(se,0,Ve),ge()}function Me(se=0){if(!(se>-1&&t.hierarchy))return!1;const Ve=B.value(),Pe=y.value[se];re(Pe),w(se,Ve,y),ge()}function Ie(se){const ye=se?se-1:0;y.value.splice(ye,1),ge()}function Le(se){const ye=y.value.findIndex(Ve=>Ve[D.value]===se);ye!==-1&&(y.value.splice(ye,1),ge())}function Ce(se){const ye=se>-1?y.value[se]:null;if(!(ye&&ye.deletable!==!1))return!1;y.value=V(ye,y.value),ge()}function pe(){const se=l.size>0?Array.from(l.values()):[];return H(se,Array.from(p.values()))}function he(se){I.value&&(I.value.size=se,ge())}function De(se,ye){const Ve=y.value[Number(se)-1];Ve.editable!==!1?(Ve.name=ye,ge()):G.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"当前节点禁止编辑"}]})}function Ge(se){return se.map(Ve=>{const Pe=T.value.findIndex(Ye=>Ye[D.value]===Ve);return Pe>-1?T.value[Pe]:null}).filter(Ve=>Ve!=null)}return{addFilter:z,addNewDataItem:le,addSorter:W,changePageSizeTo:he,collapse:X,dataView:j,editDataItem:De,expand:U,filters:c,fold:Z,getRange:te,getSelectionItems:Ge,hasRealChildren:x,load:ie,navigatePageTo:J,summaries:A,totalItems:E,insertNewDataItem:fe,insertNewChildDataItem:Me,removeAllFilter:L,removeDataItem:Ie,removeDataItemById:Le,removeFilter:q,removeHierarchyDataItem:Ce,removeSorter:K,rawView:T,refresh:pe,setSorters:_,sorters:d,updateDataView:ge,unFold:de}}function Ts(){function n(l){return l.field}function o(l){const s=n(l),p=localStorage.getItem(s);return p?JSON.parse(p):[]}function a(l,s){const p=n(l);localStorage.setItem(p,JSON.stringify(s))}function r(l,s){if(!s)return;const p=o(l),d=[p.find(u=>u.name===s)||{id:Date.now(),name:s,selectable:!0},...p.filter(u=>u.name!==s)];d.length>5&&(d.length=5),a(l,d)}function i(l,s){const c=[...o(l).filter(u=>u.name!==s)],d=n(l);localStorage.setItem(d,JSON.stringify(c))}return{getFilterHistory:o,removeFilterHistory:i,setFilterHistory:a,updateFilterHistory:r}}function Zt(t){e.ref(t.selection.showCheckbox||!1);const n=e.computed(()=>{var l;return((l=t.hierarchy)==null?void 0:l.collapseField)||"__fv_collapse__"}),o=e.computed(()=>{var l;return((l=t.hierarchy)==null?void 0:l.hasChildrenField)||"__fv_hasChildren__"}),a=e.computed(()=>{var l;return((l=t.hierarchy)==null?void 0:l.parentIdField)||"parent"}),r=e.computed(()=>t.hierarchy&&t.selection.showCheckbox&&t.selection.enableSelectRow&&t.selection.multiSelect),i=e.computed(()=>(t.treeNodeIconsData.fold||t.iconField)&&t.showTreeNodeIcons);return{collapseField:n,hasChildrenField:o,parentIdField:a,shouldShowCheckBox:r,shouldShowIcon:i}}function qn(t,n,o,a,r,i,l,s){var Ce;const{dataView:p}=n,{getVisualData:c,maxVisibleRowIndex:d,minVisibleRowIndex:u}=r,f=e.ref(a.value.primaryColumnsWidth),g=e.ref(a.value.leftColumnsWidth),m=e.ref(a.value.rightColumnsWidth),h=((Ce=t.rowOption)==null?void 0:Ce.height)||28,y=e.ref(0),b=e.ref(0);let v=0,x=i.value-1;const C=e.ref(0),w=e.ref(0),N=e.ref(0);function V(){if(p.value.length<=0)return 0;const pe=d.value<p.value.length?p.value[d.value]:p.value[p.value.length-1];return(pe.__fv_data_position__||0)+(pe.__fv_data_height__||0)+Math.max(p.value.length-1-d.value,0)*h}const D=e.computed(()=>{const pe=V();return p.value.length>i.value+l?Math.floor((i.value+l)/p.value.length*w.value):Math.floor(w.value/Math.max(pe,w.value)*w.value)}),k=e.computed(()=>Math.floor(N.value/Math.max(f.value,N.value)*C.value)),B=0,$=0,T=e.computed(()=>C.value-(g.value+f.value+m.value+s.value));function S(pe){const he=p.value.find(De=>De.__fv_data_position__>pe);return he?he.__fv_index__-1:0}function F(pe){var Ve,Pe;if(!p.value.length){o.value=[];return}const he=(Ve=t.pagination)!=null&&Ve.enable?0:Math.max(v-l,0),De=p.value[p.value.length-1].__fv_index__,Ge=(Pe=t.pagination)!=null&&Pe.enable?p.value.length-1:Math.min(x+l,De),se=p.value[he-1],ye=c(he,Ge,se,pe);ye.length&&(o.value=[...ye])}const A=e.computed(()=>V()>w.value),E=e.computed(()=>f.value>N.value);function I(pe){let he=y.value+pe;he>B&&(he=B);const De=he>B,Ge=V(),se=A.value;se&&he<w.value-Ge&&(he=w.value-Ge),(!se||De)&&(he=B),y.value!==he&&(y.value=he,v=S(Math.abs(y.value)),x=v+i.value,(v<u.value||x>d.value-l/2)&&F())}function R(pe){if(!E.value){b.value=0;return}let he=b.value+pe;he>$&&(he=$),he<T.value&&(he=T.value),b.value!==he&&(b.value=he)}function O(){Math.abs(b.value)+N.value>f.value&&(b.value=Math.min(N.value-f.value,0))}function G(){y.value=0,v=0,x=i.value-1,F()}e.watch(N,()=>{R(0)}),e.watch(a,()=>{f.value=a.value.primaryColumnsWidth,g.value=a.value.leftColumnsWidth,m.value=a.value.rightColumnsWidth});function M(pe){pe.preventDefault(),pe.stopPropagation();const he=(pe.wheelDeltaY||pe.deltaY)/10,De=(pe.wheelDeltaX||pe.deltaX)/10;I(he),R(De)}const j=e.computed(()=>({height:`${p.value.length*h}px`,width:`${g.value}px`,transform:`translateY(${y.value}px)`})),H=e.computed(()=>({transform:`translateY(${y.value}px)`})),_=e.computed(()=>({height:`${p.value.length*h}px`,width:`${f.value}px`,transform:`translate(${b.value}px, ${y.value}px)`})),W=e.computed(()=>({transform:`translate(${b.value}px, ${y.value}px)`})),K=e.computed(()=>({height:`${p.value.length*h}px`,width:`${m.value}px`,transform:`translateY(${y.value}px)`})),z=e.computed(()=>({transform:`translateY(${y.value}px)`})),q=e.computed(()=>({height:`${p.value.length*h}px`,width:`${s.value}px`,transform:`translateY(${y.value}px)`})),L=e.computed(()=>({width:`${g.value}px`})),X=e.computed(()=>({transform:`translateX(${b.value}px)`})),U=e.computed(()=>({width:`${m.value}px`})),Z=e.computed(()=>{const pe=V();return y.value/(w.value-pe)*(w.value-D.value)}),re=e.computed(()=>({height:`${D.value}px`,top:`${Z.value}px`})),de=e.computed(()=>b.value/T.value*(C.value-k.value)),ge=e.computed(()=>({width:`${k.value}px`,left:`${de.value}px`})),ie=e.ref(!1),te=e.ref(-1),J=e.ref(-1);let le;function fe(pe){if(ie.value&&J.value!==-1){const he=J.value-pe.pageX,De=C.value-k.value;if(Math.abs(he)<=De){const Ge=he/(N.value-k.value)*(f.value-N.value);R(Ge),J.value=pe.pageX}}}function Me(pe){if(ie.value&&te.value!==-1){const he=te.value-pe.pageY,De=V(),Ge=De-D.value;if(Math.abs(he)<=Ge){const se=he/(w.value-D.value)*(De-w.value);I(se),te.value=pe.pageY}}}function Ie(pe){ie.value=!1,te.value=-1,J.value=-1,document.removeEventListener("mouseup",Ie),le&&(le.removeEventListener("mousemove",fe),le.removeEventListener("mousemove",Me)),document.body.style.userSelect=""}function Le(pe,he,De){ie.value=!0;const Ge=De==="horizontal"?fe:Me;De==="vertical"&&(te.value=pe.pageY),De==="horizontal"&&(J.value=pe.pageX),he.value&&(he.value.addEventListener("mousemove",Ge),le=he.value,document.addEventListener("mouseup",Ie),document.body.style.userSelect="none")}return{onMouseDownScrollThumb:Le,onWheel:M,dataGridWidth:C,gridDataStyle:_,gridHeaderColumnsStyle:X,gridMergedDataStyle:W,gridSideStyle:q,fitHorizontalScroll:O,viewPortWidth:N,viewPortHeight:w,horizontalScrollThumbStyle:ge,leftFixedGridDataStyle:j,leftFixedGridHeaderColumnsStyle:L,leftFixedGridMergedDataStyle:H,reCalculateVisualDataRows:F,resetScroll:G,rightFixedGridDataStyle:K,rightFixedGridHeaderColumnsStyle:U,rightFixedGridMergedDataStyle:z,shouldShowHorizontalScrollbar:E,shouldShowVirticalScrollbar:A,verticalScrollThumbStyle:re,offsetX:b,offsetY:y}}function Jt(t,n,o,a,r,i,l,s){const p=e.ref(a.value-1+r),c=e.ref(0),{renderDataRow:d}=i,u=l?l.renderGroupRow:d,f=s?s.renderSummaryRow:d;function g(y){let b=d;return y.__fv_data_grid_group_row__&&(b=u),y.__fv_data_grid_group_summary__&&(b=f),b}function m(y,b,v,x){const{dataView:C}=o,w=[];if(C.value.length>0){const N=x?Date.now().toString():"";for(let V=y,D=0;V<=b;V++,D++){const k=C.value[V],B=C.value[V-1]||v,$=w[D-1],T=B?(B.__fv_data_position__||0)+(B.__fv_data_height__||0):0,F=g(k)(k,B,$,V,T,n.value);F.refreshKey=N,w.push(F)}}return c.value=w.length>0?w[0].index:0,p.value=w.length>0?w[w.length-1].index:0,w}function h(y,b,v){const x=b.groupField||"",{groupValue:C}=b;o[y](x,C);const{dataView:w}=o,N=v[0].index,V=Math.min(N+a.value+r+1,w.value.length-1);return m(N,V)}return{getVisualData:m,maxVisibleRowIndex:p,minVisibleRowIndex:c,toggleGroupRow:h}}function en(t,n,o){var g;const a=e.ref(t.mergeCell),i=((g=e.ref(t.rowOption).value)==null?void 0:g.wrapContent)||!1,{updateVisualInfomation:l}=o;function s(m,h,y,b,v,x=1){const C={colSpan:x,rowSpan:1,index:y,field:m,data:b[m],editingData:b[m],parent:v,mode:h,getEditor:w=>w.data,setRef:w=>l(w,C,b),update:()=>{},accept:()=>{},cancel:()=>{}};return C}function p(m,h,y){return m.getEditor=b=>n.getEditor(b,h,b.parent),m.setRef=b=>i&&l(b,m,y),m.update=b=>{b!==void 0&&(m.editingData=b)},m.accept=()=>{y[h.field]=m.editingData,m.data=y[h.field]},m.cancel=()=>{m.editingData=m.data},m}function c(m,h){h.dataType==="commands"&&(m.formatter=(y,b)=>n.getEditor(y,h,b))}function d(m,h,y){const b=h&&h.data[y];if(b&&b.data===m.data){const x=b&&b.spannedBy||b;x.rowSpan++,x.spanned=x.spanned||[],x.spanned.push(m),m.colSpan=0,m.rowSpan=0,m.spannedBy=x}}function u(m,h,y){a.value&&d(m,h,y.field)}function f(m,h,y,b,v){const x=m.readonly?ht.readonly:ht.editable,C=s(m.field,x,h,y,b);return p(C,m,y),c(C,m),u(C,v,m),C}return{createCellByColumn:f,createCellByField:s}}function tn(t,n,o,a,r,i){var b,v;const l=e.ref(t.rowOption),s=((b=l.value)==null?void 0:b.height)||28,p=((v=l.value)==null?void 0:v.wrapContent)||!1,{idField:c}=a,{collapseField:d}=o,{updateRowPosition:u}=r,{createCellByColumn:f}=i;function g(x,C,w,N,V,D){const{__fv_data_grid_group_field__:k,__fv_data_grid_group_value__:B,__fv_data_index__:$}=w,T=w.__fv_data_grid_group_layer__||w.__fv_parents__?w.__fv_parents__.size:0,S=typeof w.parent=="number"?Number(w.parent):-1,F=w.__fv_data_grid_group_collapse__||w[d.value],A=w.__fv_visible__===void 0?!0:w.__fv_visible__,E=w.__fv_checked__,I=w.__fv_indeterminate__,R=N&&N[c.value]===w.parent,O=N&&N.parent===w.parent,G=R&&V&&(V.collapse||!V.visible)||O&&V&&!V.visible,M={collapse:F,data:{},dataIndex:$,groupField:k,groupValue:B,layer:T,index:C,parentIndex:S,pre:N,top:D,type:x,raw:w,checked:E,indeterminate:I,setRef:j=>{M.ref=j},visible:A&&!G,status:fn.initial};return N||(w.__fv_data_position__=0),p||(M.height=s,w.__fv_data_height__=M.height,u(M,w)),M}function m(x,C,w,N,V,D){const k=g(Wt.data,V,C,w,N,D);return x.forEach((B,$)=>{k.data[B.field]=f(B,V,C,k,N)}),k}function h(x,C,w,N,V){return Object.assign(x,{index:C,dataIndex:w,top:N,pre:V})}function y(x,C,w,N,V,D){const k=x.__fv_data_index__,B=x[c.value],$=n.getEditingSnapshot(B);return $===null?m(D,x,C,w,N,V):h($,N,k,V,w)}return{createEmptyRow:g,createNewRowFromDataItem:m,renderDataRow:y}}function _o(t,n,o,a){const r=e.ref(t.summary),{idField:i}=n,{createCellByField:l}=o,{createEmptyRow:s}=a,p=e.computed(()=>{const f=r.value;return(f==null?void 0:f.groupFields)||[]}),c=e.computed(()=>{const f=r.value;return f&&f.enable&&f.groupFields&&f.groupFields.length>0});function d(f,g,m,h){if(c.value){const y=f.data[g];let b=y.colSpan;const v=p.value.reduce((x,C)=>(x.set(C,!0),x),new Map);h.reduce((x,C,w)=>{if(v.has(C.field)){const N=l(C.field,ht.readonly,w,m,f);f.data[C.field]=N,b-1>w&&(b=w)}return x},f),y.colSpan=b}}function u(f,g,m,h,y,b){const v=f.__fv_data_grid_group_field__,x=s(Wt.group,h,f,g,m,y);return x.data[i.value]=l(i.value,ht.readonly,-1,f,x,0),x.data[v]=l(v,ht.readonly,1,f,x,b.length),d(x,v,f,b),x}return{renderGroupRow:u}}function Ho(t,n,o,a){const{idField:r}=n,{createCellByField:i}=o,{createEmptyRow:l}=a;function s(p,c,d,u,f,g){const m=p.__fv_data_grid_group_field__,h=l(Wt.summary,u,p,c,d,f);return h.data[r.value]=i(r.value,ht.readonly,-1,p,h),h.data[m]=i(m,ht.readonly,1,p,h,g.length),h}return{renderSummaryRow:s}}function nn(t,n){var C;const{idField:o}=n,a=e.ref(t.editable),r=e.ref(t.editOption),i=e.ref(((C=t.rowOption)==null?void 0:C.wrapContent)||!1);e.watch(()=>t.editable,()=>{a.value=t.editable});const l=new Map([["boolean","check-box"],["datetime","date-picker"],["number","number-spinner"],["string","input-group"],["text","text"],["commands","commands-editor"]]);let s,p;function c(w){return p&&p.raw[o.value]===w?p:null}function d(w){w.mode=ht.editing,s=w}function u(w){w.accept(),w.mode=ht.editable}function f(w){s&&u(s),document.body.removeEventListener("click",f)}function g(w,N){a.value&&r.value.editMode==="cell"&&N.mode===ht.editable&&(s&&u(s),d(N),document.body.removeEventListener("click",f),document.body.addEventListener("click",f))}function m(w){Object.values(w.data).filter(N=>N.mode===ht.editable).forEach(N=>{N.mode=ht.editing}),w.status=fn.editing,p=w}function h(w,N){Object.values(w.data).filter(V=>V.mode===ht.editing).forEach(V=>{N?V.accept():V.cancel(),V.mode=ht.editable}),w.status=fn.initial,p===w&&(p=null)}function y(w){a.value&&r.value.editMode==="row"&&p!==w&&(p&&h(p,!1),m(w))}function b(w){h(w,!0),w.status=fn.initial}function v(w){h(w,!1),w.status=fn.initial}function x(w,N,V){const D=N.dataType,k=N.editor||{type:l.get(D)||"input-group"};return!i.value&&k.type==="text"&&(k.type="input-group"),k?e.createVNode(Op,{focusOnCreated:t.focusOnEditingCell,selectOnCreated:t.selectOnEditingCell,editor:k,modelValue:w.editingData,"onUpdate:modelValue":B=>w.editingData=B},null):w.data}return{onClickCell:g,onEditingRow:y,acceptEditingRow:b,cancelEditingRow:v,getEditingSnapshot:c,getEditor:x}}function on(t){const n=e.ref(t.idField);function o(a){if(a&&a.length){const r=a[0];Object.keys(r).includes(n.value)||(n.value="__fv_indetify__")}}return{idField:n,reviseIdentifyField:o}}function zp(t,n,o,a,r,i){const{addNewDataItemAtLast:l}=o,{columnContext:s}=a,{onClickCell:p}=r;function c(m,h){const y=s.value.primaryColumns.findIndex(V=>V.field===m.field),b=m.parent,v=b.index,x=s.value.primaryColumns.length-1,C=i.value.length-1,w=y===x,N=v===C;if(y>-1&&!w){const V=s.value.primaryColumns[y+1],D=b.data[V.field];p(h,D)}if(w&&!N){const D=i.value[v+1].data[s.value.primaryColumns[0].field];p(h,D)}if(w&&N){if(t.appendOnEnterAtLastCell){l();const D=i.value[v+1].data[s.value.primaryColumns[0].field];p(h,D)}n.emit("enterUpInLastCell")}}function d(m,h){const y=s.value.primaryColumns.findIndex(C=>C.field===m.field),b=m.parent,v=s.value.primaryColumns.length-1;if(y>0&&y<=v){const C=s.value.primaryColumns[y-1],w=b.data[C.field];p(h,w)}}function u(m,h){const y=m.field,v=m.parent.index,x=i.value.length-1;if(v>-1&&v<x){const N=i.value[v+1].data[y];p(h,N)}}function f(m,h){const y=m.field,v=m.parent.index,x=i.value.length-1;if(v>0&&v<=x){const N=i.value[v-1].data[y];p(h,N)}}function g(m,h){const{key:y,shiftKey:b}=m;if(y==="Enter"&&!b){c(h,m);return}if(b&&y==="Enter"){d(h,m);return}if(y==="ArrowDown"){u(h,m);return}y==="ArrowUp"&&f(h,m)}return{navigateOnKeyUp:g}}function zn(t,n,o,a){const{idField:r}=a,{currentSelectedDataId:i,multiSelectOnClickRow:l,multiSelectOnClickRowWithShift:s,selectItem:p,selectedValues:c,toggleSelectItem:d}=o,u=e.ref(0),f=e.ref(-1);function g(C){return s.value?c.value.includes(C.raw[r.value]):C.raw[r.value]===i.value}function m(C){var N;const w={"fv-grid-row":C.type===Wt.data,"fv-grid-group-row":C.type===Wt.group,"fv-grid-summary-row":C.type===Wt.summary,"fv-grid-row-hover":C.index===f.value,"fv-grid-row-selected":g(C),"fv-grid-row-odd":C.dataIndex%2>0,"fv-grid-row-even":C.dataIndex%2===0};if((N=t.rowOption)!=null&&N.customRowStyle){const V=t.rowOption.customRowStyle(C.raw)||{};return Object.assign({},w,V)}return w}function h(C){u.value+=1,setTimeout(()=>{u.value===1&&(n.emit("ClickRow",C.index,C.raw),console.log(`on click row: ${C.index}`)),u.value=0},250),u.value>1&&(n.emit("DoubleClickRow",C.index,C.raw),console.log(`on double click row: ${C.index}`),u.value=0)}function y(C,w){s.value&&C.shiftKey||l.value?d(w):p(w),h(w),C.stopPropagation()}function b(C,w){f.value=w.index}function v(C,w){f.value=-1}function x(C){return{"fv-grid-sidebar-row":!0,"fv-grid-sidebar-row-hover":C.index===f.value,"fv-grid-sidebar-row-selected":g(C),"fv-grid-sidebar-row-odd":C.dataIndex%2>0,"fv-grid-sidebar-row-even":C.dataIndex%2===0}}return{gridRowClass:m,onClickRow:y,onMouseoverRow:b,sidebarRowClass:x,onMouseoutRow:v}}function an(t,n,o,a,r){const{idField:i}=o,l=e.ref(""),s=e.ref(t.selection.enableSelectRow??!0),p=e.ref(t.selection.multiSelect??!1),c=e.ref(t.selection.multiSelectMode),d=e.ref(t.selection.showCheckbox),u=e.ref(t.selection.showSelectAll),f=e.ref(t.selectionValues);function g(){return n.getSelectionItems(f.value)}function m(){const O=a.value.reduce((M,j)=>(M.set(j.raw[i.value],j),M),new Map);return f.value.map(M=>O.get(M)).filter(M=>!!M)}e.computed(()=>s.value&&!p.value);const h=e.computed(()=>s.value&&p.value),y=e.computed(()=>!!t.hierarchy),b=e.computed(()=>{const O=d.value&&c.value==="DependOnCheck";return h.value&&O}),v=e.computed(()=>h.value&&!d.value),x=e.computed(()=>h.value&&d.value&&c.value==="OnCheckAndClick");e.computed(()=>x.value);function C(){const O=n.getSelectionItems(f.value);r.emit("selectionChange",O)}function w(){a.value.forEach(G=>{G.checked=!1,G.indeterminate=!1,G.raw.__fv_checked__=!1,G.raw.__fv_indeterminate__=!1}),m().forEach(G=>{G.checked=!0,G.raw.__fv_checked__=!0}),C()}e.watch(()=>a.value,()=>{w()}),e.watch(()=>t.selectionValues,O=>{f.value=O,w()},{immediate:!0}),e.watch(()=>t.selection,O=>{s.value=!!O.enableSelectRow,p.value=!!O.multiSelect,c.value=O.multiSelectMode||"DependOnCheck",d.value=!!O.showCheckbox});const N=e.computed(()=>!p.value);function V(O){return O[i.value]||""}function D(O){return f.value.findIndex(M=>M===V(O))}function k(){m().forEach(M=>{M.checked=!1}),n.getSelectionItems(f.value).forEach(M=>{M.__fv_checked__=!1}),f.value=[]}function B(O){const G=O.raw;G.__fv_checked__=!0,G.__fv_indeterminate__=!1;const M=new Set(f.value);M.add(G[i.value]),f.value=Array.from(M.values()),O.checked=!0,O.indeterminate=!1,l.value=O.raw[i.value]}function $(O){const G=O.raw;G.__fv_checked__=!1,G.__fv_indeterminate__=!1,f.value=f.value.filter(M=>M!==G[i.value]),O.checked=!1,O.indeterminate=!1,l.value=""}function T(O){const G=O.raw;G.__fv_checked__=!1,G.__fv_indeterminate__=!0,f.value=f.value.filter(M=>M!==G[i.value]),O.checked=!1,O.indeterminate=!0}function S(O){N.value&&k(),O.checked?$(O):B(O),C()}function F(O){O.raw[i.value]!==l.value&&(k(),B(O),C())}function A(O){const G=a.value.find(M=>M.raw[i.value]===O);G&&F(G)}function E(){a.value.forEach(O=>B(O)),C()}function I(){f.value.splice(0,f.value.length),l.value="",a.value.forEach(O=>{const G=O.raw;G.__fv_checked__=!1,G.__fv_indeterminate__=!1,O.checked=!1,O.indeterminate=!1}),C()}function R(){return a.value.find(O=>O.raw[i.value]===l.value)}return{clearSelection:k,currentSelectedDataId:l,enableMultiSelect:p,enableSelectRow:s,findIndexInSelectedItems:D,getSelectedItems:g,getSelectionRow:R,indeterminate:T,isSelectingHirarchyItem:y,multiSelectMode:c,multiSelectOnClickRow:x,multiSelectOnClickRowWithShift:v,multiSelectOnlyOnCheck:b,select:B,selectAll:E,selectedValues:f,selectItem:F,selectItemById:A,showCheckBox:d,showSelectAll:u,toggleSelectItem:S,unSelect:$,unSelectAll:I}}function Fs(t,n){var y,b;const o=String(Date.now()),a=50,{showCheckBox:r,showSelectAll:i}=n,l=e.ref(((y=t.rowNumber)==null?void 0:y.enable)??!1),s=e.computed(()=>t.hierarchy&&r.value&&t.selection.enableSelectRow&&t.selection.multiSelect?!1:r.value),p=e.ref(l.value?((b=t.rowNumber)==null?void 0:b.width)??32:0),c=e.ref(s.value?a:0),d=e.computed(()=>{var v;return l.value?((v=t.rowNumber)==null?void 0:v.heading)??"序号":""}),u=e.computed(()=>(s.value||i.value?Number(c.value):0)+(l.value?Number(p.value):0));e.watch(()=>t.rowNumber,v=>{v&&v.enable!==void 0&&(l.value=v.enable),v&&v.width!==void 0&&(p.value=v.width)});function f(v){return{top:`${v.top}px`,width:`${u.value}px`,height:`${v.height||""}px`}}const g=e.computed(()=>({width:`${u.value}px`}));function m(v){return`${o}_${v.type}_r_${v.index}_${v.refreshKey||""}`}function h(v){return`${o}_${v.type}_r_${v.index}_${v.refreshKey||""}`}return{showRowNumer:l,showSidebarCheckBox:s,sidebarCellPosition:f,sidebarCornerCellStyle:g,sidebarTitle:d,sidebarWidth:u,rowKey:h,cellKey:m}}const SV={ascend:(t,n)=>t===n?0:t===!1?-1:1,decend:(t,n)=>t===n?0:t===!0?-1:1},$V={ascend:(t,n)=>{const o=new Date(new Date(t).toLocaleDateString()).valueOf(),a=new Date(new Date(n).toLocaleDateString()).valueOf();return o===a?0:o<a?-1:1},decend:(t,n)=>{const o=new Date(new Date(t).toLocaleDateString()).valueOf(),a=new Date(new Date(n).toLocaleDateString()).valueOf();return o===a?0:o<a?1:-1}},DV={ascend:(t,n)=>t===n?0:t<n?-1:1,decend:(t,n)=>t===n?0:t<n?1:-1},kV={ascend:(t,n)=>t===n?0:t<n?-1:1,decend:(t,n)=>t===n?0:t<n?1:-1};function As(t){const n=new Map([["boolean","boolean-sorter"],["date","datetime-sorter"],["datetime","datetime-sorter"],["number","numeric-sorter"],["string","text-sorter"],["text","text-sorter"],["enum","text-sorter"],["reference","text-sorter"]]),o=new Map([["boolean-sorter",SV],["datetime-sorter",$V],["numeric-sorter",DV],["text-sorter",kV]]);function a(l){const s=(l==null?void 0:l.dataType)||"string",p=n.get(s)||"text-sorter";return o.get(p)||(l==null?void 0:l.sorter)}function r(l){return a(l.column)}function i(l,s){const p=r(l),c=(l.status&ae.sortable)===ae.sortable&&(l.status&ae.sorted)===ae.sorted,d=(l.status&ae.ascending)===ae.ascending,u=(l.status&ae.descending)===ae.descending;if(c&&p){const f=d?p.ascend:u?p.decend:void 0;f?s.addSorter(l.field,{field:l.field,compare:f}):s.removeSorter(l.field)}else s.removeSorter(l.field)}return{getSorterByColumn:a,updateSorter:i}}const kt=e.defineComponent({name:"FListView",props:lo,emits:["checkValuesChange","clickItem","selectionChange","removeItem","change","activeChange"],setup(t,n){const o=e.ref(),a=e.ref(!0),r=e.ref(!1),i=e.ref([]),l=0,s=e.ref(t.columns),p=on(t),c=Zt(t),d=Cn(t,p),u=Qt(t,new Map,c,p),f=an(t,u,p,i,n),g=Zl(t,o),m=e.computed(()=>u.dataView.value.length),h=nn(t,p),y=Lt(),b=en(t,{},y),v=tn(t,h,c,p,y,b),x=_o(t,p,b,v),C=Ho(t,p,b,v),w=Jt(t,s,u,m,l,v,x,C),{getVisualData:N}=w;i.value=N(0,m.value+l-1);const V=e.computed(()=>{const A={"f-list-view":!0,"f-list-view-multiple":t.multiSelect};return t.size!=="default"&&(A[`${t.size}-item`]=!0),A}),D=e.computed(()=>!!n.slots.footer||a.value);function k(){return t.header==="SearchBar"?No:t.header==="ContentHeader"?zd:No}const B=k(),{renderHeader:$}=B(t,n,g),{renderListArea:T}=qd(t,n,i,u,d,f,w);function S(A){g.search(A)}n.expose({search:S});function F(A){t.multiSelect&&(A.preventDefault(),A.stopPropagation())}return()=>e.createVNode("div",{class:V.value,onClick:F},[$(),e.createVNode("div",{ref:o,class:"f-list-view-content",onMouseover:()=>{r.value=!0},onMouseleave:()=>{r.value=!1}},[T()]),D.value&&e.createVNode("div",{class:"f-list-view-footer"},[n.slots.footer&&n.slots.footer()])])}}),BV=e.defineComponent({name:"FComboListContainer",props:Zh,emits:["selectionChange"],setup(t,n){const o=e.ref(t.dataSource),a=e.ref([]),r=e.ref(t.separator),i=e.ref(t.width),l=e.ref(t.maxHeight),s=e.ref(String(t.selectedValues).split(r.value));e.watch(t.dataSource,()=>{o.value=t.dataSource});const p=e.computed(()=>t.enableSearch?"SearchBar":"ContentHeader"),c=e.computed(()=>{const u={};return i.value!==void 0&&(u.width=`${i.value}px`),l.value!==void 0&&l.value>0&&(u.maxHeight=`${l.value}px`),u});function d(u){a.value=u.map(f=>Object.assign({},f)),s.value=u.map(f=>f[t.idField]),n.emit("selectionChange",a.value)}return e.watch([()=>t.selectedValues],([u])=>{s.value=u.split(r.value)}),()=>e.createVNode("div",{class:"f-combo-list-container pl-3",style:c.value},[e.createVNode(kt,{size:"small",itemClass:"f-combo-list-item",header:p.value,headerClass:"f-combo-list-search-box",data:o.value,idField:t.idField,textField:t.textField,titleField:t.titleField,multiSelect:t.multiSelect,multiSelectMode:"OnCheckAndClick",selectionValues:s.value,onSelectionChange:d},null)])}});function TV(t){const n=e.ref(""),o=e.ref(t.modelValue),a=e.ref(t.data||[]),r=e.ref(t.editable);function i(u){const f=String(u).split(t.separator).map(m=>[m,!0]),g=new Map(f);return a.value.filter(m=>g.has(String(m[t.valueField])))}function l(u){const f=i(u).map(g=>g[t.textField]).join(t.separator);n.value=r.value?f||u:f}function s(u){const f=u.split(t.separator).map(m=>[m,!0]),g=new Map(f);return a.value.filter(m=>g.has(m[t.textField]))}function p(u){const f={};return f[t.idField]=u,f[t.textField]=u,[f]}function c(u){let f=s(u);const g=f&&f.length>0;return r.value&&!g&&(f=p(u)),f}function d(){const{url:u,method:f="GET",headers:g={},body:m=null}=t.remote;fetch(u,{method:f,headers:g,body:m}).then(y=>{if(y.status===200)return y.json();throw new Error(y.statusText)}).then(y=>{a.value=y}).catch(y=>{console.error(y)})}return t.remote&&d(),e.watch(()=>t.data,()=>{a.value=t.data}),e.watch([a],([u])=>{if(t.modelValue){const f=u.find(g=>g[t.valueField]===t.modelValue);f&&(n.value=f[t.textField])}}),e.watch(()=>t.modelValue,u=>{o.value=u,l(u)}),l(t.modelValue),{dataSource:a,displayText:n,editable:r,modelValue:o,getItemsByDisplayText:s,getItemsByValue:i,getSelectedItemsByDisplayText:c}}const Bt=e.defineComponent({name:"FComboList",props:ka,emits:["clear","update:modelValue","change"],setup(t,n){const o=e.ref(),a=e.ref(t.disabled),r=e.ref(t.enableClear),i=e.ref(t.enableSearch),l=e.ref(t.readonly),{dataSource:s,displayText:p,editable:c,modelValue:d,getSelectedItemsByDisplayText:u}=TV(t),f=e.computed(()=>t.multiSelect),g=e.computed(()=>o.value?o.value.elementRef.getBoundingClientRect().width:0);function m(){!f.value&&o.value&&o.value.hidePopup()}function h(C){p.value=C.map(w=>w[t.textField]).join(t.separator),d.value=C.map(w=>w[t.valueField]).join(t.separator),n.emit("update:modelValue",d.value),n.emit("change",C,d.value),m()}function y(){o.value.togglePopup()}function b(C){d.value="",n.emit("update:modelValue",""),n.emit("clear")}function v(C){const w=u(C);h(w)}function x(){return p.value}return n.expose({getDisplayText:x}),e.watch([()=>t.disabled,()=>t.editable,()=>t.enableClear,()=>t.enableSearch,()=>t.readonly],([C,w,N,V,D])=>{a.value=C,c.value=w,r.value=N,i.value=V,l.value=D}),()=>e.createVNode(yt,{ref:o,id:t.id,disable:a.value,readonly:l.value,forcePlaceholder:t.forcePlaceholder,editable:c.value,buttonContent:t.dropDownIcon,placeholder:t.placeholder,enableClear:r.value,maxLength:t.maxLength,tabIndex:t.tabIndex,enableTitle:t.enableTitle,multiSelect:t.multiSelect,inputType:t.multiSelect?"tag":"text",modelValue:p.value,"onUpdate:modelValue":C=>p.value=C,focusOnCreated:t.focusOnCreated,selectOnCreated:t.selectOnCreated,onClear:b,onClick:y,onChange:v,beforeOpen:t.beforeOpen},{default:()=>[e.createVNode(BV,{idField:t.idField,valueField:t.valueField,textField:t.textField,titleField:t.titleField,dataSource:s.value,selectedValues:d.value,multiSelect:t.multiSelect,enableSearch:i.value,maxHeight:t.maxHeight,width:t.fitEditor?g.value:void 0,onSelectionChange:h},null)]})}}),FV=e.defineComponent({name:"FComboListDesign",props:ka,emits:["clear","update:modelValue","change"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ve(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(yt,{ref:o,id:t.id,disable:t.disabled,readonly:t.readonly,forcePlaceholder:t.forcePlaceholder,editable:t.editable,buttonContent:t.dropDownIcon,placeholder:t.placeholder,enableClear:t.enableClear,maxLength:t.maxLength,tabIndex:t.tabIndex,enableTitle:t.enableTitle,multiSelect:t.multiSelect,inputType:t.multiSelect?"tag":"text"},null)}}),Gp={install(t){t.component(Bt.name,Bt)},register(t,n,o){t["combo-list"]=Bt,n["combo-list"]=Yl},registerDesigner(t,n,o){t["combo-list"]=FV,n["combo-list"]=Yl}},AV=new Map([["appearance",xe]]);function IV(t,n,o){return n}const EV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/external-container.schema.json",title:"external-container",description:"A Farris Visual Component",type:"object",properties:{id:{description:"The unique identifier for a external-container",type:"string"},type:{description:"The type string of external-container",type:"string",default:"external-container"},componentType:{description:"The type string of external-container",type:"string"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},visible:{description:"",type:"boolean",default:!0},url:{description:"The url that load the schema from",type:"string"},externalComponent:{description:"The unique identifier for component",type:"string"}},required:["id","type","contents"]},MV={title:"external-container",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}},url:{description:"外部组件地址",title:"URL",type:"string"}}}}},Is={customClass:{type:String,default:""},componentType:{type:String,default:""},url:{type:String,default:""},schema:{type:Object},useIsolateJs:{type:Boolean,default:!1}},Up=me(Is,EV,AV,IV,MV),Es=e.defineComponent({name:"FExternalContainer",props:Is,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}});function PV(t,n){const o=zt();let a=!1,r,i=!1;const l=!1;function s(){return!1}function p(){return l||!i}function c(){return!i}function d(){i=!1;const f=t,g=f.appearance&&f.appearance.class||"",m=g.split(" "),h=f.contents||[],y=h.length?h[0]:null,b=y&&y.appearance?y.appearance.class:"",v=b?b.split(" "):[],x=h.length?h.reduce((B,$)=>{const T=$&&$.appearance?$.appearance.class:"",S=T?T.split(" "):[];return B.push(...S),B},[]):[],C=n,w=C&&C.appearance&&C.appearance.class||"",N=w?w.split(" "):[];r={componentClass:g,componentClassList:m,childContents:h,firstChildContent:y,firstChildClass:b,firstChildClassList:v,parent:C,parentClass:w,parentClassList:N,children:h,childrenClassList:x};const{canAccept:V,fixed:D,hidePadding:k}=o.getRuleValue(m[0],r);return a=k,i=D,!0}function u(){return a}return{canAccepts:s,checkCanDeleteComponent:p,checkCanMoveComponent:c,resolveComponentContext:d,hideNestedPaddingInDesginerView:u}}const OV={id:"data-grid-component",type:"component",componentType:"data-grid",appearance:{class:"f-struct-wrapper f-utils-fill-flex-column"},contents:[{id:"data-grid-section",type:"section",appearance:{class:"f-section-grid f-section-in-nav"},showHeader:!1,contents:[{id:"dataGrid",type:"data-grid",appearance:{class:"f-component-grid"},columns:[{id:"code_6d5f8d5b_1fvq",type:"GridField",title:"项目编号",field:"code",dataType:"string",binding:{type:"Form",path:"code",field:"6d5f8d5b-c68a-47fa-9f3b-f3805489cfae"},resizable:!0},{id:"name_2efe6193_lljv",type:"GridField",title:"项目名称",field:"name",dataType:"string",binding:{type:"Form",path:"name",field:"2efe6193-278c-4b5f-9f31-cdd8ee48751a"},resizable:!0},{id:"projectStatus_7d2dd238_3d6l",type:"GridField",title:"项目状态",binding:{type:"Form",path:"projectStatus",field:"7d2dd238-42a7-4643-a849-cdac3b4fe13f",fullPath:"ProjectStatus"},field:"projectStatus",dataType:"enum",data:[{name:"进行中",value:"1"},{name:"已结项",value:"2"}],resizable:!0}]}]}]},RV=e.defineComponent({name:"FImportExteranlSchema",emits:["close","submit"],setup(t,n){const o=[{name:"导航列表"},{name:"树列表"}];function a(s){n.emit("submit","nav_list"),s&&s.unmount()}function r(s){s&&s.unmount()}function i(s){return e.createVNode("div",null,[e.createVNode(kt,{data:o},{default:()=>[e.createTextVNode(" ")]}),e.createVNode("div",{class:"f-layout-editor-bottom"},[e.createVNode("div",{class:"f-layout-editor-button"},[e.createVNode("div",{class:"f-layout-editor-cancel-btn",onClick:()=>r(s)},[e.createVNode("span",{class:"f-layout-editor-text-cancel"},[e.createTextVNode("取消")])]),e.createVNode("div",{class:"f-layout-editor-sure-btn",onClick:()=>a(s)},[e.createVNode("span",{class:"f-layout-editor-text-sure"},[e.createTextVNode("确认")])])])])])}function l(){ln.show({title:"Settings",width:800,showButtons:!1,showFloatingClose:!0,showHeader:!1,render:i})}return()=>e.createVNode("div",{class:"f-import-exteranl-component-button",onClick:l},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-import-exteranl-component-button-name"},[e.createVNode("span",{class:"f-import-exteranl-component-button-center"},[e.createTextVNode("引入组件")])])])}}),jV=e.defineComponent({name:"FExternalContainerDesign",props:Is,emits:[],setup(t,n){var u;const o=e.ref(),a=e.inject("design-item-context"),r=PV(a.schema,(u=a.parent)==null?void 0:u.schema),i=ve(o,a,r);e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const l=e.ref(),s=e.computed(()=>!l.value);function p(){return e.createVNode(Gn,{modelValue:l.value,"onUpdate:modelValue":f=>l.value=f},null)}function c(f){l.value=OV}function d(){return e.createVNode(RV,{onSubmit:c},null)}return()=>e.createVNode("div",{ref:o,class:"drag-container","data-dragref":`${a.schema.id}-container`},[s.value?d():p()])}}),_V={install(t){t.component(Es.name,Es)},register(t,n){t["external-container"]=Es,n["external-container"]=Up},registerDesigner(t,n){t["external-container"]=jV,n["external-container"]=Up}},Se={},$e={},Be={};Zs.registerDesigner(Se,$e,Be),Ks.registerDesigner(Se,$e,Be),pl.registerDesigner(Se,$e,Be),gl.registerDesigner(Se,$e,Be),vl.registerDesigner(Se,$e,Be),wl.registerDesigner(Se,$e,Be),Tl.registerDesigner(Se,$e,Be),Ul.registerDesigner(Se,$e,Be),Gp.registerDesigner(Se,$e,Be),ed.registerDesigner(Se,$e,Be),ud.registerDesigner(Se,$e,Be),ld.registerDesigner(Se,$e,Be),hd.registerDesigner(Se,$e,Be),Rp.registerDesigner(Se,$e,Be),_V.registerDesigner(Se,$e),Sd.registerDesigner(Se,$e,Be),Ad.registerDesigner(Se,$e,Be),Id.registerDesigner(Se,$e,Be),_d.registerDesigner(Se,$e,Be),Yd.registerDesigner(Se,$e,Be),Ld.registerDesigner(Se,$e,Be),eu.registerDesigner(Se,$e,Be),Qd.registerDesigner(Se,$e,Be),au.registerDesigner(Se,$e,Be),fu.registerDesigner(Se,$e,Be),pu.registerDesigner(Se,$e,Be),xu.registerDesigner(Se,$e,Be),wu.registerDesigner(Se,$e,Be),Fu.registerDesigner(Se,$e,Be),Iu.registerDesigner(Se,$e,Be),Ou.registerDesigner(Se,$e,Be),Ru.registerDesigner(Se,$e,Be),qu.registerDesigner(Se,$e,Be),Ku.registerDesigner(Se,$e,Be),yu.registerDesigner(Se,$e,Be),_u.registerDesigner(Se,$e,Be),Zu.registerDesigner(Se,$e,Be),Ju.registerDesigner(Se,$e,Be),tf.registerDesigner(Se,$e,Be),sf.registerDesigner(Se,$e,Be),cf.registerDesigner(Se,$e,Be),df.registerDesigner(Se,$e,Be),uf.registerDesigner(Se,$e,Be),ff.registerDesigner(Se,$e,Be),hf.registerDesigner(Se,$e,Be),Fp.registerDesigner(Se,$e,Be),xf.registerDesigner(Se,$e,Be),Cf.registerDesigner(Se,$e,Be),Vf.registerDesigner(Se,$e,Be),Rf.registerDesigner(Se,$e,Be),Hf.registerDesigner(Se,$e,Be),Zc.registerDesigner(Se,$e),Ip.registerDesigner(Se,$e,Be);const HV={id:{type:String}},LV=e.defineComponent({name:"FDesignerPlaceholder",props:HV,emits:[],setup(t){const n=e.computed(()=>({"drag-and-drop-alert":!0,alert:!0,"alert-info":!0,"no-drag":!0,"w-100":!0})),o=e.computed(()=>({height:"60px",display:"flex","justify-content":"center","align-items":"center",margin:0}));return()=>e.createVNode("div",{class:n.value,style:o.value,role:"alert","data-noattach":"true","data-position":"0"},[e.createTextVNode("拖拽组件到这里")])}});function WV(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const Gn=e.defineComponent({name:"FDesignerItem",props:Rs,emits:["selectionChange"],setup(t,n){const o=e.ref(`${t.modelValue.id}-component`),a=e.ref(t.canMove),r=e.ref(t.canDelete),i=e.ref(!1),l=e.ref(t.modelValue),s=e.ref(""),p=e.ref(""),c=e.ref(),d=e.inject("canvas-dragula"),u=e.ref(),f=e.inject("design-item-context"),g={designerItemElementRef:c,componentInstance:u,schema:l.value,parent:f,setupContext:n};e.provide("design-item-context",g);const m=e.inject("useFormSchema"),h=e.computed(()=>{const T=t.modelValue.appearance&&t.modelValue.appearance.class||"",S={"farris-component":!0,"position-relative":a.value&&r.value,"farris-nested":i.value,"can-move":a.value,"d-none":c.value&&c.value.classList.contains("d-none")};return S[`farris-component-${l.value.type}`]=!0,T&&T.split(" ").reduce((F,A)=>(F[A]=!0,F),S),p.value&&p.value.split(" ").reduce((F,A)=>(F[A]=!0,F),S),S}),y=e.computed(()=>{const T={},S=t.modelValue.appearance&&t.modelValue.appearance.style||"";return S&&S.split(";").reduce((F,A)=>{const[E,I]=A.split(":");return F[E]=I,F},T),s.value&&s.value.split(";").reduce((F,A)=>{const[E,I]=A.split(":");return E&&(F[E]=I),F},T),T});function b(T,S){var F,A,E;if(T&&(T.preventDefault(),T.stopPropagation()),u.value.triggerBelongedComponentToDeleteWhenDeleted){const I=u.value.getBelongedComponentInstance(u);if(I&&I.parent){const R=e.ref(I==null?void 0:I.parent),O=R.value.contents.findIndex(G=>G.id===I.schema.id);(A=(F=R.value)==null?void 0:F.contents)==null||A.splice(O,1),(E=R.value)==null||E.updateDragAndDropRules(),Rt.value++}return}if(f&&f.schema.contents){const I=f.schema.contents.findIndex(R=>R.id===S.id);f.schema.contents.splice(I,1),f.componentInstance.value.updateDragAndDropRules(),Rt.value++}}function v(T){return r.value&&e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:S=>{b(S,T)}},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function x(){return a.value&&e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"移动",ref:"moveComponent"},[e.createVNode("i",{"data-dragging-icon":"true",class:"cmp_move f-icon f-icon-yxs_move"},null)])}function C(){return t.customButtons&&!!t.customButtons.length&&t.customButtons.map(T=>e.createVNode("div",{role:"button",class:`btn component-settings-button ${T.class||""}`,title:T.title,ref:T.id},[e.createVNode("i",{class:T.icon},null)]))}function w(T){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[v(T),x(),C()])])}function N(T,S){n.emit("selectionChange",T,S)}function V(T){let S;const F=T.type,A=Se[F],E=$e[F],I=E?E(T):{};I.customClass=t.ignore?I.customClass:"";const R=T.contents&&T.contents.length===0;return T.contents&&!!T.contents.length&&A?e.createVNode(A,e.mergeProps({ref:u},I),WV(S=T.contents.map(G=>e.createVNode(Gn,{key:G.id,modelValue:G,"onUpdate:modelValue":M=>G=M,onSelectionChange:N},null)))?S:{default:()=>[S]}):A?R?e.createVNode(A,e.mergeProps({ref:u},I),{default:()=>[e.createVNode(LV,null,null)]}):e.createVNode(A,e.mergeProps({ref:u},I),null):e.createVNode("div",null,null)}function D(T){if(T.type==="component-ref"){let F=m==null?void 0:m.getFormSchema().module.components.find(A=>A.id===T.component);if(F)return e.createVNode(Gn,{key:F.id,modelValue:F,"onUpdate:modelValue":A=>F=A,onSelectionChange:N},null)}}e.watch(()=>t.modelValue,T=>{l.value=T,o.value=`${T.id}-component`});function k(T){const S=T.target;qo(S)}function B(){var T,S;(S=(T=l.value)==null?void 0:T.contents)!=null&&S.length&&c.value&&c.value.addEventListener("scroll",k)}e.onMounted(()=>{if(c.value&&u.value&&u.value.schema){const T=c.value.querySelector(`[data-dragref='${u.value.schema.id}-container']`);d&&T&&d.attachComponents(T,l.value),i.value=u.value.canNested!==void 0?u.value.canNested:i.value,r.value=u.value.canDelete!==void 0?u.value.canDelete:r.value,a.value=u.value.canMove!==void 0?u.value.canMove:a.value,s.value=u.value.styles||"",p.value=u.value.designerClass||"",c.value&&(c.value.componentInstance=u,c.value.designItemContext=g)}B(),Rt.value++}),e.onBeforeUnmount(()=>{c.value&&c.value.removeEventListener("scroll",k)});function $(T){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(F=>F.classList.remove("dgComponentFocused")),T&&(T.preventDefault(),T.stopPropagation());const S=c.value;if(S){const F=document.getElementsByClassName("dgComponentSelected");if(!(F&&F.length===1&&F[0]===c.value)){Array.from(F).forEach(I=>I.classList.remove("dgComponentSelected")),S.classList.add("dgComponentFocused"),n.emit("selectionChange",l.value.type,l.value);const E=u.value.getDraggableDesignItemElement(g);E&&E.value&&E.value.classList.add("dgComponentSelected")}}k(T)}return()=>l.value.type==="component-ref"?D(l.value):e.createVNode("div",{id:`${l.value.id}-design-item`,ref:c,class:h.value,style:y.value,onClick:$},[w(l.value),V(l.value)])}}),qV=e.defineComponent({name:"FDesignerCanvas",props:Ms,emits:["init","selectionChange","canvasChanged"],setup(t,n){const o=e.ref(),a=e.ref(),r=e.ref(),i=e.ref(),l=e.ref(),s=em();e.provide("canvas-dragula",s),e.provide("design-item-context",{designerItemElementRef:i,componentInstance:l,schema:a.value,parent:void 0});const p=e.computed(()=>({"d-flex":!0,"flex-fill":!0,"flex-column":!0}));e.onMounted(()=>{r.value&&s.initializeDragula(r.value),o.value=t.modelValue,n.emit("init",s)}),e.watch(Rt,()=>{qo(r.value),n.emit("canvasChanged")},{flush:"post"});function c(d,u){n.emit("selectionChange",d,u)}return()=>e.createVNode("div",{class:"editorDiv flex-fill h-100"},[e.createVNode("div",{class:"editorPanel d-flex flex-fill flex-column PC f-area-response f-area-response--sm f-area-response--md f-area-response--lg"},[e.createVNode("div",{ref:r,class:p.value},[o.value&&e.createVNode(Gn,{modelValue:o.value,"onUpdate:modelValue":d=>o.value=d,onSelectionChange:c},null)])])])}});dt.FDesignerCanvas=qV,dt.FDesignerItem=Gn,dt.designerCanvasProps=Ms,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})});
|