index-legacy-a5abbb51.js 95 KB

1
  1. System.register(["./forgotPassword-legacy-7a00fd61.js","./teacherIcon-legacy-3eeb62c3.js","./maleIcon-legacy-f2aee668.js","./index-legacy-b6402b5c.js","./index-legacy-85b6f873.js","./api-legacy-be074eef.js"],(function(e,t){"use strict";var o,n,r,a,i,l,s,d,c,u,h,f,g,p,m,v,b,y,w,C,x,k,_,P,T,A,S,R,B,M,I,D,L,E,N,O,F,z,j,U,$,q,K,H,G,V,W,Q,X,Y,J,Z,ee,te,oe,ne,re,ae,ie,le,se,de,ce,ue,he,fe,ge,pe,me,ve,be,ye,we,Ce,xe,ke,_e,Pe,Te,Ae,Se,Re,Be,Me,Ie,De,Le,Ee,Ne,Oe,Fe,ze,je,Ue,$e,qe,Ke,He,Ge,Ve,We=document.createElement("style");return We.textContent="._logo_1g0fd_1{position:relative;width:100Px;height:100Px;border-radius:50%;overflow:hidden}._logo_1g0fd_1 ._changeHead_1g0fd_8{position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.7);display:flex;justify-content:center;align-items:center;font-size:.83333vw;color:#fff;font-weight:600;transition:opacity .3s;border-radius:50%;cursor:pointer;opacity:0}._logo_1g0fd_1 ._changeHead_1g0fd_8:hover{opacity:1}._logo_1g0fd_1 ._uploadFile_1g0fd_29{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}._formWrap_1g0fd_37 .n-input{width:284Px;border-radius:8Px}._formWrap_1g0fd_37 .n-input .n-input__input-el{height:50Px;font-size:16Px}._formWrap_1g0fd_37 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._formWrap_1g0fd_37 .n-base-selection{height:50Px;width:284Px;border-radius:8Px}._formWrap_1g0fd_37 .n-base-selection .n-base-selection-label{height:50Px;font-size:16Px}._formWrap_1g0fd_37 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._schoolInfo_1g0fd_62 .n-form-item .n-form-item-label{color:#777}._schoolInfo_1g0fd_62 .n-button{border-radius:.41667vw}._schoolInfo_1g0fd_62 .n-data-table .n-data-table-th{background:#F7F7F8;color:#717172!important;border:none;min-height:54Px;font-size:15Px}._schoolInfo_1g0fd_62 .n-data-table.n-data-table--bordered .n-data-table-wrapper{border:none}._schoolInfo_1g0fd_62 .n-data-table-tr .n-data-table-td .n-button__content,._schoolInfo_1g0fd_62 .n-data-table .n-data-table-td{font-weight:700;font-size:15Px}._schoolInfo_1g0fd_62 ._errorBtn_1g0fd_83 .n-button__content{color:#ff4d4f}._addTeacher_1g0fd_86{padding:0;border-radius:16Px;overflow:hidden;min-width:456Px}._addTeacher_1g0fd_86 .n-dialog__close{transform:translateY(3Px)}._addTeacher_1g0fd_86 .n-dialog__title{min-height:70Px;justify-content:center;background:#F5F6FA}._addTeacher_1g0fd_86 .n-form{padding:20Px 0}._addTeacher_1g0fd_86 .n-input{border-radius:8Px}._addTeacher_1g0fd_86 .n-input .n-input__input-el{height:50Px;font-size:16Px}._addTeacher_1g0fd_86 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._addTeacher_1g0fd_86 .n-base-selection{border-radius:8Px}._addTeacher_1g0fd_86 .n-base-selection .n-base-selection-label{height:50Px;font-size:16Px}._addTeacher_1g0fd_86 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._addTeacher_1g0fd_86 .n-form-item-blank{padding-right:30Px}._addTeacher_1g0fd_86 .genderBtn{min-width:84Px;min-height:37Px;border-radius:8Px}._addTeacher_1g0fd_86 .n-form-item-label{color:#777;padding:0;font-size:18Px}._addTeacher_1g0fd_86 .n-form-item-label__text{height:50Px;display:flex;align-items:center;justify-content:center}._addTeacher_1g0fd_86 .nalert{padding:0 30Px}._addTeacher_1g0fd_86 .nalert .n-alert{background:#FFE8E8;text-align:center}._addTeacher_1g0fd_86 .nalert .n-alert-body .n-alert-body__content{color:#ea4132;font-size:14Px}._addTeacher_1g0fd_86 .actionBtn{width:156Px;height:47Px;font-size:18Px}._btnList_1g0fd_160{width:100%}._btnList_1g0fd_160 ._btn_1g0fd_160{width:144Px;height:45Px;border-radius:8Px;font-size:18Px;font-weight:600!important;margin-right:24Px}\n",document.head.appendChild(We),{setters:[e=>{o=e.s,n=e.F},e=>{r=e.d},e=>{a=e.m,i=e.f},e=>{l=e.co,s=e.cp,d=e.d,c=e.cq,u=e.bq,h=e.r,f=e.aQ,g=e.as,p=e.T,m=e.cr,v=e.cs,b=e.ct,y=e.cu,w=e.cv,C=e.cw,x=e.cx,k=e.cy,_=e.ay,P=e.$,T=e.cz,A=e.cA,S=e.cB,R=e.cC,B=e.cD,M=e.l,I=e.cE,D=e.cF,L=e.cG,E=e.cH,N=e.cI,O=e.bR,F=e.cJ,z=e.cK,j=e.cn,U=e.cL,$=e.cM,q=e.cN,K=e.cO,H=e.cP,G=e.cQ,V=e.cR,W=e.cS,Q=e.cT,X=e.cU,Y=e.cV,J=e.ci,Z=e.cW,ee=e.cX,te=e.cY,oe=e.aB,ne=e.w,re=e.b0,ae=e.cZ,ie=e.c_,le=e.c$,se=e.d0,de=e.d1,ce=e.d2,ue=e.d3,he=e.d4,fe=e.d5,ge=e.d6,pe=e.d7,me=e.aK,ve=e.cc,be=e.b,ye=e.c,we=e.e,Ce=e.q,xe=e.f,ke=e.o,_e=e.k,Pe=e.N,Te=e.ca,Ae=e.cb,Se=e.g,Re=e.h,Be=e.C,Me=e.B,Ie=e.j,De=e.y,Le=e.d8,Ee=e.a3,Ne=e.a_,Oe=e.a4,Fe=e.z,ze=e.d9,je=e.F,Ue=e.bW,$e=e.x,qe=e.A,Ke=e.a,He=e.m,Ge=e.n},e=>{Ve=e.U},null],execute:function(){const We=l("base-menu-mask","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 14px;\n overflow: hidden;\n",[s()]),Qe=d({name:"BaseMenuMask",props:{clsPrefix:{type:String,required:!0}},setup(e){c("-base-menu-mask",We,u(e,"clsPrefix"));const t=h(null);let o=null;const n=h(!1);f((()=>{null!==o&&window.clearTimeout(o)}));const r={showOnce(e,r=1500){o&&window.clearTimeout(o),n.value=!0,t.value=e,o=window.setTimeout((()=>{n.value=!1,t.value=null}),r)}};return Object.assign({message:t,show:n},r)},render(){return g(p,{name:"fade-in-transition"},{default:()=>this.show?g("div",{class:`${this.clsPrefix}-base-menu-mask`},this.message):null})}}),Xe=m({name:"Cascader",common:v,peers:{InternalSelectMenu:b,InternalSelection:y,Scrollbar:w,Checkbox:C,Empty:x},self:e=>{const{borderRadius:t,boxShadow2:o,popoverColor:n,textColor2:r,textColor3:a,primaryColor:i,textColorDisabled:l,dividerColor:s,hoverColor:d,fontSizeMedium:c,heightMedium:u}=e;return{menuBorderRadius:t,menuColor:n,menuBoxShadow:o,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:a,optionHeight:u,optionFontSize:c,optionColorHover:d,optionTextColor:r,optionTextColorActive:i,optionTextColorDisabled:l,optionCheckMarkColor:i,loadingColor:i,columnWidth:"180px"}}});function Ye(e){return e?e.map((e=>e.rawNode)):null}function Je(e,t,o){const n=[];for(;e;)n.push(e.rawNode[o]),e=e.parent;return n.reverse().join(t)}const Ze=k("n-cascader"),et=d({name:"NCascaderOption",props:{tmNode:{type:Object,required:!0}},setup(e){const{expandTriggerRef:t,remoteRef:o,multipleRef:n,mergedValueRef:r,checkedKeysRef:a,indeterminateKeysRef:i,hoverKeyPathRef:l,keyboardKeyRef:s,loadingKeySetRef:d,cascadeRef:c,mergedCheckStrategyRef:u,onLoadRef:h,mergedClsPrefixRef:f,mergedThemeRef:g,labelFieldRef:p,showCheckboxRef:m,updateHoverKey:v,updateKeyboardKey:b,addLoadingKey:y,deleteLoadingKey:w,closeMenu:C,doCheck:x,doUncheck:k,renderLabelRef:A}=_(Ze),S=P((()=>e.tmNode.key)),R=P((()=>{const{value:e}=t,{value:n}=o;return!n&&"hover"===e})),B=P((()=>{if(R.value)return $})),M=P((()=>{if(R.value)return q})),D=T((()=>{const{value:e}=n;return e?a.value.includes(S.value):r.value===S.value})),L=T((()=>!!n.value&&i.value.includes(S.value))),E=T((()=>l.value.includes(S.value))),N=T((()=>{const{value:e}=s;return null!==e&&e===S.value})),O=T((()=>!!o.value&&d.value.has(S.value))),F=P((()=>e.tmNode.isLeaf)),z=P((()=>e.tmNode.disabled)),j=P((()=>e.tmNode.rawNode[p.value])),U=P((()=>e.tmNode.shallowLoaded));function $(){if(!R.value||z.value)return;const{value:e}=S;v(e),b(e)}function q(){R.value&&$()}function K(){const{value:e}=n,{value:t}=S;e?L.value||D.value?k(t):x(t):(x(t),C(!0))}return{checkStrategy:u,multiple:n,cascade:c,checked:D,indeterminate:L,hoverPending:E,keyboardPending:N,isLoading:O,showCheckbox:m,isLeaf:F,disabled:z,label:j,mergedClsPrefix:f,mergedTheme:g,handleClick:function(t){if(z.value)return;const{value:n}=o,{value:r}=d,{value:a}=h,{value:i}=S,{value:l}=F,{value:s}=U;I(t,"checkbox")||(n&&!s&&!r.has(i)&&a&&(y(i),a(e.tmNode.rawNode).then((()=>{w(i)})).catch((()=>{w(i)}))),v(i),b(i)),l&&K()},handleCheckboxUpdateValue:function(){const{value:e}=F;e||K()},mergedHandleMouseEnter:B,mergedHandleMouseMove:M,renderLabel:A}},render(){const{mergedClsPrefix:e,renderLabel:t}=this;return g("div",{class:[`${e}-cascader-option`,{[`${e}-cascader-option--pending`]:this.keyboardPending||this.hoverPending,[`${e}-cascader-option--disabled`]:this.disabled,[`${e}-cascader-option--show-prefix`]:this.showCheckbox}],onMouseenter:this.mergedHandleMouseEnter,onMousemove:this.mergedHandleMouseMove,onClick:this.handleClick},this.showCheckbox?g("div",{class:`${e}-cascader-option__prefix`},g(M,{focusable:!1,"data-checkbox":!0,disabled:this.disabled,checked:this.checked,indeterminate:this.indeterminate,theme:this.mergedTheme.peers.Checkbox,themeOverrides:this.mergedTheme.peerOverrides.Checkbox,onUpdateChecked:this.handleCheckboxUpdateValue})):null,g("span",{class:`${e}-cascader-option__label`},t?t(this.tmNode.rawNode,this.checked):this.label),g("div",{class:`${e}-cascader-option__suffix`},g("div",{class:`${e}-cascader-option-icon-placeholder`},this.isLeaf?"child"!==this.checkStrategy||this.multiple&&this.cascade?null:g(p,{name:"fade-in-scale-up-transition"},{default:()=>this.checked?g(S,{clsPrefix:e,class:`${e}-cascader-option-icon ${e}-cascader-option-icon--checkmark`},{default:()=>g(B,null)}):null}):g(A,{clsPrefix:e,scale:.85,strokeWidth:24,show:this.isLoading,class:`${e}-cascader-option-icon`},{default:()=>g(S,{clsPrefix:e,key:"arrow",class:`${e}-cascader-option-icon ${e}-cascader-option-icon--arrow`},{default:()=>g(R,null)})}))))}}),tt=d({name:"CascaderSubmenu",props:{depth:{type:Number,required:!0},tmNodes:{type:Array,required:!0}},setup(){const{virtualScrollRef:e,mergedClsPrefixRef:t,mergedThemeRef:o,optionHeightRef:n}=_(Ze),r=h(null),a=h(null),i={scroll(t,o){var n,i;e.value?null===(n=a.value)||void 0===n||n.scrollTo({index:t}):null===(i=r.value)||void 0===i||i.scrollTo({index:t,elSize:o})}};return Object.assign({mergedClsPrefix:t,mergedTheme:o,scrollbarInstRef:r,vlInstRef:a,virtualScroll:e,itemSize:P((()=>D(n.value))),handleVlScroll:()=>{var e;null===(e=r.value)||void 0===e||e.sync()},getVlContainer:()=>{var e;return null===(e=a.value)||void 0===e?void 0:e.listElRef},getVlContent:()=>{var e;return null===(e=a.value)||void 0===e?void 0:e.itemsElRef}},i)},render(){const{mergedClsPrefix:e,mergedTheme:t,virtualScroll:o}=this;return g("div",{class:[o&&`${e}-cascader-submenu--virtual`,`${e}-cascader-submenu`]},g(L,{ref:"scrollbarInstRef",theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:o?this.getVlContainer:void 0,content:o?this.getVlContent:void 0},{default:()=>o?g(E,{items:this.tmNodes,itemSize:this.itemSize,onScroll:this.handleVlScroll,showScrollbar:!1,ref:"vlInstRef"},{default:({item:e})=>g(et,{key:e.key,tmNode:e})}):this.tmNodes.map((e=>g(et,{key:e.key,tmNode:e})))}))}}),ot=d({name:"NCascaderMenu",props:{value:[String,Number,Array],placement:{type:String,default:"bottom-start"},show:Boolean,menuModel:{type:Array,required:!0},loading:Boolean,onFocus:{type:Function,required:!0},onBlur:{type:Function,required:!0},onKeydown:{type:Function,required:!0},onMousedown:{type:Function,required:!0},onTabout:{type:Function,required:!0}},setup(e){const{localeRef:t,isMountedRef:o,mergedClsPrefixRef:n,syncCascaderMenuPosition:r,handleCascaderMenuClickOutside:a,mergedThemeRef:i}=_(Ze),l=[],s=h(null),d=h(null);N(d,(function(){r()}));const c={scroll(e,t,o){const n=l[e];n&&n.scroll(t,o)},showErrorMessage:function(e){var o;const{value:{loadingRequiredMessage:n}}=t;null===(o=s.value)||void 0===o||o.showOnce(n(e))}};return Object.assign({isMounted:o,mergedClsPrefix:n,selfElRef:d,submenuInstRefs:l,maskInstRef:s,mergedTheme:i,handleFocusin:function(t){const{value:o}=d;o&&(o.contains(t.relatedTarget)||e.onFocus(t))},handleFocusout:function(t){const{value:o}=d;o&&(o.contains(t.relatedTarget)||e.onBlur(t))},handleClickOutside:function(e){a(e)}},c)},render(){const{submenuInstRefs:e,mergedClsPrefix:t,mergedTheme:o}=this;return g(p,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.show?O(g("div",{tabindex:"0",ref:"selfElRef",class:`${t}-cascader-menu`,onMousedown:this.onMousedown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeydown:this.onKeydown},this.menuModel[0].length?g("div",{class:`${t}-cascader-submenu-wrapper`},this.menuModel.map(((t,o)=>g(tt,{ref:t=>{t&&(e[o]=t)},key:o,tmNodes:t,depth:o+1}))),g(Qe,{clsPrefix:t,ref:"maskInstRef"})):g("div",{class:`${t}-cascader-menu__empty`},z(this.$slots.empty,(()=>[g(j,{theme:o.peers.Empty,themeOverrides:o.peerOverrides.Empty})]))),U(this.$slots.action,(e=>e&&g("div",{class:`${t}-cascader-menu-action`,"data-action":!0},e))),g($,{onFocus:this.onTabout})),[[F,this.handleClickOutside,void 0,{capture:!0}]]):null})}}),nt=d({name:"NCascaderSelectMenu",props:{value:{type:[String,Number,Array],default:null},show:Boolean,pattern:{type:String,default:""},multiple:Boolean,tmNodes:{type:Array,default:()=>[]},filter:Function,labelField:{type:String,required:!0},separator:{type:String,required:!0}},setup(e){const{isMountedRef:t,mergedValueRef:o,mergedClsPrefixRef:n,mergedThemeRef:r,mergedCheckStrategyRef:a,slots:i,syncSelectMenuPosition:l,closeMenu:s,handleSelectMenuClickOutside:d,doUncheck:c,doCheck:u,clearPattern:f}=_(Ze),g=h(null),p=P((()=>function(e,t,o,n){const r=[],a=[];return function e(i){for(const l of i){if(l.disabled)continue;const{rawNode:i}=l;a.push(i),!l.isLeaf&&t||r.push({label:Je(l,n,o),value:l.key,rawNode:l.rawNode,path:Array.from(a)}),!l.isLeaf&&l.children&&e(l.children),a.pop()}}(e),r}(e.tmNodes,"child"===a.value,e.labelField,e.separator))),m=P((()=>{const{filter:t}=e;if(t)return t;const{labelField:o}=e;return(e,t,n)=>n.some((t=>t[o]&&~t[o].indexOf(e)))})),v=P((()=>{const{pattern:t}=e,{value:o}=m;return(t?p.value.filter((e=>o(t,e.rawNode,e.path))):p.value).map((e=>({value:e.value,label:e.label})))})),b=P((()=>q(v.value,K("value","children"))));function y(t){if(e.multiple){const{value:e}=o;Array.isArray(e)?e.includes(t.key)?c(t.key):u(t.key):null===e&&u(t.key),f()}else u(t.key),s(!0)}const w={prev:function(){var e;null===(e=g.value)||void 0===e||e.prev()},next:function(){var e;null===(e=g.value)||void 0===e||e.next()},enter:function(){var e;if(g){const t=null===(e=g.value)||void 0===e?void 0:e.getPendingTmNode();return t&&y(t),!0}return!1}};return Object.assign({isMounted:t,mergedTheme:r,mergedClsPrefix:n,menuInstRef:g,selectTreeMate:b,handleResize:function(){l()},handleToggle:function(e){y(e)},handleClickOutside:function(e){d(e)},cascaderSlots:i},w)},render(){const{mergedClsPrefix:e,isMounted:t,mergedTheme:o,cascaderSlots:n}=this;return g(p,{name:"fade-in-scale-up-transition",appear:t},{default:()=>this.show?O(g(H,{ref:"menuInstRef",onResize:this.handleResize,clsPrefix:e,class:`${e}-cascader-menu`,autoPending:!0,themeOverrides:o.peerOverrides.InternalSelectMenu,theme:o.peers.InternalSelectMenu,treeMate:this.selectTreeMate,multiple:this.multiple,value:this.value,onToggle:this.handleToggle},{empty:()=>z(n["not-found"],(()=>[]))}),[[F,this.handleClickOutside,void 0,{capture:!0}]]):null})}}),rt=G([l("cascader-menu","\n outline: none;\n position: relative;\n margin: 4px 0;\n display: flex;\n flex-flow: column nowrap;\n border-radius: var(--n-menu-border-radius);\n overflow: hidden;\n box-shadow: var(--n-menu-box-shadow);\n color: var(--n-option-text-color);\n background-color: var(--n-menu-color);\n ",[V({transformOrigin:"inherit",duration:"0.2s"}),W("empty","\n display: flex;\n padding: 12px 32px;\n flex: 1;\n justify-content: center;\n "),l("scrollbar",{width:"100%"}),l("base-menu-mask",{backgroundColor:"var(--n-menu-mask-color)"}),l("base-loading",{color:"var(--n-loading-color)"}),l("cascader-submenu-wrapper","\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n "),l("cascader-submenu","\n height: var(--n-menu-height);\n min-width: var(--n-column-width);\n position: relative;\n ",[Q("virtual","\n width: var(--n-column-width);\n "),l("scrollbar-content",{position:"relative"}),G("&:first-child","\n border-top-left-radius: var(--n-menu-border-radius);\n border-bottom-left-radius: var(--n-menu-border-radius);\n "),G("&:last-child","\n border-top-right-radius: var(--n-menu-border-radius);\n border-bottom-right-radius: var(--n-menu-border-radius);\n "),G("&:not(:first-child)","\n border-left: 1px solid var(--n-menu-divider-color);\n ")]),l("cascader-menu-action","\n box-sizing: border-box;\n padding: 8px;\n border-top: 1px solid var(--n-menu-divider-color);\n "),l("cascader-option","\n height: var(--n-option-height);\n line-height: var(--n-option-height);\n font-size: var(--n-option-font-size);\n padding: 0 0 0 18px;\n box-sizing: border-box;\n min-width: 182px;\n background-color: #0000;\n display: flex;\n align-items: center;\n white-space: nowrap;\n position: relative;\n cursor: pointer;\n transition:\n background-color .2s var(--n-bezier),\n color 0.2s var(--n-bezier);\n ",[Q("show-prefix",{paddingLeft:0}),W("label","\n flex: 1 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n "),W("prefix",{width:"32px",display:"flex",alignItems:"center",justifyContent:"center"}),W("suffix",{width:"32px",display:"flex",alignItems:"center",justifyContent:"center"}),l("cascader-option-icon-placeholder",{lineHeight:0,position:"relative",width:"16px",height:"16px",fontSize:"16px"},[l("cascader-option-icon",[Q("checkmark",{color:"var(--n-option-check-mark-color)"},[V({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})]),Q("arrow",{color:"var(--n-option-arrow-color)"})])]),Q("selected",{color:"var(--n-option-text-color-active)"}),Q("active",{color:"var(--n-option-text-color-active)",backgroundColor:"var(--n-option-color-hover)"}),Q("pending",{backgroundColor:"var(--n-option-color-hover)"}),G("&:hover",{backgroundColor:"var(--n-option-color-hover)"}),Q("disabled","\n color: var(--n-option-text-color-disabled);\n background-color: #0000;\n cursor: not-allowed;\n ",[l("cascader-option-icon",[Q("arrow",{color:"var(--n-option-text-color-disabled)"})])])])]),l("cascader","\n z-index: auto;\n position: relative;\n width: 100%;\n ")]),at=Object.assign(Object.assign({},Y.props),{allowCheckingNotLoaded:Boolean,to:te.propTo,bordered:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},value:[String,Number,Array],defaultValue:{type:[String,Number,Array],default:null},placeholder:String,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},disabledField:{type:String,default:"disabled"},expandTrigger:{type:String,default:"click"},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},remote:Boolean,onLoad:Function,separator:{type:String,default:" / "},filter:Function,placement:{type:String,default:"bottom-start"},cascade:{type:Boolean,default:!0},leafOnly:Boolean,showPath:{type:Boolean,default:!0},show:{type:Boolean,default:void 0},maxTagCount:[String,Number],menuProps:Object,filterMenuProps:Object,virtualScroll:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},valueField:{type:String,default:"value"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},renderLabel:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onBlur:Function,onFocus:Function,onChange:[Function,Array]}),it=d({name:"Cascader",props:at,setup(e,{slots:t}){const{mergedBorderedRef:o,mergedClsPrefixRef:n,namespaceRef:r,inlineThemeDisabled:a}=X(e),i=Y("Cascader","-cascader",rt,Xe,e,n),{localeRef:l}=J("Cascader"),s=h(e.defaultValue),d=P((()=>e.value)),c=Z(d,s),f=P((()=>e.leafOnly?"child":e.checkStrategy)),g=h(""),p=ee(e),{mergedSizeRef:m,mergedDisabledRef:v,mergedStatusRef:b}=p,y=h(null),w=h(null),C=h(null),x=h(null),k=h(null),_=h(new Set),T=h(null),A=h(null),S=te(e),R=h(!1),B=e=>{_.value.add(e)},M=e=>{_.value.delete(e)},L=P((()=>{const{valueField:t,childrenField:o,disabledField:n}=e;return q(e.options,{getDisabled:e=>e[n],getKey:e=>e[t],getChildren:e=>e[o]})})),E=P((()=>{const{cascade:t,multiple:o}=e;return o&&Array.isArray(c.value)?L.value.getCheckedKeys(c.value,{cascade:t,allowNotLoaded:e.allowCheckingNotLoaded}):{checkedKeys:[],indeterminateKeys:[]}})),N=P((()=>E.value.checkedKeys)),O=P((()=>E.value.indeterminateKeys)),F=P((()=>{const{treeNodePath:e,treeNode:t}=L.value.getPath(k.value);let o;return null===t?o=[L.value.treeNodes]:(o=e.map((e=>e.siblings)),t.isLeaf||_.value.has(t.key)||!t.children||o.push(t.children)),o})),z=P((()=>{const{keyPath:e}=L.value.getPath(k.value);return e})),j=P((()=>i.value.self.optionHeight));function U(t){const{onUpdateShow:o,"onUpdate:show":n}=e;o&&pe(o,t),n&&pe(n,t),de.value=t}function $(t,o,n){const{onUpdateValue:r,"onUpdate:value":a,onChange:i}=e,{nTriggerFormInput:l,nTriggerFormChange:d}=p;r&&pe(r,t,o,n),a&&pe(a,t,o,n),i&&pe(i,t,o,n),s.value=t,l(),d()}function K(e){x.value=e}function H(e){k.value=e}function G(e){const{value:{getNode:t}}=L;return e.map((e=>{var o;return(null===(o=t(e))||void 0===o?void 0:o.rawNode)||null}))}function V(t){var o;const{cascade:n,multiple:r,filterable:a}=e,{value:{check:i,getNode:l,getPath:s}}=L;if(r)try{const{checkedKeys:o}=i(t,E.value.checkedKeys,{cascade:n,checkStrategy:f.value,allowNotLoaded:e.allowCheckingNotLoaded});$(o,G(o),o.map((e=>{var t;return Ye(null===(t=s(e))||void 0===t?void 0:t.treeNodePath)}))),a&&Ce(),x.value=t,k.value=t}catch(d){if(!(d instanceof he))throw d;if(y.value){const o=l(t);null!==o&&y.value.showErrorMessage(o.rawNode[e.labelField])}}else if("child"===f.value){const e=l(t);if(!(null==e?void 0:e.isLeaf))return!1;$(t,e.rawNode,Ye(s(t).treeNodePath))}else{const e=l(t);$(t,(null==e?void 0:e.rawNode)||null,Ye(null===(o=s(t))||void 0===o?void 0:o.treeNodePath))}return!0}function W(t){const{cascade:o,multiple:n}=e;if(n){const{value:{uncheck:n,getNode:r,getPath:a}}=L,{checkedKeys:i}=n(t,E.value.checkedKeys,{cascade:o,checkStrategy:f.value,allowNotLoaded:e.allowCheckingNotLoaded});$(i,i.map((e=>{var t;return(null===(t=r(e))||void 0===t?void 0:t.rawNode)||null})),i.map((e=>{var t;return Ye(null===(t=a(e))||void 0===t?void 0:t.treeNodePath)}))),x.value=t,k.value=t}}oe(e.options)&&ne(e.options,((e,t)=>{e!==t&&(k.value=null,x.value=null)}));const Q=P((()=>{if(e.multiple){const{showPath:t,separator:o,labelField:n,cascade:r}=e,{getCheckedKeys:a,getNode:i}=L.value;return a(N.value,{cascade:r,checkStrategy:f.value,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys.map((e=>{const r=i(e);return null===r?{label:String(e),value:e}:{label:t?Je(r,o,n):r.rawNode[n],value:r.key}}))}return[]})),se=P((()=>{const{multiple:t,showPath:o,separator:n,labelField:r}=e,{value:a}=c;if(t||Array.isArray(a))return null;{const{getNode:e}=L.value;if(null===a)return null;const t=e(a);return null===t?{label:String(a),value:a}:{label:o?Je(t,n,r):t.rawNode[r],value:t.key}}})),de=h(!1),ce=u(e,"show"),ue=Z(ce,de),ve=P((()=>{const{placeholder:t}=e;return void 0!==t?t:l.value.placeholder})),be=P((()=>!(!e.filterable||!g.value)));function ye(t){const{onBlur:o}=e,{nTriggerFormBlur:n}=p;o&&pe(o,t),n()}function we(t){const{onFocus:o}=e,{nTriggerFormFocus:n}=p;o&&pe(o,t),n()}function Ce(){var e;null===(e=C.value)||void 0===e||e.focusInput()}function xe(){v.value||(g.value="",U(!0),e.filterable&&Ce())}function ke(e=!1){var t;e&&(null===(t=C.value)||void 0===t||t.focus()),U(!1),g.value=""}function _e(e){var t;be.value||ue.value&&((null===(t=C.value)||void 0===t?void 0:t.$el.contains(fe(e)))||ke())}function Pe(){e.clearFilterAfterSelect&&(g.value="")}function Te(t){var o,n,r;const{value:a}=x,{value:i}=L;switch(t){case"prev":if(null!==a){const e=i.getPrev(a,{loop:!0});null!==e&&(K(e.key),null===(o=y.value)||void 0===o||o.scroll(e.level,e.index,D(j.value)))}break;case"next":if(null===a){const e=i.getFirstAvailableNode();null!==e&&(K(e.key),null===(n=y.value)||void 0===n||n.scroll(e.level,e.index,D(j.value)))}else{const e=i.getNext(a,{loop:!0});null!==e&&(K(e.key),null===(r=y.value)||void 0===r||r.scroll(e.level,e.index,D(j.value)))}break;case"child":if(null!==a){const t=i.getNode(a);if(null!==t)if(t.shallowLoaded){const e=i.getChild(a);null!==e&&(H(a),K(e.key))}else{const{value:o}=_;if(!o.has(a)){B(a),H(a);const{onLoad:o}=e;o&&o(t.rawNode).then((()=>{M(a)})).catch((()=>{M(a)}))}}}break;case"parent":if(null!==a){const e=i.getParent(a);if(null!==e){K(e.key);const t=e.getParent();H(null===t?null:t.key)}}}}function Ae(t){var o,n;switch(t.key){case" ":case"ArrowDown":case"ArrowUp":if(e.filterable&&ue.value)break;t.preventDefault()}if(!I(t,"action"))switch(t.key){case" ":if(e.filterable)return;case"Enter":if(ue.value){const{value:t}=be,{value:o}=x;if(t)w.value&&w.value.enter()&&Pe();else if(null!==o)if(N.value.includes(o)||O.value.includes(o))W(o);else{const t=V(o);!e.multiple&&t&&ke(!0)}}else xe();break;case"ArrowUp":t.preventDefault(),ue.value&&(be.value?null===(o=w.value)||void 0===o||o.prev():Te("prev"));break;case"ArrowDown":t.preventDefault(),ue.value?be.value?null===(n=w.value)||void 0===n||n.next():Te("next"):xe();break;case"ArrowLeft":t.preventDefault(),ue.value&&!be.value&&Te("parent");break;case"ArrowRight":t.preventDefault(),ue.value&&!be.value&&Te("child");break;case"Escape":ue.value&&(ge(t),ke(!0))}}function Se(){var e;null===(e=T.value)||void 0===e||e.syncPosition()}function Re(){var e;null===(e=A.value)||void 0===e||e.syncPosition()}ne(ue,(t=>{if(!t)return;if(e.multiple)return;const{value:o}=c;Array.isArray(o)||null===o?(x.value=null,k.value=null):(x.value=o,k.value=o,me((()=>{var e;if(!ue.value)return;const{value:t}=k;if(null!==c.value){const o=L.value.getNode(t);o&&(null===(e=y.value)||void 0===e||e.scroll(o.level,o.index,D(j.value)))}})))}),{immediate:!0});const Be=P((()=>!(!e.multiple||!e.cascade)||"child"!==f.value));re(Ze,{slots:t,mergedClsPrefixRef:n,mergedThemeRef:i,mergedValueRef:c,checkedKeysRef:N,indeterminateKeysRef:O,hoverKeyPathRef:z,mergedCheckStrategyRef:f,showCheckboxRef:Be,cascadeRef:u(e,"cascade"),multipleRef:u(e,"multiple"),keyboardKeyRef:x,hoverKeyRef:k,remoteRef:u(e,"remote"),loadingKeySetRef:_,expandTriggerRef:u(e,"expandTrigger"),isMountedRef:ae(),onLoadRef:u(e,"onLoad"),virtualScrollRef:u(e,"virtualScroll"),optionHeightRef:j,localeRef:l,labelFieldRef:u(e,"labelField"),renderLabelRef:u(e,"renderLabel"),syncCascaderMenuPosition:Re,syncSelectMenuPosition:Se,updateKeyboardKey:K,updateHoverKey:H,addLoadingKey:B,deleteLoadingKey:M,doCheck:V,doUncheck:W,closeMenu:ke,handleSelectMenuClickOutside:function(e){be.value&&_e(e)},handleCascaderMenuClickOutside:_e,clearPattern:Pe});const Me={focus:()=>{var e;null===(e=C.value)||void 0===e||e.focus()},blur:()=>{var e;null===(e=C.value)||void 0===e||e.blur()},getCheckedData:()=>{if(Be.value){const e=N.value;return{keys:e,options:G(e)}}return{keys:[],options:[]}},getIndeterminateData:()=>{if(Be.value){const e=O.value;return{keys:e,options:G(e)}}return{keys:[],options:[]}}},Ie=P((()=>{const{self:{optionArrowColor:e,optionTextColor:t,optionTextColorActive:o,optionTextColorDisabled:n,optionCheckMarkColor:r,menuColor:a,menuBoxShadow:l,menuDividerColor:s,menuBorderRadius:d,menuHeight:c,optionColorHover:u,optionHeight:h,optionFontSize:f,loadingColor:g,columnWidth:p},common:{cubicBezierEaseInOut:m}}=i.value;return{"--n-bezier":m,"--n-menu-border-radius":d,"--n-menu-box-shadow":l,"--n-menu-height":c,"--n-column-width":p,"--n-menu-color":a,"--n-menu-divider-color":s,"--n-option-height":h,"--n-option-font-size":f,"--n-option-text-color":t,"--n-option-text-color-disabled":n,"--n-option-text-color-active":o,"--n-option-color-hover":u,"--n-option-check-mark-color":r,"--n-option-arrow-color":e,"--n-menu-mask-color":ie(a,{alpha:.75}),"--n-loading-color":g}})),De=a?le("cascader",void 0,Ie,e):void 0;return Object.assign(Object.assign({},Me),{handleTriggerResize:function(){ue.value&&(be.value?Se():Re())},mergedStatus:b,selectMenuFollowerRef:T,cascaderMenuFollowerRef:A,triggerInstRef:C,selectMenuInstRef:w,cascaderMenuInstRef:y,mergedBordered:o,mergedClsPrefix:n,namespace:r,mergedValue:c,mergedShow:ue,showSelectMenu:be,pattern:g,treeMate:L,mergedSize:m,mergedDisabled:v,localizedPlaceholder:ve,selectedOption:se,selectedOptions:Q,adjustedTo:S,menuModel:F,handleMenuTabout:function(){ke(!0)},handleMenuFocus:function(e){var t;(null===(t=C.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!0,we(e))},handleMenuBlur:function(e){var t;(null===(t=C.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!1,ye(e))},handleMenuKeydown:function(e){Ae(e)},handleMenuMousedown:function(t){I(t,"action")||e.multiple&&e.filter&&(t.preventDefault(),Ce())},handleTriggerFocus:function(e){var t;(null===(t=y.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!0,we(e))},handleTriggerBlur:function(e){var t;(null===(t=y.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!1,ye(e),ke())},handleTriggerClick:function(){e.filterable?xe():ue.value?ke(!0):xe()},handleClear:function(t){t.stopPropagation(),e.multiple?$([],[],[]):$(null,null,null)},handleDeleteOption:function(t){const{multiple:o}=e,{value:n}=c;o&&Array.isArray(n)&&void 0!==t.value?W(t.value):$(null,null,null)},handlePatternInput:function(e){g.value=e.target.value},handleKeydown:Ae,focused:R,optionHeight:j,mergedTheme:i,cssVars:a?void 0:Ie,themeClass:null==De?void 0:De.themeClass,onRender:null==De?void 0:De.onRender})},render(){const{mergedClsPrefix:e}=this;return g("div",{class:`${e}-cascader`},g(se,null,{default:()=>[g(de,null,{default:()=>g(ce,{onResize:this.handleTriggerResize,ref:"triggerInstRef",status:this.mergedStatus,clsPrefix:e,maxTagCount:this.maxTagCount,bordered:this.mergedBordered,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,active:this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,focused:this.focused,onFocus:this.handleTriggerFocus,onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onClear:this.handleClear,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onKeydown:this.handleKeydown},{arrow:()=>{var e,t;return null===(t=(e=this.$slots).arrow)||void 0===t?void 0:t.call(e)}})}),g(ue,{key:"cascaderMenu",ref:"cascaderMenuFollowerRef",show:this.mergedShow&&!this.showSelectMenu,containerClass:this.namespace,placement:this.placement,width:this.options.length?void 0:"target",teleportDisabled:this.adjustedTo===te.tdkey,to:this.adjustedTo},{default:()=>{var e;null===(e=this.onRender)||void 0===e||e.call(this);const{menuProps:t}=this;return g(ot,Object.assign({},t,{ref:"cascaderMenuInstRef",class:[this.themeClass,null==t?void 0:t.class],value:this.mergedValue,show:this.mergedShow&&!this.showSelectMenu,menuModel:this.menuModel,style:[this.cssVars,null==t?void 0:t.style],onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onMousedown:this.handleMenuMousedown,onTabout:this.handleMenuTabout}),{action:()=>{var e,t;return null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e)},empty:()=>{var e,t;return null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e)}})}}),g(ue,{key:"selectMenu",ref:"selectMenuFollowerRef",show:this.mergedShow&&this.showSelectMenu,containerClass:this.namespace,width:"target",placement:this.placement,to:this.adjustedTo,teleportDisabled:this.adjustedTo===te.tdkey},{default:()=>{var e;null===(e=this.onRender)||void 0===e||e.call(this);const{filterMenuProps:t}=this;return g(nt,Object.assign({},t,{ref:"selectMenuInstRef",class:[this.themeClass,null==t?void 0:t.class],value:this.mergedValue,show:this.mergedShow&&this.showSelectMenu,pattern:this.pattern,multiple:this.multiple,tmNodes:this.treeMate.treeNodes,filter:this.filter,labelField:this.labelField,separator:this.separator,style:[this.cssVars,null==t?void 0:t.style]}))}})]}))}}),lt=""+new URL("headerD-220e6507.png",t.meta.url).href,st=()=>ve.get("/edu-app/open/sysArea/queryAllProvince"),dt=d({name:"setting-personInfo",setup(){const e=be(),t=ye(),l=we({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),s=h(),d=we({provinceCode:t.info.provinceCode,cityCode:t.info.cityCode,regionCode:t.info.regionCode,nickname:t.info.nickname,phone:t.info.phone,gender:t.info.gender,schoolId:t.info.schoolInfos?.[0]?.id,tenantId:t.info.schoolInfos?.[0]?.tenantId,id:t.info.id,avatar:t.info.avatar}),c=we({disabled:!0,openChangePwd:!1,uploadShow:!0});return Ce((()=>{(async()=>{const e=await st();200===e?.code&&(l.areaList=e.data)})()})),()=>xe("div",{class:o.infoWrap},[xe("div",{class:o.teacherInfoWrap},[xe("div",{class:o.teacherHeadWrap},[xe(ke,{previewDisabled:!0,class:o.headerD,src:lt},null),xe(ke,{previewDisabled:!0,class:o.defultHeade,src:d.avatar||r},null),xe("div",{style:{display:c.disabled?"none":""},class:[o.defultHeade,o.changeHead]},[_e("修改头像"),c.uploadShow&&xe(Ve,{class:[o.uploadFile],cropper:!0,"onUpdate:fileList":e=>{d.avatar=e,c.uploadShow=!1,setTimeout((()=>{c.uploadShow=!0}),100)}},null)])]),xe("div",{class:o.headerInfo},[xe("p",{class:o.headerTitle},[t.info.nickname,xe(ke,{previewDisabled:!0,class:o.sexIcon,src:t.info.gender?a:i},null)]),xe("p",{class:o.headerSubTitle},[t.info.schoolInfos?.[0]?.name,_e(" | 音乐老师")])])]),xe("div",{class:o.setInfo},[xe(Pe,{ref:s,model:d,disabled:c.disabled},{default:()=>[xe(Te,{cols:3,"x-gap":"100"},{default:()=>[xe(Ae,null,{default:()=>[xe(Se,{label:"姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[xe(Re,{maxlength:14,bordered:!c.disabled,placeholder:"请填写老师姓名",value:d.nickname,"onUpdate:value":e=>d.nickname=e},null)]})]}),xe(Ae,null,{default:()=>[xe(Se,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写老师手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[xe(Re,{bordered:!c.disabled,placeholder:"请填写老师手机号",value:d.phone,"onUpdate:value":e=>d.phone=e},null)]})]}),xe(Ae,null,{default:()=>[xe(Se,{label:"性别",path:"sex"},{default:()=>[xe(Be,{bordered:!c.disabled,class:o.select,showArrow:!c.disabled,placeholder:"请选择性别",options:l.sexs,value:d.gender,"onUpdate:value":e=>d.gender=e},null)]})]})]}),xe(Se,{label:"城区",style:{maxWidth:"30%"}},{default:()=>[xe(it,{bordered:!c.disabled,options:l.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:t.info.regionCode||t.info.cityCode||t.info.provinceCode,"onUpdate:value":(e,t,o)=>{d.provinceCode=o[0]?.code,d.cityCode=o[1]?.code,d.regionCode=o[2]?.code}},null)]})]})]),c.disabled?xe(Me,{class:o.btnList,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:o.btn,color:"#198cfe",onClick:()=>c.openChangePwd=!0},{default:()=>[_e("修改密码")]}),xe(Ie,{class:o.btn,color:"#f24433",onClick:()=>c.disabled=!1},{default:()=>[_e("修改信息")]})]}):xe(Me,{class:o.btnList,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:o.btn,onClick:()=>{c.disabled=!0,s.value?.restoreValidation()}},{default:()=>[_e("取消")]}),xe(Ie,{class:o.btn,type:"primary",onClick:()=>{s.value.validate((async o=>{o||(d.provinceCode&&d.cityCode?(await Le(d),console.log(d),t.getInfo(),c.disabled=!0,e.success("修改成功")):e.error("请选择城区"))}))}},{default:()=>[_e("完成")]})]}),xe(De,{class:o.changePwdModal,show:c.openChangePwd,"onUpdate:show":e=>c.openChangePwd=e,preset:"dialog",showIcon:!1,title:"修改密码"},{default:()=>[xe(n,{phone:t.info.phone,onClose:()=>{c.openChangePwd=!1}},null)]})])}}),ct="_logo_1g0fd_1",ut="_changeHead_1g0fd_8",ht="_uploadFile_1g0fd_29",ft="_formWrap_1g0fd_37",gt="_schoolInfo_1g0fd_62",pt="_errorBtn_1g0fd_83",mt="_addTeacher_1g0fd_86",vt="_btnList_1g0fd_160",bt="_btn_1g0fd_160",yt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},wt=[Oe("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null,-1),Oe("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null,-1)],Ct=d({name:"Add",render:function(e,t){return Ne(),Ee("svg",yt,wt)}}),xt=d({name:"teacher-operation",emits:["close"],props:{areaList:{type:Array,default:()=>[]}},setup(e,{emit:t}){const o=ye(),n=we({provinceCode:"",cityCode:"",regionCode:"",tenantId:o.info.schoolInfos?.[0]?.tenantId,phone:null,schoolId:o.info.schoolInfos?.[0]?.id,nickname:null,gender:1}),r=h(!1),a=h(),i=be(),l=async()=>{a.value.validate((async e=>{if(!e){try{r.value=!0,await(o={...n},ve.post("/edu-app/teacher/add",{data:o})),i.success("添加成功")}catch(a){console.log(a)}var o;setTimeout((()=>{r.value=!1,t("close")}),100)}}))};return()=>xe("div",null,[xe(Pe,{model:n,ref:a,showRequireMark:!1,"label-placement":"left","label-width":"126"},{default:()=>[xe(Se,{label:"老师姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名",trigger:"blur"},{pattern:/^(?:[\u4e00-\u9fa5·]{2,16})$/,message:"请输入中文姓名,不要包含空格,及特殊符号",trigger:"blur"}]},{default:()=>[xe(Re,{value:n.nickname,"onUpdate:value":e=>n.nickname=e,placeholder:"请输入老师姓名",clearable:!0,maxlength:14},null)]}),xe(Se,{label:"老师性别",path:"gender",rule:[{required:!0,message:"请选择老师性别"}]},{default:()=>[xe(Me,null,{default:()=>[xe(Fe("n-button"),{class:"genderBtn",type:n.gender?"info":void 0,tertiary:!n.gender,onClick:()=>{n.gender=1}},{default:()=>[_e("男")]}),xe(Fe("n-button"),{class:"genderBtn",type:n.gender?void 0:"info",tertiary:!!n.gender,onClick:()=>{n.gender=0}},{default:()=>[_e("女")]})]})]}),xe(Se,{label:"城区",path:"provinceCode",rule:[{required:!0,message:"请选择城区",trigger:"change"}]},{default:()=>[xe(it,{to:"body",placeholder:"请选择城区",options:e.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover","onUpdate:value":(e,t,o)=>{n.provinceCode=o[0]?.code+"",n.cityCode=o[1]?.code,n.regionCode=o[2]?.code}},null)]}),xe(Se,{label:"手机号",path:"phone",rule:[{required:!0,message:"请输入正确的手机号码",trigger:"blur"},{pattern:/^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/,message:"请输入正确的手机号",trigger:"blur"}]},{default:()=>[xe(Re,{maxlength:11,value:n.phone,"onUpdate:value":e=>n.phone=e,placeholder:"请输入手机号",clearable:!0},null)]}),xe("div",{class:"nalert"},[xe(ze,{type:"error",showIcon:!1,bordered:!1},{default:()=>[_e("默认密码为ktyq+手机号后四位")]})])]}),xe(Me,{style:{padding:"20px 0 32px 0"},justify:"center"},{default:()=>[xe(Ie,{class:"actionBtn",round:!0,type:"default",onClick:()=>t("close")},{default:()=>[_e("取消")]}),xe(Ie,{class:"actionBtn",round:!0,type:"primary",onClick:()=>l(),loading:r.value},{default:()=>[_e("确定")]})]})])}});function kt(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function _t(e,t){for(var o,n="",r=0,a=-1,i=0,l=0;l<=e.length;++l){if(l<e.length)o=e.charCodeAt(l);else{if(47===o)break;o=47}if(47===o){if(a===l-1||1===i);else if(a!==l-1&&2===i){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",r=0):r=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),a=l,i=0;continue}}else if(2===n.length||1===n.length){n="",r=0,a=l,i=0;continue}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),r=l-a-1;a=l,i=0}else 46===o&&-1!==i?++i:i=-1}return n}var Pt={resolve:function(){for(var e,t="",o=!1,n=arguments.length-1;n>=-1&&!o;n--){var r;n>=0?r=arguments[n]:(void 0===e&&(e=process.cwd()),r=e),kt(r),0!==r.length&&(t=r+"/"+t,o=47===r.charCodeAt(0))}return t=_t(t,!o),o?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(kt(e),0===e.length)return".";var t=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=_t(e,!t)).length||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return kt(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var o=arguments[t];kt(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":Pt.normalize(e)},relative:function(e,t){if(kt(e),kt(t),e===t)return"";if((e=Pt.resolve(e))===(t=Pt.resolve(t)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var n=e.length,r=n-o,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var i=t.length-a,l=r<i?r:i,s=-1,d=0;d<=l;++d){if(d===l){if(i>l){if(47===t.charCodeAt(a+d))return t.slice(a+d+1);if(0===d)return t.slice(a+d)}else r>l&&(47===e.charCodeAt(o+d)?s=d:0===d&&(s=0));break}var c=e.charCodeAt(o+d);if(c!==t.charCodeAt(a+d))break;47===c&&(s=d)}var u="";for(d=o+s+1;d<=n;++d)d!==n&&47!==e.charCodeAt(d)||(0===u.length?u+="..":u+="/..");return u.length>0?u+t.slice(a+s):(a+=s,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(kt(e),0===e.length)return".";for(var t=e.charCodeAt(0),o=47===t,n=-1,r=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!r){n=a;break}}else r=!1;return-1===n?o?"/":".":o&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');kt(e);var o,n=0,r=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var i=t.length-1,l=-1;for(o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47===s){if(!a){n=o+1;break}}else-1===l&&(a=!1,l=o+1),i>=0&&(s===t.charCodeAt(i)?-1==--i&&(r=o):(i=-1,r=l))}return n===r?r=l:-1===r&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(47===e.charCodeAt(o)){if(!a){n=o+1;break}}else-1===r&&(a=!1,r=o+1);return-1===r?"":e.slice(n,r)},extname:function(e){kt(e);for(var t=-1,o=0,n=-1,r=!0,a=0,i=e.length-1;i>=0;--i){var l=e.charCodeAt(i);if(47!==l)-1===n&&(r=!1,n=i+1),46===l?-1===t?t=i:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){o=i+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===o+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var o=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return o?o===t.root?o+n:o+e+n:n}("/",e)},parse:function(e){kt(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var o,n=e.charCodeAt(0),r=47===n;r?(t.root="/",o=1):o=0;for(var a=-1,i=0,l=-1,s=!0,d=e.length-1,c=0;d>=o;--d)if(47!==(n=e.charCodeAt(d)))-1===l&&(s=!1,l=d+1),46===n?-1===a?a=d:1!==c&&(c=1):-1!==a&&(c=-1);else if(!s){i=d+1;break}return-1===a||-1===l||0===c||1===c&&a===l-1&&a===i+1?-1!==l&&(t.base=t.name=0===i&&r?e.slice(1,l):e.slice(i,l)):(0===i&&r?(t.name=e.slice(1,a),t.base=e.slice(1,l)):(t.name=e.slice(i,a),t.base=e.slice(i,l)),t.ext=e.slice(a,l)),i>0?t.dir=e.slice(0,i-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Pt.posix=Pt;const Tt=Pt.extname,At=Pt.basename;class St{constructor(){let e="undefined"==typeof global,t="image/png",o="image/jpeg",n="image/jpeg",r="image/webp",a="application/pdf",i="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:e?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:e?{png:t,jpg:o,jpeg:n,webp:r}:{png:t,jpg:o,jpeg:n,pdf:a,svg:i},mimes:e?{[t]:"png",[o]:"jpg",[r]:"webp"}:{[t]:"png",[o]:"jpg",[a]:"pdf",[i]:"svg"}})}toMime(e){return this.formats[(e||"").replace(/^\./,"").toLowerCase()]}fromMime(e){return this.mimes[e]}}class Rt{static for(e){return(new Rt).append(e).get()}constructor(){this.crc=-1}get(){return~this.crc}append(e){for(var t=0|this.crc,o=this.table,n=0,r=0|e.length;n<r;n++)t=t>>>8^o[255&(t^e[n])];return this.crc=t,this}}function Bt(e){let t=new Uint8Array(e),o=new DataView(t.buffer),n={array:t,view:o,size:e,set8:(e,t)=>(o.setUint8(e,t),n),set16:(e,t)=>(o.setUint16(e,t,!0),n),set32:(e,t)=>(o.setUint32(e,t,!0),n),bytes:(e,o)=>(t.set(o,e),n)};return n}Rt.prototype.table=(()=>{var e,t,o,n=[];for(e=0;e<256;e++){for(o=e,t=0;t<8;t++)o=1&o?o>>>1^3988292384:o>>>1;n[e]=o}return n})();class Mt{constructor(e){let t=new Date;Object.assign(this,{directory:e,offset:0,files:[],time:(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,date:(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate()}),this.add(e)}async add(e,t){let o=!t,n=Mt.encoder.encode(`${this.directory}/${o?"":e}`),r=new Uint8Array(o?0:await t.arrayBuffer()),a=30+n.length,i=a+r.length,{offset:l}=this,s=Bt(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,Rt.for(r)).set32(14,r.length).set32(18,r.length).set16(22,n.length);l+=a;let d=Bt(a+r.length+16).set32(0,67324752).bytes(4,s.array).bytes(30,n).bytes(a,r);l+=r.length,d.set32(i,134695760).bytes(i+4,s.array.slice(10,22)),l+=16,this.files.push({offset:l,folder:o,name:n,header:s,payload:d}),this.offset=l}toBuffer(){let e=this.files.reduce(((e,{name:t})=>46+t.length+e),0),t=Bt(e+22),o=0;for(var{offset:n,name:r,header:a,folder:i}of this.files)t.set32(o,33639248).set16(o+4,20).bytes(o+6,a.array).set8(o+38,i?16:0).set32(o+42,n).bytes(o+46,r),o+=46+r.length;t.set32(o,101010256).set16(o+8,this.files.length).set16(o+10,this.files.length).set32(o+12,e).set32(o+16,this.offset);let l=new Uint8Array(this.offset+t.size),s=0;for(var{payload:d}of this.files)l.set(d.array,s),s+=d.size;return l.set(t.array,s),l}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}Mt.encoder=new TextEncoder;const It=(e,t,o,n)=>{if(n){let{width:t,height:o}=e,r=Object.assign(document.createElement("canvas"),{width:t,height:o}),a=r.getContext("2d");a.fillStyle=n,a.fillRect(0,0,t,o),a.drawImage(e,0,0),e=r}return new Promise(((n,r)=>e.toBlob(n,t,o)))},Dt=(e,t)=>{const o=window.URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=o,n.setAttribute("download",e),void 0===n.download&&n.setAttribute("target","_blank"),document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((()=>window.URL.revokeObjectURL(o)),100)},Lt={asBuffer:(...e)=>It(...e).then((e=>e.arrayBuffer())),asDownload:async(e,t,o,n,r)=>{Dt(r,await It(e,t,o,n))},asZipDownload:async(e,t,o,n,r,a,i)=>{let l=At(r,".zip")||"archive",s=new Mt(l);await Promise.all(e.map((async(e,r)=>{let l=(e=>a.replace("{}",String(e+1).padStart(i,"0")))(r);await s.add(l,await It(e,t,o,n))}))),Dt(`${l}.zip`,s.blob)},atScale:(e,t,o)=>e.map((e=>{if(1==t&&!o)return e.canvas;let n=document.createElement("canvas"),r=n.getContext("2d"),a=e.canvas?e.canvas:e;return n.width=a.width*t,n.height=a.height*t,o&&(r.fillStyle=o,r.fillRect(0,0,n.width,n.height)),r.scale(t,t),r.drawImage(a,0,0),n})),options:function(e,{filename:t="",extension:o="",format:n,page:r,quality:a,matte:i,density:l,outline:s,archive:d}={}){var{fromMime:c,toMime:u,expected:h}=new St,f=(d=d||"canvas",n||o.replace(/@\d+x$/i,"")||Tt(t)),g=(n=c(u(f)||f),u(n)),p=e.length;if(!f)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!n)throw new Error(`Unsupported file format "${f}" (expected ${h})`);if(!p)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let m,v,b=t.replace(/{(\d*)}/g,((e,t)=>(v=!0,t=parseInt(t,10),m=isFinite(t)?t:isFinite(m)?m:-1,"{}"))),y=r>0?r-1:r<0?p+r:void 0;if(isFinite(y)&&y<0||y>=p)throw new RangeError(1==p?`Canvas only has a ‘page 1’ (${y} is out of bounds)`:`Canvas has pages 1–${p} (${y} is out of bounds)`);if(e=isFinite(y)?[e[y]]:v||"pdf"==n?e:e.slice(-1),void 0===a)a=.92;else if("number"!=typeof a||!isFinite(a)||a<0||a>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(void 0===l){let e=(o||At(t,f)).match(/@(\d+)x$/i);l=e?parseInt(e[1],10):1}else if("number"!=typeof l||!Number.isInteger(l)||l<1)throw new TypeError("The density option must be a non-negative integer");return void 0===s?s=!0:"svg"==n&&(s=!!s),{filename:t,pattern:b,format:n,mime:g,pages:e,padding:m,quality:a,matte:i,density:l,outline:s,archive:d}}},{asBuffer:Et,asDownload:Nt,asZipDownload:Ot,atScale:Ft,options:zt}=Lt,jt=Symbol.for("toDataURL"),{CanvasRenderingContext2D:Ut,CanvasGradient:$t,CanvasPattern:qt,Image:Kt,ImageData:Ht,Path2D:Gt,DOMMatrix:Vt,DOMRect:Wt,DOMPoint:Qt}=window,Xt={Canvas:class{constructor(e,t){let o=document.createElement("canvas"),n=[];for(var[r,a]of(Object.defineProperty(o,"async",{value:!0,writable:!1,enumerable:!0}),Object.entries({png:()=>Et(o,"image/png"),jpg:()=>Et(o,"image/jpeg"),pages:()=>n.concat(o).map((e=>e.getContext("2d")))})))Object.defineProperty(o,r,{get:a});return Object.assign(o,{width:e,height:t,newPage(...e){var{width:t,height:r}=o,a=Object.assign(document.createElement("canvas"),{width:t,height:r});a.getContext("2d").drawImage(o,0,0),n.push(a);var[t,r]=e.length?e:[t,r];return Object.assign(o,{width:t,height:r}).getContext("2d")},saveAs(e,t){t="number"==typeof t?{quality:t}:t;let o=zt(this.pages,{filename:e,...t}),{pattern:n,padding:r,mime:a,quality:i,matte:l,density:s,archive:d}=o,c=Ft(o.pages,s);return null==r?Nt(c[0],a,i,l,e):Ot(c,a,i,l,d,n,r)},toBuffer(e="png",t={}){t="number"==typeof t?{quality:t}:t;let o=zt(this.pages,{extension:e,...t}),{mime:n,quality:r,matte:a,pages:i,density:l}=o,s=Ft(i,l,a)[0];return Et(s,n,r,a)},[jt]:o.toDataURL.bind(o),toDataURL(e="png",t={}){t="number"==typeof t?{quality:t}:t;let n=zt(this.pages,{extension:e,...t}),{mime:r,quality:a,matte:i,pages:l,density:s}=n,d=Ft(l,s,i)[0],c=d[d===o?jt:"toDataURL"](r,a);return Promise.resolve(c)}})}},loadImage:e=>new Promise(((t,o)=>Object.assign(new Kt,{crossOrigin:"Anonymous",onload:t,onerror:o,src:e}))),CanvasRenderingContext2D:Ut,CanvasGradient:$t,CanvasPattern:qt,Image:Kt,ImageData:Ht,Path2D:Gt,DOMMatrix:Vt,DOMRect:Wt,DOMPoint:Qt},Yt=(e,t,o={},n=o)=>{if(Array.isArray(t))t.forEach((t=>Yt(e,t,o,n)));else if("function"==typeof t)t(e,o,n,Yt);else{const r=Object.keys(t)[0];Array.isArray(t[r])?(n[r]={},Yt(e,t[r],o,n[r])):n[r]=t[r](e,o,n,Yt)}return o},Jt=(e,t)=>(o,n,r,a)=>{t(o,n,r)&&a(o,e,n,r)},Zt=(e=0)=>t=>t.data[t.pos+e],eo=e=>t=>t.data.subarray(t.pos,t.pos+=e),to=e=>t=>t.data.subarray(t.pos,t.pos+e),oo=e=>t=>Array.from(eo(e)(t)).map((e=>String.fromCharCode(e))).join(""),no=e=>t=>{const o=eo(2)(t);return e?(o[1]<<8)+o[0]:(o[0]<<8)+o[1]},ro=(e,t)=>(o,n,r)=>{const a="function"==typeof t?t(o,n,r):t,i=eo(e),l=new Array(a);for(var s=0;s<a;s++)l[s]=i(o);return l},ao=e=>t=>{const o=(e=>e.data[e.pos++])(t),n=new Array(8);for(var r=0;r<8;r++)n[7-r]=!!(o&1<<r);return Object.keys(e).reduce(((t,o)=>{const r=e[o];return r.length?t[o]=((e,t,o)=>{for(var n=0,r=0;r<o;r++)n+=e[t+r]&&2**(o-r-1);return n})(n,r.index,r.length):t[o]=n[r.index],t}),{})};var io={blocks:e=>{const t=[],o=e.data.length;for(var n=0,r=(e=>e.data[e.pos++])(e);0!==r&&r;r=(e=>e.data[e.pos++])(e)){if(e.pos+r>=o){const r=o-e.pos;t.push(eo(r)(e)),n+=r;break}t.push(eo(r)(e)),n+=r}const a=new Uint8Array(n);for(var i=0,l=0;l<t.length;l++)a.set(t[l],i),i+=t[l].length;return a}};const lo=Jt({gce:[{codes:eo(2)},{byteSize:e=>e.data[e.pos++]},{extras:ao({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:no(!0)},{transparentColorIndex:e=>e.data[e.pos++]},{terminator:e=>e.data[e.pos++]}]},(e=>{var t=to(2)(e);return 33===t[0]&&249===t[1]})),so=Jt({image:[{code:e=>e.data[e.pos++]},{descriptor:[{left:no(!0)},{top:no(!0)},{width:no(!0)},{height:no(!0)},{lct:ao({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},Jt({lct:ro(3,((e,t,o)=>Math.pow(2,o.descriptor.lct.size+1)))},((e,t,o)=>o.descriptor.lct.exists)),{data:[{minCodeSize:e=>e.data[e.pos++]},io]}]},(e=>44===Zt()(e))),co=Jt({text:[{codes:eo(2)},{blockSize:e=>e.data[e.pos++]},{preData:(e,t,o)=>eo(o.text.blockSize)(e)},io]},(e=>{var t=to(2)(e);return 33===t[0]&&1===t[1]})),uo=Jt({application:[{codes:eo(2)},{blockSize:e=>e.data[e.pos++]},{id:(e,t,o)=>oo(o.blockSize)(e)},io]},(e=>{var t=to(2)(e);return 33===t[0]&&255===t[1]})),ho=Jt({comment:[{codes:eo(2)},io]},(e=>{var t=to(2)(e);return 33===t[0]&&254===t[1]})),fo=[{header:[{signature:oo(3)},{version:oo(3)}]},{lsd:[{width:no(!0)},{height:no(!0)},{gct:ao({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:e=>e.data[e.pos++]},{pixelAspectRatio:e=>e.data[e.pos++]}]},Jt({gct:ro(3,((e,t)=>Math.pow(2,t.lsd.gct.size+1)))},((e,t)=>t.lsd.gct.exists)),{frames:((e,t)=>(o,n,r,a)=>{const i=[];let l=o.pos;for(;t(o,n,r);){const t={};if(a(o,e,n,t),o.pos===l)break;l=o.pos,i.push(t)}return i})([lo,uo,ho,so,co],(e=>{var t=Zt()(e);return 33===t||44===t}))}],go=(e,t,o)=>{if(!e.image)return void console.warn("gif frame does not have associated image.");const{image:n}=e,r=n.descriptor.width*n.descriptor.height;var a=((e,t,o)=>{const n=4096,r=o;var a,i,l,s,d,c,u,h,f,g;const p=new Array(o),m=new Array(n),v=new Array(n),b=new Array(4097);for(d=1+(i=1<<(g=e)),a=i+2,u=-1,l=(1<<(s=g+1))-1,h=0;h<i;h++)m[h]=0,v[h]=h;var y,w,C,x,k,_;for(y=w=C=x=k=_=0,f=0;f<r;){if(0===x){if(w<s){y+=t[_]<<w,w+=8,_++;continue}if(h=y&l,y>>=s,w-=s,h>a||h==d)break;if(h==i){l=(1<<(s=g+1))-1,a=i+2,u=-1;continue}if(-1==u){b[x++]=v[h],u=h,C=h;continue}for(c=h,h==a&&(b[x++]=C,h=u);h>i;)b[x++]=v[h],h=m[h];C=255&v[h],b[x++]=C,a<n&&(m[a]=u,v[a]=C,0==(++a&l)&&a<n&&(s++,l+=a)),u=c}x--,p[k++]=b[x],f++}for(f=k;f<r;f++)p[f]=0;return p})(n.data.minCodeSize,n.data.blocks,r);n.descriptor.lct.interlaced&&(a=((e,t)=>{const o=new Array(e.length),n=e.length/t,r=function(n,r){const a=e.slice(r*t,(r+1)*t);o.splice.apply(o,[n*t,t].concat(a))},a=[0,4,2,1],i=[8,8,4,2];for(var l=0,s=0;s<4;s++)for(var d=a[s];d<n;d+=i[s])r(d,l),l++;return o})(a,n.descriptor.width));const i={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?i.colorTable=n.lct:i.colorTable=t,e.gce&&(i.delay=10*(e.gce.delay||10),i.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(i.transparentIndex=e.gce.transparentColorIndex)),o&&(i.patch=(e=>{const t=e.pixels.length,o=new Uint8ClampedArray(4*t);for(var n=0;n<t;n++){const t=4*n,r=e.pixels[n],a=e.colorTable[r];o[t]=a[0],o[t+1]=a[1],o[t+2]=a[2],o[t+3]=r!==e.transparentIndex?255:0}return o})(i)),i};function po(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=Number(e)?3:0)}class mo{constructor(e){this.mode=yo.MODE_8BIT_BYTE,this.parsedData=[],this.data=e;const t=[];for(let o=0,n=this.data.length;o<n;o++){const e=[],n=this.data.charCodeAt(o);n>65536?(e[0]=240|(1835008&n)>>>18,e[1]=128|(258048&n)>>>12,e[2]=128|(4032&n)>>>6,e[3]=128|63&n):n>2048?(e[0]=224|(61440&n)>>>12,e[1]=128|(4032&n)>>>6,e[2]=128|63&n):n>128?(e[0]=192|(1984&n)>>>6,e[1]=128|63&n):e[0]=n,t.push(e)}this.parsedData=Array.prototype.concat.apply([],t),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}getLength(){return this.parsedData.length}write(e){for(let t=0,o=this.parsedData.length;t<o;t++)e.put(this.parsedData[t],8)}}class vo{constructor(e=-1,t=bo.L){this.moduleCount=0,this.dataList=[],this.typeNumber=e,this.errorCorrectLevel=t,this.moduleCount=0,this.dataList=[]}addData(e){if(this.typeNumber<=0)this.typeNumber=function(e,t){for(var o=1,n=po(e),r=0,a=To.length;r<a;r++){var i=0;switch(t){case bo.L:i=To[r][0];break;case bo.M:i=To[r][1];break;case bo.Q:i=To[r][2];break;case bo.H:i=To[r][3]}if(n<=i)break;o++}if(o>To.length)throw new Error("Too long data");return o}(e,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error(`Invalid QR version: ${this.typeNumber}`);if(!function(e,t,o){const n=po(t),r=e-1;let a=0;switch(o){case bo.L:a=To[r][0];break;case bo.M:a=To[r][1];break;case bo.Q:a=To[r][2];break;case bo.H:a=To[r][3]}return n<=a}(this.typeNumber,e,this.errorCorrectLevel))throw new Error(`Data is too long for QR version: ${this.typeNumber}`)}const t=new mo(e);this.dataList.push(t),this.dataCache=void 0}isDark(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(`${e},${t}`);return this.modules[e][t]}getModuleCount(){return this.moduleCount}make(){this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(let o=0;o<this.moduleCount;o++){this.modules[o]=new Array(this.moduleCount);for(let e=0;e<this.moduleCount;e++)this.modules[o][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=vo.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)}setupPositionProbePattern(e,t){for(let o=-1;o<=7;o++)if(!(e+o<=-1||this.moduleCount<=e+o))for(let n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+o][t+n]=0<=o&&o<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==o||6==o)||2<=o&&o<=4&&2<=n&&n<=4)}getBestMaskPattern(){if(Number.isInteger(this.maskPattern)&&Object.values(wo).includes(this.maskPattern))return this.maskPattern;let e=0,t=0;for(let o=0;o<8;o++){this.makeImpl(!0,o);const n=Co.getLostPoint(this);(0==o||e>n)&&(e=n,t=o)}return t}setupTimingPattern(){for(let e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(let e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)}setupPositionAdjustPattern(){const e=Co.getPatternPosition(this.typeNumber);for(let t=0;t<e.length;t++)for(let o=0;o<e.length;o++){const n=e[t],r=e[o];if(null==this.modules[n][r])for(let e=-2;e<=2;e++)for(let t=-2;t<=2;t++)this.modules[n+e][r+t]=-2==e||2==e||-2==t||2==t||0==e&&0==t}}setupTypeNumber(e){const t=Co.getBCHTypeNumber(this.typeNumber);for(var o=0;o<18;o++){var n=!e&&1==(t>>o&1);this.modules[Math.floor(o/3)][o%3+this.moduleCount-8-3]=n}for(o=0;o<18;o++)n=!e&&1==(t>>o&1),this.modules[o%3+this.moduleCount-8-3][Math.floor(o/3)]=n}setupTypeInfo(e,t){const o=this.errorCorrectLevel<<3|t,n=Co.getBCHTypeInfo(o);for(var r=0;r<15;r++){var a=!e&&1==(n>>r&1);r<6?this.modules[r][8]=a:r<8?this.modules[r+1][8]=a:this.modules[this.moduleCount-15+r][8]=a}for(r=0;r<15;r++)a=!e&&1==(n>>r&1),r<8?this.modules[8][this.moduleCount-r-1]=a:r<9?this.modules[8][15-r-1+1]=a:this.modules[8][15-r-1]=a;this.modules[this.moduleCount-8][8]=!e}mapData(e,t){let o=-1,n=this.moduleCount-1,r=7,a=0;for(let i=this.moduleCount-1;i>0;i-=2)for(6==i&&i--;;){for(let o=0;o<2;o++)if(null==this.modules[n][i-o]){let l=!1;a<e.length&&(l=1==(e[a]>>>r&1)),Co.getMask(t,n,i-o)&&(l=!l),this.modules[n][i-o]=l,r--,-1==r&&(a++,r=7)}if(n+=o,n<0||this.moduleCount<=n){n-=o,o=-o;break}}}static createData(e,t,o){const n=_o.getRSBlocks(e,t),r=new Po;for(var a=0;a<o.length;a++){const t=o[a];r.put(t.mode,4),r.put(t.getLength(),Co.getLengthInBits(t.mode,e)),t.write(r)}let i=0;for(a=0;a<n.length;a++)i+=n[a].dataCount;if(r.getLengthInBits()>8*i)throw new Error(`code length overflow. (${r.getLengthInBits()}>${8*i})`);for(r.getLengthInBits()+4<=8*i&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*i||(r.put(vo.PAD0,8),r.getLengthInBits()>=8*i));)r.put(vo.PAD1,8);return vo.createBytes(r,n)}static createBytes(e,t){let o=0,n=0,r=0;const a=new Array(t.length),i=new Array(t.length);for(var l=0;l<t.length;l++){const d=t[l].dataCount,c=t[l].totalCount-d;n=Math.max(n,d),r=Math.max(r,c),a[l]=new Array(d);for(var s=0;s<a[l].length;s++)a[l][s]=255&e.buffer[s+o];o+=d;const u=Co.getErrorCorrectPolynomial(c),h=new ko(a[l],u.getLength()-1).mod(u);for(i[l]=new Array(u.getLength()-1),s=0;s<i[l].length;s++){const e=s+h.getLength()-i[l].length;i[l][s]=e>=0?h.get(e):0}}let d=0;for(s=0;s<t.length;s++)d+=t[s].totalCount;const c=new Array(d);let u=0;for(s=0;s<n;s++)for(l=0;l<t.length;l++)s<a[l].length&&(c[u++]=a[l][s]);for(s=0;s<r;s++)for(l=0;l<t.length;l++)s<i[l].length&&(c[u++]=i[l][s]);return c}}vo.PAD0=236,vo.PAD1=17;const bo={L:1,M:0,Q:3,H:2},yo={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},wo={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};class Co{static getBCHTypeInfo(e){let t=e<<10;for(;Co.getBCHDigit(t)-Co.getBCHDigit(Co.G15)>=0;)t^=Co.G15<<Co.getBCHDigit(t)-Co.getBCHDigit(Co.G15);return(e<<10|t)^Co.G15_MASK}static getBCHTypeNumber(e){let t=e<<12;for(;Co.getBCHDigit(t)-Co.getBCHDigit(Co.G18)>=0;)t^=Co.G18<<Co.getBCHDigit(t)-Co.getBCHDigit(Co.G18);return e<<12|t}static getBCHDigit(e){let t=0;for(;0!=e;)t++,e>>>=1;return t}static getPatternPosition(e){return Co.PATTERN_POSITION_TABLE[e-1]}static getMask(e,t,o){switch(e){case wo.PATTERN000:return(t+o)%2==0;case wo.PATTERN001:return t%2==0;case wo.PATTERN010:return o%3==0;case wo.PATTERN011:return(t+o)%3==0;case wo.PATTERN100:return(Math.floor(t/2)+Math.floor(o/3))%2==0;case wo.PATTERN101:return t*o%2+t*o%3==0;case wo.PATTERN110:return(t*o%2+t*o%3)%2==0;case wo.PATTERN111:return(t*o%3+(t+o)%2)%2==0;default:throw new Error(`bad maskPattern:${e}`)}}static getErrorCorrectPolynomial(e){let t=new ko([1],0);for(let o=0;o<e;o++)t=t.multiply(new ko([1,xo.gexp(o)],0));return t}static getLengthInBits(e,t){if(1<=t&&t<10)switch(e){case yo.MODE_NUMBER:return 10;case yo.MODE_ALPHA_NUM:return 9;case yo.MODE_8BIT_BYTE:case yo.MODE_KANJI:return 8;default:throw new Error(`mode:${e}`)}else if(t<27)switch(e){case yo.MODE_NUMBER:return 12;case yo.MODE_ALPHA_NUM:return 11;case yo.MODE_8BIT_BYTE:return 16;case yo.MODE_KANJI:return 10;default:throw new Error(`mode:${e}`)}else{if(!(t<41))throw new Error(`type:${t}`);switch(e){case yo.MODE_NUMBER:return 14;case yo.MODE_ALPHA_NUM:return 13;case yo.MODE_8BIT_BYTE:return 16;case yo.MODE_KANJI:return 12;default:throw new Error(`mode:${e}`)}}}static getLostPoint(e){const t=e.getModuleCount();let o=0;for(var n=0;n<t;n++)for(var r=0;r<t;r++){let a=0;const i=e.isDark(n,r);for(let o=-1;o<=1;o++)if(!(n+o<0||t<=n+o))for(let l=-1;l<=1;l++)r+l<0||t<=r+l||0==o&&0==l||i==e.isDark(n+o,r+l)&&a++;a>5&&(o+=3+a-5)}for(n=0;n<t-1;n++)for(r=0;r<t-1;r++){let t=0;e.isDark(n,r)&&t++,e.isDark(n+1,r)&&t++,e.isDark(n,r+1)&&t++,e.isDark(n+1,r+1)&&t++,0!=t&&4!=t||(o+=3)}for(n=0;n<t;n++)for(r=0;r<t-6;r++)e.isDark(n,r)&&!e.isDark(n,r+1)&&e.isDark(n,r+2)&&e.isDark(n,r+3)&&e.isDark(n,r+4)&&!e.isDark(n,r+5)&&e.isDark(n,r+6)&&(o+=40);for(r=0;r<t;r++)for(n=0;n<t-6;n++)e.isDark(n,r)&&!e.isDark(n+1,r)&&e.isDark(n+2,r)&&e.isDark(n+3,r)&&e.isDark(n+4,r)&&!e.isDark(n+5,r)&&e.isDark(n+6,r)&&(o+=40);let a=0;for(r=0;r<t;r++)for(n=0;n<t;n++)e.isDark(n,r)&&a++;return o+=Math.abs(100*a/t/t-50)/5*10,o}}Co.PATTERN_POSITION_TABLE=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Co.G15=1335,Co.G18=7973,Co.G15_MASK=21522;class xo{static glog(e){if(e<1)throw new Error(`glog(${e})`);return xo.LOG_TABLE[e]}static gexp(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return xo.EXP_TABLE[e]}}xo.EXP_TABLE=new Array(256),xo.LOG_TABLE=new Array(256),xo._constructor=function(){for(var e=0;e<8;e++)xo.EXP_TABLE[e]=1<<e;for(e=8;e<256;e++)xo.EXP_TABLE[e]=xo.EXP_TABLE[e-4]^xo.EXP_TABLE[e-5]^xo.EXP_TABLE[e-6]^xo.EXP_TABLE[e-8];for(e=0;e<255;e++)xo.LOG_TABLE[xo.EXP_TABLE[e]]=e}();class ko{constructor(e,t){if(null==e.length)throw new Error(`${e.length}/${t}`);let o=0;for(;o<e.length&&0==e[o];)o++;this.num=new Array(e.length-o+t);for(let n=0;n<e.length-o;n++)this.num[n]=e[n+o]}get(e){return this.num[e]}getLength(){return this.num.length}multiply(e){const t=new Array(this.getLength()+e.getLength()-1);for(let o=0;o<this.getLength();o++)for(let n=0;n<e.getLength();n++)t[o+n]^=xo.gexp(xo.glog(this.get(o))+xo.glog(e.get(n)));return new ko(t,0)}mod(e){if(this.getLength()-e.getLength()<0)return this;const t=xo.glog(this.get(0))-xo.glog(e.get(0)),o=new Array(this.getLength());for(var n=0;n<this.getLength();n++)o[n]=this.get(n);for(n=0;n<e.getLength();n++)o[n]^=xo.gexp(xo.glog(e.get(n))+t);return new ko(o,0).mod(e)}}class _o{constructor(e,t){this.totalCount=e,this.dataCount=t}static getRSBlocks(e,t){const o=_o.getRsBlockTable(e,t);if(null==o)throw new Error(`bad rs block @ typeNumber:${e}/errorCorrectLevel:${t}`);const n=o.length/3,r=[];for(let a=0;a<n;a++){const e=o[3*a+0],t=o[3*a+1],n=o[3*a+2];for(let o=0;o<e;o++)r.push(new _o(t,n))}return r}static getRsBlockTable(e,t){switch(t){case bo.L:return _o.RS_BLOCK_TABLE[4*(e-1)+0];case bo.M:return _o.RS_BLOCK_TABLE[4*(e-1)+1];case bo.Q:return _o.RS_BLOCK_TABLE[4*(e-1)+2];case bo.H:return _o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}}}_o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];class Po{constructor(){this.buffer=[],this.length=0}get(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)}put(e,t){for(let o=0;o<t;o++)this.putBit(1==(e>>>t-o-1&1))}getLengthInBits(){return this.length}putBit(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}const To=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];var Ao=256,So=1024,Ro=1<<18;function Bo(e,t){var o,n,r,a,i;function l(e,t,n,r,a){o[t][0]-=e*(o[t][0]-n)/So,o[t][1]-=e*(o[t][1]-r)/So,o[t][2]-=e*(o[t][2]-a)/So}function s(e,t,n,r,a){for(var l,s,d=Math.abs(t-e),c=Math.min(t+e,Ao),u=t+1,h=t-1,f=1;u<c||h>d;)s=i[f++],u<c&&((l=o[u++])[0]-=s*(l[0]-n)/Ro,l[1]-=s*(l[1]-r)/Ro,l[2]-=s*(l[2]-a)/Ro),h>d&&((l=o[h--])[0]-=s*(l[0]-n)/Ro,l[1]-=s*(l[1]-r)/Ro,l[2]-=s*(l[2]-a)/Ro)}function d(e,t,n){var i,l,s,d,c,u=~(1<<31),h=u,f=-1,g=f;for(i=0;i<Ao;i++)l=o[i],(s=Math.abs(l[0]-e)+Math.abs(l[1]-t)+Math.abs(l[2]-n))<u&&(u=s,f=i),(d=s-(r[i]>>12))<h&&(h=d,g=i),c=a[i]>>10,a[i]-=c,r[i]+=c<<10;return a[f]+=64,r[f]-=65536,g}this.buildColormap=function(){!function(){var e,t;for(o=[],n=new Int32Array(256),r=new Int32Array(Ao),a=new Int32Array(Ao),i=new Int32Array(32),e=0;e<Ao;e++)t=(e<<12)/Ao,o[e]=new Float64Array([t,t,t,0]),a[e]=256,r[e]=0}(),function(){var o,n,r,a,c,u,h=e.length,f=30+(t-1)/3,g=h/(3*t),p=~~(g/100),m=So,v=2048,b=v>>6;for(b<=1&&(b=0),o=0;o<b;o++)i[o]=m*(256*(b*b-o*o)/(b*b));h<1509?(t=1,n=3):n=h%499!=0?1497:h%491!=0?1473:h%487!=0?1461:1509;var y=0;for(o=0;o<g;)if(l(m,u=d(r=(255&e[y])<<4,a=(255&e[y+1])<<4,c=(255&e[y+2])<<4),r,a,c),0!==b&&s(b,u,r,a,c),(y+=n)>=h&&(y-=h),0===p&&(p=1),++o%p==0)for(m-=m/f,(b=(v-=v/30)>>6)<=1&&(b=0),u=0;u<b;u++)i[u]=m*(256*(b*b-u*u)/(b*b))}(),function(){for(var e=0;e<Ao;e++)o[e][0]>>=4,o[e][1]>>=4,o[e][2]>>=4,o[e][3]=e}(),function(){var e,t,r,a,i,l,s=0,d=0;for(e=0;e<Ao;e++){for(i=e,l=(r=o[e])[1],t=e+1;t<Ao;t++)(a=o[t])[1]<l&&(i=t,l=a[1]);if(a=o[i],e!=i&&(t=a[0],a[0]=r[0],r[0]=t,t=a[1],a[1]=r[1],r[1]=t,t=a[2],a[2]=r[2],r[2]=t,t=a[3],a[3]=r[3],r[3]=t),l!=s){for(n[s]=d+e>>1,t=s+1;t<l;t++)n[t]=e;s=l,d=e}}for(n[s]=d+255>>1,t=s+1;t<256;t++)n[t]=255}()},this.getColormap=function(){for(var e=[],t=[],n=0;n<Ao;n++)t[o[n][3]]=n;for(var r=0,a=0;a<Ao;a++){var i=t[a];e[r++]=o[i][0],e[r++]=o[i][1],e[r++]=o[i][2]}return e},this.lookupRGB=function(e,t,r){for(var a,i,l,s=1e3,d=-1,c=n[t],u=c-1;c<Ao||u>=0;)c<Ao&&((l=(i=o[c])[1]-t)>=s?c=Ao:(c++,l<0&&(l=-l),(a=i[0]-e)<0&&(a=-a),(l+=a)<s&&((a=i[2]-r)<0&&(a=-a),(l+=a)<s&&(s=l,d=i[3])))),u>=0&&((l=t-(i=o[u])[1])>=s?u=-1:(u--,l<0&&(l=-l),(a=i[0]-e)<0&&(a=-a),(l+=a)<s&&((a=i[2]-r)<0&&(a=-a),(l+=a)<s&&(s=l,d=i[3]))));return d}}var Mo=5003,Io=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function Do(e,t,o,n){var r,a,i,l,s,d,c,u,h,f=Math.max(2,n),g=new Uint8Array(256),p=new Int32Array(Mo),m=new Int32Array(Mo),v=0,b=0,y=!1;function w(e,t){g[a++]=e,a>=254&&k(t)}function C(e){x(Mo),b=s+2,y=!0,T(s,e)}function x(e){for(var t=0;t<e;++t)p[t]=-1}function k(e){a>0&&(e.writeByte(a),e.writeBytes(g,0,a),a=0)}function _(e){return(1<<e)-1}function P(){return 0===c?-1:(--c,255&o[u++])}function T(e,t){for(r&=Io[v],v>0?r|=e<<v:r=e,v+=h;v>=8;)w(255&r,t),r>>=8,v-=8;if((b>i||y)&&(y?(i=_(h=l),y=!1):(++h,i=12==h?4096:_(h))),e==d){for(;v>0;)w(255&r,t),r>>=8,v-=8;k(t)}}this.encode=function(o){o.writeByte(f),c=e*t,u=0,function(e,t){var o,n,r,c,u,f,g;for(y=!1,i=_(h=l=e),d=1+(s=1<<e-1),b=s+2,a=0,c=P(),g=0,o=Mo;o<65536;o*=2)++g;g=8-g,x(f=Mo),T(s,t);e:for(;-1!=(n=P());)if(o=(n<<12)+c,p[r=n<<g^c]!==o){if(p[r]>=0){u=f-r,0===r&&(u=1);do{if((r-=u)<0&&(r+=f),p[r]===o){c=m[r];continue e}}while(p[r]>=0)}T(c,t),c=n,b<4096?(m[r]=b++,p[r]=o):C(t)}else c=m[r];T(c,t),T(d,t)}(f+1,o),o.writeByte(0)}}function Lo(){this.page=-1,this.pages=[],this.newPage()}Lo.pageSize=4096,Lo.charMap={};for(var Eo=0;Eo<256;Eo++)Lo.charMap[Eo]=String.fromCharCode(Eo);function No(e,t){this.width=~~e,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.neuQuant=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.dither=!1,this.globalPalette=!1,this.out=new Lo}Lo.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(Lo.pageSize),this.cursor=0},Lo.prototype.getData=function(){for(var e="",t=0;t<this.pages.length;t++)for(var o=0;o<Lo.pageSize;o++)e+=Lo.charMap[this.pages[t][o]];return e},Lo.prototype.toFlattenUint8Array=function(){const e=[];for(var t=0;t<this.pages.length;t++)if(t===this.pages.length-1){const o=Uint8Array.from(this.pages[t].slice(0,this.cursor));e.push(o)}else e.push(this.pages[t]);const o=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));return e.reduce(((e,t)=>(o.set(t,e),e+t.length)),0),o},Lo.prototype.writeByte=function(e){this.cursor>=Lo.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=e},Lo.prototype.writeUTFBytes=function(e){for(var t=e.length,o=0;o<t;o++)this.writeByte(e.charCodeAt(o))},Lo.prototype.writeBytes=function(e,t,o){for(var n=o||e.length,r=t||0;r<n;r++)this.writeByte(e[r])},No.prototype.setDelay=function(e){this.delay=Math.round(e/10)},No.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)},No.prototype.setDispose=function(e){e>=0&&(this.dispose=e)},No.prototype.setRepeat=function(e){this.repeat=e},No.prototype.setTransparent=function(e){this.transparent=e},No.prototype.addFrame=function(e){this.image=e,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),!0===this.globalPalette&&(this.globalPalette=this.colorTab),this.firstFrame&&(this.writeHeader(),this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.globalPalette||this.writePalette(),this.writePixels(),this.firstFrame=!1},No.prototype.finish=function(){this.out.writeByte(59)},No.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},No.prototype.setDither=function(e){!0===e&&(e="FloydSteinberg"),this.dither=e},No.prototype.setGlobalPalette=function(e){this.globalPalette=e},No.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},No.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},No.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new Bo(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},No.prototype.indexPixels=function(e){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);for(var o=0,n=0;n<t;n++){var r=this.findClosestRGB(255&this.pixels[o++],255&this.pixels[o++],255&this.pixels[o++]);this.usedEntry[r]=!0,this.indexedPixels[n]=r}},No.prototype.ditherPixels=function(e,t){var o={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!e||!o[e])throw"Unknown dithering kernel: "+e;var n=o[e],r=0,a=this.height,i=this.width,l=this.pixels,s=t?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var d=0;d<a;d++){t&&(s*=-1);for(var c=1==s?0:i-1,u=1==s?i:0;c!==u;c+=s){var h=3*(r=d*i+c),f=l[h],g=l[h+1],p=l[h+2];h=this.findClosestRGB(f,g,p),this.usedEntry[h]=!0,this.indexedPixels[r]=h,h*=3;for(var m=f-this.colorTab[h],v=g-this.colorTab[h+1],b=p-this.colorTab[h+2],y=1==s?0:n.length-1,w=1==s?n.length:0;y!==w;y+=s){var C=n[y][1],x=n[y][2];if(C+c>=0&&C+c<i&&x+d>=0&&x+d<a){var k=n[y][0];h=r+C+x*i,l[h*=3]=Math.max(0,Math.min(255,l[h]+m*k)),l[h+1]=Math.max(0,Math.min(255,l[h+1]+v*k)),l[h+2]=Math.max(0,Math.min(255,l[h+2]+b*k))}}}}},No.prototype.findClosest=function(e,t){return this.findClosestRGB((16711680&e)>>16,(65280&e)>>8,255&e,t)},No.prototype.findClosestRGB=function(e,t,o,n){if(null===this.colorTab)return-1;if(this.neuQuant&&!n)return this.neuQuant.lookupRGB(e,t,o);for(var r=0,a=16777216,i=this.colorTab.length,l=0,s=0;l<i;s++){var d=e-(255&this.colorTab[l++]),c=t-(255&this.colorTab[l++]),u=o-(255&this.colorTab[l++]),h=d*d+c*c+u*u;(!n||this.usedEntry[s])&&h<a&&(a=h,r=s)}return r},No.prototype.getImagePixels=function(){var e=this.width,t=this.height;this.pixels=new Uint8Array(e*t*3);for(var o=this.image,n=0,r=0,a=0;a<t;a++)for(var i=0;i<e;i++)this.pixels[r++]=o[n++],this.pixels[r++]=o[n++],this.pixels[r++]=o[n++],n++},No.prototype.writeGraphicCtrlExt=function(){var e,t;this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4),null===this.transparent?(e=0,t=0):(e=1,t=2),this.dispose>=0&&(t=7&this.dispose),t<<=2,this.out.writeByte(0|t|e),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},No.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame||this.globalPalette?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},No.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},No.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},No.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t<e;t++)this.out.writeByte(0)},No.prototype.writeShort=function(e){this.out.writeByte(255&e),this.out.writeByte(e>>8&255)},No.prototype.writePixels=function(){new Do(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},No.prototype.stream=function(){return this.out};var Oo=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,a){function i(e){try{s(n.next(e))}catch(t){a(t)}}function l(e){try{s(n.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))};const{Canvas:Fo}=Xt,zo=.4;function jo(e){if(e)return new Promise((function(o,n){if("data"==e.slice(0,4)){let r=new Image;return r.onload=function(){o(r),t(r)},r.onerror=function(){n("Image load error"),t(r)},void(r.src=e)}let r=new Image;r.setAttribute("crossOrigin","Anonymous"),r.onload=function(){o(r)},r.onerror=function(){n("Image load error")},r.src=e}));function t(e){e.onload=null,e.onerror=null}}class Uo{constructor(e){const t=Object.assign({},e);if(Object.keys(Uo.defaultOptions).forEach((e=>{e in t||Object.defineProperty(t,e,{value:Uo.defaultOptions[e],enumerable:!0,writable:!0})})),t.components?"object"==typeof t.components&&Object.keys(Uo.defaultComponentOptions).forEach((e=>{e in t.components?Object.defineProperty(t.components,e,{value:Object.assign(Object.assign({},Uo.defaultComponentOptions[e]),t.components[e]),enumerable:!0,writable:!0}):Object.defineProperty(t.components,e,{value:Uo.defaultComponentOptions[e],enumerable:!0,writable:!0})})):t.components=Uo.defaultComponentOptions,null!==t.dotScale&&void 0!==t.dotScale){if(t.dotScale<=0||t.dotScale>1)throw new Error("dotScale should be in range (0, 1].");t.components.data.scale=t.dotScale,t.components.timing.scale=t.dotScale,t.components.alignment.scale=t.dotScale}this.options=t,this.canvas=new Fo(e.size,e.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new vo(-1,this.options.correctLevel),Number.isInteger(this.options.maskPattern)&&(this.qrCode.maskPattern=this.options.maskPattern),Number.isInteger(this.options.version)&&(this.qrCode.typeNumber=this.options.version),this.qrCode.addData(this.options.text),this.qrCode.make()}draw(){return new Promise((e=>this._draw().then(e)))}_clear(){this.canvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}static _prepareRoundedCornerClip(e,t,o,n,r,a){e.beginPath(),e.moveTo(t,o),e.arcTo(t+n,o,t+n,o+r,a),e.arcTo(t+n,o+r,t,o+r,a),e.arcTo(t,o+r,t,o,a),e.arcTo(t,o,t+n,o,a),e.closePath()}static _getAverageRGB(e){const t={r:0,g:0,b:0};let o,n,r=-4;const a={r:0,g:0,b:0};let i=0;n=e.naturalHeight||e.height,o=e.naturalWidth||e.width;const l=new Fo(o,n).getContext("2d");if(!l)return t;let s;l.drawImage(e,0,0);try{s=l.getImageData(0,0,o,n)}catch(d){return t}for(;(r+=20)<s.data.length;)s.data[r]>200||s.data[r+1]>200||s.data[r+2]>200||(++i,a.r+=s.data[r],a.g+=s.data[r+1],a.b+=s.data[r+2]);return a.r=~~(a.r/i),a.g=~~(a.g/i),a.b=~~(a.b/i),a}static _drawDot(e,t,o,n,r=0,a=1){e.fillRect((t+r)*n,(o+r)*n,a*n,a*n)}static _drawAlignProtector(e,t,o,n){e.clearRect((t-2)*n,(o-2)*n,5*n,5*n),e.fillRect((t-2)*n,(o-2)*n,5*n,5*n)}static _drawAlign(e,t,o,n,r=0,a=1,i,l){const s=e.fillStyle;e.fillStyle=i,new Array(4).fill(0).map(((i,l)=>{Uo._drawDot(e,t-2+l,o-2,n,r,a),Uo._drawDot(e,t+2,o-2+l,n,r,a),Uo._drawDot(e,t+2-l,o+2,n,r,a),Uo._drawDot(e,t-2,o+2-l,n,r,a)})),Uo._drawDot(e,t,o,n,r,a),l||(e.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map(((i,l)=>{Uo._drawDot(e,t-1+l,o-1,n,r,a),Uo._drawDot(e,t+1,o-1+l,n,r,a),Uo._drawDot(e,t+1-l,o+1,n,r,a),Uo._drawDot(e,t-1,o+1-l,n,r,a)}))),e.fillStyle=s}_draw(){var e,t,o,n,r,a,i,l,s,d,c,u,h,f,g,p,m,v,b;return Oo(this,void 0,void 0,(function*(){const y=null===(e=this.qrCode)||void 0===e?void 0:e.moduleCount,w=this.options.size;let C=this.options.margin;(C<0||2*C>=w)&&(C=0);const x=Math.ceil(C),k=w-2*C,_=this.options.whiteMargin,P=this.options.backgroundDimming,T=Math.ceil(k/y),A=T*y,S=A+2*x,R=new Fo(S,S),B=R.getContext("2d");this._clear(),B.save(),B.translate(x,x);const M=new Fo(S,S),I=M.getContext("2d");let D=null,L=[];if(this.options.gifBackground){const e=(e=>{const t=new Uint8Array(e);return Yt({data:t,pos:0},fo)})(this.options.gifBackground);if(D=e,N=!0,L=(E=e).frames.filter((e=>e.image)).map((e=>go(e,E.gct,N))),this.options.autoColor){let e=0,t=0,o=0,n=0;for(let r=0;r<L[0].colorTable.length;r++){const a=L[0].colorTable[r];a[0]>200||a[1]>200||a[2]>200||0===a[0]&&0===a[1]&&0===a[2]||(n++,e+=a[0],t+=a[1],o+=a[2])}e=~~(e/n),t=~~(t/n),o=~~(o/n),this.options.colorDark=`rgb(${e},${t},${o})`}}else if(this.options.backgroundImage){const e=yield jo(this.options.backgroundImage);if(this.options.autoColor){const t=Uo._getAverageRGB(e);this.options.colorDark=`rgb(${t.r},${t.g},${t.b})`}I.drawImage(e,0,0,e.width,e.height,0,0,S,S),I.rect(0,0,S,S),I.fillStyle=P,I.fill()}else I.rect(0,0,S,S),I.fillStyle=this.options.colorLight,I.fill();var E,N;const O=Co.getPatternPosition(this.qrCode.typeNumber),F=(null===(o=null===(t=this.options.components)||void 0===t?void 0:t.data)||void 0===o?void 0:o.scale)||zo,z=.5*(1-F);for(let e=0;e<y;e++)for(let t=0;t<y;t++){const o=this.qrCode.isDark(e,t),n=t<8&&(e<8||e>=y-8)||t>=y-8&&e<8;let r=n||6==e&&t>=8&&t<=y-8||6==t&&e>=8&&e<=y-8;for(let l=1;l<O.length-1;l++)r=r||e>=O[l]-2&&e<=O[l]+2&&t>=O[l]-2&&t<=O[l]+2;const a=t*T+(r?0:z*T),i=e*T+(r?0:z*T);B.strokeStyle=o?this.options.colorDark:this.options.colorLight,B.lineWidth=.5,B.fillStyle=o?this.options.colorDark:this.options.colorLight,0===O.length?r||B.fillRect(a,i,(r?1:F)*T,(r?1:F)*T):r||t<y-4&&t>=y-4-5&&e<y-4&&e>=y-4-5||B.fillRect(a,i,(r?1:F)*T,(r?1:F)*T)}const j=O[O.length-1],U=this.options.colorLight;if(B.fillStyle=U,B.fillRect(0,0,8*T,8*T),B.fillRect(0,(y-8)*T,8*T,8*T),B.fillRect((y-8)*T,0,8*T,8*T),(null===(r=null===(n=this.options.components)||void 0===n?void 0:n.timing)||void 0===r?void 0:r.protectors)&&(B.fillRect(8*T,6*T,(y-8-8)*T,T),B.fillRect(6*T,8*T,T,(y-8-8)*T)),(null===(i=null===(a=this.options.components)||void 0===a?void 0:a.cornerAlignment)||void 0===i?void 0:i.protectors)&&Uo._drawAlignProtector(B,j,j,T),null===(s=null===(l=this.options.components)||void 0===l?void 0:l.alignment)||void 0===s?void 0:s.protectors)for(let e=0;e<O.length;e++)for(let t=0;t<O.length;t++){const o=O[t],n=O[e];(6!==o||6!==n&&n!==j)&&(6!==n||6!==o&&o!==j)&&(o===j&&n===j||Uo._drawAlignProtector(B,o,n,T))}B.fillStyle=this.options.colorDark,B.fillRect(0,0,7*T,T),B.fillRect((y-7)*T,0,7*T,T),B.fillRect(0,6*T,7*T,T),B.fillRect((y-7)*T,6*T,7*T,T),B.fillRect(0,(y-7)*T,7*T,T),B.fillRect(0,(y-7+6)*T,7*T,T),B.fillRect(0,0,T,7*T),B.fillRect(6*T,0,T,7*T),B.fillRect((y-7)*T,0,T,7*T),B.fillRect((y-7+6)*T,0,T,7*T),B.fillRect(0,(y-7)*T,T,7*T),B.fillRect(6*T,(y-7)*T,T,7*T),B.fillRect(2*T,2*T,3*T,3*T),B.fillRect((y-7+2)*T,2*T,3*T,3*T),B.fillRect(2*T,(y-7+2)*T,3*T,3*T);const $=(null===(c=null===(d=this.options.components)||void 0===d?void 0:d.timing)||void 0===c?void 0:c.scale)||zo,q=.5*(1-$);for(let e=0;e<y-8;e+=2)Uo._drawDot(B,8+e,6,T,q,$),Uo._drawDot(B,6,8+e,T,q,$);const K=(null===(h=null===(u=this.options.components)||void 0===u?void 0:u.cornerAlignment)||void 0===h?void 0:h.scale)||zo,H=.5*(1-K);Uo._drawAlign(B,j,j,T,H,K,this.options.colorDark,(null===(g=null===(f=this.options.components)||void 0===f?void 0:f.cornerAlignment)||void 0===g?void 0:g.protectors)||!1);const G=(null===(m=null===(p=this.options.components)||void 0===p?void 0:p.alignment)||void 0===m?void 0:m.scale)||zo,V=.5*(1-G);for(let e=0;e<O.length;e++)for(let t=0;t<O.length;t++){const o=O[t],n=O[e];(6!==o||6!==n&&n!==j)&&(6!==n||6!==o&&o!==j)&&(o===j&&n===j||Uo._drawAlign(B,o,n,T,V,G,this.options.colorDark,(null===(b=null===(v=this.options.components)||void 0===v?void 0:v.alignment)||void 0===b?void 0:b.protectors)||!1))}if(_&&(B.fillStyle=this.options.backgroundColor,B.fillRect(-x,-x,S,x),B.fillRect(-x,A,S,x),B.fillRect(A,-x,x,S),B.fillRect(-x,-x,x,S)),this.options.logoImage){const e=yield jo(this.options.logoImage);let t=this.options.logoScale,o=this.options.logoMargin,n=this.options.logoCornerRadius;(t<=0||t>=1)&&(t=.2),o<0&&(o=0),n<0&&(n=0);const r=A*t,a=.5*(S-r),i=a;B.restore(),B.fillStyle=this.options.logoBackgroundColor,B.save(),Uo._prepareRoundedCornerClip(B,a-o,i-o,r+2*o,r+2*o,n+o),B.clip();const l=B.globalCompositeOperation;B.globalCompositeOperation="destination-out",B.fill(),B.globalCompositeOperation=l,B.restore(),B.save(),Uo._prepareRoundedCornerClip(B,a,i,r,r,n),B.clip(),B.drawImage(e,a,i,r,r),B.restore(),B.save(),B.translate(x,x)}if(D){let e,t,o,n,r,a;if(L.forEach((function(i){e||(e=new No(w,w),e.setDelay(i.delay),e.setRepeat(0));const{width:l,height:s}=i.dims;t||(t=new Fo(l,s),o=t.getContext("2d"),o.rect(0,0,t.width,t.height),o.fillStyle="#ffffff",o.fill()),n&&a&&l===n.width&&s===n.height||(n=new Fo(l,s),r=n.getContext("2d"),a=r.createImageData(l,s)),a.data.set(i.patch),r.putImageData(a,0,0),o.drawImage(n.getContext("2d").canvas,i.dims.left,i.dims.top);const d=new Fo(S,S),c=d.getContext("2d");c.drawImage(t.getContext("2d").canvas,0,0,S,S),c.rect(0,0,S,S),c.fillStyle=P,c.fill(),c.drawImage(R.getContext("2d").canvas,0,0,S,S);const u=new Fo(w,w),h=u.getContext("2d");h.drawImage(d.getContext("2d").canvas,0,0,w,w),e.addFrame(h.getImageData(0,0,u.width,u.height).data)})),!e)throw new Error("No frames.");if(e.finish(),$o(this.canvas)){const t=e.stream().toFlattenUint8Array().reduce(((e,t)=>e+String.fromCharCode(t)),"");return Promise.resolve(`data:image/gif;base64,${window.btoa(t)}`)}return Promise.resolve(Buffer.from(e.stream().toFlattenUint8Array()))}{I.drawImage(R.getContext("2d").canvas,0,0,S,S),B.drawImage(M.getContext("2d").canvas,-x,-x,S,S);const e=new Fo(w,w);e.getContext("2d").drawImage(R.getContext("2d").canvas,0,0,w,w),this.canvas=e;const t=this.options.gifBackground?"gif":"png";return $o(this.canvas)?Promise.resolve(this.canvas.toDataURL(t)):Promise.resolve(this.canvas.toBuffer(t))}}))}}function $o(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}}Uo.CorrectLevel=bo,Uo.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},Uo.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:bo.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:Uo.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"};const qo=d({name:"TheQrCode",props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:0},size:{type:Number,default:220},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},data:()=>({imgUrl:""}),watch:{$props:{deep:!0,handler(){this.main()}}},mounted(){this.main()},methods:{async main(){if(this.gifBgSrc){const t=await(e=this.gifBgSrc,new Promise((t=>{const o=new XMLHttpRequest;o.responseType="blob",o.onload=function(){const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(o.response)},o.open("GET",e),o.send()}))),o=this.logoSrc;return void this.render(void 0,o,t)}var e;const t=this.bgSrc,o=this.logoSrc;this.render(t,o)},async render(e,t,o){console.log(e,t,o),new Uo({gifBackground:o,text:this.text,size:this.size}).draw().then((e=>{console.log("🚀 ~ dataUri:",e),this.imgUrl=e,this.callback&&this.callback(e,this.qid)}))}},render(){return xe(je,null,[this.bindElement&&this.imgUrl&&xe("img",{style:"display: inline-block",src:this.imgUrl},null)])}}),Ko=d({name:"school-info",setup(){const e=ye(),t=we({areaList:[]}),o=we({name:e.info.schoolInfos?.[0]?.name,logo:e.info.schoolInfos?.[0]?.logo||e.info.avatar,provinceCode:e.info.schoolInfos?.[0]?.provinceCode||"",cityCode:e.info.schoolInfos?.[0]?.cityCode||"",regionCode:e.info.schoolInfos?.[0]?.regionCode||""}),n=we({loading:!1,schoolLoading:!0,dataList:[],disabled:!0,modal:!1,qrModal:!1}),r=async()=>{n.loading=!0;const t=await(o={schoolId:e.info.schoolInfos?.[0]?.id,page:1,rows:1e3},ve.post("/edu-app/teacher/page",{data:o}));var o;n.loading=!1,200===t?.code&&Array.isArray(t?.data?.rows)&&(n.dataList=t.data.rows)};Ce((()=>{(async()=>{const e=await st();200===e?.code&&(t.areaList=e.data)})(),r()}));const a=Ue(),i=be(),l=e=>{const t="LOCKED"===e.status?"解冻":"冻结";a.warning({title:"温馨提示",content:`是否${t}"${e.nickname}"?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{var o;await(o={ids:[e.id],status:"LOCKED"===e.status?"ACTIVATION":"LOCKED"},ve.post("/edu-app/teacher/updateStatus",{data:o})),r(),i.success(t+"成功")}})},s=e=>{a.warning({title:"警告",content:`重置"${e.nickname}"的密码,是否继续?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{var t;await(t={userId:e.id,password:"ktyq"+e.phone.substr(7),clientType:"TEACHER"},ve.post("/edu-app/user/resetPassword",{data:t,requestType:"form"})),i.success("重置成功")}})},d=h(),c=()=>{d.value?.validate((async t=>{var r;t||(n.schoolLoading=!1,await(r={...e.info.schoolInfos?.[0],...o},ve.post("/edu-app/school/update",{data:r})),n.schoolLoading=!0,i.success("修改成功"),n.disabled=!0)}))},u=()=>{const t=`tenantId=${e.info.schoolInfos?.[0]?.tenantId}&schoolId=${e.info.schoolInfos?.[0]?.id}&schoolName=${e.info.schoolInfos?.[0]?.name}`,o=`${location.origin}/classroom-app/#/teaher-register?`+t;return console.log(o),o},f=e=>{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("Copy"),document.body.removeChild(t),i.success("复制成功")};return()=>xe("div",{class:gt},[xe(Pe,{ref:d,class:ft,model:o,style:{padding:"30px 0"},disabled:n.disabled},{default:()=>[xe(Me,{size:[30,20]},{default:()=>[xe("div",{class:ct},[xe(ke,{previewDisabled:!1,width:100,height:100,src:o.logo},null),xe("div",{style:{display:n.disabled?"none":""},class:ut},[_e("修改头像"),n.schoolLoading&&xe(Ve,{class:[ht],cropper:!0,"onUpdate:fileList":e=>{o.logo=e}},null)])]),xe(Se,{label:"学校名称",path:"name",showRequireMark:!1,rule:[{required:!0,message:"请填写学校名称",trigger:"blur"}]},{default:()=>[xe(Re,{bordered:!n.disabled,maxlength:20,value:o.name,"onUpdate:value":e=>o.name=e},null)]}),xe(Se,{label:"城区"},{default:()=>[xe(it,{placeholder:"请选择城区",bordered:!n.disabled,options:t.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:e.info.schoolInfos?.[0]?.regionCode||e.info.schoolInfos?.[0]?.cityCode||e.info.schoolInfos?.[0]?.provinceCode,"onUpdate:value":(e,t,n)=>{o.provinceCode=n[0]?.code,o.cityCode=n[1]?.code,o.regionCode=n[2]?.code}},null)]}),xe(Se,null,{default:()=>[n.disabled?xe(Me,{class:vt,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:bt,color:"#f24433",onClick:()=>n.disabled=!1},{default:()=>[_e("修改信息")]})]}):xe(Me,{class:vt,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:bt,onClick:()=>n.disabled=!0},{default:()=>[_e("取消")]}),xe(Ie,{class:bt,loading:!n.schoolLoading,type:"primary",onClick:()=>c()},{default:()=>[_e("完成")]})]})]})]})]}),xe(Me,{style:{padding:"32px 0"}},{default:()=>[xe(Ie,{type:"primary",renderIcon:()=>xe($e,{component:xe(Ct,null,null)},null),onClick:()=>n.modal=!0},{default:()=>[_e("添加老师")]}),xe(Ie,{type:"primary",onClick:()=>n.qrModal=!0},{default:()=>[_e("老师注册二维码")]})]}),xe(qe,{loading:n.loading,columns:[{title:"老师姓名",key:"nickname",render:e=>xe("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>f(e.nickname)},[e.nickname])},{title:"手机号码",key:"phone",render:e=>xe("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>f(e.phone)},[e.phone])},{title:"性别",key:"questionTypeCode",render:e=>xe("div",null,[e.gender?"男":"女"])},{title:"状态",key:"statusName",render:e=>xe("div",null,["ACTIVATION"===e.status?xe(Ie,{text:!0},{default:()=>[_e("启用")]}):xe(Ie,{class:pt,text:!0},{default:()=>[_e("冻结")]})])},{title:"操作",key:"titleImg",render:e=>xe(Me,null,{default:()=>[xe(Ie,{type:"primary",quaternary:!0,size:"small",onClick:()=>s(e)},{default:()=>[_e("重置密码")]}),"ACTIVATION"===e.status?xe(Ie,{type:"primary",quaternary:!0,size:"small",onClick:()=>l(e)},{default:()=>[_e("冻结")]}):xe(Ie,{class:pt,quaternary:!0,size:"small",onClick:()=>l(e)},{default:()=>[_e("解冻")]})]})}],data:n.dataList},null),xe(De,{class:mt,show:n.modal,"onUpdate:show":e=>n.modal=e,title:"添加老师",preset:"dialog",showIcon:!1},{default:()=>[xe(xt,{areaList:t.areaList,onClose:()=>{n.modal=!1,r()}},null)]}),xe(De,{show:n.qrModal,"onUpdate:show":e=>n.qrModal=e,title:"二维码",preset:"dialog",showIcon:!1},{default:()=>[xe("div",{style:{textAlign:"center"}},[xe(qo,{text:u(),size:300},null)])]})])}});e("default",d({name:"base-setting",setup(e,{emit:t,attrs:n}){const r=h("person"),a=ye(),i=Ke();return i.query.activeTab&&(r.value=i.query.activeTab),ne((()=>i.query.activeTab),(e=>{r.value=e})),()=>xe("div",{class:o.listWrap},[xe(He,{class:o.customTabs,value:r.value,"onUpdate:value":e=>r.value=e,size:"large",animated:!0,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[xe(Ge,{name:"person",tab:"个人信息"},{default:()=>[xe(dt,null,null)]}),a.info.isSuperAdmin&&xe(Ge,{name:"school",tab:"学校设置"},{default:()=>[xe(Ko,null,null)]})]})])}}))}}}));