@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 +2 -2
- package/dist/index.esm.js +21 -21
- package/dist/index.umd.js +2 -2
- package/dist/locale/index.esm.js +1 -1
- package/dist/locale/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.esm.js +1 -1
- package/package.json +42 -42
package/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(N,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@fox-js/validator"),require("@fox-js/icons-vue"),require("@fox-js/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@fox-js/validator","@fox-js/icons-vue","@fox-js/i18n"],t):(N=typeof globalThis<"u"?globalThis:N||self,t(N.FoxUI={},N.Vue,N.FoxValidator,N.FoxIconsVue,N.FoxI18n))})(this,function(N,t,tt,oe,ie){"use strict";/*!
|
|
2
|
-
* @fox-js/foxui-base v4.0.0
|
|
2
|
+
* @fox-js/foxui-base v4.0.0 Thu Jun 20 2024 23:50:10 GMT+0800 (中国标准时间)
|
|
3
3
|
*/const en=window,Ks=typeof window<"u";function Us(){return typeof en<"u"?en.requestAnimationFrame||en.webkitRequestAnimationFrame||function(e){en.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function za(e){Ks?cancelAnimationFrame(e):clearTimeout(e)}const Qe=Us();/*!
|
|
4
4
|
* @fox-js/big-decimal v4.0.1-6 Thu Aug 17 2023 21:31:19 GMT+0800 (中国标准时间)
|
|
5
|
-
*/function tn(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=Ae(e),n=Ae(n),[e,n]=oo(Ae(e),Ae(n)),a==1&&(o==1?e=no(e):n=no(n));let l=Fa(e,n);return a?a==2?"-"+Ae(l):e.length<l.length?Ae(l.substring(1)):"-"+Ae(no(l)):Ae(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 Fa(n,r)}function Ae(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function oo(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function Fa(e,n){[e,n]=oo(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var we=(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))(we||{});function Et(e,n=0,a=we.HALF_EVEN){if(a===we.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=Et(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Ra(l[1],r,o,a)?(o?"-":"")+lo(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");s=l[1].substring(0,n);let i=l[1].substring(n);return i&&Ra(i,s,o,a)&&(s=lo(s),s.length>n)?(o?"-":"")+lo(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function Ra(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===we.DOWN||!a&&o===we.FLOOR||a&&o===we.CEILING)return!1;if(o===we.UP||a&&o===we.FLOOR||!a&&o===we.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 we.HALF_DOWN:return!1;case we.HALF_UP:return!0;case we.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function lo(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function ao(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=Dt(e),n=Dt(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=Dt(e.replace(".","")),n=Dt(n.replace(".","")),e.length<n.length){let d=e;e=n,n=d}if(n=="0")return"0";let s=n.length,i=0,c=[],m=s-1,p="";for(let d=0;d<s;d++)c[d]=e.length-1;for(let d=0;d<2*e.length;d++){let h=0;for(let S=n.length-1;S>=m&&S>=0;S--)c[S]>-1&&c[S]<e.length&&(h+=parseInt(e[c[S]--])*parseInt(n[S]));h+=i,i=Math.floor(h/10),p=h%10+p,m--}return p=Dt(Hs(p,r)),a==1&&(p="-"+p),p}function Hs(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 Dt(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 ro(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=Ae(n.replace(".","")),l>=0){let m=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(m==-1)e=Ae(e+new Array(l+1).join("0"));else if(l>m)e=e.replace(".",""),e=Ae(e+new Array(l-m+1).join("0"));else if(l<m){e=e.replace(".","");let p=e.length-m+l;e=Ae(e.substring(0,p)+"."+e.substring(p))}else l==m&&(e=Ae(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=tn(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?"-":"")+Ae(Et(i,a-2))}function so(e,n){return e=e.toString(),n=n.toString(),n=io(n),tn(e,n)}function io(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Oa(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ka(e),Ka(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=so(e,ao(n,Et(ro(e,n),0,we.FLOOR)));return a+o}function Ka(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ua(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=oo(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ce{value;static RoundingModes=we;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=Ae(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+Ae(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=ce.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=ce.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 ce.getPrettyValue(this.value,n,a)}static round(n,a=0,o=we.HALF_EVEN){if(n=ce.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Et(n,a,o)}round(n=0,a=we.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ce(Et(this.value,n,a))}static floor(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.FLOOR)}static ceil(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.CEILING)}static add(n,a){return n=ce.validate(n),a=ce.validate(a),tn(n,a)}add(n){return new ce(tn(this.value,n.getValue()))}static subtract(n,a){return n=ce.validate(n),a=ce.validate(a),so(n,a)}subtract(n){return new ce(so(this.value,n.getValue()))}static multiply(n,a){return n=ce.validate(n),a=ce.validate(a),ao(n,a)}multiply(n){return new ce(ao(this.value,n.getValue()))}static divide(n,a,o){return n=ce.validate(n),a=ce.validate(a),ro(n,a,o)}divide(n,a){return new ce(ro(this.value,n.getValue(),a))}static modulus(n,a){return n=ce.validate(n),a=ce.validate(a),Oa(n,a)}modulus(n){return new ce(Oa(this.value,n.getValue()))}static compareTo(n,a){return n=ce.validate(n),a=ce.validate(a),Ua(n,a)}compareTo(n){return Ua(this.value,n.getValue())}static negate(n){return n=ce.validate(n),io(n)}negate(){return new ce(io(this.value))}}function Ha(e,n){return ce.multiply(`${e}`,`${n}`)}function co(e,n,a=8){return ce.divide(`${e}`,`${n}`,a)}function uo(e,n){return e=`${e}`,n=`${n}`,ce.compareTo(e,n)}function ja(e){return ce.negate(e)}function nn(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 d="",h=i.split("").reverse();for(let S=0;S<h.length;S++)d+=h[S]+((S+1)%o==0&&S+1!=h.length?l:"");c.length==0?p=`${s}${d.split("").reverse().join("")}`:p=`${s}${d.split("").reverse().join("")}.${c}`}else c.length==0?p=`${s}${i}`:p=`${s}${i}.${c}`;return p}function Wa(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const nt=typeof window<"u",Ke=Qe;function Ya(e){return e==null}const on=Array.isArray,js=e=>an(e)==="[object Map]",Ws=e=>an(e)==="[object Set]",Ue=e=>e instanceof Date,ln=e=>typeof e=="function",Xa=e=>typeof e=="string",Ys=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",dt=e=>Ee(e)&&ln(e.then)&&ln(e.catch),Qa=Object.prototype.toString,an=e=>Qa.call(e),fo=e=>an(e)==="[object Object]",Ga=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Xs(e){return e.__esModule||Ga&&e[Symbol.toStringTag]==="Module"}const Qs=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function ot(...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]=ot(l,m,c)}else c!==void 0&&(n[s]=c)}}return n}function mo(e,n,a=!1){if(!a)ot(!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)&&!fo(s))continue;r=mo(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)&&!fo(s))continue;r=mo(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const po=Qs?Promise.resolve():null;function Gs(e,...n){po!==null?n&&n.length>0?po.then(()=>{e(n)}):po.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 me(e){return typeof e=="number"?e:Number(e)}const Zs={"[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 lt(e){let a=Object.prototype.toString.call(e);return e==null?String(e):Zs[a]||"object"}function rn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Za(e){return e&&typeof e=="object"&&"setInterval"in e}function Ja(e){let n=!!e&&"length"in e&&e.length,a=lt(e);return a==="function"||Za(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function _a(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 Js(e,n=[]){let a=n;return e!=null&&(Ja(Object(e))?_a(a,typeof e=="string"?[e]:e):a.push(e)),a}function Me(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=lt(e),o=lt(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(!Me(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(!Me(r,s))return!1}return!0}return!1}function er(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function tr(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 nr(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 or(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 lr(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 ho(e,n=!0,a=!0){n?e=lr(e,".",/\./g):e=e.replace(/\./g,""),a?e=lr(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function _s(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Me(e,a))return!0}):n.indexOf(e)}function ei(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(Me(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ke(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function Se(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function ut(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 ar=(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 go(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const at=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},He=(e,n,a)=>Math.min(Math.max(e,n),a),Ne=Symbol.for("BroadcastKey");class yo{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="*"):er(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 sn(e,n,a,o){const l=new yo(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function ti(e,n,a){const o=a;if(o[Ne])return o[Ne];const l=t.inject(Ne,null),r=new yo(l,a,e);if(n&&typeof n=="object")for(const s in n)r.on(s,n[s]);return o[Ne]=r,t.provide(Ne,r),t.onUnmounted(()=>{r.destroy(),o[Ne]=void 0}),r}function It(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ne]??t.inject(Ne,null):t.inject(Ne,null)}const rt=e=>e.default??e;class ni{error(n,a){const o=a,l=a||t.hasInjectionContext()?It(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()?It(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?It(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()?It(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 xt=new ni;function oi(e){xt=e}function li(e){xt?Object.assign(xt,e):xt=e}function ai(e,n){rt(tt).setValidator(e,n)}function ri(e){rt(tt).deleteValidator(e)}let rr=["blur","clear"];function si(e){rr=e}function sr(){return rr}let ir=["focus","change","setValue"];function ii(e){ir=e}function cr(){return ir}function ci(e){rt(tt).messages(e)}function qt(...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 cn(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 Pe=Symbol("ValidateSchemaKey");class dr{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=cn(qt(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=cn(o);const l=qt(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=xt;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?rt(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?rt(tt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return rt(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=qt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=cn(n):this.rules=cn([n]);const o=qt(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=qt(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=rt(tt),c=new i(l),m=this.proxy??s;return c.validate(s,{context:m}).then(d=>{if(d.pass)this.success();else{let h="error";Array.isArray(d.errors)&&d.errors.length>0&&(h=d.errors[0].message??h,d.errors=[d.errors[0]],d.errors[0].ref=m),this.error(h)}return d}).catch(d=>{const h=d.message??`${d}`;return this.error(h),d})}}return Promise.resolve({pass:!0})}}function dn(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 dr(n,a,e)}const un=Symbol.for("EventEmitterKey");class ur{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 ft(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function fn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function di(e,n){const a=ft((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function ui(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function bo(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 De=Symbol("DomainKey"),mt=Symbol("DataItemsKey");class mn{_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 fi=new mn;function pt(){return fi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[De]??t.inject(De,null):t.inject(De,null)}const ko=Symbol("OriginalDateKey");function So(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject(De,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new mn(i);c.parent=s;const m=S=>{r[ko]||h(S),c?.set("modelValue",S)},p=()=>c?.getForSelf("modelValue")??null,d=()=>r[ko]??null,h=S=>{const y={};ot(!0,y,t.toRaw(S)),r[ko]=y};if(t.isReactive(n)||typeof n=="function"?t.watch(n,S=>{c?.merge(S,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&h(n.modelValue),r[De]=c,t.provide(De,c),l!==null){const S=t.inject(Ne,null),y=sn(r,S,i,o);c.broadcast=y,r[Ne]=y,t.provide(Ne,y),r.broadcast=(f,u,...g)=>Reflect.apply(y.emit,y,[f,u,...g]);const k=t.inject(Pe,null),b=dn(r,k,{componentName:""});c.validateSchema=b,r[Pe]=b,t.provide(Pe,b),r[mt]=new Map,r.validate=(f=!0)=>{const u=[];let g=null;const w={deep:!1};if(f===!0)g={name:"*"};else if(Array.isArray(f)&&f.length>0){const T=f;g={name:C=>C?T.indexOf(C)!==-1:!1}}else if(f!=null&&typeof f=="object"){const T=f;if(Object.assign(w,T),Array.isArray(T.include)&&T.include.length>0){const C=T.include;g={name:A=>A?C.indexOf(A)!==-1:!1}}else if(Array.isArray(T.exclude)&&T.exclude.length>0){const C=T.exclude;g={name:A=>A?C.indexOf(A)===-1:!1}}else g={name:"*"}}if(g){const T=y?.emitToChildren(g,"validate",w);T&&Reflect.apply([].push,u,T)}return u.length==1?u[0]:u.length>1?Promise.all(u).then(T=>{let C=[];return T.forEach(A=>{A.pass===!1&&Array.isArray(A.errors)&&(C=[...C,...A.errors])}),C.length>0?{pass:!1,errors:C}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(f,u=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(f).forEach(T=>{let C=String(T);const A={componentName:"",fieldName:C,pureDataValidate:!0};if(c){const V=pr(c,C,A,y,b);r[mt].set(C,V);const $=f[C];$&&V.validateSchema.setRule($)}});return}if(u){const w=Reflect.ownKeys(f),T={name:C=>w.includes(C)};y?.emitToChildren(T,"setNameValidateRules",f,!1)}},r.clearValidate=(f=!0)=>{let u=null;if(f===!0)u={name:"*"};else if(Array.isArray(f)&&f.length>0){const g=f;u={name:w=>w?g.indexOf(w)!==-1:!1}}else if(f!=null&&typeof f=="object"){const g=f;if(Array.isArray(g.include)&&g.include.length>0){const w=g.include;u={name:T=>T?w.indexOf(T)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const w=g.exclude;u={name:T=>T?w.indexOf(T)===-1:!1}}else u={name:"*"}}u&&y?.emitToChildren(u,"clearValidate",!1)},r.resetFields=f=>{const u=p();if(!u)return;const g={};if(ot(!0,g,d()??{}),Array.isArray(f))f.forEach(w=>{u[w]=g[w]});else if(f&&Array.isArray(f.include))(f.include??[]).forEach(T=>{u[T]=g[T]});else if(f&&Array.isArray(f.exclude)){let w=f.exclude??[];Reflect.ownKeys(g).forEach(T=>{w.includes(T)||(u[T]=g[T])})}else Object.assign(u,g);r.clearValidate(f)},r.setModelValue=(f,u)=>{!u||u===i?m(f):y?.emitToChildren({name:u},"setModelValue",f)},r.getModelValue=()=>p()}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Pe]=void 0,t.provide(Pe,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Ne]=void 0,t.provide(Ne,null)),c?.destroy(),r[De]=void 0,t.provide(De,null),r[mt]&&(r[mt].clear(),r[mt]=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 fr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(De,null);r===null&&(r=pt());const s=e||n.prop||n.name;let i=new mn(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[De]=i,t.provide(De,i),t.onUnmounted(()=>{i?.destroy(),l[De]=void 0,t.provide(De,null),i=null,l=null}),i}function mr(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 Te(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",s=t.inject(Ne,null);let i=sn(l,s,r,a);l[Ne]=i,t.provide(Ne,i),l.broadcast=(y,k,...b)=>i?Reflect.apply(i.emit,i,[y,k,...b]):null;const c=t.inject(Pe,null);e.fieldName=e.fieldName??r;let m=dn(l,c,e);l[Pe]=m,t.provide(Pe,m),mr(l,m,r),l.validate=(y=null)=>{if(!m)return Promise.resolve({pass:!0});const k=[];let b=!1,f=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)f=!0,b=!0;else if(y&&typeof y=="object"){const u=y,g=u.ignoreDisabled??!0,w=u.ignoreReadonly??!0,T=u.ignoreHidden??!0;g===!0&&e.disabled===!0||w===!0&&e.readonly===!0||T===!0&&rn(l.$el)?f=!1:(Array.isArray(u.include)&&u.include.indexOf(r)!==-1||Array.isArray(u.exclude)&&u.exclude.indexOf(r),f=!0),b=u.deep??!1}else typeof y=="boolean"&&(b=y),f=!0;if(f){const u=m?.validate();k.push(u)}if(b){let u=null;const g={deep:!1};if(y===!0)u={name:"*"};else if(Array.isArray(y)&&y.length>0){const w=y;u={name:T=>T?w.indexOf(T)!==-1:!1}}else if(y!=null&&typeof y=="object"){const w=y;if(Object.assign(g,w),Array.isArray(w.include)&&w.include.length>0){const T=w.include;u={name:C=>C?T.indexOf(C)!==-1:!1}}else if(Array.isArray(w.exclude)&&w.exclude.length>0){const T=w.exclude;u={name:C=>C?T.indexOf(C)===-1:!1}}else u={name:"*"}}if(u&&i){const w=i.emitToChildren(u,"validate",g);Reflect.apply([].push,k,w)}}return k.length==1?k[0]:k.length>1?Promise.all(k).then(u=>{let g=[];return u.forEach(w=>{w.pass===!1&&Array.isArray(w.errors)&&(g=[...g,...w.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>m?.setRule(y),l.setNameValidateRules=(y,k=!1)=>{const b=y[r];if(b&&m?.setRule(b),k&&i){const f={name:u=>Reflect.ownKeys(y).includes(u)};i.emitToChildren(f,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&m?.clear();let k=null;if(y===!0)k={name:"*"};else if(Array.isArray(y)&&y.length>0){const b=y;k={name:f=>f?b.indexOf(f)!==-1:!1}}else if(y!=null&&typeof y=="object"){const b=y;if(Array.isArray(b.include)&&b.include.length>0){const f=b.include;k={name:u=>u?f.indexOf(u)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;k={name:u=>u?f.indexOf(u)===-1:!1}}else k={name:"*"}}k&&i&&i.emitToChildren(k,"clearValidate",!1)};let p=new ur(l);l[un]=p;const d=ft((y="validate")=>{m&&(y==="reset"?m.clear():m.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:sr()).forEach(y=>{p&&p.on(y,k=>{d("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:cr()).forEach(y=>{p&&p.on(y,k=>{d("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ne]=void 0,t.provide(Ne,null),i=null,m?.destroy(),l[Pe]=void 0,t.provide(Pe,null),m=null,p?.destroy(),l[un]=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,...k)=>{p&&Reflect.apply(p.emit,p,[y,...k])},onEvent:(y,k)=>{p&&Reflect.apply(p.on,p,[k])},offEvent:(y,k)=>{p&&Reflect.apply(p.off,p,[k])}}}function pr(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=dn({},l,a);r.validate=(p=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const d=[];let h=!1,S=!1;if(Array.isArray(p)&&p.indexOf(s)!==-1)S=!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),S=!0,h=y.deep??!1}else typeof p=="boolean"&&(h=p),S=!0;if(S&&c){const y=c.validate();d.push(y)}if(h){let y=null;const k={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const b=p;y={name:f=>f?b.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const b=p;if(Object.assign(k,b),Array.isArray(b.include)&&b.include.length>0){const f=b.include;y={name:u=>u?f.indexOf(u)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;y={name:u=>u?f.indexOf(u)===-1:!1}}else y={name:"*"}}if(y&&m){const b=m.emitToChildren(y,"validate",k);Reflect.apply([].push,d,b)}}return d.length==1?d[0]:d.length>1?Promise.all(d).then(y=>{let k=[];return y.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(k=[...k,...b.errors])}),k.length>0?{pass:!1,errors:k}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const d=p[s];d&&c?.setRule(d)};let m=sn(null,o,s,r);return t.onUnmounted(()=>{c=null,m=null}),{broadcast:m,validateSchema:c}}function ht(){let n=t.getCurrentInstance()?.proxy,a=new ur(n);return n[un]=a,t.onUnmounted(()=>{a?.destroy(),n[un]=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?`${de(e)}px`:"";function de(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(nt){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 Ge="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=de(e.top)),e.left!==null&&e.left!==void 0&&(n.left=de(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=de(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=de(e.right))),n}function Co(e,n,a={},o=!0,l=-1,r=-1,s=0,i=0){if(e.headerHeight=de(a.headerHeight??n.headerHeight??-1),e.headerPadding=ze(a.headerPadding??n.headerPadding),e.footerHeight=de(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=de(c,r):e.height=de(r)-de(s,r)-de(i,r),e.width=de(a.width??n.width??0,l)}}function hr(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=de(l.top),o.safeAreaBottom=de(l.bottom),o.safeAreaLeft=de(l.left),o.safeAreaRight=de(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;Co(o,r,n,!0,s,i,c,m);const p=t.reactive(o),d=e.getForParent(Ge);d&&(o.height=yn(e,d),o.width=bn(e,d),t.watch([()=>yn(e,d),()=>bn(e,d)],([S,y])=>{p.height=S,p.width=y}));const h=!d;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([S,y,k=-1,b=-1,f=0,u=0])=>{Co(p,y,n,h,k,b,f,u)}),e.set(Ge,p),p}function pn(e){return e.get(Ge)}function hn(e,n){if(n=n??e.get(Ge),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function gn(e,n){if(n=n??e.get(Ge),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function yn(e,n){if(n=n??e.get(Ge),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=hn(e,n),o=gn(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function bn(e,n){return n=n??e.get(Ge),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function mi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function pi(e){return!!e.getForParent(Ge)}var kn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(kn||{});function wo(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function $e(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(wo(c,o))return c}const s=e.value;return wo(s,o)?s:null}):t.computed(()=>{const r=e.value;return wo(r,o)?r:l?.get(n)})}function Ie(e){return $e(e,"readonly",0,function(a){return he(a)})}function Ve(e){return $e(e,"disabled",0,function(a){return he(a)})}function ve(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 gr=new Map,Sn=new Map;let No=null;function hi(e){No=e}function yr(e,n,a){if(a){let o=Sn.get(a);o||(o=new Map,Sn.set(a,o)),o.set(e,n)}else gr.set(e,n)}function Ze(e,n,a){!a&&No&&(a=No(e)??void 0);let o=null;if(a){let l=Sn.get(a);l&&(o=l.get(n))}return o||(o=gr.get(n)),o}function gi(e,n){for(let a in e){const o=e[a];yr(a,o,n)}}function yi(e){Sn.delete(e)}function bi(){return{top:0,left:0,bottom:0,right:0}}function ki(e=0,n=0){if(nt){const a=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l={width:a,height:o-de(e,o)-de(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 Si(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Ci{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=Si(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=fn(()=>{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=ot({},bi(),n.safeAreaInset),s=ki(o,l),i=ot({},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){hi(n)}setAPI(n,a,o){yr(n,a,o)}getAPI(n,a,o){return Ze(n,a,o)}batchSetAPI(n,a){gi(n,a)}clearScopeAPI(n){yi(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 wi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Xa(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={};ln(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)}}},br=(e,n)=>e?t.h(e,n):"";function xe(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const pe={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}},be={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}},kr={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}},Sr={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}},Cr=[];for(const e in Sr)Cr.push(e);const Ni=Symbol.for("InnerPageScopeKey"),Bi={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:{...pe,...kr,...Bi},setup(a,{slots:o}){const l=So(a.name,a),r=t.inject(Ni,!1);if(l){const p=hr(l,a);xe({getPageContentHeight:()=>yn(l,p),getPageContentWidth:()=>bn(l,p),getPageHeaderHeight:()=>hn(l,p),getPageFooterHeight:()=>gn(l,p)}),p&&r&&(p.contentHeight="100%")}const s=t.computed(()=>({[e]:!0})),i=t.computed(()=>({})),c=t.getCurrentInstance(),m=(p,d=!1)=>{const h=c?.proxy;h&&typeof h.setNameValidateRules=="function"&&h.setNameValidateRules(p,!0,d)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,d],[h,S])=>{if(p&&h){const y=t.toRaw(h),k=t.toRaw(p),b=k?Reflect.ownKeys(k):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{b.includes(u)||(k[u]=[])}),m(k)}if(d&&S){const y=t.toRaw(S),k=t.toRaw(d),b=k?Reflect.ownKeys(k):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{b.includes(u)||(k[u]=[])}),m(k,!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:Vi,scope:rA}=G("page"),Bo=Vi(Ai(Ti));function Ao(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function Cn(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 $i=Symbol.for("InnerPageScopeKey"),Ei=(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?pn(s):null,c=t.inject($i,!1),m=e,p=t.computed(()=>{const B={[m]:!0,[`${m}--border`]:l.border,[`${m}--fixed`]:l.fixed};return c||(B[`${m}--safe-area-inset-top`]=l.safeAreaInsetTop),B}),d=t.computed(()=>({[`${m}__inner`]:!0,[`${m}__inner--${l.align}`]:!0})),h=l.height!==null&&l.height!==void 0?de(l.height):null,S=t.computed(()=>{const B={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const M=ze(l.padding??i.headerPadding);return Object.assign(B,M),h&&(i.headerHeight=h),i.headerHeight>0&&(B.height=i.headerHeight),B.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,B.safeAreaTop>0&&(B.top=B.safeAreaTop+(M.top??0),B.height&&B.height>0&&(B.height=B.height+B.safeAreaTop)),B}if(h&&(B.height=h),l.padding){const M=ze(l.padding);Object.assign(B,M)}return B}),y=t.ref(null),k=()=>{if(i&&y.value&&!rn(y.value)){if(!o){const B=Ao(y.value);i.headerAllHeight=B.height}return i.headerMounted=!0,!0}return!1};let b=null;t.onMounted(()=>{i&&(bo(k,50,5,50,!0),window.ResizeObserver&&y.value&&(b=new window.ResizeObserver(()=>{k()}),b.observe(y.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,b&&(b.disconnect(),b=null))});const f=t.computed(()=>{const B={};return S.value.height!==null&&S.value.height!==void 0&&(B.height=`${S.value.height}px`),S.value.top!==null&&S.value.top!==void 0&&(B.paddingTop=`${S.value.top}px`),S.value.left!==null&&S.value.left!==void 0&&(B.paddingLeft=`${S.value.left}px`),S.value.right!==null&&S.value.right!==void 0&&(B.paddingRight=`${S.value.right}px`),S.value.bottom!==null&&S.value.bottom!==void 0&&(B.paddingBottom=`${S.value.bottom}px`),B}),u=t.computed(()=>!(S.value.height!==null&&S.value.height!==void 0&&S.value.height<=0));function g(){r.emit("back")}function w(){r.emit("click-title")}function T(){r.emit("click-right")}function C(){r.emit("click-right-text")}const A=()=>{if(!l.leftShow)return null;const B=[];if(r.slots.left)B.push(r.slots.left());else{if(r.slots.leftIcon){const M=t.h("view",{class:"left-icon",onClick:g},[r.slots.leftIcon()]);B.push(M)}else if(l.leftIcon){const M=t.h("view",{class:"left-icon",onClick:g},[t.h(l.leftIcon)]);B.push(M)}if(l.leftText){const M=t.h("view",{class:"left-text",onClick:g},[l.leftText]);B.push(M)}}return B.length===0?null:t.h("view",{class:"fox-header-bar__left"},B)},V=()=>{if(!l.rightShow)return null;const B=[];if(r.slots.right)B.push(r.slots.right());else{if(l.rightText){const M=t.h("view",{class:"right-text",onClick:C},[l.rightText]);B.push(M)}if(r.slots.rightIcon){const M=t.h("view",{class:"right-icon",onClick:T},[r.slots.rightIcon()]);B.push(M)}else if(l.rightIcon){const M=t.h("view",{class:"right-icon",onClick:T},[t.h(l.rightIcon)]);B.push(M)}}return B.length===0?null:t.h("view",{class:"fox-header-bar__right"},B)},$=()=>{if(!l.titleShow)return null;const B=[],M=r.slots.default?r.slots.default():null;if(M)B.push(M);else{if(l.title){const L=t.h("view",{class:"title-text"},[l.title]);B.push(L)}if(r.slots.titleIcon){const L=t.h("view",{class:"title-icon",onClick:w},[r.slots.titleIcon()]);B.push(L)}else if(l.titleIcon){const L=t.h("view",{class:"title-icon",onClick:w},[t.h(l.titleIcon)]);B.push(L)}}return B.length===0?null:t.h("view",{class:"fox-header-bar__title"},B)},E=()=>{const B=[],M=r.slots.bottom?r.slots.bottom():null;return M&&B.push(M),B.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},B)};return()=>{if(!u.value)return null;const B=[];if(r.slots.all)B.push(r.slots.all());else{const L=[],I=A();I&&L.push(I);const D=$();D&&L.push(D);const R=V();if(R&&L.push(R),L.length>0){const W=t.h("view",{class:d.value},L);B.push(W)}const q=E();q&&B.push(q)}if(B.length===0)return null;const M={class:p.value,style:f.value,ref:y};return t.h("view",M,B)}}}),{componentName:Di,create:Ii,scope:xi}=G("header-bar"),To=Ii(Ei(Di,xi,oe.Left,!1)),qi=Symbol.for("InnerPageScopeKey");function vi(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?pn(r):null,i=t.inject(qi,!1),c=e,m=t.computed(()=>{const b={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(b[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),b}),p=o.height!==null&&o.height!==void 0?de(o.height):null,d=t.computed(()=>{const b={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(b,f),p&&(s.footerHeight=p),s.footerHeight>0&&(b.height=s.footerHeight),b.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,b.safeAreaBottom>0&&(b.bottom=b.safeAreaBottom+(f.bottom??0),b.height&&b.height>0&&(b.height=b.height+b.safeAreaBottom)),b}if(p&&(b.height=p),o.padding){const f=ze(o.padding);Object.assign(b,f)}return b}),h=t.ref(null),S=()=>{if(s&&h.value&&!rn(h.value)){if(!a){const b=Ao(h.value);s.footerAllHeight=b.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(bo(S,50,5,50,!0),window.ResizeObserver&&(y=new window.ResizeObserver(()=>{S()}),y.observe(h.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,y&&(y.disconnect(),y=null))});const k=t.computed(()=>{const b={};return d.value.height!==null&&d.value.height!==void 0&&(b.height=ge(d.value.height)),d.value.top!==null&&d.value.top!==void 0&&(b.paddingTop=ge(d.value.top)),d.value.left!==null&&d.value.left!==void 0&&(b.paddingLeft=ge(d.value.left)),d.value.right!==null&&d.value.right!==void 0&&(b.paddingRight=ge(d.value.right)),d.value.bottom!==null&&d.value.bottom!==void 0&&(b.paddingBottom=ge(d.value.bottom)),b});return()=>{const b=l.slots.default?l.slots.default():[],f={ref:h,class:m.value,style:k.value};return t.h("view",f,b)}}}}const{componentName:Mi,create:Pi,scope:Li}=G("footer-bar"),Vo=Pi(vi(Mi,Li,!1));function zi(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?pn(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=hn(o,r),d=gn(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:",d),console.debug("[content]padding:",r.contentPadding),m.height=h;let S=(r&&r.contentPadding&&r.contentPadding.top)??-1;(S>=0||p>0)&&(S=S<0?0:S,m.paddingTop=`${p+S}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||d>0)&&(y=y<0?0:y,m.paddingBottom=`${d+y}px`);const k=(r&&r.contentPadding&&r.contentPadding.left)??-1;k>=0&&(m.paddingLeft=`${k}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(m.paddingRight=`${b}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=ft(()=>{if(r&&i.value){const m=Cn(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:Fi,create:Ri,scope:sA}=G("content"),Oi=Ri(zi(Fi));function Ki(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},$o=te(Oi,[["render",Ki]]),gt="GroupStateKey",wr=Symbol.for("GroupScopeKey");function wn(){return t.inject(wr,!1)}function Nn(e=!0){t.provide(wr,e)}function Ui(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Ya(l)||(e[o]=l)})}function Hi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Ui(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(gt,r),r}function Eo(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(gt);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=de(r),d=de(s);i||(i=m.type??"grid");const h=()=>{const S=n===""||n===-1,y=de(n);let k=me(a);const b=de(o);if(!S){let g=(y-(k-1)*b)/k;for(;d!==-1&&g>d;)k++,g=(y-(k-1)*b)/k;for(;p!==-1&&k>1&&g<p;)k--,g=(y-(k-1)*b)/k}let f=!1;const u=c.layout;u.value.width=n,u.value.column!==k&&(u.value.column=k,f=!0),u.value.gutter!==b&&(u.value.gutter=b,f=!0),u.value.type!==i&&(u.value.type=i,f=!0),f&&t.triggerRef(u)};if(l)h();else{const S=++c.passport;setTimeout(()=>{S===c.passport&&h()},50)}}function Bn(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.layout}function An(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.order}function Nr(e,n=1){if(n==="stretch")return-1;const a=me(n);return a===-1?100:100*a/e}function Tn(e,n,a=1,o=0,l){const r={};let s=0;l?s=de(l):s=Nr(n.column,a),s>0&&(r.width=`${s}%`);const i=Nr(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 Vn(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=me(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=me(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 Br=Symbol("RollingStateKey");function ji(e){t.provide(Br,e)}function Wi(){return t.inject(Br,null)}function Do(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 Yi(e){let n=Do(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=Do(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Xi(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const Qi={...pe,...kr,...Sr};function Gi(e,n,a){return{props:Qi,emits:["update:collapse","header-click"],setup(o,l){const r=So(o.name,o,Cr),s=Hi(r,{type:o.type}),i=wn();Nn(!0);const c=o.rollingDisplay?Wi():null,m=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),d=t.computed(()=>i&&r?Bn(r,!0).value:null),h=t.getCurrentInstance(),S=(U,j=!1)=>{const Q=h?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(U,!0,j)};t.watch([()=>o.rules,()=>o.pureDataRules],([U,j],[Q,O])=>{if(U&&Q){const Z=t.toRaw(Q),ne=t.toRaw(U),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne)}if(j&&O){const Z=t.toRaw(O),ne=t.toRaw(j),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne,!0)}},{deep:!0});const y=e,k=t.computed(()=>{const U={};if(U.height=D.value,o.width)o.width!=="auto"&&(U.width=ge(o.width));else{const j=i?An(r,!0):null;if(d.value&&j){if(d.value.type==="grid"){const Q=Vn(j,d.value,o.span,o.offset);Object.assign(U,Q)}else if(d.value.type==="flow"){const Q=Tn(j,d.value,o.span,o.offset,o.width);Object.assign(U,Q)}}}return U}),b=t.computed(()=>{const U=s.layout.value.type;return U==="grid"||U==="flow"?{[`${y}--${U}`]:!0,[`${y}--${U}-justify-${o.justify}`]:!0,[`${y}--${U}-align-${o.align}`]:!0,[`${y}--gutter`]:!0}:{[`${y}--${U}`]:!0,[`${y}--gutter`]:!0}}),f=t.computed(()=>{if(s.layout.value.type==="grid"){let j="";if(o.columnWidth)j=`repeat(auto-fill, ${o.columnWidth})`;else{const Q=Xi(V.value,s.layout.value.column,s.layout.value.gutter);j=`repeat(${s.layout.value.column}, ${Q})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":j}}}),u=t.toRef(o,"gutter"),g=t.toRef(o,"column"),w=t.computed(()=>i||p.value?!0:he(o.isWrap)),T=[],C=U=>{T.push(U)},A=()=>{let U=T.length;T.splice(0,U)},V=t.ref(-1),$=U=>{const j=Cn(U).width;j>0&&j!==V.value&&(V.value=j)};Eo(r,V.value,g.value,u.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([V,g,u],([U,j,Q])=>{s.order.index=0,Eo(r,U,j,Q,!1,o.minItemWidth,o.maxItemWidth,o.type)});const E=t.computed(()=>R.value?o.expandText??"":o.collapseText??""),B=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),M=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!R.value,"is-collapse":R.value})),L=t.ref(),I=t.ref(),D=t.computed(()=>q.value||ge(o.height)||""),R=t.ref(!1),q=t.ref(""),W=t.ref(!1);let H=-1;const J=(U,j=!0)=>{const Q=L.value;if(Q&&R.value!==U){if(H=H<=0?Yi(Q):H,W.value=!0,j)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",U||(q.value="",W.value=!1)},U){let O=0;o.collapseHeight?O=o.collapseHeight:I.value&&I.value.classList.contains(`${e}__header`)&&(O=I.value.offsetHeight),q.value=`${H}px`,t.nextTick(()=>{q.value=`${O}px`})}else q.value=`${H}px`;else if(U){let O=0;o.collapseHeight?O=o.collapseHeight:I.value&&I.value.classList.contains(`${e}__header`)&&(O=I.value.offsetHeight),q.value=`${O}px`}else W.value=!1,q.value=`${H}px`;R.value=U,l.emit("update:collapse",U)}};t.watch(()=>o.collapse,U=>{J(U)});const ee=U=>{l.emit("header-click",U)},Y=()=>{v()},v=U=>{U=U??!R.value,J(U)};xe({toggleCollapse:v,doLayout:()=>{T[0]&&($(T[0]),Eo(r,V.value,g.value,u.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let x=null,F=!0;const P=U=>{if(o.rules){const j=t.toRaw(o.rules);S(j)}if(o.pureDataRules){const j=t.toRaw(o.pureDataRules);S(j,!0)}if(nt&&(U&&J(he(o.collapse),!1),o.autoLayout&&Array.isArray(T)&&T.length>0)){const j=T[0];$(j),window.ResizeObserver&&(x=new window.ResizeObserver(()=>{$(j)}),x.observe(j))}},K=()=>{x?.disconnect(),x=null},X=!p.value||c?.acquire();X&&(m.value=p.value?!0:null),t.onMounted(()=>{if(X&&(P(F),F=!1),p.value&&c){let U=null,j=c.initialHeight;c.observe(L.value,Q=>{if(Q!==m.value)if(Q)m.value=!0,R.value||(q.value=""),U=setTimeout(()=>{U=null,m.value!==!1&&(P(F),F=!1)},100);else{if(U!==null&&clearTimeout(U),m.value=!1,!R.value)if(F)q.value=c.initialHeight;else{let O=Do(L.value);O<=0?q.value=j:(q.value=`${O}px`,j=q.value)}F||K()}})}}),t.onUnmounted(()=>{x?.disconnect(),c&&c.unobserve(L.value)});const _=(U="right")=>{const j=[];if(E.value){const ne={class:B.value},re=t.h("span",ne,[E.value]);j.push(re)}const Q={class:M.value},O=o.collapseIcon??a,Z=t.h(O,Q);return j.push(Z),j.length>0?t.h("div",{class:{[`${y}__header-collapse`]:!0,[`is-${U}`]:!0},onClick:Y},j):null},le=(U,j,Q,O)=>{const Z={...b.value};return j===0&&(Z[`${y}__first`]=!0),Q>=O-1&&(Z[`${y}__last`]=!0),t.h("div",{ref:C,key:`${j}`,class:Z,style:f.value},U)};return()=>{if(p.value&&m.value!==!0){const Z=o.tag||"div";return t.h(Z,{ref:L,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:k.value},[])}s.order.index=0;const U=[];let j=0;if(l.slots.header){const Z={key:`${j++}`,ref:I,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},ne=t.h("div",Z,[l.slots.header()]);U.push(ne)}else{const Z=[],ne=o.collapsePosition==="left";if(ne&&o.showCollapse){const re=_("left");re&&Z.push(re)}if(o.title||l.slots.title){if(o.showMark){const re={class:{[`${y}__header-mark`]:!0}};o.markColor&&(re.style={background:o.markColor});const se=t.h("div",re);Z.push(se)}if(l.slots.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[l.slots.title()]);Z.push(re)}else if(o.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[o.title]);Z.push(re)}}if(l.slots.toolbar&&Z.push(l.slots.toolbar()),!ne&&o.showCollapse){const re=_("right");re&&Z.push(re)}if(Z.length>0){const re={key:`${j++}`,ref:I,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},se=t.h("div",re,Z);U.push(se)}}A();const Q=l.slots.default?l.slots.default():[],O=s.layout.value.type;if(O==="grid"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else if(O==="flow"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else for(let Z=0;Z<Q.length;Z++){const ne=Q[Z],re=le([ne],j++,Z,Q.length);U.push(re)}if(w.value){const Z=o.tag||"div";return t.h(Z,{ref:L,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:k.value},[U])}else return U}}}}const{componentName:Zi,create:Ji,scope:_i}=G("group"),Io=Ji(Gi(Zi,_i,oe.RectUp));function ec(e){return e===window}const tc=/matrix\((.+)\)/,Ar=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(ec(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=tc.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 nc{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 oc{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 nc,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 Tr=new oc,Vr={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"¥"},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:lc,create:ac}=G("price"),rc=ac({props:{...Vr},setup(e){const n=t.computed(()=>({[lc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ke(e.price)==0?"":nn(e.price,e.decimalLength,!0,me(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}}}),sc=["innerHTML"],ic=["innerHTML"];function cc(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,sc)):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,ic)):t.createCommentVNode("",!0)],2)}const Je=te(rc,[["render",cc]]),{componentName:xo,create:dc}=G("hint-text"),uc=dc({components:{Price:Je},props:{...Vr,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=(B,M,L,I,D,R)=>{const q=document.documentElement.clientWidth||document.body.clientWidth,W=document.documentElement.clientHeight||document.body.clientHeight,H=B.split("-");let J=[];H[0]==="top"?J=["top","bottom","right","left"]:H[0]==="bottom"?J=["bottom","top","right","left"]:H[0]==="left"?J=["left","top","bottom","right"]:H[0]==="right"&&(J=["right","top","bottom","left"]);const ee={top:null,right:null,bottom:null,left:null},Y=[];for(let v=0;v<J.length;v++){const z=J[v];if(Y[0]=z,H[1]&&(Y[1]=H[1]),z==="top"){const x=M.y-R-e.arrowSize-e.offset;if(x>=0){ee.top=x;let F=0;H[1]==="start"?F=M.x:H[1]==="end"?F=M.x+L-D:F=M.x+L/2-D/2;const P=q-F-D;P<0?(F+=P,d.value=-P):d.value=0,ee.left=F<0?0:F;break}}else if(z==="bottom"){const x=M.y+I+e.arrowSize+e.offset;if(x+R<=W){ee.top=x;let F=0;H[1]==="start"?F=M.x:H[1]==="end"?F=M.x+L-D:F=M.x+L/2-D/2;const P=q-F-D;P<0?(F+=P,d.value=-P):d.value=0,ee.left=F<0?0:F;break}}else if(z==="left"){const x=M.x-D-e.arrowSize-e.offset;if(x>=0){ee.left=x;let F=0;H[1]==="start"?F=M.y:H[1]==="end"?F=M.y+I-R:F=M.y+I/2-R/2,ee.top=F<0?0:F;break}}else if(z==="right"){const x=M.x+L+e.arrowSize+e.offset;if(x+D<=q){ee.left=x;let F=0;H[1]==="start"?F=M.y:H[1]==="end"?F=M.y+I-R:F=M.y+I/2-R/2,ee.top=F<0?0:F;break}}}return{bestPlacement:Y.join("-"),bestInsetRect:ee}},p=(B,M,L=10)=>{if(!nt||M===!1||!B)return;o.value=Ar(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const I=c.value.offsetHeight,D=c.value.offsetWidth,{bestPlacement:R,bestInsetRect:q}=m(e.placement,o.value,l.value,r.value,D,I);s.value=R,a.value=q,i.value=!0},d=t.ref(0),h=ft(()=>{p(e.message,e.visible)},10),S=t.ref(e.visible);t.watch(()=>e.visible,B=>{S.value=B});const y=t.computed(()=>S.value&&k.value),k=t.ref(!0),b=ft(B=>{const M=B[0];M&&(k.value=M.isIntersecting)},10),f=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([B,M])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Tr.watch(e.reference,h),f.observe(e.reference)}),t.onBeforeMount(()=>{Tr.unwatch(e.reference,h),f.unobserve(e.reference),f.disconnect()});const u=t.computed(()=>{const B={[xo]:!0};return s.value.startsWith("top")?B["is-top"]=!0:s.value.startsWith("right")?B["is-right"]=!0:s.value.startsWith("bottom")?B["is-bottom"]=!0:s.value.startsWith("right")&&(B["is-right"]=!0),e.size==="small"?B["is-small"]=!0:e.size==="large"&&(B["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(B[`${e.customClass}`]=!0),B}),g=t.computed(()=>{const B={};a.value.top!==null&&(B.top=`${a.value.top}px`),a.value.right!==null&&(B.right=`${a.value.right}px`),a.value.bottom!==null&&(B.bottom=`${a.value.bottom}px`),a.value.left!==null&&(B.left=`${a.value.left}px`),e.autoFit&&(B["min-width"]=`${l.value}px`);const M=document.documentElement.clientWidth||document.body.clientWidth;return B["max-width"]=`${M}px`,i.value&&(B.opacity="1"),e.transition||(B.transition="none"),e.zIndex&&(B["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(B,e.customStyle),B}),w=t.computed(()=>{const B=[`${xo}__content`];return e.customTextClass&&B.push(e.customTextClass),B}),T=t.computed(()=>{const B={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(B,e.customTextStyle),B}),C=t.computed(()=>({[`${xo}__arrow`]:!0})),A=t.computed(()=>{const B={};return e.showArrow?(B.width=`${e.arrowSize}px`,B.height=`${e.arrowSize}px`,s.value==="top"?(B.left="50%",B.bottom=`-${e.arrowSize}px`,B.transform=" translate(-50%, 0%)"):s.value==="top-start"?(B.left=`${e.arrowOffset+d.value}px`,B.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(B.right=`${e.arrowOffset-d.value}px`,B.bottom=`-${e.arrowSize}px`):s.value==="right"?(B.left=`-${e.arrowSize}px`,B.top="50%",B.transform=" translate(0%, -50%)"):s.value==="right-start"?(B.left=`-${e.arrowSize}px`,B.top=`${e.arrowOffset}px`):s.value==="right-end"?(B.left=`-${e.arrowSize}px`,B.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(B.left="50%",B.top=`-${e.arrowSize}px`,B.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(B.left=`${e.arrowOffset+d.value}px`,B.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(B.right=`${e.arrowOffset-d.value}px`,B.top=`-${e.arrowSize}px`):s.value==="left"?(B.right=`-${e.arrowSize}px`,B.top="50%",B.transform=" translate(0%, -50%)"):s.value==="left-start"?(B.right=`-${e.arrowSize}px`,B.top=`${e.arrowOffset}px`):s.value==="left-end"&&(B.right=`-${e.arrowSize}px`,B.bottom=`-${e.arrowOffset}px`),B):{display:"none"}}),V=t.computed(()=>y.value&&e.closeOnClick),$=t.computed(()=>{const B={};return e.zIndex&&(B["z-index"]=`${e.zIndex}`),B});return{show:y,tipRef:c,classes:u,styles:g,textClasses:w,textStyles:T,arrowClasses:C,arrowStyles:A,overlayShow:V,overlayStyle:$,onClickOverlay:()=>{S.value=!1,n.emit("update:visible",!1)}}}}),fc=["innerHTML"];function mc(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,fc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const $r=te(uc,[["render",mc]]);class $n{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 qo={},pc=new $n,yt=new Map,En=e=>{if(e){const n=document.getElementById(e);yt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of yt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}yt.clear()}},hc=e=>{e.unmount=En;const n=document.getElementById(e.id);if(n){const a=yt.get(e.id);a?e={...qo,...a,...e}:e={...qo,...e},e.transition=!1;const o=t.createVNode($r,e);return t.render(o,n),e.id}},gc=e=>{e.unmount=En;let n=e.id??`hinttext_${pc.get()}`;e={...qo,...e},e.id=n,yt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode($r,e);return t.render(o,a),document.body.appendChild(a),n},yc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},bt={show(e,n,a={},o=!0){yc(n);const l=a.id;return l&&yt.has(l)?hc({...a,message:n,reference:e}):(o&&En(),gc({...a,message:n,reference:e}))},hide(e){En(e)},install(e){e.config.globalProperties.$hintText=bt}};function bc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...pe,...be},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Te({componentName:e,validate:!1},s);const i=je(),c=wn();Nn(!1);const m=t.computed(()=>c&&i?Bn(i,!1).value:null),p=e,d=t.ref(null),h=t.computed(()=>{const O={[p]:!0,[`${p}__gutter`]:m.value&&m.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(O[l.errorMarkClass]=!!R.value,O[l.warnMarkClass]=!!I.value,O[l.infoMarkClass]=!!M.value,typeof d.value=="function"){const Z=d.value(s);O[Z]=!0}else if(typeof d.value=="string"){const Z=d.value;O[Z]=!0}return O}),S=t.ref(null),y=t.computed(()=>{const O={};if(l.width)l.width!=="auto"&&(O.width=ge(l.width));else{const Z=c&&i?An(i,!1):null;if(m.value&&Z){if(m.value.type==="grid"){const ne=Vn(Z,m.value,l.span,l.offset);Object.assign(O,ne)}else if(m.value.type==="flow"){const ne=Tn(Z,m.value,l.span,l.offset,l.width);Object.assign(O,ne)}}}if(typeof S.value=="function"){const Z=S.value(s);Z&&Object.assign(O,Z)}else if(S.value&&typeof S.value=="object"){const Z=S.value;Object.assign(O,Z)}return O}),k=t.ref(null),b=t.computed({get:()=>k.value??he(l.isRequired),set:O=>{k.value=O}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",u=$e(t.toRef(l,"labelPosition"),"labelPosition",kn.Near),g=t.computed(()=>u&&u.value==="top"?"top":u&&u.value==="right"?"right":"left"),w=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),T=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),C=$e(t.toRef(l,"labelWidth"),"labelWidth",kn.Near),A=t.computed(()=>C&&C.value?{width:ge(C.value)}:{}),V=t.computed(()=>({"label--string":!0,"label--required":b.value})),$=t.computed(()=>({content:!0,[l.contentClass]:!0})),E=t.computed(()=>({...l.contentStyle})),B=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});xe({setRequired(O){b.value=O},setErrorTip(O){B.errorTip=O},setErrorIcon(O){B.errorIcon=O},setWarnTip(O){B.warnTip=O},setWarnIcon(O){B.warnIcon=O},setInfoTip(O){B.infoTip=O},setInfoIcon(O){B.infoIcon=O},setCustomClassName(O){d.value=O},setCustomStyle(O){S.value=O}});const M=t.computed(()=>l.infoTip||B.infoTip),L=t.computed(()=>l.infoIcon||B.infoIcon),I=t.computed(()=>l.warnTip||B.warnTip),D=t.computed(()=>l.warnIcon||B.warnIcon),R=t.computed(()=>l.errorTip||B.errorTip),q=t.computed(()=>l.errorIcon||B.errorIcon),W=t.computed(()=>R.value?"error":I.value?"warn":M.value?"info":""),H=()=>W.value.length>0,J=t.computed(()=>W.value==="error"?R.value:W.value==="warn"?I.value:W.value==="info"?M.value:""),ee=t.computed(()=>W.value==="error"?q.value:W.value==="warn"?D.value:W.value==="info"?L.value:null),Y=t.computed(()=>{const O={[`${p}__tip`]:!0,[`${p}__tip--${W.value}`]:!0,[`${p}--animate`]:!0};return W.value==="error"&&l.errorClass?O[`${l.errorClass}`]=!0:W.value==="warn"&&l.warnClass?O[`${l.warnClass}`]=!0:W.value==="info"&&l.infoClass&&(O[`${l.infoClass}`]=!0),O}),v=t.computed(()=>{const O={};return u&&u.value==="top"||!f()?O["padding-left"]="0px":C&&C.value&&(O["padding-left"]=ge(C.value)),O}),z=t.ref();let x="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([O,Z,ne,re])=>{z.value&&(O&&!ue(Z)?x?a.show(z.value,Z,{...re,id:x,type:ne},!0):x=a.show(z.value,Z,{...re,type:ne},!0):a.hide(x))});let F=null;const P=()=>{F||!z.value||(F=new IntersectionObserver(O=>{let Z=!1;for(let ne of O)if(ne.intersectionRatio>0){Z=!0,Z&&r.emit("appear",ne);break}Z||r.emit("disappear")}),F.observe(z.value))},K=()=>{!F||!z.value||(F.unobserve(z.value),F=null)};t.watch(()=>he(l.appearListen),O=>{O?P():K()}),t.onMounted(()=>{he(l.appearListen)&&P()}),t.onUnmounted(K);const X=()=>{if(!f())return null;const O=[],Z=r.slots?.label?.()??l.label,ne={class:V.value},re=t.h("div",ne,[Z]);if(O.push(re),r.slots.fixedPreTip){const ye=r.slots.fixedPreTip();O.push(ye)}const se={class:T.value,style:A.value};return t.h("div",se,O)},_=()=>{const O=[];if(r.slots.prepend){const ne=r.slots.prepend();O.push(ne)}if(r.slots.default){const ne=r.slots.default();O.push(ne)}if(r.slots.append){const ne=r.slots.append();O.push(ne)}if(r.slots.fixedTip){const ne={class:[`${p}__fixed-tip`]},re=t.h("div",ne,[r.slots.fixedTip()]);O.push(re)}const Z={ref:z,class:$.value,style:E.value};return t.h("div",Z,O)},le=()=>{const O=ee.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--icon"},[O()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(O)]):null},U=()=>{const O=J.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--text"},[O()]):t.h("div",{class:"fox-item__tip--text"},[O]):null},j=()=>{if(!H())return null;const O=[],Z=le();Z&&O.push(Z);const ne=U();ne&&O.push(ne);const re={class:Y.value,style:v.value};return t.h("div",re,O)},Q=()=>r.slots?.hide?.()??null;return()=>{const O=[],Z=[],ne=X();ne&&Z.push(ne);const re=_();re&&Z.push(re);const se={class:w.value},ye=t.h("div",se,Z);O.push(ye);const Ce=j();Ce&&O.push(Ce);const Xe=Q();Xe&&O.push(Xe);const La={class:h.value,style:y.value,prop:l.prop};return t.h("div",La,O)}}}}const{componentName:kc,create:Sc,scope:Cc}=G("item"),Be=Sc(bc(kc,Cc,bt,!1));function wc(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=wn();Nn(!1);const c=t.computed(()=>{const m={};if(a.width)a.width!=="auto"&&(m.width=ge(a.width));else if(i&&s){const p=Bn(s,!1),d=An(s,!1);if(p.value&&d){if(p.value.type==="grid"){const h=Vn(d,p.value,a.span,a.offset);Object.assign(m,h)}else if(p.value.type==="flow"){const h=Tn(d,p.value,a.span,a.offset,a.width);Object.assign(m,h)}}}return m});return()=>{const m=[];if(o.slots.default){const d=o.slots.default();if(a.divide)for(let h=0;h<d.length;h++){if(h>0){const S=t.h("div",{class:{[`${l}__divide`]:!0}});m.push(S)}m.push(d[h])}else Reflect.apply([].push,m,d)}const p={class:r.value,style:c.value};return t.h("div",p,m)}}}}const{componentName:Nc,create:Bc,scope:iA}=G("row-item"),vo=Bc(wc(Nc));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=wn();Nn(!1);const s=t.computed(()=>r&&l?Bn(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 d=r&&l?An(l,!1):null;if(s.value&&d){if(s.value.type==="grid"){const h=Vn(d,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Tn(d,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:Vc,scope:cA}=G("slot-item"),Mo=Vc(Ac(Tc)),Er={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 $c(e,n,a,o){return{props:{...pe,...be,...Er},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=ie.useFoxI18n(n),p=m(l,["placeholder"]),d=t.ref(!1),h=ve(l,"modelValue",null,c),S=e,y=t.computed(()=>({[S]:!0,"is-disabled":s.value,"is-readonly":i.value})),k=$e(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const D={};return k.value&&(D["text-align"]=k.value),D}),f=D=>{let q=D.target.value;l.type==="digit"&&(q=ho(q,!0)),l.type==="number"&&(q=ho(q,!1)),l.maxLength&&q.length>Number(l.maxLength)&&(q=q.slice(0,Number(l.maxLength))),h.value=q,c("update:modelValue",q,D),c("change",q,D)};let u=ve(l,"hintText"),g=t.ref(!1);const w=D=>{let q=D.target.value;d.value=!0,ue(u.value)||(g.value=!0),c("focus",q,D)},T=D=>{setTimeout(()=>{g.value&&(g.value=!1),d.value=!1},0);let q=D.target.value;l.maxLength&&q.length>Number(l.maxLength)&&(q=q.slice(0,Number(l.maxLength))),c("blur",q,D)},C=t.computed(()=>({[`${S}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),A=t.computed(()=>{const D={};return r.slots.append&&!V.value&&!L.value&&(D.display="none"),D}),V=t.computed(()=>ke(l.unit)>0),$=t.computed(()=>!L.value),E=t.computed(()=>({[`${S}__unit`]:!0,hidden:!$.value})),B=D=>{h.value="",c("update:modelValue","",D),c("change","",D),c("clear","")},M=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),L=t.computed(()=>{let D=ke(h.value)>0;return he(l.clearable)&&D&&d.value}),I=t.computed(()=>({action:!0,hidden:!L.value}));return()=>{const D={class:y.value,style:b.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:f,onFocus:w,onBlur:T},R=[],q=t.h("input",D);R.push(q);const W=[];if(M.value){const x={class:["action-icon"]},F=t.h(o,x),P={class:I.value,onClick:B},K=t.h("view",P,{default:()=>[F]});W.push(K)}if(V.value){const x=t.h("view",{class:E.value},[l.unit]);W.push(x)}const H={class:C.value,style:A.value},J=t.h("view",H,{default:()=>W});R.push(J);const ee={default:()=>R};ee.label=r.slots.default,ee.prepend=r.slots.prepend,ee.append=r.slots.append,ee.fixedPreTip=r.slots.fixedPreTip,ee.fixedTip=r.slots.fixedTip;const v={...ut(l,Er),hintText:u.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,v,ee)}}}}const{componentName:Ec,create:Dc,scope:Ic}=G("input-item"),Po=Dc($c(Ec,Ic,Be,oe.CircleClose));function Dr(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 Ir(e,n,a=20){if(typeof n=="string"&&(n=me(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=Ha(`${e}`,`${n}`);return Dr(o)}else{let o=co(`${e}`,ja(`${n}`),20);return Dr(o)}}function xc(e,n=-1,a=!1,o=3,l=","){return nn(e,n,a,o,l)}function xr(e,n,a,o,l=!0){if(e==="")return"";if(e=Wa(e),n=me(n),n==1)return e;if(o)e=Ir(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(me(a)+2,"0"):e=co(e,1,me(a)));else{let r=-1*n;e=Ir(e,r)}return e}function qr(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=uo(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=uo(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const vr={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 qc(e,n,a,o){return{props:{...pe,...be,...vr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=t.ref(!1),p=ve(l,"modelValue",null,c),d=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([H,J,ee])=>{if(ue(H)){d.value="";return}const Y=xr(H,J,ee,!1);d.value!==Y&&(d.value=Y)},{immediate:!0});const h=t.computed(()=>{let H="";return m.value&&(H=d.value),H}),{t:S}=ie.useFoxI18n(n),y=t.computed(()=>{let H=l.placeholder??"";return!m.value&&!ue(d.value)?H=xc(d.value,l.decimalLength,l.autoPadding,l.digits,l.separator):H=ue(H)?S(["placeholder"]):H,H}),k=e,b=t.computed(()=>({[k]:!0,[`${k}__placeholder`]:d.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),f=$e(t.computed(()=>l.textAlign),"textAlign"),u=t.computed(()=>{const H={};return f.value&&(H["text-align"]=f.value),H}),g=t.ref(""),w=t.computed(()=>{let H=g.value;return ue(H)&&(H=l.errorTip??""),H}),T=t.ref(""),C=t.ref(!1),A=H=>{let ee=H.target.value;if(ue(ee)){d.value="",p.value="",c("update:modelValue","",H),c("change","",H),he(l.showTip)&&C.value&&(C.value=!1);return}if(ee.length>=2){let Y=ee;if(Y.charAt(0)=="-"&&(Y=Y.substring(1)),Y.length>=2&&Y.charAt(0)=="0"&&Y.charAt(1)!="."){t.triggerRef(d);return}}if(ee!="-"){if(!tr(ee)){t.triggerRef(d);return}if(l.integerLength!=-1&&nr(ee)>Number(l.integerLength)){t.triggerRef(d);return}if(l.decimalLength&&l.decimalLength!=-1&&or(ee)>Number(l.decimalLength)){t.triggerRef(d);return}let Y=qr(ee,l);if(Y.maxValid===!1){g.value=Y.message,t.triggerRef(d);return}}else if(l.min!=null&&me(l.min)>=0){t.triggerRef(d);return}T.value=ee,he(l.showTip)&&(C.value=ee.length>0),d.value=ee,p.value=xr(ee,l.rates,l.precision,!0),c("update:modelValue",p.value,H),c("change",p.value,H)},V=H=>{if(m.value=!0,he(l.showTip)){let J=d.value;ue(J)&&(J=l.hintText),ue(J)||(T.value=J,C.value=!0)}g.value="",c("focus",p.value,H)},$=H=>{if(setTimeout(()=>{m.value=!1,he(l.showTip)&&C.value===!0&&(C.value=!1)},0),!ue(d.value)){let J=qr(d.value,l);if(J.minValid===!1||J.maxValid===!1){g.value=J.message;return}}c("update:modelValue",p.value,H),c("blur",p.value,H)},E=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),B=t.computed(()=>{const H={};return r.slots.append&&!M.value&&!q.value&&(H.display="none"),H}),M=t.computed(()=>ke(l.unit)>0),L=t.computed(()=>!q.value),I=t.computed(()=>({[`${k}__unit`]:!0,hidden:!L.value})),D=H=>{p.value="",c("update:modelValue","",H),c("change","",H),c("clear","")},R=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),q=t.computed(()=>{let H=ke(p.value)>0;return he(l.clearable)&&H&&m.value}),W=t.computed(()=>({action:!0,hidden:!q.value}));return()=>{let H={class:b.value,style:u.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:A,onFocus:V,onBlur:$},J=[],ee=t.h("input",H);J.push(ee);let Y=[];if(R.value){const X={class:["action-icon"]},_=t.h(o,X),le={class:W.value,onClick:D},U=t.h("view",le,{default:()=>[_]});Y.push(U)}if(M.value){const X=t.h("view",{class:I.value},[l.unit]);Y.push(X)}const v={class:E.value,style:B.value},z=t.h("view",v,{default:()=>Y});J.push(z);const x={default:()=>J};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 P={...ut(l,vr),errorTip:w.value,hintText:T.value,hintVisible:C.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,P,x)}}}}const{componentName:vc,create:Mc,scope:Pc}=G("money-item"),Lo=Mc(qc(vc,Pc,Be,oe.CircleClose)),zo={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:Lc,create:zc,scope:Fc}=G("textarea"),Rc=zc({props:{...zo},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=ie.useFoxI18n(Fc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Lc;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 S=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:y,minHeight:k}=e.autosize;y!==void 0&&(S=Math.min(S,y)),k!==void 0&&(S=Math.max(S,k))}S&&(h.style.height=S+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,S)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),n("update:modelValue",h,S),n("change",h,S)};return{...o,textareaRef:l,classes:r,styles:s,change:h=>{const S=h.target;c(S.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})}}}}),Oc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Kc={key:0,class:"fox-textarea__limit"};function Uc(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,Oc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Kc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Dn=te(Rc,[["render",Uc]]);function Hc(e,n,a,o){return{props:{...pe,...be,...zo},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=ve(l,"modelValue",null,c),p=k=>{m.value=k,c("update:modelValue",k,{}),c("change",k,{})};let d=ve(l,"hintText"),h=t.ref(!1);const S=k=>{ue(d.value)||(h.value=!0),c("focus",m.value,k)},y=k=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",m.value,k)};return()=>{const b={...Se(l,zo),disabled:s.value,readonly:i.value,value:m.value,"onUpdate:modelValue":p,onFocus:S,onBlur:y},f=[],u=t.h(o,b);f.push(u);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 w=Se(l,be,pe);return t.h(a,{...w,prop:`${l.prop}_item`},g)}}}}const{componentName:jc,create:Wc,scope:Yc}=G("textarea-item"),Fo=Wc(Hc(jc,Yc,Be,Dn));function Xc(e){return e===window}const qe=e=>{const n=t.unref(e);if(Xc(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 Qc=2e3;const Mr=()=>Qc++,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:{}}},Gc=(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=Mr());const r=t.computed(()=>{const k=e,b=[k,`${k}--${a.position}`];return a.round&&b.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&b.push(`${k}--${a.position}--safebottom`),typeof a.popClass=="string"?b.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{b.push(f)}),b}),s=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),i=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Mr(),a.destroyOnClose&&(l.showSlot=!0),o("open")},m=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=k=>{o("click-pop",k)},d=k=>{k.stopPropagation(),o("click-close-icon",k),o("update:visible",!1)},h=k=>{o("click-overlay",k),a.closeOnClickOverlay&&o("update:visible",!1)},S=k=>{o("opend",k)},y=k=>{o("closed",k)};return t.watch(()=>a.visible,k=>{a.visible?c():m()}),t.watch(()=>a.closeable,k=>{l.closed=k}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:d,onClickOverlay:h,onOpened:S,onClosed:y}}});let vt=0;const Pr="fox-overflow-hidden",Lr=()=>nt?document.body:{classList:[]},Zc=e=>[()=>{if(e())try{!vt&&Lr().classList.add(Pr),vt++}catch{}},()=>{if(e()&&vt)try{vt--,!vt&&Lr().classList.remove(Pr)}catch{}}],Jc={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:_c,create:ed}=G("overlay"),td=ed({props:{...Jc},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=Zc(()=>e.lockScroll),l=t.computed(()=>({[_c]:!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 nd(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 st=te(td,[["render",nd]]),{componentName:od,create:ld}=G("popup"),ad=ld(Gc(od,{FoxOverLay:st,Close:oe.Close}));function rd(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 fe=te(ad,[["render",rd]]),zr=10;function Fr(e,n){return e>n&&e>zr?"horizontal":n>e&&n>zr?"vertical":""}function Ro(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function Oo(){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=Fr(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(""),d=()=>p.value==="vertical",h=()=>p.value==="horizontal",S=()=>{s.value=0,i.value=0,c.value=0,m.value=0,p.value="",a.value=0};return{move:b=>{if(b.touches){const g=b.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const u=b;s.value=u.clientX-e.value,i.value=u.clientY-n.value,l.value=u.clientX,r.value=u.clientY}c.value=Math.abs(s.value),m.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=Fr(c.value,m.value))},start:b=>{if(S(),b.touches){const g=b.touches[0];e.value=g.clientX,n.value=g.clientY}else{const u=b;e.value=u.clientX,n.value=u.clientY}a.value=Date.now()},reset:S,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:m,direction:p,isVertical:d,isHorizontal:h}}const Rr={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}},Ko={...Fe,...Rr,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 Or=36;function sd(){return Or}function id(e){Or=e}function Re(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Uo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function cd(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function it(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Kr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let dd=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function ud(){const e=t.getCurrentInstance();return new dd(e.proxy)}function Ur(e,n,a){const o=Re(e,n),l=Re(e,a);if(o!==l)return!1;const r=it(e,n),s=it(e,a);return r===s}function fd(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 Re(e,p)===i;if(r==="value"){let d=it(e,p);return d==null&&(d=Re(e,p)),d===i}else if(r==="item")return Ur(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(d=>{if(r==="text")return Re(e,d)===c;if(r==="value"){let h=it(e,d);return h==null&&(h=Re(e,d)),h===c}else if(r==="item")return Ur(e,d,c)});if(m==-1)break;l.push(m);const p=Uo(e,s[m]);if(!Array.isArray(p))break;s=p}}return l}function Hr(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=Re(e,m);if(l.texts.push(p),l.items.push(m),r==="text")l.values.push(p);else if(r==="value"){let d=it(e,m);d==null&&(d=p),l.values.push(d)}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 d=Re(e,m);if(l.texts.push(d),l.items.push(p),r==="text")l.values.push(d);else if(r==="value"){let h=it(e,m);h==null&&(h=d),l.values.push(h)}else l.values.push(p);if(!Array.isArray(m.children))break;s=m.children}}return l}function jr(e){return{text:e,value:e}}const md=15,pd=300,hd=200,{create:gd}=G("picker-column");function yd(e){e.stopPropagation()}function bd(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&yd(e)}const kd=gd({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},...Rr},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${me(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=A=>A>=d.currIndex+8||A<=d.currIndex-8,i=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${d.deg})`,top:`${r.value}px`})),c=A=>`transform: rotate3d(1, 0, 0, ${-d.rotation*A}deg) translate3d(0px, 0px, 104px)`,m=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${d.scrollDistance+r.value}px, 0)`})),p=t.ref(null),d=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=A=>Re(e,A),S=A=>it(e,A),y=_e(),k=()=>{d.transitionEndTrigger&&(d.transitionEndTrigger(),d.transitionEndTrigger=null)},b=(A,V=!1,$=!1)=>{if(d.currIndex=A,V){const E=()=>{d.moving=!1,n("update:modelValue",A),n("change",A)};$?d.transitionEndTrigger=E:E()}},f=(A,V,$)=>{let E=A+d.startDistance;if(V==="end"){const B=-(e.source.length-1)*e.itemHeight;E<B&&(E=B),E>0&&(E=0);let M=Math.abs(Math.round(-E/e.itemHeight));const L=-M*e.itemHeight,I=`${(M+1)*d.rotation}deg`,D=$?$>0:!1;b(M,!0,D),u(L,V,$,I)}else{let B=(-E/e.itemHeight+1)*d.rotation;const M=(e.source.length+1)*d.rotation,L=0;if(B=Math.min(Math.max(B,L),M),e.threeDimensional&&(B<L||B>M))return;u(E,null,void 0,`${B}deg`)}},u=(A=0,V,$=hd,E)=>{V==="end"?d.scrollTime=$:d.scrollTime=0,d.deg=E,d.scrollDistance=A},g=(A,V)=>(A=Math.abs(A/V)/.003*(A<0?-1:1),A),w=A=>{e.readonly||(d.startDistance=d.scrollDistance,y.start(A),d.transitionEndTrigger=null)},T=A=>{e.readonly||(d.moving=!0,y.move(A),y.isVertical()&&(d.moving=!0,bd(A,!0)),f(y.deltaY.value,"",0))},C=()=>{if(e.readonly)return;const A=y.deltaY.value,V=y.duration.value;if(V<pd&&Math.abs(A)>md){const E=g(A,V);f(E,"end",e.swipeDuration)}else f(A,"end",0)};return t.watch(()=>e.modelValue,A=>{const V=d.currIndex-A;if(V!==0){d.currIndex=A,d.startDistance=d.scrollDistance;const $=V*e.itemHeight;f($,"",0)}}),t.watch(()=>e.source,A=>{if(d.currIndex>=A.length){const E=(A.length-1-d.currIndex)*e.itemHeight;d.startDistance=d.scrollDistance,f(E,"end",0)}}),t.watch(()=>e.visible,A=>{A===!1&&k()}),t.onMounted(()=>{const A=-e.modelValue*e.itemHeight;f(A)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:S,...t.toRefs(d),roller:p,getItemText:Re,onTouchStart:w,onTouchMove:T,onTouchEnd:C,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:m,stopMomentum:k}}}),Sd={key:1,class:"fox-picker__item-tile"};function Cd(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",Sd,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const wd=te(kd,[["render",Cd]]),{create:Nd,componentName:Bd,scope:Ad}=G("picker"),Td=Nd({components:{Column:wd,Popup:fe},props:{...Ko},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=ie.useFoxI18n(Ad),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(sd());t.watch(()=>e.visible,B=>{B&&s.value<=0&&setTimeout(()=>{if(r.value){const M=qe(r.value);s.value=M.height,id(s.value)}},50)});const i=t.computed(()=>({[Bd]:!0})),c=ud(),m=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([B,M])=>{if(B){let L=await c.load("picker",B,M);if(L.length>0){let I=L[0];if(Array.isArray(I)){if(typeof I[0]=="string"){let D=L,R=[];D.forEach(q=>{let W=q.map(H=>jr(H));R.push(W)}),p.value=R}else p.value=L;m.value="multipleColumn"}else if(typeof I=="string"){let D=L,R=[],q=D.map(W=>jr(W));R.push(q),p.value=R,m.value="singleColumn"}else{const D=Uo(e,I);Array.isArray(D)?(m.value="cascade",p.value=[L]):(m.value="singleColumn",p.value=[L])}}else p.value=[]}},{immediate:!0});const d=t.ref([]),h=t.ref(e.modelValue),S=t.ref([]),y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([B,M])=>{let L=fd(e,B,M,m.value);if(!Me(L,y.value)){y.value=L;let I=Hr(e,L,M,m.value);I&&(d.value=I.texts,n("update:text",d.value))}});const k=t.ref(e.visible);t.watch(()=>e.visible,B=>{k.value=B});const b=B=>{let M=Kr(e,B);return Ee(M)?M.defaultIndex??0:0},f=B=>{if(e.readonly===!0)return!0;let M=Kr(e,B);return Ee(M)?M.readonly??!1:!1},u=(B,M)=>{let L=y.value;L[B]=M;for(let D=0;D<B;D++)L[D]==null&&(L[D]=b(D));if(m.value==="cascade")for(let D=B+1;D<w.value.length;D++){let R=b(D);D<L.length?L[D]=R:L.push(R)}else for(let D=L.length;D<w.value.length;D++){let R=b(D);L.push(R)}y.value=L;let I=Hr(e,L,p.value,m.value);I&&(d.value=I.texts,h.value=I.values,S.value=I.items)},g=B=>B<y.value.length?y.value[B]:b(B),w=t.computed(()=>{if(p.value.length==0)return[];if(m.value=="singleColumn"||m.value=="multipleColumn")return p.value;let B=[],M=0,L=p.value[0],I=0;for(;;){let D=L.map(W=>{let H=Object.assign({},W);return cd(e,H,null),H});B.push(D),M>=y.value.length?I=0:I=y.value[M],(I<0||I>=L.length)&&(I=0);let R=L[I];const q=Uo(e,R);if(!Array.isArray(q))break;L=q,M++}return B}),T=t.computed(()=>me(+e.visibleItemCount-1)/2*s.value),C=(B=!1)=>{if(e.readonly===!0){B&&n("update:visible",!1);return}let M=p.value.length-1;for(;M>=0&&!(y.value[M]===null||y.value[M]===void 0);M--);if(M>=0&&u(M,0),m.value==="singleColumn"){let L=h.value.length>0?h.value[0]:"",I=S.value.length>0?S.value[0]:null;n("update:modelValue",L),n("update:text",d.value),n("change",L,I),B&&(n("confirm",L),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",d.value),n("change",h.value,S.value),B&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:w,dataType:m,show:k,itemHeight:s,top:T,isReadonly:f,getIndex:g,change:(B,M)=>{if(u(B,M),e.isAutoBackFill){const L=!k.value;C(L)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{C(!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)}}}}),Vd={class:"fox-picker__bar"},$d={class:"fox-picker__title"},Ed={class:"fox-picker__bar__action"},Dd={class:"fox-picker__column"};function Id(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",Vd,[t.createElementVNode("view",$d,t.toDisplayString(e.title),1),t.createElementVNode("view",Ed,[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",Dd,[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 kt=te(Td,[["render",Id]]);function xd(e,n,a,o,l,r,s=!0){return{props:{...pe,...be,...Ko,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=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=ve(i,"modelValue",null,d),b=t.ref([]),f=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),u="fox-input-item",g=t.computed(()=>({[u]:!0,"is-disabled":m.value,"is-readonly":p.value})),w=$e(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const z={};return w.value&&(z["text-align"]=w.value),z}),C=t.ref(!1),A=()=>{C.value=!0},V=z=>{C.value=z},$=z=>{k.value=z,d("update:modelValue",z)},E=(z,x)=>{d("change",z,x)},B=z=>{let F=z.target.value;y.value=!0,d("focus",F,z)},M=z=>{setTimeout(()=>{y.value=!1},0);let F=z.target.value;i.maxLength&&F.length>Number(i.maxLength)&&(F=F.slice(0,Number(i.maxLength))),d("blur",F,z)},L=z=>{b.value=z,Array.isArray(z)&&z.length===0?d("update:text",z[0]):d("update:text",z)},I=t.computed(()=>({[`${u}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),D=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),q=t.computed(()=>({hidden:!R.value})),W=z=>{k.value="",d("update:modelValue","",z),d("change","",z),d("clear","")},H=t.computed(()=>i.clearable&&!m.value&&!p.value),J=t.computed(()=>ke(k.value)>0&&y.value),ee=z=>{J.value?W(z):A()},Y=t.computed(()=>J.value&&H.value?o:l),v=t.computed(()=>({action:!0}));return()=>{const z={class:g.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:A,onFocus:B,onBlur:M};s&&(z.disabled=!0);const x=[],F=t.h("input",z);x.push(F);const P=[],K={class:["action-icon"]},X=t.h(Y.value,K),_={class:v.value,onClick:ee},le=t.h("view",_,{default:()=>[X]});if(P.push(le),D.value){const se=t.h("view",{class:q.value},[i.unit]);P.push(se)}const U={class:I.value},j=t.h("view",U,{default:()=>P});x.push(j);const Q={default:()=>x};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;const O=Se(i,Ko);O.disabled=!1,O.readonly=m.value||p.value,O.visible=C.value,O["onUpdate:visible"]=V,O.modelValue=k.value,O["onUpdate:modelValue"]=$,O.text=b.value,O["onUpdate:text"]=L,O.onChange=E;const Z=t.h(r,O);Q.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,ne,Q)}}}}const{componentName:qd,create:vd,scope:Md}=G("picker-item"),Ho=vd(xd(qd,Md,Be,oe.CircleClose,oe.ArrowRight,kt,!1)),In=(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,d={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:m,_parent:n};return d.children&&d.children.length&&(d.children=In(d.children,d,a)),d}),Wr=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&Wr(o.children,n)},Pd={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Ld=(e,n)=>{const a={...Pd,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(m=>{m={...m};const{[l]:p,[r]:d}=m,h=c[d]=c[d]||[];!i.length&&d===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,d)=>p[s]-d[s])}),c=null,i},zd={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}},Yr=(e,n)=>n[e.textKey],Mt=(e,n)=>n[e.valueKey],Fd=(e,n)=>n[e.visibleKey],Xr=(e,n)=>n[e.disabledKey],Rd=(e,n)=>{const a=n[e.doitKey];return he(a)},Od=(e,n)=>{const a=n[e.numKey];return a==null?null:me(n[a])},Qr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Kd(e,n,a,o=!1){return{props:{...zd},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:s}){const i=t.computed(()=>{const Y={};return Y[`${e}`]=!0,Y}),c=t.computed(()=>{const Y={};return Y[`${e}__titles`]=!0,Y[`${l.direction}`]=!0,l.align==="left"&&(Y.left=!0),l.scroll===!0&&(Y.scrollable=!0),l.shape&&(Y[`${l.shape}`]=!0),Y}),m=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const Y=de(l.gutter);return Y<=0?0:Y}),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,Y=>{d.value!==Y&&(d.value=Y,q(!1))});const h=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),S=t.computed(()=>{const Y={};return k.value||(Y.display="none"),Y}),y=t.ref(),k=t.ref(!1),b=()=>{const Y=!k.value;f(Y)},f=Y=>{const v=Y;v?(k.value=v,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",()=>{k.value=!1},{once:!0}):setTimeout(()=>{k.value=!1},0))},u=t.ref(),g=t.ref([]),w=(Y,v)=>{g.value[v]=Y},T=Y=>v=>{w(v,Y)},C=(Y,v)=>{const z=u.value,x=g.value;if(!z||!x||!x[Y])return;const F=x[Y];let P=0;l.direction==="vertical"?P=F.offsetTop-(z.offsetHeight-F.offsetHeight)/2:P=F.offsetLeft-(z.offsetWidth-F.offsetWidth)/2,A(z,P,v?0:.3,l.direction)},A=(Y,v,z,x)=>{let F=0;const P=x==="horizontal"?Y.scrollLeft:Y.scrollTop,K=z===0?1:Math.round(z*1e3/16);function X(){x==="horizontal"?Y.scrollLeft+=(v-P)/K:Y.scrollTop+=(v-P)/K,++F<K&&Ke(X)}X()},V=(Y,v)=>{const z=Mt(l,Y),x={};return x[`${e}__titles-item`]=!0,x.disabled=Xr(l,Y),x.active=z===d.value,l.shape&&(x[`${l.shape}`]=!0),l.ellipsis&&(x.ellipsis=!0),v&&(v.class&&(x[`${v.class}`]=!0),v.disabled===!0&&(x.disabled=v.disabled)),x},$=(Y,v)=>{const z={};if(p.value>0){const x=Math.abs(p.value/2);l.direction==="vertical"?(z["margin-top"]=`${x}px`,z["margin-bottom"]=`${x}px`):(z["margin-left"]=`${x}px`,z["margin-right"]=`${x}px`)}return v&&v.style&&Object.assign(z,v.style),z},E=(Y,v)=>`${Mt(l,Y)??v}`,B=(Y,v)=>{const z=Mt(l,Y),x={};x[`${e}__popup-item`]=!0,x.disabled=Xr(l,Y),x.active=z===d.value,l.shape&&(x[`${l.shape}`]=!0);const F=Qr(l,Y,v);return F&&F.disabled===!0&&(x.disabled=F.disabled),x},M=t.computed(()=>(l.data??[]).filter(v=>Fd(l,v)!==!1)),L=(Y,v)=>{const z=Mt(l,Y);if(s("click",Y,v),d.value==z)return;const x=()=>{d.value=z,l.scroll&&C(v,!1),s("update:modelValue",z),s("change",Y,v)};if(typeof l.beforeChange=="function"){const F=l.beforeChange(Y,v);dt(F)?F.then(P=>{P!==!1&&x()}).catch(()=>{x()}):F!==!1&&x()}else x()},I=(Y,v)=>function(){L(Y,v)},D=(Y,v)=>{L(Y,v),f(!1)},R=(Y,v)=>function(){D(Y,v)},q=Y=>{if(!Array.isArray(l.data)||!l.scroll)return;const v=l.data.findIndex(z=>Mt(l,z)===d.value);v!==-1&&C(v,Y)};t.watch(()=>l.data,()=>{setTimeout(q,0)}),t.onMounted(()=>{q(!0)});const W=(Y,v)=>{if(r.item)return r.item({item:Y,index:v});const z=Qr(l,Y,v),x=[];if(r.text){const X=r.text({item:Y,index:v});x.push(X)}else{const X=[];if(z?.doit===!0||Rd(l,Y)){const j={class:[`${e}__titles-item-tip`,"doit"]},Q=t.h("view",j);X.push(Q)}const _=z?.num??Od(l,Y);if(_){let j="";const Q=me(_);Q>=100?j="99+":j=`${Q}`;const O={class:[`${e}__titles-item-tip`,"num"]},Z=t.h("view",O,[j]);X.push(Z)}const le={class:`${e}__titles-item-text`};X.push(Yr(l,Y));const U=t.h("view",le,X);x.push(U)}const F={class:`${e}__titles-item-line`},P=t.h("view",F);x.push(P);const K={ref:T(v),class:V(Y,z),style:$(Y,z),key:E(Y,v),onClick:I(Y,v)};return t.h("view",K,x)},H=()=>{const Y=r.default?r.default():[];if(Y.length===0)for(let z=0;z<M.value.length;z++){const x=M.value[z],F=W(x,z);Y.push(F)}const v={ref:u,class:c.value,style:m.value};return t.h("view",v,Y)},J=()=>{let Y=null;r.navigation?Y=r.navigation():Y=t.h(a);const v={class:`${e}__navigation`,onClick:b};return t.h("view",v,[Y])},ee=()=>{const Y=[];for(let z=0;z<M.value.length;z++){const x=M.value[z];let F=null;r.popupItem?F=r.popupItem({item:x,index:z}):F=Yr(l,x);const P={class:B(x,z),key:E(x,z),onClick:R(x,z)},K=t.h("view",P,[F]);Y.push(K)}const v={class:h.value,style:S.value};return t.h("view",v,Y)};return()=>{const Y=[],v=H();if(Y.push(v),l.showQuickNavigation){const x=J();Y.push(x);const F=ee();Y.push(F)}const z={class:i.value};return t.h("view",z,Y)}}}}const{create:Ud,componentName:Hd,scope:jd}=G("tabs-bar"),xn=Ud(Kd(Hd,jd,oe.MoreH,!1)),Gr=Symbol("TabsStatesKey"),Wd={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Yd(e,n,a=!1){return{props:{...Wd},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:k=>{const b={name:k};i.current.value===k&&(b.loaded=!0),s.value.push(b),t.triggerRef(s)},remove:k=>{const b=s.value.findIndex(f=>f.name===k);b!==-1&&s.value.splice(b,1)},isLoaded:k=>{if(!o.lazy)return!0;const b=s.value.findIndex(f=>f.name===k);return b!==-1?i.current.value?s.value[b].loaded??!1:b===0:!1}};t.provide(Gr,i);const c=k=>{const b=s.value.findIndex(f=>f.name===k);b!==-1&&(s.value[b].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([k,b])=>{i.current.value!==k&&(i.current.value=k??"",c(k??"")),i.direction.value!==b&&(i.direction.value=b)});const m=t.ref(null),p=t.ref(null),d=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const S=t.computed(()=>{const k={},b=s.value.length;if(b<=0)return k;const f=s.value.findIndex(u=>u.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(k.height=`${b*i.tabHeight.value}px`,f!==-1&&(k.transform=`translate(0, -${f*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(k.width=`${b*i.tabWidth.value}px`,f!==-1&&(k.transform=`translate(-${f*i.tabWidth.value}px, 0)`)),h&&(h=!1,k.transition="transform 0s ease"),k});let y=null;return t.onMounted(()=>{if(!m.value)return;const k=()=>{const b=Cn(m.value);i.tabWidth.value=b.width,i.tabHeight.value=b.height};window.ResizeObserver&&(y=new window.ResizeObserver(k),y.observe(m.value)),k()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const k={class:`${e}__panes`,style:S.value,ref:p},b=t.h("view",k,[r?.default?.()]),f={class:d.value,ref:m};return t.h("view",f,[b])}}}}const{create:Xd,componentName:Qd,scope:Gd}=G("tabs-container"),qn=Xd(Yd(Qd,Gd,!1)),Zd={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function Jd(e,n,a){return{props:{...Zd},setup(o,{emit:l,slots:r}){const s=t.inject(Gr);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 d={class:`${e}__empty-icon`},h=o.emptyIcon??a,S=t.h(h,d),y={class:`${e}__empty-text`},k=o.emptyText??"Loading",b=t.h("view",y,[k]),f={class:`${e}__empty`},u=t.h("view",f,[S,b]);m.push(u)}const p={class:`${e}`,style:i.value};return t.h("view",p,m)}}}}const{create:_d,componentName:eu,scope:tu}=G("tabs-pane"),vn=_d(Jd(eu,tu,oe.Loading));class Zr{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=In(n,null,this.config)}updateChildren(n,a){a?a.children=In(n,a,this.config):this.nodes=In(n,null,this.config)}getNodeByValue(n){let a;return Wr(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:nu,scope:ou}=G("cascader-pane"),lu=nu({components:{Loading:oe.Loading,Checklist:oe.Checklist,TabsBar:xn,TabsContainer:qn,TabsPane:vn},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}=ie.useFoxI18n(ou),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 Zr([],{})),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((u,g)=>({text:u.selectedNode?u.selectedNode.text:a("select"),value:g}))),d=new Map;let h;const S=async()=>{d.clear(),c.value=[],l.value=0,r.value=!1,h=null;let{options:u}=e;o.value.convertConfig&&(u=Ld(u,o.value.convertConfig)),i.value=new Zr(u,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),m.value&&!i.value.nodes.length&&await k({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y()},y=async()=>{const u=s.value;if(u===void 0||!i.value.nodes.length)return;if(u.length===0){l.value=0,c.value=[{nodes:i.value.nodes,selectedNode:null}];return}let g=u;if(m.value&&Array.isArray(u)&&u.length){g=[];let w=i.value.nodes.find(T=>T.value===u[0]);if(w){g=[w.value],r.value=!0;const T=await u.slice(1).reduce(async(C,A)=>{const V=await C;await k(V);const $=V?.children?.find(E=>E.value===A);return $&&g.push(A),Promise.resolve($)},Promise.resolve(w));await k(T),r.value=!1}}g.length&&u===e.modelValue&&i.value.getPathNodesByValue(g).map((T,C)=>{l.value=C,f.handleNode(T,!m.value)})},k=async u=>{if(!u)return;if(!o.value.lazyLoad){u.leaf=!0;return}if(i.value.isLeaf(u,m.value)||i.value.hasChildren(u,m.value))return;u.loading=!0;const g=u.root?null:u;let w=d.get(u);w||(w=new Promise(C=>{o.value.lazyLoad?.(u,C)}),d.set(u,w));const T=await w;Array.isArray(T)&&T.length>0?i.value.updateChildren(T,g):u.leaf=!0,u.loading=!1,d.delete(u)},b=u=>{const g=u.map(w=>w.value);s.value=g,n("change",g,u),n("pathChange",u),n("update:modelValue",g)},f={async handleNode(u,g){const{disabled:w,loading:T}=u;if(!(!g&&w||!c.value[l.value])){if(i.value.isLeaf(u,m.value)){if(u.leaf=!0,c.value[l.value].selectedNode=u,c.value=c.value.slice(0,u.level+1),!g){const C=c.value.map(A=>A.selectedNode);b(C),n("pathChange",C)}return}if(i.value.hasChildren(u,m.value)){const C=u.level+1;if(c.value[l.value].selectedNode=u,c.value=c.value.slice(0,C),c.value.push({nodes:u.children||[],selectedNode:null}),l.value=C,!g){const A=c.value.map(V=>V.selectedNode);n("pathChange",A)}return}h=u,!T&&(await k(u),h===u&&(c.value[l.value].selectedNode=u,f.handleNode(u,g)))}},handleTabChange(u,g){h=null},formatTabTitle(u){return u.selectedNode?u.selectedNode.text:a("select")},isSelected(u,g){return u.selectedNode&&u.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{S()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,u=>{Me(u,s.value)||(s.value=u,y())}),t.watch(()=>e.visible,u=>{u&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),au={class:"fox-cascader"},ru={role:"menu",class:"fox-cascader__pane"},su=["aria-checked","aria-disabled","onClick"],iu={class:"fox-cascader__item__title"},cu=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function du(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",au,[t.createVNode(s,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=d=>e.tabsCursor=d),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]=d=>e.tabsCursor=d)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(d,h)=>(t.openBlock(),t.createBlock(m,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",ru,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.nodes,S=>(t.openBlock(),t.createElementBlock("view",{key:S.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(d,S),disabled:S.disabled}]),"aria-checked":e.isSelected(d,S),"aria-disabled":S.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(S,!1)},[t.createElementVNode("view",iu,t.toDisplayString(S.text),1),S.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,su))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(m,{key:1,"pane-key":0},{default:t.withCtx(()=>[cu]),_:1}))]),_:1},8,["modelValue"])])}const uu=te(lu,[["render",du]]),{create:fu}=G("cascader"),mu=fu({components:{FoxCascaderPane:uu,FoxPopup:fe},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}}}),pu=["innerHTML"];function hu(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,pu)):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 Mn=te(mu,[["render",hu]]);function Pt(e,n){const a=e.textKey??"text";return n[a]??""}function Lt(e,n){const a=e.valueKey??"value";return n[a]}function Jr(e,n){const a=e.childrenKey??"children";return n[a]}function Pn(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=Pt(e,l),s=Lt(e,l);a.texts.push(r),a.values.push(s??"")}return a}function _r(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Pt(e,n[s])===r){const c=Lt(e,n[s])??"",m={[e.textKey]:r,[e.valueKey]:c};l.push(m);const p=Jr(e,n[s]);Array.isArray(p)&&_r(e,p,a,o+1,l);return}}function es(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Lt(e,n[s])===r){const c=Pt(e,n[s])??"",m={[e.textKey]:c,[e.valueKey]:r};l.push(m);const p=Jr(e,n[s]);Array.isArray(p)&&es(e,p,a,o+1,l);return}}function jo(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=Pt(e,n[o]),r=Pt(e,a[o]);if(l!==r)return!1;const s=Lt(e,n[o]),i=Lt(e,a[o]);if(s!==i)return!1}return!0}let gu=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=Ze(this.proxy,o);return l===null?(console.error(`${o} component not found api function`),[]):(Ee(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function yu(){const e=t.getCurrentInstance();return new gu(e.proxy)}const ts={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 bu(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...ts},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=yu(),b=t.ref([]),f=t.ref([]),u=t.computed(()=>{if(Array.isArray(f.value)){if(i.showAllLevels===!1){const F=f.value.length-1;return f.value[F]}return f.value.join(i.separator)}else return f.value}),g=t.ref([]),w=t.ref([]);t.watch([()=>i.modelValue,()=>b.value],async([F,P])=>{if(d("setValue",F),i.lazy===!0){w.value.length==0&&(g.value=Array.isArray(F)?F:[]);return}if(i.valueType==="item"){let K=F;if(!jo(i,K,w.value)){w.value=K;let X=Pn(i,K);f.value=X.texts,g.value=X.values}}else if(i.valueType==="text"){let K=F,X=[];if(_r(i,P,K,0,X),!jo(i,X,w.value)){w.value=X;let _=Pn(i,X);K.value=_.texts,g.value=_.values}}else{let K=[];if(es(i,P,F,0,K),!jo(i,K,w.value)){w.value=K;let X=Pn(i,K);f.value=X.texts,g.value=X.values}}}),i.lazy===!0&&(g.value=Array.isArray(i.modelValue)?i.modelValue:[]),t.watch([()=>i.source,()=>i.params],async([F,P])=>{F&&(b.value=await k.load(F,P))},{immediate:!0});const T="fox-input-item",C=t.computed(()=>({[T]:!0,"is-disabled":m.value,"is-readonly":p.value})),A=$e(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const F={};return A.value&&(F["text-align"]=A.value),F}),$=t.ref(!1),E=()=>{m.value===!0||p.value===!0||($.value=!0)},B=F=>{$.value=F},M=(F,P)=>{let K=P.map(_=>{if(_==null)return _;let le={..._};return Reflect.deleteProperty(le,"text"),le[i.textKey]=_.text??"",Reflect.deleteProperty(le,"value"),le[i.valueKey]=_.value??"",le});w.value=K;let X=Pn(i,K);f.value=X.texts,g.value=X.values,i.valueType==="text"?(d("change",f.value,K),d("update:modelValue",f.value)):i.valueType==="item"?(d("change",K,K),d("update:modelValue",K)):(d("change",g.value,K),d("update:modelValue",g.value)),d("update:pathNodes",K)},L=F=>{let P=F.map(K=>{if(K==null)return K;let X={...K};return Reflect.deleteProperty(X,"text"),X[i.textKey]=K.text??"",Reflect.deleteProperty(X,"value"),X[i.valueKey]=K.value??"",X});d("pathChange",P)},I=F=>{y.value=!0,d("focus",g.value,F)},D=F=>{setTimeout(()=>{y.value=!1},0),d("blur",g.value,F)},R=t.computed(()=>({[`${T}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),q=t.computed(()=>ke(i.unit)>0),W=t.computed(()=>ke(i.unit)>0&&!y.value),H=t.computed(()=>({hidden:!W.value})),J=F=>{w.value=[],f.value=[],g.value=[],d("update:modelValue",[]),d("change",[],F),d("clear",[]),d("update:pathNodes",[])},ee=t.computed(()=>i.clearable&&!m.value&&!p.value),Y=t.computed(()=>{let F=g.value&&g.value.length>0;return i.clearable&&F&&y.value}),v=F=>{Y.value?J(F):E()},z=t.computed(()=>Y.value&&ee.value?o:l),x=t.computed(()=>({action:!0}));return()=>{const F={class:C.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:E,onFocus:I,onBlur:D};s&&(F.disabled=!0);const P=[],K=t.h("input",F);P.push(K);const X=[],_={class:["action-icon"]},le=t.h(z.value,_),U={class:x.value,onClick:v},j=t.h("view",U,{default:()=>[le]});if(X.push(j),q.value){const Ce=t.h("view",{class:H.value},[i.unit]);X.push(Ce)}const Q={class:R.value},O=t.h("view",Q,{default:()=>X});P.push(O);const Z={default:()=>P};Z.label=c.slots.default,Z.prepend=c.slots.prepend,Z.append=c.slots.append,Z.fixedPreTip=c.slots.fixedPreTip,Z.fixedTip=c.slots.fixedTip;let ne={};ne.visible=$.value,ne["onUpdate:visible"]=B,ne.modelValue=g.value,ne.onChange=M,ne.onPathChange=L,ne.options=b.value,ne.title=i.title,ne.lazy=i.lazy,ne.lazyLoad=i.lazyLoad,ne.valueKey=i.valueKey,ne.textKey=i.textKey,ne.childrenKey=i.childrenKey,ne.convertConfig=i.convertConfig;const re=t.h(r,ne);Z.hide=()=>[re];const se=ut(i,ts);return t.h(a,{...se,prop:`${i.prop}_item`},Z)}}}}const{componentName:ku,create:Su,scope:Cu}=G("cascader-item"),Wo=Su(bu(ku,Cu,Be,oe.CircleClose,oe.ArrowRight,Mn,!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 ns={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",d="month",h="quarter",S="year",y="date",k="Invalid Date",b=/^(\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,u={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(L,I,D){var R=String(L);return!R||R.length>=I?L:""+Array(I+1-R.length).join(D)+L},w={s:g,z:function(L){var I=-L.utcOffset(),D=Math.abs(I),R=Math.floor(D/60),q=D%60;return(I<=0?"+":"-")+g(R,2,"0")+":"+g(q,2,"0")},m:function L(I,D){if(I.date()<D.date())return-L(D,I);var R=12*(D.year()-I.year())+(D.month()-I.month()),q=I.clone().add(R,d),W=D-q<0,H=I.clone().add(R+(W?-1:1),d);return+(-(R+(D-q)/(W?q-H:H-q))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:d,y:S,w:p,d:m,D:y,h:c,m:i,s,ms:r,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},T="en",C={};C[T]=u;var A=function(L){return L instanceof B},V=function L(I,D,R){var q;if(!I)return T;if(typeof I=="string"){var W=I.toLowerCase();C[W]&&(q=W),D&&(C[W]=D,q=W);var H=I.split("-");if(!q&&H.length>1)return L(H[0])}else{var J=I.name;C[J]=I,q=J}return!R&&q&&(T=q),q||!R&&T},$=function(L,I){if(A(L))return L.clone();var D=typeof I=="object"?I:{};return D.date=L,D.args=arguments,new B(D)},E=w;E.l=V,E.i=A,E.w=function(L,I){return $(L,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var B=function(){function L(D){this.$L=V(D.locale,null,!0),this.parse(D)}var I=L.prototype;return I.parse=function(D){this.$d=function(R){var q=R.date,W=R.utc;if(q===null)return new Date(NaN);if(E.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var H=q.match(b);if(H){var J=H[2]-1||0,ee=(H[7]||"0").substring(0,3);return W?new Date(Date.UTC(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)):new Date(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)}}return new Date(q)}(D),this.$x=D.x||{},this.init()},I.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},I.$utils=function(){return E},I.isValid=function(){return this.$d.toString()!==k},I.isSame=function(D,R){var q=$(D);return this.startOf(R)<=q&&q<=this.endOf(R)},I.isAfter=function(D,R){return $(D)<this.startOf(R)},I.isBefore=function(D,R){return this.endOf(R)<$(D)},I.$g=function(D,R,q){return E.u(D)?this[R]:this.set(q,D)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(D,R){var q=this,W=!!E.u(R)||R,H=E.p(D),J=function(K,X){var _=E.w(q.$u?Date.UTC(q.$y,X,K):new Date(q.$y,X,K),q);return W?_:_.endOf(m)},ee=function(K,X){return E.w(q.toDate()[K].apply(q.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(X)),q)},Y=this.$W,v=this.$M,z=this.$D,x="set"+(this.$u?"UTC":"");switch(H){case S:return W?J(1,0):J(31,11);case d:return W?J(1,v):J(0,v+1);case p:var F=this.$locale().weekStart||0,P=(Y<F?Y+7:Y)-F;return J(W?z-P:z+(6-P),v);case m:case y:return ee(x+"Hours",0);case c:return ee(x+"Minutes",1);case i:return ee(x+"Seconds",2);case s:return ee(x+"Milliseconds",3);default:return this.clone()}},I.endOf=function(D){return this.startOf(D,!1)},I.$set=function(D,R){var q,W=E.p(D),H="set"+(this.$u?"UTC":""),J=(q={},q[m]=H+"Date",q[y]=H+"Date",q[d]=H+"Month",q[S]=H+"FullYear",q[c]=H+"Hours",q[i]=H+"Minutes",q[s]=H+"Seconds",q[r]=H+"Milliseconds",q)[W],ee=W===m?this.$D+(R-this.$W):R;if(W===d||W===S){var Y=this.clone().set(y,1);Y.$d[J](ee),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d}else J&&this.$d[J](ee);return this.init(),this},I.set=function(D,R){return this.clone().$set(D,R)},I.get=function(D){return this[E.p(D)]()},I.add=function(D,R){var q,W=this;D=Number(D);var H=E.p(R),J=function(v){var z=$(W);return E.w(z.date(z.date()+Math.round(v*D)),W)};if(H===d)return this.set(d,this.$M+D);if(H===S)return this.set(S,this.$y+D);if(H===m)return J(1);if(H===p)return J(7);var ee=(q={},q[i]=o,q[c]=l,q[s]=a,q)[H]||1,Y=this.$d.getTime()+D*ee;return E.w(Y,this)},I.subtract=function(D,R){return this.add(-1*D,R)},I.format=function(D){var R=this,q=this.$locale();if(!this.isValid())return q.invalidDate||k;var W=D||"YYYY-MM-DDTHH:mm:ssZ",H=E.z(this),J=this.$H,ee=this.$m,Y=this.$M,v=q.weekdays,z=q.months,x=function(X,_,le,U){return X&&(X[_]||X(R,W))||le[_].slice(0,U)},F=function(X){return E.s(J%12||12,X,"0")},P=q.meridiem||function(X,_,le){var U=X<12?"AM":"PM";return le?U.toLowerCase():U},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Y+1,MM:E.s(Y+1,2,"0"),MMM:x(q.monthsShort,Y,z,3),MMMM:x(z,Y),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:x(q.weekdaysMin,this.$W,v,2),ddd:x(q.weekdaysShort,this.$W,v,3),dddd:v[this.$W],H:String(J),HH:E.s(J,2,"0"),h:F(1),hh:F(2),a:P(J,ee,!0),A:P(J,ee,!1),m:String(ee),mm:E.s(ee,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:H};return W.replace(f,function(X,_){return _||K[X]||H.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(D,R,q){var W,H=E.p(R),J=$(D),ee=(J.utcOffset()-this.utcOffset())*o,Y=this-J,v=E.m(this,J);return v=(W={},W[S]=v/12,W[d]=v,W[h]=v/3,W[p]=(Y-ee)/6048e5,W[m]=(Y-ee)/864e5,W[c]=Y/l,W[i]=Y/o,W[s]=Y/a,W)[H]||Y,q?v:E.a(v)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return C[this.$L]},I.locale=function(D,R){if(!D)return this.$L;var q=this.clone(),W=V(D,R,!0);return W&&(q.$L=W),q},I.clone=function(){return E.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},L}(),M=B.prototype;return $.prototype=M,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",m],["$M",d],["$y",S],["$D",y]].forEach(function(L){M[L[1]]=function(I){return this.$g(I,L[0],L[1])}}),$.extend=function(L,I){return L.$i||(L(I,B,$),L.$i=!0),$},$.locale=V,$.isDayjs=A,$.unix=function(L){return $(1e3*L)},$.en=C[T],$.Ls=C,$.p={},$})})(ns);var wu=ns.exports;const Oe=Ye(wu);var os={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(k){return(k=+k)+(k>68?1900:2e3)},m=function(k){return function(b){this[k]=+b}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var f=b.match(/([+-]|\d\d)/g),u=60*f[1]+(+f[2]||0);return u===0?0:f[0]==="+"?-u:u}(k)}],d=function(k){var b=i[k];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(k,b){var f,u=i.meridiem;if(u){for(var g=1;g<=24;g+=1)if(k.indexOf(u(g,0,b))>-1){f=g>12;break}}else f=k===(b?"pm":"PM");return f},S={A:[s,function(k){this.afternoon=h(k,!1)}],a:[s,function(k){this.afternoon=h(k,!0)}],S:[/\d/,function(k){this.milliseconds=100*+k}],SS:[l,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],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(k){var b=i.ordinal,f=k.match(/\d+/);if(this.day=f[0],b)for(var u=1;u<=31;u+=1)b(u).replace(/\[|\]/g,"")===k&&(this.day=u)}],M:[r,m("month")],MM:[l,m("month")],MMM:[s,function(k){var b=d("months"),f=(d("monthsShort")||b.map(function(u){return u.slice(0,3)})).indexOf(k)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[s,function(k){var b=d("months").indexOf(k)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,m("year")],YY:[l,function(k){this.year=c(k)}],YYYY:[/\d{4}/,m("year")],Z:p,ZZ:p};function y(k){var b,f;b=k,f=i&&i.formats;for(var u=(k=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,E,B){var M=B&&B.toUpperCase();return E||f[B]||a[B]||f[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(L,I,D){return I||D.slice(1)})})).match(o),g=u.length,w=0;w<g;w+=1){var T=u[w],C=S[T],A=C&&C[0],V=C&&C[1];u[w]=V?{regex:A,parser:V}:T.replace(/^\[|\]$/g,"")}return function($){for(var E={},B=0,M=0;B<g;B+=1){var L=u[B];if(typeof L=="string")M+=L.length;else{var I=L.regex,D=L.parser,R=$.slice(M),q=I.exec(R)[0];D.call(E,q),$=$.replace(q,"")}}return function(W){var H=W.afternoon;if(H!==void 0){var J=W.hours;H?J<12&&(W.hours+=12):J===12&&(W.hours=0),delete W.afternoon}}(E),E}}return function(k,b,f){f.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(c=k.parseTwoDigitYear);var u=b.prototype,g=u.parse;u.parse=function(w){var T=w.date,C=w.utc,A=w.args;this.$u=C;var V=A[1];if(typeof V=="string"){var $=A[2]===!0,E=A[3]===!0,B=$||E,M=A[2];E&&(M=A[2]),i=this.$locale(),!$&&M&&(i=f.Ls[M]),this.$d=function(R,q,W){try{if(["x","X"].indexOf(q)>-1)return new Date((q==="X"?1e3:1)*R);var H=y(q)(R),J=H.year,ee=H.month,Y=H.day,v=H.hours,z=H.minutes,x=H.seconds,F=H.milliseconds,P=H.zone,K=new Date,X=Y||(J||ee?1:K.getDate()),_=J||K.getFullYear(),le=0;J&&!ee||(le=ee>0?ee-1:K.getMonth());var U=v||0,j=z||0,Q=x||0,O=F||0;return P?new Date(Date.UTC(_,le,X,U,j,Q,O+60*P.offset*1e3)):W?new Date(Date.UTC(_,le,X,U,j,Q,O)):new Date(_,le,X,U,j,Q,O)}catch{return new Date("")}}(T,V,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),B&&T!=this.format(V)&&(this.$d=new Date("")),i={}}else if(V instanceof Array)for(var L=V.length,I=1;I<=L;I+=1){A[1]=V[I-1];var D=f.apply(this,A);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}I===L&&(this.$d=new Date(""))}else g.call(this,w)}}})})(os);var Nu=os.exports;const Bu=Ye(Nu);var ls={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(),d=(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)(d)}}})})(ls);var Au=ls.exports;const Tu=Ye(Au);var as={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=function(d){return d&&(d.indexOf?d:d.s)},i=function(d,h,S,y,k){var b=d.name?d:d.$locale(),f=s(b[h]),u=s(b[S]),g=f||u.map(function(T){return T.slice(0,y)});if(!k)return g;var w=b.weekStart;return g.map(function(T,C){return g[(C+(w||0))%7]})},c=function(){return l.Ls[l.locale()]},m=function(d,h){return d.formats[h]||function(S){return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,k,b){return k||b.slice(1)})}(d.formats[h.toUpperCase()])},p=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):i(d,"months")},monthsShort:function(h){return h?h.format("MMM"):i(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return m(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var d=c();return{firstDayOfWeek:function(){return d.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(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(d){return i(c(),"weekdays",null,null,d)},l.weekdaysShort=function(d){return i(c(),"weekdaysShort","weekdays",3,d)},l.weekdaysMin=function(d){return i(c(),"weekdaysMin","weekdays",2,d)}}})})(as);var Vu=as.exports;const $u=Ye(Vu);var rs={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),d=s(this).endOf(a);if(p.isBefore(d))return 1}var h=s(this).startOf(o).date(m).startOf(a).subtract(1,"millisecond"),S=this.diff(h,a,!0);return S<0?s(this).startOf("week").week():Math.ceil(S)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(rs);var Eu=rs.exports;const Du=Ye(Eu);var ss={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}}})})(ss);var Iu=ss.exports;const xu=Ye(Iu);var is={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")}}})})(is);var qu=is.exports;const vu=Ye(qu);var cs={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)}}})})(cs);var Mu=cs.exports;const Pu=Ye(Mu);var ds={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)}}})})(ds);var Lu=ds.exports;const zu=Ye(Lu);Oe.extend($u),Oe.extend(Tu),Oe.extend(Bu),Oe.extend(Du),Oe.extend(xu),Oe.extend(vu),Oe.extend(Pu),Oe.extend(zu);const ae={format(e,n){return Oe(e).format(n)},parser(e,n){return Oe(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)),d=this.date2Str(new Date(m));return[p,d]}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)),d=this.date2Str(new Date(m));return[p,d]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=ae.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=ae.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}},us=new Date().getFullYear(),Yo={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"},Ln=(e,n,a)=>{let o;if(Ue(n)?o=n:typeof n=="string"&&ke(n)>0?o=ae.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)=>{Ue(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),ae.format(new Date(o),a)};let Qo={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(us-10,0,1),validator:Ue},maxDate:{type:Date,default:()=>new Date(us+10,11,31),validator:Ue},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Fu,scope:Ru}=G("date-picker"),Ou=Fu({components:{[kt.name]:kt},props:{...Qo},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(Ru),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,u=>{l.value=u});function r(u,g){return new Date(u,g,0).getDate()}const s=(u,g)=>{const w=e[`${u}Date`],T=w.getFullYear();let C=1,A=1,V=0,$=0;u==="max"&&(C=12,A=r(g.getFullYear(),g.getMonth()+1),V=23,$=59);const E=$;return g.getFullYear()===T&&(C=w.getMonth()+1,g.getMonth()+1===C&&(A=w.getDate(),g.getDate()===A&&(V=w.getHours(),g.getHours()===V&&($=w.getMinutes())))),{[`${u}Year`]:T,[`${u}Month`]:C,[`${u}Date`]:A,[`${u}Hour`]:V,[`${u}Minute`]:$,[`${u}Seconds`]:E}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:u,maxDate:g,maxMonth:w,maxHour:T,maxMinute:C,maxSeconds:A}=s("max",h.value),{minYear:V,minDate:$,minMonth:E,minHour:B,minMinute:M,minSeconds:L}=s("min",h.value);let I=[{type:"year",range:[V,u]},{type:"month",range:[E,w]},{type:"day",range:[$,g]},{type:"hour",range:[B,T]},{type:"minute",range:[M,C]},{type:"seconds",range:[L,A]}];switch(e.type){case"date":I=I.slice(0,3);break;case"datetime":I=I.slice(0,5);break;case"time":I=I.slice(3,6);break;case"year-month":I=I.slice(0,2);break;case"month-day":I=I.slice(1,3);break;case"datehour":I=I.slice(0,4);break;case"hour-minute":I=I.slice(3,5);break}return I}),c=(u,g,w)=>{if(!(g>u))return null;const T=[];for(;u<=g;)e.isShowChinese?T.push({text:u+o[w],value:u}):T.push({text:`${u}`,value:u}),w==="minute"?u+=e.minuteStep:u++;return T},m=t.computed(()=>{let u=[];return i.value.forEach(g=>{let w=c(g.range[0],g.range[1],g.type);w&&u.push(w)}),u}),p=(u,g)=>u==="year"?g.getFullYear():u==="month"?g.getMonth()+1:u==="day"?g.getDate():u==="hour"?g.getHours():u==="minute"?g.getMinutes():u==="seconds"?g.getSeconds():0,d=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,u=>{let g;if(typeof u=="string"?u.length==0?g=new Date:e.valueFormat?g=Ln(e,e.modelValue,e.valueFormat):g=Ln(e,u,Yo[e.type]):Ue(u)?g=u:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let w=[];i.value.forEach(T=>{let C=p(T.type,g);w.push(C)}),d.value=w}},{immediate:!0});const S=u=>{if(e.type==="date"){const g=u[0],w=u[1]-1,T=Math.min(u[2],r(g,w+1));T!==u[2]&&(u[2]=T),h.value=new Date(g,w,T)}else if(e.type==="datetime"){const g=u[0],w=u[1]-1,T=Math.min(u[2],r(g,w+1)),C=u[3],A=u[4];T!==u[2]&&(u[2]=T),h.value=new Date(g,w,T,C,A)}else if(e.type==="time"){const g=u[0],w=u[1],T=u[2],C=h.value??new Date,A=new Date(C.getFullYear(),C.getMonth(),C.getDate(),g,w,T);h.value=A}else if(e.type==="year-month"){const g=u[0],w=u[1]-1;h.value=new Date(g,w)}else if(e.type==="month-day"){const w=(h.value??new Date).getFullYear(),T=u[0]-1,C=Math.min(u[1],r(w,T+1));C!==u[1]&&(u[1]=C);const A=new Date(w,T,C);h.value=A}else if(e.type==="datehour"){const g=u[0],w=u[1]-1,T=Math.min(u[2],r(g,w+1)),C=u[3];T!==u[2]&&(u[2]=T),h.value=new Date(g,w,T,C)}else if(e.type==="hour-minute"){const g=u[0],w=u[1],T=h.value??new Date,C=new Date(T.getFullYear(),T.getMonth(),T.getDate(),g,w);h.value=C}d.value=u};return{columns:m,dateIndexs:d,show:l,onChange:u=>{S(u)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:u=>{S(u),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let w=Xo(e,g,e.valueFormat);n("update:modelValue",w)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",u)},onClear:()=>{n("clear")}}}});function Ku(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 zn=te(Ou,[["render",Ku]]),Uu={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Hu(e){let n=e.format;if(!n){let a=e.type??"date";n=Yo[a]}return n}function ju(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...Qo,...Uu},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=ve(i,"modelValue",v=>v==null?null:typeof v=="string"?v.length==0?null:i.valueFormat?Ln(i,v,i.valueFormat)??v:Ln(i,v,Yo[i.type])??v:Ue(v)?v:null,d),f=t.computed(()=>{if(!b.value)return"";const v=Hu(i);return Xo(i,b.value,v)}),u="fox-input-item",g=t.computed(()=>({[u]:!0,"is-disabled":m.value,"is-readonly":p.value})),w=$e(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const v={};return w.value&&(v["text-align"]=w.value),v}),C=t.ref(!1),A=()=>{C.value=!0},V=()=>{C.value=!1};c.expose({showPicker:A,hidePicker:V});const $=v=>{C.value=v},E=v=>{if(b.value=v,i.valueFormat){let z=Xo(i,v,i.valueFormat);d("update:modelValue",z,{}),d("change",z,{})}else d("update:modelValue",v,{}),d("change",v,{})},B=v=>{let x=v.target.value;y.value=!0,d("focus",x,v)},M=v=>{setTimeout(()=>{y.value=!1},0);let x=v.target.value;i.maxLength&&x.length>Number(i.maxLength)&&(x=x.slice(0,Number(i.maxLength))),d("blur",x,v)},L=t.computed(()=>({[`${u}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),I=t.computed(()=>ke(i.unit)>0),D=t.computed(()=>ke(i.unit)>0&&!y.value),R=t.computed(()=>({hidden:!D.value})),q=v=>{b.value="",d("update:modelValue","",v),d("change","",v),d("clear",""),V()},W=t.computed(()=>i.clearable&&!m.value&&!p.value),H=t.computed(()=>{let v=ke(b.value)>0;return i.clearable&&v&&y.value}),J=v=>{H.value?q(v):A()},ee=t.computed(()=>H.value&&W.value?o:l),Y=t.computed(()=>({action:!0}));return()=>{const v={class:g.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:A,onFocus:B,onBlur:M};s&&(v.disabled=!0);const z=[],x=t.h("input",v);z.push(x);const F=[],P={class:["action-icon"]},K=t.h(ee.value,P),X={class:Y.value,onClick:J},_=t.h("view",X,{default:()=>[K]});if(F.push(_),I.value){const se=t.h("view",{class:R.value},[i.unit]);F.push(se)}const le={class:L.value},U=t.h("view",le,{default:()=>F});z.push(U);const j={default:()=>z};j.label=c.slots.default,j.prepend=c.slots.prepend,j.append=c.slots.append,j.fixedPreTip=c.slots.fixedPreTip,j.fixedTip=c.slots.fixedTip;const Q=Se(i,Qo);Q.valueFormat=null,Q.disabled=!1,Q.readonly=m.value||p.value,Q.visible=C.value,Q["onUpdate:visible"]=$,Q.modelValue=b.value,Q["onUpdate:modelValue"]=E,Q.onClear=q;const O={};if(c.slots.top){const se=c.slots.top();O.top=()=>se}if(c.slots.bottom){const se=c.slots.bottom();O.default=()=>se}const Z=t.h(r,Q,O);j.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,{...ne,prop:`${i.prop}_item`},j)}}}}const{create:Wu,componentName:Yu,scope:Xu}=G("date-item"),Go=Wu(ju(Yu,Xu,Be,oe.CircleClose,oe.Date,zn,!1)),Qu=39,Gu=64,{create:Zu,scope:Ju}=G("calendar-pane"),_u=Zu({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:ae.getDay(0)},endDate:{type:String,default:ae.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=ie.useFoxI18n(Ju),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),d=t.ref(null),h=t.ref(0),S=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),y=t.computed(()=>a.btn),k=t.computed(()=>a["top-info"]),b=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}),u=P=>P.split("-"),g=P=>ae.isEqual(f.currDate[0],P),w=P=>ae.isEqual(f.currDate[1],P),T=P=>f.currDate?.length>0?f.currDate?.some(K=>ae.isEqual(K,P)):!1,C=(P,K)=>K.curData[0]+"-"+K.curData[1]+"-"+ae.getNumTwoBit(+P.day),A=(P,K)=>{const X=C(P,K),{type:_}=e;return P.type=="curr"?ae.isEqual(f.currDate,X)||(_=="range"||_=="week")&&(g(X)||w(X))||_=="multiple"&&T(X)?`${f.dayPrefix}--active`:f.propStartDate&&ae.compareDate(X,f.propStartDate)||f.propEndDate&&ae.compareDate(f.propEndDate,X)?`${f.dayPrefix}--disabled`:(_=="range"||_=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&ae.compareDate(f.currDate[0],X)&&ae.compareDate(X,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},V=()=>{const{type:P}=e;if(P=="range"&&f.chooseData.length==2||P!="range"){let K=f.chooseData.slice(0);P=="week"&&(K={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("choose",K),e.poppable&&n("update")}},$=(P,K,X=!1)=>{if(A(P,K)!=`${f.dayPrefix}--disabled`){const{type:_}=e;let[le,U]=K.curData,j=[...K.curData];if(j[2]=ae.getNumTwoBit(Number(P.day)),j[3]=`${j[0]}-${j[1]}-${j[2]}`,j[4]=ae.getWhatDay(+j[0],+j[1],+j[2]),_=="multiple")if(f.currDate?.length>0){let Q;f.currDate?.forEach((O,Z)=>{O==j[3]&&(Q=Z)}),X?f.chooseData.push([...j]):Q!==void 0?(f.currDate.splice(Q,1),f.chooseData.splice(Q,1)):(f.currDate.push(j[3]),f.chooseData.push([...j]))}else f.currDate=[j[3]],f.chooseData=[[...j]];else if(_=="range"){let Q=Object.values(f.currDate).length;Q==2||Q==0?f.currDate=[j[3]]:ae.compareDate(f.currDate[0],j[3])?Array.isArray(f.currDate)&&f.currDate.push(j[3]):Array.isArray(f.currDate)&&f.currDate.unshift(j[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...j]]:ae.compareDate(f.chooseData[0][3],j[3])?f.chooseData=[...f.chooseData,[...j]]:f.chooseData=[[...j],...f.chooseData]}else if(_=="week"){let Q=ae.getWeekDate(le,U,P.day,e.firstDayOfWeek);f.propStartDate&&ae.compareDate(Q[0],f.propStartDate)&&Q.splice(0,1,f.propStartDate),f.propEndDate&&ae.compareDate(f.propEndDate,Q[1])&&Q.splice(1,1,f.propEndDate),f.currDate=Q,f.chooseData=[ae.formatResultDate(Q[0]),ae.formatResultDate(Q[1])]}else f.currDate=j[3],f.chooseData=[...j];if(!X){let Q=f.chooseData;_=="week"&&(Q={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("select",Q),(e.isAutoBackFill||!e.poppable)&&V()}}},E=P=>{let[K,X,_]=P;return{date:P,monthWeekNum:ae.getMonthWeek(K,X,_,e.firstDayOfWeek),yearWeekNum:ae.getYearWeek(K,X,_,e.firstDayOfWeek)}},B=P=>{const K=P=="prev"?f.monthsData[0]:f.monthsData[f.monthsData.length-1];let X=parseInt(K.curData[0]),_=parseInt(K.curData[1].toString().replace(/^0/,""));switch(P){case"prev":_==1&&(X-=1),_=_==1?12:--_;break;case"next":_==12&&(X+=1),_=_==12?1:++_;break}return[X+"",ae.getNumTwoBit(_),ae.getMonthDays(String(X),String(_))+""]},M=(P,K,X)=>{let{year:_,month:le}=X;return K=="prev"&&P>=7&&(P-=7),Array.from(Array(P),(U,j)=>({day:String(j+1),type:K,year:_,month:le}))},L=(P,K,X,_)=>{P=P-e.firstDayOfWeek;let{year:le,month:U}=X;return K=="prev"&&P>=7&&(P-=7),Array.from(Array(_),(Q,O)=>({day:String(O+1),type:K,year:le,month:U})).slice(_-P)},I=(P,K)=>{const X=ae.getMonthPreDay(+P[0],+P[1]);let _=Number(P[1])-1,le=Number(P[0]);_<=0&&(_=12,le+=1);const U=ae.getMonthDays(String(P[0]),String(P[1])),j=ae.getMonthDays(le+"",_+""),Q={year:P[0],month:P[1]},O={curData:P,title:l("monthTitle",{year:Q.year,month:Q.month}),monthData:[...L(X,"prev",{month:String(_),year:String(le)},j),...M(U,"curr",Q)],cssHeight:0,cssScrollHeight:0},Z=O.monthData.length>35?6:5;O.cssHeight=Qu+Gu*Z;let ne=0;f.monthsData.length>0&&(ne=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),O.cssScrollHeight=ne,K=="next"?(!f.endData||!ae.compareDate(`${f.endData[0]}-${f.endData[1]}-${ae.getMonthDays(f.endData[0],f.endData[1])}`,`${P[0]}-${P[1]}-${P[2]}`))&&f.monthsData.push(O):!f.startData||!ae.compareDate(`${P[0]}-${P[1]}-${P[2]}`,`${f.startData[0]}-${f.startData[1]}-01`)?f.monthsData.unshift(O):f.unLoadPrev=!0},D=()=>{let P=e.startDate?e.startDate:ae.getDay(0),K=e.endDate?e.endDate:ae.getDay(365);f.propStartDate=P,f.propEndDate=K,f.startData=u(P),f.endData=u(K),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const X={year:Number(f.startData[0]),month:Number(f.startData[1])},_={year:Number(f.endData[0]),month:Number(f.endData[1])};let le=_.month-X.month;_.year-X.year>0&&(le=le+12*(_.year-X.year)),le<=0&&(le=1),I(f.startData,"next");let U=1;do I(B("next"),"next");while(U++<le);if(f.monthsNum=le,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(P&&ae.compareDate(f.currDate[0],P)&&f.currDate.splice(0,1,P),K&&ae.compareDate(K,f.currDate[1])&&f.currDate.splice(1,1,K),f.defaultData=[...u(f.currDate[0]),...u(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let j=[],Q={};f.currDate.forEach(O=>{P&&!ae.compareDate(O,P)&&K&&!ae.compareDate(K,O)&&(Object.hasOwnProperty.call(Q,O)||(j.push(O),Q[O]=O))}),f.currDate=[...j],f.defaultData=[...u(j[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[j,Q,O]=u(f.currDate[0]),Z=ae.getWeekDate(j,Q,O,e.firstDayOfWeek);f.currDate=Z,P&&ae.compareDate(f.currDate[0],P)&&f.currDate.splice(0,1,P),K&&ae.compareDate(K,f.currDate[1])&&f.currDate.splice(1,1,K),f.defaultData=[...u(f.currDate[0]),...u(f.currDate[1])]}}else f.currDate&&(P&&ae.compareDate(f.currDate,P)?f.currDate=P:K&&!ae.compareDate(f.currDate,K)&&(f.currDate=K),f.defaultData=[...u(f.currDate)])};xe({scrollToDate:P=>{ae.compareDate(P,f.propStartDate)?P=f.propStartDate:ae.compareDate(P,f.propEndDate)||(P=f.propEndDate);let K=u(P);f.monthsData.forEach((X,_)=>{if(X.title==l("monthTitle",{year:K[0],month:K[1]})&&c.value){let le=f.monthsData[_].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let U=0,j=setInterval(()=>{if(U++,c.value){let Q=le/10;c.value.scrollTop=c.value.scrollTop+Q}U>=10&&(clearInterval(j),c.value&&(c.value.scrollTop=f.monthsData[_].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[_].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let P=0,K=0;f.defaultData.length>0&&f.monthsData.forEach((le,U)=>{le.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(P=U),(e.type=="range"||e.type=="week")&&le.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(K=U)}),H(f.monthsNum,P),f.currentIndex=P,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?($({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),$({day:f.defaultData[5],type:"curr"},f.monthsData[K],!0)):e.type=="week"?$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(le=>{let U=u(le),j=f.currentIndex;f.monthsData.forEach((Q,O)=>{Q.title==l("monthTitle",{year:U[0],month:U[1]})&&(j=O)}),$({day:U[2],type:"curr"},f.monthsData[j],!0)}):$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let X=f.monthsData[f.monthsData.length-1],_=X.cssHeight+X.cssScrollHeight;Qe(()=>{c?.value&&m?.value&&d?.value&&(h.value=c.value.clientHeight,m.value.style.height=`${_}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(_/(f.monthsNum+1))}});const H=(P,K)=>{P>=3?K>0&&K<P?f.defaultRange=[K-1,K+3]:K==0?f.defaultRange=[K,K+4]:K==P&&(f.defaultRange=[K-2,K+2]):f.defaultRange=[0,P+2];let X=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=X},J=(P,K)=>(e.type=="range"||e.type=="week")&&P.type=="curr"&&A(P,K)=="fox-calendar__day--active",ee=(P,K)=>J(P,K)&&g(C(P,K)),Y=(P,K)=>f.currDate.length>=2&&w(C(P,K))?J(P,K):!1,v=()=>{if(f.currDate.length>=2)return ae.isEqual(f.currDate[0],f.currDate[1])},z=P=>{const K=`${P.year}-${P.month}-${Number(P.day)<10?"0"+P.day:P.day}`;return ae.isEqual(K,ae.date2Str(new Date))},x=P=>{if(f.monthsData.length<=1)return;const K=P.target.scrollTop;let X=Math.floor(K/f.avgHeight);if(X==0)K>=f.monthsData[X+1].cssScrollHeight&&(X+=1);else if(X>0&&X<f.monthsNum-1)K>=f.monthsData[X+1].cssScrollHeight&&(X+=1),K<f.monthsData[X].cssScrollHeight&&(X-=1);else{const _=Math.round(K+h.value);_<f.monthsData[X].cssScrollHeight+f.monthsData[X].cssHeight&&K>f.monthsData[X-1].cssScrollHeight&&(X-=1),X+1<=f.monthsNum&&_>=f.monthsData[X+1].cssScrollHeight+f.monthsData[X+1].cssHeight&&(X+=1),X>=1&&K<f.monthsData[X-1].cssScrollHeight&&(X-=1)}f.currentIndex!==X&&(f.currentIndex=X,H(f.monthsNum,X)),f.yearMonthTitle=f.monthsData[X].title},F=()=>{f.chooseData.splice(0),f.monthsData.splice(0),D()};return D(),t.watch(()=>e.defaultValue,P=>{P&&e.poppable&&F()}),{weeks:i,compConthsData:S,showTopBtn:y,topInfo:k,bottomInfo:b,rangeTip:v,mothsViewScroll:x,getClass:A,isStartTip:ee,isEndTip:Y,chooseDay:$,isCurrDay:z,confirm:V,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:m,weeksPanel:p,viewArea:d}}}),ef={class:"fox-calendar__header"},tf={key:0,class:"fox-calendar__header-title"},nf={key:1,class:"fox-calendar__header-slot"},of={key:2,class:"fox-calendar__header-subtitle"},lf={class:"fox-calendar__weekdays",ref:"weeksPanel"},af={class:"fox-calendar__panel",ref:"monthsPanel"},rf={class:"fox-calendar__month-title"},sf={class:"fox-calendar__days"},cf=["onClick"],df={class:"fox-calendar__day-value"},uf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},ff={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},mf={key:2,class:"fox-calendar__day-tips--curr"},pf={key:4,class:"fox-calendar__day-tip"},hf={key:0,class:"fox-calendar__footer"};function gf(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",ef,[e.showTitle?(t.openBlock(),t.createElementBlock("view",tf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",nf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",of,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",lf,[(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",af,[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",rf,t.toDisplayString(s.title),1),t.createElementVNode("view",sf,[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",df,[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",uf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",ff,[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",mf,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",pf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,cf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",hf,[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 fs=te(_u,[["render",gf]]),yf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Fn={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:bf}=G("calendar"),kf=bf({components:{[fs.name]:fs,[fe.name]:fe},props:{...Fn},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=k=>{i.value?.scrollToDate(k)},m=()=>{i.value?.initPosition()};t.watch(()=>e.visible,k=>{k&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),xe({scrollToDate:c,initPosition:m});const p=()=>{n("update:visible",!1)},d=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{d()},update:p,close:d,select:k=>{n("select",k)},choose:k=>{d(),n("choose",k)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Sf(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 Rn=te(kf,[["render",Sf]]),ms={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}},Zo=(e,n)=>{let a;return Ue(e)?a=e:typeof e=="string"&&ke(e)>0?a=ae.parser(e,n):a=new Date,a},St=(e,n,a)=>(Ue(n)||(n=new Date),ae.format(n,a)),Ct=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=ae.date2Str(e),r=ae.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function Cf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...pe,...be,...Fn,...ms},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=t.computed(()=>i.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},u=(x,F="one",P="YYYY-MM-DD")=>{if(yf(x)){f();return}if(k.value&&Array.isArray(x)&&x.length==2){let K,X;typeof x[0]=="string"?(K=Zo(x[0],P),X=Zo(x[1],P)):(K=x[0],X=x[1]);let _=Ct(K),le=Ct(X);(b.startDate===null||b.startDate.getTime()!==K.getTime()||b.endDate?.getTime()!==X.getTime())&&(b.startDate=K,b.startArray=_,b.endDate=X,b.endArray=le)}else{let K;typeof x=="string"?K=Zo(x,P):K=x;let X=Ct(K);(b.startDate===null||b.startDate.getTime()!==K.getTime())&&(b.startDate=K,b.startArray=X)}};u(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,x=>{u(x,i.type,i.valueFormat),d("setValue",x)});const g=t.computed(()=>{if(b.startDate===null)return"";if(k.value){let x=St(i,b.startDate,i.format),F=St(i,b.endDate,i.format);return`${x} ${i.rangeSeparator} ${F}`}else{let x=St(i,b.startDate,i.format);return i.showWeek&&(x=`${x} ${b.startArray[4]}`),x}}),w=t.computed(()=>{if(b.startDate===null)return null;if(k.value){let x=ae.date2Str(b.startDate),F=ae.date2Str(b.endDate??new Date);return[x,F]}else return ae.date2Str(b.startDate)}),T="fox-input-item",C=t.computed(()=>({[T]:!0,"is-disabled":m.value,"is-readonly":p.value})),A=$e(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const x={};return A.value&&(x["text-align"]=A.value),x}),$=t.ref(!1),E=()=>{p.value||m.value||($.value=!0)},B=x=>{$.value=x},M=x=>{if(x){if(k.value&&Array.isArray(x)){let F=x[0],P=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(P,K-1,X),le=x[1];P=me(le[0]),K=me(le[1]),X=me(le[2]);let U=new Date(P,K-1,X);if(b.startDate=_,b.startArray=Ct(_),b.endDate=U,b.endArray=Ct(U),i.valueFormat){let j=St(i,_,i.valueFormat),Q=St(i,U,i.valueFormat);d("update:modelValue",[j,Q],{})}else d("update:modelValue",[_,U],{})}else{let F=x,P=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(P,K-1,X);if(b.startDate=_,b.startArray=Ct(_),i.valueFormat){let le=St(i,_,i.valueFormat);d("update:modelValue",le,{})}else d("update:modelValue",_,{})}d("change",x,{})}},L=x=>{let P=x.target.value;y.value=!0,d("focus",P,x)},I=x=>{setTimeout(()=>{y.value=!1},0);let P=x.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),d("blur",P,x)},D=t.computed(()=>({[`${T}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),R=t.computed(()=>ke(i.unit)>0),q=t.computed(()=>ke(i.unit)>0&&!y.value),W=t.computed(()=>({hidden:!q.value})),H=x=>{f(),d("update:modelValue",null,x),d("change","",x),d("clear","")},J=t.computed(()=>i.clearable&&!m.value&&!p.value),ee=t.computed(()=>{let x=ke(g.value)>0;return i.clearable&&x&&y.value}),Y=x=>{ee.value?H(x):E()},v=t.computed(()=>ee.value&&J.value?l:r),z=t.computed(()=>({action:!0}));return()=>{const x={class:C.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:E,onFocus:L,onBlur:I};s&&(x.disabled=!0);const F=[],P=t.h("input",x);F.push(P);const K=[],X={class:["action-icon"]},_=t.h(v.value,X),le={class:z.value,onClick:Y},U=t.h("view",le,{default:()=>[_]});if(K.push(U),R.value){const Ce=t.h("view",{class:W.value},[i.unit]);K.push(Ce)}const j={class:D.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Fn);Z.visible=$.value,Z["onUpdate:visible"]=B,Z["default-value"]=w.value,Z.onChoose=M;const ne={};if(c.slots.btn){const Ce=c.slots.btn();ne.btn=()=>Ce}c.slots.day&&(ne.day=c.slots.day),c.slots.topInfo&&(ne.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ne.bottomInfo=c.slots.bottomInfo);const re=t.h(a,Z,ne);O.hide=()=>[re];const se=ut(i,Fn,ms);return t.h(o,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:wf,create:Nf,scope:Bf}=G("calendar-item"),Jo=Nf(Cf(wf,Bf,Rn,Be,{CloseIcon:oe.CircleClose,MarkIcon:oe.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 k=de(o.iconSize),b=o.checkedIcon??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),t.h(b,{width:k,height:k,class:y})}}else{if(r.icon)return r.icon();{const k=de(o.iconSize),b=o.icon??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),t.h(b,{width:k,height:k,class:y})}}},p=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),t.h("view",{class:y},r.default?.())},d=()=>{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)},S=c.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${S?`${e}--reverse`:""}`,onClick:h},[o.shape=="button"?d():S?[p(),m()]:[m(),p()]])}}}const{componentName:Vf,create:$f}=G("radio"),On=$f(Tf(Vf,{CheckNormal:oe.CheckNormal,Checked:oe.CheckChecked})),{componentName:ps,create:Ef}=G("radio-group"),Kn=Ef({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}=ht(),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:`${ps} ${ps}--${e.direction}`,style:l},n.default?.())}}});function hs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Un(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(zt(e,r)===a)return l}return-1}function Un(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function zt(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 xf=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function qf(){const e=t.getCurrentInstance();return new xf(e.proxy)}function vf(e){return{text:e,value:e}}const gs={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Mf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Pf={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 Lf(e,n,a,o,l){return{props:{...pe,...be,...gs,...Mf,...Pf},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ie(t.computed(()=>r.readonly)),c=Ve(t.computed(()=>r.disabled)),m=$e(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return c.value}},r.prop??s.attrs.name),d=qf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,u])=>{if(f){const g=await d.load("radio",f,u);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(A=>vf(A));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});let S=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([f,u])=>{S.value=hs(r,u,f,r.valueType),p("setValue",f)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(S.value===-1)return null;const f=h.value[S.value];return zt(r,f)}),k=f=>{let u=null,g=null;if(h.value.length>0){let w=hs(r,h.value,f,"value");S.value=w,w>=0&&(g=h.value[w],r.valueType==="text"?u=Un(r,g):r.valueType==="item"?u=g:u=zt(r,g))}else u=f;p("update:modelValue",u),p("change",u,g)},b=()=>{let f=null,u=null;if(h.value.length>0&&S.value!==-1){let g=h.value[S.value];r.valueType==="text"?f=Un(r,g):r.valueType==="item"?f=g:f=zt(r,g)}p("update:modelValue",f),p("change",f,u)};if(xe({clear(){S.value!==-1&&(S.value=-1,b())}}),r.source){const f=()=>{const u=[],g=Se(r,gs);return h.value.forEach((w,T)=>{const C=zt(r,w),A=Df(r,w);let V={...g,label:C,disabled:A};const $=If(r,w,T);V={...V,...$},c.value&&(V.disabled=!0),i.value&&(V.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const M=s.slots.text(w);E.default=()=>[M]}else{const M=Un(r,w);E.default=()=>M}let B=t.h(l,V,E);u.push(B)}),u};return()=>{const u=f(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":k},w=t.h(o,g,{default:()=>u}),T={default:()=>w};T.label=s.slots.default,T.prepend=s.slots.prepend,T.append=s.slots.append,T.fixedPreTip=s.slots.fixedPreTip,T.fixedTip=s.slots.fixedTip;const C=Se(r,be,pe);return t.h(a,{...C,prop:`${r.prop}_item`},T)}}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":k},{default:()=>f})}}}}const{componentName:zf,create:Ff,scope:Rf}=G("radio-item"),_o=Ff(Lf(zf,Rf,Be,Kn,On)),Of=(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}=ht(),i=t.inject("parent",null),c=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,u=>{c.partialSelect=u});const m=t.computed(()=>!!i),p=t.computed(()=>m.value?i.value.value.includes(l.label):!!l.modelValue),d=t.computed(()=>m.value?i.position:l.textPosition);let h="";const S=(u,g)=>{h="click",s("update:modelValue",u),s("change",u,g)};t.watch(()=>l.modelValue,u=>{h=="click"?h="":s("change",u)});const y=()=>{const u=[];if(c.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const g=de(l.iconSize),w=l.indeterminateIcon??o;return u.push("fox-checkbox__icon--indeterminate"),l.disabled&&u.push("is-disabled"),t.h(w,{width:g,height:g,class:u})}}else if(p.value){if(r.checkedIcon)return r.checkedIcon();{const g=de(l.iconSize),w=l.checkedIcon??a;return u.push("fox-checkbox__icon"),l.disabled&&u.push("is-disabled"),t.h(w,{width:g,height:g,class:u})}}else{if(r.icon)return r.icon();{const g=de(l.iconSize),w=l.icon??n;return u.push("fox-checkbox__icon--unchecked"),l.disabled&&u.push("is-disabled"),t.h(w,{width:g,height:g,class:u})}}},k=()=>{const u=[`${e}__label`];return l.disabled&&u.push("is-disabled"),t.h("view",{class:u},r.default?.())},b=()=>{const u=[`${e}__button`];return p.value&&u.push(`${e}__button--active`),l.disabled&&u.push("is-disabled"),t.h("view",{class:u},r.default?.())},f=u=>{if(!(l.disabled||l.readonly)){if(p.value&&c.partialSelect){c.partialSelect=!1,S(p.value,r.default?.()[0].children);return}if(S(!p.value,r.default?.()[0].children),m.value){const g=i.value.value,w=i.max.value,{label:T}=l,C=g.indexOf(T);C>-1?g.splice(C,1):C<=-1&&(g.length<w||!w)&&g.push(T),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} ${d.value==="left"?`${e}--reverse`:""}`,onClick:f},[l.shape=="button"?b():[y(),k()]])}}),{componentName:Kf,create:Uf}=G("checkbox"),Hn=Uf(Of(Kf,{CheckNormal:oe.CheckNormal,Checked:oe.Checked,Indeterminate:oe.CheckDisabled})),{create:Hf,componentName:ys}=G("checkbox-group"),jn=Hf({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}=ht(),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(d=>{d?.disabled||p.push(d?.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)}),xe({toggleAll:i,toggleReverse:c}),()=>{const m={};return e.textAlign&&(m["text-align"]=e.textAlign),t.h("view",{class:`${ys} ${ys}--${e.direction}`,style:m},n.default?.())}}});function bs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(el(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Wn(e,r)===a)return l}return-1}function el(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Wn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function jf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Wf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Yf=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Xf(){const e=t.getCurrentInstance();return new Yf(e.proxy)}function Qf(e){return{text:e,value:e}}const Gf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},ks={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},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:[Array,String],default:[]}};function Jf(e,n,a,o,l){return{props:{...pe,...be,...Gf,...ks,...Zf},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ve(t.computed(()=>r.disabled)),c=Ve(t.computed(()=>r.readonly)),m=$e(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return i.value}},r.prop??s.attrs.name),d=Xf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,u])=>{if(f){const g=await d.load("checkbox",f,u);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(A=>Qf(A));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});const S=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([f,u])=>{const g=[];Array.isArray(f)&&f.forEach(w=>{let T=bs(r,u,w,r.valueType);T!==-1&&g.push(T)}),!Me(g,S.value)&&(S.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return S.value.forEach(u=>{let g=h.value[u];f.push(Wn(r,g))}),f}),k=f=>{let u=[],g=[];if(h.value.length>0){const w=[];Array.isArray(f)&&f.forEach(T=>{let C=bs(r,h.value,T,"value");C!==-1&&w.push(C);const A=h.value[C];g.push(A),r.valueType==="text"?u.push(el(r,A)):r.valueType==="item"?u.push(A):u.push(Wn(r,A))}),S.value=w}else u=f;p("update:modelValue",u),p("change",u,g)},b=t.ref();if(xe({toggleAll:f=>{b.value.toggleAll(f)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const f=()=>{const u=[],g=Se(r,ks);return h.value.forEach((w,T)=>{const C=Wn(r,w),A=jf(r,w);let V={...g,label:C,disabled:A};const $=Wf(r,w,T);V={...V,...$},i.value&&(V.disabled=!0),c.value&&(V.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(E.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const M=s.slots.text(w);E.default=()=>[M]}else{const M=el(r,w);E.default=()=>M}let B=t.h(l,V,E);u.push(B)}),u};return()=>{const u=f(),g={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":k},w=t.h(o,g,{default:()=>u}),T={default:()=>w};T.label=s.slots.default,T.prepend=s.slots.prepend,T.append=s.slots.append,T.fixedPreTip=s.slots.fixedPreTip,T.fixedTip=s.slots.fixedTip;const C=Se(r,be,pe);return t.h(a,{...C,prop:`${r.prop}_item`},T)}}else return()=>{const f=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":k},{default:()=>f})}}}}const{componentName:_f,create:em,scope:tm}=G("checkbox-item"),tl=em(Jf(_f,tm,Be,jn,Hn)),nl={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:nm,create:om}=G("switch"),lm=om({components:{Loading1:oe.Loading1},props:{...nl},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=nm;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}}}),am={class:"fox-switch-button"};function rm(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",am,[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 Yn=te(lm,[["render",rm]]);function sm(e,n,a,o){return{props:{...pe,...be,...nl},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({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=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,nl),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":d},y=[],k=t.h(o,S);y.push(k);const b={default:()=>y};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const f=Se(l,be,pe);return f["content-class"]=m,t.h(a,{...f,prop:`${l.prop}_item`},b)}}}}const{componentName:im,create:cm,scope:dm}=G("switch-item"),ol=cm(sm(im,dm,Be,Yn));function um(e,n,a,o){return{props:{...pe,...be,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=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=ie.useFoxI18n(n),p=m(l,["placeholder"]),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,M=>{d.value=M,c("change",M)});const h=t.computed(()=>({[`${e}`]:!0})),S=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!s.value&&ue(d.value),"is-disabled":s.value,"is-readonly":i.value})),y=$e(t.computed(()=>l.textAlign),"textAlign"),k=t.computed(()=>{const M={};return y.value&&(M["text-align"]=y.value),M}),b=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(d.value)?p.placeholder.value:d.value),u=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),w=t.computed(()=>{const M={};return y.value&&(M["text-align"]=y.value),M}),T=()=>{c("focus",d.value)},C=()=>{c("blur",d.value)},A=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),V=t.computed(()=>ke(l.unit)>0),$=M=>{s.value==!0||i.value==!0||c("click")},E=t.computed(()=>l.icon??a),B=t.computed(()=>({action:!0}));return()=>{const M=[];if(typeof r.slots.content=="function"){const v=r.slots.content();M.push(v)}else{const v=[];if(b.value){const F={tabIndex:0,class:S.value,style:k.value,onFocus:T,onBlur:C};let P=null;r.slots.main?P=t.h("view",F,[r.slots.main(f.value)]):P=t.h("view",F,[f.value]),v.push(P)}if(u.value){const F={tabIndex:0,class:g.value,style:w.value,onFocus:T,onBlur:C};let P=null;r.slots.sub?P=t.h("view",F,[r.slots.sub(l.desc)]):P=t.h("view",F,[l.desc]),v.push(P)}const z={class:h.value,onClick:$},x=t.h("view",z,v);M.push(x)}const L=[],I=de(l.iconSize);let D=r.slots.icon;if(!D){const v={width:I,height:I,class:["action-icon"]};D=t.h(E.value,v)}const R={class:B.value,onClick:$},q=t.h("view",R,{default:()=>[D]});if(L.push(q),V.value){const v=t.h("view",{},[l.unit]);L.push(v)}const W={class:A.value},H=t.h("view",W,{default:()=>L});M.push(H);const J={default:()=>M};J.label=r.slots.default,J.prepend=r.slots.prepend,J.append=r.slots.append,J.fixedPreTip=r.slots.fixedPreTip,J.fixedTip=r.slots.fixedTip;const ee=Se(l,be,pe);return t.h(o,{...ee,prop:`${l.prop}_item`},J)}}}}const{componentName:fm,create:mm,scope:pm}=G("link-item"),ll=mm(um(fm,pm,oe.ArrowRight,Be)),al={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:hm,componentName:gm}=G("rate"),ym=hm({props:{...al},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[gm]:!0})),r=S=>{n("update:modelValue",S),n("change",S)},s=(S,y)=>{if(e.disabled||e.readonly)return;let k=0;y===1&&e.modelValue===y||(k=y,e.allowHalf&&S==2&&(k-=.5)),r(k)},i=(S,y,k)=>{let b=0;for(let f=y.value.length-1;f>=0;f--){const u=y.value[f];if(S>u.offsetLeft){k?b=f+(S>u.offsetLeft+u.clientWidth/2?1:.5):b=f+1;break}}return b},c=_e(),m={onTouchStart(S){!e.touchable||e.readonly||c.start(S)},onTouchMove(S){e.touchable&&(c.move(S),c.isHorizontal()&&o.value&&(S.preventDefault(),r(i(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),d=t.computed(()=>e.customIcon??oe.StarFillN);return{classes:l,...m,onClick:s,toPxDesc:ge,renderIcon:(S,y)=>t.h(S,y),rateRefs:o,refRandomId:p,slots:a,customIcon:d}}}),bm=["id"],km={class:"fox-rate-item__icon--full"},Sm={key:0,class:"fox-rate-item__icon--half"},Cm={key:1,class:"fox-rate-item__icon--half"};function wm(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",km,[(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",Sm,[(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",Cm,[(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,bm))),128))],34)}const wt=te(ym,[["render",wm]]);function Nm(e,n,a,o){return{props:{...pe,...be,...al},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({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=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,al),disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d},y=[],k=t.h(o,S);y.push(k);const b={default:()=>y};if(r.slots.default){const g=r.slots.default();b.label=()=>g}const f=Se(l,be,pe);return f["content-class"]=m,t.h(a,f,b)}}}}const{componentName:Bm,create:Am,scope:Tm}=G("rate-item"),rl=Am(Nm(Bm,Tm,Be,wt)),Vm=/scroll|auto|overlay/i,Ss=window;function $m(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function sl(e,n=Ss){let a=e;for(;a&&a!==n&&$m(a);){const{overflowY:o}=window.getComputedStyle(a);if(Vm.test(o))return a;a=a.parentNode}return n}function Cs(e,n=Ss){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=sl(e.value,n))}),a}const ws=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Em={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:{...Em},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["pullText","loadText","loadMoreText"]),c=t.ref(),m=Cs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),d=t.computed(()=>({[e]:!0})),h=u=>u?u.offsetTop+h(u.offsetParent):0,S=()=>{let u=0,g=0,w="down";if(m.value==window){const T=ws();c.value&&(u=h(c.value)+c.value.offsetHeight-T-window.innerHeight),g=T}else{const{scrollHeight:T,clientHeight:C,scrollTop:A}=m.value;u=T-C-A,g=A}return p.beforeScrollTop>g?w="up":w="down",p.beforeScrollTop=g,l("scroll-change",g),u<=o.threshold&&w=="down"},y=()=>{Qe(()=>{if(!S()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},k=()=>{m.value&&m.value.addEventListener("scroll",y,o.useCapture)},b=()=>{m.value&&m.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{k(),o.immediate&&y()}),t.onUnmounted(()=>{b()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,k())}),t.onDeactivated(()=>{f.value=!0,b()}),t.watch(()=>o.modelValue,u=>{u||(p.isInfiniting=!1)}),()=>{const u={class:"fox-infinite__container"},g=t.h("view",u,[r?.default?.()]),w=[];if(p.isInfiniting){let V=r?.loading?.()??null;if(!V){let B=r?.loadingIcon?.()??null;if(!B){const I={class:["fox-infinite__bottom-box__img"]};B=t.h(a,I)}const M={class:"fox-infinite__bottom-box__text"},L=t.h("view",M,[i.loadText.value]);V=[B,L]}const $={class:"fox-infinite__bottom-box"},E=t.h("view",$,V);w.push(E)}else if(!o.hasMore){let V=r?.finished?.()??null;if(!V){const $={class:"fox-infinite__bottom-tips"};V=t.h("view",$,[i.loadMoreText.value]),w.push(V)}}const T={class:"fox-infinite__bottom"},C=t.h("view",T,w),A={class:d.value,ref:c};return t.h("view",A,[g,C])}}}}const{componentName:Im,create:xm,scope:qm}=G("infinite-loading"),Xn=xm(Dm(Im,qm,oe.Loading)),{componentName:vm,create:Mm}=G("button"),Pm=Mm({components:{Loading:oe.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),d=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=vm;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}}),S=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:d,classes:h,getStyle:S}}}),Lm={class:"fox-button__wrap"};function zm(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",Lm,[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 Le=te(Pm,[["render",zm]]),Fm={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"}},Rm=(e,n,a)=>({props:{...Fm},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}=ht(),{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["placeholder"]),c=t.reactive({active:!1}),m=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),d=$=>{let B=$.target.value;o.maxLength&&B.length>Number(o.maxLength)&&(B=B.slice(0,Number(o.maxLength))),r("update:modelValue",B,$),r("change",B,$)},h=t.ref({}),S=$=>{let B=$.target.value;c.active=!0,h.value=o.focusStyle,r("focus",B,$)},y=$=>{setTimeout(()=>{c.active=!1},0);let B=$.target.value;o.maxLength&&B.length>Number(o.maxLength)&&(B=B.slice(0,Number(o.maxLength))),h.value={},r("blur",B,$)},k=$=>{r("update:modelValue","",$),r("change","",$),r("clear","")},b=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const $={};return b.value||($.display="none"),$}),u=$=>{o.autoblur&&A.value?.blur(),(typeof $.cancelable!="boolean"||$.cancelable)&&$.preventDefault(),r("search",o.modelValue)},g=$=>{r("keyup-input",$)},w=$=>{r("click-input",$)},T=$=>{r("click-left-icon",o.modelValue,$)},C=t.computed(()=>({textAlign:o.inputAlign})),A=t.ref(null);t.onMounted(()=>{o.autofocus&&A.value.focus()});const V=()=>{const $=[];if(l.leftin){const R={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:T},q=t.h("view",R,[l.leftin()]);$.push(q)}const E={class:`${e}__input-inner-input`,ref:A,style:C.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:w,onInput:d,onFocus:S,onBlur:y,onkeyup:g},B=t.h("input",E),M={class:[`${e}__input-inner`],action:"#",onSubmit:u},L=t.h("form",M,[B]);$.push(L);const I=[];if(o.clearable){const R={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:k},q=l?.clear?.()??o.clearIcon??a,W=t.h("view",R,[t.h(q)]);I.push(W)}if(l.rightin){const R={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},q=t.h("view",R,[l.rightin()]);I.push(q)}if(I.length>0){const R={class:`${e}__input-inner-right`},q=t.h("view",R,I);$.push(q)}const D={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",D,$)};return()=>{const $=[];if(o.label){const M={class:`${e}__search-label`},L=t.h("span",M,[o.label]);$.push(L)}if(l.leftout){const M={class:[`${e}__search-icon`,`${e}__left-search-icon`]},L=t.h("view",M,[l.leftout()]);$.push(L)}const E=V();if($.push(E),l.rightout){const M={class:[`${e}__search-icon`,`${e}__right-search-icon`]},L=t.h("view",M,[l.rightout()]);$.push(L)}const B={class:`${e}`,style:m.value};return t.h("view",B,$)}}}),{componentName:Om,create:Km,scope:Um}=G("searchbar"),Qn=Km(Rm(Om,Um,oe.CircleClose)),Gn={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 Hm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Zn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Bs(e,r)===a)return l}return-1}function Zn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ns(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Bs(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function jm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Wm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Ym=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,d=p+l;d>m.length&&(d=m.length);const h=m.slice(p,d);return{totalSize:m.length,page:h}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,s]);const c=Ze(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(Ee(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function Xm(){const e=t.getCurrentInstance();return new Ym(e.proxy)}function Qm(e,n,a,o,l,r,s,i,c,m,p){return{props:{...Gn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(d,{slots:h}){const{emitEvent:S}=ht(),{toLocaleRefs:y}=ie.useFoxI18n(n),k=y(d,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),b=Xm(),f=t.ref([]),u=t.ref(0),g=t.ref(""),w=t.shallowRef(null),T=t.computed(()=>{const U={};return d.params&&Object.assign(U,d.params),ue(g.value)||(U[`${d.searchKey}`]=g.value),w.value&&Object.assign(U,w.value),U});let C=!0;const A=async(U,j,Q)=>{try{if($.value===!1)return;let O=null;ue(g.value)||(O=ne=>{const re=Zn(d,ne);if(typeof re=="string"&&re.includes(g.value))return!0;const se=Ns(d,ne);return!!(typeof se=="string"&&se.includes(g.value))});const Z=await b.load("actionsheet",U,j,Q,T.value,C,O??void 0);C=!1,Array.isArray(Z)?(f.value=Z,u.value=1,$.value=!1):!Array.isArray(Z.page)||Z.page.length===0?(console.warn("[FoxUI] can not load more data"),$.value=!1):(Reflect.apply([].push,f.value,Z.page),u.value=Math.ceil(f.value.length/d.pageSize),(Z.totalSize&&f.value.length>=Z.totalSize||Q<Z.page.length)&&($.value=!1)),V.value=!1}catch(O){console.error("[FoxUI] ActionSheet load more data fail",O),$.value=!0,u.value=0,f.value=[]}setTimeout(()=>{S("loaded-data")},250)},V=t.ref(!1),$=t.ref(!0),E=async()=>{if(!d.source){V.value=!1;return}await A(d.source,u.value+1,d.pageSize)};let B=null;t.watch(g,(U,j)=>{B&&(clearTimeout(B),B=null),ue(U)&&!ue(j)&&(B=setTimeout(()=>{L()},d.searchDelayTriggerClear))});const M=()=>{$.value=!0,u.value=0,f.value=[],d.source&&E()},L=()=>{M()};t.watch([()=>d.source,()=>d.pageSize,()=>d.params],async([U,j,Q])=>{d.source&&M()},{immediate:!0});const I=t.computed(()=>!d.multiple&&d.isAutoBackFill),D=t.ref([]);let R=null;const q=t.ref(d.visible);t.watch(()=>d.visible,U=>{q.value!==U&&(q.value=U),U?R=[...D.value]:R=null});const W=(U,j)=>{const Q=[];return Array.isArray(U)||(U=[U]),U.forEach(O=>{let Z=Hm(d,j,O,d.valueType);Z!==-1&&Q.push(Z)}),Me(Q,D.value)?!1:(D.value=Q,!0)};t.watch([()=>d.modelValue,()=>f.value],([U,j],[Q,O])=>{if(W(U,j)){const ne=H();J(ne)}},{deep:!0});const H=()=>{const U=[],j=[],Q=[];for(let re of D.value){const se=f.value[re];j.push(se);const ye=Zn(d,se);if(Q.push(ye),d.valueType==="item")U.push(se);else if(d.valueType==="text")U.push(ye);else{const Ce=Bs(d,se);U.push(Ce)}}let O=null,Z=null,ne=null;return d.multiple?(O=U,Z=Q,ne=j):(O=U[0]??null,Z=Q[0]??null,ne=j[0]??null),{value:O,text:Z,item:ne}},J=U=>{S("update:modelValue",U.value),S("update:text",U.text),S("change",U.value,U.item,U.text)},ee=()=>{R&&(D.value=R)},Y=U=>{const j=D.value.indexOf(U);d.multiple?j===-1?D.value.push(U):D.value.splice(j,1):j===-1?D.value=[U]:D.value=[],(I.value||!d.poppable&&!d.showFooter)&&x()},v=U=>{q.value=U,S("update:visible",U)},z=()=>{const U=()=>{ee(),v(!1)},j=d.beforeMethod??d.beforeClose;if(typeof j=="function"){const Q=j("close");dt(Q)?Q.then(O=>{O!==!1&&U()}).catch(()=>{U()}):Q!==!1&&U()}else U()},x=()=>{const U=H(),j=()=>{J(U),v(!1)},Q=d.beforeMethod??d.beforeClose;if(typeof Q=="function"){const O=Q("confirm",U.value,U.item,U.text);dt(O)?O.then(Z=>{Z!==!1&&j()}).catch(()=>{j()}):O!==!1&&j()}else j()},F=()=>{let U=k.title.value??"";h.title&&(U=h.title());const j=t.h("view",{class:["fox-actionsheet__header-title"]},[U]),Q=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:z});return t.h("view",{class:["fox-actionsheet__header"]},[j,Q])},P=()=>{let U=null;if(h.search)U=h.search();else{const j={onSearch:M,placeholder:k.seachPlaceholder.value,disabled:d.disabled,modelValue:g.value,"onUpdate:modelValue":Q=>{g.value=Q}};U=t.h(r,j,{leftin:()=>t.h(m)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[U])},K=(U,j,Q,O,Z)=>{if(h.optionLabel)return h.optionLabel({text:U,checked:j,disabled:Q,subText:O,item:Z});const ne=[],re=t.h("view",{class:"fox-actionsheet__list-item-text"},[U]);if(ne.push(re),O){const se=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[O]);ne.push(se)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ne)},X=(U,j,Q,O)=>{if(h.optionIcon)return h.optionIcon({checked:U,disabled:j,iconSize:Q,item:O});if(U){if(h.checkedIcon)return h.checkedIcon({disabled:j,item:O});{const Z=d.checkedIcon??i;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}else{if(h.icon)return h.icon({disabled:j,item:O});{const Z=d.icon??s;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}},_=()=>{const U=[];for(let j=0;j<f.value.length;j++){const Q=f.value[j],O=Zn(d,Q),Z=Ns(d,Q),ne=["fox-actionsheet__list-item"],re={};let se=jm(d,Q),ye=d.iconSize?de(d.iconSize):null;const Ce=Wm(d,Q,j);Ce&&(se=se||Ce.disabled,Ce.class&&ne.push(Ce.class),Ce.style&&Object.assign(re,Ce.style)),se=!!(d.disabled||se);const Xe=D.value.includes(j);se&&ne.push("is-disabled"),Xe&&ne.push("is-checked");const La={class:ne,style:re,key:`${j}`,onClick:()=>{se||Y(j)}};let _t=[];if(h.option)_t.push(h.option({item:Q,checked:Xe,disabled:se}));else{const lA=K(O,Xe,se,Z,Q);_t.push(lA);const aA=X(Xe,se,ye,Q);_t.push(aA),d.textPosition==="right"&&_t.reverse()}const oA=t.h("view",La,_t);U.push(oA)}return U},le=()=>{let U=[];if(h.buttons)U=h.buttons();else{const Q=t.h(l,{type:"primary",block:"block",onClick:x,disabled:d.disabled},{default:()=>k.confirmText.value});U.push(Q)}return t.h("view",{class:"fox-actionsheet__footer"},[U])};return xe({search:async(U=null,j=!0)=>{w.value=U&&t.toRaw(U),t.triggerRef(w),j&&($.value=!0,u.value=0,f.value=[]),t.nextTick(()=>{E()})},clear:()=>{$.value=!0,u.value=0,f.value=[]},confirm:()=>{x()},cancel:()=>{z()}}),()=>{const U=[];if(d.showHeader){const ye=F();U.push(ye)}if(d.showSearchbar){const ye=P();U.push(ye)}let j=null;if(h.content)j=h.content();else{const ye=_(),Ce={hasMore:$.value,loadText:k.loadText.value,loadMoreText:k.loadMoreText.value,modelValue:V.value,"onUpdate:modelValue":Xe=>{V.value=Xe},onLoadMore:E};j=t.h(o,Ce,{default:()=>ye})}const Q={};d.optionsHeight&&(Q.height=d.optionsHeight);const O={"fox-actionsheet__list":!0};d.poppable||(O["fox-actionsheet__list--inner"]=!0);const Z=t.h("view",{class:O,style:Q},[j]);if(U.push(Z),d.showFooter&&!I.value){const ye=le();U.push(ye)}const ne=t.h("view",{class:"fox-actionsheet"},U);if(!d.poppable)return ne;const re=["fox-actionsheet__popup"];d.popClass&&re.push(d.popClass);const se={popClass:re.join(" "),visible:q.value,closeable:!1,"onUpdate:visible":v,position:d.position,round:"round",onClickOverlay:z,closeOnClickOverlay:d.closeOnClickOverlay};return t.h(a,se,{default:()=>ne})}}}}const{componentName:Gm,create:Zm,scope:Jm}=G("actionsheet-pane"),Jn=Zm(Qm(Gm,Jm,fe,Xn,Le,Qn,oe.CheckNormal,oe.Checked,oe.Close,oe.Search2)),As={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 _m(e,n,a,o,l,r,s){return{props:{...pe,...be,...As,...Gn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=ve(i,"modelValue",null,d),b=t.ref(""),f=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),u="fox-input-item",g=t.computed(()=>({[u]:!0,"is-disabled":m.value,"is-readonly":p.value})),w=$e(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const x={};return w.value&&(x["text-align"]=w.value),x}),C=t.ref(!1),A=()=>{C.value=!0},V=x=>{C.value=x},$=x=>{k.value=x,d("update:modelValue",x)},E=(x,F)=>{d("change",x,F)},B=x=>{let P=x.target.value;y.value=!0,d("focus",P,x)},M=x=>{setTimeout(()=>{y.value=!1},0);let P=x.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),d("blur",P,x)},L=x=>{b.value=x,d("update:text",x)},I=t.computed(()=>({[`${u}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),D=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),q=t.computed(()=>({hidden:!R.value})),W=x=>{k.value="",d("update:modelValue","",x),d("change","",x),d("clear","")},H=t.computed(()=>i.clearable&&!m.value&&!p.value),J=t.computed(()=>ke(k.value)>0&&y.value),ee=x=>{J.value?W(x):A()},Y=t.computed(()=>J.value&&H.value?o:l),v=t.computed(()=>({action:!0})),z=t.ref(null);return xe({search:x=>{z.value&&z.value.search(x)},clear:()=>{z.value&&z.value.clear},confirm:x=>{z.value&&z.value.confirm()},cancel:()=>{z.value&&z.value.cancel()}}),()=>{const x={class:g.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:A,onFocus:B,onBlur:M};s&&(x.disabled=!0);const F=[],P=t.h("input",x);F.push(P);const K=[],X={class:["action-icon"]},_=t.h(Y.value,X),le={class:v.value,onClick:ee},U=t.h("view",le,{default:()=>[_]});if(K.push(U),D.value){const Ce=t.h("view",{class:q.value},[i.unit]);K.push(Ce)}const j={class:I.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Gn);Z.ref=z,Z.class=i.actionsheetProps,Z.disabled=m.value||p.value,Z.visible=C.value,Z["onUpdate:visible"]=V,Z.modelValue=k.value,Z["onUpdate:modelValue"]=$,Z.text=b.value,Z["onUpdate:text"]=L,Z.onChange=E,Z.poppable=!0,Z["text-position"]=i.textPosition;const ne={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},re=t.h(r,Z,ne);O.hide=()=>[re];const se=ut(i,As,Gn);return t.h(a,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:ep,create:tp,scope:np}=G("actionsheet-item"),il=tp(_m(ep,np,Be,oe.CircleClose,oe.ArrowRight,Jn)),cl={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:op,create:lp}=G("input-number"),ap=lp({components:{Minus:oe.Minus,Plus:oe.Plus},props:{...cl},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const S=op;return{[S]:!0,[`${S}--disabled`]:e.disabled}}),o=S=>Number(S).toFixed(Number(e.decimalPlaces)),l=S=>{const y=S.target;n("update:modelValue",y.valueAsNumber,S)},r=(S,y)=>{let k=o(S);n("update:modelValue",k,y),n("change",k,y)},s=(S=Number(e.modelValue))=>S<Number(e.max)&&!e.disabled,i=(S=Number(e.modelValue))=>S>Number(e.min)&&!e.disabled,c=S=>{if(n("reduce",S),i()){let y=Number(e.modelValue)-Number(e.step);r(y,S)}else n("overlimit",S,"reduce")},m=S=>{if(n("add",S),s()){let y=Number(e.modelValue)+Number(e.step);r(y,S)}else n("overlimit",S,"add")},p=S=>{e.disabled||e.readonly||n("focus",S)},d=S=>{if(e.disabled||e.readonly)return;let k=S.target.valueAsNumber;k<Number(e.min)?k=Number(e.min):k>Number(e.max)&&(k=Number(e.max)),r(k,S),n("blur",S)},h=S=>{let y=Number(S);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 S=h(e.modelValue);S!==Number(e.modelValue)&&r(S,{})}),{classes:a,change:l,blur:d,focus:p,add:m,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),rp=["min","max","disabled","readonly","value"];function sp(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,rp),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 et=te(ap,[["render",sp]]);function ip(e,n,a,o){return{props:{...pe,...be,...cl},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({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=ve(l,"modelValue",null,c),d=y=>{p.value=y,c("update:modelValue",y,{}),c("change",y,{})},h=y=>{c("add",y)},S=y=>{c("reduce",y)};return()=>{const y={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},k=Se(l,cl),f={...r.attrs,...k,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d,onAdd:h,onReduce:S},u=t.h(o,f,y),g=[];g.push(u);const w={default:()=>g};w.label=r.slots.default,w.fixedPreTip=r.slots.fixedPreTip,w.fixedTip=r.slots.fixedTip;const T=Se(l,be,pe);return T["content-class"]=m,t.h(a,{...T,prop:`${l.prop}_item`},w)}}}}const{componentName:cp,create:dp,scope:up}=G("inputnumber-item"),dl=dp(ip(cp,up,Be,et)),fp={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 mp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ts(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Vs(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function pp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function ul(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function $s(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Es(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function fl(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let hp=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function gp(){const e=t.getCurrentInstance();return new hp(e.proxy)}function yp(e,n,a,o){return{props:{...fp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=gp(),m=t.ref([]),p=t.computed(()=>m.value.filter(v=>pp(l,v)!==!1)),d=t.ref(-1),h=()=>{const v=l.modelValue,z=p.value.findIndex(x=>Ts(l,x)===v);d.value!==z&&(d.value=z,l.scroll&&ee(z,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const S=v=>d.value===v,y=v=>{if(v<0&&v>=p.value.length)return!1;const z=p.value[v],F=(fl(l,z,v)??{}).status??ul(l,z);return S(v)||F},k=t.computed(()=>{const v={[i]:!0};return l.mode?v[`is-${l.mode}`]=!0:l.direction&&(v[`is-${l.direction}`]=!0),l.scroll&&(v["is-scroll"]=!0),v}),b=t.computed(()=>({})),f=(v,z,x,F,P)=>{const K={[`${i}__step`]:!0};return P&&(K[`${P}`]=!0),K[`${u.value}`]=!0,F&&(K["is-doit"]=!0),v===d.value?K["is-active"]=!0:z==="done"?K["is-done"]=!0:z==="error"?K["is-error"]=!0:z==="half"?K["is-half"]=!0:x?K["is-disabled"]=!0:K["is-normal"]=!0,K},u=t.computed(()=>{if(l.mode==="simple")return"start";let v=l.align;return v||(l.direction==="vertical"?v="start":v="center"),v}),g=(v,z={})=>{const x={...z};return u.value==="start"&&v===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},w=(v,z)=>{let x={};if(z<p.value.length-1){const F=z+1;y(z)&&y(F)?l.direction==="vertical"?x.height="100%":x.width="100%":x.opacity="0"}return x},T=v=>p.value.length-1===v,C=(v,z)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&z>d.value||d.value===z)return;const x=d.value,F=z;d.value=z,l.scroll&&ee(z,!1);const P=Ts(l,v);s("update:modelValue",P);const K={fromIndex:x,currentIndex:F,item:v,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",P,K)},A=t.ref(!0),V=async(v,z)=>{try{const x=await c.load("stesbar",v,z);Array.isArray(x)&&(m.value=x),A.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([v,z])=>{v&&V(v,z)},{immediate:!0});const $=(v,z,x,F,P)=>{let K=null;if(r.icon)K=r.icon({item:v,index:z,status:F});else if(F==="done"){const _={};l.iconSize&&(_.width=l.iconSize,_.height=l.iconSize);const le=l.icon??a;K=t.h(le,_)}else{const _=x??`${z+1}`;K=t.h("span",{},[_])}const X={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:v,index:z}),!P&&C(v,z)}};return t.h("view",X,[K])},E=(v,z,x)=>{const F=t.h("i",{class:"fox-steps-bar__line-inner",style:w(v,z)});return t.h("view",{class:"fox-steps-bar__line"},[F])},B=()=>{let v=null;if(r.markIcon)v=r.markIcon();else{const x={};l.iconSize&&(x.width=l.markIconSize,x.height=l.markIconSize);const F=l.markIcon??o;v=t.h(F,x)}return t.h("view",{class:"fox-steps-bar__mark"},[v])},M=(v,z,x,F,P)=>{const K=[];if(!T(z)){const le=E(v,z);K.push(le)}const X=$(v,z,x,F,P);K.push(X);const _={class:"fox-steps-bar__head"};return t.h("view",_,K)},L=(v,z,x,F)=>{let P=null;r.main?P=r.main({item:v,index:z,status:x}):P=mp(l,v);const K={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:v,index:z}),!F&&C(v,z)}};return t.h("view",K,[P])},I=(v,z,x)=>{let F=null;if(r.sub){F=r.sub({item:v,index:z,status:x});const P={class:"fox-steps-bar__sub"};return t.h("view",P,[F])}return null},D=(v,z)=>{const x=fl(l,v,z)??{},F=x.status??ul(l,v);let P=Vs(l,v);x.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const K=x.label??Es(l,v),X=[],_=$(v,z,K,F,P);_&&X.push(_);const le=L(v,z,F,P);if(le&&X.push(le),!T(z)){const ne=E(v,z);ne&&X.push(ne)}const U=t.h("view",{class:"fox-steps-bar__head"},X),j=x.class,Q=x.style??{};let O=$s(l,v);x.doit===!0&&(O=!0);const Z={ref:J(z),class:f(z,F,P,O,j),style:g(z,Q)};return t.h("view",Z,[U])},R=(v,z)=>{const x=fl(l,v,z)??{},F=x.status??ul(l,v);let P=Vs(l,v);x.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const K=x.label??Es(l,v),X=[],_=l.layout;for(let O of _)if(O==="head"){const Z=M(v,z,K,F,P);X.push(Z)}else if(O==="main"){const Z=L(v,z,F,P);X.push(Z)}else if(O==="sub"){const Z=I(v,z,F);X.push(Z)}else if(O==="mark"){const Z=B();X.push(Z)}const le=x.class,U=x.style??{};let j=$s(l,v);x.doit===!0&&(j=!0);const Q={ref:J(z),class:f(z,F,P,j,le),style:g(z,U)};return t.h("view",Q,X)},q=t.ref(),W=t.ref([]),H=(v,z)=>{W.value[z]=v},J=v=>z=>{H(z,v)},ee=(v,z)=>{const x=q.value,F=W.value;if(!x||!F||!F[v])return;const P=F[v];let K=0;l.direction==="vertical"?K=P.offsetTop-(x.offsetHeight-P.offsetHeight)/2:K=P.offsetLeft-(x.offsetWidth-P.offsetWidth)/2,Y(x,K,z?0:.3,l.direction)},Y=(v,z,x,F)=>{let P=0;const K=F==="horizontal"?v.scrollLeft:v.scrollTop,X=x===0?1:Math.round(x*1e3/16);function _(){F==="horizontal"?v.scrollLeft+=(z-K)/X:v.scrollTop+=(z-K)/X,++P<X&&Ke(_)}_()};return()=>{const v=[];if(l.mode==="simple")for(let x=0;x<p.value.length;x++){const F=p.value[x],P=D(F,x);v.push(P)}else for(let x=0;x<p.value.length;x++){const F=p.value[x],P=R(F,x);v.push(P)}const z={ref:q,class:k.value,style:b.value};return t.h("view",z,v)}}}}const{componentName:bp,create:kp,scope:Sp}=G("steps-bar"),ml=kp(yp(bp,Sp,oe.Checklist,oe.ArrowRight));function Cp(e){e.stopPropagation()}class wp{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=Ro()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=Oo(),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),Cp(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 Np(e,n){return new wp(e,n)}const Bp={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:{...Bp},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 u=[`${e}`];return l.customClass&&u.push(l.customClass),u}),m=t.computed(()=>{const u={};return ue(i.top)||(u.top=i.top),ue(i.right)||(u.right=i.right),ue(i.bottom)||(u.bottom=i.bottom),ue(i.left)||(u.left=i.left),ue(l.width)||(u.width=l.width),ue(l.height)||(u.height=l.height),ue(l.color)||(u.color=l.color),ue(l.background)||(u.background=l.background),ue(l.borderRadius)||(u["border-radius"]=l.borderRadius),u}),p=t.computed(()=>({[`${e}__icon`]:!0})),d=()=>{s("click")},h=t.ref(null),S=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},y={x:0,y:0},f=Np(u=>{if(!h.value)return;const g=h.value;S(),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},u=>{if(!h.value)return;const g=h.value;S(),i.left=y.x+u.x,i.top=y.y+u.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const u=[h.value];f.open(u)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&f.close()}),()=>{let u=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)u=g;else{const T=t.h(a,{class:p.value});u.push(T)}const w={ref:T=>{h.value=T},class:c.value,style:m.value,onClick:d};return t.h("view",w,u)}}}),{componentName:Tp,create:Vp,scope:$p}=G("floating-button"),pl=Vp(Ap(Tp,$p,oe.Uploader,!1)),Ep={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:{...Ep},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const d={[`${e}`]:!0};return o.disabled?d[`${e}--disabled`]=!0:d[`${e}--${o.type}`]=!0,d}),s=ve(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 d=[];if(i.value){const b={class:c.value},f=t.h("span",b,[i.value]);d.push(f)}const h={class:m.value},S=o.icon??a,y=t.h(S,h);return d.push(y),o.textPosition==="right"&&d.reverse(),t.h("view",{class:r.value,onClick:p},d)}}}}const{componentName:Ip,create:xp,scope:qp}=G("more-button"),hl=xp(Dp(Ip,qp,oe.RectUp)),vp={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}},Mp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Pp(e,n,a){return{props:{...vp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,m=t.ref(!0),p=w=>{m.value=w},d=w=>{if(typeof o.unmount=="function")try{o.unmount()}catch(T){console.error(T)}if(typeof o.callback=="function")try{o.callback(w)}catch(T){console.error(T)}},h=()=>{d("confirm")},S=()=>{d("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&d("close")},k=(w,T)=>Mp(w)?(T.src=w,t.h("img",T)):typeof w=="string"?(Array.isArray(T.class)?T.class.push(w):T.class&&typeof T.class=="object"?T[`${w}`]=!0:typeof T.class=="string"?T.class=`${T.class}, ${w}`:T.class=w,t.h(o.tag,T)):t.h(w,T),b=()=>{const w=[];if(o.icon){const C={class:[`${c}__header-icon`]},A=k(o.icon,C);w.push(A)}if(o.title){const C=t.h("view",{class:`${c}__header-title`},[o.title]);w.push(C)}if(o.showClose&&o.closeIcon){const C={class:[`${c}__header-close-icon`],onClick:y},A=k(o.closeIcon,C);w.push(A)}const T={class:[`${c}__header`]};return t.h("view",T,w)},f=(w,T)=>{const C=[];if(T){const V={class:`${c}__group-title`},$=t.h("view",V,[T]);C.push($)}if(w){const V=[];Array.isArray(w)||(w=[w]);for(let $ of w){const E={class:`${c}__group-row`,innerHTML:$},B=t.h("view",E);V.push(B)}if(V.length>0){const $={class:`${c}__group-rows`},E=t.h("view",$,V);C.push(E)}}if(C.length===0)return null;const A={class:`${c}__group`};return t.h("view",A,C)},u=()=>{const w=[];if(typeof o.message=="string")w.push(o.message);else if(Array.isArray(o.message))for(let C of o.message)if(typeof C=="string"){const A=f(C);w.push(A)}else{const A=f(C.content,C.title);w.push(A)}else if(typeof o.message=="function"){const C=o.message();w.push(C)}else{const C=o.message;w.push(C)}const T={class:`${c}__body`};return t.h("view",T,w)},g=()=>{const w=[];if(o.showCancelButton){const C={class:[`${c}__footer-button`],style:{},onClick:S};o.cancelButtonClass&&C.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(C.style,o.cancleButtonStyle);const A=t.h("button",C,[o.cancelButtonText??i.cancelText.value]);w.push(A)}if(o.showConfirmButton){const C={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&C.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(C.style,o.confirmButtonStyle);const A=t.h("button",C,[o.confirmButtonText??i.confirmText.value]);w.push(A)}if(w.length===0)return null;const T={class:`${c}__footer`};return t.h("view",T,w)};return()=>{const w=[],T=b();T&&w.push(T);const C=u();C&&w.push(C);const A=g();A&&w.push(A);const V={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},$=t.h("view",V,w),E=[`${c}__popup`];o.popClass&&E.push(o.popClass);const B={};o.width&&(B.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(B.height=typeof o.height=="number"?`${o.height}px`:o.height);const M={popClass:E.join(" "),style:B,visible:m.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,M,{default:()=>$})}}}}const{componentName:Lp,create:zp,scope:Fp}=G("messagebox"),Rp=zp(Pp(Lp,Fp,fe)),Op="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",Kp="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",Up="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",Hp="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",jp=new $n,Wp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Yp=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-${jp.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(Rp,e);n.appendChild(o),t.render(r,o)},ct={show:(e,n,a,o)=>{const l={...Wp};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=Up:r==="warning"?l.icon=Hp:r==="error"?l.icon=Op:l.icon=Kp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=oe.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})},Yp(l)})},alert:(e,n,a)=>ct.show("alert",e,n,a),confirm:(e,n,a)=>ct.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ct.alert,e.config.globalProperties.$confirm=ct.confirm}},Xp=(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)},Qp=new $n,Gp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),Zp=e=>`${e}-${Qp.get()}`,Jp=Symbol.for("InnerPageScopeKey"),_p=Symbol.for("PageWrapperKey"),eh="FoxLeave",th="FoxLeaveEnd",nh={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 oh(e,n,a,o){return{props:{...Fe,...nh},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(Jp,!0);const c={};t.provide(_p,c);const m=C=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{m()},d=e,h=C=>{S.value=C,i("update:visible",C)},S=t.ref(!1),y=(C,A)=>Gp(C)?(A.src=C,t.h("img",A)):typeof C=="string"?(Array.isArray(A.class)?A.class.push(C):A.class&&typeof A.class=="object"?A[`${C}`]=!0:typeof A.class=="string"?A.class=`${A.class}, ${C}`:A.class=C,t.h(l.tag,A)):t.h(C,A),k=()=>{if(!l.showHeader)return null;const C=[];if(s.header){const V=s.header();C.push(V)}else if(l.title){const V=t.h("view",{class:`${d}__header-title`},[l.title]);C.push(V)}if(C.length===0)return null;const A={class:[`${d}__header`]};return t.h("view",A,C)},b=()=>{if(!l.showClose)return null;const C={class:[`${d}__close-icon`],onClick:p},A=l.closeIcon??o;return y(A,C)};let f=null;const u=C=>{Xp(th,{},f)},g=Zp(e),w=()=>{h(!0)},T=()=>{if(!f)return;const C=f.querySelector(".fox-overlay");C&&(C.classList.add("overlay-fade-leave-active"),C.classList.add("overlay-fade-leave-to"));const A=f.querySelector(".fox-popup");A&&(A.classList.add(`fox-popup-slide-${l.position}-leave-active`),A.classList.add(`fox-popup-slide-${l.position}-leave-to`),A.addEventListener("animationend",u,{once:!0}),A.addEventListener("transitionend",u,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${g}`),f?.addEventListener(eh,T,{once:!0}),w()}),()=>{const C=[],A=k();A&&C.push(A);const V=b();V&&C.push(V);const $=s.default?s.default():[];Reflect.apply([].push,C,$);const E={[`${d}`]:!0};l.mode&&(E[`${d}--${l.mode}`]=!0);const B={class:E},M=t.h("view",B,C),L=[`${d}__popup`,g];l.popClass&&L.push(l.popClass),l.position&&L.push(`${d}__popup--${l.position}`);const I={};l.width&&(I.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(I.height=typeof l.height=="number"?`${l.height}px`:l.height);const R={...Se(l,Fe),popClass:L.join(" "),style:I,visible:S.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},q=t.h(a,R,{default:()=>M});return t.h("div",{class:[`${d}__root`,g]},[q])}}}}const{componentName:lh,create:ah,scope:rh}=G("popup-wrapper"),gl=ah(oh(lh,rh,fe,oe.Close)),sh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function ih(e,n,a,o){return{props:{...sh},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),d={class:`${e}`};return t.h("view",d,[p])}}}}const{componentName:ch,create:dh,scope:uh}=G("dropdown"),yl=dh(ih(ch,uh,fe));function fh(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 mh={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 ph(e,n,a,o=!1){return{props:{...mh},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={},w=l.textColor??l.color;return w&&(g.color=w),g}),m=(g,w)=>{let T=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const C=l.highlightFilter;if(g.indexOf(C)!==-1){const V=g.replace(new RegExp(C,"g"),`<span>${C}</span>`);w.innerHTML=V,w.class["is-highlight"]=!0,T=t.h(l.tag,w)}}else if(typeof l.highlightFilter=="function"){const C=l.highlightFilter(g);C&&(w.innerHTML=C,w.class["is-highlight"]=!0,T=t.h(l.tag,w))}return T},p=g=>{r.emit("click",g)};let d="";const h=()=>{const g=s.value;if(!g)return;const w=g.clientWidth;fh(g,T=>{const C=g.innerHTML??"";ue(C)||T<w||(d?a?.show(g,C,{type:"text",id:d,showArrow:l.showArrow},!0):d=a?.show(g,C,{type:"text",showArrow:l.showArrow},!0)??"")})},S=()=>{d&&a?.hide(d)};let y=null;const k=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},b=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{S()},l.hideAfter??0)},f=()=>{const g=s.value;g&&(g.addEventListener("mouseover",k),g.addEventListener("mouseleave",b))},u=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",k),g.removeEventListener("mouseleave",b))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||u()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let w=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const V=r.slots.default();if(Array.isArray(V)&&V.length===1){const $=V[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=me(l.digits),B=me(l.decimalLength),M=he(l.autoPadding);let L=`${V[0].children}`,I=L.split("").reverse().join("");I=nn(I,B,M,E,l.separator),L=I.split("").reverse().join(""),l.highlightFilter!==void 0&&(w=m(L,g)),w||(g.innerHTML=L,w=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 $=V[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=`${V[0].children}`;w=m(E,g),w||(g.innerHTML=E,w=t.h(l.tag,g))}}}w||(w=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return w;let C=null;if(l.icon){const V={[`${e}__mark-wrap`]:!0};l.type&&(V[`${e}__mark-wrap--${l.type}`]=!0);const $={},E=l.color;E&&($.color=E);const B={class:V,style:$};C=t.h("view",B,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 $={},E=l.color;E&&($.color=E);const B={class:V,style:$};C=t.h("view",B,{default:r.slots.mark})}else{const V={[`${e}__mark`]:!0};l.type&&(V[`${e}__mark--${l.type??"default"}`]=!0);const $={},E=l.color;E&&($["background-color"]=E);const B={class:V,style:$};C=t.h("view",B)}const A={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",A,[C,w])}}}}const{componentName:hh,create:gh,scope:yh}=G("text"),bl=gh(ph(hh,yh,bt,!1));function bh(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],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[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 d=m.find(h=>h[o]===p);if(!d)break;s.push(d[a])}else{let c=n;for(let m=0;c&&m<r.length;m++){let p=r[m],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[a]),c=d[l]}}return s}class kh{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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Sh(){const e=t.getCurrentInstance();return new kh(e.proxy)}const Ch={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 wh(e,n,a=!1){return{props:{...Ch},setup(o,{attrs:l,slots:r}){const s=Sh(),i=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,d])=>{i.value=await s.load(o.sourceType,p,d)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let p=bh(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:Nh,create:Bh,scope:Ah}=G("mapping"),kl=Bh(wh(Nh,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 fr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:dA,create:Vh,scope:uA}=G("domain-provider"),Sl=Vh(Th()),$h={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 Eh(e,n){return{inheritAttrs:!1,props:$h,setup(a,{slots:o}){if(nt&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const s=(h,S)=>{if(p===null){r.set(h,{visible:null,callback:S});return}l.has(h)&&p.unobserve(h),l.set(h,{visible:null,callback:S}),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;ji({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 d=(h,S,y)=>{p=new IntersectionObserver(k=>{for(let b of k){let f=!1;b.intersectionRatio>0&&(f=!0);const u=l.get(b.target);if(u)try{if(a.loadPolicy==="lazy"&&!f&&u.visible!==null)return;u.visible=f,u.callback(f)}catch(g){console.error(g)}}},{root:h,rootMargin:S,threshold:y}),r.forEach((k,b)=>{l.set(b,k),p?.observe(b)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([h,S])=>{if(S||!h||p)return;let y=null;typeof h=="string"?y=document.querySelector(h):y=h,y&&d(y,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:fA,create:Dh,scope:mA}=G("rolling-provider"),Cl=Dh(Eh()),{componentName:Ih,create:xh}=G("cell"),qh=xh({components:{Right:oe.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}}}),vh={key:0,class:"fox-cell__icon"},Mh={key:1,class:"fox-cell__title"},Ph={class:"title"},Lh={class:"fox-cell__title-desc"};function zh(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",vh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Mh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Ph,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Lh,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 wl=te(qh,[["render",zh]]),{componentName:Fh,create:Rh}=G("cell-group"),Oh=Rh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Fh]:!0}))}}}),Kh={key:1,class:"fox-cell-group__title"},Uh={key:3,class:"fox-cell-group__desc"},Hh={class:"fox-cell-group__wrap"};function jh(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",Kh,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",Uh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Hh,[t.renderSlot(e.$slots,"default")])],2)}const Nl=te(Oh,[["render",jh]]),{componentName:Wh,create:Yh}=G("image"),Xh=Yh({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:oe.Image,ImageError:oe.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 S=Wh;return{[S]:!0,[`${S}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const S={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(y=>{y.forEach(k=>{k.isIntersecting&&(r.value=!0,l.value.disconnect())})},S),s.value&&l.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let S={};return e.width&&(S.width=ge(e.width)),e.height&&(S.height=ge(e.height)),e.radius!==void 0&&e.radius!==null&&(S.overflow="hidden",S.borderRadius=ge(e.radius)),S}),m=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,S=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},d=()=>{a.isError=!0,a.loading=!1,n("error")},h=S=>{n("click",S)};return{...t.toRefs(a),imageClick:h,classes:o,styles:m,stylebox:c,error:d,load:p,show:r,imgRef:s}}}),Qh=["src","date-src","alt"],Gh={key:0,class:"fox-img-loading"},Zh={key:1,class:"fox-img-error"};function Jh(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,Qh),e.loading?(t.openBlock(),t.createElementBlock("div",Gh,[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",Zh,[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 Bl=te(Xh,[["render",Jh]]),{create:_h}=G("layout"),Al=_h({}),{componentName:eg,create:tg}=G("col"),ng=tg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=eg,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 og(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 Tl=te(ng,[["render",og]]),{componentName:lg,create:ag}=G("row"),rg=ag({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=lg;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 tn(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=Ae(e),n=Ae(n),[e,n]=oo(Ae(e),Ae(n)),a==1&&(o==1?e=no(e):n=no(n));let l=Fa(e,n);return a?a==2?"-"+Ae(l):e.length<l.length?Ae(l.substring(1)):"-"+Ae(no(l)):Ae(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 Fa(n,r)}function Ae(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function oo(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function Fa(e,n){[e,n]=oo(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var we=(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))(we||{});function Et(e,n=0,a=we.HALF_EVEN){if(a===we.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=Et(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Ra(l[1],r,o,a)?(o?"-":"")+lo(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");s=l[1].substring(0,n);let i=l[1].substring(n);return i&&Ra(i,s,o,a)&&(s=lo(s),s.length>n)?(o?"-":"")+lo(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function Ra(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===we.DOWN||!a&&o===we.FLOOR||a&&o===we.CEILING)return!1;if(o===we.UP||a&&o===we.FLOOR||!a&&o===we.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 we.HALF_DOWN:return!1;case we.HALF_UP:return!0;case we.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function lo(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function ao(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=Dt(e),n=Dt(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=Dt(e.replace(".","")),n=Dt(n.replace(".","")),e.length<n.length){let d=e;e=n,n=d}if(n=="0")return"0";let s=n.length,i=0,c=[],m=s-1,p="";for(let d=0;d<s;d++)c[d]=e.length-1;for(let d=0;d<2*e.length;d++){let h=0;for(let S=n.length-1;S>=m&&S>=0;S--)c[S]>-1&&c[S]<e.length&&(h+=parseInt(e[c[S]--])*parseInt(n[S]));h+=i,i=Math.floor(h/10),p=h%10+p,m--}return p=Dt(Hs(p,r)),a==1&&(p="-"+p),p}function Hs(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 Dt(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 ro(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=Ae(n.replace(".","")),l>=0){let m=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(m==-1)e=Ae(e+new Array(l+1).join("0"));else if(l>m)e=e.replace(".",""),e=Ae(e+new Array(l-m+1).join("0"));else if(l<m){e=e.replace(".","");let p=e.length-m+l;e=Ae(e.substring(0,p)+"."+e.substring(p))}else l==m&&(e=Ae(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=tn(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?"-":"")+Ae(Et(i,a-2))}function so(e,n){return e=e.toString(),n=n.toString(),n=io(n),tn(e,n)}function io(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Oa(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ka(e),Ka(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=so(e,ao(n,Et(ro(e,n),0,we.FLOOR)));return a+o}function Ka(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ua(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=oo(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ce{value;static RoundingModes=we;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=Ae(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+Ae(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=ce.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=ce.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 ce.getPrettyValue(this.value,n,a)}static round(n,a=0,o=we.HALF_EVEN){if(n=ce.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Et(n,a,o)}round(n=0,a=we.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ce(Et(this.value,n,a))}static floor(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.FLOOR)}static ceil(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.CEILING)}static add(n,a){return n=ce.validate(n),a=ce.validate(a),tn(n,a)}add(n){return new ce(tn(this.value,n.getValue()))}static subtract(n,a){return n=ce.validate(n),a=ce.validate(a),so(n,a)}subtract(n){return new ce(so(this.value,n.getValue()))}static multiply(n,a){return n=ce.validate(n),a=ce.validate(a),ao(n,a)}multiply(n){return new ce(ao(this.value,n.getValue()))}static divide(n,a,o){return n=ce.validate(n),a=ce.validate(a),ro(n,a,o)}divide(n,a){return new ce(ro(this.value,n.getValue(),a))}static modulus(n,a){return n=ce.validate(n),a=ce.validate(a),Oa(n,a)}modulus(n){return new ce(Oa(this.value,n.getValue()))}static compareTo(n,a){return n=ce.validate(n),a=ce.validate(a),Ua(n,a)}compareTo(n){return Ua(this.value,n.getValue())}static negate(n){return n=ce.validate(n),io(n)}negate(){return new ce(io(this.value))}}function Ha(e,n){return ce.multiply(`${e}`,`${n}`)}function co(e,n,a=8){return ce.divide(`${e}`,`${n}`,a)}function uo(e,n){return e=`${e}`,n=`${n}`,ce.compareTo(e,n)}function ja(e){return ce.negate(e)}function nn(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 d="",h=i.split("").reverse();for(let S=0;S<h.length;S++)d+=h[S]+((S+1)%o==0&&S+1!=h.length?l:"");c.length==0?p=`${s}${d.split("").reverse().join("")}`:p=`${s}${d.split("").reverse().join("")}.${c}`}else c.length==0?p=`${s}${i}`:p=`${s}${i}.${c}`;return p}function Wa(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const nt=typeof window<"u",Ke=Qe;function Ya(e){return e==null}const on=Array.isArray,js=e=>an(e)==="[object Map]",Ws=e=>an(e)==="[object Set]",Ue=e=>e instanceof Date,ln=e=>typeof e=="function",Xa=e=>typeof e=="string",Ys=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",dt=e=>Ee(e)&&ln(e.then)&&ln(e.catch),Qa=Object.prototype.toString,an=e=>Qa.call(e),fo=e=>an(e)==="[object Object]",Ga=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Xs(e){return e.__esModule||Ga&&e[Symbol.toStringTag]==="Module"}const Qs=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function ot(...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]=ot(l,m,c)}else c!==void 0&&(n[s]=c)}}return n}function mo(e,n,a=!1){if(!a)ot(!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)&&!fo(s))continue;r=mo(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)&&!fo(s))continue;r=mo(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const po=Qs?Promise.resolve():null;function Gs(e,...n){po!==null?n&&n.length>0?po.then(()=>{e(n)}):po.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 me(e){return typeof e=="number"?e:Number(e)}const Zs={"[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 lt(e){let a=Object.prototype.toString.call(e);return e==null?String(e):Zs[a]||"object"}function rn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Za(e){return e&&typeof e=="object"&&"setInterval"in e}function Ja(e){let n=!!e&&"length"in e&&e.length,a=lt(e);return a==="function"||Za(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function _a(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 Js(e,n=[]){let a=n;return e!=null&&(Ja(Object(e))?_a(a,typeof e=="string"?[e]:e):a.push(e)),a}function Me(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=lt(e),o=lt(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(!Me(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(!Me(r,s))return!1}return!0}return!1}function er(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function tr(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 nr(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 or(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 lr(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 ho(e,n=!0,a=!0){n?e=lr(e,".",/\./g):e=e.replace(/\./g,""),a?e=lr(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function _s(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Me(e,a))return!0}):n.indexOf(e)}function ei(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(Me(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ke(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function Se(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function ut(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 ar=(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 go(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const at=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},He=(e,n,a)=>Math.min(Math.max(e,n),a),Ne=Symbol.for("BroadcastKey");class yo{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="*"):er(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 sn(e,n,a,o){const l=new yo(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function ti(e,n,a){const o=a;if(o[Ne])return o[Ne];const l=t.inject(Ne,null),r=new yo(l,a,e);if(n&&typeof n=="object")for(const s in n)r.on(s,n[s]);return o[Ne]=r,t.provide(Ne,r),t.onUnmounted(()=>{r.destroy(),o[Ne]=void 0}),r}function It(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ne]??t.inject(Ne,null):t.inject(Ne,null)}const rt=e=>e.default??e;class ni{error(n,a){const o=a,l=a||t.hasInjectionContext()?It(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()?It(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?It(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()?It(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 xt=new ni;function oi(e){xt=e}function li(e){xt?Object.assign(xt,e):xt=e}function ai(e,n){rt(tt).setValidator(e,n)}function ri(e){rt(tt).deleteValidator(e)}let rr=["blur","clear"];function si(e){rr=e}function sr(){return rr}let ir=["focus","change","setValue"];function ii(e){ir=e}function cr(){return ir}function ci(e){rt(tt).messages(e)}function qt(...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 cn(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 Pe=Symbol("ValidateSchemaKey");class dr{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=cn(qt(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=cn(o);const l=qt(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=xt;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?rt(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?rt(tt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return rt(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=qt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=cn(n):this.rules=cn([n]);const o=qt(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=qt(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=rt(tt),c=new i(l),m=this.proxy??s;return c.validate(s,{context:m}).then(d=>{if(d.pass)this.success();else{let h="error";Array.isArray(d.errors)&&d.errors.length>0&&(h=d.errors[0].message??h,d.errors=[d.errors[0]],d.errors[0].ref=m),this.error(h)}return d}).catch(d=>{const h=d.message??`${d}`;return this.error(h),d})}}return Promise.resolve({pass:!0})}}function dn(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 dr(n,a,e)}const un=Symbol.for("EventEmitterKey");class ur{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 ft(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function fn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function di(e,n){const a=ft((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function ui(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function bo(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 De=Symbol("DomainKey"),mt=Symbol("DataItemsKey");class mn{_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 fi=new mn;function pt(){return fi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[De]??t.inject(De,null):t.inject(De,null)}const ko=Symbol("OriginalDateKey");function So(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject(De,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new mn(i);c.parent=s;const m=S=>{r[ko]||h(S),c?.set("modelValue",S)},p=()=>c?.getForSelf("modelValue")??null,d=()=>r[ko]??null,h=S=>{const y={};ot(!0,y,t.toRaw(S)),r[ko]=y};if(t.isReactive(n)||typeof n=="function"?t.watch(n,S=>{c?.merge(S,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&h(n.modelValue),r[De]=c,t.provide(De,c),l!==null){const S=t.inject(Ne,null),y=sn(r,S,i,o);c.broadcast=y,r[Ne]=y,t.provide(Ne,y),r.broadcast=(f,u,...g)=>Reflect.apply(y.emit,y,[f,u,...g]);const k=t.inject(Pe,null),b=dn(r,k,{componentName:""});c.validateSchema=b,r[Pe]=b,t.provide(Pe,b),r[mt]=new Map,r.validate=(f=!0)=>{const u=[];let g=null;const w={deep:!1};if(f===!0)g={name:"*"};else if(Array.isArray(f)&&f.length>0){const T=f;g={name:C=>C?T.indexOf(C)!==-1:!1}}else if(f!=null&&typeof f=="object"){const T=f;if(Object.assign(w,T),Array.isArray(T.include)&&T.include.length>0){const C=T.include;g={name:A=>A?C.indexOf(A)!==-1:!1}}else if(Array.isArray(T.exclude)&&T.exclude.length>0){const C=T.exclude;g={name:A=>A?C.indexOf(A)===-1:!1}}else g={name:"*"}}if(g){const T=y?.emitToChildren(g,"validate",w);T&&Reflect.apply([].push,u,T)}return u.length==1?u[0]:u.length>1?Promise.all(u).then(T=>{let C=[];return T.forEach(A=>{A.pass===!1&&Array.isArray(A.errors)&&(C=[...C,...A.errors])}),C.length>0?{pass:!1,errors:C}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(f,u=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(f).forEach(T=>{let C=String(T);const A={componentName:"",fieldName:C,pureDataValidate:!0};if(c){const V=pr(c,C,A,y,b);r[mt].set(C,V);const $=f[C];$&&V.validateSchema.setRule($)}});return}if(u){const w=Reflect.ownKeys(f),T={name:C=>w.includes(C)};y?.emitToChildren(T,"setNameValidateRules",f,!1)}},r.clearValidate=(f=!0)=>{let u=null;if(f===!0)u={name:"*"};else if(Array.isArray(f)&&f.length>0){const g=f;u={name:w=>w?g.indexOf(w)!==-1:!1}}else if(f!=null&&typeof f=="object"){const g=f;if(Array.isArray(g.include)&&g.include.length>0){const w=g.include;u={name:T=>T?w.indexOf(T)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const w=g.exclude;u={name:T=>T?w.indexOf(T)===-1:!1}}else u={name:"*"}}u&&y?.emitToChildren(u,"clearValidate",!1)},r.resetFields=f=>{const u=p();if(!u)return;const g={};if(ot(!0,g,d()??{}),Array.isArray(f))f.forEach(w=>{u[w]=g[w]});else if(f&&Array.isArray(f.include))(f.include??[]).forEach(T=>{u[T]=g[T]});else if(f&&Array.isArray(f.exclude)){let w=f.exclude??[];Reflect.ownKeys(g).forEach(T=>{w.includes(T)||(u[T]=g[T])})}else Object.assign(u,g);r.clearValidate(f)},r.setModelValue=(f,u)=>{!u||u===i?m(f):y?.emitToChildren({name:u},"setModelValue",f)},r.getModelValue=()=>p()}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Pe]=void 0,t.provide(Pe,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Ne]=void 0,t.provide(Ne,null)),c?.destroy(),r[De]=void 0,t.provide(De,null),r[mt]&&(r[mt].clear(),r[mt]=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 fr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(De,null);r===null&&(r=pt());const s=e||n.prop||n.name;let i=new mn(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[De]=i,t.provide(De,i),t.onUnmounted(()=>{i?.destroy(),l[De]=void 0,t.provide(De,null),i=null,l=null}),i}function mr(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 Te(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",s=t.inject(Ne,null);let i=sn(l,s,r,a);l[Ne]=i,t.provide(Ne,i),l.broadcast=(y,k,...b)=>i?Reflect.apply(i.emit,i,[y,k,...b]):null;const c=t.inject(Pe,null);e.fieldName=e.fieldName??r;let m=dn(l,c,e);l[Pe]=m,t.provide(Pe,m),mr(l,m,r),l.validate=(y=null)=>{if(!m)return Promise.resolve({pass:!0});const k=[];let b=!1,f=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)f=!0,b=!0;else if(y&&typeof y=="object"){const u=y,g=u.ignoreDisabled??!0,w=u.ignoreReadonly??!0,T=u.ignoreHidden??!0;g===!0&&e.disabled===!0||w===!0&&e.readonly===!0||T===!0&&rn(l.$el)?f=!1:(Array.isArray(u.include)&&u.include.indexOf(r)!==-1||Array.isArray(u.exclude)&&u.exclude.indexOf(r),f=!0),b=u.deep??!1}else typeof y=="boolean"&&(b=y),f=!0;if(f){const u=m?.validate();k.push(u)}if(b){let u=null;const g={deep:!1};if(y===!0)u={name:"*"};else if(Array.isArray(y)&&y.length>0){const w=y;u={name:T=>T?w.indexOf(T)!==-1:!1}}else if(y!=null&&typeof y=="object"){const w=y;if(Object.assign(g,w),Array.isArray(w.include)&&w.include.length>0){const T=w.include;u={name:C=>C?T.indexOf(C)!==-1:!1}}else if(Array.isArray(w.exclude)&&w.exclude.length>0){const T=w.exclude;u={name:C=>C?T.indexOf(C)===-1:!1}}else u={name:"*"}}if(u&&i){const w=i.emitToChildren(u,"validate",g);Reflect.apply([].push,k,w)}}return k.length==1?k[0]:k.length>1?Promise.all(k).then(u=>{let g=[];return u.forEach(w=>{w.pass===!1&&Array.isArray(w.errors)&&(g=[...g,...w.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>m?.setRule(y),l.setNameValidateRules=(y,k=!1)=>{const b=y[r];if(b&&m?.setRule(b),k&&i){const f={name:u=>Reflect.ownKeys(y).includes(u)};i.emitToChildren(f,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&m?.clear();let k=null;if(y===!0)k={name:"*"};else if(Array.isArray(y)&&y.length>0){const b=y;k={name:f=>f?b.indexOf(f)!==-1:!1}}else if(y!=null&&typeof y=="object"){const b=y;if(Array.isArray(b.include)&&b.include.length>0){const f=b.include;k={name:u=>u?f.indexOf(u)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;k={name:u=>u?f.indexOf(u)===-1:!1}}else k={name:"*"}}k&&i&&i.emitToChildren(k,"clearValidate",!1)};let p=new ur(l);l[un]=p;const d=ft((y="validate")=>{m&&(y==="reset"?m.clear():m.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:sr()).forEach(y=>{p&&p.on(y,k=>{d("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:cr()).forEach(y=>{p&&p.on(y,k=>{d("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ne]=void 0,t.provide(Ne,null),i=null,m?.destroy(),l[Pe]=void 0,t.provide(Pe,null),m=null,p?.destroy(),l[un]=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,...k)=>{p&&Reflect.apply(p.emit,p,[y,...k])},onEvent:(y,k)=>{p&&Reflect.apply(p.on,p,[k])},offEvent:(y,k)=>{p&&Reflect.apply(p.off,p,[k])}}}function pr(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=dn({},l,a);r.validate=(p=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const d=[];let h=!1,S=!1;if(Array.isArray(p)&&p.indexOf(s)!==-1)S=!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),S=!0,h=y.deep??!1}else typeof p=="boolean"&&(h=p),S=!0;if(S&&c){const y=c.validate();d.push(y)}if(h){let y=null;const k={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const b=p;y={name:f=>f?b.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const b=p;if(Object.assign(k,b),Array.isArray(b.include)&&b.include.length>0){const f=b.include;y={name:u=>u?f.indexOf(u)!==-1:!1}}else if(Array.isArray(b.exclude)&&b.exclude.length>0){const f=b.exclude;y={name:u=>u?f.indexOf(u)===-1:!1}}else y={name:"*"}}if(y&&m){const b=m.emitToChildren(y,"validate",k);Reflect.apply([].push,d,b)}}return d.length==1?d[0]:d.length>1?Promise.all(d).then(y=>{let k=[];return y.forEach(b=>{b.pass===!1&&Array.isArray(b.errors)&&(k=[...k,...b.errors])}),k.length>0?{pass:!1,errors:k}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const d=p[s];d&&c?.setRule(d)};let m=sn(null,o,s,r);return t.onUnmounted(()=>{c=null,m=null}),{broadcast:m,validateSchema:c}}function ht(){let n=t.getCurrentInstance()?.proxy,a=new ur(n);return n[un]=a,t.onUnmounted(()=>{a?.destroy(),n[un]=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?`${de(e)}px`:"";function de(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(nt){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 Ge="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=de(e.top)),e.left!==null&&e.left!==void 0&&(n.left=de(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=de(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=de(e.right))),n}function Co(e,n,a={},o=!0,l=-1,r=-1,s=0,i=0){if(e.headerHeight=de(a.headerHeight??n.headerHeight??-1),e.headerPadding=ze(a.headerPadding??n.headerPadding),e.footerHeight=de(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=de(c,r):e.height=de(r)-de(s,r)-de(i,r),e.width=de(a.width??n.width??0,l)}}function hr(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=de(l.top),o.safeAreaBottom=de(l.bottom),o.safeAreaLeft=de(l.left),o.safeAreaRight=de(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;Co(o,r,n,!0,s,i,c,m);const p=t.reactive(o),d=e.getForParent(Ge);d&&(o.height=yn(e,d),o.width=bn(e,d),t.watch([()=>yn(e,d),()=>bn(e,d)],([S,y])=>{p.height=S,p.width=y}));const h=!d;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([S,y,k=-1,b=-1,f=0,u=0])=>{Co(p,y,n,h,k,b,f,u)}),e.set(Ge,p),p}function pn(e){return e.get(Ge)}function hn(e,n){if(n=n??e.get(Ge),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function gn(e,n){if(n=n??e.get(Ge),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function yn(e,n){if(n=n??e.get(Ge),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=hn(e,n),o=gn(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function bn(e,n){return n=n??e.get(Ge),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function mi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function pi(e){return!!e.getForParent(Ge)}var kn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(kn||{});function wo(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function $e(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(wo(c,o))return c}const s=e.value;return wo(s,o)?s:null}):t.computed(()=>{const r=e.value;return wo(r,o)?r:l?.get(n)})}function Ie(e){return $e(e,"readonly",0,function(a){return he(a)})}function Ve(e){return $e(e,"disabled",0,function(a){return he(a)})}function ve(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 gr=new Map,Sn=new Map;let No=null;function hi(e){No=e}function yr(e,n,a){if(a){let o=Sn.get(a);o||(o=new Map,Sn.set(a,o)),o.set(e,n)}else gr.set(e,n)}function Ze(e,n,a){!a&&No&&(a=No(e)??void 0);let o=null;if(a){let l=Sn.get(a);l&&(o=l.get(n))}return o||(o=gr.get(n)),o}function gi(e,n){for(let a in e){const o=e[a];yr(a,o,n)}}function yi(e){Sn.delete(e)}function bi(){return{top:0,left:0,bottom:0,right:0}}function ki(e=0,n=0){if(nt){const a=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l={width:a,height:o-de(e,o)-de(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 Si(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Ci{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=Si(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=fn(()=>{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=ot({},bi(),n.safeAreaInset),s=ki(o,l),i=ot({},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){hi(n)}setAPI(n,a,o){yr(n,a,o)}getAPI(n,a,o){return Ze(n,a,o)}batchSetAPI(n,a){gi(n,a)}clearScopeAPI(n){yi(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 wi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Xa(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={};ln(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)}}},br=(e,n)=>e?t.h(e,n):"";function xe(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const pe={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}},be={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}},kr={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}},Sr={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}},Cr=[];for(const e in Sr)Cr.push(e);const Ni=Symbol.for("InnerPageScopeKey"),Bi={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:{...pe,...kr,...Bi},setup(a,{slots:o}){const l=So(a.name,a),r=t.inject(Ni,!1);if(l){const p=hr(l,a);xe({getPageContentHeight:()=>yn(l,p),getPageContentWidth:()=>bn(l,p),getPageHeaderHeight:()=>hn(l,p),getPageFooterHeight:()=>gn(l,p)}),p&&r&&(p.contentHeight="100%")}const s=t.computed(()=>({[e]:!0})),i=t.computed(()=>({})),c=t.getCurrentInstance(),m=(p,d=!1)=>{const h=c?.proxy;h&&typeof h.setNameValidateRules=="function"&&h.setNameValidateRules(p,!0,d)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,d],[h,S])=>{if(p&&h){const y=t.toRaw(h),k=t.toRaw(p),b=k?Reflect.ownKeys(k):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{b.includes(u)||(k[u]=[])}),m(k)}if(d&&S){const y=t.toRaw(S),k=t.toRaw(d),b=k?Reflect.ownKeys(k):[];(y?Reflect.ownKeys(y):[]).forEach(u=>{b.includes(u)||(k[u]=[])}),m(k,!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:Vi,scope:rA}=G("page"),Bo=Vi(Ai(Ti));function Ao(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function Cn(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 $i=Symbol.for("InnerPageScopeKey"),Ei=(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?pn(s):null,c=t.inject($i,!1),m=e,p=t.computed(()=>{const B={[m]:!0,[`${m}--border`]:l.border,[`${m}--fixed`]:l.fixed};return c||(B[`${m}--safe-area-inset-top`]=l.safeAreaInsetTop),B}),d=t.computed(()=>({[`${m}__inner`]:!0,[`${m}__inner--${l.align}`]:!0})),h=l.height!==null&&l.height!==void 0?de(l.height):null,S=t.computed(()=>{const B={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const M=ze(l.padding??i.headerPadding);return Object.assign(B,M),h&&(i.headerHeight=h),i.headerHeight>0&&(B.height=i.headerHeight),B.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,B.safeAreaTop>0&&(B.top=B.safeAreaTop+(M.top??0),B.height&&B.height>0&&(B.height=B.height+B.safeAreaTop)),B}if(h&&(B.height=h),l.padding){const M=ze(l.padding);Object.assign(B,M)}return B}),y=t.ref(null),k=()=>{if(i&&y.value&&!rn(y.value)){if(!o){const B=Ao(y.value);i.headerAllHeight=B.height}return i.headerMounted=!0,!0}return!1};let b=null;t.onMounted(()=>{i&&(bo(k,50,5,50,!0),window.ResizeObserver&&y.value&&(b=new window.ResizeObserver(()=>{k()}),b.observe(y.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,b&&(b.disconnect(),b=null))});const f=t.computed(()=>{const B={};return S.value.height!==null&&S.value.height!==void 0&&(B.height=`${S.value.height}px`),S.value.top!==null&&S.value.top!==void 0&&(B.paddingTop=`${S.value.top}px`),S.value.left!==null&&S.value.left!==void 0&&(B.paddingLeft=`${S.value.left}px`),S.value.right!==null&&S.value.right!==void 0&&(B.paddingRight=`${S.value.right}px`),S.value.bottom!==null&&S.value.bottom!==void 0&&(B.paddingBottom=`${S.value.bottom}px`),B}),u=t.computed(()=>!(S.value.height!==null&&S.value.height!==void 0&&S.value.height<=0));function g(){r.emit("back")}function w(){r.emit("click-title")}function T(){r.emit("click-right")}function C(){r.emit("click-right-text")}const A=()=>{if(!l.leftShow)return null;const B=[];if(r.slots.left)B.push(r.slots.left());else{if(r.slots.leftIcon){const M=t.h("view",{class:"left-icon",onClick:g},[r.slots.leftIcon()]);B.push(M)}else if(l.leftIcon){const M=t.h("view",{class:"left-icon",onClick:g},[t.h(l.leftIcon)]);B.push(M)}if(l.leftText){const M=t.h("view",{class:"left-text",onClick:g},[l.leftText]);B.push(M)}}return B.length===0?null:t.h("view",{class:"fox-header-bar__left"},B)},V=()=>{if(!l.rightShow)return null;const B=[];if(r.slots.right)B.push(r.slots.right());else{if(l.rightText){const M=t.h("view",{class:"right-text",onClick:C},[l.rightText]);B.push(M)}if(r.slots.rightIcon){const M=t.h("view",{class:"right-icon",onClick:T},[r.slots.rightIcon()]);B.push(M)}else if(l.rightIcon){const M=t.h("view",{class:"right-icon",onClick:T},[t.h(l.rightIcon)]);B.push(M)}}return B.length===0?null:t.h("view",{class:"fox-header-bar__right"},B)},$=()=>{if(!l.titleShow)return null;const B=[],M=r.slots.default?r.slots.default():null;if(M)B.push(M);else{if(l.title){const L=t.h("view",{class:"title-text"},[l.title]);B.push(L)}if(r.slots.titleIcon){const L=t.h("view",{class:"title-icon",onClick:w},[r.slots.titleIcon()]);B.push(L)}else if(l.titleIcon){const L=t.h("view",{class:"title-icon",onClick:w},[t.h(l.titleIcon)]);B.push(L)}}return B.length===0?null:t.h("view",{class:"fox-header-bar__title"},B)},E=()=>{const B=[],M=r.slots.bottom?r.slots.bottom():null;return M&&B.push(M),B.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},B)};return()=>{if(!u.value)return null;const B=[];if(r.slots.all)B.push(r.slots.all());else{const L=[],I=A();I&&L.push(I);const D=$();D&&L.push(D);const R=V();if(R&&L.push(R),L.length>0){const W=t.h("view",{class:d.value},L);B.push(W)}const q=E();q&&B.push(q)}if(B.length===0)return null;const M={class:p.value,style:f.value,ref:y};return t.h("view",M,B)}}}),{componentName:Di,create:Ii,scope:xi}=G("header-bar"),To=Ii(Ei(Di,xi,oe.Left,!1)),qi=Symbol.for("InnerPageScopeKey");function vi(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?pn(r):null,i=t.inject(qi,!1),c=e,m=t.computed(()=>{const b={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(b[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),b}),p=o.height!==null&&o.height!==void 0?de(o.height):null,d=t.computed(()=>{const b={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(b,f),p&&(s.footerHeight=p),s.footerHeight>0&&(b.height=s.footerHeight),b.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,b.safeAreaBottom>0&&(b.bottom=b.safeAreaBottom+(f.bottom??0),b.height&&b.height>0&&(b.height=b.height+b.safeAreaBottom)),b}if(p&&(b.height=p),o.padding){const f=ze(o.padding);Object.assign(b,f)}return b}),h=t.ref(null),S=()=>{if(s&&h.value&&!rn(h.value)){if(!a){const b=Ao(h.value);s.footerAllHeight=b.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(bo(S,50,5,50,!0),window.ResizeObserver&&(y=new window.ResizeObserver(()=>{S()}),y.observe(h.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,y&&(y.disconnect(),y=null))});const k=t.computed(()=>{const b={};return d.value.height!==null&&d.value.height!==void 0&&(b.height=ge(d.value.height)),d.value.top!==null&&d.value.top!==void 0&&(b.paddingTop=ge(d.value.top)),d.value.left!==null&&d.value.left!==void 0&&(b.paddingLeft=ge(d.value.left)),d.value.right!==null&&d.value.right!==void 0&&(b.paddingRight=ge(d.value.right)),d.value.bottom!==null&&d.value.bottom!==void 0&&(b.paddingBottom=ge(d.value.bottom)),b});return()=>{const b=l.slots.default?l.slots.default():[],f={ref:h,class:m.value,style:k.value};return t.h("view",f,b)}}}}const{componentName:Mi,create:Pi,scope:Li}=G("footer-bar"),Vo=Pi(vi(Mi,Li,!1));function zi(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?pn(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=hn(o,r),d=gn(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:",d),console.debug("[content]padding:",r.contentPadding),m.height=h;let S=(r&&r.contentPadding&&r.contentPadding.top)??-1;(S>=0||p>0)&&(S=S<0?0:S,m.paddingTop=`${p+S}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||d>0)&&(y=y<0?0:y,m.paddingBottom=`${d+y}px`);const k=(r&&r.contentPadding&&r.contentPadding.left)??-1;k>=0&&(m.paddingLeft=`${k}px`);const b=(r&&r.contentPadding&&r.contentPadding.right)??-1;return b>=0&&(m.paddingRight=`${b}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=ft(()=>{if(r&&i.value){const m=Cn(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:Fi,create:Ri,scope:sA}=G("content"),Oi=Ri(zi(Fi));function Ki(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},$o=te(Oi,[["render",Ki]]),gt="GroupStateKey",wr=Symbol.for("GroupScopeKey");function wn(){return t.inject(wr,!1)}function Nn(e=!0){t.provide(wr,e)}function Ui(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Ya(l)||(e[o]=l)})}function Hi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Ui(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(gt,r),r}function Eo(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(gt);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=de(r),d=de(s);i||(i=m.type??"grid");const h=()=>{const S=n===""||n===-1,y=de(n);let k=me(a);const b=de(o);if(!S){let g=(y-(k-1)*b)/k;for(;d!==-1&&g>d;)k++,g=(y-(k-1)*b)/k;for(;p!==-1&&k>1&&g<p;)k--,g=(y-(k-1)*b)/k}let f=!1;const u=c.layout;u.value.width=n,u.value.column!==k&&(u.value.column=k,f=!0),u.value.gutter!==b&&(u.value.gutter=b,f=!0),u.value.type!==i&&(u.value.type=i,f=!0),f&&t.triggerRef(u)};if(l)h();else{const S=++c.passport;setTimeout(()=>{S===c.passport&&h()},50)}}function Bn(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.layout}function An(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.order}function Nr(e,n=1){if(n==="stretch")return-1;const a=me(n);return a===-1?100:100*a/e}function Tn(e,n,a=1,o=0,l){const r={};let s=0;l?s=de(l):s=Nr(n.column,a),s>0&&(r.width=`${s}%`);const i=Nr(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 Vn(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=me(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=me(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 Br=Symbol("RollingStateKey");function ji(e){t.provide(Br,e)}function Wi(){return t.inject(Br,null)}function Do(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 Yi(e){let n=Do(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=Do(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Xi(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const Qi={...pe,...kr,...Sr};function Gi(e,n,a){return{props:Qi,emits:["update:collapse","header-click"],setup(o,l){const r=So(o.name,o,Cr),s=Hi(r,{type:o.type}),i=wn();Nn(!0);const c=o.rollingDisplay?Wi():null,m=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),d=t.computed(()=>i&&r?Bn(r,!0).value:null),h=t.getCurrentInstance(),S=(U,j=!1)=>{const Q=h?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(U,!0,j)};t.watch([()=>o.rules,()=>o.pureDataRules],([U,j],[Q,O])=>{if(U&&Q){const Z=t.toRaw(Q),ne=t.toRaw(U),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne)}if(j&&O){const Z=t.toRaw(O),ne=t.toRaw(j),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne,!0)}},{deep:!0});const y=e,k=t.computed(()=>{const U={};if(U.height=D.value,o.width)o.width!=="auto"&&(U.width=ge(o.width));else{const j=i?An(r,!0):null;if(d.value&&j){if(d.value.type==="grid"){const Q=Vn(j,d.value,o.span,o.offset);Object.assign(U,Q)}else if(d.value.type==="flow"){const Q=Tn(j,d.value,o.span,o.offset,o.width);Object.assign(U,Q)}}}return U}),b=t.computed(()=>{const U=s.layout.value.type;return U==="grid"||U==="flow"?{[`${y}--${U}`]:!0,[`${y}--${U}-justify-${o.justify}`]:!0,[`${y}--${U}-align-${o.align}`]:!0,[`${y}--gutter`]:!0}:{[`${y}--${U}`]:!0,[`${y}--gutter`]:!0}}),f=t.computed(()=>{if(s.layout.value.type==="grid"){let j="";if(o.columnWidth)j=`repeat(auto-fill, ${o.columnWidth})`;else{const Q=Xi(V.value,s.layout.value.column,s.layout.value.gutter);j=`repeat(${s.layout.value.column}, ${Q})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":j}}}),u=t.toRef(o,"gutter"),g=t.toRef(o,"column"),w=t.computed(()=>i||p.value?!0:he(o.isWrap)),T=[],C=U=>{T.push(U)},A=()=>{let U=T.length;T.splice(0,U)},V=t.ref(-1),$=U=>{const j=Cn(U).width;j>0&&j!==V.value&&(V.value=j)};Eo(r,V.value,g.value,u.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([V,g,u],([U,j,Q])=>{s.order.index=0,Eo(r,U,j,Q,!1,o.minItemWidth,o.maxItemWidth,o.type)});const E=t.computed(()=>R.value?o.expandText??"":o.collapseText??""),B=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),M=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!R.value,"is-collapse":R.value})),L=t.ref(),I=t.ref(),D=t.computed(()=>q.value||ge(o.height)||""),R=t.ref(!1),q=t.ref(""),W=t.ref(!1);let H=-1;const J=(U,j=!0)=>{const Q=L.value;if(Q&&R.value!==U){if(H=H<=0?Yi(Q):H,W.value=!0,j)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",U||(q.value="",W.value=!1)},U){let O=0;o.collapseHeight?O=o.collapseHeight:I.value&&I.value.classList.contains(`${e}__header`)&&(O=I.value.offsetHeight),q.value=`${H}px`,t.nextTick(()=>{q.value=`${O}px`})}else q.value=`${H}px`;else if(U){let O=0;o.collapseHeight?O=o.collapseHeight:I.value&&I.value.classList.contains(`${e}__header`)&&(O=I.value.offsetHeight),q.value=`${O}px`}else W.value=!1,q.value=`${H}px`;R.value=U,l.emit("update:collapse",U)}};t.watch(()=>o.collapse,U=>{J(U)});const ee=U=>{l.emit("header-click",U)},Y=()=>{v()},v=U=>{U=U??!R.value,J(U)};xe({toggleCollapse:v,doLayout:()=>{T[0]&&($(T[0]),Eo(r,V.value,g.value,u.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let x=null,F=!0;const P=U=>{if(o.rules){const j=t.toRaw(o.rules);S(j)}if(o.pureDataRules){const j=t.toRaw(o.pureDataRules);S(j,!0)}if(nt&&(U&&J(he(o.collapse),!1),o.autoLayout&&Array.isArray(T)&&T.length>0)){const j=T[0];$(j),window.ResizeObserver&&(x=new window.ResizeObserver(()=>{$(j)}),x.observe(j))}},K=()=>{x?.disconnect(),x=null},X=!p.value||c?.acquire();X&&(m.value=p.value?!0:null),t.onMounted(()=>{if(X&&(P(F),F=!1),p.value&&c){let U=null,j=c.initialHeight;c.observe(L.value,Q=>{if(Q!==m.value)if(Q)m.value=!0,R.value||(q.value=""),U=setTimeout(()=>{U=null,m.value!==!1&&(P(F),F=!1)},100);else{if(U!==null&&clearTimeout(U),m.value=!1,!R.value)if(F)q.value=c.initialHeight;else{let O=Do(L.value);O<=0?q.value=j:(q.value=`${O}px`,j=q.value)}F||K()}})}}),t.onUnmounted(()=>{x?.disconnect(),c&&c.unobserve(L.value)});const _=(U="right")=>{const j=[];if(E.value){const ne={class:B.value},re=t.h("span",ne,[E.value]);j.push(re)}const Q={class:M.value},O=o.collapseIcon??a,Z=t.h(O,Q);return j.push(Z),j.length>0?t.h("div",{class:{[`${y}__header-collapse`]:!0,[`is-${U}`]:!0},onClick:Y},j):null},le=(U,j,Q,O)=>{const Z={...b.value};return j===0&&(Z[`${y}__first`]=!0),Q>=O-1&&(Z[`${y}__last`]=!0),t.h("div",{ref:C,key:`${j}`,class:Z,style:f.value},U)};return()=>{if(p.value&&m.value!==!0){const Z=o.tag||"div";return t.h(Z,{ref:L,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:k.value},[])}s.order.index=0;const U=[];let j=0;if(l.slots.header){const Z={key:`${j++}`,ref:I,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},ne=t.h("div",Z,[l.slots.header()]);U.push(ne)}else{const Z=[],ne=o.collapsePosition==="left";if(ne&&o.showCollapse){const re=_("left");re&&Z.push(re)}if(o.title||l.slots.title){if(o.showMark){const re={class:{[`${y}__header-mark`]:!0}};o.markColor&&(re.style={background:o.markColor});const se=t.h("div",re);Z.push(se)}if(l.slots.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[l.slots.title()]);Z.push(re)}else if(o.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[o.title]);Z.push(re)}}if(l.slots.toolbar&&Z.push(l.slots.toolbar()),!ne&&o.showCollapse){const re=_("right");re&&Z.push(re)}if(Z.length>0){const re={key:`${j++}`,ref:I,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},se=t.h("div",re,Z);U.push(se)}}A();const Q=l.slots.default?l.slots.default():[],O=s.layout.value.type;if(O==="grid"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else if(O==="flow"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else for(let Z=0;Z<Q.length;Z++){const ne=Q[Z],re=le([ne],j++,Z,Q.length);U.push(re)}if(w.value){const Z=o.tag||"div";return t.h(Z,{ref:L,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:k.value},[U])}else return U}}}}const{componentName:Zi,create:Ji,scope:_i}=G("group"),Io=Ji(Gi(Zi,_i,oe.RectUp));function ec(e){return e===window}const tc=/matrix\((.+)\)/,Ar=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(ec(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=tc.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 nc{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 oc{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 nc,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 Tr=new oc,Vr={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"¥"},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:lc,create:ac}=G("price"),rc=ac({props:{...Vr},setup(e){const n=t.computed(()=>({[lc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ke(e.price)==0?"":nn(e.price,e.decimalLength,!0,me(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}}}),sc=["innerHTML"],ic=["innerHTML"];function cc(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,sc)):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,ic)):t.createCommentVNode("",!0)],2)}const Je=te(rc,[["render",cc]]),{componentName:xo,create:dc}=G("hint-text"),uc=dc({components:{Price:Je},props:{...Vr,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=(B,M,L,I,D,R)=>{const q=document.documentElement.clientWidth||document.body.clientWidth,W=document.documentElement.clientHeight||document.body.clientHeight,H=B.split("-");let J=[];H[0]==="top"?J=["top","bottom","right","left"]:H[0]==="bottom"?J=["bottom","top","right","left"]:H[0]==="left"?J=["left","top","bottom","right"]:H[0]==="right"&&(J=["right","top","bottom","left"]);const ee={top:null,right:null,bottom:null,left:null},Y=[];for(let v=0;v<J.length;v++){const z=J[v];if(Y[0]=z,H[1]&&(Y[1]=H[1]),z==="top"){const x=M.y-R-e.arrowSize-e.offset;if(x>=0){ee.top=x;let F=0;H[1]==="start"?F=M.x:H[1]==="end"?F=M.x+L-D:F=M.x+L/2-D/2;const P=q-F-D;P<0?(F+=P,d.value=-P):d.value=0,ee.left=F<0?0:F;break}}else if(z==="bottom"){const x=M.y+I+e.arrowSize+e.offset;if(x+R<=W){ee.top=x;let F=0;H[1]==="start"?F=M.x:H[1]==="end"?F=M.x+L-D:F=M.x+L/2-D/2;const P=q-F-D;P<0?(F+=P,d.value=-P):d.value=0,ee.left=F<0?0:F;break}}else if(z==="left"){const x=M.x-D-e.arrowSize-e.offset;if(x>=0){ee.left=x;let F=0;H[1]==="start"?F=M.y:H[1]==="end"?F=M.y+I-R:F=M.y+I/2-R/2,ee.top=F<0?0:F;break}}else if(z==="right"){const x=M.x+L+e.arrowSize+e.offset;if(x+D<=q){ee.left=x;let F=0;H[1]==="start"?F=M.y:H[1]==="end"?F=M.y+I-R:F=M.y+I/2-R/2,ee.top=F<0?0:F;break}}}return{bestPlacement:Y.join("-"),bestInsetRect:ee}},p=(B,M,L=10)=>{if(!nt||M===!1||!B)return;o.value=Ar(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const I=c.value.offsetHeight,D=c.value.offsetWidth,{bestPlacement:R,bestInsetRect:q}=m(e.placement,o.value,l.value,r.value,D,I);s.value=R,a.value=q,i.value=!0},d=t.ref(0),h=ft(()=>{p(e.message,e.visible)},10),S=t.ref(e.visible);t.watch(()=>e.visible,B=>{S.value=B});const y=t.computed(()=>S.value&&k.value),k=t.ref(!0),b=ft(B=>{const M=B[0];M&&(k.value=M.isIntersecting)},10),f=new IntersectionObserver(b);t.watch([()=>e.message,()=>e.visible],([B,M])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Tr.watch(e.reference,h),f.observe(e.reference)}),t.onBeforeMount(()=>{Tr.unwatch(e.reference,h),f.unobserve(e.reference),f.disconnect()});const u=t.computed(()=>{const B={[xo]:!0};return s.value.startsWith("top")?B["is-top"]=!0:s.value.startsWith("right")?B["is-right"]=!0:s.value.startsWith("bottom")?B["is-bottom"]=!0:s.value.startsWith("right")&&(B["is-right"]=!0),e.size==="small"?B["is-small"]=!0:e.size==="large"&&(B["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(B[`${e.customClass}`]=!0),B}),g=t.computed(()=>{const B={};a.value.top!==null&&(B.top=`${a.value.top}px`),a.value.right!==null&&(B.right=`${a.value.right}px`),a.value.bottom!==null&&(B.bottom=`${a.value.bottom}px`),a.value.left!==null&&(B.left=`${a.value.left}px`),e.autoFit&&(B["min-width"]=`${l.value}px`);const M=document.documentElement.clientWidth||document.body.clientWidth;return B["max-width"]=`${M}px`,i.value&&(B.opacity="1"),e.transition||(B.transition="none"),e.zIndex&&(B["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(B,e.customStyle),B}),w=t.computed(()=>{const B=[`${xo}__content`];return e.customTextClass&&B.push(e.customTextClass),B}),T=t.computed(()=>{const B={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(B,e.customTextStyle),B}),C=t.computed(()=>({[`${xo}__arrow`]:!0})),A=t.computed(()=>{const B={};return e.showArrow?(B.width=`${e.arrowSize}px`,B.height=`${e.arrowSize}px`,s.value==="top"?(B.left="50%",B.bottom=`-${e.arrowSize}px`,B.transform=" translate(-50%, 0%)"):s.value==="top-start"?(B.left=`${e.arrowOffset+d.value}px`,B.bottom=`-${e.arrowSize}px`):s.value==="top-end"?(B.right=`${e.arrowOffset-d.value}px`,B.bottom=`-${e.arrowSize}px`):s.value==="right"?(B.left=`-${e.arrowSize}px`,B.top="50%",B.transform=" translate(0%, -50%)"):s.value==="right-start"?(B.left=`-${e.arrowSize}px`,B.top=`${e.arrowOffset}px`):s.value==="right-end"?(B.left=`-${e.arrowSize}px`,B.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?(B.left="50%",B.top=`-${e.arrowSize}px`,B.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?(B.left=`${e.arrowOffset+d.value}px`,B.top=`-${e.arrowSize}px`):s.value==="bottom-end"?(B.right=`${e.arrowOffset-d.value}px`,B.top=`-${e.arrowSize}px`):s.value==="left"?(B.right=`-${e.arrowSize}px`,B.top="50%",B.transform=" translate(0%, -50%)"):s.value==="left-start"?(B.right=`-${e.arrowSize}px`,B.top=`${e.arrowOffset}px`):s.value==="left-end"&&(B.right=`-${e.arrowSize}px`,B.bottom=`-${e.arrowOffset}px`),B):{display:"none"}}),V=t.computed(()=>y.value&&e.closeOnClick),$=t.computed(()=>{const B={};return e.zIndex&&(B["z-index"]=`${e.zIndex}`),B});return{show:y,tipRef:c,classes:u,styles:g,textClasses:w,textStyles:T,arrowClasses:C,arrowStyles:A,overlayShow:V,overlayStyle:$,onClickOverlay:()=>{S.value=!1,n.emit("update:visible",!1)}}}}),fc=["innerHTML"];function mc(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,fc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const $r=te(uc,[["render",mc]]);class $n{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 qo={},pc=new $n,yt=new Map,En=e=>{if(e){const n=document.getElementById(e);yt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of yt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}yt.clear()}},hc=e=>{e.unmount=En;const n=document.getElementById(e.id);if(n){const a=yt.get(e.id);a?e={...qo,...a,...e}:e={...qo,...e},e.transition=!1;const o=t.createVNode($r,e);return t.render(o,n),e.id}},gc=e=>{e.unmount=En;let n=e.id??`hinttext_${pc.get()}`;e={...qo,...e},e.id=n,yt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode($r,e);return t.render(o,a),document.body.appendChild(a),n},yc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},bt={show(e,n,a={},o=!0){yc(n);const l=a.id;return l&&yt.has(l)?hc({...a,message:n,reference:e}):(o&&En(),gc({...a,message:n,reference:e}))},hide(e){En(e)},install(e){e.config.globalProperties.$hintText=bt}};function bc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...pe,...be},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Te({componentName:e,validate:!1},s);const i=je(),c=wn();Nn(!1);const m=t.computed(()=>c&&i?Bn(i,!1).value:null),p=e,d=t.ref(null),h=t.computed(()=>{const O={[p]:!0,[`${p}__gutter`]:m.value&&m.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(O[l.errorMarkClass]=!!R.value,O[l.warnMarkClass]=!!I.value,O[l.infoMarkClass]=!!M.value,typeof d.value=="function"){const Z=d.value(s);O[Z]=!0}else if(typeof d.value=="string"){const Z=d.value;O[Z]=!0}return O}),S=t.ref(null),y=t.computed(()=>{const O={};if(l.width)l.width!=="auto"&&(O.width=ge(l.width));else{const Z=c&&i?An(i,!1):null;if(m.value&&Z){if(m.value.type==="grid"){const ne=Vn(Z,m.value,l.span,l.offset);Object.assign(O,ne)}else if(m.value.type==="flow"){const ne=Tn(Z,m.value,l.span,l.offset,l.width);Object.assign(O,ne)}}}if(typeof S.value=="function"){const Z=S.value(s);Z&&Object.assign(O,Z)}else if(S.value&&typeof S.value=="object"){const Z=S.value;Object.assign(O,Z)}return O}),k=t.ref(null),b=t.computed({get:()=>k.value??he(l.isRequired),set:O=>{k.value=O}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",u=$e(t.toRef(l,"labelPosition"),"labelPosition",kn.Near),g=t.computed(()=>u&&u.value==="top"?"top":u&&u.value==="right"?"right":"left"),w=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),T=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),C=$e(t.toRef(l,"labelWidth"),"labelWidth",kn.Near),A=t.computed(()=>C&&C.value?{width:ge(C.value)}:{}),V=t.computed(()=>({"label--string":!0,"label--required":b.value})),$=t.computed(()=>({content:!0,[l.contentClass]:!0})),E=t.computed(()=>({...l.contentStyle})),B=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});xe({setRequired(O){b.value=O},setErrorTip(O){B.errorTip=O},setErrorIcon(O){B.errorIcon=O},setWarnTip(O){B.warnTip=O},setWarnIcon(O){B.warnIcon=O},setInfoTip(O){B.infoTip=O},setInfoIcon(O){B.infoIcon=O},setCustomClassName(O){d.value=O},setCustomStyle(O){S.value=O}});const M=t.computed(()=>l.infoTip||B.infoTip),L=t.computed(()=>l.infoIcon||B.infoIcon),I=t.computed(()=>l.warnTip||B.warnTip),D=t.computed(()=>l.warnIcon||B.warnIcon),R=t.computed(()=>l.errorTip||B.errorTip),q=t.computed(()=>l.errorIcon||B.errorIcon),W=t.computed(()=>R.value?"error":I.value?"warn":M.value?"info":""),H=()=>W.value.length>0,J=t.computed(()=>W.value==="error"?R.value:W.value==="warn"?I.value:W.value==="info"?M.value:""),ee=t.computed(()=>W.value==="error"?q.value:W.value==="warn"?D.value:W.value==="info"?L.value:null),Y=t.computed(()=>{const O={[`${p}__tip`]:!0,[`${p}__tip--${W.value}`]:!0,[`${p}--animate`]:!0};return W.value==="error"&&l.errorClass?O[`${l.errorClass}`]=!0:W.value==="warn"&&l.warnClass?O[`${l.warnClass}`]=!0:W.value==="info"&&l.infoClass&&(O[`${l.infoClass}`]=!0),O}),v=t.computed(()=>{const O={};return u&&u.value==="top"||!f()?O["padding-left"]="0px":C&&C.value&&(O["padding-left"]=ge(C.value)),O}),z=t.ref();let x="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([O,Z,ne,re])=>{z.value&&(O&&!ue(Z)?x?a.show(z.value,Z,{...re,id:x,type:ne},!0):x=a.show(z.value,Z,{...re,type:ne},!0):a.hide(x))});let F=null;const P=()=>{F||!z.value||(F=new IntersectionObserver(O=>{let Z=!1;for(let ne of O)if(ne.intersectionRatio>0){Z=!0,Z&&r.emit("appear",ne);break}Z||r.emit("disappear")}),F.observe(z.value))},K=()=>{!F||!z.value||(F.unobserve(z.value),F=null)};t.watch(()=>he(l.appearListen),O=>{O?P():K()}),t.onMounted(()=>{he(l.appearListen)&&P()}),t.onUnmounted(K);const X=()=>{if(!f())return null;const O=[],Z=r.slots?.label?.()??l.label,ne={class:V.value},re=t.h("div",ne,[Z]);if(O.push(re),r.slots.fixedPreTip){const ye=r.slots.fixedPreTip();O.push(ye)}const se={class:T.value,style:A.value};return t.h("div",se,O)},_=()=>{const O=[];if(r.slots.prepend){const ne=r.slots.prepend();O.push(ne)}if(r.slots.default){const ne=r.slots.default();O.push(ne)}if(r.slots.append){const ne=r.slots.append();O.push(ne)}if(r.slots.fixedTip){const ne={class:[`${p}__fixed-tip`]},re=t.h("div",ne,[r.slots.fixedTip()]);O.push(re)}const Z={ref:z,class:$.value,style:E.value};return t.h("div",Z,O)},le=()=>{const O=ee.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--icon"},[O()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(O)]):null},U=()=>{const O=J.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--text"},[O()]):t.h("div",{class:"fox-item__tip--text"},[O]):null},j=()=>{if(!H())return null;const O=[],Z=le();Z&&O.push(Z);const ne=U();ne&&O.push(ne);const re={class:Y.value,style:v.value};return t.h("div",re,O)},Q=()=>r.slots?.hide?.()??null;return()=>{const O=[],Z=[],ne=X();ne&&Z.push(ne);const re=_();re&&Z.push(re);const se={class:w.value},ye=t.h("div",se,Z);O.push(ye);const Ce=j();Ce&&O.push(Ce);const Xe=Q();Xe&&O.push(Xe);const La={class:h.value,style:y.value,prop:l.prop};return t.h("div",La,O)}}}}const{componentName:kc,create:Sc,scope:Cc}=G("item"),Be=Sc(bc(kc,Cc,bt,!1));function wc(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=wn();Nn(!1);const c=t.computed(()=>{const m={};if(a.width)a.width!=="auto"&&(m.width=ge(a.width));else if(i&&s){const p=Bn(s,!1),d=An(s,!1);if(p.value&&d){if(p.value.type==="grid"){const h=Vn(d,p.value,a.span,a.offset);Object.assign(m,h)}else if(p.value.type==="flow"){const h=Tn(d,p.value,a.span,a.offset,a.width);Object.assign(m,h)}}}return m});return()=>{const m=[];if(o.slots.default){const d=o.slots.default();if(a.divide)for(let h=0;h<d.length;h++){if(h>0){const S=t.h("div",{class:{[`${l}__divide`]:!0}});m.push(S)}m.push(d[h])}else Reflect.apply([].push,m,d)}const p={class:r.value,style:c.value};return t.h("div",p,m)}}}}const{componentName:Nc,create:Bc,scope:iA}=G("row-item"),vo=Bc(wc(Nc));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=wn();Nn(!1);const s=t.computed(()=>r&&l?Bn(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 d=r&&l?An(l,!1):null;if(s.value&&d){if(s.value.type==="grid"){const h=Vn(d,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Tn(d,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:Vc,scope:cA}=G("slot-item"),Mo=Vc(Ac(Tc)),Er={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 $c(e,n,a,o){return{props:{...pe,...be,...Er},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=ie.useFoxI18n(n),p=m(l,["placeholder"]),d=t.ref(!1),h=ve(l,"modelValue",null,c),S=e,y=t.computed(()=>({[S]:!0,"is-disabled":s.value,"is-readonly":i.value})),k=$e(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const D={};return k.value&&(D["text-align"]=k.value),D}),f=D=>{let q=D.target.value;l.type==="digit"&&(q=ho(q,!0)),l.type==="number"&&(q=ho(q,!1)),l.maxLength&&q.length>Number(l.maxLength)&&(q=q.slice(0,Number(l.maxLength))),h.value=q,c("update:modelValue",q,D),c("change",q,D)};let u=ve(l,"hintText"),g=t.ref(!1);const w=D=>{let q=D.target.value;d.value=!0,ue(u.value)||(g.value=!0),c("focus",q,D)},T=D=>{setTimeout(()=>{g.value&&(g.value=!1),d.value=!1},0);let q=D.target.value;l.maxLength&&q.length>Number(l.maxLength)&&(q=q.slice(0,Number(l.maxLength))),c("blur",q,D)},C=t.computed(()=>({[`${S}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),A=t.computed(()=>{const D={};return r.slots.append&&!V.value&&!L.value&&(D.display="none"),D}),V=t.computed(()=>ke(l.unit)>0),$=t.computed(()=>!L.value),E=t.computed(()=>({[`${S}__unit`]:!0,hidden:!$.value})),B=D=>{h.value="",c("update:modelValue","",D),c("change","",D),c("clear","")},M=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),L=t.computed(()=>{let D=ke(h.value)>0;return he(l.clearable)&&D&&d.value}),I=t.computed(()=>({action:!0,hidden:!L.value}));return()=>{const D={class:y.value,style:b.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:f,onFocus:w,onBlur:T},R=[],q=t.h("input",D);R.push(q);const W=[];if(M.value){const x={class:["action-icon"]},F=t.h(o,x),P={class:I.value,onClick:B},K=t.h("view",P,{default:()=>[F]});W.push(K)}if(V.value){const x=t.h("view",{class:E.value},[l.unit]);W.push(x)}const H={class:C.value,style:A.value},J=t.h("view",H,{default:()=>W});R.push(J);const ee={default:()=>R};ee.label=r.slots.default,ee.prepend=r.slots.prepend,ee.append=r.slots.append,ee.fixedPreTip=r.slots.fixedPreTip,ee.fixedTip=r.slots.fixedTip;const v={...ut(l,Er),hintText:u.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,v,ee)}}}}const{componentName:Ec,create:Dc,scope:Ic}=G("input-item"),Po=Dc($c(Ec,Ic,Be,oe.CircleClose));function Dr(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 Ir(e,n,a=20){if(typeof n=="string"&&(n=me(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=Ha(`${e}`,`${n}`);return Dr(o)}else{let o=co(`${e}`,ja(`${n}`),20);return Dr(o)}}function xc(e,n=-1,a=!1,o=3,l=","){return nn(e,n,a,o,l)}function xr(e,n,a,o,l=!0){if(e==="")return"";if(e=Wa(e),n=me(n),n==1)return e;if(o)e=Ir(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(me(a)+2,"0"):e=co(e,1,me(a)));else{let r=-1*n;e=Ir(e,r)}return e}function qr(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=uo(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=uo(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const vr={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 qc(e,n,a,o){return{props:{...pe,...be,...vr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=t.ref(!1),p=ve(l,"modelValue",null,c),d=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([H,J,ee])=>{if(ue(H)){d.value="";return}const Y=xr(H,J,ee,!1);d.value!==Y&&(d.value=Y)},{immediate:!0});const h=t.computed(()=>{let H="";return m.value&&(H=d.value),H}),{t:S}=ie.useFoxI18n(n),y=t.computed(()=>{let H=l.placeholder??"";return!m.value&&!ue(d.value)?H=xc(d.value,l.decimalLength,l.autoPadding,l.digits,l.separator):H=ue(H)?S(["placeholder"]):H,H}),k=e,b=t.computed(()=>({[k]:!0,[`${k}__placeholder`]:d.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),f=$e(t.computed(()=>l.textAlign),"textAlign"),u=t.computed(()=>{const H={};return f.value&&(H["text-align"]=f.value),H}),g=t.ref(""),w=t.computed(()=>{let H=g.value;return ue(H)&&(H=l.errorTip??""),H}),T=t.ref(""),C=t.ref(!1),A=H=>{let ee=H.target.value;if(ue(ee)){d.value="",p.value="",c("update:modelValue","",H),c("change","",H),he(l.showTip)&&C.value&&(C.value=!1);return}if(ee.length>=2){let Y=ee;if(Y.charAt(0)=="-"&&(Y=Y.substring(1)),Y.length>=2&&Y.charAt(0)=="0"&&Y.charAt(1)!="."){t.triggerRef(d);return}}if(ee!="-"){if(!tr(ee)){t.triggerRef(d);return}if(l.integerLength!=-1&&nr(ee)>Number(l.integerLength)){t.triggerRef(d);return}if(l.decimalLength&&l.decimalLength!=-1&&or(ee)>Number(l.decimalLength)){t.triggerRef(d);return}let Y=qr(ee,l);if(Y.maxValid===!1){g.value=Y.message,t.triggerRef(d);return}}else if(l.min!=null&&me(l.min)>=0){t.triggerRef(d);return}T.value=ee,he(l.showTip)&&(C.value=ee.length>0),d.value=ee,p.value=xr(ee,l.rates,l.precision,!0),c("update:modelValue",p.value,H),c("change",p.value,H)},V=H=>{if(m.value=!0,he(l.showTip)){let J=d.value;ue(J)&&(J=l.hintText),ue(J)||(T.value=J,C.value=!0)}g.value="",c("focus",p.value,H)},$=H=>{if(setTimeout(()=>{m.value=!1,he(l.showTip)&&C.value===!0&&(C.value=!1)},0),!ue(d.value)){let J=qr(d.value,l);if(J.minValid===!1||J.maxValid===!1){g.value=J.message;return}}c("update:modelValue",p.value,H),c("blur",p.value,H)},E=t.computed(()=>({[`${k}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),B=t.computed(()=>{const H={};return r.slots.append&&!M.value&&!q.value&&(H.display="none"),H}),M=t.computed(()=>ke(l.unit)>0),L=t.computed(()=>!q.value),I=t.computed(()=>({[`${k}__unit`]:!0,hidden:!L.value})),D=H=>{p.value="",c("update:modelValue","",H),c("change","",H),c("clear","")},R=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),q=t.computed(()=>{let H=ke(p.value)>0;return he(l.clearable)&&H&&m.value}),W=t.computed(()=>({action:!0,hidden:!q.value}));return()=>{let H={class:b.value,style:u.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:A,onFocus:V,onBlur:$},J=[],ee=t.h("input",H);J.push(ee);let Y=[];if(R.value){const X={class:["action-icon"]},_=t.h(o,X),le={class:W.value,onClick:D},U=t.h("view",le,{default:()=>[_]});Y.push(U)}if(M.value){const X=t.h("view",{class:I.value},[l.unit]);Y.push(X)}const v={class:E.value,style:B.value},z=t.h("view",v,{default:()=>Y});J.push(z);const x={default:()=>J};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 P={...ut(l,vr),errorTip:w.value,hintText:T.value,hintVisible:C.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,P,x)}}}}const{componentName:vc,create:Mc,scope:Pc}=G("money-item"),Lo=Mc(qc(vc,Pc,Be,oe.CircleClose)),zo={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:Lc,create:zc,scope:Fc}=G("textarea"),Rc=zc({props:{...zo},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=ie.useFoxI18n(Fc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Lc;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 S=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:y,minHeight:k}=e.autosize;y!==void 0&&(S=Math.min(S,y)),k!==void 0&&(S=Math.max(S,k))}S&&(h.style.height=S+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,S)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),n("update:modelValue",h,S),n("change",h,S)};return{...o,textareaRef:l,classes:r,styles:s,change:h=>{const S=h.target;c(S.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})}}}}),Oc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Kc={key:0,class:"fox-textarea__limit"};function Uc(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,Oc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Kc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const Dn=te(Rc,[["render",Uc]]);function Hc(e,n,a,o){return{props:{...pe,...be,...zo},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),m=ve(l,"modelValue",null,c),p=k=>{m.value=k,c("update:modelValue",k,{}),c("change",k,{})};let d=ve(l,"hintText"),h=t.ref(!1);const S=k=>{ue(d.value)||(h.value=!0),c("focus",m.value,k)},y=k=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",m.value,k)};return()=>{const b={...Se(l,zo),disabled:s.value,readonly:i.value,value:m.value,"onUpdate:modelValue":p,onFocus:S,onBlur:y},f=[],u=t.h(o,b);f.push(u);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 w=Se(l,be,pe);return t.h(a,{...w,prop:`${l.prop}_item`},g)}}}}const{componentName:jc,create:Wc,scope:Yc}=G("textarea-item"),Fo=Wc(Hc(jc,Yc,Be,Dn));function Xc(e){return e===window}const qe=e=>{const n=t.unref(e);if(Xc(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 Qc=2e3;const Mr=()=>Qc++,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:{}}},Gc=(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=Mr());const r=t.computed(()=>{const k=e,b=[k,`${k}--${a.position}`];return a.round&&b.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&b.push(`${k}--${a.position}--safebottom`),typeof a.popClass=="string"?b.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{b.push(f)}),b}),s=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),i=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Mr(),a.destroyOnClose&&(l.showSlot=!0),o("open")},m=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=k=>{o("click-pop",k)},d=k=>{k.stopPropagation(),o("click-close-icon",k),o("update:visible",!1)},h=k=>{o("click-overlay",k),a.closeOnClickOverlay&&o("update:visible",!1)},S=k=>{o("opend",k)},y=k=>{o("closed",k)};return t.watch(()=>a.visible,k=>{a.visible?c():m()}),t.watch(()=>a.closeable,k=>{l.closed=k}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:d,onClickOverlay:h,onOpened:S,onClosed:y}}});let vt=0;const Pr="fox-overflow-hidden",Lr=()=>nt?document.body:{classList:[]},Zc=e=>[()=>{if(e())try{!vt&&Lr().classList.add(Pr),vt++}catch{}},()=>{if(e()&&vt)try{vt--,!vt&&Lr().classList.remove(Pr)}catch{}}],Jc={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:_c,create:ed}=G("overlay"),td=ed({props:{...Jc},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=Zc(()=>e.lockScroll),l=t.computed(()=>({[_c]:!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 nd(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 st=te(td,[["render",nd]]),{componentName:od,create:ld}=G("popup"),ad=ld(Gc(od,{FoxOverLay:st,Close:oe.Close}));function rd(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 fe=te(ad,[["render",rd]]),zr=10;function Fr(e,n){return e>n&&e>zr?"horizontal":n>e&&n>zr?"vertical":""}function Ro(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function Oo(){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=Fr(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(""),d=()=>p.value==="vertical",h=()=>p.value==="horizontal",S=()=>{s.value=0,i.value=0,c.value=0,m.value=0,p.value="",a.value=0};return{move:b=>{if(b.touches){const g=b.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const u=b;s.value=u.clientX-e.value,i.value=u.clientY-n.value,l.value=u.clientX,r.value=u.clientY}c.value=Math.abs(s.value),m.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=Fr(c.value,m.value))},start:b=>{if(S(),b.touches){const g=b.touches[0];e.value=g.clientX,n.value=g.clientY}else{const u=b;e.value=u.clientX,n.value=u.clientY}a.value=Date.now()},reset:S,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:m,direction:p,isVertical:d,isHorizontal:h}}const Rr={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}},Ko={...Fe,...Rr,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 Or=36;function sd(){return Or}function id(e){Or=e}function Re(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Uo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function cd(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function it(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Kr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let dd=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function ud(){const e=t.getCurrentInstance();return new dd(e.proxy)}function Ur(e,n,a){const o=Re(e,n),l=Re(e,a);if(o!==l)return!1;const r=it(e,n),s=it(e,a);return r===s}function fd(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 Re(e,p)===i;if(r==="value"){let d=it(e,p);return d==null&&(d=Re(e,p)),d===i}else if(r==="item")return Ur(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(d=>{if(r==="text")return Re(e,d)===c;if(r==="value"){let h=it(e,d);return h==null&&(h=Re(e,d)),h===c}else if(r==="item")return Ur(e,d,c)});if(m==-1)break;l.push(m);const p=Uo(e,s[m]);if(!Array.isArray(p))break;s=p}}return l}function Hr(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=Re(e,m);if(l.texts.push(p),l.items.push(m),r==="text")l.values.push(p);else if(r==="value"){let d=it(e,m);d==null&&(d=p),l.values.push(d)}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 d=Re(e,m);if(l.texts.push(d),l.items.push(p),r==="text")l.values.push(d);else if(r==="value"){let h=it(e,m);h==null&&(h=d),l.values.push(h)}else l.values.push(p);if(!Array.isArray(m.children))break;s=m.children}}return l}function jr(e){return{text:e,value:e}}const md=15,pd=300,hd=200,{create:gd}=G("picker-column");function yd(e){e.stopPropagation()}function bd(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&yd(e)}const kd=gd({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},...Rr},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${me(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=A=>A>=d.currIndex+8||A<=d.currIndex-8,i=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${d.deg})`,top:`${r.value}px`})),c=A=>`transform: rotate3d(1, 0, 0, ${-d.rotation*A}deg) translate3d(0px, 0px, 104px)`,m=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${d.scrollDistance+r.value}px, 0)`})),p=t.ref(null),d=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=A=>Re(e,A),S=A=>it(e,A),y=_e(),k=()=>{d.transitionEndTrigger&&(d.transitionEndTrigger(),d.transitionEndTrigger=null)},b=(A,V=!1,$=!1)=>{if(d.currIndex=A,V){const E=()=>{d.moving=!1,n("update:modelValue",A),n("change",A)};$?d.transitionEndTrigger=E:E()}},f=(A,V,$)=>{let E=A+d.startDistance;if(V==="end"){const B=-(e.source.length-1)*e.itemHeight;E<B&&(E=B),E>0&&(E=0);let M=Math.abs(Math.round(-E/e.itemHeight));const L=-M*e.itemHeight,I=`${(M+1)*d.rotation}deg`,D=$?$>0:!1;b(M,!0,D),u(L,V,$,I)}else{let B=(-E/e.itemHeight+1)*d.rotation;const M=(e.source.length+1)*d.rotation,L=0;if(B=Math.min(Math.max(B,L),M),e.threeDimensional&&(B<L||B>M))return;u(E,null,void 0,`${B}deg`)}},u=(A=0,V,$=hd,E)=>{V==="end"?d.scrollTime=$:d.scrollTime=0,d.deg=E,d.scrollDistance=A},g=(A,V)=>(A=Math.abs(A/V)/.003*(A<0?-1:1),A),w=A=>{e.readonly||(d.startDistance=d.scrollDistance,y.start(A),d.transitionEndTrigger=null)},T=A=>{e.readonly||(d.moving=!0,y.move(A),y.isVertical()&&(d.moving=!0,bd(A,!0)),f(y.deltaY.value,"",0))},C=()=>{if(e.readonly)return;const A=y.deltaY.value,V=y.duration.value;if(V<pd&&Math.abs(A)>md){const E=g(A,V);f(E,"end",e.swipeDuration)}else f(A,"end",0)};return t.watch(()=>e.modelValue,A=>{const V=d.currIndex-A;if(V!==0){d.currIndex=A,d.startDistance=d.scrollDistance;const $=V*e.itemHeight;f($,"",0)}}),t.watch(()=>e.source,A=>{if(d.currIndex>=A.length){const E=(A.length-1-d.currIndex)*e.itemHeight;d.startDistance=d.scrollDistance,f(E,"end",0)}}),t.watch(()=>e.visible,A=>{A===!1&&k()}),t.onMounted(()=>{const A=-e.modelValue*e.itemHeight;f(A)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:S,...t.toRefs(d),roller:p,getItemText:Re,onTouchStart:w,onTouchMove:T,onTouchEnd:C,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:m,stopMomentum:k}}}),Sd={key:1,class:"fox-picker__item-tile"};function Cd(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",Sd,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const wd=te(kd,[["render",Cd]]),{create:Nd,componentName:Bd,scope:Ad}=G("picker"),Td=Nd({components:{Column:wd,Popup:fe},props:{...Ko},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=ie.useFoxI18n(Ad),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(sd());t.watch(()=>e.visible,B=>{B&&s.value<=0&&setTimeout(()=>{if(r.value){const M=qe(r.value);s.value=M.height,id(s.value)}},50)});const i=t.computed(()=>({[Bd]:!0})),c=ud(),m=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([B,M])=>{if(B){let L=await c.load("picker",B,M);if(L.length>0){let I=L[0];if(Array.isArray(I)){if(typeof I[0]=="string"){let D=L,R=[];D.forEach(q=>{let W=q.map(H=>jr(H));R.push(W)}),p.value=R}else p.value=L;m.value="multipleColumn"}else if(typeof I=="string"){let D=L,R=[],q=D.map(W=>jr(W));R.push(q),p.value=R,m.value="singleColumn"}else{const D=Uo(e,I);Array.isArray(D)?(m.value="cascade",p.value=[L]):(m.value="singleColumn",p.value=[L])}}else p.value=[]}},{immediate:!0});const d=t.ref([]),h=t.ref(e.modelValue),S=t.ref([]),y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([B,M])=>{let L=fd(e,B,M,m.value);if(!Me(L,y.value)){y.value=L;let I=Hr(e,L,M,m.value);I&&(d.value=I.texts,n("update:text",d.value))}});const k=t.ref(e.visible);t.watch(()=>e.visible,B=>{k.value=B});const b=B=>{let M=Kr(e,B);return Ee(M)?M.defaultIndex??0:0},f=B=>{if(e.readonly===!0)return!0;let M=Kr(e,B);return Ee(M)?M.readonly??!1:!1},u=(B,M)=>{let L=y.value;L[B]=M;for(let D=0;D<B;D++)L[D]==null&&(L[D]=b(D));if(m.value==="cascade")for(let D=B+1;D<w.value.length;D++){let R=b(D);D<L.length?L[D]=R:L.push(R)}else for(let D=L.length;D<w.value.length;D++){let R=b(D);L.push(R)}y.value=L;let I=Hr(e,L,p.value,m.value);I&&(d.value=I.texts,h.value=I.values,S.value=I.items)},g=B=>B<y.value.length?y.value[B]:b(B),w=t.computed(()=>{if(p.value.length==0)return[];if(m.value=="singleColumn"||m.value=="multipleColumn")return p.value;let B=[],M=0,L=p.value[0],I=0;for(;;){let D=L.map(W=>{let H=Object.assign({},W);return cd(e,H,null),H});B.push(D),M>=y.value.length?I=0:I=y.value[M],(I<0||I>=L.length)&&(I=0);let R=L[I];const q=Uo(e,R);if(!Array.isArray(q))break;L=q,M++}return B}),T=t.computed(()=>me(+e.visibleItemCount-1)/2*s.value),C=(B=!1)=>{if(e.readonly===!0){B&&n("update:visible",!1);return}let M=p.value.length-1;for(;M>=0&&!(y.value[M]===null||y.value[M]===void 0);M--);if(M>=0&&u(M,0),m.value==="singleColumn"){let L=h.value.length>0?h.value[0]:"",I=S.value.length>0?S.value[0]:null;n("update:modelValue",L),n("update:text",d.value),n("change",L,I),B&&(n("confirm",L),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",d.value),n("change",h.value,S.value),B&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:w,dataType:m,show:k,itemHeight:s,top:T,isReadonly:f,getIndex:g,change:(B,M)=>{if(u(B,M),e.isAutoBackFill){const L=!k.value;C(L)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{C(!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)}}}}),Vd={class:"fox-picker__bar"},$d={class:"fox-picker__title"},Ed={class:"fox-picker__bar__action"},Dd={class:"fox-picker__column"};function Id(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",Vd,[t.createElementVNode("view",$d,t.toDisplayString(e.title),1),t.createElementVNode("view",Ed,[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",Dd,[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 kt=te(Td,[["render",Id]]);function xd(e,n,a,o,l,r,s=!0){return{props:{...pe,...be,...Ko,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=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=ve(i,"modelValue",null,d),b=t.ref([]),f=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),u="fox-input-item",g=t.computed(()=>({[u]:!0,"is-disabled":m.value,"is-readonly":p.value})),w=$e(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const z={};return w.value&&(z["text-align"]=w.value),z}),C=t.ref(!1),A=()=>{C.value=!0},V=z=>{C.value=z},$=z=>{k.value=z,d("update:modelValue",z)},E=(z,x)=>{d("change",z,x)},B=z=>{let F=z.target.value;y.value=!0,d("focus",F,z)},M=z=>{setTimeout(()=>{y.value=!1},0);let F=z.target.value;i.maxLength&&F.length>Number(i.maxLength)&&(F=F.slice(0,Number(i.maxLength))),d("blur",F,z)},L=z=>{b.value=z,Array.isArray(z)&&z.length===0?d("update:text",z[0]):d("update:text",z)},I=t.computed(()=>({[`${u}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),D=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),q=t.computed(()=>({hidden:!R.value})),W=z=>{k.value="",d("update:modelValue","",z),d("change","",z),d("clear","")},H=t.computed(()=>i.clearable&&!m.value&&!p.value),J=t.computed(()=>ke(k.value)>0&&y.value),ee=z=>{J.value?W(z):A()},Y=t.computed(()=>J.value&&H.value?o:l),v=t.computed(()=>({action:!0}));return()=>{const z={class:g.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:A,onFocus:B,onBlur:M};s&&(z.disabled=!0);const x=[],F=t.h("input",z);x.push(F);const P=[],K={class:["action-icon"]},X=t.h(Y.value,K),_={class:v.value,onClick:ee},le=t.h("view",_,{default:()=>[X]});if(P.push(le),D.value){const se=t.h("view",{class:q.value},[i.unit]);P.push(se)}const U={class:I.value},j=t.h("view",U,{default:()=>P});x.push(j);const Q={default:()=>x};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;const O=Se(i,Ko);O.disabled=!1,O.readonly=m.value||p.value,O.visible=C.value,O["onUpdate:visible"]=V,O.modelValue=k.value,O["onUpdate:modelValue"]=$,O.text=b.value,O["onUpdate:text"]=L,O.onChange=E;const Z=t.h(r,O);Q.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,ne,Q)}}}}const{componentName:qd,create:vd,scope:Md}=G("picker-item"),Ho=vd(xd(qd,Md,Be,oe.CircleClose,oe.ArrowRight,kt,!1)),In=(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,d={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:m,_parent:n};return d.children&&d.children.length&&(d.children=In(d.children,d,a)),d}),Wr=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&Wr(o.children,n)},Pd={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Ld=(e,n)=>{const a={...Pd,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(m=>{m={...m};const{[l]:p,[r]:d}=m,h=c[d]=c[d]||[];!i.length&&d===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,d)=>p[s]-d[s])}),c=null,i},zd={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}},Yr=(e,n)=>n[e.textKey],Mt=(e,n)=>n[e.valueKey],Fd=(e,n)=>n[e.visibleKey],Xr=(e,n)=>n[e.disabledKey],Rd=(e,n)=>{const a=n[e.doitKey];return he(a)},Od=(e,n)=>{const a=n[e.numKey];return a==null?null:me(n[a])},Qr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Kd(e,n,a,o=!1){return{props:{...zd},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:s}){const i=t.computed(()=>{const Y={};return Y[`${e}`]=!0,Y}),c=t.computed(()=>{const Y={};return Y[`${e}__titles`]=!0,Y[`${l.direction}`]=!0,l.align==="left"&&(Y.left=!0),l.scroll===!0&&(Y.scrollable=!0),l.shape&&(Y[`${l.shape}`]=!0),Y}),m=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const Y=de(l.gutter);return Y<=0?0:Y}),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,Y=>{d.value!==Y&&(d.value=Y,q(!1))});const h=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),S=t.computed(()=>{const Y={};return k.value||(Y.display="none"),Y}),y=t.ref(),k=t.ref(!1),b=()=>{const Y=!k.value;f(Y)},f=Y=>{const v=Y;v?(k.value=v,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",()=>{k.value=!1},{once:!0}):setTimeout(()=>{k.value=!1},0))},u=t.ref(),g=t.ref([]),w=(Y,v)=>{g.value[v]=Y},T=Y=>v=>{w(v,Y)},C=(Y,v)=>{const z=u.value,x=g.value;if(!z||!x||!x[Y])return;const F=x[Y];let P=0;l.direction==="vertical"?P=F.offsetTop-(z.offsetHeight-F.offsetHeight)/2:P=F.offsetLeft-(z.offsetWidth-F.offsetWidth)/2,A(z,P,v?0:.3,l.direction)},A=(Y,v,z,x)=>{let F=0;const P=x==="horizontal"?Y.scrollLeft:Y.scrollTop,K=z===0?1:Math.round(z*1e3/16);function X(){x==="horizontal"?Y.scrollLeft+=(v-P)/K:Y.scrollTop+=(v-P)/K,++F<K&&Ke(X)}X()},V=(Y,v)=>{const z=Mt(l,Y),x={};return x[`${e}__titles-item`]=!0,x.disabled=Xr(l,Y),x.active=z===d.value,l.shape&&(x[`${l.shape}`]=!0),l.ellipsis&&(x.ellipsis=!0),v&&(v.class&&(x[`${v.class}`]=!0),v.disabled===!0&&(x.disabled=v.disabled)),x},$=(Y,v)=>{const z={};if(p.value>0){const x=Math.abs(p.value/2);l.direction==="vertical"?(z["margin-top"]=`${x}px`,z["margin-bottom"]=`${x}px`):(z["margin-left"]=`${x}px`,z["margin-right"]=`${x}px`)}return v&&v.style&&Object.assign(z,v.style),z},E=(Y,v)=>`${Mt(l,Y)??v}`,B=(Y,v)=>{const z=Mt(l,Y),x={};x[`${e}__popup-item`]=!0,x.disabled=Xr(l,Y),x.active=z===d.value,l.shape&&(x[`${l.shape}`]=!0);const F=Qr(l,Y,v);return F&&F.disabled===!0&&(x.disabled=F.disabled),x},M=t.computed(()=>(l.data??[]).filter(v=>Fd(l,v)!==!1)),L=(Y,v)=>{const z=Mt(l,Y);if(s("click",Y,v),d.value==z)return;const x=()=>{d.value=z,l.scroll&&C(v,!1),s("update:modelValue",z),s("change",Y,v)};if(typeof l.beforeChange=="function"){const F=l.beforeChange(Y,v);dt(F)?F.then(P=>{P!==!1&&x()}).catch(()=>{x()}):F!==!1&&x()}else x()},I=(Y,v)=>function(){L(Y,v)},D=(Y,v)=>{L(Y,v),f(!1)},R=(Y,v)=>function(){D(Y,v)},q=Y=>{if(!Array.isArray(l.data)||!l.scroll)return;const v=l.data.findIndex(z=>Mt(l,z)===d.value);v!==-1&&C(v,Y)};t.watch(()=>l.data,()=>{setTimeout(q,0)}),t.onMounted(()=>{q(!0)});const W=(Y,v)=>{if(r.item)return r.item({item:Y,index:v});const z=Qr(l,Y,v),x=[];if(r.text){const X=r.text({item:Y,index:v});x.push(X)}else{const X=[];if(z?.doit===!0||Rd(l,Y)){const j={class:[`${e}__titles-item-tip`,"doit"]},Q=t.h("view",j);X.push(Q)}const _=z?.num??Od(l,Y);if(_){let j="";const Q=me(_);Q>=100?j="99+":j=`${Q}`;const O={class:[`${e}__titles-item-tip`,"num"]},Z=t.h("view",O,[j]);X.push(Z)}const le={class:`${e}__titles-item-text`};X.push(Yr(l,Y));const U=t.h("view",le,X);x.push(U)}const F={class:`${e}__titles-item-line`},P=t.h("view",F);x.push(P);const K={ref:T(v),class:V(Y,z),style:$(Y,z),key:E(Y,v),onClick:I(Y,v)};return t.h("view",K,x)},H=()=>{const Y=r.default?r.default():[];if(Y.length===0)for(let z=0;z<M.value.length;z++){const x=M.value[z],F=W(x,z);Y.push(F)}const v={ref:u,class:c.value,style:m.value};return t.h("view",v,Y)},J=()=>{let Y=null;r.navigation?Y=r.navigation():Y=t.h(a);const v={class:`${e}__navigation`,onClick:b};return t.h("view",v,[Y])},ee=()=>{const Y=[];for(let z=0;z<M.value.length;z++){const x=M.value[z];let F=null;r.popupItem?F=r.popupItem({item:x,index:z}):F=Yr(l,x);const P={class:B(x,z),key:E(x,z),onClick:R(x,z)},K=t.h("view",P,[F]);Y.push(K)}const v={class:h.value,style:S.value};return t.h("view",v,Y)};return()=>{const Y=[],v=H();if(Y.push(v),l.showQuickNavigation){const x=J();Y.push(x);const F=ee();Y.push(F)}const z={class:i.value};return t.h("view",z,Y)}}}}const{create:Ud,componentName:Hd,scope:jd}=G("tabs-bar"),xn=Ud(Kd(Hd,jd,oe.MoreH,!1)),Gr=Symbol("TabsStatesKey"),Wd={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Yd(e,n,a=!1){return{props:{...Wd},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:k=>{const b={name:k};i.current.value===k&&(b.loaded=!0),s.value.push(b),t.triggerRef(s)},remove:k=>{const b=s.value.findIndex(f=>f.name===k);b!==-1&&s.value.splice(b,1)},isLoaded:k=>{if(!o.lazy)return!0;const b=s.value.findIndex(f=>f.name===k);return b!==-1?i.current.value?s.value[b].loaded??!1:b===0:!1}};t.provide(Gr,i);const c=k=>{const b=s.value.findIndex(f=>f.name===k);b!==-1&&(s.value[b].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([k,b])=>{i.current.value!==k&&(i.current.value=k??"",c(k??"")),i.direction.value!==b&&(i.direction.value=b)});const m=t.ref(null),p=t.ref(null),d=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const S=t.computed(()=>{const k={},b=s.value.length;if(b<=0)return k;const f=s.value.findIndex(u=>u.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(k.height=`${b*i.tabHeight.value}px`,f!==-1&&(k.transform=`translate(0, -${f*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(k.width=`${b*i.tabWidth.value}px`,f!==-1&&(k.transform=`translate(-${f*i.tabWidth.value}px, 0)`)),h&&(h=!1,k.transition="transform 0s ease"),k});let y=null;return t.onMounted(()=>{if(!m.value)return;const k=()=>{const b=Cn(m.value);i.tabWidth.value=b.width,i.tabHeight.value=b.height};window.ResizeObserver&&(y=new window.ResizeObserver(k),y.observe(m.value)),k()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const k={class:`${e}__panes`,style:S.value,ref:p},b=t.h("view",k,[r?.default?.()]),f={class:d.value,ref:m};return t.h("view",f,[b])}}}}const{create:Xd,componentName:Qd,scope:Gd}=G("tabs-container"),qn=Xd(Yd(Qd,Gd,!1)),Zd={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function Jd(e,n,a){return{props:{...Zd},setup(o,{emit:l,slots:r}){const s=t.inject(Gr);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 d={class:`${e}__empty-icon`},h=o.emptyIcon??a,S=t.h(h,d),y={class:`${e}__empty-text`},k=o.emptyText??"Loading",b=t.h("view",y,[k]),f={class:`${e}__empty`},u=t.h("view",f,[S,b]);m.push(u)}const p={class:`${e}`,style:i.value};return t.h("view",p,m)}}}}const{create:_d,componentName:eu,scope:tu}=G("tabs-pane"),vn=_d(Jd(eu,tu,oe.Loading));class Zr{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=In(n,null,this.config)}updateChildren(n,a){a?a.children=In(n,a,this.config):this.nodes=In(n,null,this.config)}getNodeByValue(n){let a;return Wr(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:nu,scope:ou}=G("cascader-pane"),lu=nu({components:{Loading:oe.Loading,Checklist:oe.Checklist,TabsBar:xn,TabsContainer:qn,TabsPane:vn},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}=ie.useFoxI18n(ou),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 Zr([],{})),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((u,g)=>({text:u.selectedNode?u.selectedNode.text:a("select"),value:g}))),d=new Map;let h;const S=async()=>{d.clear(),c.value=[],l.value=0,r.value=!1,h=null;let{options:u}=e;o.value.convertConfig&&(u=Ld(u,o.value.convertConfig)),i.value=new Zr(u,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),m.value&&!i.value.nodes.length&&await k({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y(!m.value)},y=async(u=!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 w=g;if(m.value&&Array.isArray(g)&&g.length){w=[];let T=i.value.nodes.find(C=>C.value===g[0]);if(T){w=[T.value],r.value=!0;const C=await g.slice(1).reduce(async(A,V)=>{const $=await A;await k($);const E=$?.children?.find(B=>B.value===V);return E&&w.push(V),Promise.resolve(E)},Promise.resolve(T));await k(C),r.value=!1}}w.length&&g===e.modelValue&&i.value.getPathNodesByValue(w).map((C,A)=>{l.value=A,f.handleNode(C,u)})},k=async u=>{if(!u)return;if(!o.value.lazyLoad){u.leaf=!0;return}if(i.value.isLeaf(u,m.value)||i.value.hasChildren(u,m.value))return;u.loading=!0;const g=u.root?null:u;let w=d.get(u);w||(w=new Promise(C=>{o.value.lazyLoad?.(u,C)}),d.set(u,w));const T=await w;Array.isArray(T)&&T.length>0?i.value.updateChildren(T,g):u.leaf=!0,u.loading=!1,d.delete(u)},b=u=>{const g=u.map(w=>w.value);s.value=g,n("change",g,u),n("pathChange",u),n("update:modelValue",g)},f={async handleNode(u,g){const{disabled:w,loading:T}=u;if(!(!g&&w||!c.value[l.value])){if(i.value.isLeaf(u,m.value)){if(u.leaf=!0,c.value[l.value].selectedNode=u,c.value=c.value.slice(0,u.level+1),!g){const C=c.value.map(A=>A.selectedNode);b(C),n("pathChange",C)}return}if(i.value.hasChildren(u,m.value)){const C=u.level+1;if(c.value[l.value].selectedNode=u,c.value=c.value.slice(0,C),c.value.push({nodes:u.children||[],selectedNode:null}),l.value=C,!g){const A=c.value.map(V=>V.selectedNode);n("pathChange",A)}return}h=u,!T&&(await k(u),h===u&&(c.value[l.value].selectedNode=u,f.handleNode(u,g)))}},handleTabChange(u,g){h=null},formatTabTitle(u){return u.selectedNode?u.selectedNode.text:a("select")},isSelected(u,g){return u.selectedNode&&u.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{S()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,u=>{Me(u,s.value)||(s.value=u,y())}),t.watch(()=>e.visible,u=>{u&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),au={class:"fox-cascader"},ru={role:"menu",class:"fox-cascader__pane"},su=["aria-checked","aria-disabled","onClick"],iu={class:"fox-cascader__item__title"},cu=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function du(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",au,[t.createVNode(s,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=d=>e.tabsCursor=d),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]=d=>e.tabsCursor=d)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(d,h)=>(t.openBlock(),t.createBlock(m,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",ru,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.nodes,S=>(t.openBlock(),t.createElementBlock("view",{key:S.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(d,S),disabled:S.disabled}]),"aria-checked":e.isSelected(d,S),"aria-disabled":S.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(S,!1)},[t.createElementVNode("view",iu,t.toDisplayString(S.text),1),S.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,su))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(m,{key:1,"pane-key":0},{default:t.withCtx(()=>[cu]),_:1}))]),_:1},8,["modelValue"])])}const uu=te(lu,[["render",du]]),{create:fu}=G("cascader"),mu=fu({components:{FoxCascaderPane:uu,FoxPopup:fe},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}}}),pu=["innerHTML"];function hu(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,pu)):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 Mn=te(mu,[["render",hu]]);function Pt(e,n){const a=e.textKey??"text";return n[a]??""}function Lt(e,n){const a=e.valueKey??"value";return n[a]}function Jr(e,n){const a=e.childrenKey??"children";return n[a]}function Pn(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=Pt(e,l),s=Lt(e,l);a.texts.push(r),a.values.push(s??"")}return a}function _r(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Pt(e,n[s])===r){const c=Lt(e,n[s])??"",m={[e.textKey]:r,[e.valueKey]:c};l.push(m);const p=Jr(e,n[s]);Array.isArray(p)&&_r(e,p,a,o+1,l);return}}function es(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Lt(e,n[s])===r){const c=Pt(e,n[s])??"",m={[e.textKey]:c,[e.valueKey]:r};l.push(m);const p=Jr(e,n[s]);Array.isArray(p)&&es(e,p,a,o+1,l);return}}function jo(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=Pt(e,n[o]),r=Pt(e,a[o]);if(l!==r)return!1;const s=Lt(e,n[o]),i=Lt(e,a[o]);if(s!==i)return!1}return!0}let gu=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=Ze(this.proxy,o);return l===null?(console.error(`${o} component not found api function`),[]):(Ee(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function yu(){const e=t.getCurrentInstance();return new gu(e.proxy)}const ts={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 bu(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...ts},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=yu(),b=t.ref([]),f=t.ref([]),u=t.computed(()=>{if(Array.isArray(f.value)){if(i.showAllLevels===!1){const F=f.value.length-1;return f.value[F]}return f.value.join(i.separator)}else return f.value}),g=t.ref([]),w=t.ref([]);t.watch([()=>i.modelValue,()=>b.value],async([F,P])=>{if(d("setValue",F),i.lazy===!0){w.value.length==0&&(g.value=Array.isArray(F)?F:[]);return}if(i.valueType==="item"){let K=F;if(!jo(i,K,w.value)){w.value=K;let X=Pn(i,K);f.value=X.texts,g.value=X.values}}else if(i.valueType==="text"){let K=F,X=[];if(_r(i,P,K,0,X),!jo(i,X,w.value)){w.value=X;let _=Pn(i,X);K.value=_.texts,g.value=_.values}}else{let K=[];if(es(i,P,F,0,K),!jo(i,K,w.value)){w.value=K;let X=Pn(i,K);f.value=X.texts,g.value=X.values}}}),i.lazy===!0&&(g.value=Array.isArray(i.modelValue)?i.modelValue:[]),t.watch([()=>i.source,()=>i.params],async([F,P])=>{F&&(b.value=await k.load(F,P))},{immediate:!0});const T="fox-input-item",C=t.computed(()=>({[T]:!0,"is-disabled":m.value,"is-readonly":p.value})),A=$e(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const F={};return A.value&&(F["text-align"]=A.value),F}),$=t.ref(!1),E=()=>{m.value===!0||p.value===!0||($.value=!0)},B=F=>{$.value=F},M=(F,P)=>{let K=P.map(_=>{if(_==null)return _;let le={..._};return Reflect.deleteProperty(le,"text"),le[i.textKey]=_.text??"",Reflect.deleteProperty(le,"value"),le[i.valueKey]=_.value??"",le});w.value=K;let X=Pn(i,K);f.value=X.texts,g.value=X.values,i.valueType==="text"?(d("change",f.value,K),d("update:modelValue",f.value)):i.valueType==="item"?(d("change",K,K),d("update:modelValue",K)):(d("change",g.value,K),d("update:modelValue",g.value)),d("update:pathNodes",K)},L=F=>{let P=F.map(K=>{if(K==null)return K;let X={...K};return Reflect.deleteProperty(X,"text"),X[i.textKey]=K.text??"",Reflect.deleteProperty(X,"value"),X[i.valueKey]=K.value??"",X});d("pathChange",P)},I=F=>{y.value=!0,d("focus",g.value,F)},D=F=>{setTimeout(()=>{y.value=!1},0),d("blur",g.value,F)},R=t.computed(()=>({[`${T}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),q=t.computed(()=>ke(i.unit)>0),W=t.computed(()=>ke(i.unit)>0&&!y.value),H=t.computed(()=>({hidden:!W.value})),J=F=>{w.value=[],f.value=[],g.value=[],d("update:modelValue",[]),d("change",[],F),d("clear",[]),d("update:pathNodes",[])},ee=t.computed(()=>i.clearable&&!m.value&&!p.value),Y=t.computed(()=>{let F=g.value&&g.value.length>0;return i.clearable&&F&&y.value}),v=F=>{Y.value?J(F):E()},z=t.computed(()=>Y.value&&ee.value?o:l),x=t.computed(()=>({action:!0}));return()=>{const F={class:C.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:E,onFocus:I,onBlur:D};s&&(F.disabled=!0);const P=[],K=t.h("input",F);P.push(K);const X=[],_={class:["action-icon"]},le=t.h(z.value,_),U={class:x.value,onClick:v},j=t.h("view",U,{default:()=>[le]});if(X.push(j),q.value){const Ce=t.h("view",{class:H.value},[i.unit]);X.push(Ce)}const Q={class:R.value},O=t.h("view",Q,{default:()=>X});P.push(O);const Z={default:()=>P};Z.label=c.slots.default,Z.prepend=c.slots.prepend,Z.append=c.slots.append,Z.fixedPreTip=c.slots.fixedPreTip,Z.fixedTip=c.slots.fixedTip;let ne={};ne.visible=$.value,ne["onUpdate:visible"]=B,ne.modelValue=g.value,ne.onChange=M,ne.onPathChange=L,ne.options=b.value,ne.title=i.title,ne.lazy=i.lazy,ne.lazyLoad=i.lazyLoad,ne.valueKey=i.valueKey,ne.textKey=i.textKey,ne.childrenKey=i.childrenKey,ne.convertConfig=i.convertConfig;const re=t.h(r,ne);Z.hide=()=>[re];const se=ut(i,ts);return t.h(a,{...se,prop:`${i.prop}_item`},Z)}}}}const{componentName:ku,create:Su,scope:Cu}=G("cascader-item"),Wo=Su(bu(ku,Cu,Be,oe.CircleClose,oe.ArrowRight,Mn,!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 ns={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",d="month",h="quarter",S="year",y="date",k="Invalid Date",b=/^(\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,u={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(L,I,D){var R=String(L);return!R||R.length>=I?L:""+Array(I+1-R.length).join(D)+L},w={s:g,z:function(L){var I=-L.utcOffset(),D=Math.abs(I),R=Math.floor(D/60),q=D%60;return(I<=0?"+":"-")+g(R,2,"0")+":"+g(q,2,"0")},m:function L(I,D){if(I.date()<D.date())return-L(D,I);var R=12*(D.year()-I.year())+(D.month()-I.month()),q=I.clone().add(R,d),W=D-q<0,H=I.clone().add(R+(W?-1:1),d);return+(-(R+(D-q)/(W?q-H:H-q))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:d,y:S,w:p,d:m,D:y,h:c,m:i,s,ms:r,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},T="en",C={};C[T]=u;var A=function(L){return L instanceof B},V=function L(I,D,R){var q;if(!I)return T;if(typeof I=="string"){var W=I.toLowerCase();C[W]&&(q=W),D&&(C[W]=D,q=W);var H=I.split("-");if(!q&&H.length>1)return L(H[0])}else{var J=I.name;C[J]=I,q=J}return!R&&q&&(T=q),q||!R&&T},$=function(L,I){if(A(L))return L.clone();var D=typeof I=="object"?I:{};return D.date=L,D.args=arguments,new B(D)},E=w;E.l=V,E.i=A,E.w=function(L,I){return $(L,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var B=function(){function L(D){this.$L=V(D.locale,null,!0),this.parse(D)}var I=L.prototype;return I.parse=function(D){this.$d=function(R){var q=R.date,W=R.utc;if(q===null)return new Date(NaN);if(E.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var H=q.match(b);if(H){var J=H[2]-1||0,ee=(H[7]||"0").substring(0,3);return W?new Date(Date.UTC(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)):new Date(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)}}return new Date(q)}(D),this.$x=D.x||{},this.init()},I.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},I.$utils=function(){return E},I.isValid=function(){return this.$d.toString()!==k},I.isSame=function(D,R){var q=$(D);return this.startOf(R)<=q&&q<=this.endOf(R)},I.isAfter=function(D,R){return $(D)<this.startOf(R)},I.isBefore=function(D,R){return this.endOf(R)<$(D)},I.$g=function(D,R,q){return E.u(D)?this[R]:this.set(q,D)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(D,R){var q=this,W=!!E.u(R)||R,H=E.p(D),J=function(K,X){var _=E.w(q.$u?Date.UTC(q.$y,X,K):new Date(q.$y,X,K),q);return W?_:_.endOf(m)},ee=function(K,X){return E.w(q.toDate()[K].apply(q.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(X)),q)},Y=this.$W,v=this.$M,z=this.$D,x="set"+(this.$u?"UTC":"");switch(H){case S:return W?J(1,0):J(31,11);case d:return W?J(1,v):J(0,v+1);case p:var F=this.$locale().weekStart||0,P=(Y<F?Y+7:Y)-F;return J(W?z-P:z+(6-P),v);case m:case y:return ee(x+"Hours",0);case c:return ee(x+"Minutes",1);case i:return ee(x+"Seconds",2);case s:return ee(x+"Milliseconds",3);default:return this.clone()}},I.endOf=function(D){return this.startOf(D,!1)},I.$set=function(D,R){var q,W=E.p(D),H="set"+(this.$u?"UTC":""),J=(q={},q[m]=H+"Date",q[y]=H+"Date",q[d]=H+"Month",q[S]=H+"FullYear",q[c]=H+"Hours",q[i]=H+"Minutes",q[s]=H+"Seconds",q[r]=H+"Milliseconds",q)[W],ee=W===m?this.$D+(R-this.$W):R;if(W===d||W===S){var Y=this.clone().set(y,1);Y.$d[J](ee),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d}else J&&this.$d[J](ee);return this.init(),this},I.set=function(D,R){return this.clone().$set(D,R)},I.get=function(D){return this[E.p(D)]()},I.add=function(D,R){var q,W=this;D=Number(D);var H=E.p(R),J=function(v){var z=$(W);return E.w(z.date(z.date()+Math.round(v*D)),W)};if(H===d)return this.set(d,this.$M+D);if(H===S)return this.set(S,this.$y+D);if(H===m)return J(1);if(H===p)return J(7);var ee=(q={},q[i]=o,q[c]=l,q[s]=a,q)[H]||1,Y=this.$d.getTime()+D*ee;return E.w(Y,this)},I.subtract=function(D,R){return this.add(-1*D,R)},I.format=function(D){var R=this,q=this.$locale();if(!this.isValid())return q.invalidDate||k;var W=D||"YYYY-MM-DDTHH:mm:ssZ",H=E.z(this),J=this.$H,ee=this.$m,Y=this.$M,v=q.weekdays,z=q.months,x=function(X,_,le,U){return X&&(X[_]||X(R,W))||le[_].slice(0,U)},F=function(X){return E.s(J%12||12,X,"0")},P=q.meridiem||function(X,_,le){var U=X<12?"AM":"PM";return le?U.toLowerCase():U},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Y+1,MM:E.s(Y+1,2,"0"),MMM:x(q.monthsShort,Y,z,3),MMMM:x(z,Y),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:x(q.weekdaysMin,this.$W,v,2),ddd:x(q.weekdaysShort,this.$W,v,3),dddd:v[this.$W],H:String(J),HH:E.s(J,2,"0"),h:F(1),hh:F(2),a:P(J,ee,!0),A:P(J,ee,!1),m:String(ee),mm:E.s(ee,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:H};return W.replace(f,function(X,_){return _||K[X]||H.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(D,R,q){var W,H=E.p(R),J=$(D),ee=(J.utcOffset()-this.utcOffset())*o,Y=this-J,v=E.m(this,J);return v=(W={},W[S]=v/12,W[d]=v,W[h]=v/3,W[p]=(Y-ee)/6048e5,W[m]=(Y-ee)/864e5,W[c]=Y/l,W[i]=Y/o,W[s]=Y/a,W)[H]||Y,q?v:E.a(v)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return C[this.$L]},I.locale=function(D,R){if(!D)return this.$L;var q=this.clone(),W=V(D,R,!0);return W&&(q.$L=W),q},I.clone=function(){return E.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},L}(),M=B.prototype;return $.prototype=M,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",m],["$M",d],["$y",S],["$D",y]].forEach(function(L){M[L[1]]=function(I){return this.$g(I,L[0],L[1])}}),$.extend=function(L,I){return L.$i||(L(I,B,$),L.$i=!0),$},$.locale=V,$.isDayjs=A,$.unix=function(L){return $(1e3*L)},$.en=C[T],$.Ls=C,$.p={},$})})(ns);var wu=ns.exports;const Oe=Ye(wu);var os={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(k){return(k=+k)+(k>68?1900:2e3)},m=function(k){return function(b){this[k]=+b}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var f=b.match(/([+-]|\d\d)/g),u=60*f[1]+(+f[2]||0);return u===0?0:f[0]==="+"?-u:u}(k)}],d=function(k){var b=i[k];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(k,b){var f,u=i.meridiem;if(u){for(var g=1;g<=24;g+=1)if(k.indexOf(u(g,0,b))>-1){f=g>12;break}}else f=k===(b?"pm":"PM");return f},S={A:[s,function(k){this.afternoon=h(k,!1)}],a:[s,function(k){this.afternoon=h(k,!0)}],S:[/\d/,function(k){this.milliseconds=100*+k}],SS:[l,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],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(k){var b=i.ordinal,f=k.match(/\d+/);if(this.day=f[0],b)for(var u=1;u<=31;u+=1)b(u).replace(/\[|\]/g,"")===k&&(this.day=u)}],M:[r,m("month")],MM:[l,m("month")],MMM:[s,function(k){var b=d("months"),f=(d("monthsShort")||b.map(function(u){return u.slice(0,3)})).indexOf(k)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[s,function(k){var b=d("months").indexOf(k)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,m("year")],YY:[l,function(k){this.year=c(k)}],YYYY:[/\d{4}/,m("year")],Z:p,ZZ:p};function y(k){var b,f;b=k,f=i&&i.formats;for(var u=(k=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,E,B){var M=B&&B.toUpperCase();return E||f[B]||a[B]||f[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(L,I,D){return I||D.slice(1)})})).match(o),g=u.length,w=0;w<g;w+=1){var T=u[w],C=S[T],A=C&&C[0],V=C&&C[1];u[w]=V?{regex:A,parser:V}:T.replace(/^\[|\]$/g,"")}return function($){for(var E={},B=0,M=0;B<g;B+=1){var L=u[B];if(typeof L=="string")M+=L.length;else{var I=L.regex,D=L.parser,R=$.slice(M),q=I.exec(R)[0];D.call(E,q),$=$.replace(q,"")}}return function(W){var H=W.afternoon;if(H!==void 0){var J=W.hours;H?J<12&&(W.hours+=12):J===12&&(W.hours=0),delete W.afternoon}}(E),E}}return function(k,b,f){f.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(c=k.parseTwoDigitYear);var u=b.prototype,g=u.parse;u.parse=function(w){var T=w.date,C=w.utc,A=w.args;this.$u=C;var V=A[1];if(typeof V=="string"){var $=A[2]===!0,E=A[3]===!0,B=$||E,M=A[2];E&&(M=A[2]),i=this.$locale(),!$&&M&&(i=f.Ls[M]),this.$d=function(R,q,W){try{if(["x","X"].indexOf(q)>-1)return new Date((q==="X"?1e3:1)*R);var H=y(q)(R),J=H.year,ee=H.month,Y=H.day,v=H.hours,z=H.minutes,x=H.seconds,F=H.milliseconds,P=H.zone,K=new Date,X=Y||(J||ee?1:K.getDate()),_=J||K.getFullYear(),le=0;J&&!ee||(le=ee>0?ee-1:K.getMonth());var U=v||0,j=z||0,Q=x||0,O=F||0;return P?new Date(Date.UTC(_,le,X,U,j,Q,O+60*P.offset*1e3)):W?new Date(Date.UTC(_,le,X,U,j,Q,O)):new Date(_,le,X,U,j,Q,O)}catch{return new Date("")}}(T,V,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),B&&T!=this.format(V)&&(this.$d=new Date("")),i={}}else if(V instanceof Array)for(var L=V.length,I=1;I<=L;I+=1){A[1]=V[I-1];var D=f.apply(this,A);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}I===L&&(this.$d=new Date(""))}else g.call(this,w)}}})})(os);var Nu=os.exports;const Bu=Ye(Nu);var ls={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(),d=(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)(d)}}})})(ls);var Au=ls.exports;const Tu=Ye(Au);var as={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=function(d){return d&&(d.indexOf?d:d.s)},i=function(d,h,S,y,k){var b=d.name?d:d.$locale(),f=s(b[h]),u=s(b[S]),g=f||u.map(function(T){return T.slice(0,y)});if(!k)return g;var w=b.weekStart;return g.map(function(T,C){return g[(C+(w||0))%7]})},c=function(){return l.Ls[l.locale()]},m=function(d,h){return d.formats[h]||function(S){return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,k,b){return k||b.slice(1)})}(d.formats[h.toUpperCase()])},p=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):i(d,"months")},monthsShort:function(h){return h?h.format("MMM"):i(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return m(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var d=c();return{firstDayOfWeek:function(){return d.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(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(d){return i(c(),"weekdays",null,null,d)},l.weekdaysShort=function(d){return i(c(),"weekdaysShort","weekdays",3,d)},l.weekdaysMin=function(d){return i(c(),"weekdaysMin","weekdays",2,d)}}})})(as);var Vu=as.exports;const $u=Ye(Vu);var rs={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),d=s(this).endOf(a);if(p.isBefore(d))return 1}var h=s(this).startOf(o).date(m).startOf(a).subtract(1,"millisecond"),S=this.diff(h,a,!0);return S<0?s(this).startOf("week").week():Math.ceil(S)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(rs);var Eu=rs.exports;const Du=Ye(Eu);var ss={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}}})})(ss);var Iu=ss.exports;const xu=Ye(Iu);var is={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")}}})})(is);var qu=is.exports;const vu=Ye(qu);var cs={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)}}})})(cs);var Mu=cs.exports;const Pu=Ye(Mu);var ds={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)}}})})(ds);var Lu=ds.exports;const zu=Ye(Lu);Oe.extend($u),Oe.extend(Tu),Oe.extend(Bu),Oe.extend(Du),Oe.extend(xu),Oe.extend(vu),Oe.extend(Pu),Oe.extend(zu);const ae={format(e,n){return Oe(e).format(n)},parser(e,n){return Oe(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)),d=this.date2Str(new Date(m));return[p,d]}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)),d=this.date2Str(new Date(m));return[p,d]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=ae.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=ae.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}},us=new Date().getFullYear(),Yo={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"},Ln=(e,n,a)=>{let o;if(Ue(n)?o=n:typeof n=="string"&&ke(n)>0?o=ae.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)=>{Ue(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),ae.format(new Date(o),a)};let Qo={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(us-10,0,1),validator:Ue},maxDate:{type:Date,default:()=>new Date(us+10,11,31),validator:Ue},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Fu,scope:Ru}=G("date-picker"),Ou=Fu({components:{[kt.name]:kt},props:{...Qo},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(Ru),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,u=>{l.value=u});function r(u,g){return new Date(u,g,0).getDate()}const s=(u,g)=>{const w=e[`${u}Date`],T=w.getFullYear();let C=1,A=1,V=0,$=0;u==="max"&&(C=12,A=r(g.getFullYear(),g.getMonth()+1),V=23,$=59);const E=$;return g.getFullYear()===T&&(C=w.getMonth()+1,g.getMonth()+1===C&&(A=w.getDate(),g.getDate()===A&&(V=w.getHours(),g.getHours()===V&&($=w.getMinutes())))),{[`${u}Year`]:T,[`${u}Month`]:C,[`${u}Date`]:A,[`${u}Hour`]:V,[`${u}Minute`]:$,[`${u}Seconds`]:E}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:u,maxDate:g,maxMonth:w,maxHour:T,maxMinute:C,maxSeconds:A}=s("max",h.value),{minYear:V,minDate:$,minMonth:E,minHour:B,minMinute:M,minSeconds:L}=s("min",h.value);let I=[{type:"year",range:[V,u]},{type:"month",range:[E,w]},{type:"day",range:[$,g]},{type:"hour",range:[B,T]},{type:"minute",range:[M,C]},{type:"seconds",range:[L,A]}];switch(e.type){case"date":I=I.slice(0,3);break;case"datetime":I=I.slice(0,5);break;case"time":I=I.slice(3,6);break;case"year-month":I=I.slice(0,2);break;case"month-day":I=I.slice(1,3);break;case"datehour":I=I.slice(0,4);break;case"hour-minute":I=I.slice(3,5);break}return I}),c=(u,g,w)=>{if(!(g>u))return null;const T=[];for(;u<=g;)e.isShowChinese?T.push({text:u+o[w],value:u}):T.push({text:`${u}`,value:u}),w==="minute"?u+=e.minuteStep:u++;return T},m=t.computed(()=>{let u=[];return i.value.forEach(g=>{let w=c(g.range[0],g.range[1],g.type);w&&u.push(w)}),u}),p=(u,g)=>u==="year"?g.getFullYear():u==="month"?g.getMonth()+1:u==="day"?g.getDate():u==="hour"?g.getHours():u==="minute"?g.getMinutes():u==="seconds"?g.getSeconds():0,d=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,u=>{let g;if(typeof u=="string"?u.length==0?g=new Date:e.valueFormat?g=Ln(e,e.modelValue,e.valueFormat):g=Ln(e,u,Yo[e.type]):Ue(u)?g=u:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let w=[];i.value.forEach(T=>{let C=p(T.type,g);w.push(C)}),d.value=w}},{immediate:!0});const S=u=>{if(e.type==="date"){const g=u[0],w=u[1]-1,T=Math.min(u[2],r(g,w+1));T!==u[2]&&(u[2]=T),h.value=new Date(g,w,T)}else if(e.type==="datetime"){const g=u[0],w=u[1]-1,T=Math.min(u[2],r(g,w+1)),C=u[3],A=u[4];T!==u[2]&&(u[2]=T),h.value=new Date(g,w,T,C,A)}else if(e.type==="time"){const g=u[0],w=u[1],T=u[2],C=h.value??new Date,A=new Date(C.getFullYear(),C.getMonth(),C.getDate(),g,w,T);h.value=A}else if(e.type==="year-month"){const g=u[0],w=u[1]-1;h.value=new Date(g,w)}else if(e.type==="month-day"){const w=(h.value??new Date).getFullYear(),T=u[0]-1,C=Math.min(u[1],r(w,T+1));C!==u[1]&&(u[1]=C);const A=new Date(w,T,C);h.value=A}else if(e.type==="datehour"){const g=u[0],w=u[1]-1,T=Math.min(u[2],r(g,w+1)),C=u[3];T!==u[2]&&(u[2]=T),h.value=new Date(g,w,T,C)}else if(e.type==="hour-minute"){const g=u[0],w=u[1],T=h.value??new Date,C=new Date(T.getFullYear(),T.getMonth(),T.getDate(),g,w);h.value=C}d.value=u};return{columns:m,dateIndexs:d,show:l,onChange:u=>{S(u)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:u=>{S(u),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let w=Xo(e,g,e.valueFormat);n("update:modelValue",w)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",u)},onClear:()=>{n("clear")}}}});function Ku(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 zn=te(Ou,[["render",Ku]]),Uu={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Hu(e){let n=e.format;if(!n){let a=e.type??"date";n=Yo[a]}return n}function ju(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...Qo,...Uu},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=ve(i,"modelValue",v=>v==null?null:typeof v=="string"?v.length==0?null:i.valueFormat?Ln(i,v,i.valueFormat)??v:Ln(i,v,Yo[i.type])??v:Ue(v)?v:null,d),f=t.computed(()=>{if(!b.value)return"";const v=Hu(i);return Xo(i,b.value,v)}),u="fox-input-item",g=t.computed(()=>({[u]:!0,"is-disabled":m.value,"is-readonly":p.value})),w=$e(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const v={};return w.value&&(v["text-align"]=w.value),v}),C=t.ref(!1),A=()=>{C.value=!0},V=()=>{C.value=!1};c.expose({showPicker:A,hidePicker:V});const $=v=>{C.value=v},E=v=>{if(b.value=v,i.valueFormat){let z=Xo(i,v,i.valueFormat);d("update:modelValue",z,{}),d("change",z,{})}else d("update:modelValue",v,{}),d("change",v,{})},B=v=>{let x=v.target.value;y.value=!0,d("focus",x,v)},M=v=>{setTimeout(()=>{y.value=!1},0);let x=v.target.value;i.maxLength&&x.length>Number(i.maxLength)&&(x=x.slice(0,Number(i.maxLength))),d("blur",x,v)},L=t.computed(()=>({[`${u}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),I=t.computed(()=>ke(i.unit)>0),D=t.computed(()=>ke(i.unit)>0&&!y.value),R=t.computed(()=>({hidden:!D.value})),q=v=>{b.value="",d("update:modelValue","",v),d("change","",v),d("clear",""),V()},W=t.computed(()=>i.clearable&&!m.value&&!p.value),H=t.computed(()=>{let v=ke(b.value)>0;return i.clearable&&v&&y.value}),J=v=>{H.value?q(v):A()},ee=t.computed(()=>H.value&&W.value?o:l),Y=t.computed(()=>({action:!0}));return()=>{const v={class:g.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:A,onFocus:B,onBlur:M};s&&(v.disabled=!0);const z=[],x=t.h("input",v);z.push(x);const F=[],P={class:["action-icon"]},K=t.h(ee.value,P),X={class:Y.value,onClick:J},_=t.h("view",X,{default:()=>[K]});if(F.push(_),I.value){const se=t.h("view",{class:R.value},[i.unit]);F.push(se)}const le={class:L.value},U=t.h("view",le,{default:()=>F});z.push(U);const j={default:()=>z};j.label=c.slots.default,j.prepend=c.slots.prepend,j.append=c.slots.append,j.fixedPreTip=c.slots.fixedPreTip,j.fixedTip=c.slots.fixedTip;const Q=Se(i,Qo);Q.valueFormat=null,Q.disabled=!1,Q.readonly=m.value||p.value,Q.visible=C.value,Q["onUpdate:visible"]=$,Q.modelValue=b.value,Q["onUpdate:modelValue"]=E,Q.onClear=q;const O={};if(c.slots.top){const se=c.slots.top();O.top=()=>se}if(c.slots.bottom){const se=c.slots.bottom();O.default=()=>se}const Z=t.h(r,Q,O);j.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,{...ne,prop:`${i.prop}_item`},j)}}}}const{create:Wu,componentName:Yu,scope:Xu}=G("date-item"),Go=Wu(ju(Yu,Xu,Be,oe.CircleClose,oe.Date,zn,!1)),Qu=39,Gu=64,{create:Zu,scope:Ju}=G("calendar-pane"),_u=Zu({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:ae.getDay(0)},endDate:{type:String,default:ae.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=ie.useFoxI18n(Ju),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),d=t.ref(null),h=t.ref(0),S=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),y=t.computed(()=>a.btn),k=t.computed(()=>a["top-info"]),b=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}),u=P=>P.split("-"),g=P=>ae.isEqual(f.currDate[0],P),w=P=>ae.isEqual(f.currDate[1],P),T=P=>f.currDate?.length>0?f.currDate?.some(K=>ae.isEqual(K,P)):!1,C=(P,K)=>K.curData[0]+"-"+K.curData[1]+"-"+ae.getNumTwoBit(+P.day),A=(P,K)=>{const X=C(P,K),{type:_}=e;return P.type=="curr"?ae.isEqual(f.currDate,X)||(_=="range"||_=="week")&&(g(X)||w(X))||_=="multiple"&&T(X)?`${f.dayPrefix}--active`:f.propStartDate&&ae.compareDate(X,f.propStartDate)||f.propEndDate&&ae.compareDate(f.propEndDate,X)?`${f.dayPrefix}--disabled`:(_=="range"||_=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&ae.compareDate(f.currDate[0],X)&&ae.compareDate(X,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},V=()=>{const{type:P}=e;if(P=="range"&&f.chooseData.length==2||P!="range"){let K=f.chooseData.slice(0);P=="week"&&(K={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("choose",K),e.poppable&&n("update")}},$=(P,K,X=!1)=>{if(A(P,K)!=`${f.dayPrefix}--disabled`){const{type:_}=e;let[le,U]=K.curData,j=[...K.curData];if(j[2]=ae.getNumTwoBit(Number(P.day)),j[3]=`${j[0]}-${j[1]}-${j[2]}`,j[4]=ae.getWhatDay(+j[0],+j[1],+j[2]),_=="multiple")if(f.currDate?.length>0){let Q;f.currDate?.forEach((O,Z)=>{O==j[3]&&(Q=Z)}),X?f.chooseData.push([...j]):Q!==void 0?(f.currDate.splice(Q,1),f.chooseData.splice(Q,1)):(f.currDate.push(j[3]),f.chooseData.push([...j]))}else f.currDate=[j[3]],f.chooseData=[[...j]];else if(_=="range"){let Q=Object.values(f.currDate).length;Q==2||Q==0?f.currDate=[j[3]]:ae.compareDate(f.currDate[0],j[3])?Array.isArray(f.currDate)&&f.currDate.push(j[3]):Array.isArray(f.currDate)&&f.currDate.unshift(j[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...j]]:ae.compareDate(f.chooseData[0][3],j[3])?f.chooseData=[...f.chooseData,[...j]]:f.chooseData=[[...j],...f.chooseData]}else if(_=="week"){let Q=ae.getWeekDate(le,U,P.day,e.firstDayOfWeek);f.propStartDate&&ae.compareDate(Q[0],f.propStartDate)&&Q.splice(0,1,f.propStartDate),f.propEndDate&&ae.compareDate(f.propEndDate,Q[1])&&Q.splice(1,1,f.propEndDate),f.currDate=Q,f.chooseData=[ae.formatResultDate(Q[0]),ae.formatResultDate(Q[1])]}else f.currDate=j[3],f.chooseData=[...j];if(!X){let Q=f.chooseData;_=="week"&&(Q={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("select",Q),(e.isAutoBackFill||!e.poppable)&&V()}}},E=P=>{let[K,X,_]=P;return{date:P,monthWeekNum:ae.getMonthWeek(K,X,_,e.firstDayOfWeek),yearWeekNum:ae.getYearWeek(K,X,_,e.firstDayOfWeek)}},B=P=>{const K=P=="prev"?f.monthsData[0]:f.monthsData[f.monthsData.length-1];let X=parseInt(K.curData[0]),_=parseInt(K.curData[1].toString().replace(/^0/,""));switch(P){case"prev":_==1&&(X-=1),_=_==1?12:--_;break;case"next":_==12&&(X+=1),_=_==12?1:++_;break}return[X+"",ae.getNumTwoBit(_),ae.getMonthDays(String(X),String(_))+""]},M=(P,K,X)=>{let{year:_,month:le}=X;return K=="prev"&&P>=7&&(P-=7),Array.from(Array(P),(U,j)=>({day:String(j+1),type:K,year:_,month:le}))},L=(P,K,X,_)=>{P=P-e.firstDayOfWeek;let{year:le,month:U}=X;return K=="prev"&&P>=7&&(P-=7),Array.from(Array(_),(Q,O)=>({day:String(O+1),type:K,year:le,month:U})).slice(_-P)},I=(P,K)=>{const X=ae.getMonthPreDay(+P[0],+P[1]);let _=Number(P[1])-1,le=Number(P[0]);_<=0&&(_=12,le+=1);const U=ae.getMonthDays(String(P[0]),String(P[1])),j=ae.getMonthDays(le+"",_+""),Q={year:P[0],month:P[1]},O={curData:P,title:l("monthTitle",{year:Q.year,month:Q.month}),monthData:[...L(X,"prev",{month:String(_),year:String(le)},j),...M(U,"curr",Q)],cssHeight:0,cssScrollHeight:0},Z=O.monthData.length>35?6:5;O.cssHeight=Qu+Gu*Z;let ne=0;f.monthsData.length>0&&(ne=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),O.cssScrollHeight=ne,K=="next"?(!f.endData||!ae.compareDate(`${f.endData[0]}-${f.endData[1]}-${ae.getMonthDays(f.endData[0],f.endData[1])}`,`${P[0]}-${P[1]}-${P[2]}`))&&f.monthsData.push(O):!f.startData||!ae.compareDate(`${P[0]}-${P[1]}-${P[2]}`,`${f.startData[0]}-${f.startData[1]}-01`)?f.monthsData.unshift(O):f.unLoadPrev=!0},D=()=>{let P=e.startDate?e.startDate:ae.getDay(0),K=e.endDate?e.endDate:ae.getDay(365);f.propStartDate=P,f.propEndDate=K,f.startData=u(P),f.endData=u(K),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const X={year:Number(f.startData[0]),month:Number(f.startData[1])},_={year:Number(f.endData[0]),month:Number(f.endData[1])};let le=_.month-X.month;_.year-X.year>0&&(le=le+12*(_.year-X.year)),le<=0&&(le=1),I(f.startData,"next");let U=1;do I(B("next"),"next");while(U++<le);if(f.monthsNum=le,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(P&&ae.compareDate(f.currDate[0],P)&&f.currDate.splice(0,1,P),K&&ae.compareDate(K,f.currDate[1])&&f.currDate.splice(1,1,K),f.defaultData=[...u(f.currDate[0]),...u(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let j=[],Q={};f.currDate.forEach(O=>{P&&!ae.compareDate(O,P)&&K&&!ae.compareDate(K,O)&&(Object.hasOwnProperty.call(Q,O)||(j.push(O),Q[O]=O))}),f.currDate=[...j],f.defaultData=[...u(j[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[j,Q,O]=u(f.currDate[0]),Z=ae.getWeekDate(j,Q,O,e.firstDayOfWeek);f.currDate=Z,P&&ae.compareDate(f.currDate[0],P)&&f.currDate.splice(0,1,P),K&&ae.compareDate(K,f.currDate[1])&&f.currDate.splice(1,1,K),f.defaultData=[...u(f.currDate[0]),...u(f.currDate[1])]}}else f.currDate&&(P&&ae.compareDate(f.currDate,P)?f.currDate=P:K&&!ae.compareDate(f.currDate,K)&&(f.currDate=K),f.defaultData=[...u(f.currDate)])};xe({scrollToDate:P=>{ae.compareDate(P,f.propStartDate)?P=f.propStartDate:ae.compareDate(P,f.propEndDate)||(P=f.propEndDate);let K=u(P);f.monthsData.forEach((X,_)=>{if(X.title==l("monthTitle",{year:K[0],month:K[1]})&&c.value){let le=f.monthsData[_].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let U=0,j=setInterval(()=>{if(U++,c.value){let Q=le/10;c.value.scrollTop=c.value.scrollTop+Q}U>=10&&(clearInterval(j),c.value&&(c.value.scrollTop=f.monthsData[_].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[_].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let P=0,K=0;f.defaultData.length>0&&f.monthsData.forEach((le,U)=>{le.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(P=U),(e.type=="range"||e.type=="week")&&le.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(K=U)}),H(f.monthsNum,P),f.currentIndex=P,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?($({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),$({day:f.defaultData[5],type:"curr"},f.monthsData[K],!0)):e.type=="week"?$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(le=>{let U=u(le),j=f.currentIndex;f.monthsData.forEach((Q,O)=>{Q.title==l("monthTitle",{year:U[0],month:U[1]})&&(j=O)}),$({day:U[2],type:"curr"},f.monthsData[j],!0)}):$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let X=f.monthsData[f.monthsData.length-1],_=X.cssHeight+X.cssScrollHeight;Qe(()=>{c?.value&&m?.value&&d?.value&&(h.value=c.value.clientHeight,m.value.style.height=`${_}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(_/(f.monthsNum+1))}});const H=(P,K)=>{P>=3?K>0&&K<P?f.defaultRange=[K-1,K+3]:K==0?f.defaultRange=[K,K+4]:K==P&&(f.defaultRange=[K-2,K+2]):f.defaultRange=[0,P+2];let X=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=X},J=(P,K)=>(e.type=="range"||e.type=="week")&&P.type=="curr"&&A(P,K)=="fox-calendar__day--active",ee=(P,K)=>J(P,K)&&g(C(P,K)),Y=(P,K)=>f.currDate.length>=2&&w(C(P,K))?J(P,K):!1,v=()=>{if(f.currDate.length>=2)return ae.isEqual(f.currDate[0],f.currDate[1])},z=P=>{const K=`${P.year}-${P.month}-${Number(P.day)<10?"0"+P.day:P.day}`;return ae.isEqual(K,ae.date2Str(new Date))},x=P=>{if(f.monthsData.length<=1)return;const K=P.target.scrollTop;let X=Math.floor(K/f.avgHeight);if(X==0)K>=f.monthsData[X+1].cssScrollHeight&&(X+=1);else if(X>0&&X<f.monthsNum-1)K>=f.monthsData[X+1].cssScrollHeight&&(X+=1),K<f.monthsData[X].cssScrollHeight&&(X-=1);else{const _=Math.round(K+h.value);_<f.monthsData[X].cssScrollHeight+f.monthsData[X].cssHeight&&K>f.monthsData[X-1].cssScrollHeight&&(X-=1),X+1<=f.monthsNum&&_>=f.monthsData[X+1].cssScrollHeight+f.monthsData[X+1].cssHeight&&(X+=1),X>=1&&K<f.monthsData[X-1].cssScrollHeight&&(X-=1)}f.currentIndex!==X&&(f.currentIndex=X,H(f.monthsNum,X)),f.yearMonthTitle=f.monthsData[X].title},F=()=>{f.chooseData.splice(0),f.monthsData.splice(0),D()};return D(),t.watch(()=>e.defaultValue,P=>{P&&e.poppable&&F()}),{weeks:i,compConthsData:S,showTopBtn:y,topInfo:k,bottomInfo:b,rangeTip:v,mothsViewScroll:x,getClass:A,isStartTip:ee,isEndTip:Y,chooseDay:$,isCurrDay:z,confirm:V,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:m,weeksPanel:p,viewArea:d}}}),ef={class:"fox-calendar__header"},tf={key:0,class:"fox-calendar__header-title"},nf={key:1,class:"fox-calendar__header-slot"},of={key:2,class:"fox-calendar__header-subtitle"},lf={class:"fox-calendar__weekdays",ref:"weeksPanel"},af={class:"fox-calendar__panel",ref:"monthsPanel"},rf={class:"fox-calendar__month-title"},sf={class:"fox-calendar__days"},cf=["onClick"],df={class:"fox-calendar__day-value"},uf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},ff={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},mf={key:2,class:"fox-calendar__day-tips--curr"},pf={key:4,class:"fox-calendar__day-tip"},hf={key:0,class:"fox-calendar__footer"};function gf(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",ef,[e.showTitle?(t.openBlock(),t.createElementBlock("view",tf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",nf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",of,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",lf,[(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",af,[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",rf,t.toDisplayString(s.title),1),t.createElementVNode("view",sf,[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",df,[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",uf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",ff,[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",mf,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",pf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,cf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",hf,[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 fs=te(_u,[["render",gf]]),yf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Fn={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:bf}=G("calendar"),kf=bf({components:{[fs.name]:fs,[fe.name]:fe},props:{...Fn},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=k=>{i.value?.scrollToDate(k)},m=()=>{i.value?.initPosition()};t.watch(()=>e.visible,k=>{k&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),xe({scrollToDate:c,initPosition:m});const p=()=>{n("update:visible",!1)},d=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{d()},update:p,close:d,select:k=>{n("select",k)},choose:k=>{d(),n("choose",k)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Sf(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 Rn=te(kf,[["render",Sf]]),ms={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}},Zo=(e,n)=>{let a;return Ue(e)?a=e:typeof e=="string"&&ke(e)>0?a=ae.parser(e,n):a=new Date,a},St=(e,n,a)=>(Ue(n)||(n=new Date),ae.format(n,a)),Ct=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=ae.date2Str(e),r=ae.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function Cf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...pe,...be,...Fn,...ms},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=t.computed(()=>i.type==="range"),b=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{b.startDate!==null&&(b.startDate=null,b.endDate=null,b.startArray=[],b.endArray=[])},u=(x,F="one",P="YYYY-MM-DD")=>{if(yf(x)){f();return}if(k.value&&Array.isArray(x)&&x.length==2){let K,X;typeof x[0]=="string"?(K=Zo(x[0],P),X=Zo(x[1],P)):(K=x[0],X=x[1]);let _=Ct(K),le=Ct(X);(b.startDate===null||b.startDate.getTime()!==K.getTime()||b.endDate?.getTime()!==X.getTime())&&(b.startDate=K,b.startArray=_,b.endDate=X,b.endArray=le)}else{let K;typeof x=="string"?K=Zo(x,P):K=x;let X=Ct(K);(b.startDate===null||b.startDate.getTime()!==K.getTime())&&(b.startDate=K,b.startArray=X)}};u(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,x=>{u(x,i.type,i.valueFormat),d("setValue",x)});const g=t.computed(()=>{if(b.startDate===null)return"";if(k.value){let x=St(i,b.startDate,i.format),F=St(i,b.endDate,i.format);return`${x} ${i.rangeSeparator} ${F}`}else{let x=St(i,b.startDate,i.format);return i.showWeek&&(x=`${x} ${b.startArray[4]}`),x}}),w=t.computed(()=>{if(b.startDate===null)return null;if(k.value){let x=ae.date2Str(b.startDate),F=ae.date2Str(b.endDate??new Date);return[x,F]}else return ae.date2Str(b.startDate)}),T="fox-input-item",C=t.computed(()=>({[T]:!0,"is-disabled":m.value,"is-readonly":p.value})),A=$e(t.computed(()=>i.textAlign),"textAlign"),V=t.computed(()=>{const x={};return A.value&&(x["text-align"]=A.value),x}),$=t.ref(!1),E=()=>{p.value||m.value||($.value=!0)},B=x=>{$.value=x},M=x=>{if(x){if(k.value&&Array.isArray(x)){let F=x[0],P=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(P,K-1,X),le=x[1];P=me(le[0]),K=me(le[1]),X=me(le[2]);let U=new Date(P,K-1,X);if(b.startDate=_,b.startArray=Ct(_),b.endDate=U,b.endArray=Ct(U),i.valueFormat){let j=St(i,_,i.valueFormat),Q=St(i,U,i.valueFormat);d("update:modelValue",[j,Q],{})}else d("update:modelValue",[_,U],{})}else{let F=x,P=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(P,K-1,X);if(b.startDate=_,b.startArray=Ct(_),i.valueFormat){let le=St(i,_,i.valueFormat);d("update:modelValue",le,{})}else d("update:modelValue",_,{})}d("change",x,{})}},L=x=>{let P=x.target.value;y.value=!0,d("focus",P,x)},I=x=>{setTimeout(()=>{y.value=!1},0);let P=x.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),d("blur",P,x)},D=t.computed(()=>({[`${T}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),R=t.computed(()=>ke(i.unit)>0),q=t.computed(()=>ke(i.unit)>0&&!y.value),W=t.computed(()=>({hidden:!q.value})),H=x=>{f(),d("update:modelValue",null,x),d("change","",x),d("clear","")},J=t.computed(()=>i.clearable&&!m.value&&!p.value),ee=t.computed(()=>{let x=ke(g.value)>0;return i.clearable&&x&&y.value}),Y=x=>{ee.value?H(x):E()},v=t.computed(()=>ee.value&&J.value?l:r),z=t.computed(()=>({action:!0}));return()=>{const x={class:C.value,style:V.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:E,onFocus:L,onBlur:I};s&&(x.disabled=!0);const F=[],P=t.h("input",x);F.push(P);const K=[],X={class:["action-icon"]},_=t.h(v.value,X),le={class:z.value,onClick:Y},U=t.h("view",le,{default:()=>[_]});if(K.push(U),R.value){const Ce=t.h("view",{class:W.value},[i.unit]);K.push(Ce)}const j={class:D.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Fn);Z.visible=$.value,Z["onUpdate:visible"]=B,Z["default-value"]=w.value,Z.onChoose=M;const ne={};if(c.slots.btn){const Ce=c.slots.btn();ne.btn=()=>Ce}c.slots.day&&(ne.day=c.slots.day),c.slots.topInfo&&(ne.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ne.bottomInfo=c.slots.bottomInfo);const re=t.h(a,Z,ne);O.hide=()=>[re];const se=ut(i,Fn,ms);return t.h(o,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:wf,create:Nf,scope:Bf}=G("calendar-item"),Jo=Nf(Cf(wf,Bf,Rn,Be,{CloseIcon:oe.CircleClose,MarkIcon:oe.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 k=de(o.iconSize),b=o.checkedIcon??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),t.h(b,{width:k,height:k,class:y})}}else{if(r.icon)return r.icon();{const k=de(o.iconSize),b=o.icon??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),t.h(b,{width:k,height:k,class:y})}}},p=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),t.h("view",{class:y},r.default?.())},d=()=>{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)},S=c.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${S?`${e}--reverse`:""}`,onClick:h},[o.shape=="button"?d():S?[p(),m()]:[m(),p()]])}}}const{componentName:Vf,create:$f}=G("radio"),On=$f(Tf(Vf,{CheckNormal:oe.CheckNormal,Checked:oe.CheckChecked})),{componentName:ps,create:Ef}=G("radio-group"),Kn=Ef({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}=ht(),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:`${ps} ${ps}--${e.direction}`,style:l},n.default?.())}}});function hs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Un(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(zt(e,r)===a)return l}return-1}function Un(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function zt(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 xf=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function qf(){const e=t.getCurrentInstance();return new xf(e.proxy)}function vf(e){return{text:e,value:e}}const gs={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Mf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Pf={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 Lf(e,n,a,o,l){return{props:{...pe,...be,...gs,...Mf,...Pf},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ie(t.computed(()=>r.readonly)),c=Ve(t.computed(()=>r.disabled)),m=$e(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return c.value}},r.prop??s.attrs.name),d=qf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,u])=>{if(f){const g=await d.load("radio",f,u);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(A=>vf(A));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});let S=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([f,u])=>{S.value=hs(r,u,f,r.valueType),p("setValue",f)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(S.value===-1)return null;const f=h.value[S.value];return zt(r,f)}),k=f=>{let u=null,g=null;if(h.value.length>0){let w=hs(r,h.value,f,"value");S.value=w,w>=0&&(g=h.value[w],r.valueType==="text"?u=Un(r,g):r.valueType==="item"?u=g:u=zt(r,g))}else u=f;p("update:modelValue",u),p("change",u,g)},b=()=>{let f=null,u=null;if(h.value.length>0&&S.value!==-1){let g=h.value[S.value];r.valueType==="text"?f=Un(r,g):r.valueType==="item"?f=g:f=zt(r,g)}p("update:modelValue",f),p("change",f,u)};if(xe({clear(){S.value!==-1&&(S.value=-1,b())}}),r.source){const f=()=>{const u=[],g=Se(r,gs);return h.value.forEach((w,T)=>{const C=zt(r,w),A=Df(r,w);let V={...g,label:C,disabled:A};const $=If(r,w,T);V={...V,...$},c.value&&(V.disabled=!0),i.value&&(V.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const M=s.slots.text(w);E.default=()=>[M]}else{const M=Un(r,w);E.default=()=>M}let B=t.h(l,V,E);u.push(B)}),u};return()=>{const u=f(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":k},w=t.h(o,g,{default:()=>u}),T={default:()=>w};T.label=s.slots.default,T.prepend=s.slots.prepend,T.append=s.slots.append,T.fixedPreTip=s.slots.fixedPreTip,T.fixedTip=s.slots.fixedTip;const C=Se(r,be,pe);return t.h(a,{...C,prop:`${r.prop}_item`},T)}}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":k},{default:()=>f})}}}}const{componentName:zf,create:Ff,scope:Rf}=G("radio-item"),_o=Ff(Lf(zf,Rf,Be,Kn,On)),Of=(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}=ht(),i=t.inject("parent",null),c=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,u=>{c.partialSelect=u});const m=t.computed(()=>!!i),p=t.computed(()=>m.value?i.value.value.includes(l.label):!!l.modelValue),d=t.computed(()=>m.value?i.position:l.textPosition);let h="";const S=(u,g)=>{h="click",s("update:modelValue",u),s("change",u,g)};t.watch(()=>l.modelValue,u=>{h=="click"?h="":s("change",u)});const y=()=>{const u=[];if(c.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const g=de(l.iconSize),w=l.indeterminateIcon??o;return u.push("fox-checkbox__icon--indeterminate"),l.disabled&&u.push("is-disabled"),t.h(w,{width:g,height:g,class:u})}}else if(p.value){if(r.checkedIcon)return r.checkedIcon();{const g=de(l.iconSize),w=l.checkedIcon??a;return u.push("fox-checkbox__icon"),l.disabled&&u.push("is-disabled"),t.h(w,{width:g,height:g,class:u})}}else{if(r.icon)return r.icon();{const g=de(l.iconSize),w=l.icon??n;return u.push("fox-checkbox__icon--unchecked"),l.disabled&&u.push("is-disabled"),t.h(w,{width:g,height:g,class:u})}}},k=()=>{const u=[`${e}__label`];return l.disabled&&u.push("is-disabled"),t.h("view",{class:u},r.default?.())},b=()=>{const u=[`${e}__button`];return p.value&&u.push(`${e}__button--active`),l.disabled&&u.push("is-disabled"),t.h("view",{class:u},r.default?.())},f=u=>{if(!(l.disabled||l.readonly)){if(p.value&&c.partialSelect){c.partialSelect=!1,S(p.value,r.default?.()[0].children);return}if(S(!p.value,r.default?.()[0].children),m.value){const g=i.value.value,w=i.max.value,{label:T}=l,C=g.indexOf(T);C>-1?g.splice(C,1):C<=-1&&(g.length<w||!w)&&g.push(T),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} ${d.value==="left"?`${e}--reverse`:""}`,onClick:f},[l.shape=="button"?b():[y(),k()]])}}),{componentName:Kf,create:Uf}=G("checkbox"),Hn=Uf(Of(Kf,{CheckNormal:oe.CheckNormal,Checked:oe.Checked,Indeterminate:oe.CheckDisabled})),{create:Hf,componentName:ys}=G("checkbox-group"),jn=Hf({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}=ht(),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(d=>{d?.disabled||p.push(d?.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)}),xe({toggleAll:i,toggleReverse:c}),()=>{const m={};return e.textAlign&&(m["text-align"]=e.textAlign),t.h("view",{class:`${ys} ${ys}--${e.direction}`,style:m},n.default?.())}}});function bs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(el(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Wn(e,r)===a)return l}return-1}function el(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Wn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function jf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Wf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Yf=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Xf(){const e=t.getCurrentInstance();return new Yf(e.proxy)}function Qf(e){return{text:e,value:e}}const Gf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},ks={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},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:[Array,String],default:[]}};function Jf(e,n,a,o,l){return{props:{...pe,...be,...Gf,...ks,...Zf},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ve(t.computed(()=>r.disabled)),c=Ve(t.computed(()=>r.readonly)),m=$e(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return i.value}},r.prop??s.attrs.name),d=Xf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,u])=>{if(f){const g=await d.load("checkbox",f,u);if(g.length>0)if(typeof g[0]=="string"){const C=g.map(A=>Qf(A));h.value=C}else h.value=g;else h.value=[]}},{immediate:!0});const S=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([f,u])=>{const g=[];Array.isArray(f)&&f.forEach(w=>{let T=bs(r,u,w,r.valueType);T!==-1&&g.push(T)}),!Me(g,S.value)&&(S.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return S.value.forEach(u=>{let g=h.value[u];f.push(Wn(r,g))}),f}),k=f=>{let u=[],g=[];if(h.value.length>0){const w=[];Array.isArray(f)&&f.forEach(T=>{let C=bs(r,h.value,T,"value");C!==-1&&w.push(C);const A=h.value[C];g.push(A),r.valueType==="text"?u.push(el(r,A)):r.valueType==="item"?u.push(A):u.push(Wn(r,A))}),S.value=w}else u=f;p("update:modelValue",u),p("change",u,g)},b=t.ref();if(xe({toggleAll:f=>{b.value.toggleAll(f)},toggleReverse:()=>{b.value.toggleReverse()}}),r.source){const f=()=>{const u=[],g=Se(r,ks);return h.value.forEach((w,T)=>{const C=Wn(r,w),A=jf(r,w);let V={...g,label:C,disabled:A};const $=Wf(r,w,T);V={...V,...$},i.value&&(V.disabled=!0),c.value&&(V.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(E.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const M=s.slots.text(w);E.default=()=>[M]}else{const M=el(r,w);E.default=()=>M}let B=t.h(l,V,E);u.push(B)}),u};return()=>{const u=f(),g={class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":k},w=t.h(o,g,{default:()=>u}),T={default:()=>w};T.label=s.slots.default,T.prepend=s.slots.prepend,T.append=s.slots.append,T.fixedPreTip=s.slots.fixedPreTip,T.fixedTip=s.slots.fixedTip;const C=Se(r,be,pe);return t.h(a,{...C,prop:`${r.prop}_item`},T)}}else return()=>{const f=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:b,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:m.value,modelValue:y,"onUpdate:modelValue":k},{default:()=>f})}}}}const{componentName:_f,create:em,scope:tm}=G("checkbox-item"),tl=em(Jf(_f,tm,Be,jn,Hn)),nl={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:nm,create:om}=G("switch"),lm=om({components:{Loading1:oe.Loading1},props:{...nl},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=nm;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}}}),am={class:"fox-switch-button"};function rm(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",am,[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 Yn=te(lm,[["render",rm]]);function sm(e,n,a,o){return{props:{...pe,...be,...nl},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({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=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,nl),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":d},y=[],k=t.h(o,S);y.push(k);const b={default:()=>y};b.label=r.slots.default,b.fixedPreTip=r.slots.fixedPreTip,b.fixedTip=r.slots.fixedTip;const f=Se(l,be,pe);return f["content-class"]=m,t.h(a,{...f,prop:`${l.prop}_item`},b)}}}}const{componentName:im,create:cm,scope:dm}=G("switch-item"),ol=cm(sm(im,dm,Be,Yn));function um(e,n,a,o){return{props:{...pe,...be,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=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:m}=ie.useFoxI18n(n),p=m(l,["placeholder"]),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,M=>{d.value=M,c("change",M)});const h=t.computed(()=>({[`${e}`]:!0})),S=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!s.value&&ue(d.value),"is-disabled":s.value,"is-readonly":i.value})),y=$e(t.computed(()=>l.textAlign),"textAlign"),k=t.computed(()=>{const M={};return y.value&&(M["text-align"]=y.value),M}),b=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(d.value)?p.placeholder.value:d.value),u=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),w=t.computed(()=>{const M={};return y.value&&(M["text-align"]=y.value),M}),T=()=>{c("focus",d.value)},C=()=>{c("blur",d.value)},A=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),V=t.computed(()=>ke(l.unit)>0),$=M=>{s.value==!0||i.value==!0||c("click")},E=t.computed(()=>l.icon??a),B=t.computed(()=>({action:!0}));return()=>{const M=[];if(typeof r.slots.content=="function"){const v=r.slots.content();M.push(v)}else{const v=[];if(b.value){const F={tabIndex:0,class:S.value,style:k.value,onFocus:T,onBlur:C};let P=null;r.slots.main?P=t.h("view",F,[r.slots.main(f.value)]):P=t.h("view",F,[f.value]),v.push(P)}if(u.value){const F={tabIndex:0,class:g.value,style:w.value,onFocus:T,onBlur:C};let P=null;r.slots.sub?P=t.h("view",F,[r.slots.sub(l.desc)]):P=t.h("view",F,[l.desc]),v.push(P)}const z={class:h.value,onClick:$},x=t.h("view",z,v);M.push(x)}const L=[],I=de(l.iconSize);let D=r.slots.icon;if(!D){const v={width:I,height:I,class:["action-icon"]};D=t.h(E.value,v)}const R={class:B.value,onClick:$},q=t.h("view",R,{default:()=>[D]});if(L.push(q),V.value){const v=t.h("view",{},[l.unit]);L.push(v)}const W={class:A.value},H=t.h("view",W,{default:()=>L});M.push(H);const J={default:()=>M};J.label=r.slots.default,J.prepend=r.slots.prepend,J.append=r.slots.append,J.fixedPreTip=r.slots.fixedPreTip,J.fixedTip=r.slots.fixedTip;const ee=Se(l,be,pe);return t.h(o,{...ee,prop:`${l.prop}_item`},J)}}}}const{componentName:fm,create:mm,scope:pm}=G("link-item"),ll=mm(um(fm,pm,oe.ArrowRight,Be)),al={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:hm,componentName:gm}=G("rate"),ym=hm({props:{...al},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[gm]:!0})),r=S=>{n("update:modelValue",S),n("change",S)},s=(S,y)=>{if(e.disabled||e.readonly)return;let k=0;y===1&&e.modelValue===y||(k=y,e.allowHalf&&S==2&&(k-=.5)),r(k)},i=(S,y,k)=>{let b=0;for(let f=y.value.length-1;f>=0;f--){const u=y.value[f];if(S>u.offsetLeft){k?b=f+(S>u.offsetLeft+u.clientWidth/2?1:.5):b=f+1;break}}return b},c=_e(),m={onTouchStart(S){!e.touchable||e.readonly||c.start(S)},onTouchMove(S){e.touchable&&(c.move(S),c.isHorizontal()&&o.value&&(S.preventDefault(),r(i(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),d=t.computed(()=>e.customIcon??oe.StarFillN);return{classes:l,...m,onClick:s,toPxDesc:ge,renderIcon:(S,y)=>t.h(S,y),rateRefs:o,refRandomId:p,slots:a,customIcon:d}}}),bm=["id"],km={class:"fox-rate-item__icon--full"},Sm={key:0,class:"fox-rate-item__icon--half"},Cm={key:1,class:"fox-rate-item__icon--half"};function wm(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",km,[(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",Sm,[(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",Cm,[(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,bm))),128))],34)}const wt=te(ym,[["render",wm]]);function Nm(e,n,a,o){return{props:{...pe,...be,...al},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({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=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,al),disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d},y=[],k=t.h(o,S);y.push(k);const b={default:()=>y};if(r.slots.default){const g=r.slots.default();b.label=()=>g}const f=Se(l,be,pe);return f["content-class"]=m,t.h(a,f,b)}}}}const{componentName:Bm,create:Am,scope:Tm}=G("rate-item"),rl=Am(Nm(Bm,Tm,Be,wt)),Vm=/scroll|auto|overlay/i,Ss=window;function $m(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function sl(e,n=Ss){let a=e;for(;a&&a!==n&&$m(a);){const{overflowY:o}=window.getComputedStyle(a);if(Vm.test(o))return a;a=a.parentNode}return n}function Cs(e,n=Ss){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=sl(e.value,n))}),a}const ws=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Em={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:{...Em},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["pullText","loadText","loadMoreText"]),c=t.ref(),m=Cs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),d=t.computed(()=>({[e]:!0})),h=u=>u?u.offsetTop+h(u.offsetParent):0,S=()=>{let u=0,g=0,w="down";if(m.value==window){const T=ws();c.value&&(u=h(c.value)+c.value.offsetHeight-T-window.innerHeight),g=T}else{const{scrollHeight:T,clientHeight:C,scrollTop:A}=m.value;u=T-C-A,g=A}return p.beforeScrollTop>g?w="up":w="down",p.beforeScrollTop=g,l("scroll-change",g),u<=o.threshold&&w=="down"},y=()=>{Qe(()=>{if(!S()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},k=()=>{m.value&&m.value.addEventListener("scroll",y,o.useCapture)},b=()=>{m.value&&m.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{k(),o.immediate&&y()}),t.onUnmounted(()=>{b()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,k())}),t.onDeactivated(()=>{f.value=!0,b()}),t.watch(()=>o.modelValue,u=>{u||(p.isInfiniting=!1)}),()=>{const u={class:"fox-infinite__container"},g=t.h("view",u,[r?.default?.()]),w=[];if(p.isInfiniting){let V=r?.loading?.()??null;if(!V){let B=r?.loadingIcon?.()??null;if(!B){const I={class:["fox-infinite__bottom-box__img"]};B=t.h(a,I)}const M={class:"fox-infinite__bottom-box__text"},L=t.h("view",M,[i.loadText.value]);V=[B,L]}const $={class:"fox-infinite__bottom-box"},E=t.h("view",$,V);w.push(E)}else if(!o.hasMore){let V=r?.finished?.()??null;if(!V){const $={class:"fox-infinite__bottom-tips"};V=t.h("view",$,[i.loadMoreText.value]),w.push(V)}}const T={class:"fox-infinite__bottom"},C=t.h("view",T,w),A={class:d.value,ref:c};return t.h("view",A,[g,C])}}}}const{componentName:Im,create:xm,scope:qm}=G("infinite-loading"),Xn=xm(Dm(Im,qm,oe.Loading)),{componentName:vm,create:Mm}=G("button"),Pm=Mm({components:{Loading:oe.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),d=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=vm;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}}),S=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:d,classes:h,getStyle:S}}}),Lm={class:"fox-button__wrap"};function zm(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",Lm,[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 Le=te(Pm,[["render",zm]]),Fm={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"}},Rm=(e,n,a)=>({props:{...Fm},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}=ht(),{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["placeholder"]),c=t.reactive({active:!1}),m=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),d=$=>{let B=$.target.value;o.maxLength&&B.length>Number(o.maxLength)&&(B=B.slice(0,Number(o.maxLength))),r("update:modelValue",B,$),r("change",B,$)},h=t.ref({}),S=$=>{let B=$.target.value;c.active=!0,h.value=o.focusStyle,r("focus",B,$)},y=$=>{setTimeout(()=>{c.active=!1},0);let B=$.target.value;o.maxLength&&B.length>Number(o.maxLength)&&(B=B.slice(0,Number(o.maxLength))),h.value={},r("blur",B,$)},k=$=>{r("update:modelValue","",$),r("change","",$),r("clear","")},b=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const $={};return b.value||($.display="none"),$}),u=$=>{o.autoblur&&A.value?.blur(),(typeof $.cancelable!="boolean"||$.cancelable)&&$.preventDefault(),r("search",o.modelValue)},g=$=>{r("keyup-input",$)},w=$=>{r("click-input",$)},T=$=>{r("click-left-icon",o.modelValue,$)},C=t.computed(()=>({textAlign:o.inputAlign})),A=t.ref(null);t.onMounted(()=>{o.autofocus&&A.value.focus()});const V=()=>{const $=[];if(l.leftin){const R={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:T},q=t.h("view",R,[l.leftin()]);$.push(q)}const E={class:`${e}__input-inner-input`,ref:A,style:C.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:w,onInput:d,onFocus:S,onBlur:y,onkeyup:g},B=t.h("input",E),M={class:[`${e}__input-inner`],action:"#",onSubmit:u},L=t.h("form",M,[B]);$.push(L);const I=[];if(o.clearable){const R={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:k},q=l?.clear?.()??o.clearIcon??a,W=t.h("view",R,[t.h(q)]);I.push(W)}if(l.rightin){const R={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},q=t.h("view",R,[l.rightin()]);I.push(q)}if(I.length>0){const R={class:`${e}__input-inner-right`},q=t.h("view",R,I);$.push(q)}const D={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",D,$)};return()=>{const $=[];if(o.label){const M={class:`${e}__search-label`},L=t.h("span",M,[o.label]);$.push(L)}if(l.leftout){const M={class:[`${e}__search-icon`,`${e}__left-search-icon`]},L=t.h("view",M,[l.leftout()]);$.push(L)}const E=V();if($.push(E),l.rightout){const M={class:[`${e}__search-icon`,`${e}__right-search-icon`]},L=t.h("view",M,[l.rightout()]);$.push(L)}const B={class:`${e}`,style:m.value};return t.h("view",B,$)}}}),{componentName:Om,create:Km,scope:Um}=G("searchbar"),Qn=Km(Rm(Om,Um,oe.CircleClose)),Gn={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 Hm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Zn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Bs(e,r)===a)return l}return-1}function Zn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ns(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Bs(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function jm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Wm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Ym=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,d=p+l;d>m.length&&(d=m.length);const h=m.slice(p,d);return{totalSize:m.length,page:h}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,s]);const c=Ze(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(Ee(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function Xm(){const e=t.getCurrentInstance();return new Ym(e.proxy)}function Qm(e,n,a,o,l,r,s,i,c,m,p){return{props:{...Gn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(d,{slots:h}){const{emitEvent:S}=ht(),{toLocaleRefs:y}=ie.useFoxI18n(n),k=y(d,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),b=Xm(),f=t.ref([]),u=t.ref(0),g=t.ref(""),w=t.shallowRef(null),T=t.computed(()=>{const U={};return d.params&&Object.assign(U,d.params),ue(g.value)||(U[`${d.searchKey}`]=g.value),w.value&&Object.assign(U,w.value),U});let C=!0;const A=async(U,j,Q)=>{try{if($.value===!1)return;let O=null;ue(g.value)||(O=ne=>{const re=Zn(d,ne);if(typeof re=="string"&&re.includes(g.value))return!0;const se=Ns(d,ne);return!!(typeof se=="string"&&se.includes(g.value))});const Z=await b.load("actionsheet",U,j,Q,T.value,C,O??void 0);C=!1,Array.isArray(Z)?(f.value=Z,u.value=1,$.value=!1):!Array.isArray(Z.page)||Z.page.length===0?(console.warn("[FoxUI] can not load more data"),$.value=!1):(Reflect.apply([].push,f.value,Z.page),u.value=Math.ceil(f.value.length/d.pageSize),(Z.totalSize&&f.value.length>=Z.totalSize||Q<Z.page.length)&&($.value=!1)),V.value=!1}catch(O){console.error("[FoxUI] ActionSheet load more data fail",O),$.value=!0,u.value=0,f.value=[]}setTimeout(()=>{S("loaded-data")},250)},V=t.ref(!1),$=t.ref(!0),E=async()=>{if(!d.source){V.value=!1;return}await A(d.source,u.value+1,d.pageSize)};let B=null;t.watch(g,(U,j)=>{B&&(clearTimeout(B),B=null),ue(U)&&!ue(j)&&(B=setTimeout(()=>{L()},d.searchDelayTriggerClear))});const M=()=>{$.value=!0,u.value=0,f.value=[],d.source&&E()},L=()=>{M()};t.watch([()=>d.source,()=>d.pageSize,()=>d.params],async([U,j,Q])=>{d.source&&M()},{immediate:!0});const I=t.computed(()=>!d.multiple&&d.isAutoBackFill),D=t.ref([]);let R=null;const q=t.ref(d.visible);t.watch(()=>d.visible,U=>{q.value!==U&&(q.value=U),U?R=[...D.value]:R=null});const W=(U,j)=>{const Q=[];return Array.isArray(U)||(U=[U]),U.forEach(O=>{let Z=Hm(d,j,O,d.valueType);Z!==-1&&Q.push(Z)}),Me(Q,D.value)?!1:(D.value=Q,!0)};t.watch([()=>d.modelValue,()=>f.value],([U,j],[Q,O])=>{if(W(U,j)){const ne=H();J(ne)}},{deep:!0});const H=()=>{const U=[],j=[],Q=[];for(let re of D.value){const se=f.value[re];j.push(se);const ye=Zn(d,se);if(Q.push(ye),d.valueType==="item")U.push(se);else if(d.valueType==="text")U.push(ye);else{const Ce=Bs(d,se);U.push(Ce)}}let O=null,Z=null,ne=null;return d.multiple?(O=U,Z=Q,ne=j):(O=U[0]??null,Z=Q[0]??null,ne=j[0]??null),{value:O,text:Z,item:ne}},J=U=>{S("update:modelValue",U.value),S("update:text",U.text),S("change",U.value,U.item,U.text)},ee=()=>{R&&(D.value=R)},Y=U=>{const j=D.value.indexOf(U);d.multiple?j===-1?D.value.push(U):D.value.splice(j,1):j===-1?D.value=[U]:D.value=[],(I.value||!d.poppable&&!d.showFooter)&&x()},v=U=>{q.value=U,S("update:visible",U)},z=()=>{const U=()=>{ee(),v(!1)},j=d.beforeMethod??d.beforeClose;if(typeof j=="function"){const Q=j("close");dt(Q)?Q.then(O=>{O!==!1&&U()}).catch(()=>{U()}):Q!==!1&&U()}else U()},x=()=>{const U=H(),j=()=>{J(U),v(!1)},Q=d.beforeMethod??d.beforeClose;if(typeof Q=="function"){const O=Q("confirm",U.value,U.item,U.text);dt(O)?O.then(Z=>{Z!==!1&&j()}).catch(()=>{j()}):O!==!1&&j()}else j()},F=()=>{let U=k.title.value??"";h.title&&(U=h.title());const j=t.h("view",{class:["fox-actionsheet__header-title"]},[U]),Q=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:z});return t.h("view",{class:["fox-actionsheet__header"]},[j,Q])},P=()=>{let U=null;if(h.search)U=h.search();else{const j={onSearch:M,placeholder:k.seachPlaceholder.value,disabled:d.disabled,modelValue:g.value,"onUpdate:modelValue":Q=>{g.value=Q}};U=t.h(r,j,{leftin:()=>t.h(m)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[U])},K=(U,j,Q,O,Z)=>{if(h.optionLabel)return h.optionLabel({text:U,checked:j,disabled:Q,subText:O,item:Z});const ne=[],re=t.h("view",{class:"fox-actionsheet__list-item-text"},[U]);if(ne.push(re),O){const se=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[O]);ne.push(se)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ne)},X=(U,j,Q,O)=>{if(h.optionIcon)return h.optionIcon({checked:U,disabled:j,iconSize:Q,item:O});if(U){if(h.checkedIcon)return h.checkedIcon({disabled:j,item:O});{const Z=d.checkedIcon??i;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}else{if(h.icon)return h.icon({disabled:j,item:O});{const Z=d.icon??s;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}},_=()=>{const U=[];for(let j=0;j<f.value.length;j++){const Q=f.value[j],O=Zn(d,Q),Z=Ns(d,Q),ne=["fox-actionsheet__list-item"],re={};let se=jm(d,Q),ye=d.iconSize?de(d.iconSize):null;const Ce=Wm(d,Q,j);Ce&&(se=se||Ce.disabled,Ce.class&&ne.push(Ce.class),Ce.style&&Object.assign(re,Ce.style)),se=!!(d.disabled||se);const Xe=D.value.includes(j);se&&ne.push("is-disabled"),Xe&&ne.push("is-checked");const La={class:ne,style:re,key:`${j}`,onClick:()=>{se||Y(j)}};let _t=[];if(h.option)_t.push(h.option({item:Q,checked:Xe,disabled:se}));else{const lA=K(O,Xe,se,Z,Q);_t.push(lA);const aA=X(Xe,se,ye,Q);_t.push(aA),d.textPosition==="right"&&_t.reverse()}const oA=t.h("view",La,_t);U.push(oA)}return U},le=()=>{let U=[];if(h.buttons)U=h.buttons();else{const Q=t.h(l,{type:"primary",block:"block",onClick:x,disabled:d.disabled},{default:()=>k.confirmText.value});U.push(Q)}return t.h("view",{class:"fox-actionsheet__footer"},[U])};return xe({search:async(U=null,j=!0)=>{w.value=U&&t.toRaw(U),t.triggerRef(w),j&&($.value=!0,u.value=0,f.value=[]),t.nextTick(()=>{E()})},clear:()=>{$.value=!0,u.value=0,f.value=[]},confirm:()=>{x()},cancel:()=>{z()}}),()=>{const U=[];if(d.showHeader){const ye=F();U.push(ye)}if(d.showSearchbar){const ye=P();U.push(ye)}let j=null;if(h.content)j=h.content();else{const ye=_(),Ce={hasMore:$.value,loadText:k.loadText.value,loadMoreText:k.loadMoreText.value,modelValue:V.value,"onUpdate:modelValue":Xe=>{V.value=Xe},onLoadMore:E};j=t.h(o,Ce,{default:()=>ye})}const Q={};d.optionsHeight&&(Q.height=d.optionsHeight);const O={"fox-actionsheet__list":!0};d.poppable||(O["fox-actionsheet__list--inner"]=!0);const Z=t.h("view",{class:O,style:Q},[j]);if(U.push(Z),d.showFooter&&!I.value){const ye=le();U.push(ye)}const ne=t.h("view",{class:"fox-actionsheet"},U);if(!d.poppable)return ne;const re=["fox-actionsheet__popup"];d.popClass&&re.push(d.popClass);const se={popClass:re.join(" "),visible:q.value,closeable:!1,"onUpdate:visible":v,position:d.position,round:"round",onClickOverlay:z,closeOnClickOverlay:d.closeOnClickOverlay};return t.h(a,se,{default:()=>ne})}}}}const{componentName:Gm,create:Zm,scope:Jm}=G("actionsheet-pane"),Jn=Zm(Qm(Gm,Jm,fe,Xn,Le,Qn,oe.CheckNormal,oe.Checked,oe.Close,oe.Search2)),As={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 _m(e,n,a,o,l,r,s){return{props:{...pe,...be,...As,...Gn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const m=Ve(t.computed(()=>i.disabled)),p=Ie(t.computed(()=>i.readonly)),{emitEvent:d}=Te({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}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=ve(i,"modelValue",null,d),b=t.ref(""),f=t.computed(()=>Array.isArray(b.value)?b.value.join(i.separator):b.value),u="fox-input-item",g=t.computed(()=>({[u]:!0,"is-disabled":m.value,"is-readonly":p.value})),w=$e(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const x={};return w.value&&(x["text-align"]=w.value),x}),C=t.ref(!1),A=()=>{C.value=!0},V=x=>{C.value=x},$=x=>{k.value=x,d("update:modelValue",x)},E=(x,F)=>{d("change",x,F)},B=x=>{let P=x.target.value;y.value=!0,d("focus",P,x)},M=x=>{setTimeout(()=>{y.value=!1},0);let P=x.target.value;i.maxLength&&P.length>Number(i.maxLength)&&(P=P.slice(0,Number(i.maxLength))),d("blur",P,x)},L=x=>{b.value=x,d("update:text",x)},I=t.computed(()=>({[`${u}__append`]:!0,"is-disabled":m.value,"is-readonly":p.value})),D=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),q=t.computed(()=>({hidden:!R.value})),W=x=>{k.value="",d("update:modelValue","",x),d("change","",x),d("clear","")},H=t.computed(()=>i.clearable&&!m.value&&!p.value),J=t.computed(()=>ke(k.value)>0&&y.value),ee=x=>{J.value?W(x):A()},Y=t.computed(()=>J.value&&H.value?o:l),v=t.computed(()=>({action:!0})),z=t.ref(null);return xe({search:x=>{z.value&&z.value.search(x)},clear:()=>{z.value&&z.value.clear},confirm:x=>{z.value&&z.value.confirm()},cancel:()=>{z.value&&z.value.cancel()}}),()=>{const x={class:g.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:A,onFocus:B,onBlur:M};s&&(x.disabled=!0);const F=[],P=t.h("input",x);F.push(P);const K=[],X={class:["action-icon"]},_=t.h(Y.value,X),le={class:v.value,onClick:ee},U=t.h("view",le,{default:()=>[_]});if(K.push(U),D.value){const Ce=t.h("view",{class:q.value},[i.unit]);K.push(Ce)}const j={class:I.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Gn);Z.ref=z,Z.class=i.actionsheetProps,Z.disabled=m.value||p.value,Z.visible=C.value,Z["onUpdate:visible"]=V,Z.modelValue=k.value,Z["onUpdate:modelValue"]=$,Z.text=b.value,Z["onUpdate:text"]=L,Z.onChange=E,Z.poppable=!0,Z["text-position"]=i.textPosition;const ne={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},re=t.h(r,Z,ne);O.hide=()=>[re];const se=ut(i,As,Gn);return t.h(a,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:ep,create:tp,scope:np}=G("actionsheet-item"),il=tp(_m(ep,np,Be,oe.CircleClose,oe.ArrowRight,Jn)),cl={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:op,create:lp}=G("input-number"),ap=lp({components:{Minus:oe.Minus,Plus:oe.Plus},props:{...cl},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const S=op;return{[S]:!0,[`${S}--disabled`]:e.disabled}}),o=S=>Number(S).toFixed(Number(e.decimalPlaces)),l=S=>{const y=S.target;n("update:modelValue",y.valueAsNumber,S)},r=(S,y)=>{let k=o(S);n("update:modelValue",k,y),n("change",k,y)},s=(S=Number(e.modelValue))=>S<Number(e.max)&&!e.disabled,i=(S=Number(e.modelValue))=>S>Number(e.min)&&!e.disabled,c=S=>{if(n("reduce",S),i()){let y=Number(e.modelValue)-Number(e.step);r(y,S)}else n("overlimit",S,"reduce")},m=S=>{if(n("add",S),s()){let y=Number(e.modelValue)+Number(e.step);r(y,S)}else n("overlimit",S,"add")},p=S=>{e.disabled||e.readonly||n("focus",S)},d=S=>{if(e.disabled||e.readonly)return;let k=S.target.valueAsNumber;k<Number(e.min)?k=Number(e.min):k>Number(e.max)&&(k=Number(e.max)),r(k,S),n("blur",S)},h=S=>{let y=Number(S);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 S=h(e.modelValue);S!==Number(e.modelValue)&&r(S,{})}),{classes:a,change:l,blur:d,focus:p,add:m,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),rp=["min","max","disabled","readonly","value"];function sp(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,rp),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 et=te(ap,[["render",sp]]);function ip(e,n,a,o){return{props:{...pe,...be,...cl},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Ve(t.computed(()=>l.disabled)),i=Ie(t.computed(()=>l.readonly)),{emitEvent:c}=Te({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=ve(l,"modelValue",null,c),d=y=>{p.value=y,c("update:modelValue",y,{}),c("change",y,{})},h=y=>{c("add",y)},S=y=>{c("reduce",y)};return()=>{const y={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},k=Se(l,cl),f={...r.attrs,...k,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d,onAdd:h,onReduce:S},u=t.h(o,f,y),g=[];g.push(u);const w={default:()=>g};w.label=r.slots.default,w.fixedPreTip=r.slots.fixedPreTip,w.fixedTip=r.slots.fixedTip;const T=Se(l,be,pe);return T["content-class"]=m,t.h(a,{...T,prop:`${l.prop}_item`},w)}}}}const{componentName:cp,create:dp,scope:up}=G("inputnumber-item"),dl=dp(ip(cp,up,Be,et)),fp={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 mp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ts(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Vs(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function pp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function ul(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function $s(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Es(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function fl(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let hp=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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function gp(){const e=t.getCurrentInstance();return new hp(e.proxy)}function yp(e,n,a,o){return{props:{...fp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=gp(),m=t.ref([]),p=t.computed(()=>m.value.filter(v=>pp(l,v)!==!1)),d=t.ref(-1),h=()=>{const v=l.modelValue,z=p.value.findIndex(x=>Ts(l,x)===v);d.value!==z&&(d.value=z,l.scroll&&ee(z,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const S=v=>d.value===v,y=v=>{if(v<0&&v>=p.value.length)return!1;const z=p.value[v],F=(fl(l,z,v)??{}).status??ul(l,z);return S(v)||F},k=t.computed(()=>{const v={[i]:!0};return l.mode?v[`is-${l.mode}`]=!0:l.direction&&(v[`is-${l.direction}`]=!0),l.scroll&&(v["is-scroll"]=!0),v}),b=t.computed(()=>({})),f=(v,z,x,F,P)=>{const K={[`${i}__step`]:!0};return P&&(K[`${P}`]=!0),K[`${u.value}`]=!0,F&&(K["is-doit"]=!0),v===d.value?K["is-active"]=!0:z==="done"?K["is-done"]=!0:z==="error"?K["is-error"]=!0:z==="half"?K["is-half"]=!0:x?K["is-disabled"]=!0:K["is-normal"]=!0,K},u=t.computed(()=>{if(l.mode==="simple")return"start";let v=l.align;return v||(l.direction==="vertical"?v="start":v="center"),v}),g=(v,z={})=>{const x={...z};return u.value==="start"&&v===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},w=(v,z)=>{let x={};if(z<p.value.length-1){const F=z+1;y(z)&&y(F)?l.direction==="vertical"?x.height="100%":x.width="100%":x.opacity="0"}return x},T=v=>p.value.length-1===v,C=(v,z)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&z>d.value||d.value===z)return;const x=d.value,F=z;d.value=z,l.scroll&&ee(z,!1);const P=Ts(l,v);s("update:modelValue",P);const K={fromIndex:x,currentIndex:F,item:v,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",P,K)},A=t.ref(!0),V=async(v,z)=>{try{const x=await c.load("stesbar",v,z);Array.isArray(x)&&(m.value=x),A.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([v,z])=>{v&&V(v,z)},{immediate:!0});const $=(v,z,x,F,P)=>{let K=null;if(r.icon)K=r.icon({item:v,index:z,status:F});else if(F==="done"){const _={};l.iconSize&&(_.width=l.iconSize,_.height=l.iconSize);const le=l.icon??a;K=t.h(le,_)}else{const _=x??`${z+1}`;K=t.h("span",{},[_])}const X={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:v,index:z}),!P&&C(v,z)}};return t.h("view",X,[K])},E=(v,z,x)=>{const F=t.h("i",{class:"fox-steps-bar__line-inner",style:w(v,z)});return t.h("view",{class:"fox-steps-bar__line"},[F])},B=()=>{let v=null;if(r.markIcon)v=r.markIcon();else{const x={};l.iconSize&&(x.width=l.markIconSize,x.height=l.markIconSize);const F=l.markIcon??o;v=t.h(F,x)}return t.h("view",{class:"fox-steps-bar__mark"},[v])},M=(v,z,x,F,P)=>{const K=[];if(!T(z)){const le=E(v,z);K.push(le)}const X=$(v,z,x,F,P);K.push(X);const _={class:"fox-steps-bar__head"};return t.h("view",_,K)},L=(v,z,x,F)=>{let P=null;r.main?P=r.main({item:v,index:z,status:x}):P=mp(l,v);const K={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:v,index:z}),!F&&C(v,z)}};return t.h("view",K,[P])},I=(v,z,x)=>{let F=null;if(r.sub){F=r.sub({item:v,index:z,status:x});const P={class:"fox-steps-bar__sub"};return t.h("view",P,[F])}return null},D=(v,z)=>{const x=fl(l,v,z)??{},F=x.status??ul(l,v);let P=Vs(l,v);x.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const K=x.label??Es(l,v),X=[],_=$(v,z,K,F,P);_&&X.push(_);const le=L(v,z,F,P);if(le&&X.push(le),!T(z)){const ne=E(v,z);ne&&X.push(ne)}const U=t.h("view",{class:"fox-steps-bar__head"},X),j=x.class,Q=x.style??{};let O=$s(l,v);x.doit===!0&&(O=!0);const Z={ref:J(z),class:f(z,F,P,O,j),style:g(z,Q)};return t.h("view",Z,[U])},R=(v,z)=>{const x=fl(l,v,z)??{},F=x.status??ul(l,v);let P=Vs(l,v);x.disabled===!0&&(P=!0),l.disabled===!0&&(P=!0);const K=x.label??Es(l,v),X=[],_=l.layout;for(let O of _)if(O==="head"){const Z=M(v,z,K,F,P);X.push(Z)}else if(O==="main"){const Z=L(v,z,F,P);X.push(Z)}else if(O==="sub"){const Z=I(v,z,F);X.push(Z)}else if(O==="mark"){const Z=B();X.push(Z)}const le=x.class,U=x.style??{};let j=$s(l,v);x.doit===!0&&(j=!0);const Q={ref:J(z),class:f(z,F,P,j,le),style:g(z,U)};return t.h("view",Q,X)},q=t.ref(),W=t.ref([]),H=(v,z)=>{W.value[z]=v},J=v=>z=>{H(z,v)},ee=(v,z)=>{const x=q.value,F=W.value;if(!x||!F||!F[v])return;const P=F[v];let K=0;l.direction==="vertical"?K=P.offsetTop-(x.offsetHeight-P.offsetHeight)/2:K=P.offsetLeft-(x.offsetWidth-P.offsetWidth)/2,Y(x,K,z?0:.3,l.direction)},Y=(v,z,x,F)=>{let P=0;const K=F==="horizontal"?v.scrollLeft:v.scrollTop,X=x===0?1:Math.round(x*1e3/16);function _(){F==="horizontal"?v.scrollLeft+=(z-K)/X:v.scrollTop+=(z-K)/X,++P<X&&Ke(_)}_()};return()=>{const v=[];if(l.mode==="simple")for(let x=0;x<p.value.length;x++){const F=p.value[x],P=D(F,x);v.push(P)}else for(let x=0;x<p.value.length;x++){const F=p.value[x],P=R(F,x);v.push(P)}const z={ref:q,class:k.value,style:b.value};return t.h("view",z,v)}}}}const{componentName:bp,create:kp,scope:Sp}=G("steps-bar"),ml=kp(yp(bp,Sp,oe.Checklist,oe.ArrowRight));function Cp(e){e.stopPropagation()}class wp{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=Ro()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=Oo(),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),Cp(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 Np(e,n){return new wp(e,n)}const Bp={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:{...Bp},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 u=[`${e}`];return l.customClass&&u.push(l.customClass),u}),m=t.computed(()=>{const u={};return ue(i.top)||(u.top=i.top),ue(i.right)||(u.right=i.right),ue(i.bottom)||(u.bottom=i.bottom),ue(i.left)||(u.left=i.left),ue(l.width)||(u.width=l.width),ue(l.height)||(u.height=l.height),ue(l.color)||(u.color=l.color),ue(l.background)||(u.background=l.background),ue(l.borderRadius)||(u["border-radius"]=l.borderRadius),u}),p=t.computed(()=>({[`${e}__icon`]:!0})),d=()=>{s("click")},h=t.ref(null),S=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},y={x:0,y:0},f=Np(u=>{if(!h.value)return;const g=h.value;S(),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},u=>{if(!h.value)return;const g=h.value;S(),i.left=y.x+u.x,i.top=y.y+u.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const u=[h.value];f.open(u)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&f.close()}),()=>{let u=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)u=g;else{const T=t.h(a,{class:p.value});u.push(T)}const w={ref:T=>{h.value=T},class:c.value,style:m.value,onClick:d};return t.h("view",w,u)}}}),{componentName:Tp,create:Vp,scope:$p}=G("floating-button"),pl=Vp(Ap(Tp,$p,oe.Uploader,!1)),Ep={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:{...Ep},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const d={[`${e}`]:!0};return o.disabled?d[`${e}--disabled`]=!0:d[`${e}--${o.type}`]=!0,d}),s=ve(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 d=[];if(i.value){const b={class:c.value},f=t.h("span",b,[i.value]);d.push(f)}const h={class:m.value},S=o.icon??a,y=t.h(S,h);return d.push(y),o.textPosition==="right"&&d.reverse(),t.h("view",{class:r.value,onClick:p},d)}}}}const{componentName:Ip,create:xp,scope:qp}=G("more-button"),hl=xp(Dp(Ip,qp,oe.RectUp)),vp={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}},Mp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Pp(e,n,a){return{props:{...vp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,m=t.ref(!0),p=w=>{m.value=w},d=w=>{if(typeof o.unmount=="function")try{o.unmount()}catch(T){console.error(T)}if(typeof o.callback=="function")try{o.callback(w)}catch(T){console.error(T)}},h=()=>{d("confirm")},S=()=>{d("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&d("close")},k=(w,T)=>Mp(w)?(T.src=w,t.h("img",T)):typeof w=="string"?(Array.isArray(T.class)?T.class.push(w):T.class&&typeof T.class=="object"?T[`${w}`]=!0:typeof T.class=="string"?T.class=`${T.class}, ${w}`:T.class=w,t.h(o.tag,T)):t.h(w,T),b=()=>{const w=[];if(o.icon){const C={class:[`${c}__header-icon`]},A=k(o.icon,C);w.push(A)}if(o.title){const C=t.h("view",{class:`${c}__header-title`},[o.title]);w.push(C)}if(o.showClose&&o.closeIcon){const C={class:[`${c}__header-close-icon`],onClick:y},A=k(o.closeIcon,C);w.push(A)}const T={class:[`${c}__header`]};return t.h("view",T,w)},f=(w,T)=>{const C=[];if(T){const V={class:`${c}__group-title`},$=t.h("view",V,[T]);C.push($)}if(w){const V=[];Array.isArray(w)||(w=[w]);for(let $ of w){const E={class:`${c}__group-row`,innerHTML:$},B=t.h("view",E);V.push(B)}if(V.length>0){const $={class:`${c}__group-rows`},E=t.h("view",$,V);C.push(E)}}if(C.length===0)return null;const A={class:`${c}__group`};return t.h("view",A,C)},u=()=>{const w=[];if(typeof o.message=="string")w.push(o.message);else if(Array.isArray(o.message))for(let C of o.message)if(typeof C=="string"){const A=f(C);w.push(A)}else{const A=f(C.content,C.title);w.push(A)}else if(typeof o.message=="function"){const C=o.message();w.push(C)}else{const C=o.message;w.push(C)}const T={class:`${c}__body`};return t.h("view",T,w)},g=()=>{const w=[];if(o.showCancelButton){const C={class:[`${c}__footer-button`],style:{},onClick:S};o.cancelButtonClass&&C.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(C.style,o.cancleButtonStyle);const A=t.h("button",C,[o.cancelButtonText??i.cancelText.value]);w.push(A)}if(o.showConfirmButton){const C={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&C.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(C.style,o.confirmButtonStyle);const A=t.h("button",C,[o.confirmButtonText??i.confirmText.value]);w.push(A)}if(w.length===0)return null;const T={class:`${c}__footer`};return t.h("view",T,w)};return()=>{const w=[],T=b();T&&w.push(T);const C=u();C&&w.push(C);const A=g();A&&w.push(A);const V={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},$=t.h("view",V,w),E=[`${c}__popup`];o.popClass&&E.push(o.popClass);const B={};o.width&&(B.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(B.height=typeof o.height=="number"?`${o.height}px`:o.height);const M={popClass:E.join(" "),style:B,visible:m.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,M,{default:()=>$})}}}}const{componentName:Lp,create:zp,scope:Fp}=G("messagebox"),Rp=zp(Pp(Lp,Fp,fe)),Op="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",Kp="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",Up="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",Hp="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",jp=new $n,Wp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Yp=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-${jp.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(Rp,e);n.appendChild(o),t.render(r,o)},ct={show:(e,n,a,o)=>{const l={...Wp};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=Up:r==="warning"?l.icon=Hp:r==="error"?l.icon=Op:l.icon=Kp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=oe.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})},Yp(l)})},alert:(e,n,a)=>ct.show("alert",e,n,a),confirm:(e,n,a)=>ct.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ct.alert,e.config.globalProperties.$confirm=ct.confirm}},Xp=(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)},Qp=new $n,Gp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),Zp=e=>`${e}-${Qp.get()}`,Jp=Symbol.for("InnerPageScopeKey"),_p=Symbol.for("PageWrapperKey"),eh="FoxLeave",th="FoxLeaveEnd",nh={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 oh(e,n,a,o){return{props:{...Fe,...nh},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(Jp,!0);const c={};t.provide(_p,c);const m=C=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{m()},d=e,h=C=>{S.value=C,i("update:visible",C)},S=t.ref(!1),y=(C,A)=>Gp(C)?(A.src=C,t.h("img",A)):typeof C=="string"?(Array.isArray(A.class)?A.class.push(C):A.class&&typeof A.class=="object"?A[`${C}`]=!0:typeof A.class=="string"?A.class=`${A.class}, ${C}`:A.class=C,t.h(l.tag,A)):t.h(C,A),k=()=>{if(!l.showHeader)return null;const C=[];if(s.header){const V=s.header();C.push(V)}else if(l.title){const V=t.h("view",{class:`${d}__header-title`},[l.title]);C.push(V)}if(C.length===0)return null;const A={class:[`${d}__header`]};return t.h("view",A,C)},b=()=>{if(!l.showClose)return null;const C={class:[`${d}__close-icon`],onClick:p},A=l.closeIcon??o;return y(A,C)};let f=null;const u=C=>{Xp(th,{},f)},g=Zp(e),w=()=>{h(!0)},T=()=>{if(!f)return;const C=f.querySelector(".fox-overlay");C&&(C.classList.add("overlay-fade-leave-active"),C.classList.add("overlay-fade-leave-to"));const A=f.querySelector(".fox-popup");A&&(A.classList.add(`fox-popup-slide-${l.position}-leave-active`),A.classList.add(`fox-popup-slide-${l.position}-leave-to`),A.addEventListener("animationend",u,{once:!0}),A.addEventListener("transitionend",u,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${g}`),f?.addEventListener(eh,T,{once:!0}),w()}),()=>{const C=[],A=k();A&&C.push(A);const V=b();V&&C.push(V);const $=s.default?s.default():[];Reflect.apply([].push,C,$);const E={[`${d}`]:!0};l.mode&&(E[`${d}--${l.mode}`]=!0);const B={class:E},M=t.h("view",B,C),L=[`${d}__popup`,g];l.popClass&&L.push(l.popClass),l.position&&L.push(`${d}__popup--${l.position}`);const I={};l.width&&(I.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(I.height=typeof l.height=="number"?`${l.height}px`:l.height);const R={...Se(l,Fe),popClass:L.join(" "),style:I,visible:S.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},q=t.h(a,R,{default:()=>M});return t.h("div",{class:[`${d}__root`,g]},[q])}}}}const{componentName:lh,create:ah,scope:rh}=G("popup-wrapper"),gl=ah(oh(lh,rh,fe,oe.Close)),sh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function ih(e,n,a,o){return{props:{...sh},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),d={class:`${e}`};return t.h("view",d,[p])}}}}const{componentName:ch,create:dh,scope:uh}=G("dropdown"),yl=dh(ih(ch,uh,fe));function fh(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 mh={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 ph(e,n,a,o=!1){return{props:{...mh},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={},w=l.textColor??l.color;return w&&(g.color=w),g}),m=(g,w)=>{let T=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const C=l.highlightFilter;if(g.indexOf(C)!==-1){const V=g.replace(new RegExp(C,"g"),`<span>${C}</span>`);w.innerHTML=V,w.class["is-highlight"]=!0,T=t.h(l.tag,w)}}else if(typeof l.highlightFilter=="function"){const C=l.highlightFilter(g);C&&(w.innerHTML=C,w.class["is-highlight"]=!0,T=t.h(l.tag,w))}return T},p=g=>{r.emit("click",g)};let d="";const h=()=>{const g=s.value;if(!g)return;const w=g.clientWidth;fh(g,T=>{const C=g.innerHTML??"";ue(C)||T<w||(d?a?.show(g,C,{type:"text",id:d,showArrow:l.showArrow},!0):d=a?.show(g,C,{type:"text",showArrow:l.showArrow},!0)??"")})},S=()=>{d&&a?.hide(d)};let y=null;const k=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},b=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{S()},l.hideAfter??0)},f=()=>{const g=s.value;g&&(g.addEventListener("mouseover",k),g.addEventListener("mouseleave",b))},u=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",k),g.removeEventListener("mouseleave",b))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||u()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let w=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const V=r.slots.default();if(Array.isArray(V)&&V.length===1){const $=V[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=me(l.digits),B=me(l.decimalLength),M=he(l.autoPadding);let L=`${V[0].children}`,I=L.split("").reverse().join("");I=nn(I,B,M,E,l.separator),L=I.split("").reverse().join(""),l.highlightFilter!==void 0&&(w=m(L,g)),w||(g.innerHTML=L,w=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 $=V[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=`${V[0].children}`;w=m(E,g),w||(g.innerHTML=E,w=t.h(l.tag,g))}}}w||(w=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return w;let C=null;if(l.icon){const V={[`${e}__mark-wrap`]:!0};l.type&&(V[`${e}__mark-wrap--${l.type}`]=!0);const $={},E=l.color;E&&($.color=E);const B={class:V,style:$};C=t.h("view",B,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 $={},E=l.color;E&&($.color=E);const B={class:V,style:$};C=t.h("view",B,{default:r.slots.mark})}else{const V={[`${e}__mark`]:!0};l.type&&(V[`${e}__mark--${l.type??"default"}`]=!0);const $={},E=l.color;E&&($["background-color"]=E);const B={class:V,style:$};C=t.h("view",B)}const A={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",A,[C,w])}}}}const{componentName:hh,create:gh,scope:yh}=G("text"),bl=gh(ph(hh,yh,bt,!1));function bh(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],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[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 d=m.find(h=>h[o]===p);if(!d)break;s.push(d[a])}else{let c=n;for(let m=0;c&&m<r.length;m++){let p=r[m],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[a]),c=d[l]}}return s}class kh{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=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ee(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Sh(){const e=t.getCurrentInstance();return new kh(e.proxy)}const Ch={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 wh(e,n,a=!1){return{props:{...Ch},setup(o,{attrs:l,slots:r}){const s=Sh(),i=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,d])=>{i.value=await s.load(o.sourceType,p,d)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let p=bh(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:Nh,create:Bh,scope:Ah}=G("mapping"),kl=Bh(wh(Nh,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 fr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:dA,create:Vh,scope:uA}=G("domain-provider"),Sl=Vh(Th()),$h={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 Eh(e,n){return{inheritAttrs:!1,props:$h,setup(a,{slots:o}){if(nt&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const s=(h,S)=>{if(p===null){r.set(h,{visible:null,callback:S});return}l.has(h)&&p.unobserve(h),l.set(h,{visible:null,callback:S}),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;ji({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 d=(h,S,y)=>{p=new IntersectionObserver(k=>{for(let b of k){let f=!1;b.intersectionRatio>0&&(f=!0);const u=l.get(b.target);if(u)try{if(a.loadPolicy==="lazy"&&!f&&u.visible!==null)return;u.visible=f,u.callback(f)}catch(g){console.error(g)}}},{root:h,rootMargin:S,threshold:y}),r.forEach((k,b)=>{l.set(b,k),p?.observe(b)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([h,S])=>{if(S||!h||p)return;let y=null;typeof h=="string"?y=document.querySelector(h):y=h,y&&d(y,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:fA,create:Dh,scope:mA}=G("rolling-provider"),Cl=Dh(Eh()),{componentName:Ih,create:xh}=G("cell"),qh=xh({components:{Right:oe.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}}}),vh={key:0,class:"fox-cell__icon"},Mh={key:1,class:"fox-cell__title"},Ph={class:"title"},Lh={class:"fox-cell__title-desc"};function zh(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",vh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Mh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Ph,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Lh,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 wl=te(qh,[["render",zh]]),{componentName:Fh,create:Rh}=G("cell-group"),Oh=Rh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Fh]:!0}))}}}),Kh={key:1,class:"fox-cell-group__title"},Uh={key:3,class:"fox-cell-group__desc"},Hh={class:"fox-cell-group__wrap"};function jh(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",Kh,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",Uh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Hh,[t.renderSlot(e.$slots,"default")])],2)}const Nl=te(Oh,[["render",jh]]),{componentName:Wh,create:Yh}=G("image"),Xh=Yh({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:oe.Image,ImageError:oe.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 S=Wh;return{[S]:!0,[`${S}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const S={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(y=>{y.forEach(k=>{k.isIntersecting&&(r.value=!0,l.value.disconnect())})},S),s.value&&l.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let S={};return e.width&&(S.width=ge(e.width)),e.height&&(S.height=ge(e.height)),e.radius!==void 0&&e.radius!==null&&(S.overflow="hidden",S.borderRadius=ge(e.radius)),S}),m=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,S=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},d=()=>{a.isError=!0,a.loading=!1,n("error")},h=S=>{n("click",S)};return{...t.toRefs(a),imageClick:h,classes:o,styles:m,stylebox:c,error:d,load:p,show:r,imgRef:s}}}),Qh=["src","date-src","alt"],Gh={key:0,class:"fox-img-loading"},Zh={key:1,class:"fox-img-error"};function Jh(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,Qh),e.loading?(t.openBlock(),t.createElementBlock("div",Gh,[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",Zh,[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 Bl=te(Xh,[["render",Jh]]),{create:_h}=G("layout"),Al=_h({}),{componentName:eg,create:tg}=G("col"),ng=tg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=eg,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 og(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 Tl=te(ng,[["render",og]]),{componentName:lg,create:ag}=G("row"),rg=ag({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=lg;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)}
|