System.register(["./index-legacy-1cbe5d00.js","./Picker-legacy-ff7b2559.js","./index-legacy-b484c5ea.js"],(function(e,t){"use strict";var n,l,c,o,a,i,s,u,r,m,d,v,h,f,g;return{setters:[e=>{n=e.c,l=e.ai,c=e.ak,o=e.b,a=e.ah,i=e.d,s=e.r,u=e.e,r=e.w,m=e.a2,d=e.a,v=e.h,h=e.k},e=>{f=e.p},e=>{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 j({areaList:e,columnsNum:n,columnsPlaceholder:l}){const{city_list:c={},county_list:o={},province_list:a={}}=e,i=+n>1,s=+n>2,u=new Map;Object.keys(a).forEach((e=>{u.set(e.slice(0,2),b(a[e],e,(()=>{if(i)return l.length?[b(l[0],t,s?[]:void 0)]:[]})()))}));const r=new Map;if(i){const e=()=>{if(s)return l.length?[b(l[1])]:[]};Object.keys(c).forEach((t=>{const n=b(c[t],t,e());r.set(t.slice(0,4),n);const l=u.get(t.slice(0,2));l&&l.children.push(n)}))}s&&Object.keys(o).forEach((e=>{const t=r.get(e.slice(0,4));t&&t.children.push(b(o[e],e))}));const m=Array.from(u.values());if(l.length){const e=s?[b(l[2])]:void 0,n=i?[b(l[1],t,e)]:void 0;m.unshift(b(l[0],t,n))}return m}const[O,V]=n("area"),k=l({},c(f,y),{modelValue:String,columnsNum:o(3),columnsPlaceholder:a(),areaList:{type:Object,default:()=>({})}});var x=i({name:O,props:k,emits:["change","confirm","cancel","update:modelValue"],setup(e,{emit:t,slots:n}){const l=s([]),o=s(),a=u((()=>j(e))),i=(...e)=>t("change",...e),h=(...e)=>t("cancel",...e),f=(...e)=>t("confirm",...e);return r(l,(n=>{const l=n.length?n[n.length-1]:"";l&&l!==e.modelValue&&t("update:modelValue",l)}),{deep:!0}),r((()=>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}),m({confirm:()=>{var e;return null==(e=o.value)?void 0:e.confirm()},getSelectedOptions:()=>{var e;return(null==(e=o.value)?void 0:e.getSelectedOptions())||[]}}),()=>d(g,v({ref:o,modelValue:l.value,"onUpdate:modelValue":e=>l.value=e,class:V(),columns:a.value,onChange:i,onCancel:h,onConfirm:f},c(e,y)),c(n,p))}});e("A",h(x))}}}));
