You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
37 KiB
6 lines
37 KiB
import{M as lt,an as at,r as Ue,c as ct,b as Re,w as dt,C as j,o as ft,P as ht,ao as pt,y as F,K as ze,n as mt,z as We,x as H,$ as Ve,J as le,g as gt,f as vt}from"./config-provider-5e5578b5.js";/* empty css */const Et=lt(at);function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t={name:"zh-tw",el:{colorpicker:{confirm:"確認",clear:"清空",defaultLabel:"色彩選擇器",description:"目前色彩為 {color}。按一下 Enter 以選擇新色彩。"},datepicker:{now:"現在",today:"今天",cancel:"取消",clear:"清空",confirm:"確認",dateTablePrompt:"使用方向鍵與 Enter 鍵以選擇日期",monthTablePrompt:"使用方向鍵與 Enter 鍵以選擇月份",yearTablePrompt:"使用方向鍵與 Enter 鍵以選擇年份",selectedDate:"已選日期",selectDate:"選擇日期",selectTime:"選擇時間",startDate:"開始日期",startTime:"開始時間",endDate:"結束日期",endTime:"結束時間",prevYear:"前一年",nextYear:"後一年",prevMonth:"上個月",nextMonth:"下個月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"減少數值",increase:"增加數值"},select:{loading:"載入中",noMatch:"無相符資料",noData:"無資料",placeholder:"請選擇"},dropdown:{toggleDropdown:"切換下拉選單"},cascader:{noMatch:"無相符資料",loading:"載入中",placeholder:"請選擇",noData:"無資料"},pagination:{goto:"前往",pagesize:"項/頁",total:"共 {total} 項",pageClassifier:"頁",page:"頁",prev:"上一頁",next:"下一頁",currentPage:"第 {pager} 頁",prevPages:"向前 {pager} 頁",nextPages:"向后 {pager} 頁",deprecationWarning:"偵測到已過時的使用方式,請參閱 el-pagination 說明文件以了解更多資訊"},dialog:{close:"關閉此對話框"},drawer:{close:"關閉此對話框"},messagebox:{title:"提示",confirm:"確定",cancel:"取消",error:"輸入的資料不符規定!",close:"關閉此對話框"},upload:{deleteTip:"按一下 Delete 鍵以刪除",delete:"刪除",preview:"查看圖片",continue:"繼續上傳"},slider:{defaultLabel:"滑桿介於 {min} 至 {max}",defaultRangeStartLabel:"選擇起始值",defaultRangeEndLabel:"選擇結束值"},table:{emptyText:"暫無資料",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},tree:{emptyText:"暫無資料"},transfer:{noMatch:"無相符資料",noData:"無資料",titles:["列表 1","列表 2"],filterPlaceholder:"請輸入搜尋內容",noCheckedFormat:"共 {total} 項",hasCheckedFormat:"已選 {checked}/{total} 項"},image:{error:"載入失敗"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"確認",cancelButtonText:"取消"}}};e.default=t})(Ge);const wt=yt(Ge),Ct={__name:"App",setup(e){const t=Ue(wt);return(n,r)=>{const s=ht("router-view");return ft(),ct("div",null,[Re(j(Et),{locale:t.value},{default:dt(()=>[Re(s)]),_:1},8,["locale"])])}}},bt="modulepreload",At=function(e,t){return new URL(e,t).href},ke={},ae=function(t,n,r){if(!n||n.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=At(o,r),o in ke)return;ke[o]=!0;const c=o.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let u=s.length-1;u>=0;u--){const d=s[u];if(d.href===o&&(!c||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const a=document.createElement("link");if(a.rel=c?"stylesheet":bt,c||(a.as="script",a.crossOrigin=""),a.href=o,document.head.appendChild(a),c)return new Promise((u,d)=>{a.addEventListener("load",u),a.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};/*!
|
|
* vue-router v4.1.6
|
|
* (c) 2022 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const q=typeof window<"u";function Bt(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const A=Object.assign;function ce(e,t){const n={};for(const r in t){const s=t[r];n[r]=O(s)?s.map(e):e(s)}return n}const Q=()=>{},O=Array.isArray,Rt=/\/$/,kt=e=>e.replace(Rt,"");function de(e,t,n="/"){let r,s={},o="",c="";const f=t.indexOf("#");let i=t.indexOf("?");return f<i&&f>=0&&(i=-1),i>-1&&(r=t.slice(0,i),o=t.slice(i+1,f>-1?f:t.length),s=e(o)),f>-1&&(r=r||t.slice(0,f),c=t.slice(f,t.length)),r=_t(r??t,n),{fullPath:r+(o&&"?")+o+c,path:r,query:s,hash:c}}function xt(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function xe(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Pt(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&U(t.matched[r],n.matched[s])&&Ke(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ke(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!St(e[n],t[n]))return!1;return!0}function St(e,t){return O(e)?Pe(e,t):O(t)?Pe(t,e):e===t}function Pe(e,t){return O(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function _t(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let s=n.length-1,o,c;for(o=0;o<r.length;o++)if(c=r[o],c!==".")if(c==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var X;(function(e){e.pop="pop",e.push="push"})(X||(X={}));var Y;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Y||(Y={}));function Dt(e){if(!e)if(q){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),kt(e)}const Ft=/^[^#]+#/;function Ot(e,t){return e.replace(Ft,"#")+t}function Tt(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ee=()=>({left:window.pageXOffset,top:window.pageYOffset});function It(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Tt(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Se(e,t){return(history.state?history.state.position-t:-1)+e}const he=new Map;function Lt(e,t){he.set(e,t)}function Mt(e){const t=he.get(e);return he.delete(e),t}let $t=()=>location.protocol+"//"+location.host;function Qe(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let f=s.includes(e.slice(o))?e.slice(o).length:1,i=s.slice(f);return i[0]!=="/"&&(i="/"+i),xe(i,"")}return xe(n,e)+r+s}function Ht(e,t,n,r){let s=[],o=[],c=null;const f=({state:h})=>{const g=Qe(e,location),y=n.value,k=t.value;let R=0;if(h){if(n.value=g,t.value=h,c&&c===y){c=null;return}R=k?h.position-k.position:0}else r(g);s.forEach(w=>{w(n.value,y,{delta:R,type:X.pop,direction:R?R>0?Y.forward:Y.back:Y.unknown})})};function i(){c=n.value}function a(h){s.push(h);const g=()=>{const y=s.indexOf(h);y>-1&&s.splice(y,1)};return o.push(g),g}function u(){const{history:h}=window;h.state&&h.replaceState(A({},h.state,{scroll:ee()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",f),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",f),window.addEventListener("beforeunload",u),{pauseListeners:i,listen:a,destroy:d}}function _e(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?ee():null}}function Nt(e){const{history:t,location:n}=window,r={value:Qe(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(i,a,u){const d=e.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+i:$t()+e+i;try{t[u?"replaceState":"pushState"](a,"",h),s.value=a}catch(g){console.error(g),n[u?"replace":"assign"](h)}}function c(i,a){const u=A({},t.state,_e(s.value.back,i,s.value.forward,!0),a,{position:s.value.position});o(i,u,!0),r.value=i}function f(i,a){const u=A({},s.value,t.state,{forward:i,scroll:ee()});o(u.current,u,!0);const d=A({},_e(r.value,i,null),{position:u.position+1},a);o(i,d,!1),r.value=i}return{location:r,state:s,push:f,replace:c}}function qt(e){e=Dt(e);const t=Nt(e),n=Ht(e,t.state,t.location,t.replace);function r(o,c=!0){c||n.pauseListeners(),history.go(o)}const s=A({location:"",base:e,go:r,createHref:Ot.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function jt(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),qt(e)}function Ut(e){return typeof e=="string"||e&&typeof e=="object"}function Ye(e){return typeof e=="string"||typeof e=="symbol"}const L={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Xe=Symbol("");var De;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(De||(De={}));function z(e,t){return A(new Error,{type:e,[Xe]:!0},t)}function I(e,t){return e instanceof Error&&Xe in e&&(t==null||!!(e.type&t))}const Fe="[^/]+?",zt={sensitive:!1,strict:!1,start:!0,end:!0},Wt=/[.+*?^${}()[\]/\\]/g;function Vt(e,t){const n=A({},zt,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let d=0;d<a.length;d++){const h=a[d];let g=40+(n.sensitive?.25:0);if(h.type===0)d||(s+="/"),s+=h.value.replace(Wt,"\\$&"),g+=40;else if(h.type===1){const{value:y,repeatable:k,optional:R,regexp:w}=h;o.push({name:y,repeatable:k,optional:R});const b=w||Fe;if(b!==Fe){g+=10;try{new RegExp(`(${b})`)}catch(D){throw new Error(`Invalid custom RegExp for param "${y}" (${b}): `+D.message)}}let S=k?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(S=R&&a.length<2?`(?:/${S})`:"/"+S),R&&(S+="?"),s+=S,g+=20,R&&(g+=-8),k&&(g+=-20),b===".*"&&(g+=-50)}u.push(g)}r.push(u)}if(n.strict&&n.end){const a=r.length-1;r[a][r[a].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&(s+="(?:/|$)");const c=new RegExp(s,n.sensitive?"":"i");function f(a){const u=a.match(c),d={};if(!u)return null;for(let h=1;h<u.length;h++){const g=u[h]||"",y=o[h-1];d[y.name]=g&&y.repeatable?g.split("/"):g}return d}function i(a){let u="",d=!1;for(const h of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const g of h)if(g.type===0)u+=g.value;else if(g.type===1){const{value:y,repeatable:k,optional:R}=g,w=y in a?a[y]:"";if(O(w)&&!k)throw new Error(`Provided param "${y}" is an array but it is not repeatable (* or + modifiers)`);const b=O(w)?w.join("/"):w;if(!b)if(R)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${y}"`);u+=b}}return u||"/"}return{re:c,score:r,keys:o,parse:f,stringify:i}}function Gt(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function Kt(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const o=Gt(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(Oe(r))return 1;if(Oe(s))return-1}return s.length-r.length}function Oe(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Qt={type:0,value:""},Yt=/[a-zA-Z0-9_]/;function Xt(e){if(!e)return[[]];if(e==="/")return[[Qt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${a}": ${g}`)}let n=0,r=n;const s=[];let o;function c(){o&&s.push(o),o=[]}let f=0,i,a="",u="";function d(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),a="")}function h(){a+=i}for(;f<e.length;){if(i=e[f++],i==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:i==="/"?(a&&d(),c()):i===":"?(d(),n=1):h();break;case 4:h(),n=r;break;case 1:i==="("?n=2:Yt.test(i)?h():(d(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&f--);break;case 2:i===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+i:n=3:u+=i;break;case 3:d(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&f--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${a}"`),d(),c(),s}function Zt(e,t,n){const r=Vt(Xt(e.path),n),s=A(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function Jt(e,t){const n=[],r=new Map;t=Le({strict:!1,end:!0,sensitive:!1},t);function s(u){return r.get(u)}function o(u,d,h){const g=!h,y=en(u);y.aliasOf=h&&h.record;const k=Le(t,u),R=[y];if("alias"in u){const S=typeof u.alias=="string"?[u.alias]:u.alias;for(const D of S)R.push(A({},y,{components:h?h.record.components:y.components,path:D,aliasOf:h?h.record:y}))}let w,b;for(const S of R){const{path:D}=S;if(d&&D[0]!=="/"){const $=d.record.path,T=$[$.length-1]==="/"?"":"/";S.path=d.record.path+(D&&T+D)}if(w=Zt(S,d,k),h?h.alias.push(w):(b=b||w,b!==w&&b.alias.push(w),g&&u.name&&!Ie(w)&&c(u.name)),y.children){const $=y.children;for(let T=0;T<$.length;T++)o($[T],w,h&&h.children[T])}h=h||w,(w.record.components&&Object.keys(w.record.components).length||w.record.name||w.record.redirect)&&i(w)}return b?()=>{c(b)}:Q}function c(u){if(Ye(u)){const d=r.get(u);d&&(r.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(c),d.alias.forEach(c))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&r.delete(u.record.name),u.children.forEach(c),u.alias.forEach(c))}}function f(){return n}function i(u){let d=0;for(;d<n.length&&Kt(u,n[d])>=0&&(u.record.path!==n[d].record.path||!Ze(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!Ie(u)&&r.set(u.record.name,u)}function a(u,d){let h,g={},y,k;if("name"in u&&u.name){if(h=r.get(u.name),!h)throw z(1,{location:u});k=h.record.name,g=A(Te(d.params,h.keys.filter(b=>!b.optional).map(b=>b.name)),u.params&&Te(u.params,h.keys.map(b=>b.name))),y=h.stringify(g)}else if("path"in u)y=u.path,h=n.find(b=>b.re.test(y)),h&&(g=h.parse(y),k=h.record.name);else{if(h=d.name?r.get(d.name):n.find(b=>b.re.test(d.path)),!h)throw z(1,{location:u,currentLocation:d});k=h.record.name,g=A({},d.params,u.params),y=h.stringify(g)}const R=[];let w=h;for(;w;)R.unshift(w.record),w=w.parent;return{name:k,path:y,params:g,matched:R,meta:nn(R)}}return e.forEach(u=>o(u)),{addRoute:o,resolve:a,removeRoute:c,getRoutes:f,getRecordMatcher:s}}function Te(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function en(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:tn(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function tn(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function Ie(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function nn(e){return e.reduce((t,n)=>A(t,n.meta),{})}function Le(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ze(e,t){return t.children.some(n=>n===e||Ze(e,n))}const Je=/#/g,rn=/&/g,sn=/\//g,on=/=/g,un=/\?/g,et=/\+/g,ln=/%5B/g,an=/%5D/g,tt=/%5E/g,cn=/%60/g,nt=/%7B/g,dn=/%7C/g,rt=/%7D/g,fn=/%20/g;function ge(e){return encodeURI(""+e).replace(dn,"|").replace(ln,"[").replace(an,"]")}function hn(e){return ge(e).replace(nt,"{").replace(rt,"}").replace(tt,"^")}function pe(e){return ge(e).replace(et,"%2B").replace(fn,"+").replace(Je,"%23").replace(rn,"%26").replace(cn,"`").replace(nt,"{").replace(rt,"}").replace(tt,"^")}function pn(e){return pe(e).replace(on,"%3D")}function mn(e){return ge(e).replace(Je,"%23").replace(un,"%3F")}function gn(e){return e==null?"":mn(e).replace(sn,"%2F")}function J(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function vn(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<r.length;++s){const o=r[s].replace(et," "),c=o.indexOf("="),f=J(c<0?o:o.slice(0,c)),i=c<0?null:J(o.slice(c+1));if(f in t){let a=t[f];O(a)||(a=t[f]=[a]),a.push(i)}else t[f]=i}return t}function Me(e){let t="";for(let n in e){const r=e[n];if(n=pn(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(O(r)?r.map(o=>o&&pe(o)):[r&&pe(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function En(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=O(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const yn=Symbol(""),$e=Symbol(""),te=Symbol(""),ve=Symbol(""),me=Symbol("");function K(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function M(e,t,n,r,s){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,f)=>{const i=d=>{d===!1?f(z(4,{from:n,to:t})):d instanceof Error?f(d):Ut(d)?f(z(2,{from:t,to:d})):(o&&r.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),c())},a=e.call(r&&r.instances[s],t,n,i);let u=Promise.resolve(a);e.length<3&&(u=u.then(i)),u.catch(d=>f(d))})}function fe(e,t,n,r){const s=[];for(const o of e)for(const c in o.components){let f=o.components[c];if(!(t!=="beforeRouteEnter"&&!o.instances[c]))if(wn(f)){const a=(f.__vccOpts||f)[t];a&&s.push(M(a,n,r,o,c))}else{let i=f();s.push(()=>i.then(a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${o.path}"`));const u=Bt(a)?a.default:a;o.components[c]=u;const h=(u.__vccOpts||u)[t];return h&&M(h,n,r,o,c)()}))}}return s}function wn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function He(e){const t=H(te),n=H(ve),r=F(()=>t.resolve(j(e.to))),s=F(()=>{const{matched:i}=r.value,{length:a}=i,u=i[a-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(U.bind(null,u));if(h>-1)return h;const g=Ne(i[a-2]);return a>1&&Ne(u)===g&&d[d.length-1].path!==g?d.findIndex(U.bind(null,i[a-2])):h}),o=F(()=>s.value>-1&&Bn(n.params,r.value.params)),c=F(()=>s.value>-1&&s.value===n.matched.length-1&&Ke(n.params,r.value.params));function f(i={}){return An(i)?t[j(e.replace)?"replace":"push"](j(e.to)).catch(Q):Promise.resolve()}return{route:r,href:F(()=>r.value.href),isActive:o,isExactActive:c,navigate:f}}const Cn=We({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:He,setup(e,{slots:t}){const n=ze(He(e)),{options:r}=H(te),s=F(()=>({[qe(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[qe(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:Ve("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),bn=Cn;function An(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Bn(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!O(s)||s.length!==r.length||r.some((o,c)=>o!==s[c]))return!1}return!0}function Ne(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const qe=(e,t,n)=>e??t??n,Rn=We({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=H(me),s=F(()=>e.route||r.value),o=H($e,0),c=F(()=>{let a=j(o);const{matched:u}=s.value;let d;for(;(d=u[a])&&!d.components;)a++;return a}),f=F(()=>s.value.matched[c.value]);le($e,F(()=>c.value+1)),le(yn,f),le(me,s);const i=Ue();return gt(()=>[i.value,f.value,e.name],([a,u,d],[h,g,y])=>{u&&(u.instances[d]=a,g&&g!==u&&a&&a===h&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),a&&u&&(!g||!U(u,g)||!h)&&(u.enterCallbacks[d]||[]).forEach(k=>k(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,d=f.value,h=d&&d.components[u];if(!h)return je(n.default,{Component:h,route:a});const g=d.props[u],y=g?g===!0?a.params:typeof g=="function"?g(a):g:null,R=Ve(h,A({},y,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[u]=null)},ref:i}));return je(n.default,{Component:R,route:a})||R}}});function je(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const kn=Rn;function xn(e){const t=Jt(e.routes,e),n=e.parseQuery||vn,r=e.stringifyQuery||Me,s=e.history,o=K(),c=K(),f=K(),i=pt(L);let a=L;q&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ce.bind(null,l=>""+l),d=ce.bind(null,gn),h=ce.bind(null,J);function g(l,m){let p,v;return Ye(l)?(p=t.getRecordMatcher(l),v=m):v=l,t.addRoute(v,p)}function y(l){const m=t.getRecordMatcher(l);m&&t.removeRoute(m)}function k(){return t.getRoutes().map(l=>l.record)}function R(l){return!!t.getRecordMatcher(l)}function w(l,m){if(m=A({},m||i.value),typeof l=="string"){const E=de(n,l,m.path),P=t.resolve({path:E.path},m),G=s.createHref(E.fullPath);return A(E,P,{params:h(P.params),hash:J(E.hash),redirectedFrom:void 0,href:G})}let p;if("path"in l)p=A({},l,{path:de(n,l.path,m.path).path});else{const E=A({},l.params);for(const P in E)E[P]==null&&delete E[P];p=A({},l,{params:d(l.params)}),m.params=d(m.params)}const v=t.resolve(p,m),B=l.hash||"";v.params=u(h(v.params));const x=xt(r,A({},l,{hash:hn(B),path:v.path})),C=s.createHref(x);return A({fullPath:x,hash:B,query:r===Me?En(l.query):l.query||{}},v,{redirectedFrom:void 0,href:C})}function b(l){return typeof l=="string"?de(n,l,i.value.path):A({},l)}function S(l,m){if(a!==l)return z(8,{from:m,to:l})}function D(l){return W(l)}function $(l){return D(A(b(l),{replace:!0}))}function T(l){const m=l.matched[l.matched.length-1];if(m&&m.redirect){const{redirect:p}=m;let v=typeof p=="function"?p(l):p;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=b(v):{path:v},v.params={}),A({query:l.query,hash:l.hash,params:"path"in v?{}:l.params},v)}}function W(l,m){const p=a=w(l),v=i.value,B=l.state,x=l.force,C=l.replace===!0,E=T(p);if(E)return W(A(b(E),{state:typeof E=="object"?A({},B,E.state):B,force:x,replace:C}),m||p);const P=p;P.redirectedFrom=m;let G;return!x&&Pt(r,v,p)&&(G=z(16,{to:P,from:v}),Ae(v,v,!0,!1)),(G?Promise.resolve(G):ye(P,v)).catch(_=>I(_)?I(_,2)?_:se(_):re(_,P,v)).then(_=>{if(_){if(I(_,2))return W(A({replace:C},b(_.to),{state:typeof _.to=="object"?A({},B,_.to.state):B,force:x}),m||P)}else _=Ce(P,v,!0,C,B);return we(P,v,_),_})}function ot(l,m){const p=S(l,m);return p?Promise.reject(p):Promise.resolve()}function ye(l,m){let p;const[v,B,x]=Pn(l,m);p=fe(v.reverse(),"beforeRouteLeave",l,m);for(const E of v)E.leaveGuards.forEach(P=>{p.push(M(P,l,m))});const C=ot.bind(null,l,m);return p.push(C),N(p).then(()=>{p=[];for(const E of o.list())p.push(M(E,l,m));return p.push(C),N(p)}).then(()=>{p=fe(B,"beforeRouteUpdate",l,m);for(const E of B)E.updateGuards.forEach(P=>{p.push(M(P,l,m))});return p.push(C),N(p)}).then(()=>{p=[];for(const E of l.matched)if(E.beforeEnter&&!m.matched.includes(E))if(O(E.beforeEnter))for(const P of E.beforeEnter)p.push(M(P,l,m));else p.push(M(E.beforeEnter,l,m));return p.push(C),N(p)}).then(()=>(l.matched.forEach(E=>E.enterCallbacks={}),p=fe(x,"beforeRouteEnter",l,m),p.push(C),N(p))).then(()=>{p=[];for(const E of c.list())p.push(M(E,l,m));return p.push(C),N(p)}).catch(E=>I(E,8)?E:Promise.reject(E))}function we(l,m,p){for(const v of f.list())v(l,m,p)}function Ce(l,m,p,v,B){const x=S(l,m);if(x)return x;const C=m===L,E=q?history.state:{};p&&(v||C?s.replace(l.fullPath,A({scroll:C&&E&&E.scroll},B)):s.push(l.fullPath,B)),i.value=l,Ae(l,m,p,C),se()}let V;function ut(){V||(V=s.listen((l,m,p)=>{if(!Be.listening)return;const v=w(l),B=T(v);if(B){W(A(B,{replace:!0}),v).catch(Q);return}a=v;const x=i.value;q&&Lt(Se(x.fullPath,p.delta),ee()),ye(v,x).catch(C=>I(C,12)?C:I(C,2)?(W(C.to,v).then(E=>{I(E,20)&&!p.delta&&p.type===X.pop&&s.go(-1,!1)}).catch(Q),Promise.reject()):(p.delta&&s.go(-p.delta,!1),re(C,v,x))).then(C=>{C=C||Ce(v,x,!1),C&&(p.delta&&!I(C,8)?s.go(-p.delta,!1):p.type===X.pop&&I(C,20)&&s.go(-1,!1)),we(v,x,C)}).catch(Q)}))}let ne=K(),be=K(),Z;function re(l,m,p){se(l);const v=be.list();return v.length?v.forEach(B=>B(l,m,p)):console.error(l),Promise.reject(l)}function it(){return Z&&i.value!==L?Promise.resolve():new Promise((l,m)=>{ne.add([l,m])})}function se(l){return Z||(Z=!l,ut(),ne.list().forEach(([m,p])=>l?p(l):m()),ne.reset()),l}function Ae(l,m,p,v){const{scrollBehavior:B}=e;if(!q||!B)return Promise.resolve();const x=!p&&Mt(Se(l.fullPath,0))||(v||!p)&&history.state&&history.state.scroll||null;return mt().then(()=>B(l,m,x)).then(C=>C&&It(C)).catch(C=>re(C,l,m))}const oe=l=>s.go(l);let ue;const ie=new Set,Be={currentRoute:i,listening:!0,addRoute:g,removeRoute:y,hasRoute:R,getRoutes:k,resolve:w,options:e,push:D,replace:$,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:o.add,beforeResolve:c.add,afterEach:f.add,onError:be.add,isReady:it,install(l){const m=this;l.component("RouterLink",bn),l.component("RouterView",kn),l.config.globalProperties.$router=m,Object.defineProperty(l.config.globalProperties,"$route",{enumerable:!0,get:()=>j(i)}),q&&!ue&&i.value===L&&(ue=!0,D(s.location).catch(B=>{}));const p={};for(const B in L)p[B]=F(()=>i.value[B]);l.provide(te,m),l.provide(ve,ze(p)),l.provide(me,i);const v=l.unmount;ie.add(l),l.unmount=function(){ie.delete(l),ie.size<1&&(a=L,V&&V(),V=null,i.value=L,ue=!1,Z=!1),v()}}};return Be}function N(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Pn(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let c=0;c<o;c++){const f=t.matched[c];f&&(e.matched.find(a=>U(a,f))?r.push(f):n.push(f));const i=e.matched[c];i&&(t.matched.find(a=>U(a,i))||s.push(i))}return[n,r,s]}function In(){return H(te)}function Ln(){return H(ve)}let Sn=jt(),_n=[{path:"/",name:"Order",redirect:"/list"},{path:"/list",name:"List",component:()=>ae(()=>import("./index-ab54a193.js"),["./index-ab54a193.js","./axios-ea863ce3.js","./config-provider-5e5578b5.js","./axios-67a6a197.css","./el-breadcrumb-item-ca27cf79.js","./_plugin-vue_export-helper-2e57540c.js","./_plugin-vue_export-helper-eda68dc7.css","./el-breadcrumb-item-dadbdcb0.css","./order-76698bf0.js","./request-64dd7fc6.js","./index-f5e234b5.css","./normalize-9d9ae4af.css"],import.meta.url)},{path:"/info",name:"Info",component:()=>ae(()=>import("./index-d0d14428.js"),["./index-d0d14428.js","./axios-ea863ce3.js","./config-provider-5e5578b5.js","./axios-67a6a197.css","./el-overlay-539349b7.js","./vnode-39632412.js","./el-breadcrumb-item-ca27cf79.js","./_plugin-vue_export-helper-2e57540c.js","./_plugin-vue_export-helper-eda68dc7.css","./el-breadcrumb-item-dadbdcb0.css","./el-overlay-f6b2674f.css","./qrcode.vue.esm-85e4b7e0.js","./order-76698bf0.js","./request-64dd7fc6.js","./qrcode.vue-7e66957b.css","./index-3785674d.css","./normalize-9d9ae4af.css"],import.meta.url)},{path:"/printcard",name:"PrintCard",component:()=>ae(()=>import("./printcard-1a45345e.js"),["./printcard-1a45345e.js","./axios-ea863ce3.js","./config-provider-5e5578b5.js","./axios-67a6a197.css","./qrcode.vue.esm-85e4b7e0.js","./order-76698bf0.js","./request-64dd7fc6.js","./vnode-39632412.js","./qrcode.vue-7e66957b.css","./printcard-d43c6644.css"],import.meta.url)}];const Dn=xn({history:Sn,routes:_n,scrollBehavior(e,t,n){return{top:0}}});class Fn{constructor(t){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,t),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let t="";this.settings.url&&!this.settings.asyncUrl&&(t=this.settings.url);let n=this;if(this.settings.asyncUrl)return void n.settings.asyncUrl(function(s){let o=n.getPrintWindow(s);n.settings.preview?n.previewIfrmaeLoad():n.print(o)},n.settings.vue);let r=this.getPrintWindow(t);this.settings.url||this.write(r.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(r)}addEvent(t,n,r){t.addEventListener?t.addEventListener(n,r,!1):t.attachEvent?t.attachEvent("on"+n,r):t["on"+n]=r}previewIfrmaeLoad(){let t=document.getElementById("vue-pirnt-nb-previewBox");if(t){let n=this,r=t.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(r,"load",function(){n.previewBoxShow(),n.removeCanvasImg(),n.settings.previewOpenCallback()}),this.addEvent(t.querySelector(".previewBodyUtilPrintBtn"),"click",function(){n.settings.beforeOpenCallback(),n.settings.openCallback(),r.contentWindow.print(),n.settings.closeCallback()})}}removeCanvasImg(){let t=this;try{if(t.elsdom){let n=t.elsdom.querySelectorAll(".canvasImg");for(let r=0;r<n.length;r++)n[r].remove()}}catch(n){console.log(n)}}print(t){var n=this;let r=document.getElementById(this.settings.id)||t.f,s=document.getElementById(this.settings.id).contentWindow||t.f.contentWindow;n.settings.beforeOpenCallback(),n.addEvent(r,"load",function(){s.focus(),n.settings.openCallback(),s.print(),r.remove(),n.settings.closeCallback(),n.removeCanvasImg()})}write(t){t.open(),t.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),t.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let t="",n="",r="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,o=>{t+=o}),[].forEach.call(document.querySelectorAll("link"),function(o){o.href.indexOf(".css")>=0&&(n+=`<link type="text/css" rel="stylesheet" href="${o.href}" >`)});let s=document.styleSheets;if(s&&s.length>0)for(let o=0;o<s.length;o++)try{if(s[o].cssRules||s[o].rules){let c=s[o].cssRules||s[o].rules;for(let f=0;f<c.length;f++)r+=c[f].cssText}}catch(c){console.log(s[o].href+c)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,o=>{n+=`<link type="text/css" rel="stylesheet" href="${o}">`}),`<head><title>${this.settings.popTitle}</title>${t}${n}<style type="text/css">${r}</style></head>`}getBody(){let t=this.settings.ids;return t=t.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(t)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(t){let n=t.querySelectorAll("canvas");for(let r=0;r<n.length;r++)if(!n[r].style.display){let s=n[r].parentNode,o=n[r].toDataURL("image/png"),c=new Image;c.className="canvasImg",c.style.display="none",c.src=o,s.appendChild(c)}return t}getFormData(t){let n=t.cloneNode(!0),r=n.querySelectorAll("input,select,textarea"),s=n.querySelectorAll(".canvasImg,canvas"),o=-1;for(let c=0;c<s.length;c++){let f=s[c].parentNode,i=s[c];i.tagName.toLowerCase()==="canvas"?f.removeChild(i):i.style.display="block"}for(let c=0;c<r.length;c++){let f=r[c],i=f.getAttribute("type"),a=r[c];if(i||(i=f.tagName==="SELECT"?"select":f.tagName==="TEXTAREA"?"textarea":""),f.tagName==="INPUT")i==="radio"||i==="checkbox"?f.checked&&a.setAttribute("checked",f.checked):(a.value=f.value,a.setAttribute("value",f.value));else if(i==="select"){o++;for(let u=0;u<t.querySelectorAll("select").length;u++){let d=t.querySelectorAll("select")[u];if(!d.getAttribute("newbs")&&d.setAttribute("newbs",u),d.getAttribute("newbs")==o){let h=t.querySelectorAll("select")[o].selectedIndex;f.options[h].setAttribute("selected",!0)}}}else a.innerHTML=f.value,a.setAttribute("html",f.value)}return n}getPrintWindow(t){var n=this.Iframe(t);return{f:n,win:n.contentWindow||n,doc:n.doc}}previewBoxShow(){let t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: hidden"),t.style.display="block")}previewBoxHide(){let t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: visible;"),t.querySelector("iframe")&&t.querySelector("iframe").remove(),t.style.display="none")}previewBox(){let t=document.getElementById("vue-pirnt-nb-previewBox"),n="previewBody";if(t)return t.querySelector("iframe")&&t.querySelector("iframe").remove(),{close:t.querySelector(".previewClose"),previewBody:t.querySelector(".previewBody")};let r=document.createElement("div");r.setAttribute("id","vue-pirnt-nb-previewBox"),r.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),r.style.zIndex=this.settings.zIndex;let s=document.createElement("div");s.setAttribute("class","previewHeader"),s.setAttribute("style","padding: 5px 20px;"),s.innerHTML=this.settings.previewTitle,r.appendChild(s),this.close=document.createElement("div");let o=this.close;o.setAttribute("class","previewClose"),o.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let c=document.createElement("div"),f=document.createElement("div");c.setAttribute("class","closeBefore"),c.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),f.setAttribute("class","closeAfter"),f.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),o.appendChild(c),o.appendChild(f),s.appendChild(o),this.previewBody=document.createElement("div");let i=this.previewBody;i.setAttribute("class",n),i.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),r.appendChild(i);let a=document.createElement("div");a.setAttribute("class","previewBodyUtil"),a.setAttribute("style","height: 32px;background: #474747;position: relative;"),i.appendChild(a),this.previewBodyUtilPrintBtn=document.createElement("div");let u=this.previewBodyUtilPrintBtn;return u.setAttribute("class","previewBodyUtilPrintBtn"),u.innerHTML=this.settings.previewPrintBtnLabel,u.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),a.appendChild(u),document.body.appendChild(r),{close:this.close,previewBody:this.previewBody}}iframeBox(t,n){let r=document.createElement("iframe");return r.style.border="0px",r.style.position="absolute",r.style.width="0px",r.style.height="0px",r.style.right="0px",r.style.top="0px",r.setAttribute("id",t),r.setAttribute("src",n),r}Iframe(t){let n=this.settings.id;t=t||new Date().getTime();let r=this,s=this.iframeBox(n,t);try{if(this.settings.preview){s.setAttribute("style","border: 0px;flex: 1;");let o=this.previewBox(),c=o.previewBody,f=o.close;c.appendChild(s),this.addEvent(f,"click",function(){r.previewBoxHide()})}else document.body.appendChild(s);s.doc=null,s.doc=s.contentDocument?s.contentDocument:s.contentWindow?s.contentWindow.document:s.document}catch(o){throw new Error(o+". iframes may not be supported in this browser.")}if(s.doc==null)throw new Error("Cannot find document.");return s}}var st={directiveName:"print",mounted(e,t,n){let r=t.instance,s="";var o,c,f;c="click",f=()=>{if(typeof t.value=="string")s=t.value;else{if(typeof t.value!="object"||!t.value.id)return void window.print();{s=t.value.id;let a=s.replace(new RegExp("#","g"),"");document.getElementById(a)||(console.log("id in Error"),s="")}}i()},(o=e).addEventListener?o.addEventListener(c,f,!1):o.attachEvent?o.attachEvent("on"+c,f):o["on"+c]=f;const i=()=>{new Fn({ids:s,vue:r,url:t.value.url,standard:"",extraHead:t.value.extraHead,extraCss:t.value.extraCss,zIndex:t.value.zIndex||20002,previewTitle:t.value.previewTitle||"打印预览",previewPrintBtnLabel:t.value.previewPrintBtnLabel||"打印",popTitle:t.value.popTitle,preview:t.value.preview||!1,asyncUrl:t.value.asyncUrl,previewBeforeOpenCallback(){t.value.previewBeforeOpenCallback&&t.value.previewBeforeOpenCallback(r)},previewOpenCallback(){t.value.previewOpenCallback&&t.value.previewOpenCallback(r)},openCallback(){t.value.openCallback&&t.value.openCallback(r)},closeCallback(){t.value.closeCallback&&t.value.closeCallback(r)},beforeOpenCallback(){t.value.beforeOpenCallback&&t.value.beforeOpenCallback(r)}})}},install:function(e){e.directive("print",st)}};const Ee=vt(Ct);Ee.use(Dn);Ee.use(st);Ee.mount("#app");export{In as a,Ln as u};
|