@fox-js/foxui 4.0.1-59 → 4.0.1-60

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 15 2024 17:18:39 GMT+0800 (中国标准时间)
2
+ * @fox-js/foxui-base v4.0.0 Thu Jun 20 2024 23:50:10 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,Hs=typeof window<"u";function js(){return typeof _t<"u"?_t.requestAnimationFrame||_t.webkitRequestAnimationFrame||function(e){_t.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function $r(e){Hs?cancelAnimationFrame(e):clearTimeout(e)}const Xe=js();/*!
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]=Ro(Ne(e),Ne(n)),a==1&&(o==1?e=no(e):n=no(n));let l=Er(e,n);return a?a==2?"-"+Ne(l):e.length<l.length?Ne(l.substring(1)):"-"+Ne(no(l)):Ne(l)}function no(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 Er(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 Ro(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 Er(e,n){[e,n]=Ro(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,La(l[1],r,o,a)?(o?"-":"")+oo(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&&La(i,s,o,a)&&(s=oo(s),s.length>n)?(o?"-":"")+oo(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function La(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 oo(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 ho(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=[],m=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>=m&&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,m--}return p=$t(Ws(p,r)),a==1&&(p="-"+p),p}function Ws(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 go(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 m=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(m==-1)e=Ne(e+new Array(l+1).join("0"));else if(l>m)e=e.replace(".",""),e=Ne(e+new Array(l-m+1).join("0"));else if(l<m){e=e.replace(".","");let p=e.length-m+l;e=Ne(e.substring(0,p)+"."+e.substring(p))}else l==m&&(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 m=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(m+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=m,i="0."+new Array(m).join("0")}for(a=a+2;r<=a;){let m=0;for(;parseInt(c)>=parseInt(n);)c=dn(c,"-"+n),m++;i+=m,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 yo(e,n){return e=e.toString(),n=n.toString(),n=vo(n),dn(e,n)}function vo(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function za(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Fa(e),Fa(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=yo(e,ho(n,Ot(go(e,n),0,Se.FLOOR)));return a+o}function Fa(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ra(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]=Ro(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),yo(n,a)}subtract(n){return new ie(yo(this.value,n.getValue()))}static multiply(n,a){return n=ie.validate(n),a=ie.validate(a),ho(n,a)}multiply(n){return new ie(ho(this.value,n.getValue()))}static divide(n,a,o){return n=ie.validate(n),a=ie.validate(a),go(n,a,o)}divide(n,a){return new ie(go(this.value,n.getValue(),a))}static modulus(n,a){return n=ie.validate(n),a=ie.validate(a),za(n,a)}modulus(n){return new ie(za(this.value,n.getValue()))}static compareTo(n,a){return n=ie.validate(n),a=ie.validate(a),Ra(n,a)}compareTo(n){return Ra(this.value,n.getValue())}static negate(n){return n=ie.validate(n),vo(n)}negate(){return new ie(vo(this.value))}}function xr(e,n){return ie.multiply(`${e}`,`${n}`)}function Oo(e,n,a=8){return ie.divide(`${e}`,`${n}`,a)}function bo(e,n){return e=`${e}`,n=`${n}`,ie.compareTo(e,n)}function Dr(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="",m=r.indexOf(".");m!=-1&&(i=r.substring(0,m),c=r.substring(m+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 Ir(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 qr(e){return e==null}const Cn=Array.isArray,Ys=e=>wn(e)==="[object Map]",Xs=e=>wn(e)==="[object Set]",He=e=>e instanceof Date,fn=e=>typeof e=="function",Mr=e=>typeof e=="string",Qs=e=>typeof e=="symbol",$e=e=>e!==null&&typeof e=="object",gt=e=>$e(e)&&fn(e.then)&&fn(e.catch),Pr=Object.prototype.toString,wn=e=>Pr.call(e),ko=e=>wn(e)==="[object Object]",Lr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Gs(e){return e.__esModule||Lr&&e[Symbol.toStringTag]==="Module"}const Zs=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 m;Array.isArray(c)?m=i&&Array.isArray(i)?i:[]:m=i&&typeof i=="object"?i:{},n[s]=lt(l,m,c)}else c!==void 0&&(n[s]=c)}}return n}function So(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)&&!ko(s))continue;r=So(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)&&!ko(s))continue;r=So(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const lo=Zs?Promise.resolve():null;function Js(e,...n){lo!==null?n&&n.length>0?lo.then(()=>{e(n)}):lo.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 _s={"[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):_s[a]||"object"}function Nn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function zr(e){return e&&typeof e=="object"&&"setInterval"in e}function Fr(e){let n=!!e&&"length"in e&&e.length,a=at(e);return a==="function"||zr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function Rr(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 ei(e,n=[]){let a=n;return e!=null&&(Fr(Object(e))?Rr(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],m=n[i];if(!qe(c,m))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 Or(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function Kr(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 Ur(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 Hr(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 Oa(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 Co(e,n=!0,a=!0){n?e=Oa(e,".",/\./g):e=e.replace(/\./g,""),a?e=Oa(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function ti(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(qe(e,a))return!0}):n.indexOf(e)}function ni(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 jr=(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 wo(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 Ko{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="*"):Or(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 Ko(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function oi(e,n,a){const o=a;if(o[Ce])return o[Ce];const l=t.inject(Ce,null),r=new Ko(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 li{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 li;function ai(e){zt=e}function ri(e){zt?Object.assign(zt,e):zt=e}function si(e,n){nt(tt).setValidator(e,n)}function ii(e){nt(tt).deleteValidator(e)}let Wr=["blur","clear"];function ci(e){Wr=e}function Yr(){return Wr}let Xr=["focus","change","setValue"];function ui(e){Xr=e}function Qr(){return Xr}function di(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 Gr{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),m=this.proxy??s;return c.validate(s,{context:m}).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=m),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 Gr(n,a,e)}const mn=Symbol.for("EventEmitterKey");class Zr{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 fi(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 mi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function Uo(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 Te=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 pi=new An;function pt(){return pi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Te]??t.inject(Te,null):t.inject(Te,null)}const ao=Symbol("OriginalDateKey");function Ho(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject(Te,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new An(i);c.parent=s;const m=k=>{r[ao]||h(k),c?.set("modelValue",k)},p=()=>c?.getForSelf("modelValue")??null,u=()=>r[ao]??null,h=k=>{const y={};lt(!0,y,t.toRaw(k)),r[ao]=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[Te]=c,t.provide(Te,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=(f,d,...g)=>Reflect.apply(y.emit,y,[f,d,...g]);const b=t.inject(Me,null),v=Vn(r,b,{componentName:""});c.validateSchema=v,r[Me]=v,t.provide(Me,v),r[dt]=new Map,r.validate=(f=!0)=>{const d=[];let g=null;const C={deep:!1};if(f===!0)g={name:"*"};else if(Array.isArray(f)&&f.length>0){const B=f;g={name:S=>S?B.indexOf(S)!==-1:!1}}else if(f!=null&&typeof f=="object"){const B=f;if(Object.assign(C,B),Array.isArray(B.include)&&B.include.length>0){const S=B.include;g={name:N=>N?S.indexOf(N)!==-1:!1}}else if(Array.isArray(B.exclude)&&B.exclude.length>0){const S=B.exclude;g={name:N=>N?S.indexOf(N)===-1:!1}}else g={name:"*"}}if(g){const B=y?.emitToChildren(g,"validate",C);B&&Reflect.apply([].push,d,B)}return d.length==1?d[0]:d.length>1?Promise.all(d).then(B=>{let S=[];return B.forEach(N=>{N.pass===!1&&Array.isArray(N.errors)&&(S=[...S,...N.errors])}),S.length>0?{pass:!1,errors:S}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(f,d=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(f).forEach(B=>{let S=String(B);const N={componentName:"",fieldName:S,pureDataValidate:!0};if(c){const V=es(c,S,N,y,v);r[dt].set(S,V);const A=f[S];A&&V.validateSchema.setRule(A)}});return}if(d){const C=Reflect.ownKeys(f),B={name:S=>C.includes(S)};y?.emitToChildren(B,"setNameValidateRules",f,!1)}},r.clearValidate=(f=!0)=>{let d=null;if(f===!0)d={name:"*"};else if(Array.isArray(f)&&f.length>0){const g=f;d={name:C=>C?g.indexOf(C)!==-1:!1}}else if(f!=null&&typeof f=="object"){const g=f;if(Array.isArray(g.include)&&g.include.length>0){const C=g.include;d={name:B=>B?C.indexOf(B)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const C=g.exclude;d={name:B=>B?C.indexOf(B)===-1:!1}}else d={name:"*"}}d&&y?.emitToChildren(d,"clearValidate",!1)},r.resetFields=f=>{const d=p();if(!d)return;const g={};if(lt(!0,g,u()??{}),Array.isArray(f))f.forEach(C=>{d[C]=g[C]});else if(f&&Array.isArray(f.include))(f.include??[]).forEach(B=>{d[B]=g[B]});else if(f&&Array.isArray(f.exclude)){let C=f.exclude??[];Reflect.ownKeys(g).forEach(B=>{C.includes(B)||(d[B]=g[B])})}else Object.assign(d,g);r.clearValidate(f)},r.setModelValue=(f,d)=>{!d||d===i?m(f):y?.emitToChildren({name:d},"setModelValue",f)},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[Te]=void 0,t.provide(Te,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 Jr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(Te,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[Te]=i,t.provide(Te,i),t.onUnmounted(()=>{i?.destroy(),l[Te]=void 0,t.provide(Te,null),i=null,l=null}),i}function _r(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 Ve(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,b,...v)=>i?Reflect.apply(i.emit,i,[y,b,...v]):null;const c=t.inject(Me,null);e.fieldName=e.fieldName??r;let m=Vn(l,c,e);l[Me]=m,t.provide(Me,m),_r(l,m,r),l.validate=(y=null)=>{if(!m)return Promise.resolve({pass:!0});const b=[];let v=!1,f=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)f=!0,v=!0;else if(y&&typeof y=="object"){const d=y,g=d.ignoreDisabled??!0,C=d.ignoreReadonly??!0,B=d.ignoreHidden??!0;g===!0&&e.disabled===!0||C===!0&&e.readonly===!0||B===!0&&Nn(l.$el)?f=!1:(Array.isArray(d.include)&&d.include.indexOf(r)!==-1||Array.isArray(d.exclude)&&d.exclude.indexOf(r),f=!0),v=d.deep??!1}else typeof y=="boolean"&&(v=y),f=!0;if(f){const d=m?.validate();b.push(d)}if(v){let d=null;const g={deep:!1};if(y===!0)d={name:"*"};else if(Array.isArray(y)&&y.length>0){const C=y;d={name:B=>B?C.indexOf(B)!==-1:!1}}else if(y!=null&&typeof y=="object"){const C=y;if(Object.assign(g,C),Array.isArray(C.include)&&C.include.length>0){const B=C.include;d={name:S=>S?B.indexOf(S)!==-1:!1}}else if(Array.isArray(C.exclude)&&C.exclude.length>0){const B=C.exclude;d={name:S=>S?B.indexOf(S)===-1:!1}}else d={name:"*"}}if(d&&i){const C=i.emitToChildren(d,"validate",g);Reflect.apply([].push,b,C)}}return b.length==1?b[0]:b.length>1?Promise.all(b).then(d=>{let g=[];return d.forEach(C=>{C.pass===!1&&Array.isArray(C.errors)&&(g=[...g,...C.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>m?.setRule(y),l.setNameValidateRules=(y,b=!1)=>{const v=y[r];if(v&&m?.setRule(v),b&&i){const f={name:d=>Reflect.ownKeys(y).includes(d)};i.emitToChildren(f,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&m?.clear();let b=null;if(y===!0)b={name:"*"};else if(Array.isArray(y)&&y.length>0){const v=y;b={name:f=>f?v.indexOf(f)!==-1:!1}}else if(y!=null&&typeof y=="object"){const v=y;if(Array.isArray(v.include)&&v.include.length>0){const f=v.include;b={name:d=>d?f.indexOf(d)!==-1:!1}}else if(Array.isArray(v.exclude)&&v.exclude.length>0){const f=v.exclude;b={name:d=>d?f.indexOf(d)===-1:!1}}else b={name:"*"}}b&&i&&i.emitToChildren(b,"clearValidate",!1)};let p=new Zr(l);l[mn]=p;const u=yt((y="validate")=>{m&&(y==="reset"?m.clear():m.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:Yr()).forEach(y=>{p&&p.on(y,b=>{u("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:Qr()).forEach(y=>{p&&p.on(y,b=>{u("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ce]=void 0,t.provide(Ce,null),i=null,m?.destroy(),l[Me]=void 0,t.provide(Me,null),m=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:m,emitEvent:(y,...b)=>{p&&Reflect.apply(p.emit,p,[y,...b])},onEvent:(y,b)=>{p&&Reflect.apply(p.on,p,[b])},offEvent:(y,b)=>{p&&Reflect.apply(p.off,p,[b])}}}function es(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 b={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const v=p;y={name:f=>f?v.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const v=p;if(Object.assign(b,v),Array.isArray(v.include)&&v.include.length>0){const f=v.include;y={name:d=>d?f.indexOf(d)!==-1:!1}}else if(Array.isArray(v.exclude)&&v.exclude.length>0){const f=v.exclude;y={name:d=>d?f.indexOf(d)===-1:!1}}else y={name:"*"}}if(y&&m){const v=m.emitToChildren(y,"validate",b);Reflect.apply([].push,u,v)}}return u.length==1?u[0]:u.length>1?Promise.all(u).then(y=>{let b=[];return y.forEach(v=>{v.pass===!1&&Array.isArray(v.errors)&&(b=[...b,...v.errors])}),b.length>0?{pass:!1,errors:b}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const u=p[s];u&&c?.setRule(u)};let m=Bn(null,o,s,r);return t.onUnmounted(()=>{c=null,m=null}),{broadcast:m,validateSchema:c}}function Bt(){let n=t.getCurrentInstance()?.proxy,a=new Zr(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 No(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 ts(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,m=e.get("footerBarHeight")??0;No(o,r,n,!0,s,i,c,m);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,b=-1,v=-1,f=0,d=0])=>{No(p,y,n,h,b,v,f,d)}),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 hi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function gi(e){return!!e.getForParent(Qe)}var yn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(yn||{});function ro(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ae(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(ro(c,o))return c}const s=e.value;return ro(s,o)?s:null}):t.computed(()=>{const r=e.value;return ro(r,o)?r:l?.get(n)})}function xe(e){return Ae(e,"readonly",0,function(a){return he(a)})}function Be(e){return Ae(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 ns=new Map,vn=new Map;let Bo=null;function yi(e){Bo=e}function os(e,n,a){if(a){let o=vn.get(a);o||(o=new Map,vn.set(a,o)),o.set(e,n)}else ns.set(e,n)}function Je(e,n,a){!a&&Bo&&(a=Bo(e)??void 0);let o=null;if(a){let l=vn.get(a);l&&(o=l.get(n))}return o||(o=ns.get(n)),o}function vi(e,n){for(let a in e){const o=e[a];os(a,o,n)}}function bi(e){vn.delete(e)}function ki(){return{top:0,left:0,bottom:0,right:0}}function Si(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 Ci(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class wi{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=Ci(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,m=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=m,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({},ki(),n.safeAreaInset),s=Si(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){yi(n)}setAPI(n,a,o){os(n,a,o)}getAPI(n,a,o){return Je(n,a,o)}batchSetAPI(n,a){vi(n,a)}clearScopeAPI(n){bi(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 Ni=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Mr(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),m=n.components;return m&&m.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},ls=(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}},as={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}},rs={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}},ss=[];for(const e in rs)ss.push(e);const Bi=Symbol.for("InnerPageScopeKey"),Vi={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}},Ai=(e,n)=>({inheritAttrs:!0,props:{...me,...as,...Vi},setup(a,{slots:o}){const l=Ho(a.name,a),r=t.inject(Bi,!1);if(l){const p=ts(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(),m=(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),b=t.toRaw(p),v=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(d=>{v.includes(d)||(b[d]=[])}),m(b)}if(u&&k){const y=t.toRaw(k),b=t.toRaw(u),v=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(d=>{v.includes(d)||(b[d]=[])}),m(b,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);m(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);m(p,!0)}}),()=>{const p={class:s.value,style:i.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:Ti,create:$i,scope:sV}=G("page"),jo=$i(Ai(Ti));function Wo(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 Ei=Symbol.for("InnerPageScopeKey"),xi=(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,default:a},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(Ei,!1),m=e,p=t.computed(()=>{const w={[m]:!0,[`${m}--border`]:l.border,[`${m}--fixed`]:l.fixed};return c||(w[`${m}--safe-area-inset-top`]=l.safeAreaInsetTop),w}),u=t.computed(()=>({[`${m}__inner`]:!0,[`${m}__inner--${l.align}`]:!0})),h=l.height!==null&&l.height!==void 0?ce(l.height):null,k=t.computed(()=>{const w={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const q=ze(l.padding??i.headerPadding);return Object.assign(w,q),h&&(i.headerHeight=h),i.headerHeight>0&&(w.height=i.headerHeight),w.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,w.safeAreaTop>0&&(w.top=w.safeAreaTop+(q.top??0),w.height&&w.height>0&&(w.height=w.height+w.safeAreaTop)),w}if(h&&(w.height=h),l.padding){const q=ze(l.padding);Object.assign(w,q)}return w}),y=t.ref(null),b=()=>{if(i&&y.value&&!Nn(y.value)){if(!o){const w=Wo(y.value);i.headerAllHeight=w.height}return i.headerMounted=!0,!0}return!1};let v=null;t.onMounted(()=>{i&&(Uo(b,50,5,50,!0),window.ResizeObserver&&y.value&&(v=new window.ResizeObserver(()=>{b()}),v.observe(y.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,v&&(v.disconnect(),v=null))});const f=t.computed(()=>{const w={};return k.value.height!==null&&k.value.height!==void 0&&(w.height=`${k.value.height}px`),k.value.top!==null&&k.value.top!==void 0&&(w.paddingTop=`${k.value.top}px`),k.value.left!==null&&k.value.left!==void 0&&(w.paddingLeft=`${k.value.left}px`),k.value.right!==null&&k.value.right!==void 0&&(w.paddingRight=`${k.value.right}px`),k.value.bottom!==null&&k.value.bottom!==void 0&&(w.paddingBottom=`${k.value.bottom}px`),w}),d=t.computed(()=>!(k.value.height!==null&&k.value.height!==void 0&&k.value.height<=0));function g(){r.emit("back")}function C(){r.emit("click-title")}function B(){r.emit("click-right")}function S(){r.emit("click-right-text")}const N=()=>{if(!l.leftShow)return null;const w=[];if(r.slots.left)w.push(r.slots.left());else{if(r.slots.leftIcon){const q=t.h("view",{class:"left-icon",onClick:g},[r.slots.leftIcon()]);w.push(q)}else if(l.leftIcon){const q=t.h("view",{class:"left-icon",onClick:g},[t.h(l.leftIcon)]);w.push(q)}if(l.leftText){const q=t.h("view",{class:"left-text",onClick:g},[l.leftText]);w.push(q)}}return w.length===0?null:t.h("view",{class:"fox-header-bar__left"},w)},V=()=>{if(!l.rightShow)return null;const w=[];if(r.slots.right)w.push(r.slots.right());else{if(l.rightText){const q=t.h("view",{class:"right-text",onClick:S},[l.rightText]);w.push(q)}if(r.slots.rightIcon){const q=t.h("view",{class:"right-icon",onClick:B},[r.slots.rightIcon()]);w.push(q)}else if(l.rightIcon){const q=t.h("view",{class:"right-icon",onClick:B},[t.h(l.rightIcon)]);w.push(q)}}return w.length===0?null:t.h("view",{class:"fox-header-bar__right"},w)},A=()=>{if(!l.titleShow)return null;const w=[],q=r.slots.default?r.slots.default():null;if(q)w.push(q);else{if(l.title){const P=t.h("view",{class:"title-text"},[l.title]);w.push(P)}if(r.slots.titleIcon){const P=t.h("view",{class:"title-icon",onClick:C},[r.slots.titleIcon()]);w.push(P)}else if(l.titleIcon){const P=t.h("view",{class:"title-icon",onClick:C},[t.h(l.titleIcon)]);w.push(P)}}return w.length===0?null:t.h("view",{class:"fox-header-bar__title"},w)},T=()=>{const w=[],q=r.slots.bottom?r.slots.bottom():null;return q&&w.push(q),w.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},w)};return()=>{if(!d.value)return null;const w=[];if(r.slots.all)w.push(r.slots.all());else{const P=[],E=N();E&&P.push(E);const $=A();$&&P.push($);const F=V();if(F&&P.push(F),P.length>0){const j=t.h("view",{class:u.value},P);w.push(j)}const D=T();D&&w.push(D)}if(w.length===0)return null;const q={class:p.value,style:f.value,ref:y};return t.h("view",q,w)}}}),{componentName:Di,create:Ii,scope:qi}=G("header-bar"),Yo=Ii(xi(Di,qi,ne.Left,!1)),Mi=Symbol.for("InnerPageScopeKey");function Pi(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(Mi,!1),c=e,m=t.computed(()=>{const v={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(v[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),v}),p=o.height!==null&&o.height!==void 0?ce(o.height):null,u=t.computed(()=>{const v={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const f=ze(o.padding??s.footerPadding);return Object.assign(v,f),p&&(s.footerHeight=p),s.footerHeight>0&&(v.height=s.footerHeight),v.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,v.safeAreaBottom>0&&(v.bottom=v.safeAreaBottom+(f.bottom??0),v.height&&v.height>0&&(v.height=v.height+v.safeAreaBottom)),v}if(p&&(v.height=p),o.padding){const f=ze(o.padding);Object.assign(v,f)}return v}),h=t.ref(null),k=()=>{if(s&&h.value&&!Nn(h.value)){if(!a){const v=Wo(h.value);s.footerAllHeight=v.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(Uo(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 b=t.computed(()=>{const v={};return u.value.height!==null&&u.value.height!==void 0&&(v.height=ge(u.value.height)),u.value.top!==null&&u.value.top!==void 0&&(v.paddingTop=ge(u.value.top)),u.value.left!==null&&u.value.left!==void 0&&(v.paddingLeft=ge(u.value.left)),u.value.right!==null&&u.value.right!==void 0&&(v.paddingRight=ge(u.value.right)),u.value.bottom!==null&&u.value.bottom!==void 0&&(v.paddingBottom=ge(u.value.bottom)),v});return()=>{const v=l.slots.default?l.slots.default():[],f={ref:h,class:m.value,style:b.value};return t.h("view",f,v)}}}}const{componentName:Li,create:zi,scope:Fi}=G("footer-bar"),Xo=zi(Pi(Li,Fi,!1));function Ri(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 m={};if(o&&r){if(a.padding){const f=ze(a.padding);Object.assign(r.contentPadding,f)}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),m.height=h;let k=(r&&r.contentPadding&&r.contentPadding.top)??-1;(k>=0||p>0)&&(k=k<0?0:k,m.paddingTop=`${p+k}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||u>0)&&(y=y<0?0:y,m.paddingBottom=`${u+y}px`);const b=(r&&r.contentPadding&&r.contentPadding.left)??-1;b>=0&&(m.paddingLeft=`${b}px`);const v=(r&&r.contentPadding&&r.contentPadding.right)??-1;return v>=0&&(m.paddingRight=`${v}px`),m}if(a.padding){const p=ze(a.padding);p.left&&(m.paddingLeft=`${p.left}px`),p.top&&(m.paddingTop=`${p.top}px`),p.right&&(m.paddingRight=`${p.right}px`),p.bottom&&(m.paddingBottom=`${p.bottom}px`)}return m}),i=t.ref(null),c=yt(()=>{if(r&&i.value){const m=xn(i.value);r.contentInnerHeight=m.height,r.contentInnerWidth=m.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>s.value,()=>l.value],([])=>{c()}),{contentRef:i,classes:l,styles:s}}}}const{componentName:Oi,create:Ki,scope:iV}=G("content"),Ui=Ki(Ri(Oi));function Hi(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},Qo=te(Ui,[["render",Hi]]),vt="GroupStateKey",is=Symbol.for("GroupScopeKey");function Dn(){return t.inject(is,!1)}function In(e=!0){t.provide(is,e)}function ji(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];qr(l)||(e[o]=l)})}function Wi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};ji(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(vt,r),r}function so(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(vt);if(!c)return;const m=e.get("groupLayout")??{};a===-1&&(a=m.column??1),o===-1&&(o=m.gutter??0),r||(r=m.minItemWidth??-1),s||(s=m.maxItemWidth??-1);const p=ce(r),u=ce(s);i||(i=m.type??"grid");const h=()=>{const k=n===""||n===-1,y=ce(n);let b=fe(a);const v=ce(o);if(!k){let g=(y-(b-1)*v)/b;for(;u!==-1&&g>u;)b++,g=(y-(b-1)*v)/b;for(;p!==-1&&b>1&&g<p;)b--,g=(y-(b-1)*v)/b}let f=!1;const d=c.layout;d.value.width=n,d.value.column!==b&&(d.value.column=b,f=!0),d.value.gutter!==v&&(d.value.gutter=v,f=!0),d.value.type!==i&&(d.value.type=i,f=!0),f&&t.triggerRef(d)};if(l)h();else{const k=++c.passport;setTimeout(()=>{k===c.passport&&h()},50)}}function qn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.layout}function Mn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.order}function Ka(e,n=1){if(n==="stretch")return-1;const a=fe(n);return a===-1?100:100*a/e}function Pn(e,n,a=1,o=0,l){const r={};let s=0;l?s=ce(l):s=Ka(n.column,a),s>0&&(r.width=`${s}%`);const i=Ka(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 Ln(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,m=c+(n.column-c);return e.index=e.index+(m-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 cs=Symbol("RollingStateKey");function Yi(e){t.provide(cs,e)}function Xi(){return t.inject(cs,null)}function Vo(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 Qi(e){let n=Vo(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=Vo(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Gi(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const Zi={...me,...as,...rs};function Ji(e,n,a){return{props:Zi,emits:["update:collapse","header-click"],setup(o,l){const r=Ho(o.name,o,ss),s=Wi(r,{type:o.type}),i=Dn();In(!0);const c=o.rollingDisplay?Xi():null,m=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),u=t.computed(()=>i&&r?qn(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,b=t.computed(()=>{const K={};if(K.height=$.value,o.width)o.width!=="auto"&&(K.width=ge(o.width));else{const H=i?Mn(r,!0):null;if(u.value&&H){if(u.value.type==="grid"){const X=Ln(H,u.value,o.span,o.offset);Object.assign(K,X)}else if(u.value.type==="flow"){const X=Pn(H,u.value,o.span,o.offset,o.width);Object.assign(K,X)}}}return K}),v=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}}),f=t.computed(()=>{if(s.layout.value.type==="grid"){let H="";if(o.columnWidth)H=`repeat(auto-fill, ${o.columnWidth})`;else{const X=Gi(V.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}}}),d=t.toRef(o,"gutter"),g=t.toRef(o,"column"),C=t.computed(()=>i||p.value?!0:he(o.isWrap)),B=[],S=K=>{B.push(K)},N=()=>{let K=B.length;B.splice(0,K)},V=t.ref(-1),A=K=>{const H=xn(K).width;H>0&&H!==V.value&&(V.value=H)};so(r,V.value,g.value,d.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([V,g,d],([K,H,X])=>{s.order.index=0,so(r,K,H,X,!1,o.minItemWidth,o.maxItemWidth,o.type)});const T=t.computed(()=>F.value?o.expandText??"":o.collapseText??""),w=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),q=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!F.value,"is-collapse":F.value})),P=t.ref(),E=t.ref(),$=t.computed(()=>D.value||ge(o.height)||""),F=t.ref(!1),D=t.ref(""),j=t.ref(!1);let U=-1;const Z=(K,H=!0)=>{const X=P.value;if(X&&F.value!==K){if(U=U<=0?Qi(X):U,j.value=!0,H)if(X.style["will-change"]="height",X.ontransitionend=function(){X.ontransitionend=null,this.style["will-change"]="auto",K||(D.value="",j.value=!1)},K){let R=0;o.collapseHeight?R=o.collapseHeight:E.value&&E.value.classList.contains(`${e}__header`)&&(R=E.value.offsetHeight),D.value=`${U}px`,t.nextTick(()=>{D.value=`${R}px`})}else D.value=`${U}px`;else if(K){let R=0;o.collapseHeight?R=o.collapseHeight:E.value&&E.value.classList.contains(`${e}__header`)&&(R=E.value.offsetHeight),D.value=`${R}px`}else j.value=!1,D.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=()=>{I()},I=K=>{K=K??!F.value,Z(K)};De({toggleCollapse:I,doLayout:()=>{B[0]&&(A(B[0]),so(r,V.value,g.value,d.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let x=null,z=!0;const M=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(B)&&B.length>0)){const H=B[0];A(H),window.ResizeObserver&&(x=new window.ResizeObserver(()=>{A(H)}),x.observe(H))}},O=()=>{x?.disconnect(),x=null},Y=!p.value||c?.acquire();Y&&(m.value=p.value?!0:null),t.onMounted(()=>{if(Y&&(M(z),z=!1),p.value&&c){let K=null,H=c.initialHeight;c.observe(P.value,X=>{if(X!==m.value)if(X)m.value=!0,F.value||(D.value=""),K=setTimeout(()=>{K=null,m.value!==!1&&(M(z),z=!1)},100);else{if(K!==null&&clearTimeout(K),m.value=!1,!F.value)if(z)D.value=c.initialHeight;else{let R=Vo(P.value);R<=0?D.value=H:(D.value=`${R}px`,H=D.value)}z||O()}})}}),t.onUnmounted(()=>{x?.disconnect(),c&&c.unobserve(P.value)});const J=(K="right")=>{const H=[];if(T.value){const ee={class:w.value},ae=t.h("span",ee,[T.value]);H.push(ae)}const X={class:q.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={...v.value};return H===0&&(Q[`${y}__first`]=!0),X>=R-1&&(Q[`${y}__last`]=!0),t.h("div",{ref:S,key:`${H}`,class:Q,style:f.value},K)};return()=>{if(p.value&&m.value!==!0){const Q=o.tag||"div";return t.h(Q,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:b.value},[])}s.order.index=0;const K=[];let H=0;if(l.slots.header){const Q={key:`${H++}`,ref:E,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:E,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:_},re=t.h("div",ae,Q);K.push(re)}}N();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(C.value){const Q=o.tag||"div";return t.h(Q,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:b.value},[K])}else return K}}}}const{componentName:_i,create:ec,scope:tc}=G("group"),Go=ec(Ji(_i,tc,ne.RectUp));function nc(e){return e===window}const oc=/matrix\((.+)\)/,us=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(nc(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:m}=window.getComputedStyle(l);if(m){const p=oc.exec(m);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 lc{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 ac{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 lc,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 Ua=new ac,ds={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:rc,create:sc}=G("price"),ic=sc({props:{...ds},setup(e){const n=t.computed(()=>({[rc]:!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}}}),cc=["innerHTML"],uc=["innerHTML"];function dc(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,cc)):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,uc)):t.createCommentVNode("",!0)],2)}const Ge=te(ic,[["render",dc]]),{componentName:io,create:fc}=G("hint-text"),mc=fc({components:{Price:Ge},props:{...ds,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),m=(w,q,P,E,$,F)=>{const D=document.documentElement.clientWidth||document.body.clientWidth,j=document.documentElement.clientHeight||document.body.clientHeight,U=w.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 I=0;I<Z.length;I++){const L=Z[I];if(W[0]=L,U[1]&&(W[1]=U[1]),L==="top"){const x=q.y-F-e.arrowSize-e.offset;if(x>=0){_.top=x;let z=0;U[1]==="start"?z=q.x:U[1]==="end"?z=q.x+P-$:z=q.x+P/2-$/2;const M=D-z-$;M<0?(z+=M,u.value=-M):u.value=0,_.left=z<0?0:z;break}}else if(L==="bottom"){const x=q.y+E+e.arrowSize+e.offset;if(x+F<=j){_.top=x;let z=0;U[1]==="start"?z=q.x:U[1]==="end"?z=q.x+P-$:z=q.x+P/2-$/2;const M=D-z-$;M<0?(z+=M,u.value=-M):u.value=0,_.left=z<0?0:z;break}}else if(L==="left"){const x=q.x-$-e.arrowSize-e.offset;if(x>=0){_.left=x;let z=0;U[1]==="start"?z=q.y:U[1]==="end"?z=q.y+E-F:z=q.y+E/2-F/2,_.top=z<0?0:z;break}}else if(L==="right"){const x=q.x+P+e.arrowSize+e.offset;if(x+$<=D){_.left=x;let z=0;U[1]==="start"?z=q.y:U[1]==="end"?z=q.y+E-F:z=q.y+E/2-F/2,_.top=z<0?0:z;break}}}return{bestPlacement:W.join("-"),bestInsetRect:_}},p=(w,q,P=10)=>{if(!it||q===!1||!w)return;o.value=us(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const E=c.value.offsetHeight,$=c.value.offsetWidth,{bestPlacement:F,bestInsetRect:D}=m(e.placement,o.value,l.value,r.value,$,E);s.value=F,a.value=D,i.value=!0},u=t.ref(0),h=yt(()=>{p(e.message,e.visible)},10),k=t.ref(e.visible);t.watch(()=>e.visible,w=>{k.value=w});const y=t.computed(()=>k.value&&b.value),b=t.ref(!0),v=yt(w=>{const q=w[0];q&&(b.value=q.isIntersecting)},10),f=new IntersectionObserver(v);t.watch([()=>e.message,()=>e.visible],([w,q])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Ua.watch(e.reference,h),f.observe(e.reference)}),t.onBeforeMount(()=>{Ua.unwatch(e.reference,h),f.unobserve(e.reference),f.disconnect()});const d=t.computed(()=>{const w={[io]:!0};return s.value.startsWith("top")?w["is-top"]=!0:s.value.startsWith("right")?w["is-right"]=!0:s.value.startsWith("bottom")?w["is-bottom"]=!0:s.value.startsWith("right")&&(w["is-right"]=!0),e.size==="small"?w["is-small"]=!0:e.size==="large"&&(w["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(w[`${e.customClass}`]=!0),w}),g=t.computed(()=>{const w={};a.value.top!==null&&(w.top=`${a.value.top}px`),a.value.right!==null&&(w.right=`${a.value.right}px`),a.value.bottom!==null&&(w.bottom=`${a.value.bottom}px`),a.value.left!==null&&(w.left=`${a.value.left}px`),e.autoFit&&(w["min-width"]=`${l.value}px`);const q=document.documentElement.clientWidth||document.body.clientWidth;return w["max-width"]=`${q}px`,i.value&&(w.opacity="1"),e.transition||(w.transition="none"),e.zIndex&&(w["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(w,e.customStyle),w}),C=t.computed(()=>{const w=[`${io}__content`];return e.customTextClass&&w.push(e.customTextClass),w}),B=t.computed(()=>{const w={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(w,e.customTextStyle),w}),S=t.computed(()=>({[`${io}__arrow`]:!0})),N=t.computed(()=>{const w={};return e.showArrow?(w.width=`${e.arrowSize}px`,w.height=`${e.arrowSize}px`,s.value==="top"?(w.left="50%",w.bottom=`-${e.arrowSize}px`,w.transform=" translate(-50%, 0%)"):s.value==="top-start"?(w.left=`${e.arrowOffset+u.value}px`,w.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(w.right=`${e.arrowOffset-u.value}px`,w.bottom=`-${e.arrowSize}px`):s.value==="right"?(w.left=`-${e.arrowSize}px`,w.top="50%",w.transform=" translate(0%, -50%)"):s.value==="right-start"?(w.left=`-${e.arrowSize}px`,w.top=`${e.arrowOffset}px`):s.value==="right-end"?(w.left=`-${e.arrowSize}px`,w.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(w.left="50%",w.top=`-${e.arrowSize}px`,w.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(w.left=`${e.arrowOffset+u.value}px`,w.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(w.right=`${e.arrowOffset-u.value}px`,w.top=`-${e.arrowSize}px`):s.value==="left"?(w.right=`-${e.arrowSize}px`,w.top="50%",w.transform=" translate(0%, -50%)"):s.value==="left-start"?(w.right=`-${e.arrowSize}px`,w.top=`${e.arrowOffset}px`):s.value==="left-end"&&(w.right=`-${e.arrowSize}px`,w.bottom=`-${e.arrowOffset}px`),w):{display:"none"}}),V=t.computed(()=>y.value&&e.closeOnClick),A=t.computed(()=>{const w={};return e.zIndex&&(w["z-index"]=`${e.zIndex}`),w});return{show:y,tipRef:c,classes:d,styles:g,textClasses:C,textStyles:B,arrowClasses:S,arrowStyles:N,overlayShow:V,overlayStyle:A,onClickOverlay:()=>{k.value=!1,n.emit("update:visible",!1)}}}}),pc=["innerHTML"];function hc(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,pc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const fs=te(mc,[["render",hc]]);class zn{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 Ao={},gc=new zn,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()}},yc=e=>{e.unmount=bn;const n=document.getElementById(e.id);if(n){const a=ht.get(e.id);a?e={...Ao,...a,...e}:e={...Ao,...e},e.transition=!1;const o=t.createVNode(fs,e);return t.render(o,n),e.id}},vc=e=>{e.unmount=bn;let n=e.id??`hinttext_${gc.get()}`;e={...Ao,...e},e.id=n,ht.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(fs,e);return t.render(o,a),document.body.appendChild(a),n},bc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},Vt={show(e,n,a={},o=!0){bc(n);const l=a.id;return l&&ht.has(l)?yc({...a,message:n,reference:e}):(o&&bn(),vc({...a,message:n,reference:e}))},hide(e){bn(e)},install(e){e.config.globalProperties.$hintText=Vt}};function kc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...me,...ye},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Ve({componentName:e,validate:!1},s);const i=je(),c=Dn();In(!1);const m=t.computed(()=>c&&i?qn(i,!1).value:null),p=e,u=t.ref(null),h=t.computed(()=>{const R={[p]:!0,[`${p}__gutter`]:m.value&&m.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(R[l.errorMarkClass]=!!F.value,R[l.warnMarkClass]=!!E.value,R[l.infoMarkClass]=!!q.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?Mn(i,!1):null;if(m.value&&Q){if(m.value.type==="grid"){const ee=Ln(Q,m.value,l.span,l.offset);Object.assign(R,ee)}else if(m.value.type==="flow"){const ee=Pn(Q,m.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}),b=t.ref(null),v=t.computed({get:()=>b.value??he(l.isRequired),set:R=>{b.value=R}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",d=Ae(t.toRef(l,"labelPosition"),"labelPosition",yn.Near),g=t.computed(()=>d&&d.value==="top"?"top":d&&d.value==="right"?"right":"left"),C=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),B=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),S=Ae(t.toRef(l,"labelWidth"),"labelWidth",yn.Near),N=t.computed(()=>S&&S.value?{width:ge(S.value)}:{}),V=t.computed(()=>({"label--string":!0,"label--required":v.value})),A=t.computed(()=>({content:!0,[l.contentClass]:!0})),T=t.computed(()=>({...l.contentStyle})),w=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});De({setRequired(R){v.value=R},setErrorTip(R){w.errorTip=R},setErrorIcon(R){w.errorIcon=R},setWarnTip(R){w.warnTip=R},setWarnIcon(R){w.warnIcon=R},setInfoTip(R){w.infoTip=R},setInfoIcon(R){w.infoIcon=R},setCustomClassName(R){u.value=R},setCustomStyle(R){k.value=R}});const q=t.computed(()=>l.infoTip||w.infoTip),P=t.computed(()=>l.infoIcon||w.infoIcon),E=t.computed(()=>l.warnTip||w.warnTip),$=t.computed(()=>l.warnIcon||w.warnIcon),F=t.computed(()=>l.errorTip||w.errorTip),D=t.computed(()=>l.errorIcon||w.errorIcon),j=t.computed(()=>F.value?"error":E.value?"warn":q.value?"info":""),U=()=>j.value.length>0,Z=t.computed(()=>j.value==="error"?F.value:j.value==="warn"?E.value:j.value==="info"?q.value:""),_=t.computed(()=>j.value==="error"?D.value:j.value==="warn"?$.value:j.value==="info"?P.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}),I=t.computed(()=>{const R={};return d&&d.value==="top"||!f()?R["padding-left"]="0px":S&&S.value&&(R["padding-left"]=ge(S.value)),R}),L=t.ref();let x="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([R,Q,ee,ae])=>{L.value&&(R&&!ue(Q)?x?a.show(L.value,Q,{...ae,id:x,type:ee},!0):x=a.show(L.value,Q,{...ae,type:ee},!0):a.hide(x))});let z=null;const M=()=>{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?M():O()}),t.onMounted(()=>{he(l.appearListen)&&M()}),t.onUnmounted(O);const Y=()=>{if(!f())return null;const R=[],Q=r.slots?.label?.()??l.label,ee={class:V.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:B.value,style:N.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:A.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:I.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:C.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 to={class:h.value,style:y.value,prop:l.prop};return t.h("div",to,R)}}}}const{componentName:Sc,create:Cc,scope:wc}=G("item"),we=Cc(kc(Sc,wc,Vt,!1));function Nc(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=Dn();In(!1);const c=t.computed(()=>{const m={};if(a.width)a.width!=="auto"&&(m.width=ge(a.width));else if(i&&s){const p=qn(s,!1),u=Mn(s,!1);if(p.value&&u){if(p.value.type==="grid"){const h=Ln(u,p.value,a.span,a.offset);Object.assign(m,h)}else if(p.value.type==="flow"){const h=Pn(u,p.value,a.span,a.offset,a.width);Object.assign(m,h)}}}return m});return()=>{const m=[];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}});m.push(k)}m.push(u[h])}else Reflect.apply([].push,m,u)}const p={class:r.value,style:c.value};return t.h("div",p,m)}}}}const{componentName:Bc,create:Vc,scope:cV}=G("row-item"),Zo=Vc(Nc(Bc));function Ac(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=Dn();In(!1);const s=t.computed(()=>r&&l?qn(l,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:a.span==="stretch"})),m=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const u=r&&l?Mn(l,!1):null;if(s.value&&u){if(s.value.type==="grid"){const h=Ln(u,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Pn(u,s.value,a.span,a.offset,a.width);Object.assign(p,h)}}}return p});return()=>{const p={class:c.value,style:m.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Tc,create:$c,scope:uV}=G("slot-item"),Jo=$c(Ac(Tc)),Ha={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 Ec(e,n,a,o){return{props:{...me,...ye,...Ha},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=se.useFoxI18n(n),p=m(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})),b=Ae(t.computed(()=>l.textAlign),"textAlign"),v=t.computed(()=>{const $={};return b.value&&($["text-align"]=b.value),$}),f=$=>{let D=$.target.value;l.type==="digit"&&(D=Co(D,!0)),l.type==="number"&&(D=Co(D,!1)),l.maxLength&&D.length>Number(l.maxLength)&&(D=D.slice(0,Number(l.maxLength))),h.value=D,c("update:modelValue",D,$),c("change",D,$)};let d=Ie(l,"hintText"),g=t.ref(!1);const C=$=>{let D=$.target.value;u.value=!0,ue(d.value)||(g.value=!0),c("focus",D,$)},B=$=>{setTimeout(()=>{g.value&&(g.value=!1),u.value=!1},0);let D=$.target.value;l.maxLength&&D.length>Number(l.maxLength)&&(D=D.slice(0,Number(l.maxLength))),c("blur",D,$)},S=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),N=t.computed(()=>{const $={};return r.slots.append&&!V.value&&!P.value&&($.display="none"),$}),V=t.computed(()=>ve(l.unit)>0),A=t.computed(()=>!P.value),T=t.computed(()=>({[`${k}__unit`]:!0,hidden:!A.value})),w=$=>{h.value="",c("update:modelValue","",$),c("change","",$),c("clear","")},q=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),P=t.computed(()=>{let $=ve(h.value)>0;return he(l.clearable)&&$&&u.value}),E=t.computed(()=>({action:!0,hidden:!P.value}));return()=>{const $={class:y.value,style:v.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:f,onFocus:C,onBlur:B},F=[],D=t.h("input",$);F.push(D);const j=[];if(q.value){const x={class:["action-icon"]},z=t.h(o,x),M={class:E.value,onClick:w},O=t.h("view",M,{default:()=>[z]});j.push(O)}if(V.value){const x=t.h("view",{class:T.value},[l.unit]);j.push(x)}const U={class:S.value,style:N.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 I={...Nt(l,Ha),hintText:d.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,I,_)}}}}const{componentName:xc,create:Dc,scope:Ic}=G("input-item"),_o=Dc(Ec(xc,Ic,we,ne.CircleClose));function ja(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 Wa(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=xr(`${e}`,`${n}`);return ja(o)}else{let o=Oo(`${e}`,Dr(`${n}`),20);return ja(o)}}function qc(e,n=-1,a=!1,o=3,l=","){return Sn(e,n,a,o,l)}function Ya(e,n,a,o,l=!0){if(e==="")return"";if(e=Ir(e),n=fe(n),n==1)return e;if(o)e=Wa(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(fe(a)+2,"0"):e=Oo(e,1,fe(a)));else{let r=-1*n;e=Wa(e,r)}return e}function Xa(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=bo(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=bo(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Qa={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 Mc(e,n,a,o){return{props:{...me,...ye,...Qa},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=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=Ya(U,Z,_,!1);u.value!==W&&(u.value=W)},{immediate:!0});const h=t.computed(()=>{let U="";return m.value&&(U=u.value),U}),{t:k}=se.useFoxI18n(n),y=t.computed(()=>{let U=l.placeholder??"";return!m.value&&!ue(u.value)?U=qc(u.value,l.decimalLength,l.autoPadding,l.digits,l.separator):U=ue(U)?k(["placeholder"]):U,U}),b=e,v=t.computed(()=>({[b]:!0,[`${b}__placeholder`]:u.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),f=Ae(t.computed(()=>l.textAlign),"textAlign"),d=t.computed(()=>{const U={};return f.value&&(U["text-align"]=f.value),U}),g=t.ref(""),C=t.computed(()=>{let U=g.value;return ue(U)&&(U=l.errorTip??""),U}),B=t.ref(""),S=t.ref(!1),N=U=>{let _=U.target.value;if(ue(_)){u.value="",p.value="",c("update:modelValue","",U),c("change","",U),he(l.showTip)&&S.value&&(S.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(!Kr(_)){t.triggerRef(u);return}if(l.integerLength!=-1&&Ur(_)>Number(l.integerLength)){t.triggerRef(u);return}if(l.decimalLength&&l.decimalLength!=-1&&Hr(_)>Number(l.decimalLength)){t.triggerRef(u);return}let W=Xa(_,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}B.value=_,he(l.showTip)&&(S.value=_.length>0),u.value=_,p.value=Ya(_,l.rates,l.precision,!0),c("update:modelValue",p.value,U),c("change",p.value,U)},V=U=>{if(m.value=!0,he(l.showTip)){let Z=u.value;ue(Z)&&(Z=l.hintText),ue(Z)||(B.value=Z,S.value=!0)}g.value="",c("focus",p.value,U)},A=U=>{if(setTimeout(()=>{m.value=!1,he(l.showTip)&&S.value===!0&&(S.value=!1)},0),!ue(u.value)){let Z=Xa(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(()=>({[`${b}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),w=t.computed(()=>{const U={};return r.slots.append&&!q.value&&!D.value&&(U.display="none"),U}),q=t.computed(()=>ve(l.unit)>0),P=t.computed(()=>!D.value),E=t.computed(()=>({[`${b}__unit`]:!0,hidden:!P.value})),$=U=>{p.value="",c("update:modelValue","",U),c("change","",U),c("clear","")},F=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),D=t.computed(()=>{let U=ve(p.value)>0;return he(l.clearable)&&U&&m.value}),j=t.computed(()=>({action:!0,hidden:!D.value}));return()=>{let U={class:v.value,style:d.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:N,onFocus:V,onBlur:A},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:$},K=t.h("view",oe,{default:()=>[J]});W.push(K)}if(q.value){const Y=t.h("view",{class:E.value},[l.unit]);W.push(Y)}const I={class:T.value,style:w.value},L=t.h("view",I,{default:()=>W});Z.push(L);const x={default:()=>Z};x.label=r.slots.default,x.prepend=r.slots.prepend,x.append=r.slots.append,x.fixedPreTip=r.slots.fixedPreTip,x.fixedTip=r.slots.fixedTip;let M={...Nt(l,Qa),errorTip:C.value,hintText:B.value,hintVisible:S.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,M,x)}}}}const{componentName:Pc,create:Lc,scope:zc}=G("money-item"),el=Lc(Mc(Pc,zc,we,ne.CircleClose)),To={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:Fc,create:Rc,scope:Oc}=G("textarea"),Kc=Rc({props:{...To},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=se.useFoxI18n(Oc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Fc;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:b}=e.autosize;y!==void 0&&(k=Math.min(k,y)),b!==void 0&&(k=Math.max(k,b))}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})}}}}),Uc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Hc={key:0,class:"fox-textarea__limit"};function jc(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,Uc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Hc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Fn=te(Kc,[["render",jc]]);function Wc(e,n,a,o){return{props:{...me,...ye,...To},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=Ie(l,"modelValue",null,c),p=b=>{m.value=b,c("update:modelValue",b,{}),c("change",b,{})};let u=Ie(l,"hintText"),h=t.ref(!1);const k=b=>{ue(u.value)||(h.value=!0),c("focus",m.value,b)},y=b=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",m.value,b)};return()=>{const v={...be(l,To),disabled:s.value,readonly:i.value,value:m.value,"onUpdate:modelValue":p,onFocus:k,onBlur:y},f=[],d=t.h(o,v);f.push(d);const g={default:()=>f};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 C=be(l,ye,me);return t.h(a,{...C,prop:`${l.prop}_item`},g)}}}}const{componentName:Yc,create:Xc,scope:Qc}=G("textarea-item"),tl=Xc(Wc(Yc,Qc,we,Fn));function Gc(e){return e===window}const Ee=e=>{const n=t.unref(e);if(Gc(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 Zc=2e3;const Ga=()=>Zc++,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:{}}},Jc=(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=Ga());const r=t.computed(()=>{const b=e,v=[b,`${b}--${a.position}`];return a.round&&v.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&v.push(`${b}--${a.position}--safebottom`),typeof a.popClass=="string"?v.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{v.push(f)}),v}),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=Ga(),a.destroyOnClose&&(l.showSlot=!0),o("open")},m=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=b=>{o("click-pop",b)},u=b=>{b.stopPropagation(),o("click-close-icon",b),o("update:visible",!1)},h=b=>{o("click-overlay",b),a.closeOnClickOverlay&&o("update:visible",!1)},k=b=>{o("opend",b)},y=b=>{o("closed",b)};return t.watch(()=>a.visible,b=>{a.visible?c():m()}),t.watch(()=>a.closeable,b=>{l.closed=b}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:u,onClickOverlay:h,onOpened:k,onClosed:y}}});let xt=0;const Za="fox-overflow-hidden",Ja=()=>it?document.body:{classList:[]},_c=e=>[()=>{if(e())try{!xt&&Ja().classList.add(Za),xt++}catch{}},()=>{if(e()&&xt)try{xt--,!xt&&Ja().classList.remove(Za)}catch{}}],eu={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:tu,create:nu}=G("overlay"),ou=nu({props:{...eu},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=_c(()=>e.lockScroll),l=t.computed(()=>({[tu]:!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 lu(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(ou,[["render",lu]]),{componentName:au,create:ru}=G("popup"),su=ru(Jc(au,{FoxOverLay:rt,Close:ne.Close}));function iu(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(su,[["render",iu]]),_a=10;function ms(e,n){return e>n&&e>_a?"horizontal":n>e&&n>_a?"vertical":""}function nl(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function ol(){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 m=s.touches[0];e.deltaX=m.clientX-e.startX,e.deltaY=m.clientY-e.startY,e.moveX=m.clientX,e.moveY=m.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=ms(e.offsetX,e.offsetY))},start:s=>{if(o(),s.touches){const m=s.touches[0];e.startX=m.clientX,e.startY=m.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),m=t.ref(0),p=t.ref(""),u=()=>p.value==="vertical",h=()=>p.value==="horizontal",k=()=>{s.value=0,i.value=0,c.value=0,m.value=0,p.value="",a.value=0};return{move:v=>{if(v.touches){const g=v.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const d=v;s.value=d.clientX-e.value,i.value=d.clientY-n.value,l.value=d.clientX,r.value=d.clientY}c.value=Math.abs(s.value),m.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=ms(c.value,m.value))},start:v=>{if(k(),v.touches){const g=v.touches[0];e.value=g.clientX,n.value=g.clientY}else{const d=v;e.value=d.clientX,n.value=d.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:m,direction:p,isVertical:u,isHorizontal:h}}const ps={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}},$o={...Fe,...ps,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 hs=36;function cu(){return hs}function uu(e){hs=e}function Le(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Eo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function du(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 er(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let fu=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function mu(){const e=t.getCurrentInstance();return new fu(e.proxy)}function tr(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 pu(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 m=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 tr(e,p,i)});if(m==-1)break;l.push(m)}else{let s=a[0];for(let i=0;i<n.length;i++){const c=n[i];let m=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 tr(e,u,c)});if(m==-1)break;l.push(m);const p=Eo(e,s[m]);if(!Array.isArray(p))break;s=p}}return l}function nr(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 m=i[c],p=Le(e,m);if(l.texts.push(p),l.items.push(m),r==="text")l.values.push(p);else if(r==="value"){let u=st(e,m);u==null&&(u=p),l.values.push(u)}else l.values.push(m)}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 m=s[c],p=Object.assign({},m);p.children=null;const u=Le(e,m);if(l.texts.push(u),l.items.push(p),r==="text")l.values.push(u);else if(r==="value"){let h=st(e,m);h==null&&(h=u),l.values.push(h)}else l.values.push(p);if(!Array.isArray(m.children))break;s=m.children}}return l}function or(e){return{text:e,value:e}}const hu=15,gu=300,yu=200,{create:vu}=G("picker-column");function bu(e){e.stopPropagation()}function ku(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&bu(e)}const Su=vu({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},...ps},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=N=>N>=u.currIndex+8||N<=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=N=>`transform: rotate3d(1, 0, 0, ${-u.rotation*N}deg) translate3d(0px, 0px, 104px)`,m=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=N=>Le(e,N),k=N=>st(e,N),y=_e(),b=()=>{u.transitionEndTrigger&&(u.transitionEndTrigger(),u.transitionEndTrigger=null)},v=(N,V=!1,A=!1)=>{if(u.currIndex=N,V){const T=()=>{u.moving=!1,n("update:modelValue",N),n("change",N)};A?u.transitionEndTrigger=T:T()}},f=(N,V,A)=>{let T=N+u.startDistance;if(V==="end"){const w=-(e.source.length-1)*e.itemHeight;T<w&&(T=w),T>0&&(T=0);let q=Math.abs(Math.round(-T/e.itemHeight));const P=-q*e.itemHeight,E=`${(q+1)*u.rotation}deg`,$=A?A>0:!1;v(q,!0,$),d(P,V,A,E)}else{let w=(-T/e.itemHeight+1)*u.rotation;const q=(e.source.length+1)*u.rotation,P=0;if(w=Math.min(Math.max(w,P),q),e.threeDimensional&&(w<P||w>q))return;d(T,null,void 0,`${w}deg`)}},d=(N=0,V,A=yu,T)=>{V==="end"?u.scrollTime=A:u.scrollTime=0,u.deg=T,u.scrollDistance=N},g=(N,V)=>(N=Math.abs(N/V)/.003*(N<0?-1:1),N),C=N=>{e.readonly||(u.startDistance=u.scrollDistance,y.start(N),u.transitionEndTrigger=null)},B=N=>{e.readonly||(u.moving=!0,y.move(N),y.isVertical()&&(u.moving=!0,ku(N,!0)),f(y.deltaY.value,"",0))},S=()=>{if(e.readonly)return;const N=y.deltaY.value,V=y.duration.value;if(V<gu&&Math.abs(N)>hu){const T=g(N,V);f(T,"end",e.swipeDuration)}else f(N,"end",0)};return t.watch(()=>e.modelValue,N=>{const V=u.currIndex-N;if(V!==0){u.currIndex=N,u.startDistance=u.scrollDistance;const A=V*e.itemHeight;f(A,"",0)}}),t.watch(()=>e.source,N=>{if(u.currIndex>=N.length){const T=(N.length-1-u.currIndex)*e.itemHeight;u.startDistance=u.scrollDistance,f(T,"end",0)}}),t.watch(()=>e.visible,N=>{N===!1&&b()}),t.onMounted(()=>{const N=-e.modelValue*e.itemHeight;f(N)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:k,...t.toRefs(u),roller:p,getItemText:Le,onTouchStart:C,onTouchMove:B,onTouchEnd:S,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:m,stopMomentum:b}}}),Cu={key:1,class:"fox-picker__item-tile"};function wu(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",Cu,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Nu=te(Su,[["render",wu]]),{create:Bu,componentName:Vu,scope:Au}=G("picker"),Tu=Bu({components:{Column:Nu,Popup:de},props:{...$o},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=se.useFoxI18n(Au),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(cu());t.watch(()=>e.visible,w=>{w&&s.value<=0&&setTimeout(()=>{if(r.value){const q=Ee(r.value);s.value=q.height,uu(s.value)}},50)});const i=t.computed(()=>({[Vu]:!0})),c=mu(),m=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([w,q])=>{if(w){let P=await c.load("picker",w,q);if(P.length>0){let E=P[0];if(Array.isArray(E)){if(typeof E[0]=="string"){let $=P,F=[];$.forEach(D=>{let j=D.map(U=>or(U));F.push(j)}),p.value=F}else p.value=P;m.value="multipleColumn"}else if(typeof E=="string"){let $=P,F=[],D=$.map(j=>or(j));F.push(D),p.value=F,m.value="singleColumn"}else{const $=Eo(e,E);Array.isArray($)?(m.value="cascade",p.value=[P]):(m.value="singleColumn",p.value=[P])}}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],([w,q])=>{let P=pu(e,w,q,m.value);if(!qe(P,y.value)){y.value=P;let E=nr(e,P,q,m.value);E&&(u.value=E.texts,n("update:text",u.value))}});const b=t.ref(e.visible);t.watch(()=>e.visible,w=>{b.value=w});const v=w=>{let q=er(e,w);return $e(q)?q.defaultIndex??0:0},f=w=>{if(e.readonly===!0)return!0;let q=er(e,w);return $e(q)?q.readonly??!1:!1},d=(w,q)=>{let P=y.value;P[w]=q;for(let $=0;$<w;$++)P[$]==null&&(P[$]=v($));if(m.value==="cascade")for(let $=w+1;$<C.value.length;$++){let F=v($);$<P.length?P[$]=F:P.push(F)}else for(let $=P.length;$<C.value.length;$++){let F=v($);P.push(F)}y.value=P;let E=nr(e,P,p.value,m.value);E&&(u.value=E.texts,h.value=E.values,k.value=E.items)},g=w=>w<y.value.length?y.value[w]:v(w),C=t.computed(()=>{if(p.value.length==0)return[];if(m.value=="singleColumn"||m.value=="multipleColumn")return p.value;let w=[],q=0,P=p.value[0],E=0;for(;;){let $=P.map(j=>{let U=Object.assign({},j);return du(e,U,null),U});w.push($),q>=y.value.length?E=0:E=y.value[q],(E<0||E>=P.length)&&(E=0);let F=P[E];const D=Eo(e,F);if(!Array.isArray(D))break;P=D,q++}return w}),B=t.computed(()=>fe(+e.visibleItemCount-1)/2*s.value),S=(w=!1)=>{if(e.readonly===!0){w&&n("update:visible",!1);return}let q=p.value.length-1;for(;q>=0&&!(y.value[q]===null||y.value[q]===void 0);q--);if(q>=0&&d(q,0),m.value==="singleColumn"){let P=h.value.length>0?h.value[0]:"",E=k.value.length>0?k.value[0]:null;n("update:modelValue",P),n("update:text",u.value),n("change",P,E),w&&(n("confirm",P),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",u.value),n("change",h.value,k.value),w&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:C,dataType:m,show:b,itemHeight:s,top:B,isReadonly:f,getIndex:g,change:(w,q)=>{if(d(w,q),e.isAutoBackFill){const P=!b.value;S(P)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{S(!0)},clear:()=>{if(e.readonly===!0){n("update:visible",!1);return}m.value==="singleColumn"?(n("update:modelValue",""),n("change","")):(n("update:modelValue",[]),n("change",[])),n("clear",""),n("update:visible",!1)}}}}),$u={class:"fox-picker__bar"},Eu={class:"fox-picker__title"},xu={class:"fox-picker__bar__action"},Du={class:"fox-picker__column"};function Iu(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",$u,[t.createElementVNode("view",Eu,t.toDisplayString(e.title),1),t.createElementVNode("view",xu,[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",Du,[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,m)=>(t.openBlock(),t.createElementBlock("view",{key:m,class:"fox-picker__columnitem"},[t.createVNode(s,{visible:e.show,source:c,readonly:e.isReadonly(m),"column-index":m,modelValue:e.getIndex(m),"onUpdate:modelValue":p=>e.change(m,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(Tu,[["render",Iu]]);function qu(e,n,a,o,l,r,s=!0){return{props:{...me,...ye,...$o,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 m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=Ie(i,"modelValue",null,u),v=t.ref([]),f=t.computed(()=>Array.isArray(v.value)?v.value.join(i.separator):v.value),d="fox-input-item",g=t.computed(()=>({[d]:!0,"is-disabled":m.value,"is-readonly":p.value})),C=Ae(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const L={};return C.value&&(L["text-align"]=C.value),L}),S=t.ref(!1),N=()=>{S.value=!0},V=L=>{S.value=L},A=L=>{b.value=L,u("update:modelValue",L)},T=(L,x)=>{u("change",L,x)},w=L=>{let z=L.target.value;y.value=!0,u("focus",z,L)},q=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)},P=L=>{v.value=L,Array.isArray(L)&&L.length===0?u("update:text",L[0]):u("update:text",L)},E=t.computed(()=>({[`${d}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),$=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),D=t.computed(()=>({hidden:!F.value})),j=L=>{b.value="",u("update:modelValue","",L),u("change","",L),u("clear","")},U=t.computed(()=>i.clearable&&!m.value&&!p.value),Z=t.computed(()=>ve(b.value)>0&&y.value),_=L=>{Z.value?j(L):N()},W=t.computed(()=>Z.value&&U.value?o:l),I=t.computed(()=>({action:!0}));return()=>{const L={class:g.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:w,onBlur:q};s&&(L.disabled=!0);const x=[],z=t.h("input",L);x.push(z);const M=[],O={class:["action-icon"]},Y=t.h(W.value,O),J={class:I.value,onClick:_},oe=t.h("view",J,{default:()=>[Y]});if(M.push(oe),$.value){const re=t.h("view",{class:D.value},[i.unit]);M.push(re)}const K={class:E.value},H=t.h("view",K,{default:()=>M});x.push(H);const X={default:()=>x};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,$o);R.disabled=!1,R.readonly=m.value||p.value,R.visible=S.value,R["onUpdate:visible"]=V,R.modelValue=b.value,R["onUpdate:modelValue"]=A,R.text=v.value,R["onUpdate:text"]=P,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:Mu,create:Pu,scope:Lu}=G("picker-item"),ll=Pu(qu(Mu,Lu,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]:m,...p}=o,u={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:m,_parent:n};return u.children&&u.children.length&&(u.children=on(u.children,u,a)),u}),gs=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&gs(o.children,n)},zu={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Fu=(e,n)=>{const a={...zu,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(m=>{m={...m};const{[l]:p,[r]:u}=m,h=c[u]=c[u]||[];!i.length&&u===o&&(i=h),h.push(m),m.children=c[p]||(c[p]=[])}),s&&Object.keys(c).forEach(m=>{c[m].length>1&&c[m].sort((p,u)=>p[s]-u[s])}),c=null,i},Ru={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}},lr=(e,n)=>n[e.textKey],Dt=(e,n)=>n[e.valueKey],Ou=(e,n)=>n[e.visibleKey],ar=(e,n)=>n[e.disabledKey],Ku=(e,n)=>{const a=n[e.doitKey];return he(a)},Uu=(e,n)=>{const a=n[e.numKey];return a==null?null:fe(n[a])},rr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Hu(e,n,a,o=!1){return{props:{...Ru},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}),m=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,D(!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 b.value||(W.display="none"),W}),y=t.ref(),b=t.ref(!1),v=()=>{const W=!b.value;f(W)},f=W=>{const I=W;I?(b.value=I,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",()=>{b.value=!1},{once:!0}):setTimeout(()=>{b.value=!1},0))},d=t.ref(),g=t.ref([]),C=(W,I)=>{g.value[I]=W},B=W=>I=>{C(I,W)},S=(W,I)=>{const L=d.value,x=g.value;if(!L||!x||!x[W])return;const z=x[W];let M=0;l.direction==="vertical"?M=z.offsetTop-(L.offsetHeight-z.offsetHeight)/2:M=z.offsetLeft-(L.offsetWidth-z.offsetWidth)/2,N(L,M,I?0:.3,l.direction)},N=(W,I,L,x)=>{let z=0;const M=x==="horizontal"?W.scrollLeft:W.scrollTop,O=L===0?1:Math.round(L*1e3/16);function Y(){x==="horizontal"?W.scrollLeft+=(I-M)/O:W.scrollTop+=(I-M)/O,++z<O&&Ke(Y)}Y()},V=(W,I)=>{const L=Dt(l,W),x={};return x[`${e}__titles-item`]=!0,x.disabled=ar(l,W),x.active=L===u.value,l.shape&&(x[`${l.shape}`]=!0),l.ellipsis&&(x.ellipsis=!0),I&&(I.class&&(x[`${I.class}`]=!0),I.disabled===!0&&(x.disabled=I.disabled)),x},A=(W,I)=>{const L={};if(p.value>0){const x=Math.abs(p.value/2);l.direction==="vertical"?(L["margin-top"]=`${x}px`,L["margin-bottom"]=`${x}px`):(L["margin-left"]=`${x}px`,L["margin-right"]=`${x}px`)}return I&&I.style&&Object.assign(L,I.style),L},T=(W,I)=>`${Dt(l,W)??I}`,w=(W,I)=>{const L=Dt(l,W),x={};x[`${e}__popup-item`]=!0,x.disabled=ar(l,W),x.active=L===u.value,l.shape&&(x[`${l.shape}`]=!0);const z=rr(l,W,I);return z&&z.disabled===!0&&(x.disabled=z.disabled),x},q=t.computed(()=>(l.data??[]).filter(I=>Ou(l,I)!==!1)),P=(W,I)=>{const L=Dt(l,W);if(s("click",W,I),u.value==L)return;const x=()=>{u.value=L,l.scroll&&S(I,!1),s("update:modelValue",L),s("change",W,I)};if(typeof l.beforeChange=="function"){const z=l.beforeChange(W,I);gt(z)?z.then(M=>{M!==!1&&x()}).catch(()=>{x()}):z!==!1&&x()}else x()},E=(W,I)=>function(){P(W,I)},$=(W,I)=>{P(W,I),f(!1)},F=(W,I)=>function(){$(W,I)},D=W=>{if(!Array.isArray(l.data)||!l.scroll)return;const I=l.data.findIndex(L=>Dt(l,L)===u.value);I!==-1&&S(I,W)};t.watch(()=>l.data,()=>{setTimeout(D,0)}),t.onMounted(()=>{D(!0)});const j=(W,I)=>{if(r.item)return r.item({item:W,index:I});const L=rr(l,W,I),x=[];if(r.text){const Y=r.text({item:W,index:I});x.push(Y)}else{const Y=[];if(L?.doit===!0||Ku(l,W)){const H={class:[`${e}__titles-item-tip`,"doit"]},X=t.h("view",H);Y.push(X)}const J=L?.num??Uu(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(lr(l,W));const K=t.h("view",oe,Y);x.push(K)}const z={class:`${e}__titles-item-line`},M=t.h("view",z);x.push(M);const O={ref:B(I),class:V(W,L),style:A(W,L),key:T(W,I),onClick:E(W,I)};return t.h("view",O,x)},U=()=>{const W=r.default?r.default():[];if(W.length===0)for(let L=0;L<q.value.length;L++){const x=q.value[L],z=j(x,L);W.push(z)}const I={ref:d,class:c.value,style:m.value};return t.h("view",I,W)},Z=()=>{let W=null;r.navigation?W=r.navigation():W=t.h(a);const I={class:`${e}__navigation`,onClick:v};return t.h("view",I,[W])},_=()=>{const W=[];for(let L=0;L<q.value.length;L++){const x=q.value[L];let z=null;r.popupItem?z=r.popupItem({item:x,index:L}):z=lr(l,x);const M={class:w(x,L),key:T(x,L),onClick:F(x,L)},O=t.h("view",M,[z]);W.push(O)}const I={class:h.value,style:k.value};return t.h("view",I,W)};return()=>{const W=[],I=U();if(W.push(I),l.showQuickNavigation){const x=Z();W.push(x);const z=_();W.push(z)}const L={class:i.value};return t.h("view",L,W)}}}}const{create:ju,componentName:Wu,scope:Yu}=G("tabs-bar"),Rn=ju(Hu(Wu,Yu,ne.MoreH,!1)),ys=Symbol("TabsStatesKey"),Xu={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Qu(e,n,a=!1){return{props:{...Xu},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:b=>{const v={name:b};i.current.value===b&&(v.loaded=!0),s.value.push(v),t.triggerRef(s)},remove:b=>{const v=s.value.findIndex(f=>f.name===b);v!==-1&&s.value.splice(v,1)},isLoaded:b=>{if(!o.lazy)return!0;const v=s.value.findIndex(f=>f.name===b);return v!==-1?i.current.value?s.value[v].loaded??!1:v===0:!1}};t.provide(ys,i);const c=b=>{const v=s.value.findIndex(f=>f.name===b);v!==-1&&(s.value[v].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([b,v])=>{i.current.value!==b&&(i.current.value=b??"",c(b??"")),i.direction.value!==v&&(i.direction.value=v)});const m=t.ref(null),p=t.ref(null),u=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const k=t.computed(()=>{const b={},v=s.value.length;if(v<=0)return b;const f=s.value.findIndex(d=>d.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(b.height=`${v*i.tabHeight.value}px`,f!==-1&&(b.transform=`translate(0, -${f*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(b.width=`${v*i.tabWidth.value}px`,f!==-1&&(b.transform=`translate(-${f*i.tabWidth.value}px, 0)`)),h&&(h=!1,b.transition="transform 0s ease"),b});let y=null;return t.onMounted(()=>{if(!m.value)return;const b=()=>{const v=xn(m.value);i.tabWidth.value=v.width,i.tabHeight.value=v.height};window.ResizeObserver&&(y=new window.ResizeObserver(b),y.observe(m.value)),b()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const b={class:`${e}__panes`,style:k.value,ref:p},v=t.h("view",b,[r?.default?.()]),f={class:u.value,ref:m};return t.h("view",f,[v])}}}}const{create:Gu,componentName:Zu,scope:Ju}=G("tabs-container"),On=Gu(Qu(Zu,Ju,!1)),_u={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function ed(e,n,a){return{props:{..._u},setup(o,{emit:l,slots:r}){const s=t.inject(ys);t.onMounted(()=>{s.add(o.paneKey)}),t.onBeforeUnmount(()=>{s.remove(o.paneKey)});const i=t.computed(()=>{const m={};return s.direction.value==="vertical"&&s.tabHeight.value>0?m.height=`${s.tabHeight.value}px`:s.tabWidth.value>0&&(m.width=`${s.tabWidth.value}px`),m}),c=t.computed(()=>o.loaded!=null?he(o.loaded):s.isLoaded(o.paneKey));return()=>{let m=[];if(c.value)m=r?.default?.()??[];else if(r.empty)m=r.empty();else{const u={class:`${e}__empty-icon`},h=o.emptyIcon??a,k=t.h(h,u),y={class:`${e}__empty-text`},b=o.emptyText??"Loading",v=t.h("view",y,[b]),f={class:`${e}__empty`},d=t.h("view",f,[k,v]);m.push(d)}const p={class:`${e}`,style:i.value};return t.h("view",p,m)}}}}const{create:td,componentName:nd,scope:od}=G("tabs-pane"),Kn=td(ed(nd,od,ne.Loading));class sr{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 gs(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:ld,scope:ad}=G("cascader-pane"),rd=ld({components:{Loading:ne.Loading,Checklist:ne.Checklist,TabsBar:Rn,TabsContainer:On,TabsPane:Kn},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(ad),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 sr([],{})),c=t.ref([]),m=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((d,g)=>({text:d.selectedNode?d.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:d}=e;o.value.convertConfig&&(d=Fu(d,o.value.convertConfig)),i.value=new sr(d,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),m.value&&!i.value.nodes.length&&await b({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y()},y=async()=>{const d=s.value;if(d===void 0||!i.value.nodes.length)return;if(d.length===0){l.value=0,c.value=[{nodes:i.value.nodes,selectedNode:null}];return}let g=d;if(m.value&&Array.isArray(d)&&d.length){g=[];let C=i.value.nodes.find(B=>B.value===d[0]);if(C){g=[C.value],r.value=!0;const B=await d.slice(1).reduce(async(S,N)=>{const V=await S;await b(V);const A=V?.children?.find(T=>T.value===N);return A&&g.push(N),Promise.resolve(A)},Promise.resolve(C));await b(B),r.value=!1}}g.length&&d===e.modelValue&&i.value.getPathNodesByValue(g).map((B,S)=>{l.value=S,f.handleNode(B,!m.value)})},b=async d=>{if(!d)return;if(!o.value.lazyLoad){d.leaf=!0;return}if(i.value.isLeaf(d,m.value)||i.value.hasChildren(d,m.value))return;d.loading=!0;const g=d.root?null:d;let C=u.get(d);C||(C=new Promise(S=>{o.value.lazyLoad?.(d,S)}),u.set(d,C));const B=await C;Array.isArray(B)&&B.length>0?i.value.updateChildren(B,g):d.leaf=!0,d.loading=!1,u.delete(d)},v=d=>{const g=d.map(C=>C.value);s.value=g,n("change",g,d),n("pathChange",d),n("update:modelValue",g)},f={async handleNode(d,g){const{disabled:C,loading:B}=d;if(!(!g&&C||!c.value[l.value])){if(i.value.isLeaf(d,m.value)){if(d.leaf=!0,c.value[l.value].selectedNode=d,c.value=c.value.slice(0,d.level+1),!g){const S=c.value.map(N=>N.selectedNode);v(S),n("pathChange",S)}return}if(i.value.hasChildren(d,m.value)){const S=d.level+1;if(c.value[l.value].selectedNode=d,c.value=c.value.slice(0,S),c.value.push({nodes:d.children||[],selectedNode:null}),l.value=S,!g){const N=c.value.map(V=>V.selectedNode);n("pathChange",N)}return}h=d,!B&&(await b(d),h===d&&(c.value[l.value].selectedNode=d,f.handleNode(d,g)))}},handleTabChange(d,g){h=null},formatTabTitle(d){return d.selectedNode?d.selectedNode.text:a("select")},isSelected(d,g){return d.selectedNode&&d.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{k()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,d=>{qe(d,s.value)||(s.value=d,y())}),t.watch(()=>e.visible,d=>{d&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),sd={class:"fox-cascader"},id={role:"menu",class:"fox-cascader__pane"},cd=["aria-checked","aria-disabled","onClick"],ud={class:"fox-cascader__item__title"},dd=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function fd(e,n,a,o,l,r){const s=t.resolveComponent("TabsBar"),i=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),m=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",sd,[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(m,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",id,[(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",ud,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,cd))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(m,{key:1,"pane-key":0},{default:t.withCtx(()=>[dd]),_:1}))]),_:1},8,["modelValue"])])}const md=te(rd,[["render",fd]]),{create:pd}=G("cascader"),hd=pd({components:{FoxCascaderPane:md,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}}}),gd=["innerHTML"];function yd(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,gd)):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 Un=te(hd,[["render",yd]]);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 vs(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 bs(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])??"",m={[e.textKey]:r,[e.valueKey]:c};l.push(m);const p=vs(e,n[s]);Array.isArray(p)&&bs(e,p,a,o+1,l);return}}function ks(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])??"",m={[e.textKey]:c,[e.valueKey]:r};l.push(m);const p=vs(e,n[s]);Array.isArray(p)&&ks(e,p,a,o+1,l);return}}function co(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 vd=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`),[]):($e(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function bd(){const e=t.getCurrentInstance();return new vd(e.proxy)}const ir={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 kd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...ir},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=bd(),v=t.ref([]),f=t.ref([]),d=t.computed(()=>{if(Array.isArray(f.value)){if(i.showAllLevels===!1){const z=f.value.length-1;return f.value[z]}return f.value.join(i.separator)}else return f.value}),g=t.ref([]),C=t.ref([]);t.watch([()=>i.modelValue,()=>v.value],async([z,M])=>{if(u("setValue",z),i.lazy===!0){C.value.length==0&&(g.value=Array.isArray(z)?z:[]);return}if(i.valueType==="item"){let O=z;if(!co(i,O,C.value)){C.value=O;let Y=tn(i,O);f.value=Y.texts,g.value=Y.values}}else if(i.valueType==="text"){let O=z,Y=[];if(bs(i,M,O,0,Y),!co(i,Y,C.value)){C.value=Y;let J=tn(i,Y);O.value=J.texts,g.value=J.values}}else{let O=[];if(ks(i,M,z,0,O),!co(i,O,C.value)){C.value=O;let Y=tn(i,O);f.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,M])=>{z&&(v.value=await b.load(z,M))},{immediate:!0});const B="fox-input-item",S=t.computed(()=>({[B]:!0,"is-disabled":m.value,"is-readonly":p.value})),N=Ae(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const z={};return N.value&&(z["text-align"]=N.value),z}),A=t.ref(!1),T=()=>{m.value===!0||p.value===!0||(A.value=!0)},w=z=>{A.value=z},q=(z,M)=>{let O=M.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});C.value=O;let Y=tn(i,O);f.value=Y.texts,g.value=Y.values,i.valueType==="text"?(u("change",f.value,O),u("update:modelValue",f.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)},P=z=>{let M=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",M)},E=z=>{y.value=!0,u("focus",g.value,z)},$=z=>{setTimeout(()=>{y.value=!1},0),u("blur",g.value,z)},F=t.computed(()=>({[`${B}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),D=t.computed(()=>ve(i.unit)>0),j=t.computed(()=>ve(i.unit)>0&&!y.value),U=t.computed(()=>({hidden:!j.value})),Z=z=>{C.value=[],f.value=[],g.value=[],u("update:modelValue",[]),u("change",[],z),u("clear",[]),u("update:pathNodes",[])},_=t.computed(()=>i.clearable&&!m.value&&!p.value),W=t.computed(()=>{let z=g.value&&g.value.length>0;return i.clearable&&z&&y.value}),I=z=>{W.value?Z(z):T()},L=t.computed(()=>W.value&&_.value?o:l),x=t.computed(()=>({action:!0}));return()=>{const z={class:S.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:T,onFocus:E,onBlur:$};s&&(z.disabled=!0);const M=[],O=t.h("input",z);M.push(O);const Y=[],J={class:["action-icon"]},oe=t.h(L.value,J),K={class:x.value,onClick:I},H=t.h("view",K,{default:()=>[oe]});if(Y.push(H),D.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});M.push(R);const Q={default:()=>M};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=A.value,ee["onUpdate:visible"]=w,ee.modelValue=g.value,ee.onChange=q,ee.onPathChange=P,ee.options=v.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,ir);return t.h(a,{...re,prop:`${i.prop}_item`},Q)}}}}const{componentName:Sd,create:Cd,scope:wd}=G("cascader-item"),al=Cd(kd(Sd,wd,we,ne.CircleClose,ne.ArrowRight,Un,!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 Ss={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",m="day",p="week",u="month",h="quarter",k="year",y="date",b="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,d={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(P,E,$){var F=String(P);return!F||F.length>=E?P:""+Array(E+1-F.length).join($)+P},C={s:g,z:function(P){var E=-P.utcOffset(),$=Math.abs(E),F=Math.floor($/60),D=$%60;return(E<=0?"+":"-")+g(F,2,"0")+":"+g(D,2,"0")},m:function P(E,$){if(E.date()<$.date())return-P($,E);var F=12*($.year()-E.year())+($.month()-E.month()),D=E.clone().add(F,u),j=$-D<0,U=E.clone().add(F+(j?-1:1),u);return+(-(F+($-D)/(j?D-U:U-D))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:u,y:k,w:p,d:m,D:y,h:c,m:i,s,ms:r,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},B="en",S={};S[B]=d;var N=function(P){return P instanceof w},V=function P(E,$,F){var D;if(!E)return B;if(typeof E=="string"){var j=E.toLowerCase();S[j]&&(D=j),$&&(S[j]=$,D=j);var U=E.split("-");if(!D&&U.length>1)return P(U[0])}else{var Z=E.name;S[Z]=E,D=Z}return!F&&D&&(B=D),D||!F&&B},A=function(P,E){if(N(P))return P.clone();var $=typeof E=="object"?E:{};return $.date=P,$.args=arguments,new w($)},T=C;T.l=V,T.i=N,T.w=function(P,E){return A(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var w=function(){function P($){this.$L=V($.locale,null,!0),this.parse($)}var E=P.prototype;return E.parse=function($){this.$d=function(F){var D=F.date,j=F.utc;if(D===null)return new Date(NaN);if(T.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(v);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(D)}($),this.$x=$.x||{},this.init()},E.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},E.$utils=function(){return T},E.isValid=function(){return this.$d.toString()!==b},E.isSame=function($,F){var D=A($);return this.startOf(F)<=D&&D<=this.endOf(F)},E.isAfter=function($,F){return A($)<this.startOf(F)},E.isBefore=function($,F){return this.endOf(F)<A($)},E.$g=function($,F,D){return T.u($)?this[F]:this.set(D,$)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function($,F){var D=this,j=!!T.u(F)||F,U=T.p($),Z=function(O,Y){var J=T.w(D.$u?Date.UTC(D.$y,Y,O):new Date(D.$y,Y,O),D);return j?J:J.endOf(m)},_=function(O,Y){return T.w(D.toDate()[O].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Y)),D)},W=this.$W,I=this.$M,L=this.$D,x="set"+(this.$u?"UTC":"");switch(U){case k:return j?Z(1,0):Z(31,11);case u:return j?Z(1,I):Z(0,I+1);case p:var z=this.$locale().weekStart||0,M=(W<z?W+7:W)-z;return Z(j?L-M:L+(6-M),I);case m:case y:return _(x+"Hours",0);case c:return _(x+"Minutes",1);case i:return _(x+"Seconds",2);case s:return _(x+"Milliseconds",3);default:return this.clone()}},E.endOf=function($){return this.startOf($,!1)},E.$set=function($,F){var D,j=T.p($),U="set"+(this.$u?"UTC":""),Z=(D={},D[m]=U+"Date",D[y]=U+"Date",D[u]=U+"Month",D[k]=U+"FullYear",D[c]=U+"Hours",D[i]=U+"Minutes",D[s]=U+"Seconds",D[r]=U+"Milliseconds",D)[j],_=j===m?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},E.set=function($,F){return this.clone().$set($,F)},E.get=function($){return this[T.p($)]()},E.add=function($,F){var D,j=this;$=Number($);var U=T.p(F),Z=function(I){var L=A(j);return T.w(L.date(L.date()+Math.round(I*$)),j)};if(U===u)return this.set(u,this.$M+$);if(U===k)return this.set(k,this.$y+$);if(U===m)return Z(1);if(U===p)return Z(7);var _=(D={},D[i]=o,D[c]=l,D[s]=a,D)[U]||1,W=this.$d.getTime()+$*_;return T.w(W,this)},E.subtract=function($,F){return this.add(-1*$,F)},E.format=function($){var F=this,D=this.$locale();if(!this.isValid())return D.invalidDate||b;var j=$||"YYYY-MM-DDTHH:mm:ssZ",U=T.z(this),Z=this.$H,_=this.$m,W=this.$M,I=D.weekdays,L=D.months,x=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")},M=D.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:x(D.monthsShort,W,L,3),MMMM:x(L,W),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:x(D.weekdaysMin,this.$W,I,2),ddd:x(D.weekdaysShort,this.$W,I,3),dddd:I[this.$W],H:String(Z),HH:T.s(Z,2,"0"),h:z(1),hh:z(2),a:M(Z,_,!0),A:M(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(f,function(Y,J){return J||O[Y]||U.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function($,F,D){var j,U=T.p(F),Z=A($),_=(Z.utcOffset()-this.utcOffset())*o,W=this-Z,I=T.m(this,Z);return I=(j={},j[k]=I/12,j[u]=I,j[h]=I/3,j[p]=(W-_)/6048e5,j[m]=(W-_)/864e5,j[c]=W/l,j[i]=W/o,j[s]=W/a,j)[U]||W,D?I:T.a(I)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return S[this.$L]},E.locale=function($,F){if(!$)return this.$L;var D=this.clone(),j=V($,F,!0);return j&&(D.$L=j),D},E.clone=function(){return T.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P}(),q=w.prototype;return A.prototype=q,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",m],["$M",u],["$y",k],["$D",y]].forEach(function(P){q[P[1]]=function(E){return this.$g(E,P[0],P[1])}}),A.extend=function(P,E){return P.$i||(P(E,w,A),P.$i=!0),A},A.locale=V,A.isDayjs=N,A.unix=function(P){return A(1e3*P)},A.en=S[B],A.Ls=S,A.p={},A})})(Ss);var Nd=Ss.exports;const Re=Ye(Nd);var Cs={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(b){return(b=+b)+(b>68?1900:2e3)},m=function(b){return function(v){this[b]=+v}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var f=v.match(/([+-]|\d\d)/g),d=60*f[1]+(+f[2]||0);return d===0?0:f[0]==="+"?-d:d}(b)}],u=function(b){var v=i[b];return v&&(v.indexOf?v:v.s.concat(v.f))},h=function(b,v){var f,d=i.meridiem;if(d){for(var g=1;g<=24;g+=1)if(b.indexOf(d(g,0,v))>-1){f=g>12;break}}else f=b===(v?"pm":"PM");return f},k={A:[s,function(b){this.afternoon=h(b,!1)}],a:[s,function(b){this.afternoon=h(b,!0)}],S:[/\d/,function(b){this.milliseconds=100*+b}],SS:[l,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,m("seconds")],ss:[r,m("seconds")],m:[r,m("minutes")],mm:[r,m("minutes")],H:[r,m("hours")],h:[r,m("hours")],HH:[r,m("hours")],hh:[r,m("hours")],D:[r,m("day")],DD:[l,m("day")],Do:[s,function(b){var v=i.ordinal,f=b.match(/\d+/);if(this.day=f[0],v)for(var d=1;d<=31;d+=1)v(d).replace(/\[|\]/g,"")===b&&(this.day=d)}],M:[r,m("month")],MM:[l,m("month")],MMM:[s,function(b){var v=u("months"),f=(u("monthsShort")||v.map(function(d){return d.slice(0,3)})).indexOf(b)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[s,function(b){var v=u("months").indexOf(b)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,m("year")],YY:[l,function(b){this.year=c(b)}],YYYY:[/\d{4}/,m("year")],Z:p,ZZ:p};function y(b){var v,f;v=b,f=i&&i.formats;for(var d=(b=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,T,w){var q=w&&w.toUpperCase();return T||f[w]||a[w]||f[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,E,$){return E||$.slice(1)})})).match(o),g=d.length,C=0;C<g;C+=1){var B=d[C],S=k[B],N=S&&S[0],V=S&&S[1];d[C]=V?{regex:N,parser:V}:B.replace(/^\[|\]$/g,"")}return function(A){for(var T={},w=0,q=0;w<g;w+=1){var P=d[w];if(typeof P=="string")q+=P.length;else{var E=P.regex,$=P.parser,F=A.slice(q),D=E.exec(F)[0];$.call(T,D),A=A.replace(D,"")}}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(b,v,f){f.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var d=v.prototype,g=d.parse;d.parse=function(C){var B=C.date,S=C.utc,N=C.args;this.$u=S;var V=N[1];if(typeof V=="string"){var A=N[2]===!0,T=N[3]===!0,w=A||T,q=N[2];T&&(q=N[2]),i=this.$locale(),!A&&q&&(i=f.Ls[q]),this.$d=function(F,D,j){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*F);var U=y(D)(F),Z=U.year,_=U.month,W=U.day,I=U.hours,L=U.minutes,x=U.seconds,z=U.milliseconds,M=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=I||0,H=L||0,X=x||0,R=z||0;return M?new Date(Date.UTC(J,oe,Y,K,H,X,R+60*M.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("")}}(B,V,S),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),w&&B!=this.format(V)&&(this.$d=new Date("")),i={}}else if(V instanceof Array)for(var P=V.length,E=1;E<=P;E+=1){N[1]=V[E-1];var $=f.apply(this,N);if($.isValid()){this.$d=$.$d,this.$L=$.$L,this.init();break}E===P&&(this.$d=new Date(""))}else g.call(this,C)}}})})(Cs);var Bd=Cs.exports;const Vd=Ye(Bd);var ws={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"],m=i%100;return"["+i+(c[(m-20)%10]||c[m]||c[0])+"]"},r.format=function(i){var c=this,m=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 m.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return m.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)}}})})(ws);var Ad=ws.exports;const Td=Ye(Ad);var Ns={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,b){var v=u.name?u:u.$locale(),f=s(v[h]),d=s(v[k]),g=f||d.map(function(B){return B.slice(0,y)});if(!b)return g;var C=v.weekStart;return g.map(function(B,S){return g[(S+(C||0))%7]})},c=function(){return l.Ls[l.locale()]},m=function(u,h){return u.formats[h]||function(k){return k.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,b,v){return b||v.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 m(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 m(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)}}})})(Ns);var $d=Ns.exports;const Ed=Ye($d);var Bs={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 m=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=s(this).startOf(o).add(1,o).date(m),u=s(this).endOf(a);if(p.isBefore(u))return 1}var h=s(this).startOf(o).date(m).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)}}})})(Bs);var xd=Bs.exports;const Dd=Ye(xd);var Vs={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}}})})(Vs);var Id=Vs.exports;const qd=Ye(Id);var As={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")}}})})(As);var Md=As.exports;const Pd=Ye(Md);var Ts={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)}}})})(Ts);var Ld=Ts.exports;const zd=Ye(Ld);var $s={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)}}})})($s);var Fd=$s.exports;const Rd=Ye(Fd);Re.extend(Ed);Re.extend(Td);Re.extend(Vd);Re.extend(Dd);Re.extend(qd);Re.extend(Pd);Re.extend(zd);Re.extend(Rd);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,m=r+(6-s)*864e5,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(m));return[p,u]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,m=r+(7-s)*i,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(m));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}},cr=new Date().getFullYear(),rl={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)},xo=(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 Do={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(cr-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(cr+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:Od,scope:Kd}=G("date-picker"),Ud=Od({components:{[bt.name]:bt},props:{...Do},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(Kd),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,d=>{l.value=d});function r(d,g){return new Date(d,g,0).getDate()}const s=(d,g)=>{const C=e[`${d}Date`],B=C.getFullYear();let S=1,N=1,V=0,A=0;d==="max"&&(S=12,N=r(g.getFullYear(),g.getMonth()+1),V=23,A=59);const T=A;return g.getFullYear()===B&&(S=C.getMonth()+1,g.getMonth()+1===S&&(N=C.getDate(),g.getDate()===N&&(V=C.getHours(),g.getHours()===V&&(A=C.getMinutes())))),{[`${d}Year`]:B,[`${d}Month`]:S,[`${d}Date`]:N,[`${d}Hour`]:V,[`${d}Minute`]:A,[`${d}Seconds`]:T}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:d,maxDate:g,maxMonth:C,maxHour:B,maxMinute:S,maxSeconds:N}=s("max",h.value),{minYear:V,minDate:A,minMonth:T,minHour:w,minMinute:q,minSeconds:P}=s("min",h.value);let E=[{type:"year",range:[V,d]},{type:"month",range:[T,C]},{type:"day",range:[A,g]},{type:"hour",range:[w,B]},{type:"minute",range:[q,S]},{type:"seconds",range:[P,N]}];switch(e.type){case"date":E=E.slice(0,3);break;case"datetime":E=E.slice(0,5);break;case"time":E=E.slice(3,6);break;case"year-month":E=E.slice(0,2);break;case"month-day":E=E.slice(1,3);break;case"datehour":E=E.slice(0,4);break;case"hour-minute":E=E.slice(3,5);break}return E}),c=(d,g,C)=>{if(!(g>d))return null;const B=[];for(;d<=g;)e.isShowChinese?B.push({text:d+o[C],value:d}):B.push({text:`${d}`,value:d}),C==="minute"?d+=e.minuteStep:d++;return B},m=t.computed(()=>{let d=[];return i.value.forEach(g=>{let C=c(g.range[0],g.range[1],g.type);C&&d.push(C)}),d}),p=(d,g)=>d==="year"?g.getFullYear():d==="month"?g.getMonth()+1:d==="day"?g.getDate():d==="hour"?g.getHours():d==="minute"?g.getMinutes():d==="seconds"?g.getSeconds():0,u=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,d=>{let g;if(typeof d=="string"?d.length==0?g=new Date:e.valueFormat?g=kn(e,e.modelValue,e.valueFormat):g=kn(e,d,rl[e.type]):He(d)?g=d:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let C=[];i.value.forEach(B=>{let S=p(B.type,g);C.push(S)}),u.value=C}},{immediate:!0});const k=d=>{if(e.type==="date"){const g=d[0],C=d[1]-1,B=Math.min(d[2],r(g,C+1));B!==d[2]&&(d[2]=B),h.value=new Date(g,C,B)}else if(e.type==="datetime"){const g=d[0],C=d[1]-1,B=Math.min(d[2],r(g,C+1)),S=d[3],N=d[4];B!==d[2]&&(d[2]=B),h.value=new Date(g,C,B,S,N)}else if(e.type==="time"){const g=d[0],C=d[1],B=d[2],S=h.value??new Date,N=new Date(S.getFullYear(),S.getMonth(),S.getDate(),g,C,B);h.value=N}else if(e.type==="year-month"){const g=d[0],C=d[1]-1;h.value=new Date(g,C)}else if(e.type==="month-day"){const C=(h.value??new Date).getFullYear(),B=d[0]-1,S=Math.min(d[1],r(C,B+1));S!==d[1]&&(d[1]=S);const N=new Date(C,B,S);h.value=N}else if(e.type==="datehour"){const g=d[0],C=d[1]-1,B=Math.min(d[2],r(g,C+1)),S=d[3];B!==d[2]&&(d[2]=B),h.value=new Date(g,C,B,S)}else if(e.type==="hour-minute"){const g=d[0],C=d[1],B=h.value??new Date,S=new Date(B.getFullYear(),B.getMonth(),B.getDate(),g,C);h.value=S}u.value=d};return{columns:m,dateIndexs:u,show:l,onChange:d=>{k(d)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:d=>{k(d),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let C=xo(e,g,e.valueFormat);n("update:modelValue",C)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",d)},onClear:()=>{n("clear")}}}});function Hd(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 Hn=te(Ud,[["render",Hd]]),jd={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Wd(e){let n=e.format;if(!n){let a=e.type??"date";n=rl[a]}return n}function Yd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...Do,...jd},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Ie(i,"modelValue",I=>I==null?null:typeof I=="string"?I.length==0?null:i.valueFormat?kn(i,I,i.valueFormat)??I:kn(i,I,rl[i.type])??I:He(I)?I:null,u),f=t.computed(()=>{if(!v.value)return"";const I=Wd(i);return xo(i,v.value,I)}),d="fox-input-item",g=t.computed(()=>({[d]:!0,"is-disabled":m.value,"is-readonly":p.value})),C=Ae(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const I={};return C.value&&(I["text-align"]=C.value),I}),S=t.ref(!1),N=()=>{S.value=!0},V=()=>{S.value=!1};c.expose({showPicker:N,hidePicker:V});const A=I=>{S.value=I},T=I=>{if(v.value=I,i.valueFormat){let L=xo(i,I,i.valueFormat);u("update:modelValue",L,{}),u("change",L,{})}else u("update:modelValue",I,{}),u("change",I,{})},w=I=>{let x=I.target.value;y.value=!0,u("focus",x,I)},q=I=>{setTimeout(()=>{y.value=!1},0);let x=I.target.value;i.maxLength&&x.length>Number(i.maxLength)&&(x=x.slice(0,Number(i.maxLength))),u("blur",x,I)},P=t.computed(()=>({[`${d}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),E=t.computed(()=>ve(i.unit)>0),$=t.computed(()=>ve(i.unit)>0&&!y.value),F=t.computed(()=>({hidden:!$.value})),D=I=>{v.value="",u("update:modelValue","",I),u("change","",I),u("clear",""),V()},j=t.computed(()=>i.clearable&&!m.value&&!p.value),U=t.computed(()=>{let I=ve(v.value)>0;return i.clearable&&I&&y.value}),Z=I=>{U.value?D(I):N()},_=t.computed(()=>U.value&&j.value?o:l),W=t.computed(()=>({action:!0}));return()=>{const I={class:g.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:w,onBlur:q};s&&(I.disabled=!0);const L=[],x=t.h("input",I);L.push(x);const z=[],M={class:["action-icon"]},O=t.h(_.value,M),Y={class:W.value,onClick:Z},J=t.h("view",Y,{default:()=>[O]});if(z.push(J),E.value){const re=t.h("view",{class:F.value},[i.unit]);z.push(re)}const oe={class:P.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,Do);X.valueFormat=null,X.disabled=!1,X.readonly=m.value||p.value,X.visible=S.value,X["onUpdate:visible"]=A,X.modelValue=v.value,X["onUpdate:modelValue"]=T,X.onClear=D;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:Xd,componentName:Qd,scope:Gd}=G("date-item"),sl=Xd(Yd(Qd,Gd,we,ne.CircleClose,ne.Date,Hn,!1)),Zd=39,Jd=64,{create:_d,scope:ef}=G("calendar-pane"),tf=_d({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(ef),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),m=t.ref(null),p=t.ref(null),u=t.ref(null),h=t.ref(0),k=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),y=t.computed(()=>a.btn),b=t.computed(()=>a["top-info"]),v=t.computed(()=>a["bottom-info"]),f=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}),d=M=>M.split("-"),g=M=>le.isEqual(f.currDate[0],M),C=M=>le.isEqual(f.currDate[1],M),B=M=>f.currDate?.length>0?f.currDate?.some(O=>le.isEqual(O,M)):!1,S=(M,O)=>O.curData[0]+"-"+O.curData[1]+"-"+le.getNumTwoBit(+M.day),N=(M,O)=>{const Y=S(M,O),{type:J}=e;return M.type=="curr"?le.isEqual(f.currDate,Y)||(J=="range"||J=="week")&&(g(Y)||C(Y))||J=="multiple"&&B(Y)?`${f.dayPrefix}--active`:f.propStartDate&&le.compareDate(Y,f.propStartDate)||f.propEndDate&&le.compareDate(f.propEndDate,Y)?`${f.dayPrefix}--disabled`:(J=="range"||J=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&le.compareDate(f.currDate[0],Y)&&le.compareDate(Y,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},V=()=>{const{type:M}=e;if(M=="range"&&f.chooseData.length==2||M!="range"){let O=f.chooseData.slice(0);M=="week"&&(O={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("choose",O),e.poppable&&n("update")}},A=(M,O,Y=!1)=>{if(N(M,O)!=`${f.dayPrefix}--disabled`){const{type:J}=e;let[oe,K]=O.curData,H=[...O.curData];if(H[2]=le.getNumTwoBit(Number(M.day)),H[3]=`${H[0]}-${H[1]}-${H[2]}`,H[4]=le.getWhatDay(+H[0],+H[1],+H[2]),J=="multiple")if(f.currDate?.length>0){let X;f.currDate?.forEach((R,Q)=>{R==H[3]&&(X=Q)}),Y?f.chooseData.push([...H]):X!==void 0?(f.currDate.splice(X,1),f.chooseData.splice(X,1)):(f.currDate.push(H[3]),f.chooseData.push([...H]))}else f.currDate=[H[3]],f.chooseData=[[...H]];else if(J=="range"){let X=Object.values(f.currDate).length;X==2||X==0?f.currDate=[H[3]]:le.compareDate(f.currDate[0],H[3])?Array.isArray(f.currDate)&&f.currDate.push(H[3]):Array.isArray(f.currDate)&&f.currDate.unshift(H[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...H]]:le.compareDate(f.chooseData[0][3],H[3])?f.chooseData=[...f.chooseData,[...H]]:f.chooseData=[[...H],...f.chooseData]}else if(J=="week"){let X=le.getWeekDate(oe,K,M.day,e.firstDayOfWeek);f.propStartDate&&le.compareDate(X[0],f.propStartDate)&&X.splice(0,1,f.propStartDate),f.propEndDate&&le.compareDate(f.propEndDate,X[1])&&X.splice(1,1,f.propEndDate),f.currDate=X,f.chooseData=[le.formatResultDate(X[0]),le.formatResultDate(X[1])]}else f.currDate=H[3],f.chooseData=[...H];if(!Y){let X=f.chooseData;J=="week"&&(X={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("select",X),(e.isAutoBackFill||!e.poppable)&&V()}}},T=M=>{let[O,Y,J]=M;return{date:M,monthWeekNum:le.getMonthWeek(O,Y,J,e.firstDayOfWeek),yearWeekNum:le.getYearWeek(O,Y,J,e.firstDayOfWeek)}},w=M=>{const O=M=="prev"?f.monthsData[0]:f.monthsData[f.monthsData.length-1];let Y=parseInt(O.curData[0]),J=parseInt(O.curData[1].toString().replace(/^0/,""));switch(M){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))+""]},q=(M,O,Y)=>{let{year:J,month:oe}=Y;return O=="prev"&&M>=7&&(M-=7),Array.from(Array(M),(K,H)=>({day:String(H+1),type:O,year:J,month:oe}))},P=(M,O,Y,J)=>{M=M-e.firstDayOfWeek;let{year:oe,month:K}=Y;return O=="prev"&&M>=7&&(M-=7),Array.from(Array(J),(X,R)=>({day:String(R+1),type:O,year:oe,month:K})).slice(J-M)},E=(M,O)=>{const Y=le.getMonthPreDay(+M[0],+M[1]);let J=Number(M[1])-1,oe=Number(M[0]);J<=0&&(J=12,oe+=1);const K=le.getMonthDays(String(M[0]),String(M[1])),H=le.getMonthDays(oe+"",J+""),X={year:M[0],month:M[1]},R={curData:M,title:l("monthTitle",{year:X.year,month:X.month}),monthData:[...P(Y,"prev",{month:String(J),year:String(oe)},H),...q(K,"curr",X)],cssHeight:0,cssScrollHeight:0},Q=R.monthData.length>35?6:5;R.cssHeight=Zd+Jd*Q;let ee=0;f.monthsData.length>0&&(ee=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),R.cssScrollHeight=ee,O=="next"?(!f.endData||!le.compareDate(`${f.endData[0]}-${f.endData[1]}-${le.getMonthDays(f.endData[0],f.endData[1])}`,`${M[0]}-${M[1]}-${M[2]}`))&&f.monthsData.push(R):!f.startData||!le.compareDate(`${M[0]}-${M[1]}-${M[2]}`,`${f.startData[0]}-${f.startData[1]}-01`)?f.monthsData.unshift(R):f.unLoadPrev=!0},$=()=>{let M=e.startDate?e.startDate:le.getDay(0),O=e.endDate?e.endDate:le.getDay(365);f.propStartDate=M,f.propEndDate=O,f.startData=d(M),f.endData=d(O),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const Y={year:Number(f.startData[0]),month:Number(f.startData[1])},J={year:Number(f.endData[0]),month:Number(f.endData[1])};let oe=J.month-Y.month;J.year-Y.year>0&&(oe=oe+12*(J.year-Y.year)),oe<=0&&(oe=1),E(f.startData,"next");let K=1;do E(w("next"),"next");while(K++<oe);if(f.monthsNum=oe,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(M&&le.compareDate(f.currDate[0],M)&&f.currDate.splice(0,1,M),O&&le.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...d(f.currDate[0]),...d(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let H=[],X={};f.currDate.forEach(R=>{M&&!le.compareDate(R,M)&&O&&!le.compareDate(O,R)&&(Object.hasOwnProperty.call(X,R)||(H.push(R),X[R]=R))}),f.currDate=[...H],f.defaultData=[...d(H[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[H,X,R]=d(f.currDate[0]),Q=le.getWeekDate(H,X,R,e.firstDayOfWeek);f.currDate=Q,M&&le.compareDate(f.currDate[0],M)&&f.currDate.splice(0,1,M),O&&le.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...d(f.currDate[0]),...d(f.currDate[1])]}}else f.currDate&&(M&&le.compareDate(f.currDate,M)?f.currDate=M:O&&!le.compareDate(f.currDate,O)&&(f.currDate=O),f.defaultData=[...d(f.currDate)])};De({scrollToDate:M=>{le.compareDate(M,f.propStartDate)?M=f.propStartDate:le.compareDate(M,f.propEndDate)||(M=f.propEndDate);let O=d(M);f.monthsData.forEach((Y,J)=>{if(Y.title==l("monthTitle",{year:O[0],month:O[1]})&&c.value){let oe=f.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=f.monthsData[J].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[J].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let M=0,O=0;f.defaultData.length>0&&f.monthsData.forEach((oe,K)=>{oe.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(M=K),(e.type=="range"||e.type=="week")&&oe.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(O=K)}),U(f.monthsNum,M),f.currentIndex=M,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?(A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),A({day:f.defaultData[5],type:"curr"},f.monthsData[O],!0)):e.type=="week"?A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(oe=>{let K=d(oe),H=f.currentIndex;f.monthsData.forEach((X,R)=>{X.title==l("monthTitle",{year:K[0],month:K[1]})&&(H=R)}),A({day:K[2],type:"curr"},f.monthsData[H],!0)}):A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let Y=f.monthsData[f.monthsData.length-1],J=Y.cssHeight+Y.cssScrollHeight;Xe(()=>{c?.value&&m?.value&&u?.value&&(h.value=c.value.clientHeight,m.value.style.height=`${J}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(J/(f.monthsNum+1))}});const U=(M,O)=>{M>=3?O>0&&O<M?f.defaultRange=[O-1,O+3]:O==0?f.defaultRange=[O,O+4]:O==M&&(f.defaultRange=[O-2,O+2]):f.defaultRange=[0,M+2];let Y=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=Y},Z=(M,O)=>(e.type=="range"||e.type=="week")&&M.type=="curr"&&N(M,O)=="fox-calendar__day--active",_=(M,O)=>Z(M,O)&&g(S(M,O)),W=(M,O)=>f.currDate.length>=2&&C(S(M,O))?Z(M,O):!1,I=()=>{if(f.currDate.length>=2)return le.isEqual(f.currDate[0],f.currDate[1])},L=M=>{const O=`${M.year}-${M.month}-${Number(M.day)<10?"0"+M.day:M.day}`;return le.isEqual(O,le.date2Str(new Date))},x=M=>{if(f.monthsData.length<=1)return;const O=M.target.scrollTop;let Y=Math.floor(O/f.avgHeight);if(Y==0)O>=f.monthsData[Y+1].cssScrollHeight&&(Y+=1);else if(Y>0&&Y<f.monthsNum-1)O>=f.monthsData[Y+1].cssScrollHeight&&(Y+=1),O<f.monthsData[Y].cssScrollHeight&&(Y-=1);else{const J=Math.round(O+h.value);J<f.monthsData[Y].cssScrollHeight+f.monthsData[Y].cssHeight&&O>f.monthsData[Y-1].cssScrollHeight&&(Y-=1),Y+1<=f.monthsNum&&J>=f.monthsData[Y+1].cssScrollHeight+f.monthsData[Y+1].cssHeight&&(Y+=1),Y>=1&&O<f.monthsData[Y-1].cssScrollHeight&&(Y-=1)}f.currentIndex!==Y&&(f.currentIndex=Y,U(f.monthsNum,Y)),f.yearMonthTitle=f.monthsData[Y].title},z=()=>{f.chooseData.splice(0),f.monthsData.splice(0),$()};return $(),t.watch(()=>e.defaultValue,M=>{M&&e.poppable&&z()}),{weeks:i,compConthsData:k,showTopBtn:y,topInfo:b,bottomInfo:v,rangeTip:I,mothsViewScroll:x,getClass:N,isStartTip:_,isEndTip:W,chooseDay:A,isCurrDay:L,confirm:V,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:m,weeksPanel:p,viewArea:u}}}),nf={class:"fox-calendar__header"},of={key:0,class:"fox-calendar__header-title"},lf={key:1,class:"fox-calendar__header-slot"},af={key:2,class:"fox-calendar__header-subtitle"},rf={class:"fox-calendar__weekdays",ref:"weeksPanel"},sf={class:"fox-calendar__panel",ref:"monthsPanel"},cf={class:"fox-calendar__month-title"},uf={class:"fox-calendar__days"},df=["onClick"],ff={class:"fox-calendar__day-value"},mf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},pf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},hf={key:2,class:"fox-calendar__day-tips--curr"},gf={key:4,class:"fox-calendar__day-tip"},yf={key:0,class:"fox-calendar__footer"};function vf(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",nf,[e.showTitle?(t.openBlock(),t.createElementBlock("view",of,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",lf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",af,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",rf,[(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",sf,[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",cf,t.toDisplayString(s.title),1),t.createElementVNode("view",uf,[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,m)=>(t.openBlock(),t.createElementBlock("view",{key:m,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:p=>e.chooseDay(c,s)},[t.createElementVNode("view",ff,[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",mf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",pf,[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",hf,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",gf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,df))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",yf,[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 ur=te(tf,[["render",vf]]),bf=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:kf}=G("calendar"),Sf=kf({components:{[ur.name]:ur,[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=b=>{i.value?.scrollToDate(b)},m=()=>{i.value?.initPosition()};t.watch(()=>e.visible,b=>{b&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),De({scrollToDate:c,initPosition:m});const p=()=>{n("update:visible",!1)},u=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{u()},update:p,close:u,select:b=>{n("select",b)},choose:b=>{u(),n("choose",b)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Cf(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 jn=te(Sf,[["render",Cf]]),dr={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}},uo=(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 wf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...me,...ye,...ln,...dr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=t.computed(()=>i.type==="range"),v=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{v.startDate!==null&&(v.startDate=null,v.endDate=null,v.startArray=[],v.endArray=[])},d=(x,z="one",M="YYYY-MM-DD")=>{if(bf(x)){f();return}if(b.value&&Array.isArray(x)&&x.length==2){let O,Y;typeof x[0]=="string"?(O=uo(x[0],M),Y=uo(x[1],M)):(O=x[0],Y=x[1]);let J=ut(O),oe=ut(Y);(v.startDate===null||v.startDate.getTime()!==O.getTime()||v.endDate?.getTime()!==Y.getTime())&&(v.startDate=O,v.startArray=J,v.endDate=Y,v.endArray=oe)}else{let O;typeof x=="string"?O=uo(x,M):O=x;let Y=ut(O);(v.startDate===null||v.startDate.getTime()!==O.getTime())&&(v.startDate=O,v.startArray=Y)}};d(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,x=>{d(x,i.type,i.valueFormat),u("setValue",x)});const g=t.computed(()=>{if(v.startDate===null)return"";if(b.value){let x=ct(i,v.startDate,i.format),z=ct(i,v.endDate,i.format);return`${x} ${i.rangeSeparator} ${z}`}else{let x=ct(i,v.startDate,i.format);return i.showWeek&&(x=`${x} ${v.startArray[4]}`),x}}),C=t.computed(()=>{if(v.startDate===null)return null;if(b.value){let x=le.date2Str(v.startDate),z=le.date2Str(v.endDate??new Date);return[x,z]}else return le.date2Str(v.startDate)}),B="fox-input-item",S=t.computed(()=>({[B]:!0,"is-disabled":m.value,"is-readonly":p.value})),N=Ae(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const x={};return N.value&&(x["text-align"]=N.value),x}),A=t.ref(!1),T=()=>{p.value||m.value||(A.value=!0)},w=x=>{A.value=x},q=x=>{if(x){if(b.value&&Array.isArray(x)){let z=x[0],M=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(M,O-1,Y),oe=x[1];M=fe(oe[0]),O=fe(oe[1]),Y=fe(oe[2]);let K=new Date(M,O-1,Y);if(v.startDate=J,v.startArray=ut(J),v.endDate=K,v.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=x,M=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(M,O-1,Y);if(v.startDate=J,v.startArray=ut(J),i.valueFormat){let oe=ct(i,J,i.valueFormat);u("update:modelValue",oe,{})}else u("update:modelValue",J,{})}u("change",x,{})}},P=x=>{let M=x.target.value;y.value=!0,u("focus",M,x)},E=x=>{setTimeout(()=>{y.value=!1},0);let M=x.target.value;i.maxLength&&M.length>Number(i.maxLength)&&(M=M.slice(0,Number(i.maxLength))),u("blur",M,x)},$=t.computed(()=>({[`${B}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),F=t.computed(()=>ve(i.unit)>0),D=t.computed(()=>ve(i.unit)>0&&!y.value),j=t.computed(()=>({hidden:!D.value})),U=x=>{f(),u("update:modelValue",null,x),u("change","",x),u("clear","")},Z=t.computed(()=>i.clearable&&!m.value&&!p.value),_=t.computed(()=>{let x=ve(g.value)>0;return i.clearable&&x&&y.value}),W=x=>{_.value?U(x):T()},I=t.computed(()=>_.value&&Z.value?l:r),L=t.computed(()=>({action:!0}));return()=>{const x={class:S.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:T,onFocus:P,onBlur:E};s&&(x.disabled=!0);const z=[],M=t.h("input",x);z.push(M);const O=[],Y={class:["action-icon"]},J=t.h(I.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:$.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=A.value,Q["onUpdate:visible"]=w,Q["default-value"]=C.value,Q.onChoose=q;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,dr);return t.h(o,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:Nf,create:Bf,scope:Vf}=G("calendar-item"),il=Bf(wf(Nf,Vf,jn,we,{CloseIcon:ne.CircleClose,MarkIcon:ne.Date},!1)),Af={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 Tf(e,{CheckNormal:n,Checked:a}){return{props:{...Af},setup(o,{emit:l,slots:r}){const s=t.inject("parent",null),i=t.computed(()=>s.label.value===o.label),c=t.computed(()=>s.position),m=()=>{const y=[];if(i.value){if(r.checkedIcon)return r.checkedIcon();{const b=ce(o.iconSize),v=o.checkedIcon??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),t.h(v,{width:b,height:b,class:y})}}else{if(r.icon)return r.icon();{const b=ce(o.iconSize),v=o.icon??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),t.h(v,{width:b,height:b,class:y})}}},p=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),t.h("view",{class:y},r.default?.())},u=()=>{const y=[`${e}__button`];return i.value&&y.push(`${e}__button--active`),o.disabled&&y.push("is-disabled"),t.h("view",{class:y},r.default?.())},h=()=>{i.value||o.disabled||o.readonly||s.updateValue(o.label)},k=c.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${k?`${e}--reverse`:""}`,onClick:h},[o.shape=="button"?u():k?[p(),m()]:[m(),p()]])}}}const{componentName:$f,create:Ef}=G("radio"),Wn=Ef(Tf($f,{CheckNormal:ne.CheckNormal,Checked:ne.CheckChecked})),{componentName:fr,create:xf}=G("radio-group"),Yn=xf({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:`${fr} ${fr}--${e.direction}`,style:l},n.default?.())}}});function mr(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 Df(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function If(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let qf=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Mf(){const e=t.getCurrentInstance();return new qf(e.proxy)}function Pf(e){return{text:e,value:e}}const pr={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Lf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},zf={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 Ff(e,n,a,o,l){return{props:{...me,...ye,...pr,...Lf,...zf},emits:["change","update:modelValue","setValue"],setup(r,s){const i=xe(t.computed(()=>r.readonly)),c=Be(t.computed(()=>r.disabled)),m=Ae(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ve({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=Mf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,d])=>{if(f){const g=await u.load("radio",f,d);if(g.length>0)if(typeof g[0]=="string"){const S=g.map(N=>Pf(N));h.value=S}else h.value=g;else h.value=[]}},{immediate:!0});let k=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([f,d])=>{k.value=mr(r,d,f,r.valueType),p("setValue",f)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(k.value===-1)return null;const f=h.value[k.value];return Lt(r,f)}),b=f=>{let d=null,g=null;if(h.value.length>0){let C=mr(r,h.value,f,"value");k.value=C,C>=0&&(g=h.value[C],r.valueType==="text"?d=an(r,g):r.valueType==="item"?d=g:d=Lt(r,g))}else d=f;p("update:modelValue",d),p("change",d,g)},v=()=>{let f=null,d=null;if(h.value.length>0&&k.value!==-1){let g=h.value[k.value];r.valueType==="text"?f=an(r,g):r.valueType==="item"?f=g:f=Lt(r,g)}p("update:modelValue",f),p("change",f,d)};if(De({clear(){k.value!==-1&&(k.value=-1,v())}}),r.source){const f=()=>{const d=[],g=be(r,pr);return h.value.forEach((C,B)=>{const S=Lt(r,C),N=Df(r,C);let V={...g,label:S,disabled:N};const A=If(r,C,B);V={...V,...A},c.value&&(V.disabled=!0),i.value&&(V.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 q=s.slots.text(C);T.default=()=>[q]}else{const q=an(r,C);T.default=()=>q}let w=t.h(l,V,T);d.push(w)}),d};return()=>{const d=f(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>d}),B={default:()=>C};B.label=s.slots.default,B.prepend=s.slots.prepend,B.append=s.slots.append,B.fixedPreTip=s.slots.fixedPreTip,B.fixedTip=s.slots.fixedTip;const S=be(r,ye,me);return t.h(a,{...S,prop:`${r.prop}_item`},B)}}else return()=>{const f=s.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"update:modelValue":b},{default:()=>f})}}}}const{componentName:Rf,create:Of,scope:Kf}=G("radio-item"),cl=Of(Ff(Rf,Kf,we,Yn,Wn)),Uf=(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=t.inject("parent",null),c=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,d=>{c.partialSelect=d});const m=t.computed(()=>!!i),p=t.computed(()=>m.value?i.value.value.includes(l.label):!!l.modelValue),u=t.computed(()=>m.value?i.position:l.textPosition);let h="";const k=(d,g)=>{h="click",s("update:modelValue",d),s("change",d,g)};t.watch(()=>l.modelValue,d=>{h=="click"?h="":s("change",d)});const y=()=>{const d=[];if(c.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const g=ce(l.iconSize),C=l.indeterminateIcon??o;return d.push("fox-checkbox__icon--indeterminate"),l.disabled&&d.push("is-disabled"),t.h(C,{width:g,height:g,class:d})}}else if(p.value){if(r.checkedIcon)return r.checkedIcon();{const g=ce(l.iconSize),C=l.checkedIcon??a;return d.push("fox-checkbox__icon"),l.disabled&&d.push("is-disabled"),t.h(C,{width:g,height:g,class:d})}}else{if(r.icon)return r.icon();{const g=ce(l.iconSize),C=l.icon??n;return d.push("fox-checkbox__icon--unchecked"),l.disabled&&d.push("is-disabled"),t.h(C,{width:g,height:g,class:d})}}},b=()=>{const d=[`${e}__label`];return l.disabled&&d.push("is-disabled"),t.h("view",{class:d},r.default?.())},v=()=>{const d=[`${e}__button`];return p.value&&d.push(`${e}__button--active`),l.disabled&&d.push("is-disabled"),t.h("view",{class:d},r.default?.())},f=d=>{if(!(l.disabled||l.readonly)){if(p.value&&c.partialSelect){c.partialSelect=!1,k(p.value,r.default?.()[0].children);return}if(k(!p.value,r.default?.()[0].children),m.value){const g=i.value.value,C=i.max.value,{label:B}=l,S=g.indexOf(B);S>-1?g.splice(S,1):S<=-1&&(g.length<C||!C)&&g.push(B),i.updateValue(g)}}};return t.onMounted(()=>{m.value&&i.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{m.value&&i.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${u.value==="left"?`${e}--reverse`:""}`,onClick:f},[l.shape=="button"?v():[y(),b()]])}}),{componentName:Hf,create:jf}=G("checkbox"),Xn=jf(Uf(Hf,{CheckNormal:ne.CheckNormal,Checked:ne.Checked,Indeterminate:ne.CheckDisabled})),{create:Wf,componentName:hr}=G("checkbox-group"),Qn=Wf({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=m=>{m.proxy&&o.children.push(m.proxy)},r=m=>{m.proxy&&(o.children=o.children.filter(p=>p!==m.proxy))},s=m=>{a("update:modelValue",m),a("change",m)},i=m=>{const p=[];m&&o.children.forEach(u=>{u?.disabled||p.push(u?.label)}),a("update:modelValue",p)},c=()=>{const m=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",m)};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,m=>{a("change",m)}),De({toggleAll:i,toggleReverse:c}),()=>{const m={};return e.textAlign&&(m["text-align"]=e.textAlign),t.h("view",{class:`${hr} ${hr}--${e.direction}`,style:m},n.default?.())}}});function gr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Io(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 Io(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 Yf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Xf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Qf=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Gf(){const e=t.getCurrentInstance();return new Qf(e.proxy)}function Zf(e){return{text:e,value:e}}const Jf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},yr={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},_f={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 em(e,n,a,o,l){return{props:{...me,...ye,...Jf,...yr,..._f},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Be(t.computed(()=>r.disabled)),c=Be(t.computed(()=>r.readonly)),m=Ae(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ve({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=Gf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,d])=>{if(f){const g=await u.load("checkbox",f,d);if(g.length>0)if(typeof g[0]=="string"){const S=g.map(N=>Zf(N));h.value=S}else h.value=g;else h.value=[]}},{immediate:!0});const k=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([f,d])=>{const g=[];Array.isArray(f)&&f.forEach(C=>{let B=gr(r,d,C,r.valueType);B!==-1&&g.push(B)}),!qe(g,k.value)&&(k.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return k.value.forEach(d=>{let g=h.value[d];f.push(rn(r,g))}),f}),b=f=>{let d=[],g=[];if(h.value.length>0){const C=[];Array.isArray(f)&&f.forEach(B=>{let S=gr(r,h.value,B,"value");S!==-1&&C.push(S);const N=h.value[S];g.push(N),r.valueType==="text"?d.push(Io(r,N)):r.valueType==="item"?d.push(N):d.push(rn(r,N))}),k.value=C}else d=f;p("update:modelValue",d),p("change",d,g)},v=t.ref();if(De({toggleAll:f=>{v.value.toggleAll(f)},toggleReverse:()=>{v.value.toggleReverse()}}),r.source){const f=()=>{const d=[],g=be(r,yr);return h.value.forEach((C,B)=>{const S=rn(r,C),N=Yf(r,C);let V={...g,label:S,disabled:N};const A=Xf(r,C,B);V={...V,...A},i.value&&(V.disabled=!0),c.value&&(V.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 q=s.slots.text(C);T.default=()=>[q]}else{const q=Io(r,C);T.default=()=>q}let w=t.h(l,V,T);d.push(w)}),d};return()=>{const d=f(),g={class:`${e}`,ref:v,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>d}),B={default:()=>C};B.label=s.slots.default,B.prepend=s.slots.prepend,B.append=s.slots.append,B.fixedPreTip=s.slots.fixedPreTip,B.fixedTip=s.slots.fixedTip;const S=be(r,ye,me);return t.h(a,{...S,prop:`${r.prop}_item`},B)}}else return()=>{const f=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:v,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":b},{default:()=>f})}}}}const{componentName:tm,create:nm,scope:om}=G("checkbox-item"),ul=nm(em(tm,om,we,Qn,Xn)),qo={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:lm,create:am}=G("switch"),rm=am({components:{Loading1:ne.Loading1},props:{...qo},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=lm;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}}}),sm={class:"fox-switch-button"};function im(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",sm,[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 Gn=te(rm,[["render",im]]);function cm(e,n,a,o){return{props:{...me,...ye,...qo},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=e,p=Ie(l,"modelValue",null,c),u=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const k={...be(l,qo),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":u},y=[],b=t.h(o,k);y.push(b);const v={default:()=>y};v.label=r.slots.default,v.fixedPreTip=r.slots.fixedPreTip,v.fixedTip=r.slots.fixedTip;const f=be(l,ye,me);return f["content-class"]=m,t.h(a,{...f,prop:`${l.prop}_item`},v)}}}}const{componentName:um,create:dm,scope:fm}=G("switch-item"),dl=dm(cm(um,fm,we,Gn));function mm(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=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=se.useFoxI18n(n),p=m(l,["placeholder"]),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,q=>{u.value=q,c("change",q)});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=Ae(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const q={};return y.value&&(q["text-align"]=y.value),q}),v=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(u.value)?p.placeholder.value:u.value),d=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),C=t.computed(()=>{const q={};return y.value&&(q["text-align"]=y.value),q}),B=()=>{c("focus",u.value)},S=()=>{c("blur",u.value)},N=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),V=t.computed(()=>ve(l.unit)>0),A=q=>{s.value==!0||i.value==!0||c("click")},T=t.computed(()=>l.icon??a),w=t.computed(()=>({action:!0}));return()=>{const q=[];if(typeof r.slots.content=="function"){const I=r.slots.content();q.push(I)}else{const I=[];if(v.value){const z={tabIndex:0,class:k.value,style:b.value,onFocus:B,onBlur:S};let M=null;r.slots.main?M=t.h("view",z,[r.slots.main(f.value)]):M=t.h("view",z,[f.value]),I.push(M)}if(d.value){const z={tabIndex:0,class:g.value,style:C.value,onFocus:B,onBlur:S};let M=null;r.slots.sub?M=t.h("view",z,[r.slots.sub(l.desc)]):M=t.h("view",z,[l.desc]),I.push(M)}const L={class:h.value,onClick:A},x=t.h("view",L,I);q.push(x)}const P=[],E=ce(l.iconSize);let $=r.slots.icon;if(!$){const I={width:E,height:E,class:["action-icon"]};$=t.h(T.value,I)}const F={class:w.value,onClick:A},D=t.h("view",F,{default:()=>[$]});if(P.push(D),V.value){const I=t.h("view",{},[l.unit]);P.push(I)}const j={class:N.value},U=t.h("view",j,{default:()=>P});q.push(U);const Z={default:()=>q};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:pm,create:hm,scope:gm}=G("link-item"),fl=hm(mm(pm,gm,ne.ArrowRight,we)),Mo={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:ym,componentName:vm}=G("rate"),bm=ym({props:{...Mo},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[vm]:!0})),r=k=>{n("update:modelValue",k),n("change",k)},s=(k,y)=>{if(e.disabled||e.readonly)return;let b=0;y===1&&e.modelValue===y||(b=y,e.allowHalf&&k==2&&(b-=.5)),r(b)},i=(k,y,b)=>{let v=0;for(let f=y.value.length-1;f>=0;f--){const d=y.value[f];if(k>d.offsetLeft){b?v=f+(k>d.offsetLeft+d.clientWidth/2?1:.5):v=f+1;break}}return v},c=_e(),m={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,...m,onClick:s,toPxDesc:ge,renderIcon:(k,y)=>t.h(k,y),rateRefs:o,refRandomId:p,slots:a,customIcon:u}}}),km=["id"],Sm={class:"fox-rate-item__icon--full"},Cm={key:0,class:"fox-rate-item__icon--half"},wm={key:1,class:"fox-rate-item__icon--half"};function Nm(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",Sm,[(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",Cm,[(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",wm,[(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,km))),128))],34)}const kt=te(bm,[["render",Nm]]);function Bm(e,n,a,o){return{props:{...me,...ye,...Mo},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=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,readonly:i.value,value:p.value,"onUpdate:modelValue":u},y=[],b=t.h(o,k);y.push(b);const v={default:()=>y};if(r.slots.default){const g=r.slots.default();v.label=()=>g}const f=be(l,ye,me);return f["content-class"]=m,t.h(a,f,v)}}}}const{componentName:Vm,create:Am,scope:Tm}=G("rate-item"),ml=Am(Bm(Vm,Tm,we,kt)),$m=/scroll|auto|overlay/i,Es=window;function Em(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Po(e,n=Es){let a=e;for(;a&&a!==n&&Em(a);){const{overflowY:o}=window.getComputedStyle(a);if($m.test(o))return a;a=a.parentNode}return n}function xs(e,n=Es){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=Po(e.value,n))}),a}const Ds=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,xm={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 Dm(e,n,a){return{props:{...xm},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(),m=xs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),u=t.computed(()=>({[e]:!0})),h=d=>d?d.offsetTop+h(d.offsetParent):0,k=()=>{let d=0,g=0,C="down";if(m.value==window){const B=Ds();c.value&&(d=h(c.value)+c.value.offsetHeight-B-window.innerHeight),g=B}else{const{scrollHeight:B,clientHeight:S,scrollTop:N}=m.value;d=B-S-N,g=N}return p.beforeScrollTop>g?C="up":C="down",p.beforeScrollTop=g,l("scroll-change",g),d<=o.threshold&&C=="down"},y=()=>{Xe(()=>{if(!k()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},b=()=>{m.value&&m.value.addEventListener("scroll",y,o.useCapture)},v=()=>{m.value&&m.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{b(),o.immediate&&y()}),t.onUnmounted(()=>{v()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,b())}),t.onDeactivated(()=>{f.value=!0,v()}),t.watch(()=>o.modelValue,d=>{d||(p.isInfiniting=!1)}),()=>{const d={class:"fox-infinite__container"},g=t.h("view",d,[r?.default?.()]),C=[];if(p.isInfiniting){let V=r?.loading?.()??null;if(!V){let w=r?.loadingIcon?.()??null;if(!w){const E={class:["fox-infinite__bottom-box__img"]};w=t.h(a,E)}const q={class:"fox-infinite__bottom-box__text"},P=t.h("view",q,[i.loadText.value]);V=[w,P]}const A={class:"fox-infinite__bottom-box"},T=t.h("view",A,V);C.push(T)}else if(!o.hasMore){let V=r?.finished?.()??null;if(!V){const A={class:"fox-infinite__bottom-tips"};V=t.h("view",A,[i.loadMoreText.value]),C.push(V)}}const B={class:"fox-infinite__bottom"},S=t.h("view",B,C),N={class:u.value,ref:c};return t.h("view",N,[g,S])}}}}const{componentName:Im,create:qm,scope:Mm}=G("infinite-loading"),Zn=qm(Dm(Im,Mm,ne.Loading)),{componentName:Pm,create:Lm}=G("button"),zm=Lm({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:m,block:p}=t.toRefs(e),u=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=Pm;return{[y]:!0,[`${y}--${o.value}`]:o.value,[`${y}--${l.value}`]:l.value,[`${y}--${r.value}`]:r.value,[`${y}--plain`]:m.value,[`${y}--block`]:p.value,[`${y}--disabled`]:s.value,[`${y}--loading`]:i.value}}),k=t.computed(()=>{const y={};return c?.value&&(m.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}}}),Fm={class:"fox-button__wrap"};function Rm(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",Fm,[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(zm,[["render",Rm]]),Om={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"}},Km=(e,n,a)=>({props:{...Om},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}),m=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),u=A=>{let w=A.target.value;o.maxLength&&w.length>Number(o.maxLength)&&(w=w.slice(0,Number(o.maxLength))),r("update:modelValue",w,A),r("change",w,A)},h=t.ref({}),k=A=>{let w=A.target.value;c.active=!0,h.value=o.focusStyle,r("focus",w,A)},y=A=>{setTimeout(()=>{c.active=!1},0);let w=A.target.value;o.maxLength&&w.length>Number(o.maxLength)&&(w=w.slice(0,Number(o.maxLength))),h.value={},r("blur",w,A)},b=A=>{r("update:modelValue","",A),r("change","",A),r("clear","")},v=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const A={};return v.value||(A.display="none"),A}),d=A=>{o.autoblur&&N.value?.blur(),(typeof A.cancelable!="boolean"||A.cancelable)&&A.preventDefault(),r("search",o.modelValue)},g=A=>{r("keyup-input",A)},C=A=>{r("click-input",A)},B=A=>{r("click-left-icon",o.modelValue,A)},S=t.computed(()=>({textAlign:o.inputAlign})),N=t.ref(null);t.onMounted(()=>{o.autofocus&&N.value.focus()});const V=()=>{const A=[];if(l.leftin){const F={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:B},D=t.h("view",F,[l.leftin()]);A.push(D)}const T={class:`${e}__input-inner-input`,ref:N,style:S.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:C,onInput:u,onFocus:k,onBlur:y,onkeyup:g},w=t.h("input",T),q={class:[`${e}__input-inner`],action:"#",onSubmit:d},P=t.h("form",q,[w]);A.push(P);const E=[];if(o.clearable){const F={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:b},D=l?.clear?.()??o.clearIcon??a,j=t.h("view",F,[t.h(D)]);E.push(j)}if(l.rightin){const F={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},D=t.h("view",F,[l.rightin()]);E.push(D)}if(E.length>0){const F={class:`${e}__input-inner-right`},D=t.h("view",F,E);A.push(D)}const $={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",$,A)};return()=>{const A=[];if(o.label){const q={class:`${e}__search-label`},P=t.h("span",q,[o.label]);A.push(P)}if(l.leftout){const q={class:[`${e}__search-icon`,`${e}__left-search-icon`]},P=t.h("view",q,[l.leftout()]);A.push(P)}const T=V();if(A.push(T),l.rightout){const q={class:[`${e}__search-icon`,`${e}__right-search-icon`]},P=t.h("view",q,[l.rightout()]);A.push(P)}const w={class:`${e}`,style:m.value};return t.h("view",w,A)}}}),{componentName:Um,create:Hm,scope:jm}=G("searchbar"),Jn=Hm(Km(Um,jm,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 Wm(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(Is(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 vr(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Is(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Ym(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Xm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Qm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,s,i){if(Array.isArray(a)){let m=a;typeof i=="function"&&(m=m.filter(i));let p=(o-1)*l,u=p+l;u>m.length&&(u=m.length);const h=m.slice(p,u);return{totalSize:m.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:[]}):($e(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function Gm(){const e=t.getCurrentInstance();return new Qm(e.proxy)}function Zm(e,n,a,o,l,r,s,i,c,m,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),b=y(u,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),v=Gm(),f=t.ref([]),d=t.ref(0),g=t.ref(""),C=t.shallowRef(null),B=t.computed(()=>{const K={};return u.params&&Object.assign(K,u.params),ue(g.value)||(K[`${u.searchKey}`]=g.value),C.value&&Object.assign(K,C.value),K});let S=!0;const N=async(K,H,X)=>{try{if(A.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=vr(u,ee);return!!(typeof re=="string"&&re.includes(g.value))});const Q=await v.load("actionsheet",K,H,X,B.value,S,R??void 0);S=!1,Array.isArray(Q)?(f.value=Q,d.value=1,A.value=!1):!Array.isArray(Q.page)||Q.page.length===0?(console.warn("[FoxUI] can not load more data"),A.value=!1):(Reflect.apply([].push,f.value,Q.page),d.value=Math.ceil(f.value.length/u.pageSize),(Q.totalSize&&f.value.length>=Q.totalSize||X<Q.page.length)&&(A.value=!1)),V.value=!1}catch(R){console.error("[FoxUI] ActionSheet load more data fail",R),A.value=!0,d.value=0,f.value=[]}setTimeout(()=>{k("loaded-data")},250)},V=t.ref(!1),A=t.ref(!0),T=async()=>{if(!u.source){V.value=!1;return}await N(u.source,d.value+1,u.pageSize)};let w=null;t.watch(g,(K,H)=>{w&&(clearTimeout(w),w=null),ue(K)&&!ue(H)&&(w=setTimeout(()=>{P()},u.searchDelayTriggerClear))});const q=()=>{A.value=!0,d.value=0,f.value=[],u.source&&T()},P=()=>{q()};t.watch([()=>u.source,()=>u.pageSize,()=>u.params],async([K,H,X])=>{u.source&&q()},{immediate:!0});const E=t.computed(()=>!u.multiple&&u.isAutoBackFill),$=t.ref([]);let F=null;const D=t.ref(u.visible);t.watch(()=>u.visible,K=>{D.value!==K&&(D.value=K),K?F=[...$.value]:F=null});const j=(K,H)=>{const X=[];return Array.isArray(K)||(K=[K]),K.forEach(R=>{let Q=Wm(u,H,R,u.valueType);Q!==-1&&X.push(Q)}),qe(X,$.value)?!1:($.value=X,!0)};t.watch([()=>u.modelValue,()=>f.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 $.value){const re=f.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=Is(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&&($.value=F)},W=K=>{const H=$.value.indexOf(K);u.multiple?H===-1?$.value.push(K):$.value.splice(H,1):H===-1?$.value=[K]:$.value=[],(E.value||!u.poppable&&!u.showFooter)&&x()},I=K=>{D.value=K,k("update:visible",K)},L=()=>{const K=()=>{_(),I(!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()},x=()=>{const K=U(),H=()=>{Z(K),I(!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=b.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])},M=()=>{let K=null;if(h.search)K=h.search();else{const H={onSearch:q,placeholder:b.seachPlaceholder.value,disabled:u.disabled,modelValue:g.value,"onUpdate:modelValue":X=>{g.value=X}};K=t.h(r,H,{leftin:()=>t.h(m)})}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<f.value.length;H++){const X=f.value[H],R=cn(u,X),Q=vr(u,X),ee=["fox-actionsheet__list-item"],ae={};let re=Ym(u,X),pe=u.iconSize?ce(u.iconSize):null;const ke=Xm(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=$.value.includes(H);re&&ee.push("is-disabled"),Oe&&ee.push("is-checked");const to={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 Ks=O(R,Oe,re,Q,X);Tt.push(Ks);const Us=Y(Oe,re,pe,X);Tt.push(Us),u.textPosition==="right"&&Tt.reverse()}const Os=t.h("view",to,Tt);K.push(Os)}return K},oe=()=>{let K=[];if(h.buttons)K=h.buttons();else{const X=t.h(l,{type:"primary",block:"block",onClick:x,disabled:u.disabled},{default:()=>b.confirmText.value});K.push(X)}return t.h("view",{class:"fox-actionsheet__footer"},[K])};return De({search:async(K=null,H=!0)=>{C.value=K&&t.toRaw(K),t.triggerRef(C),H&&(A.value=!0,d.value=0,f.value=[]),t.nextTick(()=>{T()})},clear:()=>{A.value=!0,d.value=0,f.value=[]},confirm:()=>{x()},cancel:()=>{L()}}),()=>{const K=[];if(u.showHeader){const pe=z();K.push(pe)}if(u.showSearchbar){const pe=M();K.push(pe)}let H=null;if(h.content)H=h.content();else{const pe=J(),ke={hasMore:A.value,loadText:b.loadText.value,loadMoreText:b.loadMoreText.value,modelValue:V.value,"onUpdate:modelValue":Oe=>{V.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&&!E.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:D.value,closeable:!1,"onUpdate:visible":I,position:u.position,round:"round",onClickOverlay:L,closeOnClickOverlay:u.closeOnClickOverlay};return t.h(a,re,{default:()=>ee})}}}}const{componentName:Jm,create:_m,scope:ep}=G("actionsheet-pane"),_n=_m(Zm(Jm,ep,de,Zn,Pe,Jn,ne.CheckNormal,ne.Checked,ne.Close,ne.Search2)),br={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 tp(e,n,a,o,l,r,s){return{props:{...me,...ye,...br,...sn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=Ie(i,"modelValue",null,u),v=t.ref(""),f=t.computed(()=>Array.isArray(v.value)?v.value.join(i.separator):v.value),d="fox-input-item",g=t.computed(()=>({[d]:!0,"is-disabled":m.value,"is-readonly":p.value})),C=Ae(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const x={};return C.value&&(x["text-align"]=C.value),x}),S=t.ref(!1),N=()=>{S.value=!0},V=x=>{S.value=x},A=x=>{b.value=x,u("update:modelValue",x)},T=(x,z)=>{u("change",x,z)},w=x=>{let M=x.target.value;y.value=!0,u("focus",M,x)},q=x=>{setTimeout(()=>{y.value=!1},0);let M=x.target.value;i.maxLength&&M.length>Number(i.maxLength)&&(M=M.slice(0,Number(i.maxLength))),u("blur",M,x)},P=x=>{v.value=x,u("update:text",x)},E=t.computed(()=>({[`${d}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),$=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),D=t.computed(()=>({hidden:!F.value})),j=x=>{b.value="",u("update:modelValue","",x),u("change","",x),u("clear","")},U=t.computed(()=>i.clearable&&!m.value&&!p.value),Z=t.computed(()=>ve(b.value)>0&&y.value),_=x=>{Z.value?j(x):N()},W=t.computed(()=>Z.value&&U.value?o:l),I=t.computed(()=>({action:!0})),L=t.ref(null);return De({search:x=>{L.value&&L.value.search(x)},clear:()=>{L.value&&L.value.clear},confirm:x=>{L.value&&L.value.confirm()},cancel:()=>{L.value&&L.value.cancel()}}),()=>{const x={class:g.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:w,onBlur:q};s&&(x.disabled=!0);const z=[],M=t.h("input",x);z.push(M);const O=[],Y={class:["action-icon"]},J=t.h(W.value,Y),oe={class:I.value,onClick:_},K=t.h("view",oe,{default:()=>[J]});if(O.push(K),$.value){const ke=t.h("view",{class:D.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,sn);Q.ref=L,Q.class=i.actionsheetProps,Q.disabled=m.value||p.value,Q.visible=S.value,Q["onUpdate:visible"]=V,Q.modelValue=b.value,Q["onUpdate:modelValue"]=A,Q.text=v.value,Q["onUpdate:text"]=P,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,br,sn);return t.h(a,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:np,create:op,scope:lp}=G("actionsheet-item"),pl=op(tp(np,lp,we,ne.CircleClose,ne.ArrowRight,_n)),Lo={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:ap,create:rp}=G("input-number"),sp=rp({components:{Minus:ne.Minus,Plus:ne.Plus},props:{...Lo},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const k=ap;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 b=o(k);n("update:modelValue",b,y),n("change",b,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")},m=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 b=k.target.valueAsNumber;b<Number(e.min)?b=Number(e.min):b>Number(e.max)&&(b=Number(e.max)),r(b,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:m,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),ip=["min","max","disabled","readonly","value"];function cp(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,ip),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(sp,[["render",cp]]);function up(e,n,a,o){return{props:{...me,...ye,...Lo},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!s.value&&!i.value}},l.prop??r.attrs.name),m=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"]},b=be(l,Lo),f={...r.attrs,...b,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":u,onAdd:h,onReduce:k},d=t.h(o,f,y),g=[];g.push(d);const C={default:()=>g};C.label=r.slots.default,C.fixedPreTip=r.slots.fixedPreTip,C.fixedTip=r.slots.fixedTip;const B=be(l,ye,me);return B["content-class"]=m,t.h(a,{...B,prop:`${l.prop}_item`},C)}}}}const{componentName:dp,create:fp,scope:mp}=G("inputnumber-item"),hl=fp(up(dp,mp,we,Ze)),pp={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 hp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function kr(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Sr(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function gp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function fo(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Cr(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function wr(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function mo(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let yp=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function vp(){const e=t.getCurrentInstance();return new yp(e.proxy)}function bp(e,n,a,o){return{props:{...pp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=vp(),m=t.ref([]),p=t.computed(()=>m.value.filter(I=>gp(l,I)!==!1)),u=t.ref(-1),h=()=>{const I=l.modelValue,L=p.value.findIndex(x=>kr(l,x)===I);u.value!==L&&(u.value=L,l.scroll&&_(L,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const k=I=>u.value===I,y=I=>{if(I<0&&I>=p.value.length)return!1;const L=p.value[I],z=(mo(l,L,I)??{}).status??fo(l,L);return k(I)||z},b=t.computed(()=>{const I={[i]:!0};return l.mode?I[`is-${l.mode}`]=!0:l.direction&&(I[`is-${l.direction}`]=!0),l.scroll&&(I["is-scroll"]=!0),I}),v=t.computed(()=>({})),f=(I,L,x,z,M)=>{const O={[`${i}__step`]:!0};return M&&(O[`${M}`]=!0),O[`${d.value}`]=!0,z&&(O["is-doit"]=!0),I===u.value?O["is-active"]=!0:L==="done"?O["is-done"]=!0:L==="error"?O["is-error"]=!0:L==="half"?O["is-half"]=!0:x?O["is-disabled"]=!0:O["is-normal"]=!0,O},d=t.computed(()=>{if(l.mode==="simple")return"start";let I=l.align;return I||(l.direction==="vertical"?I="start":I="center"),I}),g=(I,L={})=>{const x={...L};return d.value==="start"&&I===p.value.length-1?x.flex="0 0 auto":l.step?l.direction==="vertical"?x.height=l.step:x.width=l.step:x.flex="1 1 100%",x},C=(I,L)=>{let x={};if(L<p.value.length-1){const z=L+1;y(L)&&y(z)?l.direction==="vertical"?x.height="100%":x.width="100%":x.opacity="0"}return x},B=I=>p.value.length-1===I,S=(I,L)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&L>u.value||u.value===L)return;const x=u.value,z=L;u.value=L,l.scroll&&_(L,!1);const M=kr(l,I);s("update:modelValue",M);const O={fromIndex:x,currentIndex:z,item:I,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",M,O)},N=t.ref(!0),V=async(I,L)=>{try{const x=await c.load("stesbar",I,L);Array.isArray(x)&&(m.value=x),N.value=!1}catch(x){console.error("[FoxUI] Load StepsBar Data Fail",x),m.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([I,L])=>{I&&V(I,L)},{immediate:!0});const A=(I,L,x,z,M)=>{let O=null;if(r.icon)O=r.icon({item:I,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=x??`${L+1}`;O=t.h("span",{},[J])}const Y={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:I,index:L}),!M&&S(I,L)}};return t.h("view",Y,[O])},T=(I,L,x)=>{const z=t.h("i",{class:"fox-steps-bar__line-inner",style:C(I,L)});return t.h("view",{class:"fox-steps-bar__line"},[z])},w=()=>{let I=null;if(r.markIcon)I=r.markIcon();else{const x={};l.iconSize&&(x.width=l.markIconSize,x.height=l.markIconSize);const z=l.markIcon??o;I=t.h(z,x)}return t.h("view",{class:"fox-steps-bar__mark"},[I])},q=(I,L,x,z,M)=>{const O=[];if(!B(L)){const oe=T(I,L);O.push(oe)}const Y=A(I,L,x,z,M);O.push(Y);const J={class:"fox-steps-bar__head"};return t.h("view",J,O)},P=(I,L,x,z)=>{let M=null;r.main?M=r.main({item:I,index:L,status:x}):M=hp(l,I);const O={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:I,index:L}),!z&&S(I,L)}};return t.h("view",O,[M])},E=(I,L,x)=>{let z=null;if(r.sub){z=r.sub({item:I,index:L,status:x});const M={class:"fox-steps-bar__sub"};return t.h("view",M,[z])}return null},$=(I,L)=>{const x=mo(l,I,L)??{},z=x.status??fo(l,I);let M=Sr(l,I);x.disabled===!0&&(M=!0),l.disabled===!0&&(M=!0);const O=x.label??wr(l,I),Y=[],J=A(I,L,O,z,M);J&&Y.push(J);const oe=P(I,L,z,M);if(oe&&Y.push(oe),!B(L)){const ee=T(I,L);ee&&Y.push(ee)}const K=t.h("view",{class:"fox-steps-bar__head"},Y),H=x.class,X=x.style??{};let R=Cr(l,I);x.doit===!0&&(R=!0);const Q={ref:Z(L),class:f(L,z,M,R,H),style:g(L,X)};return t.h("view",Q,[K])},F=(I,L)=>{const x=mo(l,I,L)??{},z=x.status??fo(l,I);let M=Sr(l,I);x.disabled===!0&&(M=!0),l.disabled===!0&&(M=!0);const O=x.label??wr(l,I),Y=[],J=l.layout;for(let R of J)if(R==="head"){const Q=q(I,L,O,z,M);Y.push(Q)}else if(R==="main"){const Q=P(I,L,z,M);Y.push(Q)}else if(R==="sub"){const Q=E(I,L,z);Y.push(Q)}else if(R==="mark"){const Q=w();Y.push(Q)}const oe=x.class,K=x.style??{};let H=Cr(l,I);x.doit===!0&&(H=!0);const X={ref:Z(L),class:f(L,z,M,H,oe),style:g(L,K)};return t.h("view",X,Y)},D=t.ref(),j=t.ref([]),U=(I,L)=>{j.value[L]=I},Z=I=>L=>{U(L,I)},_=(I,L)=>{const x=D.value,z=j.value;if(!x||!z||!z[I])return;const M=z[I];let O=0;l.direction==="vertical"?O=M.offsetTop-(x.offsetHeight-M.offsetHeight)/2:O=M.offsetLeft-(x.offsetWidth-M.offsetWidth)/2,W(x,O,L?0:.3,l.direction)},W=(I,L,x,z)=>{let M=0;const O=z==="horizontal"?I.scrollLeft:I.scrollTop,Y=x===0?1:Math.round(x*1e3/16);function J(){z==="horizontal"?I.scrollLeft+=(L-O)/Y:I.scrollTop+=(L-O)/Y,++M<Y&&Ke(J)}J()};return()=>{const I=[];if(l.mode==="simple")for(let x=0;x<p.value.length;x++){const z=p.value[x],M=$(z,x);I.push(M)}else for(let x=0;x<p.value.length;x++){const z=p.value[x],M=F(z,x);I.push(M)}const L={ref:D,class:b.value,style:v.value};return t.h("view",L,I)}}}}const{componentName:kp,create:Sp,scope:Cp}=G("steps-bar"),gl=Sp(bp(kp,Cp,ne.Checklist,ne.ArrowRight));function wp(e){e.stopPropagation()}class Np{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=nl()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=ol(),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),wp(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 Bp(e,n){return new Np(e,n)}const Vp={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]}},Ap=(e,n,a,o=!1)=>({props:{...Vp},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 d=[`${e}`];return l.customClass&&d.push(l.customClass),d}),m=t.computed(()=>{const d={};return ue(i.top)||(d.top=i.top),ue(i.right)||(d.right=i.right),ue(i.bottom)||(d.bottom=i.bottom),ue(i.left)||(d.left=i.left),ue(l.width)||(d.width=l.width),ue(l.height)||(d.height=l.height),ue(l.color)||(d.color=l.color),ue(l.background)||(d.background=l.background),ue(l.borderRadius)||(d["border-radius"]=l.borderRadius),d}),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},f=Bp(d=>{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},d=>{if(!h.value)return;const g=h.value;k(),i.left=y.x+d.x,i.top=y.y+d.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const d=[h.value];f.open(d)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&f.close()}),()=>{let d=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)d=g;else{const B=t.h(a,{class:p.value});d.push(B)}const C={ref:B=>{h.value=B},class:c.value,style:m.value,onClick:u};return t.h("view",C,d)}}}),{componentName:Tp,create:$p,scope:Ep}=G("floating-button"),yl=$p(Ap(Tp,Ep,ne.Uploader,!1)),xp={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 Dp(e,n,a){return{props:{...xp},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})),m=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 v={class:c.value},f=t.h("span",v,[i.value]);u.push(f)}const h={class:m.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:Ip,create:qp,scope:Mp}=G("more-button"),vl=qp(Dp(Ip,Mp,ne.RectUp)),Pp={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}},Lp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function zp(e,n,a){return{props:{...Pp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,m=t.ref(!0),p=C=>{m.value=C},u=C=>{if(typeof o.unmount=="function")try{o.unmount()}catch(B){console.error(B)}if(typeof o.callback=="function")try{o.callback(C)}catch(B){console.error(B)}},h=()=>{u("confirm")},k=()=>{u("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&u("close")},b=(C,B)=>Lp(C)?(B.src=C,t.h("img",B)):typeof C=="string"?(Array.isArray(B.class)?B.class.push(C):B.class&&typeof B.class=="object"?B[`${C}`]=!0:typeof B.class=="string"?B.class=`${B.class}, ${C}`:B.class=C,t.h(o.tag,B)):t.h(C,B),v=()=>{const C=[];if(o.icon){const S={class:[`${c}__header-icon`]},N=b(o.icon,S);C.push(N)}if(o.title){const S=t.h("view",{class:`${c}__header-title`},[o.title]);C.push(S)}if(o.showClose&&o.closeIcon){const S={class:[`${c}__header-close-icon`],onClick:y},N=b(o.closeIcon,S);C.push(N)}const B={class:[`${c}__header`]};return t.h("view",B,C)},f=(C,B)=>{const S=[];if(B){const V={class:`${c}__group-title`},A=t.h("view",V,[B]);S.push(A)}if(C){const V=[];Array.isArray(C)||(C=[C]);for(let A of C){const T={class:`${c}__group-row`,innerHTML:A},w=t.h("view",T);V.push(w)}if(V.length>0){const A={class:`${c}__group-rows`},T=t.h("view",A,V);S.push(T)}}if(S.length===0)return null;const N={class:`${c}__group`};return t.h("view",N,S)},d=()=>{const C=[];if(typeof o.message=="string")C.push(o.message);else if(Array.isArray(o.message))for(let S of o.message)if(typeof S=="string"){const N=f(S);C.push(N)}else{const N=f(S.content,S.title);C.push(N)}else if(typeof o.message=="function"){const S=o.message();C.push(S)}else{const S=o.message;C.push(S)}const B={class:`${c}__body`};return t.h("view",B,C)},g=()=>{const C=[];if(o.showCancelButton){const S={class:[`${c}__footer-button`],style:{},onClick:k};o.cancelButtonClass&&S.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(S.style,o.cancleButtonStyle);const N=t.h("button",S,[o.cancelButtonText??i.cancelText.value]);C.push(N)}if(o.showConfirmButton){const S={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&S.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(S.style,o.confirmButtonStyle);const N=t.h("button",S,[o.confirmButtonText??i.confirmText.value]);C.push(N)}if(C.length===0)return null;const B={class:`${c}__footer`};return t.h("view",B,C)};return()=>{const C=[],B=v();B&&C.push(B);const S=d();S&&C.push(S);const N=g();N&&C.push(N);const V={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},A=t.h("view",V,C),T=[`${c}__popup`];o.popClass&&T.push(o.popClass);const w={};o.width&&(w.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(w.height=typeof o.height=="number"?`${o.height}px`:o.height);const q={popClass:T.join(" "),style:w,visible:m.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,q,{default:()=>A})}}}}const{componentName:Fp,create:Rp,scope:Op}=G("messagebox"),Kp=Rp(zp(Fp,Op,de)),Up="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",Hp="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",jp="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",Wp="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",Yp=new zn,Xp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Qp=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-${Yp.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(Kp,e);n.appendChild(o),t.render(r,o)},ot={show:(e,n,a,o)=>{const l={...Xp};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=jp:r==="warning"?l.icon=Wp:r==="error"?l.icon=Up:l.icon=Hp),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=m=>{if(typeof c=="function")try{c(m)}catch(p){console.error(p)}s({action:m})},Qp(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}},Gp=(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)},Zp=new zn,Jp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),_p=e=>`${e}-${Zp.get()}`,eh=Symbol.for("InnerPageScopeKey"),th=Symbol.for("PageWrapperKey"),nh="FoxLeave",oh="FoxLeaveEnd",lh={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 ah(e,n,a,o){return{props:{...Fe,...lh},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(eh,!0);const c={};t.provide(th,c);const m=S=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{m()},u=e,h=S=>{k.value=S,i("update:visible",S)},k=t.ref(!1),y=(S,N)=>Jp(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(l.tag,N)):t.h(S,N),b=()=>{if(!l.showHeader)return null;const S=[];if(s.header){const V=s.header();S.push(V)}else if(l.title){const V=t.h("view",{class:`${u}__header-title`},[l.title]);S.push(V)}if(S.length===0)return null;const N={class:[`${u}__header`]};return t.h("view",N,S)},v=()=>{if(!l.showClose)return null;const S={class:[`${u}__close-icon`],onClick:p},N=l.closeIcon??o;return y(N,S)};let f=null;const d=S=>{Gp(oh,{},f)},g=_p(e),C=()=>{h(!0)},B=()=>{if(!f)return;const S=f.querySelector(".fox-overlay");S&&(S.classList.add("overlay-fade-leave-active"),S.classList.add("overlay-fade-leave-to"));const N=f.querySelector(".fox-popup");N&&(N.classList.add(`fox-popup-slide-${l.position}-leave-active`),N.classList.add(`fox-popup-slide-${l.position}-leave-to`),N.addEventListener("animationend",d,{once:!0}),N.addEventListener("transitionend",d,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${g}`),f?.addEventListener(nh,B,{once:!0}),C()}),()=>{const S=[],N=b();N&&S.push(N);const V=v();V&&S.push(V);const A=s.default?s.default():[];Reflect.apply([].push,S,A);const T={[`${u}`]:!0};l.mode&&(T[`${u}--${l.mode}`]=!0);const w={class:T},q=t.h("view",w,S),P=[`${u}__popup`,g];l.popClass&&P.push(l.popClass),l.position&&P.push(`${u}__popup--${l.position}`);const E={};l.width&&(E.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(E.height=typeof l.height=="number"?`${l.height}px`:l.height);const F={...be(l,Fe),popClass:P.join(" "),style:E,visible:k.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},D=t.h(a,F,{default:()=>q});return t.h("div",{class:[`${u}__root`,g]},[D])}}}}const{componentName:rh,create:sh,scope:ih}=G("popup-wrapper"),bl=sh(ah(rh,ih,de,ne.Close)),ch={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function uh(e,n,a,o){return{props:{...ch},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 m={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,m,s),u={class:`${e}`};return t.h("view",u,[p])}}}}const{componentName:dh,create:fh,scope:mh}=G("dropdown"),kl=fh(uh(dh,mh,de));function ph(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 hh={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 gh(e,n,a,o=!1){return{props:{...hh},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={},C=l.textColor??l.color;return C&&(g.color=C),g}),m=(g,C)=>{let B=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const S=l.highlightFilter;if(g.indexOf(S)!==-1){const V=g.replace(new RegExp(S,"g"),`<span>${S}</span>`);C.innerHTML=V,C.class["is-highlight"]=!0,B=t.h(l.tag,C)}}else if(typeof l.highlightFilter=="function"){const S=l.highlightFilter(g);S&&(C.innerHTML=S,C.class["is-highlight"]=!0,B=t.h(l.tag,C))}return B},p=g=>{r.emit("click",g)};let u="";const h=()=>{const g=s.value;if(!g)return;const C=g.clientWidth;ph(g,B=>{const S=g.innerHTML??"";ue(S)||B<C||(u?a?.show(g,S,{type:"text",id:u,showArrow:l.showArrow},!0):u=a?.show(g,S,{type:"text",showArrow:l.showArrow},!0)??"")})},k=()=>{u&&a?.hide(u)};let y=null;const b=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},v=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{k()},l.hideAfter??0)},f=()=>{const g=s.value;g&&(g.addEventListener("mouseover",b),g.addEventListener("mouseleave",v))},d=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",b),g.removeEventListener("mouseleave",v))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||d()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let C=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const V=r.slots.default();if(Array.isArray(V)&&V.length===1){const A=V[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=fe(l.digits),w=fe(l.decimalLength),q=he(l.autoPadding);let P=`${V[0].children}`,E=P.split("").reverse().join("");E=Sn(E,w,q,T,l.separator),P=E.split("").reverse().join(""),l.highlightFilter!==void 0&&(C=m(P,g)),C||(g.innerHTML=P,C=t.h(l.tag,g))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const V=r.slots.default();if(Array.isArray(V)&&V.length===1){const A=V[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=`${V[0].children}`;C=m(T,g),C||(g.innerHTML=T,C=t.h(l.tag,g))}}}C||(C=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return C;let S=null;if(l.icon){const V={[`${e}__mark-wrap`]:!0};l.type&&(V[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const w={class:V,style:A};S=t.h("view",w,t.h(l.icon))}else if(r.slots.mark){const V={[`${e}__mark-wrap`]:!0};l.type&&(V[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const w={class:V,style:A};S=t.h("view",w,{default:r.slots.mark})}else{const V={[`${e}__mark`]:!0};l.type&&(V[`${e}__mark--${l.type??"default"}`]=!0);const A={},T=l.color;T&&(A["background-color"]=T);const w={class:V,style:A};S=t.h("view",w)}const N={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",N,[S,C])}}}}const{componentName:yh,create:vh,scope:bh}=G("text"),Sl=vh(gh(yh,bh,Vt,!1));function kh(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 m=0;c&&m<r.length;m++){let p=r[m],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 m=n[c],p=r[c];const u=m.find(h=>h[o]===p);if(!u)break;s.push(u[a])}else{let c=n;for(let m=0;c&&m<r.length;m++){let p=r[m],u=c.find(h=>h[o]===p);if(!u)break;s.push(u[a]),c=u[l]}}return s}class Sh{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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Ch(){const e=t.getCurrentInstance();return new Sh(e.proxy)}const wh={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 Nh(e,n,a=!1){return{props:{...wh},setup(o,{attrs:l,slots:r}){const s=Ch(),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=kh(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)}),m=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(m,p,{default:()=>c.value}):t.h(m,p,c.value)}}}}const{componentName:Bh,create:Vh,scope:Ah}=G("mapping"),Cl=Vh(Nh(Bh,Ah,!1));function Th(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return Jr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:yV,create:$h,scope:vV}=G("domain-provider"),wl=$h(Th()),Eh={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 xh(e,n){return{inheritAttrs:!1,props:Eh,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;Yi({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(b=>{for(let v of b){let f=!1;v.intersectionRatio>0&&(f=!0);const d=l.get(v.target);if(d)try{if(a.loadPolicy==="lazy"&&!f&&d.visible!==null)return;d.visible=f,d.callback(f)}catch(g){console.error(g)}}},{root:h,rootMargin:k,threshold:y}),r.forEach((b,v)=>{l.set(v,b),p?.observe(v)}),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:bV,create:Dh,scope:kV}=G("rolling-provider"),Nl=Dh(xh()),{componentName:Ih,create:qh}=G("cell"),Mh=qh({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=Ih;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}}}),Ph={key:0,class:"fox-cell__icon"},Lh={key:1,class:"fox-cell__title"},zh={class:"title"},Fh={class:"fox-cell__title-desc"};function Rh(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",Ph,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Lh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",zh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Fh,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 Bl=te(Mh,[["render",Rh]]),{componentName:Oh,create:Kh}=G("cell-group"),Uh=Kh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Oh]:!0}))}}}),Hh={key:1,class:"fox-cell-group__title"},jh={key:3,class:"fox-cell-group__desc"},Wh={class:"fox-cell-group__wrap"};function Yh(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",Hh,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",jh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Wh,[t.renderSlot(e.$slots,"default")])],2)}const Vl=te(Uh,[["render",Yh]]),{componentName:Xh,create:Qh}=G("image"),Gh=Qh({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=Xh;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(b=>{b.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}),m=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:m,stylebox:c,error:u,load:p,show:r,imgRef:s}}}),Zh=["src","date-src","alt"],Jh={key:0,class:"fox-img-loading"},_h={key:1,class:"fox-img-error"};function eg(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,Zh),e.loading?(t.openBlock(),t.createElementBlock("div",Jh,[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",_h,[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 Al=te(Gh,[["render",eg]]),{create:tg}=G("layout"),Tl=tg({}),{componentName:ng,create:og}=G("col"),lg=og({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=ng,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 ag(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 $l=te(lg,[["render",ag]]),{componentName:rg,create:sg}=G("row"),ig=sg({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=rg;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]=Ro(Ne(e),Ne(n)),a==1&&(o==1?e=no(e):n=no(n));let l=Er(e,n);return a?a==2?"-"+Ne(l):e.length<l.length?Ne(l.substring(1)):"-"+Ne(no(l)):Ne(l)}function no(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 Er(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 Ro(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 Er(e,n){[e,n]=Ro(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,La(l[1],r,o,a)?(o?"-":"")+oo(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&&La(i,s,o,a)&&(s=oo(s),s.length>n)?(o?"-":"")+oo(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function La(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 oo(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 ho(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=[],m=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>=m&&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,m--}return p=$t(Ws(p,r)),a==1&&(p="-"+p),p}function Ws(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 go(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 m=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(m==-1)e=Ne(e+new Array(l+1).join("0"));else if(l>m)e=e.replace(".",""),e=Ne(e+new Array(l-m+1).join("0"));else if(l<m){e=e.replace(".","");let p=e.length-m+l;e=Ne(e.substring(0,p)+"."+e.substring(p))}else l==m&&(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 m=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(m+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=m,i="0."+new Array(m).join("0")}for(a=a+2;r<=a;){let m=0;for(;parseInt(c)>=parseInt(n);)c=dn(c,"-"+n),m++;i+=m,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 yo(e,n){return e=e.toString(),n=n.toString(),n=vo(n),dn(e,n)}function vo(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function za(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Fa(e),Fa(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=yo(e,ho(n,Ot(go(e,n),0,Se.FLOOR)));return a+o}function Fa(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ra(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]=Ro(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),yo(n,a)}subtract(n){return new ie(yo(this.value,n.getValue()))}static multiply(n,a){return n=ie.validate(n),a=ie.validate(a),ho(n,a)}multiply(n){return new ie(ho(this.value,n.getValue()))}static divide(n,a,o){return n=ie.validate(n),a=ie.validate(a),go(n,a,o)}divide(n,a){return new ie(go(this.value,n.getValue(),a))}static modulus(n,a){return n=ie.validate(n),a=ie.validate(a),za(n,a)}modulus(n){return new ie(za(this.value,n.getValue()))}static compareTo(n,a){return n=ie.validate(n),a=ie.validate(a),Ra(n,a)}compareTo(n){return Ra(this.value,n.getValue())}static negate(n){return n=ie.validate(n),vo(n)}negate(){return new ie(vo(this.value))}}function xr(e,n){return ie.multiply(`${e}`,`${n}`)}function Oo(e,n,a=8){return ie.divide(`${e}`,`${n}`,a)}function bo(e,n){return e=`${e}`,n=`${n}`,ie.compareTo(e,n)}function Dr(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="",m=r.indexOf(".");m!=-1&&(i=r.substring(0,m),c=r.substring(m+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 Ir(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 qr(e){return e==null}const Cn=Array.isArray,Ys=e=>wn(e)==="[object Map]",Xs=e=>wn(e)==="[object Set]",He=e=>e instanceof Date,fn=e=>typeof e=="function",Mr=e=>typeof e=="string",Qs=e=>typeof e=="symbol",$e=e=>e!==null&&typeof e=="object",gt=e=>$e(e)&&fn(e.then)&&fn(e.catch),Pr=Object.prototype.toString,wn=e=>Pr.call(e),ko=e=>wn(e)==="[object Object]",Lr=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Gs(e){return e.__esModule||Lr&&e[Symbol.toStringTag]==="Module"}const Zs=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 m;Array.isArray(c)?m=i&&Array.isArray(i)?i:[]:m=i&&typeof i=="object"?i:{},n[s]=lt(l,m,c)}else c!==void 0&&(n[s]=c)}}return n}function So(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)&&!ko(s))continue;r=So(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)&&!ko(s))continue;r=So(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const lo=Zs?Promise.resolve():null;function Js(e,...n){lo!==null?n&&n.length>0?lo.then(()=>{e(n)}):lo.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 _s={"[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):_s[a]||"object"}function Nn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function zr(e){return e&&typeof e=="object"&&"setInterval"in e}function Fr(e){let n=!!e&&"length"in e&&e.length,a=at(e);return a==="function"||zr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function Rr(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 ei(e,n=[]){let a=n;return e!=null&&(Fr(Object(e))?Rr(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],m=n[i];if(!qe(c,m))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 Or(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function Kr(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 Ur(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 Hr(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 Oa(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 Co(e,n=!0,a=!0){n?e=Oa(e,".",/\./g):e=e.replace(/\./g,""),a?e=Oa(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function ti(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(qe(e,a))return!0}):n.indexOf(e)}function ni(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 jr=(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 wo(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 Ko{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="*"):Or(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 Ko(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function oi(e,n,a){const o=a;if(o[Ce])return o[Ce];const l=t.inject(Ce,null),r=new Ko(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 li{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 li;function ai(e){zt=e}function ri(e){zt?Object.assign(zt,e):zt=e}function si(e,n){nt(tt).setValidator(e,n)}function ii(e){nt(tt).deleteValidator(e)}let Wr=["blur","clear"];function ci(e){Wr=e}function Yr(){return Wr}let Xr=["focus","change","setValue"];function ui(e){Xr=e}function Qr(){return Xr}function di(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 Gr{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),m=this.proxy??s;return c.validate(s,{context:m}).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=m),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 Gr(n,a,e)}const mn=Symbol.for("EventEmitterKey");class Zr{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 fi(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 mi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function Uo(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 Te=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 pi=new An;function pt(){return pi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Te]??t.inject(Te,null):t.inject(Te,null)}const ao=Symbol("OriginalDateKey");function Ho(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject(Te,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new An(i);c.parent=s;const m=k=>{r[ao]||h(k),c?.set("modelValue",k)},p=()=>c?.getForSelf("modelValue")??null,u=()=>r[ao]??null,h=k=>{const y={};lt(!0,y,t.toRaw(k)),r[ao]=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[Te]=c,t.provide(Te,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=(f,d,...g)=>Reflect.apply(y.emit,y,[f,d,...g]);const b=t.inject(Me,null),v=Vn(r,b,{componentName:""});c.validateSchema=v,r[Me]=v,t.provide(Me,v),r[dt]=new Map,r.validate=(f=!0)=>{const d=[];let g=null;const C={deep:!1};if(f===!0)g={name:"*"};else if(Array.isArray(f)&&f.length>0){const B=f;g={name:S=>S?B.indexOf(S)!==-1:!1}}else if(f!=null&&typeof f=="object"){const B=f;if(Object.assign(C,B),Array.isArray(B.include)&&B.include.length>0){const S=B.include;g={name:N=>N?S.indexOf(N)!==-1:!1}}else if(Array.isArray(B.exclude)&&B.exclude.length>0){const S=B.exclude;g={name:N=>N?S.indexOf(N)===-1:!1}}else g={name:"*"}}if(g){const B=y?.emitToChildren(g,"validate",C);B&&Reflect.apply([].push,d,B)}return d.length==1?d[0]:d.length>1?Promise.all(d).then(B=>{let S=[];return B.forEach(N=>{N.pass===!1&&Array.isArray(N.errors)&&(S=[...S,...N.errors])}),S.length>0?{pass:!1,errors:S}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(f,d=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(f).forEach(B=>{let S=String(B);const N={componentName:"",fieldName:S,pureDataValidate:!0};if(c){const V=es(c,S,N,y,v);r[dt].set(S,V);const A=f[S];A&&V.validateSchema.setRule(A)}});return}if(d){const C=Reflect.ownKeys(f),B={name:S=>C.includes(S)};y?.emitToChildren(B,"setNameValidateRules",f,!1)}},r.clearValidate=(f=!0)=>{let d=null;if(f===!0)d={name:"*"};else if(Array.isArray(f)&&f.length>0){const g=f;d={name:C=>C?g.indexOf(C)!==-1:!1}}else if(f!=null&&typeof f=="object"){const g=f;if(Array.isArray(g.include)&&g.include.length>0){const C=g.include;d={name:B=>B?C.indexOf(B)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const C=g.exclude;d={name:B=>B?C.indexOf(B)===-1:!1}}else d={name:"*"}}d&&y?.emitToChildren(d,"clearValidate",!1)},r.resetFields=f=>{const d=p();if(!d)return;const g={};if(lt(!0,g,u()??{}),Array.isArray(f))f.forEach(C=>{d[C]=g[C]});else if(f&&Array.isArray(f.include))(f.include??[]).forEach(B=>{d[B]=g[B]});else if(f&&Array.isArray(f.exclude)){let C=f.exclude??[];Reflect.ownKeys(g).forEach(B=>{C.includes(B)||(d[B]=g[B])})}else Object.assign(d,g);r.clearValidate(f)},r.setModelValue=(f,d)=>{!d||d===i?m(f):y?.emitToChildren({name:d},"setModelValue",f)},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[Te]=void 0,t.provide(Te,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 Jr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(Te,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[Te]=i,t.provide(Te,i),t.onUnmounted(()=>{i?.destroy(),l[Te]=void 0,t.provide(Te,null),i=null,l=null}),i}function _r(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 Ve(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,b,...v)=>i?Reflect.apply(i.emit,i,[y,b,...v]):null;const c=t.inject(Me,null);e.fieldName=e.fieldName??r;let m=Vn(l,c,e);l[Me]=m,t.provide(Me,m),_r(l,m,r),l.validate=(y=null)=>{if(!m)return Promise.resolve({pass:!0});const b=[];let v=!1,f=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)f=!0,v=!0;else if(y&&typeof y=="object"){const d=y,g=d.ignoreDisabled??!0,C=d.ignoreReadonly??!0,B=d.ignoreHidden??!0;g===!0&&e.disabled===!0||C===!0&&e.readonly===!0||B===!0&&Nn(l.$el)?f=!1:(Array.isArray(d.include)&&d.include.indexOf(r)!==-1||Array.isArray(d.exclude)&&d.exclude.indexOf(r),f=!0),v=d.deep??!1}else typeof y=="boolean"&&(v=y),f=!0;if(f){const d=m?.validate();b.push(d)}if(v){let d=null;const g={deep:!1};if(y===!0)d={name:"*"};else if(Array.isArray(y)&&y.length>0){const C=y;d={name:B=>B?C.indexOf(B)!==-1:!1}}else if(y!=null&&typeof y=="object"){const C=y;if(Object.assign(g,C),Array.isArray(C.include)&&C.include.length>0){const B=C.include;d={name:S=>S?B.indexOf(S)!==-1:!1}}else if(Array.isArray(C.exclude)&&C.exclude.length>0){const B=C.exclude;d={name:S=>S?B.indexOf(S)===-1:!1}}else d={name:"*"}}if(d&&i){const C=i.emitToChildren(d,"validate",g);Reflect.apply([].push,b,C)}}return b.length==1?b[0]:b.length>1?Promise.all(b).then(d=>{let g=[];return d.forEach(C=>{C.pass===!1&&Array.isArray(C.errors)&&(g=[...g,...C.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>m?.setRule(y),l.setNameValidateRules=(y,b=!1)=>{const v=y[r];if(v&&m?.setRule(v),b&&i){const f={name:d=>Reflect.ownKeys(y).includes(d)};i.emitToChildren(f,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&m?.clear();let b=null;if(y===!0)b={name:"*"};else if(Array.isArray(y)&&y.length>0){const v=y;b={name:f=>f?v.indexOf(f)!==-1:!1}}else if(y!=null&&typeof y=="object"){const v=y;if(Array.isArray(v.include)&&v.include.length>0){const f=v.include;b={name:d=>d?f.indexOf(d)!==-1:!1}}else if(Array.isArray(v.exclude)&&v.exclude.length>0){const f=v.exclude;b={name:d=>d?f.indexOf(d)===-1:!1}}else b={name:"*"}}b&&i&&i.emitToChildren(b,"clearValidate",!1)};let p=new Zr(l);l[mn]=p;const u=yt((y="validate")=>{m&&(y==="reset"?m.clear():m.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:Yr()).forEach(y=>{p&&p.on(y,b=>{u("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:Qr()).forEach(y=>{p&&p.on(y,b=>{u("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ce]=void 0,t.provide(Ce,null),i=null,m?.destroy(),l[Me]=void 0,t.provide(Me,null),m=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:m,emitEvent:(y,...b)=>{p&&Reflect.apply(p.emit,p,[y,...b])},onEvent:(y,b)=>{p&&Reflect.apply(p.on,p,[b])},offEvent:(y,b)=>{p&&Reflect.apply(p.off,p,[b])}}}function es(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 b={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const v=p;y={name:f=>f?v.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const v=p;if(Object.assign(b,v),Array.isArray(v.include)&&v.include.length>0){const f=v.include;y={name:d=>d?f.indexOf(d)!==-1:!1}}else if(Array.isArray(v.exclude)&&v.exclude.length>0){const f=v.exclude;y={name:d=>d?f.indexOf(d)===-1:!1}}else y={name:"*"}}if(y&&m){const v=m.emitToChildren(y,"validate",b);Reflect.apply([].push,u,v)}}return u.length==1?u[0]:u.length>1?Promise.all(u).then(y=>{let b=[];return y.forEach(v=>{v.pass===!1&&Array.isArray(v.errors)&&(b=[...b,...v.errors])}),b.length>0?{pass:!1,errors:b}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const u=p[s];u&&c?.setRule(u)};let m=Bn(null,o,s,r);return t.onUnmounted(()=>{c=null,m=null}),{broadcast:m,validateSchema:c}}function Bt(){let n=t.getCurrentInstance()?.proxy,a=new Zr(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 No(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 ts(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,m=e.get("footerBarHeight")??0;No(o,r,n,!0,s,i,c,m);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,b=-1,v=-1,f=0,d=0])=>{No(p,y,n,h,b,v,f,d)}),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 hi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function gi(e){return!!e.getForParent(Qe)}var yn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(yn||{});function ro(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ae(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(ro(c,o))return c}const s=e.value;return ro(s,o)?s:null}):t.computed(()=>{const r=e.value;return ro(r,o)?r:l?.get(n)})}function xe(e){return Ae(e,"readonly",0,function(a){return he(a)})}function Be(e){return Ae(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 ns=new Map,vn=new Map;let Bo=null;function yi(e){Bo=e}function os(e,n,a){if(a){let o=vn.get(a);o||(o=new Map,vn.set(a,o)),o.set(e,n)}else ns.set(e,n)}function Je(e,n,a){!a&&Bo&&(a=Bo(e)??void 0);let o=null;if(a){let l=vn.get(a);l&&(o=l.get(n))}return o||(o=ns.get(n)),o}function vi(e,n){for(let a in e){const o=e[a];os(a,o,n)}}function bi(e){vn.delete(e)}function ki(){return{top:0,left:0,bottom:0,right:0}}function Si(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 Ci(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class wi{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=Ci(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,m=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=m,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({},ki(),n.safeAreaInset),s=Si(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){yi(n)}setAPI(n,a,o){os(n,a,o)}getAPI(n,a,o){return Je(n,a,o)}batchSetAPI(n,a){vi(n,a)}clearScopeAPI(n){bi(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 Ni=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Mr(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),m=n.components;return m&&m.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},ls=(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}},as={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}},rs={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}},ss=[];for(const e in rs)ss.push(e);const Bi=Symbol.for("InnerPageScopeKey"),Vi={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}},Ai=(e,n)=>({inheritAttrs:!0,props:{...me,...as,...Vi},setup(a,{slots:o}){const l=Ho(a.name,a),r=t.inject(Bi,!1);if(l){const p=ts(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(),m=(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),b=t.toRaw(p),v=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(d=>{v.includes(d)||(b[d]=[])}),m(b)}if(u&&k){const y=t.toRaw(k),b=t.toRaw(u),v=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(d=>{v.includes(d)||(b[d]=[])}),m(b,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);m(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);m(p,!0)}}),()=>{const p={class:s.value,style:i.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:Ti,create:$i,scope:sV}=G("page"),jo=$i(Ai(Ti));function Wo(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 Ei=Symbol.for("InnerPageScopeKey"),xi=(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,default:a},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(Ei,!1),m=e,p=t.computed(()=>{const w={[m]:!0,[`${m}--border`]:l.border,[`${m}--fixed`]:l.fixed};return c||(w[`${m}--safe-area-inset-top`]=l.safeAreaInsetTop),w}),u=t.computed(()=>({[`${m}__inner`]:!0,[`${m}__inner--${l.align}`]:!0})),h=l.height!==null&&l.height!==void 0?ce(l.height):null,k=t.computed(()=>{const w={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const q=ze(l.padding??i.headerPadding);return Object.assign(w,q),h&&(i.headerHeight=h),i.headerHeight>0&&(w.height=i.headerHeight),w.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,w.safeAreaTop>0&&(w.top=w.safeAreaTop+(q.top??0),w.height&&w.height>0&&(w.height=w.height+w.safeAreaTop)),w}if(h&&(w.height=h),l.padding){const q=ze(l.padding);Object.assign(w,q)}return w}),y=t.ref(null),b=()=>{if(i&&y.value&&!Nn(y.value)){if(!o){const w=Wo(y.value);i.headerAllHeight=w.height}return i.headerMounted=!0,!0}return!1};let v=null;t.onMounted(()=>{i&&(Uo(b,50,5,50,!0),window.ResizeObserver&&y.value&&(v=new window.ResizeObserver(()=>{b()}),v.observe(y.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,v&&(v.disconnect(),v=null))});const f=t.computed(()=>{const w={};return k.value.height!==null&&k.value.height!==void 0&&(w.height=`${k.value.height}px`),k.value.top!==null&&k.value.top!==void 0&&(w.paddingTop=`${k.value.top}px`),k.value.left!==null&&k.value.left!==void 0&&(w.paddingLeft=`${k.value.left}px`),k.value.right!==null&&k.value.right!==void 0&&(w.paddingRight=`${k.value.right}px`),k.value.bottom!==null&&k.value.bottom!==void 0&&(w.paddingBottom=`${k.value.bottom}px`),w}),d=t.computed(()=>!(k.value.height!==null&&k.value.height!==void 0&&k.value.height<=0));function g(){r.emit("back")}function C(){r.emit("click-title")}function B(){r.emit("click-right")}function S(){r.emit("click-right-text")}const N=()=>{if(!l.leftShow)return null;const w=[];if(r.slots.left)w.push(r.slots.left());else{if(r.slots.leftIcon){const q=t.h("view",{class:"left-icon",onClick:g},[r.slots.leftIcon()]);w.push(q)}else if(l.leftIcon){const q=t.h("view",{class:"left-icon",onClick:g},[t.h(l.leftIcon)]);w.push(q)}if(l.leftText){const q=t.h("view",{class:"left-text",onClick:g},[l.leftText]);w.push(q)}}return w.length===0?null:t.h("view",{class:"fox-header-bar__left"},w)},V=()=>{if(!l.rightShow)return null;const w=[];if(r.slots.right)w.push(r.slots.right());else{if(l.rightText){const q=t.h("view",{class:"right-text",onClick:S},[l.rightText]);w.push(q)}if(r.slots.rightIcon){const q=t.h("view",{class:"right-icon",onClick:B},[r.slots.rightIcon()]);w.push(q)}else if(l.rightIcon){const q=t.h("view",{class:"right-icon",onClick:B},[t.h(l.rightIcon)]);w.push(q)}}return w.length===0?null:t.h("view",{class:"fox-header-bar__right"},w)},A=()=>{if(!l.titleShow)return null;const w=[],q=r.slots.default?r.slots.default():null;if(q)w.push(q);else{if(l.title){const P=t.h("view",{class:"title-text"},[l.title]);w.push(P)}if(r.slots.titleIcon){const P=t.h("view",{class:"title-icon",onClick:C},[r.slots.titleIcon()]);w.push(P)}else if(l.titleIcon){const P=t.h("view",{class:"title-icon",onClick:C},[t.h(l.titleIcon)]);w.push(P)}}return w.length===0?null:t.h("view",{class:"fox-header-bar__title"},w)},T=()=>{const w=[],q=r.slots.bottom?r.slots.bottom():null;return q&&w.push(q),w.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},w)};return()=>{if(!d.value)return null;const w=[];if(r.slots.all)w.push(r.slots.all());else{const P=[],E=N();E&&P.push(E);const $=A();$&&P.push($);const F=V();if(F&&P.push(F),P.length>0){const j=t.h("view",{class:u.value},P);w.push(j)}const D=T();D&&w.push(D)}if(w.length===0)return null;const q={class:p.value,style:f.value,ref:y};return t.h("view",q,w)}}}),{componentName:Di,create:Ii,scope:qi}=G("header-bar"),Yo=Ii(xi(Di,qi,ne.Left,!1)),Mi=Symbol.for("InnerPageScopeKey");function Pi(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(Mi,!1),c=e,m=t.computed(()=>{const v={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(v[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),v}),p=o.height!==null&&o.height!==void 0?ce(o.height):null,u=t.computed(()=>{const v={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const f=ze(o.padding??s.footerPadding);return Object.assign(v,f),p&&(s.footerHeight=p),s.footerHeight>0&&(v.height=s.footerHeight),v.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,v.safeAreaBottom>0&&(v.bottom=v.safeAreaBottom+(f.bottom??0),v.height&&v.height>0&&(v.height=v.height+v.safeAreaBottom)),v}if(p&&(v.height=p),o.padding){const f=ze(o.padding);Object.assign(v,f)}return v}),h=t.ref(null),k=()=>{if(s&&h.value&&!Nn(h.value)){if(!a){const v=Wo(h.value);s.footerAllHeight=v.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(Uo(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 b=t.computed(()=>{const v={};return u.value.height!==null&&u.value.height!==void 0&&(v.height=ge(u.value.height)),u.value.top!==null&&u.value.top!==void 0&&(v.paddingTop=ge(u.value.top)),u.value.left!==null&&u.value.left!==void 0&&(v.paddingLeft=ge(u.value.left)),u.value.right!==null&&u.value.right!==void 0&&(v.paddingRight=ge(u.value.right)),u.value.bottom!==null&&u.value.bottom!==void 0&&(v.paddingBottom=ge(u.value.bottom)),v});return()=>{const v=l.slots.default?l.slots.default():[],f={ref:h,class:m.value,style:b.value};return t.h("view",f,v)}}}}const{componentName:Li,create:zi,scope:Fi}=G("footer-bar"),Xo=zi(Pi(Li,Fi,!1));function Ri(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 m={};if(o&&r){if(a.padding){const f=ze(a.padding);Object.assign(r.contentPadding,f)}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),m.height=h;let k=(r&&r.contentPadding&&r.contentPadding.top)??-1;(k>=0||p>0)&&(k=k<0?0:k,m.paddingTop=`${p+k}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||u>0)&&(y=y<0?0:y,m.paddingBottom=`${u+y}px`);const b=(r&&r.contentPadding&&r.contentPadding.left)??-1;b>=0&&(m.paddingLeft=`${b}px`);const v=(r&&r.contentPadding&&r.contentPadding.right)??-1;return v>=0&&(m.paddingRight=`${v}px`),m}if(a.padding){const p=ze(a.padding);p.left&&(m.paddingLeft=`${p.left}px`),p.top&&(m.paddingTop=`${p.top}px`),p.right&&(m.paddingRight=`${p.right}px`),p.bottom&&(m.paddingBottom=`${p.bottom}px`)}return m}),i=t.ref(null),c=yt(()=>{if(r&&i.value){const m=xn(i.value);r.contentInnerHeight=m.height,r.contentInnerWidth=m.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>s.value,()=>l.value],([])=>{c()}),{contentRef:i,classes:l,styles:s}}}}const{componentName:Oi,create:Ki,scope:iV}=G("content"),Ui=Ki(Ri(Oi));function Hi(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},Qo=te(Ui,[["render",Hi]]),vt="GroupStateKey",is=Symbol.for("GroupScopeKey");function Dn(){return t.inject(is,!1)}function In(e=!0){t.provide(is,e)}function ji(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];qr(l)||(e[o]=l)})}function Wi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};ji(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(vt,r),r}function so(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(vt);if(!c)return;const m=e.get("groupLayout")??{};a===-1&&(a=m.column??1),o===-1&&(o=m.gutter??0),r||(r=m.minItemWidth??-1),s||(s=m.maxItemWidth??-1);const p=ce(r),u=ce(s);i||(i=m.type??"grid");const h=()=>{const k=n===""||n===-1,y=ce(n);let b=fe(a);const v=ce(o);if(!k){let g=(y-(b-1)*v)/b;for(;u!==-1&&g>u;)b++,g=(y-(b-1)*v)/b;for(;p!==-1&&b>1&&g<p;)b--,g=(y-(b-1)*v)/b}let f=!1;const d=c.layout;d.value.width=n,d.value.column!==b&&(d.value.column=b,f=!0),d.value.gutter!==v&&(d.value.gutter=v,f=!0),d.value.type!==i&&(d.value.type=i,f=!0),f&&t.triggerRef(d)};if(l)h();else{const k=++c.passport;setTimeout(()=>{k===c.passport&&h()},50)}}function qn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.layout}function Mn(e,n=!1){let a;return n?a=e.getForParent(vt):a=e.get(vt),a.order}function Ka(e,n=1){if(n==="stretch")return-1;const a=fe(n);return a===-1?100:100*a/e}function Pn(e,n,a=1,o=0,l){const r={};let s=0;l?s=ce(l):s=Ka(n.column,a),s>0&&(r.width=`${s}%`);const i=Ka(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 Ln(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,m=c+(n.column-c);return e.index=e.index+(m-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 cs=Symbol("RollingStateKey");function Yi(e){t.provide(cs,e)}function Xi(){return t.inject(cs,null)}function Vo(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 Qi(e){let n=Vo(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=Vo(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Gi(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const Zi={...me,...as,...rs};function Ji(e,n,a){return{props:Zi,emits:["update:collapse","header-click"],setup(o,l){const r=Ho(o.name,o,ss),s=Wi(r,{type:o.type}),i=Dn();In(!0);const c=o.rollingDisplay?Xi():null,m=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),u=t.computed(()=>i&&r?qn(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,b=t.computed(()=>{const K={};if(K.height=$.value,o.width)o.width!=="auto"&&(K.width=ge(o.width));else{const H=i?Mn(r,!0):null;if(u.value&&H){if(u.value.type==="grid"){const X=Ln(H,u.value,o.span,o.offset);Object.assign(K,X)}else if(u.value.type==="flow"){const X=Pn(H,u.value,o.span,o.offset,o.width);Object.assign(K,X)}}}return K}),v=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}}),f=t.computed(()=>{if(s.layout.value.type==="grid"){let H="";if(o.columnWidth)H=`repeat(auto-fill, ${o.columnWidth})`;else{const X=Gi(V.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}}}),d=t.toRef(o,"gutter"),g=t.toRef(o,"column"),C=t.computed(()=>i||p.value?!0:he(o.isWrap)),B=[],S=K=>{B.push(K)},N=()=>{let K=B.length;B.splice(0,K)},V=t.ref(-1),A=K=>{const H=xn(K).width;H>0&&H!==V.value&&(V.value=H)};so(r,V.value,g.value,d.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([V,g,d],([K,H,X])=>{s.order.index=0,so(r,K,H,X,!1,o.minItemWidth,o.maxItemWidth,o.type)});const T=t.computed(()=>F.value?o.expandText??"":o.collapseText??""),w=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),q=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!F.value,"is-collapse":F.value})),P=t.ref(),E=t.ref(),$=t.computed(()=>D.value||ge(o.height)||""),F=t.ref(!1),D=t.ref(""),j=t.ref(!1);let U=-1;const Z=(K,H=!0)=>{const X=P.value;if(X&&F.value!==K){if(U=U<=0?Qi(X):U,j.value=!0,H)if(X.style["will-change"]="height",X.ontransitionend=function(){X.ontransitionend=null,this.style["will-change"]="auto",K||(D.value="",j.value=!1)},K){let R=0;o.collapseHeight?R=o.collapseHeight:E.value&&E.value.classList.contains(`${e}__header`)&&(R=E.value.offsetHeight),D.value=`${U}px`,t.nextTick(()=>{D.value=`${R}px`})}else D.value=`${U}px`;else if(K){let R=0;o.collapseHeight?R=o.collapseHeight:E.value&&E.value.classList.contains(`${e}__header`)&&(R=E.value.offsetHeight),D.value=`${R}px`}else j.value=!1,D.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=()=>{I()},I=K=>{K=K??!F.value,Z(K)};De({toggleCollapse:I,doLayout:()=>{B[0]&&(A(B[0]),so(r,V.value,g.value,d.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let x=null,z=!0;const M=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(B)&&B.length>0)){const H=B[0];A(H),window.ResizeObserver&&(x=new window.ResizeObserver(()=>{A(H)}),x.observe(H))}},O=()=>{x?.disconnect(),x=null},Y=!p.value||c?.acquire();Y&&(m.value=p.value?!0:null),t.onMounted(()=>{if(Y&&(M(z),z=!1),p.value&&c){let K=null,H=c.initialHeight;c.observe(P.value,X=>{if(X!==m.value)if(X)m.value=!0,F.value||(D.value=""),K=setTimeout(()=>{K=null,m.value!==!1&&(M(z),z=!1)},100);else{if(K!==null&&clearTimeout(K),m.value=!1,!F.value)if(z)D.value=c.initialHeight;else{let R=Vo(P.value);R<=0?D.value=H:(D.value=`${R}px`,H=D.value)}z||O()}})}}),t.onUnmounted(()=>{x?.disconnect(),c&&c.unobserve(P.value)});const J=(K="right")=>{const H=[];if(T.value){const ee={class:w.value},ae=t.h("span",ee,[T.value]);H.push(ae)}const X={class:q.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={...v.value};return H===0&&(Q[`${y}__first`]=!0),X>=R-1&&(Q[`${y}__last`]=!0),t.h("div",{ref:S,key:`${H}`,class:Q,style:f.value},K)};return()=>{if(p.value&&m.value!==!0){const Q=o.tag||"div";return t.h(Q,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:b.value},[])}s.order.index=0;const K=[];let H=0;if(l.slots.header){const Q={key:`${H++}`,ref:E,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:E,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:_},re=t.h("div",ae,Q);K.push(re)}}N();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(C.value){const Q=o.tag||"div";return t.h(Q,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":j.value},style:b.value},[K])}else return K}}}}const{componentName:_i,create:ec,scope:tc}=G("group"),Go=ec(Ji(_i,tc,ne.RectUp));function nc(e){return e===window}const oc=/matrix\((.+)\)/,us=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(nc(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:m}=window.getComputedStyle(l);if(m){const p=oc.exec(m);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 lc{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 ac{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 lc,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 Ua=new ac,ds={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:rc,create:sc}=G("price"),ic=sc({props:{...ds},setup(e){const n=t.computed(()=>({[rc]:!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}}}),cc=["innerHTML"],uc=["innerHTML"];function dc(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,cc)):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,uc)):t.createCommentVNode("",!0)],2)}const Ge=te(ic,[["render",dc]]),{componentName:io,create:fc}=G("hint-text"),mc=fc({components:{Price:Ge},props:{...ds,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),m=(w,q,P,E,$,F)=>{const D=document.documentElement.clientWidth||document.body.clientWidth,j=document.documentElement.clientHeight||document.body.clientHeight,U=w.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 I=0;I<Z.length;I++){const L=Z[I];if(W[0]=L,U[1]&&(W[1]=U[1]),L==="top"){const x=q.y-F-e.arrowSize-e.offset;if(x>=0){_.top=x;let z=0;U[1]==="start"?z=q.x:U[1]==="end"?z=q.x+P-$:z=q.x+P/2-$/2;const M=D-z-$;M<0?(z+=M,u.value=-M):u.value=0,_.left=z<0?0:z;break}}else if(L==="bottom"){const x=q.y+E+e.arrowSize+e.offset;if(x+F<=j){_.top=x;let z=0;U[1]==="start"?z=q.x:U[1]==="end"?z=q.x+P-$:z=q.x+P/2-$/2;const M=D-z-$;M<0?(z+=M,u.value=-M):u.value=0,_.left=z<0?0:z;break}}else if(L==="left"){const x=q.x-$-e.arrowSize-e.offset;if(x>=0){_.left=x;let z=0;U[1]==="start"?z=q.y:U[1]==="end"?z=q.y+E-F:z=q.y+E/2-F/2,_.top=z<0?0:z;break}}else if(L==="right"){const x=q.x+P+e.arrowSize+e.offset;if(x+$<=D){_.left=x;let z=0;U[1]==="start"?z=q.y:U[1]==="end"?z=q.y+E-F:z=q.y+E/2-F/2,_.top=z<0?0:z;break}}}return{bestPlacement:W.join("-"),bestInsetRect:_}},p=(w,q,P=10)=>{if(!it||q===!1||!w)return;o.value=us(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const E=c.value.offsetHeight,$=c.value.offsetWidth,{bestPlacement:F,bestInsetRect:D}=m(e.placement,o.value,l.value,r.value,$,E);s.value=F,a.value=D,i.value=!0},u=t.ref(0),h=yt(()=>{p(e.message,e.visible)},10),k=t.ref(e.visible);t.watch(()=>e.visible,w=>{k.value=w});const y=t.computed(()=>k.value&&b.value),b=t.ref(!0),v=yt(w=>{const q=w[0];q&&(b.value=q.isIntersecting)},10),f=new IntersectionObserver(v);t.watch([()=>e.message,()=>e.visible],([w,q])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Ua.watch(e.reference,h),f.observe(e.reference)}),t.onBeforeMount(()=>{Ua.unwatch(e.reference,h),f.unobserve(e.reference),f.disconnect()});const d=t.computed(()=>{const w={[io]:!0};return s.value.startsWith("top")?w["is-top"]=!0:s.value.startsWith("right")?w["is-right"]=!0:s.value.startsWith("bottom")?w["is-bottom"]=!0:s.value.startsWith("right")&&(w["is-right"]=!0),e.size==="small"?w["is-small"]=!0:e.size==="large"&&(w["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(w[`${e.customClass}`]=!0),w}),g=t.computed(()=>{const w={};a.value.top!==null&&(w.top=`${a.value.top}px`),a.value.right!==null&&(w.right=`${a.value.right}px`),a.value.bottom!==null&&(w.bottom=`${a.value.bottom}px`),a.value.left!==null&&(w.left=`${a.value.left}px`),e.autoFit&&(w["min-width"]=`${l.value}px`);const q=document.documentElement.clientWidth||document.body.clientWidth;return w["max-width"]=`${q}px`,i.value&&(w.opacity="1"),e.transition||(w.transition="none"),e.zIndex&&(w["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(w,e.customStyle),w}),C=t.computed(()=>{const w=[`${io}__content`];return e.customTextClass&&w.push(e.customTextClass),w}),B=t.computed(()=>{const w={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(w,e.customTextStyle),w}),S=t.computed(()=>({[`${io}__arrow`]:!0})),N=t.computed(()=>{const w={};return e.showArrow?(w.width=`${e.arrowSize}px`,w.height=`${e.arrowSize}px`,s.value==="top"?(w.left="50%",w.bottom=`-${e.arrowSize}px`,w.transform=" translate(-50%, 0%)"):s.value==="top-start"?(w.left=`${e.arrowOffset+u.value}px`,w.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(w.right=`${e.arrowOffset-u.value}px`,w.bottom=`-${e.arrowSize}px`):s.value==="right"?(w.left=`-${e.arrowSize}px`,w.top="50%",w.transform=" translate(0%, -50%)"):s.value==="right-start"?(w.left=`-${e.arrowSize}px`,w.top=`${e.arrowOffset}px`):s.value==="right-end"?(w.left=`-${e.arrowSize}px`,w.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(w.left="50%",w.top=`-${e.arrowSize}px`,w.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(w.left=`${e.arrowOffset+u.value}px`,w.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(w.right=`${e.arrowOffset-u.value}px`,w.top=`-${e.arrowSize}px`):s.value==="left"?(w.right=`-${e.arrowSize}px`,w.top="50%",w.transform=" translate(0%, -50%)"):s.value==="left-start"?(w.right=`-${e.arrowSize}px`,w.top=`${e.arrowOffset}px`):s.value==="left-end"&&(w.right=`-${e.arrowSize}px`,w.bottom=`-${e.arrowOffset}px`),w):{display:"none"}}),V=t.computed(()=>y.value&&e.closeOnClick),A=t.computed(()=>{const w={};return e.zIndex&&(w["z-index"]=`${e.zIndex}`),w});return{show:y,tipRef:c,classes:d,styles:g,textClasses:C,textStyles:B,arrowClasses:S,arrowStyles:N,overlayShow:V,overlayStyle:A,onClickOverlay:()=>{k.value=!1,n.emit("update:visible",!1)}}}}),pc=["innerHTML"];function hc(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,pc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const fs=te(mc,[["render",hc]]);class zn{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 Ao={},gc=new zn,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()}},yc=e=>{e.unmount=bn;const n=document.getElementById(e.id);if(n){const a=ht.get(e.id);a?e={...Ao,...a,...e}:e={...Ao,...e},e.transition=!1;const o=t.createVNode(fs,e);return t.render(o,n),e.id}},vc=e=>{e.unmount=bn;let n=e.id??`hinttext_${gc.get()}`;e={...Ao,...e},e.id=n,ht.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(fs,e);return t.render(o,a),document.body.appendChild(a),n},bc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},Vt={show(e,n,a={},o=!0){bc(n);const l=a.id;return l&&ht.has(l)?yc({...a,message:n,reference:e}):(o&&bn(),vc({...a,message:n,reference:e}))},hide(e){bn(e)},install(e){e.config.globalProperties.$hintText=Vt}};function kc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...me,...ye},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Ve({componentName:e,validate:!1},s);const i=je(),c=Dn();In(!1);const m=t.computed(()=>c&&i?qn(i,!1).value:null),p=e,u=t.ref(null),h=t.computed(()=>{const R={[p]:!0,[`${p}__gutter`]:m.value&&m.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(R[l.errorMarkClass]=!!F.value,R[l.warnMarkClass]=!!E.value,R[l.infoMarkClass]=!!q.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?Mn(i,!1):null;if(m.value&&Q){if(m.value.type==="grid"){const ee=Ln(Q,m.value,l.span,l.offset);Object.assign(R,ee)}else if(m.value.type==="flow"){const ee=Pn(Q,m.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}),b=t.ref(null),v=t.computed({get:()=>b.value??he(l.isRequired),set:R=>{b.value=R}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",d=Ae(t.toRef(l,"labelPosition"),"labelPosition",yn.Near),g=t.computed(()=>d&&d.value==="top"?"top":d&&d.value==="right"?"right":"left"),C=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),B=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),S=Ae(t.toRef(l,"labelWidth"),"labelWidth",yn.Near),N=t.computed(()=>S&&S.value?{width:ge(S.value)}:{}),V=t.computed(()=>({"label--string":!0,"label--required":v.value})),A=t.computed(()=>({content:!0,[l.contentClass]:!0})),T=t.computed(()=>({...l.contentStyle})),w=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});De({setRequired(R){v.value=R},setErrorTip(R){w.errorTip=R},setErrorIcon(R){w.errorIcon=R},setWarnTip(R){w.warnTip=R},setWarnIcon(R){w.warnIcon=R},setInfoTip(R){w.infoTip=R},setInfoIcon(R){w.infoIcon=R},setCustomClassName(R){u.value=R},setCustomStyle(R){k.value=R}});const q=t.computed(()=>l.infoTip||w.infoTip),P=t.computed(()=>l.infoIcon||w.infoIcon),E=t.computed(()=>l.warnTip||w.warnTip),$=t.computed(()=>l.warnIcon||w.warnIcon),F=t.computed(()=>l.errorTip||w.errorTip),D=t.computed(()=>l.errorIcon||w.errorIcon),j=t.computed(()=>F.value?"error":E.value?"warn":q.value?"info":""),U=()=>j.value.length>0,Z=t.computed(()=>j.value==="error"?F.value:j.value==="warn"?E.value:j.value==="info"?q.value:""),_=t.computed(()=>j.value==="error"?D.value:j.value==="warn"?$.value:j.value==="info"?P.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}),I=t.computed(()=>{const R={};return d&&d.value==="top"||!f()?R["padding-left"]="0px":S&&S.value&&(R["padding-left"]=ge(S.value)),R}),L=t.ref();let x="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([R,Q,ee,ae])=>{L.value&&(R&&!ue(Q)?x?a.show(L.value,Q,{...ae,id:x,type:ee},!0):x=a.show(L.value,Q,{...ae,type:ee},!0):a.hide(x))});let z=null;const M=()=>{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?M():O()}),t.onMounted(()=>{he(l.appearListen)&&M()}),t.onUnmounted(O);const Y=()=>{if(!f())return null;const R=[],Q=r.slots?.label?.()??l.label,ee={class:V.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:B.value,style:N.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:A.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:I.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:C.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 to={class:h.value,style:y.value,prop:l.prop};return t.h("div",to,R)}}}}const{componentName:Sc,create:Cc,scope:wc}=G("item"),we=Cc(kc(Sc,wc,Vt,!1));function Nc(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=Dn();In(!1);const c=t.computed(()=>{const m={};if(a.width)a.width!=="auto"&&(m.width=ge(a.width));else if(i&&s){const p=qn(s,!1),u=Mn(s,!1);if(p.value&&u){if(p.value.type==="grid"){const h=Ln(u,p.value,a.span,a.offset);Object.assign(m,h)}else if(p.value.type==="flow"){const h=Pn(u,p.value,a.span,a.offset,a.width);Object.assign(m,h)}}}return m});return()=>{const m=[];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}});m.push(k)}m.push(u[h])}else Reflect.apply([].push,m,u)}const p={class:r.value,style:c.value};return t.h("div",p,m)}}}}const{componentName:Bc,create:Vc,scope:cV}=G("row-item"),Zo=Vc(Nc(Bc));function Ac(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=Dn();In(!1);const s=t.computed(()=>r&&l?qn(l,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:a.span==="stretch"})),m=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const u=r&&l?Mn(l,!1):null;if(s.value&&u){if(s.value.type==="grid"){const h=Ln(u,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Pn(u,s.value,a.span,a.offset,a.width);Object.assign(p,h)}}}return p});return()=>{const p={class:c.value,style:m.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Tc,create:$c,scope:uV}=G("slot-item"),Jo=$c(Ac(Tc)),Ha={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 Ec(e,n,a,o){return{props:{...me,...ye,...Ha},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=se.useFoxI18n(n),p=m(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})),b=Ae(t.computed(()=>l.textAlign),"textAlign"),v=t.computed(()=>{const $={};return b.value&&($["text-align"]=b.value),$}),f=$=>{let D=$.target.value;l.type==="digit"&&(D=Co(D,!0)),l.type==="number"&&(D=Co(D,!1)),l.maxLength&&D.length>Number(l.maxLength)&&(D=D.slice(0,Number(l.maxLength))),h.value=D,c("update:modelValue",D,$),c("change",D,$)};let d=Ie(l,"hintText"),g=t.ref(!1);const C=$=>{let D=$.target.value;u.value=!0,ue(d.value)||(g.value=!0),c("focus",D,$)},B=$=>{setTimeout(()=>{g.value&&(g.value=!1),u.value=!1},0);let D=$.target.value;l.maxLength&&D.length>Number(l.maxLength)&&(D=D.slice(0,Number(l.maxLength))),c("blur",D,$)},S=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),N=t.computed(()=>{const $={};return r.slots.append&&!V.value&&!P.value&&($.display="none"),$}),V=t.computed(()=>ve(l.unit)>0),A=t.computed(()=>!P.value),T=t.computed(()=>({[`${k}__unit`]:!0,hidden:!A.value})),w=$=>{h.value="",c("update:modelValue","",$),c("change","",$),c("clear","")},q=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),P=t.computed(()=>{let $=ve(h.value)>0;return he(l.clearable)&&$&&u.value}),E=t.computed(()=>({action:!0,hidden:!P.value}));return()=>{const $={class:y.value,style:v.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:f,onFocus:C,onBlur:B},F=[],D=t.h("input",$);F.push(D);const j=[];if(q.value){const x={class:["action-icon"]},z=t.h(o,x),M={class:E.value,onClick:w},O=t.h("view",M,{default:()=>[z]});j.push(O)}if(V.value){const x=t.h("view",{class:T.value},[l.unit]);j.push(x)}const U={class:S.value,style:N.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 I={...Nt(l,Ha),hintText:d.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,I,_)}}}}const{componentName:xc,create:Dc,scope:Ic}=G("input-item"),_o=Dc(Ec(xc,Ic,we,ne.CircleClose));function ja(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 Wa(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=xr(`${e}`,`${n}`);return ja(o)}else{let o=Oo(`${e}`,Dr(`${n}`),20);return ja(o)}}function qc(e,n=-1,a=!1,o=3,l=","){return Sn(e,n,a,o,l)}function Ya(e,n,a,o,l=!0){if(e==="")return"";if(e=Ir(e),n=fe(n),n==1)return e;if(o)e=Wa(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(fe(a)+2,"0"):e=Oo(e,1,fe(a)));else{let r=-1*n;e=Wa(e,r)}return e}function Xa(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=bo(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=bo(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Qa={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 Mc(e,n,a,o){return{props:{...me,...ye,...Qa},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=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=Ya(U,Z,_,!1);u.value!==W&&(u.value=W)},{immediate:!0});const h=t.computed(()=>{let U="";return m.value&&(U=u.value),U}),{t:k}=se.useFoxI18n(n),y=t.computed(()=>{let U=l.placeholder??"";return!m.value&&!ue(u.value)?U=qc(u.value,l.decimalLength,l.autoPadding,l.digits,l.separator):U=ue(U)?k(["placeholder"]):U,U}),b=e,v=t.computed(()=>({[b]:!0,[`${b}__placeholder`]:u.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),f=Ae(t.computed(()=>l.textAlign),"textAlign"),d=t.computed(()=>{const U={};return f.value&&(U["text-align"]=f.value),U}),g=t.ref(""),C=t.computed(()=>{let U=g.value;return ue(U)&&(U=l.errorTip??""),U}),B=t.ref(""),S=t.ref(!1),N=U=>{let _=U.target.value;if(ue(_)){u.value="",p.value="",c("update:modelValue","",U),c("change","",U),he(l.showTip)&&S.value&&(S.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(!Kr(_)){t.triggerRef(u);return}if(l.integerLength!=-1&&Ur(_)>Number(l.integerLength)){t.triggerRef(u);return}if(l.decimalLength&&l.decimalLength!=-1&&Hr(_)>Number(l.decimalLength)){t.triggerRef(u);return}let W=Xa(_,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}B.value=_,he(l.showTip)&&(S.value=_.length>0),u.value=_,p.value=Ya(_,l.rates,l.precision,!0),c("update:modelValue",p.value,U),c("change",p.value,U)},V=U=>{if(m.value=!0,he(l.showTip)){let Z=u.value;ue(Z)&&(Z=l.hintText),ue(Z)||(B.value=Z,S.value=!0)}g.value="",c("focus",p.value,U)},A=U=>{if(setTimeout(()=>{m.value=!1,he(l.showTip)&&S.value===!0&&(S.value=!1)},0),!ue(u.value)){let Z=Xa(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(()=>({[`${b}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),w=t.computed(()=>{const U={};return r.slots.append&&!q.value&&!D.value&&(U.display="none"),U}),q=t.computed(()=>ve(l.unit)>0),P=t.computed(()=>!D.value),E=t.computed(()=>({[`${b}__unit`]:!0,hidden:!P.value})),$=U=>{p.value="",c("update:modelValue","",U),c("change","",U),c("clear","")},F=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),D=t.computed(()=>{let U=ve(p.value)>0;return he(l.clearable)&&U&&m.value}),j=t.computed(()=>({action:!0,hidden:!D.value}));return()=>{let U={class:v.value,style:d.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:N,onFocus:V,onBlur:A},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:$},K=t.h("view",oe,{default:()=>[J]});W.push(K)}if(q.value){const Y=t.h("view",{class:E.value},[l.unit]);W.push(Y)}const I={class:T.value,style:w.value},L=t.h("view",I,{default:()=>W});Z.push(L);const x={default:()=>Z};x.label=r.slots.default,x.prepend=r.slots.prepend,x.append=r.slots.append,x.fixedPreTip=r.slots.fixedPreTip,x.fixedTip=r.slots.fixedTip;let M={...Nt(l,Qa),errorTip:C.value,hintText:B.value,hintVisible:S.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,M,x)}}}}const{componentName:Pc,create:Lc,scope:zc}=G("money-item"),el=Lc(Mc(Pc,zc,we,ne.CircleClose)),To={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:Fc,create:Rc,scope:Oc}=G("textarea"),Kc=Rc({props:{...To},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=se.useFoxI18n(Oc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Fc;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:b}=e.autosize;y!==void 0&&(k=Math.min(k,y)),b!==void 0&&(k=Math.max(k,b))}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})}}}}),Uc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Hc={key:0,class:"fox-textarea__limit"};function jc(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,Uc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Hc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Fn=te(Kc,[["render",jc]]);function Wc(e,n,a,o){return{props:{...me,...ye,...To},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=Ie(l,"modelValue",null,c),p=b=>{m.value=b,c("update:modelValue",b,{}),c("change",b,{})};let u=Ie(l,"hintText"),h=t.ref(!1);const k=b=>{ue(u.value)||(h.value=!0),c("focus",m.value,b)},y=b=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",m.value,b)};return()=>{const v={...be(l,To),disabled:s.value,readonly:i.value,value:m.value,"onUpdate:modelValue":p,onFocus:k,onBlur:y},f=[],d=t.h(o,v);f.push(d);const g={default:()=>f};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 C=be(l,ye,me);return t.h(a,{...C,prop:`${l.prop}_item`},g)}}}}const{componentName:Yc,create:Xc,scope:Qc}=G("textarea-item"),tl=Xc(Wc(Yc,Qc,we,Fn));function Gc(e){return e===window}const Ee=e=>{const n=t.unref(e);if(Gc(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 Zc=2e3;const Ga=()=>Zc++,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:{}}},Jc=(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=Ga());const r=t.computed(()=>{const b=e,v=[b,`${b}--${a.position}`];return a.round&&v.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&v.push(`${b}--${a.position}--safebottom`),typeof a.popClass=="string"?v.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{v.push(f)}),v}),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=Ga(),a.destroyOnClose&&(l.showSlot=!0),o("open")},m=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=b=>{o("click-pop",b)},u=b=>{b.stopPropagation(),o("click-close-icon",b),o("update:visible",!1)},h=b=>{o("click-overlay",b),a.closeOnClickOverlay&&o("update:visible",!1)},k=b=>{o("opend",b)},y=b=>{o("closed",b)};return t.watch(()=>a.visible,b=>{a.visible?c():m()}),t.watch(()=>a.closeable,b=>{l.closed=b}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:u,onClickOverlay:h,onOpened:k,onClosed:y}}});let xt=0;const Za="fox-overflow-hidden",Ja=()=>it?document.body:{classList:[]},_c=e=>[()=>{if(e())try{!xt&&Ja().classList.add(Za),xt++}catch{}},()=>{if(e()&&xt)try{xt--,!xt&&Ja().classList.remove(Za)}catch{}}],eu={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:tu,create:nu}=G("overlay"),ou=nu({props:{...eu},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=_c(()=>e.lockScroll),l=t.computed(()=>({[tu]:!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 lu(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(ou,[["render",lu]]),{componentName:au,create:ru}=G("popup"),su=ru(Jc(au,{FoxOverLay:rt,Close:ne.Close}));function iu(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(su,[["render",iu]]),_a=10;function ms(e,n){return e>n&&e>_a?"horizontal":n>e&&n>_a?"vertical":""}function nl(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function ol(){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 m=s.touches[0];e.deltaX=m.clientX-e.startX,e.deltaY=m.clientY-e.startY,e.moveX=m.clientX,e.moveY=m.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=ms(e.offsetX,e.offsetY))},start:s=>{if(o(),s.touches){const m=s.touches[0];e.startX=m.clientX,e.startY=m.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),m=t.ref(0),p=t.ref(""),u=()=>p.value==="vertical",h=()=>p.value==="horizontal",k=()=>{s.value=0,i.value=0,c.value=0,m.value=0,p.value="",a.value=0};return{move:v=>{if(v.touches){const g=v.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const d=v;s.value=d.clientX-e.value,i.value=d.clientY-n.value,l.value=d.clientX,r.value=d.clientY}c.value=Math.abs(s.value),m.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=ms(c.value,m.value))},start:v=>{if(k(),v.touches){const g=v.touches[0];e.value=g.clientX,n.value=g.clientY}else{const d=v;e.value=d.clientX,n.value=d.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:m,direction:p,isVertical:u,isHorizontal:h}}const ps={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}},$o={...Fe,...ps,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 hs=36;function cu(){return hs}function uu(e){hs=e}function Le(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Eo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function du(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 er(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let fu=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function mu(){const e=t.getCurrentInstance();return new fu(e.proxy)}function tr(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 pu(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 m=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 tr(e,p,i)});if(m==-1)break;l.push(m)}else{let s=a[0];for(let i=0;i<n.length;i++){const c=n[i];let m=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 tr(e,u,c)});if(m==-1)break;l.push(m);const p=Eo(e,s[m]);if(!Array.isArray(p))break;s=p}}return l}function nr(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 m=i[c],p=Le(e,m);if(l.texts.push(p),l.items.push(m),r==="text")l.values.push(p);else if(r==="value"){let u=st(e,m);u==null&&(u=p),l.values.push(u)}else l.values.push(m)}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 m=s[c],p=Object.assign({},m);p.children=null;const u=Le(e,m);if(l.texts.push(u),l.items.push(p),r==="text")l.values.push(u);else if(r==="value"){let h=st(e,m);h==null&&(h=u),l.values.push(h)}else l.values.push(p);if(!Array.isArray(m.children))break;s=m.children}}return l}function or(e){return{text:e,value:e}}const hu=15,gu=300,yu=200,{create:vu}=G("picker-column");function bu(e){e.stopPropagation()}function ku(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&bu(e)}const Su=vu({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},...ps},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=N=>N>=u.currIndex+8||N<=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=N=>`transform: rotate3d(1, 0, 0, ${-u.rotation*N}deg) translate3d(0px, 0px, 104px)`,m=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=N=>Le(e,N),k=N=>st(e,N),y=_e(),b=()=>{u.transitionEndTrigger&&(u.transitionEndTrigger(),u.transitionEndTrigger=null)},v=(N,V=!1,A=!1)=>{if(u.currIndex=N,V){const T=()=>{u.moving=!1,n("update:modelValue",N),n("change",N)};A?u.transitionEndTrigger=T:T()}},f=(N,V,A)=>{let T=N+u.startDistance;if(V==="end"){const w=-(e.source.length-1)*e.itemHeight;T<w&&(T=w),T>0&&(T=0);let q=Math.abs(Math.round(-T/e.itemHeight));const P=-q*e.itemHeight,E=`${(q+1)*u.rotation}deg`,$=A?A>0:!1;v(q,!0,$),d(P,V,A,E)}else{let w=(-T/e.itemHeight+1)*u.rotation;const q=(e.source.length+1)*u.rotation,P=0;if(w=Math.min(Math.max(w,P),q),e.threeDimensional&&(w<P||w>q))return;d(T,null,void 0,`${w}deg`)}},d=(N=0,V,A=yu,T)=>{V==="end"?u.scrollTime=A:u.scrollTime=0,u.deg=T,u.scrollDistance=N},g=(N,V)=>(N=Math.abs(N/V)/.003*(N<0?-1:1),N),C=N=>{e.readonly||(u.startDistance=u.scrollDistance,y.start(N),u.transitionEndTrigger=null)},B=N=>{e.readonly||(u.moving=!0,y.move(N),y.isVertical()&&(u.moving=!0,ku(N,!0)),f(y.deltaY.value,"",0))},S=()=>{if(e.readonly)return;const N=y.deltaY.value,V=y.duration.value;if(V<gu&&Math.abs(N)>hu){const T=g(N,V);f(T,"end",e.swipeDuration)}else f(N,"end",0)};return t.watch(()=>e.modelValue,N=>{const V=u.currIndex-N;if(V!==0){u.currIndex=N,u.startDistance=u.scrollDistance;const A=V*e.itemHeight;f(A,"",0)}}),t.watch(()=>e.source,N=>{if(u.currIndex>=N.length){const T=(N.length-1-u.currIndex)*e.itemHeight;u.startDistance=u.scrollDistance,f(T,"end",0)}}),t.watch(()=>e.visible,N=>{N===!1&&b()}),t.onMounted(()=>{const N=-e.modelValue*e.itemHeight;f(N)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:k,...t.toRefs(u),roller:p,getItemText:Le,onTouchStart:C,onTouchMove:B,onTouchEnd:S,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:m,stopMomentum:b}}}),Cu={key:1,class:"fox-picker__item-tile"};function wu(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",Cu,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Nu=te(Su,[["render",wu]]),{create:Bu,componentName:Vu,scope:Au}=G("picker"),Tu=Bu({components:{Column:Nu,Popup:de},props:{...$o},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=se.useFoxI18n(Au),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(cu());t.watch(()=>e.visible,w=>{w&&s.value<=0&&setTimeout(()=>{if(r.value){const q=Ee(r.value);s.value=q.height,uu(s.value)}},50)});const i=t.computed(()=>({[Vu]:!0})),c=mu(),m=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([w,q])=>{if(w){let P=await c.load("picker",w,q);if(P.length>0){let E=P[0];if(Array.isArray(E)){if(typeof E[0]=="string"){let $=P,F=[];$.forEach(D=>{let j=D.map(U=>or(U));F.push(j)}),p.value=F}else p.value=P;m.value="multipleColumn"}else if(typeof E=="string"){let $=P,F=[],D=$.map(j=>or(j));F.push(D),p.value=F,m.value="singleColumn"}else{const $=Eo(e,E);Array.isArray($)?(m.value="cascade",p.value=[P]):(m.value="singleColumn",p.value=[P])}}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],([w,q])=>{let P=pu(e,w,q,m.value);if(!qe(P,y.value)){y.value=P;let E=nr(e,P,q,m.value);E&&(u.value=E.texts,n("update:text",u.value))}});const b=t.ref(e.visible);t.watch(()=>e.visible,w=>{b.value=w});const v=w=>{let q=er(e,w);return $e(q)?q.defaultIndex??0:0},f=w=>{if(e.readonly===!0)return!0;let q=er(e,w);return $e(q)?q.readonly??!1:!1},d=(w,q)=>{let P=y.value;P[w]=q;for(let $=0;$<w;$++)P[$]==null&&(P[$]=v($));if(m.value==="cascade")for(let $=w+1;$<C.value.length;$++){let F=v($);$<P.length?P[$]=F:P.push(F)}else for(let $=P.length;$<C.value.length;$++){let F=v($);P.push(F)}y.value=P;let E=nr(e,P,p.value,m.value);E&&(u.value=E.texts,h.value=E.values,k.value=E.items)},g=w=>w<y.value.length?y.value[w]:v(w),C=t.computed(()=>{if(p.value.length==0)return[];if(m.value=="singleColumn"||m.value=="multipleColumn")return p.value;let w=[],q=0,P=p.value[0],E=0;for(;;){let $=P.map(j=>{let U=Object.assign({},j);return du(e,U,null),U});w.push($),q>=y.value.length?E=0:E=y.value[q],(E<0||E>=P.length)&&(E=0);let F=P[E];const D=Eo(e,F);if(!Array.isArray(D))break;P=D,q++}return w}),B=t.computed(()=>fe(+e.visibleItemCount-1)/2*s.value),S=(w=!1)=>{if(e.readonly===!0){w&&n("update:visible",!1);return}let q=p.value.length-1;for(;q>=0&&!(y.value[q]===null||y.value[q]===void 0);q--);if(q>=0&&d(q,0),m.value==="singleColumn"){let P=h.value.length>0?h.value[0]:"",E=k.value.length>0?k.value[0]:null;n("update:modelValue",P),n("update:text",u.value),n("change",P,E),w&&(n("confirm",P),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",u.value),n("change",h.value,k.value),w&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:C,dataType:m,show:b,itemHeight:s,top:B,isReadonly:f,getIndex:g,change:(w,q)=>{if(d(w,q),e.isAutoBackFill){const P=!b.value;S(P)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{S(!0)},clear:()=>{if(e.readonly===!0){n("update:visible",!1);return}m.value==="singleColumn"?(n("update:modelValue",""),n("change","")):(n("update:modelValue",[]),n("change",[])),n("clear",""),n("update:visible",!1)}}}}),$u={class:"fox-picker__bar"},Eu={class:"fox-picker__title"},xu={class:"fox-picker__bar__action"},Du={class:"fox-picker__column"};function Iu(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",$u,[t.createElementVNode("view",Eu,t.toDisplayString(e.title),1),t.createElementVNode("view",xu,[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",Du,[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,m)=>(t.openBlock(),t.createElementBlock("view",{key:m,class:"fox-picker__columnitem"},[t.createVNode(s,{visible:e.show,source:c,readonly:e.isReadonly(m),"column-index":m,modelValue:e.getIndex(m),"onUpdate:modelValue":p=>e.change(m,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(Tu,[["render",Iu]]);function qu(e,n,a,o,l,r,s=!0){return{props:{...me,...ye,...$o,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 m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=Ie(i,"modelValue",null,u),v=t.ref([]),f=t.computed(()=>Array.isArray(v.value)?v.value.join(i.separator):v.value),d="fox-input-item",g=t.computed(()=>({[d]:!0,"is-disabled":m.value,"is-readonly":p.value})),C=Ae(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const L={};return C.value&&(L["text-align"]=C.value),L}),S=t.ref(!1),N=()=>{S.value=!0},V=L=>{S.value=L},A=L=>{b.value=L,u("update:modelValue",L)},T=(L,x)=>{u("change",L,x)},w=L=>{let z=L.target.value;y.value=!0,u("focus",z,L)},q=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)},P=L=>{v.value=L,Array.isArray(L)&&L.length===0?u("update:text",L[0]):u("update:text",L)},E=t.computed(()=>({[`${d}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),$=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),D=t.computed(()=>({hidden:!F.value})),j=L=>{b.value="",u("update:modelValue","",L),u("change","",L),u("clear","")},U=t.computed(()=>i.clearable&&!m.value&&!p.value),Z=t.computed(()=>ve(b.value)>0&&y.value),_=L=>{Z.value?j(L):N()},W=t.computed(()=>Z.value&&U.value?o:l),I=t.computed(()=>({action:!0}));return()=>{const L={class:g.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:w,onBlur:q};s&&(L.disabled=!0);const x=[],z=t.h("input",L);x.push(z);const M=[],O={class:["action-icon"]},Y=t.h(W.value,O),J={class:I.value,onClick:_},oe=t.h("view",J,{default:()=>[Y]});if(M.push(oe),$.value){const re=t.h("view",{class:D.value},[i.unit]);M.push(re)}const K={class:E.value},H=t.h("view",K,{default:()=>M});x.push(H);const X={default:()=>x};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,$o);R.disabled=!1,R.readonly=m.value||p.value,R.visible=S.value,R["onUpdate:visible"]=V,R.modelValue=b.value,R["onUpdate:modelValue"]=A,R.text=v.value,R["onUpdate:text"]=P,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:Mu,create:Pu,scope:Lu}=G("picker-item"),ll=Pu(qu(Mu,Lu,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]:m,...p}=o,u={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:m,_parent:n};return u.children&&u.children.length&&(u.children=on(u.children,u,a)),u}),gs=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&gs(o.children,n)},zu={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Fu=(e,n)=>{const a={...zu,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(m=>{m={...m};const{[l]:p,[r]:u}=m,h=c[u]=c[u]||[];!i.length&&u===o&&(i=h),h.push(m),m.children=c[p]||(c[p]=[])}),s&&Object.keys(c).forEach(m=>{c[m].length>1&&c[m].sort((p,u)=>p[s]-u[s])}),c=null,i},Ru={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}},lr=(e,n)=>n[e.textKey],Dt=(e,n)=>n[e.valueKey],Ou=(e,n)=>n[e.visibleKey],ar=(e,n)=>n[e.disabledKey],Ku=(e,n)=>{const a=n[e.doitKey];return he(a)},Uu=(e,n)=>{const a=n[e.numKey];return a==null?null:fe(n[a])},rr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Hu(e,n,a,o=!1){return{props:{...Ru},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}),m=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,D(!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 b.value||(W.display="none"),W}),y=t.ref(),b=t.ref(!1),v=()=>{const W=!b.value;f(W)},f=W=>{const I=W;I?(b.value=I,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",()=>{b.value=!1},{once:!0}):setTimeout(()=>{b.value=!1},0))},d=t.ref(),g=t.ref([]),C=(W,I)=>{g.value[I]=W},B=W=>I=>{C(I,W)},S=(W,I)=>{const L=d.value,x=g.value;if(!L||!x||!x[W])return;const z=x[W];let M=0;l.direction==="vertical"?M=z.offsetTop-(L.offsetHeight-z.offsetHeight)/2:M=z.offsetLeft-(L.offsetWidth-z.offsetWidth)/2,N(L,M,I?0:.3,l.direction)},N=(W,I,L,x)=>{let z=0;const M=x==="horizontal"?W.scrollLeft:W.scrollTop,O=L===0?1:Math.round(L*1e3/16);function Y(){x==="horizontal"?W.scrollLeft+=(I-M)/O:W.scrollTop+=(I-M)/O,++z<O&&Ke(Y)}Y()},V=(W,I)=>{const L=Dt(l,W),x={};return x[`${e}__titles-item`]=!0,x.disabled=ar(l,W),x.active=L===u.value,l.shape&&(x[`${l.shape}`]=!0),l.ellipsis&&(x.ellipsis=!0),I&&(I.class&&(x[`${I.class}`]=!0),I.disabled===!0&&(x.disabled=I.disabled)),x},A=(W,I)=>{const L={};if(p.value>0){const x=Math.abs(p.value/2);l.direction==="vertical"?(L["margin-top"]=`${x}px`,L["margin-bottom"]=`${x}px`):(L["margin-left"]=`${x}px`,L["margin-right"]=`${x}px`)}return I&&I.style&&Object.assign(L,I.style),L},T=(W,I)=>`${Dt(l,W)??I}`,w=(W,I)=>{const L=Dt(l,W),x={};x[`${e}__popup-item`]=!0,x.disabled=ar(l,W),x.active=L===u.value,l.shape&&(x[`${l.shape}`]=!0);const z=rr(l,W,I);return z&&z.disabled===!0&&(x.disabled=z.disabled),x},q=t.computed(()=>(l.data??[]).filter(I=>Ou(l,I)!==!1)),P=(W,I)=>{const L=Dt(l,W);if(s("click",W,I),u.value==L)return;const x=()=>{u.value=L,l.scroll&&S(I,!1),s("update:modelValue",L),s("change",W,I)};if(typeof l.beforeChange=="function"){const z=l.beforeChange(W,I);gt(z)?z.then(M=>{M!==!1&&x()}).catch(()=>{x()}):z!==!1&&x()}else x()},E=(W,I)=>function(){P(W,I)},$=(W,I)=>{P(W,I),f(!1)},F=(W,I)=>function(){$(W,I)},D=W=>{if(!Array.isArray(l.data)||!l.scroll)return;const I=l.data.findIndex(L=>Dt(l,L)===u.value);I!==-1&&S(I,W)};t.watch(()=>l.data,()=>{setTimeout(D,0)}),t.onMounted(()=>{D(!0)});const j=(W,I)=>{if(r.item)return r.item({item:W,index:I});const L=rr(l,W,I),x=[];if(r.text){const Y=r.text({item:W,index:I});x.push(Y)}else{const Y=[];if(L?.doit===!0||Ku(l,W)){const H={class:[`${e}__titles-item-tip`,"doit"]},X=t.h("view",H);Y.push(X)}const J=L?.num??Uu(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(lr(l,W));const K=t.h("view",oe,Y);x.push(K)}const z={class:`${e}__titles-item-line`},M=t.h("view",z);x.push(M);const O={ref:B(I),class:V(W,L),style:A(W,L),key:T(W,I),onClick:E(W,I)};return t.h("view",O,x)},U=()=>{const W=r.default?r.default():[];if(W.length===0)for(let L=0;L<q.value.length;L++){const x=q.value[L],z=j(x,L);W.push(z)}const I={ref:d,class:c.value,style:m.value};return t.h("view",I,W)},Z=()=>{let W=null;r.navigation?W=r.navigation():W=t.h(a);const I={class:`${e}__navigation`,onClick:v};return t.h("view",I,[W])},_=()=>{const W=[];for(let L=0;L<q.value.length;L++){const x=q.value[L];let z=null;r.popupItem?z=r.popupItem({item:x,index:L}):z=lr(l,x);const M={class:w(x,L),key:T(x,L),onClick:F(x,L)},O=t.h("view",M,[z]);W.push(O)}const I={class:h.value,style:k.value};return t.h("view",I,W)};return()=>{const W=[],I=U();if(W.push(I),l.showQuickNavigation){const x=Z();W.push(x);const z=_();W.push(z)}const L={class:i.value};return t.h("view",L,W)}}}}const{create:ju,componentName:Wu,scope:Yu}=G("tabs-bar"),Rn=ju(Hu(Wu,Yu,ne.MoreH,!1)),ys=Symbol("TabsStatesKey"),Xu={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Qu(e,n,a=!1){return{props:{...Xu},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:b=>{const v={name:b};i.current.value===b&&(v.loaded=!0),s.value.push(v),t.triggerRef(s)},remove:b=>{const v=s.value.findIndex(f=>f.name===b);v!==-1&&s.value.splice(v,1)},isLoaded:b=>{if(!o.lazy)return!0;const v=s.value.findIndex(f=>f.name===b);return v!==-1?i.current.value?s.value[v].loaded??!1:v===0:!1}};t.provide(ys,i);const c=b=>{const v=s.value.findIndex(f=>f.name===b);v!==-1&&(s.value[v].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([b,v])=>{i.current.value!==b&&(i.current.value=b??"",c(b??"")),i.direction.value!==v&&(i.direction.value=v)});const m=t.ref(null),p=t.ref(null),u=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const k=t.computed(()=>{const b={},v=s.value.length;if(v<=0)return b;const f=s.value.findIndex(d=>d.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(b.height=`${v*i.tabHeight.value}px`,f!==-1&&(b.transform=`translate(0, -${f*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(b.width=`${v*i.tabWidth.value}px`,f!==-1&&(b.transform=`translate(-${f*i.tabWidth.value}px, 0)`)),h&&(h=!1,b.transition="transform 0s ease"),b});let y=null;return t.onMounted(()=>{if(!m.value)return;const b=()=>{const v=xn(m.value);i.tabWidth.value=v.width,i.tabHeight.value=v.height};window.ResizeObserver&&(y=new window.ResizeObserver(b),y.observe(m.value)),b()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const b={class:`${e}__panes`,style:k.value,ref:p},v=t.h("view",b,[r?.default?.()]),f={class:u.value,ref:m};return t.h("view",f,[v])}}}}const{create:Gu,componentName:Zu,scope:Ju}=G("tabs-container"),On=Gu(Qu(Zu,Ju,!1)),_u={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function ed(e,n,a){return{props:{..._u},setup(o,{emit:l,slots:r}){const s=t.inject(ys);t.onMounted(()=>{s.add(o.paneKey)}),t.onBeforeUnmount(()=>{s.remove(o.paneKey)});const i=t.computed(()=>{const m={};return s.direction.value==="vertical"&&s.tabHeight.value>0?m.height=`${s.tabHeight.value}px`:s.tabWidth.value>0&&(m.width=`${s.tabWidth.value}px`),m}),c=t.computed(()=>o.loaded!=null?he(o.loaded):s.isLoaded(o.paneKey));return()=>{let m=[];if(c.value)m=r?.default?.()??[];else if(r.empty)m=r.empty();else{const u={class:`${e}__empty-icon`},h=o.emptyIcon??a,k=t.h(h,u),y={class:`${e}__empty-text`},b=o.emptyText??"Loading",v=t.h("view",y,[b]),f={class:`${e}__empty`},d=t.h("view",f,[k,v]);m.push(d)}const p={class:`${e}`,style:i.value};return t.h("view",p,m)}}}}const{create:td,componentName:nd,scope:od}=G("tabs-pane"),Kn=td(ed(nd,od,ne.Loading));class sr{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 gs(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:ld,scope:ad}=G("cascader-pane"),rd=ld({components:{Loading:ne.Loading,Checklist:ne.Checklist,TabsBar:Rn,TabsContainer:On,TabsPane:Kn},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(ad),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 sr([],{})),c=t.ref([]),m=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((d,g)=>({text:d.selectedNode?d.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:d}=e;o.value.convertConfig&&(d=Fu(d,o.value.convertConfig)),i.value=new sr(d,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),m.value&&!i.value.nodes.length&&await b({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y(!m.value)},y=async(d=!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 C=g;if(m.value&&Array.isArray(g)&&g.length){C=[];let B=i.value.nodes.find(S=>S.value===g[0]);if(B){C=[B.value],r.value=!0;const S=await g.slice(1).reduce(async(N,V)=>{const A=await N;await b(A);const T=A?.children?.find(w=>w.value===V);return T&&C.push(V),Promise.resolve(T)},Promise.resolve(B));await b(S),r.value=!1}}C.length&&g===e.modelValue&&i.value.getPathNodesByValue(C).map((S,N)=>{l.value=N,f.handleNode(S,d)})},b=async d=>{if(!d)return;if(!o.value.lazyLoad){d.leaf=!0;return}if(i.value.isLeaf(d,m.value)||i.value.hasChildren(d,m.value))return;d.loading=!0;const g=d.root?null:d;let C=u.get(d);C||(C=new Promise(S=>{o.value.lazyLoad?.(d,S)}),u.set(d,C));const B=await C;Array.isArray(B)&&B.length>0?i.value.updateChildren(B,g):d.leaf=!0,d.loading=!1,u.delete(d)},v=d=>{const g=d.map(C=>C.value);s.value=g,n("change",g,d),n("pathChange",d),n("update:modelValue",g)},f={async handleNode(d,g){const{disabled:C,loading:B}=d;if(!(!g&&C||!c.value[l.value])){if(i.value.isLeaf(d,m.value)){if(d.leaf=!0,c.value[l.value].selectedNode=d,c.value=c.value.slice(0,d.level+1),!g){const S=c.value.map(N=>N.selectedNode);v(S),n("pathChange",S)}return}if(i.value.hasChildren(d,m.value)){const S=d.level+1;if(c.value[l.value].selectedNode=d,c.value=c.value.slice(0,S),c.value.push({nodes:d.children||[],selectedNode:null}),l.value=S,!g){const N=c.value.map(V=>V.selectedNode);n("pathChange",N)}return}h=d,!B&&(await b(d),h===d&&(c.value[l.value].selectedNode=d,f.handleNode(d,g)))}},handleTabChange(d,g){h=null},formatTabTitle(d){return d.selectedNode?d.selectedNode.text:a("select")},isSelected(d,g){return d.selectedNode&&d.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{k()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,d=>{qe(d,s.value)||(s.value=d,y())}),t.watch(()=>e.visible,d=>{d&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),sd={class:"fox-cascader"},id={role:"menu",class:"fox-cascader__pane"},cd=["aria-checked","aria-disabled","onClick"],ud={class:"fox-cascader__item__title"},dd=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function fd(e,n,a,o,l,r){const s=t.resolveComponent("TabsBar"),i=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),m=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",sd,[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(m,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",id,[(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",ud,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,cd))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(m,{key:1,"pane-key":0},{default:t.withCtx(()=>[dd]),_:1}))]),_:1},8,["modelValue"])])}const md=te(rd,[["render",fd]]),{create:pd}=G("cascader"),hd=pd({components:{FoxCascaderPane:md,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}}}),gd=["innerHTML"];function yd(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,gd)):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 Un=te(hd,[["render",yd]]);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 vs(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 bs(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])??"",m={[e.textKey]:r,[e.valueKey]:c};l.push(m);const p=vs(e,n[s]);Array.isArray(p)&&bs(e,p,a,o+1,l);return}}function ks(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])??"",m={[e.textKey]:c,[e.valueKey]:r};l.push(m);const p=vs(e,n[s]);Array.isArray(p)&&ks(e,p,a,o+1,l);return}}function co(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 vd=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`),[]):($e(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function bd(){const e=t.getCurrentInstance();return new vd(e.proxy)}const ir={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 kd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...ir},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=bd(),v=t.ref([]),f=t.ref([]),d=t.computed(()=>{if(Array.isArray(f.value)){if(i.showAllLevels===!1){const z=f.value.length-1;return f.value[z]}return f.value.join(i.separator)}else return f.value}),g=t.ref([]),C=t.ref([]);t.watch([()=>i.modelValue,()=>v.value],async([z,M])=>{if(u("setValue",z),i.lazy===!0){C.value.length==0&&(g.value=Array.isArray(z)?z:[]);return}if(i.valueType==="item"){let O=z;if(!co(i,O,C.value)){C.value=O;let Y=tn(i,O);f.value=Y.texts,g.value=Y.values}}else if(i.valueType==="text"){let O=z,Y=[];if(bs(i,M,O,0,Y),!co(i,Y,C.value)){C.value=Y;let J=tn(i,Y);O.value=J.texts,g.value=J.values}}else{let O=[];if(ks(i,M,z,0,O),!co(i,O,C.value)){C.value=O;let Y=tn(i,O);f.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,M])=>{z&&(v.value=await b.load(z,M))},{immediate:!0});const B="fox-input-item",S=t.computed(()=>({[B]:!0,"is-disabled":m.value,"is-readonly":p.value})),N=Ae(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const z={};return N.value&&(z["text-align"]=N.value),z}),A=t.ref(!1),T=()=>{m.value===!0||p.value===!0||(A.value=!0)},w=z=>{A.value=z},q=(z,M)=>{let O=M.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});C.value=O;let Y=tn(i,O);f.value=Y.texts,g.value=Y.values,i.valueType==="text"?(u("change",f.value,O),u("update:modelValue",f.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)},P=z=>{let M=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",M)},E=z=>{y.value=!0,u("focus",g.value,z)},$=z=>{setTimeout(()=>{y.value=!1},0),u("blur",g.value,z)},F=t.computed(()=>({[`${B}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),D=t.computed(()=>ve(i.unit)>0),j=t.computed(()=>ve(i.unit)>0&&!y.value),U=t.computed(()=>({hidden:!j.value})),Z=z=>{C.value=[],f.value=[],g.value=[],u("update:modelValue",[]),u("change",[],z),u("clear",[]),u("update:pathNodes",[])},_=t.computed(()=>i.clearable&&!m.value&&!p.value),W=t.computed(()=>{let z=g.value&&g.value.length>0;return i.clearable&&z&&y.value}),I=z=>{W.value?Z(z):T()},L=t.computed(()=>W.value&&_.value?o:l),x=t.computed(()=>({action:!0}));return()=>{const z={class:S.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:d.value,onClick:T,onFocus:E,onBlur:$};s&&(z.disabled=!0);const M=[],O=t.h("input",z);M.push(O);const Y=[],J={class:["action-icon"]},oe=t.h(L.value,J),K={class:x.value,onClick:I},H=t.h("view",K,{default:()=>[oe]});if(Y.push(H),D.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});M.push(R);const Q={default:()=>M};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=A.value,ee["onUpdate:visible"]=w,ee.modelValue=g.value,ee.onChange=q,ee.onPathChange=P,ee.options=v.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,ir);return t.h(a,{...re,prop:`${i.prop}_item`},Q)}}}}const{componentName:Sd,create:Cd,scope:wd}=G("cascader-item"),al=Cd(kd(Sd,wd,we,ne.CircleClose,ne.ArrowRight,Un,!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 Ss={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",m="day",p="week",u="month",h="quarter",k="year",y="date",b="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,d={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(P,E,$){var F=String(P);return!F||F.length>=E?P:""+Array(E+1-F.length).join($)+P},C={s:g,z:function(P){var E=-P.utcOffset(),$=Math.abs(E),F=Math.floor($/60),D=$%60;return(E<=0?"+":"-")+g(F,2,"0")+":"+g(D,2,"0")},m:function P(E,$){if(E.date()<$.date())return-P($,E);var F=12*($.year()-E.year())+($.month()-E.month()),D=E.clone().add(F,u),j=$-D<0,U=E.clone().add(F+(j?-1:1),u);return+(-(F+($-D)/(j?D-U:U-D))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:u,y:k,w:p,d:m,D:y,h:c,m:i,s,ms:r,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},B="en",S={};S[B]=d;var N=function(P){return P instanceof w},V=function P(E,$,F){var D;if(!E)return B;if(typeof E=="string"){var j=E.toLowerCase();S[j]&&(D=j),$&&(S[j]=$,D=j);var U=E.split("-");if(!D&&U.length>1)return P(U[0])}else{var Z=E.name;S[Z]=E,D=Z}return!F&&D&&(B=D),D||!F&&B},A=function(P,E){if(N(P))return P.clone();var $=typeof E=="object"?E:{};return $.date=P,$.args=arguments,new w($)},T=C;T.l=V,T.i=N,T.w=function(P,E){return A(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var w=function(){function P($){this.$L=V($.locale,null,!0),this.parse($)}var E=P.prototype;return E.parse=function($){this.$d=function(F){var D=F.date,j=F.utc;if(D===null)return new Date(NaN);if(T.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(v);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(D)}($),this.$x=$.x||{},this.init()},E.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},E.$utils=function(){return T},E.isValid=function(){return this.$d.toString()!==b},E.isSame=function($,F){var D=A($);return this.startOf(F)<=D&&D<=this.endOf(F)},E.isAfter=function($,F){return A($)<this.startOf(F)},E.isBefore=function($,F){return this.endOf(F)<A($)},E.$g=function($,F,D){return T.u($)?this[F]:this.set(D,$)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function($,F){var D=this,j=!!T.u(F)||F,U=T.p($),Z=function(O,Y){var J=T.w(D.$u?Date.UTC(D.$y,Y,O):new Date(D.$y,Y,O),D);return j?J:J.endOf(m)},_=function(O,Y){return T.w(D.toDate()[O].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Y)),D)},W=this.$W,I=this.$M,L=this.$D,x="set"+(this.$u?"UTC":"");switch(U){case k:return j?Z(1,0):Z(31,11);case u:return j?Z(1,I):Z(0,I+1);case p:var z=this.$locale().weekStart||0,M=(W<z?W+7:W)-z;return Z(j?L-M:L+(6-M),I);case m:case y:return _(x+"Hours",0);case c:return _(x+"Minutes",1);case i:return _(x+"Seconds",2);case s:return _(x+"Milliseconds",3);default:return this.clone()}},E.endOf=function($){return this.startOf($,!1)},E.$set=function($,F){var D,j=T.p($),U="set"+(this.$u?"UTC":""),Z=(D={},D[m]=U+"Date",D[y]=U+"Date",D[u]=U+"Month",D[k]=U+"FullYear",D[c]=U+"Hours",D[i]=U+"Minutes",D[s]=U+"Seconds",D[r]=U+"Milliseconds",D)[j],_=j===m?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},E.set=function($,F){return this.clone().$set($,F)},E.get=function($){return this[T.p($)]()},E.add=function($,F){var D,j=this;$=Number($);var U=T.p(F),Z=function(I){var L=A(j);return T.w(L.date(L.date()+Math.round(I*$)),j)};if(U===u)return this.set(u,this.$M+$);if(U===k)return this.set(k,this.$y+$);if(U===m)return Z(1);if(U===p)return Z(7);var _=(D={},D[i]=o,D[c]=l,D[s]=a,D)[U]||1,W=this.$d.getTime()+$*_;return T.w(W,this)},E.subtract=function($,F){return this.add(-1*$,F)},E.format=function($){var F=this,D=this.$locale();if(!this.isValid())return D.invalidDate||b;var j=$||"YYYY-MM-DDTHH:mm:ssZ",U=T.z(this),Z=this.$H,_=this.$m,W=this.$M,I=D.weekdays,L=D.months,x=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")},M=D.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:x(D.monthsShort,W,L,3),MMMM:x(L,W),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:x(D.weekdaysMin,this.$W,I,2),ddd:x(D.weekdaysShort,this.$W,I,3),dddd:I[this.$W],H:String(Z),HH:T.s(Z,2,"0"),h:z(1),hh:z(2),a:M(Z,_,!0),A:M(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(f,function(Y,J){return J||O[Y]||U.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function($,F,D){var j,U=T.p(F),Z=A($),_=(Z.utcOffset()-this.utcOffset())*o,W=this-Z,I=T.m(this,Z);return I=(j={},j[k]=I/12,j[u]=I,j[h]=I/3,j[p]=(W-_)/6048e5,j[m]=(W-_)/864e5,j[c]=W/l,j[i]=W/o,j[s]=W/a,j)[U]||W,D?I:T.a(I)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return S[this.$L]},E.locale=function($,F){if(!$)return this.$L;var D=this.clone(),j=V($,F,!0);return j&&(D.$L=j),D},E.clone=function(){return T.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P}(),q=w.prototype;return A.prototype=q,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",m],["$M",u],["$y",k],["$D",y]].forEach(function(P){q[P[1]]=function(E){return this.$g(E,P[0],P[1])}}),A.extend=function(P,E){return P.$i||(P(E,w,A),P.$i=!0),A},A.locale=V,A.isDayjs=N,A.unix=function(P){return A(1e3*P)},A.en=S[B],A.Ls=S,A.p={},A})})(Ss);var Nd=Ss.exports;const Re=Ye(Nd);var Cs={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(b){return(b=+b)+(b>68?1900:2e3)},m=function(b){return function(v){this[b]=+v}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var f=v.match(/([+-]|\d\d)/g),d=60*f[1]+(+f[2]||0);return d===0?0:f[0]==="+"?-d:d}(b)}],u=function(b){var v=i[b];return v&&(v.indexOf?v:v.s.concat(v.f))},h=function(b,v){var f,d=i.meridiem;if(d){for(var g=1;g<=24;g+=1)if(b.indexOf(d(g,0,v))>-1){f=g>12;break}}else f=b===(v?"pm":"PM");return f},k={A:[s,function(b){this.afternoon=h(b,!1)}],a:[s,function(b){this.afternoon=h(b,!0)}],S:[/\d/,function(b){this.milliseconds=100*+b}],SS:[l,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,m("seconds")],ss:[r,m("seconds")],m:[r,m("minutes")],mm:[r,m("minutes")],H:[r,m("hours")],h:[r,m("hours")],HH:[r,m("hours")],hh:[r,m("hours")],D:[r,m("day")],DD:[l,m("day")],Do:[s,function(b){var v=i.ordinal,f=b.match(/\d+/);if(this.day=f[0],v)for(var d=1;d<=31;d+=1)v(d).replace(/\[|\]/g,"")===b&&(this.day=d)}],M:[r,m("month")],MM:[l,m("month")],MMM:[s,function(b){var v=u("months"),f=(u("monthsShort")||v.map(function(d){return d.slice(0,3)})).indexOf(b)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[s,function(b){var v=u("months").indexOf(b)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,m("year")],YY:[l,function(b){this.year=c(b)}],YYYY:[/\d{4}/,m("year")],Z:p,ZZ:p};function y(b){var v,f;v=b,f=i&&i.formats;for(var d=(b=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,T,w){var q=w&&w.toUpperCase();return T||f[w]||a[w]||f[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,E,$){return E||$.slice(1)})})).match(o),g=d.length,C=0;C<g;C+=1){var B=d[C],S=k[B],N=S&&S[0],V=S&&S[1];d[C]=V?{regex:N,parser:V}:B.replace(/^\[|\]$/g,"")}return function(A){for(var T={},w=0,q=0;w<g;w+=1){var P=d[w];if(typeof P=="string")q+=P.length;else{var E=P.regex,$=P.parser,F=A.slice(q),D=E.exec(F)[0];$.call(T,D),A=A.replace(D,"")}}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(b,v,f){f.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var d=v.prototype,g=d.parse;d.parse=function(C){var B=C.date,S=C.utc,N=C.args;this.$u=S;var V=N[1];if(typeof V=="string"){var A=N[2]===!0,T=N[3]===!0,w=A||T,q=N[2];T&&(q=N[2]),i=this.$locale(),!A&&q&&(i=f.Ls[q]),this.$d=function(F,D,j){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*F);var U=y(D)(F),Z=U.year,_=U.month,W=U.day,I=U.hours,L=U.minutes,x=U.seconds,z=U.milliseconds,M=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=I||0,H=L||0,X=x||0,R=z||0;return M?new Date(Date.UTC(J,oe,Y,K,H,X,R+60*M.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("")}}(B,V,S),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),w&&B!=this.format(V)&&(this.$d=new Date("")),i={}}else if(V instanceof Array)for(var P=V.length,E=1;E<=P;E+=1){N[1]=V[E-1];var $=f.apply(this,N);if($.isValid()){this.$d=$.$d,this.$L=$.$L,this.init();break}E===P&&(this.$d=new Date(""))}else g.call(this,C)}}})})(Cs);var Bd=Cs.exports;const Vd=Ye(Bd);var ws={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"],m=i%100;return"["+i+(c[(m-20)%10]||c[m]||c[0])+"]"},r.format=function(i){var c=this,m=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 m.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return m.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)}}})})(ws);var Ad=ws.exports;const Td=Ye(Ad);var Ns={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,b){var v=u.name?u:u.$locale(),f=s(v[h]),d=s(v[k]),g=f||d.map(function(B){return B.slice(0,y)});if(!b)return g;var C=v.weekStart;return g.map(function(B,S){return g[(S+(C||0))%7]})},c=function(){return l.Ls[l.locale()]},m=function(u,h){return u.formats[h]||function(k){return k.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,b,v){return b||v.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 m(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 m(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)}}})})(Ns);var $d=Ns.exports;const Ed=Ye($d);var Bs={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 m=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=s(this).startOf(o).add(1,o).date(m),u=s(this).endOf(a);if(p.isBefore(u))return 1}var h=s(this).startOf(o).date(m).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)}}})})(Bs);var xd=Bs.exports;const Dd=Ye(xd);var Vs={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}}})})(Vs);var Id=Vs.exports;const qd=Ye(Id);var As={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")}}})})(As);var Md=As.exports;const Pd=Ye(Md);var Ts={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)}}})})(Ts);var Ld=Ts.exports;const zd=Ye(Ld);var $s={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)}}})})($s);var Fd=$s.exports;const Rd=Ye(Fd);Re.extend(Ed);Re.extend(Td);Re.extend(Vd);Re.extend(Dd);Re.extend(qd);Re.extend(Pd);Re.extend(zd);Re.extend(Rd);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,m=r+(6-s)*864e5,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(m));return[p,u]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,m=r+(7-s)*i,p=this.date2Str(new Date(c)),u=this.date2Str(new Date(m));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}},cr=new Date().getFullYear(),rl={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)},xo=(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 Do={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(cr-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(cr+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:Od,scope:Kd}=G("date-picker"),Ud=Od({components:{[bt.name]:bt},props:{...Do},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=se.useFoxI18n(Kd),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,d=>{l.value=d});function r(d,g){return new Date(d,g,0).getDate()}const s=(d,g)=>{const C=e[`${d}Date`],B=C.getFullYear();let S=1,N=1,V=0,A=0;d==="max"&&(S=12,N=r(g.getFullYear(),g.getMonth()+1),V=23,A=59);const T=A;return g.getFullYear()===B&&(S=C.getMonth()+1,g.getMonth()+1===S&&(N=C.getDate(),g.getDate()===N&&(V=C.getHours(),g.getHours()===V&&(A=C.getMinutes())))),{[`${d}Year`]:B,[`${d}Month`]:S,[`${d}Date`]:N,[`${d}Hour`]:V,[`${d}Minute`]:A,[`${d}Seconds`]:T}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:d,maxDate:g,maxMonth:C,maxHour:B,maxMinute:S,maxSeconds:N}=s("max",h.value),{minYear:V,minDate:A,minMonth:T,minHour:w,minMinute:q,minSeconds:P}=s("min",h.value);let E=[{type:"year",range:[V,d]},{type:"month",range:[T,C]},{type:"day",range:[A,g]},{type:"hour",range:[w,B]},{type:"minute",range:[q,S]},{type:"seconds",range:[P,N]}];switch(e.type){case"date":E=E.slice(0,3);break;case"datetime":E=E.slice(0,5);break;case"time":E=E.slice(3,6);break;case"year-month":E=E.slice(0,2);break;case"month-day":E=E.slice(1,3);break;case"datehour":E=E.slice(0,4);break;case"hour-minute":E=E.slice(3,5);break}return E}),c=(d,g,C)=>{if(!(g>d))return null;const B=[];for(;d<=g;)e.isShowChinese?B.push({text:d+o[C],value:d}):B.push({text:`${d}`,value:d}),C==="minute"?d+=e.minuteStep:d++;return B},m=t.computed(()=>{let d=[];return i.value.forEach(g=>{let C=c(g.range[0],g.range[1],g.type);C&&d.push(C)}),d}),p=(d,g)=>d==="year"?g.getFullYear():d==="month"?g.getMonth()+1:d==="day"?g.getDate():d==="hour"?g.getHours():d==="minute"?g.getMinutes():d==="seconds"?g.getSeconds():0,u=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,d=>{let g;if(typeof d=="string"?d.length==0?g=new Date:e.valueFormat?g=kn(e,e.modelValue,e.valueFormat):g=kn(e,d,rl[e.type]):He(d)?g=d:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let C=[];i.value.forEach(B=>{let S=p(B.type,g);C.push(S)}),u.value=C}},{immediate:!0});const k=d=>{if(e.type==="date"){const g=d[0],C=d[1]-1,B=Math.min(d[2],r(g,C+1));B!==d[2]&&(d[2]=B),h.value=new Date(g,C,B)}else if(e.type==="datetime"){const g=d[0],C=d[1]-1,B=Math.min(d[2],r(g,C+1)),S=d[3],N=d[4];B!==d[2]&&(d[2]=B),h.value=new Date(g,C,B,S,N)}else if(e.type==="time"){const g=d[0],C=d[1],B=d[2],S=h.value??new Date,N=new Date(S.getFullYear(),S.getMonth(),S.getDate(),g,C,B);h.value=N}else if(e.type==="year-month"){const g=d[0],C=d[1]-1;h.value=new Date(g,C)}else if(e.type==="month-day"){const C=(h.value??new Date).getFullYear(),B=d[0]-1,S=Math.min(d[1],r(C,B+1));S!==d[1]&&(d[1]=S);const N=new Date(C,B,S);h.value=N}else if(e.type==="datehour"){const g=d[0],C=d[1]-1,B=Math.min(d[2],r(g,C+1)),S=d[3];B!==d[2]&&(d[2]=B),h.value=new Date(g,C,B,S)}else if(e.type==="hour-minute"){const g=d[0],C=d[1],B=h.value??new Date,S=new Date(B.getFullYear(),B.getMonth(),B.getDate(),g,C);h.value=S}u.value=d};return{columns:m,dateIndexs:u,show:l,onChange:d=>{k(d)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:d=>{k(d),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let C=xo(e,g,e.valueFormat);n("update:modelValue",C)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",d)},onClear:()=>{n("clear")}}}});function Hd(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 Hn=te(Ud,[["render",Hd]]),jd={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Wd(e){let n=e.format;if(!n){let a=e.type??"date";n=rl[a]}return n}function Yd(e,n,a,o,l,r,s=!1){return{props:{...me,...ye,...Do,...jd},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),v=Ie(i,"modelValue",I=>I==null?null:typeof I=="string"?I.length==0?null:i.valueFormat?kn(i,I,i.valueFormat)??I:kn(i,I,rl[i.type])??I:He(I)?I:null,u),f=t.computed(()=>{if(!v.value)return"";const I=Wd(i);return xo(i,v.value,I)}),d="fox-input-item",g=t.computed(()=>({[d]:!0,"is-disabled":m.value,"is-readonly":p.value})),C=Ae(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const I={};return C.value&&(I["text-align"]=C.value),I}),S=t.ref(!1),N=()=>{S.value=!0},V=()=>{S.value=!1};c.expose({showPicker:N,hidePicker:V});const A=I=>{S.value=I},T=I=>{if(v.value=I,i.valueFormat){let L=xo(i,I,i.valueFormat);u("update:modelValue",L,{}),u("change",L,{})}else u("update:modelValue",I,{}),u("change",I,{})},w=I=>{let x=I.target.value;y.value=!0,u("focus",x,I)},q=I=>{setTimeout(()=>{y.value=!1},0);let x=I.target.value;i.maxLength&&x.length>Number(i.maxLength)&&(x=x.slice(0,Number(i.maxLength))),u("blur",x,I)},P=t.computed(()=>({[`${d}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),E=t.computed(()=>ve(i.unit)>0),$=t.computed(()=>ve(i.unit)>0&&!y.value),F=t.computed(()=>({hidden:!$.value})),D=I=>{v.value="",u("update:modelValue","",I),u("change","",I),u("clear",""),V()},j=t.computed(()=>i.clearable&&!m.value&&!p.value),U=t.computed(()=>{let I=ve(v.value)>0;return i.clearable&&I&&y.value}),Z=I=>{U.value?D(I):N()},_=t.computed(()=>U.value&&j.value?o:l),W=t.computed(()=>({action:!0}));return()=>{const I={class:g.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:w,onBlur:q};s&&(I.disabled=!0);const L=[],x=t.h("input",I);L.push(x);const z=[],M={class:["action-icon"]},O=t.h(_.value,M),Y={class:W.value,onClick:Z},J=t.h("view",Y,{default:()=>[O]});if(z.push(J),E.value){const re=t.h("view",{class:F.value},[i.unit]);z.push(re)}const oe={class:P.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,Do);X.valueFormat=null,X.disabled=!1,X.readonly=m.value||p.value,X.visible=S.value,X["onUpdate:visible"]=A,X.modelValue=v.value,X["onUpdate:modelValue"]=T,X.onClear=D;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:Xd,componentName:Qd,scope:Gd}=G("date-item"),sl=Xd(Yd(Qd,Gd,we,ne.CircleClose,ne.Date,Hn,!1)),Zd=39,Jd=64,{create:_d,scope:ef}=G("calendar-pane"),tf=_d({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(ef),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),m=t.ref(null),p=t.ref(null),u=t.ref(null),h=t.ref(0),k=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),y=t.computed(()=>a.btn),b=t.computed(()=>a["top-info"]),v=t.computed(()=>a["bottom-info"]),f=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}),d=M=>M.split("-"),g=M=>le.isEqual(f.currDate[0],M),C=M=>le.isEqual(f.currDate[1],M),B=M=>f.currDate?.length>0?f.currDate?.some(O=>le.isEqual(O,M)):!1,S=(M,O)=>O.curData[0]+"-"+O.curData[1]+"-"+le.getNumTwoBit(+M.day),N=(M,O)=>{const Y=S(M,O),{type:J}=e;return M.type=="curr"?le.isEqual(f.currDate,Y)||(J=="range"||J=="week")&&(g(Y)||C(Y))||J=="multiple"&&B(Y)?`${f.dayPrefix}--active`:f.propStartDate&&le.compareDate(Y,f.propStartDate)||f.propEndDate&&le.compareDate(f.propEndDate,Y)?`${f.dayPrefix}--disabled`:(J=="range"||J=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&le.compareDate(f.currDate[0],Y)&&le.compareDate(Y,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},V=()=>{const{type:M}=e;if(M=="range"&&f.chooseData.length==2||M!="range"){let O=f.chooseData.slice(0);M=="week"&&(O={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("choose",O),e.poppable&&n("update")}},A=(M,O,Y=!1)=>{if(N(M,O)!=`${f.dayPrefix}--disabled`){const{type:J}=e;let[oe,K]=O.curData,H=[...O.curData];if(H[2]=le.getNumTwoBit(Number(M.day)),H[3]=`${H[0]}-${H[1]}-${H[2]}`,H[4]=le.getWhatDay(+H[0],+H[1],+H[2]),J=="multiple")if(f.currDate?.length>0){let X;f.currDate?.forEach((R,Q)=>{R==H[3]&&(X=Q)}),Y?f.chooseData.push([...H]):X!==void 0?(f.currDate.splice(X,1),f.chooseData.splice(X,1)):(f.currDate.push(H[3]),f.chooseData.push([...H]))}else f.currDate=[H[3]],f.chooseData=[[...H]];else if(J=="range"){let X=Object.values(f.currDate).length;X==2||X==0?f.currDate=[H[3]]:le.compareDate(f.currDate[0],H[3])?Array.isArray(f.currDate)&&f.currDate.push(H[3]):Array.isArray(f.currDate)&&f.currDate.unshift(H[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...H]]:le.compareDate(f.chooseData[0][3],H[3])?f.chooseData=[...f.chooseData,[...H]]:f.chooseData=[[...H],...f.chooseData]}else if(J=="week"){let X=le.getWeekDate(oe,K,M.day,e.firstDayOfWeek);f.propStartDate&&le.compareDate(X[0],f.propStartDate)&&X.splice(0,1,f.propStartDate),f.propEndDate&&le.compareDate(f.propEndDate,X[1])&&X.splice(1,1,f.propEndDate),f.currDate=X,f.chooseData=[le.formatResultDate(X[0]),le.formatResultDate(X[1])]}else f.currDate=H[3],f.chooseData=[...H];if(!Y){let X=f.chooseData;J=="week"&&(X={weekDate:[T(f.chooseData[0]),T(f.chooseData[1])]}),n("select",X),(e.isAutoBackFill||!e.poppable)&&V()}}},T=M=>{let[O,Y,J]=M;return{date:M,monthWeekNum:le.getMonthWeek(O,Y,J,e.firstDayOfWeek),yearWeekNum:le.getYearWeek(O,Y,J,e.firstDayOfWeek)}},w=M=>{const O=M=="prev"?f.monthsData[0]:f.monthsData[f.monthsData.length-1];let Y=parseInt(O.curData[0]),J=parseInt(O.curData[1].toString().replace(/^0/,""));switch(M){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))+""]},q=(M,O,Y)=>{let{year:J,month:oe}=Y;return O=="prev"&&M>=7&&(M-=7),Array.from(Array(M),(K,H)=>({day:String(H+1),type:O,year:J,month:oe}))},P=(M,O,Y,J)=>{M=M-e.firstDayOfWeek;let{year:oe,month:K}=Y;return O=="prev"&&M>=7&&(M-=7),Array.from(Array(J),(X,R)=>({day:String(R+1),type:O,year:oe,month:K})).slice(J-M)},E=(M,O)=>{const Y=le.getMonthPreDay(+M[0],+M[1]);let J=Number(M[1])-1,oe=Number(M[0]);J<=0&&(J=12,oe+=1);const K=le.getMonthDays(String(M[0]),String(M[1])),H=le.getMonthDays(oe+"",J+""),X={year:M[0],month:M[1]},R={curData:M,title:l("monthTitle",{year:X.year,month:X.month}),monthData:[...P(Y,"prev",{month:String(J),year:String(oe)},H),...q(K,"curr",X)],cssHeight:0,cssScrollHeight:0},Q=R.monthData.length>35?6:5;R.cssHeight=Zd+Jd*Q;let ee=0;f.monthsData.length>0&&(ee=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),R.cssScrollHeight=ee,O=="next"?(!f.endData||!le.compareDate(`${f.endData[0]}-${f.endData[1]}-${le.getMonthDays(f.endData[0],f.endData[1])}`,`${M[0]}-${M[1]}-${M[2]}`))&&f.monthsData.push(R):!f.startData||!le.compareDate(`${M[0]}-${M[1]}-${M[2]}`,`${f.startData[0]}-${f.startData[1]}-01`)?f.monthsData.unshift(R):f.unLoadPrev=!0},$=()=>{let M=e.startDate?e.startDate:le.getDay(0),O=e.endDate?e.endDate:le.getDay(365);f.propStartDate=M,f.propEndDate=O,f.startData=d(M),f.endData=d(O),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const Y={year:Number(f.startData[0]),month:Number(f.startData[1])},J={year:Number(f.endData[0]),month:Number(f.endData[1])};let oe=J.month-Y.month;J.year-Y.year>0&&(oe=oe+12*(J.year-Y.year)),oe<=0&&(oe=1),E(f.startData,"next");let K=1;do E(w("next"),"next");while(K++<oe);if(f.monthsNum=oe,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(M&&le.compareDate(f.currDate[0],M)&&f.currDate.splice(0,1,M),O&&le.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...d(f.currDate[0]),...d(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let H=[],X={};f.currDate.forEach(R=>{M&&!le.compareDate(R,M)&&O&&!le.compareDate(O,R)&&(Object.hasOwnProperty.call(X,R)||(H.push(R),X[R]=R))}),f.currDate=[...H],f.defaultData=[...d(H[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[H,X,R]=d(f.currDate[0]),Q=le.getWeekDate(H,X,R,e.firstDayOfWeek);f.currDate=Q,M&&le.compareDate(f.currDate[0],M)&&f.currDate.splice(0,1,M),O&&le.compareDate(O,f.currDate[1])&&f.currDate.splice(1,1,O),f.defaultData=[...d(f.currDate[0]),...d(f.currDate[1])]}}else f.currDate&&(M&&le.compareDate(f.currDate,M)?f.currDate=M:O&&!le.compareDate(f.currDate,O)&&(f.currDate=O),f.defaultData=[...d(f.currDate)])};De({scrollToDate:M=>{le.compareDate(M,f.propStartDate)?M=f.propStartDate:le.compareDate(M,f.propEndDate)||(M=f.propEndDate);let O=d(M);f.monthsData.forEach((Y,J)=>{if(Y.title==l("monthTitle",{year:O[0],month:O[1]})&&c.value){let oe=f.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=f.monthsData[J].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[J].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let M=0,O=0;f.defaultData.length>0&&f.monthsData.forEach((oe,K)=>{oe.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(M=K),(e.type=="range"||e.type=="week")&&oe.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(O=K)}),U(f.monthsNum,M),f.currentIndex=M,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?(A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),A({day:f.defaultData[5],type:"curr"},f.monthsData[O],!0)):e.type=="week"?A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(oe=>{let K=d(oe),H=f.currentIndex;f.monthsData.forEach((X,R)=>{X.title==l("monthTitle",{year:K[0],month:K[1]})&&(H=R)}),A({day:K[2],type:"curr"},f.monthsData[H],!0)}):A({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let Y=f.monthsData[f.monthsData.length-1],J=Y.cssHeight+Y.cssScrollHeight;Xe(()=>{c?.value&&m?.value&&u?.value&&(h.value=c.value.clientHeight,m.value.style.height=`${J}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(J/(f.monthsNum+1))}});const U=(M,O)=>{M>=3?O>0&&O<M?f.defaultRange=[O-1,O+3]:O==0?f.defaultRange=[O,O+4]:O==M&&(f.defaultRange=[O-2,O+2]):f.defaultRange=[0,M+2];let Y=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=Y},Z=(M,O)=>(e.type=="range"||e.type=="week")&&M.type=="curr"&&N(M,O)=="fox-calendar__day--active",_=(M,O)=>Z(M,O)&&g(S(M,O)),W=(M,O)=>f.currDate.length>=2&&C(S(M,O))?Z(M,O):!1,I=()=>{if(f.currDate.length>=2)return le.isEqual(f.currDate[0],f.currDate[1])},L=M=>{const O=`${M.year}-${M.month}-${Number(M.day)<10?"0"+M.day:M.day}`;return le.isEqual(O,le.date2Str(new Date))},x=M=>{if(f.monthsData.length<=1)return;const O=M.target.scrollTop;let Y=Math.floor(O/f.avgHeight);if(Y==0)O>=f.monthsData[Y+1].cssScrollHeight&&(Y+=1);else if(Y>0&&Y<f.monthsNum-1)O>=f.monthsData[Y+1].cssScrollHeight&&(Y+=1),O<f.monthsData[Y].cssScrollHeight&&(Y-=1);else{const J=Math.round(O+h.value);J<f.monthsData[Y].cssScrollHeight+f.monthsData[Y].cssHeight&&O>f.monthsData[Y-1].cssScrollHeight&&(Y-=1),Y+1<=f.monthsNum&&J>=f.monthsData[Y+1].cssScrollHeight+f.monthsData[Y+1].cssHeight&&(Y+=1),Y>=1&&O<f.monthsData[Y-1].cssScrollHeight&&(Y-=1)}f.currentIndex!==Y&&(f.currentIndex=Y,U(f.monthsNum,Y)),f.yearMonthTitle=f.monthsData[Y].title},z=()=>{f.chooseData.splice(0),f.monthsData.splice(0),$()};return $(),t.watch(()=>e.defaultValue,M=>{M&&e.poppable&&z()}),{weeks:i,compConthsData:k,showTopBtn:y,topInfo:b,bottomInfo:v,rangeTip:I,mothsViewScroll:x,getClass:N,isStartTip:_,isEndTip:W,chooseDay:A,isCurrDay:L,confirm:V,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:m,weeksPanel:p,viewArea:u}}}),nf={class:"fox-calendar__header"},of={key:0,class:"fox-calendar__header-title"},lf={key:1,class:"fox-calendar__header-slot"},af={key:2,class:"fox-calendar__header-subtitle"},rf={class:"fox-calendar__weekdays",ref:"weeksPanel"},sf={class:"fox-calendar__panel",ref:"monthsPanel"},cf={class:"fox-calendar__month-title"},uf={class:"fox-calendar__days"},df=["onClick"],ff={class:"fox-calendar__day-value"},mf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},pf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},hf={key:2,class:"fox-calendar__day-tips--curr"},gf={key:4,class:"fox-calendar__day-tip"},yf={key:0,class:"fox-calendar__footer"};function vf(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",nf,[e.showTitle?(t.openBlock(),t.createElementBlock("view",of,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",lf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",af,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",rf,[(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",sf,[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",cf,t.toDisplayString(s.title),1),t.createElementVNode("view",uf,[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,m)=>(t.openBlock(),t.createElementBlock("view",{key:m,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:p=>e.chooseDay(c,s)},[t.createElementVNode("view",ff,[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",mf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",pf,[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",hf,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",gf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,df))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",yf,[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 ur=te(tf,[["render",vf]]),bf=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:kf}=G("calendar"),Sf=kf({components:{[ur.name]:ur,[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=b=>{i.value?.scrollToDate(b)},m=()=>{i.value?.initPosition()};t.watch(()=>e.visible,b=>{b&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),De({scrollToDate:c,initPosition:m});const p=()=>{n("update:visible",!1)},u=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{u()},update:p,close:u,select:b=>{n("select",b)},choose:b=>{u(),n("choose",b)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Cf(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 jn=te(Sf,[["render",Cf]]),dr={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}},uo=(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 wf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...me,...ye,...ln,...dr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=t.computed(()=>i.type==="range"),v=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{v.startDate!==null&&(v.startDate=null,v.endDate=null,v.startArray=[],v.endArray=[])},d=(x,z="one",M="YYYY-MM-DD")=>{if(bf(x)){f();return}if(b.value&&Array.isArray(x)&&x.length==2){let O,Y;typeof x[0]=="string"?(O=uo(x[0],M),Y=uo(x[1],M)):(O=x[0],Y=x[1]);let J=ut(O),oe=ut(Y);(v.startDate===null||v.startDate.getTime()!==O.getTime()||v.endDate?.getTime()!==Y.getTime())&&(v.startDate=O,v.startArray=J,v.endDate=Y,v.endArray=oe)}else{let O;typeof x=="string"?O=uo(x,M):O=x;let Y=ut(O);(v.startDate===null||v.startDate.getTime()!==O.getTime())&&(v.startDate=O,v.startArray=Y)}};d(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,x=>{d(x,i.type,i.valueFormat),u("setValue",x)});const g=t.computed(()=>{if(v.startDate===null)return"";if(b.value){let x=ct(i,v.startDate,i.format),z=ct(i,v.endDate,i.format);return`${x} ${i.rangeSeparator} ${z}`}else{let x=ct(i,v.startDate,i.format);return i.showWeek&&(x=`${x} ${v.startArray[4]}`),x}}),C=t.computed(()=>{if(v.startDate===null)return null;if(b.value){let x=le.date2Str(v.startDate),z=le.date2Str(v.endDate??new Date);return[x,z]}else return le.date2Str(v.startDate)}),B="fox-input-item",S=t.computed(()=>({[B]:!0,"is-disabled":m.value,"is-readonly":p.value})),N=Ae(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const x={};return N.value&&(x["text-align"]=N.value),x}),A=t.ref(!1),T=()=>{p.value||m.value||(A.value=!0)},w=x=>{A.value=x},q=x=>{if(x){if(b.value&&Array.isArray(x)){let z=x[0],M=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(M,O-1,Y),oe=x[1];M=fe(oe[0]),O=fe(oe[1]),Y=fe(oe[2]);let K=new Date(M,O-1,Y);if(v.startDate=J,v.startArray=ut(J),v.endDate=K,v.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=x,M=fe(z[0]),O=fe(z[1]),Y=fe(z[2]),J=new Date(M,O-1,Y);if(v.startDate=J,v.startArray=ut(J),i.valueFormat){let oe=ct(i,J,i.valueFormat);u("update:modelValue",oe,{})}else u("update:modelValue",J,{})}u("change",x,{})}},P=x=>{let M=x.target.value;y.value=!0,u("focus",M,x)},E=x=>{setTimeout(()=>{y.value=!1},0);let M=x.target.value;i.maxLength&&M.length>Number(i.maxLength)&&(M=M.slice(0,Number(i.maxLength))),u("blur",M,x)},$=t.computed(()=>({[`${B}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),F=t.computed(()=>ve(i.unit)>0),D=t.computed(()=>ve(i.unit)>0&&!y.value),j=t.computed(()=>({hidden:!D.value})),U=x=>{f(),u("update:modelValue",null,x),u("change","",x),u("clear","")},Z=t.computed(()=>i.clearable&&!m.value&&!p.value),_=t.computed(()=>{let x=ve(g.value)>0;return i.clearable&&x&&y.value}),W=x=>{_.value?U(x):T()},I=t.computed(()=>_.value&&Z.value?l:r),L=t.computed(()=>({action:!0}));return()=>{const x={class:S.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:T,onFocus:P,onBlur:E};s&&(x.disabled=!0);const z=[],M=t.h("input",x);z.push(M);const O=[],Y={class:["action-icon"]},J=t.h(I.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:$.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=A.value,Q["onUpdate:visible"]=w,Q["default-value"]=C.value,Q.onChoose=q;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,dr);return t.h(o,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:Nf,create:Bf,scope:Vf}=G("calendar-item"),il=Bf(wf(Nf,Vf,jn,we,{CloseIcon:ne.CircleClose,MarkIcon:ne.Date},!1)),Af={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 Tf(e,{CheckNormal:n,Checked:a}){return{props:{...Af},setup(o,{emit:l,slots:r}){const s=t.inject("parent",null),i=t.computed(()=>s.label.value===o.label),c=t.computed(()=>s.position),m=()=>{const y=[];if(i.value){if(r.checkedIcon)return r.checkedIcon();{const b=ce(o.iconSize),v=o.checkedIcon??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),t.h(v,{width:b,height:b,class:y})}}else{if(r.icon)return r.icon();{const b=ce(o.iconSize),v=o.icon??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),t.h(v,{width:b,height:b,class:y})}}},p=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),t.h("view",{class:y},r.default?.())},u=()=>{const y=[`${e}__button`];return i.value&&y.push(`${e}__button--active`),o.disabled&&y.push("is-disabled"),t.h("view",{class:y},r.default?.())},h=()=>{i.value||o.disabled||o.readonly||s.updateValue(o.label)},k=c.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${k?`${e}--reverse`:""}`,onClick:h},[o.shape=="button"?u():k?[p(),m()]:[m(),p()]])}}}const{componentName:$f,create:Ef}=G("radio"),Wn=Ef(Tf($f,{CheckNormal:ne.CheckNormal,Checked:ne.CheckChecked})),{componentName:fr,create:xf}=G("radio-group"),Yn=xf({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:`${fr} ${fr}--${e.direction}`,style:l},n.default?.())}}});function mr(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 Df(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function If(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let qf=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Mf(){const e=t.getCurrentInstance();return new qf(e.proxy)}function Pf(e){return{text:e,value:e}}const pr={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Lf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},zf={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 Ff(e,n,a,o,l){return{props:{...me,...ye,...pr,...Lf,...zf},emits:["change","update:modelValue","setValue"],setup(r,s){const i=xe(t.computed(()=>r.readonly)),c=Be(t.computed(()=>r.disabled)),m=Ae(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ve({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=Mf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,d])=>{if(f){const g=await u.load("radio",f,d);if(g.length>0)if(typeof g[0]=="string"){const S=g.map(N=>Pf(N));h.value=S}else h.value=g;else h.value=[]}},{immediate:!0});let k=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([f,d])=>{k.value=mr(r,d,f,r.valueType),p("setValue",f)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(k.value===-1)return null;const f=h.value[k.value];return Lt(r,f)}),b=f=>{let d=null,g=null;if(h.value.length>0){let C=mr(r,h.value,f,"value");k.value=C,C>=0&&(g=h.value[C],r.valueType==="text"?d=an(r,g):r.valueType==="item"?d=g:d=Lt(r,g))}else d=f;p("update:modelValue",d),p("change",d,g)},v=()=>{let f=null,d=null;if(h.value.length>0&&k.value!==-1){let g=h.value[k.value];r.valueType==="text"?f=an(r,g):r.valueType==="item"?f=g:f=Lt(r,g)}p("update:modelValue",f),p("change",f,d)};if(De({clear(){k.value!==-1&&(k.value=-1,v())}}),r.source){const f=()=>{const d=[],g=be(r,pr);return h.value.forEach((C,B)=>{const S=Lt(r,C),N=Df(r,C);let V={...g,label:S,disabled:N};const A=If(r,C,B);V={...V,...A},c.value&&(V.disabled=!0),i.value&&(V.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 q=s.slots.text(C);T.default=()=>[q]}else{const q=an(r,C);T.default=()=>q}let w=t.h(l,V,T);d.push(w)}),d};return()=>{const d=f(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>d}),B={default:()=>C};B.label=s.slots.default,B.prepend=s.slots.prepend,B.append=s.slots.append,B.fixedPreTip=s.slots.fixedPreTip,B.fixedTip=s.slots.fixedTip;const S=be(r,ye,me);return t.h(a,{...S,prop:`${r.prop}_item`},B)}}else return()=>{const f=s.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"update:modelValue":b},{default:()=>f})}}}}const{componentName:Rf,create:Of,scope:Kf}=G("radio-item"),cl=Of(Ff(Rf,Kf,we,Yn,Wn)),Uf=(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=t.inject("parent",null),c=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,d=>{c.partialSelect=d});const m=t.computed(()=>!!i),p=t.computed(()=>m.value?i.value.value.includes(l.label):!!l.modelValue),u=t.computed(()=>m.value?i.position:l.textPosition);let h="";const k=(d,g)=>{h="click",s("update:modelValue",d),s("change",d,g)};t.watch(()=>l.modelValue,d=>{h=="click"?h="":s("change",d)});const y=()=>{const d=[];if(c.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const g=ce(l.iconSize),C=l.indeterminateIcon??o;return d.push("fox-checkbox__icon--indeterminate"),l.disabled&&d.push("is-disabled"),t.h(C,{width:g,height:g,class:d})}}else if(p.value){if(r.checkedIcon)return r.checkedIcon();{const g=ce(l.iconSize),C=l.checkedIcon??a;return d.push("fox-checkbox__icon"),l.disabled&&d.push("is-disabled"),t.h(C,{width:g,height:g,class:d})}}else{if(r.icon)return r.icon();{const g=ce(l.iconSize),C=l.icon??n;return d.push("fox-checkbox__icon--unchecked"),l.disabled&&d.push("is-disabled"),t.h(C,{width:g,height:g,class:d})}}},b=()=>{const d=[`${e}__label`];return l.disabled&&d.push("is-disabled"),t.h("view",{class:d},r.default?.())},v=()=>{const d=[`${e}__button`];return p.value&&d.push(`${e}__button--active`),l.disabled&&d.push("is-disabled"),t.h("view",{class:d},r.default?.())},f=d=>{if(!(l.disabled||l.readonly)){if(p.value&&c.partialSelect){c.partialSelect=!1,k(p.value,r.default?.()[0].children);return}if(k(!p.value,r.default?.()[0].children),m.value){const g=i.value.value,C=i.max.value,{label:B}=l,S=g.indexOf(B);S>-1?g.splice(S,1):S<=-1&&(g.length<C||!C)&&g.push(B),i.updateValue(g)}}};return t.onMounted(()=>{m.value&&i.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{m.value&&i.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${u.value==="left"?`${e}--reverse`:""}`,onClick:f},[l.shape=="button"?v():[y(),b()]])}}),{componentName:Hf,create:jf}=G("checkbox"),Xn=jf(Uf(Hf,{CheckNormal:ne.CheckNormal,Checked:ne.Checked,Indeterminate:ne.CheckDisabled})),{create:Wf,componentName:hr}=G("checkbox-group"),Qn=Wf({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=m=>{m.proxy&&o.children.push(m.proxy)},r=m=>{m.proxy&&(o.children=o.children.filter(p=>p!==m.proxy))},s=m=>{a("update:modelValue",m),a("change",m)},i=m=>{const p=[];m&&o.children.forEach(u=>{u?.disabled||p.push(u?.label)}),a("update:modelValue",p)},c=()=>{const m=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",m)};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,m=>{a("change",m)}),De({toggleAll:i,toggleReverse:c}),()=>{const m={};return e.textAlign&&(m["text-align"]=e.textAlign),t.h("view",{class:`${hr} ${hr}--${e.direction}`,style:m},n.default?.())}}});function gr(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Io(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 Io(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 Yf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Xf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Qf=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Gf(){const e=t.getCurrentInstance();return new Qf(e.proxy)}function Zf(e){return{text:e,value:e}}const Jf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},yr={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},_f={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 em(e,n,a,o,l){return{props:{...me,...ye,...Jf,...yr,..._f},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Be(t.computed(()=>r.disabled)),c=Be(t.computed(()=>r.readonly)),m=Ae(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Ve({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=Gf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,d])=>{if(f){const g=await u.load("checkbox",f,d);if(g.length>0)if(typeof g[0]=="string"){const S=g.map(N=>Zf(N));h.value=S}else h.value=g;else h.value=[]}},{immediate:!0});const k=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([f,d])=>{const g=[];Array.isArray(f)&&f.forEach(C=>{let B=gr(r,d,C,r.valueType);B!==-1&&g.push(B)}),!qe(g,k.value)&&(k.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return k.value.forEach(d=>{let g=h.value[d];f.push(rn(r,g))}),f}),b=f=>{let d=[],g=[];if(h.value.length>0){const C=[];Array.isArray(f)&&f.forEach(B=>{let S=gr(r,h.value,B,"value");S!==-1&&C.push(S);const N=h.value[S];g.push(N),r.valueType==="text"?d.push(Io(r,N)):r.valueType==="item"?d.push(N):d.push(rn(r,N))}),k.value=C}else d=f;p("update:modelValue",d),p("change",d,g)},v=t.ref();if(De({toggleAll:f=>{v.value.toggleAll(f)},toggleReverse:()=>{v.value.toggleReverse()}}),r.source){const f=()=>{const d=[],g=be(r,yr);return h.value.forEach((C,B)=>{const S=rn(r,C),N=Yf(r,C);let V={...g,label:S,disabled:N};const A=Xf(r,C,B);V={...V,...A},i.value&&(V.disabled=!0),c.value&&(V.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 q=s.slots.text(C);T.default=()=>[q]}else{const q=Io(r,C);T.default=()=>q}let w=t.h(l,V,T);d.push(w)}),d};return()=>{const d=f(),g={class:`${e}`,ref:v,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>d}),B={default:()=>C};B.label=s.slots.default,B.prepend=s.slots.prepend,B.append=s.slots.append,B.fixedPreTip=s.slots.fixedPreTip,B.fixedTip=s.slots.fixedTip;const S=be(r,ye,me);return t.h(a,{...S,prop:`${r.prop}_item`},B)}}else return()=>{const f=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:v,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":b},{default:()=>f})}}}}const{componentName:tm,create:nm,scope:om}=G("checkbox-item"),ul=nm(em(tm,om,we,Qn,Xn)),qo={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:lm,create:am}=G("switch"),rm=am({components:{Loading1:ne.Loading1},props:{...qo},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=lm;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}}}),sm={class:"fox-switch-button"};function im(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",sm,[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 Gn=te(rm,[["render",im]]);function cm(e,n,a,o){return{props:{...me,...ye,...qo},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=e,p=Ie(l,"modelValue",null,c),u=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const k={...be(l,qo),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":u},y=[],b=t.h(o,k);y.push(b);const v={default:()=>y};v.label=r.slots.default,v.fixedPreTip=r.slots.fixedPreTip,v.fixedTip=r.slots.fixedTip;const f=be(l,ye,me);return f["content-class"]=m,t.h(a,{...f,prop:`${l.prop}_item`},v)}}}}const{componentName:um,create:dm,scope:fm}=G("switch-item"),dl=dm(cm(um,fm,we,Gn));function mm(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=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=se.useFoxI18n(n),p=m(l,["placeholder"]),u=t.ref(l.modelValue);t.watch(()=>l.modelValue,q=>{u.value=q,c("change",q)});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=Ae(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const q={};return y.value&&(q["text-align"]=y.value),q}),v=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(u.value)?p.placeholder.value:u.value),d=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),C=t.computed(()=>{const q={};return y.value&&(q["text-align"]=y.value),q}),B=()=>{c("focus",u.value)},S=()=>{c("blur",u.value)},N=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),V=t.computed(()=>ve(l.unit)>0),A=q=>{s.value==!0||i.value==!0||c("click")},T=t.computed(()=>l.icon??a),w=t.computed(()=>({action:!0}));return()=>{const q=[];if(typeof r.slots.content=="function"){const I=r.slots.content();q.push(I)}else{const I=[];if(v.value){const z={tabIndex:0,class:k.value,style:b.value,onFocus:B,onBlur:S};let M=null;r.slots.main?M=t.h("view",z,[r.slots.main(f.value)]):M=t.h("view",z,[f.value]),I.push(M)}if(d.value){const z={tabIndex:0,class:g.value,style:C.value,onFocus:B,onBlur:S};let M=null;r.slots.sub?M=t.h("view",z,[r.slots.sub(l.desc)]):M=t.h("view",z,[l.desc]),I.push(M)}const L={class:h.value,onClick:A},x=t.h("view",L,I);q.push(x)}const P=[],E=ce(l.iconSize);let $=r.slots.icon;if(!$){const I={width:E,height:E,class:["action-icon"]};$=t.h(T.value,I)}const F={class:w.value,onClick:A},D=t.h("view",F,{default:()=>[$]});if(P.push(D),V.value){const I=t.h("view",{},[l.unit]);P.push(I)}const j={class:N.value},U=t.h("view",j,{default:()=>P});q.push(U);const Z={default:()=>q};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:pm,create:hm,scope:gm}=G("link-item"),fl=hm(mm(pm,gm,ne.ArrowRight,we)),Mo={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:ym,componentName:vm}=G("rate"),bm=ym({props:{...Mo},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[vm]:!0})),r=k=>{n("update:modelValue",k),n("change",k)},s=(k,y)=>{if(e.disabled||e.readonly)return;let b=0;y===1&&e.modelValue===y||(b=y,e.allowHalf&&k==2&&(b-=.5)),r(b)},i=(k,y,b)=>{let v=0;for(let f=y.value.length-1;f>=0;f--){const d=y.value[f];if(k>d.offsetLeft){b?v=f+(k>d.offsetLeft+d.clientWidth/2?1:.5):v=f+1;break}}return v},c=_e(),m={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,...m,onClick:s,toPxDesc:ge,renderIcon:(k,y)=>t.h(k,y),rateRefs:o,refRandomId:p,slots:a,customIcon:u}}}),km=["id"],Sm={class:"fox-rate-item__icon--full"},Cm={key:0,class:"fox-rate-item__icon--half"},wm={key:1,class:"fox-rate-item__icon--half"};function Nm(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",Sm,[(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",Cm,[(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",wm,[(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,km))),128))],34)}const kt=te(bm,[["render",Nm]]);function Bm(e,n,a,o){return{props:{...me,...ye,...Mo},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=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,readonly:i.value,value:p.value,"onUpdate:modelValue":u},y=[],b=t.h(o,k);y.push(b);const v={default:()=>y};if(r.slots.default){const g=r.slots.default();v.label=()=>g}const f=be(l,ye,me);return f["content-class"]=m,t.h(a,f,v)}}}}const{componentName:Vm,create:Am,scope:Tm}=G("rate-item"),ml=Am(Bm(Vm,Tm,we,kt)),$m=/scroll|auto|overlay/i,Es=window;function Em(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Po(e,n=Es){let a=e;for(;a&&a!==n&&Em(a);){const{overflowY:o}=window.getComputedStyle(a);if($m.test(o))return a;a=a.parentNode}return n}function xs(e,n=Es){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=Po(e.value,n))}),a}const Ds=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,xm={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 Dm(e,n,a){return{props:{...xm},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(),m=xs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),u=t.computed(()=>({[e]:!0})),h=d=>d?d.offsetTop+h(d.offsetParent):0,k=()=>{let d=0,g=0,C="down";if(m.value==window){const B=Ds();c.value&&(d=h(c.value)+c.value.offsetHeight-B-window.innerHeight),g=B}else{const{scrollHeight:B,clientHeight:S,scrollTop:N}=m.value;d=B-S-N,g=N}return p.beforeScrollTop>g?C="up":C="down",p.beforeScrollTop=g,l("scroll-change",g),d<=o.threshold&&C=="down"},y=()=>{Xe(()=>{if(!k()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},b=()=>{m.value&&m.value.addEventListener("scroll",y,o.useCapture)},v=()=>{m.value&&m.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{b(),o.immediate&&y()}),t.onUnmounted(()=>{v()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,b())}),t.onDeactivated(()=>{f.value=!0,v()}),t.watch(()=>o.modelValue,d=>{d||(p.isInfiniting=!1)}),()=>{const d={class:"fox-infinite__container"},g=t.h("view",d,[r?.default?.()]),C=[];if(p.isInfiniting){let V=r?.loading?.()??null;if(!V){let w=r?.loadingIcon?.()??null;if(!w){const E={class:["fox-infinite__bottom-box__img"]};w=t.h(a,E)}const q={class:"fox-infinite__bottom-box__text"},P=t.h("view",q,[i.loadText.value]);V=[w,P]}const A={class:"fox-infinite__bottom-box"},T=t.h("view",A,V);C.push(T)}else if(!o.hasMore){let V=r?.finished?.()??null;if(!V){const A={class:"fox-infinite__bottom-tips"};V=t.h("view",A,[i.loadMoreText.value]),C.push(V)}}const B={class:"fox-infinite__bottom"},S=t.h("view",B,C),N={class:u.value,ref:c};return t.h("view",N,[g,S])}}}}const{componentName:Im,create:qm,scope:Mm}=G("infinite-loading"),Zn=qm(Dm(Im,Mm,ne.Loading)),{componentName:Pm,create:Lm}=G("button"),zm=Lm({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:m,block:p}=t.toRefs(e),u=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=Pm;return{[y]:!0,[`${y}--${o.value}`]:o.value,[`${y}--${l.value}`]:l.value,[`${y}--${r.value}`]:r.value,[`${y}--plain`]:m.value,[`${y}--block`]:p.value,[`${y}--disabled`]:s.value,[`${y}--loading`]:i.value}}),k=t.computed(()=>{const y={};return c?.value&&(m.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}}}),Fm={class:"fox-button__wrap"};function Rm(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",Fm,[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(zm,[["render",Rm]]),Om={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"}},Km=(e,n,a)=>({props:{...Om},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}),m=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),u=A=>{let w=A.target.value;o.maxLength&&w.length>Number(o.maxLength)&&(w=w.slice(0,Number(o.maxLength))),r("update:modelValue",w,A),r("change",w,A)},h=t.ref({}),k=A=>{let w=A.target.value;c.active=!0,h.value=o.focusStyle,r("focus",w,A)},y=A=>{setTimeout(()=>{c.active=!1},0);let w=A.target.value;o.maxLength&&w.length>Number(o.maxLength)&&(w=w.slice(0,Number(o.maxLength))),h.value={},r("blur",w,A)},b=A=>{r("update:modelValue","",A),r("change","",A),r("clear","")},v=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const A={};return v.value||(A.display="none"),A}),d=A=>{o.autoblur&&N.value?.blur(),(typeof A.cancelable!="boolean"||A.cancelable)&&A.preventDefault(),r("search",o.modelValue)},g=A=>{r("keyup-input",A)},C=A=>{r("click-input",A)},B=A=>{r("click-left-icon",o.modelValue,A)},S=t.computed(()=>({textAlign:o.inputAlign})),N=t.ref(null);t.onMounted(()=>{o.autofocus&&N.value.focus()});const V=()=>{const A=[];if(l.leftin){const F={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:B},D=t.h("view",F,[l.leftin()]);A.push(D)}const T={class:`${e}__input-inner-input`,ref:N,style:S.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:C,onInput:u,onFocus:k,onBlur:y,onkeyup:g},w=t.h("input",T),q={class:[`${e}__input-inner`],action:"#",onSubmit:d},P=t.h("form",q,[w]);A.push(P);const E=[];if(o.clearable){const F={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:b},D=l?.clear?.()??o.clearIcon??a,j=t.h("view",F,[t.h(D)]);E.push(j)}if(l.rightin){const F={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},D=t.h("view",F,[l.rightin()]);E.push(D)}if(E.length>0){const F={class:`${e}__input-inner-right`},D=t.h("view",F,E);A.push(D)}const $={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",$,A)};return()=>{const A=[];if(o.label){const q={class:`${e}__search-label`},P=t.h("span",q,[o.label]);A.push(P)}if(l.leftout){const q={class:[`${e}__search-icon`,`${e}__left-search-icon`]},P=t.h("view",q,[l.leftout()]);A.push(P)}const T=V();if(A.push(T),l.rightout){const q={class:[`${e}__search-icon`,`${e}__right-search-icon`]},P=t.h("view",q,[l.rightout()]);A.push(P)}const w={class:`${e}`,style:m.value};return t.h("view",w,A)}}}),{componentName:Um,create:Hm,scope:jm}=G("searchbar"),Jn=Hm(Km(Um,jm,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 Wm(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(Is(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 vr(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Is(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Ym(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Xm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Qm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,s,i){if(Array.isArray(a)){let m=a;typeof i=="function"&&(m=m.filter(i));let p=(o-1)*l,u=p+l;u>m.length&&(u=m.length);const h=m.slice(p,u);return{totalSize:m.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:[]}):($e(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function Gm(){const e=t.getCurrentInstance();return new Qm(e.proxy)}function Zm(e,n,a,o,l,r,s,i,c,m,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),b=y(u,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),v=Gm(),f=t.ref([]),d=t.ref(0),g=t.ref(""),C=t.shallowRef(null),B=t.computed(()=>{const K={};return u.params&&Object.assign(K,u.params),ue(g.value)||(K[`${u.searchKey}`]=g.value),C.value&&Object.assign(K,C.value),K});let S=!0;const N=async(K,H,X)=>{try{if(A.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=vr(u,ee);return!!(typeof re=="string"&&re.includes(g.value))});const Q=await v.load("actionsheet",K,H,X,B.value,S,R??void 0);S=!1,Array.isArray(Q)?(f.value=Q,d.value=1,A.value=!1):!Array.isArray(Q.page)||Q.page.length===0?(console.warn("[FoxUI] can not load more data"),A.value=!1):(Reflect.apply([].push,f.value,Q.page),d.value=Math.ceil(f.value.length/u.pageSize),(Q.totalSize&&f.value.length>=Q.totalSize||X<Q.page.length)&&(A.value=!1)),V.value=!1}catch(R){console.error("[FoxUI] ActionSheet load more data fail",R),A.value=!0,d.value=0,f.value=[]}setTimeout(()=>{k("loaded-data")},250)},V=t.ref(!1),A=t.ref(!0),T=async()=>{if(!u.source){V.value=!1;return}await N(u.source,d.value+1,u.pageSize)};let w=null;t.watch(g,(K,H)=>{w&&(clearTimeout(w),w=null),ue(K)&&!ue(H)&&(w=setTimeout(()=>{P()},u.searchDelayTriggerClear))});const q=()=>{A.value=!0,d.value=0,f.value=[],u.source&&T()},P=()=>{q()};t.watch([()=>u.source,()=>u.pageSize,()=>u.params],async([K,H,X])=>{u.source&&q()},{immediate:!0});const E=t.computed(()=>!u.multiple&&u.isAutoBackFill),$=t.ref([]);let F=null;const D=t.ref(u.visible);t.watch(()=>u.visible,K=>{D.value!==K&&(D.value=K),K?F=[...$.value]:F=null});const j=(K,H)=>{const X=[];return Array.isArray(K)||(K=[K]),K.forEach(R=>{let Q=Wm(u,H,R,u.valueType);Q!==-1&&X.push(Q)}),qe(X,$.value)?!1:($.value=X,!0)};t.watch([()=>u.modelValue,()=>f.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 $.value){const re=f.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=Is(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&&($.value=F)},W=K=>{const H=$.value.indexOf(K);u.multiple?H===-1?$.value.push(K):$.value.splice(H,1):H===-1?$.value=[K]:$.value=[],(E.value||!u.poppable&&!u.showFooter)&&x()},I=K=>{D.value=K,k("update:visible",K)},L=()=>{const K=()=>{_(),I(!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()},x=()=>{const K=U(),H=()=>{Z(K),I(!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=b.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])},M=()=>{let K=null;if(h.search)K=h.search();else{const H={onSearch:q,placeholder:b.seachPlaceholder.value,disabled:u.disabled,modelValue:g.value,"onUpdate:modelValue":X=>{g.value=X}};K=t.h(r,H,{leftin:()=>t.h(m)})}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<f.value.length;H++){const X=f.value[H],R=cn(u,X),Q=vr(u,X),ee=["fox-actionsheet__list-item"],ae={};let re=Ym(u,X),pe=u.iconSize?ce(u.iconSize):null;const ke=Xm(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=$.value.includes(H);re&&ee.push("is-disabled"),Oe&&ee.push("is-checked");const to={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 Ks=O(R,Oe,re,Q,X);Tt.push(Ks);const Us=Y(Oe,re,pe,X);Tt.push(Us),u.textPosition==="right"&&Tt.reverse()}const Os=t.h("view",to,Tt);K.push(Os)}return K},oe=()=>{let K=[];if(h.buttons)K=h.buttons();else{const X=t.h(l,{type:"primary",block:"block",onClick:x,disabled:u.disabled},{default:()=>b.confirmText.value});K.push(X)}return t.h("view",{class:"fox-actionsheet__footer"},[K])};return De({search:async(K=null,H=!0)=>{C.value=K&&t.toRaw(K),t.triggerRef(C),H&&(A.value=!0,d.value=0,f.value=[]),t.nextTick(()=>{T()})},clear:()=>{A.value=!0,d.value=0,f.value=[]},confirm:()=>{x()},cancel:()=>{L()}}),()=>{const K=[];if(u.showHeader){const pe=z();K.push(pe)}if(u.showSearchbar){const pe=M();K.push(pe)}let H=null;if(h.content)H=h.content();else{const pe=J(),ke={hasMore:A.value,loadText:b.loadText.value,loadMoreText:b.loadMoreText.value,modelValue:V.value,"onUpdate:modelValue":Oe=>{V.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&&!E.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:D.value,closeable:!1,"onUpdate:visible":I,position:u.position,round:"round",onClickOverlay:L,closeOnClickOverlay:u.closeOnClickOverlay};return t.h(a,re,{default:()=>ee})}}}}const{componentName:Jm,create:_m,scope:ep}=G("actionsheet-pane"),_n=_m(Zm(Jm,ep,de,Zn,Pe,Jn,ne.CheckNormal,ne.Checked,ne.Close,ne.Search2)),br={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 tp(e,n,a,o,l,r,s){return{props:{...me,...ye,...br,...sn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const m=Be(t.computed(()=>i.disabled)),p=xe(t.computed(()=>i.readonly)),{emitEvent:u}=Ve({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return m.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=se.useFoxI18n(n),k=h(i,["placeholder"]),y=t.ref(!1),b=Ie(i,"modelValue",null,u),v=t.ref(""),f=t.computed(()=>Array.isArray(v.value)?v.value.join(i.separator):v.value),d="fox-input-item",g=t.computed(()=>({[d]:!0,"is-disabled":m.value,"is-readonly":p.value})),C=Ae(t.computed(()=>i.textAlign),"textAlign"),B=t.computed(()=>{const x={};return C.value&&(x["text-align"]=C.value),x}),S=t.ref(!1),N=()=>{S.value=!0},V=x=>{S.value=x},A=x=>{b.value=x,u("update:modelValue",x)},T=(x,z)=>{u("change",x,z)},w=x=>{let M=x.target.value;y.value=!0,u("focus",M,x)},q=x=>{setTimeout(()=>{y.value=!1},0);let M=x.target.value;i.maxLength&&M.length>Number(i.maxLength)&&(M=M.slice(0,Number(i.maxLength))),u("blur",M,x)},P=x=>{v.value=x,u("update:text",x)},E=t.computed(()=>({[`${d}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),$=t.computed(()=>ve(i.unit)>0),F=t.computed(()=>ve(i.unit)>0&&!y.value),D=t.computed(()=>({hidden:!F.value})),j=x=>{b.value="",u("update:modelValue","",x),u("change","",x),u("clear","")},U=t.computed(()=>i.clearable&&!m.value&&!p.value),Z=t.computed(()=>ve(b.value)>0&&y.value),_=x=>{Z.value?j(x):N()},W=t.computed(()=>Z.value&&U.value?o:l),I=t.computed(()=>({action:!0})),L=t.ref(null);return De({search:x=>{L.value&&L.value.search(x)},clear:()=>{L.value&&L.value.clear},confirm:x=>{L.value&&L.value.confirm()},cancel:()=>{L.value&&L.value.cancel()}}),()=>{const x={class:g.value,style:B.value,type:"text",maxlength:i.maxLength,placeholder:k.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:w,onBlur:q};s&&(x.disabled=!0);const z=[],M=t.h("input",x);z.push(M);const O=[],Y={class:["action-icon"]},J=t.h(W.value,Y),oe={class:I.value,onClick:_},K=t.h("view",oe,{default:()=>[J]});if(O.push(K),$.value){const ke=t.h("view",{class:D.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,sn);Q.ref=L,Q.class=i.actionsheetProps,Q.disabled=m.value||p.value,Q.visible=S.value,Q["onUpdate:visible"]=V,Q.modelValue=b.value,Q["onUpdate:modelValue"]=A,Q.text=v.value,Q["onUpdate:text"]=P,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,br,sn);return t.h(a,{...re,prop:`${i.prop}_item`},R)}}}}const{componentName:np,create:op,scope:lp}=G("actionsheet-item"),pl=op(tp(np,lp,we,ne.CircleClose,ne.ArrowRight,_n)),Lo={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:ap,create:rp}=G("input-number"),sp=rp({components:{Minus:ne.Minus,Plus:ne.Plus},props:{...Lo},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const k=ap;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 b=o(k);n("update:modelValue",b,y),n("change",b,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")},m=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 b=k.target.valueAsNumber;b<Number(e.min)?b=Number(e.min):b>Number(e.max)&&(b=Number(e.max)),r(b,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:m,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),ip=["min","max","disabled","readonly","value"];function cp(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,ip),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(sp,[["render",cp]]);function up(e,n,a,o){return{props:{...me,...ye,...Lo},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Be(t.computed(()=>l.disabled)),i=xe(t.computed(()=>l.readonly)),{emitEvent:c}=Ve({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!s.value&&!i.value}},l.prop??r.attrs.name),m=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"]},b=be(l,Lo),f={...r.attrs,...b,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":u,onAdd:h,onReduce:k},d=t.h(o,f,y),g=[];g.push(d);const C={default:()=>g};C.label=r.slots.default,C.fixedPreTip=r.slots.fixedPreTip,C.fixedTip=r.slots.fixedTip;const B=be(l,ye,me);return B["content-class"]=m,t.h(a,{...B,prop:`${l.prop}_item`},C)}}}}const{componentName:dp,create:fp,scope:mp}=G("inputnumber-item"),hl=fp(up(dp,mp,we,Ze)),pp={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 hp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function kr(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Sr(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function gp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function fo(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Cr(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function wr(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function mo(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let yp=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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function vp(){const e=t.getCurrentInstance();return new yp(e.proxy)}function bp(e,n,a,o){return{props:{...pp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=vp(),m=t.ref([]),p=t.computed(()=>m.value.filter(I=>gp(l,I)!==!1)),u=t.ref(-1),h=()=>{const I=l.modelValue,L=p.value.findIndex(x=>kr(l,x)===I);u.value!==L&&(u.value=L,l.scroll&&_(L,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const k=I=>u.value===I,y=I=>{if(I<0&&I>=p.value.length)return!1;const L=p.value[I],z=(mo(l,L,I)??{}).status??fo(l,L);return k(I)||z},b=t.computed(()=>{const I={[i]:!0};return l.mode?I[`is-${l.mode}`]=!0:l.direction&&(I[`is-${l.direction}`]=!0),l.scroll&&(I["is-scroll"]=!0),I}),v=t.computed(()=>({})),f=(I,L,x,z,M)=>{const O={[`${i}__step`]:!0};return M&&(O[`${M}`]=!0),O[`${d.value}`]=!0,z&&(O["is-doit"]=!0),I===u.value?O["is-active"]=!0:L==="done"?O["is-done"]=!0:L==="error"?O["is-error"]=!0:L==="half"?O["is-half"]=!0:x?O["is-disabled"]=!0:O["is-normal"]=!0,O},d=t.computed(()=>{if(l.mode==="simple")return"start";let I=l.align;return I||(l.direction==="vertical"?I="start":I="center"),I}),g=(I,L={})=>{const x={...L};return d.value==="start"&&I===p.value.length-1?x.flex="0 0 auto":l.step?l.direction==="vertical"?x.height=l.step:x.width=l.step:x.flex="1 1 100%",x},C=(I,L)=>{let x={};if(L<p.value.length-1){const z=L+1;y(L)&&y(z)?l.direction==="vertical"?x.height="100%":x.width="100%":x.opacity="0"}return x},B=I=>p.value.length-1===I,S=(I,L)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&L>u.value||u.value===L)return;const x=u.value,z=L;u.value=L,l.scroll&&_(L,!1);const M=kr(l,I);s("update:modelValue",M);const O={fromIndex:x,currentIndex:z,item:I,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",M,O)},N=t.ref(!0),V=async(I,L)=>{try{const x=await c.load("stesbar",I,L);Array.isArray(x)&&(m.value=x),N.value=!1}catch(x){console.error("[FoxUI] Load StepsBar Data Fail",x),m.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([I,L])=>{I&&V(I,L)},{immediate:!0});const A=(I,L,x,z,M)=>{let O=null;if(r.icon)O=r.icon({item:I,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=x??`${L+1}`;O=t.h("span",{},[J])}const Y={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:I,index:L}),!M&&S(I,L)}};return t.h("view",Y,[O])},T=(I,L,x)=>{const z=t.h("i",{class:"fox-steps-bar__line-inner",style:C(I,L)});return t.h("view",{class:"fox-steps-bar__line"},[z])},w=()=>{let I=null;if(r.markIcon)I=r.markIcon();else{const x={};l.iconSize&&(x.width=l.markIconSize,x.height=l.markIconSize);const z=l.markIcon??o;I=t.h(z,x)}return t.h("view",{class:"fox-steps-bar__mark"},[I])},q=(I,L,x,z,M)=>{const O=[];if(!B(L)){const oe=T(I,L);O.push(oe)}const Y=A(I,L,x,z,M);O.push(Y);const J={class:"fox-steps-bar__head"};return t.h("view",J,O)},P=(I,L,x,z)=>{let M=null;r.main?M=r.main({item:I,index:L,status:x}):M=hp(l,I);const O={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:I,index:L}),!z&&S(I,L)}};return t.h("view",O,[M])},E=(I,L,x)=>{let z=null;if(r.sub){z=r.sub({item:I,index:L,status:x});const M={class:"fox-steps-bar__sub"};return t.h("view",M,[z])}return null},$=(I,L)=>{const x=mo(l,I,L)??{},z=x.status??fo(l,I);let M=Sr(l,I);x.disabled===!0&&(M=!0),l.disabled===!0&&(M=!0);const O=x.label??wr(l,I),Y=[],J=A(I,L,O,z,M);J&&Y.push(J);const oe=P(I,L,z,M);if(oe&&Y.push(oe),!B(L)){const ee=T(I,L);ee&&Y.push(ee)}const K=t.h("view",{class:"fox-steps-bar__head"},Y),H=x.class,X=x.style??{};let R=Cr(l,I);x.doit===!0&&(R=!0);const Q={ref:Z(L),class:f(L,z,M,R,H),style:g(L,X)};return t.h("view",Q,[K])},F=(I,L)=>{const x=mo(l,I,L)??{},z=x.status??fo(l,I);let M=Sr(l,I);x.disabled===!0&&(M=!0),l.disabled===!0&&(M=!0);const O=x.label??wr(l,I),Y=[],J=l.layout;for(let R of J)if(R==="head"){const Q=q(I,L,O,z,M);Y.push(Q)}else if(R==="main"){const Q=P(I,L,z,M);Y.push(Q)}else if(R==="sub"){const Q=E(I,L,z);Y.push(Q)}else if(R==="mark"){const Q=w();Y.push(Q)}const oe=x.class,K=x.style??{};let H=Cr(l,I);x.doit===!0&&(H=!0);const X={ref:Z(L),class:f(L,z,M,H,oe),style:g(L,K)};return t.h("view",X,Y)},D=t.ref(),j=t.ref([]),U=(I,L)=>{j.value[L]=I},Z=I=>L=>{U(L,I)},_=(I,L)=>{const x=D.value,z=j.value;if(!x||!z||!z[I])return;const M=z[I];let O=0;l.direction==="vertical"?O=M.offsetTop-(x.offsetHeight-M.offsetHeight)/2:O=M.offsetLeft-(x.offsetWidth-M.offsetWidth)/2,W(x,O,L?0:.3,l.direction)},W=(I,L,x,z)=>{let M=0;const O=z==="horizontal"?I.scrollLeft:I.scrollTop,Y=x===0?1:Math.round(x*1e3/16);function J(){z==="horizontal"?I.scrollLeft+=(L-O)/Y:I.scrollTop+=(L-O)/Y,++M<Y&&Ke(J)}J()};return()=>{const I=[];if(l.mode==="simple")for(let x=0;x<p.value.length;x++){const z=p.value[x],M=$(z,x);I.push(M)}else for(let x=0;x<p.value.length;x++){const z=p.value[x],M=F(z,x);I.push(M)}const L={ref:D,class:b.value,style:v.value};return t.h("view",L,I)}}}}const{componentName:kp,create:Sp,scope:Cp}=G("steps-bar"),gl=Sp(bp(kp,Cp,ne.Checklist,ne.ArrowRight));function wp(e){e.stopPropagation()}class Np{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=nl()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=ol(),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),wp(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 Bp(e,n){return new Np(e,n)}const Vp={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]}},Ap=(e,n,a,o=!1)=>({props:{...Vp},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 d=[`${e}`];return l.customClass&&d.push(l.customClass),d}),m=t.computed(()=>{const d={};return ue(i.top)||(d.top=i.top),ue(i.right)||(d.right=i.right),ue(i.bottom)||(d.bottom=i.bottom),ue(i.left)||(d.left=i.left),ue(l.width)||(d.width=l.width),ue(l.height)||(d.height=l.height),ue(l.color)||(d.color=l.color),ue(l.background)||(d.background=l.background),ue(l.borderRadius)||(d["border-radius"]=l.borderRadius),d}),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},f=Bp(d=>{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},d=>{if(!h.value)return;const g=h.value;k(),i.left=y.x+d.x,i.top=y.y+d.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const d=[h.value];f.open(d)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&f.close()}),()=>{let d=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)d=g;else{const B=t.h(a,{class:p.value});d.push(B)}const C={ref:B=>{h.value=B},class:c.value,style:m.value,onClick:u};return t.h("view",C,d)}}}),{componentName:Tp,create:$p,scope:Ep}=G("floating-button"),yl=$p(Ap(Tp,Ep,ne.Uploader,!1)),xp={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 Dp(e,n,a){return{props:{...xp},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})),m=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 v={class:c.value},f=t.h("span",v,[i.value]);u.push(f)}const h={class:m.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:Ip,create:qp,scope:Mp}=G("more-button"),vl=qp(Dp(Ip,Mp,ne.RectUp)),Pp={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}},Lp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function zp(e,n,a){return{props:{...Pp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=se.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,m=t.ref(!0),p=C=>{m.value=C},u=C=>{if(typeof o.unmount=="function")try{o.unmount()}catch(B){console.error(B)}if(typeof o.callback=="function")try{o.callback(C)}catch(B){console.error(B)}},h=()=>{u("confirm")},k=()=>{u("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&u("close")},b=(C,B)=>Lp(C)?(B.src=C,t.h("img",B)):typeof C=="string"?(Array.isArray(B.class)?B.class.push(C):B.class&&typeof B.class=="object"?B[`${C}`]=!0:typeof B.class=="string"?B.class=`${B.class}, ${C}`:B.class=C,t.h(o.tag,B)):t.h(C,B),v=()=>{const C=[];if(o.icon){const S={class:[`${c}__header-icon`]},N=b(o.icon,S);C.push(N)}if(o.title){const S=t.h("view",{class:`${c}__header-title`},[o.title]);C.push(S)}if(o.showClose&&o.closeIcon){const S={class:[`${c}__header-close-icon`],onClick:y},N=b(o.closeIcon,S);C.push(N)}const B={class:[`${c}__header`]};return t.h("view",B,C)},f=(C,B)=>{const S=[];if(B){const V={class:`${c}__group-title`},A=t.h("view",V,[B]);S.push(A)}if(C){const V=[];Array.isArray(C)||(C=[C]);for(let A of C){const T={class:`${c}__group-row`,innerHTML:A},w=t.h("view",T);V.push(w)}if(V.length>0){const A={class:`${c}__group-rows`},T=t.h("view",A,V);S.push(T)}}if(S.length===0)return null;const N={class:`${c}__group`};return t.h("view",N,S)},d=()=>{const C=[];if(typeof o.message=="string")C.push(o.message);else if(Array.isArray(o.message))for(let S of o.message)if(typeof S=="string"){const N=f(S);C.push(N)}else{const N=f(S.content,S.title);C.push(N)}else if(typeof o.message=="function"){const S=o.message();C.push(S)}else{const S=o.message;C.push(S)}const B={class:`${c}__body`};return t.h("view",B,C)},g=()=>{const C=[];if(o.showCancelButton){const S={class:[`${c}__footer-button`],style:{},onClick:k};o.cancelButtonClass&&S.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(S.style,o.cancleButtonStyle);const N=t.h("button",S,[o.cancelButtonText??i.cancelText.value]);C.push(N)}if(o.showConfirmButton){const S={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&S.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(S.style,o.confirmButtonStyle);const N=t.h("button",S,[o.confirmButtonText??i.confirmText.value]);C.push(N)}if(C.length===0)return null;const B={class:`${c}__footer`};return t.h("view",B,C)};return()=>{const C=[],B=v();B&&C.push(B);const S=d();S&&C.push(S);const N=g();N&&C.push(N);const V={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},A=t.h("view",V,C),T=[`${c}__popup`];o.popClass&&T.push(o.popClass);const w={};o.width&&(w.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(w.height=typeof o.height=="number"?`${o.height}px`:o.height);const q={popClass:T.join(" "),style:w,visible:m.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,q,{default:()=>A})}}}}const{componentName:Fp,create:Rp,scope:Op}=G("messagebox"),Kp=Rp(zp(Fp,Op,de)),Up="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",Hp="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",jp="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",Wp="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",Yp=new zn,Xp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Qp=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-${Yp.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(Kp,e);n.appendChild(o),t.render(r,o)},ot={show:(e,n,a,o)=>{const l={...Xp};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=jp:r==="warning"?l.icon=Wp:r==="error"?l.icon=Up:l.icon=Hp),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=m=>{if(typeof c=="function")try{c(m)}catch(p){console.error(p)}s({action:m})},Qp(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}},Gp=(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)},Zp=new zn,Jp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),_p=e=>`${e}-${Zp.get()}`,eh=Symbol.for("InnerPageScopeKey"),th=Symbol.for("PageWrapperKey"),nh="FoxLeave",oh="FoxLeaveEnd",lh={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 ah(e,n,a,o){return{props:{...Fe,...lh},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(eh,!0);const c={};t.provide(th,c);const m=S=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{m()},u=e,h=S=>{k.value=S,i("update:visible",S)},k=t.ref(!1),y=(S,N)=>Jp(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(l.tag,N)):t.h(S,N),b=()=>{if(!l.showHeader)return null;const S=[];if(s.header){const V=s.header();S.push(V)}else if(l.title){const V=t.h("view",{class:`${u}__header-title`},[l.title]);S.push(V)}if(S.length===0)return null;const N={class:[`${u}__header`]};return t.h("view",N,S)},v=()=>{if(!l.showClose)return null;const S={class:[`${u}__close-icon`],onClick:p},N=l.closeIcon??o;return y(N,S)};let f=null;const d=S=>{Gp(oh,{},f)},g=_p(e),C=()=>{h(!0)},B=()=>{if(!f)return;const S=f.querySelector(".fox-overlay");S&&(S.classList.add("overlay-fade-leave-active"),S.classList.add("overlay-fade-leave-to"));const N=f.querySelector(".fox-popup");N&&(N.classList.add(`fox-popup-slide-${l.position}-leave-active`),N.classList.add(`fox-popup-slide-${l.position}-leave-to`),N.addEventListener("animationend",d,{once:!0}),N.addEventListener("transitionend",d,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${g}`),f?.addEventListener(nh,B,{once:!0}),C()}),()=>{const S=[],N=b();N&&S.push(N);const V=v();V&&S.push(V);const A=s.default?s.default():[];Reflect.apply([].push,S,A);const T={[`${u}`]:!0};l.mode&&(T[`${u}--${l.mode}`]=!0);const w={class:T},q=t.h("view",w,S),P=[`${u}__popup`,g];l.popClass&&P.push(l.popClass),l.position&&P.push(`${u}__popup--${l.position}`);const E={};l.width&&(E.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(E.height=typeof l.height=="number"?`${l.height}px`:l.height);const F={...be(l,Fe),popClass:P.join(" "),style:E,visible:k.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},D=t.h(a,F,{default:()=>q});return t.h("div",{class:[`${u}__root`,g]},[D])}}}}const{componentName:rh,create:sh,scope:ih}=G("popup-wrapper"),bl=sh(ah(rh,ih,de,ne.Close)),ch={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function uh(e,n,a,o){return{props:{...ch},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 m={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,m,s),u={class:`${e}`};return t.h("view",u,[p])}}}}const{componentName:dh,create:fh,scope:mh}=G("dropdown"),kl=fh(uh(dh,mh,de));function ph(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 hh={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 gh(e,n,a,o=!1){return{props:{...hh},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={},C=l.textColor??l.color;return C&&(g.color=C),g}),m=(g,C)=>{let B=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const S=l.highlightFilter;if(g.indexOf(S)!==-1){const V=g.replace(new RegExp(S,"g"),`<span>${S}</span>`);C.innerHTML=V,C.class["is-highlight"]=!0,B=t.h(l.tag,C)}}else if(typeof l.highlightFilter=="function"){const S=l.highlightFilter(g);S&&(C.innerHTML=S,C.class["is-highlight"]=!0,B=t.h(l.tag,C))}return B},p=g=>{r.emit("click",g)};let u="";const h=()=>{const g=s.value;if(!g)return;const C=g.clientWidth;ph(g,B=>{const S=g.innerHTML??"";ue(S)||B<C||(u?a?.show(g,S,{type:"text",id:u,showArrow:l.showArrow},!0):u=a?.show(g,S,{type:"text",showArrow:l.showArrow},!0)??"")})},k=()=>{u&&a?.hide(u)};let y=null;const b=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},v=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{k()},l.hideAfter??0)},f=()=>{const g=s.value;g&&(g.addEventListener("mouseover",b),g.addEventListener("mouseleave",v))},d=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",b),g.removeEventListener("mouseleave",v))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||d()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let C=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const V=r.slots.default();if(Array.isArray(V)&&V.length===1){const A=V[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=fe(l.digits),w=fe(l.decimalLength),q=he(l.autoPadding);let P=`${V[0].children}`,E=P.split("").reverse().join("");E=Sn(E,w,q,T,l.separator),P=E.split("").reverse().join(""),l.highlightFilter!==void 0&&(C=m(P,g)),C||(g.innerHTML=P,C=t.h(l.tag,g))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const V=r.slots.default();if(Array.isArray(V)&&V.length===1){const A=V[0].type.toString();if(A==="Symbol(Text)"||A==="Symbol(v-txt)"){const T=`${V[0].children}`;C=m(T,g),C||(g.innerHTML=T,C=t.h(l.tag,g))}}}C||(C=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return C;let S=null;if(l.icon){const V={[`${e}__mark-wrap`]:!0};l.type&&(V[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const w={class:V,style:A};S=t.h("view",w,t.h(l.icon))}else if(r.slots.mark){const V={[`${e}__mark-wrap`]:!0};l.type&&(V[`${e}__mark-wrap--${l.type}`]=!0);const A={},T=l.color;T&&(A.color=T);const w={class:V,style:A};S=t.h("view",w,{default:r.slots.mark})}else{const V={[`${e}__mark`]:!0};l.type&&(V[`${e}__mark--${l.type??"default"}`]=!0);const A={},T=l.color;T&&(A["background-color"]=T);const w={class:V,style:A};S=t.h("view",w)}const N={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",N,[S,C])}}}}const{componentName:yh,create:vh,scope:bh}=G("text"),Sl=vh(gh(yh,bh,Vt,!1));function kh(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 m=0;c&&m<r.length;m++){let p=r[m],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 m=n[c],p=r[c];const u=m.find(h=>h[o]===p);if(!u)break;s.push(u[a])}else{let c=n;for(let m=0;c&&m<r.length;m++){let p=r[m],u=c.find(h=>h[o]===p);if(!u)break;s.push(u[a]),c=u[l]}}return s}class Sh{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`),[]):($e(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Ch(){const e=t.getCurrentInstance();return new Sh(e.proxy)}const wh={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 Nh(e,n,a=!1){return{props:{...wh},setup(o,{attrs:l,slots:r}){const s=Ch(),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=kh(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)}),m=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(m,p,{default:()=>c.value}):t.h(m,p,c.value)}}}}const{componentName:Bh,create:Vh,scope:Ah}=G("mapping"),Cl=Vh(Nh(Bh,Ah,!1));function Th(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return Jr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:yV,create:$h,scope:vV}=G("domain-provider"),wl=$h(Th()),Eh={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 xh(e,n){return{inheritAttrs:!1,props:Eh,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;Yi({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(b=>{for(let v of b){let f=!1;v.intersectionRatio>0&&(f=!0);const d=l.get(v.target);if(d)try{if(a.loadPolicy==="lazy"&&!f&&d.visible!==null)return;d.visible=f,d.callback(f)}catch(g){console.error(g)}}},{root:h,rootMargin:k,threshold:y}),r.forEach((b,v)=>{l.set(v,b),p?.observe(v)}),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:bV,create:Dh,scope:kV}=G("rolling-provider"),Nl=Dh(xh()),{componentName:Ih,create:qh}=G("cell"),Mh=qh({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=Ih;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}}}),Ph={key:0,class:"fox-cell__icon"},Lh={key:1,class:"fox-cell__title"},zh={class:"title"},Fh={class:"fox-cell__title-desc"};function Rh(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",Ph,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Lh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",zh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Fh,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 Bl=te(Mh,[["render",Rh]]),{componentName:Oh,create:Kh}=G("cell-group"),Uh=Kh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Oh]:!0}))}}}),Hh={key:1,class:"fox-cell-group__title"},jh={key:3,class:"fox-cell-group__desc"},Wh={class:"fox-cell-group__wrap"};function Yh(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",Hh,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",jh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Wh,[t.renderSlot(e.$slots,"default")])],2)}const Vl=te(Uh,[["render",Yh]]),{componentName:Xh,create:Qh}=G("image"),Gh=Qh({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=Xh;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(b=>{b.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}),m=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:m,stylebox:c,error:u,load:p,show:r,imgRef:s}}}),Zh=["src","date-src","alt"],Jh={key:0,class:"fox-img-loading"},_h={key:1,class:"fox-img-error"};function eg(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,Zh),e.loading?(t.openBlock(),t.createElementBlock("div",Jh,[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",_h,[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 Al=te(Gh,[["render",eg]]),{create:tg}=G("layout"),Tl=tg({}),{componentName:ng,create:og}=G("col"),lg=og({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=ng,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 ag(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 $l=te(lg,[["render",ag]]),{componentName:rg,create:sg}=G("row"),ig=sg({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=rg;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)}