System.register(["./index-legacy-fdce4919.js","./index-legacy-8883e09d.js"],(function(e,t){"use strict";var n,l,o,c,a,s,i,u,r,m,d,h,v,f,g;return{setters:[e=>{n=e.c,l=e.a9,o=e.b,c=e.ah,a=e.d,s=e.r,i=e.e,u=e.w,r=e.X,m=e.a,d=e.ae,h=e.h,v=e.k},e=>{f=e.p,g=e.P}],execute:function(){const t="000000",p=["title","cancel","confirm","toolbar","columns-top","columns-bottom"],y=["title","loading","readonly","optionHeight","swipeDuration","visibleOptionNum","cancelButtonText","confirmButtonText"],b=(e="",n=t,l=void 0)=>({text:e,value:n,children:l});function O({areaList:e,columnsNum:n,columnsPlaceholder:l}){const{city_list:o={},county_list:c={},province_list:a={}}=e,s=+n>1,i=+n>2,u=new Map;Object.keys(a).forEach((e=>{u.set(e.slice(0,2),b(a[e],e,(()=>{if(s)return l.length?[b(l[0],t,i?[]:void 0)]:[]})()))}));const r=new Map;if(s){const e=()=>{if(i)return l.length?[b(l[1])]:[]};Object.keys(o).forEach((t=>{const n=b(o[t],t,e());r.set(t.slice(0,4),n);const l=u.get(t.slice(0,2));l&&l.children.push(n)}))}i&&Object.keys(c).forEach((e=>{const t=r.get(e.slice(0,4));t&&t.children.push(b(c[e],e))}));const m=Array.from(u.values());if(l.length){const e=i?[b(l[2])]:void 0,n=s?[b(l[1],t,e)]:void 0;m.unshift(b(l[0],t,n))}return m}const[V,j]=n("area"),x=l({},f,{modelValue:String,columnsNum:o(3),columnsPlaceholder:c(),areaList:{type:Object,default:()=>({})}});var k=a({name:V,props:x,emits:["change","confirm","cancel","update:modelValue"],setup(e,{emit:t,slots:n}){const l=s([]),o=s(),c=i((()=>O(e))),a=(...e)=>t("change",...e),v=(...e)=>t("cancel",...e),f=(...e)=>t("confirm",...e);return u(l,(n=>{const l=n.length?n[n.length-1]:"";l&&l!==e.modelValue&&t("update:modelValue",l)}),{deep:!0}),u((()=>e.modelValue),(t=>{t?t!==(l.value.length?l.value[l.value.length-1]:"")&&(l.value=[`${t.slice(0,2)}0000`,`${t.slice(0,4)}00`,t].slice(0,+e.columnsNum)):l.value=[]}),{immediate:!0}),r({confirm:()=>{var e;return null==(e=o.value)?void 0:e.confirm()},getSelectedOptions:()=>{var e;return(null==(e=o.value)?void 0:e.getSelectedOptions())||[]}}),()=>m(g,h({ref:o,modelValue:l.value,"onUpdate:modelValue":e=>l.value=e,class:j(),columns:c.value,onChange:a,onCancel:v,onConfirm:f},d(e,y)),d(n,p))}});e("A",v(k))}}}));
