@fox-js/foxui 4.0.1-61 → 4.0.1-62

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/dist/index.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";/*!
2
- * @fox-js/foxui-base v4.0.0 Sat Jun 29 2024 16:19:24 GMT+0800 (中国标准时间)
2
+ * @fox-js/foxui-base v4.0.0 Tue Jul 16 2024 13:55:19 GMT+0800 (中国标准时间)
3
3
  */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),tt=require("@fox-js/validator"),ne=require("@fox-js/icons-vue"),se=require("@fox-js/i18n"),_t=window,Ws=typeof window<"u";function Ys(){return typeof _t<"u"?_t.requestAnimationFrame||_t.webkitRequestAnimationFrame||function(e){_t.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function Er(e){Ws?cancelAnimationFrame(e):clearTimeout(e)}const Xe=Ys();/*!
4
4
  * @fox-js/big-decimal v4.0.1-6 Thu Aug 17 2023 21:31:19 GMT+0800 (中国标准时间)
5
- */function dn(e,n="0"){let a=0,o=-1;e[0]=="-"&&(a++,o=1,e=e.substring(1),e.length),n[0]=="-"&&(a++,o=2,n=n.substring(1),n.length),e=Ne(e),n=Ne(n),[e,n]=Oo(Ne(e),Ne(n)),a==1&&(o==1?e=oo(e):n=oo(n));let l=xr(e,n);return a?a==2?"-"+Ne(l):e.length<l.length?Ne(l.substring(1)):"-"+Ne(oo(l)):Ne(l)}function oo(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let s=0;s<a;s++)e[s]>="0"&&e[s]<="9"?n+=9-parseInt(e[s]):n+=e[s];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return xr(n,r)}function Ne(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function Oo(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function xr(e,n){[e,n]=Oo(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var Se=(e=>(e[e.CEILING=0]="CEILING",e[e.DOWN=1]="DOWN",e[e.FLOOR=2]="FLOOR",e[e.HALF_DOWN=3]="HALF_DOWN",e[e.HALF_EVEN=4]="HALF_EVEN",e[e.HALF_UP=5]="HALF_UP",e[e.UNNECESSARY=6]="UNNECESSARY",e[e.UP=7]="UP",e))(Se||{});function Ot(e,n=0,a=Se.HALF_EVEN){if(a===Se.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let o=!1;e[0]==="-"&&(o=!0,e=e.substring(1));let l=e.split("."),r=l[0],s=l[1];if(n<0){if(n=-n,r.length<=n)return"0";{let c=r.substr(0,r.length-n);return e=c+"."+r.substr(r.length-n)+s,c=Ot(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,za(l[1],r,o,a)?(o?"-":"")+lo(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");s=l[1].substring(0,n);let i=l[1].substring(n);return i&&za(i,s,o,a)&&(s=lo(s),s.length>n)?(o?"-":"")+lo(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function za(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===Se.DOWN||!a&&o===Se.FLOOR||a&&o===Se.CEILING)return!1;if(o===Se.UP||a&&o===Se.FLOOR||!a&&o===Se.CEILING)return!0;let l="5"+new Array(e.length).join("0");if(e>l)return!0;if(e<l)return!1;switch(o){case Se.HALF_DOWN:return!1;case Se.HALF_UP:return!0;case Se.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function lo(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function go(e,n){e=e.toString(),n=n.toString();let a=0;e[0]=="-"&&(a++,e=e.substr(1)),n[0]=="-"&&(a++,n=n.substr(1)),e=$t(e),n=$t(n);let o=0,l=0;e.indexOf(".")!=-1&&(o=e.length-e.indexOf(".")-1),n.indexOf(".")!=-1&&(l=n.length-n.indexOf(".")-1);let r=o+l;if(e=$t(e.replace(".","")),n=$t(n.replace(".","")),e.length<n.length){let u=e;e=n,n=u}if(n=="0")return"0";let s=n.length,i=0,c=[],f=s-1,p="";for(let u=0;u<s;u++)c[u]=e.length-1;for(let u=0;u<2*e.length;u++){let h=0;for(let k=n.length-1;k>=f&&k>=0;k--)c[k]>-1&&c[k]<e.length&&(h+=parseInt(e[c[k]--])*parseInt(n[k]));h+=i,i=Math.floor(h/10),p=h%10+p,f--}return p=$t(Xs(p,r)),a==1&&(p="-"+p),p}function Xs(e,n){return n==0?e:(e=n>=e.length?new Array(n-e.length+1).join("0")+e:e,e.substr(0,e.length-n)+"."+e.substr(e.length-n,n))}function $t(e){for(;e[0]=="0";)e=e.substr(1);if(e.indexOf(".")!=-1)for(;e[e.length-1]=="0";)e=e.substr(0,e.length-1);return e==""||e=="."?e="0":e[e.length-1]=="."&&(e=e.substr(0,e.length-1)),e[0]=="."&&(e="0"+e),e}function yo(e,n,a=8){if(n==0)throw new Error("Cannot divide by 0");if(e=e.toString(),n=n.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),n=n.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let o=0;n[0]=="-"&&(n=n.substring(1),o++),e[0]=="-"&&(e=e.substring(1),o++);var l=n.indexOf(".")>0?n.length-n.indexOf(".")-1:-1;if(n=Ne(n.replace(".","")),l>=0){let f=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(f==-1)e=Ne(e+new Array(l+1).join("0"));else if(l>f)e=e.replace(".",""),e=Ne(e+new Array(l-f+1).join("0"));else if(l<f){e=e.replace(".","");let p=e.length-f+l;e=Ne(e.substring(0,p)+"."+e.substring(p))}else l==f&&(e=Ne(e.replace(".","")))}let r=0,s=n.length,i="",c=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(0,s+1):e.substring(0,s);if(e=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(s+1):e.substring(s),c.indexOf(".")>-1){let f=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(f+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=f,i="0."+new Array(f).join("0")}for(a=a+2;r<=a;){let f=0;for(;parseInt(c)>=parseInt(n);)c=dn(c,"-"+n),f++;i+=f,e?(e[0]=="."&&(i+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(i+="."),r++,c=c+"0")}return(o==1?"-":"")+Ne(Ot(i,a-2))}function vo(e,n){return e=e.toString(),n=n.toString(),n=bo(n),dn(e,n)}function bo(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Fa(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ra(e),Ra(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=vo(e,go(n,Ot(yo(e,n),0,Se.FLOOR)));return a+o}function Ra(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Oa(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=Oo(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ie{value;static RoundingModes=Se;static validate(n){if(n){if(n=n.toString(),isNaN(n))throw Error("Parameter is not a number: "+n);n[0]=="+"&&(n=n.substring(1))}else n="0";if(n.startsWith(".")?n="0"+n:n.startsWith("-.")&&(n="-0"+n.substr(1)),/e/i.test(n)){let[a,o]=n.split(/[eE]/);a=Ne(a);let l="";a[0]=="-"&&(l="-",a=a.substring(1)),a.indexOf(".")>=0?(o=parseInt(o)+a.indexOf("."),a=a.replace(".","")):o=parseInt(o)+a.length,a.length<o?n=l+a+new Array(o-a.length+1).join("0"):a.length>=o&&o>0?n=l+Ne(a.substring(0,o))+(a.length>o?"."+a.substring(o):""):n=l+"0."+new Array(-o+1).join("0")+a}return n}constructor(n="0"){this.value=ie.validate(n)}getValue(){return this.value}static getPrettyValue(n,a,o){if(!(a||o))a=3,o=",";else if(!(a&&o))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");n=ie.validate(n);let l=n.charAt(0)=="-";l&&(n=n.substring(1));var r=n.indexOf(".");r=r>0?r:n.length;for(var s="",i=r;i>0;)i<a?(a=i,i=0):i-=a,s=n.substring(i,i+a)+(i<r-a&&i>=0?o:"")+s;return(l?"-":"")+s+n.substring(r)}getPrettyValue(n,a){return ie.getPrettyValue(this.value,n,a)}static round(n,a=0,o=Se.HALF_EVEN){if(n=ie.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Ot(n,a,o)}round(n=0,a=Se.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ie(Ot(this.value,n,a))}static floor(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,Se.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,Se.FLOOR)}static ceil(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,Se.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,Se.CEILING)}static add(n,a){return n=ie.validate(n),a=ie.validate(a),dn(n,a)}add(n){return new ie(dn(this.value,n.getValue()))}static subtract(n,a){return n=ie.validate(n),a=ie.validate(a),vo(n,a)}subtract(n){return new ie(vo(this.value,n.getValue()))}static multiply(n,a){return n=ie.validate(n),a=ie.validate(a),go(n,a)}multiply(n){return new ie(go(this.value,n.getValue()))}static divide(n,a,o){return n=ie.validate(n),a=ie.validate(a),yo(n,a,o)}divide(n,a){return new ie(yo(this.value,n.getValue(),a))}static modulus(n,a){return n=ie.validate(n),a=ie.validate(a),Fa(n,a)}modulus(n){return new ie(Fa(this.value,n.getValue()))}static compareTo(n,a){return n=ie.validate(n),a=ie.validate(a),Oa(n,a)}compareTo(n){return Oa(this.value,n.getValue())}static negate(n){return n=ie.validate(n),bo(n)}negate(){return new ie(bo(this.value))}}function Dr(e,n){return ie.multiply(`${e}`,`${n}`)}function Ko(e,n,a=8){return ie.divide(`${e}`,`${n}`,a)}function ko(e,n){return e=`${e}`,n=`${n}`,ie.compareTo(e,n)}function Ir(e){return ie.negate(e)}function Sn(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let s=r.charAt(0);s=="-"?r=r.substring(1):s="";let i=r,c="",f=r.indexOf(".");f!=-1&&(i=r.substring(0,f),c=r.substring(f+1)),n!=-1&&(n<c.length?c=c.substring(0,n):a&&n>c.length&&(c=c.padEnd(n,"0")));let p;if(o>0){let u="",h=i.split("").reverse();for(let k=0;k<h.length;k++)u+=h[k]+((k+1)%o==0&&k+1!=h.length?l:"");c.length==0?p=`${s}${u.split("").reverse().join("")}`:p=`${s}${u.split("").reverse().join("")}.${c}`}else c.length==0?p=`${s}${i}`:p=`${s}${i}.${c}`;return p}function qr(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const it=typeof window<"u",Ke=Xe;function Mr(e){return e==null}const Cn=Array.isArray,Qs=e=>wn(e)==="[object Map]",Gs=e=>wn(e)==="[object Set]",He=e=>e instanceof Date,fn=e=>typeof e=="function",Pr=e=>typeof e=="string",Zs=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",gt=e=>Ee(e)&&fn(e.then)&&fn(e.catch),Lr=Object.prototype.toString,wn=e=>Lr.call(e),So=e=>wn(e)==="[object Object]",zr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Js(e){return e.__esModule||zr&&e[Symbol.toStringTag]==="Module"}const _s=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function lt(...e){let n=e[0]!==void 0&&e[0]!==null?e[0]:{},a=1,o=e.length,l=!1;for(typeof n=="boolean"&&(l=n,n=e[a]??{},a++),typeof n!="object"&&(n={});a<o;a++)if(e[a]!==null&&e[a]!==void 0){let r=e[a];for(let s in r){let i=n[s],c=r[s];if(i!==c)if(l===!0&&c&&typeof c=="object"){let f;Array.isArray(c)?f=i&&Array.isArray(i)?i:[]:f=i&&typeof i=="object"?i:{},n[s]=lt(l,f,c)}else c!==void 0&&(n[s]=c)}}return n}function Co(e,n,a=!1){if(!a)lt(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!So(s))continue;r=Co(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!So(s))continue;r=Co(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const ao=_s?Promise.resolve():null;function ei(e,...n){ao!==null?n&&n.length>0?ao.then(()=>{e(n)}):ao.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function he(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function fe(e){return typeof e=="number"?e:Number(e)}const ti={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function at(e){let a=Object.prototype.toString.call(e);return e==null?String(e):ti[a]||"object"}function Nn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Fr(e){return e&&typeof e=="object"&&"setInterval"in e}function Rr(e){let n=!!e&&"length"in e&&e.length,a=at(e);return a==="function"||Fr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function Or(e,n){let a=+n.length,o=0,l=e.length;for(;o<a;o++)e[l++]=n[o];return e.length=l,e}function ni(e,n=[]){let a=n;return e!=null&&(Rr(Object(e))?Or(a,typeof e=="string"?[e]:e):a.push(e)),a}function qe(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=at(e),o=at(n);if(a!==o)return!1;if(a==="object"){let l=Object.keys(e),r=Object.keys(n);if(l.length!==r.length)return!1;for(let s=0;s<l.length;s++){let i=l[s],c=e[i],f=n[i];if(!qe(c,f))return!1}return!0}else if(a==="array"){if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++){let r=e[l],s=n[l];if(!qe(r,s))return!1}return!0}return!1}function Kr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function Ur(e){return ue(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ue(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function Hr(e){if(e==null)return 0;let n=`${e}`;if(n.length==0)return 0;n.charAt(0)=="-"&&(n=n.substring(1)),n=n.replace(/[^\d\.-]/g,"");const a=n.indexOf(".");return a==-1?n.length:a}function jr(e){if(e==null)return 0;const n=`${e}`;if(n.length==0)return 0;const a=n.indexOf(".");return a==-1?0:n.length-(a+1)}function Ka(e,n,a){const o=e.indexOf(n);return o===-1?e:n==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(a,"")}function wo(e,n=!0,a=!0){n?e=Ka(e,".",/\./g):e=e.replace(/\./g,""),a?e=Ka(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function oi(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(qe(e,a))return!0}):n.indexOf(e)}function li(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(qe(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ve(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function be(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function Nt(e,...n){const a=[];n.forEach(l=>{Reflect.apply([].push,a,Reflect.ownKeys(l))});const o={};for(const l in e)a.includes(l)||(o[l]=e[l]);return o}const Wr=(e,n,a)=>{const o=Object.assign({},e),l=Object.assign({},a);return Object.keys(n).length>0?(Object.keys(o).forEach(r=>{l.hasOwnProperty(r)?typeof l[r]=="string"&&(o[r]=n[l[r]]):n[r]&&(o[r]=n[r])}),o):e};function No(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const et=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},Ue=(e,n,a)=>Math.min(Math.max(e,n),a),Ce=Symbol.for("BroadcastKey");class Uo{parent;children=[];callbacks=new Map;proxy=null;name;constructor(n,a,o){this.parent=n,this.proxy=a,this.name=o,n!==null&&n.addChild(this)}addChild(n){this.children.push(n)}removeChild(n){const a=this.children.findIndex(o=>n===o);a!==-1&&this.children.splice(a,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(n,a,...o){if(n.maxLevel!==void 0&&n.maxLevel!==null&&n.maxLevel>0){if(n.level=n.level??0,n.level>n.maxLevel)return[];n.level++}let l=!1;!n.name||n.name==="*"?l=!0:!n.name||n.name==="+"?(l=!1,n.name="*"):Kr(n.name)&&this.name&&n.name.test(this.name)?l=!0:typeof n.name=="function"?l=Reflect.apply(n.name,null,[this.name]):n.name===this.name&&(l=!0);const r=[];if(l){const s=this.callbacks.get(a);if(typeof s=="function"){const c=Reflect.apply(s,this.proxy,[...o]);c!=null&&r.push(c)}const i=this.proxy??{};if(typeof i[a]=="function"){const c=Reflect.apply(i[a],i,[...o]);c!=null&&r.push(c)}}return this.children.forEach(s=>{const i=Reflect.apply(s.emit,s,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,r,[...i])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const s=Reflect.apply(r.emit,r,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,l,[...s])}),l}on(n,a){this.callbacks.set(n,a)}}function Bn(e,n,a,o){const l=new Uo(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function ai(e,n,a){const o=a;if(o[Ce])return o[Ce];const l=t.inject(Ce,null),r=new Uo(l,a,e);if(n&&typeof n=="object")for(const s in n)r.on(s,n[s]);return o[Ce]=r,t.provide(Ce,r),t.onUnmounted(()=>{r.destroy(),o[Ce]=void 0}),r}function Pt(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ce]??t.inject(Ce,null):t.inject(Ce,null)}const nt=e=>e.default??e;class ri{error(n,a){const o=a,l=a||t.hasInjectionContext()?Pt(a):null;l?l.emit({name:"*",maxLevel:1},"setErrorTip",n):typeof o.setErrorTip=="function"&&o.setErrorTip(n)}reset(n){const a=n,o=n||t.hasInjectionContext()?Pt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?Pt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}decorate(n,a,o){Array.isArray(n)||(n=[n]);const l=o,r=o||t.hasInjectionContext()?Pt(o):null,s=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),i=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!s&&i?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):s&&!i&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let zt=new ri;function si(e){zt=e}function ii(e){zt?Object.assign(zt,e):zt=e}function ci(e,n){nt(tt).setValidator(e,n)}function ui(e){nt(tt).deleteValidator(e)}let Yr=["blur","clear"];function di(e){Yr=e}function Xr(){return Yr}let Qr=["focus","change","setValue"];function fi(e){Qr=e}function Gr(){return Qr}function mi(e){nt(tt).messages(e)}function Et(...e){const n=[];return e.forEach(a=>{a.forEach(o=>{const l=n.findIndex(r=>r.type===o.type);l!==-1&&n.splice(l,1),n.push(o)})}),n}function en(e){return e.forEach(n=>{n.type==="required"&&(n.required===null||n.required===void 0)&&(n.required=!0),!n.type&&(n.required===!0||n.required===!1)&&(n.type="required")}),e}const Me=Symbol("ValidateSchemaKey");class Zr{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(n,a,o){this.parent=n,this.descriptor=a,this.proxy=o,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let n=this.proxy.$attrs;n&&(this.scope=t.effectScope(!0),this.scope.run(()=>{t.watchEffect(()=>{const a=en(Et(this.attrRules,this.rules)),o=[];for(let r in n){let s=n[r];if(this.hasValidator(r,!0)){if(s===!1)continue;let c={type:r};s!==null&&typeof s=="object"&&Object.assign(c,s),o.push(c);continue}let i=this.getValidator(r);if(i!==null){let c={type:r,validator:i};o.push(c)}}this.attrRules=en(o);const l=Et(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(l,a)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null,this.proxy=null}execHandler(n,...a){const o=this.descriptor.validateHandler;if(o&&typeof o[n]=="function")return Reflect.apply(o[n],o,[...a]);const l=zt;return l&&typeof l[n]=="function"?Reflect.apply(l[n],l,[...a]):null}decorate(n,a){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",n,a,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(n){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",n,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(n,a,o=!1){o?nt(tt).setValidator(n,a):this.validators[n]=a}getValidator(n){let a=this.validators[n]??null;return a||(a=this.parent?.getValidator(n)??null),a}deleteValidator(n,a=!1){a?nt(tt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return nt(tt).hasValidator(n);{let o=Reflect.has(this.validators,n);return!o&&this.parent!==null&&(o=this.parent.hasValidator(n,!1)),o}}setRule(n){const a=Et(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=en(n):this.rules=en([n]);const o=Et(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(o,a)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let a=Et(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),s={[`${o}`]:r},i=nt(tt),c=new i(l),f=this.proxy??s;return c.validate(s,{context:f}).then(u=>{if(u.pass)this.success();else{let h="error";Array.isArray(u.errors)&&u.errors.length>0&&(h=u.errors[0].message??h,u.errors=[u.errors[0]],u.errors[0].ref=f),this.error(h)}return u}).catch(u=>{const h=u.message??`${u}`;return this.error(h),u})}}return Promise.resolve({pass:!0})}}function Vn(e,n,a){if(a.valueName=a.valueName??"modelValue",a.valueType=a.valueType??"string",!a.validateHandler&&a.valueName!=="modelValue"){const l=a.valueName;a.validateHandler={getValue(r){return r[l]}}}return new Zr(n,a,e)}const mn=Symbol.for("EventEmitterKey");class Jr{register=new Map;proxy;constructor(n){this.proxy=n}destroy(){this.proxy=null,this.register.clear()}off(n,a){let o=this.register.get(n);if(o&&Array.isArray(o)){let l=o.findIndex(r=>r===a);l!==-1&&o.splice(l,1)}}on(n,a){let o=this.register.get(n);o||(o=new Array,this.register.set(n,o)),o.push(a)}emit(n,...a){const o=this.register.get(n);o&&o.forEach(l=>{try{Reflect.apply(l,null,[n,...a])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[n,...a])}}function yt(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function pn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function pi(e,n){const a=yt((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function hi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function Ho(e,n,a,o=0,l=!0){let r=n,s=0;if(l){const c=e();if(s++,c||s>a)return}const i=()=>{const c=e();s++,!(c||s>a)&&(r+=o,setTimeout(i,r))};setTimeout(i,r)}const $e=Symbol("DomainKey"),dt=Symbol("DataItemsKey");class An{_parent=null;get parent(){return this._parent}set parent(n){this._parent=n}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(n){this._broadcast=n}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(n){this._validateSchema=n}_props=t.reactive({});constructor(n=null){this._name=n}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(n,a=[]){for(const o in n){const l=n[o];a.length>0&&a.indexOf(l)!==-1||(this._props[o]=l)}}has(n){if(Reflect.has(this._props,n)){const a=this._props[n];if(a!=null)return!0}return this.parent==null?!1:this.parent.has(n)}delete(n){Reflect.deleteProperty(this._props,n)}set(n,a){this._props[n]=a}get(n,a){if(Reflect.has(this._props,n)){const o=this._props[n];if(o!=null)return o}return this.parent==null?a:this.parent.get(n,a)}getForParent(n,a){return this.parent==null?a:this.parent.get(n,a)}getForSelf(n){return this._props[n]}getAll(n){const a=[];let o=this;for(;o!=null;){if(Reflect.has(o._props,n)){const l=o._props[n];a.push(l)}o=o._parent}return a}}const gi=new An;function pt(){return gi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[$e]??t.inject($e,null):t.inject($e,null)}const ro=Symbol("OriginalDateKey");function jo(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject($e,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new An(i);c.parent=s;const f=k=>{r[ro]||h(k),c?.set("modelValue",k)},p=()=>c?.getForSelf("modelValue")??null,u=()=>r[ro]??null,h=k=>{const y={};lt(!0,y,t.toRaw(k)),r[ro]=y};if(t.isReactive(n)||typeof n=="function"?t.watch(n,k=>{c?.merge(k,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&h(n.modelValue),r[$e]=c,t.provide($e,c),l!==null){const k=t.inject(Ce,null),y=Bn(r,k,i,o);c.broadcast=y,r[Ce]=y,t.provide(Ce,y),r.broadcast=(d,m,...g)=>Reflect.apply(y.emit,y,[d,m,...g]);const v=t.inject(Me,null),b=Vn(r,v,{componentName:""});c.validateSchema=b,r[Me]=b,t.provide(Me,b),r[dt]=new Map,r.validate=(d=!0)=>{const m=[];let g=null;const S={deep:!1};if(d===!0)g={name:"*"};else if(Array.isArray(d)&&d.length>0){const N=d;g={name:C=>C?N.indexOf(C)!==-1:!1}}else if(d!=null&&typeof d=="object"){const N=d;if(Object.assign(S,N),Array.isArray(N.include)&&N.include.length>0){const C=N.include;g={name:w=>w?C.indexOf(w)!==-1:!1}}else if(Array.isArray(N.exclude)&&N.exclude.length>0){const C=N.exclude;g={name:w=>w?C.indexOf(w)===-1:!1}}else g={name:"*"}}if(g){const N=y?.emitToChildren(g,"validate",S);N&&Reflect.apply([].push,m,N)}return m.length==1?m[0]:m.length>1?Promise.all(m).then(N=>{let C=[];return N.forEach(w=>{w.pass===!1&&Array.isArray(w.errors)&&(C=[...C,...w.errors])}),C.length>0?{pass:!1,errors:C}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(d,m=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(d).forEach(N=>{let C=String(N);const w={componentName:"",fieldName:C,pureDataValidate:!0};if(c){const B=ts(c,C,w,y,b);r[dt].set(C,B);const V=d[C];V&&B.validateSchema.setRule(V)}});return}if(m){const S=Reflect.ownKeys(d),N={name:C=>S.includes(C)};y?.emitToChildren(N,"setNameValidateRules",d,!1)}},r.clearValidate=(d=!0)=>{let m=null;if(d===!0)m={name:"*"};else if(Array.isArray(d)&&d.length>0){const g=d;m={name:S=>S?g.indexOf(S)!==-1:!1}}else if(d!=null&&typeof d=="object"){const g=d;if(Array.isArray(g.include)&&g.include.length>0){const S=g.include;m={name:N=>N?S.indexOf(N)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const S=g.exclude;m={name:N=>N?S.indexOf(N)===-1:!1}}else m={name:"*"}}m&&y?.emitToChildren(m,"clearValidate",!1)},r.resetFields=d=>{const m=p();if(!m)return;const g={};if(lt(!0,g,u()??{}),Array.isArray(d))d.forEach(S=>{m[S]=g[S]});else if(d&&Array.isArray(d.include))(d.include??[]).forEach(N=>{m[N]=g[N]});else if(d&&Array.isArray(d.exclude)){let S=d.exclude??[];Reflect.ownKeys(g).forEach(N=>{S.includes(N)||(m[N]=g[N])})}else Object.assign(m,g);r.clearValidate(d)},r.setModelValue=(d,m)=>{!m||m===i?f(d):y?.emitToChildren({name:m},"setModelValue",d)},r.getModelValue=()=>p()}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Me]=void 0,t.provide(Me,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Ce]=void 0,t.provide(Ce,null)),c?.destroy(),r[$e]=void 0,t.provide($e,null),r[dt]&&(r[dt].clear(),r[dt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,c=null,r=null}),c}function _r(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject($e,null);r===null&&(r=pt());const s=e||n.prop||n.name;let i=new An(s);return i.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{i?.merge(c,a)},{immediate:!0}):i.merge(n,a),l[$e]=i,t.provide($e,i),t.onUnmounted(()=>{i?.destroy(),l[$e]=void 0,t.provide($e,null),i=null,l=null}),i}function es(e,n,a){const l=je(e)?.get("rules");if(!l)return;let r=l[a];r&&(Array.isArray(r)||(r=[r]),n.setRule(r))}function Be(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",s=t.inject(Ce,null);let i=Bn(l,s,r,a);l[Ce]=i,t.provide(Ce,i),l.broadcast=(y,v,...b)=>i?Reflect.apply(i.emit,i,[y,v,...b]):null;const c=t.inject(Me,null);e.fieldName=e.fieldName??r;let f=Vn(l,c,e);l[Me]=f,t.provide(Me,f),es(l,f,r),l.validate=(y=null)=>{if(!f)return Promise.resolve({pass:!0});const v=[];let b=!1,d=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)d=!0,b=!0;else if(y&&typeof y=="object"){const m=y,g=m.ignoreDisabled??!0,S=m.ignoreReadonly??!0,N=m.ignoreHidden??!0;g===!0&&e.disabled===!0||S===!0&&e.readonly===!0||N===!0&&Nn(l.$el)?d=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),d=!0),b=m.deep??!1}else typeof y=="boolean"&&(b=y),d=!0;if(d){const m=f?.validate();v.push(m)}if(b){let m=null;const g={deep:!1};if(y===!0)m={name:"*"};else if(Array.isArray(y)&&y.length>0){const S=y;m={name:N=>N?S.indexOf(N)!==-1:!1}}else if(y!=null&&typeof y=="object"){const S=y;if(Object.assign(g,S),Array.isArray(S.include)&&S.include.length>0){const N=S.include;m={name:C=>C?N.indexOf(C)!==-1:!1}}else if(Array.isArray(S.exclude)&&S.exclude.length>0){const N=S.exclude;m={name:C=>C?N.indexOf(C)===-1:!1}}else m={name:"*"}}if(m&&i){const S=i.emitToChildren(m,"validate",g);Reflect.apply([].push,v,S)}}return v.length==1?v[0]:v.length>1?Promise.all(v).then(m=>{let g=[];return m.forEach(S=>{S.pass===!1&&Array.isArray(S.errors)&&(g=[...g,...S.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>f?.setRule(y),l.setNameValidateRules=(y,v=!1)=>{const b=y[r];if(b&&f?.setRule(b),v&&i){const d={name:m=>Reflect.ownKeys(y).includes(m)};i.emitToChildren(d,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&f?.clear();let v=null;if(y===!0)v={name:"*"};else if(Array.isArray(y)&&y.length>0){const b=y;v={name:d=>d?b.indexOf(d)!==-1:!1}}else if(y!=null&&typeof y=="object"){const b=y;if(Array.isArray(b.include)&&b.include.length>0){const d=b.include;v={name:m=>m?d.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const d=b.exclude;v={name:m=>m?d.indexOf(m)===-1:!1}}else v={name:"*"}}v&&i&&i.emitToChildren(v,"clearValidate",!1)};let p=new Jr(l);l[mn]=p;const u=yt((y="validate")=>{f&&(y==="reset"?f.clear():f.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:Xr()).forEach(y=>{p&&p.on(y,v=>{u("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:Gr()).forEach(y=>{p&&p.on(y,v=>{u("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ce]=void 0,t.provide(Ce,null),i=null,f?.destroy(),l[Me]=void 0,t.provide(Me,null),f=null,p?.destroy(),l[mn]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:i,validateSchema:f,emitEvent:(y,...v)=>{p&&Reflect.apply(p.emit,p,[y,...v])},onEvent:(y,v)=>{p&&Reflect.apply(p.on,p,[v])},offEvent:(y,v)=>{p&&Reflect.apply(p.off,p,[v])}}}function ts(e,n,a,o,l){const r={},s=n??"",i={getValue(){const p=e.getForSelf("modelValue");return p?p[s]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,s):!1}};a.fieldName=s,a.validateHandler={getValue(p){return i.getValue()}};let c=Vn({},l,a);r.validate=(p=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const u=[];let h=!1,k=!1;if(Array.isArray(p)&&p.indexOf(s)!==-1)k=!0,h=!0;else if(p&&typeof p=="object"){const y=p;Array.isArray(y.include)&&y.include.indexOf(s)!==-1||Array.isArray(y.exclude)&&y.exclude.indexOf(s),k=!0,h=y.deep??!1}else typeof p=="boolean"&&(h=p),k=!0;if(k&&c){const y=c.validate();u.push(y)}if(h){let y=null;const v={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const b=p;y={name:d=>d?b.indexOf(d)!==-1:!1}}else if(p!=null&&typeof p=="object"){const b=p;if(Object.assign(v,b),Array.isArray(b.include)&&b.include.length>0){const d=b.include;y={name:m=>m?d.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const d=b.exclude;y={name:m=>m?d.indexOf(m)===-1:!1}}else y={name:"*"}}if(y&&f){const b=f.emitToChildren(y,"validate",v);Reflect.apply([].push,u,b)}}return u.length==1?u[0]:u.length>1?Promise.all(u).then(y=>{let v=[];return y.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(v=[...v,...b.errors])}),v.length>0?{pass:!1,errors:v}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const u=p[s];u&&c?.setRule(u)};let f=Bn(null,o,s,r);return t.onUnmounted(()=>{c=null,f=null}),{broadcast:f,validateSchema:c}}function Bt(){let n=t.getCurrentInstance()?.proxy,a=new Jr(n);return n[mn]=a,t.onUnmounted(()=>{a?.destroy(),n[mn]=void 0,a=null,n=null}),{emitEvent:(o,...l)=>{a&&Reflect.apply(a.emit,a,[o,...l])},onEvent:(o,l)=>{a&&Reflect.apply(a.on,a,[l])},offEvent:(o,l)=>{a&&Reflect.apply(a.off,a,[l])}}}const ge=e=>e?`${ce(e)}px`:"";function ce(e,n=-1){if(typeof e=="number")return e>0&&e<1&&n>0?e*n:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let a=e.indexOf("px");if(a!==-1)return Number(e.substring(0,a));if(a=e.indexOf("rem"),a!==-1){let l=Number(e.substring(0,a)),r=1;if(it){const{fontSize:s}=window.getComputedStyle(document.documentElement,null),i=s.indexOf("px");i>0&&(r=Number(s.substring(0,i)))}return l*=r,l}if(a=e.indexOf("%"),a!==-1)return Number(e.substring(0,a))*n;const o=Number(e);return isNaN(o)?0:o}const Qe="PageStateKey";function ze(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=ce(e.top)),e.left!==null&&e.left!==void 0&&(n.left=ce(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=ce(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=ce(e.right))),n}function Bo(e,n,a={},o=!0,l=-1,r=-1,s=0,i=0){if(e.headerHeight=ce(a.headerHeight??n.headerHeight??-1),e.headerPadding=ze(a.headerPadding??n.headerPadding),e.footerHeight=ce(a.footerHeight??n.footerHeight??-1),e.footerPadding=ze(a.footerPadding??n.footerPadding),e.contentPadding=ze(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=ce(c,r):e.height=ce(r)-ce(s,r)-ce(i,r),e.width=ce(a.width??n.width??0,l)}}function ns(e,n={}){const a={top:null,left:null,bottom:null,right:null},o={width:0,height:0,headerHeight:0,headerPadding:{...a},footerHeight:0,footerPadding:{...a},contentPadding:{...a},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},l=Object.assign(e.get("safeAreaInset")??{},n.safeAreaInset??{});l&&(o.safeAreaTop=ce(l.top),o.safeAreaBottom=ce(l.bottom),o.safeAreaLeft=ce(l.left),o.safeAreaRight=ce(l.right));const r=e.get("pageLayout");if(!r)return null;const s=e.get("rootWidth")??-1,i=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,f=e.get("footerBarHeight")??0;Bo(o,r,n,!0,s,i,c,f);const p=t.reactive(o),u=e.getForParent(Qe);u&&(o.height=hn(e,u),o.width=gn(e,u),t.watch([()=>hn(e,u),()=>gn(e,u)],([k,y])=>{p.height=k,p.width=y}));const h=!u;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([k,y,v=-1,b=-1,d=0,m=0])=>{Bo(p,y,n,h,v,b,d,m)}),e.set(Qe,p),p}function Tn(e){return e.get(Qe)}function $n(e,n){if(n=n??e.get(Qe),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function En(e,n){if(n=n??e.get(Qe),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function hn(e,n){if(n=n??e.get(Qe),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=$n(e,n),o=En(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function gn(e,n){return n=n??e.get(Qe),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function yi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function vi(e){return!!e.getForParent(Qe)}var yn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(yn||{});function so(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=je();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let i=r.length-1;i>=0;i--){const c=r[i];if(so(c,o))return c}const s=e.value;return so(s,o)?s:null}):t.computed(()=>{const r=e.value;return so(r,o)?r:l?.get(n)})}function Ae(e){return Ve(e,"readonly",0,function(a){return he(a)})}function Te(e){return Ve(e,"disabled",0,function(a){return he(a)})}function Ie(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const s=t.ref(r);return t.watch(l,i=>{if(typeof a=="function"){const c=a(i);c!==s.value&&(s.value=c,o&&o("setValue",c))}else i!==s.value&&(s.value=i,o&&o("setValue",i))}),s}const os=new Map,vn=new Map;let Vo=null;function bi(e){Vo=e}function ls(e,n,a){if(a){let o=vn.get(a);o||(o=new Map,vn.set(a,o)),o.set(e,n)}else os.set(e,n)}function Je(e,n,a){!a&&Vo&&(a=Vo(e)??void 0);let o=null;if(a){let l=vn.get(a);l&&(o=l.get(n))}return o||(o=os.get(n)),o}function ki(e,n){for(let a in e){const o=e[a];ls(a,o,n)}}function Si(e){vn.delete(e)}function Ci(){return{top:0,left:0,bottom:0,right:0}}function wi(e=0,n=0){if(it){const a=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l={width:a,height:o-ce(e,o)-ce(n,o)};return{rootWidth:a,rootHeight:o,pageLayout:l}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{width:"100%",height:"100%",headerHeight:-1,footerHeight:-1}}}function Ni(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Bi{packages;_version;get version(){return this._version}constructor(n,a){this.packages=n,this._version=a}install(n,a){a?.install!==!1&&this.packages.forEach(r=>{if(r.install)n.use(r);else if(r.name){const s=Ni(r.name,a);n.component(s,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=pt();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=pn(()=>{const i={...a},c=document.documentElement.clientWidth||document.body.clientWidth,f=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=f,this.initPageLayout(i,l)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in a)o.indexOf(r)===-1&&l.set(r,a[r])}initPageLayout(n,a){const o=n.headerBarHeight??0,l=n.footerBarHeight??0,r=lt({},Ci(),n.safeAreaInset),s=wi(o,l),i=lt({},s.pageLayout,n.pageLayout);a=a??pt(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",i),a.set("rootWidth",s.rootWidth),a.set("rootHeight",s.rootHeight)}setScopeGetter(n){bi(n)}setAPI(n,a,o){ls(n,a,o)}getAPI(n,a,o){return Je(n,a,o)}batchSetAPI(n,a){ki(n,a)}clearScopeAPI(n){Si(n)}getRootDomain(){return pt()}}function G(e){const n="fox-"+e;return{componentName:n,scope:e.replace("-",""),create(a){return a.baseName=e,a.name=n,a.install=o=>{o.component(a.name,a)},t.defineComponent(a)},createDemo(a){return a.baseName=e,a.name="demo-"+e,t.defineComponent(a)}}}const Vi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Pr(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",s=e.id||new Date().getTime();l.id=r+s;let i={};fn(n.wrapper)?i=n.wrapper(a,l):i=n.wrapper;const c=t.createApp(i,e),f=n.components;return f&&f.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},as=(e,n)=>e?t.h(e,n):"";function De(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const me={disabled:{type:[Boolean,String],required:!1},readonly:{type:[Boolean,String],required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},textAlign:{type:[String],required:!1},hasBorder:{type:Boolean,required:!1,default:!0}},ye={prop:{type:String,required:!1},label:{type:String,required:!1},isRequired:{type:[String,Boolean],required:!1,default:!1},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1},infoMarkClass:{type:String,required:!1,default:"is-info"},warnMarkClass:{type:String,required:!1,default:"is-warn"},errorMarkClass:{type:String,required:!1,default:"is-error"},errorTip:{type:String,required:!1},errorIcon:{type:Object,required:!1},errorClass:{type:String,required:!1},warnTip:{type:String,required:!1},warnIcon:{type:Object,required:!1},warnClass:{type:String,required:!1},infoTip:{type:String,required:!1},infoIcon:{type:Object,required:!1},infoClass:{type:String,required:!1},contentClass:{type:String,required:!1,default:"content--default"},contentStyle:{type:Object,required:!1,default:{}},hintType:{type:String,required:!1,default:"text"},hintText:{type:[String,Number],required:!1},hintVisible:{type:[Boolean,String],required:!1,default:!0},hintProps:{type:Object,required:!1,default:{}},appearListen:{type:[Boolean,String],required:!1,default:!1}},rs={column:{type:[String,Number],required:!1},columnWidth:{type:[String,Number],required:!1},gutter:{type:[String,Number],required:!1},minItemWidth:{type:[String,Number],required:!1},maxItemWidth:{type:[String,Number],required:!1}},ss={name:{type:String,required:!1},tag:{type:String,required:!1,default:"div"},modelValue:{type:String,required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1},type:{type:[String],required:!1},justify:{type:[String],required:!1,default:"stretch"},align:{type:[String],required:!1,default:"start"},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},autoLayout:{type:[Boolean],required:!1,default:!0},isWrap:{type:[Boolean,String],required:!1,default:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},showMark:{type:[String,Boolean],required:!1,default:!1},markColor:{type:[String],required:!1},title:{type:String,default:""},titleColor:{type:[String],required:!1},collapse:{type:[String,Boolean],requried:!1},showCollapse:{type:[String,Boolean],required:!1,default:!1},collapsePosition:{type:[String],requried:!1,default:"right"},collapseText:{type:[String],requried:!1},expandText:{type:[String],requried:!1},collapseIcon:{type:[Object],requried:!1},collapseHeight:{type:[String,Number],requried:!1},rollingDisplay:{type:[Boolean],requried:!1,default:!0}},is=[];for(const e in ss)is.push(e);const Ai=Symbol.for("InnerPageScopeKey"),Ti={name:{type:String,required:!1,default:""},modelValue:{type:Object,required:!1},width:{type:[Number,String],required:!1},height:{type:[Number,String],required:!1},safeAreaInset:{type:Object,required:!1},contentPadding:{type:Object,required:!1},headerPadding:{type:Object,required:!1},footerPadding:{type:Object,required:!1},headerHeight:{type:[Number,String],required:!1},footerHeight:{type:[Number,String],required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1}},$i=(e,n)=>({inheritAttrs:!0,props:{...me,...rs,...Ti},setup(a,{slots:o}){const l=jo(a.name,a),r=t.inject(Ai,!1);if(l){const p=ns(l,a);De({getPageContentHeight:()=>hn(l,p),getPageContentWidth:()=>gn(l,p),getPageHeaderHeight:()=>$n(l,p),getPageFooterHeight:()=>En(l,p)}),p&&r&&(p.contentHeight="100%")}const s=t.computed(()=>({[e]:!0})),i=t.computed(()=>({})),c=t.getCurrentInstance(),f=(p,u=!1)=>{const h=c?.proxy;h&&typeof h.setNameValidateRules=="function"&&h.setNameValidateRules(p,!0,u)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,u],[h,k])=>{if(p&&h){const y=t.toRaw(h),v=t.toRaw(p),b=v?Reflect.ownKeys(v):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{b.includes(m)||(v[m]=[])}),f(v)}if(u&&k){const y=t.toRaw(k),v=t.toRaw(u),b=v?Reflect.ownKeys(v):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{b.includes(m)||(v[m]=[])}),f(v,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);f(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);f(p,!0)}}),()=>{const p={class:s.value,style:i.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:Ei,create:xi,scope:uV}=G("page"),Wo=xi($i(Ei));function Yo(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function xn(e){const n=t.unref(e),a=window.getComputedStyle(n,null),o=parseFloat(a.getPropertyValue("padding-left")),l=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-top")),s=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-s}}const Di=Symbol.for("InnerPageScopeKey"),cs={headerbar:{},radio:{},checkbox:{}};function Ii(e){Object.assign(cs,e)}function Dn(){return cs}const qi=(e,n,a,o=!1)=>({props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetTop:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},align:{type:[String],default:"center"},padding:{type:[Object],required:!1},leftShow:{type:[Boolean,String],required:!1,default:!0},leftIcon:{type:[Object],required:!1},leftText:{type:String,required:!1},titleShow:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},titleIcon:{type:[Object],required:!1},rightShow:{type:[String,Boolean],required:!1,default:!0},rightIcon:{type:[Object],required:!1},rightText:{type:String,required:!1,default:""}},emits:["back","click-title","click-right","click-right-text"],setup(l,r){const s=je(),i=s?Tn(s):null,c=t.inject(Di,!1),f=Dn(),p=e,u=t.computed(()=>{const x={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(x[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),x}),h=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),k=l.height!==null&&l.height!==void 0?ce(l.height):null,y=t.computed(()=>{const x={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const M=ze(l.padding??i.headerPadding);return Object.assign(x,M),k&&(i.headerHeight=k),i.headerHeight>0&&(x.height=i.headerHeight),x.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,x.safeAreaTop>0&&(x.top=x.safeAreaTop+(M.top??0),x.height&&x.height>0&&(x.height=x.height+x.safeAreaTop)),x}if(k&&(x.height=k),l.padding){const M=ze(l.padding);Object.assign(x,M)}return x}),v=t.ref(null),b=()=>{if(i&&v.value&&!Nn(v.value)){if(!o){const x=Yo(v.value);i.headerAllHeight=x.height}return i.headerMounted=!0,!0}return!1};let d=null;t.onMounted(()=>{i&&(Ho(b,50,5,50,!0),window.ResizeObserver&&v.value&&(d=new window.ResizeObserver(()=>{b()}),d.observe(v.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,d&&(d.disconnect(),d=null))});const m=t.computed(()=>{const x={};return y.value.height!==null&&y.value.height!==void 0&&(x.height=`${y.value.height}px`),y.value.top!==null&&y.value.top!==void 0&&(x.paddingTop=`${y.value.top}px`),y.value.left!==null&&y.value.left!==void 0&&(x.paddingLeft=`${y.value.left}px`),y.value.right!==null&&y.value.right!==void 0&&(x.paddingRight=`${y.value.right}px`),y.value.bottom!==null&&y.value.bottom!==void 0&&(x.paddingBottom=`${y.value.bottom}px`),x}),g=t.computed(()=>!(y.value.height!==null&&y.value.height!==void 0&&y.value.height<=0));function S(){r.emit("back")}function N(){r.emit("click-title")}function C(){r.emit("click-right")}function w(){r.emit("click-right-text")}const B=()=>{if(!l.leftShow)return null;const x=[];if(r.slots.left)x.push(r.slots.left());else{if(r.slots.leftIcon){const M=t.h("view",{class:"left-icon",onClick:S},[r.slots.leftIcon()]);x.push(M)}else{const M=l.leftIcon??f.headerbar.Left??a,$=t.h("view",{class:"left-icon",onClick:S},[t.h(M)]);x.push($)}if(l.leftText){const M=t.h("view",{class:"left-text",onClick:S},[l.leftText]);x.push(M)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__left"},x)},V=()=>{if(!l.rightShow)return null;const x=[];if(r.slots.right)x.push(r.slots.right());else{if(l.rightText){const M=t.h("view",{class:"right-text",onClick:w},[l.rightText]);x.push(M)}if(r.slots.rightIcon){const M=t.h("view",{class:"right-icon",onClick:C},[r.slots.rightIcon()]);x.push(M)}else if(l.rightIcon){const M=t.h("view",{class:"right-icon",onClick:C},[t.h(l.rightIcon)]);x.push(M)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__right"},x)},T=()=>{if(!l.titleShow)return null;const x=[],M=r.slots.default?r.slots.default():null;if(M)x.push(M);else{if(l.title){const $=t.h("view",{class:"title-text"},[l.title]);x.push($)}if(r.slots.titleIcon){const $=t.h("view",{class:"title-icon",onClick:N},[r.slots.titleIcon()]);x.push($)}else if(l.titleIcon){const $=t.h("view",{class:"title-icon",onClick:N},[t.h(l.titleIcon)]);x.push($)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__title"},x)},A=()=>{const x=[],M=r.slots.bottom?r.slots.bottom():null;return M&&x.push(M),x.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},x)};return()=>{if(!g.value)return null;const x=[];if(r.slots.all)x.push(r.slots.all());else{const $=[],E=B();E&&$.push(E);const F=T();F&&$.push(F);const I=V();if(I&&$.push(I),$.length>0){const U=t.h("view",{class:h.value},$);x.push(U)}const j=A();j&&x.push(j)}if(x.length===0)return null;const M={class:u.value,style:m.value,ref:v};return t.h("view",M,x)}}}),{componentName:Mi,create:Pi,scope:Li}=G("header-bar"),Xo=Pi(qi(Mi,Li,ne.Left,!1)),zi=Symbol.for("InnerPageScopeKey");function Fi(e,n,a=!1){return{props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetBottom:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},padding:{type:[Object],required:!1},align:{type:String,required:!1,default:"center"}},setup(o,l){const r=je(),s=r?Tn(r):null,i=t.inject(zi,!1),c=e,f=t.computed(()=>{const b={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(b[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),b}),p=o.height!==null&&o.height!==void 0?ce(o.height):null,u=t.computed(()=>{const b={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const d=ze(o.padding??s.footerPadding);return Object.assign(b,d),p&&(s.footerHeight=p),s.footerHeight>0&&(b.height=s.footerHeight),b.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,b.safeAreaBottom>0&&(b.bottom=b.safeAreaBottom+(d.bottom??0),b.height&&b.height>0&&(b.height=b.height+b.safeAreaBottom)),b}if(p&&(b.height=p),o.padding){const d=ze(o.padding);Object.assign(b,d)}return b}),h=t.ref(null),k=()=>{if(s&&h.value&&!Nn(h.value)){if(!a){const b=Yo(h.value);s.footerAllHeight=b.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(Ho(k,50,5,50,!0),window.ResizeObserver&&(y=new window.ResizeObserver(()=>{k()}),y.observe(h.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,y&&(y.disconnect(),y=null))});const v=t.computed(()=>{const b={};return u.value.height!==null&&u.value.height!==void 0&&(b.height=ge(u.value.height)),u.value.top!==null&&u.value.top!==void 0&&(b.paddingTop=ge(u.value.top)),u.value.left!==null&&u.value.left!==void 0&&(b.paddingLeft=ge(u.value.left)),u.value.right!==null&&u.value.right!==void 0&&(b.paddingRight=ge(u.value.right)),u.value.bottom!==null&&u.value.bottom!==void 0&&(b.paddingBottom=ge(u.value.bottom)),b});return()=>{const b=l.slots.default?l.slots.default():[],d={ref:h,class:f.value,style:v.value};return t.h("view",d,b)}}}}const{componentName:Ri,create:Oi,scope:Ki}=G("footer-bar"),Qo=Oi(Fi(Ri,Ki,!1));function Ui(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?Tn(o):null,s=t.computed(()=>{const f={};if(o&&r){if(a.padding){const d=ze(a.padding);Object.assign(r.contentPadding,d)}const p=$n(o,r),u=En(o,r);let h="";r.contentHeight?h=`${r.contentHeight}`:h=`${r.height}px`,console.debug("[content]page height:",h),console.debug("[content]header height:",p),console.debug("[content]footer height:",u),console.debug("[content]padding:",r.contentPadding),f.height=h;let k=(r&&r.contentPadding&&r.contentPadding.top)??-1;(k>=0||p>0)&&(k=k<0?0:k,f.paddingTop=`${p+k}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||u>0)&&(y=y<0?0:y,f.paddingBottom=`${u+y}px`);const v=(r&&r.contentPadding&&r.contentPadding.left)??-1;v>=0&&(f.paddingLeft=`${v}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(f.paddingRight=`${b}px`),f}if(a.padding){const p=ze(a.padding);p.left&&(f.paddingLeft=`${p.left}px`),p.top&&(f.paddingTop=`${p.top}px`),p.right&&(f.paddingRight=`${p.right}px`),p.bottom&&(f.paddingBottom=`${p.bottom}px`)}return f}),i=t.ref(null),c=yt(()=>{if(r&&i.value){const f=xn(i.value);r.contentInnerHeight=f.height,r.contentInnerWidth=f.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>s.value,()=>l.value],([])=>{c()}),{contentRef:i,classes:l,styles:s}}}}const{componentName:Hi,create:ji,scope:dV}=G("content"),Wi=ji(Ui(Hi));function Yi(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{ref:"contentRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const te=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Go=te(Wi,[["render",Yi]]),vt="GroupStateKey",us=Symbol.for("GroupScopeKey");function In(){return t.inject(us,!1)}function qn(e=!0){t.provide(us,e)}function Xi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Mr(l)||(e[o]=l)})}function Qi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Xi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(vt,r),r}function io(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(vt);if(!c)return;const f=e.get("groupLayout")??{};a===-1&&(a=f.column??1),o===-1&&(o=f.gutter??0),r||(r=f.minItemWidth??-1),s||(s=f.maxItemWidth??-1);const p=ce(r),u=ce(s);i||(i=f.type??"grid");const h=()=>{const k=n===""||n===-1,y=ce(n);let v=fe(a);const b=ce(o);if(!k){let g=(y-(v-1)*b)/v;for(;u!==-1&&g>u;)v++,g=(y-(v-1)*b)/v;for(;p!==-1&&v>1&&g<p;)v--,g=(y-(v-1)*b)/v}let d=!1;const m=c.layout;m.value.width=n,m.value.column!==v&&(m.value.column=v,d=!0),m.value.gutter!==b&&(m.value.gutter=b,d=!0),m.value.type!==i&&(m.value.type=i,d=!0),d&&t.triggerRef(m)};if(l)h();else{const k=++c.passport;setTimeout(()=>{k===c.passport&&h()},50)}}function Mn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.layout}function Pn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.order}function Ua(e,n=1){if(n==="stretch")return-1;const a=fe(n);return a===-1?100:100*a/e}function Ln(e,n,a=1,o=0,l){const r={};let s=0;l?s=ce(l):s=Ua(n.column,a),s>0&&(r.width=`${s}%`);const i=Ua(n.column,o);i>0&&(r["margin-left"]=`${i}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function zn(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,f=c+(n.column-c);return e.index=e.index+(f-c),{"grid-column":`${c+1} / -1`}}let l=fe(a);if(l===-1){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}if(l>n.column){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}const r=fe(o)%n.column;let s=(e.index+r)%n.column,i=s+l;return i>n.column?(s=0,i=s+l,e.index=e.index+(n.column-s)+l):e.index=e.index+r+l,r>0?{"grid-column":`${s+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const ds=Symbol("RollingStateKey");function Gi(e){t.provide(ds,e)}function Zi(){return t.inject(ds,null)}function Ao(e){let n=0;const a=window.getComputedStyle(e,null);if(a.getPropertyValue("box-sizing")==="content-box"){const l=parseFloat(a.getPropertyValue("padding-top")),r=parseFloat(a.getPropertyValue("padding-bottom"));n=e.clientHeight-l-r}else n=e.offsetHeight;return n}function Ji(e){let n=Ao(e);if(n<=0){const a=e.cloneNode(!0),o=e.offsetWidth;a.style=`width: ${o}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(a),n=Ao(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function _i(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const ec={...me,...rs,...ss};function tc(e,n,a){return{props:ec,emits:["update:collapse","header-click"],setup(o,l){const r=jo(o.name,o,is),s=Qi(r,{type:o.type}),i=In();qn(!0);const c=o.rollingDisplay?Zi():null,f=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),u=t.computed(()=>i&&r?Mn(r,!0).value:null),h=t.getCurrentInstance(),k=(K,H=!1)=>{const X=h?.proxy;X&&typeof X.setNameValidateRules=="function"&&X.setNameValidateRules(K,!0,H)};t.watch([()=>o.rules,()=>o.pureDataRules],([K,H],[X,R])=>{if(K&&X){const Q=t.toRaw(X),ee=t.toRaw(K),ae=ee?Reflect.ownKeys(ee):[];(Q?Reflect.ownKeys(Q):[]).forEach(pe=>{ae.includes(pe)||(ee[pe]=[])}),k(ee)}if(H&&R){const Q=t.toRaw(R),ee=t.toRaw(H),ae=ee?Reflect.ownKeys(ee):[];(Q?Reflect.ownKeys(Q):[]).forEach(pe=>{ae.includes(pe)||(ee[pe]=[])}),k(ee,!0)}},{deep:!0});const y=e,v=t.computed(()=>{const K={};if(K.height=E.value,o.width)o.width!=="auto"&&(K.width=ge(o.width));else{const H=i?Pn(r,!0):null;if(u.value&&H){if(u.value.type==="grid"){const X=zn(H,u.value,o.span,o.offset);Object.assign(K,X)}else if(u.value.type==="flow"){const X=Ln(H,u.value,o.span,o.offset,o.width);Object.assign(K,X)}}}return K}),b=t.computed(()=>{const K=s.layout.value.type;return K==="grid"||K==="flow"?{[`${y}--${K}`]:!0,[`${y}--${K}-justify-${o.justify}`]:!0,[`${y}--${K}-align-${o.align}`]:!0,[`${y}--gutter`]:!0}:{[`${y}--${K}`]:!0,[`${y}--gutter`]:!0}}),d=t.computed(()=>{if(s.layout.value.type==="grid"){let H="";if(o.columnWidth)H=`repeat(auto-fill, ${o.columnWidth})`;else{const X=_i(B.value,s.layout.value.column,s.layout.value.gutter);H=`repeat(${s.layout.value.column}, ${X})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":H}}}),m=t.toRef(o,"gutter"),g=t.toRef(o,"column"),S=t.computed(()=>i||p.value?!0:he(o.isWrap)),N=[],C=K=>{N.push(K)},w=()=>{let K=N.length;N.splice(0,K)},B=t.ref(-1),V=K=>{const H=xn(K).width;H>0&&H!==B.value&&(B.value=H)};io(r,B.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([B,g,m],([K,H,X])=>{s.order.index=0,io(r,K,H,X,!1,o.minItemWidth,o.maxItemWidth,o.type)});const T=t.computed(()=>F.value?o.expandText??"":o.collapseText??""),A=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),x=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!F.value,"is-collapse":F.value})),M=t.ref(),$=t.ref(),E=t.computed(()=>I.value||ge(o.height)||""),F=t.ref(!1),I=t.ref(""),j=t.ref(!1);let U=-1;const Z=(K,H=!0)=>{const X=M.value;if(X&&F.value!==K){if(U=U<=0?Ji(X):U,j.value=!0,H)if(X.style["will-change"]="height",X.ontransitionend=function(){X.ontransitionend=null,this.style["will-change"]="auto",K||(I.value="",j.value=!1)},K){let R=0;o.collapseHeight?R=o.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(R=$.value.offsetHeight),I.value=`${U}px`,t.nextTick(()=>{I.value=`${R}px`})}else I.value=`${U}px`;else if(K){let R=0;o.collapseHeight?R=o.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(R=$.value.offsetHeight),I.value=`${R}px`}else j.value=!1,I.value=`${U}px`;F.value=K,l.emit("update:collapse",K)}};t.watch(()=>o.collapse,K=>{Z(K)});const _=K=>{l.emit("header-click",K)},W=()=>{q()},q=K=>{K=K??!F.value,Z(K)};De({toggleCollapse:q,doLayout:()=>{N[0]&&(V(N[0]),io(r,B.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let D=null,z=!0;const P=K=>{if(o.rules){const H=t.toRaw(o.rules);k(H)}if(o.pureDataRules){const H=t.toRaw(o.pureDataRules);k(H,!0)}if(it&&(K&&Z(he(o.collapse),!1),o.autoLayout&&Array.isArray(N)&&N.length>0)){const H=N[0];V(H),window.ResizeObserver&&(D=new window.ResizeObserver(()=>{V(H)}),D.observe(H))}},O=()=>{D?.disconnect(),D=null},Y=!p.value||c?.acquire();Y&&(f.value=p.value?!0:null),t.onMounted(()=>{if(Y&&(P(z),z=!1),p.value&&c){let K=null,H=c.initialHeight;c.observe(M.value,X=>{if(X!==f.value)if(X)f.value=!0,F.value||(I.value=""),K=setTimeout(()=>{K=null,f.value!==!1&&(P(z),z=!1)},100);else{if(K!==null&&clearTimeout(K),f.value=!1,!F.value)if(z)I.value=c.initialHeight;else{let R=Ao(M.value);R<=0?I.value=H:(I.value=`${R}px`,H=I.value)}z||O()}})}}),t.onUnmounted(()=>{D?.disconnect(),c&&c.unobserve(M.value)});const J=(K="right")=>{const H=[];if(T.value){const ee={class:A.value},ae=t.h("span",ee,[T.value]);H.push(ae)}const X={class:x.value},R=o.collapseIcon??a,Q=t.h(R,X);return H.push(Q),H.length>0?t.h("div",{class:{[`${y}__header-collapse`]:!0,[`is-${K}`]:!0},onClick:W},H):null},oe=(K,H,X,R)=>{const Q={...b.value};return H===0&&(Q[`${y}__first`]=!0),X>=R-1&&(Q[`${y}__last`]=!0),t.h("div",{ref:C,key:`${H}`,class:Q,style:d.value},K)};return()=>{if(p.value&&f.value!==!0){const Q=o.tag||"div";return t.h(Q,{ref:M,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:v.value},[])}s.order.index=0;const K=[];let H=0;if(l.slots.header){const Q={key:`${H++}`,ref:$,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:_},ee=t.h("div",Q,[l.slots.header()]);K.push(ee)}else{const Q=[],ee=o.collapsePosition==="left";if(ee&&o.showCollapse){const ae=J("left");ae&&Q.push(ae)}if(o.title||l.slots.title){if(o.showMark){const ae={class:{[`${y}__header-mark`]:!0}};o.markColor&&(ae.style={background:o.markColor});const re=t.h("div",ae);Q.push(re)}if(l.slots.title){const ae=t.h("div",{class:{[`${y}__header-title`]:!0}},[l.slots.title()]);Q.push(ae)}else if(o.title){const ae=t.h("div",{class:{[`${y}__header-title`]:!0}},[o.title]);Q.push(ae)}}if(l.slots.toolbar&&Q.push(l.slots.toolbar()),!ee&&o.showCollapse){const ae=J("right");ae&&Q.push(ae)}if(Q.length>0){const ae={key:`${H++}`,ref:$,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:_},re=t.h("div",ae,Q);K.push(re)}}w();const X=l.slots.default?l.slots.default():[],R=s.layout.value.type;if(R==="grid"){const Q=oe(X,H++,0,X.length);K.push(Q)}else if(R==="flow"){const Q=oe(X,H++,0,X.length);K.push(Q)}else for(let Q=0;Q<X.length;Q++){const ee=X[Q],ae=oe([ee],H++,Q,X.length);K.push(ae)}if(S.value){const Q=o.tag||"div";return t.h(Q,{ref:M,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:v.value},[K])}else return K}}}}const{componentName:nc,create:oc,scope:lc}=G("group"),Zo=oc(tc(nc,lc,ne.RectUp));function ac(e){return e===window}const rc=/matrix\((.+)\)/,fs=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(ac(n))return{x:0,y:0};let a=0,o=0,l=n;for(;l!==null;)a+=l.offsetLeft,o+=l.offsetTop,l=l.offsetParent;let r=0,s=0,i=0,c=0;for(l=n;l!==document;){s+=l.scrollTop,r+=l.scrollLeft;const{transform:f}=window.getComputedStyle(l);if(f){const p=rc.exec(f);if(p){let h=p[1].split(/\s*,\s*/);h.length==6&&(i+=Number(h[4]),c+=Number(h[5]))}}l=l.parentNode}return a-=r,o-=s,a+=i,o+=c,{x:a,y:o}};class sc{watchedListeners=[];add(n){this.watchedListeners.push(n)}remove(n){const a=this.watchedListeners.indexOf(n);a!==-1&&this.watchedListeners.splice(a,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(n=>{try{n()}catch{}})}}class ic{monitorRegister=new WeakMap;watch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r||(r=new sc,o.addEventListener("scroll",r.listen),o===document.body&&o.addEventListener("resize",r.listen),this.monitorRegister.set(o,r)),r.add(a),o=o.parentNode}}unwatch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r&&(r.remove(a),r.size()===0&&(this.monitorRegister.delete(o),o.removeEventListener("scroll",r.listen),o===document.body&&o.removeEventListener("resize",r.listen))),o=o.parentNode}}}const Ha=new ic,ms={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"&yen;"},decimalLength:{type:[Number,String],required:!1,default:2},digits:{type:[Number,String],required:!1,default:3},separator:{type:String,required:!1,default:","},position:{type:String,default:"before"},size:{type:String,default:"large"}},{componentName:cc,create:uc}=G("price"),dc=uc({props:{...ms},setup(e){const n=t.computed(()=>({[cc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ve(e.price)==0?"":Sn(e.price,e.decimalLength,!0,fe(e.digits),e.separator)),l=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(0,i)}),r=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(i+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),fc=["innerHTML"],mc=["innerHTML"];function pc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.needSymbol&&e.position=="before"?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,fc)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--${e.size}`)},t.toDisplayString(e.intText),3),e.decimalText.length!=0?(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(`fox-price--decimal-${e.size}`)},".",2)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--decimal-${e.size}`)},t.toDisplayString(e.decimalText),3),e.needSymbol&&e.position=="after"?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,mc)):t.createCommentVNode("",!0)],2)}const Ge=te(dc,[["render",pc]]),{componentName:co,create:hc}=G("hint-text"),gc=hc({components:{Price:Ge},props:{...ms,type:{type:String,default:"number"},placement:{type:String,default:"top-start"},transition:{type:Boolean,default:!0},size:{type:String,default:"default"},arrowSize:{type:Number,default:6},showArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:20},offset:{type:Number,default:12},id:{type:String},reference:{type:Object},autoFit:{type:Boolean,default:!0},message:{type:String,default:""},visible:{type:Boolean,default:!0},unmount:{type:Function},customClass:{type:String},customStyle:{type:Object},customTextClass:{type:String},customTextStyle:{type:Object},closeOnClick:{type:Boolean},zIndex:{type:[String,Number]}},emits:["update:visible"],setup(e,n){const a=t.ref({top:null,right:null,bottom:null,left:null}),o=t.ref({x:0,y:0}),l=t.ref(0),r=t.ref(0),s=t.ref(e.placement),i=t.ref(!1),c=t.ref(null),f=(A,x,M,$,E,F)=>{const I=document.documentElement.clientWidth||document.body.clientWidth,j=document.documentElement.clientHeight||document.body.clientHeight,U=A.split("-");let Z=[];U[0]==="top"?Z=["top","bottom","right","left"]:U[0]==="bottom"?Z=["bottom","top","right","left"]:U[0]==="left"?Z=["left","top","bottom","right"]:U[0]==="right"&&(Z=["right","top","bottom","left"]);const _={top:null,right:null,bottom:null,left:null},W=[];for(let q=0;q<Z.length;q++){const L=Z[q];if(W[0]=L,U[1]&&(W[1]=U[1]),L==="top"){const D=x.y-F-e.arrowSize-e.offset;if(D>=0){_.top=D;let z=0;U[1]==="start"?z=x.x:U[1]==="end"?z=x.x+M-E:z=x.x+M/2-E/2;const P=I-z-E;P<0?(z+=P,u.value=-P):u.value=0,_.left=z<0?0:z;break}}else if(L==="bottom"){const D=x.y+$+e.arrowSize+e.offset;if(D+F<=j){_.top=D;let z=0;U[1]==="start"?z=x.x:U[1]==="end"?z=x.x+M-E:z=x.x+M/2-E/2;const P=I-z-E;P<0?(z+=P,u.value=-P):u.value=0,_.left=z<0?0:z;break}}else if(L==="left"){const D=x.x-E-e.arrowSize-e.offset;if(D>=0){_.left=D;let z=0;U[1]==="start"?z=x.y:U[1]==="end"?z=x.y+$-F:z=x.y+$/2-F/2,_.top=z<0?0:z;break}}else if(L==="right"){const D=x.x+M+e.arrowSize+e.offset;if(D+E<=I){_.left=D;let z=0;U[1]==="start"?z=x.y:U[1]==="end"?z=x.y+$-F:z=x.y+$/2-F/2,_.top=z<0?0:z;break}}}return{bestPlacement:W.join("-"),bestInsetRect:_}},p=(A,x,M=10)=>{if(!it||x===!1||!A)return;o.value=fs(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const $=c.value.offsetHeight,E=c.value.offsetWidth,{bestPlacement:F,bestInsetRect:I}=f(e.placement,o.value,l.value,r.value,E,$);s.value=F,a.value=I,i.value=!0},u=t.ref(0),h=yt(()=>{p(e.message,e.visible)},10),k=t.ref(e.visible);t.watch(()=>e.visible,A=>{k.value=A});const y=t.computed(()=>k.value&&v.value),v=t.ref(!0),b=yt(A=>{const x=A[0];x&&(v.value=x.isIntersecting)},10),d=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([A,x])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Ha.watch(e.reference,h),d.observe(e.reference)}),t.onBeforeMount(()=>{Ha.unwatch(e.reference,h),d.unobserve(e.reference),d.disconnect()});const m=t.computed(()=>{const A={[co]:!0};return s.value.startsWith("top")?A["is-top"]=!0:s.value.startsWith("right")?A["is-right"]=!0:s.value.startsWith("bottom")?A["is-bottom"]=!0:s.value.startsWith("right")&&(A["is-right"]=!0),e.size==="small"?A["is-small"]=!0:e.size==="large"&&(A["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(A[`${e.customClass}`]=!0),A}),g=t.computed(()=>{const A={};a.value.top!==null&&(A.top=`${a.value.top}px`),a.value.right!==null&&(A.right=`${a.value.right}px`),a.value.bottom!==null&&(A.bottom=`${a.value.bottom}px`),a.value.left!==null&&(A.left=`${a.value.left}px`),e.autoFit&&(A["min-width"]=`${l.value}px`);const x=document.documentElement.clientWidth||document.body.clientWidth;return A["max-width"]=`${x}px`,i.value&&(A.opacity="1"),e.transition||(A.transition="none"),e.zIndex&&(A["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(A,e.customStyle),A}),S=t.computed(()=>{const A=[`${co}__content`];return e.customTextClass&&A.push(e.customTextClass),A}),N=t.computed(()=>{const A={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(A,e.customTextStyle),A}),C=t.computed(()=>({[`${co}__arrow`]:!0})),w=t.computed(()=>{const A={};return e.showArrow?(A.width=`${e.arrowSize}px`,A.height=`${e.arrowSize}px`,s.value==="top"?(A.left="50%",A.bottom=`-${e.arrowSize}px`,A.transform=" translate(-50%, 0%)"):s.value==="top-start"?(A.left=`${e.arrowOffset+u.value}px`,A.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(A.right=`${e.arrowOffset-u.value}px`,A.bottom=`-${e.arrowSize}px`):s.value==="right"?(A.left=`-${e.arrowSize}px`,A.top="50%",A.transform=" translate(0%, -50%)"):s.value==="right-start"?(A.left=`-${e.arrowSize}px`,A.top=`${e.arrowOffset}px`):s.value==="right-end"?(A.left=`-${e.arrowSize}px`,A.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(A.left="50%",A.top=`-${e.arrowSize}px`,A.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(A.left=`${e.arrowOffset+u.value}px`,A.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(A.right=`${e.arrowOffset-u.value}px`,A.top=`-${e.arrowSize}px`):s.value==="left"?(A.right=`-${e.arrowSize}px`,A.top="50%",A.transform=" translate(0%, -50%)"):s.value==="left-start"?(A.right=`-${e.arrowSize}px`,A.top=`${e.arrowOffset}px`):s.value==="left-end"&&(A.right=`-${e.arrowSize}px`,A.bottom=`-${e.arrowOffset}px`),A):{display:"none"}}),B=t.computed(()=>y.value&&e.closeOnClick),V=t.computed(()=>{const A={};return e.zIndex&&(A["z-index"]=`${e.zIndex}`),A});return{show:y,tipRef:c,classes:m,styles:g,textClasses:S,textStyles:N,arrowClasses:C,arrowStyles:w,overlayShow:B,overlayStyle:V,onClickOverlay:()=>{k.value=!1,n.emit("update:visible",!1)}}}}),yc=["innerHTML"];function vc(e,n,a,o,l,r){const s=t.resolveComponent("Price");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.overlayShow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fox-hint-text__overlay",style:t.normalizeStyle(e.overlayStyle),onClick:n[0]||(n[0]=(...i)=>e.onClickOverlay&&e.onClickOverlay(...i))},null,4)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{ref:"tipRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.createElementVNode("div",{class:t.normalizeClass(e.textClasses),style:t.normalizeStyle(e.textStyles)},[e.type=="number"?(t.openBlock(),t.createBlock(s,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:e.message},null,8,yc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const ps=te(gc,[["render",vc]]);class Fn{seed=new Date().getTime();constructor(n){this.seed=n??new Date().getTime()}get(){let n=this.seed++;return this.seed<0&&(this.seed=0),n}}const To={},bc=new Fn,ht=new Map,bn=e=>{if(e){const n=document.getElementById(e);ht.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of ht.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}ht.clear()}},kc=e=>{e.unmount=bn;const n=document.getElementById(e.id);if(n){const a=ht.get(e.id);a?e={...To,...a,...e}:e={...To,...e},e.transition=!1;const o=t.createVNode(ps,e);return t.render(o,n),e.id}},Sc=e=>{e.unmount=bn;let n=e.id??`hinttext_${bc.get()}`;e={...To,...e},e.id=n,ht.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(ps,e);return t.render(o,a),document.body.appendChild(a),n},Cc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},Vt={show(e,n,a={},o=!0){Cc(n);const l=a.id;return l&&ht.has(l)?kc({...a,message:n,reference:e}):(o&&bn(),Sc({...a,message:n,reference:e}))},hide(e){bn(e)},install(e){e.config.globalProperties.$hintText=Vt}};function wc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...me,...ye},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Be({componentName:e,validate:!1},s);const i=je(),c=In();qn(!1);const f=t.computed(()=>c&&i?Mn(i,!1).value:null),p=e,u=t.ref(null),h=t.computed(()=>{const R={[p]:!0,[`${p}__gutter`]:f.value&&f.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(R[l.errorMarkClass]=!!F.value,R[l.warnMarkClass]=!!$.value,R[l.infoMarkClass]=!!x.value,typeof u.value=="function"){const Q=u.value(s);R[Q]=!0}else if(typeof u.value=="string"){const Q=u.value;R[Q]=!0}return R}),k=t.ref(null),y=t.computed(()=>{const R={};if(l.width)l.width!=="auto"&&(R.width=ge(l.width));else{const Q=c&&i?Pn(i,!1):null;if(f.value&&Q){if(f.value.type==="grid"){const ee=zn(Q,f.value,l.span,l.offset);Object.assign(R,ee)}else if(f.value.type==="flow"){const ee=Ln(Q,f.value,l.span,l.offset,l.width);Object.assign(R,ee)}}}if(typeof k.value=="function"){const Q=k.value(s);Q&&Object.assign(R,Q)}else if(k.value&&typeof k.value=="object"){const Q=k.value;Object.assign(R,Q)}return R}),v=t.ref(null),b=t.computed({get:()=>v.value??he(l.isRequired),set:R=>{v.value=R}}),d=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",yn.Near),g=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),S=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),N=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),C=Ve(t.toRef(l,"labelWidth"),"labelWidth",yn.Near),w=t.computed(()=>C&&C.value?{width:ge(C.value)}:{}),B=t.computed(()=>({"label--string":!0,"label--required":b.value})),V=t.computed(()=>({content:!0,[l.contentClass]:!0})),T=t.computed(()=>({...l.contentStyle})),A=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});De({setRequired(R){b.value=R},setErrorTip(R){A.errorTip=R},setErrorIcon(R){A.errorIcon=R},setWarnTip(R){A.warnTip=R},setWarnIcon(R){A.warnIcon=R},setInfoTip(R){A.infoTip=R},setInfoIcon(R){A.infoIcon=R},setCustomClassName(R){u.value=R},setCustomStyle(R){k.value=R}});const x=t.computed(()=>l.infoTip||A.infoTip),M=t.computed(()=>l.infoIcon||A.infoIcon),$=t.computed(()=>l.warnTip||A.warnTip),E=t.computed(()=>l.warnIcon||A.warnIcon),F=t.computed(()=>l.errorTip||A.errorTip),I=t.computed(()=>l.errorIcon||A.errorIcon),j=t.computed(()=>F.value?"error":$.value?"warn":x.value?"info":""),U=()=>j.value.length>0,Z=t.computed(()=>j.value==="error"?F.value:j.value==="warn"?$.value:j.value==="info"?x.value:""),_=t.computed(()=>j.value==="error"?I.value:j.value==="warn"?E.value:j.value==="info"?M.value:null),W=t.computed(()=>{const R={[`${p}__tip`]:!0,[`${p}__tip--${j.value}`]:!0,[`${p}--animate`]:!0};return j.value==="error"&&l.errorClass?R[`${l.errorClass}`]=!0:j.value==="warn"&&l.warnClass?R[`${l.warnClass}`]=!0:j.value==="info"&&l.infoClass&&(R[`${l.infoClass}`]=!0),R}),q=t.computed(()=>{const R={};return m&&m.value==="top"||!d()?R["padding-left"]="0px":C&&C.value&&(R["padding-left"]=ge(C.value)),R}),L=t.ref();let D="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([R,Q,ee,ae])=>{L.value&&(R&&!ue(Q)?D?a.show(L.value,Q,{...ae,id:D,type:ee},!0):D=a.show(L.value,Q,{...ae,type:ee},!0):a.hide(D))});let z=null;const P=()=>{z||!L.value||(z=new IntersectionObserver(R=>{let Q=!1;for(let ee of R)if(ee.intersectionRatio>0){Q=!0,Q&&r.emit("appear",ee);break}Q||r.emit("disappear")}),z.observe(L.value))},O=()=>{!z||!L.value||(z.unobserve(L.value),z=null)};t.watch(()=>he(l.appearListen),R=>{R?P():O()}),t.onMounted(()=>{he(l.appearListen)&&P()}),t.onUnmounted(O);const Y=()=>{if(!d())return null;const R=[],Q=r.slots?.label?.()??l.label,ee={class:B.value},ae=t.h("div",ee,[Q]);if(R.push(ae),r.slots.fixedPreTip){const pe=r.slots.fixedPreTip();R.push(pe)}const re={class:N.value,style:w.value};return t.h("div",re,R)},J=()=>{const R=[];if(r.slots.prepend){const ee=r.slots.prepend();R.push(ee)}if(r.slots.default){const ee=r.slots.default();R.push(ee)}if(r.slots.append){const ee=r.slots.append();R.push(ee)}if(r.slots.fixedTip){const ee={class:[`${p}__fixed-tip`]},ae=t.h("div",ee,[r.slots.fixedTip()]);R.push(ae)}const Q={ref:L,class:V.value,style:T.value};return t.h("div",Q,R)},oe=()=>{const R=_.value;return R?typeof R=="function"?t.h("div",{class:"fox-item__tip--icon"},[R()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(R)]):null},K=()=>{const R=Z.value;return R?typeof R=="function"?t.h("div",{class:"fox-item__tip--text"},[R()]):t.h("div",{class:"fox-item__tip--text"},[R]):null},H=()=>{if(!U())return null;const R=[],Q=oe();Q&&R.push(Q);const ee=K();ee&&R.push(ee);const ae={class:W.value,style:q.value};return t.h("div",ae,R)},X=()=>r.slots?.hide?.()??null;return()=>{const R=[],Q=[],ee=Y();ee&&Q.push(ee);const ae=J();ae&&Q.push(ae);const re={class:S.value},pe=t.h("div",re,Q);R.push(pe);const ke=H();ke&&R.push(ke);const Oe=X();Oe&&R.push(Oe);const no={class:h.value,style:y.value,prop:l.prop};return t.h("div",no,R)}}}}const{componentName:Nc,create:Bc,scope:Vc}=G("item"),we=Bc(wc(Nc,Vc,Vt,!1));function Ac(e,n){return{props:{span:{type:[Number,String],required:!1,default:-1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1},align:{type:[String],required:!1,default:"center"},contentClass:{type:[String],required:!1},contentStyle:{type:[Object]},divide:{type:[Boolean,String],required:!1,default:!1}},setup(a,o){const l=e,r=t.computed(()=>({[l]:!0,[`${l}__stretch`]:a.span==="stretch",[`${l}__${a.align}`]:!0})),s=je(),i=In();qn(!1);const c=t.computed(()=>{const f={};if(a.width)a.width!=="auto"&&(f.width=ge(a.width));else if(i&&s){const p=Mn(s,!1),u=Pn(s,!1);if(p.value&&u){if(p.value.type==="grid"){const h=zn(u,p.value,a.span,a.offset);Object.assign(f,h)}else if(p.value.type==="flow"){const h=Ln(u,p.value,a.span,a.offset,a.width);Object.assign(f,h)}}}return f});return()=>{const f=[];if(o.slots.default){const u=o.slots.default();if(a.divide)for(let h=0;h<u.length;h++){if(h>0){const k=t.h("div",{class:{[`${l}__divide`]:!0}});f.push(k)}f.push(u[h])}else Reflect.apply([].push,f,u)}const p={class:r.value,style:c.value};return t.h("div",p,f)}}}}const{componentName:Tc,create:$c,scope:fV}=G("row-item"),Jo=$c(Ac(Tc));function Ec(e,n){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1}},setup(a,o){const l=je(),r=In();qn(!1);const s=t.computed(()=>r&&l?Mn(l,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:a.span==="stretch"})),f=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const u=r&&l?Pn(l,!1):null;if(s.value&&u){if(s.value.type==="grid"){const h=zn(u,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Ln(u,s.value,a.span,a.offset,a.width);Object.assign(p,h)}}}return p});return()=>{const p={class:c.value,style:f.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:xc,create:Dc,scope:mV}=G("slot-item"),_o=Dc(Ec(xc)),ja={type:{type:String,default:"text"},modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Ic(e,n,a,o){return{props:{...me,...ye,...ja},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=se.useFoxI18n(n),p=f(l,["placeholder"]),u=t.ref(!1),h=Ie(l,"modelValue",null,c),k=e,y=t.computed(()=>({[k]:!0,"is-disabled":s.value,"is-readonly":i.value})),v=Ve(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const E={};return v.value&&(E["text-align"]=v.value),E}),d=E=>{let I=E.target.value;l.type==="digit"&&(I=wo(I,!0)),l.type==="number"&&(I=wo(I,!1)),l.maxLength&&I.length>Number(l.maxLength)&&(I=I.slice(0,Number(l.maxLength))),h.value=I,c("update:modelValue",I,E),c("change",I,E)};let m=Ie(l,"hintText"),g=t.ref(!1);const S=E=>{let I=E.target.value;u.value=!0,ue(m.value)||(g.value=!0),c("focus",I,E)},N=E=>{setTimeout(()=>{g.value&&(g.value=!1),u.value=!1},0);let I=E.target.value;l.maxLength&&I.length>Number(l.maxLength)&&(I=I.slice(0,Number(l.maxLength))),c("blur",I,E)},C=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),w=t.computed(()=>{const E={};return r.slots.append&&!B.value&&!M.value&&(E.display="none"),E}),B=t.computed(()=>ve(l.unit)>0),V=t.computed(()=>!M.value),T=t.computed(()=>({[`${k}__unit`]:!0,hidden:!V.value})),A=E=>{h.value="",c("update:modelValue","",E),c("change","",E),c("clear","")},x=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),M=t.computed(()=>{let E=ve(h.value)>0;return he(l.clearable)&&E&&u.value}),$=t.computed(()=>({action:!0,hidden:!M.value}));return()=>{const E={class:y.value,style:b.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:d,onFocus:S,onBlur:N},F=[],I=t.h("input",E);F.push(I);const j=[];if(x.value){const D={class:["action-icon"]},z=t.h(o,D),P={class:$.value,onClick:A},O=t.h("view",P,{default:()=>[z]});j.push(O)}if(B.value){const D=t.h("view",{class:T.value},[l.unit]);j.push(D)}const U={class:C.value,style:w.value},Z=t.h("view",U,{default:()=>j});F.push(Z);const _={default:()=>F};_.label=r.slots.default,_.prepend=r.slots.prepend,_.append=r.slots.append,_.fixedPreTip=r.slots.fixedPreTip,_.fixedTip=r.slots.fixedTip;const q={...Nt(l,ja),hintText:m.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,q,_)}}}}const{componentName:qc,create:Mc,scope:Pc}=G("input-item"),el=Mc(Ic(qc,Pc,we,ne.CircleClose));function Wa(e,n=0){let a=`${e}`,o=a.indexOf(".");if(o==-1)return a;let l=o;for(let r=a.length-1;r>=o;r--)if(a.charAt(r)!="0"){l=r;break}return l-o<n?l=o+n+1:l!=o&&(l+=1),l>a.length?a=a.padEnd(l,"0"):a=a.substring(0,l),a}function Ya(e,n,a=20){if(typeof n=="string"&&(n=fe(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=Dr(`${e}`,`${n}`);return Wa(o)}else{let o=Ko(`${e}`,Ir(`${n}`),20);return Wa(o)}}function Lc(e,n=-1,a=!1,o=3,l=","){return Sn(e,n,a,o,l)}function Xa(e,n,a,o,l=!0){if(e==="")return"";if(e=qr(e),n=fe(n),n==1)return e;if(o)e=Ya(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(fe(a)+2,"0"):e=Ko(e,1,fe(a)));else{let r=-1*n;e=Ya(e,r)}return e}function Qa(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=ko(e,n.min);if(o&&l==-1||!o&&(l==0||l==-1)){let r="请输入不小于 {0} 的数值";a.message=r.replace("{0}",n.min),a.minValid=!1}}if(n.max!=null){let o=he(n.maxInclude),l=ko(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Ga={clearable:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},showTip:{type:[Boolean,String],required:!1,default:!0},min:{type:[Number,String],required:!1},minInclude:{type:[Boolean,String],required:!1,default:!0},max:{type:[Number,String],required:!1},maxInclude:{type:[Boolean,String],required:!1,default:!0},unit:{type:String,required:!1},rates:{type:[Number,String],required:!1,default:1},precision:{type:[Number,String],required:!1},integerLength:{type:[Number,String],required:!1,default:-1},decimalLength:{type:[Number,String],required:!1,default:2},autoPadding:{type:Boolean,required:!1,default:!0},digits:{type:Number,required:!1,default:3},separator:{type:String,required:!1,default:","},placeholder:{type:String,required:!1},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function zc(e,n,a,o){return{props:{...me,...ye,...Ga},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=t.ref(!1),p=Ie(l,"modelValue",null,c),u=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([U,Z,_])=>{if(ue(U)){u.value="";return}const W=Xa(U,Z,_,!1);u.value!==W&&(u.value=W)},{immediate:!0});const h=t.computed(()=>{let U="";return f.value&&(U=u.value),U}),{t:k}=se.useFoxI18n(n),y=t.computed(()=>{let U=l.placeholder??"";return!f.value&&!ue(u.value)?U=Lc(u.value,l.decimalLength,l.autoPadding,l.digits,l.separator):U=ue(U)?k(["placeholder"]):U,U}),v=e,b=t.computed(()=>({[v]:!0,[`${v}__placeholder`]:u.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),d=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const U={};return d.value&&(U["text-align"]=d.value),U}),g=t.ref(""),S=t.computed(()=>{let U=g.value;return ue(U)&&(U=l.errorTip??""),U}),N=t.ref(""),C=t.ref(!1),w=U=>{let _=U.target.value;if(ue(_)){u.value="",p.value="",c("update:modelValue","",U),c("change","",U),he(l.showTip)&&C.value&&(C.value=!1);return}if(_.length>=2){let W=_;if(W.charAt(0)=="-"&&(W=W.substring(1)),W.length>=2&&W.charAt(0)=="0"&&W.charAt(1)!="."){t.triggerRef(u);return}}if(_!="-"){if(!Ur(_)){t.triggerRef(u);return}if(l.integerLength!=-1&&Hr(_)>Number(l.integerLength)){t.triggerRef(u);return}if(l.decimalLength&&l.decimalLength!=-1&&jr(_)>Number(l.decimalLength)){t.triggerRef(u);return}let W=Qa(_,l);if(W.maxValid===!1){g.value=W.message,t.triggerRef(u);return}}else if(l.min!=null&&fe(l.min)>=0){t.triggerRef(u);return}N.value=_,he(l.showTip)&&(C.value=_.length>0),u.value=_,p.value=Xa(_,l.rates,l.precision,!0),c("update:modelValue",p.value,U),c("change",p.value,U)},B=U=>{if(f.value=!0,he(l.showTip)){let Z=u.value;ue(Z)&&(Z=l.hintText),ue(Z)||(N.value=Z,C.value=!0)}g.value="",c("focus",p.value,U)},V=U=>{if(setTimeout(()=>{f.value=!1,he(l.showTip)&&C.value===!0&&(C.value=!1)},0),!ue(u.value)){let Z=Qa(u.value,l);if(Z.minValid===!1||Z.maxValid===!1){g.value=Z.message;return}}c("update:modelValue",p.value,U),c("blur",p.value,U)},T=t.computed(()=>({[`${v}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),A=t.computed(()=>{const U={};return r.slots.append&&!x.value&&!I.value&&(U.display="none"),U}),x=t.computed(()=>ve(l.unit)>0),M=t.computed(()=>!I.value),$=t.computed(()=>({[`${v}__unit`]:!0,hidden:!M.value})),E=U=>{p.value="",c("update:modelValue","",U),c("change","",U),c("clear","")},F=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),I=t.computed(()=>{let U=ve(p.value)>0;return he(l.clearable)&&U&&f.value}),j=t.computed(()=>({action:!0,hidden:!I.value}));return()=>{let U={class:b.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:y.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:w,onFocus:B,onBlur:V},Z=[],_=t.h("input",U);Z.push(_);let W=[];if(F.value){const Y={class:["action-icon"]},J=t.h(o,Y),oe={class:j.value,onClick:E},K=t.h("view",oe,{default:()=>[J]});W.push(K)}if(x.value){const Y=t.h("view",{class:$.value},[l.unit]);W.push(Y)}const q={class:T.value,style:A.value},L=t.h("view",q,{default:()=>W});Z.push(L);const D={default:()=>Z};D.label=r.slots.default,D.prepend=r.slots.prepend,D.append=r.slots.append,D.fixedPreTip=r.slots.fixedPreTip,D.fixedTip=r.slots.fixedTip;let P={...Nt(l,Ga),errorTip:S.value,hintText:N.value,hintVisible:C.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,P,D)}}}}const{componentName:Fc,create:Rc,scope:Oc}=G("money-item"),tl=Rc(zc(Fc,Oc,we,ne.CircleClose)),$o={modelValue:{type:[String,Number],default:""},textAlign:{type:String,default:""},limitShow:{type:Boolean,default:!1},maxLength:{type:[String,Number],default:""},rows:{type:[String,Number],default:"2"},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},autofocus:{type:Boolean,default:!1}},{componentName:Kc,create:Uc,scope:Hc}=G("textarea"),jc=Uc({props:{...$o},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=se.useFoxI18n(Hc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Kc;return{[h]:!0,[`${h}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(i)});const s=t.computed(()=>({textAlign:e.textAlign})),i=()=>{let h=l.value;h.style.height="auto";let k=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:y,minHeight:v}=e.autosize;y!==void 0&&(k=Math.min(k,y)),v!==void 0&&(k=Math.max(k,v))}k&&(h.style.height=k+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,k)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),n("update:modelValue",h,k),n("change",h,k)};return{...o,textareaRef:l,classes:r,styles:s,change:h=>{const k=h.target;c(k.value,h)},focus:h=>{e.disabled||e.readonly||n("focus",h)},blur:h=>{if(e.disabled||e.readonly)return;let y=h.target.value;c(y,h),n("blur",{value:y,event:h})}}}}),Wc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Yc={key:0,class:"fox-textarea__limit"};function Xc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("textarea",{ref:"textareaRef",class:"fox-textarea__textarea",style:t.normalizeStyle(e.styles),rows:e.rows,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[0]||(n[0]=(...s)=>e.change&&e.change(...s)),onBlur:n[1]||(n[1]=(...s)=>e.blur&&e.blur(...s)),onFocus:n[2]||(n[2]=(...s)=>e.focus&&e.focus(...s)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,Wc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Yc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Rn=te(jc,[["render",Xc]]);function Qc(e,n,a,o){return{props:{...me,...ye,...$o},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=Ie(l,"modelValue",null,c),p=v=>{f.value=v,c("update:modelValue",v,{}),c("change",v,{})};let u=Ie(l,"hintText"),h=t.ref(!1);const k=v=>{ue(u.value)||(h.value=!0),c("focus",f.value,v)},y=v=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",f.value,v)};return()=>{const b={...be(l,$o),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":p,onFocus:k,onBlur:y},d=[],m=t.h(o,b);d.push(m);const g={default:()=>d};g.label=r.slots.default,g.prepend=r.slots.prepend,g.append=r.slots.append,g.fixedPreTip=r.slots.fixedPreTip,g.fixedTip=r.slots.fixedTip;const S=be(l,ye,me);return t.h(a,{...S,prop:`${l.prop}_item`},g)}}}}const{componentName:Gc,create:Zc,scope:Jc}=G("textarea-item"),nl=Zc(Qc(Gc,Jc,we,Rn));function _c(e){return e===window}const xe=e=>{const n=t.unref(e);if(_c(n)){const a=n.innerWidth,o=n.innerHeight;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}return n&&n.getBoundingClientRect?n.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};let eu=2e3;const Za=()=>eu++,Fe={visible:{type:Boolean,default:!1},zIndex:{type:[String,Number]},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},position:{type:String,default:"center"},transition:{type:String,default:""},style:{type:Object,default:{}},popClass:{type:[String,Array],default:""},closeable:{type:Boolean,default:!1},closeIconPosition:{type:String,default:"top-right"},destroyOnClose:{type:Boolean,default:!0},teleport:{type:[String,Element],default:"body"},overlay:{type:Boolean,default:!0},round:{type:Boolean,default:!1},teleportDisable:{type:Boolean,default:!1},safeAreaInsetBottom:{type:Boolean,default:!1},overlayClass:{type:String,default:""},overlayStyle:{type:Object,default:{}}},tu=(e,n)=>({components:n,props:{...Fe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(a,{emit:o}){const l=t.reactive({zIndex:0,showSlot:!0,closed:a.closeable});a.visible&&(l.zIndex=Za());const r=t.computed(()=>{const v=e,b=[v,`${v}--${a.position}`];return a.round&&b.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&b.push(`${v}--${a.position}--safebottom`),typeof a.popClass=="string"?b.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(d=>{b.push(d)}),b}),s=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),i=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Za(),a.destroyOnClose&&(l.showSlot=!0),o("open")},f=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=v=>{o("click-pop",v)},u=v=>{v.stopPropagation(),o("click-close-icon",v),o("update:visible",!1)},h=v=>{o("click-overlay",v),a.closeOnClickOverlay&&o("update:visible",!1)},k=v=>{o("opend",v)},y=v=>{o("closed",v)};return t.watch(()=>a.visible,v=>{a.visible?c():f()}),t.watch(()=>a.closeable,v=>{l.closed=v}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:u,onClickOverlay:h,onOpened:k,onClosed:y}}});let xt=0;const Ja="fox-overflow-hidden",_a=()=>it?document.body:{classList:[]},nu=e=>[()=>{if(e())try{!xt&&_a().classList.add(Ja),xt++}catch{}},()=>{if(e()&&xt)try{xt--,!xt&&_a().classList.remove(Ja)}catch{}}],ou={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},overlayClass:{type:String,default:""},overlayStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}},{componentName:lu,create:au}=G("overlay"),ru=au({props:{...ou},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=nu(()=>e.lockScroll),l=t.computed(()=>({[lu]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,i=>{i?a():o()}),{classes:l,style:r,onClick:i=>{n("click",i),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function su(e,n,a,o,l,r){return t.openBlock(),t.createBlock(t.Transition,{name:"overlay-fade"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=t.withModifiers((...s)=>e.onClick&&e.onClick(...s),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const rt=te(ru,[["render",su]]),{componentName:iu,create:cu}=G("popup"),uu=cu(tu(iu,{FoxOverLay:rt,Close:ne.Close}));function du(e,n,a,o,l,r){const s=t.resolveComponent("FoxOverLay"),i=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,visible:e.visible,"close-on-click-overlay":e.closeOnClickOverlay,"z-index":e.zIndex,"lock-scroll":e.lockScroll,duration:e.duration,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,onClick:e.onClickOverlay},e.$attrs),null,16,["visible","close-on-click-overlay","z-index","lock-scroll","duration","overlay-class","overlay-style","onClick"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:e.transitionName,onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.popStyle),onClick:n[1]||(n[1]=(...c)=>e.onClick&&e.onClick(...c))},[e.showSlot?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0),e.closed?(t.openBlock(),t.createElementBlock("view",{key:1,onClick:n[0]||(n[0]=(...c)=>e.onClickCloseIcon&&e.onClickCloseIcon(...c)),class:t.normalizeClass(["fox-popup__close-icon","fox-popup__close-icon--"+e.closeIconPosition])},[t.renderSlot(e.$slots,"close-icon",{},()=>[t.createVNode(i)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const de=te(uu,[["render",du]]),er=10;function hs(e,n){return e>n&&e>er?"horizontal":n>e&&n>er?"vertical":""}function ol(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function ll(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},n=()=>e.direction==="vertical",a=()=>e.direction==="horizontal",o=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:s=>{if(s.touches){const f=s.touches[0];e.deltaX=f.clientX-e.startX,e.deltaY=f.clientY-e.startY,e.moveX=f.clientX,e.moveY=f.clientY}else{const c=s;e.deltaX=c.clientX-e.startX,e.deltaY=c.clientY-e.startY,e.moveX=c.clientX,e.moveY=c.clientY}e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=hs(e.offsetX,e.offsetY))},start:s=>{if(o(),s.touches){const f=s.touches[0];e.startX=f.clientX,e.startY=f.clientY}else{const c=s;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function _e(){const e=t.ref(0),n=t.ref(0),a=t.ref(0),o=t.ref(0),l=t.ref(0),r=t.ref(0),s=t.ref(0),i=t.ref(0),c=t.ref(0),f=t.ref(0),p=t.ref(""),u=()=>p.value==="vertical",h=()=>p.value==="horizontal",k=()=>{s.value=0,i.value=0,c.value=0,f.value=0,p.value="",a.value=0};return{move:b=>{if(b.touches){const g=b.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const m=b;s.value=m.clientX-e.value,i.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(s.value),f.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=hs(c.value,f.value))},start:b=>{if(k(),b.touches){const g=b.touches[0];e.value=g.clientX,n.value=g.clientY}else{const m=b;e.value=m.clientX,n.value=m.clientY}a.value=Date.now()},reset:k,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:f,direction:p,isVertical:u,isHorizontal:h}}const gs={readonly:{type:Boolean,default:!1},visibleItemCount:{type:[Number,String],default:7},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},childrenKey:{type:String,required:!1,default:"children"},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:360}},Eo={...Fe,...gs,modelValue:{type:[String,Number,Boolean,Object,Array],default:""},text:{type:[Array],default:[]},columnOptions:{type:[Object,Function]},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},title:{type:String},cancelText:{type:String},clearText:{type:String},confirmText:{type:String},isAutoBackFill:{type:[Boolean],default:!0}};let ys=36;function fu(){return ys}function mu(e){ys=e}function Le(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function xo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function pu(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function st(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function tr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let hu=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function gu(){const e=t.getCurrentInstance();return new hu(e.proxy)}function nr(e,n,a){const o=Le(e,n),l=Le(e,a);if(o!==l)return!1;const r=st(e,n),s=st(e,a);return r===s}function yu(e,n,a,o){if(a.length==0)return[];Array.isArray(n)||(n=[n]);const l=[],r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=n[s];let f=a[s].findIndex(p=>{if(r==="text")return Le(e,p)===i;if(r==="value"){let u=st(e,p);return u==null&&(u=Le(e,p)),u===i}else if(r==="item")return nr(e,p,i)});if(f==-1)break;l.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){const c=n[i];let f=s.findIndex(u=>{if(r==="text")return Le(e,u)===c;if(r==="value"){let h=st(e,u);return h==null&&(h=Le(e,u)),h===c}else if(r==="item")return nr(e,u,c)});if(f==-1)break;l.push(f);const p=xo(e,s[f]);if(!Array.isArray(p))break;s=p}}return l}function or(e,n,a,o){if(a.length==0)return null;const l={texts:[],values:[],items:[]},r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=a[s];let c=n[s];c<0&&c>=i.length&&(c=0);const f=i[c],p=Le(e,f);if(l.texts.push(p),l.items.push(f),r==="text")l.values.push(p);else if(r==="value"){let u=st(e,f);u==null&&(u=p),l.values.push(u)}else l.values.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){let c=n[i];c<0&&c>=s.length&&(c=0);const f=s[c],p=Object.assign({},f);p.children=null;const u=Le(e,f);if(l.texts.push(u),l.items.push(p),r==="text")l.values.push(u);else if(r==="value"){let h=st(e,f);h==null&&(h=u),l.values.push(h)}else l.values.push(p);if(!Array.isArray(f.children))break;s=f.children}}return l}function lr(e){return{text:e,value:e}}const vu=15,bu=300,ku=200,{create:Su}=G("picker-column");function Cu(e){e.stopPropagation()}function wu(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&Cu(e)}const Nu=Su({props:{source:{type:Array,default:[]},columnIndex:{type:Number,required:!0,default:0},modelValue:{type:Number,required:!0,default:0},itemHeight:{type:Number,required:!0,default:35},visible:{type:Boolean,default:!1},...gs},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${fe(e.visibleItemCount)*+e.itemHeight}px`})),l=t.computed(()=>({"fox-picker__content":!0,"fox-picker__content-tile":!e.threeDimensional,"fox-picker__content-roller":e.threeDimensional})),r=t.computed(()=>e.itemHeight*Math.floor(+e.visibleItemCount/2)),s=w=>w>=u.currIndex+8||w<=u.currIndex-8,i=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${u.deg})`,top:`${r.value}px`})),c=w=>`transform: rotate3d(1, 0, 0, ${-u.rotation*w}deg) translate3d(0px, 0px, 104px)`,f=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${u.scrollDistance+r.value}px, 0)`})),p=t.ref(null),u=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=w=>Le(e,w),k=w=>st(e,w),y=_e(),v=()=>{u.transitionEndTrigger&&(u.transitionEndTrigger(),u.transitionEndTrigger=null)},b=(w,B=!1,V=!1)=>{if(u.currIndex=w,B){const T=()=>{u.moving=!1,n("update:modelValue",w),n("change",w)};V?u.transitionEndTrigger=T:T()}},d=(w,B,V)=>{let T=w+u.startDistance;if(B==="end"){const A=-(e.source.length-1)*e.itemHeight;T<A&&(T=A),T>0&&(T=0);let x=Math.abs(Math.round(-T/e.itemHeight));const M=-x*e.itemHeight,$=`${(x+1)*u.rotation}deg`,E=V?V>0:!1;b(x,!0,E),m(M,B,V,$)}else{let A=(-T/e.itemHeight+1)*u.rotation;const x=(e.source.length+1)*u.rotation,M=0;if(A=Math.min(Math.max(A,M),x),e.threeDimensional&&(A<M||A>x))return;m(T,null,void 0,`${A}deg`)}},m=(w=0,B,V=ku,T)=>{B==="end"?u.scrollTime=V:u.scrollTime=0,u.deg=T,u.scrollDistance=w},g=(w,B)=>(w=Math.abs(w/B)/.003*(w<0?-1:1),w),S=w=>{e.readonly||(u.startDistance=u.scrollDistance,y.start(w),u.transitionEndTrigger=null)},N=w=>{e.readonly||(u.moving=!0,y.move(w),y.isVertical()&&(u.moving=!0,wu(w,!0)),d(y.deltaY.value,"",0))},C=()=>{if(e.readonly)return;const w=y.deltaY.value,B=y.duration.value;if(B<bu&&Math.abs(w)>vu){const T=g(w,B);d(T,"end",e.swipeDuration)}else d(w,"end",0)};return t.watch(()=>e.modelValue,w=>{const B=u.currIndex-w;if(B!==0){u.currIndex=w,u.startDistance=u.scrollDistance;const V=B*e.itemHeight;d(V,"",0)}}),t.watch(()=>e.source,w=>{if(u.currIndex>=w.length){const T=(w.length-1-u.currIndex)*e.itemHeight;u.startDistance=u.scrollDistance,d(T,"end",0)}}),t.watch(()=>e.visible,w=>{w===!1&&v()}),t.onMounted(()=>{const w=-e.modelValue*e.itemHeight;d(w)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:k,...t.toRefs(u),roller:p,getItemText:Le,onTouchStart:S,onTouchMove:N,onTouchEnd:C,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:f,stopMomentum:v}}}),Bu={key:1,class:"fox-picker__item-tile"};function Vu(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s)),onTouchend:n[2]||(n[2]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTouchcancel:n[3]||(n[3]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTransitionend:n[4]||(n[4]=(...s)=>e.stopMomentum&&e.stopMomentum(...s))},[t.createElementVNode("view",{ref:"roller",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.threeDimensional?e.touchRollerStyle:e.touchTileStyle)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.source,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${i}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(i+1)}]),style:t.normalizeStyle(e.setRollerStyle(i+1))},t.toDisplayString(e.itemText(s)),7)):(t.openBlock(),t.createElementBlock("view",Bu,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Au=te(Nu,[["render",Vu]]),{create:Tu,componentName:$u,scope:Eu}=G("picker"),xu=Tu({components:{Column:Au,Popup:de},props:{...Eo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=se.useFoxI18n(Eu),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(fu());t.watch(()=>e.visible,A=>{A&&s.value<=0&&setTimeout(()=>{if(r.value){const x=xe(r.value);s.value=x.height,mu(s.value)}},50)});const i=t.computed(()=>({[$u]:!0})),c=gu(),f=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([A,x])=>{if(A){let M=await c.load("picker",A,x);if(M.length>0){let $=M[0];if(Array.isArray($)){if(typeof $[0]=="string"){let E=M,F=[];E.forEach(I=>{let j=I.map(U=>lr(U));F.push(j)}),p.value=F}else p.value=M;f.value="multipleColumn"}else if(typeof $=="string"){let E=M,F=[],I=E.map(j=>lr(j));F.push(I),p.value=F,f.value="singleColumn"}else{const E=xo(e,$);Array.isArray(E)?(f.value="cascade",p.value=[M]):(f.value="singleColumn",p.value=[M])}}else p.value=[]}},{immediate:!0});const u=t.ref([]),h=t.ref(e.modelValue),k=t.ref([]),y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([A,x])=>{let M=yu(e,A,x,f.value);if(!qe(M,y.value)){y.value=M;let $=or(e,M,x,f.value);$&&(u.value=$.texts,n("update:text",u.value))}});const v=t.ref(e.visible);t.watch(()=>e.visible,A=>{v.value=A});const b=A=>{let x=tr(e,A);return Ee(x)?x.defaultIndex??0:0},d=A=>{if(e.readonly===!0)return!0;let x=tr(e,A);return Ee(x)?x.readonly??!1:!1},m=(A,x)=>{let M=y.value;M[A]=x;for(let E=0;E<A;E++)M[E]==null&&(M[E]=b(E));if(f.value==="cascade")for(let E=A+1;E<S.value.length;E++){let F=b(E);E<M.length?M[E]=F:M.push(F)}else for(let E=M.length;E<S.value.length;E++){let F=b(E);M.push(F)}y.value=M;let $=or(e,M,p.value,f.value);$&&(u.value=$.texts,h.value=$.values,k.value=$.items)},g=A=>A<y.value.length?y.value[A]:b(A),S=t.computed(()=>{if(p.value.length==0)return[];if(f.value=="singleColumn"||f.value=="multipleColumn")return p.value;let A=[],x=0,M=p.value[0],$=0;for(;;){let E=M.map(j=>{let U=Object.assign({},j);return pu(e,U,null),U});A.push(E),x>=y.value.length?$=0:$=y.value[x],($<0||$>=M.length)&&($=0);let F=M[$];const I=xo(e,F);if(!Array.isArray(I))break;M=I,x++}return A}),N=t.computed(()=>fe(+e.visibleItemCount-1)/2*s.value),C=(A=!1)=>{if(e.readonly===!0){A&&n("update:visible",!1);return}let x=p.value.length-1;for(;x>=0&&!(y.value[x]===null||y.value[x]===void 0);x--);if(x>=0&&m(x,0),f.value==="singleColumn"){let M=h.value.length>0?h.value[0]:"",$=k.value.length>0?k.value[0]:null;n("update:modelValue",M),n("update:text",u.value),n("change",M,$),A&&(n("confirm",M),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",u.value),n("change",h.value,k.value),A&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:S,dataType:f,show:v,itemHeight:s,top:N,isReadonly:d,getIndex:g,change:(A,x)=>{if(m(A,x),e.isAutoBackFill){const M=!v.value;C(M)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{C(!0)},clear:()=>{if(e.readonly===!0){n("update:visible",!1);return}f.value==="singleColumn"?(n("update:modelValue",""),n("change","")):(n("update:modelValue",[]),n("change",[])),n("clear",""),n("update:visible",!1)}}}}),Du={class:"fox-picker__bar"},Iu={class:"fox-picker__title"},qu={class:"fox-picker__bar__action"},Mu={class:"fox-picker__column"};function Pu(e,n,a,o,l,r){const s=t.resolveComponent("Column"),i=t.resolveComponent("Popup");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(i,{position:"bottom",visible:e.show,"onUpdate:visible":n[3]||(n[3]=c=>e.show=c),teleport:e.teleport,"lock-scroll":e.lockScroll,"close-on-click-overlay":e.closeOnClickOverlay,onClose:e.close,round:!0,"teleport-disable":e.teleportDisable},{default:t.withCtx(()=>[t.createElementVNode("view",Du,[t.createElementVNode("view",Iu,t.toDisplayString(e.title),1),t.createElementVNode("view",qu,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:n[0]||(n[0]=(...c)=>e.close&&e.close(...c))},t.toDisplayString(e.cancelText),1),t.createElementVNode("view",{class:"fox-picker__right fox-picker__confirm fox-picker__button",onClick:n[1]||(n[1]=(...c)=>e.confirm&&e.confirm(...c))},t.toDisplayString(e.confirmText),1),e.clearText?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-picker__right fox-picker__clear fox-picker__button",onClick:n[2]||(n[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])]),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",Mu,[t.createElementVNode("view",{class:"fox-picker__mask",style:t.normalizeStyle({backgroundSize:`100% ${e.top}px`})},null,4),t.createElementVNode("view",{ref:"pickerLineRef",class:"fox-picker__hairline",style:t.normalizeStyle({top:` ${e.top}px`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:"fox-picker__columnitem"},[t.createVNode(s,{visible:e.show,source:c,readonly:e.isReadonly(f),"column-index":f,modelValue:e.getIndex(f),"onUpdate:modelValue":p=>e.change(f,p),"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"item-height":e.itemHeight,"text-key":e.textKey,"value-key":e.valueKey},null,8,["visible","source","readonly","column-index","modelValue","onUpdate:modelValue","visible-item-count","three-dimensional","swipe-duration","item-height","text-key","value-key"])]))),128))]),t.renderSlot(e.$slots,"default")]),_:3},8,["visible","teleport","lock-scroll","close-on-click-overlay","onClose","teleport-disable"])],2)}const bt=te(xu,[["render",Pu]]);function Lu(e,n,a,o,l,r,s=!0){return{props:{...me,...ye,...Eo,type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},separator:{type:[String],required:!1,defualt:" "}},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Ie(i,"modelValue",null,u),b=t.ref([]),d=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),S=Ve(t.computed(()=>i.textAlign),"textAlign"),N=t.computed(()=>{const L={};return S.value&&(L["text-align"]=S.value),L}),C=t.ref(!1),w=()=>{C.value=!0},B=L=>{C.value=L},V=L=>{v.value=L,u("update:modelValue",L)},T=(L,D)=>{u("change",L,D)},A=L=>{let z=L.target.value;y.value=!0,u("focus",z,L)},x=L=>{setTimeout(()=>{y.value=!1},0);let z=L.target.value;i.maxLength&&z.length>Number(i.maxLength)&&(z=z.slice(0,Number(i.maxLength))),u("blur",z,L)},M=L=>{b.value=L,Array.isArray(L)&&L.length===0?u("update:text",L[0]):u("update:text",L)},$=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),E=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),I=t.computed(()=>({hidden:!F.value})),j=L=>{v.value="",u("update:modelValue","",L),u("change","",L),u("clear","")},U=t.computed(()=>i.clearable&&!f.value&&!p.value),Z=t.computed(()=>ve(v.value)>0&&y.value),_=L=>{Z.value?j(L):w()},W=t.computed(()=>Z.value&&U.value?o:l),q=t.computed(()=>({action:!0}));return()=>{const L={class:g.value,style:N.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:w,onFocus:A,onBlur:x};s&&(L.disabled=!0);const D=[],z=t.h("input",L);D.push(z);const P=[],O={class:["action-icon"]},Y=t.h(W.value,O),J={class:q.value,onClick:_},oe=t.h("view",J,{default:()=>[Y]});if(P.push(oe),E.value){const re=t.h("view",{class:I.value},[i.unit]);P.push(re)}const K={class:$.value},H=t.h("view",K,{default:()=>P});D.push(H);const X={default:()=>D};X.label=c.slots.default,X.prepend=c.slots.prepend,X.append=c.slots.append,X.fixedPreTip=c.slots.fixedPreTip,X.fixedTip=c.slots.fixedTip;const R=be(i,Eo);R.disabled=!1,R.readonly=f.value||p.value,R.visible=C.value,R["onUpdate:visible"]=B,R.modelValue=v.value,R["onUpdate:modelValue"]=V,R.text=b.value,R["onUpdate:text"]=M,R.onChange=T;const Q=t.h(r,R);X.hide=()=>[Q];const ee=be(i,ye,me);return t.h(a,ee,X)}}}}const{componentName:zu,create:Fu,scope:Ru}=G("picker-item"),al=Fu(Lu(zu,Ru,we,ne.CircleClose,ne.ArrowRight,bt,!1)),on=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:s="children"}=a??{},{[l]:i,[r]:c,[s]:f,...p}=o,u={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:f,_parent:n};return u.children&&u.children.length&&(u.children=on(u.children,u,a)),u}),vs=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&vs(o.children,n)},Ou={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Ku=(e,n)=>{const a={...Ou,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(f=>{f={...f};const{[l]:p,[r]:u}=f,h=c[u]=c[u]||[];!i.length&&u===o&&(i=h),h.push(f),f.children=c[p]||(c[p]=[])}),s&&Object.keys(c).forEach(f=>{c[f].length>1&&c[f].sort((p,u)=>p[s]-u[s])}),c=null,i},Uu={modelValue:{type:[String,Number],default:0},data:{type:[Array]},textKey:{type:String,default:"text"},valueKey:{type:String,default:"value"},visibleKey:{type:String,default:"visibile"},disabledKey:{type:String,default:"disabled"},doitKey:{type:String,default:"doit"},numKey:{type:String,default:"num"},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},shape:{type:String},align:{type:String},markShape:{type:String,default:"line"},scroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},animatedTime:{type:[Number,String],default:300},gutter:{type:[Number,String],default:0},itemOptions:{type:Object},showQuickNavigation:{type:Boolean,default:!1},beforeChange:{type:Function}},ar=(e,n)=>n[e.textKey],Dt=(e,n)=>n[e.valueKey],Hu=(e,n)=>n[e.visibleKey],rr=(e,n)=>n[e.disabledKey],ju=(e,n)=>{const a=n[e.doitKey];return he(a)},Wu=(e,n)=>{const a=n[e.numKey];return a==null?null:fe(n[a])},sr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Yu(e,n,a,o=!1){return{props:{...Uu},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:s}){const i=t.computed(()=>{const W={};return W[`${e}`]=!0,W}),c=t.computed(()=>{const W={};return W[`${e}__titles`]=!0,W[`${l.direction}`]=!0,l.align==="left"&&(W.left=!0),l.scroll===!0&&(W.scrollable=!0),l.shape&&(W[`${l.shape}`]=!0),W}),f=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const W=ce(l.gutter);return W<=0?0:W}),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,W=>{u.value!==W&&(u.value=W,I(!1))});const h=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),k=t.computed(()=>{const W={};return v.value||(W.display="none"),W}),y=t.ref(),v=t.ref(!1),b=()=>{const W=!v.value;d(W)},d=W=>{const q=W;q?(v.value=q,setTimeout(()=>{h.value["fox-tabs-bar__popup--show"]=!0,h.value["fox-tabs-bar__popup--hide"]=!1},0)):(h.value["fox-tabs-bar__popup--show"]=!1,h.value["fox-tabs-bar__popup--hide"]=!0,y.value?y.value.addEventListener("transitionend",()=>{v.value=!1},{once:!0}):setTimeout(()=>{v.value=!1},0))},m=t.ref(),g=t.ref([]),S=(W,q)=>{g.value[q]=W},N=W=>q=>{S(q,W)},C=(W,q)=>{const L=m.value,D=g.value;if(!L||!D||!D[W])return;const z=D[W];let P=0;l.direction==="vertical"?P=z.offsetTop-(L.offsetHeight-z.offsetHeight)/2:P=z.offsetLeft-(L.offsetWidth-z.offsetWidth)/2,w(L,P,q?0:.3,l.direction)},w=(W,q,L,D)=>{let z=0;const P=D==="horizontal"?W.scrollLeft:W.scrollTop,O=L===0?1:Math.round(L*1e3/16);function Y(){D==="horizontal"?W.scrollLeft+=(q-P)/O:W.scrollTop+=(q-P)/O,++z<O&&Ke(Y)}Y()},B=(W,q)=>{const L=Dt(l,W),D={};return D[`${e}__titles-item`]=!0,D.disabled=rr(l,W),D.active=L===u.value,l.shape&&(D[`${l.shape}`]=!0),l.ellipsis&&(D.ellipsis=!0),q&&(q.class&&(D[`${q.class}`]=!0),q.disabled===!0&&(D.disabled=q.disabled)),D},V=(W,q)=>{const L={};if(p.value>0){const D=Math.abs(p.value/2);l.direction==="vertical"?(L["margin-top"]=`${D}px`,L["margin-bottom"]=`${D}px`):(L["margin-left"]=`${D}px`,L["margin-right"]=`${D}px`)}return q&&q.style&&Object.assign(L,q.style),L},T=(W,q)=>`${Dt(l,W)??q}`,A=(W,q)=>{const L=Dt(l,W),D={};D[`${e}__popup-item`]=!0,D.disabled=rr(l,W),D.active=L===u.value,l.shape&&(D[`${l.shape}`]=!0);const z=sr(l,W,q);return z&&z.disabled===!0&&(D.disabled=z.disabled),D},x=t.computed(()=>(l.data??[]).filter(q=>Hu(l,q)!==!1)),M=(W,q)=>{const L=Dt(l,W);if(s("click",W,q),u.value==L)return;const D=()=>{u.value=L,l.scroll&&C(q,!1),s("update:modelValue",L),s("change",W,q)};if(typeof l.beforeChange=="function"){const z=l.beforeChange(W,q);gt(z)?z.then(P=>{P!==!1&&D()}).catch(()=>{D()}):z!==!1&&D()}else D()},$=(W,q)=>function(){M(W,q)},E=(W,q)=>{M(W,q),d(!1)},F=(W,q)=>function(){E(W,q)},I=W=>{if(!Array.isArray(l.data)||!l.scroll)return;const q=l.data.findIndex(L=>Dt(l,L)===u.value);q!==-1&&C(q,W)};t.watch(()=>l.data,()=>{setTimeout(I,0)}),t.onMounted(()=>{I(!0)});const j=(W,q)=>{if(r.item)return r.item({item:W,index:q});const L=sr(l,W,q),D=[];if(r.text){const Y=r.text({item:W,index:q});D.push(Y)}else{const Y=[];if(L?.doit===!0||ju(l,W)){const H={class:[`${e}__titles-item-tip`,"doit"]},X=t.h("view",H);Y.push(X)}const J=L?.num??Wu(l,W);if(J){let H="";const X=fe(J);X>=100?H="99+":H=`${X}`;const R={class:[`${e}__titles-item-tip`,"num"]},Q=t.h("view",R,[H]);Y.push(Q)}const oe={class:`${e}__titles-item-text`};Y.push(ar(l,W));const K=t.h("view",oe,Y);D.push(K)}const z={class:`${e}__titles-item-line`},P=t.h("view",z);D.push(P);const O={ref:N(q),class:B(W,L),style:V(W,L),key:T(W,q),onClick:$(W,q)};return t.h("view",O,D)},U=()=>{const W=r.default?r.default():[];if(W.length===0)for(let L=0;L<x.value.length;L++){const D=x.value[L],z=j(D,L);W.push(z)}const q={ref:m,class:c.value,style:f.value};return t.h("view",q,W)},Z=()=>{let W=null;r.navigation?W=r.navigation():W=t.h(a);const q={class:`${e}__navigation`,onClick:b};return t.h("view",q,[W])},_=()=>{const W=[];for(let L=0;L<x.value.length;L++){const D=x.value[L];let z=null;r.popupItem?z=r.popupItem({item:D,index:L}):z=ar(l,D);const P={class:A(D,L),key:T(D,L),onClick:F(D,L)},O=t.h("view",P,[z]);W.push(O)}const q={class:h.value,style:k.value};return t.h("view",q,W)};return()=>{const W=[],q=U();if(W.push(q),l.showQuickNavigation){const D=Z();W.push(D);const z=_();W.push(z)}const L={class:i.value};return t.h("view",L,W)}}}}const{create:Xu,componentName:Qu,scope:Gu}=G("tabs-bar"),On=Xu(Yu(Qu,Gu,ne.MoreH,!1)),bs=Symbol("TabsStatesKey"),Zu={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Ju(e,n,a=!1){return{props:{...Zu},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const s=t.shallowRef([]),i={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:v=>{const b={name:v};i.current.value===v&&(b.loaded=!0),s.value.push(b),t.triggerRef(s)},remove:v=>{const b=s.value.findIndex(d=>d.name===v);b!==-1&&s.value.splice(b,1)},isLoaded:v=>{if(!o.lazy)return!0;const b=s.value.findIndex(d=>d.name===v);return b!==-1?i.current.value?s.value[b].loaded??!1:b===0:!1}};t.provide(bs,i);const c=v=>{const b=s.value.findIndex(d=>d.name===v);b!==-1&&(s.value[b].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([v,b])=>{i.current.value!==v&&(i.current.value=v??"",c(v??"")),i.direction.value!==b&&(i.direction.value=b)});const f=t.ref(null),p=t.ref(null),u=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const k=t.computed(()=>{const v={},b=s.value.length;if(b<=0)return v;const d=s.value.findIndex(m=>m.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(v.height=`${b*i.tabHeight.value}px`,d!==-1&&(v.transform=`translate(0, -${d*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(v.width=`${b*i.tabWidth.value}px`,d!==-1&&(v.transform=`translate(-${d*i.tabWidth.value}px, 0)`)),h&&(h=!1,v.transition="transform 0s ease"),v});let y=null;return t.onMounted(()=>{if(!f.value)return;const v=()=>{const b=xn(f.value);i.tabWidth.value=b.width,i.tabHeight.value=b.height};window.ResizeObserver&&(y=new window.ResizeObserver(v),y.observe(f.value)),v()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const v={class:`${e}__panes`,style:k.value,ref:p},b=t.h("view",v,[r?.default?.()]),d={class:u.value,ref:f};return t.h("view",d,[b])}}}}const{create:_u,componentName:ed,scope:td}=G("tabs-container"),Kn=_u(Ju(ed,td,!1)),nd={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function od(e,n,a){return{props:{...nd},setup(o,{emit:l,slots:r}){const s=t.inject(bs);t.onMounted(()=>{s.add(o.paneKey)}),t.onBeforeUnmount(()=>{s.remove(o.paneKey)});const i=t.computed(()=>{const f={};return s.direction.value==="vertical"&&s.tabHeight.value>0?f.height=`${s.tabHeight.value}px`:s.tabWidth.value>0&&(f.width=`${s.tabWidth.value}px`),f}),c=t.computed(()=>o.loaded!=null?he(o.loaded):s.isLoaded(o.paneKey));return()=>{let f=[];if(c.value)f=r?.default?.()??[];else if(r.empty)f=r.empty();else{const u={class:`${e}__empty-icon`},h=o.emptyIcon??a,k=t.h(h,u),y={class:`${e}__empty-text`},v=o.emptyText??"Loading",b=t.h("view",y,[v]),d={class:`${e}__empty`},m=t.h("view",d,[k,b]);f.push(m)}const p={class:`${e}`,style:i.value};return t.h("view",p,f)}}}}const{create:ld,componentName:ad,scope:rd}=G("tabs-pane"),Un=ld(od(ad,rd,ne.Loading));class ir{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=on(n,null,this.config)}updateChildren(n,a){a?a.children=on(n,a,this.config):this.nodes=on(n,null,this.config)}getNodeByValue(n){let a;return vs(this.nodes,o=>{if(o.value===n)return a=o,!0}),a}getPathNodesByValue(n){if(!n.length)return[];const a=[];let o=this.nodes;for(;o&&o.length;){const l=o.find(r=>r.value===n[r.level]);if(!l)break;a.push(l),o=l.children}return a}isLeaf(n,a){const{leaf:o,children:l}=n,r=Array.isArray(l)&&!!l.length;return o||!r&&!a}hasChildren(n,a){if(this.isLeaf(n,a))return!1;const{children:l}=n;return Array.isArray(l)&&!!l.length}}const{create:sd,scope:id}=G("cascader-pane"),cd=sd({components:{Loading:ne.Loading,Checklist:ne.Checklist,TabsBar:On,TabsContainer:Kn,TabsPane:Un},props:{visible:{type:Boolean,required:!0},modelValue:{type:Array,required:!0},options:{type:Array,default:()=>[]},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object,required:!1}},emits:["update:modelValue","change","pathChange"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(id),o=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),l=t.ref(0),r=t.ref(!1),s=t.ref(e.modelValue),i=t.ref(new ir([],{})),c=t.ref([]),f=t.computed(()=>o.value.lazy&&!!o.value.lazyLoad),p=t.computed(()=>r.value==!0||c.value.length==0?[{text:"Loading",value:0}]:c.value.map((m,g)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:g}))),u=new Map;let h;const k=async()=>{u.clear(),c.value=[],l.value=0,r.value=!1,h=null;let{options:m}=e;o.value.convertConfig&&(m=Ku(m,o.value.convertConfig)),i.value=new ir(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),f.value&&!i.value.nodes.length&&await v({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y(!f.value)},y=async(m=!0)=>{const g=s.value;if(g===void 0||!i.value.nodes.length)return;if(g.length===0){l.value=0,c.value=[{nodes:i.value.nodes,selectedNode:null}];return}let S=g;if(f.value&&Array.isArray(g)&&g.length){S=[];let N=i.value.nodes.find(C=>C.value===g[0]);if(N){S=[N.value],r.value=!0;const C=await g.slice(1).reduce(async(w,B)=>{const V=await w;await v(V);const T=V?.children?.find(A=>A.value===B);return T&&S.push(B),Promise.resolve(T)},Promise.resolve(N));await v(C),r.value=!1}}S.length&&g===e.modelValue&&i.value.getPathNodesByValue(S).map((C,w)=>{l.value=w,d.handleNode(C,m)})},v=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(i.value.isLeaf(m,f.value)||i.value.hasChildren(m,f.value))return;m.loading=!0;const g=m.root?null:m;let S=u.get(m);S||(S=new Promise(C=>{o.value.lazyLoad?.(m,C)}),u.set(m,S));const N=await S;Array.isArray(N)&&N.length>0?i.value.updateChildren(N,g):m.leaf=!0,m.loading=!1,u.delete(m)},b=m=>{const g=m.map(S=>S.value);s.value=g,n("change",g,m),n("pathChange",m),n("update:modelValue",g)},d={async handleNode(m,g){const{disabled:S,loading:N}=m;if(!(!g&&S||!c.value[l.value])){if(i.value.isLeaf(m,f.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!g){const C=c.value.map(w=>w.selectedNode);b(C),n("pathChange",C)}return}if(i.value.hasChildren(m,f.value)){const C=m.level+1;if(c.value[l.value].selectedNode=m,c.value=c.value.slice(0,C),c.value.push({nodes:m.children||[],selectedNode:null}),l.value=C,!g){const w=c.value.map(B=>B.selectedNode);n("pathChange",w)}return}h=m,!N&&(await v(m),h===m&&(c.value[l.value].selectedNode=m,d.handleNode(m,g)))}},handleTabChange(m,g){h=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,g){return m.selectedNode&&m.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{k()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{qe(m,s.value)||(s.value=m,y())}),t.watch(()=>e.visible,m=>{m&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...d}}}),ud={class:"fox-cascader"},dd={role:"menu",class:"fox-cascader__pane"},fd=["aria-checked","aria-disabled","onClick"],md={class:"fox-cascader__item__title"},pd=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function hd(e,n,a,o,l,r){const s=t.resolveComponent("TabsBar"),i=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),f=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",ud,[t.createVNode(s,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=u=>e.tabsCursor=u),data:e.panesTitles,onChange:e.handleTabChange,scroll:!0,align:"left"},null,8,["modelValue","data","onChange"]),t.createVNode(p,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[1]||(n[1]=u=>e.tabsCursor=u)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(u,h)=>(t.openBlock(),t.createBlock(f,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",dd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.nodes,k=>(t.openBlock(),t.createElementBlock("view",{key:k.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(u,k),disabled:k.disabled}]),"aria-checked":e.isSelected(u,k),"aria-disabled":k.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(k,!1)},[t.createElementVNode("view",md,t.toDisplayString(k.text),1),k.loading?(t.openBlock(),t.createBlock(i,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(c,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,fd))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(f,{key:1,"pane-key":0},{default:t.withCtx(()=>[pd]),_:1}))]),_:1},8,["modelValue"])])}const gd=te(cd,[["render",hd]]),{create:yd}=G("cascader"),vd=yd({components:{FoxCascaderPane:gd,FoxPopup:de},props:{...Fe,modelValue:Array,visible:Boolean,title:String,options:{type:Array,default:()=>[]},lazy:Boolean,lazyLoad:Function,valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},poppable:{type:Boolean,default:!0},convertConfig:Object},emits:["update:modelValue","change","pathChange","update:visible"],setup(e,{emit:n}){const a=t.ref(e.modelValue),o=t.computed({get(){return e.visible},set(s){n("update:visible",s)}}),l=(s,i)=>{a.value=s,o.value=!1,n("change",s,i),n("update:modelValue",s)},r=s=>{n("pathChange",s)};return t.watch(()=>e.modelValue,s=>{s!==a.value&&(a.value=s)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),bd=["innerHTML"];function kd(e,n,a,o,l,r){const s=t.resolveComponent("FoxCascaderPane"),i=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(i,{key:0,visible:e.innerVisible,"onUpdate:visible":n[0]||(n[0]=c=>e.innerVisible=c),position:"bottom","pop-class":"fox-cascader__popup",round:"",closeable:e.closeable,"destroy-on-close":!1,"close-icon-position":e.closeIconPosition},{default:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-cascader__bar",innerHTML:e.title},null,8,bd)):t.createCommentVNode("",!0),t.createVNode(s,{onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"])]),_:1},8,["visible","closeable","close-icon-position"])):(t.openBlock(),t.createBlock(s,{key:1,onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"]))}const Hn=te(vd,[["render",kd]]);function Kt(e,n){const a=e.textKey??"text";return n[a]??""}function Ut(e,n){const a=e.valueKey??"value";return n[a]}function ks(e,n){const a=e.childrenKey??"children";return n[a]}function tn(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=Kt(e,l),s=Ut(e,l);a.texts.push(r),a.values.push(s??"")}return a}function Ss(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Kt(e,n[s])===r){const c=Ut(e,n[s])??"",f={[e.textKey]:r,[e.valueKey]:c};l.push(f);const p=ks(e,n[s]);Array.isArray(p)&&Ss(e,p,a,o+1,l);return}}function Cs(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Ut(e,n[s])===r){const c=Kt(e,n[s])??"",f={[e.textKey]:c,[e.valueKey]:r};l.push(f);const p=ks(e,n[s]);Array.isArray(p)&&Cs(e,p,a,o+1,l);return}}function uo(e,n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++){const l=Kt(e,n[o]),r=Kt(e,a[o]);if(l!==r)return!1;const s=Ut(e,n[o]),i=Ut(e,a[o]);if(s!==i)return!1}return!0}let Sd=class{proxy;constructor(n){this.proxy=n}async load(n,a){const o="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a);const l=Je(this.proxy,o);return l===null?(console.error(`${o} component not found api function`),[]):(Ee(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function Cd(){const e=t.getCurrentInstance();return new Sd(e.proxy)}const cr={modelValue:{type:[Array,String]},pathNodes:{type:[Array]},title:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object},showAllLevels:{type:[Boolean],default:!0},separator:{type:[String],default:"/"}};function wd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...cr},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Cd(),b=t.ref([]),d=t.ref([]),m=t.computed(()=>{if(Array.isArray(d.value)){if(i.showAllLevels===!1){const z=d.value.length-1;return d.value[z]}return d.value.join(i.separator)}else return d.value}),g=t.ref([]),S=t.ref([]);t.watch([()=>i.modelValue,()=>b.value],async([z,P])=>{if(u("setValue",z),i.lazy===!0){S.value.length==0&&(g.value=Array.isArray(z)?z:[]);return}if(i.valueType==="item"){let O=z;if(!uo(i,O,S.value)){S.value=O;let Y=tn(i,O);d.value=Y.texts,g.value=Y.values}}else if(i.valueType==="text"){let O=z,Y=[];if(Ss(i,P,O,0,Y),!uo(i,Y,S.value)){S.value=Y;let J=tn(i,Y);O.value=J.texts,g.value=J.values}}else{let O=[];if(Cs(i,P,z,0,O),!uo(i,O,S.value)){S.value=O;let Y=tn(i,O);d.value=Y.texts,g.value=Y.values}}}),i.lazy===!0&&(g.value=Array.isArray(i.modelValue)?i.modelValue:[]),t.watch([()=>i.source,()=>i.params],async([z,P])=>{z&&(b.value=await v.load(z,P))},{immediate:!0});const N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":f.value,"is-readonly":p.value})),w=Ve(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const z={};return w.value&&(z["text-align"]=w.value),z}),V=t.ref(!1),T=()=>{f.value===!0||p.value===!0||(V.value=!0)},A=z=>{V.value=z},x=(z,P)=>{let O=P.map(J=>{if(J==null)return J;let oe={...J};return Reflect.deleteProperty(oe,"text"),oe[i.textKey]=J.text??"",Reflect.deleteProperty(oe,"value"),oe[i.valueKey]=J.value??"",oe});S.value=O;let Y=tn(i,O);d.value=Y.texts,g.value=Y.values,i.valueType==="text"?(u("change",d.value,O),u("update:modelValue",d.value)):i.valueType==="item"?(u("change",O,O),u("update:modelValue",O)):(u("change",g.value,O),u("update:modelValue",g.value)),u("update:pathNodes",O)},M=z=>{let P=z.map(O=>{if(O==null)return O;let Y={...O};return Reflect.deleteProperty(Y,"text"),Y[i.textKey]=O.text??"",Reflect.deleteProperty(Y,"value"),Y[i.valueKey]=O.value??"",Y});u("pathChange",P)},$=z=>{y.value=!0,u("focus",g.value,z)},E=z=>{setTimeout(()=>{y.value=!1},0),u("blur",g.value,z)},F=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),I=t.computed(()=>ve(i.unit)>0),j=t.computed(()=>ve(i.unit)>0&&!y.value),U=t.computed(()=>({hidden:!j.value})),Z=z=>{S.value=[],d.value=[],g.value=[],u("update:modelValue",[]),u("change",[],z),u("clear",[]),u("update:pathNodes",[])},_=t.computed(()=>i.clearable&&!f.value&&!p.value),W=t.computed(()=>{let z=g.value&&g.value.length>0;return i.clearable&&z&&y.value}),q=z=>{W.value?Z(z):T()},L=t.computed(()=>W.value&&_.value?o:l),D=t.computed(()=>({action:!0}));return()=>{const z={class:C.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:T,onFocus:$,onBlur:E};s&&(z.disabled=!0);const P=[],O=t.h("input",z);P.push(O);const Y=[],J={class:["action-icon"]},oe=t.h(L.value,J),K={class:D.value,onClick:q},H=t.h("view",K,{default:()=>[oe]});if(Y.push(H),I.value){const ke=t.h("view",{class:U.value},[i.unit]);Y.push(ke)}const X={class:F.value},R=t.h("view",X,{default:()=>Y});P.push(R);const Q={default:()=>P};Q.label=c.slots.default,Q.prepend=c.slots.prepend,Q.append=c.slots.append,Q.fixedPreTip=c.slots.fixedPreTip,Q.fixedTip=c.slots.fixedTip;let ee={};ee.visible=V.value,ee["onUpdate:visible"]=A,ee.modelValue=g.value,ee.onChange=x,ee.onPathChange=M,ee.options=b.value,ee.title=i.title,ee.lazy=i.lazy,ee.lazyLoad=i.lazyLoad,ee.valueKey=i.valueKey,ee.textKey=i.textKey,ee.childrenKey=i.childrenKey,ee.convertConfig=i.convertConfig;const ae=t.h(r,ee);Q.hide=()=>[ae];const re=Nt(i,cr);return t.h(a,{...re,prop:`${i.prop}_item`},Q)}}}}const{componentName:Nd,create:Bd,scope:Vd}=G("cascader-item"),rl=Bd(wd(Nd,Vd,we,ne.CircleClose,ne.ArrowRight,Hn,!1));var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ws={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",s="second",i="minute",c="hour",f="day",p="week",u="month",h="quarter",k="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(M,$,E){var F=String(M);return!F||F.length>=$?M:""+Array($+1-F.length).join(E)+M},S={s:g,z:function(M){var $=-M.utcOffset(),E=Math.abs($),F=Math.floor(E/60),I=E%60;return($<=0?"+":"-")+g(F,2,"0")+":"+g(I,2,"0")},m:function M($,E){if($.date()<E.date())return-M(E,$);var F=12*(E.year()-$.year())+(E.month()-$.month()),I=$.clone().add(F,u),j=E-I<0,U=$.clone().add(F+(j?-1:1),u);return+(-(F+(E-I)/(j?I-U:U-I))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:k,w:p,d:f,D:y,h:c,m:i,s,ms:r,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},N="en",C={};C[N]=m;var w=function(M){return M instanceof A},B=function M($,E,F){var I;if(!$)return N;if(typeof $=="string"){var j=$.toLowerCase();C[j]&&(I=j),E&&(C[j]=E,I=j);var U=$.split("-");if(!I&&U.length>1)return M(U[0])}else{var Z=$.name;C[Z]=$,I=Z}return!F&&I&&(N=I),I||!F&&N},V=function(M,$){if(w(M))return M.clone();var E=typeof $=="object"?$:{};return E.date=M,E.args=arguments,new A(E)},T=S;T.l=B,T.i=w,T.w=function(M,$){return V(M,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var A=function(){function M(E){this.$L=B(E.locale,null,!0),this.parse(E)}var $=M.prototype;return $.parse=function(E){this.$d=function(F){var I=F.date,j=F.utc;if(I===null)return new Date(NaN);if(T.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var U=I.match(b);if(U){var Z=U[2]-1||0,_=(U[7]||"0").substring(0,3);return j?new Date(Date.UTC(U[1],Z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,_)):new Date(U[1],Z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,_)}}return new Date(I)}(E),this.$x=E.x||{},this.init()},$.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},$.$utils=function(){return T},$.isValid=function(){return this.$d.toString()!==v},$.isSame=function(E,F){var I=V(E);return this.startOf(F)<=I&&I<=this.endOf(F)},$.isAfter=function(E,F){return V(E)<this.startOf(F)},$.isBefore=function(E,F){return this.endOf(F)<V(E)},$.$g=function(E,F,I){return T.u(E)?this[F]:this.set(I,E)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(E,F){var I=this,j=!!T.u(F)||F,U=T.p(E),Z=function(O,Y){var J=T.w(I.$u?Date.UTC(I.$y,Y,O):new Date(I.$y,Y,O),I);return j?J:J.endOf(f)},_=function(O,Y){return T.w(I.toDate()[O].apply(I.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Y)),I)},W=this.$W,q=this.$M,L=this.$D,D="set"+(this.$u?"UTC":"");switch(U){case k:return j?Z(1,0):Z(31,11);case u:return j?Z(1,q):Z(0,q+1);case p:var z=this.$locale().weekStart||0,P=(W<z?W+7:W)-z;return Z(j?L-P:L+(6-P),q);case f:case y:return _(D+"Hours",0);case c:return _(D+"Minutes",1);case i:return _(D+"Seconds",2);case s:return _(D+"Milliseconds",3);default:return this.clone()}},$.endOf=function(E){return this.startOf(E,!1)},$.$set=function(E,F){var I,j=T.p(E),U="set"+(this.$u?"UTC":""),Z=(I={},I[f]=U+"Date",I[y]=U+"Date",I[u]=U+"Month",I[k]=U+"FullYear",I[c]=U+"Hours",I[i]=U+"Minutes",I[s]=U+"Seconds",I[r]=U+"Milliseconds",I)[j],_=j===f?this.$D+(F-this.$W):F;if(j===u||j===k){var W=this.clone().set(y,1);W.$d[Z](_),W.init(),this.$d=W.set(y,Math.min(this.$D,W.daysInMonth())).$d}else Z&&this.$d[Z](_);return this.init(),this},$.set=function(E,F){return this.clone().$set(E,F)},$.get=function(E){return this[T.p(E)]()},$.add=function(E,F){var I,j=this;E=Number(E);var U=T.p(F),Z=function(q){var L=V(j);return T.w(L.date(L.date()+Math.round(q*E)),j)};if(U===u)return this.set(u,this.$M+E);if(U===k)return this.set(k,this.$y+E);if(U===f)return Z(1);if(U===p)return Z(7);var _=(I={},I[i]=o,I[c]=l,I[s]=a,I)[U]||1,W=this.$d.getTime()+E*_;return T.w(W,this)},$.subtract=function(E,F){return this.add(-1*E,F)},$.format=function(E){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||v;var j=E||"YYYY-MM-DDTHH:mm:ssZ",U=T.z(this),Z=this.$H,_=this.$m,W=this.$M,q=I.weekdays,L=I.months,D=function(Y,J,oe,K){return Y&&(Y[J]||Y(F,j))||oe[J].slice(0,K)},z=function(Y){return T.s(Z%12||12,Y,"0")},P=I.meridiem||function(Y,J,oe){var K=Y<12?"AM":"PM";return oe?K.toLowerCase():K},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:W+1,MM:T.s(W+1,2,"0"),MMM:D(I.monthsShort,W,L,3),MMMM:D(L,W),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:D(I.weekdaysMin,this.$W,q,2),ddd:D(I.weekdaysShort,this.$W,q,3),dddd:q[this.$W],H:String(Z),HH:T.s(Z,2,"0"),h:z(1),hh:z(2),a:P(Z,_,!0),A:P(Z,_,!1),m:String(_),mm:T.s(_,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:U};return j.replace(d,function(Y,J){return J||O[Y]||U.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(E,F,I){var j,U=T.p(F),Z=V(E),_=(Z.utcOffset()-this.utcOffset())*o,W=this-Z,q=T.m(this,Z);return q=(j={},j[k]=q/12,j[u]=q,j[h]=q/3,j[p]=(W-_)/6048e5,j[f]=(W-_)/864e5,j[c]=W/l,j[i]=W/o,j[s]=W/a,j)[U]||W,I?q:T.a(q)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return C[this.$L]},$.locale=function(E,F){if(!E)return this.$L;var I=this.clone(),j=B(E,F,!0);return j&&(I.$L=j),I},$.clone=function(){return T.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},M}(),x=A.prototype;return V.prototype=x,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",f],["$M",u],["$y",k],["$D",y]].forEach(function(M){x[M[1]]=function($){return this.$g($,M[0],M[1])}}),V.extend=function(M,$){return M.$i||(M($,A,V),M.$i=!0),V},V.locale=B,V.isDayjs=w,V.unix=function(M){return V(1e3*M)},V.en=C[N],V.Ls=C,V.p={},V})})(ws);var Ad=ws.exports;const Re=Ye(Ad);var Ns={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},c=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(b){this[v]=+b}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var d=b.match(/([+-]|\d\d)/g),m=60*d[1]+(+d[2]||0);return m===0?0:d[0]==="+"?-m:m}(v)}],u=function(v){var b=i[v];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(v,b){var d,m=i.meridiem;if(m){for(var g=1;g<=24;g+=1)if(v.indexOf(m(g,0,b))>-1){d=g>12;break}}else d=v===(b?"pm":"PM");return d},k={A:[s,function(v){this.afternoon=h(v,!1)}],a:[s,function(v){this.afternoon=h(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[l,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[r,f("seconds")],ss:[r,f("seconds")],m:[r,f("minutes")],mm:[r,f("minutes")],H:[r,f("hours")],h:[r,f("hours")],HH:[r,f("hours")],hh:[r,f("hours")],D:[r,f("day")],DD:[l,f("day")],Do:[s,function(v){var b=i.ordinal,d=v.match(/\d+/);if(this.day=d[0],b)for(var m=1;m<=31;m+=1)b(m).replace(/\[|\]/g,"")===v&&(this.day=m)}],M:[r,f("month")],MM:[l,f("month")],MMM:[s,function(v){var b=u("months"),d=(u("monthsShort")||b.map(function(m){return m.slice(0,3)})).indexOf(v)+1;if(d<1)throw new Error;this.month=d%12||d}],MMMM:[s,function(v){var b=u("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,f("year")],YY:[l,function(v){this.year=c(v)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function y(v){var b,d;b=v,d=i&&i.formats;for(var m=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(V,T,A){var x=A&&A.toUpperCase();return T||d[A]||a[A]||d[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,$,E){return $||E.slice(1)})})).match(o),g=m.length,S=0;S<g;S+=1){var N=m[S],C=k[N],w=C&&C[0],B=C&&C[1];m[S]=B?{regex:w,parser:B}:N.replace(/^\[|\]$/g,"")}return function(V){for(var T={},A=0,x=0;A<g;A+=1){var M=m[A];if(typeof M=="string")x+=M.length;else{var $=M.regex,E=M.parser,F=V.slice(x),I=$.exec(F)[0];E.call(T,I),V=V.replace(I,"")}}return function(j){var U=j.afternoon;if(U!==void 0){var Z=j.hours;U?Z<12&&(j.hours+=12):Z===12&&(j.hours=0),delete j.afternoon}}(T),T}}return function(v,b,d){d.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var m=b.prototype,g=m.parse;m.parse=function(S){var N=S.date,C=S.utc,w=S.args;this.$u=C;var B=w[1];if(typeof B=="string"){var V=w[2]===!0,T=w[3]===!0,A=V||T,x=w[2];T&&(x=w[2]),i=this.$locale(),!V&&x&&(i=d.Ls[x]),this.$d=function(F,I,j){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*F);var U=y(I)(F),Z=U.year,_=U.month,W=U.day,q=U.hours,L=U.minutes,D=U.seconds,z=U.milliseconds,P=U.zone,O=new Date,Y=W||(Z||_?1:O.getDate()),J=Z||O.getFullYear(),oe=0;Z&&!_||(oe=_>0?_-1:O.getMonth());var K=q||0,H=L||0,X=D||0,R=z||0;return P?new Date(Date.UTC(J,oe,Y,K,H,X,R+60*P.offset*1e3)):j?new Date(Date.UTC(J,oe,Y,K,H,X,R)):new Date(J,oe,Y,K,H,X,R)}catch{return new Date("")}}(N,B,C),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),A&&N!=this.format(B)&&(this.$d=new Date("")),i={}}else if(B instanceof Array)for(var M=B.length,$=1;$<=M;$+=1){w[1]=B[$-1];var E=d.apply(this,w);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}$===M&&(this.$d=new Date(""))}else g.call(this,S)}}})})(Ns);var Td=Ns.exports;const $d=Ye(Td);var Bs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=r.format;l.en.ordinal=function(i){var c=["th","st","nd","rd"],f=i%100;return"["+i+(c[(f-20)%10]||c[f]||c[0])+"]"},r.format=function(i){var c=this,f=this.$locale();if(!this.isValid())return s.bind(this)(i);var p=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return f.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return f.ordinal(c.week(),"W");case"w":case"ww":return p.s(c.week(),h==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),h==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return h}});return s.bind(this)(u)}}})})(Bs);var Ed=Bs.exports;const xd=Ye(Ed);var Vs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=function(u){return u&&(u.indexOf?u:u.s)},i=function(u,h,k,y,v){var b=u.name?u:u.$locale(),d=s(b[h]),m=s(b[k]),g=d||m.map(function(N){return N.slice(0,y)});if(!v)return g;var S=b.weekStart;return g.map(function(N,C){return g[(C+(S||0))%7]})},c=function(){return l.Ls[l.locale()]},f=function(u,h){return u.formats[h]||function(k){return k.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,v,b){return v||b.slice(1)})}(u.formats[h.toUpperCase()])},p=function(){var u=this;return{months:function(h){return h?h.format("MMMM"):i(u,"months")},monthsShort:function(h){return h?h.format("MMM"):i(u,"monthsShort","months",3)},firstDayOfWeek:function(){return u.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(u,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(u,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(u,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return f(u.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var u=c();return{firstDayOfWeek:function(){return u.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(h){return f(u,h)},meridiem:u.meridiem,ordinal:u.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(u){return i(c(),"weekdays",null,null,u)},l.weekdaysShort=function(u){return i(c(),"weekdaysShort","weekdays",3,u)},l.weekdaysMin=function(u){return i(c(),"weekdaysMin","weekdays",2,u)}}})})(Vs);var Dd=Vs.exports;const Id=Ye(Dd);var As={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a="week",o="year";return function(l,r,s){var i=r.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var f=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=s(this).startOf(o).add(1,o).date(f),u=s(this).endOf(a);if(p.isBefore(u))return 1}var h=s(this).startOf(o).date(f).startOf(a).subtract(1,"millisecond"),k=this.diff(h,a,!0);return k<0?s(this).startOf("week").week():Math.ceil(k)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(As);var qd=As.exports;const Md=Ye(qd);var Ts={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),s=this.year();return r===1&&l===11?s+1:l===0&&r>=52?s-1:s}}})})(Ts);var Pd=Ts.exports;const Ld=Ye(Pd);var $s={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var s=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?s:this.add(r-s,"day")}}})})($s);var zd=$s.exports;const Fd=Ye(zd);var Es={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(Es);var Rd=Es.exports;const Od=Ye(Rd);var xs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(xs);var Kd=xs.exports;const Ud=Ye(Kd);Re.extend(Id);Re.extend(xd);Re.extend($d);Re.extend(Md);Re.extend(Ld);Re.extend(Fd);Re.extend(Od);Re.extend(Ud);const le={format(e,n){return Re(e).format(n)},parser(e,n){return Re(e,n).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,n,a){const l=new Date(e+"/"+n+"/"+a).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l]},getMonthPreDay(e,n){let o=new Date(e+"/"+n+"/01").getDay();return o==0&&(o=7),o},getMonthDays(e,n){return/^0/.test(n)&&(n=n.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][n]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,n){n=n||"-";const a=e.getFullYear(),o=this.getNumTwoBit(e.getMonth()+1),l=this.getNumTwoBit(e.getDate());return[a,o,l].join(n)},getDay(e,n){e=e||0;let a=n??new Date;const o=e*(1e3*60*60*24);return a=new Date(a.getTime()+o),this.date2Str(a)},compareDate(e,n){let a;typeof e=="string"?a=new Date(e.replace("-","/").replace("-","/")):a=e;let o;return typeof n=="string"?o=new Date(n.replace("-","/").replace("-","/")):o=n,!(a>=o)},isEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;let a;typeof e=="string"?a=new Date(e).getTime():a=e;let o;return typeof n=="string"?o=new Date(n).getTime():o=n,a==o},getMonthWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a));let r=l.getDay(),s=l.getDate(),i=6-r;return o!==0&&(r=r==0?7:r,i=7-r),Math.ceil((s+i)/7)},getYearWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=new Date(Number(e),0,1),s=Math.round((l.valueOf()-r.valueOf())/864e5);let i=l.getDay(),c=6-i;return o!==0&&(i=i==0?7:i,c=7-i),Math.ceil((s+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let s=l.getDay();if(o===0){const c=r-s*864e5,f=r+(6-s)*864e5,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(f));return[p,u]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,f=r+(7-s)*i,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(f));return[p,u]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=le.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=le.getWhatDay(+n[0],+n[1],+n[2]),n},inScope4Day(e,n,a){const o=new Date(new Date(n).setDate(n.getDate()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s}},ur=new Date().getFullYear(),sl={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",time:"HH:mm:ss","year-month":"YYYY-MM","month-day":"MM-DD",datehour:"YYYY-MM-DD HH","hour-minute":"HH:mm"},kn=(e,n,a)=>{let o;if(He(n)?o=n:typeof n=="string"&&ve(n)>0?o=le.parser(n,a):o=new Date,o.toString()==="Invalid Date")return null;let l=Math.max(o.getTime(),e.minDate.getTime());return l=Math.min(l,e.maxDate.getTime()),new Date(l)},Do=(e,n,a)=>{He(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),le.format(new Date(o),a)};let Io={modelValue:{type:[String,Date]},confirmText:{type:String},cancelText:{type:String},type:{type:String,default:"date"},valueFormat:{type:String},visible:{type:Boolean,default:!1},title:{type:String,default:""},isShowChinese:{type:Boolean,default:!0},minuteStep:{type:Number,default:1},minDate:{type:Date,default:()=>new Date(ur-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(ur+10,11,31),validator:He},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Hd,scope:jd}=G("date-picker"),Wd=Hd({components:{[bt.name]:bt},props:{...Io},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(jd),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,g){return new Date(m,g,0).getDate()}const s=(m,g)=>{const S=e[`${m}Date`],N=S.getFullYear();let C=1,w=1,B=0,V=0;m==="max"&&(C=12,w=r(g.getFullYear(),g.getMonth()+1),B=23,V=59);const T=V;return g.getFullYear()===N&&(C=S.getMonth()+1,g.getMonth()+1===C&&(w=S.getDate(),g.getDate()===w&&(B=S.getHours(),g.getHours()===B&&(V=S.getMinutes())))),{[`${m}Year`]:N,[`${m}Month`]:C,[`${m}Date`]:w,[`${m}Hour`]:B,[`${m}Minute`]:V,[`${m}Seconds`]:T}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:m,maxDate:g,maxMonth:S,maxHour:N,maxMinute:C,maxSeconds:w}=s("max",h.value),{minYear:B,minDate:V,minMonth:T,minHour:A,minMinute:x,minSeconds:M}=s("min",h.value);let $=[{type:"year",range:[B,m]},{type:"month",range:[T,S]},{type:"day",range:[V,g]},{type:"hour",range:[A,N]},{type:"minute",range:[x,C]},{type:"seconds",range:[M,w]}];switch(e.type){case"date":$=$.slice(0,3);break;case"datetime":$=$.slice(0,5);break;case"time":$=$.slice(3,6);break;case"year-month":$=$.slice(0,2);break;case"month-day":$=$.slice(1,3);break;case"datehour":$=$.slice(0,4);break;case"hour-minute":$=$.slice(3,5);break}return $}),c=(m,g,S)=>{if(!(g>m))return null;const N=[];for(;m<=g;)e.isShowChinese?N.push({text:m+o[S],value:m}):N.push({text:`${m}`,value:m}),S==="minute"?m+=e.minuteStep:m++;return N},f=t.computed(()=>{let m=[];return i.value.forEach(g=>{let S=c(g.range[0],g.range[1],g.type);S&&m.push(S)}),m}),p=(m,g)=>m==="year"?g.getFullYear():m==="month"?g.getMonth()+1:m==="day"?g.getDate():m==="hour"?g.getHours():m==="minute"?g.getMinutes():m==="seconds"?g.getSeconds():0,u=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,m=>{let g;if(typeof m=="string"?m.length==0?g=new Date:e.valueFormat?g=kn(e,e.modelValue,e.valueFormat):g=kn(e,m,sl[e.type]):He(m)?g=m:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let S=[];i.value.forEach(N=>{let C=p(N.type,g);S.push(C)}),u.value=S}},{immediate:!0});const k=m=>{if(e.type==="date"){const g=m[0],S=m[1]-1,N=Math.min(m[2],r(g,S+1));N!==m[2]&&(m[2]=N),h.value=new Date(g,S,N)}else if(e.type==="datetime"){const g=m[0],S=m[1]-1,N=Math.min(m[2],r(g,S+1)),C=m[3],w=m[4];N!==m[2]&&(m[2]=N),h.value=new Date(g,S,N,C,w)}else if(e.type==="time"){const g=m[0],S=m[1],N=m[2],C=h.value??new Date,w=new Date(C.getFullYear(),C.getMonth(),C.getDate(),g,S,N);h.value=w}else if(e.type==="year-month"){const g=m[0],S=m[1]-1;h.value=new Date(g,S)}else if(e.type==="month-day"){const S=(h.value??new Date).getFullYear(),N=m[0]-1,C=Math.min(m[1],r(S,N+1));C!==m[1]&&(m[1]=C);const w=new Date(S,N,C);h.value=w}else if(e.type==="datehour"){const g=m[0],S=m[1]-1,N=Math.min(m[2],r(g,S+1)),C=m[3];N!==m[2]&&(m[2]=N),h.value=new Date(g,S,N,C)}else if(e.type==="hour-minute"){const g=m[0],S=m[1],N=h.value??new Date,C=new Date(N.getFullYear(),N.getMonth(),N.getDate(),g,S);h.value=C}u.value=m};return{columns:f,dateIndexs:u,show:l,onChange:m=>{k(m)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:m=>{k(m),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let S=Do(e,g,e.valueFormat);n("update:modelValue",S)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function Yd(e,n,a,o,l,r){const s=t.resolveComponent("fox-picker");return t.openBlock(),t.createBlock(s,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onChange:e.onChange,onConfirm:e.onConfirm,onClose:e.onClose,onClear:e.onClear,"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"teleport-disable":e.teleportDisable},{top:t.withCtx(()=>[t.renderSlot(e.$slots,"top")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","model-value","source","confirm-text","cancel-text","title","onChange","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const jn=te(Wd,[["render",Yd]]),Xd={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Qd(e){let n=e.format;if(!n){let a=e.type??"date";n=sl[a]}return n}function Gd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...Io,...Xd},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=Ie(i,"modelValue",q=>q==null?null:typeof q=="string"?q.length==0?null:i.valueFormat?kn(i,q,i.valueFormat)??q:kn(i,q,sl[i.type])??q:He(q)?q:null,u),d=t.computed(()=>{if(!b.value)return"";const q=Qd(i);return Do(i,b.value,q)}),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),S=Ve(t.computed(()=>i.textAlign),"textAlign"),N=t.computed(()=>{const q={};return S.value&&(q["text-align"]=S.value),q}),C=t.ref(!1),w=()=>{C.value=!0},B=()=>{C.value=!1};c.expose({showPicker:w,hidePicker:B});const V=q=>{C.value=q},T=q=>{if(b.value=q,i.valueFormat){let L=Do(i,q,i.valueFormat);u("update:modelValue",L,{}),u("change",L,{})}else u("update:modelValue",q,{}),u("change",q,{})},A=q=>{let D=q.target.value;y.value=!0,u("focus",D,q)},x=q=>{setTimeout(()=>{y.value=!1},0);let D=q.target.value;i.maxLength&&D.length>Number(i.maxLength)&&(D=D.slice(0,Number(i.maxLength))),u("blur",D,q)},M=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),$=t.computed(()=>ve(i.unit)>0),E=t.computed(()=>ve(i.unit)>0&&!y.value),F=t.computed(()=>({hidden:!E.value})),I=q=>{b.value="",u("update:modelValue","",q),u("change","",q),u("clear",""),B()},j=t.computed(()=>i.clearable&&!f.value&&!p.value),U=t.computed(()=>{let q=ve(b.value)>0;return i.clearable&&q&&y.value}),Z=q=>{U.value?I(q):w()},_=t.computed(()=>U.value&&j.value?o:l),W=t.computed(()=>({action:!0}));return()=>{const q={class:g.value,style:N.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:w,onFocus:A,onBlur:x};s&&(q.disabled=!0);const L=[],D=t.h("input",q);L.push(D);const z=[],P={class:["action-icon"]},O=t.h(_.value,P),Y={class:W.value,onClick:Z},J=t.h("view",Y,{default:()=>[O]});if(z.push(J),$.value){const re=t.h("view",{class:F.value},[i.unit]);z.push(re)}const oe={class:M.value},K=t.h("view",oe,{default:()=>z});L.push(K);const H={default:()=>L};H.label=c.slots.default,H.prepend=c.slots.prepend,H.append=c.slots.append,H.fixedPreTip=c.slots.fixedPreTip,H.fixedTip=c.slots.fixedTip;const X=be(i,Io);X.valueFormat=null,X.disabled=!1,X.readonly=f.value||p.value,X.visible=C.value,X["onUpdate:visible"]=V,X.modelValue=b.value,X["onUpdate:modelValue"]=T,X.onClear=I;const R={};if(c.slots.top){const re=c.slots.top();R.top=()=>re}if(c.slots.bottom){const re=c.slots.bottom();R.default=()=>re}const Q=t.h(r,X,R);H.hide=()=>[Q];const ee=be(i,ye,me);return t.h(a,{...ee,prop:`${i.prop}_item`},H)}}}}const{create:Zd,componentName:Jd,scope:_d}=G("date-item"),il=Zd(Gd(Jd,_d,we,ne.CircleClose,ne.Date,jn,!1)),ef=39,tf=64,{create:nf,scope:of}=G("calendar-pane"),lf=nf({props:{type:{type:String,default:"one"},valueFormat:{type:String,default:"YYYY-MM-DD"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array],default:""},startDate:{type:String,default:le.getDay(0)},endDate:{type:String,default:le.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=se.useFoxI18n(of),r=o(e,["title","confirmText","startText","endText","today"]),s=JSON.parse(l("weekdays")),i=t.ref([...s.slice(e.firstDayOfWeek,7),...s.slice(0,e.firstDayOfWeek)]),c=t.ref(null),f=t.ref(null),p=t.ref(null),u=t.ref(null),h=t.ref(0),k=t.computed(()=>d.monthsData.slice(d.defaultRange[0],d.defaultRange[1])),y=t.computed(()=>a.btn),v=t.computed(()=>a["top-info"]),b=t.computed(()=>a["bottom-info"]),d=t.reactive({yearMonthTitle:"",defaultRange:[],currDate:"",propStartDate:"",propEndDate:"",unLoadPrev:!1,touchParams:{startY:0,endY:0,startTime:0,endTime:0,lastY:0,lastTime:0},transformY:0,translateY:0,scrollDistance:0,defaultData:[],chooseData:[],monthsData:[],dayPrefix:"fox-calendar__day",startData:"",endData:"",isRange:e.type==="range",timer:0,currentIndex:0,containerHeight:0,avgHeight:0,monthsNum:0}),m=P=>P.split("-"),g=P=>le.isEqual(d.currDate[0],P),S=P=>le.isEqual(d.currDate[1],P),N=P=>d.currDate?.length>0?d.currDate?.some(O=>le.isEqual(O,P)):!1,C=(P,O)=>O.curData[0]+"-"+O.curData[1]+"-"+le.getNumTwoBit(+P.day),w=(P,O)=>{const Y=C(P,O),{type:J}=e;return P.type=="curr"?le.isEqual(d.currDate,Y)||(J=="range"||J=="week")&&(g(Y)||S(Y))||J=="multiple"&&N(Y)?`${d.dayPrefix}--active`:d.propStartDate&&le.compareDate(Y,d.propStartDate)||d.propEndDate&&le.compareDate(d.propEndDate,Y)?`${d.dayPrefix}--disabled`:(J=="range"||J=="week")&&Array.isArray(d.currDate)&&Object.values(d.currDate).length==2&&le.compareDate(d.currDate[0],Y)&&le.compareDate(Y,d.currDate[1])?`${d.dayPrefix}--choose`:null:`${d.dayPrefix}--disabled`},B=()=>{const{type:P}=e;if(P=="range"&&d.chooseData.length==2||P!="range"){let O=d.chooseData.slice(0);P=="week"&&(O={weekDate:[T(d.chooseData[0]),T(d.chooseData[1])]}),n("choose",O),e.poppable&&n("update")}},V=(P,O,Y=!1)=>{if(w(P,O)!=`${d.dayPrefix}--disabled`){const{type:J}=e;let[oe,K]=O.curData,H=[...O.curData];if(H[2]=le.getNumTwoBit(Number(P.day)),H[3]=`${H[0]}-${H[1]}-${H[2]}`,H[4]=le.getWhatDay(+H[0],+H[1],+H[2]),J=="multiple")if(d.currDate?.length>0){let X;d.currDate?.forEach((R,Q)=>{R==H[3]&&(X=Q)}),Y?d.chooseData.push([...H]):X!==void 0?(d.currDate.splice(X,1),d.chooseData.splice(X,1)):(d.currDate.push(H[3]),d.chooseData.push([...H]))}else d.currDate=[H[3]],d.chooseData=[[...H]];else if(J=="range"){let X=Object.values(d.currDate).length;X==2||X==0?d.currDate=[H[3]]:le.compareDate(d.currDate[0],H[3])?Array.isArray(d.currDate)&&d.currDate.push(H[3]):Array.isArray(d.currDate)&&d.currDate.unshift(H[3]),d.chooseData.length==2||!d.chooseData.length?d.chooseData=[[...H]]:le.compareDate(d.chooseData[0][3],H[3])?d.chooseData=[...d.chooseData,[...H]]:d.chooseData=[[...H],...d.chooseData]}else if(J=="week"){let X=le.getWeekDate(oe,K,P.day,e.firstDayOfWeek);d.propStartDate&&le.compareDate(X[0],d.propStartDate)&&X.splice(0,1,d.propStartDate),d.propEndDate&&le.compareDate(d.propEndDate,X[1])&&X.splice(1,1,d.propEndDate),d.currDate=X,d.chooseData=[le.formatResultDate(X[0]),le.formatResultDate(X[1])]}else d.currDate=H[3],d.chooseData=[...H];if(!Y){let X=d.chooseData;J=="week"&&(X={weekDate:[T(d.chooseData[0]),T(d.chooseData[1])]}),n("select",X),(e.isAutoBackFill||!e.poppable)&&B()}}},T=P=>{let[O,Y,J]=P;return{date:P,monthWeekNum:le.getMonthWeek(O,Y,J,e.firstDayOfWeek),yearWeekNum:le.getYearWeek(O,Y,J,e.firstDayOfWeek)}},A=P=>{const O=P=="prev"?d.monthsData[0]:d.monthsData[d.monthsData.length-1];let Y=parseInt(O.curData[0]),J=parseInt(O.curData[1].toString().replace(/^0/,""));switch(P){case"prev":J==1&&(Y-=1),J=J==1?12:--J;break;case"next":J==12&&(Y+=1),J=J==12?1:++J;break}return[Y+"",le.getNumTwoBit(J),le.getMonthDays(String(Y),String(J))+""]},x=(P,O,Y)=>{let{year:J,month:oe}=Y;return O=="prev"&&P>=7&&(P-=7),Array.from(Array(P),(K,H)=>({day:String(H+1),type:O,year:J,month:oe}))},M=(P,O,Y,J)=>{P=P-e.firstDayOfWeek;let{year:oe,month:K}=Y;return O=="prev"&&P>=7&&(P-=7),Array.from(Array(J),(X,R)=>({day:String(R+1),type:O,year:oe,month:K})).slice(J-P)},$=(P,O)=>{const Y=le.getMonthPreDay(+P[0],+P[1]);let J=Number(P[1])-1,oe=Number(P[0]);J<=0&&(J=12,oe+=1);const K=le.getMonthDays(String(P[0]),String(P[1])),H=le.getMonthDays(oe+"",J+""),X={year:P[0],month:P[1]},R={curData:P,title:l("monthTitle",{year:X.year,month:X.month}),monthData:[...M(Y,"prev",{month:String(J),year:String(oe)},H),...x(K,"curr",X)],cssHeight:0,cssScrollHeight:0},Q=R.monthData.length>35?6:5;R.cssHeight=ef+tf*Q;let ee=0;d.monthsData.length>0&&(ee=d.monthsData[d.monthsData.length-1].cssScrollHeight+d.monthsData[d.monthsData.length-1].cssHeight),R.cssScrollHeight=ee,O=="next"?(!d.endData||!le.compareDate(`${d.endData[0]}-${d.endData[1]}-${le.getMonthDays(d.endData[0],d.endData[1])}`,`${P[0]}-${P[1]}-${P[2]}`))&&d.monthsData.push(R):!d.startData||!le.compareDate(`${P[0]}-${P[1]}-${P[2]}`,`${d.startData[0]}-${d.startData[1]}-01`)?d.monthsData.unshift(R):d.unLoadPrev=!0},E=()=>{let P=e.startDate?e.startDate:le.getDay(0),O=e.endDate?e.endDate:le.getDay(365);d.propStartDate=P,d.propEndDate=O,d.startData=m(P),d.endData=m(O),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(d.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const Y={year:Number(d.startData[0]),month:Number(d.startData[1])},J={year:Number(d.endData[0]),month:Number(d.endData[1])};let oe=J.month-Y.month;J.year-Y.year>0&&(oe=oe+12*(J.year-Y.year)),oe<=0&&(oe=1),$(d.startData,"next");let K=1;do $(A("next"),"next");while(K++<oe);if(d.monthsNum=oe,e.type=="range"&&Array.isArray(d.currDate))d.currDate.length>0&&(P&&le.compareDate(d.currDate[0],P)&&d.currDate.splice(0,1,P),O&&le.compareDate(O,d.currDate[1])&&d.currDate.splice(1,1,O),d.defaultData=[...m(d.currDate[0]),...m(d.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(d.currDate)){if(d.currDate.length>0){let H=[],X={};d.currDate.forEach(R=>{P&&!le.compareDate(R,P)&&O&&!le.compareDate(O,R)&&(Object.hasOwnProperty.call(X,R)||(H.push(R),X[R]=R))}),d.currDate=[...H],d.defaultData=[...m(H[0])]}}else if(e.type=="week"&&Array.isArray(d.currDate)){if(d.currDate.length>0){let[H,X,R]=m(d.currDate[0]),Q=le.getWeekDate(H,X,R,e.firstDayOfWeek);d.currDate=Q,P&&le.compareDate(d.currDate[0],P)&&d.currDate.splice(0,1,P),O&&le.compareDate(O,d.currDate[1])&&d.currDate.splice(1,1,O),d.defaultData=[...m(d.currDate[0]),...m(d.currDate[1])]}}else d.currDate&&(P&&le.compareDate(d.currDate,P)?d.currDate=P:O&&!le.compareDate(d.currDate,O)&&(d.currDate=O),d.defaultData=[...m(d.currDate)])};De({scrollToDate:P=>{le.compareDate(P,d.propStartDate)?P=d.propStartDate:le.compareDate(P,d.propEndDate)||(P=d.propEndDate);let O=m(P);d.monthsData.forEach((Y,J)=>{if(Y.title==l("monthTitle",{year:O[0],month:O[1]})&&c.value){let oe=d.monthsData[J].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let K=0,H=setInterval(()=>{if(K++,c.value){let X=oe/10;c.value.scrollTop=c.value.scrollTop+X}K>=10&&(clearInterval(H),c.value&&(c.value.scrollTop=d.monthsData[J].cssScrollHeight))},40)}else c.value.scrollTop=d.monthsData[J].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=d.monthsData[d.currentIndex].cssScrollHeight)},doLayout:()=>{let P=0,O=0;d.defaultData.length>0&&d.monthsData.forEach((oe,K)=>{oe.title==l("monthTitle",{year:d.defaultData[0],month:d.defaultData[1]})&&(P=K),(e.type=="range"||e.type=="week")&&oe.title==l("monthTitle",{year:d.defaultData[3],month:d.defaultData[4]})&&(O=K)}),U(d.monthsNum,P),d.currentIndex=P,d.yearMonthTitle=d.monthsData[d.currentIndex].title,d.defaultData.length>0&&(d.isRange?(V({day:d.defaultData[2],type:"curr"},d.monthsData[d.currentIndex],!0),V({day:d.defaultData[5],type:"curr"},d.monthsData[O],!0)):e.type=="week"?V({day:d.defaultData[2],type:"curr"},d.monthsData[d.currentIndex],!0):e.type=="multiple"?[...d.currDate].forEach(oe=>{let K=m(oe),H=d.currentIndex;d.monthsData.forEach((X,R)=>{X.title==l("monthTitle",{year:K[0],month:K[1]})&&(H=R)}),V({day:K[2],type:"curr"},d.monthsData[H],!0)}):V({day:d.defaultData[2],type:"curr"},d.monthsData[d.currentIndex],!0));let Y=d.monthsData[d.monthsData.length-1],J=Y.cssHeight+Y.cssScrollHeight;Xe(()=>{c?.value&&f?.value&&u?.value&&(h.value=c.value.clientHeight,f.value.style.height=`${J}px`,c.value.scrollTop=d.monthsData[d.currentIndex].cssScrollHeight)}),d.avgHeight=Math.floor(J/(d.monthsNum+1))}});const U=(P,O)=>{P>=3?O>0&&O<P?d.defaultRange=[O-1,O+3]:O==0?d.defaultRange=[O,O+4]:O==P&&(d.defaultRange=[O-2,O+2]):d.defaultRange=[0,P+2];let Y=d.monthsData[d.defaultRange[0]].cssScrollHeight;d.translateY=Y},Z=(P,O)=>(e.type=="range"||e.type=="week")&&P.type=="curr"&&w(P,O)=="fox-calendar__day--active",_=(P,O)=>Z(P,O)&&g(C(P,O)),W=(P,O)=>d.currDate.length>=2&&S(C(P,O))?Z(P,O):!1,q=()=>{if(d.currDate.length>=2)return le.isEqual(d.currDate[0],d.currDate[1])},L=P=>{const O=`${P.year}-${P.month}-${Number(P.day)<10?"0"+P.day:P.day}`;return le.isEqual(O,le.date2Str(new Date))},D=P=>{if(d.monthsData.length<=1)return;const O=P.target.scrollTop;let Y=Math.floor(O/d.avgHeight);if(Y==0)O>=d.monthsData[Y+1].cssScrollHeight&&(Y+=1);else if(Y>0&&Y<d.monthsNum-1)O>=d.monthsData[Y+1].cssScrollHeight&&(Y+=1),O<d.monthsData[Y].cssScrollHeight&&(Y-=1);else{const J=Math.round(O+h.value);J<d.monthsData[Y].cssScrollHeight+d.monthsData[Y].cssHeight&&O>d.monthsData[Y-1].cssScrollHeight&&(Y-=1),Y+1<=d.monthsNum&&J>=d.monthsData[Y+1].cssScrollHeight+d.monthsData[Y+1].cssHeight&&(Y+=1),Y>=1&&O<d.monthsData[Y-1].cssScrollHeight&&(Y-=1)}d.currentIndex!==Y&&(d.currentIndex=Y,U(d.monthsNum,Y)),d.yearMonthTitle=d.monthsData[Y].title},z=()=>{d.chooseData.splice(0),d.monthsData.splice(0),E()};return E(),t.watch(()=>e.defaultValue,P=>{P&&e.poppable&&z()}),{weeks:i,compConthsData:k,showTopBtn:y,topInfo:v,bottomInfo:b,rangeTip:q,mothsViewScroll:D,getClass:w,isStartTip:_,isEndTip:W,chooseDay:V,isCurrDay:L,confirm:B,months:c,...t.toRefs(d),...t.toRefs(e),...r,monthsPanel:f,weeksPanel:p,viewArea:u}}}),af={class:"fox-calendar__header"},rf={key:0,class:"fox-calendar__header-title"},sf={key:1,class:"fox-calendar__header-slot"},cf={key:2,class:"fox-calendar__header-subtitle"},uf={class:"fox-calendar__weekdays",ref:"weeksPanel"},df={class:"fox-calendar__panel",ref:"monthsPanel"},ff={class:"fox-calendar__month-title"},mf={class:"fox-calendar__days"},pf=["onClick"],hf={class:"fox-calendar__day-value"},gf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},yf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},vf={key:2,class:"fox-calendar__day-tips--curr"},bf={key:4,class:"fox-calendar__day-tip"},kf={key:0,class:"fox-calendar__footer"};function Sf(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-calendar",{"fox-calendar--nopop":!e.poppable,"fox-calendar--nofooter":e.isAutoBackFill}])},[t.createElementVNode("view",af,[e.showTitle?(t.openBlock(),t.createElementBlock("view",rf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",sf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",cf,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",uf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:i},t.toDisplayString(s),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...s)=>e.mothsViewScroll&&e.mothsViewScroll(...s))},[t.createElementVNode("view",df,[t.createElementVNode("view",{class:"fox-calendar__body",ref:"viewArea",style:t.normalizeStyle({transform:`translateY(${e.translateY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.compConthsData,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:i},[t.createElementVNode("view",ff,t.toDisplayString(s.title),1),t.createElementVNode("view",mf,[t.createElementVNode("view",{class:t.normalizeClass(["fox-calendar__days-item",e.type==="range"?"fox-calendar__days-item--range":""])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.monthData,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:p=>e.chooseDay(c,s)},[t.createElementVNode("view",hf,[t.renderSlot(e.$slots,"day",{date:c.type=="curr"?c:""},()=>[t.createTextVNode(t.toDisplayString(c.type=="curr"?c.day:""),1)])]),e.topInfo?(t.openBlock(),t.createElementBlock("view",gf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",yf,[t.renderSlot(e.$slots,"bottom-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),!e.bottomInfo&&e.showToday&&e.isCurrDay(c)?(t.openBlock(),t.createElementBlock("view",vf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,s)?(t.openBlock(),t.createElementBlock("view",{key:3,class:t.normalizeClass(["fox-calendar__day-tip",{"fox-calendar__day-tips--top":e.rangeTip()}])},t.toDisplayString(e.startText),3)):t.createCommentVNode("",!0),e.isEndTip(c,s)?(t.openBlock(),t.createElementBlock("view",bf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,pf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",kf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...s)=>e.confirm&&e.confirm(...s))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const dr=te(lf,[["render",Sf]]),Cf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),ln={type:{type:String,default:"one"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array]},startDate:{type:String},endDate:{type:String},firstDayOfWeek:{type:Number,default:0,validator:e=>e>=0&&e<=6}},{create:wf}=G("calendar"),Nf=wf({components:{[dr.name]:dr,[de.name]:de},props:{...ln},emits:["choose","close","update:visible","select"],setup(e,{emit:n,slots:a}){const o=t.computed(()=>a.btn),l=t.computed(()=>a["top-info"]),r=t.computed(()=>a.day),s=t.computed(()=>a["bottom-info"]),i=t.ref(null),c=v=>{i.value?.scrollToDate(v)},f=()=>{i.value?.initPosition()};t.watch(()=>e.visible,v=>{v&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),De({scrollToDate:c,initPosition:f});const p=()=>{n("update:visible",!1)},u=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{u()},update:p,close:u,select:v=>{n("select",v)},choose:v=>{u(),n("choose",v)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Bf(e,n,a,o,l,r){const s=t.resolveComponent("fox-calendar-pane"),i=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(i,t.mergeProps({key:0,visible:e.visible,position:"bottom",round:"",closeable:""},e.$attrs,{onClickOverlay:e.closePopup,onClickCloseIcon:e.closePopup,style:{height:"85vh"}}),{default:t.withCtx(()=>[t.createVNode(s,{ref:"calendarRef",type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"show-today":e.showToday,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","confirm-text","start-text","end-text","show-today","show-title","show-sub-title","to-date-animation","first-day-of-week"])]),_:3},16,["visible","onClickOverlay","onClickCloseIcon"])):(t.openBlock(),t.createBlock(s,{key:1,type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,ref:"calendarRef","confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"show-today":e.showToday,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","confirm-text","start-text","end-text","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","show-title","show-sub-title","to-date-animation","show-today","first-day-of-week"]))}const Wn=te(Nf,[["render",Bf]]),fr={modelValue:{type:[String,Date,Array],default:null},rangeSeparator:{type:String,default:"-"},valueFormat:{type:String,default:"YYYY-MM-DD"},format:{type:String,default:"YYYY-MM-DD"},showWeek:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},fo=(e,n)=>{let a;return He(e)?a=e:typeof e=="string"&&ve(e)>0?a=le.parser(e,n):a=new Date,a},ct=(e,n,a)=>(He(n)||(n=new Date),le.format(n,a)),ut=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=le.date2Str(e),r=le.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function Vf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...me,...ye,...ln,...fr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=t.computed(()=>i.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),d=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},m=(D,z="one",P="YYYY-MM-DD")=>{if(Cf(D)){d();return}if(v.value&&Array.isArray(D)&&D.length==2){let O,Y;typeof D[0]=="string"?(O=fo(D[0],P),Y=fo(D[1],P)):(O=D[0],Y=D[1]);let J=ut(O),oe=ut(Y);(b.startDate===null||b.startDate.getTime()!==O.getTime()||b.endDate?.getTime()!==Y.getTime())&&(b.startDate=O,b.startArray=J,b.endDate=Y,b.endArray=oe)}else{let O;typeof D=="string"?O=fo(D,P):O=D;let Y=ut(O);(b.startDate===null||b.startDate.getTime()!==O.getTime())&&(b.startDate=O,b.startArray=Y)}};m(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,D=>{m(D,i.type,i.valueFormat),u("setValue",D)});const g=t.computed(()=>{if(b.startDate===null)return"";if(v.value){let D=ct(i,b.startDate,i.format),z=ct(i,b.endDate,i.format);return`${D} ${i.rangeSeparator} ${z}`}else{let D=ct(i,b.startDate,i.format);return i.showWeek&&(D=`${D} ${b.startArray[4]}`),D}}),S=t.computed(()=>{if(b.startDate===null)return null;if(v.value){let D=le.date2Str(b.startDate),z=le.date2Str(b.endDate??new Date);return[D,z]}else return le.date2Str(b.startDate)}),N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":f.value,"is-readonly":p.value})),w=Ve(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const D={};return w.value&&(D["text-align"]=w.value),D}),V=t.ref(!1),T=()=>{p.value||f.value||(V.value=!0)},A=D=>{V.value=D},x=D=>{if(D){if(v.value&&Array.isArray(D)){let z=D[0],P=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(P,O-1,Y),oe=D[1];P=fe(oe[0]),O=fe(oe[1]),Y=fe(oe[2]);let K=new Date(P,O-1,Y);if(b.startDate=J,b.startArray=ut(J),b.endDate=K,b.endArray=ut(K),i.valueFormat){let H=ct(i,J,i.valueFormat),X=ct(i,K,i.valueFormat);u("update:modelValue",[H,X],{})}else u("update:modelValue",[J,K],{})}else{let z=D,P=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(P,O-1,Y);if(b.startDate=J,b.startArray=ut(J),i.valueFormat){let oe=ct(i,J,i.valueFormat);u("update:modelValue",oe,{})}else u("update:modelValue",J,{})}u("change",D,{})}},M=D=>{let P=D.target.value;y.value=!0,u("focus",P,D)},$=D=>{setTimeout(()=>{y.value=!1},0);let P=D.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),u("blur",P,D)},E=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),F=t.computed(()=>ve(i.unit)>0),I=t.computed(()=>ve(i.unit)>0&&!y.value),j=t.computed(()=>({hidden:!I.value})),U=D=>{d(),u("update:modelValue",null,D),u("change","",D),u("clear","")},Z=t.computed(()=>i.clearable&&!f.value&&!p.value),_=t.computed(()=>{let D=ve(g.value)>0;return i.clearable&&D&&y.value}),W=D=>{_.value?U(D):T()},q=t.computed(()=>_.value&&Z.value?l:r),L=t.computed(()=>({action:!0}));return()=>{const D={class:C.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:T,onFocus:M,onBlur:$};s&&(D.disabled=!0);const z=[],P=t.h("input",D);z.push(P);const O=[],Y={class:["action-icon"]},J=t.h(q.value,Y),oe={class:L.value,onClick:W},K=t.h("view",oe,{default:()=>[J]});if(O.push(K),F.value){const ke=t.h("view",{class:j.value},[i.unit]);O.push(ke)}const H={class:E.value},X=t.h("view",H,{default:()=>O});z.push(X);const R={default:()=>z};R.label=c.slots.default,R.prepend=c.slots.prepend,R.append=c.slots.append,R.fixedPreTip=c.slots.fixedPreTip,R.fixedTip=c.slots.fixedTip;const Q=be(i,ln);Q.visible=V.value,Q["onUpdate:visible"]=A,Q["default-value"]=S.value,Q.onChoose=x;const ee={};if(c.slots.btn){const ke=c.slots.btn();ee.btn=()=>ke}c.slots.day&&(ee.day=c.slots.day),c.slots.topInfo&&(ee.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ee.bottomInfo=c.slots.bottomInfo);const ae=t.h(a,Q,ee);R.hide=()=>[ae];const re=Nt(i,ln,fr);return t.h(o,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:Af,create:Tf,scope:$f}=G("calendar-item"),cl=Tf(Vf(Af,$f,Wn,we,{CloseIcon:ne.CircleClose,MarkIcon:ne.Date},!1)),Ef={readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shape:{type:String,default:"round"},label:{type:[String,Number,Boolean],default:""},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}};function xf(e,{CheckNormal:n,Checked:a}){return{props:{...Ef},setup(o,{emit:l,slots:r}){const s=t.inject("parent",null),i=Dn(),c=t.computed(()=>s.label.value===o.label),f=t.computed(()=>s.position),p=()=>{const v=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const b=ce(o.iconSize),d=o.checkedIcon??i.radio.Checked??a;return v.push("fox-radio__icon"),o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h(d,{width:b,height:b,class:v})}}else{if(r.icon)return r.icon();{const b=ce(o.iconSize),d=o.icon??i.radio.CheckNormal??n;return v.push("fox-radio__icon--unchecked"),o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h(d,{width:b,height:b,class:v})}}},u=()=>{const v=[`${e}__label`];return o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h("view",{class:v},r.default?.())},h=()=>{const v=[`${e}__button`];return c.value&&v.push(`${e}__button--active`),o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h("view",{class:v},r.default?.())},k=()=>{c.value||o.disabled||o.readonly||s.updateValue(o.label)},y=f.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${y?`${e}--reverse`:""}`,onClick:k},[o.shape=="button"?h():y?[u(),p()]:[p(),u()]])}}}const{componentName:Df,create:If}=G("radio"),Yn=If(xf(Df,{CheckNormal:ne.CheckNormal,Checked:ne.CheckChecked})),{componentName:mr,create:qf}=G("radio-group"),Xn=qf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=Bt(),o=l=>a("update:modelValue",l);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:o}),t.watch(()=>e.modelValue,l=>a("change",l)),()=>{const l={};return e.textAlign&&(l["text-align"]=e.textAlign),t.h("view",{class:`${mr} ${mr}--${e.direction}`,style:l},n.default?.())}}});function pr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(an(e,r)===a)return l}else if(o==="item"){if(qe(a,r))return l}else if(Lt(e,r)===a)return l}return-1}function an(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Lt(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Mf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Pf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Lf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function zf(){const e=t.getCurrentInstance();return new Lf(e.proxy)}function Ff(e){return{text:e,value:e}}const hr={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Rf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Of={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Number,String,Object],default:""}};function Kf(e,n,a,o,l){return{props:{...me,...ye,...hr,...Rf,...Of},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ae(t.computed(()=>r.readonly)),c=Te(t.computed(()=>r.disabled)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return c.value}},r.prop??s.attrs.name),u=zf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([d,m])=>{if(d){const g=await u.load("radio",d,m);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(w=>Ff(w));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});let k=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([d,m])=>{k.value=pr(r,m,d,r.valueType),p("setValue",d)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(k.value===-1)return null;const d=h.value[k.value];return Lt(r,d)}),v=d=>{let m=null,g=null;if(h.value.length>0){let S=pr(r,h.value,d,"value");k.value=S,S>=0&&(g=h.value[S],r.valueType==="text"?m=an(r,g):r.valueType==="item"?m=g:m=Lt(r,g))}else m=d;p("update:modelValue",m),p("change",m,g)},b=()=>{let d=null,m=null;if(h.value.length>0&&k.value!==-1){let g=h.value[k.value];r.valueType==="text"?d=an(r,g):r.valueType==="item"?d=g:d=Lt(r,g)}p("update:modelValue",d),p("change",d,m)};if(De({clear(){k.value!==-1&&(k.value=-1,b())}}),r.source){const d=()=>{const m=[],g=be(r,hr);return h.value.forEach((S,N)=>{const C=Lt(r,S),w=Mf(r,S);let B={...g,label:C,disabled:w};const V=Pf(r,S,N);B={...B,...V},c.value&&(B.disabled=!0),i.value&&(B.readonly=!0);const T={};if(s.slots.icon&&(T.icon=s.slots.icon),s.slots.checkedIcon&&(T.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const x=s.slots.text(S);T.default=()=>[x]}else{const x=an(r,S);T.default=()=>x}let A=t.h(l,B,T);m.push(A)}),m};return()=>{const m=d(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":v},S=t.h(o,g,{default:()=>m}),N={default:()=>S};N.label=s.slots.default,N.prepend=s.slots.prepend,N.append=s.slots.append,N.fixedPreTip=s.slots.fixedPreTip,N.fixedTip=s.slots.fixedTip;const C=be(r,ye,me);return t.h(a,{...C,prop:`${r.prop}_item`},N)}}else return()=>{const d=s.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"update:modelValue":v},{default:()=>d})}}}}const{componentName:Uf,create:Hf,scope:jf}=G("radio-item"),ul=Hf(Kf(Uf,jf,we,Xn,Yn)),Wf=(e,{CheckNormal:n,Checked:a,Indeterminate:o})=>({props:{modelValue:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},textPosition:{type:String,default:"right"},icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},label:{type:[String,Number,Boolean],default:""},indeterminate:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["change","update:modelValue"],setup(l,{slots:r}){const{emitEvent:s}=Bt(),i=Dn(),c=t.inject("parent",null),f=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,g=>{f.partialSelect=g});const p=t.computed(()=>!!c),u=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),h=t.computed(()=>p.value?c.position:l.textPosition);let k="";const y=(g,S)=>{k="click",s("update:modelValue",g),s("change",g,S)};t.watch(()=>l.modelValue,g=>{k=="click"?k="":s("change",g)});const v=()=>{const g=[];if(f.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const S=ce(l.iconSize),N=l.indeterminateIcon??i.checkbox.Indeterminate??o;return g.push("fox-checkbox__icon--indeterminate"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(N,{width:S,height:S,class:g})}}else if(u.value){if(r.checkedIcon)return r.checkedIcon();{const S=ce(l.iconSize),N=l.checkedIcon??i.checkbox.Checked??a;return g.push("fox-checkbox__icon"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(N,{width:S,height:S,class:g})}}else{if(r.icon)return r.icon();{const S=ce(l.iconSize),N=l.icon??i.checkbox.CheckNormal??n;return g.push("fox-checkbox__icon--unchecked"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(N,{width:S,height:S,class:g})}}},b=()=>{const g=[`${e}__label`];return l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},d=()=>{const g=[`${e}__button`];return u.value&&g.push(`${e}__button--active`),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},m=g=>{if(!(l.disabled||l.readonly)){if(u.value&&f.partialSelect){f.partialSelect=!1,y(u.value,r.default?.()[0].children);return}if(y(!u.value,r.default?.()[0].children),p.value){const S=c.value.value,N=c.max.value,{label:C}=l,w=S.indexOf(C);w>-1?S.splice(w,1):w<=-1&&(S.length<N||!N)&&S.push(C),c.updateValue(S)}}};return t.onMounted(()=>{p.value&&c.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{p.value&&c.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${h.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?d():[v(),b()]])}}),{componentName:Yf,create:Xf}=G("checkbox"),Qn=Xf(Wf(Yf,{CheckNormal:ne.CheckNormal,Checked:ne.Checked,Indeterminate:ne.CheckDisabled})),{create:Qf,componentName:gr}=G("checkbox-group"),Gn=Qf({props:{modelValue:{type:Array,default:()=>[]},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=Bt(),o=t.reactive({children:[]}),l=f=>{f.proxy&&o.children.push(f.proxy)},r=f=>{f.proxy&&(o.children=o.children.filter(p=>p!==f.proxy))},s=f=>{a("update:modelValue",f),a("change",f)},i=f=>{const p=[];f&&o.children.forEach(u=>{u?.disabled||p.push(u?.label)}),a("update:modelValue",p)},c=()=>{const f=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",f)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:s,link:l,unlink:r}),t.watch(()=>e.modelValue,f=>{a("change",f)}),De({toggleAll:i,toggleReverse:c}),()=>{const f={};return e.textAlign&&(f["text-align"]=e.textAlign),t.h("view",{class:`${gr} ${gr}--${e.direction}`,style:f},n.default?.())}}});function yr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(qo(e,r)===a)return l}else if(o==="item"){if(qe(a,r))return l}else if(rn(e,r)===a)return l}return-1}function qo(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function rn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Gf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Zf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Jf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function _f(){const e=t.getCurrentInstance();return new Jf(e.proxy)}function em(e){return{text:e,value:e}}const tm={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},vr={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},nm={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Array,String],default:[]}};function om(e,n,a,o,l){return{props:{...me,...ye,...tm,...vr,...nm},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Te(t.computed(()=>r.disabled)),c=Ae(t.computed(()=>r.readonly)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return i.value}},r.prop??s.attrs.name),u=_f(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([d,m])=>{if(d){const g=await u.load("checkbox",d,m);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(w=>em(w));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});const k=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([d,m])=>{const g=[];Array.isArray(d)&&d.forEach(S=>{let N=yr(r,m,S,r.valueType);N!==-1&&g.push(N)}),!qe(g,k.value)&&(k.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let d=[];return k.value.forEach(m=>{let g=h.value[m];d.push(rn(r,g))}),d}),v=d=>{let m=[],g=[];if(h.value.length>0){const S=[];Array.isArray(d)&&d.forEach(N=>{let C=yr(r,h.value,N,"value");C!==-1&&S.push(C);const w=h.value[C];g.push(w),r.valueType==="text"?m.push(qo(r,w)):r.valueType==="item"?m.push(w):m.push(rn(r,w))}),k.value=S}else m=d;p("update:modelValue",m),p("change",m,g)},b=t.ref();if(De({toggleAll:d=>{b.value.toggleAll(d)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const d=()=>{const m=[],g=be(r,vr);return h.value.forEach((S,N)=>{const C=rn(r,S),w=Gf(r,S);let B={...g,label:C,disabled:w};const V=Zf(r,S,N);B={...B,...V},i.value&&(B.disabled=!0),c.value&&(B.readonly=!0);const T={};if(s.slots.icon&&(T.icon=s.slots.icon),s.slots.checkedIcon&&(T.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(T.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const x=s.slots.text(S);T.default=()=>[x]}else{const x=qo(r,S);T.default=()=>x}let A=t.h(l,B,T);m.push(A)}),m};return()=>{const m=d(),g={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":v},S=t.h(o,g,{default:()=>m}),N={default:()=>S};N.label=s.slots.default,N.prepend=s.slots.prepend,N.append=s.slots.append,N.fixedPreTip=s.slots.fixedPreTip,N.fixedTip=s.slots.fixedTip;const C=be(r,ye,me);return t.h(a,{...C,prop:`${r.prop}_item`},N)}}else return()=>{const d=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":v},{default:()=>d})}}}}const{componentName:lm,create:am,scope:rm}=G("checkbox-item"),dl=am(om(lm,rm,we,Gn,Qn)),Mo={modelValue:{type:[String,Boolean,Number],default:!1},disabled:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[String,Number,Boolean],default:!0},inactiveValue:{type:[String,Number,Boolean],default:!1},loading:{type:Boolean,default:!1},name:{type:String,default:"loading1"},size:{type:[String,Number],default:"12px"},color:{type:String,default:""}},{componentName:sm,create:im}=G("switch"),cm=im({components:{Loading1:ne.Loading1},props:{...Mo},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=sm;return{[i]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${i}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const s=i=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,i)};return t.watch(()=>e.modelValue,i=>{r=="click"?r="":n("change",i)}),{classes:o,style:l,isActive:a,onClick:s}}}),um={class:"fox-switch-button"};function dm(e,n,a,o,l,r){const s=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...i)=>e.onClick&&e.onClick(...i)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",um,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(s,{name:"loading",color:e.activeColor},null,8,["color"])]):t.createCommentVNode("",!0),e.activeText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label open"},t.toDisplayString(e.activeText),513),[[t.vShow,e.isActive]]),t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label close"},t.toDisplayString(e.inactiveText),513),[[t.vShow,!e.isActive]])],64)):t.createCommentVNode("",!0)])],6)}const Zn=te(cm,[["render",dm]]);function fm(e,n,a,o){return{props:{...me,...ye,...Mo},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=Ie(l,"modelValue",null,c),u=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const k={...be(l,Mo),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":u},y=[],v=t.h(o,k);y.push(v);const b={default:()=>y};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const d=be(l,ye,me);return d["content-class"]=f,t.h(a,{...d,prop:`${l.prop}_item`},b)}}}}const{componentName:mm,create:pm,scope:hm}=G("switch-item"),fl=pm(fm(mm,hm,we,Zn));function gm(e,n,a,o){return{props:{...me,...ye,placeholder:{type:String,default:""},textAlign:{type:String},modelValue:{type:[String],required:!1},desc:{type:[String],required:!1},icon:{type:[Object],required:!1},iconSize:{type:[String],required:!1,default:""}},emits:["click","focus","blur","change"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=se.useFoxI18n(n),p=f(l,["placeholder"]),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,x=>{u.value=x,c("change",x)});const h=t.computed(()=>({[`${e}`]:!0})),k=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!s.value&&ue(u.value),"is-disabled":s.value,"is-readonly":i.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),v=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),b=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),d=t.computed(()=>ue(u.value)?p.placeholder.value:u.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),S=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),N=()=>{c("focus",u.value)},C=()=>{c("blur",u.value)},w=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),B=t.computed(()=>ve(l.unit)>0),V=x=>{s.value==!0||i.value==!0||c("click")},T=t.computed(()=>l.icon??a),A=t.computed(()=>({action:!0}));return()=>{const x=[];if(typeof r.slots.content=="function"){const q=r.slots.content();x.push(q)}else{const q=[];if(b.value){const z={tabIndex:0,class:k.value,style:v.value,onFocus:N,onBlur:C};let P=null;r.slots.main?P=t.h("view",z,[r.slots.main(d.value)]):P=t.h("view",z,[d.value]),q.push(P)}if(m.value){const z={tabIndex:0,class:g.value,style:S.value,onFocus:N,onBlur:C};let P=null;r.slots.sub?P=t.h("view",z,[r.slots.sub(l.desc)]):P=t.h("view",z,[l.desc]),q.push(P)}const L={class:h.value,onClick:V},D=t.h("view",L,q);x.push(D)}const M=[],$=ce(l.iconSize);let E=r.slots.icon;if(!E){const q={width:$,height:$,class:["action-icon"]};E=t.h(T.value,q)}const F={class:A.value,onClick:V},I=t.h("view",F,{default:()=>[E]});if(M.push(I),B.value){const q=t.h("view",{},[l.unit]);M.push(q)}const j={class:w.value},U=t.h("view",j,{default:()=>M});x.push(U);const Z={default:()=>x};Z.label=r.slots.default,Z.prepend=r.slots.prepend,Z.append=r.slots.append,Z.fixedPreTip=r.slots.fixedPreTip,Z.fixedTip=r.slots.fixedTip;const _=be(l,ye,me);return t.h(o,{..._,prop:`${l.prop}_item`},Z)}}}}const{componentName:ym,create:vm,scope:bm}=G("link-item"),ml=vm(gm(ym,bm,ne.ArrowRight,we)),Po={count:{type:[String,Number],default:5},modelValue:{type:[String,Number],default:0},customIcon:{type:Object},size:{type:[String,Number],default:void 0},activeColor:{type:String,default:""},voidColor:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},touchable:{type:Boolean,default:!0},spacing:{type:[String,Number],default:void 0}},{create:km,componentName:Sm}=G("rate"),Cm=km({props:{...Po},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[Sm]:!0})),r=k=>{n("update:modelValue",k),n("change",k)},s=(k,y)=>{if(e.disabled||e.readonly)return;let v=0;y===1&&e.modelValue===y||(v=y,e.allowHalf&&k==2&&(v-=.5)),r(v)},i=(k,y,v)=>{let b=0;for(let d=y.value.length-1;d>=0;d--){const m=y.value[d];if(k>m.offsetLeft){v?b=d+(k>m.offsetLeft+m.clientWidth/2?1:.5):b=d+1;break}}return b},c=_e(),f={onTouchStart(k){!e.touchable||e.readonly||c.start(k)},onTouchMove(k){e.touchable&&(c.move(k),c.isHorizontal()&&o.value&&(k.preventDefault(),r(i(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),u=t.computed(()=>e.customIcon??ne.StarFillN);return{classes:l,...f,onClick:s,toPxDesc:ge,renderIcon:(k,y)=>t.h(k,y),rateRefs:o,refRandomId:p,slots:a,customIcon:u}}}),wm=["id"],Nm={class:"fox-rate-item__icon--full"},Bm={key:0,class:"fox-rate-item__icon--half"},Vm={key:1,class:"fox-rate-item__icon--half"};function Am(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),s=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:s,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+s,style:t.normalizeStyle(s<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Nm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||s>e.modelValue}]),onClick:i=>e.onClick(1,s)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>s?(t.openBlock(),t.createElementBlock("view",Bm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<s?(t.openBlock(),t.createElementBlock("view",Vm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:e.voidColor})),{class:"fox-rate-item__icon fox-rate-item__icon--disabled",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,wm))),128))],34)}const kt=te(Cm,[["render",Am]]);function Tm(e,n,a,o){return{props:{...me,...ye,...Po},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=Ie(l,"modelValue",null,c),u=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const k={...be(l,Po),disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":u},y=[],v=t.h(o,k);y.push(v);const b={default:()=>y};if(r.slots.default){const g=r.slots.default();b.label=()=>g}const d=be(l,ye,me);return d["content-class"]=f,t.h(a,d,b)}}}}const{componentName:$m,create:Em,scope:xm}=G("rate-item"),pl=Em(Tm($m,xm,we,kt)),Dm=/scroll|auto|overlay/i,Ds=window;function Im(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Lo(e,n=Ds){let a=e;for(;a&&a!==n&&Im(a);){const{overflowY:o}=window.getComputedStyle(a);if(Dm.test(o))return a;a=a.parentNode}return n}function Is(e,n=Ds){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=Lo(e.value,n))}),a}const qs=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,qm={modelValue:{type:[Boolean],default:!1},hasMore:{type:[Boolean],default:!0},threshold:{type:[Number],default:200},loadText:{type:[String]},loadMoreText:{type:[String]},useCapture:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1}};function Mm(e,n,a){return{props:{...qm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["pullText","loadText","loadMoreText"]),c=t.ref(),f=Is(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),u=t.computed(()=>({[e]:!0})),h=m=>m?m.offsetTop+h(m.offsetParent):0,k=()=>{let m=0,g=0,S="down";if(f.value==window){const N=qs();c.value&&(m=h(c.value)+c.value.offsetHeight-N-window.innerHeight),g=N}else{const{scrollHeight:N,clientHeight:C,scrollTop:w}=f.value;m=N-C-w,g=w}return p.beforeScrollTop>g?S="up":S="down",p.beforeScrollTop=g,l("scroll-change",g),m<=o.threshold&&S=="down"},y=()=>{Xe(()=>{if(!k()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},v=()=>{f.value&&f.value.addEventListener("scroll",y,o.useCapture)},b=()=>{f.value&&f.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{v(),o.immediate&&y()}),t.onUnmounted(()=>{b()});const d=t.ref(!1);return t.onActivated(()=>{d.value&&(d.value=!1,v())}),t.onDeactivated(()=>{d.value=!0,b()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},g=t.h("view",m,[r?.default?.()]),S=[];if(p.isInfiniting){let B=r?.loading?.()??null;if(!B){let A=r?.loadingIcon?.()??null;if(!A){const $={class:["fox-infinite__bottom-box__img"]};A=t.h(a,$)}const x={class:"fox-infinite__bottom-box__text"},M=t.h("view",x,[i.loadText.value]);B=[A,M]}const V={class:"fox-infinite__bottom-box"},T=t.h("view",V,B);S.push(T)}else if(!o.hasMore){let B=r?.finished?.()??null;if(!B){const V={class:"fox-infinite__bottom-tips"};B=t.h("view",V,[i.loadMoreText.value]),S.push(B)}}const N={class:"fox-infinite__bottom"},C=t.h("view",N,S),w={class:u.value,ref:c};return t.h("view",w,[g,C])}}}}const{componentName:Pm,create:Lm,scope:zm}=G("infinite-loading"),Jn=Lm(Mm(Pm,zm,ne.Loading)),{componentName:Fm,create:Rm}=G("button"),Om=Rm({components:{Loading:ne.Loading},props:{color:String,shape:{type:String,default:"round"},plain:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:n,slots:a}){const{type:o,size:l,shape:r,disabled:s,loading:i,color:c,plain:f,block:p}=t.toRefs(e),u=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=Fm;return{[y]:!0,[`${y}--${o.value}`]:o.value,[`${y}--${l.value}`]:l.value,[`${y}--${r.value}`]:r.value,[`${y}--plain`]:f.value,[`${y}--block`]:p.value,[`${y}--disabled`]:s.value,[`${y}--loading`]:i.value}}),k=t.computed(()=>{const y={};return c?.value&&(f.value?(y.color=c.value,y.background="#fff",c.value?.includes("gradient")||(y.borderColor=c.value)):(y.color="#fff",y.background=c.value)),y});return{handleClick:u,classes:h,getStyle:k}}}),Km={class:"fox-button__wrap"};function Um(e,n,a,o,l,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.createElementVNode("view",Km,[e.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-icon-loading"})):t.createCommentVNode("",!0),e.$slots.icon&&!e.loading?t.renderSlot(e.$slots,"icon",{key:1}):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass({"fox-button__text":e.$slots.icon||e.loading})},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)])],6)}const Pe=te(Om,[["render",Um]]),Hm={modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},label:{type:String,default:""},shape:{type:String,default:"round"},maxLength:{type:[String,Number],default:"9999"},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Object},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},autoblur:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},jm=(e,n,a)=>({props:{...Hm},emits:["change","update:modelValue","blur","focus","clear","search","click-input","keyup-input","click-left-icon","click-right-icon"],setup(o,{slots:l}){const{emitEvent:r}=Bt(),{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["placeholder"]),c=t.reactive({active:!1}),f=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),u=V=>{let A=V.target.value;o.maxLength&&A.length>Number(o.maxLength)&&(A=A.slice(0,Number(o.maxLength))),r("update:modelValue",A,V),r("change",A,V)},h=t.ref({}),k=V=>{let A=V.target.value;c.active=!0,h.value=o.focusStyle,r("focus",A,V)},y=V=>{setTimeout(()=>{c.active=!1},0);let A=V.target.value;o.maxLength&&A.length>Number(o.maxLength)&&(A=A.slice(0,Number(o.maxLength))),h.value={},r("blur",A,V)},v=V=>{r("update:modelValue","",V),r("change","",V),r("clear","")},b=t.computed(()=>String(o.modelValue).length>0),d=t.computed(()=>{const V={};return b.value||(V.display="none"),V}),m=V=>{o.autoblur&&w.value?.blur(),(typeof V.cancelable!="boolean"||V.cancelable)&&V.preventDefault(),r("search",o.modelValue)},g=V=>{r("keyup-input",V)},S=V=>{r("click-input",V)},N=V=>{r("click-left-icon",o.modelValue,V)},C=t.computed(()=>({textAlign:o.inputAlign})),w=t.ref(null);t.onMounted(()=>{o.autofocus&&w.value.focus()});const B=()=>{const V=[];if(l.leftin){const F={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:N},I=t.h("view",F,[l.leftin()]);V.push(I)}const T={class:`${e}__input-inner-input`,ref:w,style:C.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:S,onInput:u,onFocus:k,onBlur:y,onkeyup:g},A=t.h("input",T),x={class:[`${e}__input-inner`],action:"#",onSubmit:m},M=t.h("form",x,[A]);V.push(M);const $=[];if(o.clearable){const F={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:d.value,onClick:v},I=l?.clear?.()??o.clearIcon??a,j=t.h("view",F,[t.h(I)]);$.push(j)}if(l.rightin){const F={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},I=t.h("view",F,[l.rightin()]);$.push(I)}if($.length>0){const F={class:`${e}__input-inner-right`},I=t.h("view",F,$);V.push(I)}const E={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",E,V)};return()=>{const V=[];if(o.label){const x={class:`${e}__search-label`},M=t.h("span",x,[o.label]);V.push(M)}if(l.leftout){const x={class:[`${e}__search-icon`,`${e}__left-search-icon`]},M=t.h("view",x,[l.leftout()]);V.push(M)}const T=B();if(V.push(T),l.rightout){const x={class:[`${e}__search-icon`,`${e}__right-search-icon`]},M=t.h("view",x,[l.rightout()]);V.push(M)}const A={class:`${e}`,style:f.value};return t.h("view",A,V)}}}),{componentName:Wm,create:Ym,scope:Xm}=G("searchbar"),_n=Ym(jm(Wm,Xm,ne.CircleClose)),sn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,String,Object],default(){return[]}},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},textPosition:{type:[String],required:!1},source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},subTextKey:{type:String,required:!1,default:"subText"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number]},pageSize:{type:[Number],required:!1,default:10},optionsHeight:{type:[String],required:!1},multiple:{type:[Boolean]},position:{type:[String],default:"bottom"},closeOnClickOverlay:{type:[Boolean],default:!0},title:{type:[String]},confirmText:{type:[String]},loadText:{type:[String]},loadMoreText:{type:[String]},isAutoBackFill:{type:[Boolean]},showHeader:{type:[Boolean],default:!0},showFooter:{type:[Boolean],default:!0},showSearchbar:{type:[Boolean],default:!0},searchKey:{type:String,required:!1,default:"keyword"},seachPlaceholder:{type:String,required:!1},searchDelayTriggerClear:{type:Number,default:250},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0},beforeMethod:{type:Function},beforeClose:{type:Function}};function Qm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(cn(e,r)===a)return l}else if(o==="item"){if(qe(a,r))return l}else if(Ms(e,r)===a)return l}return-1}function cn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function br(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Ms(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Gm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Zm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Jm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,s,i){if(Array.isArray(a)){let f=a;typeof i=="function"&&(f=f.filter(i));let p=(o-1)*l,u=p+l;u>f.length&&(u=f.length);const h=f.slice(p,u);return{totalSize:f.length,page:h}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,s]);const c=Je(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(Ee(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function _m(){const e=t.getCurrentInstance();return new Jm(e.proxy)}function ep(e,n,a,o,l,r,s,i,c,f,p){return{props:{...sn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(u,{slots:h}){const{emitEvent:k}=Bt(),{toLocaleRefs:y}=se.useFoxI18n(n),v=y(u,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),b=_m(),d=t.ref([]),m=t.ref(0),g=t.ref(""),S=t.shallowRef(null),N=t.computed(()=>{const K={};return u.params&&Object.assign(K,u.params),ue(g.value)||(K[`${u.searchKey}`]=g.value),S.value&&Object.assign(K,S.value),K});let C=!0;const w=async(K,H,X)=>{try{if(V.value===!1)return;let R=null;ue(g.value)||(R=ee=>{const ae=cn(u,ee);if(typeof ae=="string"&&ae.includes(g.value))return!0;const re=br(u,ee);return!!(typeof re=="string"&&re.includes(g.value))});const Q=await b.load("actionsheet",K,H,X,N.value,C,R??void 0);C=!1,Array.isArray(Q)?(d.value=Q,m.value=1,V.value=!1):!Array.isArray(Q.page)||Q.page.length===0?(console.warn("[FoxUI] can not load more data"),V.value=!1):(Reflect.apply([].push,d.value,Q.page),m.value=Math.ceil(d.value.length/u.pageSize),(Q.totalSize&&d.value.length>=Q.totalSize||X<Q.page.length)&&(V.value=!1)),B.value=!1}catch(R){console.error("[FoxUI] ActionSheet load more data fail",R),V.value=!0,m.value=0,d.value=[]}setTimeout(()=>{k("loaded-data")},250)},B=t.ref(!1),V=t.ref(!0),T=async()=>{if(!u.source){B.value=!1;return}await w(u.source,m.value+1,u.pageSize)};let A=null;t.watch(g,(K,H)=>{A&&(clearTimeout(A),A=null),ue(K)&&!ue(H)&&(A=setTimeout(()=>{M()},u.searchDelayTriggerClear))});const x=()=>{V.value=!0,m.value=0,d.value=[],u.source&&T()},M=()=>{x()};t.watch([()=>u.source,()=>u.pageSize,()=>u.params],async([K,H,X])=>{u.source&&x()},{immediate:!0});const $=t.computed(()=>!u.multiple&&u.isAutoBackFill),E=t.ref([]);let F=null;const I=t.ref(u.visible);t.watch(()=>u.visible,K=>{I.value!==K&&(I.value=K),K?F=[...E.value]:F=null});const j=(K,H)=>{const X=[];return Array.isArray(K)||(K=[K]),K.forEach(R=>{let Q=Qm(u,H,R,u.valueType);Q!==-1&&X.push(Q)}),qe(X,E.value)?!1:(E.value=X,!0)};t.watch([()=>u.modelValue,()=>d.value],([K,H],[X,R])=>{if(j(K,H)){const ee=U();Z(ee)}},{deep:!0});const U=()=>{const K=[],H=[],X=[];for(let ae of E.value){const re=d.value[ae];H.push(re);const pe=cn(u,re);if(X.push(pe),u.valueType==="item")K.push(re);else if(u.valueType==="text")K.push(pe);else{const ke=Ms(u,re);K.push(ke)}}let R=null,Q=null,ee=null;return u.multiple?(R=K,Q=X,ee=H):(R=K[0]??null,Q=X[0]??null,ee=H[0]??null),{value:R,text:Q,item:ee}},Z=K=>{k("update:modelValue",K.value),k("update:text",K.text),k("change",K.value,K.item,K.text)},_=()=>{F&&(E.value=F)},W=K=>{const H=E.value.indexOf(K);u.multiple?H===-1?E.value.push(K):E.value.splice(H,1):H===-1?E.value=[K]:E.value=[],($.value||!u.poppable&&!u.showFooter)&&D()},q=K=>{I.value=K,k("update:visible",K)},L=()=>{const K=()=>{_(),q(!1)},H=u.beforeMethod??u.beforeClose;if(typeof H=="function"){const X=H("close");gt(X)?X.then(R=>{R!==!1&&K()}).catch(()=>{K()}):X!==!1&&K()}else K()},D=()=>{const K=U(),H=()=>{Z(K),q(!1)},X=u.beforeMethod??u.beforeClose;if(typeof X=="function"){const R=X("confirm",K.value,K.item,K.text);gt(R)?R.then(Q=>{Q!==!1&&H()}).catch(()=>{H()}):R!==!1&&H()}else H()},z=()=>{let K=v.title.value??"";h.title&&(K=h.title());const H=t.h("view",{class:["fox-actionsheet__header-title"]},[K]),X=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:L});return t.h("view",{class:["fox-actionsheet__header"]},[H,X])},P=()=>{let K=null;if(h.search)K=h.search();else{const H={onSearch:x,placeholder:v.seachPlaceholder.value,disabled:u.disabled,modelValue:g.value,"onUpdate:modelValue":X=>{g.value=X}};K=t.h(r,H,{leftin:()=>t.h(f)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[K])},O=(K,H,X,R,Q)=>{if(h.optionLabel)return h.optionLabel({text:K,checked:H,disabled:X,subText:R,item:Q});const ee=[],ae=t.h("view",{class:"fox-actionsheet__list-item-text"},[K]);if(ee.push(ae),R){const re=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[R]);ee.push(re)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ee)},Y=(K,H,X,R)=>{if(h.optionIcon)return h.optionIcon({checked:K,disabled:H,iconSize:X,item:R});if(K){if(h.checkedIcon)return h.checkedIcon({disabled:H,item:R});{const Q=u.checkedIcon??i;return t.h(Q,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}else{if(h.icon)return h.icon({disabled:H,item:R});{const Q=u.icon??s;return t.h(Q,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}},J=()=>{const K=[];for(let H=0;H<d.value.length;H++){const X=d.value[H],R=cn(u,X),Q=br(u,X),ee=["fox-actionsheet__list-item"],ae={};let re=Gm(u,X),pe=u.iconSize?ce(u.iconSize):null;const ke=Zm(u,X,H);ke&&(re=re||ke.disabled,ke.class&&ee.push(ke.class),ke.style&&Object.assign(ae,ke.style)),re=!!(u.disabled||re);const Oe=E.value.includes(H);re&&ee.push("is-disabled"),Oe&&ee.push("is-checked");const no={class:ee,style:ae,key:`${H}`,onClick:()=>{re||W(H)}};let Tt=[];if(h.option)Tt.push(h.option({item:X,checked:Oe,disabled:re}));else{const Hs=O(R,Oe,re,Q,X);Tt.push(Hs);const js=Y(Oe,re,pe,X);Tt.push(js),u.textPosition==="right"&&Tt.reverse()}const Us=t.h("view",no,Tt);K.push(Us)}return K},oe=()=>{let K=[];if(h.buttons)K=h.buttons();else{const X=t.h(l,{type:"primary",block:"block",onClick:D,disabled:u.disabled},{default:()=>v.confirmText.value});K.push(X)}return t.h("view",{class:"fox-actionsheet__footer"},[K])};return De({search:async(K=null,H=!0)=>{S.value=K&&t.toRaw(K),t.triggerRef(S),H&&(V.value=!0,m.value=0,d.value=[]),t.nextTick(()=>{T()})},clear:()=>{V.value=!0,m.value=0,d.value=[]},confirm:()=>{D()},cancel:()=>{L()}}),()=>{const K=[];if(u.showHeader){const pe=z();K.push(pe)}if(u.showSearchbar){const pe=P();K.push(pe)}let H=null;if(h.content)H=h.content();else{const pe=J(),ke={hasMore:V.value,loadText:v.loadText.value,loadMoreText:v.loadMoreText.value,modelValue:B.value,"onUpdate:modelValue":Oe=>{B.value=Oe},onLoadMore:T};H=t.h(o,ke,{default:()=>pe})}const X={};u.optionsHeight&&(X.height=u.optionsHeight);const R={"fox-actionsheet__list":!0};u.poppable||(R["fox-actionsheet__list--inner"]=!0);const Q=t.h("view",{class:R,style:X},[H]);if(K.push(Q),u.showFooter&&!$.value){const pe=oe();K.push(pe)}const ee=t.h("view",{class:"fox-actionsheet"},K);if(!u.poppable)return ee;const ae=["fox-actionsheet__popup"];u.popClass&&ae.push(u.popClass);const re={popClass:ae.join(" "),visible:I.value,closeable:!1,"onUpdate:visible":q,position:u.position,round:"round",onClickOverlay:L,closeOnClickOverlay:u.closeOnClickOverlay};return t.h(a,re,{default:()=>ee})}}}}const{componentName:tp,create:np,scope:op}=G("actionsheet-pane"),eo=np(ep(tp,op,de,Jn,Pe,_n,ne.CheckNormal,ne.Checked,ne.Close,ne.Search2)),kr={type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},actionSheetClass:{type:String},separator:{type:[String],required:!1,defualt:" "}};function lp(e,n,a,o,l,r,s){return{props:{...me,...ye,...kr,...sn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Ie(i,"modelValue",null,u),b=t.ref(""),d=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),S=Ve(t.computed(()=>i.textAlign),"textAlign"),N=t.computed(()=>{const D={};return S.value&&(D["text-align"]=S.value),D}),C=t.ref(!1),w=()=>{C.value=!0},B=D=>{C.value=D},V=D=>{v.value=D,u("update:modelValue",D)},T=(D,z)=>{u("change",D,z)},A=D=>{let P=D.target.value;y.value=!0,u("focus",P,D)},x=D=>{setTimeout(()=>{y.value=!1},0);let P=D.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),u("blur",P,D)},M=D=>{b.value=D,u("update:text",D)},$=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),E=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),I=t.computed(()=>({hidden:!F.value})),j=D=>{v.value="",u("update:modelValue","",D),u("change","",D),u("clear","")},U=t.computed(()=>i.clearable&&!f.value&&!p.value),Z=t.computed(()=>ve(v.value)>0&&y.value),_=D=>{Z.value?j(D):w()},W=t.computed(()=>Z.value&&U.value?o:l),q=t.computed(()=>({action:!0})),L=t.ref(null);return De({search:D=>{L.value&&L.value.search(D)},clear:()=>{L.value&&L.value.clear},confirm:D=>{L.value&&L.value.confirm()},cancel:()=>{L.value&&L.value.cancel()}}),()=>{const D={class:g.value,style:N.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:w,onFocus:A,onBlur:x};s&&(D.disabled=!0);const z=[],P=t.h("input",D);z.push(P);const O=[],Y={class:["action-icon"]},J=t.h(W.value,Y),oe={class:q.value,onClick:_},K=t.h("view",oe,{default:()=>[J]});if(O.push(K),E.value){const ke=t.h("view",{class:I.value},[i.unit]);O.push(ke)}const H={class:$.value},X=t.h("view",H,{default:()=>O});z.push(X);const R={default:()=>z};R.label=c.slots.default,R.prepend=c.slots.prepend,R.append=c.slots.append,R.fixedPreTip=c.slots.fixedPreTip,R.fixedTip=c.slots.fixedTip;const Q=be(i,sn);Q.ref=L,Q.class=i.actionsheetProps,Q.disabled=f.value||p.value,Q.visible=C.value,Q["onUpdate:visible"]=B,Q.modelValue=v.value,Q["onUpdate:modelValue"]=V,Q.text=b.value,Q["onUpdate:text"]=M,Q.onChange=T,Q.poppable=!0,Q["text-position"]=i.textPosition;const ee={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},ae=t.h(r,Q,ee);R.hide=()=>[ae];const re=Nt(i,kr,sn);return t.h(a,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:ap,create:rp,scope:sp}=G("actionsheet-item"),hl=rp(lp(ap,sp,we,ne.CircleClose,ne.ArrowRight,eo)),zo={modelValue:{type:[Number,String],default:0},inputWidth:{type:[Number,String],default:""},buttonSize:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:9999},step:{type:[Number,String],default:1},decimalPlaces:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{componentName:ip,create:cp}=G("input-number"),up=cp({components:{Minus:ne.Minus,Plus:ne.Plus},props:{...zo},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const k=ip;return{[k]:!0,[`${k}--disabled`]:e.disabled}}),o=k=>Number(k).toFixed(Number(e.decimalPlaces)),l=k=>{const y=k.target;n("update:modelValue",y.valueAsNumber,k)},r=(k,y)=>{let v=o(k);n("update:modelValue",v,y),n("change",v,y)},s=(k=Number(e.modelValue))=>k<Number(e.max)&&!e.disabled,i=(k=Number(e.modelValue))=>k>Number(e.min)&&!e.disabled,c=k=>{if(n("reduce",k),i()){let y=Number(e.modelValue)-Number(e.step);r(y,k)}else n("overlimit",k,"reduce")},f=k=>{if(n("add",k),s()){let y=Number(e.modelValue)+Number(e.step);r(y,k)}else n("overlimit",k,"add")},p=k=>{e.disabled||e.readonly||n("focus",k)},u=k=>{if(e.disabled||e.readonly)return;let v=k.target.valueAsNumber;v<Number(e.min)?v=Number(e.min):v>Number(e.max)&&(v=Number(e.max)),r(v,k),n("blur",k)},h=k=>{let y=Number(k);return y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),y};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const k=h(e.modelValue);k!==Number(e.modelValue)&&r(k,{})}),{classes:a,change:l,blur:u,focus:p,add:f,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),dp=["min","max","disabled","readonly","value"];function fp(e,n,a,o,l,r){const s=t.resolveComponent("Minus"),i=t.resolveComponent("Plus");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__left",{"fox-input-number__icon--disabled":!e.reduceAllow()}]),onClick:n[0]||(n[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2),t.createElementVNode("input",{type:"number",min:e.min,max:e.max,style:t.normalizeStyle({width:e.toPxDesc(e.inputWidth),height:e.toPxDesc(e.buttonSize)}),disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[1]||(n[1]=(...c)=>e.change&&e.change(...c)),onBlur:n[2]||(n[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:n[3]||(n[3]=(...c)=>e.focus&&e.focus(...c))},null,44,dp),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:n[4]||(n[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(i,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const Ze=te(up,[["render",fp]]);function mp(e,n,a,o){return{props:{...me,...ye,...zo},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!s.value&&!i.value}},l.prop??r.attrs.name),f=e,p=Ie(l,"modelValue",null,c),u=y=>{p.value=y,c("update:modelValue",y,{}),c("change",y,{})},h=y=>{c("add",y)},k=y=>{c("reduce",y)};return()=>{const y={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},v=be(l,zo),d={...r.attrs,...v,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":u,onAdd:h,onReduce:k},m=t.h(o,d,y),g=[];g.push(m);const S={default:()=>g};S.label=r.slots.default,S.fixedPreTip=r.slots.fixedPreTip,S.fixedTip=r.slots.fixedTip;const N=be(l,ye,me);return N["content-class"]=f,t.h(a,{...N,prop:`${l.prop}_item`},S)}}}}const{componentName:pp,create:hp,scope:gp}=G("inputnumber-item"),gl=hp(mp(pp,gp,we,Ze)),yp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},align:{type:[String]},modelValue:{type:[Number,Boolean,String]},disabled:{type:[Boolean,String],required:!1},data:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},visibleKey:{type:String,required:!1,default:"visible"},statusKey:{type:String,required:!1,default:"status"},doitKey:{type:String,required:!1,default:"doit"},labelKey:{type:String,required:!1,default:"label"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[String]},iconSize:{type:[String,Number]},markIcon:{type:[String]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function vp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Sr(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Cr(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function bp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function mo(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function wr(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Nr(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function po(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let kp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await Reflect.apply(a,null,[o]);const l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function Sp(){const e=t.getCurrentInstance();return new kp(e.proxy)}function Cp(e,n,a,o){return{props:{...yp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=Sp(),f=t.ref([]),p=t.computed(()=>f.value.filter(q=>bp(l,q)!==!1)),u=t.ref(-1),h=()=>{const q=l.modelValue,L=p.value.findIndex(D=>Sr(l,D)===q);u.value!==L&&(u.value=L,l.scroll&&_(L,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const k=q=>u.value===q,y=q=>{if(q<0&&q>=p.value.length)return!1;const L=p.value[q],z=(po(l,L,q)??{}).status??mo(l,L);return k(q)||z},v=t.computed(()=>{const q={[i]:!0};return l.mode?q[`is-${l.mode}`]=!0:l.direction&&(q[`is-${l.direction}`]=!0),l.scroll&&(q["is-scroll"]=!0),q}),b=t.computed(()=>({})),d=(q,L,D,z,P)=>{const O={[`${i}__step`]:!0};return P&&(O[`${P}`]=!0),O[`${m.value}`]=!0,z&&(O["is-doit"]=!0),q===u.value?O["is-active"]=!0:L==="done"?O["is-done"]=!0:L==="error"?O["is-error"]=!0:L==="half"?O["is-half"]=!0:D?O["is-disabled"]=!0:O["is-normal"]=!0,O},m=t.computed(()=>{if(l.mode==="simple")return"start";let q=l.align;return q||(l.direction==="vertical"?q="start":q="center"),q}),g=(q,L={})=>{const D={...L};return m.value==="start"&&q===p.value.length-1?D.flex="0 0 auto":l.step?l.direction==="vertical"?D.height=l.step:D.width=l.step:D.flex="1 1 100%",D},S=(q,L)=>{let D={};if(L<p.value.length-1){const z=L+1;y(L)&&y(z)?l.direction==="vertical"?D.height="100%":D.width="100%":D.opacity="0"}return D},N=q=>p.value.length-1===q,C=(q,L)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&L>u.value||u.value===L)return;const D=u.value,z=L;u.value=L,l.scroll&&_(L,!1);const P=Sr(l,q);s("update:modelValue",P);const O={fromIndex:D,currentIndex:z,item:q,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",P,O)},w=t.ref(!0),B=async(q,L)=>{try{const D=await c.load("stesbar",q,L);Array.isArray(D)&&(f.value=D),w.value=!1}catch(D){console.error("[FoxUI] Load StepsBar Data Fail",D),f.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([q,L])=>{q&&B(q,L)},{immediate:!0});const V=(q,L,D,z,P)=>{let O=null;if(r.icon)O=r.icon({item:q,index:L,status:z});else if(z==="done"){const J={};l.iconSize&&(J.width=l.iconSize,J.height=l.iconSize);const oe=l.icon??a;O=t.h(oe,J)}else{const J=D??`${L+1}`;O=t.h("span",{},[J])}const Y={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:q,index:L}),!P&&C(q,L)}};return t.h("view",Y,[O])},T=(q,L,D)=>{const z=t.h("i",{class:"fox-steps-bar__line-inner",style:S(q,L)});return t.h("view",{class:"fox-steps-bar__line"},[z])},A=()=>{let q=null;if(r.markIcon)q=r.markIcon();else{const D={};l.iconSize&&(D.width=l.markIconSize,D.height=l.markIconSize);const z=l.markIcon??o;q=t.h(z,D)}return t.h("view",{class:"fox-steps-bar__mark"},[q])},x=(q,L,D,z,P)=>{const O=[];if(!N(L)){const oe=T(q,L);O.push(oe)}const Y=V(q,L,D,z,P);O.push(Y);const J={class:"fox-steps-bar__head"};return t.h("view",J,O)},M=(q,L,D,z)=>{let P=null;r.main?P=r.main({item:q,index:L,status:D}):P=vp(l,q);const O={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:q,index:L}),!z&&C(q,L)}};return t.h("view",O,[P])},$=(q,L,D)=>{let z=null;if(r.sub){z=r.sub({item:q,index:L,status:D});const P={class:"fox-steps-bar__sub"};return t.h("view",P,[z])}return null},E=(q,L)=>{const D=po(l,q,L)??{},z=D.status??mo(l,q);let P=Cr(l,q);D.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const O=D.label??Nr(l,q),Y=[],J=V(q,L,O,z,P);J&&Y.push(J);const oe=M(q,L,z,P);if(oe&&Y.push(oe),!N(L)){const ee=T(q,L);ee&&Y.push(ee)}const K=t.h("view",{class:"fox-steps-bar__head"},Y),H=D.class,X=D.style??{};let R=wr(l,q);D.doit===!0&&(R=!0);const Q={ref:Z(L),class:d(L,z,P,R,H),style:g(L,X)};return t.h("view",Q,[K])},F=(q,L)=>{const D=po(l,q,L)??{},z=D.status??mo(l,q);let P=Cr(l,q);D.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const O=D.label??Nr(l,q),Y=[],J=l.layout;for(let R of J)if(R==="head"){const Q=x(q,L,O,z,P);Y.push(Q)}else if(R==="main"){const Q=M(q,L,z,P);Y.push(Q)}else if(R==="sub"){const Q=$(q,L,z);Y.push(Q)}else if(R==="mark"){const Q=A();Y.push(Q)}const oe=D.class,K=D.style??{};let H=wr(l,q);D.doit===!0&&(H=!0);const X={ref:Z(L),class:d(L,z,P,H,oe),style:g(L,K)};return t.h("view",X,Y)},I=t.ref(),j=t.ref([]),U=(q,L)=>{j.value[L]=q},Z=q=>L=>{U(L,q)},_=(q,L)=>{const D=I.value,z=j.value;if(!D||!z||!z[q])return;const P=z[q];let O=0;l.direction==="vertical"?O=P.offsetTop-(D.offsetHeight-P.offsetHeight)/2:O=P.offsetLeft-(D.offsetWidth-P.offsetWidth)/2,W(D,O,L?0:.3,l.direction)},W=(q,L,D,z)=>{let P=0;const O=z==="horizontal"?q.scrollLeft:q.scrollTop,Y=D===0?1:Math.round(D*1e3/16);function J(){z==="horizontal"?q.scrollLeft+=(L-O)/Y:q.scrollTop+=(L-O)/Y,++P<Y&&Ke(J)}J()};return()=>{const q=[];if(l.mode==="simple")for(let D=0;D<p.value.length;D++){const z=p.value[D],P=E(z,D);q.push(P)}else for(let D=0;D<p.value.length;D++){const z=p.value[D],P=F(z,D);q.push(P)}const L={ref:I,class:v.value,style:b.value};return t.h("view",L,q)}}}}const{componentName:wp,create:Np,scope:Bp}=G("steps-bar"),yl=Np(Cp(wp,Bp,ne.Checklist,ne.ArrowRight));function Vp(e){e.stopPropagation()}class Ap{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(n,a){this.startMove=n,this.updateMove=a,this.isTouch=ol()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=ll(),o=(l,r,s,i)=>{this.updateMove({x:l,y:r})};this.touchstart=l=>{this.moving||(a.start(l),this.startMove({x:a.state.startX,y:a.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=l=>{this.moving&&(a.move(l),Vp(l),o(a.state.deltaX,a.state.deltaY))},this.touchend=()=>{o(a.state.deltaX,a.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),a.reset(),this.moving=!1},this.els.forEach(l=>{this.touchstart&&l.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(n=>{this.touchstart&&n.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function Tp(e,n){return new Ap(e,n)}const $p={customClass:{type:[String]},top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},borderRadius:{type:[String]},draggable:{type:[Boolean]}},Ep=(e,n,a,o=!1)=>({props:{...$p},emits:["click"],setup(l,{slots:r,emit:s}){const i=t.reactive({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),c=t.computed(()=>{const m=[`${e}`];return l.customClass&&m.push(l.customClass),m}),f=t.computed(()=>{const m={};return ue(i.top)||(m.top=i.top),ue(i.right)||(m.right=i.right),ue(i.bottom)||(m.bottom=i.bottom),ue(i.left)||(m.left=i.left),ue(l.width)||(m.width=l.width),ue(l.height)||(m.height=l.height),ue(l.color)||(m.color=l.color),ue(l.background)||(m.background=l.background),ue(l.borderRadius)||(m["border-radius"]=l.borderRadius),m}),p=t.computed(()=>({[`${e}__icon`]:!0})),u=()=>{s("click")},h=t.ref(null),k=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},y={x:0,y:0},d=Tp(m=>{if(!h.value)return;const g=h.value;k(),i.left=g.offsetLeft,i.top=g.offsetTop,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`,g.style.right=null,g.style.bottom=null,y.x=i.left,y.y=i.top},m=>{if(!h.value)return;const g=h.value;k(),i.left=y.x+m.x,i.top=y.y+m.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const m=[h.value];d.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&d.close()}),()=>{let m=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)m=g;else{const N=t.h(a,{class:p.value});m.push(N)}const S={ref:N=>{h.value=N},class:c.value,style:f.value,onClick:u};return t.h("view",S,m)}}}),{componentName:xp,create:Dp,scope:Ip}=G("floating-button"),vl=Dp(Ep(xp,Ip,ne.Uploader,!1)),qp={modelValue:{type:[Boolean],requried:!0},type:{type:[String],requried:!1,default:""},disabled:{type:[Boolean,String],requried:!1},textPosition:{type:[String],requried:!1},collapseText:{type:[String],requried:!1,default:"收起"},expandText:{type:[String],requried:!1,default:"更多"},icon:{type:[Object],requried:!1}};function Mp(e,n,a){return{props:{...qp},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const u={[`${e}`]:!0};return o.disabled?u[`${e}--disabled`]=!0:u[`${e}--${o.type}`]=!0,u}),s=Ie(o,"modelValue"),i=t.computed(()=>s.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),f=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!s.value,"is-collapse":s.value})),p=()=>{l("update:modelValue",!s.value)};return()=>{const u=[];if(i.value){const b={class:c.value},d=t.h("span",b,[i.value]);u.push(d)}const h={class:f.value},k=o.icon??a,y=t.h(k,h);return u.push(y),o.textPosition==="right"&&u.reverse(),t.h("view",{class:r.value,onClick:p},u)}}}}const{componentName:Pp,create:Lp,scope:zp}=G("more-button"),bl=Lp(Mp(Pp,zp,ne.RectUp)),Fp={width:{type:[String,Number]},height:{type:[String,Number]},type:{type:[String],required:!1,default:"info"},icon:{type:[String,Object],required:!1},closeIcon:{type:[String,Object],required:!1},showClose:{type:[Boolean],required:!1},title:{type:[String],required:!1},message:{type:[Array,String,Object],required:!1},showConfirmButton:{type:[Boolean],required:!1},confirmButtonText:{type:[String],required:!1},confirmText:{type:[String],required:!1},confirmButtonClass:{type:[String],required:!1},confirmButtonStyle:{type:[Object],required:!1},showCancelButton:{type:[Boolean],required:!1},cancelButtonText:{type:[String],required:!1},cancelText:{type:[String],required:!1},cancelButtonClass:{type:[String],required:!1},cancelButtonStyle:{type:[Object],required:!1},popClass:{type:[String]},position:{type:[String],default:"center"},closeOnClickOverlay:{type:[Boolean],required:!1,default:!0},unmount:{type:[Function],required:!1},callback:{type:[Function],required:!1}},Rp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Op(e,n,a){return{props:{...Fp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,f=t.ref(!0),p=S=>{f.value=S},u=S=>{if(typeof o.unmount=="function")try{o.unmount()}catch(N){console.error(N)}if(typeof o.callback=="function")try{o.callback(S)}catch(N){console.error(N)}},h=()=>{u("confirm")},k=()=>{u("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&u("close")},v=(S,N)=>Rp(S)?(N.src=S,t.h("img",N)):typeof S=="string"?(Array.isArray(N.class)?N.class.push(S):N.class&&typeof N.class=="object"?N[`${S}`]=!0:typeof N.class=="string"?N.class=`${N.class}, ${S}`:N.class=S,t.h(o.tag,N)):t.h(S,N),b=()=>{const S=[];if(o.icon){const C={class:[`${c}__header-icon`]},w=v(o.icon,C);S.push(w)}if(o.title){const C=t.h("view",{class:`${c}__header-title`},[o.title]);S.push(C)}if(o.showClose&&o.closeIcon){const C={class:[`${c}__header-close-icon`],onClick:y},w=v(o.closeIcon,C);S.push(w)}const N={class:[`${c}__header`]};return t.h("view",N,S)},d=(S,N)=>{const C=[];if(N){const B={class:`${c}__group-title`},V=t.h("view",B,[N]);C.push(V)}if(S){const B=[];Array.isArray(S)||(S=[S]);for(let V of S){const T={class:`${c}__group-row`,innerHTML:V},A=t.h("view",T);B.push(A)}if(B.length>0){const V={class:`${c}__group-rows`},T=t.h("view",V,B);C.push(T)}}if(C.length===0)return null;const w={class:`${c}__group`};return t.h("view",w,C)},m=()=>{const S=[];if(typeof o.message=="string")S.push(o.message);else if(Array.isArray(o.message))for(let C of o.message)if(typeof C=="string"){const w=d(C);S.push(w)}else{const w=d(C.content,C.title);S.push(w)}else if(typeof o.message=="function"){const C=o.message();S.push(C)}else{const C=o.message;S.push(C)}const N={class:`${c}__body`};return t.h("view",N,S)},g=()=>{const S=[];if(o.showCancelButton){const C={class:[`${c}__footer-button`],style:{},onClick:k};o.cancelButtonClass&&C.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(C.style,o.cancleButtonStyle);const w=t.h("button",C,[o.cancelButtonText??i.cancelText.value]);S.push(w)}if(o.showConfirmButton){const C={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&C.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(C.style,o.confirmButtonStyle);const w=t.h("button",C,[o.confirmButtonText??i.confirmText.value]);S.push(w)}if(S.length===0)return null;const N={class:`${c}__footer`};return t.h("view",N,S)};return()=>{const S=[],N=b();N&&S.push(N);const C=m();C&&S.push(C);const w=g();w&&S.push(w);const B={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},V=t.h("view",B,S),T=[`${c}__popup`];o.popClass&&T.push(o.popClass);const A={};o.width&&(A.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(A.height=typeof o.height=="number"?`${o.height}px`:o.height);const x={popClass:T.join(" "),style:A,visible:f.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,x,{default:()=>V})}}}}const{componentName:Kp,create:Up,scope:Hp}=G("messagebox"),jp=Up(Op(Kp,Hp,de)),Wp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M82.5121%201.93968L81.7498%206.07825C81.6498%206.6214%2081.1284%206.98064%2080.5853%206.8806C80.4326%206.85251%2080.2886%206.78925%2080.1646%206.69578L77.1586%204.43061C76.7175%204.09823%2076.6294%203.47123%2076.9618%203.03016C77.0552%202.90617%2077.1762%202.80562%2077.3153%202.73655L81.0834%200.863097C81.5779%200.617235%2082.1782%200.818843%2082.4241%201.31339C82.5204%201.50712%2082.5512%201.72688%2082.5121%201.93968Z'%20fill='%23FFD1C9'%20%3e%3c/path%3e%3cpath%20d='M3.08218%20102.2L6.53454%2094.2358C6.75419%2093.7291%207.34251%2093.4968%207.84925%2093.7164C7.99216%2093.7778%208.11815%2093.872%208.21791%2093.9909L13.2085%2099.9384C13.5635%20100.361%2013.5081%20100.992%2013.0852%20101.347C12.9665%20101.447%2012.8261%20101.518%2012.675%20101.554L4.23203%20103.571C3.69484%20103.699%203.15538%20103.367%203.02699%20102.83C2.97674%20102.62%202.99607%20102.399%203.08218%20102.2Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23FF5959'%20%3e%3c/circle%3e%3cpath%20d='M59.935%2049.6213C61.3827%2051.069%2061.3827%2053.4162%2059.935%2054.864L45.935%2068.864C44.4873%2070.3117%2042.1401%2070.3117%2040.6924%2068.864C39.2447%2067.4162%2039.2447%2065.069%2040.6924%2063.6213L54.6924%2049.6213C56.1401%2048.1736%2058.4873%2048.1736%2059.935%2049.6213Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3cpath%20d='M40.6924%2049.6213C39.2447%2051.069%2039.2447%2053.4162%2040.6924%2054.864L54.6924%2068.864C56.1401%2070.3117%2058.4873%2070.3117%2059.935%2068.864C61.3827%2067.4162%2061.3827%2065.069%2059.935%2063.6213L45.935%2049.6213C44.4873%2048.1736%2042.1401%2048.1736%2040.6924%2049.6213Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%23FFD1C9'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L102%20110L102%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Yp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cpath%20d='M8%2087L8%2095C8%2095.5523%207.55228%2096%207%2096C6.44772%2096%206%2095.5523%206%2095L6%2087L2%2087C1.44772%2087%201%2086.5523%201%2086C1%2085.4477%201.44772%2085%202%2085L6%2085L6%2082C6%2081.4477%206.44772%2081%207%2081C7.55228%2081%208%2081.4477%208%2082L8%2085L12%2085C12.5523%2085%2013%2085.4477%2013%2086C13%2086.5523%2012.5523%2087%2012%2087L8%2087Z'%20fill-rule='evenodd'%20fill='%2396CEFF'%20%3e%3c/path%3e%3cpath%20d='M89%205L89%2010C89%2010.5523%2088.5523%2011%2088%2011C87.4477%2011%2087%2010.5523%2087%2010L87%205L85%205C84.4477%205%2084%204.55228%2084%204C84%203.44772%2084.4477%203%2085%203L87%203L87%201C87%200.447715%2087.4477%200%2088%200C88.5523%200%2089%200.447715%2089%201L89%203L91%203C91.5523%203%2092%203.44772%2092%204C92%204.55228%2091.5523%205%2091%205L89%205Z'%20fill-rule='evenodd'%20fill='%23BDE2FF'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23237FFA'%20%3e%3c/circle%3e%3crect%20x='47.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%2396CEFF'%20%3e%3c/rect%3e%3crect%20x='47.5'%20y='66'%20width='7'%20height='7'%20rx='4'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3c/svg%3e",Xp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='105'%20viewBox='0%200%20102%20105'%20fill='none'%3e%3cpath%20d='M7%2076C7.55228%2076%208%2076.4477%208%2077L7.999%2079.999L12%2080C12.5523%2080%2013%2080.4477%2013%2081C13%2081.5523%2012.5523%2082%2012%2082L7.999%2081.999L8%2090C8%2090.5523%207.55228%2091%207%2091C6.44772%2091%206%2090.5523%206%2090L5.999%2081.999L2%2082C1.44772%2082%201%2081.5523%201%2081C1%2080.4477%201.44772%2080%202%2080L5.999%2079.999L6%2077C6%2076.4477%206.44772%2076%207%2076Z'%20fill='%2338D677'%20%3e%3c/path%3e%3cpath%20d='M75%201.72421e-32C75.5523%20-1.01453e-16%2076%200.447715%2076%201L76%202.999L78%203C78.5523%203%2079%203.44772%2079%204C79%204.55228%2078.5523%205%2078%205L76%204.999L76%2010C76%2010.5523%2075.5523%2011%2075%2011C74.4477%2011%2074%2010.5523%2074%2010L74%204.999L72%205C71.4477%205%2071%204.55228%2071%204C71%203.44772%2071.4477%203%2072%203L74%202.999L74%201C74%200.447715%2074.4477%201.01453e-16%2075%201.72421e-32Z'%20fill='%238BF0AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='54'%20r='28'%20fill='%2338D677'%20%3e%3c/circle%3e%3cpath%20d='M36.8787%2051.8786C38.3265%2050.4309%2040.6736%2050.4309%2042.1213%2051.8786L50.1214%2059.8786C51.5691%2061.3263%2051.5691%2063.6735%2050.1214%2065.1212C48.6737%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212L36.8787%2057.1212C35.431%2055.6735%2035.431%2053.3263%2036.8787%2051.8786Z'%20fill='%23B3F2C6'%20%3e%3c/path%3e%3cpath%20d='M64.1214%2045.8786C65.5691%2047.3263%2065.5691%2049.6735%2064.1214%2051.1212L50.1213%2065.1212C48.6736%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212C43.431%2063.6735%2043.431%2061.3263%2044.8787%2059.8786L58.8788%2045.8786C60.3265%2044.4309%2062.6737%2044.4309%2064.1214%2045.8786Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='14.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='101.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='25'%20r='7'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3c/svg%3e",Qp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='101'%20height='110'%20viewBox='0%200%20101%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M81.512%201.93968L80.7498%206.07825C80.6498%206.6214%2080.1284%206.98064%2079.5852%206.8806C79.4326%206.85251%2079.2886%206.78925%2079.1645%206.69578L76.1585%204.43061C75.7175%204.09823%2075.6293%203.47123%2075.9617%203.03016C76.0552%202.90617%2076.1761%202.80562%2076.3152%202.73655L80.0833%200.863097C80.5779%200.617235%2081.1781%200.818843%2081.424%201.31339C81.5203%201.50712%2081.5512%201.72688%2081.512%201.93968Z'%20fill='%23FEFAE0'%20%3e%3c/path%3e%3cpath%20d='M2.08224%20102.2L5.5346%2094.2358C5.75425%2093.7291%206.34257%2093.4968%206.84931%2093.7164C6.99222%2093.7778%207.11822%2093.872%207.21798%2093.9909L12.2086%2099.9384C12.5636%20100.361%2012.5082%20100.992%2012.0853%20101.347C11.9666%20101.447%2011.8261%20101.518%2011.675%20101.554L3.23209%20103.571C2.6949%20103.699%202.15544%20103.367%202.02705%20102.83C1.97681%20102.62%201.99613%20102.399%202.08224%20102.2Z'%20fill='%23FEE789'%20%3e%3c/path%3e%3ccircle%20cx='50'%20cy='59'%20r='28'%20fill='%23FAB007'%20%3e%3c/circle%3e%3crect%20x='46.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%23FEE789'%20%3e%3c/rect%3e%3crect%20x='46.5'%20y='66'%20width='7'%20height='7'%20rx='3.5'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='84.5'%20cy='106.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='94'%20cy='30'%20r='7'%20fill='%23FEE789'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L101%20110L101%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Gp=new Fn,Zp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Jp=e=>{let n=document.body,a=e.teleport;a!="body"&&(typeof a=="string"?n=document.querySelector(a):a&&(n=e.teleport));const o=document.createElement("view"),l=`messagebox-${Gp.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const s=document.querySelector(`#${l}`);s&&s.parentNode?.removeChild(s)};const r=t.createVNode(jp,e);n.appendChild(o),t.render(r,o)},ot={show:(e,n,a,o)=>{const l={...Zp};n&&!Array.isArray(n)&&typeof n=="object"?Object.assign(l,n):(n&&(l.message=n),a&&typeof a=="object"?Object.assign(l,a):(typeof a=="string"&&(l.title=a),o&&typeof o=="object"?Object.assign(l,o):typeof o=="string"&&(l.type=o)));const r=l.type??"info";return l.icon||(r==="success"?l.icon=Xp:r==="warning"?l.icon=Qp:r==="error"?l.icon=Wp:l.icon=Yp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=ne.Close),new Promise((s,i)=>{const c=l.callback;l.callback=f=>{if(typeof c=="function")try{c(f)}catch(p){console.error(p)}s({action:f})},Jp(l)})},alert:(e,n,a)=>ot.show("alert",e,n,a),confirm:(e,n,a)=>ot.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ot.alert,e.config.globalProperties.$confirm=ot.confirm}},_p=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let i in n)i==="bubbles"?l=!!n[i]:i==="cancelable"?r=!!n[i]:o[i]=n[i];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},eh=new Fn,th=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),nh=e=>`${e}-${eh.get()}`,oh=Symbol.for("InnerPageScopeKey"),lh=Symbol.for("PageWrapperKey"),ah="FoxLeave",rh="FoxLeaveEnd",sh={width:{type:[String,Number]},height:{type:[String,Number]},closeOnClickOverlay:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!0},showDelay:{type:Number,default:10},showClose:{type:Boolean,default:!0},closeIcon:{type:Object},showHeader:{type:Boolean,default:!1},popClass:{type:String},popStyle:{type:Object},position:{type:String,default:"center"},mode:{type:String}};function ih(e,n,a,o){return{props:{...Fe,...sh},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(oh,!0);const c={};t.provide(lh,c);const f=C=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{f()},u=e,h=C=>{k.value=C,i("update:visible",C)},k=t.ref(!1),y=(C,w)=>th(C)?(w.src=C,t.h("img",w)):typeof C=="string"?(Array.isArray(w.class)?w.class.push(C):w.class&&typeof w.class=="object"?w[`${C}`]=!0:typeof w.class=="string"?w.class=`${w.class}, ${C}`:w.class=C,t.h(l.tag,w)):t.h(C,w),v=()=>{if(!l.showHeader)return null;const C=[];if(s.header){const B=s.header();C.push(B)}else if(l.title){const B=t.h("view",{class:`${u}__header-title`},[l.title]);C.push(B)}if(C.length===0)return null;const w={class:[`${u}__header`]};return t.h("view",w,C)},b=()=>{if(!l.showClose)return null;const C={class:[`${u}__close-icon`],onClick:p},w=l.closeIcon??o;return y(w,C)};let d=null;const m=C=>{_p(rh,{},d)},g=nh(e),S=()=>{h(!0)},N=()=>{if(!d)return;const C=d.querySelector(".fox-overlay");C&&(C.classList.add("overlay-fade-leave-active"),C.classList.add("overlay-fade-leave-to"));const w=d.querySelector(".fox-popup");w&&(w.classList.add(`fox-popup-slide-${l.position}-leave-active`),w.classList.add(`fox-popup-slide-${l.position}-leave-to`),w.addEventListener("animationend",m,{once:!0}),w.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{d=document.querySelector(`.${g}`),d?.addEventListener(ah,N,{once:!0}),S()}),()=>{const C=[],w=v();w&&C.push(w);const B=b();B&&C.push(B);const V=s.default?s.default():[];Reflect.apply([].push,C,V);const T={[`${u}`]:!0};l.mode&&(T[`${u}--${l.mode}`]=!0);const A={class:T},x=t.h("view",A,C),M=[`${u}__popup`,g];l.popClass&&M.push(l.popClass),l.position&&M.push(`${u}__popup--${l.position}`);const $={};l.width&&($.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&($.height=typeof l.height=="number"?`${l.height}px`:l.height);const F={...be(l,Fe),popClass:M.join(" "),style:$,visible:k.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},I=t.h(a,F,{default:()=>x});return t.h("div",{class:[`${u}__root`,g]},[I])}}}}const{componentName:ch,create:uh,scope:dh}=G("popup-wrapper"),kl=uh(ih(ch,dh,de,ne.Close)),fh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function mh(e,n,a,o){return{props:{...fh},emits:["update:visible"],setup(l,{emit:r,slots:s}){const i=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const f={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":i},p=t.h(a,f,s),u={class:`${e}`};return t.h("view",u,[p])}}}}const{componentName:ph,create:hh,scope:gh}=G("dropdown"),Sl=hh(mh(ph,gh,de));function yh(e,n){const a=document.createRange();a.setStart(e,0),a.setEnd(e,e.childNodes.length);const o=a.getBoundingClientRect().width;if(o>0){n(o);return}e.classList.add("is-selectable"),setTimeout(()=>{a.setStart(e,0),a.setEnd(e,e.childNodes.length);const l=a.getBoundingClientRect().width;e.classList.remove("is-selectable"),n(l)},500)}const vh={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1},showArrow:{type:[Boolean],required:!1,default:!0},showAfter:{type:[Number],required:!1,default:300},hideAfter:{type:[Number],required:!1,default:0},type:{type:[String],required:!1},size:{type:[String],required:!1},truncated:{type:[Boolean,String],required:!1,default:!0},numberFormat:{type:[Boolean],required:!1,default:!1},decimalLength:{type:[Number,String],required:!1,default:-1},autoPadding:{type:[Boolean,String],required:!1,default:!1},digits:{type:[Number,String],required:!1,default:4},separator:{type:String,required:!1,default:" "},highlightFilter:{type:[String,Function],required:!1},mark:{type:[Boolean],required:!1},color:{type:[String],required:!1},icon:{type:[Object],required:!1},textPosition:{type:String,default:"right"},textColor:{type:String}};function bh(e,n,a,o=!1){return{props:{...vh},emits:["click"],setup(l,r){const s=t.ref(null),i=t.computed(()=>{const g={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(g[`${e}--${l.type??"default"}`]=!0),l.size&&(g[`${e}--${l.size}`]=!0),g}),c=t.computed(()=>{const g={},S=l.textColor??l.color;return S&&(g.color=S),g}),f=(g,S)=>{let N=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const C=l.highlightFilter;if(g.indexOf(C)!==-1){const B=g.replace(new RegExp(C,"g"),`<span>${C}</span>`);S.innerHTML=B,S.class["is-highlight"]=!0,N=t.h(l.tag,S)}}else if(typeof l.highlightFilter=="function"){const C=l.highlightFilter(g);C&&(S.innerHTML=C,S.class["is-highlight"]=!0,N=t.h(l.tag,S))}return N},p=g=>{r.emit("click",g)};let u="";const h=()=>{const g=s.value;if(!g)return;const S=g.clientWidth;yh(g,N=>{const C=g.innerHTML??"";ue(C)||N<S||(u?a?.show(g,C,{type:"text",id:u,showArrow:l.showArrow},!0):u=a?.show(g,C,{type:"text",showArrow:l.showArrow},!0)??"")})},k=()=>{u&&a?.hide(u)};let y=null;const v=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},b=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{k()},l.hideAfter??0)},d=()=>{const g=s.value;g&&(g.addEventListener("mouseover",v),g.addEventListener("mouseleave",b))},m=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",v),g.removeEventListener("mouseleave",b))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||d()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||m()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let S=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const V=B[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const T=fe(l.digits),A=fe(l.decimalLength),x=he(l.autoPadding);let M=`${B[0].children}`,$=M.split("").reverse().join("");$=Sn($,A,x,T,l.separator),M=$.split("").reverse().join(""),l.highlightFilter!==void 0&&(S=f(M,g)),S||(g.innerHTML=M,S=t.h(l.tag,g))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const V=B[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const T=`${B[0].children}`;S=f(T,g),S||(g.innerHTML=T,S=t.h(l.tag,g))}}}S||(S=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return S;let C=null;if(l.icon){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const V={},T=l.color;T&&(V.color=T);const A={class:B,style:V};C=t.h("view",A,t.h(l.icon))}else if(r.slots.mark){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const V={},T=l.color;T&&(V.color=T);const A={class:B,style:V};C=t.h("view",A,{default:r.slots.mark})}else{const B={[`${e}__mark`]:!0};l.type&&(B[`${e}__mark--${l.type??"default"}`]=!0);const V={},T=l.color;T&&(V["background-color"]=T);const A={class:B,style:V};C=t.h("view",A)}const w={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",w,[C,S])}}}}const{componentName:kh,create:Sh,scope:Ch}=G("text"),Cl=Sh(bh(kh,Ch,Vt,!1));function wh(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const s=[],i=n[0];if(Array.isArray(e)&&!Array.isArray(i)&&!i[l]){let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],u=c.find(h=>h[o]===p);if(!u)break;s.push(u[a])}return s}if(Array.isArray(i))for(let c=0;c<n.length&&c<r.length;c++){let f=n[c],p=r[c];const u=f.find(h=>h[o]===p);if(!u)break;s.push(u[a])}else{let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],u=c.find(h=>h[o]===p);if(!u)break;s.push(u[a]),c=u[l]}}return s}class Nh{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Bh(){const e=t.getCurrentInstance();return new Nh(e.proxy)}const Vh={tag:{type:[String,Object],required:!1,default:"span"},resolveTag:{type:[Boolean],required:!1,default:!1},source:{type:[Array,Function,String],required:!1},sourceType:{type:[String],required:!1,default:"mapping"},params:{type:[Object,String],required:!1},modelValue:{type:[String,Boolean,Number,Array],required:!1},separator:{type:[String,Boolean,Number,Array],required:!1,default:"/"},optionType:{type:String,required:!1},textKey:{type:[String],required:!1,default:"text"},valueKey:{type:[String],required:!1,default:"value"},childrenKey:{type:[String],required:!1,default:"children"},emptyText:{type:[String],required:!1},emptyTag:{type:[String],required:!1,default:"span"},emptyClass:{type:[String],required:!1}};function Ah(e,n,a=!1){return{props:{...Vh},setup(o,{attrs:l,slots:r}){const s=Bh(),i=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,u])=>{i.value=await s.load(o.sourceType,p,u)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let p=wh(o.modelValue,i.value,o.textKey,o.valueKey,o.childrenKey);return p.length==0?o.emptyText??"":p.length===1?o.optionType=="item"?`${o.modelValue}${o.separator}${p[0]}`:p[0]:p.join(o.separator)}),f=o.resolveTag?t.resolveComponent(o.tag):o.tag;return()=>{const p={...l};return r.default?r.default({text:c.value,value:o.modelValue}):o.resolveTag?o.emptyText!==void 0&&o.emptyText===c.value?t.h(o.emptyTag??"span",{...l,class:o.emptyClass},c.value):t.h(f,p,{default:()=>c.value}):t.h(f,p,c.value)}}}}const{componentName:Th,create:$h,scope:Eh}=G("mapping"),wl=$h(Ah(Th,Eh,!1));function xh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return _r(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:kV,create:Dh,scope:SV}=G("domain-provider"),Nl=Dh(xh()),Ih={initialVisibleObserverSize:{type:[Number],required:!1},initialInvisibleObserverHeight:{type:[String],required:!1,default:"250px"},disabled:{type:[Boolean],required:!1},loadPolicy:{type:[String],required:!1,default:"rolling"},rootMargin:{type:[String],required:!1,default:"250px 0px 250px 0px"},threshold:{type:[Array],required:!1,default:[0,.25]},root:{type:[Object,String]}};function qh(e,n){return{inheritAttrs:!1,props:Ih,setup(a,{slots:o}){if(it&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const s=(h,k)=>{if(p===null){r.set(h,{visible:null,callback:k});return}l.has(h)&&p.unobserve(h),l.set(h,{visible:null,callback:k}),p.observe(h)},i=h=>{if(p===null){r.delete(h);return}l.has(h)&&(l.delete(h),p.unobserve(h))};let c=a.initialVisibleObserverSize;Gi({acquire:()=>{const h=c>0;return c--,h},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:s,unobserve:i});let p=null;const u=(h,k,y)=>{p=new IntersectionObserver(v=>{for(let b of v){let d=!1;b.intersectionRatio>0&&(d=!0);const m=l.get(b.target);if(m)try{if(a.loadPolicy==="lazy"&&!d&&m.visible!==null)return;m.visible=d,m.callback(d)}catch(g){console.error(g)}}},{root:h,rootMargin:k,threshold:y}),r.forEach((v,b)=>{l.set(b,v),p?.observe(b)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([h,k])=>{if(k||!h||p)return;let y=null;typeof h=="string"?y=document.querySelector(h):y=h,y&&u(y,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:CV,create:Mh,scope:wV}=G("rolling-provider"),Bl=Mh(qh()),{componentName:Ph,create:Lh}=G("cell"),zh=Lh({components:{Right:ne.Right},props:{title:{type:String,default:""},subTitle:{type:String,default:""},desc:{type:String,default:""},descTextAlign:{type:String,default:"right"},isLink:{type:Boolean,default:!1},roundRadius:{type:[String,Number],default:""},url:{type:String,default:""},center:{type:Boolean,default:!1},size:{type:String,default:""}},emits:["click"],setup(e,{emit:n}){const a=t.computed(()=>{const r=Ph;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),o=t.computed(()=>({borderRadius:ge(e.roundRadius)}));return{handleClick:r=>{n("click",r)},classes:a,baseStyle:o}}}),Fh={key:0,class:"fox-cell__icon"},Rh={key:1,class:"fox-cell__title"},Oh={class:"title"},Kh={class:"fox-cell__title-desc"};function Uh(e,n,a,o,l,r){const s=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",Fh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Rh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Oh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Kh,t.toDisplayString(e.subTitle),1)],64)):t.renderSlot(e.$slots,"title",{key:1},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-cell__value",{"fox-cell__value--alone":!e.title&&!e.subTitle&&!e.$slots.title}]),style:t.normalizeStyle({"text-align":e.descTextAlign})},t.toDisplayString(e.desc),7)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"link",{},()=>[e.isLink?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const Vl=te(zh,[["render",Uh]]),{componentName:Hh,create:jh}=G("cell-group"),Wh=jh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Hh]:!0}))}}}),Yh={key:1,class:"fox-cell-group__title"},Xh={key:3,class:"fox-cell-group__desc"},Qh={class:"fox-cell-group__wrap"};function Gh(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.$slots.title?t.renderSlot(e.$slots,"title",{key:0}):e.title?(t.openBlock(),t.createElementBlock("view",Yh,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.$slots.desc?t.renderSlot(e.$slots,"desc",{key:2}):e.desc?(t.openBlock(),t.createElementBlock("view",Xh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Qh,[t.renderSlot(e.$slots,"default")])],2)}const Al=te(Wh,[["render",Gh]]),{componentName:Zh,create:Jh}=G("image"),_h=Jh({props:{src:String,fit:{type:String,default:"fill"},position:{type:String,default:"center"},alt:{type:String,default:""},width:{type:String,default:"center"},height:{type:String,default:""},round:{type:Boolean,default:!1},radius:[String,Number],showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},lazyLoad:{type:Boolean,default:!1}},components:{Image:ne.Image,ImageError:ne.ImageError},emits:["click","load","error"],setup(e,{emit:n}){const a=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),o=t.computed(()=>{const k=Zh;return{[k]:!0,[`${k}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const k={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(y=>{y.forEach(v=>{v.isIntersecting&&(r.value=!0,l.value.disconnect())})},k),s.value&&l.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let k={};return e.width&&(k.width=ge(e.width)),e.height&&(k.height=ge(e.height)),e.radius!==void 0&&e.radius!==null&&(k.overflow="hidden",k.borderRadius=ge(e.radius)),k}),f=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,k=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},u=()=>{a.isError=!0,a.loading=!1,n("error")},h=k=>{n("click",k)};return{...t.toRefs(a),imageClick:h,classes:o,styles:f,stylebox:c,error:u,load:p,show:r,imgRef:s}}}),eg=["src","date-src","alt"],tg={key:0,class:"fox-img-loading"},ng={key:1,class:"fox-img-error"};function og(e,n,a,o,l,r){const s=t.resolveComponent("Image"),i=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:n[2]||(n[2]=(...c)=>e.imageClick&&e.imageClick(...c))},[t.createElementVNode("img",{ref:"imgRef",class:"fox-img",src:e.lazyLoad?e.show?e.src:void 0:e.src,"date-src":e.lazyLoad?e.show?void 0:e.src:void 0,alt:e.alt,onLoad:n[0]||(n[0]=(...c)=>e.load&&e.load(...c)),onError:n[1]||(n[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,eg),e.loading?(t.openBlock(),t.createElementBlock("div",tg,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"image"})),t.renderSlot(e.$slots,"loading")])):t.createCommentVNode("",!0),e.isError&&!e.loading?(t.openBlock(),t.createElementBlock("div",ng,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const Tl=te(_h,[["render",og]]),{create:lg}=G("layout"),$l=lg({}),{componentName:ag,create:rg}=G("col"),sg=rg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=ag,a=t.inject("gutter"),o=t.computed(()=>({[n]:!0,[`${n}-gutter`]:a,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),l=t.computed(()=>({paddingLeft:a/2+"px",paddingRight:a/2+"px"}));return{classes:o,style:l}}});function ig(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const El=te(sg,[["render",ig]]),{componentName:cg,create:ug}=G("row"),dg=ug({props:{type:{type:String,default:""},gutter:{type:[String,Number],default:""},justify:{type:String,default:"start"},align:{type:String,default:"flex-start"},flexWrap:{type:String,default:"nowrap"}},setup(e){const n=cg;t.provide("gutter",e.gutter);const a=(l,r)=>l?r?`fox-row-${l}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
5
+ */function dn(e,n="0"){let a=0,o=-1;e[0]=="-"&&(a++,o=1,e=e.substring(1),e.length),n[0]=="-"&&(a++,o=2,n=n.substring(1),n.length),e=Ne(e),n=Ne(n),[e,n]=Oo(Ne(e),Ne(n)),a==1&&(o==1?e=oo(e):n=oo(n));let l=xr(e,n);return a?a==2?"-"+Ne(l):e.length<l.length?Ne(l.substring(1)):"-"+Ne(oo(l)):Ne(l)}function oo(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let s=0;s<a;s++)e[s]>="0"&&e[s]<="9"?n+=9-parseInt(e[s]):n+=e[s];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return xr(n,r)}function Ne(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function Oo(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function xr(e,n){[e,n]=Oo(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var Se=(e=>(e[e.CEILING=0]="CEILING",e[e.DOWN=1]="DOWN",e[e.FLOOR=2]="FLOOR",e[e.HALF_DOWN=3]="HALF_DOWN",e[e.HALF_EVEN=4]="HALF_EVEN",e[e.HALF_UP=5]="HALF_UP",e[e.UNNECESSARY=6]="UNNECESSARY",e[e.UP=7]="UP",e))(Se||{});function Ot(e,n=0,a=Se.HALF_EVEN){if(a===Se.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let o=!1;e[0]==="-"&&(o=!0,e=e.substring(1));let l=e.split("."),r=l[0],s=l[1];if(n<0){if(n=-n,r.length<=n)return"0";{let c=r.substr(0,r.length-n);return e=c+"."+r.substr(r.length-n)+s,c=Ot(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,za(l[1],r,o,a)?(o?"-":"")+lo(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");s=l[1].substring(0,n);let i=l[1].substring(n);return i&&za(i,s,o,a)&&(s=lo(s),s.length>n)?(o?"-":"")+lo(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function za(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===Se.DOWN||!a&&o===Se.FLOOR||a&&o===Se.CEILING)return!1;if(o===Se.UP||a&&o===Se.FLOOR||!a&&o===Se.CEILING)return!0;let l="5"+new Array(e.length).join("0");if(e>l)return!0;if(e<l)return!1;switch(o){case Se.HALF_DOWN:return!1;case Se.HALF_UP:return!0;case Se.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function lo(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function go(e,n){e=e.toString(),n=n.toString();let a=0;e[0]=="-"&&(a++,e=e.substr(1)),n[0]=="-"&&(a++,n=n.substr(1)),e=$t(e),n=$t(n);let o=0,l=0;e.indexOf(".")!=-1&&(o=e.length-e.indexOf(".")-1),n.indexOf(".")!=-1&&(l=n.length-n.indexOf(".")-1);let r=o+l;if(e=$t(e.replace(".","")),n=$t(n.replace(".","")),e.length<n.length){let u=e;e=n,n=u}if(n=="0")return"0";let s=n.length,i=0,c=[],f=s-1,p="";for(let u=0;u<s;u++)c[u]=e.length-1;for(let u=0;u<2*e.length;u++){let h=0;for(let k=n.length-1;k>=f&&k>=0;k--)c[k]>-1&&c[k]<e.length&&(h+=parseInt(e[c[k]--])*parseInt(n[k]));h+=i,i=Math.floor(h/10),p=h%10+p,f--}return p=$t(Xs(p,r)),a==1&&(p="-"+p),p}function Xs(e,n){return n==0?e:(e=n>=e.length?new Array(n-e.length+1).join("0")+e:e,e.substr(0,e.length-n)+"."+e.substr(e.length-n,n))}function $t(e){for(;e[0]=="0";)e=e.substr(1);if(e.indexOf(".")!=-1)for(;e[e.length-1]=="0";)e=e.substr(0,e.length-1);return e==""||e=="."?e="0":e[e.length-1]=="."&&(e=e.substr(0,e.length-1)),e[0]=="."&&(e="0"+e),e}function yo(e,n,a=8){if(n==0)throw new Error("Cannot divide by 0");if(e=e.toString(),n=n.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),n=n.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let o=0;n[0]=="-"&&(n=n.substring(1),o++),e[0]=="-"&&(e=e.substring(1),o++);var l=n.indexOf(".")>0?n.length-n.indexOf(".")-1:-1;if(n=Ne(n.replace(".","")),l>=0){let f=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(f==-1)e=Ne(e+new Array(l+1).join("0"));else if(l>f)e=e.replace(".",""),e=Ne(e+new Array(l-f+1).join("0"));else if(l<f){e=e.replace(".","");let p=e.length-f+l;e=Ne(e.substring(0,p)+"."+e.substring(p))}else l==f&&(e=Ne(e.replace(".","")))}let r=0,s=n.length,i="",c=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(0,s+1):e.substring(0,s);if(e=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(s+1):e.substring(s),c.indexOf(".")>-1){let f=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(f+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=f,i="0."+new Array(f).join("0")}for(a=a+2;r<=a;){let f=0;for(;parseInt(c)>=parseInt(n);)c=dn(c,"-"+n),f++;i+=f,e?(e[0]=="."&&(i+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(i+="."),r++,c=c+"0")}return(o==1?"-":"")+Ne(Ot(i,a-2))}function vo(e,n){return e=e.toString(),n=n.toString(),n=bo(n),dn(e,n)}function bo(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Fa(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ra(e),Ra(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=vo(e,go(n,Ot(yo(e,n),0,Se.FLOOR)));return a+o}function Ra(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Oa(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=Oo(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ie{value;static RoundingModes=Se;static validate(n){if(n){if(n=n.toString(),isNaN(n))throw Error("Parameter is not a number: "+n);n[0]=="+"&&(n=n.substring(1))}else n="0";if(n.startsWith(".")?n="0"+n:n.startsWith("-.")&&(n="-0"+n.substr(1)),/e/i.test(n)){let[a,o]=n.split(/[eE]/);a=Ne(a);let l="";a[0]=="-"&&(l="-",a=a.substring(1)),a.indexOf(".")>=0?(o=parseInt(o)+a.indexOf("."),a=a.replace(".","")):o=parseInt(o)+a.length,a.length<o?n=l+a+new Array(o-a.length+1).join("0"):a.length>=o&&o>0?n=l+Ne(a.substring(0,o))+(a.length>o?"."+a.substring(o):""):n=l+"0."+new Array(-o+1).join("0")+a}return n}constructor(n="0"){this.value=ie.validate(n)}getValue(){return this.value}static getPrettyValue(n,a,o){if(!(a||o))a=3,o=",";else if(!(a&&o))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");n=ie.validate(n);let l=n.charAt(0)=="-";l&&(n=n.substring(1));var r=n.indexOf(".");r=r>0?r:n.length;for(var s="",i=r;i>0;)i<a?(a=i,i=0):i-=a,s=n.substring(i,i+a)+(i<r-a&&i>=0?o:"")+s;return(l?"-":"")+s+n.substring(r)}getPrettyValue(n,a){return ie.getPrettyValue(this.value,n,a)}static round(n,a=0,o=Se.HALF_EVEN){if(n=ie.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Ot(n,a,o)}round(n=0,a=Se.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ie(Ot(this.value,n,a))}static floor(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,Se.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,Se.FLOOR)}static ceil(n){return n=ie.validate(n),n.indexOf(".")===-1?n:ie.round(n,0,Se.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ie(this.value):new ie(this.value).round(0,Se.CEILING)}static add(n,a){return n=ie.validate(n),a=ie.validate(a),dn(n,a)}add(n){return new ie(dn(this.value,n.getValue()))}static subtract(n,a){return n=ie.validate(n),a=ie.validate(a),vo(n,a)}subtract(n){return new ie(vo(this.value,n.getValue()))}static multiply(n,a){return n=ie.validate(n),a=ie.validate(a),go(n,a)}multiply(n){return new ie(go(this.value,n.getValue()))}static divide(n,a,o){return n=ie.validate(n),a=ie.validate(a),yo(n,a,o)}divide(n,a){return new ie(yo(this.value,n.getValue(),a))}static modulus(n,a){return n=ie.validate(n),a=ie.validate(a),Fa(n,a)}modulus(n){return new ie(Fa(this.value,n.getValue()))}static compareTo(n,a){return n=ie.validate(n),a=ie.validate(a),Oa(n,a)}compareTo(n){return Oa(this.value,n.getValue())}static negate(n){return n=ie.validate(n),bo(n)}negate(){return new ie(bo(this.value))}}function Dr(e,n){return ie.multiply(`${e}`,`${n}`)}function Ko(e,n,a=8){return ie.divide(`${e}`,`${n}`,a)}function ko(e,n){return e=`${e}`,n=`${n}`,ie.compareTo(e,n)}function Ir(e){return ie.negate(e)}function Sn(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let s=r.charAt(0);s=="-"?r=r.substring(1):s="";let i=r,c="",f=r.indexOf(".");f!=-1&&(i=r.substring(0,f),c=r.substring(f+1)),n!=-1&&(n<c.length?c=c.substring(0,n):a&&n>c.length&&(c=c.padEnd(n,"0")));let p;if(o>0){let u="",h=i.split("").reverse();for(let k=0;k<h.length;k++)u+=h[k]+((k+1)%o==0&&k+1!=h.length?l:"");c.length==0?p=`${s}${u.split("").reverse().join("")}`:p=`${s}${u.split("").reverse().join("")}.${c}`}else c.length==0?p=`${s}${i}`:p=`${s}${i}.${c}`;return p}function qr(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const it=typeof window<"u",Ke=Xe;function Mr(e){return e==null}const Cn=Array.isArray,Qs=e=>wn(e)==="[object Map]",Gs=e=>wn(e)==="[object Set]",He=e=>e instanceof Date,fn=e=>typeof e=="function",Pr=e=>typeof e=="string",Zs=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",gt=e=>Ee(e)&&fn(e.then)&&fn(e.catch),Lr=Object.prototype.toString,wn=e=>Lr.call(e),So=e=>wn(e)==="[object Object]",zr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Js(e){return e.__esModule||zr&&e[Symbol.toStringTag]==="Module"}const _s=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function lt(...e){let n=e[0]!==void 0&&e[0]!==null?e[0]:{},a=1,o=e.length,l=!1;for(typeof n=="boolean"&&(l=n,n=e[a]??{},a++),typeof n!="object"&&(n={});a<o;a++)if(e[a]!==null&&e[a]!==void 0){let r=e[a];for(let s in r){let i=n[s],c=r[s];if(i!==c)if(l===!0&&c&&typeof c=="object"){let f;Array.isArray(c)?f=i&&Array.isArray(i)?i:[]:f=i&&typeof i=="object"?i:{},n[s]=lt(l,f,c)}else c!==void 0&&(n[s]=c)}}return n}function Co(e,n,a=!1){if(!a)lt(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!So(s))continue;r=Co(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!So(s))continue;r=Co(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const ao=_s?Promise.resolve():null;function ei(e,...n){ao!==null?n&&n.length>0?ao.then(()=>{e(n)}):ao.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function he(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function fe(e){return typeof e=="number"?e:Number(e)}const ti={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function at(e){let a=Object.prototype.toString.call(e);return e==null?String(e):ti[a]||"object"}function Nn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Fr(e){return e&&typeof e=="object"&&"setInterval"in e}function Rr(e){let n=!!e&&"length"in e&&e.length,a=at(e);return a==="function"||Fr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function Or(e,n){let a=+n.length,o=0,l=e.length;for(;o<a;o++)e[l++]=n[o];return e.length=l,e}function ni(e,n=[]){let a=n;return e!=null&&(Rr(Object(e))?Or(a,typeof e=="string"?[e]:e):a.push(e)),a}function qe(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=at(e),o=at(n);if(a!==o)return!1;if(a==="object"){let l=Object.keys(e),r=Object.keys(n);if(l.length!==r.length)return!1;for(let s=0;s<l.length;s++){let i=l[s],c=e[i],f=n[i];if(!qe(c,f))return!1}return!0}else if(a==="array"){if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++){let r=e[l],s=n[l];if(!qe(r,s))return!1}return!0}return!1}function Kr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function Ur(e){return ue(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ue(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function Hr(e){if(e==null)return 0;let n=`${e}`;if(n.length==0)return 0;n.charAt(0)=="-"&&(n=n.substring(1)),n=n.replace(/[^\d\.-]/g,"");const a=n.indexOf(".");return a==-1?n.length:a}function jr(e){if(e==null)return 0;const n=`${e}`;if(n.length==0)return 0;const a=n.indexOf(".");return a==-1?0:n.length-(a+1)}function Ka(e,n,a){const o=e.indexOf(n);return o===-1?e:n==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(a,"")}function wo(e,n=!0,a=!0){n?e=Ka(e,".",/\./g):e=e.replace(/\./g,""),a?e=Ka(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function oi(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(qe(e,a))return!0}):n.indexOf(e)}function li(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(qe(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ve(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function be(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function Nt(e,...n){const a=[];n.forEach(l=>{Reflect.apply([].push,a,Reflect.ownKeys(l))});const o={};for(const l in e)a.includes(l)||(o[l]=e[l]);return o}const Wr=(e,n,a)=>{const o=Object.assign({},e),l=Object.assign({},a);return Object.keys(n).length>0?(Object.keys(o).forEach(r=>{l.hasOwnProperty(r)?typeof l[r]=="string"&&(o[r]=n[l[r]]):n[r]&&(o[r]=n[r])}),o):e};function No(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const et=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},Ue=(e,n,a)=>Math.min(Math.max(e,n),a),Ce=Symbol.for("BroadcastKey");class Uo{parent;children=[];callbacks=new Map;proxy=null;name;constructor(n,a,o){this.parent=n,this.proxy=a,this.name=o,n!==null&&n.addChild(this)}addChild(n){this.children.push(n)}removeChild(n){const a=this.children.findIndex(o=>n===o);a!==-1&&this.children.splice(a,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(n,a,...o){if(n.maxLevel!==void 0&&n.maxLevel!==null&&n.maxLevel>0){if(n.level=n.level??0,n.level>n.maxLevel)return[];n.level++}let l=!1;!n.name||n.name==="*"?l=!0:!n.name||n.name==="+"?(l=!1,n.name="*"):Kr(n.name)&&this.name&&n.name.test(this.name)?l=!0:typeof n.name=="function"?l=Reflect.apply(n.name,null,[this.name]):n.name===this.name&&(l=!0);const r=[];if(l){const s=this.callbacks.get(a);if(typeof s=="function"){const c=Reflect.apply(s,this.proxy,[...o]);c!=null&&r.push(c)}const i=this.proxy??{};if(typeof i[a]=="function"){const c=Reflect.apply(i[a],i,[...o]);c!=null&&r.push(c)}}return this.children.forEach(s=>{const i=Reflect.apply(s.emit,s,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,r,[...i])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const s=Reflect.apply(r.emit,r,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,l,[...s])}),l}on(n,a){this.callbacks.set(n,a)}}function Bn(e,n,a,o){const l=new Uo(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function ai(e,n,a){const o=a;if(o[Ce])return o[Ce];const l=t.inject(Ce,null),r=new Uo(l,a,e);if(n&&typeof n=="object")for(const s in n)r.on(s,n[s]);return o[Ce]=r,t.provide(Ce,r),t.onUnmounted(()=>{r.destroy(),o[Ce]=void 0}),r}function Pt(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ce]??t.inject(Ce,null):t.inject(Ce,null)}const nt=e=>e.default??e;class ri{error(n,a){const o=a,l=a||t.hasInjectionContext()?Pt(a):null;l?l.emit({name:"*",maxLevel:1},"setErrorTip",n):typeof o.setErrorTip=="function"&&o.setErrorTip(n)}reset(n){const a=n,o=n||t.hasInjectionContext()?Pt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?Pt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}decorate(n,a,o){Array.isArray(n)||(n=[n]);const l=o,r=o||t.hasInjectionContext()?Pt(o):null,s=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),i=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!s&&i?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):s&&!i&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let zt=new ri;function si(e){zt=e}function ii(e){zt?Object.assign(zt,e):zt=e}function ci(e,n){nt(tt).setValidator(e,n)}function ui(e){nt(tt).deleteValidator(e)}let Yr=["blur","clear"];function di(e){Yr=e}function Xr(){return Yr}let Qr=["focus","change","setValue"];function fi(e){Qr=e}function Gr(){return Qr}function mi(e){nt(tt).messages(e)}function Et(...e){const n=[];return e.forEach(a=>{a.forEach(o=>{const l=n.findIndex(r=>r.type===o.type);l!==-1&&n.splice(l,1),n.push(o)})}),n}function en(e){return e.forEach(n=>{n.type==="required"&&(n.required===null||n.required===void 0)&&(n.required=!0),!n.type&&(n.required===!0||n.required===!1)&&(n.type="required")}),e}const Me=Symbol("ValidateSchemaKey");class Zr{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(n,a,o){this.parent=n,this.descriptor=a,this.proxy=o,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let n=this.proxy.$attrs;n&&(this.scope=t.effectScope(!0),this.scope.run(()=>{t.watchEffect(()=>{const a=en(Et(this.attrRules,this.rules)),o=[];for(let r in n){let s=n[r];if(this.hasValidator(r,!0)){if(s===!1)continue;let c={type:r};s!==null&&typeof s=="object"&&Object.assign(c,s),o.push(c);continue}let i=this.getValidator(r);if(i!==null){let c={type:r,validator:i};o.push(c)}}this.attrRules=en(o);const l=Et(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(l,a)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null,this.proxy=null}execHandler(n,...a){const o=this.descriptor.validateHandler;if(o&&typeof o[n]=="function")return Reflect.apply(o[n],o,[...a]);const l=zt;return l&&typeof l[n]=="function"?Reflect.apply(l[n],l,[...a]):null}decorate(n,a){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",n,a,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(n){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",n,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(n,a,o=!1){o?nt(tt).setValidator(n,a):this.validators[n]=a}getValidator(n){let a=this.validators[n]??null;return a||(a=this.parent?.getValidator(n)??null),a}deleteValidator(n,a=!1){a?nt(tt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return nt(tt).hasValidator(n);{let o=Reflect.has(this.validators,n);return!o&&this.parent!==null&&(o=this.parent.hasValidator(n,!1)),o}}setRule(n){const a=Et(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=en(n):this.rules=en([n]);const o=Et(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(o,a)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let a=Et(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),s={[`${o}`]:r},i=nt(tt),c=new i(l),f=this.proxy??s;return c.validate(s,{context:f}).then(u=>{if(u.pass)this.success();else{let h="error";Array.isArray(u.errors)&&u.errors.length>0&&(h=u.errors[0].message??h,u.errors=[u.errors[0]],u.errors[0].ref=f),this.error(h)}return u}).catch(u=>{const h=u.message??`${u}`;return this.error(h),u})}}return Promise.resolve({pass:!0})}}function Vn(e,n,a){if(a.valueName=a.valueName??"modelValue",a.valueType=a.valueType??"string",!a.validateHandler&&a.valueName!=="modelValue"){const l=a.valueName;a.validateHandler={getValue(r){return r[l]}}}return new Zr(n,a,e)}const mn=Symbol.for("EventEmitterKey");class Jr{register=new Map;proxy;constructor(n){this.proxy=n}destroy(){this.proxy=null,this.register.clear()}off(n,a){let o=this.register.get(n);if(o&&Array.isArray(o)){let l=o.findIndex(r=>r===a);l!==-1&&o.splice(l,1)}}on(n,a){let o=this.register.get(n);o||(o=new Array,this.register.set(n,o)),o.push(a)}emit(n,...a){const o=this.register.get(n);o&&o.forEach(l=>{try{Reflect.apply(l,null,[n,...a])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[n,...a])}}function yt(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function pn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function pi(e,n){const a=yt((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function hi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function Ho(e,n,a,o=0,l=!0){let r=n,s=0;if(l){const c=e();if(s++,c||s>a)return}const i=()=>{const c=e();s++,!(c||s>a)&&(r+=o,setTimeout(i,r))};setTimeout(i,r)}const $e=Symbol("DomainKey"),dt=Symbol("DataItemsKey");class An{_parent=null;get parent(){return this._parent}set parent(n){this._parent=n}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(n){this._broadcast=n}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(n){this._validateSchema=n}_props=t.reactive({});constructor(n=null){this._name=n}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(n,a=[]){for(const o in n){const l=n[o];a.length>0&&a.indexOf(l)!==-1||(this._props[o]=l)}}has(n){if(Reflect.has(this._props,n)){const a=this._props[n];if(a!=null)return!0}return this.parent==null?!1:this.parent.has(n)}delete(n){Reflect.deleteProperty(this._props,n)}set(n,a){this._props[n]=a}get(n,a){if(Reflect.has(this._props,n)){const o=this._props[n];if(o!=null)return o}return this.parent==null?a:this.parent.get(n,a)}getForParent(n,a){return this.parent==null?a:this.parent.get(n,a)}getForSelf(n){return this._props[n]}getAll(n){const a=[];let o=this;for(;o!=null;){if(Reflect.has(o._props,n)){const l=o._props[n];a.push(l)}o=o._parent}return a}}const gi=new An;function pt(){return gi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[$e]??t.inject($e,null):t.inject($e,null)}const ro=Symbol("OriginalDateKey");function jo(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject($e,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new An(i);c.parent=s;const f=k=>{r[ro]||h(k),c?.set("modelValue",k)},p=()=>c?.getForSelf("modelValue")??null,u=()=>r[ro]??null,h=k=>{const y={};lt(!0,y,t.toRaw(k)),r[ro]=y};if(t.isReactive(n)||typeof n=="function"?t.watch(n,k=>{c?.merge(k,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&h(n.modelValue),r[$e]=c,t.provide($e,c),l!==null){const k=t.inject(Ce,null),y=Bn(r,k,i,o);c.broadcast=y,r[Ce]=y,t.provide(Ce,y),r.broadcast=(d,m,...g)=>Reflect.apply(y.emit,y,[d,m,...g]);const v=t.inject(Me,null),b=Vn(r,v,{componentName:""});c.validateSchema=b,r[Me]=b,t.provide(Me,b),r[dt]=new Map,r.validate=(d=!0)=>{const m=[];let g=null;const S={deep:!1};if(d===!0)g={name:"*"};else if(Array.isArray(d)&&d.length>0){const N=d;g={name:C=>C?N.indexOf(C)!==-1:!1}}else if(d!=null&&typeof d=="object"){const N=d;if(Object.assign(S,N),Array.isArray(N.include)&&N.include.length>0){const C=N.include;g={name:w=>w?C.indexOf(w)!==-1:!1}}else if(Array.isArray(N.exclude)&&N.exclude.length>0){const C=N.exclude;g={name:w=>w?C.indexOf(w)===-1:!1}}else g={name:"*"}}if(g){const N=y?.emitToChildren(g,"validate",S);N&&Reflect.apply([].push,m,N)}return m.length==1?m[0]:m.length>1?Promise.all(m).then(N=>{let C=[];return N.forEach(w=>{w.pass===!1&&Array.isArray(w.errors)&&(C=[...C,...w.errors])}),C.length>0?{pass:!1,errors:C}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(d,m=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(d).forEach(N=>{let C=String(N);const w={componentName:"",fieldName:C,pureDataValidate:!0};if(c){const B=ts(c,C,w,y,b);r[dt].set(C,B);const V=d[C];V&&B.validateSchema.setRule(V)}});return}if(m){const S=Reflect.ownKeys(d),N={name:C=>S.includes(C)};y?.emitToChildren(N,"setNameValidateRules",d,!1)}},r.clearValidate=(d=!0)=>{let m=null;if(d===!0)m={name:"*"};else if(Array.isArray(d)&&d.length>0){const g=d;m={name:S=>S?g.indexOf(S)!==-1:!1}}else if(d!=null&&typeof d=="object"){const g=d;if(Array.isArray(g.include)&&g.include.length>0){const S=g.include;m={name:N=>N?S.indexOf(N)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const S=g.exclude;m={name:N=>N?S.indexOf(N)===-1:!1}}else m={name:"*"}}m&&y?.emitToChildren(m,"clearValidate",!1)},r.resetFields=d=>{const m=p();if(!m)return;const g={};if(lt(!0,g,u()??{}),Array.isArray(d))d.forEach(S=>{m[S]=g[S]});else if(d&&Array.isArray(d.include))(d.include??[]).forEach(N=>{m[N]=g[N]});else if(d&&Array.isArray(d.exclude)){let S=d.exclude??[];Reflect.ownKeys(g).forEach(N=>{S.includes(N)||(m[N]=g[N])})}else Object.assign(m,g);r.clearValidate(d)},r.setModelValue=(d,m)=>{!m||m===i?f(d):y?.emitToChildren({name:m},"setModelValue",d)},r.getModelValue=()=>p()}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Me]=void 0,t.provide(Me,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Ce]=void 0,t.provide(Ce,null)),c?.destroy(),r[$e]=void 0,t.provide($e,null),r[dt]&&(r[dt].clear(),r[dt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,c=null,r=null}),c}function _r(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject($e,null);r===null&&(r=pt());const s=e||n.prop||n.name;let i=new An(s);return i.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{i?.merge(c,a)},{immediate:!0}):i.merge(n,a),l[$e]=i,t.provide($e,i),t.onUnmounted(()=>{i?.destroy(),l[$e]=void 0,t.provide($e,null),i=null,l=null}),i}function es(e,n,a){const l=je(e)?.get("rules");if(!l)return;let r=l[a];r&&(Array.isArray(r)||(r=[r]),n.setRule(r))}function Be(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",s=t.inject(Ce,null);let i=Bn(l,s,r,a);l[Ce]=i,t.provide(Ce,i),l.broadcast=(y,v,...b)=>i?Reflect.apply(i.emit,i,[y,v,...b]):null;const c=t.inject(Me,null);e.fieldName=e.fieldName??r;let f=Vn(l,c,e);l[Me]=f,t.provide(Me,f),es(l,f,r),l.validate=(y=null)=>{if(!f)return Promise.resolve({pass:!0});const v=[];let b=!1,d=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)d=!0,b=!0;else if(y&&typeof y=="object"){const m=y,g=m.ignoreDisabled??!0,S=m.ignoreReadonly??!0,N=m.ignoreHidden??!0;g===!0&&e.disabled===!0||S===!0&&e.readonly===!0||N===!0&&Nn(l.$el)?d=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),d=!0),b=m.deep??!1}else typeof y=="boolean"&&(b=y),d=!0;if(d){const m=f?.validate();v.push(m)}if(b){let m=null;const g={deep:!1};if(y===!0)m={name:"*"};else if(Array.isArray(y)&&y.length>0){const S=y;m={name:N=>N?S.indexOf(N)!==-1:!1}}else if(y!=null&&typeof y=="object"){const S=y;if(Object.assign(g,S),Array.isArray(S.include)&&S.include.length>0){const N=S.include;m={name:C=>C?N.indexOf(C)!==-1:!1}}else if(Array.isArray(S.exclude)&&S.exclude.length>0){const N=S.exclude;m={name:C=>C?N.indexOf(C)===-1:!1}}else m={name:"*"}}if(m&&i){const S=i.emitToChildren(m,"validate",g);Reflect.apply([].push,v,S)}}return v.length==1?v[0]:v.length>1?Promise.all(v).then(m=>{let g=[];return m.forEach(S=>{S.pass===!1&&Array.isArray(S.errors)&&(g=[...g,...S.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>f?.setRule(y),l.setNameValidateRules=(y,v=!1)=>{const b=y[r];if(b&&f?.setRule(b),v&&i){const d={name:m=>Reflect.ownKeys(y).includes(m)};i.emitToChildren(d,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&f?.clear();let v=null;if(y===!0)v={name:"*"};else if(Array.isArray(y)&&y.length>0){const b=y;v={name:d=>d?b.indexOf(d)!==-1:!1}}else if(y!=null&&typeof y=="object"){const b=y;if(Array.isArray(b.include)&&b.include.length>0){const d=b.include;v={name:m=>m?d.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const d=b.exclude;v={name:m=>m?d.indexOf(m)===-1:!1}}else v={name:"*"}}v&&i&&i.emitToChildren(v,"clearValidate",!1)};let p=new Jr(l);l[mn]=p;const u=yt((y="validate")=>{f&&(y==="reset"?f.clear():f.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:Xr()).forEach(y=>{p&&p.on(y,v=>{u("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:Gr()).forEach(y=>{p&&p.on(y,v=>{u("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ce]=void 0,t.provide(Ce,null),i=null,f?.destroy(),l[Me]=void 0,t.provide(Me,null),f=null,p?.destroy(),l[mn]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:i,validateSchema:f,emitEvent:(y,...v)=>{p&&Reflect.apply(p.emit,p,[y,...v])},onEvent:(y,v)=>{p&&Reflect.apply(p.on,p,[v])},offEvent:(y,v)=>{p&&Reflect.apply(p.off,p,[v])}}}function ts(e,n,a,o,l){const r={},s=n??"",i={getValue(){const p=e.getForSelf("modelValue");return p?p[s]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,s):!1}};a.fieldName=s,a.validateHandler={getValue(p){return i.getValue()}};let c=Vn({},l,a);r.validate=(p=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const u=[];let h=!1,k=!1;if(Array.isArray(p)&&p.indexOf(s)!==-1)k=!0,h=!0;else if(p&&typeof p=="object"){const y=p;Array.isArray(y.include)&&y.include.indexOf(s)!==-1||Array.isArray(y.exclude)&&y.exclude.indexOf(s),k=!0,h=y.deep??!1}else typeof p=="boolean"&&(h=p),k=!0;if(k&&c){const y=c.validate();u.push(y)}if(h){let y=null;const v={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const b=p;y={name:d=>d?b.indexOf(d)!==-1:!1}}else if(p!=null&&typeof p=="object"){const b=p;if(Object.assign(v,b),Array.isArray(b.include)&&b.include.length>0){const d=b.include;y={name:m=>m?d.indexOf(m)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const d=b.exclude;y={name:m=>m?d.indexOf(m)===-1:!1}}else y={name:"*"}}if(y&&f){const b=f.emitToChildren(y,"validate",v);Reflect.apply([].push,u,b)}}return u.length==1?u[0]:u.length>1?Promise.all(u).then(y=>{let v=[];return y.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(v=[...v,...b.errors])}),v.length>0?{pass:!1,errors:v}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const u=p[s];u&&c?.setRule(u)};let f=Bn(null,o,s,r);return t.onUnmounted(()=>{c=null,f=null}),{broadcast:f,validateSchema:c}}function Bt(){let n=t.getCurrentInstance()?.proxy,a=new Jr(n);return n[mn]=a,t.onUnmounted(()=>{a?.destroy(),n[mn]=void 0,a=null,n=null}),{emitEvent:(o,...l)=>{a&&Reflect.apply(a.emit,a,[o,...l])},onEvent:(o,l)=>{a&&Reflect.apply(a.on,a,[l])},offEvent:(o,l)=>{a&&Reflect.apply(a.off,a,[l])}}}const ge=e=>e?`${ce(e)}px`:"";function ce(e,n=-1){if(e==null)return 0;if(typeof e=="number")return e>0&&e<1&&n>0?e*n:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let a=e.indexOf("px");if(a!==-1)return Number(e.substring(0,a));if(a=e.indexOf("rem"),a!==-1){let l=Number(e.substring(0,a)),r=1;if(it){const{fontSize:s}=window.getComputedStyle(document.documentElement,null),i=s.indexOf("px");i>0&&(r=Number(s.substring(0,i)))}return l*=r,l}if(a=e.indexOf("%"),a!==-1)return Number(e.substring(0,a))*n;const o=Number(e);return isNaN(o)?0:o}const Qe="PageStateKey";function ze(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=ce(e.top)),e.left!==null&&e.left!==void 0&&(n.left=ce(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=ce(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=ce(e.right))),n}function Bo(e,n,a={},o=!0,l=-1,r=-1,s=0,i=0){if(e.headerHeight=ce(a.headerHeight??n.headerHeight??-1),e.headerPadding=ze(a.headerPadding??n.headerPadding),e.footerHeight=ce(a.footerHeight??n.footerHeight??-1),e.footerPadding=ze(a.footerPadding??n.footerPadding),e.contentPadding=ze(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=ce(c,r):e.height=ce(r)-ce(s,r)-ce(i,r),e.width=ce(a.width??n.width??0,l)}}function ns(e,n={}){const a={top:null,left:null,bottom:null,right:null},o={width:0,height:0,headerHeight:0,headerPadding:{...a},footerHeight:0,footerPadding:{...a},contentPadding:{...a},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},l=Object.assign(e.get("safeAreaInset")??{},n.safeAreaInset??{});l&&(o.safeAreaTop=ce(l.top),o.safeAreaBottom=ce(l.bottom),o.safeAreaLeft=ce(l.left),o.safeAreaRight=ce(l.right));const r=e.get("pageLayout");if(!r)return null;const s=e.get("rootWidth")??-1,i=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,f=e.get("footerBarHeight")??0;Bo(o,r,n,!0,s,i,c,f);const p=t.reactive(o),u=e.getForParent(Qe);u&&(o.height=hn(e,u),o.width=gn(e,u),t.watch([()=>hn(e,u),()=>gn(e,u)],([k,y])=>{p.height=k,p.width=y}));const h=!u;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([k,y,v=-1,b=-1,d=0,m=0])=>{Bo(p,y,n,h,v,b,d,m)}),e.set(Qe,p),p}function Tn(e){return e.get(Qe)}function $n(e,n){if(n=n??e.get(Qe),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function En(e,n){if(n=n??e.get(Qe),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function hn(e,n){if(n=n??e.get(Qe),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=$n(e,n),o=En(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function gn(e,n){return n=n??e.get(Qe),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function yi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function vi(e){return!!e.getForParent(Qe)}var yn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(yn||{});function so(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=je();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let i=r.length-1;i>=0;i--){const c=r[i];if(so(c,o))return c}const s=e.value;return so(s,o)?s:null}):t.computed(()=>{const r=e.value;return so(r,o)?r:l?.get(n)})}function Ae(e){return Ve(e,"readonly",0,function(a){return he(a)})}function Te(e){return Ve(e,"disabled",0,function(a){return he(a)})}function Ie(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const s=t.ref(r);return t.watch(l,i=>{if(typeof a=="function"){const c=a(i);c!==s.value&&(s.value=c,o&&o("setValue",c))}else i!==s.value&&(s.value=i,o&&o("setValue",i))}),s}const os=new Map,vn=new Map;let Vo=null;function bi(e){Vo=e}function ls(e,n,a){if(a){let o=vn.get(a);o||(o=new Map,vn.set(a,o)),o.set(e,n)}else os.set(e,n)}function Je(e,n,a){!a&&Vo&&(a=Vo(e)??void 0);let o=null;if(a){let l=vn.get(a);l&&(o=l.get(n))}return o||(o=os.get(n)),o}function ki(e,n){for(let a in e){const o=e[a];ls(a,o,n)}}function Si(e){vn.delete(e)}function Ci(){return{top:0,left:0,bottom:0,right:0}}function wi(e=0,n=0){if(it){const a=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l={width:a,height:o-ce(e,o)-ce(n,o)};return{rootWidth:a,rootHeight:o,pageLayout:l}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{width:"100%",height:"100%",headerHeight:-1,footerHeight:-1}}}function Ni(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Bi{packages;_version;get version(){return this._version}constructor(n,a){this.packages=n,this._version=a}install(n,a){a?.install!==!1&&this.packages.forEach(r=>{if(r.install)n.use(r);else if(r.name){const s=Ni(r.name,a);n.component(s,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=pt();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=pn(()=>{const i={...a},c=document.documentElement.clientWidth||document.body.clientWidth,f=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=f,this.initPageLayout(i,l)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in a)o.indexOf(r)===-1&&l.set(r,a[r])}initPageLayout(n,a){const o=n.headerBarHeight??0,l=n.footerBarHeight??0,r=lt({},Ci(),n.safeAreaInset),s=wi(o,l),i=lt({},s.pageLayout,n.pageLayout);a=a??pt(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",i),a.set("rootWidth",s.rootWidth),a.set("rootHeight",s.rootHeight)}setScopeGetter(n){bi(n)}setAPI(n,a,o){ls(n,a,o)}getAPI(n,a,o){return Je(n,a,o)}batchSetAPI(n,a){ki(n,a)}clearScopeAPI(n){Si(n)}getRootDomain(){return pt()}}function G(e){const n="fox-"+e;return{componentName:n,scope:e.replace("-",""),create(a){return a.baseName=e,a.name=n,a.install=o=>{o.component(a.name,a)},t.defineComponent(a)},createDemo(a){return a.baseName=e,a.name="demo-"+e,t.defineComponent(a)}}}const Vi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Pr(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",s=e.id||new Date().getTime();l.id=r+s;let i={};fn(n.wrapper)?i=n.wrapper(a,l):i=n.wrapper;const c=t.createApp(i,e),f=n.components;return f&&f.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},as=(e,n)=>e?t.h(e,n):"";function De(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const me={disabled:{type:[Boolean,String],required:!1},readonly:{type:[Boolean,String],required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},textAlign:{type:[String],required:!1},hasBorder:{type:Boolean,required:!1,default:!0}},ye={prop:{type:String,required:!1},label:{type:String,required:!1},isRequired:{type:[String,Boolean],required:!1,default:!1},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1},infoMarkClass:{type:String,required:!1,default:"is-info"},warnMarkClass:{type:String,required:!1,default:"is-warn"},errorMarkClass:{type:String,required:!1,default:"is-error"},errorTip:{type:String,required:!1},errorIcon:{type:Object,required:!1},errorClass:{type:String,required:!1},warnTip:{type:String,required:!1},warnIcon:{type:Object,required:!1},warnClass:{type:String,required:!1},infoTip:{type:String,required:!1},infoIcon:{type:Object,required:!1},infoClass:{type:String,required:!1},contentClass:{type:String,required:!1,default:"content--default"},contentStyle:{type:Object,required:!1,default:{}},hintType:{type:String,required:!1,default:"text"},hintText:{type:[String,Number],required:!1},hintVisible:{type:[Boolean,String],required:!1,default:!0},hintProps:{type:Object,required:!1,default:{}},appearListen:{type:[Boolean,String],required:!1,default:!1}},rs={column:{type:[String,Number],required:!1},columnWidth:{type:[String,Number],required:!1},gutter:{type:[String,Number],required:!1},minItemWidth:{type:[String,Number],required:!1},maxItemWidth:{type:[String,Number],required:!1}},ss={name:{type:String,required:!1},tag:{type:String,required:!1,default:"div"},modelValue:{type:String,required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1},type:{type:[String],required:!1},justify:{type:[String],required:!1,default:"stretch"},align:{type:[String],required:!1,default:"start"},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},autoLayout:{type:[Boolean],required:!1,default:!0},isWrap:{type:[Boolean,String],required:!1,default:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},showMark:{type:[String,Boolean],required:!1,default:!1},markColor:{type:[String],required:!1},title:{type:String,default:""},titleColor:{type:[String],required:!1},collapse:{type:[String,Boolean],requried:!1},showCollapse:{type:[String,Boolean],required:!1,default:!1},collapsePosition:{type:[String],requried:!1,default:"right"},collapseText:{type:[String],requried:!1},expandText:{type:[String],requried:!1},collapseIcon:{type:[Object],requried:!1},collapseHeight:{type:[String,Number],requried:!1},rollingDisplay:{type:[Boolean],requried:!1,default:!0}},is=[];for(const e in ss)is.push(e);const Ai=Symbol.for("InnerPageScopeKey"),Ti={name:{type:String,required:!1,default:""},modelValue:{type:Object,required:!1},width:{type:[Number,String],required:!1},height:{type:[Number,String],required:!1},safeAreaInset:{type:Object,required:!1},contentPadding:{type:Object,required:!1},headerPadding:{type:Object,required:!1},footerPadding:{type:Object,required:!1},headerHeight:{type:[Number,String],required:!1},footerHeight:{type:[Number,String],required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1}},$i=(e,n)=>({inheritAttrs:!0,props:{...me,...rs,...Ti},setup(a,{slots:o}){const l=jo(a.name,a),r=t.inject(Ai,!1);if(l){const p=ns(l,a);De({getPageContentHeight:()=>hn(l,p),getPageContentWidth:()=>gn(l,p),getPageHeaderHeight:()=>$n(l,p),getPageFooterHeight:()=>En(l,p)}),p&&r&&(p.contentHeight="100%")}const s=t.computed(()=>({[e]:!0})),i=t.computed(()=>({})),c=t.getCurrentInstance(),f=(p,u=!1)=>{const h=c?.proxy;h&&typeof h.setNameValidateRules=="function"&&h.setNameValidateRules(p,!0,u)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,u],[h,k])=>{if(p&&h){const y=t.toRaw(h),v=t.toRaw(p),b=v?Reflect.ownKeys(v):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{b.includes(m)||(v[m]=[])}),f(v)}if(u&&k){const y=t.toRaw(k),v=t.toRaw(u),b=v?Reflect.ownKeys(v):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{b.includes(m)||(v[m]=[])}),f(v,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);f(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);f(p,!0)}}),()=>{const p={class:s.value,style:i.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:Ei,create:xi,scope:uV}=G("page"),Wo=xi($i(Ei));function Yo(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function xn(e){const n=t.unref(e),a=window.getComputedStyle(n,null),o=parseFloat(a.getPropertyValue("padding-left")),l=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-top")),s=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-s}}const Di=Symbol.for("InnerPageScopeKey"),cs={headerbar:{},radio:{},checkbox:{}};function Ii(e){Object.assign(cs,e)}function Dn(){return cs}const qi=(e,n,a,o=!1)=>({props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetTop:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},align:{type:[String],default:"center"},padding:{type:[Object],required:!1},leftShow:{type:[Boolean,String],required:!1,default:!0},leftIcon:{type:[Object],required:!1},leftText:{type:String,required:!1},titleShow:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},titleIcon:{type:[Object],required:!1},rightShow:{type:[String,Boolean],required:!1,default:!0},rightIcon:{type:[Object],required:!1},rightText:{type:String,required:!1,default:""}},emits:["back","click-title","click-right","click-right-text"],setup(l,r){const s=je(),i=s?Tn(s):null,c=t.inject(Di,!1),f=Dn(),p=e,u=t.computed(()=>{const x={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(x[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),x}),h=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),k=l.height!==null&&l.height!==void 0?ce(l.height):null,y=t.computed(()=>{const x={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const M=ze(l.padding??i.headerPadding);return Object.assign(x,M),k&&(i.headerHeight=k),i.headerHeight>0&&(x.height=i.headerHeight),x.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,x.safeAreaTop>0&&(x.top=x.safeAreaTop+(M.top??0),x.height&&x.height>0&&(x.height=x.height+x.safeAreaTop)),x}if(k&&(x.height=k),l.padding){const M=ze(l.padding);Object.assign(x,M)}return x}),v=t.ref(null),b=()=>{if(i&&v.value&&!Nn(v.value)){if(!o){const x=Yo(v.value);i.headerAllHeight=x.height}return i.headerMounted=!0,!0}return!1};let d=null;t.onMounted(()=>{i&&(Ho(b,50,5,50,!0),window.ResizeObserver&&v.value&&(d=new window.ResizeObserver(()=>{b()}),d.observe(v.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,d&&(d.disconnect(),d=null))});const m=t.computed(()=>{const x={};return y.value.height!==null&&y.value.height!==void 0&&(x.height=`${y.value.height}px`),y.value.top!==null&&y.value.top!==void 0&&(x.paddingTop=`${y.value.top}px`),y.value.left!==null&&y.value.left!==void 0&&(x.paddingLeft=`${y.value.left}px`),y.value.right!==null&&y.value.right!==void 0&&(x.paddingRight=`${y.value.right}px`),y.value.bottom!==null&&y.value.bottom!==void 0&&(x.paddingBottom=`${y.value.bottom}px`),x}),g=t.computed(()=>!(y.value.height!==null&&y.value.height!==void 0&&y.value.height<=0));function S(){r.emit("back")}function N(){r.emit("click-title")}function C(){r.emit("click-right")}function w(){r.emit("click-right-text")}const B=()=>{if(!l.leftShow)return null;const x=[];if(r.slots.left)x.push(r.slots.left());else{if(r.slots.leftIcon){const M=t.h("view",{class:"left-icon",onClick:S},[r.slots.leftIcon()]);x.push(M)}else{const M=l.leftIcon??f.headerbar.Left??a,$=t.h("view",{class:"left-icon",onClick:S},[t.h(M)]);x.push($)}if(l.leftText){const M=t.h("view",{class:"left-text",onClick:S},[l.leftText]);x.push(M)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__left"},x)},V=()=>{if(!l.rightShow)return null;const x=[];if(r.slots.right)x.push(r.slots.right());else{if(l.rightText){const M=t.h("view",{class:"right-text",onClick:w},[l.rightText]);x.push(M)}if(r.slots.rightIcon){const M=t.h("view",{class:"right-icon",onClick:C},[r.slots.rightIcon()]);x.push(M)}else if(l.rightIcon){const M=t.h("view",{class:"right-icon",onClick:C},[t.h(l.rightIcon)]);x.push(M)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__right"},x)},T=()=>{if(!l.titleShow)return null;const x=[],M=r.slots.default?r.slots.default():null;if(M)x.push(M);else{if(l.title){const $=t.h("view",{class:"title-text"},[l.title]);x.push($)}if(r.slots.titleIcon){const $=t.h("view",{class:"title-icon",onClick:N},[r.slots.titleIcon()]);x.push($)}else if(l.titleIcon){const $=t.h("view",{class:"title-icon",onClick:N},[t.h(l.titleIcon)]);x.push($)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__title"},x)},A=()=>{const x=[],M=r.slots.bottom?r.slots.bottom():null;return M&&x.push(M),x.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},x)};return()=>{if(!g.value)return null;const x=[];if(r.slots.all)x.push(r.slots.all());else{const $=[],E=B();E&&$.push(E);const F=T();F&&$.push(F);const I=V();if(I&&$.push(I),$.length>0){const U=t.h("view",{class:h.value},$);x.push(U)}const j=A();j&&x.push(j)}if(x.length===0)return null;const M={class:u.value,style:m.value,ref:v};return t.h("view",M,x)}}}),{componentName:Mi,create:Pi,scope:Li}=G("header-bar"),Xo=Pi(qi(Mi,Li,ne.Left,!1)),zi=Symbol.for("InnerPageScopeKey");function Fi(e,n,a=!1){return{props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetBottom:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},padding:{type:[Object],required:!1},align:{type:String,required:!1,default:"center"}},setup(o,l){const r=je(),s=r?Tn(r):null,i=t.inject(zi,!1),c=e,f=t.computed(()=>{const b={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(b[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),b}),p=o.height!==null&&o.height!==void 0?ce(o.height):null,u=t.computed(()=>{const b={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const d=ze(o.padding??s.footerPadding);return Object.assign(b,d),p&&(s.footerHeight=p),s.footerHeight>0&&(b.height=s.footerHeight),b.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,b.safeAreaBottom>0&&(b.bottom=b.safeAreaBottom+(d.bottom??0),b.height&&b.height>0&&(b.height=b.height+b.safeAreaBottom)),b}if(p&&(b.height=p),o.padding){const d=ze(o.padding);Object.assign(b,d)}return b}),h=t.ref(null),k=()=>{if(s&&h.value&&!Nn(h.value)){if(!a){const b=Yo(h.value);s.footerAllHeight=b.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(Ho(k,50,5,50,!0),window.ResizeObserver&&(y=new window.ResizeObserver(()=>{k()}),y.observe(h.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,y&&(y.disconnect(),y=null))});const v=t.computed(()=>{const b={};return u.value.height!==null&&u.value.height!==void 0&&(b.height=ge(u.value.height)),u.value.top!==null&&u.value.top!==void 0&&(b.paddingTop=ge(u.value.top)),u.value.left!==null&&u.value.left!==void 0&&(b.paddingLeft=ge(u.value.left)),u.value.right!==null&&u.value.right!==void 0&&(b.paddingRight=ge(u.value.right)),u.value.bottom!==null&&u.value.bottom!==void 0&&(b.paddingBottom=ge(u.value.bottom)),b});return()=>{const b=l.slots.default?l.slots.default():[],d={ref:h,class:f.value,style:v.value};return t.h("view",d,b)}}}}const{componentName:Ri,create:Oi,scope:Ki}=G("footer-bar"),Qo=Oi(Fi(Ri,Ki,!1));function Ui(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?Tn(o):null,s=t.computed(()=>{const f={};if(o&&r){if(a.padding){const d=ze(a.padding);Object.assign(r.contentPadding,d)}const p=$n(o,r),u=En(o,r);let h="";r.contentHeight?h=`${r.contentHeight}`:h=`${r.height}px`,console.debug("[content]page height:",h),console.debug("[content]header height:",p),console.debug("[content]footer height:",u),console.debug("[content]padding:",r.contentPadding),f.height=h;let k=(r&&r.contentPadding&&r.contentPadding.top)??-1;(k>=0||p>0)&&(k=k<0?0:k,f.paddingTop=`${p+k}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||u>0)&&(y=y<0?0:y,f.paddingBottom=`${u+y}px`);const v=(r&&r.contentPadding&&r.contentPadding.left)??-1;v>=0&&(f.paddingLeft=`${v}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(f.paddingRight=`${b}px`),f}if(a.padding){const p=ze(a.padding);p.left&&(f.paddingLeft=`${p.left}px`),p.top&&(f.paddingTop=`${p.top}px`),p.right&&(f.paddingRight=`${p.right}px`),p.bottom&&(f.paddingBottom=`${p.bottom}px`)}return f}),i=t.ref(null),c=yt(()=>{if(r&&i.value){const f=xn(i.value);r.contentInnerHeight=f.height,r.contentInnerWidth=f.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>s.value,()=>l.value],([])=>{c()}),{contentRef:i,classes:l,styles:s}}}}const{componentName:Hi,create:ji,scope:dV}=G("content"),Wi=ji(Ui(Hi));function Yi(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{ref:"contentRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const te=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Go=te(Wi,[["render",Yi]]),vt="GroupStateKey",us=Symbol.for("GroupScopeKey");function In(){return t.inject(us,!1)}function qn(e=!0){t.provide(us,e)}function Xi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Mr(l)||(e[o]=l)})}function Qi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Xi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(vt,r),r}function io(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(vt);if(!c)return;const f=e.get("groupLayout")??{};a===-1&&(a=f.column??1),o===-1&&(o=f.gutter??0),r||(r=f.minItemWidth??-1),s||(s=f.maxItemWidth??-1);const p=ce(r),u=ce(s);i||(i=f.type??"grid");const h=()=>{const k=n===""||n===-1,y=ce(n);let v=fe(a);const b=ce(o);if(!k){let g=(y-(v-1)*b)/v;for(;u!==-1&&g>u;)v++,g=(y-(v-1)*b)/v;for(;p!==-1&&v>1&&g<p;)v--,g=(y-(v-1)*b)/v}let d=!1;const m=c.layout;m.value.width=n,m.value.column!==v&&(m.value.column=v,d=!0),m.value.gutter!==b&&(m.value.gutter=b,d=!0),m.value.type!==i&&(m.value.type=i,d=!0),d&&t.triggerRef(m)};if(l)h();else{const k=++c.passport;setTimeout(()=>{k===c.passport&&h()},50)}}function Mn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.layout}function Pn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.order}function Ua(e,n=1){if(n==="stretch")return-1;const a=fe(n);return a===-1?100:100*a/e}function Ln(e,n,a=1,o=0,l){const r={};let s=0;l?s=ce(l):s=Ua(n.column,a),s>0&&(r.width=`${s}%`);const i=Ua(n.column,o);i>0&&(r["margin-left"]=`${i}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function zn(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,f=c+(n.column-c);return e.index=e.index+(f-c),{"grid-column":`${c+1} / -1`}}let l=fe(a);if(l===-1){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}if(l>n.column){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}const r=fe(o)%n.column;let s=(e.index+r)%n.column,i=s+l;return i>n.column?(s=0,i=s+l,e.index=e.index+(n.column-s)+l):e.index=e.index+r+l,r>0?{"grid-column":`${s+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const ds=Symbol("RollingStateKey");function Gi(e){t.provide(ds,e)}function Zi(){return t.inject(ds,null)}function Ao(e){let n=0;const a=window.getComputedStyle(e,null);if(a.getPropertyValue("box-sizing")==="content-box"){const l=parseFloat(a.getPropertyValue("padding-top")),r=parseFloat(a.getPropertyValue("padding-bottom"));n=e.clientHeight-l-r}else n=e.offsetHeight;return n}function Ji(e){let n=Ao(e);if(n<=0){const a=e.cloneNode(!0),o=e.offsetWidth;a.style=`width: ${o}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(a),n=Ao(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function _i(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const ec={...me,...rs,...ss};function tc(e,n,a){return{props:ec,emits:["update:collapse","header-click"],setup(o,l){const r=jo(o.name,o,is),s=Qi(r,{type:o.type}),i=In();qn(!0);const c=o.rollingDisplay?Zi():null,f=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),u=t.computed(()=>i&&r?Mn(r,!0).value:null),h=t.getCurrentInstance(),k=(K,H=!1)=>{const X=h?.proxy;X&&typeof X.setNameValidateRules=="function"&&X.setNameValidateRules(K,!0,H)};t.watch([()=>o.rules,()=>o.pureDataRules],([K,H],[X,R])=>{if(K&&X){const Q=t.toRaw(X),ee=t.toRaw(K),ae=ee?Reflect.ownKeys(ee):[];(Q?Reflect.ownKeys(Q):[]).forEach(pe=>{ae.includes(pe)||(ee[pe]=[])}),k(ee)}if(H&&R){const Q=t.toRaw(R),ee=t.toRaw(H),ae=ee?Reflect.ownKeys(ee):[];(Q?Reflect.ownKeys(Q):[]).forEach(pe=>{ae.includes(pe)||(ee[pe]=[])}),k(ee,!0)}},{deep:!0});const y=e,v=t.computed(()=>{const K={};if(K.height=E.value,o.width)o.width!=="auto"&&(K.width=ge(o.width));else{const H=i?Pn(r,!0):null;if(u.value&&H){if(u.value.type==="grid"){const X=zn(H,u.value,o.span,o.offset);Object.assign(K,X)}else if(u.value.type==="flow"){const X=Ln(H,u.value,o.span,o.offset,o.width);Object.assign(K,X)}}}return K}),b=t.computed(()=>{const K=s.layout.value.type;return K==="grid"||K==="flow"?{[`${y}--${K}`]:!0,[`${y}--${K}-justify-${o.justify}`]:!0,[`${y}--${K}-align-${o.align}`]:!0,[`${y}--gutter`]:!0}:{[`${y}--${K}`]:!0,[`${y}--gutter`]:!0}}),d=t.computed(()=>{if(s.layout.value.type==="grid"){let H="";if(o.columnWidth)H=`repeat(auto-fill, ${o.columnWidth})`;else{const X=_i(B.value,s.layout.value.column,s.layout.value.gutter);H=`repeat(${s.layout.value.column}, ${X})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":H}}}),m=t.toRef(o,"gutter"),g=t.toRef(o,"column"),S=t.computed(()=>i||p.value?!0:he(o.isWrap)),N=[],C=K=>{N.push(K)},w=()=>{let K=N.length;N.splice(0,K)},B=t.ref(-1),V=K=>{const H=xn(K).width;H>0&&H!==B.value&&(B.value=H)};io(r,B.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([B,g,m],([K,H,X])=>{s.order.index=0,io(r,K,H,X,!1,o.minItemWidth,o.maxItemWidth,o.type)});const T=t.computed(()=>F.value?o.expandText??"":o.collapseText??""),A=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),x=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!F.value,"is-collapse":F.value})),M=t.ref(),$=t.ref(),E=t.computed(()=>I.value||ge(o.height)||""),F=t.ref(!1),I=t.ref(""),j=t.ref(!1);let U=-1;const Z=(K,H=!0)=>{const X=M.value;if(X&&F.value!==K){if(U=U<=0?Ji(X):U,j.value=!0,H)if(X.style["will-change"]="height",X.ontransitionend=function(){X.ontransitionend=null,this.style["will-change"]="auto",K||(I.value="",j.value=!1)},K){let R=0;o.collapseHeight?R=o.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(R=$.value.offsetHeight),I.value=`${U}px`,t.nextTick(()=>{I.value=`${R}px`})}else I.value=`${U}px`;else if(K){let R=0;o.collapseHeight?R=o.collapseHeight:$.value&&$.value.classList.contains(`${e}__header`)&&(R=$.value.offsetHeight),I.value=`${R}px`}else j.value=!1,I.value=`${U}px`;F.value=K,l.emit("update:collapse",K)}};t.watch(()=>o.collapse,K=>{Z(K)});const _=K=>{l.emit("header-click",K)},W=()=>{q()},q=K=>{K=K??!F.value,Z(K)};De({toggleCollapse:q,doLayout:()=>{N[0]&&(V(N[0]),io(r,B.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let D=null,z=!0;const P=K=>{if(o.rules){const H=t.toRaw(o.rules);k(H)}if(o.pureDataRules){const H=t.toRaw(o.pureDataRules);k(H,!0)}if(it&&(K&&Z(he(o.collapse),!1),o.autoLayout&&Array.isArray(N)&&N.length>0)){const H=N[0];V(H),window.ResizeObserver&&(D=new window.ResizeObserver(()=>{V(H)}),D.observe(H))}},O=()=>{D?.disconnect(),D=null},Y=!p.value||c?.acquire();Y&&(f.value=p.value?!0:null),t.onMounted(()=>{if(Y&&(P(z),z=!1),p.value&&c){let K=null,H=c.initialHeight;c.observe(M.value,X=>{if(X!==f.value)if(X)f.value=!0,F.value||(I.value=""),K=setTimeout(()=>{K=null,f.value!==!1&&(P(z),z=!1)},100);else{if(K!==null&&clearTimeout(K),f.value=!1,!F.value)if(z)I.value=c.initialHeight;else{let R=Ao(M.value);R<=0?I.value=H:(I.value=`${R}px`,H=I.value)}z||O()}})}}),t.onUnmounted(()=>{D?.disconnect(),c&&c.unobserve(M.value)});const J=(K="right")=>{const H=[];if(T.value){const ee={class:A.value},ae=t.h("span",ee,[T.value]);H.push(ae)}const X={class:x.value},R=o.collapseIcon??a,Q=t.h(R,X);return H.push(Q),H.length>0?t.h("div",{class:{[`${y}__header-collapse`]:!0,[`is-${K}`]:!0},onClick:W},H):null},oe=(K,H,X,R)=>{const Q={...b.value};return H===0&&(Q[`${y}__first`]=!0),X>=R-1&&(Q[`${y}__last`]=!0),t.h("div",{ref:C,key:`${H}`,class:Q,style:d.value},K)};return()=>{if(p.value&&f.value!==!0){const Q=o.tag||"div";return t.h(Q,{ref:M,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:v.value},[])}s.order.index=0;const K=[];let H=0;if(l.slots.header){const Q={key:`${H++}`,ref:$,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:_},ee=t.h("div",Q,[l.slots.header()]);K.push(ee)}else{const Q=[],ee=o.collapsePosition==="left";if(ee&&o.showCollapse){const ae=J("left");ae&&Q.push(ae)}if(o.title||l.slots.title){if(o.showMark){const ae={class:{[`${y}__header-mark`]:!0}};o.markColor&&(ae.style={background:o.markColor});const re=t.h("div",ae);Q.push(re)}if(l.slots.title){const ae=t.h("div",{class:{[`${y}__header-title`]:!0}},[l.slots.title()]);Q.push(ae)}else if(o.title){const ae=t.h("div",{class:{[`${y}__header-title`]:!0}},[o.title]);Q.push(ae)}}if(l.slots.toolbar&&Q.push(l.slots.toolbar()),!ee&&o.showCollapse){const ae=J("right");ae&&Q.push(ae)}if(Q.length>0){const ae={key:`${H++}`,ref:$,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:_},re=t.h("div",ae,Q);K.push(re)}}w();const X=l.slots.default?l.slots.default():[],R=s.layout.value.type;if(R==="grid"){const Q=oe(X,H++,0,X.length);K.push(Q)}else if(R==="flow"){const Q=oe(X,H++,0,X.length);K.push(Q)}else for(let Q=0;Q<X.length;Q++){const ee=X[Q],ae=oe([ee],H++,Q,X.length);K.push(ae)}if(S.value){const Q=o.tag||"div";return t.h(Q,{ref:M,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:v.value},[K])}else return K}}}}const{componentName:nc,create:oc,scope:lc}=G("group"),Zo=oc(tc(nc,lc,ne.RectUp));function ac(e){return e===window}const rc=/matrix\((.+)\)/,fs=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(ac(n))return{x:0,y:0};let a=0,o=0,l=n;for(;l!==null;)a+=l.offsetLeft,o+=l.offsetTop,l=l.offsetParent;let r=0,s=0,i=0,c=0;for(l=n;l!==document;){s+=l.scrollTop,r+=l.scrollLeft;const{transform:f}=window.getComputedStyle(l);if(f){const p=rc.exec(f);if(p){let h=p[1].split(/\s*,\s*/);h.length==6&&(i+=Number(h[4]),c+=Number(h[5]))}}l=l.parentNode}return a-=r,o-=s,a+=i,o+=c,{x:a,y:o}};class sc{watchedListeners=[];add(n){this.watchedListeners.push(n)}remove(n){const a=this.watchedListeners.indexOf(n);a!==-1&&this.watchedListeners.splice(a,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(n=>{try{n()}catch{}})}}class ic{monitorRegister=new WeakMap;watch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r||(r=new sc,o.addEventListener("scroll",r.listen),o===document.body&&o.addEventListener("resize",r.listen),this.monitorRegister.set(o,r)),r.add(a),o=o.parentNode}}unwatch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r&&(r.remove(a),r.size()===0&&(this.monitorRegister.delete(o),o.removeEventListener("scroll",r.listen),o===document.body&&o.removeEventListener("resize",r.listen))),o=o.parentNode}}}const Ha=new ic,ms={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"&yen;"},decimalLength:{type:[Number,String],required:!1,default:2},digits:{type:[Number,String],required:!1,default:3},separator:{type:String,required:!1,default:","},position:{type:String,default:"before"},size:{type:String,default:"large"}},{componentName:cc,create:uc}=G("price"),dc=uc({props:{...ms},setup(e){const n=t.computed(()=>({[cc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ve(e.price)==0?"":Sn(e.price,e.decimalLength,!0,fe(e.digits),e.separator)),l=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(0,i)}),r=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(i+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),fc=["innerHTML"],mc=["innerHTML"];function pc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.needSymbol&&e.position=="before"?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,fc)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--${e.size}`)},t.toDisplayString(e.intText),3),e.decimalText.length!=0?(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(`fox-price--decimal-${e.size}`)},".",2)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--decimal-${e.size}`)},t.toDisplayString(e.decimalText),3),e.needSymbol&&e.position=="after"?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,mc)):t.createCommentVNode("",!0)],2)}const Ge=te(dc,[["render",pc]]),{componentName:co,create:hc}=G("hint-text"),gc=hc({components:{Price:Ge},props:{...ms,type:{type:String,default:"number"},placement:{type:String,default:"top-start"},transition:{type:Boolean,default:!0},size:{type:String,default:"default"},arrowSize:{type:Number,default:6},showArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:20},offset:{type:Number,default:12},id:{type:String},reference:{type:Object},autoFit:{type:Boolean,default:!0},message:{type:String,default:""},visible:{type:Boolean,default:!0},unmount:{type:Function},customClass:{type:String},customStyle:{type:Object},customTextClass:{type:String},customTextStyle:{type:Object},closeOnClick:{type:Boolean},zIndex:{type:[String,Number]}},emits:["update:visible"],setup(e,n){const a=t.ref({top:null,right:null,bottom:null,left:null}),o=t.ref({x:0,y:0}),l=t.ref(0),r=t.ref(0),s=t.ref(e.placement),i=t.ref(!1),c=t.ref(null),f=(A,x,M,$,E,F)=>{const I=document.documentElement.clientWidth||document.body.clientWidth,j=document.documentElement.clientHeight||document.body.clientHeight,U=A.split("-");let Z=[];U[0]==="top"?Z=["top","bottom","right","left"]:U[0]==="bottom"?Z=["bottom","top","right","left"]:U[0]==="left"?Z=["left","top","bottom","right"]:U[0]==="right"&&(Z=["right","top","bottom","left"]);const _={top:null,right:null,bottom:null,left:null},W=[];for(let q=0;q<Z.length;q++){const L=Z[q];if(W[0]=L,U[1]&&(W[1]=U[1]),L==="top"){const D=x.y-F-e.arrowSize-e.offset;if(D>=0){_.top=D;let z=0;U[1]==="start"?z=x.x:U[1]==="end"?z=x.x+M-E:z=x.x+M/2-E/2;const P=I-z-E;P<0?(z+=P,u.value=-P):u.value=0,_.left=z<0?0:z;break}}else if(L==="bottom"){const D=x.y+$+e.arrowSize+e.offset;if(D+F<=j){_.top=D;let z=0;U[1]==="start"?z=x.x:U[1]==="end"?z=x.x+M-E:z=x.x+M/2-E/2;const P=I-z-E;P<0?(z+=P,u.value=-P):u.value=0,_.left=z<0?0:z;break}}else if(L==="left"){const D=x.x-E-e.arrowSize-e.offset;if(D>=0){_.left=D;let z=0;U[1]==="start"?z=x.y:U[1]==="end"?z=x.y+$-F:z=x.y+$/2-F/2,_.top=z<0?0:z;break}}else if(L==="right"){const D=x.x+M+e.arrowSize+e.offset;if(D+E<=I){_.left=D;let z=0;U[1]==="start"?z=x.y:U[1]==="end"?z=x.y+$-F:z=x.y+$/2-F/2,_.top=z<0?0:z;break}}}return{bestPlacement:W.join("-"),bestInsetRect:_}},p=(A,x,M=10)=>{if(!it||x===!1||!A)return;o.value=fs(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const $=c.value.offsetHeight,E=c.value.offsetWidth,{bestPlacement:F,bestInsetRect:I}=f(e.placement,o.value,l.value,r.value,E,$);s.value=F,a.value=I,i.value=!0},u=t.ref(0),h=yt(()=>{p(e.message,e.visible)},10),k=t.ref(e.visible);t.watch(()=>e.visible,A=>{k.value=A});const y=t.computed(()=>k.value&&v.value),v=t.ref(!0),b=yt(A=>{const x=A[0];x&&(v.value=x.isIntersecting)},10),d=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([A,x])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Ha.watch(e.reference,h),d.observe(e.reference)}),t.onBeforeMount(()=>{Ha.unwatch(e.reference,h),d.unobserve(e.reference),d.disconnect()});const m=t.computed(()=>{const A={[co]:!0};return s.value.startsWith("top")?A["is-top"]=!0:s.value.startsWith("right")?A["is-right"]=!0:s.value.startsWith("bottom")?A["is-bottom"]=!0:s.value.startsWith("right")&&(A["is-right"]=!0),e.size==="small"?A["is-small"]=!0:e.size==="large"&&(A["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(A[`${e.customClass}`]=!0),A}),g=t.computed(()=>{const A={};a.value.top!==null&&(A.top=`${a.value.top}px`),a.value.right!==null&&(A.right=`${a.value.right}px`),a.value.bottom!==null&&(A.bottom=`${a.value.bottom}px`),a.value.left!==null&&(A.left=`${a.value.left}px`),e.autoFit&&(A["min-width"]=`${l.value}px`);const x=document.documentElement.clientWidth||document.body.clientWidth;return A["max-width"]=`${x}px`,i.value&&(A.opacity="1"),e.transition||(A.transition="none"),e.zIndex&&(A["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(A,e.customStyle),A}),S=t.computed(()=>{const A=[`${co}__content`];return e.customTextClass&&A.push(e.customTextClass),A}),N=t.computed(()=>{const A={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(A,e.customTextStyle),A}),C=t.computed(()=>({[`${co}__arrow`]:!0})),w=t.computed(()=>{const A={};return e.showArrow?(A.width=`${e.arrowSize}px`,A.height=`${e.arrowSize}px`,s.value==="top"?(A.left="50%",A.bottom=`-${e.arrowSize}px`,A.transform=" translate(-50%, 0%)"):s.value==="top-start"?(A.left=`${e.arrowOffset+u.value}px`,A.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(A.right=`${e.arrowOffset-u.value}px`,A.bottom=`-${e.arrowSize}px`):s.value==="right"?(A.left=`-${e.arrowSize}px`,A.top="50%",A.transform=" translate(0%, -50%)"):s.value==="right-start"?(A.left=`-${e.arrowSize}px`,A.top=`${e.arrowOffset}px`):s.value==="right-end"?(A.left=`-${e.arrowSize}px`,A.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(A.left="50%",A.top=`-${e.arrowSize}px`,A.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(A.left=`${e.arrowOffset+u.value}px`,A.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(A.right=`${e.arrowOffset-u.value}px`,A.top=`-${e.arrowSize}px`):s.value==="left"?(A.right=`-${e.arrowSize}px`,A.top="50%",A.transform=" translate(0%, -50%)"):s.value==="left-start"?(A.right=`-${e.arrowSize}px`,A.top=`${e.arrowOffset}px`):s.value==="left-end"&&(A.right=`-${e.arrowSize}px`,A.bottom=`-${e.arrowOffset}px`),A):{display:"none"}}),B=t.computed(()=>y.value&&e.closeOnClick),V=t.computed(()=>{const A={};return e.zIndex&&(A["z-index"]=`${e.zIndex}`),A});return{show:y,tipRef:c,classes:m,styles:g,textClasses:S,textStyles:N,arrowClasses:C,arrowStyles:w,overlayShow:B,overlayStyle:V,onClickOverlay:()=>{k.value=!1,n.emit("update:visible",!1)}}}}),yc=["innerHTML"];function vc(e,n,a,o,l,r){const s=t.resolveComponent("Price");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.overlayShow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fox-hint-text__overlay",style:t.normalizeStyle(e.overlayStyle),onClick:n[0]||(n[0]=(...i)=>e.onClickOverlay&&e.onClickOverlay(...i))},null,4)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{ref:"tipRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.createElementVNode("div",{class:t.normalizeClass(e.textClasses),style:t.normalizeStyle(e.textStyles)},[e.type=="number"?(t.openBlock(),t.createBlock(s,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:e.message},null,8,yc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const ps=te(gc,[["render",vc]]);class Fn{seed=new Date().getTime();constructor(n){this.seed=n??new Date().getTime()}get(){let n=this.seed++;return this.seed<0&&(this.seed=0),n}}const To={},bc=new Fn,ht=new Map,bn=e=>{if(e){const n=document.getElementById(e);ht.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of ht.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}ht.clear()}},kc=e=>{e.unmount=bn;const n=document.getElementById(e.id);if(n){const a=ht.get(e.id);a?e={...To,...a,...e}:e={...To,...e},e.transition=!1;const o=t.createVNode(ps,e);return t.render(o,n),e.id}},Sc=e=>{e.unmount=bn;let n=e.id??`hinttext_${bc.get()}`;e={...To,...e},e.id=n,ht.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(ps,e);return t.render(o,a),document.body.appendChild(a),n},Cc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},Vt={show(e,n,a={},o=!0){Cc(n);const l=a.id;return l&&ht.has(l)?kc({...a,message:n,reference:e}):(o&&bn(),Sc({...a,message:n,reference:e}))},hide(e){bn(e)},install(e){e.config.globalProperties.$hintText=Vt}};function wc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...me,...ye},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Be({componentName:e,validate:!1},s);const i=je(),c=In();qn(!1);const f=t.computed(()=>c&&i?Mn(i,!1).value:null),p=e,u=t.ref(null),h=t.computed(()=>{const R={[p]:!0,[`${p}__gutter`]:f.value&&f.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(R[l.errorMarkClass]=!!F.value,R[l.warnMarkClass]=!!$.value,R[l.infoMarkClass]=!!x.value,typeof u.value=="function"){const Q=u.value(s);R[Q]=!0}else if(typeof u.value=="string"){const Q=u.value;R[Q]=!0}return R}),k=t.ref(null),y=t.computed(()=>{const R={};if(l.width)l.width!=="auto"&&(R.width=ge(l.width));else{const Q=c&&i?Pn(i,!1):null;if(f.value&&Q){if(f.value.type==="grid"){const ee=zn(Q,f.value,l.span,l.offset);Object.assign(R,ee)}else if(f.value.type==="flow"){const ee=Ln(Q,f.value,l.span,l.offset,l.width);Object.assign(R,ee)}}}if(typeof k.value=="function"){const Q=k.value(s);Q&&Object.assign(R,Q)}else if(k.value&&typeof k.value=="object"){const Q=k.value;Object.assign(R,Q)}return R}),v=t.ref(null),b=t.computed({get:()=>v.value??he(l.isRequired),set:R=>{v.value=R}}),d=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",yn.Near),g=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),S=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),N=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),C=Ve(t.toRef(l,"labelWidth"),"labelWidth",yn.Near),w=t.computed(()=>C&&C.value?{width:ge(C.value)}:{}),B=t.computed(()=>({"label--string":!0,"label--required":b.value})),V=t.computed(()=>({content:!0,[l.contentClass]:!0})),T=t.computed(()=>({...l.contentStyle})),A=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});De({setRequired(R){b.value=R},setErrorTip(R){A.errorTip=R},setErrorIcon(R){A.errorIcon=R},setWarnTip(R){A.warnTip=R},setWarnIcon(R){A.warnIcon=R},setInfoTip(R){A.infoTip=R},setInfoIcon(R){A.infoIcon=R},setCustomClassName(R){u.value=R},setCustomStyle(R){k.value=R}});const x=t.computed(()=>l.infoTip||A.infoTip),M=t.computed(()=>l.infoIcon||A.infoIcon),$=t.computed(()=>l.warnTip||A.warnTip),E=t.computed(()=>l.warnIcon||A.warnIcon),F=t.computed(()=>l.errorTip||A.errorTip),I=t.computed(()=>l.errorIcon||A.errorIcon),j=t.computed(()=>F.value?"error":$.value?"warn":x.value?"info":""),U=()=>j.value.length>0,Z=t.computed(()=>j.value==="error"?F.value:j.value==="warn"?$.value:j.value==="info"?x.value:""),_=t.computed(()=>j.value==="error"?I.value:j.value==="warn"?E.value:j.value==="info"?M.value:null),W=t.computed(()=>{const R={[`${p}__tip`]:!0,[`${p}__tip--${j.value}`]:!0,[`${p}--animate`]:!0};return j.value==="error"&&l.errorClass?R[`${l.errorClass}`]=!0:j.value==="warn"&&l.warnClass?R[`${l.warnClass}`]=!0:j.value==="info"&&l.infoClass&&(R[`${l.infoClass}`]=!0),R}),q=t.computed(()=>{const R={};return m&&m.value==="top"||!d()?R["padding-left"]="0px":C&&C.value&&(R["padding-left"]=ge(C.value)),R}),L=t.ref();let D="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([R,Q,ee,ae])=>{L.value&&(R&&!ue(Q)?D?a.show(L.value,Q,{...ae,id:D,type:ee},!0):D=a.show(L.value,Q,{...ae,type:ee},!0):a.hide(D))});let z=null;const P=()=>{z||!L.value||(z=new IntersectionObserver(R=>{let Q=!1;for(let ee of R)if(ee.intersectionRatio>0){Q=!0,Q&&r.emit("appear",ee);break}Q||r.emit("disappear")}),z.observe(L.value))},O=()=>{!z||!L.value||(z.unobserve(L.value),z=null)};t.watch(()=>he(l.appearListen),R=>{R?P():O()}),t.onMounted(()=>{he(l.appearListen)&&P()}),t.onUnmounted(O);const Y=()=>{if(!d())return null;const R=[],Q=r.slots?.label?.()??l.label,ee={class:B.value},ae=t.h("div",ee,[Q]);if(R.push(ae),r.slots.fixedPreTip){const pe=r.slots.fixedPreTip();R.push(pe)}const re={class:N.value,style:w.value};return t.h("div",re,R)},J=()=>{const R=[];if(r.slots.prepend){const ee=r.slots.prepend();R.push(ee)}if(r.slots.default){const ee=r.slots.default();R.push(ee)}if(r.slots.append){const ee=r.slots.append();R.push(ee)}if(r.slots.fixedTip){const ee={class:[`${p}__fixed-tip`]},ae=t.h("div",ee,[r.slots.fixedTip()]);R.push(ae)}const Q={ref:L,class:V.value,style:T.value};return t.h("div",Q,R)},oe=()=>{const R=_.value;return R?typeof R=="function"?t.h("div",{class:"fox-item__tip--icon"},[R()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(R)]):null},K=()=>{const R=Z.value;return R?typeof R=="function"?t.h("div",{class:"fox-item__tip--text"},[R()]):t.h("div",{class:"fox-item__tip--text"},[R]):null},H=()=>{if(!U())return null;const R=[],Q=oe();Q&&R.push(Q);const ee=K();ee&&R.push(ee);const ae={class:W.value,style:q.value};return t.h("div",ae,R)},X=()=>r.slots?.hide?.()??null;return()=>{const R=[],Q=[],ee=Y();ee&&Q.push(ee);const ae=J();ae&&Q.push(ae);const re={class:S.value},pe=t.h("div",re,Q);R.push(pe);const ke=H();ke&&R.push(ke);const Oe=X();Oe&&R.push(Oe);const no={class:h.value,style:y.value,prop:l.prop};return t.h("div",no,R)}}}}const{componentName:Nc,create:Bc,scope:Vc}=G("item"),we=Bc(wc(Nc,Vc,Vt,!1));function Ac(e,n){return{props:{span:{type:[Number,String],required:!1,default:-1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1},align:{type:[String],required:!1,default:"center"},contentClass:{type:[String],required:!1},contentStyle:{type:[Object]},divide:{type:[Boolean,String],required:!1,default:!1}},setup(a,o){const l=e,r=t.computed(()=>({[l]:!0,[`${l}__stretch`]:a.span==="stretch",[`${l}__${a.align}`]:!0})),s=je(),i=In();qn(!1);const c=t.computed(()=>{const f={};if(a.width)a.width!=="auto"&&(f.width=ge(a.width));else if(i&&s){const p=Mn(s,!1),u=Pn(s,!1);if(p.value&&u){if(p.value.type==="grid"){const h=zn(u,p.value,a.span,a.offset);Object.assign(f,h)}else if(p.value.type==="flow"){const h=Ln(u,p.value,a.span,a.offset,a.width);Object.assign(f,h)}}}return f});return()=>{const f=[];if(o.slots.default){const u=o.slots.default();if(a.divide)for(let h=0;h<u.length;h++){if(h>0){const k=t.h("div",{class:{[`${l}__divide`]:!0}});f.push(k)}f.push(u[h])}else Reflect.apply([].push,f,u)}const p={class:r.value,style:c.value};return t.h("div",p,f)}}}}const{componentName:Tc,create:$c,scope:fV}=G("row-item"),Jo=$c(Ac(Tc));function Ec(e,n){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1}},setup(a,o){const l=je(),r=In();qn(!1);const s=t.computed(()=>r&&l?Mn(l,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:a.span==="stretch"})),f=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const u=r&&l?Pn(l,!1):null;if(s.value&&u){if(s.value.type==="grid"){const h=zn(u,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Ln(u,s.value,a.span,a.offset,a.width);Object.assign(p,h)}}}return p});return()=>{const p={class:c.value,style:f.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:xc,create:Dc,scope:mV}=G("slot-item"),_o=Dc(Ec(xc)),ja={type:{type:String,default:"text"},modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Ic(e,n,a,o){return{props:{...me,...ye,...ja},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=se.useFoxI18n(n),p=f(l,["placeholder"]),u=t.ref(!1),h=Ie(l,"modelValue",null,c),k=e,y=t.computed(()=>({[k]:!0,"is-disabled":s.value,"is-readonly":i.value})),v=Ve(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const E={};return v.value&&(E["text-align"]=v.value),E}),d=E=>{let I=E.target.value;l.type==="digit"&&(I=wo(I,!0)),l.type==="number"&&(I=wo(I,!1)),l.maxLength&&I.length>Number(l.maxLength)&&(I=I.slice(0,Number(l.maxLength))),h.value=I,c("update:modelValue",I,E),c("change",I,E)};let m=Ie(l,"hintText"),g=t.ref(!1);const S=E=>{let I=E.target.value;u.value=!0,ue(m.value)||(g.value=!0),c("focus",I,E)},N=E=>{setTimeout(()=>{g.value&&(g.value=!1),u.value=!1},0);let I=E.target.value;l.maxLength&&I.length>Number(l.maxLength)&&(I=I.slice(0,Number(l.maxLength))),c("blur",I,E)},C=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),w=t.computed(()=>{const E={};return r.slots.append&&!B.value&&!M.value&&(E.display="none"),E}),B=t.computed(()=>ve(l.unit)>0),V=t.computed(()=>!M.value),T=t.computed(()=>({[`${k}__unit`]:!0,hidden:!V.value})),A=E=>{h.value="",c("update:modelValue","",E),c("change","",E),c("clear","")},x=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),M=t.computed(()=>{let E=ve(h.value)>0;return he(l.clearable)&&E&&u.value}),$=t.computed(()=>({action:!0,hidden:!M.value}));return()=>{const E={class:y.value,style:b.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:d,onFocus:S,onBlur:N},F=[],I=t.h("input",E);F.push(I);const j=[];if(x.value){const D={class:["action-icon"]},z=t.h(o,D),P={class:$.value,onClick:A},O=t.h("view",P,{default:()=>[z]});j.push(O)}if(B.value){const D=t.h("view",{class:T.value},[l.unit]);j.push(D)}const U={class:C.value,style:w.value},Z=t.h("view",U,{default:()=>j});F.push(Z);const _={default:()=>F};_.label=r.slots.default,_.prepend=r.slots.prepend,_.append=r.slots.append,_.fixedPreTip=r.slots.fixedPreTip,_.fixedTip=r.slots.fixedTip;const q={...Nt(l,ja),hintText:m.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,q,_)}}}}const{componentName:qc,create:Mc,scope:Pc}=G("input-item"),el=Mc(Ic(qc,Pc,we,ne.CircleClose));function Wa(e,n=0){let a=`${e}`,o=a.indexOf(".");if(o==-1)return a;let l=o;for(let r=a.length-1;r>=o;r--)if(a.charAt(r)!="0"){l=r;break}return l-o<n?l=o+n+1:l!=o&&(l+=1),l>a.length?a=a.padEnd(l,"0"):a=a.substring(0,l),a}function Ya(e,n,a=20){if(typeof n=="string"&&(n=fe(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=Dr(`${e}`,`${n}`);return Wa(o)}else{let o=Ko(`${e}`,Ir(`${n}`),20);return Wa(o)}}function Lc(e,n=-1,a=!1,o=3,l=","){return Sn(e,n,a,o,l)}function Xa(e,n,a,o,l=!0){if(e==="")return"";if(e=qr(e),n=fe(n),n==1)return e;if(o)e=Ya(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(fe(a)+2,"0"):e=Ko(e,1,fe(a)));else{let r=-1*n;e=Ya(e,r)}return e}function Qa(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=ko(e,n.min);if(o&&l==-1||!o&&(l==0||l==-1)){let r="请输入不小于 {0} 的数值";a.message=r.replace("{0}",n.min),a.minValid=!1}}if(n.max!=null){let o=he(n.maxInclude),l=ko(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Ga={clearable:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},showTip:{type:[Boolean,String],required:!1,default:!0},min:{type:[Number,String],required:!1},minInclude:{type:[Boolean,String],required:!1,default:!0},max:{type:[Number,String],required:!1},maxInclude:{type:[Boolean,String],required:!1,default:!0},unit:{type:String,required:!1},rates:{type:[Number,String],required:!1,default:1},precision:{type:[Number,String],required:!1},integerLength:{type:[Number,String],required:!1,default:-1},decimalLength:{type:[Number,String],required:!1,default:2},autoPadding:{type:Boolean,required:!1,default:!0},digits:{type:Number,required:!1,default:3},separator:{type:String,required:!1,default:","},placeholder:{type:String,required:!1},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function zc(e,n,a,o){return{props:{...me,...ye,...Ga},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=t.ref(!1),p=Ie(l,"modelValue",null,c),u=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([U,Z,_])=>{if(ue(U)){u.value="";return}const W=Xa(U,Z,_,!1);u.value!==W&&(u.value=W)},{immediate:!0});const h=t.computed(()=>{let U="";return f.value&&(U=u.value),U}),{t:k}=se.useFoxI18n(n),y=t.computed(()=>{let U=l.placeholder??"";return!f.value&&!ue(u.value)?U=Lc(u.value,l.decimalLength,l.autoPadding,l.digits,l.separator):U=ue(U)?k(["placeholder"]):U,U}),v=e,b=t.computed(()=>({[v]:!0,[`${v}__placeholder`]:u.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),d=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const U={};return d.value&&(U["text-align"]=d.value),U}),g=t.ref(""),S=t.computed(()=>{let U=g.value;return ue(U)&&(U=l.errorTip??""),U}),N=t.ref(""),C=t.ref(!1),w=U=>{let _=U.target.value;if(ue(_)){u.value="",p.value="",c("update:modelValue","",U),c("change","",U),he(l.showTip)&&C.value&&(C.value=!1);return}if(_.length>=2){let W=_;if(W.charAt(0)=="-"&&(W=W.substring(1)),W.length>=2&&W.charAt(0)=="0"&&W.charAt(1)!="."){t.triggerRef(u);return}}if(_!="-"){if(!Ur(_)){t.triggerRef(u);return}if(l.integerLength!=-1&&Hr(_)>Number(l.integerLength)){t.triggerRef(u);return}if(l.decimalLength&&l.decimalLength!=-1&&jr(_)>Number(l.decimalLength)){t.triggerRef(u);return}let W=Qa(_,l);if(W.maxValid===!1){g.value=W.message,t.triggerRef(u);return}}else if(l.min!=null&&fe(l.min)>=0){t.triggerRef(u);return}N.value=_,he(l.showTip)&&(C.value=_.length>0),u.value=_,p.value=Xa(_,l.rates,l.precision,!0),c("update:modelValue",p.value,U),c("change",p.value,U)},B=U=>{if(f.value=!0,he(l.showTip)){let Z=u.value;ue(Z)&&(Z=l.hintText),ue(Z)||(N.value=Z,C.value=!0)}g.value="",c("focus",p.value,U)},V=U=>{if(setTimeout(()=>{f.value=!1,he(l.showTip)&&C.value===!0&&(C.value=!1)},0),!ue(u.value)){let Z=Qa(u.value,l);if(Z.minValid===!1||Z.maxValid===!1){g.value=Z.message;return}}c("update:modelValue",p.value,U),c("blur",p.value,U)},T=t.computed(()=>({[`${v}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),A=t.computed(()=>{const U={};return r.slots.append&&!x.value&&!I.value&&(U.display="none"),U}),x=t.computed(()=>ve(l.unit)>0),M=t.computed(()=>!I.value),$=t.computed(()=>({[`${v}__unit`]:!0,hidden:!M.value})),E=U=>{p.value="",c("update:modelValue","",U),c("change","",U),c("clear","")},F=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),I=t.computed(()=>{let U=ve(p.value)>0;return he(l.clearable)&&U&&f.value}),j=t.computed(()=>({action:!0,hidden:!I.value}));return()=>{let U={class:b.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:y.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:w,onFocus:B,onBlur:V},Z=[],_=t.h("input",U);Z.push(_);let W=[];if(F.value){const Y={class:["action-icon"]},J=t.h(o,Y),oe={class:j.value,onClick:E},K=t.h("view",oe,{default:()=>[J]});W.push(K)}if(x.value){const Y=t.h("view",{class:$.value},[l.unit]);W.push(Y)}const q={class:T.value,style:A.value},L=t.h("view",q,{default:()=>W});Z.push(L);const D={default:()=>Z};D.label=r.slots.default,D.prepend=r.slots.prepend,D.append=r.slots.append,D.fixedPreTip=r.slots.fixedPreTip,D.fixedTip=r.slots.fixedTip;let P={...Nt(l,Ga),errorTip:S.value,hintText:N.value,hintVisible:C.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,P,D)}}}}const{componentName:Fc,create:Rc,scope:Oc}=G("money-item"),tl=Rc(zc(Fc,Oc,we,ne.CircleClose)),$o={modelValue:{type:[String,Number],default:""},textAlign:{type:String,default:""},limitShow:{type:Boolean,default:!1},maxLength:{type:[String,Number],default:""},rows:{type:[String,Number],default:"2"},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},autofocus:{type:Boolean,default:!1}},{componentName:Kc,create:Uc,scope:Hc}=G("textarea"),jc=Uc({props:{...$o},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=se.useFoxI18n(Hc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Kc;return{[h]:!0,[`${h}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(i)});const s=t.computed(()=>({textAlign:e.textAlign})),i=()=>{let h=l.value;h.style.height="auto";let k=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:y,minHeight:v}=e.autosize;y!==void 0&&(k=Math.min(k,y)),v!==void 0&&(k=Math.max(k,v))}k&&(h.style.height=k+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,k)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),n("update:modelValue",h,k),n("change",h,k)};return{...o,textareaRef:l,classes:r,styles:s,change:h=>{const k=h.target;c(k.value,h)},focus:h=>{e.disabled||e.readonly||n("focus",h)},blur:h=>{if(e.disabled||e.readonly)return;let y=h.target.value;c(y,h),n("blur",{value:y,event:h})}}}}),Wc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Yc={key:0,class:"fox-textarea__limit"};function Xc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("textarea",{ref:"textareaRef",class:"fox-textarea__textarea",style:t.normalizeStyle(e.styles),rows:e.rows,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[0]||(n[0]=(...s)=>e.change&&e.change(...s)),onBlur:n[1]||(n[1]=(...s)=>e.blur&&e.blur(...s)),onFocus:n[2]||(n[2]=(...s)=>e.focus&&e.focus(...s)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,Wc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Yc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Rn=te(jc,[["render",Xc]]);function Qc(e,n,a,o){return{props:{...me,...ye,...$o},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=Ie(l,"modelValue",null,c),p=v=>{f.value=v,c("update:modelValue",v,{}),c("change",v,{})};let u=Ie(l,"hintText"),h=t.ref(!1);const k=v=>{ue(u.value)||(h.value=!0),c("focus",f.value,v)},y=v=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",f.value,v)};return()=>{const b={...be(l,$o),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":p,onFocus:k,onBlur:y},d=[],m=t.h(o,b);d.push(m);const g={default:()=>d};g.label=r.slots.default,g.prepend=r.slots.prepend,g.append=r.slots.append,g.fixedPreTip=r.slots.fixedPreTip,g.fixedTip=r.slots.fixedTip;const S=be(l,ye,me);return t.h(a,{...S,prop:`${l.prop}_item`},g)}}}}const{componentName:Gc,create:Zc,scope:Jc}=G("textarea-item"),nl=Zc(Qc(Gc,Jc,we,Rn));function _c(e){return e===window}const xe=e=>{const n=t.unref(e);if(_c(n)){const a=n.innerWidth,o=n.innerHeight;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}return n&&n.getBoundingClientRect?n.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};let eu=2e3;const Za=()=>eu++,Fe={visible:{type:Boolean,default:!1},zIndex:{type:[String,Number]},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},position:{type:String,default:"center"},transition:{type:String,default:""},style:{type:Object,default:{}},popClass:{type:[String,Array],default:""},closeable:{type:Boolean,default:!1},closeIconPosition:{type:String,default:"top-right"},destroyOnClose:{type:Boolean,default:!0},teleport:{type:[String,Element],default:"body"},overlay:{type:Boolean,default:!0},round:{type:Boolean,default:!1},teleportDisable:{type:Boolean,default:!1},safeAreaInsetBottom:{type:Boolean,default:!1},overlayClass:{type:String,default:""},overlayStyle:{type:Object,default:{}}},tu=(e,n)=>({components:n,props:{...Fe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(a,{emit:o}){const l=t.reactive({zIndex:0,showSlot:!0,closed:a.closeable});a.visible&&(l.zIndex=Za());const r=t.computed(()=>{const v=e,b=[v,`${v}--${a.position}`];return a.round&&b.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&b.push(`${v}--${a.position}--safebottom`),typeof a.popClass=="string"?b.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(d=>{b.push(d)}),b}),s=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),i=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Za(),a.destroyOnClose&&(l.showSlot=!0),o("open")},f=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=v=>{o("click-pop",v)},u=v=>{v.stopPropagation(),o("click-close-icon",v),o("update:visible",!1)},h=v=>{o("click-overlay",v),a.closeOnClickOverlay&&o("update:visible",!1)},k=v=>{o("opend",v)},y=v=>{o("closed",v)};return t.watch(()=>a.visible,v=>{a.visible?c():f()}),t.watch(()=>a.closeable,v=>{l.closed=v}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:u,onClickOverlay:h,onOpened:k,onClosed:y}}});let xt=0;const Ja="fox-overflow-hidden",_a=()=>it?document.body:{classList:[]},nu=e=>[()=>{if(e())try{!xt&&_a().classList.add(Ja),xt++}catch{}},()=>{if(e()&&xt)try{xt--,!xt&&_a().classList.remove(Ja)}catch{}}],ou={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},overlayClass:{type:String,default:""},overlayStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}},{componentName:lu,create:au}=G("overlay"),ru=au({props:{...ou},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=nu(()=>e.lockScroll),l=t.computed(()=>({[lu]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,i=>{i?a():o()}),{classes:l,style:r,onClick:i=>{n("click",i),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function su(e,n,a,o,l,r){return t.openBlock(),t.createBlock(t.Transition,{name:"overlay-fade"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=t.withModifiers((...s)=>e.onClick&&e.onClick(...s),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const rt=te(ru,[["render",su]]),{componentName:iu,create:cu}=G("popup"),uu=cu(tu(iu,{FoxOverLay:rt,Close:ne.Close}));function du(e,n,a,o,l,r){const s=t.resolveComponent("FoxOverLay"),i=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,visible:e.visible,"close-on-click-overlay":e.closeOnClickOverlay,"z-index":e.zIndex,"lock-scroll":e.lockScroll,duration:e.duration,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,onClick:e.onClickOverlay},e.$attrs),null,16,["visible","close-on-click-overlay","z-index","lock-scroll","duration","overlay-class","overlay-style","onClick"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:e.transitionName,onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.popStyle),onClick:n[1]||(n[1]=(...c)=>e.onClick&&e.onClick(...c))},[e.showSlot?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0),e.closed?(t.openBlock(),t.createElementBlock("view",{key:1,onClick:n[0]||(n[0]=(...c)=>e.onClickCloseIcon&&e.onClickCloseIcon(...c)),class:t.normalizeClass(["fox-popup__close-icon","fox-popup__close-icon--"+e.closeIconPosition])},[t.renderSlot(e.$slots,"close-icon",{},()=>[t.createVNode(i)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const de=te(uu,[["render",du]]),er=10;function hs(e,n){return e>n&&e>er?"horizontal":n>e&&n>er?"vertical":""}function ol(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function ll(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},n=()=>e.direction==="vertical",a=()=>e.direction==="horizontal",o=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:s=>{if(s.touches){const f=s.touches[0];e.deltaX=f.clientX-e.startX,e.deltaY=f.clientY-e.startY,e.moveX=f.clientX,e.moveY=f.clientY}else{const c=s;e.deltaX=c.clientX-e.startX,e.deltaY=c.clientY-e.startY,e.moveX=c.clientX,e.moveY=c.clientY}e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=hs(e.offsetX,e.offsetY))},start:s=>{if(o(),s.touches){const f=s.touches[0];e.startX=f.clientX,e.startY=f.clientY}else{const c=s;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function _e(){const e=t.ref(0),n=t.ref(0),a=t.ref(0),o=t.ref(0),l=t.ref(0),r=t.ref(0),s=t.ref(0),i=t.ref(0),c=t.ref(0),f=t.ref(0),p=t.ref(""),u=()=>p.value==="vertical",h=()=>p.value==="horizontal",k=()=>{s.value=0,i.value=0,c.value=0,f.value=0,p.value="",a.value=0};return{move:b=>{if(b.touches){const g=b.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const m=b;s.value=m.clientX-e.value,i.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(s.value),f.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=hs(c.value,f.value))},start:b=>{if(k(),b.touches){const g=b.touches[0];e.value=g.clientX,n.value=g.clientY}else{const m=b;e.value=m.clientX,n.value=m.clientY}a.value=Date.now()},reset:k,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:f,direction:p,isVertical:u,isHorizontal:h}}const gs={readonly:{type:Boolean,default:!1},visibleItemCount:{type:[Number,String],default:7},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},childrenKey:{type:String,required:!1,default:"children"},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:360}},Eo={...Fe,...gs,modelValue:{type:[String,Number,Boolean,Object,Array],default:""},text:{type:[Array],default:[]},columnOptions:{type:[Object,Function]},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},title:{type:String},cancelText:{type:String},clearText:{type:String},confirmText:{type:String},isAutoBackFill:{type:[Boolean],default:!0}};let ys=36;function fu(){return ys}function mu(e){ys=e}function Le(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function xo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function pu(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function st(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function tr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let hu=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function gu(){const e=t.getCurrentInstance();return new hu(e.proxy)}function nr(e,n,a){const o=Le(e,n),l=Le(e,a);if(o!==l)return!1;const r=st(e,n),s=st(e,a);return r===s}function yu(e,n,a,o){if(a.length==0)return[];Array.isArray(n)||(n=[n]);const l=[],r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=n[s];let f=a[s].findIndex(p=>{if(r==="text")return Le(e,p)===i;if(r==="value"){let u=st(e,p);return u==null&&(u=Le(e,p)),u===i}else if(r==="item")return nr(e,p,i)});if(f==-1)break;l.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){const c=n[i];let f=s.findIndex(u=>{if(r==="text")return Le(e,u)===c;if(r==="value"){let h=st(e,u);return h==null&&(h=Le(e,u)),h===c}else if(r==="item")return nr(e,u,c)});if(f==-1)break;l.push(f);const p=xo(e,s[f]);if(!Array.isArray(p))break;s=p}}return l}function or(e,n,a,o){if(a.length==0)return null;const l={texts:[],values:[],items:[]},r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=a[s];let c=n[s];c<0&&c>=i.length&&(c=0);const f=i[c],p=Le(e,f);if(l.texts.push(p),l.items.push(f),r==="text")l.values.push(p);else if(r==="value"){let u=st(e,f);u==null&&(u=p),l.values.push(u)}else l.values.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){let c=n[i];c<0&&c>=s.length&&(c=0);const f=s[c],p=Object.assign({},f);p.children=null;const u=Le(e,f);if(l.texts.push(u),l.items.push(p),r==="text")l.values.push(u);else if(r==="value"){let h=st(e,f);h==null&&(h=u),l.values.push(h)}else l.values.push(p);if(!Array.isArray(f.children))break;s=f.children}}return l}function lr(e){return{text:e,value:e}}const vu=15,bu=300,ku=200,{create:Su}=G("picker-column");function Cu(e){e.stopPropagation()}function wu(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&Cu(e)}const Nu=Su({props:{source:{type:Array,default:[]},columnIndex:{type:Number,required:!0,default:0},modelValue:{type:Number,required:!0,default:0},itemHeight:{type:Number,required:!0,default:35},visible:{type:Boolean,default:!1},...gs},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${fe(e.visibleItemCount)*+e.itemHeight}px`})),l=t.computed(()=>({"fox-picker__content":!0,"fox-picker__content-tile":!e.threeDimensional,"fox-picker__content-roller":e.threeDimensional})),r=t.computed(()=>e.itemHeight*Math.floor(+e.visibleItemCount/2)),s=w=>w>=u.currIndex+8||w<=u.currIndex-8,i=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${u.deg})`,top:`${r.value}px`})),c=w=>`transform: rotate3d(1, 0, 0, ${-u.rotation*w}deg) translate3d(0px, 0px, 104px)`,f=t.computed(()=>({transition:`transform ${u.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${u.scrollDistance+r.value}px, 0)`})),p=t.ref(null),u=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=w=>Le(e,w),k=w=>st(e,w),y=_e(),v=()=>{u.transitionEndTrigger&&(u.transitionEndTrigger(),u.transitionEndTrigger=null)},b=(w,B=!1,V=!1)=>{if(u.currIndex=w,B){const T=()=>{u.moving=!1,n("update:modelValue",w),n("change",w)};V?u.transitionEndTrigger=T:T()}},d=(w,B,V)=>{let T=w+u.startDistance;if(B==="end"){const A=-(e.source.length-1)*e.itemHeight;T<A&&(T=A),T>0&&(T=0);let x=Math.abs(Math.round(-T/e.itemHeight));const M=-x*e.itemHeight,$=`${(x+1)*u.rotation}deg`,E=V?V>0:!1;b(x,!0,E),m(M,B,V,$)}else{let A=(-T/e.itemHeight+1)*u.rotation;const x=(e.source.length+1)*u.rotation,M=0;if(A=Math.min(Math.max(A,M),x),e.threeDimensional&&(A<M||A>x))return;m(T,null,void 0,`${A}deg`)}},m=(w=0,B,V=ku,T)=>{B==="end"?u.scrollTime=V:u.scrollTime=0,u.deg=T,u.scrollDistance=w},g=(w,B)=>(w=Math.abs(w/B)/.003*(w<0?-1:1),w),S=w=>{e.readonly||(u.startDistance=u.scrollDistance,y.start(w),u.transitionEndTrigger=null)},N=w=>{e.readonly||(u.moving=!0,y.move(w),y.isVertical()&&(u.moving=!0,wu(w,!0)),d(y.deltaY.value,"",0))},C=()=>{if(e.readonly)return;const w=y.deltaY.value,B=y.duration.value;if(B<bu&&Math.abs(w)>vu){const T=g(w,B);d(T,"end",e.swipeDuration)}else d(w,"end",0)};return t.watch(()=>e.modelValue,w=>{const B=u.currIndex-w;if(B!==0){u.currIndex=w,u.startDistance=u.scrollDistance;const V=B*e.itemHeight;d(V,"",0)}}),t.watch(()=>e.source,w=>{if(u.currIndex>=w.length){const T=(w.length-1-u.currIndex)*e.itemHeight;u.startDistance=u.scrollDistance,d(T,"end",0)}}),t.watch(()=>e.visible,w=>{w===!1&&v()}),t.onMounted(()=>{const w=-e.modelValue*e.itemHeight;d(w)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:k,...t.toRefs(u),roller:p,getItemText:Le,onTouchStart:S,onTouchMove:N,onTouchEnd:C,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:f,stopMomentum:v}}}),Bu={key:1,class:"fox-picker__item-tile"};function Vu(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s)),onTouchend:n[2]||(n[2]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTouchcancel:n[3]||(n[3]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTransitionend:n[4]||(n[4]=(...s)=>e.stopMomentum&&e.stopMomentum(...s))},[t.createElementVNode("view",{ref:"roller",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.threeDimensional?e.touchRollerStyle:e.touchTileStyle)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.source,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${i}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(i+1)}]),style:t.normalizeStyle(e.setRollerStyle(i+1))},t.toDisplayString(e.itemText(s)),7)):(t.openBlock(),t.createElementBlock("view",Bu,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Au=te(Nu,[["render",Vu]]),{create:Tu,componentName:$u,scope:Eu}=G("picker"),xu=Tu({components:{Column:Au,Popup:de},props:{...Eo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=se.useFoxI18n(Eu),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(fu());t.watch(()=>e.visible,A=>{A&&s.value<=0&&setTimeout(()=>{if(r.value){const x=xe(r.value);s.value=x.height,mu(s.value)}},50)});const i=t.computed(()=>({[$u]:!0})),c=gu(),f=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([A,x])=>{if(A){let M=await c.load("picker",A,x);if(M.length>0){let $=M[0];if(Array.isArray($)){if(typeof $[0]=="string"){let E=M,F=[];E.forEach(I=>{let j=I.map(U=>lr(U));F.push(j)}),p.value=F}else p.value=M;f.value="multipleColumn"}else if(typeof $=="string"){let E=M,F=[],I=E.map(j=>lr(j));F.push(I),p.value=F,f.value="singleColumn"}else{const E=xo(e,$);Array.isArray(E)?(f.value="cascade",p.value=[M]):(f.value="singleColumn",p.value=[M])}}else p.value=[]}},{immediate:!0});const u=t.ref([]),h=t.ref(e.modelValue),k=t.ref([]),y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([A,x])=>{let M=yu(e,A,x,f.value);if(!qe(M,y.value)){y.value=M;let $=or(e,M,x,f.value);$&&(u.value=$.texts,n("update:text",u.value))}});const v=t.ref(e.visible);t.watch(()=>e.visible,A=>{v.value=A});const b=A=>{let x=tr(e,A);return Ee(x)?x.defaultIndex??0:0},d=A=>{if(e.readonly===!0)return!0;let x=tr(e,A);return Ee(x)?x.readonly??!1:!1},m=(A,x)=>{let M=y.value;M[A]=x;for(let E=0;E<A;E++)M[E]==null&&(M[E]=b(E));if(f.value==="cascade")for(let E=A+1;E<S.value.length;E++){let F=b(E);E<M.length?M[E]=F:M.push(F)}else for(let E=M.length;E<S.value.length;E++){let F=b(E);M.push(F)}y.value=M;let $=or(e,M,p.value,f.value);$&&(u.value=$.texts,h.value=$.values,k.value=$.items)},g=A=>A<y.value.length?y.value[A]:b(A),S=t.computed(()=>{if(p.value.length==0)return[];if(f.value=="singleColumn"||f.value=="multipleColumn")return p.value;let A=[],x=0,M=p.value[0],$=0;for(;;){let E=M.map(j=>{let U=Object.assign({},j);return pu(e,U,null),U});A.push(E),x>=y.value.length?$=0:$=y.value[x],($<0||$>=M.length)&&($=0);let F=M[$];const I=xo(e,F);if(!Array.isArray(I))break;M=I,x++}return A}),N=t.computed(()=>fe(+e.visibleItemCount-1)/2*s.value),C=(A=!1)=>{if(e.readonly===!0){A&&n("update:visible",!1);return}let x=p.value.length-1;for(;x>=0&&!(y.value[x]===null||y.value[x]===void 0);x--);if(x>=0&&m(x,0),f.value==="singleColumn"){let M=h.value.length>0?h.value[0]:"",$=k.value.length>0?k.value[0]:null;n("update:modelValue",M),n("update:text",u.value),n("change",M,$),A&&(n("confirm",M),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",u.value),n("change",h.value,k.value),A&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:S,dataType:f,show:v,itemHeight:s,top:N,isReadonly:d,getIndex:g,change:(A,x)=>{if(m(A,x),e.isAutoBackFill){const M=!v.value;C(M)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{C(!0)},clear:()=>{if(e.readonly===!0){n("update:visible",!1);return}f.value==="singleColumn"?(n("update:modelValue",""),n("change","")):(n("update:modelValue",[]),n("change",[])),n("clear",""),n("update:visible",!1)}}}}),Du={class:"fox-picker__bar"},Iu={class:"fox-picker__title"},qu={class:"fox-picker__bar__action"},Mu={class:"fox-picker__column"};function Pu(e,n,a,o,l,r){const s=t.resolveComponent("Column"),i=t.resolveComponent("Popup");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(i,{position:"bottom",visible:e.show,"onUpdate:visible":n[3]||(n[3]=c=>e.show=c),teleport:e.teleport,"lock-scroll":e.lockScroll,"close-on-click-overlay":e.closeOnClickOverlay,onClose:e.close,round:!0,"teleport-disable":e.teleportDisable},{default:t.withCtx(()=>[t.createElementVNode("view",Du,[t.createElementVNode("view",Iu,t.toDisplayString(e.title),1),t.createElementVNode("view",qu,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:n[0]||(n[0]=(...c)=>e.close&&e.close(...c))},t.toDisplayString(e.cancelText),1),t.createElementVNode("view",{class:"fox-picker__right fox-picker__confirm fox-picker__button",onClick:n[1]||(n[1]=(...c)=>e.confirm&&e.confirm(...c))},t.toDisplayString(e.confirmText),1),e.clearText?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-picker__right fox-picker__clear fox-picker__button",onClick:n[2]||(n[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])]),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",Mu,[t.createElementVNode("view",{class:"fox-picker__mask",style:t.normalizeStyle({backgroundSize:`100% ${e.top}px`})},null,4),t.createElementVNode("view",{ref:"pickerLineRef",class:"fox-picker__hairline",style:t.normalizeStyle({top:` ${e.top}px`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:"fox-picker__columnitem"},[t.createVNode(s,{visible:e.show,source:c,readonly:e.isReadonly(f),"column-index":f,modelValue:e.getIndex(f),"onUpdate:modelValue":p=>e.change(f,p),"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"item-height":e.itemHeight,"text-key":e.textKey,"value-key":e.valueKey},null,8,["visible","source","readonly","column-index","modelValue","onUpdate:modelValue","visible-item-count","three-dimensional","swipe-duration","item-height","text-key","value-key"])]))),128))]),t.renderSlot(e.$slots,"default")]),_:3},8,["visible","teleport","lock-scroll","close-on-click-overlay","onClose","teleport-disable"])],2)}const bt=te(xu,[["render",Pu]]);function Lu(e,n,a,o,l,r,s=!0){return{props:{...me,...ye,...Eo,type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},separator:{type:[String],required:!1,defualt:" "}},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Ie(i,"modelValue",null,u),b=t.ref([]),d=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),S=Ve(t.computed(()=>i.textAlign),"textAlign"),N=t.computed(()=>{const L={};return S.value&&(L["text-align"]=S.value),L}),C=t.ref(!1),w=()=>{C.value=!0},B=L=>{C.value=L},V=L=>{v.value=L,u("update:modelValue",L)},T=(L,D)=>{u("change",L,D)},A=L=>{let z=L.target.value;y.value=!0,u("focus",z,L)},x=L=>{setTimeout(()=>{y.value=!1},0);let z=L.target.value;i.maxLength&&z.length>Number(i.maxLength)&&(z=z.slice(0,Number(i.maxLength))),u("blur",z,L)},M=L=>{b.value=L,Array.isArray(L)&&L.length===0?u("update:text",L[0]):u("update:text",L)},$=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),E=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),I=t.computed(()=>({hidden:!F.value})),j=L=>{v.value="",u("update:modelValue","",L),u("change","",L),u("clear","")},U=t.computed(()=>i.clearable&&!f.value&&!p.value),Z=t.computed(()=>ve(v.value)>0&&y.value),_=L=>{Z.value?j(L):w()},W=t.computed(()=>Z.value&&U.value?o:l),q=t.computed(()=>({action:!0}));return()=>{const L={class:g.value,style:N.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:w,onFocus:A,onBlur:x};s&&(L.disabled=!0);const D=[],z=t.h("input",L);D.push(z);const P=[],O={class:["action-icon"]},Y=t.h(W.value,O),J={class:q.value,onClick:_},oe=t.h("view",J,{default:()=>[Y]});if(P.push(oe),E.value){const re=t.h("view",{class:I.value},[i.unit]);P.push(re)}const K={class:$.value},H=t.h("view",K,{default:()=>P});D.push(H);const X={default:()=>D};X.label=c.slots.default,X.prepend=c.slots.prepend,X.append=c.slots.append,X.fixedPreTip=c.slots.fixedPreTip,X.fixedTip=c.slots.fixedTip;const R=be(i,Eo);R.disabled=!1,R.readonly=f.value||p.value,R.visible=C.value,R["onUpdate:visible"]=B,R.modelValue=v.value,R["onUpdate:modelValue"]=V,R.text=b.value,R["onUpdate:text"]=M,R.onChange=T;const Q=t.h(r,R);X.hide=()=>[Q];const ee=be(i,ye,me);return t.h(a,ee,X)}}}}const{componentName:zu,create:Fu,scope:Ru}=G("picker-item"),al=Fu(Lu(zu,Ru,we,ne.CircleClose,ne.ArrowRight,bt,!1)),on=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:s="children"}=a??{},{[l]:i,[r]:c,[s]:f,...p}=o,u={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:f,_parent:n};return u.children&&u.children.length&&(u.children=on(u.children,u,a)),u}),vs=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&vs(o.children,n)},Ou={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Ku=(e,n)=>{const a={...Ou,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(f=>{f={...f};const{[l]:p,[r]:u}=f,h=c[u]=c[u]||[];!i.length&&u===o&&(i=h),h.push(f),f.children=c[p]||(c[p]=[])}),s&&Object.keys(c).forEach(f=>{c[f].length>1&&c[f].sort((p,u)=>p[s]-u[s])}),c=null,i},Uu={modelValue:{type:[String,Number],default:0},data:{type:[Array]},textKey:{type:String,default:"text"},valueKey:{type:String,default:"value"},visibleKey:{type:String,default:"visibile"},disabledKey:{type:String,default:"disabled"},doitKey:{type:String,default:"doit"},numKey:{type:String,default:"num"},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},shape:{type:String},align:{type:String},markShape:{type:String,default:"line"},scroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},animatedTime:{type:[Number,String],default:300},gutter:{type:[Number,String],default:0},itemOptions:{type:Object},showQuickNavigation:{type:Boolean,default:!1},beforeChange:{type:Function}},ar=(e,n)=>n[e.textKey],Dt=(e,n)=>n[e.valueKey],Hu=(e,n)=>n[e.visibleKey],rr=(e,n)=>n[e.disabledKey],ju=(e,n)=>{const a=n[e.doitKey];return he(a)},Wu=(e,n)=>{const a=n[e.numKey];return a==null?null:fe(n[a])},sr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Yu(e,n,a,o=!1){return{props:{...Uu},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:s}){const i=t.computed(()=>{const W={};return W[`${e}`]=!0,W}),c=t.computed(()=>{const W={};return W[`${e}__titles`]=!0,W[`${l.direction}`]=!0,l.align==="left"&&(W.left=!0),l.scroll===!0&&(W.scrollable=!0),l.shape&&(W[`${l.shape}`]=!0),W}),f=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const W=ce(l.gutter);return W<=0?0:W}),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,W=>{u.value!==W&&(u.value=W,I(!1))});const h=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),k=t.computed(()=>{const W={};return v.value||(W.display="none"),W}),y=t.ref(),v=t.ref(!1),b=()=>{const W=!v.value;d(W)},d=W=>{const q=W;q?(v.value=q,setTimeout(()=>{h.value["fox-tabs-bar__popup--show"]=!0,h.value["fox-tabs-bar__popup--hide"]=!1},0)):(h.value["fox-tabs-bar__popup--show"]=!1,h.value["fox-tabs-bar__popup--hide"]=!0,y.value?y.value.addEventListener("transitionend",()=>{v.value=!1},{once:!0}):setTimeout(()=>{v.value=!1},0))},m=t.ref(),g=t.ref([]),S=(W,q)=>{g.value[q]=W},N=W=>q=>{S(q,W)},C=(W,q)=>{const L=m.value,D=g.value;if(!L||!D||!D[W])return;const z=D[W];let P=0;l.direction==="vertical"?P=z.offsetTop-(L.offsetHeight-z.offsetHeight)/2:P=z.offsetLeft-(L.offsetWidth-z.offsetWidth)/2,w(L,P,q?0:.3,l.direction)},w=(W,q,L,D)=>{let z=0;const P=D==="horizontal"?W.scrollLeft:W.scrollTop,O=L===0?1:Math.round(L*1e3/16);function Y(){D==="horizontal"?W.scrollLeft+=(q-P)/O:W.scrollTop+=(q-P)/O,++z<O&&Ke(Y)}Y()},B=(W,q)=>{const L=Dt(l,W),D={};return D[`${e}__titles-item`]=!0,D.disabled=rr(l,W),D.active=L===u.value,l.shape&&(D[`${l.shape}`]=!0),l.ellipsis&&(D.ellipsis=!0),q&&(q.class&&(D[`${q.class}`]=!0),q.disabled===!0&&(D.disabled=q.disabled)),D},V=(W,q)=>{const L={};if(p.value>0){const D=Math.abs(p.value/2);l.direction==="vertical"?(L["margin-top"]=`${D}px`,L["margin-bottom"]=`${D}px`):(L["margin-left"]=`${D}px`,L["margin-right"]=`${D}px`)}return q&&q.style&&Object.assign(L,q.style),L},T=(W,q)=>`${Dt(l,W)??q}`,A=(W,q)=>{const L=Dt(l,W),D={};D[`${e}__popup-item`]=!0,D.disabled=rr(l,W),D.active=L===u.value,l.shape&&(D[`${l.shape}`]=!0);const z=sr(l,W,q);return z&&z.disabled===!0&&(D.disabled=z.disabled),D},x=t.computed(()=>(l.data??[]).filter(q=>Hu(l,q)!==!1)),M=(W,q)=>{const L=Dt(l,W);if(s("click",W,q),u.value==L)return;const D=()=>{u.value=L,l.scroll&&C(q,!1),s("update:modelValue",L),s("change",W,q)};if(typeof l.beforeChange=="function"){const z=l.beforeChange(W,q);gt(z)?z.then(P=>{P!==!1&&D()}).catch(()=>{D()}):z!==!1&&D()}else D()},$=(W,q)=>function(){M(W,q)},E=(W,q)=>{M(W,q),d(!1)},F=(W,q)=>function(){E(W,q)},I=W=>{if(!Array.isArray(l.data)||!l.scroll)return;const q=l.data.findIndex(L=>Dt(l,L)===u.value);q!==-1&&C(q,W)};t.watch(()=>l.data,()=>{setTimeout(I,0)}),t.onMounted(()=>{I(!0)});const j=(W,q)=>{if(r.item)return r.item({item:W,index:q});const L=sr(l,W,q),D=[];if(r.text){const Y=r.text({item:W,index:q});D.push(Y)}else{const Y=[];if(L?.doit===!0||ju(l,W)){const H={class:[`${e}__titles-item-tip`,"doit"]},X=t.h("view",H);Y.push(X)}const J=L?.num??Wu(l,W);if(J){let H="";const X=fe(J);X>=100?H="99+":H=`${X}`;const R={class:[`${e}__titles-item-tip`,"num"]},Q=t.h("view",R,[H]);Y.push(Q)}const oe={class:`${e}__titles-item-text`};Y.push(ar(l,W));const K=t.h("view",oe,Y);D.push(K)}const z={class:`${e}__titles-item-line`},P=t.h("view",z);D.push(P);const O={ref:N(q),class:B(W,L),style:V(W,L),key:T(W,q),onClick:$(W,q)};return t.h("view",O,D)},U=()=>{const W=r.default?r.default():[];if(W.length===0)for(let L=0;L<x.value.length;L++){const D=x.value[L],z=j(D,L);W.push(z)}const q={ref:m,class:c.value,style:f.value};return t.h("view",q,W)},Z=()=>{let W=null;r.navigation?W=r.navigation():W=t.h(a);const q={class:`${e}__navigation`,onClick:b};return t.h("view",q,[W])},_=()=>{const W=[];for(let L=0;L<x.value.length;L++){const D=x.value[L];let z=null;r.popupItem?z=r.popupItem({item:D,index:L}):z=ar(l,D);const P={class:A(D,L),key:T(D,L),onClick:F(D,L)},O=t.h("view",P,[z]);W.push(O)}const q={class:h.value,style:k.value};return t.h("view",q,W)};return()=>{const W=[],q=U();if(W.push(q),l.showQuickNavigation){const D=Z();W.push(D);const z=_();W.push(z)}const L={class:i.value};return t.h("view",L,W)}}}}const{create:Xu,componentName:Qu,scope:Gu}=G("tabs-bar"),On=Xu(Yu(Qu,Gu,ne.MoreH,!1)),bs=Symbol("TabsStatesKey"),Zu={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Ju(e,n,a=!1){return{props:{...Zu},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const s=t.shallowRef([]),i={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:v=>{const b={name:v};i.current.value===v&&(b.loaded=!0),s.value.push(b),t.triggerRef(s)},remove:v=>{const b=s.value.findIndex(d=>d.name===v);b!==-1&&s.value.splice(b,1)},isLoaded:v=>{if(!o.lazy)return!0;const b=s.value.findIndex(d=>d.name===v);return b!==-1?i.current.value?s.value[b].loaded??!1:b===0:!1}};t.provide(bs,i);const c=v=>{const b=s.value.findIndex(d=>d.name===v);b!==-1&&(s.value[b].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([v,b])=>{i.current.value!==v&&(i.current.value=v??"",c(v??"")),i.direction.value!==b&&(i.direction.value=b)});const f=t.ref(null),p=t.ref(null),u=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const k=t.computed(()=>{const v={},b=s.value.length;if(b<=0)return v;const d=s.value.findIndex(m=>m.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(v.height=`${b*i.tabHeight.value}px`,d!==-1&&(v.transform=`translate(0, -${d*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(v.width=`${b*i.tabWidth.value}px`,d!==-1&&(v.transform=`translate(-${d*i.tabWidth.value}px, 0)`)),h&&(h=!1,v.transition="transform 0s ease"),v});let y=null;return t.onMounted(()=>{if(!f.value)return;const v=()=>{const b=xn(f.value);i.tabWidth.value=b.width,i.tabHeight.value=b.height};window.ResizeObserver&&(y=new window.ResizeObserver(v),y.observe(f.value)),v()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const v={class:`${e}__panes`,style:k.value,ref:p},b=t.h("view",v,[r?.default?.()]),d={class:u.value,ref:f};return t.h("view",d,[b])}}}}const{create:_u,componentName:ed,scope:td}=G("tabs-container"),Kn=_u(Ju(ed,td,!1)),nd={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function od(e,n,a){return{props:{...nd},setup(o,{emit:l,slots:r}){const s=t.inject(bs);t.onMounted(()=>{s.add(o.paneKey)}),t.onBeforeUnmount(()=>{s.remove(o.paneKey)});const i=t.computed(()=>{const f={};return s.direction.value==="vertical"&&s.tabHeight.value>0?f.height=`${s.tabHeight.value}px`:s.tabWidth.value>0&&(f.width=`${s.tabWidth.value}px`),f}),c=t.computed(()=>o.loaded!=null?he(o.loaded):s.isLoaded(o.paneKey));return()=>{let f=[];if(c.value)f=r?.default?.()??[];else if(r.empty)f=r.empty();else{const u={class:`${e}__empty-icon`},h=o.emptyIcon??a,k=t.h(h,u),y={class:`${e}__empty-text`},v=o.emptyText??"Loading",b=t.h("view",y,[v]),d={class:`${e}__empty`},m=t.h("view",d,[k,b]);f.push(m)}const p={class:`${e}`,style:i.value};return t.h("view",p,f)}}}}const{create:ld,componentName:ad,scope:rd}=G("tabs-pane"),Un=ld(od(ad,rd,ne.Loading));class ir{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=on(n,null,this.config)}updateChildren(n,a){a?a.children=on(n,a,this.config):this.nodes=on(n,null,this.config)}getNodeByValue(n){let a;return vs(this.nodes,o=>{if(o.value===n)return a=o,!0}),a}getPathNodesByValue(n){if(!n.length)return[];const a=[];let o=this.nodes;for(;o&&o.length;){const l=o.find(r=>r.value===n[r.level]);if(!l)break;a.push(l),o=l.children}return a}isLeaf(n,a){const{leaf:o,children:l}=n,r=Array.isArray(l)&&!!l.length;return o||!r&&!a}hasChildren(n,a){if(this.isLeaf(n,a))return!1;const{children:l}=n;return Array.isArray(l)&&!!l.length}}const{create:sd,scope:id}=G("cascader-pane"),cd=sd({components:{Loading:ne.Loading,Checklist:ne.Checklist,TabsBar:On,TabsContainer:Kn,TabsPane:Un},props:{visible:{type:Boolean,required:!0},modelValue:{type:Array,required:!0},options:{type:Array,default:()=>[]},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object,required:!1}},emits:["update:modelValue","change","pathChange"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(id),o=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),l=t.ref(0),r=t.ref(!1),s=t.ref(e.modelValue),i=t.ref(new ir([],{})),c=t.ref([]),f=t.computed(()=>o.value.lazy&&!!o.value.lazyLoad),p=t.computed(()=>r.value==!0||c.value.length==0?[{text:"Loading",value:0}]:c.value.map((m,g)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:g}))),u=new Map;let h;const k=async()=>{u.clear(),c.value=[],l.value=0,r.value=!1,h=null;let{options:m}=e;o.value.convertConfig&&(m=Ku(m,o.value.convertConfig)),i.value=new ir(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),f.value&&!i.value.nodes.length&&await v({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y(!f.value)},y=async(m=!0)=>{const g=s.value;if(g===void 0||!i.value.nodes.length)return;if(g.length===0){l.value=0,c.value=[{nodes:i.value.nodes,selectedNode:null}];return}let S=g;if(f.value&&Array.isArray(g)&&g.length){S=[];let N=i.value.nodes.find(C=>C.value===g[0]);if(N){S=[N.value],r.value=!0;const C=await g.slice(1).reduce(async(w,B)=>{const V=await w;await v(V);const T=V?.children?.find(A=>A.value===B);return T&&S.push(B),Promise.resolve(T)},Promise.resolve(N));await v(C),r.value=!1}}S.length&&g===e.modelValue&&i.value.getPathNodesByValue(S).map((C,w)=>{l.value=w,d.handleNode(C,m)})},v=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(i.value.isLeaf(m,f.value)||i.value.hasChildren(m,f.value))return;m.loading=!0;const g=m.root?null:m;let S=u.get(m);S||(S=new Promise(C=>{o.value.lazyLoad?.(m,C)}),u.set(m,S));const N=await S;Array.isArray(N)&&N.length>0?i.value.updateChildren(N,g):m.leaf=!0,m.loading=!1,u.delete(m)},b=m=>{const g=m.map(S=>S.value);s.value=g,n("change",g,m),n("pathChange",m),n("update:modelValue",g)},d={async handleNode(m,g){const{disabled:S,loading:N}=m;if(!(!g&&S||!c.value[l.value])){if(i.value.isLeaf(m,f.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!g){const C=c.value.map(w=>w.selectedNode);b(C),n("pathChange",C)}return}if(i.value.hasChildren(m,f.value)){const C=m.level+1;if(c.value[l.value].selectedNode=m,c.value=c.value.slice(0,C),c.value.push({nodes:m.children||[],selectedNode:null}),l.value=C,!g){const w=c.value.map(B=>B.selectedNode);n("pathChange",w)}return}h=m,!N&&(await v(m),h===m&&(c.value[l.value].selectedNode=m,d.handleNode(m,g)))}},handleTabChange(m,g){h=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,g){return m.selectedNode&&m.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{k()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{qe(m,s.value)||(s.value=m,y())}),t.watch(()=>e.visible,m=>{m&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...d}}}),ud={class:"fox-cascader"},dd={role:"menu",class:"fox-cascader__pane"},fd=["aria-checked","aria-disabled","onClick"],md={class:"fox-cascader__item__title"},pd=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function hd(e,n,a,o,l,r){const s=t.resolveComponent("TabsBar"),i=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),f=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",ud,[t.createVNode(s,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=u=>e.tabsCursor=u),data:e.panesTitles,onChange:e.handleTabChange,scroll:!0,align:"left"},null,8,["modelValue","data","onChange"]),t.createVNode(p,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[1]||(n[1]=u=>e.tabsCursor=u)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(u,h)=>(t.openBlock(),t.createBlock(f,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",dd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.nodes,k=>(t.openBlock(),t.createElementBlock("view",{key:k.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(u,k),disabled:k.disabled}]),"aria-checked":e.isSelected(u,k),"aria-disabled":k.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(k,!1)},[t.createElementVNode("view",md,t.toDisplayString(k.text),1),k.loading?(t.openBlock(),t.createBlock(i,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(c,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,fd))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(f,{key:1,"pane-key":0},{default:t.withCtx(()=>[pd]),_:1}))]),_:1},8,["modelValue"])])}const gd=te(cd,[["render",hd]]),{create:yd}=G("cascader"),vd=yd({components:{FoxCascaderPane:gd,FoxPopup:de},props:{...Fe,modelValue:Array,visible:Boolean,title:String,options:{type:Array,default:()=>[]},lazy:Boolean,lazyLoad:Function,valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},poppable:{type:Boolean,default:!0},convertConfig:Object},emits:["update:modelValue","change","pathChange","update:visible"],setup(e,{emit:n}){const a=t.ref(e.modelValue),o=t.computed({get(){return e.visible},set(s){n("update:visible",s)}}),l=(s,i)=>{a.value=s,o.value=!1,n("change",s,i),n("update:modelValue",s)},r=s=>{n("pathChange",s)};return t.watch(()=>e.modelValue,s=>{s!==a.value&&(a.value=s)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),bd=["innerHTML"];function kd(e,n,a,o,l,r){const s=t.resolveComponent("FoxCascaderPane"),i=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(i,{key:0,visible:e.innerVisible,"onUpdate:visible":n[0]||(n[0]=c=>e.innerVisible=c),position:"bottom","pop-class":"fox-cascader__popup",round:"",closeable:e.closeable,"destroy-on-close":!1,"close-icon-position":e.closeIconPosition},{default:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-cascader__bar",innerHTML:e.title},null,8,bd)):t.createCommentVNode("",!0),t.createVNode(s,{onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"])]),_:1},8,["visible","closeable","close-icon-position"])):(t.openBlock(),t.createBlock(s,{key:1,onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"]))}const Hn=te(vd,[["render",kd]]);function Kt(e,n){const a=e.textKey??"text";return n[a]??""}function Ut(e,n){const a=e.valueKey??"value";return n[a]}function ks(e,n){const a=e.childrenKey??"children";return n[a]}function tn(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=Kt(e,l),s=Ut(e,l);a.texts.push(r),a.values.push(s??"")}return a}function Ss(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Kt(e,n[s])===r){const c=Ut(e,n[s])??"",f={[e.textKey]:r,[e.valueKey]:c};l.push(f);const p=ks(e,n[s]);Array.isArray(p)&&Ss(e,p,a,o+1,l);return}}function Cs(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Ut(e,n[s])===r){const c=Kt(e,n[s])??"",f={[e.textKey]:c,[e.valueKey]:r};l.push(f);const p=ks(e,n[s]);Array.isArray(p)&&Cs(e,p,a,o+1,l);return}}function uo(e,n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++){const l=Kt(e,n[o]),r=Kt(e,a[o]);if(l!==r)return!1;const s=Ut(e,n[o]),i=Ut(e,a[o]);if(s!==i)return!1}return!0}let Sd=class{proxy;constructor(n){this.proxy=n}async load(n,a){const o="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a);const l=Je(this.proxy,o);return l===null?(console.error(`${o} component not found api function`),[]):(Ee(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function Cd(){const e=t.getCurrentInstance();return new Sd(e.proxy)}const cr={modelValue:{type:[Array,String]},pathNodes:{type:[Array]},title:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object},showAllLevels:{type:[Boolean],default:!0},separator:{type:[String],default:"/"}};function wd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...cr},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Cd(),b=t.ref([]),d=t.ref([]),m=t.computed(()=>{if(Array.isArray(d.value)){if(i.showAllLevels===!1){const z=d.value.length-1;return d.value[z]}return d.value.join(i.separator)}else return d.value}),g=t.ref([]),S=t.ref([]);t.watch([()=>i.modelValue,()=>b.value],async([z,P])=>{if(u("setValue",z),i.lazy===!0){S.value.length==0&&(g.value=Array.isArray(z)?z:[]);return}if(i.valueType==="item"){let O=z;if(!uo(i,O,S.value)){S.value=O;let Y=tn(i,O);d.value=Y.texts,g.value=Y.values}}else if(i.valueType==="text"){let O=z,Y=[];if(Ss(i,P,O,0,Y),!uo(i,Y,S.value)){S.value=Y;let J=tn(i,Y);O.value=J.texts,g.value=J.values}}else{let O=[];if(Cs(i,P,z,0,O),!uo(i,O,S.value)){S.value=O;let Y=tn(i,O);d.value=Y.texts,g.value=Y.values}}}),i.lazy===!0&&(g.value=Array.isArray(i.modelValue)?i.modelValue:[]),t.watch([()=>i.source,()=>i.params],async([z,P])=>{z&&(b.value=await v.load(z,P))},{immediate:!0});const N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":f.value,"is-readonly":p.value})),w=Ve(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const z={};return w.value&&(z["text-align"]=w.value),z}),V=t.ref(!1),T=()=>{f.value===!0||p.value===!0||(V.value=!0)},A=z=>{V.value=z},x=(z,P)=>{let O=P.map(J=>{if(J==null)return J;let oe={...J};return Reflect.deleteProperty(oe,"text"),oe[i.textKey]=J.text??"",Reflect.deleteProperty(oe,"value"),oe[i.valueKey]=J.value??"",oe});S.value=O;let Y=tn(i,O);d.value=Y.texts,g.value=Y.values,i.valueType==="text"?(u("change",d.value,O),u("update:modelValue",d.value)):i.valueType==="item"?(u("change",O,O),u("update:modelValue",O)):(u("change",g.value,O),u("update:modelValue",g.value)),u("update:pathNodes",O)},M=z=>{let P=z.map(O=>{if(O==null)return O;let Y={...O};return Reflect.deleteProperty(Y,"text"),Y[i.textKey]=O.text??"",Reflect.deleteProperty(Y,"value"),Y[i.valueKey]=O.value??"",Y});u("pathChange",P)},$=z=>{y.value=!0,u("focus",g.value,z)},E=z=>{setTimeout(()=>{y.value=!1},0),u("blur",g.value,z)},F=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),I=t.computed(()=>ve(i.unit)>0),j=t.computed(()=>ve(i.unit)>0&&!y.value),U=t.computed(()=>({hidden:!j.value})),Z=z=>{S.value=[],d.value=[],g.value=[],u("update:modelValue",[]),u("change",[],z),u("clear",[]),u("update:pathNodes",[])},_=t.computed(()=>i.clearable&&!f.value&&!p.value),W=t.computed(()=>{let z=g.value&&g.value.length>0;return i.clearable&&z&&y.value}),q=z=>{W.value?Z(z):T()},L=t.computed(()=>W.value&&_.value?o:l),D=t.computed(()=>({action:!0}));return()=>{const z={class:C.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:T,onFocus:$,onBlur:E};s&&(z.disabled=!0);const P=[],O=t.h("input",z);P.push(O);const Y=[],J={class:["action-icon"]},oe=t.h(L.value,J),K={class:D.value,onClick:q},H=t.h("view",K,{default:()=>[oe]});if(Y.push(H),I.value){const ke=t.h("view",{class:U.value},[i.unit]);Y.push(ke)}const X={class:F.value},R=t.h("view",X,{default:()=>Y});P.push(R);const Q={default:()=>P};Q.label=c.slots.default,Q.prepend=c.slots.prepend,Q.append=c.slots.append,Q.fixedPreTip=c.slots.fixedPreTip,Q.fixedTip=c.slots.fixedTip;let ee={};ee.visible=V.value,ee["onUpdate:visible"]=A,ee.modelValue=g.value,ee.onChange=x,ee.onPathChange=M,ee.options=b.value,ee.title=i.title,ee.lazy=i.lazy,ee.lazyLoad=i.lazyLoad,ee.valueKey=i.valueKey,ee.textKey=i.textKey,ee.childrenKey=i.childrenKey,ee.convertConfig=i.convertConfig;const ae=t.h(r,ee);Q.hide=()=>[ae];const re=Nt(i,cr);return t.h(a,{...re,prop:`${i.prop}_item`},Q)}}}}const{componentName:Nd,create:Bd,scope:Vd}=G("cascader-item"),rl=Bd(wd(Nd,Vd,we,ne.CircleClose,ne.ArrowRight,Hn,!1));var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ws={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",s="second",i="minute",c="hour",f="day",p="week",u="month",h="quarter",k="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(M,$,E){var F=String(M);return!F||F.length>=$?M:""+Array($+1-F.length).join(E)+M},S={s:g,z:function(M){var $=-M.utcOffset(),E=Math.abs($),F=Math.floor(E/60),I=E%60;return($<=0?"+":"-")+g(F,2,"0")+":"+g(I,2,"0")},m:function M($,E){if($.date()<E.date())return-M(E,$);var F=12*(E.year()-$.year())+(E.month()-$.month()),I=$.clone().add(F,u),j=E-I<0,U=$.clone().add(F+(j?-1:1),u);return+(-(F+(E-I)/(j?I-U:U-I))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:k,w:p,d:f,D:y,h:c,m:i,s,ms:r,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},N="en",C={};C[N]=m;var w=function(M){return M instanceof A},B=function M($,E,F){var I;if(!$)return N;if(typeof $=="string"){var j=$.toLowerCase();C[j]&&(I=j),E&&(C[j]=E,I=j);var U=$.split("-");if(!I&&U.length>1)return M(U[0])}else{var Z=$.name;C[Z]=$,I=Z}return!F&&I&&(N=I),I||!F&&N},V=function(M,$){if(w(M))return M.clone();var E=typeof $=="object"?$:{};return E.date=M,E.args=arguments,new A(E)},T=S;T.l=B,T.i=w,T.w=function(M,$){return V(M,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var A=function(){function M(E){this.$L=B(E.locale,null,!0),this.parse(E)}var $=M.prototype;return $.parse=function(E){this.$d=function(F){var I=F.date,j=F.utc;if(I===null)return new Date(NaN);if(T.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var U=I.match(b);if(U){var Z=U[2]-1||0,_=(U[7]||"0").substring(0,3);return j?new Date(Date.UTC(U[1],Z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,_)):new Date(U[1],Z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,_)}}return new Date(I)}(E),this.$x=E.x||{},this.init()},$.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},$.$utils=function(){return T},$.isValid=function(){return this.$d.toString()!==v},$.isSame=function(E,F){var I=V(E);return this.startOf(F)<=I&&I<=this.endOf(F)},$.isAfter=function(E,F){return V(E)<this.startOf(F)},$.isBefore=function(E,F){return this.endOf(F)<V(E)},$.$g=function(E,F,I){return T.u(E)?this[F]:this.set(I,E)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(E,F){var I=this,j=!!T.u(F)||F,U=T.p(E),Z=function(O,Y){var J=T.w(I.$u?Date.UTC(I.$y,Y,O):new Date(I.$y,Y,O),I);return j?J:J.endOf(f)},_=function(O,Y){return T.w(I.toDate()[O].apply(I.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Y)),I)},W=this.$W,q=this.$M,L=this.$D,D="set"+(this.$u?"UTC":"");switch(U){case k:return j?Z(1,0):Z(31,11);case u:return j?Z(1,q):Z(0,q+1);case p:var z=this.$locale().weekStart||0,P=(W<z?W+7:W)-z;return Z(j?L-P:L+(6-P),q);case f:case y:return _(D+"Hours",0);case c:return _(D+"Minutes",1);case i:return _(D+"Seconds",2);case s:return _(D+"Milliseconds",3);default:return this.clone()}},$.endOf=function(E){return this.startOf(E,!1)},$.$set=function(E,F){var I,j=T.p(E),U="set"+(this.$u?"UTC":""),Z=(I={},I[f]=U+"Date",I[y]=U+"Date",I[u]=U+"Month",I[k]=U+"FullYear",I[c]=U+"Hours",I[i]=U+"Minutes",I[s]=U+"Seconds",I[r]=U+"Milliseconds",I)[j],_=j===f?this.$D+(F-this.$W):F;if(j===u||j===k){var W=this.clone().set(y,1);W.$d[Z](_),W.init(),this.$d=W.set(y,Math.min(this.$D,W.daysInMonth())).$d}else Z&&this.$d[Z](_);return this.init(),this},$.set=function(E,F){return this.clone().$set(E,F)},$.get=function(E){return this[T.p(E)]()},$.add=function(E,F){var I,j=this;E=Number(E);var U=T.p(F),Z=function(q){var L=V(j);return T.w(L.date(L.date()+Math.round(q*E)),j)};if(U===u)return this.set(u,this.$M+E);if(U===k)return this.set(k,this.$y+E);if(U===f)return Z(1);if(U===p)return Z(7);var _=(I={},I[i]=o,I[c]=l,I[s]=a,I)[U]||1,W=this.$d.getTime()+E*_;return T.w(W,this)},$.subtract=function(E,F){return this.add(-1*E,F)},$.format=function(E){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||v;var j=E||"YYYY-MM-DDTHH:mm:ssZ",U=T.z(this),Z=this.$H,_=this.$m,W=this.$M,q=I.weekdays,L=I.months,D=function(Y,J,oe,K){return Y&&(Y[J]||Y(F,j))||oe[J].slice(0,K)},z=function(Y){return T.s(Z%12||12,Y,"0")},P=I.meridiem||function(Y,J,oe){var K=Y<12?"AM":"PM";return oe?K.toLowerCase():K},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:W+1,MM:T.s(W+1,2,"0"),MMM:D(I.monthsShort,W,L,3),MMMM:D(L,W),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:D(I.weekdaysMin,this.$W,q,2),ddd:D(I.weekdaysShort,this.$W,q,3),dddd:q[this.$W],H:String(Z),HH:T.s(Z,2,"0"),h:z(1),hh:z(2),a:P(Z,_,!0),A:P(Z,_,!1),m:String(_),mm:T.s(_,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:U};return j.replace(d,function(Y,J){return J||O[Y]||U.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(E,F,I){var j,U=T.p(F),Z=V(E),_=(Z.utcOffset()-this.utcOffset())*o,W=this-Z,q=T.m(this,Z);return q=(j={},j[k]=q/12,j[u]=q,j[h]=q/3,j[p]=(W-_)/6048e5,j[f]=(W-_)/864e5,j[c]=W/l,j[i]=W/o,j[s]=W/a,j)[U]||W,I?q:T.a(q)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return C[this.$L]},$.locale=function(E,F){if(!E)return this.$L;var I=this.clone(),j=B(E,F,!0);return j&&(I.$L=j),I},$.clone=function(){return T.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},M}(),x=A.prototype;return V.prototype=x,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",f],["$M",u],["$y",k],["$D",y]].forEach(function(M){x[M[1]]=function($){return this.$g($,M[0],M[1])}}),V.extend=function(M,$){return M.$i||(M($,A,V),M.$i=!0),V},V.locale=B,V.isDayjs=w,V.unix=function(M){return V(1e3*M)},V.en=C[N],V.Ls=C,V.p={},V})})(ws);var Ad=ws.exports;const Re=Ye(Ad);var Ns={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},c=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(b){this[v]=+b}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var d=b.match(/([+-]|\d\d)/g),m=60*d[1]+(+d[2]||0);return m===0?0:d[0]==="+"?-m:m}(v)}],u=function(v){var b=i[v];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(v,b){var d,m=i.meridiem;if(m){for(var g=1;g<=24;g+=1)if(v.indexOf(m(g,0,b))>-1){d=g>12;break}}else d=v===(b?"pm":"PM");return d},k={A:[s,function(v){this.afternoon=h(v,!1)}],a:[s,function(v){this.afternoon=h(v,!0)}],S:[/\d/,function(v){this.milliseconds=100*+v}],SS:[l,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[r,f("seconds")],ss:[r,f("seconds")],m:[r,f("minutes")],mm:[r,f("minutes")],H:[r,f("hours")],h:[r,f("hours")],HH:[r,f("hours")],hh:[r,f("hours")],D:[r,f("day")],DD:[l,f("day")],Do:[s,function(v){var b=i.ordinal,d=v.match(/\d+/);if(this.day=d[0],b)for(var m=1;m<=31;m+=1)b(m).replace(/\[|\]/g,"")===v&&(this.day=m)}],M:[r,f("month")],MM:[l,f("month")],MMM:[s,function(v){var b=u("months"),d=(u("monthsShort")||b.map(function(m){return m.slice(0,3)})).indexOf(v)+1;if(d<1)throw new Error;this.month=d%12||d}],MMMM:[s,function(v){var b=u("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,f("year")],YY:[l,function(v){this.year=c(v)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function y(v){var b,d;b=v,d=i&&i.formats;for(var m=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(V,T,A){var x=A&&A.toUpperCase();return T||d[A]||a[A]||d[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,$,E){return $||E.slice(1)})})).match(o),g=m.length,S=0;S<g;S+=1){var N=m[S],C=k[N],w=C&&C[0],B=C&&C[1];m[S]=B?{regex:w,parser:B}:N.replace(/^\[|\]$/g,"")}return function(V){for(var T={},A=0,x=0;A<g;A+=1){var M=m[A];if(typeof M=="string")x+=M.length;else{var $=M.regex,E=M.parser,F=V.slice(x),I=$.exec(F)[0];E.call(T,I),V=V.replace(I,"")}}return function(j){var U=j.afternoon;if(U!==void 0){var Z=j.hours;U?Z<12&&(j.hours+=12):Z===12&&(j.hours=0),delete j.afternoon}}(T),T}}return function(v,b,d){d.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(c=v.parseTwoDigitYear);var m=b.prototype,g=m.parse;m.parse=function(S){var N=S.date,C=S.utc,w=S.args;this.$u=C;var B=w[1];if(typeof B=="string"){var V=w[2]===!0,T=w[3]===!0,A=V||T,x=w[2];T&&(x=w[2]),i=this.$locale(),!V&&x&&(i=d.Ls[x]),this.$d=function(F,I,j){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*F);var U=y(I)(F),Z=U.year,_=U.month,W=U.day,q=U.hours,L=U.minutes,D=U.seconds,z=U.milliseconds,P=U.zone,O=new Date,Y=W||(Z||_?1:O.getDate()),J=Z||O.getFullYear(),oe=0;Z&&!_||(oe=_>0?_-1:O.getMonth());var K=q||0,H=L||0,X=D||0,R=z||0;return P?new Date(Date.UTC(J,oe,Y,K,H,X,R+60*P.offset*1e3)):j?new Date(Date.UTC(J,oe,Y,K,H,X,R)):new Date(J,oe,Y,K,H,X,R)}catch{return new Date("")}}(N,B,C),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),A&&N!=this.format(B)&&(this.$d=new Date("")),i={}}else if(B instanceof Array)for(var M=B.length,$=1;$<=M;$+=1){w[1]=B[$-1];var E=d.apply(this,w);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}$===M&&(this.$d=new Date(""))}else g.call(this,S)}}})})(Ns);var Td=Ns.exports;const $d=Ye(Td);var Bs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=r.format;l.en.ordinal=function(i){var c=["th","st","nd","rd"],f=i%100;return"["+i+(c[(f-20)%10]||c[f]||c[0])+"]"},r.format=function(i){var c=this,f=this.$locale();if(!this.isValid())return s.bind(this)(i);var p=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return f.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return f.ordinal(c.week(),"W");case"w":case"ww":return p.s(c.week(),h==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),h==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return h}});return s.bind(this)(u)}}})})(Bs);var Ed=Bs.exports;const xd=Ye(Ed);var Vs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=function(u){return u&&(u.indexOf?u:u.s)},i=function(u,h,k,y,v){var b=u.name?u:u.$locale(),d=s(b[h]),m=s(b[k]),g=d||m.map(function(N){return N.slice(0,y)});if(!v)return g;var S=b.weekStart;return g.map(function(N,C){return g[(C+(S||0))%7]})},c=function(){return l.Ls[l.locale()]},f=function(u,h){return u.formats[h]||function(k){return k.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,v,b){return v||b.slice(1)})}(u.formats[h.toUpperCase()])},p=function(){var u=this;return{months:function(h){return h?h.format("MMMM"):i(u,"months")},monthsShort:function(h){return h?h.format("MMM"):i(u,"monthsShort","months",3)},firstDayOfWeek:function(){return u.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(u,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(u,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(u,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return f(u.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var u=c();return{firstDayOfWeek:function(){return u.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(h){return f(u,h)},meridiem:u.meridiem,ordinal:u.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(u){return i(c(),"weekdays",null,null,u)},l.weekdaysShort=function(u){return i(c(),"weekdaysShort","weekdays",3,u)},l.weekdaysMin=function(u){return i(c(),"weekdaysMin","weekdays",2,u)}}})})(Vs);var Dd=Vs.exports;const Id=Ye(Dd);var As={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a="week",o="year";return function(l,r,s){var i=r.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var f=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=s(this).startOf(o).add(1,o).date(f),u=s(this).endOf(a);if(p.isBefore(u))return 1}var h=s(this).startOf(o).date(f).startOf(a).subtract(1,"millisecond"),k=this.diff(h,a,!0);return k<0?s(this).startOf("week").week():Math.ceil(k)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(As);var qd=As.exports;const Md=Ye(qd);var Ts={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),s=this.year();return r===1&&l===11?s+1:l===0&&r>=52?s-1:s}}})})(Ts);var Pd=Ts.exports;const Ld=Ye(Pd);var $s={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var s=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?s:this.add(r-s,"day")}}})})($s);var zd=$s.exports;const Fd=Ye(zd);var Es={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(Es);var Rd=Es.exports;const Od=Ye(Rd);var xs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(xs);var Kd=xs.exports;const Ud=Ye(Kd);Re.extend(Id);Re.extend(xd);Re.extend($d);Re.extend(Md);Re.extend(Ld);Re.extend(Fd);Re.extend(Od);Re.extend(Ud);const le={format(e,n){return Re(e).format(n)},parser(e,n){return Re(e,n).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,n,a){const l=new Date(e+"/"+n+"/"+a).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l]},getMonthPreDay(e,n){let o=new Date(e+"/"+n+"/01").getDay();return o==0&&(o=7),o},getMonthDays(e,n){return/^0/.test(n)&&(n=n.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][n]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,n){n=n||"-";const a=e.getFullYear(),o=this.getNumTwoBit(e.getMonth()+1),l=this.getNumTwoBit(e.getDate());return[a,o,l].join(n)},getDay(e,n){e=e||0;let a=n??new Date;const o=e*(1e3*60*60*24);return a=new Date(a.getTime()+o),this.date2Str(a)},compareDate(e,n){let a;typeof e=="string"?a=new Date(e.replace("-","/").replace("-","/")):a=e;let o;return typeof n=="string"?o=new Date(n.replace("-","/").replace("-","/")):o=n,!(a>=o)},isEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;let a;typeof e=="string"?a=new Date(e).getTime():a=e;let o;return typeof n=="string"?o=new Date(n).getTime():o=n,a==o},getMonthWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a));let r=l.getDay(),s=l.getDate(),i=6-r;return o!==0&&(r=r==0?7:r,i=7-r),Math.ceil((s+i)/7)},getYearWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=new Date(Number(e),0,1),s=Math.round((l.valueOf()-r.valueOf())/864e5);let i=l.getDay(),c=6-i;return o!==0&&(i=i==0?7:i,c=7-i),Math.ceil((s+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let s=l.getDay();if(o===0){const c=r-s*864e5,f=r+(6-s)*864e5,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(f));return[p,u]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,f=r+(7-s)*i,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(f));return[p,u]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=le.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=le.getWhatDay(+n[0],+n[1],+n[2]),n},inScope4Day(e,n,a){const o=new Date(new Date(n).setDate(n.getDate()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s}},ur=new Date().getFullYear(),sl={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",time:"HH:mm:ss","year-month":"YYYY-MM","month-day":"MM-DD",datehour:"YYYY-MM-DD HH","hour-minute":"HH:mm"},kn=(e,n,a)=>{let o;if(He(n)?o=n:typeof n=="string"&&ve(n)>0?o=le.parser(n,a):o=new Date,o.toString()==="Invalid Date")return null;let l=Math.max(o.getTime(),e.minDate.getTime());return l=Math.min(l,e.maxDate.getTime()),new Date(l)},Do=(e,n,a)=>{He(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),le.format(new Date(o),a)};let Io={modelValue:{type:[String,Date]},confirmText:{type:String},cancelText:{type:String},type:{type:String,default:"date"},valueFormat:{type:String},visible:{type:Boolean,default:!1},title:{type:String,default:""},isShowChinese:{type:Boolean,default:!0},minuteStep:{type:Number,default:1},minDate:{type:Date,default:()=>new Date(ur-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(ur+10,11,31),validator:He},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Hd,scope:jd}=G("date-picker"),Wd=Hd({components:{[bt.name]:bt},props:{...Io},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(jd),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,g){return new Date(m,g,0).getDate()}const s=(m,g)=>{const S=e[`${m}Date`],N=S.getFullYear();let C=1,w=1,B=0,V=0;m==="max"&&(C=12,w=r(g.getFullYear(),g.getMonth()+1),B=23,V=59);const T=V;return g.getFullYear()===N&&(C=S.getMonth()+1,g.getMonth()+1===C&&(w=S.getDate(),g.getDate()===w&&(B=S.getHours(),g.getHours()===B&&(V=S.getMinutes())))),{[`${m}Year`]:N,[`${m}Month`]:C,[`${m}Date`]:w,[`${m}Hour`]:B,[`${m}Minute`]:V,[`${m}Seconds`]:T}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:m,maxDate:g,maxMonth:S,maxHour:N,maxMinute:C,maxSeconds:w}=s("max",h.value),{minYear:B,minDate:V,minMonth:T,minHour:A,minMinute:x,minSeconds:M}=s("min",h.value);let $=[{type:"year",range:[B,m]},{type:"month",range:[T,S]},{type:"day",range:[V,g]},{type:"hour",range:[A,N]},{type:"minute",range:[x,C]},{type:"seconds",range:[M,w]}];switch(e.type){case"date":$=$.slice(0,3);break;case"datetime":$=$.slice(0,5);break;case"time":$=$.slice(3,6);break;case"year-month":$=$.slice(0,2);break;case"month-day":$=$.slice(1,3);break;case"datehour":$=$.slice(0,4);break;case"hour-minute":$=$.slice(3,5);break}return $}),c=(m,g,S)=>{if(!(g>m))return null;const N=[];for(;m<=g;)e.isShowChinese?N.push({text:m+o[S],value:m}):N.push({text:`${m}`,value:m}),S==="minute"?m+=e.minuteStep:m++;return N},f=t.computed(()=>{let m=[];return i.value.forEach(g=>{let S=c(g.range[0],g.range[1],g.type);S&&m.push(S)}),m}),p=(m,g)=>m==="year"?g.getFullYear():m==="month"?g.getMonth()+1:m==="day"?g.getDate():m==="hour"?g.getHours():m==="minute"?g.getMinutes():m==="seconds"?g.getSeconds():0,u=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,m=>{let g;if(typeof m=="string"?m.length==0?g=new Date:e.valueFormat?g=kn(e,e.modelValue,e.valueFormat):g=kn(e,m,sl[e.type]):He(m)?g=m:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let S=[];i.value.forEach(N=>{let C=p(N.type,g);S.push(C)}),u.value=S}},{immediate:!0});const k=m=>{if(e.type==="date"){const g=m[0],S=m[1]-1,N=Math.min(m[2],r(g,S+1));N!==m[2]&&(m[2]=N),h.value=new Date(g,S,N)}else if(e.type==="datetime"){const g=m[0],S=m[1]-1,N=Math.min(m[2],r(g,S+1)),C=m[3],w=m[4];N!==m[2]&&(m[2]=N),h.value=new Date(g,S,N,C,w)}else if(e.type==="time"){const g=m[0],S=m[1],N=m[2],C=h.value??new Date,w=new Date(C.getFullYear(),C.getMonth(),C.getDate(),g,S,N);h.value=w}else if(e.type==="year-month"){const g=m[0],S=m[1]-1;h.value=new Date(g,S)}else if(e.type==="month-day"){const S=(h.value??new Date).getFullYear(),N=m[0]-1,C=Math.min(m[1],r(S,N+1));C!==m[1]&&(m[1]=C);const w=new Date(S,N,C);h.value=w}else if(e.type==="datehour"){const g=m[0],S=m[1]-1,N=Math.min(m[2],r(g,S+1)),C=m[3];N!==m[2]&&(m[2]=N),h.value=new Date(g,S,N,C)}else if(e.type==="hour-minute"){const g=m[0],S=m[1],N=h.value??new Date,C=new Date(N.getFullYear(),N.getMonth(),N.getDate(),g,S);h.value=C}u.value=m};return{columns:f,dateIndexs:u,show:l,onChange:m=>{k(m)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:m=>{k(m),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let S=Do(e,g,e.valueFormat);n("update:modelValue",S)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function Yd(e,n,a,o,l,r){const s=t.resolveComponent("fox-picker");return t.openBlock(),t.createBlock(s,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onChange:e.onChange,onConfirm:e.onConfirm,onClose:e.onClose,onClear:e.onClear,"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"teleport-disable":e.teleportDisable},{top:t.withCtx(()=>[t.renderSlot(e.$slots,"top")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","model-value","source","confirm-text","cancel-text","title","onChange","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const jn=te(Wd,[["render",Yd]]),Xd={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Qd(e){let n=e.format;if(!n){let a=e.type??"date";n=sl[a]}return n}function Gd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...Io,...Xd},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=Ie(i,"modelValue",q=>q==null?null:typeof q=="string"?q.length==0?null:i.valueFormat?kn(i,q,i.valueFormat)??q:kn(i,q,sl[i.type])??q:He(q)?q:null,u),d=t.computed(()=>{if(!b.value)return"";const q=Qd(i);return Do(i,b.value,q)}),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),S=Ve(t.computed(()=>i.textAlign),"textAlign"),N=t.computed(()=>{const q={};return S.value&&(q["text-align"]=S.value),q}),C=t.ref(!1),w=()=>{C.value=!0},B=()=>{C.value=!1};c.expose({showPicker:w,hidePicker:B});const V=q=>{C.value=q},T=q=>{if(b.value=q,i.valueFormat){let L=Do(i,q,i.valueFormat);u("update:modelValue",L,{}),u("change",L,{})}else u("update:modelValue",q,{}),u("change",q,{})},A=q=>{let D=q.target.value;y.value=!0,u("focus",D,q)},x=q=>{setTimeout(()=>{y.value=!1},0);let D=q.target.value;i.maxLength&&D.length>Number(i.maxLength)&&(D=D.slice(0,Number(i.maxLength))),u("blur",D,q)},M=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),$=t.computed(()=>ve(i.unit)>0),E=t.computed(()=>ve(i.unit)>0&&!y.value),F=t.computed(()=>({hidden:!E.value})),I=q=>{b.value="",u("update:modelValue","",q),u("change","",q),u("clear",""),B()},j=t.computed(()=>i.clearable&&!f.value&&!p.value),U=t.computed(()=>{let q=ve(b.value)>0;return i.clearable&&q&&y.value}),Z=q=>{U.value?I(q):w()},_=t.computed(()=>U.value&&j.value?o:l),W=t.computed(()=>({action:!0}));return()=>{const q={class:g.value,style:N.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:w,onFocus:A,onBlur:x};s&&(q.disabled=!0);const L=[],D=t.h("input",q);L.push(D);const z=[],P={class:["action-icon"]},O=t.h(_.value,P),Y={class:W.value,onClick:Z},J=t.h("view",Y,{default:()=>[O]});if(z.push(J),$.value){const re=t.h("view",{class:F.value},[i.unit]);z.push(re)}const oe={class:M.value},K=t.h("view",oe,{default:()=>z});L.push(K);const H={default:()=>L};H.label=c.slots.default,H.prepend=c.slots.prepend,H.append=c.slots.append,H.fixedPreTip=c.slots.fixedPreTip,H.fixedTip=c.slots.fixedTip;const X=be(i,Io);X.valueFormat=null,X.disabled=!1,X.readonly=f.value||p.value,X.visible=C.value,X["onUpdate:visible"]=V,X.modelValue=b.value,X["onUpdate:modelValue"]=T,X.onClear=I;const R={};if(c.slots.top){const re=c.slots.top();R.top=()=>re}if(c.slots.bottom){const re=c.slots.bottom();R.default=()=>re}const Q=t.h(r,X,R);H.hide=()=>[Q];const ee=be(i,ye,me);return t.h(a,{...ee,prop:`${i.prop}_item`},H)}}}}const{create:Zd,componentName:Jd,scope:_d}=G("date-item"),il=Zd(Gd(Jd,_d,we,ne.CircleClose,ne.Date,jn,!1)),ef=39,tf=64,{create:nf,scope:of}=G("calendar-pane"),lf=nf({props:{type:{type:String,default:"one"},valueFormat:{type:String,default:"YYYY-MM-DD"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array],default:""},startDate:{type:String,default:le.getDay(0)},endDate:{type:String,default:le.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=se.useFoxI18n(of),r=o(e,["title","confirmText","startText","endText","today"]),s=JSON.parse(l("weekdays")),i=t.ref([...s.slice(e.firstDayOfWeek,7),...s.slice(0,e.firstDayOfWeek)]),c=t.ref(null),f=t.ref(null),p=t.ref(null),u=t.ref(null),h=t.ref(0),k=t.computed(()=>d.monthsData.slice(d.defaultRange[0],d.defaultRange[1])),y=t.computed(()=>a.btn),v=t.computed(()=>a["top-info"]),b=t.computed(()=>a["bottom-info"]),d=t.reactive({yearMonthTitle:"",defaultRange:[],currDate:"",propStartDate:"",propEndDate:"",unLoadPrev:!1,touchParams:{startY:0,endY:0,startTime:0,endTime:0,lastY:0,lastTime:0},transformY:0,translateY:0,scrollDistance:0,defaultData:[],chooseData:[],monthsData:[],dayPrefix:"fox-calendar__day",startData:"",endData:"",isRange:e.type==="range",timer:0,currentIndex:0,containerHeight:0,avgHeight:0,monthsNum:0}),m=P=>P.split("-"),g=P=>le.isEqual(d.currDate[0],P),S=P=>le.isEqual(d.currDate[1],P),N=P=>d.currDate?.length>0?d.currDate?.some(O=>le.isEqual(O,P)):!1,C=(P,O)=>O.curData[0]+"-"+O.curData[1]+"-"+le.getNumTwoBit(+P.day),w=(P,O)=>{const Y=C(P,O),{type:J}=e;return P.type=="curr"?le.isEqual(d.currDate,Y)||(J=="range"||J=="week")&&(g(Y)||S(Y))||J=="multiple"&&N(Y)?`${d.dayPrefix}--active`:d.propStartDate&&le.compareDate(Y,d.propStartDate)||d.propEndDate&&le.compareDate(d.propEndDate,Y)?`${d.dayPrefix}--disabled`:(J=="range"||J=="week")&&Array.isArray(d.currDate)&&Object.values(d.currDate).length==2&&le.compareDate(d.currDate[0],Y)&&le.compareDate(Y,d.currDate[1])?`${d.dayPrefix}--choose`:null:`${d.dayPrefix}--disabled`},B=()=>{const{type:P}=e;if(P=="range"&&d.chooseData.length==2||P!="range"){let O=d.chooseData.slice(0);P=="week"&&(O={weekDate:[T(d.chooseData[0]),T(d.chooseData[1])]}),n("choose",O),e.poppable&&n("update")}},V=(P,O,Y=!1)=>{if(w(P,O)!=`${d.dayPrefix}--disabled`){const{type:J}=e;let[oe,K]=O.curData,H=[...O.curData];if(H[2]=le.getNumTwoBit(Number(P.day)),H[3]=`${H[0]}-${H[1]}-${H[2]}`,H[4]=le.getWhatDay(+H[0],+H[1],+H[2]),J=="multiple")if(d.currDate?.length>0){let X;d.currDate?.forEach((R,Q)=>{R==H[3]&&(X=Q)}),Y?d.chooseData.push([...H]):X!==void 0?(d.currDate.splice(X,1),d.chooseData.splice(X,1)):(d.currDate.push(H[3]),d.chooseData.push([...H]))}else d.currDate=[H[3]],d.chooseData=[[...H]];else if(J=="range"){let X=Object.values(d.currDate).length;X==2||X==0?d.currDate=[H[3]]:le.compareDate(d.currDate[0],H[3])?Array.isArray(d.currDate)&&d.currDate.push(H[3]):Array.isArray(d.currDate)&&d.currDate.unshift(H[3]),d.chooseData.length==2||!d.chooseData.length?d.chooseData=[[...H]]:le.compareDate(d.chooseData[0][3],H[3])?d.chooseData=[...d.chooseData,[...H]]:d.chooseData=[[...H],...d.chooseData]}else if(J=="week"){let X=le.getWeekDate(oe,K,P.day,e.firstDayOfWeek);d.propStartDate&&le.compareDate(X[0],d.propStartDate)&&X.splice(0,1,d.propStartDate),d.propEndDate&&le.compareDate(d.propEndDate,X[1])&&X.splice(1,1,d.propEndDate),d.currDate=X,d.chooseData=[le.formatResultDate(X[0]),le.formatResultDate(X[1])]}else d.currDate=H[3],d.chooseData=[...H];if(!Y){let X=d.chooseData;J=="week"&&(X={weekDate:[T(d.chooseData[0]),T(d.chooseData[1])]}),n("select",X),(e.isAutoBackFill||!e.poppable)&&B()}}},T=P=>{let[O,Y,J]=P;return{date:P,monthWeekNum:le.getMonthWeek(O,Y,J,e.firstDayOfWeek),yearWeekNum:le.getYearWeek(O,Y,J,e.firstDayOfWeek)}},A=P=>{const O=P=="prev"?d.monthsData[0]:d.monthsData[d.monthsData.length-1];let Y=parseInt(O.curData[0]),J=parseInt(O.curData[1].toString().replace(/^0/,""));switch(P){case"prev":J==1&&(Y-=1),J=J==1?12:--J;break;case"next":J==12&&(Y+=1),J=J==12?1:++J;break}return[Y+"",le.getNumTwoBit(J),le.getMonthDays(String(Y),String(J))+""]},x=(P,O,Y)=>{let{year:J,month:oe}=Y;return O=="prev"&&P>=7&&(P-=7),Array.from(Array(P),(K,H)=>({day:String(H+1),type:O,year:J,month:oe}))},M=(P,O,Y,J)=>{P=P-e.firstDayOfWeek;let{year:oe,month:K}=Y;return O=="prev"&&P>=7&&(P-=7),Array.from(Array(J),(X,R)=>({day:String(R+1),type:O,year:oe,month:K})).slice(J-P)},$=(P,O)=>{const Y=le.getMonthPreDay(+P[0],+P[1]);let J=Number(P[1])-1,oe=Number(P[0]);J<=0&&(J=12,oe+=1);const K=le.getMonthDays(String(P[0]),String(P[1])),H=le.getMonthDays(oe+"",J+""),X={year:P[0],month:P[1]},R={curData:P,title:l("monthTitle",{year:X.year,month:X.month}),monthData:[...M(Y,"prev",{month:String(J),year:String(oe)},H),...x(K,"curr",X)],cssHeight:0,cssScrollHeight:0},Q=R.monthData.length>35?6:5;R.cssHeight=ef+tf*Q;let ee=0;d.monthsData.length>0&&(ee=d.monthsData[d.monthsData.length-1].cssScrollHeight+d.monthsData[d.monthsData.length-1].cssHeight),R.cssScrollHeight=ee,O=="next"?(!d.endData||!le.compareDate(`${d.endData[0]}-${d.endData[1]}-${le.getMonthDays(d.endData[0],d.endData[1])}`,`${P[0]}-${P[1]}-${P[2]}`))&&d.monthsData.push(R):!d.startData||!le.compareDate(`${P[0]}-${P[1]}-${P[2]}`,`${d.startData[0]}-${d.startData[1]}-01`)?d.monthsData.unshift(R):d.unLoadPrev=!0},E=()=>{let P=e.startDate?e.startDate:le.getDay(0),O=e.endDate?e.endDate:le.getDay(365);d.propStartDate=P,d.propEndDate=O,d.startData=m(P),d.endData=m(O),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(d.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const Y={year:Number(d.startData[0]),month:Number(d.startData[1])},J={year:Number(d.endData[0]),month:Number(d.endData[1])};let oe=J.month-Y.month;J.year-Y.year>0&&(oe=oe+12*(J.year-Y.year)),oe<=0&&(oe=1),$(d.startData,"next");let K=1;do $(A("next"),"next");while(K++<oe);if(d.monthsNum=oe,e.type=="range"&&Array.isArray(d.currDate))d.currDate.length>0&&(P&&le.compareDate(d.currDate[0],P)&&d.currDate.splice(0,1,P),O&&le.compareDate(O,d.currDate[1])&&d.currDate.splice(1,1,O),d.defaultData=[...m(d.currDate[0]),...m(d.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(d.currDate)){if(d.currDate.length>0){let H=[],X={};d.currDate.forEach(R=>{P&&!le.compareDate(R,P)&&O&&!le.compareDate(O,R)&&(Object.hasOwnProperty.call(X,R)||(H.push(R),X[R]=R))}),d.currDate=[...H],d.defaultData=[...m(H[0])]}}else if(e.type=="week"&&Array.isArray(d.currDate)){if(d.currDate.length>0){let[H,X,R]=m(d.currDate[0]),Q=le.getWeekDate(H,X,R,e.firstDayOfWeek);d.currDate=Q,P&&le.compareDate(d.currDate[0],P)&&d.currDate.splice(0,1,P),O&&le.compareDate(O,d.currDate[1])&&d.currDate.splice(1,1,O),d.defaultData=[...m(d.currDate[0]),...m(d.currDate[1])]}}else d.currDate&&(P&&le.compareDate(d.currDate,P)?d.currDate=P:O&&!le.compareDate(d.currDate,O)&&(d.currDate=O),d.defaultData=[...m(d.currDate)])};De({scrollToDate:P=>{le.compareDate(P,d.propStartDate)?P=d.propStartDate:le.compareDate(P,d.propEndDate)||(P=d.propEndDate);let O=m(P);d.monthsData.forEach((Y,J)=>{if(Y.title==l("monthTitle",{year:O[0],month:O[1]})&&c.value){let oe=d.monthsData[J].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let K=0,H=setInterval(()=>{if(K++,c.value){let X=oe/10;c.value.scrollTop=c.value.scrollTop+X}K>=10&&(clearInterval(H),c.value&&(c.value.scrollTop=d.monthsData[J].cssScrollHeight))},40)}else c.value.scrollTop=d.monthsData[J].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=d.monthsData[d.currentIndex].cssScrollHeight)},doLayout:()=>{let P=0,O=0;d.defaultData.length>0&&d.monthsData.forEach((oe,K)=>{oe.title==l("monthTitle",{year:d.defaultData[0],month:d.defaultData[1]})&&(P=K),(e.type=="range"||e.type=="week")&&oe.title==l("monthTitle",{year:d.defaultData[3],month:d.defaultData[4]})&&(O=K)}),U(d.monthsNum,P),d.currentIndex=P,d.yearMonthTitle=d.monthsData[d.currentIndex].title,d.defaultData.length>0&&(d.isRange?(V({day:d.defaultData[2],type:"curr"},d.monthsData[d.currentIndex],!0),V({day:d.defaultData[5],type:"curr"},d.monthsData[O],!0)):e.type=="week"?V({day:d.defaultData[2],type:"curr"},d.monthsData[d.currentIndex],!0):e.type=="multiple"?[...d.currDate].forEach(oe=>{let K=m(oe),H=d.currentIndex;d.monthsData.forEach((X,R)=>{X.title==l("monthTitle",{year:K[0],month:K[1]})&&(H=R)}),V({day:K[2],type:"curr"},d.monthsData[H],!0)}):V({day:d.defaultData[2],type:"curr"},d.monthsData[d.currentIndex],!0));let Y=d.monthsData[d.monthsData.length-1],J=Y.cssHeight+Y.cssScrollHeight;Xe(()=>{c?.value&&f?.value&&u?.value&&(h.value=c.value.clientHeight,f.value.style.height=`${J}px`,c.value.scrollTop=d.monthsData[d.currentIndex].cssScrollHeight)}),d.avgHeight=Math.floor(J/(d.monthsNum+1))}});const U=(P,O)=>{P>=3?O>0&&O<P?d.defaultRange=[O-1,O+3]:O==0?d.defaultRange=[O,O+4]:O==P&&(d.defaultRange=[O-2,O+2]):d.defaultRange=[0,P+2];let Y=d.monthsData[d.defaultRange[0]].cssScrollHeight;d.translateY=Y},Z=(P,O)=>(e.type=="range"||e.type=="week")&&P.type=="curr"&&w(P,O)=="fox-calendar__day--active",_=(P,O)=>Z(P,O)&&g(C(P,O)),W=(P,O)=>d.currDate.length>=2&&S(C(P,O))?Z(P,O):!1,q=()=>{if(d.currDate.length>=2)return le.isEqual(d.currDate[0],d.currDate[1])},L=P=>{const O=`${P.year}-${P.month}-${Number(P.day)<10?"0"+P.day:P.day}`;return le.isEqual(O,le.date2Str(new Date))},D=P=>{if(d.monthsData.length<=1)return;const O=P.target.scrollTop;let Y=Math.floor(O/d.avgHeight);if(Y==0)O>=d.monthsData[Y+1].cssScrollHeight&&(Y+=1);else if(Y>0&&Y<d.monthsNum-1)O>=d.monthsData[Y+1].cssScrollHeight&&(Y+=1),O<d.monthsData[Y].cssScrollHeight&&(Y-=1);else{const J=Math.round(O+h.value);J<d.monthsData[Y].cssScrollHeight+d.monthsData[Y].cssHeight&&O>d.monthsData[Y-1].cssScrollHeight&&(Y-=1),Y+1<=d.monthsNum&&J>=d.monthsData[Y+1].cssScrollHeight+d.monthsData[Y+1].cssHeight&&(Y+=1),Y>=1&&O<d.monthsData[Y-1].cssScrollHeight&&(Y-=1)}d.currentIndex!==Y&&(d.currentIndex=Y,U(d.monthsNum,Y)),d.yearMonthTitle=d.monthsData[Y].title},z=()=>{d.chooseData.splice(0),d.monthsData.splice(0),E()};return E(),t.watch(()=>e.defaultValue,P=>{P&&e.poppable&&z()}),{weeks:i,compConthsData:k,showTopBtn:y,topInfo:v,bottomInfo:b,rangeTip:q,mothsViewScroll:D,getClass:w,isStartTip:_,isEndTip:W,chooseDay:V,isCurrDay:L,confirm:B,months:c,...t.toRefs(d),...t.toRefs(e),...r,monthsPanel:f,weeksPanel:p,viewArea:u}}}),af={class:"fox-calendar__header"},rf={key:0,class:"fox-calendar__header-title"},sf={key:1,class:"fox-calendar__header-slot"},cf={key:2,class:"fox-calendar__header-subtitle"},uf={class:"fox-calendar__weekdays",ref:"weeksPanel"},df={class:"fox-calendar__panel",ref:"monthsPanel"},ff={class:"fox-calendar__month-title"},mf={class:"fox-calendar__days"},pf=["onClick"],hf={class:"fox-calendar__day-value"},gf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},yf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},vf={key:2,class:"fox-calendar__day-tips--curr"},bf={key:4,class:"fox-calendar__day-tip"},kf={key:0,class:"fox-calendar__footer"};function Sf(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-calendar",{"fox-calendar--nopop":!e.poppable,"fox-calendar--nofooter":e.isAutoBackFill}])},[t.createElementVNode("view",af,[e.showTitle?(t.openBlock(),t.createElementBlock("view",rf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",sf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",cf,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",uf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:i},t.toDisplayString(s),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...s)=>e.mothsViewScroll&&e.mothsViewScroll(...s))},[t.createElementVNode("view",df,[t.createElementVNode("view",{class:"fox-calendar__body",ref:"viewArea",style:t.normalizeStyle({transform:`translateY(${e.translateY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.compConthsData,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:i},[t.createElementVNode("view",ff,t.toDisplayString(s.title),1),t.createElementVNode("view",mf,[t.createElementVNode("view",{class:t.normalizeClass(["fox-calendar__days-item",e.type==="range"?"fox-calendar__days-item--range":""])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.monthData,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:p=>e.chooseDay(c,s)},[t.createElementVNode("view",hf,[t.renderSlot(e.$slots,"day",{date:c.type=="curr"?c:""},()=>[t.createTextVNode(t.toDisplayString(c.type=="curr"?c.day:""),1)])]),e.topInfo?(t.openBlock(),t.createElementBlock("view",gf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",yf,[t.renderSlot(e.$slots,"bottom-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),!e.bottomInfo&&e.showToday&&e.isCurrDay(c)?(t.openBlock(),t.createElementBlock("view",vf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,s)?(t.openBlock(),t.createElementBlock("view",{key:3,class:t.normalizeClass(["fox-calendar__day-tip",{"fox-calendar__day-tips--top":e.rangeTip()}])},t.toDisplayString(e.startText),3)):t.createCommentVNode("",!0),e.isEndTip(c,s)?(t.openBlock(),t.createElementBlock("view",bf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,pf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",kf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...s)=>e.confirm&&e.confirm(...s))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const dr=te(lf,[["render",Sf]]),Cf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),ln={type:{type:String,default:"one"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array]},startDate:{type:String},endDate:{type:String},firstDayOfWeek:{type:Number,default:0,validator:e=>e>=0&&e<=6}},{create:wf}=G("calendar"),Nf=wf({components:{[dr.name]:dr,[de.name]:de},props:{...ln},emits:["choose","close","update:visible","select"],setup(e,{emit:n,slots:a}){const o=t.computed(()=>a.btn),l=t.computed(()=>a["top-info"]),r=t.computed(()=>a.day),s=t.computed(()=>a["bottom-info"]),i=t.ref(null),c=v=>{i.value?.scrollToDate(v)},f=()=>{i.value?.initPosition()};t.watch(()=>e.visible,v=>{v&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),De({scrollToDate:c,initPosition:f});const p=()=>{n("update:visible",!1)},u=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{u()},update:p,close:u,select:v=>{n("select",v)},choose:v=>{u(),n("choose",v)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Bf(e,n,a,o,l,r){const s=t.resolveComponent("fox-calendar-pane"),i=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(i,t.mergeProps({key:0,visible:e.visible,position:"bottom",round:"",closeable:""},e.$attrs,{onClickOverlay:e.closePopup,onClickCloseIcon:e.closePopup,style:{height:"85vh"}}),{default:t.withCtx(()=>[t.createVNode(s,{ref:"calendarRef",type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"show-today":e.showToday,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","confirm-text","start-text","end-text","show-today","show-title","show-sub-title","to-date-animation","first-day-of-week"])]),_:3},16,["visible","onClickOverlay","onClickCloseIcon"])):(t.openBlock(),t.createBlock(s,{key:1,type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,ref:"calendarRef","confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"show-today":e.showToday,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","confirm-text","start-text","end-text","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","show-title","show-sub-title","to-date-animation","show-today","first-day-of-week"]))}const Wn=te(Nf,[["render",Bf]]),fr={modelValue:{type:[String,Date,Array],default:null},rangeSeparator:{type:String,default:"-"},valueFormat:{type:String,default:"YYYY-MM-DD"},format:{type:String,default:"YYYY-MM-DD"},showWeek:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},fo=(e,n)=>{let a;return He(e)?a=e:typeof e=="string"&&ve(e)>0?a=le.parser(e,n):a=new Date,a},ct=(e,n,a)=>(He(n)||(n=new Date),le.format(n,a)),ut=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=le.date2Str(e),r=le.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function Vf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...me,...ye,...ln,...fr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=t.computed(()=>i.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),d=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},m=(D,z="one",P="YYYY-MM-DD")=>{if(Cf(D)){d();return}if(v.value&&Array.isArray(D)&&D.length==2){let O,Y;typeof D[0]=="string"?(O=fo(D[0],P),Y=fo(D[1],P)):(O=D[0],Y=D[1]);let J=ut(O),oe=ut(Y);(b.startDate===null||b.startDate.getTime()!==O.getTime()||b.endDate?.getTime()!==Y.getTime())&&(b.startDate=O,b.startArray=J,b.endDate=Y,b.endArray=oe)}else{let O;typeof D=="string"?O=fo(D,P):O=D;let Y=ut(O);(b.startDate===null||b.startDate.getTime()!==O.getTime())&&(b.startDate=O,b.startArray=Y)}};m(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,D=>{m(D,i.type,i.valueFormat),u("setValue",D)});const g=t.computed(()=>{if(b.startDate===null)return"";if(v.value){let D=ct(i,b.startDate,i.format),z=ct(i,b.endDate,i.format);return`${D} ${i.rangeSeparator} ${z}`}else{let D=ct(i,b.startDate,i.format);return i.showWeek&&(D=`${D} ${b.startArray[4]}`),D}}),S=t.computed(()=>{if(b.startDate===null)return null;if(v.value){let D=le.date2Str(b.startDate),z=le.date2Str(b.endDate??new Date);return[D,z]}else return le.date2Str(b.startDate)}),N="fox-input-item",C=t.computed(()=>({[N]:!0,"is-disabled":f.value,"is-readonly":p.value})),w=Ve(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const D={};return w.value&&(D["text-align"]=w.value),D}),V=t.ref(!1),T=()=>{p.value||f.value||(V.value=!0)},A=D=>{V.value=D},x=D=>{if(D){if(v.value&&Array.isArray(D)){let z=D[0],P=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(P,O-1,Y),oe=D[1];P=fe(oe[0]),O=fe(oe[1]),Y=fe(oe[2]);let K=new Date(P,O-1,Y);if(b.startDate=J,b.startArray=ut(J),b.endDate=K,b.endArray=ut(K),i.valueFormat){let H=ct(i,J,i.valueFormat),X=ct(i,K,i.valueFormat);u("update:modelValue",[H,X],{})}else u("update:modelValue",[J,K],{})}else{let z=D,P=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(P,O-1,Y);if(b.startDate=J,b.startArray=ut(J),i.valueFormat){let oe=ct(i,J,i.valueFormat);u("update:modelValue",oe,{})}else u("update:modelValue",J,{})}u("change",D,{})}},M=D=>{let P=D.target.value;y.value=!0,u("focus",P,D)},$=D=>{setTimeout(()=>{y.value=!1},0);let P=D.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),u("blur",P,D)},E=t.computed(()=>({[`${N}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),F=t.computed(()=>ve(i.unit)>0),I=t.computed(()=>ve(i.unit)>0&&!y.value),j=t.computed(()=>({hidden:!I.value})),U=D=>{d(),u("update:modelValue",null,D),u("change","",D),u("clear","")},Z=t.computed(()=>i.clearable&&!f.value&&!p.value),_=t.computed(()=>{let D=ve(g.value)>0;return i.clearable&&D&&y.value}),W=D=>{_.value?U(D):T()},q=t.computed(()=>_.value&&Z.value?l:r),L=t.computed(()=>({action:!0}));return()=>{const D={class:C.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:T,onFocus:M,onBlur:$};s&&(D.disabled=!0);const z=[],P=t.h("input",D);z.push(P);const O=[],Y={class:["action-icon"]},J=t.h(q.value,Y),oe={class:L.value,onClick:W},K=t.h("view",oe,{default:()=>[J]});if(O.push(K),F.value){const ke=t.h("view",{class:j.value},[i.unit]);O.push(ke)}const H={class:E.value},X=t.h("view",H,{default:()=>O});z.push(X);const R={default:()=>z};R.label=c.slots.default,R.prepend=c.slots.prepend,R.append=c.slots.append,R.fixedPreTip=c.slots.fixedPreTip,R.fixedTip=c.slots.fixedTip;const Q=be(i,ln);Q.visible=V.value,Q["onUpdate:visible"]=A,Q["default-value"]=S.value,Q.onChoose=x;const ee={};if(c.slots.btn){const ke=c.slots.btn();ee.btn=()=>ke}c.slots.day&&(ee.day=c.slots.day),c.slots.topInfo&&(ee.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ee.bottomInfo=c.slots.bottomInfo);const ae=t.h(a,Q,ee);R.hide=()=>[ae];const re=Nt(i,ln,fr);return t.h(o,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:Af,create:Tf,scope:$f}=G("calendar-item"),cl=Tf(Vf(Af,$f,Wn,we,{CloseIcon:ne.CircleClose,MarkIcon:ne.Date},!1)),Ef={readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shape:{type:String,default:"round"},label:{type:[String,Number,Boolean],default:""},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}};function xf(e,{CheckNormal:n,Checked:a}){return{props:{...Ef},setup(o,{emit:l,slots:r}){const s=t.inject("parent",null),i=Dn(),c=t.computed(()=>s.label.value===o.label),f=t.computed(()=>s.position),p=()=>{const v=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const b=ce(o.iconSize),d=o.checkedIcon??i.radio.Checked??a;return v.push("fox-radio__icon"),o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h(d,{width:b,height:b,class:v})}}else{if(r.icon)return r.icon();{const b=ce(o.iconSize),d=o.icon??i.radio.CheckNormal??n;return v.push("fox-radio__icon--unchecked"),o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h(d,{width:b,height:b,class:v})}}},u=()=>{const v=[`${e}__label`];return o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h("view",{class:v},r.default?.())},h=()=>{const v=[`${e}__button`];return c.value&&v.push(`${e}__button--active`),o.disabled&&v.push("is-disabled"),o.readonly&&v.push("is-readonly"),t.h("view",{class:v},r.default?.())},k=()=>{c.value||o.disabled||o.readonly||s.updateValue(o.label)},y=f.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${y?`${e}--reverse`:""}`,onClick:k},[o.shape=="button"?h():y?[u(),p()]:[p(),u()]])}}}const{componentName:Df,create:If}=G("radio"),Yn=If(xf(Df,{CheckNormal:ne.CheckNormal,Checked:ne.CheckChecked})),{componentName:mr,create:qf}=G("radio-group"),Xn=qf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=Bt(),o=l=>a("update:modelValue",l);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:o}),t.watch(()=>e.modelValue,l=>a("change",l)),()=>{const l={};return e.textAlign&&(l["text-align"]=e.textAlign),t.h("view",{class:`${mr} ${mr}--${e.direction}`,style:l},n.default?.())}}});function pr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(an(e,r)===a)return l}else if(o==="item"){if(qe(a,r))return l}else if(Lt(e,r)===a)return l}return-1}function an(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Lt(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Mf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Pf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Lf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function zf(){const e=t.getCurrentInstance();return new Lf(e.proxy)}function Ff(e){return{text:e,value:e}}const hr={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Rf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Of={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Number,String,Object],default:""}};function Kf(e,n,a,o,l){return{props:{...me,...ye,...hr,...Rf,...Of},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ae(t.computed(()=>r.readonly)),c=Te(t.computed(()=>r.disabled)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return c.value}},r.prop??s.attrs.name),u=zf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([d,m])=>{if(d){const g=await u.load("radio",d,m);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(w=>Ff(w));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});let k=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([d,m])=>{k.value=pr(r,m,d,r.valueType),p("setValue",d)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(k.value===-1)return null;const d=h.value[k.value];return Lt(r,d)}),v=d=>{let m=null,g=null;if(h.value.length>0){let S=pr(r,h.value,d,"value");k.value=S,S>=0&&(g=h.value[S],r.valueType==="text"?m=an(r,g):r.valueType==="item"?m=g:m=Lt(r,g))}else m=d;p("update:modelValue",m),p("change",m,g)},b=()=>{let d=null,m=null;if(h.value.length>0&&k.value!==-1){let g=h.value[k.value];r.valueType==="text"?d=an(r,g):r.valueType==="item"?d=g:d=Lt(r,g)}p("update:modelValue",d),p("change",d,m)};if(De({clear(){k.value!==-1&&(k.value=-1,b())}}),r.source){const d=()=>{const m=[],g=be(r,hr);return h.value.forEach((S,N)=>{const C=Lt(r,S),w=Mf(r,S);let B={...g,label:C,disabled:w};const V=Pf(r,S,N);B={...B,...V},c.value&&(B.disabled=!0),i.value&&(B.readonly=!0);const T={};if(s.slots.icon&&(T.icon=s.slots.icon),s.slots.checkedIcon&&(T.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const x=s.slots.text(S);T.default=()=>[x]}else{const x=an(r,S);T.default=()=>x}let A=t.h(l,B,T);m.push(A)}),m};return()=>{const m=d(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":v},S=t.h(o,g,{default:()=>m}),N={default:()=>S};N.label=s.slots.default,N.prepend=s.slots.prepend,N.append=s.slots.append,N.fixedPreTip=s.slots.fixedPreTip,N.fixedTip=s.slots.fixedTip;const C=be(r,ye,me);return t.h(a,{...C,prop:`${r.prop}_item`},N)}}else return()=>{const d=s.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"update:modelValue":v},{default:()=>d})}}}}const{componentName:Uf,create:Hf,scope:jf}=G("radio-item"),ul=Hf(Kf(Uf,jf,we,Xn,Yn)),Wf=(e,{CheckNormal:n,Checked:a,Indeterminate:o})=>({props:{modelValue:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},textPosition:{type:String,default:"right"},icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},label:{type:[String,Number,Boolean],default:""},indeterminate:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["change","update:modelValue"],setup(l,{slots:r}){const{emitEvent:s}=Bt(),i=Dn(),c=t.inject("parent",null),f=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,g=>{f.partialSelect=g});const p=t.computed(()=>!!c),u=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),h=t.computed(()=>p.value?c.position:l.textPosition);let k="";const y=(g,S)=>{k="click",s("update:modelValue",g),s("change",g,S)};t.watch(()=>l.modelValue,g=>{k=="click"?k="":s("change",g)});const v=()=>{const g=[];if(f.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const S=ce(l.iconSize),N=l.indeterminateIcon??i.checkbox.Indeterminate??o;return g.push("fox-checkbox__icon--indeterminate"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(N,{width:S,height:S,class:g})}}else if(u.value){if(r.checkedIcon)return r.checkedIcon();{const S=ce(l.iconSize),N=l.checkedIcon??i.checkbox.Checked??a;return g.push("fox-checkbox__icon"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(N,{width:S,height:S,class:g})}}else{if(r.icon)return r.icon();{const S=ce(l.iconSize),N=l.icon??i.checkbox.CheckNormal??n;return g.push("fox-checkbox__icon--unchecked"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(N,{width:S,height:S,class:g})}}},b=()=>{const g=[`${e}__label`];return l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},d=()=>{const g=[`${e}__button`];return u.value&&g.push(`${e}__button--active`),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},m=g=>{if(!(l.disabled||l.readonly)){if(u.value&&f.partialSelect){f.partialSelect=!1,y(u.value,r.default?.()[0].children);return}if(y(!u.value,r.default?.()[0].children),p.value){const S=c.value.value,N=c.max.value,{label:C}=l,w=S.indexOf(C);w>-1?S.splice(w,1):w<=-1&&(S.length<N||!N)&&S.push(C),c.updateValue(S)}}};return t.onMounted(()=>{p.value&&c.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{p.value&&c.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${h.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?d():[v(),b()]])}}),{componentName:Yf,create:Xf}=G("checkbox"),Qn=Xf(Wf(Yf,{CheckNormal:ne.CheckNormal,Checked:ne.Checked,Indeterminate:ne.CheckDisabled})),{create:Qf,componentName:gr}=G("checkbox-group"),Gn=Qf({props:{modelValue:{type:Array,default:()=>[]},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=Bt(),o=t.reactive({children:[]}),l=f=>{f.proxy&&o.children.push(f.proxy)},r=f=>{f.proxy&&(o.children=o.children.filter(p=>p!==f.proxy))},s=f=>{a("update:modelValue",f),a("change",f)},i=f=>{const p=[];f&&o.children.forEach(u=>{u?.disabled||p.push(u?.label)}),a("update:modelValue",p)},c=()=>{const f=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",f)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:s,link:l,unlink:r}),t.watch(()=>e.modelValue,f=>{a("change",f)}),De({toggleAll:i,toggleReverse:c}),()=>{const f={};return e.textAlign&&(f["text-align"]=e.textAlign),t.h("view",{class:`${gr} ${gr}--${e.direction}`,style:f},n.default?.())}}});function yr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(qo(e,r)===a)return l}else if(o==="item"){if(qe(a,r))return l}else if(rn(e,r)===a)return l}return-1}function qo(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function rn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Gf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Zf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Jf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function _f(){const e=t.getCurrentInstance();return new Jf(e.proxy)}function em(e){return{text:e,value:e}}const tm={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},vr={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},nm={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Array,String],default:[]}};function om(e,n,a,o,l){return{props:{...me,...ye,...tm,...vr,...nm},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Te(t.computed(()=>r.disabled)),c=Ae(t.computed(()=>r.readonly)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return i.value}},r.prop??s.attrs.name),u=_f(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([d,m])=>{if(d){const g=await u.load("checkbox",d,m);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(w=>em(w));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});const k=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([d,m])=>{const g=[];Array.isArray(d)&&d.forEach(S=>{let N=yr(r,m,S,r.valueType);N!==-1&&g.push(N)}),!qe(g,k.value)&&(k.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let d=[];return k.value.forEach(m=>{let g=h.value[m];d.push(rn(r,g))}),d}),v=d=>{let m=[],g=[];if(h.value.length>0){const S=[];Array.isArray(d)&&d.forEach(N=>{let C=yr(r,h.value,N,"value");C!==-1&&S.push(C);const w=h.value[C];g.push(w),r.valueType==="text"?m.push(qo(r,w)):r.valueType==="item"?m.push(w):m.push(rn(r,w))}),k.value=S}else m=d;p("update:modelValue",m),p("change",m,g)},b=t.ref();if(De({toggleAll:d=>{b.value.toggleAll(d)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const d=()=>{const m=[],g=be(r,vr);return h.value.forEach((S,N)=>{const C=rn(r,S),w=Gf(r,S);let B={...g,label:C,disabled:w};const V=Zf(r,S,N);B={...B,...V},i.value&&(B.disabled=!0),c.value&&(B.readonly=!0);const T={};if(s.slots.icon&&(T.icon=s.slots.icon),s.slots.checkedIcon&&(T.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(T.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const x=s.slots.text(S);T.default=()=>[x]}else{const x=qo(r,S);T.default=()=>x}let A=t.h(l,B,T);m.push(A)}),m};return()=>{const m=d(),g={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":v},S=t.h(o,g,{default:()=>m}),N={default:()=>S};N.label=s.slots.default,N.prepend=s.slots.prepend,N.append=s.slots.append,N.fixedPreTip=s.slots.fixedPreTip,N.fixedTip=s.slots.fixedTip;const C=be(r,ye,me);return t.h(a,{...C,prop:`${r.prop}_item`},N)}}else return()=>{const d=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":v},{default:()=>d})}}}}const{componentName:lm,create:am,scope:rm}=G("checkbox-item"),dl=am(om(lm,rm,we,Gn,Qn)),Mo={modelValue:{type:[String,Boolean,Number],default:!1},disabled:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[String,Number,Boolean],default:!0},inactiveValue:{type:[String,Number,Boolean],default:!1},loading:{type:Boolean,default:!1},name:{type:String,default:"loading1"},size:{type:[String,Number],default:"12px"},color:{type:String,default:""}},{componentName:sm,create:im}=G("switch"),cm=im({components:{Loading1:ne.Loading1},props:{...Mo},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=sm;return{[i]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${i}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const s=i=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,i)};return t.watch(()=>e.modelValue,i=>{r=="click"?r="":n("change",i)}),{classes:o,style:l,isActive:a,onClick:s}}}),um={class:"fox-switch-button"};function dm(e,n,a,o,l,r){const s=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...i)=>e.onClick&&e.onClick(...i)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",um,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(s,{name:"loading",color:e.activeColor},null,8,["color"])]):t.createCommentVNode("",!0),e.activeText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label open"},t.toDisplayString(e.activeText),513),[[t.vShow,e.isActive]]),t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label close"},t.toDisplayString(e.inactiveText),513),[[t.vShow,!e.isActive]])],64)):t.createCommentVNode("",!0)])],6)}const Zn=te(cm,[["render",dm]]);function fm(e,n,a,o){return{props:{...me,...ye,...Mo},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=Ie(l,"modelValue",null,c),u=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const k={...be(l,Mo),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":u},y=[],v=t.h(o,k);y.push(v);const b={default:()=>y};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const d=be(l,ye,me);return d["content-class"]=f,t.h(a,{...d,prop:`${l.prop}_item`},b)}}}}const{componentName:mm,create:pm,scope:hm}=G("switch-item"),fl=pm(fm(mm,hm,we,Zn));function gm(e,n,a,o){return{props:{...me,...ye,placeholder:{type:String,default:""},textAlign:{type:String},modelValue:{type:[String],required:!1},desc:{type:[String],required:!1},icon:{type:[Object],required:!1},iconSize:{type:[String],required:!1,default:""}},emits:["click","focus","blur","change"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=se.useFoxI18n(n),p=f(l,["placeholder"]),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,x=>{u.value=x,c("change",x)});const h=t.computed(()=>({[`${e}`]:!0})),k=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!s.value&&ue(u.value),"is-disabled":s.value,"is-readonly":i.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),v=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),b=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),d=t.computed(()=>ue(u.value)?p.placeholder.value:u.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),S=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),N=()=>{c("focus",u.value)},C=()=>{c("blur",u.value)},w=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),B=t.computed(()=>ve(l.unit)>0),V=x=>{s.value==!0||i.value==!0||c("click")},T=t.computed(()=>l.icon??a),A=t.computed(()=>({action:!0}));return()=>{const x=[];if(typeof r.slots.content=="function"){const q=r.slots.content();x.push(q)}else{const q=[];if(b.value){const z={tabIndex:0,class:k.value,style:v.value,onFocus:N,onBlur:C};let P=null;r.slots.main?P=t.h("view",z,[r.slots.main(d.value)]):P=t.h("view",z,[d.value]),q.push(P)}if(m.value){const z={tabIndex:0,class:g.value,style:S.value,onFocus:N,onBlur:C};let P=null;r.slots.sub?P=t.h("view",z,[r.slots.sub(l.desc)]):P=t.h("view",z,[l.desc]),q.push(P)}const L={class:h.value,onClick:V},D=t.h("view",L,q);x.push(D)}const M=[],$=ce(l.iconSize);let E=r.slots.icon;if(!E){const q={width:$,height:$,class:["action-icon"]};E=t.h(T.value,q)}const F={class:A.value,onClick:V},I=t.h("view",F,{default:()=>[E]});if(M.push(I),B.value){const q=t.h("view",{},[l.unit]);M.push(q)}const j={class:w.value},U=t.h("view",j,{default:()=>M});x.push(U);const Z={default:()=>x};Z.label=r.slots.default,Z.prepend=r.slots.prepend,Z.append=r.slots.append,Z.fixedPreTip=r.slots.fixedPreTip,Z.fixedTip=r.slots.fixedTip;const _=be(l,ye,me);return t.h(o,{..._,prop:`${l.prop}_item`},Z)}}}}const{componentName:ym,create:vm,scope:bm}=G("link-item"),ml=vm(gm(ym,bm,ne.ArrowRight,we)),Po={count:{type:[String,Number],default:5},modelValue:{type:[String,Number],default:0},customIcon:{type:Object},size:{type:[String,Number],default:void 0},activeColor:{type:String,default:""},voidColor:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},touchable:{type:Boolean,default:!0},spacing:{type:[String,Number],default:void 0}},{create:km,componentName:Sm}=G("rate"),Cm=km({props:{...Po},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[Sm]:!0})),r=k=>{n("update:modelValue",k),n("change",k)},s=(k,y)=>{if(e.disabled||e.readonly)return;let v=0;y===1&&e.modelValue===y||(v=y,e.allowHalf&&k==2&&(v-=.5)),r(v)},i=(k,y,v)=>{let b=0;for(let d=y.value.length-1;d>=0;d--){const m=y.value[d];if(k>m.offsetLeft){v?b=d+(k>m.offsetLeft+m.clientWidth/2?1:.5):b=d+1;break}}return b},c=_e(),f={onTouchStart(k){!e.touchable||e.readonly||c.start(k)},onTouchMove(k){e.touchable&&(c.move(k),c.isHorizontal()&&o.value&&(k.preventDefault(),r(i(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),u=t.computed(()=>e.customIcon??ne.StarFillN);return{classes:l,...f,onClick:s,toPxDesc:ge,renderIcon:(k,y)=>t.h(k,y),rateRefs:o,refRandomId:p,slots:a,customIcon:u}}}),wm=["id"],Nm={class:"fox-rate-item__icon--full"},Bm={key:0,class:"fox-rate-item__icon--half"},Vm={key:1,class:"fox-rate-item__icon--half"};function Am(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),s=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:s,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+s,style:t.normalizeStyle(s<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Nm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||s>e.modelValue}]),onClick:i=>e.onClick(1,s)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>s?(t.openBlock(),t.createElementBlock("view",Bm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<s?(t.openBlock(),t.createElementBlock("view",Vm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:e.voidColor})),{class:"fox-rate-item__icon fox-rate-item__icon--disabled",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,wm))),128))],34)}const kt=te(Cm,[["render",Am]]);function Tm(e,n,a,o){return{props:{...me,...ye,...Po},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=Ie(l,"modelValue",null,c),u=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const k={...be(l,Po),disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":u},y=[],v=t.h(o,k);y.push(v);const b={default:()=>y};if(r.slots.default){const g=r.slots.default();b.label=()=>g}const d=be(l,ye,me);return d["content-class"]=f,t.h(a,d,b)}}}}const{componentName:$m,create:Em,scope:xm}=G("rate-item"),pl=Em(Tm($m,xm,we,kt)),Dm=/scroll|auto|overlay/i,Ds=window;function Im(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Lo(e,n=Ds){let a=e;for(;a&&a!==n&&Im(a);){const{overflowY:o}=window.getComputedStyle(a);if(Dm.test(o))return a;a=a.parentNode}return n}function Is(e,n=Ds){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=Lo(e.value,n))}),a}const qs=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,qm={modelValue:{type:[Boolean],default:!1},hasMore:{type:[Boolean],default:!0},threshold:{type:[Number],default:200},loadText:{type:[String]},loadMoreText:{type:[String]},useCapture:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1}};function Mm(e,n,a){return{props:{...qm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["pullText","loadText","loadMoreText"]),c=t.ref(),f=Is(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),u=t.computed(()=>({[e]:!0})),h=m=>m?m.offsetTop+h(m.offsetParent):0,k=()=>{let m=0,g=0,S="down";if(f.value==window){const N=qs();c.value&&(m=h(c.value)+c.value.offsetHeight-N-window.innerHeight),g=N}else{const{scrollHeight:N,clientHeight:C,scrollTop:w}=f.value;m=N-C-w,g=w}return p.beforeScrollTop>g?S="up":S="down",p.beforeScrollTop=g,l("scroll-change",g),m<=o.threshold&&S=="down"},y=()=>{Xe(()=>{if(!k()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},v=()=>{f.value&&f.value.addEventListener("scroll",y,o.useCapture)},b=()=>{f.value&&f.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{v(),o.immediate&&y()}),t.onUnmounted(()=>{b()});const d=t.ref(!1);return t.onActivated(()=>{d.value&&(d.value=!1,v())}),t.onDeactivated(()=>{d.value=!0,b()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},g=t.h("view",m,[r?.default?.()]),S=[];if(p.isInfiniting){let B=r?.loading?.()??null;if(!B){let A=r?.loadingIcon?.()??null;if(!A){const $={class:["fox-infinite__bottom-box__img"]};A=t.h(a,$)}const x={class:"fox-infinite__bottom-box__text"},M=t.h("view",x,[i.loadText.value]);B=[A,M]}const V={class:"fox-infinite__bottom-box"},T=t.h("view",V,B);S.push(T)}else if(!o.hasMore){let B=r?.finished?.()??null;if(!B){const V={class:"fox-infinite__bottom-tips"};B=t.h("view",V,[i.loadMoreText.value]),S.push(B)}}const N={class:"fox-infinite__bottom"},C=t.h("view",N,S),w={class:u.value,ref:c};return t.h("view",w,[g,C])}}}}const{componentName:Pm,create:Lm,scope:zm}=G("infinite-loading"),Jn=Lm(Mm(Pm,zm,ne.Loading)),{componentName:Fm,create:Rm}=G("button"),Om=Rm({components:{Loading:ne.Loading},props:{color:String,shape:{type:String,default:"round"},plain:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:n,slots:a}){const{type:o,size:l,shape:r,disabled:s,loading:i,color:c,plain:f,block:p}=t.toRefs(e),u=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=Fm;return{[y]:!0,[`${y}--${o.value}`]:o.value,[`${y}--${l.value}`]:l.value,[`${y}--${r.value}`]:r.value,[`${y}--plain`]:f.value,[`${y}--block`]:p.value,[`${y}--disabled`]:s.value,[`${y}--loading`]:i.value}}),k=t.computed(()=>{const y={};return c?.value&&(f.value?(y.color=c.value,y.background="#fff",c.value?.includes("gradient")||(y.borderColor=c.value)):(y.color="#fff",y.background=c.value)),y});return{handleClick:u,classes:h,getStyle:k}}}),Km={class:"fox-button__wrap"};function Um(e,n,a,o,l,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.createElementVNode("view",Km,[e.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-icon-loading"})):t.createCommentVNode("",!0),e.$slots.icon&&!e.loading?t.renderSlot(e.$slots,"icon",{key:1}):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass({"fox-button__text":e.$slots.icon||e.loading})},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)])],6)}const Pe=te(Om,[["render",Um]]),Hm={modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},label:{type:String,default:""},shape:{type:String,default:"round"},maxLength:{type:[String,Number],default:"9999"},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Object},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},autoblur:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},jm=(e,n,a)=>({props:{...Hm},emits:["change","update:modelValue","blur","focus","clear","search","click-input","keyup-input","click-left-icon","click-right-icon"],setup(o,{slots:l}){const{emitEvent:r}=Bt(),{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["placeholder"]),c=t.reactive({active:!1}),f=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),u=V=>{let A=V.target.value;o.maxLength&&A.length>Number(o.maxLength)&&(A=A.slice(0,Number(o.maxLength))),r("update:modelValue",A,V),r("change",A,V)},h=t.ref({}),k=V=>{let A=V.target.value;c.active=!0,h.value=o.focusStyle,r("focus",A,V)},y=V=>{setTimeout(()=>{c.active=!1},0);let A=V.target.value;o.maxLength&&A.length>Number(o.maxLength)&&(A=A.slice(0,Number(o.maxLength))),h.value={},r("blur",A,V)},v=V=>{r("update:modelValue","",V),r("change","",V),r("clear","")},b=t.computed(()=>String(o.modelValue).length>0),d=t.computed(()=>{const V={};return b.value||(V.display="none"),V}),m=V=>{o.autoblur&&w.value?.blur(),(typeof V.cancelable!="boolean"||V.cancelable)&&V.preventDefault(),r("search",o.modelValue)},g=V=>{r("keyup-input",V)},S=V=>{r("click-input",V)},N=V=>{r("click-left-icon",o.modelValue,V)},C=t.computed(()=>({textAlign:o.inputAlign})),w=t.ref(null);t.onMounted(()=>{o.autofocus&&w.value.focus()});const B=()=>{const V=[];if(l.leftin){const F={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:N},I=t.h("view",F,[l.leftin()]);V.push(I)}const T={class:`${e}__input-inner-input`,ref:w,style:C.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:S,onInput:u,onFocus:k,onBlur:y,onkeyup:g},A=t.h("input",T),x={class:[`${e}__input-inner`],action:"#",onSubmit:m},M=t.h("form",x,[A]);V.push(M);const $=[];if(o.clearable){const F={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:d.value,onClick:v},I=l?.clear?.()??o.clearIcon??a,j=t.h("view",F,[t.h(I)]);$.push(j)}if(l.rightin){const F={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},I=t.h("view",F,[l.rightin()]);$.push(I)}if($.length>0){const F={class:`${e}__input-inner-right`},I=t.h("view",F,$);V.push(I)}const E={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",E,V)};return()=>{const V=[];if(o.label){const x={class:`${e}__search-label`},M=t.h("span",x,[o.label]);V.push(M)}if(l.leftout){const x={class:[`${e}__search-icon`,`${e}__left-search-icon`]},M=t.h("view",x,[l.leftout()]);V.push(M)}const T=B();if(V.push(T),l.rightout){const x={class:[`${e}__search-icon`,`${e}__right-search-icon`]},M=t.h("view",x,[l.rightout()]);V.push(M)}const A={class:`${e}`,style:f.value};return t.h("view",A,V)}}}),{componentName:Wm,create:Ym,scope:Xm}=G("searchbar"),_n=Ym(jm(Wm,Xm,ne.CircleClose)),sn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,String,Object],default(){return[]}},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},textPosition:{type:[String],required:!1},source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},subTextKey:{type:String,required:!1,default:"subText"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number]},pageSize:{type:[Number],required:!1,default:10},optionsHeight:{type:[String],required:!1},multiple:{type:[Boolean]},position:{type:[String],default:"bottom"},closeOnClickOverlay:{type:[Boolean],default:!0},title:{type:[String]},confirmText:{type:[String]},loadText:{type:[String]},loadMoreText:{type:[String]},isAutoBackFill:{type:[Boolean]},showHeader:{type:[Boolean],default:!0},showFooter:{type:[Boolean],default:!0},showSearchbar:{type:[Boolean],default:!0},searchKey:{type:String,required:!1,default:"keyword"},seachPlaceholder:{type:String,required:!1},searchDelayTriggerClear:{type:Number,default:250},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0},beforeMethod:{type:Function},beforeClose:{type:Function}};function Qm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(cn(e,r)===a)return l}else if(o==="item"){if(qe(a,r))return l}else if(Ms(e,r)===a)return l}return-1}function cn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function br(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Ms(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Gm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Zm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Jm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,s,i){if(Array.isArray(a)){let f=a;typeof i=="function"&&(f=f.filter(i));let p=(o-1)*l,u=p+l;u>f.length&&(u=f.length);const h=f.slice(p,u);return{totalSize:f.length,page:h}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,s]);const c=Je(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(Ee(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function _m(){const e=t.getCurrentInstance();return new Jm(e.proxy)}function ep(e,n,a,o,l,r,s,i,c,f,p){return{props:{...sn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(u,{slots:h}){const{emitEvent:k}=Bt(),{toLocaleRefs:y}=se.useFoxI18n(n),v=y(u,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),b=_m(),d=t.ref([]),m=t.ref(0),g=t.ref(""),S=t.shallowRef(null),N=t.computed(()=>{const K={};return u.params&&Object.assign(K,u.params),ue(g.value)||(K[`${u.searchKey}`]=g.value),S.value&&Object.assign(K,S.value),K});let C=!0;const w=async(K,H,X)=>{try{if(V.value===!1)return;let R=null;ue(g.value)||(R=ee=>{const ae=cn(u,ee);if(typeof ae=="string"&&ae.includes(g.value))return!0;const re=br(u,ee);return!!(typeof re=="string"&&re.includes(g.value))});const Q=await b.load("actionsheet",K,H,X,N.value,C,R??void 0);C=!1,Array.isArray(Q)?(d.value=Q,m.value=1,V.value=!1):!Array.isArray(Q.page)||Q.page.length===0?(console.warn("[FoxUI] can not load more data"),V.value=!1):(Reflect.apply([].push,d.value,Q.page),m.value=Math.ceil(d.value.length/u.pageSize),(Q.totalSize&&d.value.length>=Q.totalSize||X<Q.page.length)&&(V.value=!1)),B.value=!1}catch(R){console.error("[FoxUI] ActionSheet load more data fail",R),V.value=!0,m.value=0,d.value=[]}setTimeout(()=>{k("loaded-data")},250)},B=t.ref(!1),V=t.ref(!0),T=async()=>{if(!u.source){B.value=!1;return}await w(u.source,m.value+1,u.pageSize)};let A=null;t.watch(g,(K,H)=>{A&&(clearTimeout(A),A=null),ue(K)&&!ue(H)&&(A=setTimeout(()=>{M()},u.searchDelayTriggerClear))});const x=()=>{V.value=!0,m.value=0,d.value=[],u.source&&T()},M=()=>{x()};t.watch([()=>u.source,()=>u.pageSize,()=>u.params],async([K,H,X])=>{u.source&&x()},{immediate:!0});const $=t.computed(()=>!u.multiple&&u.isAutoBackFill),E=t.ref([]);let F=null;const I=t.ref(u.visible);t.watch(()=>u.visible,K=>{I.value!==K&&(I.value=K),K?F=[...E.value]:F=null});const j=(K,H)=>{const X=[];return Array.isArray(K)||(K=[K]),K.forEach(R=>{let Q=Qm(u,H,R,u.valueType);Q!==-1&&X.push(Q)}),qe(X,E.value)?!1:(E.value=X,!0)};t.watch([()=>u.modelValue,()=>d.value],([K,H],[X,R])=>{if(j(K,H)){const ee=U();Z(ee)}},{deep:!0});const U=()=>{const K=[],H=[],X=[];for(let ae of E.value){const re=d.value[ae];H.push(re);const pe=cn(u,re);if(X.push(pe),u.valueType==="item")K.push(re);else if(u.valueType==="text")K.push(pe);else{const ke=Ms(u,re);K.push(ke)}}let R=null,Q=null,ee=null;return u.multiple?(R=K,Q=X,ee=H):(R=K[0]??null,Q=X[0]??null,ee=H[0]??null),{value:R,text:Q,item:ee}},Z=K=>{k("update:modelValue",K.value),k("update:text",K.text),k("change",K.value,K.item,K.text)},_=()=>{F&&(E.value=F)},W=K=>{const H=E.value.indexOf(K);u.multiple?H===-1?E.value.push(K):E.value.splice(H,1):H===-1?E.value=[K]:E.value=[],($.value||!u.poppable&&!u.showFooter)&&D()},q=K=>{I.value=K,k("update:visible",K)},L=()=>{const K=()=>{_(),q(!1)},H=u.beforeMethod??u.beforeClose;if(typeof H=="function"){const X=H("close");gt(X)?X.then(R=>{R!==!1&&K()}).catch(()=>{K()}):X!==!1&&K()}else K()},D=()=>{const K=U(),H=()=>{Z(K),q(!1)},X=u.beforeMethod??u.beforeClose;if(typeof X=="function"){const R=X("confirm",K.value,K.item,K.text);gt(R)?R.then(Q=>{Q!==!1&&H()}).catch(()=>{H()}):R!==!1&&H()}else H()},z=()=>{let K=v.title.value??"";h.title&&(K=h.title());const H=t.h("view",{class:["fox-actionsheet__header-title"]},[K]),X=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:L});return t.h("view",{class:["fox-actionsheet__header"]},[H,X])},P=()=>{let K=null;if(h.search)K=h.search();else{const H={onSearch:x,placeholder:v.seachPlaceholder.value,disabled:u.disabled,modelValue:g.value,"onUpdate:modelValue":X=>{g.value=X}};K=t.h(r,H,{leftin:()=>t.h(f)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[K])},O=(K,H,X,R,Q)=>{if(h.optionLabel)return h.optionLabel({text:K,checked:H,disabled:X,subText:R,item:Q});const ee=[],ae=t.h("view",{class:"fox-actionsheet__list-item-text"},[K]);if(ee.push(ae),R){const re=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[R]);ee.push(re)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ee)},Y=(K,H,X,R)=>{if(h.optionIcon)return h.optionIcon({checked:K,disabled:H,iconSize:X,item:R});if(K){if(h.checkedIcon)return h.checkedIcon({disabled:H,item:R});{const Q=u.checkedIcon??i;return t.h(Q,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}else{if(h.icon)return h.icon({disabled:H,item:R});{const Q=u.icon??s;return t.h(Q,{width:X,height:X,class:["fox-actionsheet__list-item-icon"]})}}},J=()=>{const K=[];for(let H=0;H<d.value.length;H++){const X=d.value[H],R=cn(u,X),Q=br(u,X),ee=["fox-actionsheet__list-item"],ae={};let re=Gm(u,X),pe=u.iconSize?ce(u.iconSize):null;const ke=Zm(u,X,H);ke&&(re=re||ke.disabled,ke.class&&ee.push(ke.class),ke.style&&Object.assign(ae,ke.style)),re=!!(u.disabled||re);const Oe=E.value.includes(H);re&&ee.push("is-disabled"),Oe&&ee.push("is-checked");const no={class:ee,style:ae,key:`${H}`,onClick:()=>{re||W(H)}};let Tt=[];if(h.option)Tt.push(h.option({item:X,checked:Oe,disabled:re}));else{const Hs=O(R,Oe,re,Q,X);Tt.push(Hs);const js=Y(Oe,re,pe,X);Tt.push(js),u.textPosition==="right"&&Tt.reverse()}const Us=t.h("view",no,Tt);K.push(Us)}return K},oe=()=>{let K=[];if(h.buttons)K=h.buttons();else{const X=t.h(l,{type:"primary",block:"block",onClick:D,disabled:u.disabled},{default:()=>v.confirmText.value});K.push(X)}return t.h("view",{class:"fox-actionsheet__footer"},[K])};return De({search:async(K=null,H=!0)=>{S.value=K&&t.toRaw(K),t.triggerRef(S),H&&(V.value=!0,m.value=0,d.value=[]),t.nextTick(()=>{T()})},clear:()=>{V.value=!0,m.value=0,d.value=[]},confirm:()=>{D()},cancel:()=>{L()}}),()=>{const K=[];if(u.showHeader){const pe=z();K.push(pe)}if(u.showSearchbar){const pe=P();K.push(pe)}let H=null;if(h.content)H=h.content();else{const pe=J(),ke={hasMore:V.value,loadText:v.loadText.value,loadMoreText:v.loadMoreText.value,modelValue:B.value,"onUpdate:modelValue":Oe=>{B.value=Oe},onLoadMore:T};H=t.h(o,ke,{default:()=>pe})}const X={};u.optionsHeight&&(X.height=u.optionsHeight);const R={"fox-actionsheet__list":!0};u.poppable||(R["fox-actionsheet__list--inner"]=!0);const Q=t.h("view",{class:R,style:X},[H]);if(K.push(Q),u.showFooter&&!$.value){const pe=oe();K.push(pe)}const ee=t.h("view",{class:"fox-actionsheet"},K);if(!u.poppable)return ee;const ae=["fox-actionsheet__popup"];u.popClass&&ae.push(u.popClass);const re={popClass:ae.join(" "),visible:I.value,closeable:!1,"onUpdate:visible":q,position:u.position,round:"round",onClickOverlay:L,closeOnClickOverlay:u.closeOnClickOverlay};return t.h(a,re,{default:()=>ee})}}}}const{componentName:tp,create:np,scope:op}=G("actionsheet-pane"),eo=np(ep(tp,op,de,Jn,Pe,_n,ne.CheckNormal,ne.Checked,ne.Close,ne.Search2)),kr={type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},actionSheetClass:{type:String},separator:{type:[String],required:!1,defualt:" "}};function lp(e,n,a,o,l,r,s){return{props:{...me,...ye,...kr,...sn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Te(t.computed(()=>i.disabled)),p=Ae(t.computed(()=>i.readonly)),{emitEvent:u}=Be({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Ie(i,"modelValue",null,u),b=t.ref(""),d=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),S=Ve(t.computed(()=>i.textAlign),"textAlign"),N=t.computed(()=>{const D={};return S.value&&(D["text-align"]=S.value),D}),C=t.ref(!1),w=()=>{C.value=!0},B=D=>{C.value=D},V=D=>{v.value=D,u("update:modelValue",D)},T=(D,z)=>{u("change",D,z)},A=D=>{let P=D.target.value;y.value=!0,u("focus",P,D)},x=D=>{setTimeout(()=>{y.value=!1},0);let P=D.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),u("blur",P,D)},M=D=>{b.value=D,u("update:text",D)},$=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),E=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),I=t.computed(()=>({hidden:!F.value})),j=D=>{v.value="",u("update:modelValue","",D),u("change","",D),u("clear","")},U=t.computed(()=>i.clearable&&!f.value&&!p.value),Z=t.computed(()=>ve(v.value)>0&&y.value),_=D=>{Z.value?j(D):w()},W=t.computed(()=>Z.value&&U.value?o:l),q=t.computed(()=>({action:!0})),L=t.ref(null);return De({search:D=>{L.value&&L.value.search(D)},clear:()=>{L.value&&L.value.clear},confirm:D=>{L.value&&L.value.confirm()},cancel:()=>{L.value&&L.value.cancel()}}),()=>{const D={class:g.value,style:N.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:w,onFocus:A,onBlur:x};s&&(D.disabled=!0);const z=[],P=t.h("input",D);z.push(P);const O=[],Y={class:["action-icon"]},J=t.h(W.value,Y),oe={class:q.value,onClick:_},K=t.h("view",oe,{default:()=>[J]});if(O.push(K),E.value){const ke=t.h("view",{class:I.value},[i.unit]);O.push(ke)}const H={class:$.value},X=t.h("view",H,{default:()=>O});z.push(X);const R={default:()=>z};R.label=c.slots.default,R.prepend=c.slots.prepend,R.append=c.slots.append,R.fixedPreTip=c.slots.fixedPreTip,R.fixedTip=c.slots.fixedTip;const Q=be(i,sn);Q.ref=L,Q.class=i.actionsheetProps,Q.disabled=f.value||p.value,Q.visible=C.value,Q["onUpdate:visible"]=B,Q.modelValue=v.value,Q["onUpdate:modelValue"]=V,Q.text=b.value,Q["onUpdate:text"]=M,Q.onChange=T,Q.poppable=!0,Q["text-position"]=i.textPosition;const ee={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},ae=t.h(r,Q,ee);R.hide=()=>[ae];const re=Nt(i,kr,sn);return t.h(a,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:ap,create:rp,scope:sp}=G("actionsheet-item"),hl=rp(lp(ap,sp,we,ne.CircleClose,ne.ArrowRight,eo)),zo={modelValue:{type:[Number,String],default:0},inputWidth:{type:[Number,String],default:""},buttonSize:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:9999},step:{type:[Number,String],default:1},decimalPlaces:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{componentName:ip,create:cp}=G("input-number"),up=cp({components:{Minus:ne.Minus,Plus:ne.Plus},props:{...zo},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const k=ip;return{[k]:!0,[`${k}--disabled`]:e.disabled}}),o=k=>Number(k).toFixed(Number(e.decimalPlaces)),l=k=>{const y=k.target;n("update:modelValue",y.valueAsNumber,k)},r=(k,y)=>{let v=o(k);n("update:modelValue",v,y),n("change",v,y)},s=(k=Number(e.modelValue))=>k<Number(e.max)&&!e.disabled,i=(k=Number(e.modelValue))=>k>Number(e.min)&&!e.disabled,c=k=>{if(n("reduce",k),i()){let y=Number(e.modelValue)-Number(e.step);r(y,k)}else n("overlimit",k,"reduce")},f=k=>{if(n("add",k),s()){let y=Number(e.modelValue)+Number(e.step);r(y,k)}else n("overlimit",k,"add")},p=k=>{e.disabled||e.readonly||n("focus",k)},u=k=>{if(e.disabled||e.readonly)return;let v=k.target.valueAsNumber;v<Number(e.min)?v=Number(e.min):v>Number(e.max)&&(v=Number(e.max)),r(v,k),n("blur",k)},h=k=>{let y=Number(k);return y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),y};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const k=h(e.modelValue);k!==Number(e.modelValue)&&r(k,{})}),{classes:a,change:l,blur:u,focus:p,add:f,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),dp=["min","max","disabled","readonly","value"];function fp(e,n,a,o,l,r){const s=t.resolveComponent("Minus"),i=t.resolveComponent("Plus");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__left",{"fox-input-number__icon--disabled":!e.reduceAllow()}]),onClick:n[0]||(n[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2),t.createElementVNode("input",{type:"number",min:e.min,max:e.max,style:t.normalizeStyle({width:e.toPxDesc(e.inputWidth),height:e.toPxDesc(e.buttonSize)}),disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[1]||(n[1]=(...c)=>e.change&&e.change(...c)),onBlur:n[2]||(n[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:n[3]||(n[3]=(...c)=>e.focus&&e.focus(...c))},null,44,dp),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:n[4]||(n[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(i,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const Ze=te(up,[["render",fp]]);function mp(e,n,a,o){return{props:{...me,...ye,...zo},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Te(t.computed(()=>l.disabled)),i=Ae(t.computed(()=>l.readonly)),{emitEvent:c}=Be({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!s.value&&!i.value}},l.prop??r.attrs.name),f=e,p=Ie(l,"modelValue",null,c),u=y=>{p.value=y,c("update:modelValue",y,{}),c("change",y,{})},h=y=>{c("add",y)},k=y=>{c("reduce",y)};return()=>{const y={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},v=be(l,zo),d={...r.attrs,...v,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":u,onAdd:h,onReduce:k},m=t.h(o,d,y),g=[];g.push(m);const S={default:()=>g};S.label=r.slots.default,S.fixedPreTip=r.slots.fixedPreTip,S.fixedTip=r.slots.fixedTip;const N=be(l,ye,me);return N["content-class"]=f,t.h(a,{...N,prop:`${l.prop}_item`},S)}}}}const{componentName:pp,create:hp,scope:gp}=G("inputnumber-item"),gl=hp(mp(pp,gp,we,Ze)),yp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},align:{type:[String]},modelValue:{type:[Number,Boolean,String]},disabled:{type:[Boolean,String],required:!1},data:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},visibleKey:{type:String,required:!1,default:"visible"},statusKey:{type:String,required:!1,default:"status"},doitKey:{type:String,required:!1,default:"doit"},labelKey:{type:String,required:!1,default:"label"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[String]},iconSize:{type:[String,Number]},markIcon:{type:[String]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function vp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Sr(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Cr(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function bp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function mo(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function wr(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Nr(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function po(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let kp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await Reflect.apply(a,null,[o]);const l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function Sp(){const e=t.getCurrentInstance();return new kp(e.proxy)}function Cp(e,n,a,o){return{props:{...yp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=Sp(),f=t.ref([]),p=t.computed(()=>f.value.filter(q=>bp(l,q)!==!1)),u=t.ref(-1),h=()=>{const q=l.modelValue,L=p.value.findIndex(D=>Sr(l,D)===q);u.value!==L&&(u.value=L,l.scroll&&_(L,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const k=q=>u.value===q,y=q=>{if(q<0&&q>=p.value.length)return!1;const L=p.value[q],z=(po(l,L,q)??{}).status??mo(l,L);return k(q)||z},v=t.computed(()=>{const q={[i]:!0};return l.mode?q[`is-${l.mode}`]=!0:l.direction&&(q[`is-${l.direction}`]=!0),l.scroll&&(q["is-scroll"]=!0),q}),b=t.computed(()=>({})),d=(q,L,D,z,P)=>{const O={[`${i}__step`]:!0};return P&&(O[`${P}`]=!0),O[`${m.value}`]=!0,z&&(O["is-doit"]=!0),q===u.value?O["is-active"]=!0:L==="done"?O["is-done"]=!0:L==="error"?O["is-error"]=!0:L==="half"?O["is-half"]=!0:D?O["is-disabled"]=!0:O["is-normal"]=!0,O},m=t.computed(()=>{if(l.mode==="simple")return"start";let q=l.align;return q||(l.direction==="vertical"?q="start":q="center"),q}),g=(q,L={})=>{const D={...L};return m.value==="start"&&q===p.value.length-1?D.flex="0 0 auto":l.step?l.direction==="vertical"?D.height=l.step:D.width=l.step:D.flex="1 1 100%",D},S=(q,L)=>{let D={};if(L<p.value.length-1){const z=L+1;y(L)&&y(z)?l.direction==="vertical"?D.height="100%":D.width="100%":D.opacity="0"}return D},N=q=>p.value.length-1===q,C=(q,L)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&L>u.value||u.value===L)return;const D=u.value,z=L;u.value=L,l.scroll&&_(L,!1);const P=Sr(l,q);s("update:modelValue",P);const O={fromIndex:D,currentIndex:z,item:q,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",P,O)},w=t.ref(!0),B=async(q,L)=>{try{const D=await c.load("stesbar",q,L);Array.isArray(D)&&(f.value=D),w.value=!1}catch(D){console.error("[FoxUI] Load StepsBar Data Fail",D),f.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([q,L])=>{q&&B(q,L)},{immediate:!0});const V=(q,L,D,z,P)=>{let O=null;if(r.icon)O=r.icon({item:q,index:L,status:z});else if(z==="done"){const J={};l.iconSize&&(J.width=l.iconSize,J.height=l.iconSize);const oe=l.icon??a;O=t.h(oe,J)}else{const J=D??`${L+1}`;O=t.h("span",{},[J])}const Y={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:q,index:L}),!P&&C(q,L)}};return t.h("view",Y,[O])},T=(q,L,D)=>{const z=t.h("i",{class:"fox-steps-bar__line-inner",style:S(q,L)});return t.h("view",{class:"fox-steps-bar__line"},[z])},A=()=>{let q=null;if(r.markIcon)q=r.markIcon();else{const D={};l.iconSize&&(D.width=l.markIconSize,D.height=l.markIconSize);const z=l.markIcon??o;q=t.h(z,D)}return t.h("view",{class:"fox-steps-bar__mark"},[q])},x=(q,L,D,z,P)=>{const O=[];if(!N(L)){const oe=T(q,L);O.push(oe)}const Y=V(q,L,D,z,P);O.push(Y);const J={class:"fox-steps-bar__head"};return t.h("view",J,O)},M=(q,L,D,z)=>{let P=null;r.main?P=r.main({item:q,index:L,status:D}):P=vp(l,q);const O={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:q,index:L}),!z&&C(q,L)}};return t.h("view",O,[P])},$=(q,L,D)=>{let z=null;if(r.sub){z=r.sub({item:q,index:L,status:D});const P={class:"fox-steps-bar__sub"};return t.h("view",P,[z])}return null},E=(q,L)=>{const D=po(l,q,L)??{},z=D.status??mo(l,q);let P=Cr(l,q);D.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const O=D.label??Nr(l,q),Y=[],J=V(q,L,O,z,P);J&&Y.push(J);const oe=M(q,L,z,P);if(oe&&Y.push(oe),!N(L)){const ee=T(q,L);ee&&Y.push(ee)}const K=t.h("view",{class:"fox-steps-bar__head"},Y),H=D.class,X=D.style??{};let R=wr(l,q);D.doit===!0&&(R=!0);const Q={ref:Z(L),class:d(L,z,P,R,H),style:g(L,X)};return t.h("view",Q,[K])},F=(q,L)=>{const D=po(l,q,L)??{},z=D.status??mo(l,q);let P=Cr(l,q);D.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const O=D.label??Nr(l,q),Y=[],J=l.layout;for(let R of J)if(R==="head"){const Q=x(q,L,O,z,P);Y.push(Q)}else if(R==="main"){const Q=M(q,L,z,P);Y.push(Q)}else if(R==="sub"){const Q=$(q,L,z);Y.push(Q)}else if(R==="mark"){const Q=A();Y.push(Q)}const oe=D.class,K=D.style??{};let H=wr(l,q);D.doit===!0&&(H=!0);const X={ref:Z(L),class:d(L,z,P,H,oe),style:g(L,K)};return t.h("view",X,Y)},I=t.ref(),j=t.ref([]),U=(q,L)=>{j.value[L]=q},Z=q=>L=>{U(L,q)},_=(q,L)=>{const D=I.value,z=j.value;if(!D||!z||!z[q])return;const P=z[q];let O=0;l.direction==="vertical"?O=P.offsetTop-(D.offsetHeight-P.offsetHeight)/2:O=P.offsetLeft-(D.offsetWidth-P.offsetWidth)/2,W(D,O,L?0:.3,l.direction)},W=(q,L,D,z)=>{let P=0;const O=z==="horizontal"?q.scrollLeft:q.scrollTop,Y=D===0?1:Math.round(D*1e3/16);function J(){z==="horizontal"?q.scrollLeft+=(L-O)/Y:q.scrollTop+=(L-O)/Y,++P<Y&&Ke(J)}J()};return()=>{const q=[];if(l.mode==="simple")for(let D=0;D<p.value.length;D++){const z=p.value[D],P=E(z,D);q.push(P)}else for(let D=0;D<p.value.length;D++){const z=p.value[D],P=F(z,D);q.push(P)}const L={ref:I,class:v.value,style:b.value};return t.h("view",L,q)}}}}const{componentName:wp,create:Np,scope:Bp}=G("steps-bar"),yl=Np(Cp(wp,Bp,ne.Checklist,ne.ArrowRight));function Vp(e){e.stopPropagation()}class Ap{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(n,a){this.startMove=n,this.updateMove=a,this.isTouch=ol()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=ll(),o=(l,r,s,i)=>{this.updateMove({x:l,y:r})};this.touchstart=l=>{this.moving||(a.start(l),this.startMove({x:a.state.startX,y:a.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=l=>{this.moving&&(a.move(l),Vp(l),o(a.state.deltaX,a.state.deltaY))},this.touchend=()=>{o(a.state.deltaX,a.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),a.reset(),this.moving=!1},this.els.forEach(l=>{this.touchstart&&l.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(n=>{this.touchstart&&n.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function Tp(e,n){return new Ap(e,n)}const $p={customClass:{type:[String]},top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},borderRadius:{type:[String]},draggable:{type:[Boolean]}},Ep=(e,n,a,o=!1)=>({props:{...$p},emits:["click"],setup(l,{slots:r,emit:s}){const i=t.reactive({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),c=t.computed(()=>{const m=[`${e}`];return l.customClass&&m.push(l.customClass),m}),f=t.computed(()=>{const m={};return ue(i.top)||(m.top=i.top),ue(i.right)||(m.right=i.right),ue(i.bottom)||(m.bottom=i.bottom),ue(i.left)||(m.left=i.left),ue(l.width)||(m.width=l.width),ue(l.height)||(m.height=l.height),ue(l.color)||(m.color=l.color),ue(l.background)||(m.background=l.background),ue(l.borderRadius)||(m["border-radius"]=l.borderRadius),m}),p=t.computed(()=>({[`${e}__icon`]:!0})),u=()=>{s("click")},h=t.ref(null),k=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},y={x:0,y:0},d=Tp(m=>{if(!h.value)return;const g=h.value;k(),i.left=g.offsetLeft,i.top=g.offsetTop,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`,g.style.right=null,g.style.bottom=null,y.x=i.left,y.y=i.top},m=>{if(!h.value)return;const g=h.value;k(),i.left=y.x+m.x,i.top=y.y+m.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const m=[h.value];d.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&d.close()}),()=>{let m=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)m=g;else{const N=t.h(a,{class:p.value});m.push(N)}const S={ref:N=>{h.value=N},class:c.value,style:f.value,onClick:u};return t.h("view",S,m)}}}),{componentName:xp,create:Dp,scope:Ip}=G("floating-button"),vl=Dp(Ep(xp,Ip,ne.Uploader,!1)),qp={modelValue:{type:[Boolean],requried:!0},type:{type:[String],requried:!1,default:""},disabled:{type:[Boolean,String],requried:!1},textPosition:{type:[String],requried:!1},collapseText:{type:[String],requried:!1,default:"收起"},expandText:{type:[String],requried:!1,default:"更多"},icon:{type:[Object],requried:!1}};function Mp(e,n,a){return{props:{...qp},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const u={[`${e}`]:!0};return o.disabled?u[`${e}--disabled`]=!0:u[`${e}--${o.type}`]=!0,u}),s=Ie(o,"modelValue"),i=t.computed(()=>s.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),f=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!s.value,"is-collapse":s.value})),p=()=>{l("update:modelValue",!s.value)};return()=>{const u=[];if(i.value){const b={class:c.value},d=t.h("span",b,[i.value]);u.push(d)}const h={class:f.value},k=o.icon??a,y=t.h(k,h);return u.push(y),o.textPosition==="right"&&u.reverse(),t.h("view",{class:r.value,onClick:p},u)}}}}const{componentName:Pp,create:Lp,scope:zp}=G("more-button"),bl=Lp(Mp(Pp,zp,ne.RectUp)),Fp={width:{type:[String,Number]},height:{type:[String,Number]},type:{type:[String],required:!1,default:"info"},icon:{type:[String,Object],required:!1},closeIcon:{type:[String,Object],required:!1},showClose:{type:[Boolean],required:!1},title:{type:[String],required:!1},message:{type:[Array,String,Object],required:!1},showConfirmButton:{type:[Boolean],required:!1},confirmButtonText:{type:[String],required:!1},confirmText:{type:[String],required:!1},confirmButtonClass:{type:[String],required:!1},confirmButtonStyle:{type:[Object],required:!1},showCancelButton:{type:[Boolean],required:!1},cancelButtonText:{type:[String],required:!1},cancelText:{type:[String],required:!1},cancelButtonClass:{type:[String],required:!1},cancelButtonStyle:{type:[Object],required:!1},popClass:{type:[String]},position:{type:[String],default:"center"},closeOnClickOverlay:{type:[Boolean],required:!1,default:!0},unmount:{type:[Function],required:!1},callback:{type:[Function],required:!1}},Rp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Op(e,n,a){return{props:{...Fp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,f=t.ref(!0),p=S=>{f.value=S},u=S=>{if(typeof o.unmount=="function")try{o.unmount()}catch(N){console.error(N)}if(typeof o.callback=="function")try{o.callback(S)}catch(N){console.error(N)}},h=()=>{u("confirm")},k=()=>{u("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&u("close")},v=(S,N)=>Rp(S)?(N.src=S,t.h("img",N)):typeof S=="string"?(Array.isArray(N.class)?N.class.push(S):N.class&&typeof N.class=="object"?N[`${S}`]=!0:typeof N.class=="string"?N.class=`${N.class}, ${S}`:N.class=S,t.h(o.tag,N)):t.h(S,N),b=()=>{const S=[];if(o.icon){const C={class:[`${c}__header-icon`]},w=v(o.icon,C);S.push(w)}if(o.title){const C=t.h("view",{class:`${c}__header-title`},[o.title]);S.push(C)}if(o.showClose&&o.closeIcon){const C={class:[`${c}__header-close-icon`],onClick:y},w=v(o.closeIcon,C);S.push(w)}const N={class:[`${c}__header`]};return t.h("view",N,S)},d=(S,N)=>{const C=[];if(N){const B={class:`${c}__group-title`},V=t.h("view",B,[N]);C.push(V)}if(S){const B=[];Array.isArray(S)||(S=[S]);for(let V of S){const T={class:`${c}__group-row`,innerHTML:V},A=t.h("view",T);B.push(A)}if(B.length>0){const V={class:`${c}__group-rows`},T=t.h("view",V,B);C.push(T)}}if(C.length===0)return null;const w={class:`${c}__group`};return t.h("view",w,C)},m=()=>{const S=[];if(typeof o.message=="string")S.push(o.message);else if(Array.isArray(o.message))for(let C of o.message)if(typeof C=="string"){const w=d(C);S.push(w)}else{const w=d(C.content,C.title);S.push(w)}else if(typeof o.message=="function"){const C=o.message();S.push(C)}else{const C=o.message;S.push(C)}const N={class:`${c}__body`};return t.h("view",N,S)},g=()=>{const S=[];if(o.showCancelButton){const C={class:[`${c}__footer-button`],style:{},onClick:k};o.cancelButtonClass&&C.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(C.style,o.cancleButtonStyle);const w=t.h("button",C,[o.cancelButtonText??i.cancelText.value]);S.push(w)}if(o.showConfirmButton){const C={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&C.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(C.style,o.confirmButtonStyle);const w=t.h("button",C,[o.confirmButtonText??i.confirmText.value]);S.push(w)}if(S.length===0)return null;const N={class:`${c}__footer`};return t.h("view",N,S)};return()=>{const S=[],N=b();N&&S.push(N);const C=m();C&&S.push(C);const w=g();w&&S.push(w);const B={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},V=t.h("view",B,S),T=[`${c}__popup`];o.popClass&&T.push(o.popClass);const A={};o.width&&(A.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(A.height=typeof o.height=="number"?`${o.height}px`:o.height);const x={popClass:T.join(" "),style:A,visible:f.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,x,{default:()=>V})}}}}const{componentName:Kp,create:Up,scope:Hp}=G("messagebox"),jp=Up(Op(Kp,Hp,de)),Wp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M82.5121%201.93968L81.7498%206.07825C81.6498%206.6214%2081.1284%206.98064%2080.5853%206.8806C80.4326%206.85251%2080.2886%206.78925%2080.1646%206.69578L77.1586%204.43061C76.7175%204.09823%2076.6294%203.47123%2076.9618%203.03016C77.0552%202.90617%2077.1762%202.80562%2077.3153%202.73655L81.0834%200.863097C81.5779%200.617235%2082.1782%200.818843%2082.4241%201.31339C82.5204%201.50712%2082.5512%201.72688%2082.5121%201.93968Z'%20fill='%23FFD1C9'%20%3e%3c/path%3e%3cpath%20d='M3.08218%20102.2L6.53454%2094.2358C6.75419%2093.7291%207.34251%2093.4968%207.84925%2093.7164C7.99216%2093.7778%208.11815%2093.872%208.21791%2093.9909L13.2085%2099.9384C13.5635%20100.361%2013.5081%20100.992%2013.0852%20101.347C12.9665%20101.447%2012.8261%20101.518%2012.675%20101.554L4.23203%20103.571C3.69484%20103.699%203.15538%20103.367%203.02699%20102.83C2.97674%20102.62%202.99607%20102.399%203.08218%20102.2Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23FF5959'%20%3e%3c/circle%3e%3cpath%20d='M59.935%2049.6213C61.3827%2051.069%2061.3827%2053.4162%2059.935%2054.864L45.935%2068.864C44.4873%2070.3117%2042.1401%2070.3117%2040.6924%2068.864C39.2447%2067.4162%2039.2447%2065.069%2040.6924%2063.6213L54.6924%2049.6213C56.1401%2048.1736%2058.4873%2048.1736%2059.935%2049.6213Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3cpath%20d='M40.6924%2049.6213C39.2447%2051.069%2039.2447%2053.4162%2040.6924%2054.864L54.6924%2068.864C56.1401%2070.3117%2058.4873%2070.3117%2059.935%2068.864C61.3827%2067.4162%2061.3827%2065.069%2059.935%2063.6213L45.935%2049.6213C44.4873%2048.1736%2042.1401%2048.1736%2040.6924%2049.6213Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%23FFD1C9'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L102%20110L102%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Yp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cpath%20d='M8%2087L8%2095C8%2095.5523%207.55228%2096%207%2096C6.44772%2096%206%2095.5523%206%2095L6%2087L2%2087C1.44772%2087%201%2086.5523%201%2086C1%2085.4477%201.44772%2085%202%2085L6%2085L6%2082C6%2081.4477%206.44772%2081%207%2081C7.55228%2081%208%2081.4477%208%2082L8%2085L12%2085C12.5523%2085%2013%2085.4477%2013%2086C13%2086.5523%2012.5523%2087%2012%2087L8%2087Z'%20fill-rule='evenodd'%20fill='%2396CEFF'%20%3e%3c/path%3e%3cpath%20d='M89%205L89%2010C89%2010.5523%2088.5523%2011%2088%2011C87.4477%2011%2087%2010.5523%2087%2010L87%205L85%205C84.4477%205%2084%204.55228%2084%204C84%203.44772%2084.4477%203%2085%203L87%203L87%201C87%200.447715%2087.4477%200%2088%200C88.5523%200%2089%200.447715%2089%201L89%203L91%203C91.5523%203%2092%203.44772%2092%204C92%204.55228%2091.5523%205%2091%205L89%205Z'%20fill-rule='evenodd'%20fill='%23BDE2FF'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23237FFA'%20%3e%3c/circle%3e%3crect%20x='47.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%2396CEFF'%20%3e%3c/rect%3e%3crect%20x='47.5'%20y='66'%20width='7'%20height='7'%20rx='4'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3c/svg%3e",Xp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='105'%20viewBox='0%200%20102%20105'%20fill='none'%3e%3cpath%20d='M7%2076C7.55228%2076%208%2076.4477%208%2077L7.999%2079.999L12%2080C12.5523%2080%2013%2080.4477%2013%2081C13%2081.5523%2012.5523%2082%2012%2082L7.999%2081.999L8%2090C8%2090.5523%207.55228%2091%207%2091C6.44772%2091%206%2090.5523%206%2090L5.999%2081.999L2%2082C1.44772%2082%201%2081.5523%201%2081C1%2080.4477%201.44772%2080%202%2080L5.999%2079.999L6%2077C6%2076.4477%206.44772%2076%207%2076Z'%20fill='%2338D677'%20%3e%3c/path%3e%3cpath%20d='M75%201.72421e-32C75.5523%20-1.01453e-16%2076%200.447715%2076%201L76%202.999L78%203C78.5523%203%2079%203.44772%2079%204C79%204.55228%2078.5523%205%2078%205L76%204.999L76%2010C76%2010.5523%2075.5523%2011%2075%2011C74.4477%2011%2074%2010.5523%2074%2010L74%204.999L72%205C71.4477%205%2071%204.55228%2071%204C71%203.44772%2071.4477%203%2072%203L74%202.999L74%201C74%200.447715%2074.4477%201.01453e-16%2075%201.72421e-32Z'%20fill='%238BF0AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='54'%20r='28'%20fill='%2338D677'%20%3e%3c/circle%3e%3cpath%20d='M36.8787%2051.8786C38.3265%2050.4309%2040.6736%2050.4309%2042.1213%2051.8786L50.1214%2059.8786C51.5691%2061.3263%2051.5691%2063.6735%2050.1214%2065.1212C48.6737%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212L36.8787%2057.1212C35.431%2055.6735%2035.431%2053.3263%2036.8787%2051.8786Z'%20fill='%23B3F2C6'%20%3e%3c/path%3e%3cpath%20d='M64.1214%2045.8786C65.5691%2047.3263%2065.5691%2049.6735%2064.1214%2051.1212L50.1213%2065.1212C48.6736%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212C43.431%2063.6735%2043.431%2061.3263%2044.8787%2059.8786L58.8788%2045.8786C60.3265%2044.4309%2062.6737%2044.4309%2064.1214%2045.8786Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='14.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='101.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='25'%20r='7'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3c/svg%3e",Qp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='101'%20height='110'%20viewBox='0%200%20101%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M81.512%201.93968L80.7498%206.07825C80.6498%206.6214%2080.1284%206.98064%2079.5852%206.8806C79.4326%206.85251%2079.2886%206.78925%2079.1645%206.69578L76.1585%204.43061C75.7175%204.09823%2075.6293%203.47123%2075.9617%203.03016C76.0552%202.90617%2076.1761%202.80562%2076.3152%202.73655L80.0833%200.863097C80.5779%200.617235%2081.1781%200.818843%2081.424%201.31339C81.5203%201.50712%2081.5512%201.72688%2081.512%201.93968Z'%20fill='%23FEFAE0'%20%3e%3c/path%3e%3cpath%20d='M2.08224%20102.2L5.5346%2094.2358C5.75425%2093.7291%206.34257%2093.4968%206.84931%2093.7164C6.99222%2093.7778%207.11822%2093.872%207.21798%2093.9909L12.2086%2099.9384C12.5636%20100.361%2012.5082%20100.992%2012.0853%20101.347C11.9666%20101.447%2011.8261%20101.518%2011.675%20101.554L3.23209%20103.571C2.6949%20103.699%202.15544%20103.367%202.02705%20102.83C1.97681%20102.62%201.99613%20102.399%202.08224%20102.2Z'%20fill='%23FEE789'%20%3e%3c/path%3e%3ccircle%20cx='50'%20cy='59'%20r='28'%20fill='%23FAB007'%20%3e%3c/circle%3e%3crect%20x='46.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%23FEE789'%20%3e%3c/rect%3e%3crect%20x='46.5'%20y='66'%20width='7'%20height='7'%20rx='3.5'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='84.5'%20cy='106.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='94'%20cy='30'%20r='7'%20fill='%23FEE789'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L101%20110L101%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Gp=new Fn,Zp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Jp=e=>{let n=document.body,a=e.teleport;a!="body"&&(typeof a=="string"?n=document.querySelector(a):a&&(n=e.teleport));const o=document.createElement("view"),l=`messagebox-${Gp.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const s=document.querySelector(`#${l}`);s&&s.parentNode?.removeChild(s)};const r=t.createVNode(jp,e);n.appendChild(o),t.render(r,o)},ot={show:(e,n,a,o)=>{const l={...Zp};n&&!Array.isArray(n)&&typeof n=="object"?Object.assign(l,n):(n&&(l.message=n),a&&typeof a=="object"?Object.assign(l,a):(typeof a=="string"&&(l.title=a),o&&typeof o=="object"?Object.assign(l,o):typeof o=="string"&&(l.type=o)));const r=l.type??"info";return l.icon||(r==="success"?l.icon=Xp:r==="warning"?l.icon=Qp:r==="error"?l.icon=Wp:l.icon=Yp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=ne.Close),new Promise((s,i)=>{const c=l.callback;l.callback=f=>{if(typeof c=="function")try{c(f)}catch(p){console.error(p)}s({action:f})},Jp(l)})},alert:(e,n,a)=>ot.show("alert",e,n,a),confirm:(e,n,a)=>ot.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ot.alert,e.config.globalProperties.$confirm=ot.confirm}},_p=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let i in n)i==="bubbles"?l=!!n[i]:i==="cancelable"?r=!!n[i]:o[i]=n[i];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},eh=new Fn,th=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),nh=e=>`${e}-${eh.get()}`,oh=Symbol.for("InnerPageScopeKey"),lh=Symbol.for("PageWrapperKey"),ah="FoxLeave",rh="FoxLeaveEnd",sh={width:{type:[String,Number]},height:{type:[String,Number]},closeOnClickOverlay:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!0},showDelay:{type:Number,default:10},showClose:{type:Boolean,default:!0},closeIcon:{type:Object},showHeader:{type:Boolean,default:!1},popClass:{type:String},popStyle:{type:Object},position:{type:String,default:"center"},mode:{type:String}};function ih(e,n,a,o){return{props:{...Fe,...sh},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(oh,!0);const c={};t.provide(lh,c);const f=C=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{f()},u=e,h=C=>{k.value=C,i("update:visible",C)},k=t.ref(!1),y=(C,w)=>th(C)?(w.src=C,t.h("img",w)):typeof C=="string"?(Array.isArray(w.class)?w.class.push(C):w.class&&typeof w.class=="object"?w[`${C}`]=!0:typeof w.class=="string"?w.class=`${w.class}, ${C}`:w.class=C,t.h(l.tag,w)):t.h(C,w),v=()=>{if(!l.showHeader)return null;const C=[];if(s.header){const B=s.header();C.push(B)}else if(l.title){const B=t.h("view",{class:`${u}__header-title`},[l.title]);C.push(B)}if(C.length===0)return null;const w={class:[`${u}__header`]};return t.h("view",w,C)},b=()=>{if(!l.showClose)return null;const C={class:[`${u}__close-icon`],onClick:p},w=l.closeIcon??o;return y(w,C)};let d=null;const m=C=>{_p(rh,{},d)},g=nh(e),S=()=>{h(!0)},N=()=>{if(!d)return;const C=d.querySelector(".fox-overlay");C&&(C.classList.add("overlay-fade-leave-active"),C.classList.add("overlay-fade-leave-to"));const w=d.querySelector(".fox-popup");w&&(w.classList.add(`fox-popup-slide-${l.position}-leave-active`),w.classList.add(`fox-popup-slide-${l.position}-leave-to`),w.addEventListener("animationend",m,{once:!0}),w.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{d=document.querySelector(`.${g}`),d?.addEventListener(ah,N,{once:!0}),S()}),()=>{const C=[],w=v();w&&C.push(w);const B=b();B&&C.push(B);const V=s.default?s.default():[];Reflect.apply([].push,C,V);const T={[`${u}`]:!0};l.mode&&(T[`${u}--${l.mode}`]=!0);const A={class:T},x=t.h("view",A,C),M=[`${u}__popup`,g];l.popClass&&M.push(l.popClass),l.position&&M.push(`${u}__popup--${l.position}`);const $={};l.width&&($.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&($.height=typeof l.height=="number"?`${l.height}px`:l.height);const F={...be(l,Fe),popClass:M.join(" "),style:$,visible:k.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},I=t.h(a,F,{default:()=>x});return t.h("div",{class:[`${u}__root`,g]},[I])}}}}const{componentName:ch,create:uh,scope:dh}=G("popup-wrapper"),kl=uh(ih(ch,dh,de,ne.Close)),fh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function mh(e,n,a,o){return{props:{...fh},emits:["update:visible"],setup(l,{emit:r,slots:s}){const i=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const f={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":i},p=t.h(a,f,s),u={class:`${e}`};return t.h("view",u,[p])}}}}const{componentName:ph,create:hh,scope:gh}=G("dropdown"),Sl=hh(mh(ph,gh,de));function yh(e,n){const a=document.createRange();a.setStart(e,0),a.setEnd(e,e.childNodes.length);const o=a.getBoundingClientRect().width;if(o>0){n(o);return}e.classList.add("is-selectable"),setTimeout(()=>{a.setStart(e,0),a.setEnd(e,e.childNodes.length);const l=a.getBoundingClientRect().width;e.classList.remove("is-selectable"),n(l)},500)}const vh={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1},showArrow:{type:[Boolean],required:!1,default:!0},showAfter:{type:[Number],required:!1,default:300},hideAfter:{type:[Number],required:!1,default:0},type:{type:[String],required:!1},size:{type:[String],required:!1},truncated:{type:[Boolean,String],required:!1,default:!0},numberFormat:{type:[Boolean],required:!1,default:!1},decimalLength:{type:[Number,String],required:!1,default:-1},autoPadding:{type:[Boolean,String],required:!1,default:!1},digits:{type:[Number,String],required:!1,default:4},separator:{type:String,required:!1,default:" "},highlightFilter:{type:[String,Function],required:!1},mark:{type:[Boolean],required:!1},color:{type:[String],required:!1},icon:{type:[Object],required:!1},textPosition:{type:String,default:"right"},textColor:{type:String}};function bh(e,n,a,o=!1){return{props:{...vh},emits:["click"],setup(l,r){const s=t.ref(null),i=t.computed(()=>{const g={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(g[`${e}--${l.type??"default"}`]=!0),l.size&&(g[`${e}--${l.size}`]=!0),g}),c=t.computed(()=>{const g={},S=l.textColor??l.color;return S&&(g.color=S),g}),f=(g,S)=>{let N=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const C=l.highlightFilter;if(g.indexOf(C)!==-1){const B=g.replace(new RegExp(C,"g"),`<span>${C}</span>`);S.innerHTML=B,S.class["is-highlight"]=!0,N=t.h(l.tag,S)}}else if(typeof l.highlightFilter=="function"){const C=l.highlightFilter(g);C&&(S.innerHTML=C,S.class["is-highlight"]=!0,N=t.h(l.tag,S))}return N},p=g=>{r.emit("click",g)};let u="";const h=()=>{const g=s.value;if(!g)return;const S=g.clientWidth;yh(g,N=>{const C=g.innerHTML??"";ue(C)||N<S||(u?a?.show(g,C,{type:"text",id:u,showArrow:l.showArrow},!0):u=a?.show(g,C,{type:"text",showArrow:l.showArrow},!0)??"")})},k=()=>{u&&a?.hide(u)};let y=null;const v=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},b=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{k()},l.hideAfter??0)},d=()=>{const g=s.value;g&&(g.addEventListener("mouseover",v),g.addEventListener("mouseleave",b))},m=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",v),g.removeEventListener("mouseleave",b))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||d()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||m()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let S=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const V=B[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const T=fe(l.digits),A=fe(l.decimalLength),x=he(l.autoPadding);let M=`${B[0].children}`,$=M.split("").reverse().join("");$=Sn($,A,x,T,l.separator),M=$.split("").reverse().join(""),l.highlightFilter!==void 0&&(S=f(M,g)),S||(g.innerHTML=M,S=t.h(l.tag,g))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const B=r.slots.default();if(Array.isArray(B)&&B.length===1){const V=B[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const T=`${B[0].children}`;S=f(T,g),S||(g.innerHTML=T,S=t.h(l.tag,g))}}}S||(S=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return S;let C=null;if(l.icon){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const V={},T=l.color;T&&(V.color=T);const A={class:B,style:V};C=t.h("view",A,t.h(l.icon))}else if(r.slots.mark){const B={[`${e}__mark-wrap`]:!0};l.type&&(B[`${e}__mark-wrap--${l.type}`]=!0);const V={},T=l.color;T&&(V.color=T);const A={class:B,style:V};C=t.h("view",A,{default:r.slots.mark})}else{const B={[`${e}__mark`]:!0};l.type&&(B[`${e}__mark--${l.type??"default"}`]=!0);const V={},T=l.color;T&&(V["background-color"]=T);const A={class:B,style:V};C=t.h("view",A)}const w={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",w,[C,S])}}}}const{componentName:kh,create:Sh,scope:Ch}=G("text"),Cl=Sh(bh(kh,Ch,Vt,!1));function wh(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const s=[],i=n[0];if(Array.isArray(e)&&!Array.isArray(i)&&!i[l]){let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],u=c.find(h=>h[o]===p);if(!u)break;s.push(u[a])}return s}if(Array.isArray(i))for(let c=0;c<n.length&&c<r.length;c++){let f=n[c],p=r[c];const u=f.find(h=>h[o]===p);if(!u)break;s.push(u[a])}else{let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],u=c.find(h=>h[o]===p);if(!u)break;s.push(u[a]),c=u[l]}}return s}class Nh{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Je(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Bh(){const e=t.getCurrentInstance();return new Nh(e.proxy)}const Vh={tag:{type:[String,Object],required:!1,default:"span"},resolveTag:{type:[Boolean],required:!1,default:!1},source:{type:[Array,Function,String],required:!1},sourceType:{type:[String],required:!1,default:"mapping"},params:{type:[Object,String],required:!1},modelValue:{type:[String,Boolean,Number,Array],required:!1},separator:{type:[String,Boolean,Number,Array],required:!1,default:"/"},optionType:{type:String,required:!1},textKey:{type:[String],required:!1,default:"text"},valueKey:{type:[String],required:!1,default:"value"},childrenKey:{type:[String],required:!1,default:"children"},emptyText:{type:[String],required:!1},emptyTag:{type:[String],required:!1,default:"span"},emptyClass:{type:[String],required:!1}};function Ah(e,n,a=!1){return{props:{...Vh},setup(o,{attrs:l,slots:r}){const s=Bh(),i=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,u])=>{i.value=await s.load(o.sourceType,p,u)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let p=wh(o.modelValue,i.value,o.textKey,o.valueKey,o.childrenKey);return p.length==0?o.emptyText??"":p.length===1?o.optionType=="item"?`${o.modelValue}${o.separator}${p[0]}`:p[0]:p.join(o.separator)}),f=o.resolveTag?t.resolveComponent(o.tag):o.tag;return()=>{const p={...l};return r.default?r.default({text:c.value,value:o.modelValue}):o.resolveTag?o.emptyText!==void 0&&o.emptyText===c.value?t.h(o.emptyTag??"span",{...l,class:o.emptyClass},c.value):t.h(f,p,{default:()=>c.value}):t.h(f,p,c.value)}}}}const{componentName:Th,create:$h,scope:Eh}=G("mapping"),wl=$h(Ah(Th,Eh,!1));function xh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return _r(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:kV,create:Dh,scope:SV}=G("domain-provider"),Nl=Dh(xh()),Ih={initialVisibleObserverSize:{type:[Number],required:!1},initialInvisibleObserverHeight:{type:[String],required:!1,default:"250px"},disabled:{type:[Boolean],required:!1},loadPolicy:{type:[String],required:!1,default:"rolling"},rootMargin:{type:[String],required:!1,default:"250px 0px 250px 0px"},threshold:{type:[Array],required:!1,default:[0,.25]},root:{type:[Object,String]}};function qh(e,n){return{inheritAttrs:!1,props:Ih,setup(a,{slots:o}){if(it&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const s=(h,k)=>{if(p===null){r.set(h,{visible:null,callback:k});return}l.has(h)&&p.unobserve(h),l.set(h,{visible:null,callback:k}),p.observe(h)},i=h=>{if(p===null){r.delete(h);return}l.has(h)&&(l.delete(h),p.unobserve(h))};let c=a.initialVisibleObserverSize;Gi({acquire:()=>{const h=c>0;return c--,h},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:s,unobserve:i});let p=null;const u=(h,k,y)=>{p=new IntersectionObserver(v=>{for(let b of v){let d=!1;b.intersectionRatio>0&&(d=!0);const m=l.get(b.target);if(m)try{if(a.loadPolicy==="lazy"&&!d&&m.visible!==null)return;m.visible=d,m.callback(d)}catch(g){console.error(g)}}},{root:h,rootMargin:k,threshold:y}),r.forEach((v,b)=>{l.set(b,v),p?.observe(b)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([h,k])=>{if(k||!h||p)return;let y=null;typeof h=="string"?y=document.querySelector(h):y=h,y&&u(y,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:CV,create:Mh,scope:wV}=G("rolling-provider"),Bl=Mh(qh()),{componentName:Ph,create:Lh}=G("cell"),zh=Lh({components:{Right:ne.Right},props:{title:{type:String,default:""},subTitle:{type:String,default:""},desc:{type:String,default:""},descTextAlign:{type:String,default:"right"},isLink:{type:Boolean,default:!1},roundRadius:{type:[String,Number],default:""},url:{type:String,default:""},center:{type:Boolean,default:!1},size:{type:String,default:""}},emits:["click"],setup(e,{emit:n}){const a=t.computed(()=>{const r=Ph;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),o=t.computed(()=>({borderRadius:ge(e.roundRadius)}));return{handleClick:r=>{n("click",r)},classes:a,baseStyle:o}}}),Fh={key:0,class:"fox-cell__icon"},Rh={key:1,class:"fox-cell__title"},Oh={class:"title"},Kh={class:"fox-cell__title-desc"};function Uh(e,n,a,o,l,r){const s=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",Fh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Rh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Oh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Kh,t.toDisplayString(e.subTitle),1)],64)):t.renderSlot(e.$slots,"title",{key:1},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-cell__value",{"fox-cell__value--alone":!e.title&&!e.subTitle&&!e.$slots.title}]),style:t.normalizeStyle({"text-align":e.descTextAlign})},t.toDisplayString(e.desc),7)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"link",{},()=>[e.isLink?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const Vl=te(zh,[["render",Uh]]),{componentName:Hh,create:jh}=G("cell-group"),Wh=jh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Hh]:!0}))}}}),Yh={key:1,class:"fox-cell-group__title"},Xh={key:3,class:"fox-cell-group__desc"},Qh={class:"fox-cell-group__wrap"};function Gh(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.$slots.title?t.renderSlot(e.$slots,"title",{key:0}):e.title?(t.openBlock(),t.createElementBlock("view",Yh,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.$slots.desc?t.renderSlot(e.$slots,"desc",{key:2}):e.desc?(t.openBlock(),t.createElementBlock("view",Xh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Qh,[t.renderSlot(e.$slots,"default")])],2)}const Al=te(Wh,[["render",Gh]]),{componentName:Zh,create:Jh}=G("image"),_h=Jh({props:{src:String,fit:{type:String,default:"fill"},position:{type:String,default:"center"},alt:{type:String,default:""},width:{type:String,default:"center"},height:{type:String,default:""},round:{type:Boolean,default:!1},radius:[String,Number],showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},lazyLoad:{type:Boolean,default:!1}},components:{Image:ne.Image,ImageError:ne.ImageError},emits:["click","load","error"],setup(e,{emit:n}){const a=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),o=t.computed(()=>{const k=Zh;return{[k]:!0,[`${k}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const k={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(y=>{y.forEach(v=>{v.isIntersecting&&(r.value=!0,l.value.disconnect())})},k),s.value&&l.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let k={};return e.width&&(k.width=ge(e.width)),e.height&&(k.height=ge(e.height)),e.radius!==void 0&&e.radius!==null&&(k.overflow="hidden",k.borderRadius=ge(e.radius)),k}),f=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,k=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},u=()=>{a.isError=!0,a.loading=!1,n("error")},h=k=>{n("click",k)};return{...t.toRefs(a),imageClick:h,classes:o,styles:f,stylebox:c,error:u,load:p,show:r,imgRef:s}}}),eg=["src","date-src","alt"],tg={key:0,class:"fox-img-loading"},ng={key:1,class:"fox-img-error"};function og(e,n,a,o,l,r){const s=t.resolveComponent("Image"),i=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:n[2]||(n[2]=(...c)=>e.imageClick&&e.imageClick(...c))},[t.createElementVNode("img",{ref:"imgRef",class:"fox-img",src:e.lazyLoad?e.show?e.src:void 0:e.src,"date-src":e.lazyLoad?e.show?void 0:e.src:void 0,alt:e.alt,onLoad:n[0]||(n[0]=(...c)=>e.load&&e.load(...c)),onError:n[1]||(n[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,eg),e.loading?(t.openBlock(),t.createElementBlock("div",tg,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"image"})),t.renderSlot(e.$slots,"loading")])):t.createCommentVNode("",!0),e.isError&&!e.loading?(t.openBlock(),t.createElementBlock("div",ng,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const Tl=te(_h,[["render",og]]),{create:lg}=G("layout"),$l=lg({}),{componentName:ag,create:rg}=G("col"),sg=rg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=ag,a=t.inject("gutter"),o=t.computed(()=>({[n]:!0,[`${n}-gutter`]:a,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),l=t.computed(()=>({paddingLeft:a/2+"px",paddingRight:a/2+"px"}));return{classes:o,style:l}}});function ig(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const El=te(sg,[["render",ig]]),{componentName:cg,create:ug}=G("row"),dg=ug({props:{type:{type:String,default:""},gutter:{type:[String,Number],default:""},justify:{type:String,default:"start"},align:{type:String,default:"flex-start"},flexWrap:{type:String,default:"nowrap"}},setup(e){const n=cg;t.provide("gutter",e.gutter);const a=(l,r)=>l?r?`fox-row-${l}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
6
6
  ${a("",e.type)}
7
7
  ${a("justify",e.justify)}
8
8
  ${a("align",e.align)}